echarts.js 658 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350
  1. !function (t, e) {
  2. "object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ? define(["exports"], e) : e(t.echarts = {});
  3. }(this, function (t) {
  4. "use strict";
  5. function e(t) {
  6. var e = {},
  7. i = {},
  8. n = t.match(/Firefox\/([\d.]+)/),
  9. r = t.match(/MSIE\s([\d.]+)/) || t.match(/Trident\/.+?rv:(([\d.]+))/),
  10. a = t.match(/Edge\/([\d.]+)/),
  11. o = /micromessenger/i.test(t);
  12. return n && (i.firefox = !0, i.version = n[1]), r && (i.ie = !0, i.version = r[1]), a && (i.edge = !0, i.version = a[1]), o && (i.weChat = !0), {
  13. browser: i,
  14. os: e,
  15. node: !1,
  16. canvasSupported: !!document.createElement("canvas").getContext,
  17. svgSupported: "undefined" != typeof SVGRect,
  18. touchEventsSupported: "ontouchstart" in window && !i.ie && !i.edge,
  19. pointerEventsSupported: "onpointerdown" in window && (i.edge || i.ie && i.version >= 11),
  20. domSupported: "undefined" != typeof document
  21. };
  22. }
  23. function i(t, e) {
  24. "createCanvas" === t && (Rg = null), zg[t] = e;
  25. }
  26. function n(t) {
  27. if (null == t || "object" != typeof t) return t;
  28. var e = t,
  29. i = Cg.call(t);
  30. if ("[object Array]" === i) {
  31. if (!R(t)) {
  32. e = [];
  33. for (var r = 0, a = t.length; a > r; r++) e[r] = n(t[r]);
  34. }
  35. } else if (Tg[i]) {
  36. if (!R(t)) {
  37. var o = t.constructor;
  38. if (t.constructor.from) e = o.from(t);else {
  39. e = new o(t.length);
  40. for (var r = 0, a = t.length; a > r; r++) e[r] = n(t[r]);
  41. }
  42. }
  43. } else if (!Ig[i] && !R(t) && !T(t)) {
  44. e = {};
  45. for (var s in t) t.hasOwnProperty(s) && (e[s] = n(t[s]));
  46. }
  47. return e;
  48. }
  49. function r(t, e, i) {
  50. if (!S(e) || !S(t)) return i ? n(e) : t;
  51. for (var a in e) if (e.hasOwnProperty(a)) {
  52. var o = t[a],
  53. s = e[a];
  54. !S(s) || !S(o) || x(s) || x(o) || T(s) || T(o) || M(s) || M(o) || R(s) || R(o) ? !i && a in t || (t[a] = n(e[a], !0)) : r(o, s, i);
  55. }
  56. return t;
  57. }
  58. function a(t, e) {
  59. for (var i = t[0], n = 1, a = t.length; a > n; n++) i = r(i, t[n], e);
  60. return i;
  61. }
  62. function o(t, e) {
  63. for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i]);
  64. return t;
  65. }
  66. function s(t, e, i) {
  67. for (var n in e) e.hasOwnProperty(n) && (i ? null != e[n] : null == t[n]) && (t[n] = e[n]);
  68. return t;
  69. }
  70. function l() {
  71. return Rg || (Rg = Eg().getContext("2d")), Rg;
  72. }
  73. function u(t, e) {
  74. if (t) {
  75. if (t.indexOf) return t.indexOf(e);
  76. for (var i = 0, n = t.length; n > i; i++) if (t[i] === e) return i;
  77. }
  78. return -1;
  79. }
  80. function h(t, e) {
  81. function i() {}
  82. var n = t.prototype;
  83. i.prototype = e.prototype, t.prototype = new i();
  84. for (var r in n) n.hasOwnProperty(r) && (t.prototype[r] = n[r]);
  85. t.prototype.constructor = t, t.superClass = e;
  86. }
  87. function c(t, e, i) {
  88. t = "prototype" in t ? t.prototype : t, e = "prototype" in e ? e.prototype : e, s(t, e, i);
  89. }
  90. function d(t) {
  91. return t ? "string" == typeof t ? !1 : "number" == typeof t.length : void 0;
  92. }
  93. function f(t, e, i) {
  94. if (t && e) if (t.forEach && t.forEach === Ag) t.forEach(e, i);else if (t.length === +t.length) for (var n = 0, r = t.length; r > n; n++) e.call(i, t[n], n, t);else for (var a in t) t.hasOwnProperty(a) && e.call(i, t[a], a, t);
  95. }
  96. function p(t, e, i) {
  97. if (t && e) {
  98. if (t.map && t.map === Lg) return t.map(e, i);
  99. for (var n = [], r = 0, a = t.length; a > r; r++) n.push(e.call(i, t[r], r, t));
  100. return n;
  101. }
  102. }
  103. function g(t, e, i, n) {
  104. if (t && e) {
  105. if (t.reduce && t.reduce === Og) return t.reduce(e, i, n);
  106. for (var r = 0, a = t.length; a > r; r++) i = e.call(n, i, t[r], r, t);
  107. return i;
  108. }
  109. }
  110. function m(t, e, i) {
  111. if (t && e) {
  112. if (t.filter && t.filter === kg) return t.filter(e, i);
  113. for (var n = [], r = 0, a = t.length; a > r; r++) e.call(i, t[r], r, t) && n.push(t[r]);
  114. return n;
  115. }
  116. }
  117. function v(t, e, i) {
  118. if (t && e) for (var n = 0, r = t.length; r > n; n++) if (e.call(i, t[n], n, t)) return t[n];
  119. }
  120. function y(t, e) {
  121. var i = Pg.call(arguments, 2);
  122. return function () {
  123. return t.apply(e, i.concat(Pg.call(arguments)));
  124. };
  125. }
  126. function _(t) {
  127. var e = Pg.call(arguments, 1);
  128. return function () {
  129. return t.apply(this, e.concat(Pg.call(arguments)));
  130. };
  131. }
  132. function x(t) {
  133. return "[object Array]" === Cg.call(t);
  134. }
  135. function w(t) {
  136. return "function" == typeof t;
  137. }
  138. function b(t) {
  139. return "[object String]" === Cg.call(t);
  140. }
  141. function S(t) {
  142. var e = typeof t;
  143. return "function" === e || !!t && "object" === e;
  144. }
  145. function M(t) {
  146. return !!Ig[Cg.call(t)];
  147. }
  148. function I(t) {
  149. return !!Tg[Cg.call(t)];
  150. }
  151. function T(t) {
  152. return "object" == typeof t && "number" == typeof t.nodeType && "object" == typeof t.ownerDocument;
  153. }
  154. function C(t) {
  155. return t !== t;
  156. }
  157. function D() {
  158. for (var t = 0, e = arguments.length; e > t; t++) if (null != arguments[t]) return arguments[t];
  159. }
  160. function A(t, e) {
  161. return null != t ? t : e;
  162. }
  163. function k(t, e, i) {
  164. return null != t ? t : null != e ? e : i;
  165. }
  166. function P() {
  167. return Function.call.apply(Pg, arguments);
  168. }
  169. function L(t) {
  170. if ("number" == typeof t) return [t, t, t, t];
  171. var e = t.length;
  172. return 2 === e ? [t[0], t[1], t[0], t[1]] : 3 === e ? [t[0], t[1], t[2], t[1]] : t;
  173. }
  174. function O(t, e) {
  175. if (!t) throw new Error(e);
  176. }
  177. function z(t) {
  178. return null == t ? null : "function" == typeof t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
  179. }
  180. function E(t) {
  181. t[Bg] = !0;
  182. }
  183. function R(t) {
  184. return t[Bg];
  185. }
  186. function B(t) {
  187. function e(t, e) {
  188. i ? n.set(t, e) : n.set(e, t);
  189. }
  190. var i = x(t);
  191. this.data = {};
  192. var n = this;
  193. t instanceof B ? t.each(e) : t && f(t, e);
  194. }
  195. function N(t) {
  196. return new B(t);
  197. }
  198. function F(t, e) {
  199. for (var i = new t.constructor(t.length + e.length), n = 0; n < t.length; n++) i[n] = t[n];
  200. var r = t.length;
  201. for (n = 0; n < e.length; n++) i[n + r] = e[n];
  202. return i;
  203. }
  204. function G() {}
  205. function V(t, e) {
  206. var i = new Fg(2);
  207. return null == t && (t = 0), null == e && (e = 0), i[0] = t, i[1] = e, i;
  208. }
  209. function H(t, e) {
  210. return t[0] = e[0], t[1] = e[1], t;
  211. }
  212. function W(t) {
  213. var e = new Fg(2);
  214. return e[0] = t[0], e[1] = t[1], e;
  215. }
  216. function U(t, e, i) {
  217. return t[0] = e, t[1] = i, t;
  218. }
  219. function X(t, e, i) {
  220. return t[0] = e[0] + i[0], t[1] = e[1] + i[1], t;
  221. }
  222. function Y(t, e, i, n) {
  223. return t[0] = e[0] + i[0] * n, t[1] = e[1] + i[1] * n, t;
  224. }
  225. function j(t, e, i) {
  226. return t[0] = e[0] - i[0], t[1] = e[1] - i[1], t;
  227. }
  228. function q(t) {
  229. return Math.sqrt(Z(t));
  230. }
  231. function Z(t) {
  232. return t[0] * t[0] + t[1] * t[1];
  233. }
  234. function K(t, e, i) {
  235. return t[0] = e[0] * i[0], t[1] = e[1] * i[1], t;
  236. }
  237. function $(t, e, i) {
  238. return t[0] = e[0] / i[0], t[1] = e[1] / i[1], t;
  239. }
  240. function Q(t, e) {
  241. return t[0] * e[0] + t[1] * e[1];
  242. }
  243. function J(t, e, i) {
  244. return t[0] = e[0] * i, t[1] = e[1] * i, t;
  245. }
  246. function te(t, e) {
  247. var i = q(e);
  248. return 0 === i ? (t[0] = 0, t[1] = 0) : (t[0] = e[0] / i, t[1] = e[1] / i), t;
  249. }
  250. function ee(t, e) {
  251. return Math.sqrt((t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]));
  252. }
  253. function ie(t, e) {
  254. return (t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]);
  255. }
  256. function ne(t, e) {
  257. return t[0] = -e[0], t[1] = -e[1], t;
  258. }
  259. function re(t, e, i, n) {
  260. return t[0] = e[0] + n * (i[0] - e[0]), t[1] = e[1] + n * (i[1] - e[1]), t;
  261. }
  262. function ae(t, e, i) {
  263. var n = e[0],
  264. r = e[1];
  265. return t[0] = i[0] * n + i[2] * r + i[4], t[1] = i[1] * n + i[3] * r + i[5], t;
  266. }
  267. function oe(t, e, i) {
  268. return t[0] = Math.min(e[0], i[0]), t[1] = Math.min(e[1], i[1]), t;
  269. }
  270. function se(t, e, i) {
  271. return t[0] = Math.max(e[0], i[0]), t[1] = Math.max(e[1], i[1]), t;
  272. }
  273. function le() {
  274. this.on("mousedown", this._dragStart, this), this.on("mousemove", this._drag, this), this.on("mouseup", this._dragEnd, this), this.on("globalout", this._dragEnd, this);
  275. }
  276. function ue(t, e) {
  277. return {
  278. target: t,
  279. topTarget: e && e.topTarget
  280. };
  281. }
  282. function he(t, e) {
  283. var i = t._$eventProcessor;
  284. return null != e && i && i.normalizeQuery && (e = i.normalizeQuery(e)), e;
  285. }
  286. function ce(t, e, i, n, r, a) {
  287. var o = t._$handlers;
  288. if ("function" == typeof i && (r = n, n = i, i = null), !n || !e) return t;
  289. i = he(t, i), o[e] || (o[e] = []);
  290. for (var s = 0; s < o[e].length; s++) if (o[e][s].h === n) return t;
  291. var l = {
  292. h: n,
  293. one: a,
  294. query: i,
  295. ctx: r || t,
  296. callAtLast: n.zrEventfulCallAtLast
  297. },
  298. u = o[e].length - 1,
  299. h = o[e][u];
  300. return h && h.callAtLast ? o[e].splice(u, 0, l) : o[e].push(l), t;
  301. }
  302. function de(t, e, i, n, r, a) {
  303. var o = n + "-" + r,
  304. s = t.length;
  305. if (a.hasOwnProperty(o)) return a[o];
  306. if (1 === e) {
  307. var l = Math.round(Math.log((1 << s) - 1 & ~r) / jg);
  308. return t[i][l];
  309. }
  310. for (var u = n | 1 << i, h = i + 1; n & 1 << h;) h++;
  311. for (var c = 0, d = 0, f = 0; s > d; d++) {
  312. var p = 1 << d;
  313. p & r || (c += (f % 2 ? -1 : 1) * t[i][d] * de(t, e - 1, h, u, r | p, a), f++);
  314. }
  315. return a[o] = c, c;
  316. }
  317. function fe(t, e) {
  318. var i = [[t[0], t[1], 1, 0, 0, 0, -e[0] * t[0], -e[0] * t[1]], [0, 0, 0, t[0], t[1], 1, -e[1] * t[0], -e[1] * t[1]], [t[2], t[3], 1, 0, 0, 0, -e[2] * t[2], -e[2] * t[3]], [0, 0, 0, t[2], t[3], 1, -e[3] * t[2], -e[3] * t[3]], [t[4], t[5], 1, 0, 0, 0, -e[4] * t[4], -e[4] * t[5]], [0, 0, 0, t[4], t[5], 1, -e[5] * t[4], -e[5] * t[5]], [t[6], t[7], 1, 0, 0, 0, -e[6] * t[6], -e[6] * t[7]], [0, 0, 0, t[6], t[7], 1, -e[7] * t[6], -e[7] * t[7]]],
  319. n = {},
  320. r = de(i, 8, 0, 0, 0, n);
  321. if (0 !== r) {
  322. for (var a = [], o = 0; 8 > o; o++) for (var s = 0; 8 > s; s++) null == a[s] && (a[s] = 0), a[s] += ((o + s) % 2 ? -1 : 1) * de(i, 7, 0 === o ? 1 : 0, 1 << o, 1 << s, n) / r * e[o];
  323. return function (t, e, i) {
  324. var n = e * a[6] + i * a[7] + 1;
  325. t[0] = (e * a[0] + i * a[1] + a[2]) / n, t[1] = (e * a[3] + i * a[4] + a[5]) / n;
  326. };
  327. }
  328. }
  329. function pe(t, e, i, n) {
  330. return i = i || {}, n || !Mg.canvasSupported ? ge(t, e, i) : Mg.browser.firefox && null != e.layerX && e.layerX !== e.offsetX ? (i.zrX = e.layerX, i.zrY = e.layerY) : null != e.offsetX ? (i.zrX = e.offsetX, i.zrY = e.offsetY) : ge(t, e, i), i;
  331. }
  332. function ge(t, e, i) {
  333. if (t.getBoundingClientRect && Mg.domSupported) {
  334. var n = e.clientX,
  335. r = e.clientY;
  336. if ("CANVAS" === t.nodeName.toUpperCase()) {
  337. var a = t.getBoundingClientRect();
  338. return i.zrX = n - a.left, void (i.zrY = r - a.top);
  339. }
  340. var o = t[Kg] || (t[Kg] = {}),
  341. s = ve(me(t, o), o);
  342. if (s) return s($g, n, r), i.zrX = $g[0], void (i.zrY = $g[1]);
  343. }
  344. i.zrX = i.zrY = 0;
  345. }
  346. function me(t, e) {
  347. var i = e.markers;
  348. if (i) return i;
  349. i = e.markers = [];
  350. for (var n = ["left", "right"], r = ["top", "bottom"], a = 0; 4 > a; a++) {
  351. var o = document.createElement("div"),
  352. s = o.style,
  353. l = a % 2,
  354. u = (a >> 1) % 2;
  355. s.cssText = ["position:absolute", "visibility: hidden", "padding: 0", "margin: 0", "border-width: 0", "width:0", "height:0", n[l] + ":0", r[u] + ":0", n[1 - l] + ":auto", r[1 - u] + ":auto", ""].join("!important;"), t.appendChild(o), i.push(o);
  356. }
  357. return i;
  358. }
  359. function ve(t, e) {
  360. for (var i = e.transformer, n = e.srcCoords, r = !0, a = [], o = [], s = 0; 4 > s; s++) {
  361. var l = t[s].getBoundingClientRect(),
  362. u = 2 * s,
  363. h = l.left,
  364. c = l.top;
  365. a.push(h, c), r &= n && h === n[u] && c === n[u + 1], o.push(t[s].offsetLeft, t[s].offsetTop);
  366. }
  367. return r ? i : (e.srcCoords = a, e.transformer = fe(a, o));
  368. }
  369. function ye(t, e, i) {
  370. if (e = e || window.event, null != e.zrX) return e;
  371. var n = e.type,
  372. r = n && n.indexOf("touch") >= 0;
  373. if (r) {
  374. var a = "touchend" !== n ? e.targetTouches[0] : e.changedTouches[0];
  375. a && pe(t, a, e, i);
  376. } else pe(t, e, e, i), e.zrDelta = e.wheelDelta ? e.wheelDelta / 120 : -(e.detail || 0) / 3;
  377. var o = e.button;
  378. return null == e.which && void 0 !== o && Zg.test(e.type) && (e.which = 1 & o ? 1 : 2 & o ? 3 : 4 & o ? 2 : 0), e;
  379. }
  380. function _e(t, e, i) {
  381. qg ? t.addEventListener(e, i) : t.attachEvent("on" + e, i);
  382. }
  383. function xe(t, e, i) {
  384. qg ? t.removeEventListener(e, i) : t.detachEvent("on" + e, i);
  385. }
  386. function we(t) {
  387. return 2 === t.which || 3 === t.which;
  388. }
  389. function be(t) {
  390. var e = t[1][0] - t[0][0],
  391. i = t[1][1] - t[0][1];
  392. return Math.sqrt(e * e + i * i);
  393. }
  394. function Se(t) {
  395. return [(t[0][0] + t[1][0]) / 2, (t[0][1] + t[1][1]) / 2];
  396. }
  397. function Me(t, e, i) {
  398. return {
  399. type: t,
  400. event: i,
  401. target: e.target,
  402. topTarget: e.topTarget,
  403. cancelBubble: !1,
  404. offsetX: i.zrX,
  405. offsetY: i.zrY,
  406. gestureEvent: i.gestureEvent,
  407. pinchX: i.pinchX,
  408. pinchY: i.pinchY,
  409. pinchScale: i.pinchScale,
  410. wheelDelta: i.zrDelta,
  411. zrByTouch: i.zrByTouch,
  412. which: i.which,
  413. stop: Ie
  414. };
  415. }
  416. function Ie() {
  417. Qg(this.event);
  418. }
  419. function Te() {}
  420. function Ce(t, e, i) {
  421. if (t[t.rectHover ? "rectContain" : "contain"](e, i)) {
  422. for (var n, r = t; r;) {
  423. if (r.clipPath && !r.clipPath.contain(e, i)) return !1;
  424. r.silent && (n = !0), r = r.parent;
  425. }
  426. return n ? em : !0;
  427. }
  428. return !1;
  429. }
  430. function De() {
  431. var t = new rm(6);
  432. return Ae(t), t;
  433. }
  434. function Ae(t) {
  435. return t[0] = 1, t[1] = 0, t[2] = 0, t[3] = 1, t[4] = 0, t[5] = 0, t;
  436. }
  437. function ke(t, e) {
  438. 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;
  439. }
  440. function Pe(t, e, i) {
  441. var n = e[0] * i[0] + e[2] * i[1],
  442. r = e[1] * i[0] + e[3] * i[1],
  443. a = e[0] * i[2] + e[2] * i[3],
  444. o = e[1] * i[2] + e[3] * i[3],
  445. s = e[0] * i[4] + e[2] * i[5] + e[4],
  446. l = e[1] * i[4] + e[3] * i[5] + e[5];
  447. return t[0] = n, t[1] = r, t[2] = a, t[3] = o, t[4] = s, t[5] = l, t;
  448. }
  449. function Le(t, e, i) {
  450. 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;
  451. }
  452. function Oe(t, e, i) {
  453. var n = e[0],
  454. r = e[2],
  455. a = e[4],
  456. o = e[1],
  457. s = e[3],
  458. l = e[5],
  459. u = Math.sin(i),
  460. h = Math.cos(i);
  461. return t[0] = n * h + o * u, t[1] = -n * u + o * h, t[2] = r * h + s * u, t[3] = -r * u + h * s, t[4] = h * a + u * l, t[5] = h * l - u * a, t;
  462. }
  463. function ze(t, e, i) {
  464. var n = i[0],
  465. r = i[1];
  466. return t[0] = e[0] * n, t[1] = e[1] * r, t[2] = e[2] * n, t[3] = e[3] * r, t[4] = e[4] * n, t[5] = e[5] * r, t;
  467. }
  468. function Ee(t, e) {
  469. var i = e[0],
  470. n = e[2],
  471. r = e[4],
  472. a = e[1],
  473. o = e[3],
  474. s = e[5],
  475. l = i * o - a * n;
  476. return l ? (l = 1 / l, t[0] = o * l, t[1] = -a * l, t[2] = -n * l, t[3] = i * l, t[4] = (n * s - o * r) * l, t[5] = (a * r - i * s) * l, t) : null;
  477. }
  478. function Re(t) {
  479. var e = De();
  480. return ke(e, t), e;
  481. }
  482. function Be(t) {
  483. return t > sm || -sm > t;
  484. }
  485. function Ne(t) {
  486. this._target = t.target, this._life = t.life || 1e3, this._delay = t.delay || 0, this._initialized = !1, this.loop = null == t.loop ? !1 : t.loop, this.gap = t.gap || 0, this.easing = t.easing || "Linear", this.onframe = t.onframe, this.ondestroy = t.ondestroy, this.onrestart = t.onrestart, this._pausedTime = 0, this._paused = !1;
  487. }
  488. function Fe(t) {
  489. return t = Math.round(t), 0 > t ? 0 : t > 255 ? 255 : t;
  490. }
  491. function Ge(t) {
  492. return t = Math.round(t), 0 > t ? 0 : t > 360 ? 360 : t;
  493. }
  494. function Ve(t) {
  495. return 0 > t ? 0 : t > 1 ? 1 : t;
  496. }
  497. function He(t) {
  498. return Fe(t.length && "%" === t.charAt(t.length - 1) ? parseFloat(t) / 100 * 255 : parseInt(t, 10));
  499. }
  500. function We(t) {
  501. return Ve(t.length && "%" === t.charAt(t.length - 1) ? parseFloat(t) / 100 : parseFloat(t));
  502. }
  503. function Ue(t, e, i) {
  504. return 0 > i ? i += 1 : i > 1 && (i -= 1), 1 > 6 * i ? t + (e - t) * i * 6 : 1 > 2 * i ? e : 2 > 3 * i ? t + (e - t) * (2 / 3 - i) * 6 : t;
  505. }
  506. function Xe(t, e, i) {
  507. return t + (e - t) * i;
  508. }
  509. function Ye(t, e, i, n, r) {
  510. return t[0] = e, t[1] = i, t[2] = n, t[3] = r, t;
  511. }
  512. function je(t, e) {
  513. return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t;
  514. }
  515. function qe(t, e) {
  516. wm && je(wm, e), wm = xm.put(t, wm || e.slice());
  517. }
  518. function Ze(t, e) {
  519. if (t) {
  520. e = e || [];
  521. var i = xm.get(t);
  522. if (i) return je(e, i);
  523. t += "";
  524. var n = t.replace(/ /g, "").toLowerCase();
  525. if (n in _m) return je(e, _m[n]), qe(t, e), e;
  526. if ("#" !== n.charAt(0)) {
  527. var r = n.indexOf("("),
  528. a = n.indexOf(")");
  529. if (-1 !== r && a + 1 === n.length) {
  530. var o = n.substr(0, r),
  531. s = n.substr(r + 1, a - (r + 1)).split(","),
  532. l = 1;
  533. switch (o) {
  534. case "rgba":
  535. if (4 !== s.length) return void Ye(e, 0, 0, 0, 1);
  536. l = We(s.pop());
  537. case "rgb":
  538. return 3 !== s.length ? void Ye(e, 0, 0, 0, 1) : (Ye(e, He(s[0]), He(s[1]), He(s[2]), l), qe(t, e), e);
  539. case "hsla":
  540. return 4 !== s.length ? void Ye(e, 0, 0, 0, 1) : (s[3] = We(s[3]), Ke(s, e), qe(t, e), e);
  541. case "hsl":
  542. return 3 !== s.length ? void Ye(e, 0, 0, 0, 1) : (Ke(s, e), qe(t, e), e);
  543. default:
  544. return;
  545. }
  546. }
  547. Ye(e, 0, 0, 0, 1);
  548. } else {
  549. if (4 === n.length) {
  550. var u = parseInt(n.substr(1), 16);
  551. return u >= 0 && 4095 >= u ? (Ye(e, (3840 & u) >> 4 | (3840 & u) >> 8, 240 & u | (240 & u) >> 4, 15 & u | (15 & u) << 4, 1), qe(t, e), e) : void Ye(e, 0, 0, 0, 1);
  552. }
  553. if (7 === n.length) {
  554. var u = parseInt(n.substr(1), 16);
  555. return u >= 0 && 16777215 >= u ? (Ye(e, (16711680 & u) >> 16, (65280 & u) >> 8, 255 & u, 1), qe(t, e), e) : void Ye(e, 0, 0, 0, 1);
  556. }
  557. }
  558. }
  559. }
  560. function Ke(t, e) {
  561. var i = (parseFloat(t[0]) % 360 + 360) % 360 / 360,
  562. n = We(t[1]),
  563. r = We(t[2]),
  564. a = .5 >= r ? r * (n + 1) : r + n - r * n,
  565. o = 2 * r - a;
  566. return e = e || [], Ye(e, Fe(255 * Ue(o, a, i + 1 / 3)), Fe(255 * Ue(o, a, i)), Fe(255 * Ue(o, a, i - 1 / 3)), 1), 4 === t.length && (e[3] = t[3]), e;
  567. }
  568. function $e(t) {
  569. if (t) {
  570. var e,
  571. i,
  572. n = t[0] / 255,
  573. r = t[1] / 255,
  574. a = t[2] / 255,
  575. o = Math.min(n, r, a),
  576. s = Math.max(n, r, a),
  577. l = s - o,
  578. u = (s + o) / 2;
  579. if (0 === l) e = 0, i = 0;else {
  580. i = .5 > u ? l / (s + o) : l / (2 - s - o);
  581. var h = ((s - n) / 6 + l / 2) / l,
  582. c = ((s - r) / 6 + l / 2) / l,
  583. d = ((s - a) / 6 + l / 2) / l;
  584. n === s ? e = d - c : r === s ? e = 1 / 3 + h - d : a === s && (e = 2 / 3 + c - h), 0 > e && (e += 1), e > 1 && (e -= 1);
  585. }
  586. var f = [360 * e, i, u];
  587. return null != t[3] && f.push(t[3]), f;
  588. }
  589. }
  590. function Qe(t, e) {
  591. var i = Ze(t);
  592. if (i) {
  593. for (var n = 0; 3 > n; n++) i[n] = 0 > e ? i[n] * (1 - e) | 0 : (255 - i[n]) * e + i[n] | 0, i[n] > 255 ? i[n] = 255 : t[n] < 0 && (i[n] = 0);
  594. return ri(i, 4 === i.length ? "rgba" : "rgb");
  595. }
  596. }
  597. function Je(t) {
  598. var e = Ze(t);
  599. return e ? ((1 << 24) + (e[0] << 16) + (e[1] << 8) + +e[2]).toString(16).slice(1) : void 0;
  600. }
  601. function ti(t, e, i) {
  602. if (e && e.length && t >= 0 && 1 >= t) {
  603. i = i || [];
  604. var n = t * (e.length - 1),
  605. r = Math.floor(n),
  606. a = Math.ceil(n),
  607. o = e[r],
  608. s = e[a],
  609. l = n - r;
  610. return i[0] = Fe(Xe(o[0], s[0], l)), i[1] = Fe(Xe(o[1], s[1], l)), i[2] = Fe(Xe(o[2], s[2], l)), i[3] = Ve(Xe(o[3], s[3], l)), i;
  611. }
  612. }
  613. function ei(t, e, i) {
  614. if (e && e.length && t >= 0 && 1 >= t) {
  615. var n = t * (e.length - 1),
  616. r = Math.floor(n),
  617. a = Math.ceil(n),
  618. o = Ze(e[r]),
  619. s = Ze(e[a]),
  620. l = n - r,
  621. u = ri([Fe(Xe(o[0], s[0], l)), Fe(Xe(o[1], s[1], l)), Fe(Xe(o[2], s[2], l)), Ve(Xe(o[3], s[3], l))], "rgba");
  622. return i ? {
  623. color: u,
  624. leftIndex: r,
  625. rightIndex: a,
  626. value: n
  627. } : u;
  628. }
  629. }
  630. function ii(t, e, i, n) {
  631. return t = Ze(t), t ? (t = $e(t), null != e && (t[0] = Ge(e)), null != i && (t[1] = We(i)), null != n && (t[2] = We(n)), ri(Ke(t), "rgba")) : void 0;
  632. }
  633. function ni(t, e) {
  634. return t = Ze(t), t && null != e ? (t[3] = Ve(e), ri(t, "rgba")) : void 0;
  635. }
  636. function ri(t, e) {
  637. if (t && t.length) {
  638. var i = t[0] + "," + t[1] + "," + t[2];
  639. return ("rgba" === e || "hsva" === e || "hsla" === e) && (i += "," + t[3]), e + "(" + i + ")";
  640. }
  641. }
  642. function ai(t, e) {
  643. return t[e];
  644. }
  645. function oi(t, e, i) {
  646. t[e] = i;
  647. }
  648. function si(t, e, i) {
  649. return (e - t) * i + t;
  650. }
  651. function li(t, e, i) {
  652. return i > .5 ? e : t;
  653. }
  654. function ui(t, e, i, n, r) {
  655. var a = t.length;
  656. if (1 === r) for (var o = 0; a > o; o++) n[o] = si(t[o], e[o], i);else for (var s = a && t[0].length, o = 0; a > o; o++) for (var l = 0; s > l; l++) n[o][l] = si(t[o][l], e[o][l], i);
  657. }
  658. function hi(t, e, i) {
  659. var n = t.length,
  660. r = e.length;
  661. if (n !== r) {
  662. var a = n > r;
  663. if (a) t.length = r;else for (var o = n; r > o; o++) t.push(1 === i ? e[o] : Im.call(e[o]));
  664. }
  665. for (var s = t[0] && t[0].length, o = 0; o < t.length; o++) if (1 === i) isNaN(t[o]) && (t[o] = e[o]);else for (var l = 0; s > l; l++) isNaN(t[o][l]) && (t[o][l] = e[o][l]);
  666. }
  667. function ci(t, e, i) {
  668. if (t === e) return !0;
  669. var n = t.length;
  670. if (n !== e.length) return !1;
  671. if (1 === i) {
  672. for (var r = 0; n > r; r++) if (t[r] !== e[r]) return !1;
  673. } else for (var a = t[0].length, r = 0; n > r; r++) for (var o = 0; a > o; o++) if (t[r][o] !== e[r][o]) return !1;
  674. return !0;
  675. }
  676. function di(t, e, i, n, r, a, o, s, l) {
  677. var u = t.length;
  678. if (1 === l) for (var h = 0; u > h; h++) s[h] = fi(t[h], e[h], i[h], n[h], r, a, o);else for (var c = t[0].length, h = 0; u > h; h++) for (var d = 0; c > d; d++) s[h][d] = fi(t[h][d], e[h][d], i[h][d], n[h][d], r, a, o);
  679. }
  680. function fi(t, e, i, n, r, a, o) {
  681. var s = .5 * (i - t),
  682. l = .5 * (n - e);
  683. return (2 * (e - i) + s + l) * o + (-3 * (e - i) - 2 * s - l) * a + s * r + e;
  684. }
  685. function pi(t) {
  686. if (d(t)) {
  687. var e = t.length;
  688. if (d(t[0])) {
  689. for (var i = [], n = 0; e > n; n++) i.push(Im.call(t[n]));
  690. return i;
  691. }
  692. return Im.call(t);
  693. }
  694. return t;
  695. }
  696. function gi(t) {
  697. return t[0] = Math.floor(t[0]), t[1] = Math.floor(t[1]), t[2] = Math.floor(t[2]), "rgba(" + t.join(",") + ")";
  698. }
  699. function mi(t) {
  700. var e = t[t.length - 1].value;
  701. return d(e && e[0]) ? 2 : 1;
  702. }
  703. function vi(t, e, i, n, r, a) {
  704. var o = t._getter,
  705. s = t._setter,
  706. l = "spline" === e,
  707. u = n.length;
  708. if (u) {
  709. var h,
  710. c = n[0].value,
  711. f = d(c),
  712. p = !1,
  713. g = !1,
  714. m = f ? mi(n) : 0;
  715. n.sort(function (t, e) {
  716. return t.time - e.time;
  717. }), h = n[u - 1].time;
  718. for (var v = [], y = [], _ = n[0].value, x = !0, w = 0; u > w; w++) {
  719. v.push(n[w].time / h);
  720. var b = n[w].value;
  721. if (f && ci(b, _, m) || !f && b === _ || (x = !1), _ = b, "string" == typeof b) {
  722. var S = Ze(b);
  723. S ? (b = S, p = !0) : g = !0;
  724. }
  725. y.push(b);
  726. }
  727. if (a || !x) {
  728. for (var M = y[u - 1], w = 0; u - 1 > w; w++) f ? hi(y[w], M, m) : !isNaN(y[w]) || isNaN(M) || g || p || (y[w] = M);
  729. f && hi(o(t._target, r), M, m);
  730. var I,
  731. T,
  732. C,
  733. D,
  734. A,
  735. k,
  736. P = 0,
  737. L = 0;
  738. if (p) var O = [0, 0, 0, 0];
  739. var z = function (t, e) {
  740. var i;
  741. if (0 > e) i = 0;else if (L > e) {
  742. for (I = Math.min(P + 1, u - 1), i = I; i >= 0 && !(v[i] <= e); i--);
  743. i = Math.min(i, u - 2);
  744. } else {
  745. for (i = P; u > i && !(v[i] > e); i++);
  746. i = Math.min(i - 1, u - 2);
  747. }
  748. P = i, L = e;
  749. var n = v[i + 1] - v[i];
  750. if (0 !== n) if (T = (e - v[i]) / n, l) {
  751. if (D = y[i], C = y[0 === i ? i : i - 1], A = y[i > u - 2 ? u - 1 : i + 1], k = y[i > u - 3 ? u - 1 : i + 2], f) di(C, D, A, k, T, T * T, T * T * T, o(t, r), m);else {
  752. var a;
  753. if (p) a = di(C, D, A, k, T, T * T, T * T * T, O, 1), a = gi(O);else {
  754. if (g) return li(D, A, T);
  755. a = fi(C, D, A, k, T, T * T, T * T * T);
  756. }
  757. s(t, r, a);
  758. }
  759. } else if (f) ui(y[i], y[i + 1], T, o(t, r), m);else {
  760. var a;
  761. if (p) ui(y[i], y[i + 1], T, O, 1), a = gi(O);else {
  762. if (g) return li(y[i], y[i + 1], T);
  763. a = si(y[i], y[i + 1], T);
  764. }
  765. s(t, r, a);
  766. }
  767. },
  768. E = new Ne({
  769. target: t._target,
  770. life: h,
  771. loop: t._loop,
  772. delay: t._delay,
  773. onframe: z,
  774. ondestroy: i
  775. });
  776. return e && "spline" !== e && (E.easing = e), E;
  777. }
  778. }
  779. }
  780. function yi(t, e, i, n, r, a, o, s) {
  781. function l() {
  782. h--, h || a && a();
  783. }
  784. b(n) ? (a = r, r = n, n = 0) : w(r) ? (a = r, r = "linear", n = 0) : w(n) ? (a = n, n = 0) : w(i) ? (a = i, i = 500) : i || (i = 500), t.stopAnimation(), _i(t, "", t, e, i, n, s);
  785. var u = t.animators.slice(),
  786. h = u.length;
  787. h || a && a();
  788. for (var c = 0; c < u.length; c++) u[c].done(l).start(r, o);
  789. }
  790. function _i(t, e, i, n, r, a, o) {
  791. var s = {},
  792. l = 0;
  793. for (var u in n) n.hasOwnProperty(u) && (null != i[u] ? S(n[u]) && !d(n[u]) ? _i(t, e ? e + "." + u : u, i[u], n[u], r, a, o) : (o ? (s[u] = i[u], xi(t, e, u, n[u])) : s[u] = n[u], l++) : null == n[u] || o || xi(t, e, u, n[u]));
  794. l > 0 && t.animate(e, !1).when(null == r ? 500 : r, s).delay(a || 0);
  795. }
  796. function xi(t, e, i, n) {
  797. if (e) {
  798. var r = {};
  799. r[e] = {}, r[e][i] = n, t.attr(r);
  800. } else t.attr(i, n);
  801. }
  802. function wi(t, e, i, n) {
  803. 0 > i && (t += i, i = -i), 0 > n && (e += n, n = -n), this.x = t, this.y = e, this.width = i, this.height = n;
  804. }
  805. function bi(t) {
  806. for (var e = 0; t >= Nm;) e |= 1 & t, t >>= 1;
  807. return t + e;
  808. }
  809. function Si(t, e, i, n) {
  810. var r = e + 1;
  811. if (r === i) return 1;
  812. if (n(t[r++], t[e]) < 0) {
  813. for (; i > r && n(t[r], t[r - 1]) < 0;) r++;
  814. Mi(t, e, r);
  815. } else for (; i > r && n(t[r], t[r - 1]) >= 0;) r++;
  816. return r - e;
  817. }
  818. function Mi(t, e, i) {
  819. for (i--; i > e;) {
  820. var n = t[e];
  821. t[e++] = t[i], t[i--] = n;
  822. }
  823. }
  824. function Ii(t, e, i, n, r) {
  825. for (n === e && n++; i > n; n++) {
  826. for (var a, o = t[n], s = e, l = n; l > s;) a = s + l >>> 1, r(o, t[a]) < 0 ? l = a : s = a + 1;
  827. var u = n - s;
  828. switch (u) {
  829. case 3:
  830. t[s + 3] = t[s + 2];
  831. case 2:
  832. t[s + 2] = t[s + 1];
  833. case 1:
  834. t[s + 1] = t[s];
  835. break;
  836. default:
  837. for (; u > 0;) t[s + u] = t[s + u - 1], u--;
  838. }
  839. t[s] = o;
  840. }
  841. }
  842. function Ti(t, e, i, n, r, a) {
  843. var o = 0,
  844. s = 0,
  845. l = 1;
  846. if (a(t, e[i + r]) > 0) {
  847. for (s = n - r; s > l && a(t, e[i + r + l]) > 0;) o = l, l = (l << 1) + 1, 0 >= l && (l = s);
  848. l > s && (l = s), o += r, l += r;
  849. } else {
  850. for (s = r + 1; s > l && a(t, e[i + r - l]) <= 0;) o = l, l = (l << 1) + 1, 0 >= l && (l = s);
  851. l > s && (l = s);
  852. var u = o;
  853. o = r - l, l = r - u;
  854. }
  855. for (o++; l > o;) {
  856. var h = o + (l - o >>> 1);
  857. a(t, e[i + h]) > 0 ? o = h + 1 : l = h;
  858. }
  859. return l;
  860. }
  861. function Ci(t, e, i, n, r, a) {
  862. var o = 0,
  863. s = 0,
  864. l = 1;
  865. if (a(t, e[i + r]) < 0) {
  866. for (s = r + 1; s > l && a(t, e[i + r - l]) < 0;) o = l, l = (l << 1) + 1, 0 >= l && (l = s);
  867. l > s && (l = s);
  868. var u = o;
  869. o = r - l, l = r - u;
  870. } else {
  871. for (s = n - r; s > l && a(t, e[i + r + l]) >= 0;) o = l, l = (l << 1) + 1, 0 >= l && (l = s);
  872. l > s && (l = s), o += r, l += r;
  873. }
  874. for (o++; l > o;) {
  875. var h = o + (l - o >>> 1);
  876. a(t, e[i + h]) < 0 ? l = h : o = h + 1;
  877. }
  878. return l;
  879. }
  880. function Di(t, e) {
  881. function i(t, e) {
  882. l[c] = t, u[c] = e, c += 1;
  883. }
  884. function n() {
  885. for (; c > 1;) {
  886. var t = c - 2;
  887. if (t >= 1 && u[t - 1] <= u[t] + u[t + 1] || t >= 2 && u[t - 2] <= u[t] + u[t - 1]) u[t - 1] < u[t + 1] && t--;else if (u[t] > u[t + 1]) break;
  888. a(t);
  889. }
  890. }
  891. function r() {
  892. for (; c > 1;) {
  893. var t = c - 2;
  894. t > 0 && u[t - 1] < u[t + 1] && t--, a(t);
  895. }
  896. }
  897. function a(i) {
  898. var n = l[i],
  899. r = u[i],
  900. a = l[i + 1],
  901. h = u[i + 1];
  902. u[i] = r + h, i === c - 3 && (l[i + 1] = l[i + 2], u[i + 1] = u[i + 2]), c--;
  903. var d = Ci(t[a], t, n, r, 0, e);
  904. n += d, r -= d, 0 !== r && (h = Ti(t[n + r - 1], t, a, h, h - 1, e), 0 !== h && (h >= r ? o(n, r, a, h) : s(n, r, a, h)));
  905. }
  906. function o(i, n, r, a) {
  907. var o = 0;
  908. for (o = 0; n > o; o++) d[o] = t[i + o];
  909. var s = 0,
  910. l = r,
  911. u = i;
  912. if (t[u++] = t[l++], 0 !== --a) {
  913. if (1 === n) {
  914. for (o = 0; a > o; o++) t[u + o] = t[l + o];
  915. return void (t[u + a] = d[s]);
  916. }
  917. for (var c, f, p, g = h;;) {
  918. c = 0, f = 0, p = !1;
  919. do if (e(t[l], d[s]) < 0) {
  920. if (t[u++] = t[l++], f++, c = 0, 0 === --a) {
  921. p = !0;
  922. break;
  923. }
  924. } else if (t[u++] = d[s++], c++, f = 0, 1 === --n) {
  925. p = !0;
  926. break;
  927. } while (g > (c | f));
  928. if (p) break;
  929. do {
  930. if (c = Ci(t[l], d, s, n, 0, e), 0 !== c) {
  931. for (o = 0; c > o; o++) t[u + o] = d[s + o];
  932. if (u += c, s += c, n -= c, 1 >= n) {
  933. p = !0;
  934. break;
  935. }
  936. }
  937. if (t[u++] = t[l++], 0 === --a) {
  938. p = !0;
  939. break;
  940. }
  941. if (f = Ti(d[s], t, l, a, 0, e), 0 !== f) {
  942. for (o = 0; f > o; o++) t[u + o] = t[l + o];
  943. if (u += f, l += f, a -= f, 0 === a) {
  944. p = !0;
  945. break;
  946. }
  947. }
  948. if (t[u++] = d[s++], 1 === --n) {
  949. p = !0;
  950. break;
  951. }
  952. g--;
  953. } while (c >= Fm || f >= Fm);
  954. if (p) break;
  955. 0 > g && (g = 0), g += 2;
  956. }
  957. if (h = g, 1 > h && (h = 1), 1 === n) {
  958. for (o = 0; a > o; o++) t[u + o] = t[l + o];
  959. t[u + a] = d[s];
  960. } else {
  961. if (0 === n) throw new Error();
  962. for (o = 0; n > o; o++) t[u + o] = d[s + o];
  963. }
  964. } else for (o = 0; n > o; o++) t[u + o] = d[s + o];
  965. }
  966. function s(i, n, r, a) {
  967. var o = 0;
  968. for (o = 0; a > o; o++) d[o] = t[r + o];
  969. var s = i + n - 1,
  970. l = a - 1,
  971. u = r + a - 1,
  972. c = 0,
  973. f = 0;
  974. if (t[u--] = t[s--], 0 !== --n) {
  975. if (1 === a) {
  976. for (u -= n, s -= n, f = u + 1, c = s + 1, o = n - 1; o >= 0; o--) t[f + o] = t[c + o];
  977. return void (t[u] = d[l]);
  978. }
  979. for (var p = h;;) {
  980. var g = 0,
  981. m = 0,
  982. v = !1;
  983. do if (e(d[l], t[s]) < 0) {
  984. if (t[u--] = t[s--], g++, m = 0, 0 === --n) {
  985. v = !0;
  986. break;
  987. }
  988. } else if (t[u--] = d[l--], m++, g = 0, 1 === --a) {
  989. v = !0;
  990. break;
  991. } while (p > (g | m));
  992. if (v) break;
  993. do {
  994. if (g = n - Ci(d[l], t, i, n, n - 1, e), 0 !== g) {
  995. for (u -= g, s -= g, n -= g, f = u + 1, c = s + 1, o = g - 1; o >= 0; o--) t[f + o] = t[c + o];
  996. if (0 === n) {
  997. v = !0;
  998. break;
  999. }
  1000. }
  1001. if (t[u--] = d[l--], 1 === --a) {
  1002. v = !0;
  1003. break;
  1004. }
  1005. if (m = a - Ti(t[s], d, 0, a, a - 1, e), 0 !== m) {
  1006. for (u -= m, l -= m, a -= m, f = u + 1, c = l + 1, o = 0; m > o; o++) t[f + o] = d[c + o];
  1007. if (1 >= a) {
  1008. v = !0;
  1009. break;
  1010. }
  1011. }
  1012. if (t[u--] = t[s--], 0 === --n) {
  1013. v = !0;
  1014. break;
  1015. }
  1016. p--;
  1017. } while (g >= Fm || m >= Fm);
  1018. if (v) break;
  1019. 0 > p && (p = 0), p += 2;
  1020. }
  1021. if (h = p, 1 > h && (h = 1), 1 === a) {
  1022. for (u -= n, s -= n, f = u + 1, c = s + 1, o = n - 1; o >= 0; o--) t[f + o] = t[c + o];
  1023. t[u] = d[l];
  1024. } else {
  1025. if (0 === a) throw new Error();
  1026. for (c = u - (a - 1), o = 0; a > o; o++) t[c + o] = d[o];
  1027. }
  1028. } else for (c = u - (a - 1), o = 0; a > o; o++) t[c + o] = d[o];
  1029. }
  1030. var l,
  1031. u,
  1032. h = Fm,
  1033. c = 0,
  1034. d = [];
  1035. l = [], u = [], this.mergeRuns = n, this.forceMergeRuns = r, this.pushRun = i;
  1036. }
  1037. function Ai(t, e, i, n) {
  1038. i || (i = 0), n || (n = t.length);
  1039. var r = n - i;
  1040. if (!(2 > r)) {
  1041. var a = 0;
  1042. if (Nm > r) return a = Si(t, i, n, e), void Ii(t, i, n, i + a, e);
  1043. var o = new Di(t, e),
  1044. s = bi(r);
  1045. do {
  1046. if (a = Si(t, i, n, e), s > a) {
  1047. var l = r;
  1048. l > s && (l = s), Ii(t, i, i + l, i + a, e), a = l;
  1049. }
  1050. o.pushRun(i, a), o.mergeRuns(), r -= a, i += a;
  1051. } while (0 !== r);
  1052. o.forceMergeRuns();
  1053. }
  1054. }
  1055. function ki(t, e) {
  1056. return t.zlevel === e.zlevel ? t.z === e.z ? t.z2 - e.z2 : t.z - e.z : t.zlevel - e.zlevel;
  1057. }
  1058. function Pi(t, e, i) {
  1059. var n = null == e.x ? 0 : e.x,
  1060. r = null == e.x2 ? 1 : e.x2,
  1061. a = null == e.y ? 0 : e.y,
  1062. o = null == e.y2 ? 0 : e.y2;
  1063. e.global || (n = n * i.width + i.x, r = r * i.width + i.x, a = a * i.height + i.y, o = o * i.height + i.y), n = isNaN(n) ? 0 : n, r = isNaN(r) ? 1 : r, a = isNaN(a) ? 0 : a, o = isNaN(o) ? 0 : o;
  1064. var s = t.createLinearGradient(n, a, r, o);
  1065. return s;
  1066. }
  1067. function Li(t, e, i) {
  1068. var n = i.width,
  1069. r = i.height,
  1070. a = Math.min(n, r),
  1071. o = null == e.x ? .5 : e.x,
  1072. s = null == e.y ? .5 : e.y,
  1073. l = null == e.r ? .5 : e.r;
  1074. e.global || (o = o * n + i.x, s = s * r + i.y, l *= a);
  1075. var u = t.createRadialGradient(o, s, 0, o, s, l);
  1076. return u;
  1077. }
  1078. function Oi() {
  1079. return !1;
  1080. }
  1081. function zi(t, e, i) {
  1082. var n = Eg(),
  1083. r = e.getWidth(),
  1084. a = e.getHeight(),
  1085. o = n.style;
  1086. return o && (o.position = "absolute", o.left = 0, o.top = 0, o.width = r + "px", o.height = a + "px", n.setAttribute("data-zr-dom-id", t)), n.width = r * i, n.height = a * i, n;
  1087. }
  1088. function Ei(t) {
  1089. if ("string" == typeof t) {
  1090. var e = Jm.get(t);
  1091. return e && e.image;
  1092. }
  1093. return t;
  1094. }
  1095. function Ri(t, e, i, n, r) {
  1096. if (t) {
  1097. if ("string" == typeof t) {
  1098. if (e && e.__zrImageSrc === t || !i) return e;
  1099. var a = Jm.get(t),
  1100. o = {
  1101. hostEl: i,
  1102. cb: n,
  1103. cbPayload: r
  1104. };
  1105. return a ? (e = a.image, !Ni(e) && a.pending.push(o)) : (e = new Image(), e.onload = e.onerror = Bi, Jm.put(t, e.__cachedImgObj = {
  1106. image: e,
  1107. pending: [o]
  1108. }), e.src = e.__zrImageSrc = t), e;
  1109. }
  1110. return t;
  1111. }
  1112. return e;
  1113. }
  1114. function Bi() {
  1115. var t = this.__cachedImgObj;
  1116. this.onload = this.onerror = this.__cachedImgObj = null;
  1117. for (var e = 0; e < t.pending.length; e++) {
  1118. var i = t.pending[e],
  1119. n = i.cb;
  1120. n && n(this, i.cbPayload), i.hostEl.dirty();
  1121. }
  1122. t.pending.length = 0;
  1123. }
  1124. function Ni(t) {
  1125. return t && t.width && t.height;
  1126. }
  1127. function Fi(t, e) {
  1128. e = e || rv;
  1129. var i = t + ":" + e;
  1130. if (tv[i]) return tv[i];
  1131. for (var n = (t + "").split("\n"), r = 0, a = 0, o = n.length; o > a; a++) r = Math.max($i(n[a], e).width, r);
  1132. return ev > iv && (ev = 0, tv = {}), ev++, tv[i] = r, r;
  1133. }
  1134. function Gi(t, e, i, n, r, a, o, s) {
  1135. return o ? Hi(t, e, i, n, r, a, o, s) : Vi(t, e, i, n, r, a, s);
  1136. }
  1137. function Vi(t, e, i, n, r, a, o) {
  1138. var s = Qi(t, e, r, a, o),
  1139. l = Fi(t, e);
  1140. r && (l += r[1] + r[3]);
  1141. var u = s.outerHeight,
  1142. h = Wi(0, l, i),
  1143. c = Ui(0, u, n),
  1144. d = new wi(h, c, l, u);
  1145. return d.lineHeight = s.lineHeight, d;
  1146. }
  1147. function Hi(t, e, i, n, r, a, o, s) {
  1148. var l = Ji(t, {
  1149. rich: o,
  1150. truncate: s,
  1151. font: e,
  1152. textAlign: i,
  1153. textPadding: r,
  1154. textLineHeight: a
  1155. }),
  1156. u = l.outerWidth,
  1157. h = l.outerHeight,
  1158. c = Wi(0, u, i),
  1159. d = Ui(0, h, n);
  1160. return new wi(c, d, u, h);
  1161. }
  1162. function Wi(t, e, i) {
  1163. return "right" === i ? t -= e : "center" === i && (t -= e / 2), t;
  1164. }
  1165. function Ui(t, e, i) {
  1166. return "middle" === i ? t -= e / 2 : "bottom" === i && (t -= e), t;
  1167. }
  1168. function Xi(t, e, i) {
  1169. var n = e.textPosition,
  1170. r = e.textDistance,
  1171. a = i.x,
  1172. o = i.y;
  1173. r = r || 0;
  1174. var s = i.height,
  1175. l = i.width,
  1176. u = s / 2,
  1177. h = "left",
  1178. c = "top";
  1179. switch (n) {
  1180. case "left":
  1181. a -= r, o += u, h = "right", c = "middle";
  1182. break;
  1183. case "right":
  1184. a += r + l, o += u, c = "middle";
  1185. break;
  1186. case "top":
  1187. a += l / 2, o -= r, h = "center", c = "bottom";
  1188. break;
  1189. case "bottom":
  1190. a += l / 2, o += s + r, h = "center";
  1191. break;
  1192. case "inside":
  1193. a += l / 2, o += u, h = "center", c = "middle";
  1194. break;
  1195. case "insideLeft":
  1196. a += r, o += u, c = "middle";
  1197. break;
  1198. case "insideRight":
  1199. a += l - r, o += u, h = "right", c = "middle";
  1200. break;
  1201. case "insideTop":
  1202. a += l / 2, o += r, h = "center";
  1203. break;
  1204. case "insideBottom":
  1205. a += l / 2, o += s - r, h = "center", c = "bottom";
  1206. break;
  1207. case "insideTopLeft":
  1208. a += r, o += r;
  1209. break;
  1210. case "insideTopRight":
  1211. a += l - r, o += r, h = "right";
  1212. break;
  1213. case "insideBottomLeft":
  1214. a += r, o += s - r, c = "bottom";
  1215. break;
  1216. case "insideBottomRight":
  1217. a += l - r, o += s - r, h = "right", c = "bottom";
  1218. }
  1219. return t = t || {}, t.x = a, t.y = o, t.textAlign = h, t.textVerticalAlign = c, t;
  1220. }
  1221. function Yi(t, e, i, n, r) {
  1222. if (!e) return "";
  1223. var a = (t + "").split("\n");
  1224. r = ji(e, i, n, r);
  1225. for (var o = 0, s = a.length; s > o; o++) a[o] = qi(a[o], r);
  1226. return a.join("\n");
  1227. }
  1228. function ji(t, e, i, n) {
  1229. n = o({}, n), n.font = e;
  1230. var i = A(i, "...");
  1231. n.maxIterations = A(n.maxIterations, 2);
  1232. var r = n.minChar = A(n.minChar, 0);
  1233. n.cnCharWidth = Fi("国", e);
  1234. var a = n.ascCharWidth = Fi("a", e);
  1235. n.placeholder = A(n.placeholder, "");
  1236. for (var s = t = Math.max(0, t - 1), l = 0; r > l && s >= a; l++) s -= a;
  1237. var u = Fi(i, e);
  1238. return u > s && (i = "", u = 0), s = t - u, n.ellipsis = i, n.ellipsisWidth = u, n.contentWidth = s, n.containerWidth = t, n;
  1239. }
  1240. function qi(t, e) {
  1241. var i = e.containerWidth,
  1242. n = e.font,
  1243. r = e.contentWidth;
  1244. if (!i) return "";
  1245. var a = Fi(t, n);
  1246. if (i >= a) return t;
  1247. for (var o = 0;; o++) {
  1248. if (r >= a || o >= e.maxIterations) {
  1249. t += e.ellipsis;
  1250. break;
  1251. }
  1252. var s = 0 === o ? Zi(t, r, e.ascCharWidth, e.cnCharWidth) : a > 0 ? Math.floor(t.length * r / a) : 0;
  1253. t = t.substr(0, s), a = Fi(t, n);
  1254. }
  1255. return "" === t && (t = e.placeholder), t;
  1256. }
  1257. function Zi(t, e, i, n) {
  1258. for (var r = 0, a = 0, o = t.length; o > a && e > r; a++) {
  1259. var s = t.charCodeAt(a);
  1260. r += s >= 0 && 127 >= s ? i : n;
  1261. }
  1262. return a;
  1263. }
  1264. function Ki(t) {
  1265. return Fi("国", t);
  1266. }
  1267. function $i(t, e) {
  1268. return av.measureText(t, e);
  1269. }
  1270. function Qi(t, e, i, n, r) {
  1271. null != t && (t += "");
  1272. var a = A(n, Ki(e)),
  1273. o = t ? t.split("\n") : [],
  1274. s = o.length * a,
  1275. l = s,
  1276. u = !0;
  1277. if (i && (l += i[0] + i[2]), t && r) {
  1278. u = !1;
  1279. var h = r.outerHeight,
  1280. c = r.outerWidth;
  1281. if (null != h && l > h) t = "", o = [];else if (null != c) for (var d = ji(c - (i ? i[1] + i[3] : 0), e, r.ellipsis, {
  1282. minChar: r.minChar,
  1283. placeholder: r.placeholder
  1284. }), f = 0, p = o.length; p > f; f++) o[f] = qi(o[f], d);
  1285. }
  1286. return {
  1287. lines: o,
  1288. height: s,
  1289. outerHeight: l,
  1290. lineHeight: a,
  1291. canCacheByTextString: u
  1292. };
  1293. }
  1294. function Ji(t, e) {
  1295. var i = {
  1296. lines: [],
  1297. width: 0,
  1298. height: 0
  1299. };
  1300. if (null != t && (t += ""), !t) return i;
  1301. for (var n, r = nv.lastIndex = 0; null != (n = nv.exec(t));) {
  1302. var a = n.index;
  1303. a > r && tn(i, t.substring(r, a)), tn(i, n[2], n[1]), r = nv.lastIndex;
  1304. }
  1305. r < t.length && tn(i, t.substring(r, t.length));
  1306. var o = i.lines,
  1307. s = 0,
  1308. l = 0,
  1309. u = [],
  1310. h = e.textPadding,
  1311. c = e.truncate,
  1312. d = c && c.outerWidth,
  1313. f = c && c.outerHeight;
  1314. h && (null != d && (d -= h[1] + h[3]), null != f && (f -= h[0] + h[2]));
  1315. for (var p = 0; p < o.length; p++) {
  1316. for (var g = o[p], m = 0, v = 0, y = 0; y < g.tokens.length; y++) {
  1317. var _ = g.tokens[y],
  1318. x = _.styleName && e.rich[_.styleName] || {},
  1319. w = _.textPadding = x.textPadding,
  1320. b = _.font = x.font || e.font,
  1321. S = _.textHeight = A(x.textHeight, Ki(b));
  1322. if (w && (S += w[0] + w[2]), _.height = S, _.lineHeight = k(x.textLineHeight, e.textLineHeight, S), _.textAlign = x && x.textAlign || e.textAlign, _.textVerticalAlign = x && x.textVerticalAlign || "middle", null != f && s + _.lineHeight > f) return {
  1323. lines: [],
  1324. width: 0,
  1325. height: 0
  1326. };
  1327. _.textWidth = Fi(_.text, b);
  1328. var M = x.textWidth,
  1329. I = null == M || "auto" === M;
  1330. if ("string" == typeof M && "%" === M.charAt(M.length - 1)) _.percentWidth = M, u.push(_), M = 0;else {
  1331. if (I) {
  1332. M = _.textWidth;
  1333. var T = x.textBackgroundColor,
  1334. C = T && T.image;
  1335. C && (C = Ei(C), Ni(C) && (M = Math.max(M, C.width * S / C.height)));
  1336. }
  1337. var D = w ? w[1] + w[3] : 0;
  1338. M += D;
  1339. var P = null != d ? d - v : null;
  1340. null != P && M > P && (!I || D > P ? (_.text = "", _.textWidth = M = 0) : (_.text = Yi(_.text, P - D, b, c.ellipsis, {
  1341. minChar: c.minChar
  1342. }), _.textWidth = Fi(_.text, b), M = _.textWidth + D));
  1343. }
  1344. v += _.width = M, x && (m = Math.max(m, _.lineHeight));
  1345. }
  1346. g.width = v, g.lineHeight = m, s += m, l = Math.max(l, v);
  1347. }
  1348. i.outerWidth = i.width = A(e.textWidth, l), i.outerHeight = i.height = A(e.textHeight, s), h && (i.outerWidth += h[1] + h[3], i.outerHeight += h[0] + h[2]);
  1349. for (var p = 0; p < u.length; p++) {
  1350. var _ = u[p],
  1351. L = _.percentWidth;
  1352. _.width = parseInt(L, 10) / 100 * l;
  1353. }
  1354. return i;
  1355. }
  1356. function tn(t, e, i) {
  1357. for (var n = "" === e, r = e.split("\n"), a = t.lines, o = 0; o < r.length; o++) {
  1358. var s = r[o],
  1359. l = {
  1360. styleName: i,
  1361. text: s,
  1362. isLineHolder: !s && !n
  1363. };
  1364. if (o) a.push({
  1365. tokens: [l]
  1366. });else {
  1367. var u = (a[a.length - 1] || (a[0] = {
  1368. tokens: []
  1369. })).tokens,
  1370. h = u.length;
  1371. 1 === h && u[0].isLineHolder ? u[0] = l : (s || !h || n) && u.push(l);
  1372. }
  1373. }
  1374. }
  1375. function en(t) {
  1376. var e = (t.fontSize || t.fontFamily) && [t.fontStyle, t.fontWeight, (t.fontSize || 12) + "px", t.fontFamily || "sans-serif"].join(" ");
  1377. return e && z(e) || t.textFont || t.font;
  1378. }
  1379. function nn(t, e) {
  1380. var i,
  1381. n,
  1382. r,
  1383. a,
  1384. o = e.x,
  1385. s = e.y,
  1386. l = e.width,
  1387. u = e.height,
  1388. h = e.r;
  1389. 0 > l && (o += l, l = -l), 0 > u && (s += u, u = -u), "number" == typeof h ? i = n = r = a = h : h instanceof Array ? 1 === h.length ? i = n = r = a = h[0] : 2 === h.length ? (i = r = h[0], n = a = h[1]) : 3 === h.length ? (i = h[0], n = a = h[1], r = h[2]) : (i = h[0], n = h[1], r = h[2], a = h[3]) : i = n = r = a = 0;
  1390. var c;
  1391. i + n > l && (c = i + n, i *= l / c, n *= l / c), r + a > l && (c = r + a, r *= l / c, a *= l / c), n + r > u && (c = n + r, n *= u / c, r *= u / c), i + a > u && (c = i + a, i *= u / c, a *= u / c), t.moveTo(o + i, s), t.lineTo(o + l - n, s), 0 !== n && t.arc(o + l - n, s + n, n, -Math.PI / 2, 0), t.lineTo(o + l, s + u - r), 0 !== r && t.arc(o + l - r, s + u - r, r, 0, Math.PI / 2), t.lineTo(o + a, s + u), 0 !== a && t.arc(o + a, s + u - a, a, Math.PI / 2, Math.PI), t.lineTo(o, s + i), 0 !== i && t.arc(o + i, s + i, i, Math.PI, 1.5 * Math.PI);
  1392. }
  1393. function rn(t) {
  1394. return an(t), f(t.rich, an), t;
  1395. }
  1396. function an(t) {
  1397. if (t) {
  1398. t.font = en(t);
  1399. var e = t.textAlign;
  1400. "middle" === e && (e = "center"), t.textAlign = null == e || sv[e] ? e : "left";
  1401. var i = t.textVerticalAlign || t.textBaseline;
  1402. "center" === i && (i = "middle"), t.textVerticalAlign = null == i || lv[i] ? i : "top";
  1403. var n = t.textPadding;
  1404. n && (t.textPadding = L(t.textPadding));
  1405. }
  1406. }
  1407. function on(t, e, i, n, r, a) {
  1408. n.rich ? ln(t, e, i, n, r, a) : sn(t, e, i, n, r, a);
  1409. }
  1410. function sn(t, e, i, n, r, a) {
  1411. var o,
  1412. s = dn(n),
  1413. l = !1,
  1414. u = e.__attrCachedBy === Wm.PLAIN_TEXT;
  1415. a !== Um ? (a && (o = a.style, l = !s && u && o), e.__attrCachedBy = s ? Wm.NONE : Wm.PLAIN_TEXT) : u && (e.__attrCachedBy = Wm.NONE);
  1416. var h = n.font || ov;
  1417. l && h === (o.font || ov) || (e.font = h);
  1418. var c = t.__computedFont;
  1419. t.__styleFont !== h && (t.__styleFont = h, c = t.__computedFont = e.font);
  1420. var d = n.textPadding,
  1421. f = n.textLineHeight,
  1422. p = t.__textCotentBlock;
  1423. (!p || t.__dirtyText) && (p = t.__textCotentBlock = Qi(i, c, d, f, n.truncate));
  1424. var g = p.outerHeight,
  1425. m = p.lines,
  1426. v = p.lineHeight,
  1427. y = gn(cv, t, n, r),
  1428. _ = y.baseX,
  1429. x = y.baseY,
  1430. w = y.textAlign || "left",
  1431. b = y.textVerticalAlign;
  1432. hn(e, n, r, _, x);
  1433. var S = Ui(x, g, b),
  1434. M = _,
  1435. I = S;
  1436. if (s || d) {
  1437. var T = Fi(i, c),
  1438. C = T;
  1439. d && (C += d[1] + d[3]);
  1440. var D = Wi(_, C, w);
  1441. s && fn(t, e, n, D, S, C, g), d && (M = xn(_, w, d), I += d[0]);
  1442. }
  1443. e.textAlign = w, e.textBaseline = "middle", e.globalAlpha = n.opacity || 1;
  1444. for (var A = 0; A < uv.length; A++) {
  1445. var k = uv[A],
  1446. P = k[0],
  1447. L = k[1],
  1448. O = n[P];
  1449. l && O === o[P] || (e[L] = Hm(e, L, O || k[2]));
  1450. }
  1451. I += v / 2;
  1452. var z = n.textStrokeWidth,
  1453. E = l ? o.textStrokeWidth : null,
  1454. R = !l || z !== E,
  1455. B = !l || R || n.textStroke !== o.textStroke,
  1456. N = vn(n.textStroke, z),
  1457. F = yn(n.textFill);
  1458. if (N && (R && (e.lineWidth = z), B && (e.strokeStyle = N)), F && (l && n.textFill === o.textFill || (e.fillStyle = F)), 1 === m.length) N && e.strokeText(m[0], M, I), F && e.fillText(m[0], M, I);else for (var A = 0; A < m.length; A++) N && e.strokeText(m[A], M, I), F && e.fillText(m[A], M, I), I += v;
  1459. }
  1460. function ln(t, e, i, n, r, a) {
  1461. a !== Um && (e.__attrCachedBy = Wm.NONE);
  1462. var o = t.__textCotentBlock;
  1463. (!o || t.__dirtyText) && (o = t.__textCotentBlock = Ji(i, n)), un(t, e, o, n, r);
  1464. }
  1465. function un(t, e, i, n, r) {
  1466. var a = i.width,
  1467. o = i.outerWidth,
  1468. s = i.outerHeight,
  1469. l = n.textPadding,
  1470. u = gn(cv, t, n, r),
  1471. h = u.baseX,
  1472. c = u.baseY,
  1473. d = u.textAlign,
  1474. f = u.textVerticalAlign;
  1475. hn(e, n, r, h, c);
  1476. var p = Wi(h, o, d),
  1477. g = Ui(c, s, f),
  1478. m = p,
  1479. v = g;
  1480. l && (m += l[3], v += l[0]);
  1481. var y = m + a;
  1482. dn(n) && fn(t, e, n, p, g, o, s);
  1483. for (var _ = 0; _ < i.lines.length; _++) {
  1484. for (var x, w = i.lines[_], b = w.tokens, S = b.length, M = w.lineHeight, I = w.width, T = 0, C = m, D = y, A = S - 1; S > T && (x = b[T], !x.textAlign || "left" === x.textAlign);) cn(t, e, x, n, M, v, C, "left"), I -= x.width, C += x.width, T++;
  1485. for (; A >= 0 && (x = b[A], "right" === x.textAlign);) cn(t, e, x, n, M, v, D, "right"), I -= x.width, D -= x.width, A--;
  1486. for (C += (a - (C - m) - (y - D) - I) / 2; A >= T;) x = b[T], cn(t, e, x, n, M, v, C + x.width / 2, "center"), C += x.width, T++;
  1487. v += M;
  1488. }
  1489. }
  1490. function hn(t, e, i, n, r) {
  1491. if (i && e.textRotation) {
  1492. var a = e.textOrigin;
  1493. "center" === a ? (n = i.width / 2 + i.x, r = i.height / 2 + i.y) : a && (n = a[0] + i.x, r = a[1] + i.y), t.translate(n, r), t.rotate(-e.textRotation), t.translate(-n, -r);
  1494. }
  1495. }
  1496. function cn(t, e, i, n, r, a, o, s) {
  1497. var l = n.rich[i.styleName] || {};
  1498. l.text = i.text;
  1499. var u = i.textVerticalAlign,
  1500. h = a + r / 2;
  1501. "top" === u ? h = a + i.height / 2 : "bottom" === u && (h = a + r - i.height / 2), !i.isLineHolder && dn(l) && fn(t, e, l, "right" === s ? o - i.width : "center" === s ? o - i.width / 2 : o, h - i.height / 2, i.width, i.height);
  1502. var c = i.textPadding;
  1503. c && (o = xn(o, s, c), h -= i.height / 2 - c[2] - i.textHeight / 2), mn(e, "shadowBlur", k(l.textShadowBlur, n.textShadowBlur, 0)), mn(e, "shadowColor", l.textShadowColor || n.textShadowColor || "transparent"), mn(e, "shadowOffsetX", k(l.textShadowOffsetX, n.textShadowOffsetX, 0)), mn(e, "shadowOffsetY", k(l.textShadowOffsetY, n.textShadowOffsetY, 0)), mn(e, "textAlign", s), mn(e, "textBaseline", "middle"), mn(e, "font", i.font || ov);
  1504. var d = vn(l.textStroke || n.textStroke, p),
  1505. f = yn(l.textFill || n.textFill),
  1506. p = A(l.textStrokeWidth, n.textStrokeWidth);
  1507. d && (mn(e, "lineWidth", p), mn(e, "strokeStyle", d), e.strokeText(i.text, o, h)), f && (mn(e, "fillStyle", f), e.fillText(i.text, o, h));
  1508. }
  1509. function dn(t) {
  1510. return !!(t.textBackgroundColor || t.textBorderWidth && t.textBorderColor);
  1511. }
  1512. function fn(t, e, i, n, r, a, o) {
  1513. var s = i.textBackgroundColor,
  1514. l = i.textBorderWidth,
  1515. u = i.textBorderColor,
  1516. h = b(s);
  1517. if (mn(e, "shadowBlur", i.textBoxShadowBlur || 0), mn(e, "shadowColor", i.textBoxShadowColor || "transparent"), mn(e, "shadowOffsetX", i.textBoxShadowOffsetX || 0), mn(e, "shadowOffsetY", i.textBoxShadowOffsetY || 0), h || l && u) {
  1518. e.beginPath();
  1519. var c = i.textBorderRadius;
  1520. c ? nn(e, {
  1521. x: n,
  1522. y: r,
  1523. width: a,
  1524. height: o,
  1525. r: c
  1526. }) : e.rect(n, r, a, o), e.closePath();
  1527. }
  1528. if (h) {
  1529. if (mn(e, "fillStyle", s), null != i.fillOpacity) {
  1530. var d = e.globalAlpha;
  1531. e.globalAlpha = i.fillOpacity * i.opacity, e.fill(), e.globalAlpha = d;
  1532. } else e.fill();
  1533. } else if (S(s)) {
  1534. var f = s.image;
  1535. f = Ri(f, null, t, pn, s), f && Ni(f) && e.drawImage(f, n, r, a, o);
  1536. }
  1537. if (l && u) if (mn(e, "lineWidth", l), mn(e, "strokeStyle", u), null != i.strokeOpacity) {
  1538. var d = e.globalAlpha;
  1539. e.globalAlpha = i.strokeOpacity * i.opacity, e.stroke(), e.globalAlpha = d;
  1540. } else e.stroke();
  1541. }
  1542. function pn(t, e) {
  1543. e.image = t;
  1544. }
  1545. function gn(t, e, i, n) {
  1546. var r = i.x || 0,
  1547. a = i.y || 0,
  1548. o = i.textAlign,
  1549. s = i.textVerticalAlign;
  1550. if (n) {
  1551. var l = i.textPosition;
  1552. if (l instanceof Array) r = n.x + _n(l[0], n.width), a = n.y + _n(l[1], n.height);else {
  1553. var u = e && e.calculateTextPosition ? e.calculateTextPosition(hv, i, n) : Xi(hv, i, n);
  1554. r = u.x, a = u.y, o = o || u.textAlign, s = s || u.textVerticalAlign;
  1555. }
  1556. var h = i.textOffset;
  1557. h && (r += h[0], a += h[1]);
  1558. }
  1559. return t = t || {}, t.baseX = r, t.baseY = a, t.textAlign = o, t.textVerticalAlign = s, t;
  1560. }
  1561. function mn(t, e, i) {
  1562. return t[e] = Hm(t, e, i), t[e];
  1563. }
  1564. function vn(t, e) {
  1565. return null == t || 0 >= e || "transparent" === t || "none" === t ? null : t.image || t.colorStops ? "#000" : t;
  1566. }
  1567. function yn(t) {
  1568. return null == t || "none" === t ? null : t.image || t.colorStops ? "#000" : t;
  1569. }
  1570. function _n(t, e) {
  1571. return "string" == typeof t ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t;
  1572. }
  1573. function xn(t, e, i) {
  1574. return "right" === e ? t - i[1] : "center" === e ? t + i[3] / 2 - i[1] / 2 : t + i[3];
  1575. }
  1576. function wn(t, e) {
  1577. return null != t && (t || e.textBackgroundColor || e.textBorderWidth && e.textBorderColor || e.textPadding);
  1578. }
  1579. function bn(t) {
  1580. t = t || {}, Om.call(this, t);
  1581. for (var e in t) t.hasOwnProperty(e) && "style" !== e && (this[e] = t[e]);
  1582. this.style = new Ym(t.style, this), this._rect = null, this.__clipPaths = null;
  1583. }
  1584. function Sn(t) {
  1585. bn.call(this, t);
  1586. }
  1587. function Mn(t) {
  1588. return parseInt(t, 10);
  1589. }
  1590. function In(t) {
  1591. return t ? t.__builtin__ ? !0 : "function" != typeof t.resize || "function" != typeof t.refresh ? !1 : !0 : !1;
  1592. }
  1593. function Tn(t, e, i) {
  1594. return yv.copy(t.getBoundingRect()), t.transform && yv.applyTransform(t.transform), _v.width = e, _v.height = i, !yv.intersect(_v);
  1595. }
  1596. function Cn(t, e) {
  1597. if (t === e) return !1;
  1598. if (!t || !e || t.length !== e.length) return !0;
  1599. for (var i = 0; i < t.length; i++) if (t[i] !== e[i]) return !0;
  1600. return !1;
  1601. }
  1602. function Dn(t, e) {
  1603. for (var i = 0; i < t.length; i++) {
  1604. var n = t[i];
  1605. n.setTransform(e), e.beginPath(), n.buildPath(e, n.shape), e.clip(), n.restoreTransform(e);
  1606. }
  1607. }
  1608. function An(t, e) {
  1609. var i = document.createElement("div");
  1610. return i.style.cssText = ["position:relative", "width:" + t + "px", "height:" + e + "px", "padding:0", "margin:0", "border-width:0"].join(";") + ";", i;
  1611. }
  1612. function kn(t) {
  1613. return "mousewheel" === t && Mg.browser.firefox ? "DOMMouseScroll" : t;
  1614. }
  1615. function Pn(t) {
  1616. t._touching = !0, clearTimeout(t._touchTimer), t._touchTimer = setTimeout(function () {
  1617. t._touching = !1;
  1618. }, 700);
  1619. }
  1620. function Ln(t) {
  1621. var e = t.pointerType;
  1622. return "pen" === e || "touch" === e;
  1623. }
  1624. function On(t) {
  1625. function e(t, e) {
  1626. return function () {
  1627. return e._touching ? void 0 : t.apply(e, arguments);
  1628. };
  1629. }
  1630. f(Mv, function (e) {
  1631. t._handlers[e] = y(Cv[e], t);
  1632. }), f(Tv, function (e) {
  1633. t._handlers[e] = y(Cv[e], t);
  1634. }), f(Sv, function (i) {
  1635. t._handlers[i] = e(Cv[i], t);
  1636. });
  1637. }
  1638. function zn(t) {
  1639. function e(e, i) {
  1640. f(e, function (e) {
  1641. _e(t, kn(e), i._handlers[e]);
  1642. }, i);
  1643. }
  1644. Yg.call(this), this.dom = t, this._touching = !1, this._touchTimer, this._handlers = {}, On(this), Mg.pointerEventsSupported ? e(Tv, this) : (Mg.touchEventsSupported && e(Mv, this), e(Sv, this));
  1645. }
  1646. function En(t, e) {
  1647. var i = new Ov(bg(), t, e);
  1648. return Pv[i.id] = i, i;
  1649. }
  1650. function Rn(t) {
  1651. if (t) t.dispose();else {
  1652. for (var e in Pv) Pv.hasOwnProperty(e) && Pv[e].dispose();
  1653. Pv = {};
  1654. }
  1655. return this;
  1656. }
  1657. function Bn(t) {
  1658. return Pv[t];
  1659. }
  1660. function Nn(t, e) {
  1661. kv[t] = e;
  1662. }
  1663. function Fn(t) {
  1664. delete Pv[t];
  1665. }
  1666. function Gn(t) {
  1667. return t instanceof Array ? t : null == t ? [] : [t];
  1668. }
  1669. function Vn(t, e, i) {
  1670. if (t) {
  1671. t[e] = t[e] || {}, t.emphasis = t.emphasis || {}, t.emphasis[e] = t.emphasis[e] || {};
  1672. for (var n = 0, r = i.length; r > n; n++) {
  1673. var a = i[n];
  1674. !t.emphasis[e].hasOwnProperty(a) && t[e].hasOwnProperty(a) && (t.emphasis[e][a] = t[e][a]);
  1675. }
  1676. }
  1677. }
  1678. function Hn(t) {
  1679. return !Rv(t) || Bv(t) || t instanceof Date ? t : t.value;
  1680. }
  1681. function Wn(t) {
  1682. return Rv(t) && !(t instanceof Array);
  1683. }
  1684. function Un(t, e) {
  1685. e = (e || []).slice();
  1686. var i = p(t || [], function (t) {
  1687. return {
  1688. exist: t
  1689. };
  1690. });
  1691. return Ev(e, function (t, n) {
  1692. if (Rv(t)) {
  1693. for (var r = 0; r < i.length; r++) if (!i[r].option && null != t.id && i[r].exist.id === t.id + "") return i[r].option = t, void (e[n] = null);
  1694. for (var r = 0; r < i.length; r++) {
  1695. var a = i[r].exist;
  1696. if (!(i[r].option || null != a.id && null != t.id || null == t.name || jn(t) || jn(a) || a.name !== t.name + "")) return i[r].option = t, void (e[n] = null);
  1697. }
  1698. }
  1699. }), Ev(e, function (t) {
  1700. if (Rv(t)) {
  1701. for (var e = 0; e < i.length; e++) {
  1702. var n = i[e].exist;
  1703. if (!i[e].option && !jn(n) && null == t.id) {
  1704. i[e].option = t;
  1705. break;
  1706. }
  1707. }
  1708. e >= i.length && i.push({
  1709. option: t
  1710. });
  1711. }
  1712. }), i;
  1713. }
  1714. function Xn(t) {
  1715. var e = N();
  1716. Ev(t, function (t) {
  1717. var i = t.exist;
  1718. i && e.set(i.id, t);
  1719. }), Ev(t, function (t) {
  1720. var i = t.option;
  1721. O(!i || null == i.id || !e.get(i.id) || e.get(i.id) === t, "id duplicates: " + (i && i.id)), i && null != i.id && e.set(i.id, t), !t.keyInfo && (t.keyInfo = {});
  1722. }), Ev(t, function (t, i) {
  1723. var n = t.exist,
  1724. r = t.option,
  1725. a = t.keyInfo;
  1726. if (Rv(r)) {
  1727. if (a.name = null != r.name ? r.name + "" : n ? n.name : Nv + i, n) a.id = n.id;else if (null != r.id) a.id = r.id + "";else {
  1728. var o = 0;
  1729. do a.id = "\x00" + a.name + "\x00" + o++; while (e.get(a.id));
  1730. }
  1731. e.set(a.id, t);
  1732. }
  1733. });
  1734. }
  1735. function Yn(t) {
  1736. var e = t.name;
  1737. return !(!e || !e.indexOf(Nv));
  1738. }
  1739. function jn(t) {
  1740. return Rv(t) && t.id && 0 === (t.id + "").indexOf("\x00_ec_\x00");
  1741. }
  1742. function qn(t, e) {
  1743. return null != e.dataIndexInside ? e.dataIndexInside : null != e.dataIndex ? x(e.dataIndex) ? p(e.dataIndex, function (e) {
  1744. return t.indexOfRawIndex(e);
  1745. }) : t.indexOfRawIndex(e.dataIndex) : null != e.name ? x(e.name) ? p(e.name, function (e) {
  1746. return t.indexOfName(e);
  1747. }) : t.indexOfName(e.name) : void 0;
  1748. }
  1749. function Zn() {
  1750. var t = "__\x00ec_inner_" + Gv++ + "_" + Math.random().toFixed(5);
  1751. return function (e) {
  1752. return e[t] || (e[t] = {});
  1753. };
  1754. }
  1755. function Kn(t, e, i) {
  1756. if (b(e)) {
  1757. var n = {};
  1758. n[e + "Index"] = 0, e = n;
  1759. }
  1760. var r = i && i.defaultMainType;
  1761. !r || $n(e, r + "Index") || $n(e, r + "Id") || $n(e, r + "Name") || (e[r + "Index"] = 0);
  1762. var a = {};
  1763. return Ev(e, function (n, r) {
  1764. var n = e[r];
  1765. if ("dataIndex" === r || "dataIndexInside" === r) return void (a[r] = n);
  1766. var o = r.match(/^(\w+)(Index|Id|Name)$/) || [],
  1767. s = o[1],
  1768. l = (o[2] || "").toLowerCase();
  1769. if (!(!s || !l || null == n || "index" === l && "none" === n || i && i.includeMainTypes && u(i.includeMainTypes, s) < 0)) {
  1770. var h = {
  1771. mainType: s
  1772. };
  1773. ("index" !== l || "all" !== n) && (h[l] = n);
  1774. var c = t.queryComponents(h);
  1775. a[s + "Models"] = c, a[s + "Model"] = c[0];
  1776. }
  1777. }), a;
  1778. }
  1779. function $n(t, e) {
  1780. return t && t.hasOwnProperty(e);
  1781. }
  1782. function Qn(t, e, i) {
  1783. t.setAttribute ? t.setAttribute(e, i) : t[e] = i;
  1784. }
  1785. function Jn(t, e) {
  1786. return t.getAttribute ? t.getAttribute(e) : t[e];
  1787. }
  1788. function tr(t) {
  1789. return "auto" === t ? Mg.domSupported ? "html" : "richText" : t || "html";
  1790. }
  1791. function er(t) {
  1792. var e = {
  1793. main: "",
  1794. sub: ""
  1795. };
  1796. return t && (t = t.split(Vv), e.main = t[0] || "", e.sub = t[1] || ""), e;
  1797. }
  1798. function ir(t) {
  1799. O(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t), 'componentType "' + t + '" illegal');
  1800. }
  1801. function nr(t) {
  1802. t.$constructor = t, t.extend = function (t) {
  1803. var e = this,
  1804. i = function () {
  1805. t.$constructor ? t.$constructor.apply(this, arguments) : e.apply(this, arguments);
  1806. };
  1807. return o(i.prototype, t), i.extend = this.extend, i.superCall = ar, i.superApply = or, h(i, this), i.superClass = e, i;
  1808. };
  1809. }
  1810. function rr(t) {
  1811. var e = ["__\x00is_clz", Wv++, Math.random().toFixed(3)].join("_");
  1812. t.prototype[e] = !0, t.isInstance = function (t) {
  1813. return !(!t || !t[e]);
  1814. };
  1815. }
  1816. function ar(t, e) {
  1817. var i = P(arguments, 2);
  1818. return this.superClass.prototype[e].apply(t, i);
  1819. }
  1820. function or(t, e, i) {
  1821. return this.superClass.prototype[e].apply(t, i);
  1822. }
  1823. function sr(t, e) {
  1824. function i(t) {
  1825. var e = n[t.main];
  1826. return e && e[Hv] || (e = n[t.main] = {}, e[Hv] = !0), e;
  1827. }
  1828. e = e || {};
  1829. var n = {};
  1830. if (t.registerClass = function (t, e) {
  1831. if (e) if (ir(e), e = er(e), e.sub) {
  1832. if (e.sub !== Hv) {
  1833. var r = i(e);
  1834. r[e.sub] = t;
  1835. }
  1836. } else n[e.main] = t;
  1837. return t;
  1838. }, t.getClass = function (t, e, i) {
  1839. var r = n[t];
  1840. if (r && r[Hv] && (r = e ? r[e] : null), i && !r) throw new Error(e ? "Component " + t + "." + (e || "") + " not exists. Load it first." : t + ".type should be specified.");
  1841. return r;
  1842. }, t.getClassesByMainType = function (t) {
  1843. t = er(t);
  1844. var e = [],
  1845. i = n[t.main];
  1846. return i && i[Hv] ? f(i, function (t, i) {
  1847. i !== Hv && e.push(t);
  1848. }) : e.push(i), e;
  1849. }, t.hasClass = function (t) {
  1850. return t = er(t), !!n[t.main];
  1851. }, t.getAllClassMainTypes = function () {
  1852. var t = [];
  1853. return f(n, function (e, i) {
  1854. t.push(i);
  1855. }), t;
  1856. }, t.hasSubTypes = function (t) {
  1857. t = er(t);
  1858. var e = n[t.main];
  1859. return e && e[Hv];
  1860. }, t.parseClassType = er, e.registerWhenExtend) {
  1861. var r = t.extend;
  1862. r && (t.extend = function (e) {
  1863. var i = r.call(this, e);
  1864. return t.registerClass(i, e.type);
  1865. });
  1866. }
  1867. return t;
  1868. }
  1869. function lr(t) {
  1870. return t > -$v && $v > t;
  1871. }
  1872. function ur(t) {
  1873. return t > $v || -$v > t;
  1874. }
  1875. function hr(t, e, i, n, r) {
  1876. var a = 1 - r;
  1877. return a * a * (a * t + 3 * r * e) + r * r * (r * n + 3 * a * i);
  1878. }
  1879. function cr(t, e, i, n, r) {
  1880. var a = 1 - r;
  1881. return 3 * (((e - t) * a + 2 * (i - e) * r) * a + (n - i) * r * r);
  1882. }
  1883. function dr(t, e, i, n, r, a) {
  1884. var o = n + 3 * (e - i) - t,
  1885. s = 3 * (i - 2 * e + t),
  1886. l = 3 * (e - t),
  1887. u = t - r,
  1888. h = s * s - 3 * o * l,
  1889. c = s * l - 9 * o * u,
  1890. d = l * l - 3 * s * u,
  1891. f = 0;
  1892. if (lr(h) && lr(c)) {
  1893. if (lr(s)) a[0] = 0;else {
  1894. var p = -l / s;
  1895. p >= 0 && 1 >= p && (a[f++] = p);
  1896. }
  1897. } else {
  1898. var g = c * c - 4 * h * d;
  1899. if (lr(g)) {
  1900. var m = c / h,
  1901. p = -s / o + m,
  1902. v = -m / 2;
  1903. p >= 0 && 1 >= p && (a[f++] = p), v >= 0 && 1 >= v && (a[f++] = v);
  1904. } else if (g > 0) {
  1905. var y = Kv(g),
  1906. _ = h * s + 1.5 * o * (-c + y),
  1907. x = h * s + 1.5 * o * (-c - y);
  1908. _ = 0 > _ ? -Zv(-_, ty) : Zv(_, ty), x = 0 > x ? -Zv(-x, ty) : Zv(x, ty);
  1909. var p = (-s - (_ + x)) / (3 * o);
  1910. p >= 0 && 1 >= p && (a[f++] = p);
  1911. } else {
  1912. var w = (2 * h * s - 3 * o * c) / (2 * Kv(h * h * h)),
  1913. b = Math.acos(w) / 3,
  1914. S = Kv(h),
  1915. M = Math.cos(b),
  1916. p = (-s - 2 * S * M) / (3 * o),
  1917. v = (-s + S * (M + Jv * Math.sin(b))) / (3 * o),
  1918. I = (-s + S * (M - Jv * Math.sin(b))) / (3 * o);
  1919. p >= 0 && 1 >= p && (a[f++] = p), v >= 0 && 1 >= v && (a[f++] = v), I >= 0 && 1 >= I && (a[f++] = I);
  1920. }
  1921. }
  1922. return f;
  1923. }
  1924. function fr(t, e, i, n, r) {
  1925. var a = 6 * i - 12 * e + 6 * t,
  1926. o = 9 * e + 3 * n - 3 * t - 9 * i,
  1927. s = 3 * e - 3 * t,
  1928. l = 0;
  1929. if (lr(o)) {
  1930. if (ur(a)) {
  1931. var u = -s / a;
  1932. u >= 0 && 1 >= u && (r[l++] = u);
  1933. }
  1934. } else {
  1935. var h = a * a - 4 * o * s;
  1936. if (lr(h)) r[0] = -a / (2 * o);else if (h > 0) {
  1937. var c = Kv(h),
  1938. u = (-a + c) / (2 * o),
  1939. d = (-a - c) / (2 * o);
  1940. u >= 0 && 1 >= u && (r[l++] = u), d >= 0 && 1 >= d && (r[l++] = d);
  1941. }
  1942. }
  1943. return l;
  1944. }
  1945. function pr(t, e, i, n, r, a) {
  1946. var o = (e - t) * r + t,
  1947. s = (i - e) * r + e,
  1948. l = (n - i) * r + i,
  1949. u = (s - o) * r + o,
  1950. h = (l - s) * r + s,
  1951. c = (h - u) * r + u;
  1952. a[0] = t, a[1] = o, a[2] = u, a[3] = c, a[4] = c, a[5] = h, a[6] = l, a[7] = n;
  1953. }
  1954. function gr(t, e, i, n, r, a, o, s, l, u, h) {
  1955. var c,
  1956. d,
  1957. f,
  1958. p,
  1959. g,
  1960. m = .005,
  1961. v = 1 / 0;
  1962. ey[0] = l, ey[1] = u;
  1963. for (var y = 0; 1 > y; y += .05) iy[0] = hr(t, i, r, o, y), iy[1] = hr(e, n, a, s, y), p = Wg(ey, iy), v > p && (c = y, v = p);
  1964. v = 1 / 0;
  1965. for (var _ = 0; 32 > _ && !(Qv > m); _++) d = c - m, f = c + m, iy[0] = hr(t, i, r, o, d), iy[1] = hr(e, n, a, s, d), p = Wg(iy, ey), d >= 0 && v > p ? (c = d, v = p) : (ny[0] = hr(t, i, r, o, f), ny[1] = hr(e, n, a, s, f), g = Wg(ny, ey), 1 >= f && v > g ? (c = f, v = g) : m *= .5);
  1966. return h && (h[0] = hr(t, i, r, o, c), h[1] = hr(e, n, a, s, c)), Kv(v);
  1967. }
  1968. function mr(t, e, i, n) {
  1969. var r = 1 - n;
  1970. return r * (r * t + 2 * n * e) + n * n * i;
  1971. }
  1972. function vr(t, e, i, n) {
  1973. return 2 * ((1 - n) * (e - t) + n * (i - e));
  1974. }
  1975. function yr(t, e, i, n, r) {
  1976. var a = t - 2 * e + i,
  1977. o = 2 * (e - t),
  1978. s = t - n,
  1979. l = 0;
  1980. if (lr(a)) {
  1981. if (ur(o)) {
  1982. var u = -s / o;
  1983. u >= 0 && 1 >= u && (r[l++] = u);
  1984. }
  1985. } else {
  1986. var h = o * o - 4 * a * s;
  1987. if (lr(h)) {
  1988. var u = -o / (2 * a);
  1989. u >= 0 && 1 >= u && (r[l++] = u);
  1990. } else if (h > 0) {
  1991. var c = Kv(h),
  1992. u = (-o + c) / (2 * a),
  1993. d = (-o - c) / (2 * a);
  1994. u >= 0 && 1 >= u && (r[l++] = u), d >= 0 && 1 >= d && (r[l++] = d);
  1995. }
  1996. }
  1997. return l;
  1998. }
  1999. function _r(t, e, i) {
  2000. var n = t + i - 2 * e;
  2001. return 0 === n ? .5 : (t - e) / n;
  2002. }
  2003. function xr(t, e, i, n, r) {
  2004. var a = (e - t) * n + t,
  2005. o = (i - e) * n + e,
  2006. s = (o - a) * n + a;
  2007. r[0] = t, r[1] = a, r[2] = s, r[3] = s, r[4] = o, r[5] = i;
  2008. }
  2009. function wr(t, e, i, n, r, a, o, s, l) {
  2010. var u,
  2011. h = .005,
  2012. c = 1 / 0;
  2013. ey[0] = o, ey[1] = s;
  2014. for (var d = 0; 1 > d; d += .05) {
  2015. iy[0] = mr(t, i, r, d), iy[1] = mr(e, n, a, d);
  2016. var f = Wg(ey, iy);
  2017. c > f && (u = d, c = f);
  2018. }
  2019. c = 1 / 0;
  2020. for (var p = 0; 32 > p && !(Qv > h); p++) {
  2021. var g = u - h,
  2022. m = u + h;
  2023. iy[0] = mr(t, i, r, g), iy[1] = mr(e, n, a, g);
  2024. var f = Wg(iy, ey);
  2025. if (g >= 0 && c > f) u = g, c = f;else {
  2026. ny[0] = mr(t, i, r, m), ny[1] = mr(e, n, a, m);
  2027. var v = Wg(ny, ey);
  2028. 1 >= m && c > v ? (u = m, c = v) : h *= .5;
  2029. }
  2030. }
  2031. return l && (l[0] = mr(t, i, r, u), l[1] = mr(e, n, a, u)), Kv(c);
  2032. }
  2033. function br(t, e, i) {
  2034. if (0 !== t.length) {
  2035. var n,
  2036. r = t[0],
  2037. a = r[0],
  2038. o = r[0],
  2039. s = r[1],
  2040. l = r[1];
  2041. for (n = 1; n < t.length; n++) r = t[n], a = ry(a, r[0]), o = ay(o, r[0]), s = ry(s, r[1]), l = ay(l, r[1]);
  2042. e[0] = a, e[1] = s, i[0] = o, i[1] = l;
  2043. }
  2044. }
  2045. function Sr(t, e, i, n, r, a) {
  2046. r[0] = ry(t, i), r[1] = ry(e, n), a[0] = ay(t, i), a[1] = ay(e, n);
  2047. }
  2048. function Mr(t, e, i, n, r, a, o, s, l, u) {
  2049. var h,
  2050. c = fr,
  2051. d = hr,
  2052. f = c(t, i, r, o, dy);
  2053. for (l[0] = 1 / 0, l[1] = 1 / 0, u[0] = -1 / 0, u[1] = -1 / 0, h = 0; f > h; h++) {
  2054. var p = d(t, i, r, o, dy[h]);
  2055. l[0] = ry(p, l[0]), u[0] = ay(p, u[0]);
  2056. }
  2057. for (f = c(e, n, a, s, fy), h = 0; f > h; h++) {
  2058. var g = d(e, n, a, s, fy[h]);
  2059. l[1] = ry(g, l[1]), u[1] = ay(g, u[1]);
  2060. }
  2061. l[0] = ry(t, l[0]), u[0] = ay(t, u[0]), l[0] = ry(o, l[0]), u[0] = ay(o, u[0]), l[1] = ry(e, l[1]), u[1] = ay(e, u[1]), l[1] = ry(s, l[1]), u[1] = ay(s, u[1]);
  2062. }
  2063. function Ir(t, e, i, n, r, a, o, s) {
  2064. var l = _r,
  2065. u = mr,
  2066. h = ay(ry(l(t, i, r), 1), 0),
  2067. c = ay(ry(l(e, n, a), 1), 0),
  2068. d = u(t, i, r, h),
  2069. f = u(e, n, a, c);
  2070. o[0] = ry(t, r, d), o[1] = ry(e, a, f), s[0] = ay(t, r, d), s[1] = ay(e, a, f);
  2071. }
  2072. function Tr(t, e, i, n, r, a, o, s, l) {
  2073. var u = oe,
  2074. h = se,
  2075. c = Math.abs(r - a);
  2076. if (1e-4 > c % ly && c > 1e-4) return s[0] = t - i, s[1] = e - n, l[0] = t + i, void (l[1] = e + n);
  2077. if (uy[0] = sy(r) * i + t, uy[1] = oy(r) * n + e, hy[0] = sy(a) * i + t, hy[1] = oy(a) * n + e, u(s, uy, hy), h(l, uy, hy), r %= ly, 0 > r && (r += ly), a %= ly, 0 > a && (a += ly), r > a && !o ? a += ly : a > r && o && (r += ly), o) {
  2078. var d = a;
  2079. a = r, r = d;
  2080. }
  2081. for (var f = 0; a > f; f += Math.PI / 2) f > r && (cy[0] = sy(f) * i + t, cy[1] = oy(f) * n + e, u(s, cy, s), h(l, cy, l));
  2082. }
  2083. function Cr(t, e, i, n, r, a, o) {
  2084. if (0 === r) return !1;
  2085. var s = r,
  2086. l = 0,
  2087. u = t;
  2088. if (o > e + s && o > n + s || e - s > o && n - s > o || a > t + s && a > i + s || t - s > a && i - s > a) return !1;
  2089. if (t === i) return Math.abs(a - t) <= s / 2;
  2090. l = (e - n) / (t - i), u = (t * n - i * e) / (t - i);
  2091. var h = l * a - o + u,
  2092. c = h * h / (l * l + 1);
  2093. return s / 2 * s / 2 >= c;
  2094. }
  2095. function Dr(t, e, i, n, r, a, o, s, l, u, h) {
  2096. if (0 === l) return !1;
  2097. var c = l;
  2098. if (h > e + c && h > n + c && h > a + c && h > s + c || e - c > h && n - c > h && a - c > h && s - c > h || u > t + c && u > i + c && u > r + c && u > o + c || t - c > u && i - c > u && r - c > u && o - c > u) return !1;
  2099. var d = gr(t, e, i, n, r, a, o, s, u, h, null);
  2100. return c / 2 >= d;
  2101. }
  2102. function Ar(t, e, i, n, r, a, o, s, l) {
  2103. if (0 === o) return !1;
  2104. var u = o;
  2105. if (l > e + u && l > n + u && l > a + u || e - u > l && n - u > l && a - u > l || s > t + u && s > i + u && s > r + u || t - u > s && i - u > s && r - u > s) return !1;
  2106. var h = wr(t, e, i, n, r, a, s, l, null);
  2107. return u / 2 >= h;
  2108. }
  2109. function kr(t) {
  2110. return t %= Cy, 0 > t && (t += Cy), t;
  2111. }
  2112. function Pr(t, e, i, n, r, a, o, s, l) {
  2113. if (0 === o) return !1;
  2114. var u = o;
  2115. s -= t, l -= e;
  2116. var h = Math.sqrt(s * s + l * l);
  2117. if (h - u > i || i > h + u) return !1;
  2118. if (Math.abs(n - r) % Dy < 1e-4) return !0;
  2119. if (a) {
  2120. var c = n;
  2121. n = kr(r), r = kr(c);
  2122. } else n = kr(n), r = kr(r);
  2123. n > r && (r += Dy);
  2124. var d = Math.atan2(l, s);
  2125. return 0 > d && (d += Dy), d >= n && r >= d || d + Dy >= n && r >= d + Dy;
  2126. }
  2127. function Lr(t, e, i, n, r, a) {
  2128. if (a > e && a > n || e > a && n > a) return 0;
  2129. if (n === e) return 0;
  2130. var o = e > n ? 1 : -1,
  2131. s = (a - e) / (n - e);
  2132. (1 === s || 0 === s) && (o = e > n ? .5 : -.5);
  2133. var l = s * (i - t) + t;
  2134. return l === r ? 1 / 0 : l > r ? o : 0;
  2135. }
  2136. function Or(t, e) {
  2137. return Math.abs(t - e) < Py;
  2138. }
  2139. function zr() {
  2140. var t = Oy[0];
  2141. Oy[0] = Oy[1], Oy[1] = t;
  2142. }
  2143. function Er(t, e, i, n, r, a, o, s, l, u) {
  2144. if (u > e && u > n && u > a && u > s || e > u && n > u && a > u && s > u) return 0;
  2145. var h = dr(e, n, a, s, u, Ly);
  2146. if (0 === h) return 0;
  2147. for (var c, d, f = 0, p = -1, g = 0; h > g; g++) {
  2148. var m = Ly[g],
  2149. v = 0 === m || 1 === m ? .5 : 1,
  2150. y = hr(t, i, r, o, m);
  2151. l > y || (0 > p && (p = fr(e, n, a, s, Oy), Oy[1] < Oy[0] && p > 1 && zr(), c = hr(e, n, a, s, Oy[0]), p > 1 && (d = hr(e, n, a, s, Oy[1]))), f += 2 === p ? m < Oy[0] ? e > c ? v : -v : m < Oy[1] ? c > d ? v : -v : d > s ? v : -v : m < Oy[0] ? e > c ? v : -v : c > s ? v : -v);
  2152. }
  2153. return f;
  2154. }
  2155. function Rr(t, e, i, n, r, a, o, s) {
  2156. if (s > e && s > n && s > a || e > s && n > s && a > s) return 0;
  2157. var l = yr(e, n, a, s, Ly);
  2158. if (0 === l) return 0;
  2159. var u = _r(e, n, a);
  2160. if (u >= 0 && 1 >= u) {
  2161. for (var h = 0, c = mr(e, n, a, u), d = 0; l > d; d++) {
  2162. var f = 0 === Ly[d] || 1 === Ly[d] ? .5 : 1,
  2163. p = mr(t, i, r, Ly[d]);
  2164. o > p || (h += Ly[d] < u ? e > c ? f : -f : c > a ? f : -f);
  2165. }
  2166. return h;
  2167. }
  2168. var f = 0 === Ly[0] || 1 === Ly[0] ? .5 : 1,
  2169. p = mr(t, i, r, Ly[0]);
  2170. return o > p ? 0 : e > a ? f : -f;
  2171. }
  2172. function Br(t, e, i, n, r, a, o, s) {
  2173. if (s -= e, s > i || -i > s) return 0;
  2174. var l = Math.sqrt(i * i - s * s);
  2175. Ly[0] = -l, Ly[1] = l;
  2176. var u = Math.abs(n - r);
  2177. if (1e-4 > u) return 0;
  2178. if (1e-4 > u % ky) {
  2179. n = 0, r = ky;
  2180. var h = a ? 1 : -1;
  2181. return o >= Ly[0] + t && o <= Ly[1] + t ? h : 0;
  2182. }
  2183. if (a) {
  2184. var l = n;
  2185. n = kr(r), r = kr(l);
  2186. } else n = kr(n), r = kr(r);
  2187. n > r && (r += ky);
  2188. for (var c = 0, d = 0; 2 > d; d++) {
  2189. var f = Ly[d];
  2190. if (f + t > o) {
  2191. var p = Math.atan2(s, f),
  2192. h = a ? 1 : -1;
  2193. 0 > p && (p = ky + p), (p >= n && r >= p || p + ky >= n && r >= p + ky) && (p > Math.PI / 2 && p < 1.5 * Math.PI && (h = -h), c += h);
  2194. }
  2195. }
  2196. return c;
  2197. }
  2198. function Nr(t, e, i, n, r) {
  2199. for (var a = 0, o = 0, s = 0, l = 0, u = 0, h = 0; h < t.length;) {
  2200. var c = t[h++];
  2201. switch (c === Ay.M && h > 1 && (i || (a += Lr(o, s, l, u, n, r))), 1 === h && (o = t[h], s = t[h + 1], l = o, u = s), c) {
  2202. case Ay.M:
  2203. l = t[h++], u = t[h++], o = l, s = u;
  2204. break;
  2205. case Ay.L:
  2206. if (i) {
  2207. if (Cr(o, s, t[h], t[h + 1], e, n, r)) return !0;
  2208. } else a += Lr(o, s, t[h], t[h + 1], n, r) || 0;
  2209. o = t[h++], s = t[h++];
  2210. break;
  2211. case Ay.C:
  2212. if (i) {
  2213. if (Dr(o, s, t[h++], t[h++], t[h++], t[h++], t[h], t[h + 1], e, n, r)) return !0;
  2214. } else a += Er(o, s, t[h++], t[h++], t[h++], t[h++], t[h], t[h + 1], n, r) || 0;
  2215. o = t[h++], s = t[h++];
  2216. break;
  2217. case Ay.Q:
  2218. if (i) {
  2219. if (Ar(o, s, t[h++], t[h++], t[h], t[h + 1], e, n, r)) return !0;
  2220. } else a += Rr(o, s, t[h++], t[h++], t[h], t[h + 1], n, r) || 0;
  2221. o = t[h++], s = t[h++];
  2222. break;
  2223. case Ay.A:
  2224. var d = t[h++],
  2225. f = t[h++],
  2226. p = t[h++],
  2227. g = t[h++],
  2228. m = t[h++],
  2229. v = t[h++];
  2230. h += 1;
  2231. var y = 1 - t[h++],
  2232. _ = Math.cos(m) * p + d,
  2233. x = Math.sin(m) * g + f;
  2234. h > 1 ? a += Lr(o, s, _, x, n, r) : (l = _, u = x);
  2235. var w = (n - d) * g / p + d;
  2236. if (i) {
  2237. if (Pr(d, f, g, m, m + v, y, e, w, r)) return !0;
  2238. } else a += Br(d, f, g, m, m + v, y, w, r);
  2239. o = Math.cos(m + v) * p + d, s = Math.sin(m + v) * g + f;
  2240. break;
  2241. case Ay.R:
  2242. l = o = t[h++], u = s = t[h++];
  2243. var b = t[h++],
  2244. S = t[h++],
  2245. _ = l + b,
  2246. x = u + S;
  2247. if (i) {
  2248. if (Cr(l, u, _, u, e, n, r) || Cr(_, u, _, x, e, n, r) || Cr(_, x, l, x, e, n, r) || Cr(l, x, l, u, e, n, r)) return !0;
  2249. } else a += Lr(_, u, _, x, n, r), a += Lr(l, x, l, u, n, r);
  2250. break;
  2251. case Ay.Z:
  2252. if (i) {
  2253. if (Cr(o, s, l, u, e, n, r)) return !0;
  2254. } else a += Lr(o, s, l, u, n, r);
  2255. o = l, s = u;
  2256. }
  2257. }
  2258. return i || Or(s, u) || (a += Lr(o, s, l, u, n, r) || 0), 0 !== a;
  2259. }
  2260. function Fr(t, e, i) {
  2261. return Nr(t, 0, !1, e, i);
  2262. }
  2263. function Gr(t, e, i, n) {
  2264. return Nr(t, e, !0, i, n);
  2265. }
  2266. function Vr(t) {
  2267. bn.call(this, t), this.path = null;
  2268. }
  2269. function Hr(t, e, i, n, r, a, o, s, l, u, h) {
  2270. var c = l * (Xy / 180),
  2271. d = Uy(c) * (t - i) / 2 + Wy(c) * (e - n) / 2,
  2272. f = -1 * Wy(c) * (t - i) / 2 + Uy(c) * (e - n) / 2,
  2273. p = d * d / (o * o) + f * f / (s * s);
  2274. p > 1 && (o *= Hy(p), s *= Hy(p));
  2275. var g = (r === a ? -1 : 1) * Hy((o * o * s * s - o * o * f * f - s * s * d * d) / (o * o * f * f + s * s * d * d)) || 0,
  2276. m = g * o * f / s,
  2277. v = g * -s * d / o,
  2278. y = (t + i) / 2 + Uy(c) * m - Wy(c) * v,
  2279. _ = (e + n) / 2 + Wy(c) * m + Uy(c) * v,
  2280. x = qy([1, 0], [(d - m) / o, (f - v) / s]),
  2281. w = [(d - m) / o, (f - v) / s],
  2282. b = [(-1 * d - m) / o, (-1 * f - v) / s],
  2283. S = qy(w, b);
  2284. jy(w, b) <= -1 && (S = Xy), jy(w, b) >= 1 && (S = 0), 0 === a && S > 0 && (S -= 2 * Xy), 1 === a && 0 > S && (S += 2 * Xy), h.addData(u, y, _, o, s, x, S, c, a);
  2285. }
  2286. function Wr(t) {
  2287. if (!t) return new Ty();
  2288. for (var e, i = 0, n = 0, r = i, a = n, o = new Ty(), s = Ty.CMD, l = t.match(Zy), u = 0; u < l.length; u++) {
  2289. for (var h, c = l[u], d = c.charAt(0), f = c.match(Ky) || [], p = f.length, g = 0; p > g; g++) f[g] = parseFloat(f[g]);
  2290. for (var m = 0; p > m;) {
  2291. var v,
  2292. y,
  2293. _,
  2294. x,
  2295. w,
  2296. b,
  2297. S,
  2298. M = i,
  2299. I = n;
  2300. switch (d) {
  2301. case "l":
  2302. i += f[m++], n += f[m++], h = s.L, o.addData(h, i, n);
  2303. break;
  2304. case "L":
  2305. i = f[m++], n = f[m++], h = s.L, o.addData(h, i, n);
  2306. break;
  2307. case "m":
  2308. i += f[m++], n += f[m++], h = s.M, o.addData(h, i, n), r = i, a = n, d = "l";
  2309. break;
  2310. case "M":
  2311. i = f[m++], n = f[m++], h = s.M, o.addData(h, i, n), r = i, a = n, d = "L";
  2312. break;
  2313. case "h":
  2314. i += f[m++], h = s.L, o.addData(h, i, n);
  2315. break;
  2316. case "H":
  2317. i = f[m++], h = s.L, o.addData(h, i, n);
  2318. break;
  2319. case "v":
  2320. n += f[m++], h = s.L, o.addData(h, i, n);
  2321. break;
  2322. case "V":
  2323. n = f[m++], h = s.L, o.addData(h, i, n);
  2324. break;
  2325. case "C":
  2326. h = s.C, o.addData(h, f[m++], f[m++], f[m++], f[m++], f[m++], f[m++]), i = f[m - 2], n = f[m - 1];
  2327. break;
  2328. case "c":
  2329. h = s.C, o.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 += f[m - 1];
  2330. break;
  2331. case "S":
  2332. v = i, y = n;
  2333. var T = o.len(),
  2334. C = o.data;
  2335. e === s.C && (v += i - C[T - 4], y += n - C[T - 3]), h = s.C, M = f[m++], I = f[m++], i = f[m++], n = f[m++], o.addData(h, v, y, M, I, i, n);
  2336. break;
  2337. case "s":
  2338. v = i, y = n;
  2339. var T = o.len(),
  2340. C = o.data;
  2341. e === s.C && (v += i - C[T - 4], y += n - C[T - 3]), h = s.C, M = i + f[m++], I = n + f[m++], i += f[m++], n += f[m++], o.addData(h, v, y, M, I, i, n);
  2342. break;
  2343. case "Q":
  2344. M = f[m++], I = f[m++], i = f[m++], n = f[m++], h = s.Q, o.addData(h, M, I, i, n);
  2345. break;
  2346. case "q":
  2347. M = f[m++] + i, I = f[m++] + n, i += f[m++], n += f[m++], h = s.Q, o.addData(h, M, I, i, n);
  2348. break;
  2349. case "T":
  2350. v = i, y = n;
  2351. var T = o.len(),
  2352. C = o.data;
  2353. e === s.Q && (v += i - C[T - 4], y += n - C[T - 3]), i = f[m++], n = f[m++], h = s.Q, o.addData(h, v, y, i, n);
  2354. break;
  2355. case "t":
  2356. v = i, y = n;
  2357. var T = o.len(),
  2358. C = o.data;
  2359. e === s.Q && (v += i - C[T - 4], y += n - C[T - 3]), i += f[m++], n += f[m++], h = s.Q, o.addData(h, v, y, i, n);
  2360. break;
  2361. case "A":
  2362. _ = f[m++], x = f[m++], w = f[m++], b = f[m++], S = f[m++], M = i, I = n, i = f[m++], n = f[m++], h = s.A, Hr(M, I, i, n, b, S, _, x, w, h, o);
  2363. break;
  2364. case "a":
  2365. _ = f[m++], x = f[m++], w = f[m++], b = f[m++], S = f[m++], M = i, I = n, i += f[m++], n += f[m++], h = s.A, Hr(M, I, i, n, b, S, _, x, w, h, o);
  2366. }
  2367. }
  2368. ("z" === d || "Z" === d) && (h = s.Z, o.addData(h), i = r, n = a), e = h;
  2369. }
  2370. return o.toStatic(), o;
  2371. }
  2372. function Ur(t, e) {
  2373. var i = Wr(t);
  2374. return e = e || {}, e.buildPath = function (t) {
  2375. if (t.setData) {
  2376. t.setData(i.data);
  2377. var e = t.getContext();
  2378. e && t.rebuildPath(e);
  2379. } else {
  2380. var e = t;
  2381. i.rebuildPath(e);
  2382. }
  2383. }, e.applyTransform = function (t) {
  2384. Vy(i, t), this.dirty(!0);
  2385. }, e;
  2386. }
  2387. function Xr(t, e) {
  2388. return new Vr(Ur(t, e));
  2389. }
  2390. function Yr(t, e) {
  2391. return Vr.extend(Ur(t, e));
  2392. }
  2393. function jr(t, e) {
  2394. for (var i = [], n = t.length, r = 0; n > r; r++) {
  2395. var a = t[r];
  2396. a.path || a.createPathProxy(), a.__dirtyPath && a.buildPath(a.path, a.shape, !0), i.push(a.path);
  2397. }
  2398. var o = new Vr(e);
  2399. return o.createPathProxy(), o.buildPath = function (t) {
  2400. t.appendPath(i);
  2401. var e = t.getContext();
  2402. e && t.rebuildPath(e);
  2403. }, o;
  2404. }
  2405. function qr(t, e, i, n, r, a, o) {
  2406. var s = .5 * (i - t),
  2407. l = .5 * (n - e);
  2408. return (2 * (e - i) + s + l) * o + (-3 * (e - i) - 2 * s - l) * a + s * r + e;
  2409. }
  2410. function Zr(t, e, i) {
  2411. var n = e.points,
  2412. r = e.smooth;
  2413. if (n && n.length >= 2) {
  2414. if (r && "spline" !== r) {
  2415. var a = r_(n, r, i, e.smoothConstraint);
  2416. t.moveTo(n[0][0], n[0][1]);
  2417. for (var o = n.length, s = 0; (i ? o : o - 1) > s; s++) {
  2418. var l = a[2 * s],
  2419. u = a[2 * s + 1],
  2420. h = n[(s + 1) % o];
  2421. t.bezierCurveTo(l[0], l[1], u[0], u[1], h[0], h[1]);
  2422. }
  2423. } else {
  2424. "spline" === r && (n = n_(n, i)), t.moveTo(n[0][0], n[0][1]);
  2425. for (var s = 1, c = n.length; c > s; s++) t.lineTo(n[s][0], n[s][1]);
  2426. }
  2427. i && t.closePath();
  2428. }
  2429. }
  2430. function Kr(t, e, i) {
  2431. var n = i && i.lineWidth;
  2432. if (e && n) {
  2433. var r = e.x1,
  2434. a = e.x2,
  2435. o = e.y1,
  2436. s = e.y2;
  2437. s_(2 * r) === s_(2 * a) ? t.x1 = t.x2 = Qr(r, n, !0) : (t.x1 = r, t.x2 = a), s_(2 * o) === s_(2 * s) ? t.y1 = t.y2 = Qr(o, n, !0) : (t.y1 = o, t.y2 = s);
  2438. }
  2439. }
  2440. function $r(t, e, i) {
  2441. var n = i && i.lineWidth;
  2442. if (e && n) {
  2443. var r = e.x,
  2444. a = e.y,
  2445. o = e.width,
  2446. s = e.height;
  2447. t.x = Qr(r, n, !0), t.y = Qr(a, n, !0), t.width = Math.max(Qr(r + o, n, !1) - t.x, 0 === o ? 0 : 1), t.height = Math.max(Qr(a + s, n, !1) - t.y, 0 === s ? 0 : 1);
  2448. }
  2449. }
  2450. function Qr(t, e, i) {
  2451. var n = s_(2 * t);
  2452. return (n + s_(e)) % 2 === 0 ? n / 2 : (n + (i ? 1 : -1)) / 2;
  2453. }
  2454. function Jr(t, e, i) {
  2455. var n = t.cpx2,
  2456. r = t.cpy2;
  2457. return null === n || null === r ? [(i ? cr : hr)(t.x1, t.cpx1, t.cpx2, t.x2, e), (i ? cr : hr)(t.y1, t.cpy1, t.cpy2, t.y2, e)] : [(i ? vr : mr)(t.x1, t.cpx1, t.x2, e), (i ? vr : mr)(t.y1, t.cpy1, t.y2, e)];
  2458. }
  2459. function ta(t) {
  2460. bn.call(this, t), this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.notClear = !0;
  2461. }
  2462. function ea(t) {
  2463. return Vr.extend(t);
  2464. }
  2465. function ia(t, e) {
  2466. return Yr(t, e);
  2467. }
  2468. function na(t, e) {
  2469. A_[t] = e;
  2470. }
  2471. function ra(t) {
  2472. return A_.hasOwnProperty(t) ? A_[t] : void 0;
  2473. }
  2474. function aa(t, e, i, n) {
  2475. var r = Xr(t, e);
  2476. return i && ("center" === n && (i = sa(i, r.getBoundingRect())), la(r, i)), r;
  2477. }
  2478. function oa(t, e, i) {
  2479. var n = new Sn({
  2480. style: {
  2481. image: t,
  2482. x: e.x,
  2483. y: e.y,
  2484. width: e.width,
  2485. height: e.height
  2486. },
  2487. onload: function (t) {
  2488. if ("center" === i) {
  2489. var r = {
  2490. width: t.width,
  2491. height: t.height
  2492. };
  2493. n.setStyle(sa(e, r));
  2494. }
  2495. }
  2496. });
  2497. return n;
  2498. }
  2499. function sa(t, e) {
  2500. var i,
  2501. n = e.width / e.height,
  2502. r = t.height * n;
  2503. r <= t.width ? i = t.height : (r = t.width, i = r / n);
  2504. var a = t.x + t.width / 2,
  2505. o = t.y + t.height / 2;
  2506. return {
  2507. x: a - r / 2,
  2508. y: o - i / 2,
  2509. width: r,
  2510. height: i
  2511. };
  2512. }
  2513. function la(t, e) {
  2514. if (t.applyTransform) {
  2515. var i = t.getBoundingRect(),
  2516. n = i.calculateTransform(e);
  2517. t.applyTransform(n);
  2518. }
  2519. }
  2520. function ua(t) {
  2521. return Kr(t.shape, t.shape, t.style), t;
  2522. }
  2523. function ha(t) {
  2524. return $r(t.shape, t.shape, t.style), t;
  2525. }
  2526. function ca(t) {
  2527. return null != t && "none" !== t;
  2528. }
  2529. function da(t) {
  2530. if ("string" != typeof t) return t;
  2531. var e = L_.get(t);
  2532. return e || (e = Qe(t, -.1), 1e4 > O_ && (L_.set(t, e), O_++)), e;
  2533. }
  2534. function fa(t) {
  2535. if (t.__hoverStlDirty) {
  2536. t.__hoverStlDirty = !1;
  2537. var e = t.__hoverStl;
  2538. if (!e) return void (t.__cachedNormalStl = t.__cachedNormalZ2 = null);
  2539. var i = t.__cachedNormalStl = {};
  2540. t.__cachedNormalZ2 = t.z2;
  2541. var n = t.style;
  2542. for (var r in e) null != e[r] && (i[r] = n[r]);
  2543. i.fill = n.fill, i.stroke = n.stroke;
  2544. }
  2545. }
  2546. function pa(t) {
  2547. var e = t.__hoverStl;
  2548. if (e && !t.__highlighted) {
  2549. var i = t.__zr,
  2550. n = t.useHoverLayer && i && "canvas" === i.painter.type;
  2551. if (t.__highlighted = n ? "layer" : "plain", !(t.isGroup || !i && t.useHoverLayer)) {
  2552. var r = t,
  2553. a = t.style;
  2554. n && (r = i.addHover(t), a = r.style), Ba(a), n || fa(r), a.extendFrom(e), ga(a, e, "fill"), ga(a, e, "stroke"), Ra(a), n || (t.dirty(!1), t.z2 += S_);
  2555. }
  2556. }
  2557. }
  2558. function ga(t, e, i) {
  2559. !ca(e[i]) && ca(t[i]) && (t[i] = da(t[i]));
  2560. }
  2561. function ma(t) {
  2562. var e = t.__highlighted;
  2563. if (e && (t.__highlighted = !1, !t.isGroup)) if ("layer" === e) t.__zr && t.__zr.removeHover(t);else {
  2564. var i = t.style,
  2565. n = t.__cachedNormalStl;
  2566. n && (Ba(i), t.setStyle(n), Ra(i));
  2567. var r = t.__cachedNormalZ2;
  2568. null != r && t.z2 - r === S_ && (t.z2 = r);
  2569. }
  2570. }
  2571. function va(t, e, i) {
  2572. var n,
  2573. r = T_,
  2574. a = T_;
  2575. t.__highlighted && (r = I_, n = !0), e(t, i), t.__highlighted && (a = I_, n = !0), t.isGroup && t.traverse(function (t) {
  2576. !t.isGroup && e(t, i);
  2577. }), n && t.__highDownOnUpdate && t.__highDownOnUpdate(r, a);
  2578. }
  2579. function ya(t, e) {
  2580. e = t.__hoverStl = e !== !1 && (t.hoverStyle || e || {}), t.__hoverStlDirty = !0, t.__highlighted && (t.__cachedNormalStl = null, ma(t), pa(t));
  2581. }
  2582. function _a(t) {
  2583. !Sa(this, t) && !this.__highByOuter && va(this, pa);
  2584. }
  2585. function xa(t) {
  2586. !Sa(this, t) && !this.__highByOuter && va(this, ma);
  2587. }
  2588. function wa(t) {
  2589. this.__highByOuter |= 1 << (t || 0), va(this, pa);
  2590. }
  2591. function ba(t) {
  2592. !(this.__highByOuter &= ~(1 << (t || 0))) && va(this, ma);
  2593. }
  2594. function Sa(t, e) {
  2595. return t.__highDownSilentOnTouch && e.zrByTouch;
  2596. }
  2597. function Ma(t, e) {
  2598. Ia(t, !0), va(t, ya, e);
  2599. }
  2600. function Ia(t, e) {
  2601. var i = e === !1;
  2602. if (t.__highDownSilentOnTouch = t.highDownSilentOnTouch, t.__highDownOnUpdate = t.highDownOnUpdate, !i || t.__highDownDispatcher) {
  2603. var n = i ? "off" : "on";
  2604. t[n]("mouseover", _a)[n]("mouseout", xa), t[n]("emphasis", wa)[n]("normal", ba), t.__highByOuter = t.__highByOuter || 0, t.__highDownDispatcher = !i;
  2605. }
  2606. }
  2607. function Ta(t) {
  2608. return !(!t || !t.__highDownDispatcher);
  2609. }
  2610. function Ca(t) {
  2611. var e = D_[t];
  2612. return null == e && 32 >= C_ && (e = D_[t] = C_++), e;
  2613. }
  2614. function Da(t, e, i, n, r, a, o) {
  2615. r = r || b_;
  2616. var s,
  2617. l = r.labelFetcher,
  2618. u = r.labelDataIndex,
  2619. h = r.labelDimIndex,
  2620. c = i.getShallow("show"),
  2621. d = n.getShallow("show");
  2622. (c || d) && (l && (s = l.getFormattedLabel(u, "normal", null, h)), null == s && (s = w(r.defaultText) ? r.defaultText(u, r) : r.defaultText));
  2623. var f = c ? s : null,
  2624. p = d ? A(l ? l.getFormattedLabel(u, "emphasis", null, h) : null, s) : null;
  2625. (null != f || null != p) && (ka(t, i, a, r), ka(e, n, o, r, !0)), t.text = f, e.text = p;
  2626. }
  2627. function Aa(t, e, i) {
  2628. var n = t.style;
  2629. e && (Ba(n), t.setStyle(e), Ra(n)), n = t.__hoverStl, i && n && (Ba(n), o(n, i), Ra(n));
  2630. }
  2631. function ka(t, e, i, n, r) {
  2632. return La(t, e, n, r), i && o(t, i), t;
  2633. }
  2634. function Pa(t, e, i) {
  2635. var n,
  2636. r = {
  2637. isRectText: !0
  2638. };
  2639. i === !1 ? n = !0 : r.autoColor = i, La(t, e, r, n);
  2640. }
  2641. function La(t, e, i, n) {
  2642. if (i = i || b_, i.isRectText) {
  2643. var r;
  2644. i.getTextPosition ? r = i.getTextPosition(e, n) : (r = e.getShallow("position") || (n ? null : "inside"), "outside" === r && (r = "top")), t.textPosition = r, t.textOffset = e.getShallow("offset");
  2645. var a = e.getShallow("rotate");
  2646. null != a && (a *= Math.PI / 180), t.textRotation = a, t.textDistance = A(e.getShallow("distance"), n ? null : 5);
  2647. }
  2648. var o,
  2649. s = e.ecModel,
  2650. l = s && s.option.textStyle,
  2651. u = Oa(e);
  2652. if (u) {
  2653. o = {};
  2654. for (var h in u) if (u.hasOwnProperty(h)) {
  2655. var c = e.getModel(["rich", h]);
  2656. za(o[h] = {}, c, l, i, n);
  2657. }
  2658. }
  2659. return t.rich = o, za(t, e, l, i, n, !0), i.forceRich && !i.textStyle && (i.textStyle = {}), t;
  2660. }
  2661. function Oa(t) {
  2662. for (var e; t && t !== t.ecModel;) {
  2663. var i = (t.option || b_).rich;
  2664. if (i) {
  2665. e = e || {};
  2666. for (var n in i) i.hasOwnProperty(n) && (e[n] = 1);
  2667. }
  2668. t = t.parentModel;
  2669. }
  2670. return e;
  2671. }
  2672. function za(t, e, i, n, r, a) {
  2673. i = !r && i || b_, t.textFill = Ea(e.getShallow("color"), n) || i.color, t.textStroke = Ea(e.getShallow("textBorderColor"), n) || i.textBorderColor, t.textStrokeWidth = A(e.getShallow("textBorderWidth"), i.textBorderWidth), r || (a && (t.insideRollbackOpt = n, Ra(t)), null == t.textFill && (t.textFill = n.autoColor)), t.fontStyle = e.getShallow("fontStyle") || i.fontStyle, t.fontWeight = e.getShallow("fontWeight") || i.fontWeight, t.fontSize = e.getShallow("fontSize") || i.fontSize, t.fontFamily = e.getShallow("fontFamily") || i.fontFamily, t.textAlign = e.getShallow("align"), t.textVerticalAlign = e.getShallow("verticalAlign") || e.getShallow("baseline"), t.textLineHeight = e.getShallow("lineHeight"), t.textWidth = e.getShallow("width"), t.textHeight = e.getShallow("height"), t.textTag = e.getShallow("tag"), a && n.disableBox || (t.textBackgroundColor = Ea(e.getShallow("backgroundColor"), n), t.textPadding = e.getShallow("padding"), t.textBorderColor = Ea(e.getShallow("borderColor"), n), t.textBorderWidth = e.getShallow("borderWidth"), t.textBorderRadius = e.getShallow("borderRadius"), t.textBoxShadowColor = e.getShallow("shadowColor"), t.textBoxShadowBlur = e.getShallow("shadowBlur"), t.textBoxShadowOffsetX = e.getShallow("shadowOffsetX"), t.textBoxShadowOffsetY = e.getShallow("shadowOffsetY")), t.textShadowColor = e.getShallow("textShadowColor") || i.textShadowColor, t.textShadowBlur = e.getShallow("textShadowBlur") || i.textShadowBlur, t.textShadowOffsetX = e.getShallow("textShadowOffsetX") || i.textShadowOffsetX, t.textShadowOffsetY = e.getShallow("textShadowOffsetY") || i.textShadowOffsetY;
  2674. }
  2675. function Ea(t, e) {
  2676. return "auto" !== t ? t : e && e.autoColor ? e.autoColor : null;
  2677. }
  2678. function Ra(t) {
  2679. var e,
  2680. i = t.textPosition,
  2681. n = t.insideRollbackOpt;
  2682. if (n && null == t.textFill) {
  2683. var r = n.autoColor,
  2684. a = n.isRectText,
  2685. o = n.useInsideStyle,
  2686. s = o !== !1 && (o === !0 || a && i && "string" == typeof i && i.indexOf("inside") >= 0),
  2687. l = !s && null != r;
  2688. (s || l) && (e = {
  2689. textFill: t.textFill,
  2690. textStroke: t.textStroke,
  2691. textStrokeWidth: t.textStrokeWidth
  2692. }), s && (t.textFill = "#fff", null == t.textStroke && (t.textStroke = r, null == t.textStrokeWidth && (t.textStrokeWidth = 2))), l && (t.textFill = r);
  2693. }
  2694. t.insideRollback = e;
  2695. }
  2696. function Ba(t) {
  2697. var e = t.insideRollback;
  2698. e && (t.textFill = e.textFill, t.textStroke = e.textStroke, t.textStrokeWidth = e.textStrokeWidth, t.insideRollback = null);
  2699. }
  2700. function Na(t, e) {
  2701. var i = e || e.getModel("textStyle");
  2702. return z([t.fontStyle || i && i.getShallow("fontStyle") || "", t.fontWeight || i && i.getShallow("fontWeight") || "", (t.fontSize || i && i.getShallow("fontSize") || 12) + "px", t.fontFamily || i && i.getShallow("fontFamily") || "sans-serif"].join(" "));
  2703. }
  2704. function Fa(t, e, i, n, r, a) {
  2705. "function" == typeof r && (a = r, r = null);
  2706. var o = n && n.isAnimationEnabled();
  2707. if (o) {
  2708. var s = t ? "Update" : "",
  2709. l = n.getShallow("animationDuration" + s),
  2710. u = n.getShallow("animationEasing" + s),
  2711. h = n.getShallow("animationDelay" + s);
  2712. "function" == typeof h && (h = h(r, n.getAnimationDelayParams ? n.getAnimationDelayParams(e, r) : null)), "function" == typeof l && (l = l(r)), l > 0 ? e.animateTo(i, l, h || 0, u, a, !!a) : (e.stopAnimation(), e.attr(i), a && a());
  2713. } else e.stopAnimation(), e.attr(i), a && a();
  2714. }
  2715. function Ga(t, e, i, n, r) {
  2716. Fa(!0, t, e, i, n, r);
  2717. }
  2718. function Va(t, e, i, n, r) {
  2719. Fa(!1, t, e, i, n, r);
  2720. }
  2721. function Ha(t, e) {
  2722. for (var i = Ae([]); t && t !== e;) Pe(i, t.getLocalTransform(), i), t = t.parent;
  2723. return i;
  2724. }
  2725. function Wa(t, e, i) {
  2726. return e && !d(e) && (e = lm.getLocalTransform(e)), i && (e = Ee([], e)), ae([], t, e);
  2727. }
  2728. function Ua(t, e, i) {
  2729. var n = 0 === e[4] || 0 === e[5] || 0 === e[0] ? 1 : Math.abs(2 * e[4] / e[0]),
  2730. r = 0 === e[4] || 0 === e[5] || 0 === e[2] ? 1 : Math.abs(2 * e[4] / e[2]),
  2731. a = ["left" === t ? -n : "right" === t ? n : 0, "top" === t ? -r : "bottom" === t ? r : 0];
  2732. return a = Wa(a, e, i), Math.abs(a[0]) > Math.abs(a[1]) ? a[0] > 0 ? "right" : "left" : a[1] > 0 ? "bottom" : "top";
  2733. }
  2734. function Xa(t, e, i) {
  2735. function n(t) {
  2736. var e = {};
  2737. return t.traverse(function (t) {
  2738. !t.isGroup && t.anid && (e[t.anid] = t);
  2739. }), e;
  2740. }
  2741. function r(t) {
  2742. var e = {
  2743. position: W(t.position),
  2744. rotation: t.rotation
  2745. };
  2746. return t.shape && (e.shape = o({}, t.shape)), e;
  2747. }
  2748. if (t && e) {
  2749. var a = n(t);
  2750. e.traverse(function (t) {
  2751. if (!t.isGroup && t.anid) {
  2752. var e = a[t.anid];
  2753. if (e) {
  2754. var n = r(t);
  2755. t.attr(r(e)), Ga(t, n, i, t.dataIndex);
  2756. }
  2757. }
  2758. });
  2759. }
  2760. }
  2761. function Ya(t, e) {
  2762. return p(t, function (t) {
  2763. var i = t[0];
  2764. i = x_(i, e.x), i = w_(i, e.x + e.width);
  2765. var n = t[1];
  2766. return n = x_(n, e.y), n = w_(n, e.y + e.height), [i, n];
  2767. });
  2768. }
  2769. function ja(t, e) {
  2770. var i = x_(t.x, e.x),
  2771. n = w_(t.x + t.width, e.x + e.width),
  2772. r = x_(t.y, e.y),
  2773. a = w_(t.y + t.height, e.y + e.height);
  2774. return n >= i && a >= r ? {
  2775. x: i,
  2776. y: r,
  2777. width: n - i,
  2778. height: a - r
  2779. } : void 0;
  2780. }
  2781. function qa(t, e, i) {
  2782. e = o({
  2783. rectHover: !0
  2784. }, e);
  2785. var n = e.style = {
  2786. strokeNoScale: !0
  2787. };
  2788. return i = i || {
  2789. x: -1,
  2790. y: -1,
  2791. width: 2,
  2792. height: 2
  2793. }, t ? 0 === t.indexOf("image://") ? (n.image = t.slice(8), s(n, i), new Sn(e)) : aa(t.replace("path://", ""), e, i, "center") : void 0;
  2794. }
  2795. function Za(t, e, i, n, r) {
  2796. for (var a = 0, o = r[r.length - 1]; a < r.length; a++) {
  2797. var s = r[a];
  2798. if (Ka(t, e, i, n, s[0], s[1], o[0], o[1])) return !0;
  2799. o = s;
  2800. }
  2801. }
  2802. function Ka(t, e, i, n, r, a, o, s) {
  2803. var l = i - t,
  2804. u = n - e,
  2805. h = o - r,
  2806. c = s - a,
  2807. d = $a(h, c, l, u);
  2808. if (Qa(d)) return !1;
  2809. var f = t - r,
  2810. p = e - a,
  2811. g = $a(f, p, l, u) / d;
  2812. if (0 > g || g > 1) return !1;
  2813. var m = $a(f, p, h, c) / d;
  2814. return 0 > m || m > 1 ? !1 : !0;
  2815. }
  2816. function $a(t, e, i, n) {
  2817. return t * n - i * e;
  2818. }
  2819. function Qa(t) {
  2820. return 1e-6 >= t && t >= -1e-6;
  2821. }
  2822. function Ja(t, e, i) {
  2823. this.parentModel = e, this.ecModel = i, this.option = t;
  2824. }
  2825. function to(t, e, i) {
  2826. for (var n = 0; n < e.length && (!e[n] || (t = t && "object" == typeof t ? t[e[n]] : null, null != t)); n++);
  2827. return null == t && i && (t = i.get(e)), t;
  2828. }
  2829. function eo(t, e) {
  2830. var i = G_(t).getParent;
  2831. return i ? i.call(t, e) : t.parentModel;
  2832. }
  2833. function io(t) {
  2834. return [t || "", V_++, Math.random().toFixed(5)].join("_");
  2835. }
  2836. function no(t) {
  2837. var e = {};
  2838. return t.registerSubTypeDefaulter = function (t, i) {
  2839. t = er(t), e[t.main] = i;
  2840. }, t.determineSubType = function (i, n) {
  2841. var r = n.type;
  2842. if (!r) {
  2843. var a = er(i).main;
  2844. t.hasSubTypes(i) && e[a] && (r = e[a](n));
  2845. }
  2846. return r;
  2847. }, t;
  2848. }
  2849. function ro(t, e) {
  2850. function i(t) {
  2851. var i = {},
  2852. a = [];
  2853. return f(t, function (o) {
  2854. var s = n(i, o),
  2855. l = s.originalDeps = e(o),
  2856. h = r(l, t);
  2857. s.entryCount = h.length, 0 === s.entryCount && a.push(o), f(h, function (t) {
  2858. u(s.predecessor, t) < 0 && s.predecessor.push(t);
  2859. var e = n(i, t);
  2860. u(e.successor, t) < 0 && e.successor.push(o);
  2861. });
  2862. }), {
  2863. graph: i,
  2864. noEntryList: a
  2865. };
  2866. }
  2867. function n(t, e) {
  2868. return t[e] || (t[e] = {
  2869. predecessor: [],
  2870. successor: []
  2871. }), t[e];
  2872. }
  2873. function r(t, e) {
  2874. var i = [];
  2875. return f(t, function (t) {
  2876. u(e, t) >= 0 && i.push(t);
  2877. }), i;
  2878. }
  2879. t.topologicalTravel = function (t, e, n, r) {
  2880. function a(t) {
  2881. l[t].entryCount--, 0 === l[t].entryCount && u.push(t);
  2882. }
  2883. function o(t) {
  2884. h[t] = !0, a(t);
  2885. }
  2886. if (t.length) {
  2887. var s = i(e),
  2888. l = s.graph,
  2889. u = s.noEntryList,
  2890. h = {};
  2891. for (f(t, function (t) {
  2892. h[t] = !0;
  2893. }); u.length;) {
  2894. var c = u.pop(),
  2895. d = l[c],
  2896. p = !!h[c];
  2897. p && (n.call(r, c, d.originalDeps.slice()), delete h[c]), f(d.successor, p ? o : a);
  2898. }
  2899. f(h, function () {
  2900. throw new Error("Circle dependency may exists");
  2901. });
  2902. }
  2903. };
  2904. }
  2905. function ao(t) {
  2906. return t.replace(/^\s+|\s+$/g, "");
  2907. }
  2908. function oo(t, e, i, n) {
  2909. var r = e[1] - e[0],
  2910. a = i[1] - i[0];
  2911. if (0 === r) return 0 === a ? i[0] : (i[0] + i[1]) / 2;
  2912. if (n) {
  2913. if (r > 0) {
  2914. if (t <= e[0]) return i[0];
  2915. if (t >= e[1]) return i[1];
  2916. } else {
  2917. if (t >= e[0]) return i[0];
  2918. if (t <= e[1]) return i[1];
  2919. }
  2920. } else {
  2921. if (t === e[0]) return i[0];
  2922. if (t === e[1]) return i[1];
  2923. }
  2924. return (t - e[0]) / r * a + i[0];
  2925. }
  2926. function so(t, e) {
  2927. switch (t) {
  2928. case "center":
  2929. case "middle":
  2930. t = "50%";
  2931. break;
  2932. case "left":
  2933. case "top":
  2934. t = "0%";
  2935. break;
  2936. case "right":
  2937. case "bottom":
  2938. t = "100%";
  2939. }
  2940. return "string" == typeof t ? ao(t).match(/%$/) ? parseFloat(t) / 100 * e : parseFloat(t) : null == t ? 0 / 0 : +t;
  2941. }
  2942. function lo(t, e, i) {
  2943. return null == e && (e = 10), e = Math.min(Math.max(0, e), 20), t = (+t).toFixed(e), i ? t : +t;
  2944. }
  2945. function uo(t) {
  2946. return t.sort(function (t, e) {
  2947. return t - e;
  2948. }), t;
  2949. }
  2950. function ho(t) {
  2951. if (t = +t, isNaN(t)) return 0;
  2952. for (var e = 1, i = 0; Math.round(t * e) / e !== t;) e *= 10, i++;
  2953. return i;
  2954. }
  2955. function co(t) {
  2956. var e = t.toString(),
  2957. i = e.indexOf("e");
  2958. if (i > 0) {
  2959. var n = +e.slice(i + 1);
  2960. return 0 > n ? -n : 0;
  2961. }
  2962. var r = e.indexOf(".");
  2963. return 0 > r ? 0 : e.length - 1 - r;
  2964. }
  2965. function fo(t, e) {
  2966. var i = Math.log,
  2967. n = Math.LN10,
  2968. r = Math.floor(i(t[1] - t[0]) / n),
  2969. a = Math.round(i(Math.abs(e[1] - e[0])) / n),
  2970. o = Math.min(Math.max(-r + a, 0), 20);
  2971. return isFinite(o) ? o : 20;
  2972. }
  2973. function po(t, e, i) {
  2974. if (!t[e]) return 0;
  2975. var n = g(t, function (t, e) {
  2976. return t + (isNaN(e) ? 0 : e);
  2977. }, 0);
  2978. if (0 === n) return 0;
  2979. for (var r = Math.pow(10, i), a = p(t, function (t) {
  2980. return (isNaN(t) ? 0 : t) / n * r * 100;
  2981. }), o = 100 * r, s = p(a, function (t) {
  2982. return Math.floor(t);
  2983. }), l = g(s, function (t, e) {
  2984. return t + e;
  2985. }, 0), u = p(a, function (t, e) {
  2986. return t - s[e];
  2987. }); o > l;) {
  2988. for (var h = Number.NEGATIVE_INFINITY, c = null, d = 0, f = u.length; f > d; ++d) u[d] > h && (h = u[d], c = d);
  2989. ++s[c], u[c] = 0, ++l;
  2990. }
  2991. return s[e] / r;
  2992. }
  2993. function go(t) {
  2994. var e = 2 * Math.PI;
  2995. return (t % e + e) % e;
  2996. }
  2997. function mo(t) {
  2998. return t > -H_ && H_ > t;
  2999. }
  3000. function vo(t) {
  3001. if (t instanceof Date) return t;
  3002. if ("string" == typeof t) {
  3003. var e = U_.exec(t);
  3004. if (!e) return new Date(0 / 0);
  3005. if (e[8]) {
  3006. var i = +e[4] || 0;
  3007. return "Z" !== e[8].toUpperCase() && (i -= e[8].slice(0, 3)), new Date(Date.UTC(+e[1], +(e[2] || 1) - 1, +e[3] || 1, i, +(e[5] || 0), +e[6] || 0, +e[7] || 0));
  3008. }
  3009. return new Date(+e[1], +(e[2] || 1) - 1, +e[3] || 1, +e[4] || 0, +(e[5] || 0), +e[6] || 0, +e[7] || 0);
  3010. }
  3011. return new Date(null == t ? 0 / 0 : Math.round(t));
  3012. }
  3013. function yo(t) {
  3014. return Math.pow(10, _o(t));
  3015. }
  3016. function _o(t) {
  3017. if (0 === t) return 0;
  3018. var e = Math.floor(Math.log(t) / Math.LN10);
  3019. return t / Math.pow(10, e) >= 10 && e++, e;
  3020. }
  3021. function xo(t, e) {
  3022. var i,
  3023. n = _o(t),
  3024. r = Math.pow(10, n),
  3025. a = t / r;
  3026. return i = e ? 1.5 > a ? 1 : 2.5 > a ? 2 : 4 > a ? 3 : 7 > a ? 5 : 10 : 1 > a ? 1 : 2 > a ? 2 : 3 > a ? 3 : 5 > a ? 5 : 10, t = i * r, n >= -20 ? +t.toFixed(0 > n ? -n : 0) : t;
  3027. }
  3028. function wo(t, e) {
  3029. var i = (t.length - 1) * e + 1,
  3030. n = Math.floor(i),
  3031. r = +t[n - 1],
  3032. a = i - n;
  3033. return a ? r + a * (t[n] - r) : r;
  3034. }
  3035. function bo(t) {
  3036. function e(t, i, n) {
  3037. return t.interval[n] < i.interval[n] || t.interval[n] === i.interval[n] && (t.close[n] - i.close[n] === (n ? -1 : 1) || !n && e(t, i, 1));
  3038. }
  3039. t.sort(function (t, i) {
  3040. return e(t, i, 0) ? -1 : 1;
  3041. });
  3042. for (var i = -1 / 0, n = 1, r = 0; r < t.length;) {
  3043. for (var a = t[r].interval, o = t[r].close, s = 0; 2 > s; s++) a[s] <= i && (a[s] = i, o[s] = s ? 1 : 1 - n), i = a[s], n = o[s];
  3044. a[0] === a[1] && o[0] * o[1] !== 1 ? t.splice(r, 1) : r++;
  3045. }
  3046. return t;
  3047. }
  3048. function So(t) {
  3049. return t - parseFloat(t) >= 0;
  3050. }
  3051. function Mo(t) {
  3052. return isNaN(t) ? "-" : (t = (t + "").split("."), t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (t.length > 1 ? "." + t[1] : ""));
  3053. }
  3054. function Io(t, e) {
  3055. return t = (t || "").toLowerCase().replace(/-(.)/g, function (t, e) {
  3056. return e.toUpperCase();
  3057. }), e && t && (t = t.charAt(0).toUpperCase() + t.slice(1)), t;
  3058. }
  3059. function To(t) {
  3060. return null == t ? "" : (t + "").replace(j_, function (t, e) {
  3061. return q_[e];
  3062. });
  3063. }
  3064. function Co(t, e, i) {
  3065. x(e) || (e = [e]);
  3066. var n = e.length;
  3067. if (!n) return "";
  3068. for (var r = e[0].$vars || [], a = 0; a < r.length; a++) {
  3069. var o = Z_[a];
  3070. t = t.replace(K_(o), K_(o, 0));
  3071. }
  3072. for (var s = 0; n > s; s++) for (var l = 0; l < r.length; l++) {
  3073. var u = e[s][r[l]];
  3074. t = t.replace(K_(Z_[l], s), i ? To(u) : u);
  3075. }
  3076. return t;
  3077. }
  3078. function Do(t, e, i) {
  3079. return f(e, function (e, n) {
  3080. t = t.replace("{" + n + "}", i ? To(e) : e);
  3081. }), t;
  3082. }
  3083. function Ao(t, e) {
  3084. t = b(t) ? {
  3085. color: t,
  3086. extraCssText: e
  3087. } : t || {};
  3088. var i = t.color,
  3089. n = t.type,
  3090. e = t.extraCssText,
  3091. r = t.renderMode || "html",
  3092. a = t.markerId || "X";
  3093. return i ? "html" === r ? "subItem" === n ? '<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:' + To(i) + ";" + (e || "") + '"></span>' : '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' + To(i) + ";" + (e || "") + '"></span>' : {
  3094. renderMode: r,
  3095. content: "{marker" + a + "|} ",
  3096. style: {
  3097. color: i
  3098. }
  3099. } : "";
  3100. }
  3101. function ko(t, e) {
  3102. return t += "", "0000".substr(0, e - t.length) + t;
  3103. }
  3104. function Po(t, e, i) {
  3105. ("week" === t || "month" === t || "quarter" === t || "half-year" === t || "year" === t) && (t = "MM-dd\nyyyy");
  3106. var n = vo(e),
  3107. r = i ? "UTC" : "",
  3108. a = n["get" + r + "FullYear"](),
  3109. o = n["get" + r + "Month"]() + 1,
  3110. s = n["get" + r + "Date"](),
  3111. l = n["get" + r + "Hours"](),
  3112. u = n["get" + r + "Minutes"](),
  3113. h = n["get" + r + "Seconds"](),
  3114. c = n["get" + r + "Milliseconds"]();
  3115. return t = t.replace("MM", ko(o, 2)).replace("M", o).replace("yyyy", a).replace("yy", a % 100).replace("dd", ko(s, 2)).replace("d", s).replace("hh", ko(l, 2)).replace("h", l).replace("mm", ko(u, 2)).replace("m", u).replace("ss", ko(h, 2)).replace("s", h).replace("SSS", ko(c, 3));
  3116. }
  3117. function Lo(t) {
  3118. return t ? t.charAt(0).toUpperCase() + t.substr(1) : t;
  3119. }
  3120. function Oo(t) {
  3121. return Gi(t.text, t.font, t.textAlign, t.textVerticalAlign, t.textPadding, t.textLineHeight, t.rich, t.truncate);
  3122. }
  3123. function zo(t, e, i, n, r, a, o, s) {
  3124. return Gi(t, e, i, n, r, s, a, o);
  3125. }
  3126. function Eo(t, e, i, n, r) {
  3127. var a = 0,
  3128. o = 0;
  3129. null == n && (n = 1 / 0), null == r && (r = 1 / 0);
  3130. var s = 0;
  3131. e.eachChild(function (l, u) {
  3132. var h,
  3133. c,
  3134. d = l.position,
  3135. f = l.getBoundingRect(),
  3136. p = e.childAt(u + 1),
  3137. g = p && p.getBoundingRect();
  3138. if ("horizontal" === t) {
  3139. var m = f.width + (g ? -g.x + f.x : 0);
  3140. h = a + m, h > n || l.newline ? (a = 0, h = m, o += s + i, s = f.height) : s = Math.max(s, f.height);
  3141. } else {
  3142. var v = f.height + (g ? -g.y + f.y : 0);
  3143. c = o + v, c > r || l.newline ? (a += s + i, o = 0, c = v, s = f.width) : s = Math.max(s, f.width);
  3144. }
  3145. l.newline || (d[0] = a, d[1] = o, "horizontal" === t ? a = h + i : o = c + i);
  3146. });
  3147. }
  3148. function Ro(t, e, i) {
  3149. i = Y_(i || 0);
  3150. var n = e.width,
  3151. r = e.height,
  3152. a = so(t.left, n),
  3153. o = so(t.top, r),
  3154. s = so(t.right, n),
  3155. l = so(t.bottom, r),
  3156. u = so(t.width, n),
  3157. h = so(t.height, r),
  3158. c = i[2] + i[0],
  3159. d = i[1] + i[3],
  3160. f = t.aspect;
  3161. switch (isNaN(u) && (u = n - s - d - a), isNaN(h) && (h = r - l - c - o), null != f && (isNaN(u) && isNaN(h) && (f > n / r ? u = .8 * n : h = .8 * r), isNaN(u) && (u = f * h), isNaN(h) && (h = u / f)), isNaN(a) && (a = n - s - u - d), isNaN(o) && (o = r - l - h - c), t.left || t.right) {
  3162. case "center":
  3163. a = n / 2 - u / 2 - i[3];
  3164. break;
  3165. case "right":
  3166. a = n - u - d;
  3167. }
  3168. switch (t.top || t.bottom) {
  3169. case "middle":
  3170. case "center":
  3171. o = r / 2 - h / 2 - i[0];
  3172. break;
  3173. case "bottom":
  3174. o = r - h - c;
  3175. }
  3176. a = a || 0, o = o || 0, isNaN(u) && (u = n - d - a - (s || 0)), isNaN(h) && (h = r - c - o - (l || 0));
  3177. var p = new wi(a + i[3], o + i[0], u, h);
  3178. return p.margin = i, p;
  3179. }
  3180. function Bo(t, e, i) {
  3181. function n(i, n) {
  3182. var o = {},
  3183. l = 0,
  3184. u = {},
  3185. h = 0,
  3186. c = 2;
  3187. if (J_(i, function (e) {
  3188. u[e] = t[e];
  3189. }), J_(i, function (t) {
  3190. r(e, t) && (o[t] = u[t] = e[t]), a(o, t) && l++, a(u, t) && h++;
  3191. }), s[n]) return a(e, i[1]) ? u[i[2]] = null : a(e, i[2]) && (u[i[1]] = null), u;
  3192. if (h !== c && l) {
  3193. if (l >= c) return o;
  3194. for (var d = 0; d < i.length; d++) {
  3195. var f = i[d];
  3196. if (!r(o, f) && r(t, f)) {
  3197. o[f] = t[f];
  3198. break;
  3199. }
  3200. }
  3201. return o;
  3202. }
  3203. return u;
  3204. }
  3205. function r(t, e) {
  3206. return t.hasOwnProperty(e);
  3207. }
  3208. function a(t, e) {
  3209. return null != t[e] && "auto" !== t[e];
  3210. }
  3211. function o(t, e, i) {
  3212. J_(t, function (t) {
  3213. e[t] = i[t];
  3214. });
  3215. }
  3216. !S(i) && (i = {});
  3217. var s = i.ignoreSize;
  3218. !x(s) && (s = [s, s]);
  3219. var l = n(ex[0], 0),
  3220. u = n(ex[1], 1);
  3221. o(ex[0], t, l), o(ex[1], t, u);
  3222. }
  3223. function No(t) {
  3224. return Fo({}, t);
  3225. }
  3226. function Fo(t, e) {
  3227. return e && t && J_(tx, function (i) {
  3228. e.hasOwnProperty(i) && (t[i] = e[i]);
  3229. }), t;
  3230. }
  3231. function Go(t) {
  3232. var e = [];
  3233. return f(ax.getClassesByMainType(t), function (t) {
  3234. e = e.concat(t.prototype.dependencies || []);
  3235. }), e = p(e, function (t) {
  3236. return er(t).main;
  3237. }), "dataset" !== t && u(e, "dataset") <= 0 && e.unshift("dataset"), e;
  3238. }
  3239. function Vo(t, e) {
  3240. for (var i = t.length, n = 0; i > n; n++) if (t[n].length > e) return t[n];
  3241. return t[i - 1];
  3242. }
  3243. function Ho(t) {
  3244. var e = t.get("coordinateSystem"),
  3245. i = {
  3246. coordSysName: e,
  3247. coordSysDims: [],
  3248. axisMap: N(),
  3249. categoryAxisMap: N()
  3250. },
  3251. n = hx[e];
  3252. return n ? (n(t, i, i.axisMap, i.categoryAxisMap), i) : void 0;
  3253. }
  3254. function Wo(t) {
  3255. return "category" === t.get("type");
  3256. }
  3257. function Uo(t) {
  3258. this.fromDataset = t.fromDataset, this.data = t.data || (t.sourceFormat === px ? {} : []), this.sourceFormat = t.sourceFormat || gx, this.seriesLayoutBy = t.seriesLayoutBy || vx, this.dimensionsDefine = t.dimensionsDefine, this.encodeDefine = t.encodeDefine && N(t.encodeDefine), this.startIndex = t.startIndex || 0, this.dimensionsDetectCount = t.dimensionsDetectCount;
  3259. }
  3260. function Xo(t) {
  3261. var e = t.option.source,
  3262. i = gx;
  3263. if (I(e)) i = mx;else if (x(e)) {
  3264. 0 === e.length && (i = dx);
  3265. for (var n = 0, r = e.length; r > n; n++) {
  3266. var a = e[n];
  3267. if (null != a) {
  3268. if (x(a)) {
  3269. i = dx;
  3270. break;
  3271. }
  3272. if (S(a)) {
  3273. i = fx;
  3274. break;
  3275. }
  3276. }
  3277. }
  3278. } else if (S(e)) {
  3279. for (var o in e) if (e.hasOwnProperty(o) && d(e[o])) {
  3280. i = px;
  3281. break;
  3282. }
  3283. } else if (null != e) throw new Error("Invalid data");
  3284. _x(t).sourceFormat = i;
  3285. }
  3286. function Yo(t) {
  3287. return _x(t).source;
  3288. }
  3289. function jo(t) {
  3290. _x(t).datasetMap = N();
  3291. }
  3292. function qo(t) {
  3293. var e = t.option,
  3294. i = e.data,
  3295. n = I(i) ? mx : cx,
  3296. r = !1,
  3297. a = e.seriesLayoutBy,
  3298. o = e.sourceHeader,
  3299. s = e.dimensions,
  3300. l = ts(t);
  3301. if (l) {
  3302. var u = l.option;
  3303. i = u.source, n = _x(l).sourceFormat, r = !0, a = a || u.seriesLayoutBy, null == o && (o = u.sourceHeader), s = s || u.dimensions;
  3304. }
  3305. var h = Zo(i, n, a, o, s),
  3306. c = e.encode;
  3307. !c && l && (c = Jo(t, l, i, n, a, h)), _x(t).source = new Uo({
  3308. data: i,
  3309. fromDataset: r,
  3310. seriesLayoutBy: a,
  3311. sourceFormat: n,
  3312. dimensionsDefine: h.dimensionsDefine,
  3313. startIndex: h.startIndex,
  3314. dimensionsDetectCount: h.dimensionsDetectCount,
  3315. encodeDefine: c
  3316. });
  3317. }
  3318. function Zo(t, e, i, n, r) {
  3319. if (!t) return {
  3320. dimensionsDefine: Ko(r)
  3321. };
  3322. var a, o, s;
  3323. if (e === dx) "auto" === n || null == n ? $o(function (t) {
  3324. null != t && "-" !== t && (b(t) ? null == o && (o = 1) : o = 0);
  3325. }, i, t, 10) : o = n ? 1 : 0, r || 1 !== o || (r = [], $o(function (t, e) {
  3326. r[e] = null != t ? t : "";
  3327. }, i, t)), a = r ? r.length : i === yx ? t.length : t[0] ? t[0].length : null;else if (e === fx) r || (r = Qo(t), s = !0);else if (e === px) r || (r = [], s = !0, f(t, function (t, e) {
  3328. r.push(e);
  3329. }));else if (e === cx) {
  3330. var l = Hn(t[0]);
  3331. a = x(l) && l.length || 1;
  3332. }
  3333. var u;
  3334. return s && f(r, function (t, e) {
  3335. "name" === (S(t) ? t.name : t) && (u = e);
  3336. }), {
  3337. startIndex: o,
  3338. dimensionsDefine: Ko(r),
  3339. dimensionsDetectCount: a,
  3340. potentialNameDimIndex: u
  3341. };
  3342. }
  3343. function Ko(t) {
  3344. if (t) {
  3345. var e = N();
  3346. return p(t, function (t) {
  3347. if (t = o({}, S(t) ? t : {
  3348. name: t
  3349. }), null == t.name) return t;
  3350. t.name += "", null == t.displayName && (t.displayName = t.name);
  3351. var i = e.get(t.name);
  3352. return i ? t.name += "-" + i.count++ : e.set(t.name, {
  3353. count: 1
  3354. }), t;
  3355. });
  3356. }
  3357. }
  3358. function $o(t, e, i, n) {
  3359. if (null == n && (n = 1 / 0), e === yx) for (var r = 0; r < i.length && n > r; r++) t(i[r] ? i[r][0] : null, r);else for (var a = i[0] || [], r = 0; r < a.length && n > r; r++) t(a[r], r);
  3360. }
  3361. function Qo(t) {
  3362. for (var e, i = 0; i < t.length && !(e = t[i++]););
  3363. if (e) {
  3364. var n = [];
  3365. return f(e, function (t, e) {
  3366. n.push(e);
  3367. }), n;
  3368. }
  3369. }
  3370. function Jo(t, e, i, n, r, a) {
  3371. var o = Ho(t),
  3372. s = {},
  3373. l = [],
  3374. u = [],
  3375. h = t.subType,
  3376. c = N(["pie", "map", "funnel"]),
  3377. d = N(["line", "bar", "pictorialBar", "scatter", "effectScatter", "candlestick", "boxplot"]);
  3378. if (o && null != d.get(h)) {
  3379. var p = t.ecModel,
  3380. g = _x(p).datasetMap,
  3381. m = e.uid + "_" + r,
  3382. v = g.get(m) || g.set(m, {
  3383. categoryWayDim: 1,
  3384. valueWayDim: 0
  3385. });
  3386. f(o.coordSysDims, function (t) {
  3387. if (null == o.firstCategoryDimIndex) {
  3388. var e = v.valueWayDim++;
  3389. s[t] = e, u.push(e);
  3390. } else if (o.categoryAxisMap.get(t)) s[t] = 0, l.push(0);else {
  3391. var e = v.categoryWayDim++;
  3392. s[t] = e, u.push(e);
  3393. }
  3394. });
  3395. } else if (null != c.get(h)) {
  3396. for (var y, _ = 0; 5 > _ && null == y; _++) is(i, n, r, a.dimensionsDefine, a.startIndex, _) || (y = _);
  3397. if (null != y) {
  3398. s.value = y;
  3399. var x = a.potentialNameDimIndex || Math.max(y - 1, 0);
  3400. u.push(x), l.push(x);
  3401. }
  3402. }
  3403. return l.length && (s.itemName = l), u.length && (s.seriesName = u), s;
  3404. }
  3405. function ts(t) {
  3406. var e = t.option,
  3407. i = e.data;
  3408. return i ? void 0 : t.ecModel.getComponent("dataset", e.datasetIndex || 0);
  3409. }
  3410. function es(t, e) {
  3411. return is(t.data, t.sourceFormat, t.seriesLayoutBy, t.dimensionsDefine, t.startIndex, e);
  3412. }
  3413. function is(t, e, i, n, r, a) {
  3414. function o(t) {
  3415. return null != t && isFinite(t) && "" !== t ? !1 : b(t) && "-" !== t ? !0 : void 0;
  3416. }
  3417. var s,
  3418. l = 5;
  3419. if (I(t)) return !1;
  3420. var u;
  3421. if (n && (u = n[a], u = S(u) ? u.name : u), e === dx) {
  3422. if (i === yx) {
  3423. for (var h = t[a], c = 0; c < (h || []).length && l > c; c++) if (null != (s = o(h[r + c]))) return s;
  3424. } else for (var c = 0; c < t.length && l > c; c++) {
  3425. var d = t[r + c];
  3426. if (d && null != (s = o(d[a]))) return s;
  3427. }
  3428. } else if (e === fx) {
  3429. if (!u) return;
  3430. for (var c = 0; c < t.length && l > c; c++) {
  3431. var f = t[c];
  3432. if (f && null != (s = o(f[u]))) return s;
  3433. }
  3434. } else if (e === px) {
  3435. if (!u) return;
  3436. var h = t[u];
  3437. if (!h || I(h)) return !1;
  3438. for (var c = 0; c < h.length && l > c; c++) if (null != (s = o(h[c]))) return s;
  3439. } else if (e === cx) for (var c = 0; c < t.length && l > c; c++) {
  3440. var f = t[c],
  3441. p = Hn(f);
  3442. if (!x(p)) return !1;
  3443. if (null != (s = o(p[a]))) return s;
  3444. }
  3445. return !1;
  3446. }
  3447. function ns(t, e) {
  3448. if (e) {
  3449. var i = e.seiresIndex,
  3450. n = e.seriesId,
  3451. r = e.seriesName;
  3452. return null != i && t.componentIndex !== i || null != n && t.id !== n || null != r && t.name !== r;
  3453. }
  3454. }
  3455. function rs(t, e) {
  3456. var i = t.color && !t.colorLayer;
  3457. f(e, function (e, a) {
  3458. "colorLayer" === a && i || ax.hasClass(a) || ("object" == typeof e ? t[a] = t[a] ? r(t[a], e, !1) : n(e) : null == t[a] && (t[a] = e));
  3459. });
  3460. }
  3461. function as(t) {
  3462. t = t, this.option = {}, this.option[xx] = 1, this._componentsMap = N({
  3463. series: []
  3464. }), this._seriesIndices, this._seriesIndicesMap, rs(t, this._theme.option), r(t, sx, !1), this.mergeOption(t);
  3465. }
  3466. function os(t, e) {
  3467. x(e) || (e = e ? [e] : []);
  3468. var i = {};
  3469. return f(e, function (e) {
  3470. i[e] = (t.get(e) || []).slice();
  3471. }), i;
  3472. }
  3473. function ss(t, e, i) {
  3474. var n = e.type ? e.type : i ? i.subType : ax.determineSubType(t, e);
  3475. return n;
  3476. }
  3477. function ls(t, e) {
  3478. t._seriesIndicesMap = N(t._seriesIndices = p(e, function (t) {
  3479. return t.componentIndex;
  3480. }) || []);
  3481. }
  3482. function us(t, e) {
  3483. return e.hasOwnProperty("subType") ? m(t, function (t) {
  3484. return t.subType === e.subType;
  3485. }) : t;
  3486. }
  3487. function hs(t) {
  3488. f(Sx, function (e) {
  3489. this[e] = y(t[e], t);
  3490. }, this);
  3491. }
  3492. function cs() {
  3493. this._coordinateSystems = [];
  3494. }
  3495. function ds(t) {
  3496. this._api = t, this._timelineOptions = [], this._mediaList = [], this._mediaDefault, this._currentMediaIndices = [], this._optionBackup, this._newBaseOption;
  3497. }
  3498. function fs(t, e, i) {
  3499. var n,
  3500. r,
  3501. a = [],
  3502. o = [],
  3503. s = t.timeline;
  3504. if (t.baseOption && (r = t.baseOption), (s || t.options) && (r = r || {}, a = (t.options || []).slice()), t.media) {
  3505. r = r || {};
  3506. var l = t.media;
  3507. Ix(l, function (t) {
  3508. t && t.option && (t.query ? o.push(t) : n || (n = t));
  3509. });
  3510. }
  3511. return r || (r = t), r.timeline || (r.timeline = s), Ix([r].concat(a).concat(p(o, function (t) {
  3512. return t.option;
  3513. })), function (t) {
  3514. Ix(e, function (e) {
  3515. e(t, i);
  3516. });
  3517. }), {
  3518. baseOption: r,
  3519. timelineOptions: a,
  3520. mediaDefault: n,
  3521. mediaList: o
  3522. };
  3523. }
  3524. function ps(t, e, i) {
  3525. var n = {
  3526. width: e,
  3527. height: i,
  3528. aspectratio: e / i
  3529. },
  3530. r = !0;
  3531. return f(t, function (t, e) {
  3532. var i = e.match(Ax);
  3533. if (i && i[1] && i[2]) {
  3534. var a = i[1],
  3535. o = i[2].toLowerCase();
  3536. gs(n[o], t, a) || (r = !1);
  3537. }
  3538. }), r;
  3539. }
  3540. function gs(t, e, i) {
  3541. return "min" === i ? t >= e : "max" === i ? e >= t : t === e;
  3542. }
  3543. function ms(t, e) {
  3544. return t.join(",") === e.join(",");
  3545. }
  3546. function vs(t, e) {
  3547. e = e || {}, Ix(e, function (e, i) {
  3548. if (null != e) {
  3549. var n = t[i];
  3550. if (ax.hasClass(i)) {
  3551. e = Gn(e), n = Gn(n);
  3552. var r = Un(n, e);
  3553. t[i] = Cx(r, function (t) {
  3554. return t.option && t.exist ? Dx(t.exist, t.option, !0) : t.exist || t.option;
  3555. });
  3556. } else t[i] = Dx(n, e, !0);
  3557. }
  3558. });
  3559. }
  3560. function ys(t) {
  3561. var e = t && t.itemStyle;
  3562. if (e) for (var i = 0, n = Lx.length; n > i; i++) {
  3563. var a = Lx[i],
  3564. o = e.normal,
  3565. s = e.emphasis;
  3566. o && o[a] && (t[a] = t[a] || {}, t[a].normal ? r(t[a].normal, o[a]) : t[a].normal = o[a], o[a] = null), s && s[a] && (t[a] = t[a] || {}, t[a].emphasis ? r(t[a].emphasis, s[a]) : t[a].emphasis = s[a], s[a] = null);
  3567. }
  3568. }
  3569. function _s(t, e, i) {
  3570. if (t && t[e] && (t[e].normal || t[e].emphasis)) {
  3571. var n = t[e].normal,
  3572. r = t[e].emphasis;
  3573. n && (i ? (t[e].normal = t[e].emphasis = null, s(t[e], n)) : t[e] = n), r && (t.emphasis = t.emphasis || {}, t.emphasis[e] = r);
  3574. }
  3575. }
  3576. function xs(t) {
  3577. _s(t, "itemStyle"), _s(t, "lineStyle"), _s(t, "areaStyle"), _s(t, "label"), _s(t, "labelLine"), _s(t, "upperLabel"), _s(t, "edgeLabel");
  3578. }
  3579. function ws(t, e) {
  3580. var i = Px(t) && t[e],
  3581. n = Px(i) && i.textStyle;
  3582. if (n) for (var r = 0, a = Fv.length; a > r; r++) {
  3583. var e = Fv[r];
  3584. n.hasOwnProperty(e) && (i[e] = n[e]);
  3585. }
  3586. }
  3587. function bs(t) {
  3588. t && (xs(t), ws(t, "label"), t.emphasis && ws(t.emphasis, "label"));
  3589. }
  3590. function Ss(t) {
  3591. if (Px(t)) {
  3592. ys(t), xs(t), ws(t, "label"), ws(t, "upperLabel"), ws(t, "edgeLabel"), t.emphasis && (ws(t.emphasis, "label"), ws(t.emphasis, "upperLabel"), ws(t.emphasis, "edgeLabel"));
  3593. var e = t.markPoint;
  3594. e && (ys(e), bs(e));
  3595. var i = t.markLine;
  3596. i && (ys(i), bs(i));
  3597. var n = t.markArea;
  3598. n && bs(n);
  3599. var r = t.data;
  3600. if ("graph" === t.type) {
  3601. r = r || t.nodes;
  3602. var a = t.links || t.edges;
  3603. if (a && !I(a)) for (var o = 0; o < a.length; o++) bs(a[o]);
  3604. f(t.categories, function (t) {
  3605. xs(t);
  3606. });
  3607. }
  3608. if (r && !I(r)) for (var o = 0; o < r.length; o++) bs(r[o]);
  3609. var e = t.markPoint;
  3610. if (e && e.data) for (var s = e.data, o = 0; o < s.length; o++) bs(s[o]);
  3611. var i = t.markLine;
  3612. if (i && i.data) for (var l = i.data, o = 0; o < l.length; o++) x(l[o]) ? (bs(l[o][0]), bs(l[o][1])) : bs(l[o]);
  3613. "gauge" === t.type ? (ws(t, "axisLabel"), ws(t, "title"), ws(t, "detail")) : "treemap" === t.type ? (_s(t.breadcrumb, "itemStyle"), f(t.levels, function (t) {
  3614. xs(t);
  3615. })) : "tree" === t.type && xs(t.leaves);
  3616. }
  3617. }
  3618. function Ms(t) {
  3619. return x(t) ? t : t ? [t] : [];
  3620. }
  3621. function Is(t) {
  3622. return (x(t) ? t[0] : t) || {};
  3623. }
  3624. function Ts(t, e) {
  3625. e = e.split(",");
  3626. for (var i = t, n = 0; n < e.length && (i = i && i[e[n]], null != i); n++);
  3627. return i;
  3628. }
  3629. function Cs(t, e, i, n) {
  3630. e = e.split(",");
  3631. for (var r, a = t, o = 0; o < e.length - 1; o++) r = e[o], null == a[r] && (a[r] = {}), a = a[r];
  3632. (n || null == a[e[o]]) && (a[e[o]] = i);
  3633. }
  3634. function Ds(t) {
  3635. f(zx, function (e) {
  3636. e[0] in t && !(e[1] in t) && (t[e[1]] = t[e[0]]);
  3637. });
  3638. }
  3639. function As(t) {
  3640. f(t, function (e, i) {
  3641. var n = [],
  3642. r = [0 / 0, 0 / 0],
  3643. a = [e.stackResultDimension, e.stackedOverDimension],
  3644. o = e.data,
  3645. s = e.isStackedByIndex,
  3646. l = o.map(a, function (a, l, u) {
  3647. var h = o.get(e.stackedDimension, u);
  3648. if (isNaN(h)) return r;
  3649. var c, d;
  3650. s ? d = o.getRawIndex(u) : c = o.get(e.stackedByDimension, u);
  3651. for (var f = 0 / 0, p = i - 1; p >= 0; p--) {
  3652. var g = t[p];
  3653. if (s || (d = g.data.rawIndexOf(g.stackedByDimension, c)), d >= 0) {
  3654. var m = g.data.getByRawIndex(g.stackResultDimension, d);
  3655. if (h >= 0 && m > 0 || 0 >= h && 0 > m) {
  3656. h += m, f = m;
  3657. break;
  3658. }
  3659. }
  3660. }
  3661. return n[0] = h, n[1] = f, n;
  3662. });
  3663. o.hostModel.setData(l), e.data = l;
  3664. });
  3665. }
  3666. function ks(t, e) {
  3667. Uo.isInstance(t) || (t = Uo.seriesDataToSource(t)), this._source = t;
  3668. var i = this._data = t.data,
  3669. n = t.sourceFormat;
  3670. n === mx && (this._offset = 0, this._dimSize = e, this._data = i);
  3671. var r = Fx[n === dx ? n + "_" + t.seriesLayoutBy : n];
  3672. o(this, r);
  3673. }
  3674. function Ps() {
  3675. return this._data.length;
  3676. }
  3677. function Ls(t) {
  3678. return this._data[t];
  3679. }
  3680. function Os(t) {
  3681. for (var e = 0; e < t.length; e++) this._data.push(t[e]);
  3682. }
  3683. function zs(t, e, i) {
  3684. return null != i ? t[i] : t;
  3685. }
  3686. function Es(t, e, i, n) {
  3687. return Rs(t[n], this._dimensionInfos[e]);
  3688. }
  3689. function Rs(t, e) {
  3690. var i = e && e.type;
  3691. if ("ordinal" === i) {
  3692. var n = e && e.ordinalMeta;
  3693. return n ? n.parseAndCollect(t) : t;
  3694. }
  3695. return "time" === i && "number" != typeof t && null != t && "-" !== t && (t = +vo(t)), null == t || "" === t ? 0 / 0 : +t;
  3696. }
  3697. function Bs(t, e, i) {
  3698. if (t) {
  3699. var n = t.getRawDataItem(e);
  3700. if (null != n) {
  3701. var r,
  3702. a,
  3703. o = t.getProvider().getSource().sourceFormat,
  3704. s = t.getDimensionInfo(i);
  3705. return s && (r = s.name, a = s.index), Gx[o](n, e, a, r);
  3706. }
  3707. }
  3708. }
  3709. function Ns(t, e, i) {
  3710. if (t) {
  3711. var n = t.getProvider().getSource().sourceFormat;
  3712. if (n === cx || n === fx) {
  3713. var r = t.getRawDataItem(e);
  3714. return n !== cx || S(r) || (r = null), r ? r[i] : void 0;
  3715. }
  3716. }
  3717. }
  3718. function Fs(t) {
  3719. return new Gs(t);
  3720. }
  3721. function Gs(t) {
  3722. t = t || {}, this._reset = t.reset, this._plan = t.plan, this._count = t.count, this._onDirty = t.onDirty, this._dirty = !0, this.context;
  3723. }
  3724. function Vs(t, e, i, n, r, a) {
  3725. Xx.reset(i, n, r, a), t._callingProgress = e, t._callingProgress({
  3726. start: i,
  3727. end: n,
  3728. count: n - i,
  3729. next: Xx.next
  3730. }, t.context);
  3731. }
  3732. function Hs(t, e) {
  3733. t._dueIndex = t._outputDueEnd = t._dueEnd = 0, t._settedOutputEnd = null;
  3734. var i, n;
  3735. !e && t._reset && (i = t._reset(t.context), i && i.progress && (n = i.forceFirstProgress, i = i.progress), x(i) && !i.length && (i = null)), t._progress = i, t._modBy = t._modDataCount = null;
  3736. var r = t._downstream;
  3737. return r && r.dirty(), n;
  3738. }
  3739. function Ws(t) {
  3740. var e = t.name;
  3741. Yn(t) || (t.name = Us(t) || e);
  3742. }
  3743. function Us(t) {
  3744. var e = t.getRawData(),
  3745. i = e.mapDimension("seriesName", !0),
  3746. n = [];
  3747. return f(i, function (t) {
  3748. var i = e.getDimensionInfo(t);
  3749. i.displayName && n.push(i.displayName);
  3750. }), n.join(" ");
  3751. }
  3752. function Xs(t) {
  3753. return t.model.getRawData().count();
  3754. }
  3755. function Ys(t) {
  3756. var e = t.model;
  3757. return e.setData(e.getRawData().cloneShallow()), js;
  3758. }
  3759. function js(t, e) {
  3760. t.end > e.outputData.count() && e.model.getRawData().cloneShallow(e.outputData);
  3761. }
  3762. function qs(t, e) {
  3763. f(t.CHANGABLE_METHODS, function (i) {
  3764. t.wrapMethod(i, _(Zs, e));
  3765. });
  3766. }
  3767. function Zs(t) {
  3768. var e = Ks(t);
  3769. e && e.setOutputEnd(this.count());
  3770. }
  3771. function Ks(t) {
  3772. var e = (t.ecModel || {}).scheduler,
  3773. i = e && e.getPipeline(t.uid);
  3774. if (i) {
  3775. var n = i.currentTask;
  3776. if (n) {
  3777. var r = n.agentStubMap;
  3778. r && (n = r.get(t.uid));
  3779. }
  3780. return n;
  3781. }
  3782. }
  3783. function $s() {
  3784. this.group = new Bm(), this.uid = io("viewChart"), this.renderTask = Fs({
  3785. plan: tl,
  3786. reset: el
  3787. }), this.renderTask.context = {
  3788. view: this
  3789. };
  3790. }
  3791. function Qs(t, e, i) {
  3792. if (t && (t.trigger(e, i), t.isGroup && !Ta(t))) for (var n = 0, r = t.childCount(); r > n; n++) Qs(t.childAt(n), e, i);
  3793. }
  3794. function Js(t, e, i) {
  3795. var n = qn(t, e),
  3796. r = e && null != e.highlightKey ? Ca(e.highlightKey) : null;
  3797. null != n ? f(Gn(n), function (e) {
  3798. Qs(t.getItemGraphicEl(e), i, r);
  3799. }) : t.eachItemGraphicEl(function (t) {
  3800. Qs(t, i, r);
  3801. });
  3802. }
  3803. function tl(t) {
  3804. return Qx(t.model);
  3805. }
  3806. function el(t) {
  3807. var e = t.model,
  3808. i = t.ecModel,
  3809. n = t.api,
  3810. r = t.payload,
  3811. a = e.pipelineContext.progressiveRender,
  3812. o = t.view,
  3813. s = r && $x(r).updateMethod,
  3814. l = a ? "incrementalPrepareRender" : s && o[s] ? s : "render";
  3815. return "render" !== l && o[l](e, i, n, r), tw[l];
  3816. }
  3817. function il(t, e, i) {
  3818. function n() {
  3819. h = new Date().getTime(), c = null, t.apply(o, s || []);
  3820. }
  3821. var r,
  3822. a,
  3823. o,
  3824. s,
  3825. l,
  3826. u = 0,
  3827. h = 0,
  3828. c = null;
  3829. e = e || 0;
  3830. var d = function () {
  3831. r = new Date().getTime(), o = this, s = arguments;
  3832. var t = l || e,
  3833. d = l || i;
  3834. l = null, a = r - (d ? u : h) - t, clearTimeout(c), d ? c = setTimeout(n, t) : a >= 0 ? n() : c = setTimeout(n, -a), u = r;
  3835. };
  3836. return d.clear = function () {
  3837. c && (clearTimeout(c), c = null);
  3838. }, d.debounceNextCall = function (t) {
  3839. l = t;
  3840. }, d;
  3841. }
  3842. function nl(t, e, i, n) {
  3843. var r = t[e];
  3844. if (r) {
  3845. var a = r[ew] || r,
  3846. o = r[nw],
  3847. s = r[iw];
  3848. if (s !== i || o !== n) {
  3849. if (null == i || !n) return t[e] = a;
  3850. r = t[e] = il(a, i, "debounce" === n), r[ew] = a, r[nw] = n, r[iw] = i;
  3851. }
  3852. return r;
  3853. }
  3854. }
  3855. function rl(t, e, i, n) {
  3856. this.ecInstance = t, this.api = e, this.unfinished;
  3857. var i = this._dataProcessorHandlers = i.slice(),
  3858. n = this._visualHandlers = n.slice();
  3859. this._allHandlers = i.concat(n), this._stageTaskMap = N();
  3860. }
  3861. function al(t, e, i, n, r) {
  3862. function a(t, e) {
  3863. return t.setDirty && (!t.dirtyMap || t.dirtyMap.get(e.__pipeline.id));
  3864. }
  3865. r = r || {};
  3866. var o;
  3867. f(e, function (e) {
  3868. if (!r.visualType || r.visualType === e.visualType) {
  3869. var s = t._stageTaskMap.get(e.uid),
  3870. l = s.seriesTaskMap,
  3871. u = s.overallTask;
  3872. if (u) {
  3873. var h,
  3874. c = u.agentStubMap;
  3875. c.each(function (t) {
  3876. a(r, t) && (t.dirty(), h = !0);
  3877. }), h && u.dirty(), hw(u, n);
  3878. var d = t.getPerformArgs(u, r.block);
  3879. c.each(function (t) {
  3880. t.perform(d);
  3881. }), o |= u.perform(d);
  3882. } else l && l.each(function (s) {
  3883. a(r, s) && s.dirty();
  3884. var l = t.getPerformArgs(s, r.block);
  3885. l.skip = !e.performRawSeries && i.isSeriesFiltered(s.context.model), hw(s, n), o |= s.perform(l);
  3886. });
  3887. }
  3888. }), t.unfinished |= o;
  3889. }
  3890. function ol(t, e, i, n, r) {
  3891. function a(i) {
  3892. var a = i.uid,
  3893. s = o.get(a) || o.set(a, Fs({
  3894. plan: dl,
  3895. reset: fl,
  3896. count: gl
  3897. }));
  3898. s.context = {
  3899. model: i,
  3900. ecModel: n,
  3901. api: r,
  3902. useClearVisual: e.isVisual && !e.isLayout,
  3903. plan: e.plan,
  3904. reset: e.reset,
  3905. scheduler: t
  3906. }, ml(t, i, s);
  3907. }
  3908. var o = i.seriesTaskMap || (i.seriesTaskMap = N()),
  3909. s = e.seriesType,
  3910. l = e.getTargetSeries;
  3911. e.createOnAllSeries ? n.eachRawSeries(a) : s ? n.eachRawSeriesByType(s, a) : l && l(n, r).each(a);
  3912. var u = t._pipelineMap;
  3913. o.each(function (t, e) {
  3914. u.get(e) || (t.dispose(), o.removeKey(e));
  3915. });
  3916. }
  3917. function sl(t, e, i, n, r) {
  3918. function a(e) {
  3919. var i = e.uid,
  3920. n = s.get(i);
  3921. n || (n = s.set(i, Fs({
  3922. reset: ul,
  3923. onDirty: cl
  3924. })), o.dirty()), n.context = {
  3925. model: e,
  3926. overallProgress: h,
  3927. modifyOutputEnd: c
  3928. }, n.agent = o, n.__block = h, ml(t, e, n);
  3929. }
  3930. var o = i.overallTask = i.overallTask || Fs({
  3931. reset: ll
  3932. });
  3933. o.context = {
  3934. ecModel: n,
  3935. api: r,
  3936. overallReset: e.overallReset,
  3937. scheduler: t
  3938. };
  3939. var s = o.agentStubMap = o.agentStubMap || N(),
  3940. l = e.seriesType,
  3941. u = e.getTargetSeries,
  3942. h = !0,
  3943. c = e.modifyOutputEnd;
  3944. l ? n.eachRawSeriesByType(l, a) : u ? u(n, r).each(a) : (h = !1, f(n.getSeries(), a));
  3945. var d = t._pipelineMap;
  3946. s.each(function (t, e) {
  3947. d.get(e) || (t.dispose(), o.dirty(), s.removeKey(e));
  3948. });
  3949. }
  3950. function ll(t) {
  3951. t.overallReset(t.ecModel, t.api, t.payload);
  3952. }
  3953. function ul(t) {
  3954. return t.overallProgress && hl;
  3955. }
  3956. function hl() {
  3957. this.agent.dirty(), this.getDownstream().dirty();
  3958. }
  3959. function cl() {
  3960. this.agent && this.agent.dirty();
  3961. }
  3962. function dl(t) {
  3963. return t.plan && t.plan(t.model, t.ecModel, t.api, t.payload);
  3964. }
  3965. function fl(t) {
  3966. t.useClearVisual && t.data.clearAllVisual();
  3967. var e = t.resetDefines = Gn(t.reset(t.model, t.ecModel, t.api, t.payload));
  3968. return e.length > 1 ? p(e, function (t, e) {
  3969. return pl(e);
  3970. }) : cw;
  3971. }
  3972. function pl(t) {
  3973. return function (e, i) {
  3974. var n = i.data,
  3975. r = i.resetDefines[t];
  3976. if (r && r.dataEach) for (var a = e.start; a < e.end; a++) r.dataEach(n, a);else r && r.progress && r.progress(e, n);
  3977. };
  3978. }
  3979. function gl(t) {
  3980. return t.data.count();
  3981. }
  3982. function ml(t, e, i) {
  3983. var n = e.uid,
  3984. r = t._pipelineMap.get(n);
  3985. !r.head && (r.head = i), r.tail && r.tail.pipe(i), r.tail = i, i.__idxInPipeline = r.count++, i.__pipeline = r;
  3986. }
  3987. function vl(t) {
  3988. dw = null;
  3989. try {
  3990. t(fw, pw);
  3991. } catch (e) {}
  3992. return dw;
  3993. }
  3994. function yl(t, e) {
  3995. for (var i in e.prototype) t[i] = G;
  3996. }
  3997. function _l(t) {
  3998. if (b(t)) {
  3999. var e = new DOMParser();
  4000. t = e.parseFromString(t, "text/xml");
  4001. }
  4002. for (9 === t.nodeType && (t = t.firstChild); "svg" !== t.nodeName.toLowerCase() || 1 !== t.nodeType;) t = t.nextSibling;
  4003. return t;
  4004. }
  4005. function xl() {
  4006. this._defs = {}, this._root = null, this._isDefine = !1, this._isText = !1;
  4007. }
  4008. function wl(t, e) {
  4009. for (var i = t.firstChild; i;) {
  4010. if (1 === i.nodeType) {
  4011. var n = i.getAttribute("offset");
  4012. n = n.indexOf("%") > 0 ? parseInt(n, 10) / 100 : n ? parseFloat(n) : 0;
  4013. var r = i.getAttribute("stop-color") || "#000000";
  4014. e.addColorStop(n, r);
  4015. }
  4016. i = i.nextSibling;
  4017. }
  4018. }
  4019. function bl(t, e) {
  4020. t && t.__inheritedStyle && (e.__inheritedStyle || (e.__inheritedStyle = {}), s(e.__inheritedStyle, t.__inheritedStyle));
  4021. }
  4022. function Sl(t) {
  4023. for (var e = z(t).split(bw), i = [], n = 0; n < e.length; n += 2) {
  4024. var r = parseFloat(e[n]),
  4025. a = parseFloat(e[n + 1]);
  4026. i.push([r, a]);
  4027. }
  4028. return i;
  4029. }
  4030. function Ml(t, e, i, n) {
  4031. var r = e.__inheritedStyle || {},
  4032. a = "text" === e.type;
  4033. if (1 === t.nodeType && (Tl(t, e), o(r, Cl(t)), !n)) for (var s in Iw) if (Iw.hasOwnProperty(s)) {
  4034. var l = t.getAttribute(s);
  4035. null != l && (r[Iw[s]] = l);
  4036. }
  4037. var u = a ? "textFill" : "fill",
  4038. h = a ? "textStroke" : "stroke";
  4039. e.style = e.style || new Ym();
  4040. var c = e.style;
  4041. null != r.fill && c.set(u, Il(r.fill, i)), null != r.stroke && c.set(h, Il(r.stroke, i)), f(["lineWidth", "opacity", "fillOpacity", "strokeOpacity", "miterLimit", "fontSize"], function (t) {
  4042. var e = "lineWidth" === t && a ? "textStrokeWidth" : t;
  4043. null != r[t] && c.set(e, parseFloat(r[t]));
  4044. }), r.textBaseline && "auto" !== r.textBaseline || (r.textBaseline = "alphabetic"), "alphabetic" === r.textBaseline && (r.textBaseline = "bottom"), "start" === r.textAlign && (r.textAlign = "left"), "end" === r.textAlign && (r.textAlign = "right"), f(["lineDashOffset", "lineCap", "lineJoin", "fontWeight", "fontFamily", "fontStyle", "textAlign", "textBaseline"], function (t) {
  4045. null != r[t] && c.set(t, r[t]);
  4046. }), r.lineDash && (e.style.lineDash = z(r.lineDash).split(bw)), c[h] && "none" !== c[h] && (e[h] = !0), e.__inheritedStyle = r;
  4047. }
  4048. function Il(t, e) {
  4049. var i = e && t && t.match(Tw);
  4050. if (i) {
  4051. var n = z(i[1]),
  4052. r = e[n];
  4053. return r;
  4054. }
  4055. return t;
  4056. }
  4057. function Tl(t, e) {
  4058. var i = t.getAttribute("transform");
  4059. if (i) {
  4060. i = i.replace(/,/g, " ");
  4061. var n = null,
  4062. r = [];
  4063. i.replace(Cw, function (t, e, i) {
  4064. r.push(e, i);
  4065. });
  4066. for (var a = r.length - 1; a > 0; a -= 2) {
  4067. var o = r[a],
  4068. s = r[a - 1];
  4069. switch (n = n || De(), s) {
  4070. case "translate":
  4071. o = z(o).split(bw), Le(n, n, [parseFloat(o[0]), parseFloat(o[1] || 0)]);
  4072. break;
  4073. case "scale":
  4074. o = z(o).split(bw), ze(n, n, [parseFloat(o[0]), parseFloat(o[1] || o[0])]);
  4075. break;
  4076. case "rotate":
  4077. o = z(o).split(bw), Oe(n, n, parseFloat(o[0]));
  4078. break;
  4079. case "skew":
  4080. o = z(o).split(bw), console.warn("Skew transform is not supported yet");
  4081. break;
  4082. case "matrix":
  4083. var o = z(o).split(bw);
  4084. n[0] = parseFloat(o[0]), n[1] = parseFloat(o[1]), n[2] = parseFloat(o[2]), n[3] = parseFloat(o[3]), n[4] = parseFloat(o[4]), n[5] = parseFloat(o[5]);
  4085. }
  4086. }
  4087. e.setLocalTransform(n);
  4088. }
  4089. }
  4090. function Cl(t) {
  4091. var e = t.getAttribute("style"),
  4092. i = {};
  4093. if (!e) return i;
  4094. var n = {};
  4095. Dw.lastIndex = 0;
  4096. for (var r; null != (r = Dw.exec(e));) n[r[1]] = r[2];
  4097. for (var a in Iw) Iw.hasOwnProperty(a) && null != n[a] && (i[Iw[a]] = n[a]);
  4098. return i;
  4099. }
  4100. function Dl(t, e, i) {
  4101. var n = e / t.width,
  4102. r = i / t.height,
  4103. a = Math.min(n, r),
  4104. o = [a, a],
  4105. s = [-(t.x + t.width / 2) * a + e / 2, -(t.y + t.height / 2) * a + i / 2];
  4106. return {
  4107. scale: o,
  4108. position: s
  4109. };
  4110. }
  4111. function Al(t, e) {
  4112. var i = new xl();
  4113. return i.parse(t, e);
  4114. }
  4115. function kl(t, e) {
  4116. return function (i, n, r) {
  4117. (e || !this._disposed) && (i = i && i.toLowerCase(), Yg.prototype[t].call(this, i, n, r));
  4118. };
  4119. }
  4120. function Pl() {
  4121. Yg.call(this);
  4122. }
  4123. function Ll(t, e, i) {
  4124. function r(t, e) {
  4125. return t.__prio - e.__prio;
  4126. }
  4127. i = i || {}, "string" == typeof e && (e = hb[e]), this.id, this.group, this._dom = t;
  4128. var a = "canvas",
  4129. o = this._zr = En(t, {
  4130. renderer: i.renderer || a,
  4131. devicePixelRatio: i.devicePixelRatio,
  4132. width: i.width,
  4133. height: i.height
  4134. });
  4135. this._throttledZrFlush = il(y(o.flush, o), 17);
  4136. var e = n(e);
  4137. e && Rx(e, !0), this._theme = e, this._chartsViews = [], this._chartsMap = {}, this._componentsViews = [], this._componentsMap = {}, this._coordSysMgr = new cs();
  4138. var s = this._api = Kl(this);
  4139. Ai(ub, r), Ai(ob, r), this._scheduler = new rl(this, s, ob, ub), Yg.call(this, this._ecEventProcessor = new $l()), this._messageCenter = new Pl(), this._initEvents(), this.resize = y(this.resize, this), this._pendingActions = [], o.animation.on("frame", this._onframe, this), Gl(o, this), E(this);
  4140. }
  4141. function Ol(t, e, i) {
  4142. if (!this._disposed) {
  4143. var n,
  4144. r = this._model,
  4145. a = this._coordSysMgr.getCoordinateSystems();
  4146. e = Kn(r, e);
  4147. for (var o = 0; o < a.length; o++) {
  4148. var s = a[o];
  4149. if (s[t] && null != (n = s[t](r, e, i))) return n;
  4150. }
  4151. }
  4152. }
  4153. function zl(t) {
  4154. var e = t._model,
  4155. i = t._scheduler;
  4156. i.restorePipelines(e), i.prepareStageTasks(), Vl(t, "component", e, i), Vl(t, "chart", e, i), i.plan();
  4157. }
  4158. function El(t, e, i, n, r) {
  4159. function a(n) {
  4160. n && n.__alive && n[e] && n[e](n.__model, o, t._api, i);
  4161. }
  4162. var o = t._model;
  4163. if (!n) return void Ow(t._componentsViews.concat(t._chartsViews), a);
  4164. var s = {};
  4165. s[n + "Id"] = i[n + "Id"], s[n + "Index"] = i[n + "Index"], s[n + "Name"] = i[n + "Name"];
  4166. var l = {
  4167. mainType: n,
  4168. query: s
  4169. };
  4170. r && (l.subType = r);
  4171. var u = i.excludeSeriesId;
  4172. null != u && (u = N(Gn(u))), o && o.eachComponent(l, function (e) {
  4173. u && null != u.get(e.id) || a(t["series" === n ? "_chartsMap" : "_componentsMap"][e.__viewId]);
  4174. }, t);
  4175. }
  4176. function Rl(t, e) {
  4177. var i = t._chartsMap,
  4178. n = t._scheduler;
  4179. e.eachSeries(function (t) {
  4180. n.updateStreamModes(t, i[t.__viewId]);
  4181. });
  4182. }
  4183. function Bl(t, e) {
  4184. var i = t.type,
  4185. n = t.escapeConnect,
  4186. r = rb[i],
  4187. a = r.actionInfo,
  4188. l = (a.update || "update").split(":"),
  4189. u = l.pop();
  4190. l = null != l[0] && Rw(l[0]), this[Qw] = !0;
  4191. var h = [t],
  4192. c = !1;
  4193. t.batch && (c = !0, h = p(t.batch, function (e) {
  4194. return e = s(o({}, e), t), e.batch = null, e;
  4195. }));
  4196. var d,
  4197. f = [],
  4198. g = "highlight" === i || "downplay" === i;
  4199. Ow(h, function (t) {
  4200. d = r.action(t, this._model, this._api), d = d || o({}, t), d.type = a.event || d.type, f.push(d), g ? El(this, u, t, "series") : l && El(this, u, t, l.main, l.sub);
  4201. }, this), "none" === u || g || l || (this[Jw] ? (zl(this), ib.update.call(this, t), this[Jw] = !1) : ib[u].call(this, t)), d = c ? {
  4202. type: a.event || i,
  4203. escapeConnect: n,
  4204. batch: f
  4205. } : f[0], this[Qw] = !1, !e && this._messageCenter.trigger(d.type, d);
  4206. }
  4207. function Nl(t) {
  4208. for (var e = this._pendingActions; e.length;) {
  4209. var i = e.shift();
  4210. Bl.call(this, i, t);
  4211. }
  4212. }
  4213. function Fl(t) {
  4214. !t && this.trigger("updated");
  4215. }
  4216. function Gl(t, e) {
  4217. t.on("rendered", function () {
  4218. e.trigger("rendered"), !t.animation.isFinished() || e[Jw] || e._scheduler.unfinished || e._pendingActions.length || e.trigger("finished");
  4219. });
  4220. }
  4221. function Vl(t, e, i, n) {
  4222. function r(t) {
  4223. var e = "_ec_" + t.id + "_" + t.type,
  4224. r = s[e];
  4225. if (!r) {
  4226. var h = Rw(t.type),
  4227. c = a ? qx.getClass(h.main, h.sub) : $s.getClass(h.sub);
  4228. r = new c(), r.init(i, u), s[e] = r, o.push(r), l.add(r.group);
  4229. }
  4230. t.__viewId = r.__id = e, r.__alive = !0, r.__model = t, r.group.__ecComponentInfo = {
  4231. mainType: t.mainType,
  4232. index: t.componentIndex
  4233. }, !a && n.prepareView(r, t, i, u);
  4234. }
  4235. for (var a = "component" === e, o = a ? t._componentsViews : t._chartsViews, s = a ? t._componentsMap : t._chartsMap, l = t._zr, u = t._api, h = 0; h < o.length; h++) o[h].__alive = !1;
  4236. a ? i.eachComponent(function (t, e) {
  4237. "series" !== t && r(e);
  4238. }) : i.eachSeries(r);
  4239. for (var h = 0; h < o.length;) {
  4240. var c = o[h];
  4241. c.__alive ? h++ : (!a && c.renderTask.dispose(), l.remove(c.group), c.dispose(i, u), o.splice(h, 1), delete s[c.__id], c.__id = c.group.__ecComponentInfo = null);
  4242. }
  4243. }
  4244. function Hl(t) {
  4245. t.clearColorPalette(), t.eachSeries(function (t) {
  4246. t.clearColorPalette();
  4247. });
  4248. }
  4249. function Wl(t, e, i, n) {
  4250. Ul(t, e, i, n), Ow(t._chartsViews, function (t) {
  4251. t.__alive = !1;
  4252. }), Xl(t, e, i, n), Ow(t._chartsViews, function (t) {
  4253. t.__alive || t.remove(e, i);
  4254. });
  4255. }
  4256. function Ul(t, e, i, n, r) {
  4257. Ow(r || t._componentsViews, function (t) {
  4258. var r = t.__model;
  4259. t.render(r, e, i, n), Zl(r, t);
  4260. });
  4261. }
  4262. function Xl(t, e, i, n, r) {
  4263. var a,
  4264. o = t._scheduler;
  4265. e.eachSeries(function (e) {
  4266. var i = t._chartsMap[e.__viewId];
  4267. i.__alive = !0;
  4268. var s = i.renderTask;
  4269. o.updatePayload(s, n), r && r.get(e.uid) && s.dirty(), a |= s.perform(o.getPerformArgs(s)), i.group.silent = !!e.get("silent"), Zl(e, i), ql(e, i);
  4270. }), o.unfinished |= a, jl(t, e), ow(t._zr.dom, e);
  4271. }
  4272. function Yl(t, e) {
  4273. Ow(lb, function (i) {
  4274. i(t, e);
  4275. });
  4276. }
  4277. function jl(t, e) {
  4278. var i = t._zr,
  4279. n = i.storage,
  4280. r = 0;
  4281. n.traverse(function () {
  4282. r++;
  4283. }), r > e.get("hoverLayerThreshold") && !Mg.node && e.eachSeries(function (e) {
  4284. if (!e.preventUsingHoverLayer) {
  4285. var i = t._chartsMap[e.__viewId];
  4286. i.__alive && i.group.traverse(function (t) {
  4287. t.useHoverLayer = !0;
  4288. });
  4289. }
  4290. });
  4291. }
  4292. function ql(t, e) {
  4293. var i = t.get("blendMode") || null;
  4294. e.group.traverse(function (t) {
  4295. t.isGroup || t.style.blend !== i && t.setStyle("blend", i), t.eachPendingDisplayable && t.eachPendingDisplayable(function (t) {
  4296. t.setStyle("blend", i);
  4297. });
  4298. });
  4299. }
  4300. function Zl(t, e) {
  4301. var i = t.get("z"),
  4302. n = t.get("zlevel");
  4303. e.group.traverse(function (t) {
  4304. "group" !== t.type && (null != i && (t.z = i), null != n && (t.zlevel = n));
  4305. });
  4306. }
  4307. function Kl(t) {
  4308. var e = t._coordSysMgr;
  4309. return o(new hs(t), {
  4310. getCoordinateSystems: y(e.getCoordinateSystems, e),
  4311. getComponentByElement: function (e) {
  4312. for (; e;) {
  4313. var i = e.__ecComponentInfo;
  4314. if (null != i) return t._model.getComponent(i.mainType, i.index);
  4315. e = e.parent;
  4316. }
  4317. }
  4318. });
  4319. }
  4320. function $l() {
  4321. this.eventInfo;
  4322. }
  4323. function Ql(t) {
  4324. function e(t, e) {
  4325. for (var i = 0; i < t.length; i++) {
  4326. var n = t[i];
  4327. n[a] = e;
  4328. }
  4329. }
  4330. var i = 0,
  4331. n = 1,
  4332. r = 2,
  4333. a = "__connectUpdateStatus";
  4334. Ow(ab, function (o, s) {
  4335. t._messageCenter.on(s, function (o) {
  4336. if (fb[t.group] && t[a] !== i) {
  4337. if (o && o.escapeConnect) return;
  4338. var s = t.makeActionFromEvent(o),
  4339. l = [];
  4340. Ow(db, function (e) {
  4341. e !== t && e.group === t.group && l.push(e);
  4342. }), e(l, i), Ow(l, function (t) {
  4343. t[a] !== n && t.dispatchAction(s);
  4344. }), e(l, r);
  4345. }
  4346. });
  4347. });
  4348. }
  4349. function Jl(t, e, i) {
  4350. var n = nu(t);
  4351. if (n) return n;
  4352. var r = new Ll(t, e, i);
  4353. return r.id = "ec_" + pb++, db[r.id] = r, Qn(t, mb, r.id), Ql(r), r;
  4354. }
  4355. function tu(t) {
  4356. if (x(t)) {
  4357. var e = t;
  4358. t = null, Ow(e, function (e) {
  4359. null != e.group && (t = e.group);
  4360. }), t = t || "g_" + gb++, Ow(e, function (e) {
  4361. e.group = t;
  4362. });
  4363. }
  4364. return fb[t] = !0, t;
  4365. }
  4366. function eu(t) {
  4367. fb[t] = !1;
  4368. }
  4369. function iu(t) {
  4370. "string" == typeof t ? t = db[t] : t instanceof Ll || (t = nu(t)), t instanceof Ll && !t.isDisposed() && t.dispose();
  4371. }
  4372. function nu(t) {
  4373. return db[Jn(t, mb)];
  4374. }
  4375. function ru(t) {
  4376. return db[t];
  4377. }
  4378. function au(t, e) {
  4379. hb[t] = e;
  4380. }
  4381. function ou(t) {
  4382. sb.push(t);
  4383. }
  4384. function su(t, e) {
  4385. pu(ob, t, e, Gw);
  4386. }
  4387. function lu(t) {
  4388. lb.push(t);
  4389. }
  4390. function uu(t, e, i) {
  4391. "function" == typeof e && (i = e, e = "");
  4392. var n = Ew(t) ? t.type : [t, t = {
  4393. event: e
  4394. }][0];
  4395. t.event = (t.event || n).toLowerCase(), e = t.event, Lw(tb.test(n) && tb.test(e)), rb[n] || (rb[n] = {
  4396. action: i,
  4397. actionInfo: t
  4398. }), ab[e] = n;
  4399. }
  4400. function hu(t, e) {
  4401. cs.register(t, e);
  4402. }
  4403. function cu(t) {
  4404. var e = cs.get(t);
  4405. return e ? e.getDimensionsInfo ? e.getDimensionsInfo() : e.dimensions.slice() : void 0;
  4406. }
  4407. function du(t, e) {
  4408. pu(ub, t, e, Uw, "layout");
  4409. }
  4410. function fu(t, e) {
  4411. pu(ub, t, e, jw, "visual");
  4412. }
  4413. function pu(t, e, i, n, r) {
  4414. (zw(e) || Ew(e)) && (i = e, e = n);
  4415. var a = rl.wrapStageHandler(i, r);
  4416. return a.__prio = e, a.__raw = i, t.push(a), a;
  4417. }
  4418. function gu(t, e) {
  4419. cb[t] = e;
  4420. }
  4421. function mu(t) {
  4422. return ax.extend(t);
  4423. }
  4424. function vu(t) {
  4425. return qx.extend(t);
  4426. }
  4427. function yu(t) {
  4428. return jx.extend(t);
  4429. }
  4430. function _u(t) {
  4431. return $s.extend(t);
  4432. }
  4433. function xu(t) {
  4434. i("createCanvas", t);
  4435. }
  4436. function wu(t, e, i) {
  4437. kw.registerMap(t, e, i);
  4438. }
  4439. function bu(t) {
  4440. var e = kw.retrieveMap(t);
  4441. return e && e[0] && {
  4442. geoJson: e[0].geoJSON,
  4443. specialAreas: e[0].specialAreas
  4444. };
  4445. }
  4446. function Su(t) {
  4447. return t;
  4448. }
  4449. function Mu(t, e, i, n, r) {
  4450. this._old = t, this._new = e, this._oldKeyGetter = i || Su, this._newKeyGetter = n || Su, this.context = r;
  4451. }
  4452. function Iu(t, e, i, n, r) {
  4453. for (var a = 0; a < t.length; a++) {
  4454. var o = "_ec_" + r[n](t[a], a),
  4455. s = e[o];
  4456. null == s ? (i.push(o), e[o] = a) : (s.length || (e[o] = s = [s]), s.push(a));
  4457. }
  4458. }
  4459. function Tu(t) {
  4460. var e = {},
  4461. i = e.encode = {},
  4462. n = N(),
  4463. r = [],
  4464. a = [],
  4465. o = e.userOutput = {
  4466. dimensionNames: t.dimensions.slice(),
  4467. encode: {}
  4468. };
  4469. f(t.dimensions, function (e) {
  4470. var s = t.getDimensionInfo(e),
  4471. l = s.coordDim;
  4472. if (l) {
  4473. var u = s.coordDimIndex;
  4474. Cu(i, l)[u] = e, s.isExtraCoord || (n.set(l, 1), Au(s.type) && (r[0] = e), Cu(o.encode, l)[u] = s.index), s.defaultTooltip && a.push(e);
  4475. }
  4476. _b.each(function (t, e) {
  4477. var n = Cu(i, e),
  4478. r = s.otherDims[e];
  4479. null != r && r !== !1 && (n[r] = s.name);
  4480. });
  4481. });
  4482. var s = [],
  4483. l = {};
  4484. n.each(function (t, e) {
  4485. var n = i[e];
  4486. l[e] = n[0], s = s.concat(n);
  4487. }), e.dataDimsOnCoord = s, e.encodeFirstDimNotExtra = l;
  4488. var u = i.label;
  4489. u && u.length && (r = u.slice());
  4490. var h = i.tooltip;
  4491. return h && h.length ? a = h.slice() : a.length || (a = r.slice()), i.defaultedLabel = r, i.defaultedTooltip = a, e;
  4492. }
  4493. function Cu(t, e) {
  4494. return t.hasOwnProperty(e) || (t[e] = []), t[e];
  4495. }
  4496. function Du(t) {
  4497. return "category" === t ? "ordinal" : "time" === t ? "time" : "float";
  4498. }
  4499. function Au(t) {
  4500. return !("ordinal" === t || "time" === t);
  4501. }
  4502. function ku(t) {
  4503. return t._rawCount > 65535 ? Ib : Cb;
  4504. }
  4505. function Pu(t) {
  4506. var e = t.constructor;
  4507. return e === Array ? t.slice() : new e(t);
  4508. }
  4509. function Lu(t, e) {
  4510. f(Db.concat(e.__wrappedMethods || []), function (i) {
  4511. e.hasOwnProperty(i) && (t[i] = e[i]);
  4512. }), t.__wrappedMethods = e.__wrappedMethods, f(Ab, function (i) {
  4513. t[i] = n(e[i]);
  4514. }), t._calculationInfo = o(e._calculationInfo);
  4515. }
  4516. function Ou(t, e, i, n, r) {
  4517. var a = Mb[e.type],
  4518. o = n - 1,
  4519. s = e.name,
  4520. l = t[s][o];
  4521. if (l && l.length < i) {
  4522. for (var u = new a(Math.min(r - o * i, i)), h = 0; h < l.length; h++) u[h] = l[h];
  4523. t[s][o] = u;
  4524. }
  4525. for (var c = n * i; r > c; c += i) t[s].push(new a(Math.min(r - c, i)));
  4526. }
  4527. function zu(t) {
  4528. var e = t._invertedIndicesMap;
  4529. f(e, function (i, n) {
  4530. var r = t._dimensionInfos[n],
  4531. a = r.ordinalMeta;
  4532. if (a) {
  4533. i = e[n] = new Tb(a.categories.length);
  4534. for (var o = 0; o < i.length; o++) i[o] = bb;
  4535. for (var o = 0; o < t._count; o++) i[t.get(n, o)] = o;
  4536. }
  4537. });
  4538. }
  4539. function Eu(t, e, i) {
  4540. var n;
  4541. if (null != e) {
  4542. var r = t._chunkSize,
  4543. a = Math.floor(i / r),
  4544. o = i % r,
  4545. s = t.dimensions[e],
  4546. l = t._storage[s][a];
  4547. if (l) {
  4548. n = l[o];
  4549. var u = t._dimensionInfos[s].ordinalMeta;
  4550. u && u.categories.length && (n = u.categories[n]);
  4551. }
  4552. }
  4553. return n;
  4554. }
  4555. function Ru(t) {
  4556. return t;
  4557. }
  4558. function Bu(t) {
  4559. return t < this._count && t >= 0 ? this._indices[t] : -1;
  4560. }
  4561. function Nu(t, e) {
  4562. var i = t._idList[e];
  4563. return null == i && (i = Eu(t, t._idDimIdx, e)), null == i && (i = Sb + e), i;
  4564. }
  4565. function Fu(t) {
  4566. return x(t) || (t = [t]), t;
  4567. }
  4568. function Gu(t, e) {
  4569. var i = t.dimensions,
  4570. n = new kb(p(i, t.getDimensionInfo, t), t.hostModel);
  4571. Lu(n, t);
  4572. for (var r = n._storage = {}, a = t._storage, o = 0; o < i.length; o++) {
  4573. var s = i[o];
  4574. a[s] && (u(e, s) >= 0 ? (r[s] = Vu(a[s]), n._rawExtent[s] = Hu(), n._extent[s] = null) : r[s] = a[s]);
  4575. }
  4576. return n;
  4577. }
  4578. function Vu(t) {
  4579. for (var e = new Array(t.length), i = 0; i < t.length; i++) e[i] = Pu(t[i]);
  4580. return e;
  4581. }
  4582. function Hu() {
  4583. return [1 / 0, -1 / 0];
  4584. }
  4585. function Wu(t, e, i) {
  4586. function r(t, e, i) {
  4587. null != _b.get(e) ? t.otherDims[e] = i : (t.coordDim = e, t.coordDimIndex = i, h.set(e, !0));
  4588. }
  4589. Uo.isInstance(e) || (e = Uo.seriesDataToSource(e)), i = i || {}, t = (t || []).slice();
  4590. for (var a = (i.dimsDef || []).slice(), l = N(i.encodeDef), u = N(), h = N(), c = [], d = Uu(e, t, a, i.dimCount), p = 0; d > p; p++) {
  4591. var g = a[p] = o({}, S(a[p]) ? a[p] : {
  4592. name: a[p]
  4593. }),
  4594. m = g.name,
  4595. v = c[p] = {
  4596. otherDims: {}
  4597. };
  4598. null != m && null == u.get(m) && (v.name = v.displayName = m, u.set(m, p)), null != g.type && (v.type = g.type), null != g.displayName && (v.displayName = g.displayName);
  4599. }
  4600. l.each(function (t, e) {
  4601. if (t = Gn(t).slice(), 1 === t.length && !b(t[0]) && t[0] < 0) return void l.set(e, !1);
  4602. var i = l.set(e, []);
  4603. f(t, function (t, n) {
  4604. b(t) && (t = u.get(t)), null != t && d > t && (i[n] = t, r(c[t], e, n));
  4605. });
  4606. });
  4607. var y = 0;
  4608. f(t, function (t) {
  4609. var e, t, i, a;
  4610. if (b(t)) e = t, t = {};else {
  4611. e = t.name;
  4612. var o = t.ordinalMeta;
  4613. t.ordinalMeta = null, t = n(t), t.ordinalMeta = o, i = t.dimsDef, a = t.otherDims, t.name = t.coordDim = t.coordDimIndex = t.dimsDef = t.otherDims = null;
  4614. }
  4615. var u = l.get(e);
  4616. if (u !== !1) {
  4617. var u = Gn(u);
  4618. if (!u.length) for (var h = 0; h < (i && i.length || 1); h++) {
  4619. for (; y < c.length && null != c[y].coordDim;) y++;
  4620. y < c.length && u.push(y++);
  4621. }
  4622. f(u, function (n, o) {
  4623. var l = c[n];
  4624. if (r(s(l, t), e, o), null == l.name && i) {
  4625. var u = i[o];
  4626. !S(u) && (u = {
  4627. name: u
  4628. }), l.name = l.displayName = u.name, l.defaultTooltip = u.defaultTooltip;
  4629. }
  4630. a && s(l.otherDims, a);
  4631. });
  4632. }
  4633. });
  4634. var _ = i.generateCoord,
  4635. x = i.generateCoordCount,
  4636. w = null != x;
  4637. x = _ ? x || 1 : 0;
  4638. for (var M = _ || "value", I = 0; d > I; I++) {
  4639. var v = c[I] = c[I] || {},
  4640. T = v.coordDim;
  4641. null == T && (v.coordDim = Xu(M, h, w), v.coordDimIndex = 0, (!_ || 0 >= x) && (v.isExtraCoord = !0), x--), null == v.name && (v.name = Xu(v.coordDim, u)), null == v.type && es(e, I, v.name) && (v.type = "ordinal");
  4642. }
  4643. return c;
  4644. }
  4645. function Uu(t, e, i, n) {
  4646. var r = Math.max(t.dimensionsDetectCount || 1, e.length, i.length, n || 0);
  4647. return f(e, function (t) {
  4648. var e = t.dimsDef;
  4649. e && (r = Math.max(r, e.length));
  4650. }), r;
  4651. }
  4652. function Xu(t, e, i) {
  4653. if (i || null != e.get(t)) {
  4654. for (var n = 0; null != e.get(t + n);) n++;
  4655. t += n;
  4656. }
  4657. return e.set(t, !0), t;
  4658. }
  4659. function Yu(t, e, i) {
  4660. i = i || {};
  4661. var n,
  4662. r,
  4663. a,
  4664. o,
  4665. s = i.byIndex,
  4666. l = i.stackedCoordDimension,
  4667. u = !(!t || !t.get("stack"));
  4668. if (f(e, function (t, i) {
  4669. b(t) && (e[i] = t = {
  4670. name: t
  4671. }), u && !t.isExtraCoord && (s || n || !t.ordinalMeta || (n = t), r || "ordinal" === t.type || "time" === t.type || l && l !== t.coordDim || (r = t));
  4672. }), !r || s || n || (s = !0), r) {
  4673. a = "__\x00ecstackresult", o = "__\x00ecstackedover", n && (n.createInvertedIndices = !0);
  4674. var h = r.coordDim,
  4675. c = r.type,
  4676. d = 0;
  4677. f(e, function (t) {
  4678. t.coordDim === h && d++;
  4679. }), e.push({
  4680. name: a,
  4681. coordDim: h,
  4682. coordDimIndex: d,
  4683. type: c,
  4684. isExtraCoord: !0,
  4685. isCalculationCoord: !0
  4686. }), d++, e.push({
  4687. name: o,
  4688. coordDim: o,
  4689. coordDimIndex: d,
  4690. type: c,
  4691. isExtraCoord: !0,
  4692. isCalculationCoord: !0
  4693. });
  4694. }
  4695. return {
  4696. stackedDimension: r && r.name,
  4697. stackedByDimension: n && n.name,
  4698. isStackedByIndex: s,
  4699. stackedOverDimension: o,
  4700. stackResultDimension: a
  4701. };
  4702. }
  4703. function ju(t, e) {
  4704. return !!e && e === t.getCalculationInfo("stackedDimension");
  4705. }
  4706. function qu(t, e) {
  4707. return ju(t, e) ? t.getCalculationInfo("stackResultDimension") : e;
  4708. }
  4709. function Zu(t, e, i) {
  4710. i = i || {}, Uo.isInstance(t) || (t = Uo.seriesDataToSource(t));
  4711. var n,
  4712. r = e.get("coordinateSystem"),
  4713. a = cs.get(r),
  4714. o = Ho(e);
  4715. o && (n = p(o.coordSysDims, function (t) {
  4716. var e = {
  4717. name: t
  4718. },
  4719. i = o.axisMap.get(t);
  4720. if (i) {
  4721. var n = i.get("type");
  4722. e.type = Du(n);
  4723. }
  4724. return e;
  4725. })), n || (n = a && (a.getDimensionsInfo ? a.getDimensionsInfo() : a.dimensions.slice()) || ["x", "y"]);
  4726. var s,
  4727. l,
  4728. u = Ob(t, {
  4729. coordDimensions: n,
  4730. generateCoord: i.generateCoord
  4731. });
  4732. o && f(u, function (t, e) {
  4733. var i = t.coordDim,
  4734. n = o.categoryAxisMap.get(i);
  4735. n && (null == s && (s = e), t.ordinalMeta = n.getOrdinalMeta()), null != t.otherDims.itemName && (l = !0);
  4736. }), l || null == s || (u[s].otherDims.itemName = 0);
  4737. var h = Yu(e, u),
  4738. c = new kb(u, e);
  4739. c.setCalculationInfo(h);
  4740. var d = null != s && Ku(t) ? function (t, e, i, n) {
  4741. return n === s ? i : this.defaultDimValueGetter(t, e, i, n);
  4742. } : null;
  4743. return c.hasItemOption = !1, c.initData(t, null, d), c;
  4744. }
  4745. function Ku(t) {
  4746. if (t.sourceFormat === cx) {
  4747. var e = $u(t.data || []);
  4748. return null != e && !x(Hn(e));
  4749. }
  4750. }
  4751. function $u(t) {
  4752. for (var e = 0; e < t.length && null == t[e];) e++;
  4753. return t[e];
  4754. }
  4755. function Qu(t) {
  4756. this._setting = t || {}, this._extent = [1 / 0, -1 / 0], this._interval = 0, this.init && this.init.apply(this, arguments);
  4757. }
  4758. function Ju(t) {
  4759. this.categories = t.categories || [], this._needCollect = t.needCollect, this._deduplication = t.deduplication, this._map;
  4760. }
  4761. function th(t) {
  4762. return t._map || (t._map = N(t.categories));
  4763. }
  4764. function eh(t) {
  4765. return S(t) && null != t.value ? t.value : t + "";
  4766. }
  4767. function ih(t, e, i, n) {
  4768. var r = {},
  4769. a = t[1] - t[0],
  4770. o = r.interval = xo(a / e, !0);
  4771. null != i && i > o && (o = r.interval = i), null != n && o > n && (o = r.interval = n);
  4772. var s = r.intervalPrecision = nh(o),
  4773. l = r.niceTickExtent = [Bb(Math.ceil(t[0] / o) * o, s), Bb(Math.floor(t[1] / o) * o, s)];
  4774. return ah(l, t), r;
  4775. }
  4776. function nh(t) {
  4777. return co(t) + 2;
  4778. }
  4779. function rh(t, e, i) {
  4780. t[e] = Math.max(Math.min(t[e], i[1]), i[0]);
  4781. }
  4782. function ah(t, e) {
  4783. !isFinite(t[0]) && (t[0] = e[0]), !isFinite(t[1]) && (t[1] = e[1]), rh(t, 0, e), rh(t, 1, e), t[0] > t[1] && (t[0] = t[1]);
  4784. }
  4785. function oh(t, e, i, n) {
  4786. var r = [];
  4787. if (!t) return r;
  4788. var a = 1e4;
  4789. e[0] < i[0] && r.push(e[0]);
  4790. for (var o = i[0]; o <= i[1] && (r.push(o), o = Bb(o + t, n), o !== r[r.length - 1]);) if (r.length > a) return [];
  4791. return e[1] > (r.length ? r[r.length - 1] : i[1]) && r.push(e[1]), r;
  4792. }
  4793. function sh(t) {
  4794. return t.get("stack") || Gb + t.seriesIndex;
  4795. }
  4796. function lh(t) {
  4797. return t.dim + t.index;
  4798. }
  4799. function uh(t, e) {
  4800. var i = [];
  4801. return e.eachSeriesByType(t, function (t) {
  4802. gh(t) && !mh(t) && i.push(t);
  4803. }), i;
  4804. }
  4805. function hh(t) {
  4806. var e = {};
  4807. f(t, function (t) {
  4808. var i = t.coordinateSystem,
  4809. n = i.getBaseAxis();
  4810. if ("time" === n.type || "value" === n.type) for (var r = t.getData(), a = n.dim + "_" + n.index, o = r.mapDimension(n.dim), s = 0, l = r.count(); l > s; ++s) {
  4811. var u = r.get(o, s);
  4812. e[a] ? e[a].push(u) : e[a] = [u];
  4813. }
  4814. });
  4815. var i = [];
  4816. for (var n in e) if (e.hasOwnProperty(n)) {
  4817. var r = e[n];
  4818. if (r) {
  4819. r.sort(function (t, e) {
  4820. return t - e;
  4821. });
  4822. for (var a = null, o = 1; o < r.length; ++o) {
  4823. var s = r[o] - r[o - 1];
  4824. s > 0 && (a = null === a ? s : Math.min(a, s));
  4825. }
  4826. i[n] = a;
  4827. }
  4828. }
  4829. return i;
  4830. }
  4831. function ch(t) {
  4832. var e = hh(t),
  4833. i = [];
  4834. return f(t, function (t) {
  4835. var n,
  4836. r = t.coordinateSystem,
  4837. a = r.getBaseAxis(),
  4838. o = a.getExtent();
  4839. if ("category" === a.type) n = a.getBandWidth();else if ("value" === a.type || "time" === a.type) {
  4840. var s = a.dim + "_" + a.index,
  4841. l = e[s],
  4842. u = Math.abs(o[1] - o[0]),
  4843. h = a.scale.getExtent(),
  4844. c = Math.abs(h[1] - h[0]);
  4845. n = l ? u / c * l : u;
  4846. } else {
  4847. var d = t.getData();
  4848. n = Math.abs(o[1] - o[0]) / d.count();
  4849. }
  4850. var f = so(t.get("barWidth"), n),
  4851. p = so(t.get("barMaxWidth"), n),
  4852. g = so(t.get("barMinWidth") || 1, n),
  4853. m = t.get("barGap"),
  4854. v = t.get("barCategoryGap");
  4855. i.push({
  4856. bandWidth: n,
  4857. barWidth: f,
  4858. barMaxWidth: p,
  4859. barMinWidth: g,
  4860. barGap: m,
  4861. barCategoryGap: v,
  4862. axisKey: lh(a),
  4863. stackId: sh(t)
  4864. });
  4865. }), dh(i);
  4866. }
  4867. function dh(t) {
  4868. var e = {};
  4869. f(t, function (t) {
  4870. var i = t.axisKey,
  4871. n = t.bandWidth,
  4872. r = e[i] || {
  4873. bandWidth: n,
  4874. remainedWidth: n,
  4875. autoWidthCount: 0,
  4876. categoryGap: "20%",
  4877. gap: "30%",
  4878. stacks: {}
  4879. },
  4880. a = r.stacks;
  4881. e[i] = r;
  4882. var o = t.stackId;
  4883. a[o] || r.autoWidthCount++, a[o] = a[o] || {
  4884. width: 0,
  4885. maxWidth: 0
  4886. };
  4887. var s = t.barWidth;
  4888. s && !a[o].width && (a[o].width = s, s = Math.min(r.remainedWidth, s), r.remainedWidth -= s);
  4889. var l = t.barMaxWidth;
  4890. l && (a[o].maxWidth = l);
  4891. var u = t.barMinWidth;
  4892. u && (a[o].minWidth = u);
  4893. var h = t.barGap;
  4894. null != h && (r.gap = h);
  4895. var c = t.barCategoryGap;
  4896. null != c && (r.categoryGap = c);
  4897. });
  4898. var i = {};
  4899. return f(e, function (t, e) {
  4900. i[e] = {};
  4901. var n = t.stacks,
  4902. r = t.bandWidth,
  4903. a = so(t.categoryGap, r),
  4904. o = so(t.gap, 1),
  4905. s = t.remainedWidth,
  4906. l = t.autoWidthCount,
  4907. u = (s - a) / (l + (l - 1) * o);
  4908. u = Math.max(u, 0), f(n, function (t) {
  4909. var e = t.maxWidth,
  4910. i = t.minWidth;
  4911. if (t.width) {
  4912. var n = t.width;
  4913. e && (n = Math.min(n, e)), i && (n = Math.max(n, i)), t.width = n, s -= n, l--;
  4914. } else {
  4915. var n = u;
  4916. e && n > e && (n = Math.min(e, s)), i && i > n && (n = i), n !== u && (t.width = n, s -= n, l--);
  4917. }
  4918. }), u = (s - a) / (l + (l - 1) * o), u = Math.max(u, 0);
  4919. var h,
  4920. c = 0;
  4921. f(n, function (t) {
  4922. t.width || (t.width = u), h = t, c += t.width * (1 + o);
  4923. }), h && (c -= h.width * o);
  4924. var d = -c / 2;
  4925. f(n, function (t, n) {
  4926. i[e][n] = i[e][n] || {
  4927. bandWidth: r,
  4928. offset: d,
  4929. width: t.width
  4930. }, d += t.width * (1 + o);
  4931. });
  4932. }), i;
  4933. }
  4934. function fh(t, e, i) {
  4935. if (t && e) {
  4936. var n = t[lh(e)];
  4937. return null != n && null != i && (n = n[sh(i)]), n;
  4938. }
  4939. }
  4940. function ph(t, e) {
  4941. var i = uh(t, e),
  4942. n = ch(i),
  4943. r = {};
  4944. f(i, function (t) {
  4945. var e = t.getData(),
  4946. i = t.coordinateSystem,
  4947. a = i.getBaseAxis(),
  4948. o = sh(t),
  4949. s = n[lh(a)][o],
  4950. l = s.offset,
  4951. u = s.width,
  4952. h = i.getOtherAxis(a),
  4953. c = t.get("barMinHeight") || 0;
  4954. r[o] = r[o] || [], e.setLayout({
  4955. bandWidth: s.bandWidth,
  4956. offset: l,
  4957. size: u
  4958. });
  4959. for (var d = e.mapDimension(h.dim), f = e.mapDimension(a.dim), p = ju(e, d), g = h.isHorizontal(), m = vh(a, h, p), v = 0, y = e.count(); y > v; v++) {
  4960. var _ = e.get(d, v),
  4961. x = e.get(f, v);
  4962. if (!isNaN(_) && !isNaN(x)) {
  4963. var w = _ >= 0 ? "p" : "n",
  4964. b = m;
  4965. p && (r[o][x] || (r[o][x] = {
  4966. p: m,
  4967. n: m
  4968. }), b = r[o][x][w]);
  4969. var S, M, I, T;
  4970. if (g) {
  4971. var C = i.dataToPoint([_, x]);
  4972. S = b, M = C[1] + l, I = C[0] - m, T = u, Math.abs(I) < c && (I = (0 > I ? -1 : 1) * c), p && (r[o][x][w] += I);
  4973. } else {
  4974. var C = i.dataToPoint([x, _]);
  4975. S = C[0] + l, M = b, I = u, T = C[1] - m, Math.abs(T) < c && (T = (0 >= T ? -1 : 1) * c), p && (r[o][x][w] += T);
  4976. }
  4977. e.setItemLayout(v, {
  4978. x: S,
  4979. y: M,
  4980. width: I,
  4981. height: T
  4982. });
  4983. }
  4984. }
  4985. }, this);
  4986. }
  4987. function gh(t) {
  4988. return t.coordinateSystem && "cartesian2d" === t.coordinateSystem.type;
  4989. }
  4990. function mh(t) {
  4991. return t.pipelineContext && t.pipelineContext.large;
  4992. }
  4993. function vh(t, e) {
  4994. return e.toGlobalCoord(e.dataToCoord("log" === e.type ? 1 : 0));
  4995. }
  4996. function yh(t, e) {
  4997. return nS(t, iS(e));
  4998. }
  4999. function _h(t, e) {
  5000. var i,
  5001. n,
  5002. r,
  5003. a = t.type,
  5004. o = e.getMin(),
  5005. s = e.getMax(),
  5006. l = null != o,
  5007. u = null != s,
  5008. h = t.getExtent();
  5009. "ordinal" === a ? i = e.getCategories().length : (n = e.get("boundaryGap"), x(n) || (n = [n || 0, n || 0]), "boolean" == typeof n[0] && (n = [0, 0]), n[0] = so(n[0], 1), n[1] = so(n[1], 1), r = h[1] - h[0] || Math.abs(h[0])), null == o && (o = "ordinal" === a ? i ? 0 : 0 / 0 : h[0] - n[0] * r), null == s && (s = "ordinal" === a ? i ? i - 1 : 0 / 0 : h[1] + n[1] * r), "dataMin" === o ? o = h[0] : "function" == typeof o && (o = o({
  5010. min: h[0],
  5011. max: h[1]
  5012. })), "dataMax" === s ? s = h[1] : "function" == typeof s && (s = s({
  5013. min: h[0],
  5014. max: h[1]
  5015. })), (null == o || !isFinite(o)) && (o = 0 / 0), (null == s || !isFinite(s)) && (s = 0 / 0), t.setBlank(C(o) || C(s) || "ordinal" === a && !t.getOrdinalMeta().categories.length), e.getNeedCrossZero() && (o > 0 && s > 0 && !l && (o = 0), 0 > o && 0 > s && !u && (s = 0));
  5016. var c = e.ecModel;
  5017. if (c && "time" === a) {
  5018. var d,
  5019. p = uh("bar", c);
  5020. if (f(p, function (t) {
  5021. d |= t.getBaseAxis() === e.axis;
  5022. }), d) {
  5023. var g = ch(p),
  5024. m = xh(o, s, e, g);
  5025. o = m.min, s = m.max;
  5026. }
  5027. }
  5028. return [o, s];
  5029. }
  5030. function xh(t, e, i, n) {
  5031. var r = i.axis.getExtent(),
  5032. a = r[1] - r[0],
  5033. o = fh(n, i.axis);
  5034. if (void 0 === o) return {
  5035. min: t,
  5036. max: e
  5037. };
  5038. var s = 1 / 0;
  5039. f(o, function (t) {
  5040. s = Math.min(t.offset, s);
  5041. });
  5042. var l = -1 / 0;
  5043. f(o, function (t) {
  5044. l = Math.max(t.offset + t.width, l);
  5045. }), s = Math.abs(s), l = Math.abs(l);
  5046. var u = s + l,
  5047. h = e - t,
  5048. c = 1 - (s + l) / a,
  5049. d = h / c - h;
  5050. return e += d * (l / u), t -= d * (s / u), {
  5051. min: t,
  5052. max: e
  5053. };
  5054. }
  5055. function wh(t, e) {
  5056. var i = _h(t, e),
  5057. n = null != e.getMin(),
  5058. r = null != e.getMax(),
  5059. a = e.get("splitNumber");
  5060. "log" === t.type && (t.base = e.get("logBase"));
  5061. var o = t.type;
  5062. t.setExtent(i[0], i[1]), t.niceExtent({
  5063. splitNumber: a,
  5064. fixMin: n,
  5065. fixMax: r,
  5066. minInterval: "interval" === o || "time" === o ? e.get("minInterval") : null,
  5067. maxInterval: "interval" === o || "time" === o ? e.get("maxInterval") : null
  5068. });
  5069. var s = e.get("interval");
  5070. null != s && t.setInterval && t.setInterval(s);
  5071. }
  5072. function bh(t, e) {
  5073. if (e = e || t.get("type")) switch (e) {
  5074. case "category":
  5075. return new Rb(t.getOrdinalMeta ? t.getOrdinalMeta() : t.getCategories(), [1 / 0, -1 / 0]);
  5076. case "value":
  5077. return new Fb();
  5078. default:
  5079. return (Qu.getClass(e) || Fb).create(t);
  5080. }
  5081. }
  5082. function Sh(t) {
  5083. var e = t.scale.getExtent(),
  5084. i = e[0],
  5085. n = e[1];
  5086. return !(i > 0 && n > 0 || 0 > i && 0 > n);
  5087. }
  5088. function Mh(t) {
  5089. var e = t.getLabelModel().get("formatter"),
  5090. i = "category" === t.type ? t.scale.getExtent()[0] : null;
  5091. return "string" == typeof e ? e = function (e) {
  5092. return function (i) {
  5093. return i = t.scale.getLabel(i), e.replace("{value}", null != i ? i : "");
  5094. };
  5095. }(e) : "function" == typeof e ? function (n, r) {
  5096. return null != i && (r = n - i), e(Ih(t, n), r);
  5097. } : function (e) {
  5098. return t.scale.getLabel(e);
  5099. };
  5100. }
  5101. function Ih(t, e) {
  5102. return "category" === t.type ? t.scale.getLabel(e) : e;
  5103. }
  5104. function Th(t) {
  5105. var e = t.model,
  5106. i = t.scale;
  5107. if (e.get("axisLabel.show") && !i.isBlank()) {
  5108. var n,
  5109. r,
  5110. a = "category" === t.type,
  5111. o = i.getExtent();
  5112. a ? r = i.count() : (n = i.getTicks(), r = n.length);
  5113. var s,
  5114. l = t.getLabelModel(),
  5115. u = Mh(t),
  5116. h = 1;
  5117. r > 40 && (h = Math.ceil(r / 40));
  5118. for (var c = 0; r > c; c += h) {
  5119. var d = n ? n[c] : o[0] + c,
  5120. f = u(d),
  5121. p = l.getTextRect(f),
  5122. g = Ch(p, l.get("rotate") || 0);
  5123. s ? s.union(g) : s = g;
  5124. }
  5125. return s;
  5126. }
  5127. }
  5128. function Ch(t, e) {
  5129. var i = e * Math.PI / 180,
  5130. n = t.plain(),
  5131. r = n.width,
  5132. a = n.height,
  5133. o = r * Math.cos(i) + a * Math.sin(i),
  5134. s = r * Math.sin(i) + a * Math.cos(i),
  5135. l = new wi(n.x, n.y, o, s);
  5136. return l;
  5137. }
  5138. function Dh(t) {
  5139. var e = t.get("interval");
  5140. return null == e ? "auto" : e;
  5141. }
  5142. function Ah(t) {
  5143. return "category" === t.type && 0 === Dh(t.getLabelModel());
  5144. }
  5145. function kh(t, e) {
  5146. if ("image" !== this.type) {
  5147. var i = this.style,
  5148. n = this.shape;
  5149. n && "line" === n.symbolType ? i.stroke = t : this.__isEmptyBrush ? (i.stroke = t, i.fill = e || "#fff") : (i.fill && (i.fill = t), i.stroke && (i.stroke = t)), this.dirty(!1);
  5150. }
  5151. }
  5152. function Ph(t, e, i, n, r, a, o) {
  5153. var s = 0 === t.indexOf("empty");
  5154. s && (t = t.substr(5, 1).toLowerCase() + t.substr(6));
  5155. var l;
  5156. return l = 0 === t.indexOf("image://") ? oa(t.slice(8), new wi(e, i, n, r), o ? "center" : "cover") : 0 === t.indexOf("path://") ? aa(t.slice(7), {}, new wi(e, i, n, r), o ? "center" : "cover") : new vS({
  5157. shape: {
  5158. symbolType: t,
  5159. x: e,
  5160. y: i,
  5161. width: n,
  5162. height: r
  5163. }
  5164. }), l.__isEmptyBrush = s, l.setColor = kh, l.setColor(a), l;
  5165. }
  5166. function Lh(t) {
  5167. return Zu(t.getSource(), t);
  5168. }
  5169. function Oh(t, e) {
  5170. var i = e;
  5171. Ja.isInstance(e) || (i = new Ja(e), c(i, uS));
  5172. var n = bh(i);
  5173. return n.setExtent(t[0], t[1]), wh(n, i), n;
  5174. }
  5175. function zh(t) {
  5176. c(t, uS);
  5177. }
  5178. function Eh(t, e) {
  5179. return Math.abs(t - e) < xS;
  5180. }
  5181. function Rh(t, e, i) {
  5182. var n = 0,
  5183. r = t[0];
  5184. if (!r) return !1;
  5185. for (var a = 1; a < t.length; a++) {
  5186. var o = t[a];
  5187. n += Lr(r[0], r[1], o[0], o[1], e, i), r = o;
  5188. }
  5189. var s = t[0];
  5190. return Eh(r[0], s[0]) && Eh(r[1], s[1]) || (n += Lr(r[0], r[1], s[0], s[1], e, i)), 0 !== n;
  5191. }
  5192. function Bh(t, e, i) {
  5193. if (this.name = t, this.geometries = e, i) i = [i[0], i[1]];else {
  5194. var n = this.getBoundingRect();
  5195. i = [n.x + n.width / 2, n.y + n.height / 2];
  5196. }
  5197. this.center = i;
  5198. }
  5199. function Nh(t) {
  5200. if (!t.UTF8Encoding) return t;
  5201. var e = t.UTF8Scale;
  5202. null == e && (e = 1024);
  5203. for (var i = t.features, n = 0; n < i.length; n++) for (var r = i[n], a = r.geometry, o = a.coordinates, s = a.encodeOffsets, l = 0; l < o.length; l++) {
  5204. var u = o[l];
  5205. if ("Polygon" === a.type) o[l] = Fh(u, s[l], e);else if ("MultiPolygon" === a.type) for (var h = 0; h < u.length; h++) {
  5206. var c = u[h];
  5207. u[h] = Fh(c, s[l][h], e);
  5208. }
  5209. }
  5210. return t.UTF8Encoding = !1, t;
  5211. }
  5212. function Fh(t, e, i) {
  5213. for (var n = [], r = e[0], a = e[1], o = 0; o < t.length; o += 2) {
  5214. var s = t.charCodeAt(o) - 64,
  5215. l = t.charCodeAt(o + 1) - 64;
  5216. s = s >> 1 ^ -(1 & s), l = l >> 1 ^ -(1 & l), s += r, l += a, r = s, a = l, n.push([s / i, l / i]);
  5217. }
  5218. return n;
  5219. }
  5220. function Gh(t) {
  5221. return "category" === t.type ? Hh(t) : Xh(t);
  5222. }
  5223. function Vh(t, e) {
  5224. return "category" === t.type ? Uh(t, e) : {
  5225. ticks: t.scale.getTicks()
  5226. };
  5227. }
  5228. function Hh(t) {
  5229. var e = t.getLabelModel(),
  5230. i = Wh(t, e);
  5231. return !e.get("show") || t.scale.isBlank() ? {
  5232. labels: [],
  5233. labelCategoryInterval: i.labelCategoryInterval
  5234. } : i;
  5235. }
  5236. function Wh(t, e) {
  5237. var i = Yh(t, "labels"),
  5238. n = Dh(e),
  5239. r = jh(i, n);
  5240. if (r) return r;
  5241. var a, o;
  5242. return w(n) ? a = Jh(t, n) : (o = "auto" === n ? Zh(t) : n, a = Qh(t, o)), qh(i, n, {
  5243. labels: a,
  5244. labelCategoryInterval: o
  5245. });
  5246. }
  5247. function Uh(t, e) {
  5248. var i = Yh(t, "ticks"),
  5249. n = Dh(e),
  5250. r = jh(i, n);
  5251. if (r) return r;
  5252. var a, o;
  5253. if ((!e.get("show") || t.scale.isBlank()) && (a = []), w(n)) a = Jh(t, n, !0);else if ("auto" === n) {
  5254. var s = Wh(t, t.getLabelModel());
  5255. o = s.labelCategoryInterval, a = p(s.labels, function (t) {
  5256. return t.tickValue;
  5257. });
  5258. } else o = n, a = Qh(t, o, !0);
  5259. return qh(i, n, {
  5260. ticks: a,
  5261. tickCategoryInterval: o
  5262. });
  5263. }
  5264. function Xh(t) {
  5265. var e = t.scale.getTicks(),
  5266. i = Mh(t);
  5267. return {
  5268. labels: p(e, function (e, n) {
  5269. return {
  5270. formattedLabel: i(e, n),
  5271. rawLabel: t.scale.getLabel(e),
  5272. tickValue: e
  5273. };
  5274. })
  5275. };
  5276. }
  5277. function Yh(t, e) {
  5278. return bS(t)[e] || (bS(t)[e] = []);
  5279. }
  5280. function jh(t, e) {
  5281. for (var i = 0; i < t.length; i++) if (t[i].key === e) return t[i].value;
  5282. }
  5283. function qh(t, e, i) {
  5284. return t.push({
  5285. key: e,
  5286. value: i
  5287. }), i;
  5288. }
  5289. function Zh(t) {
  5290. var e = bS(t).autoInterval;
  5291. return null != e ? e : bS(t).autoInterval = t.calculateCategoryInterval();
  5292. }
  5293. function Kh(t) {
  5294. var e = $h(t),
  5295. i = Mh(t),
  5296. n = (e.axisRotate - e.labelRotate) / 180 * Math.PI,
  5297. r = t.scale,
  5298. a = r.getExtent(),
  5299. o = r.count();
  5300. if (a[1] - a[0] < 1) return 0;
  5301. var s = 1;
  5302. o > 40 && (s = Math.max(1, Math.floor(o / 40)));
  5303. 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.sin(n)), d = 0, f = 0; l <= a[1]; l += s) {
  5304. var p = 0,
  5305. g = 0,
  5306. m = Gi(i(l), e.font, "center", "top");
  5307. p = 1.3 * m.width, g = 1.3 * m.height, d = Math.max(d, p, 7), f = Math.max(f, g, 7);
  5308. }
  5309. var v = d / h,
  5310. y = f / c;
  5311. isNaN(v) && (v = 1 / 0), isNaN(y) && (y = 1 / 0);
  5312. var _ = Math.max(0, Math.floor(Math.min(v, y))),
  5313. x = bS(t.model),
  5314. w = t.getExtent(),
  5315. b = x.lastAutoInterval,
  5316. S = x.lastTickCount;
  5317. return null != b && null != S && Math.abs(b - _) <= 1 && Math.abs(S - o) <= 1 && b > _ && x.axisExtend0 === w[0] && x.axisExtend1 === w[1] ? _ = b : (x.lastTickCount = o, x.lastAutoInterval = _, x.axisExtend0 = w[0], x.axisExtend1 = w[1]), _;
  5318. }
  5319. function $h(t) {
  5320. var e = t.getLabelModel();
  5321. return {
  5322. axisRotate: t.getRotate ? t.getRotate() : t.isHorizontal && !t.isHorizontal() ? 90 : 0,
  5323. labelRotate: e.get("rotate") || 0,
  5324. font: e.getFont()
  5325. };
  5326. }
  5327. function Qh(t, e, i) {
  5328. function n(t) {
  5329. l.push(i ? t : {
  5330. formattedLabel: r(t),
  5331. rawLabel: a.getLabel(t),
  5332. tickValue: t
  5333. });
  5334. }
  5335. var r = Mh(t),
  5336. a = t.scale,
  5337. o = a.getExtent(),
  5338. s = t.getLabelModel(),
  5339. l = [],
  5340. u = Math.max((e || 0) + 1, 1),
  5341. h = o[0],
  5342. c = a.count();
  5343. 0 !== h && u > 1 && c / u > 2 && (h = Math.round(Math.ceil(h / u) * u));
  5344. var d = Ah(t),
  5345. f = s.get("showMinLabel") || d,
  5346. p = s.get("showMaxLabel") || d;
  5347. f && h !== o[0] && n(o[0]);
  5348. for (var g = h; g <= o[1]; g += u) n(g);
  5349. return p && g - u !== o[1] && n(o[1]), l;
  5350. }
  5351. function Jh(t, e, i) {
  5352. var n = t.scale,
  5353. r = Mh(t),
  5354. a = [];
  5355. return f(n.getTicks(), function (t) {
  5356. var o = n.getLabel(t);
  5357. e(t, o) && a.push(i ? t : {
  5358. formattedLabel: r(t),
  5359. rawLabel: o,
  5360. tickValue: t
  5361. });
  5362. }), a;
  5363. }
  5364. function tc(t, e) {
  5365. var i = t[1] - t[0],
  5366. n = e,
  5367. r = i / n / 2;
  5368. t[0] += r, t[1] -= r;
  5369. }
  5370. function ec(t, e, i, n) {
  5371. function r(t, e) {
  5372. return t = lo(t), e = lo(e), d ? t > e : e > t;
  5373. }
  5374. var a = e.length;
  5375. if (t.onBand && !i && a) {
  5376. var o,
  5377. s,
  5378. l = t.getExtent();
  5379. if (1 === a) e[0].coord = l[0], o = e[1] = {
  5380. coord: l[0]
  5381. };else {
  5382. var u = e[a - 1].tickValue - e[0].tickValue,
  5383. h = (e[a - 1].coord - e[0].coord) / u;
  5384. f(e, function (t) {
  5385. t.coord -= h / 2;
  5386. });
  5387. var c = t.scale.getExtent();
  5388. s = 1 + c[1] - e[a - 1].tickValue, o = {
  5389. coord: e[a - 1].coord + h * s
  5390. }, e.push(o);
  5391. }
  5392. var d = l[0] > l[1];
  5393. r(e[0].coord, l[0]) && (n ? e[0].coord = l[0] : e.shift()), n && r(l[0], e[0].coord) && e.unshift({
  5394. coord: l[0]
  5395. }), r(l[1], o.coord) && (n ? o.coord = l[1] : e.pop()), n && r(o.coord, l[1]) && e.push({
  5396. coord: l[1]
  5397. });
  5398. }
  5399. }
  5400. function ic(t) {
  5401. return this._axes[t];
  5402. }
  5403. function nc(t) {
  5404. DS.call(this, t);
  5405. }
  5406. function rc(t, e) {
  5407. return e.type || (e.data ? "category" : "value");
  5408. }
  5409. function ac(t, e) {
  5410. return t.getCoordSysModel() === e;
  5411. }
  5412. function oc(t, e, i) {
  5413. this._coordsMap = {}, this._coordsList = [], this._axesMap = {}, this._axesList = [], this._initCartesian(t, e, i), this.model = t;
  5414. }
  5415. function sc(t, e, i, n) {
  5416. function r(t) {
  5417. return t.dim + "_" + t.index;
  5418. }
  5419. i.getAxesOnZeroOf = function () {
  5420. return a ? [a] : [];
  5421. };
  5422. var a,
  5423. o = t[e],
  5424. s = i.model,
  5425. l = s.get("axisLine.onZero"),
  5426. u = s.get("axisLine.onZeroAxisIndex");
  5427. if (l) {
  5428. if (null != u) lc(o[u]) && (a = o[u]);else for (var h in o) if (o.hasOwnProperty(h) && lc(o[h]) && !n[r(o[h])]) {
  5429. a = o[h];
  5430. break;
  5431. }
  5432. a && (n[r(a)] = !0);
  5433. }
  5434. }
  5435. function lc(t) {
  5436. return t && "category" !== t.type && "time" !== t.type && Sh(t);
  5437. }
  5438. function uc(t, e) {
  5439. var i = t.getExtent(),
  5440. n = i[0] + i[1];
  5441. t.toGlobalCoord = "x" === t.dim ? function (t) {
  5442. return t + e;
  5443. } : function (t) {
  5444. return n - t + e;
  5445. }, t.toLocalCoord = "x" === t.dim ? function (t) {
  5446. return t - e;
  5447. } : function (t) {
  5448. return n - t + e;
  5449. };
  5450. }
  5451. function hc(t) {
  5452. return p(BS, function (e) {
  5453. var i = t.getReferringComponents(e)[0];
  5454. return i;
  5455. });
  5456. }
  5457. function cc(t) {
  5458. return "cartesian2d" === t.get("coordinateSystem");
  5459. }
  5460. function dc(t, e) {
  5461. var i = t.mapDimension("defaultedLabel", !0),
  5462. n = i.length;
  5463. if (1 === n) return Bs(t, e, i[0]);
  5464. if (n) {
  5465. for (var r = [], a = 0; a < i.length; a++) {
  5466. var o = Bs(t, e, i[a]);
  5467. r.push(o);
  5468. }
  5469. return r.join(" ");
  5470. }
  5471. }
  5472. function fc(t, e, i, n, r, a) {
  5473. var o = i.getModel("label"),
  5474. s = i.getModel("emphasis.label");
  5475. Da(t, e, o, s, {
  5476. labelFetcher: r,
  5477. labelDataIndex: a,
  5478. defaultText: dc(r.getData(), a),
  5479. isRectText: !0,
  5480. autoColor: n
  5481. }), pc(t), pc(e);
  5482. }
  5483. function pc(t, e) {
  5484. "outside" === t.textPosition && (t.textPosition = e);
  5485. }
  5486. function gc(t, e, i) {
  5487. var n = t.getArea(),
  5488. r = t.getBaseAxis().isHorizontal(),
  5489. a = n.x,
  5490. o = n.y,
  5491. s = n.width,
  5492. l = n.height,
  5493. u = i.get("lineStyle.width") || 2;
  5494. a -= u / 2, o -= u / 2, s += u, l += u;
  5495. var h = new u_({
  5496. shape: {
  5497. x: a,
  5498. y: o,
  5499. width: s,
  5500. height: l
  5501. }
  5502. });
  5503. return e && (h.shape[r ? "width" : "height"] = 0, Va(h, {
  5504. shape: {
  5505. width: s,
  5506. height: l
  5507. }
  5508. }, i)), h;
  5509. }
  5510. function mc(t, e, i) {
  5511. var n = t.getArea(),
  5512. r = new e_({
  5513. shape: {
  5514. cx: lo(t.cx, 1),
  5515. cy: lo(t.cy, 1),
  5516. r0: lo(n.r0, 1),
  5517. r: lo(n.r, 1),
  5518. startAngle: n.startAngle,
  5519. endAngle: n.endAngle,
  5520. clockwise: n.clockwise
  5521. }
  5522. });
  5523. return e && (r.shape.endAngle = n.startAngle, Va(r, {
  5524. shape: {
  5525. endAngle: n.endAngle
  5526. }
  5527. }, i)), r;
  5528. }
  5529. function vc(t, e, i) {
  5530. return t ? "polar" === t.type ? mc(t, e, i) : "cartesian2d" === t.type ? gc(t, e, i) : null : null;
  5531. }
  5532. function yc(t, e) {
  5533. var i = t.getArea && t.getArea();
  5534. if ("cartesian2d" === t.type) {
  5535. var n = t.getBaseAxis();
  5536. if ("category" !== n.type || !n.onBand) {
  5537. var r = e.getLayout("bandWidth");
  5538. n.isHorizontal() ? (i.x -= r, i.width += 2 * r) : (i.y -= r, i.height += 2 * r);
  5539. }
  5540. }
  5541. return i;
  5542. }
  5543. function _c(t, e, i) {
  5544. i.style.text = null, Ga(i, {
  5545. shape: {
  5546. width: 0
  5547. }
  5548. }, e, t, function () {
  5549. i.parent && i.parent.remove(i);
  5550. });
  5551. }
  5552. function xc(t, e, i) {
  5553. i.style.text = null, Ga(i, {
  5554. shape: {
  5555. r: i.shape.r0
  5556. }
  5557. }, e, t, function () {
  5558. i.parent && i.parent.remove(i);
  5559. });
  5560. }
  5561. function wc(t, e, i, n, r, a, o, l) {
  5562. var u = e.getItemVisual(i, "color"),
  5563. h = e.getItemVisual(i, "opacity"),
  5564. c = n.getModel("itemStyle"),
  5565. d = n.getModel("emphasis.itemStyle").getBarItemStyle();
  5566. l || t.setShape("r", c.get("barBorderRadius") || 0), t.useStyle(s({
  5567. fill: u,
  5568. opacity: h
  5569. }, c.getBarItemStyle()));
  5570. var f = n.getShallow("cursor");
  5571. f && t.attr("cursor", f);
  5572. var p = o ? r.height > 0 ? "bottom" : "top" : r.width > 0 ? "left" : "right";
  5573. l || fc(t.style, d, n, u, a, i, p), Ma(t, d);
  5574. }
  5575. function bc(t, e) {
  5576. var i = t.get(HS) || 0;
  5577. return Math.min(i, Math.abs(e.width), Math.abs(e.height));
  5578. }
  5579. function Sc(t, e, i) {
  5580. var n = t.getData(),
  5581. r = [],
  5582. a = n.getLayout("valueAxisHorizontal") ? 1 : 0;
  5583. r[1 - a] = n.getLayout("valueAxisStart");
  5584. var o = new ZS({
  5585. shape: {
  5586. points: n.getLayout("largePoints")
  5587. },
  5588. incremental: !!i,
  5589. __startPoint: r,
  5590. __baseDimIdx: a,
  5591. __largeDataIndices: n.getLayout("largeDataIndices"),
  5592. __barWidth: n.getLayout("barWidth")
  5593. });
  5594. e.add(o), Ic(o, t, n), o.seriesIndex = t.seriesIndex, t.get("silent") || (o.on("mousedown", KS), o.on("mousemove", KS));
  5595. }
  5596. function Mc(t, e, i) {
  5597. var n = t.__baseDimIdx,
  5598. r = 1 - n,
  5599. a = t.shape.points,
  5600. o = t.__largeDataIndices,
  5601. s = Math.abs(t.__barWidth / 2),
  5602. l = t.__startPoint[r];
  5603. WS[0] = e, WS[1] = i;
  5604. for (var u = WS[n], h = WS[1 - n], c = u - s, d = u + s, f = 0, p = a.length / 2; p > f; f++) {
  5605. var g = 2 * f,
  5606. m = a[g + n],
  5607. v = a[g + r];
  5608. if (m >= c && d >= m && (v >= l ? h >= l && v >= h : h >= v && l >= h)) return o[f];
  5609. }
  5610. return -1;
  5611. }
  5612. function Ic(t, e, i) {
  5613. var n = i.getVisual("borderColor") || i.getVisual("color"),
  5614. r = e.getModel("itemStyle").getItemStyle(["color", "borderColor"]);
  5615. t.useStyle(r), t.style.fill = null, t.style.stroke = n, t.style.lineWidth = i.getLayout("barWidth");
  5616. }
  5617. function Tc(t, e, i, n) {
  5618. var r,
  5619. a,
  5620. o = go(i - t.rotation),
  5621. s = n[0] > n[1],
  5622. l = "start" === e && !s || "start" !== e && s;
  5623. return mo(o - $S / 2) ? (a = l ? "bottom" : "top", r = "center") : mo(o - 1.5 * $S) ? (a = l ? "top" : "bottom", r = "center") : (a = "middle", r = 1.5 * $S > o && o > $S / 2 ? l ? "left" : "right" : l ? "right" : "left"), {
  5624. rotation: o,
  5625. textAlign: r,
  5626. textVerticalAlign: a
  5627. };
  5628. }
  5629. function Cc(t, e, i) {
  5630. if (!Ah(t.axis)) {
  5631. var n = t.get("axisLabel.showMinLabel"),
  5632. r = t.get("axisLabel.showMaxLabel");
  5633. e = e || [], i = i || [];
  5634. var a = e[0],
  5635. o = e[1],
  5636. s = e[e.length - 1],
  5637. l = e[e.length - 2],
  5638. u = i[0],
  5639. h = i[1],
  5640. c = i[i.length - 1],
  5641. d = i[i.length - 2];
  5642. n === !1 ? (Dc(a), Dc(u)) : Ac(a, o) && (n ? (Dc(o), Dc(h)) : (Dc(a), Dc(u))), r === !1 ? (Dc(s), Dc(c)) : Ac(l, s) && (r ? (Dc(l), Dc(d)) : (Dc(s), Dc(c)));
  5643. }
  5644. }
  5645. function Dc(t) {
  5646. t && (t.ignore = !0);
  5647. }
  5648. function Ac(t, e) {
  5649. var i = t && t.getBoundingRect().clone(),
  5650. n = e && e.getBoundingRect().clone();
  5651. if (i && n) {
  5652. var r = Ae([]);
  5653. return Oe(r, r, -t.rotation), i.applyTransform(Pe([], r, t.getLocalTransform())), n.applyTransform(Pe([], r, e.getLocalTransform())), i.intersect(n);
  5654. }
  5655. }
  5656. function kc(t) {
  5657. return "middle" === t || "center" === t;
  5658. }
  5659. function Pc(t, e, i) {
  5660. var n = e.axis;
  5661. if (e.get("axisTick.show") && !n.scale.isBlank()) {
  5662. for (var r = e.getModel("axisTick"), a = r.getModel("lineStyle"), o = r.get("length"), l = n.getTicksCoords(), u = [], h = [], c = t._transform, d = [], f = 0; f < l.length; f++) {
  5663. var p = l[f].coord;
  5664. u[0] = p, u[1] = 0, h[0] = p, h[1] = i.tickDirection * o, c && (ae(u, u, c), ae(h, h, c));
  5665. var g = new c_({
  5666. anid: "tick_" + l[f].tickValue,
  5667. subPixelOptimize: !0,
  5668. shape: {
  5669. x1: u[0],
  5670. y1: u[1],
  5671. x2: h[0],
  5672. y2: h[1]
  5673. },
  5674. style: s(a.getLineStyle(), {
  5675. stroke: e.get("axisLine.lineStyle.color")
  5676. }),
  5677. z2: 2,
  5678. silent: !0
  5679. });
  5680. t.group.add(g), d.push(g);
  5681. }
  5682. return d;
  5683. }
  5684. }
  5685. function Lc(t, e, i) {
  5686. var n = e.axis,
  5687. r = D(i.axisLabelShow, e.get("axisLabel.show"));
  5688. if (r && !n.scale.isBlank()) {
  5689. var a = e.getModel("axisLabel"),
  5690. o = a.get("margin"),
  5691. s = n.getViewLabels(),
  5692. l = (D(i.labelRotate, a.get("rotate")) || 0) * $S / 180,
  5693. u = eM(i.rotation, l, i.labelDirection),
  5694. h = e.getCategories && e.getCategories(!0),
  5695. c = [],
  5696. d = iM(e),
  5697. p = e.get("triggerEvent");
  5698. return f(s, function (r, s) {
  5699. var l = r.tickValue,
  5700. f = r.formattedLabel,
  5701. g = r.rawLabel,
  5702. m = a;
  5703. h && h[l] && h[l].textStyle && (m = new Ja(h[l].textStyle, a, e.ecModel));
  5704. var v = m.getTextColor() || e.get("axisLine.lineStyle.color"),
  5705. y = n.dataToCoord(l),
  5706. _ = [y, i.labelOffset + i.labelDirection * o],
  5707. x = new $y({
  5708. anid: "label_" + l,
  5709. position: _,
  5710. rotation: u.rotation,
  5711. silent: d,
  5712. z2: 10
  5713. });
  5714. ka(x.style, m, {
  5715. text: f,
  5716. textAlign: m.getShallow("align", !0) || u.textAlign,
  5717. textVerticalAlign: m.getShallow("verticalAlign", !0) || m.getShallow("baseline", !0) || u.textVerticalAlign,
  5718. textFill: "function" == typeof v ? v("category" === n.type ? g : "value" === n.type ? l + "" : l, s) : v
  5719. }), p && (x.eventData = tM(e), x.eventData.targetType = "axisLabel", x.eventData.value = g), t._dumbGroup.add(x), x.updateTransform(), c.push(x), t.group.add(x), x.decomposeTransform();
  5720. }), c;
  5721. }
  5722. }
  5723. function Oc(t, e) {
  5724. var i = {
  5725. axesInfo: {},
  5726. seriesInvolved: !1,
  5727. coordSysAxesInfo: {},
  5728. coordSysMap: {}
  5729. };
  5730. return zc(i, t, e), i.seriesInvolved && Rc(i, t), i;
  5731. }
  5732. function zc(t, e, i) {
  5733. var n = e.getComponent("tooltip"),
  5734. r = e.getComponent("axisPointer"),
  5735. a = r.get("link", !0) || [],
  5736. o = [];
  5737. nM(i.getCoordinateSystems(), function (i) {
  5738. function s(n, s, l) {
  5739. var h = l.model.getModel("axisPointer", r),
  5740. d = h.get("show");
  5741. if (d && ("auto" !== d || n || Hc(h))) {
  5742. null == s && (s = h.get("triggerTooltip")), h = n ? Ec(l, c, r, e, n, s) : h;
  5743. var f = h.get("snap"),
  5744. p = Wc(l.model),
  5745. g = s || f || "category" === l.type,
  5746. m = t.axesInfo[p] = {
  5747. key: p,
  5748. axis: l,
  5749. coordSys: i,
  5750. axisPointerModel: h,
  5751. triggerTooltip: s,
  5752. involveSeries: g,
  5753. snap: f,
  5754. useHandle: Hc(h),
  5755. seriesModels: []
  5756. };
  5757. u[p] = m, t.seriesInvolved |= g;
  5758. var v = Bc(a, l);
  5759. if (null != v) {
  5760. var y = o[v] || (o[v] = {
  5761. axesInfo: {}
  5762. });
  5763. y.axesInfo[p] = m, y.mapper = a[v].mapper, m.linkGroup = y;
  5764. }
  5765. }
  5766. }
  5767. if (i.axisPointerEnabled) {
  5768. var l = Wc(i.model),
  5769. u = t.coordSysAxesInfo[l] = {};
  5770. t.coordSysMap[l] = i;
  5771. var h = i.model,
  5772. c = h.getModel("tooltip", n);
  5773. if (nM(i.getAxes(), rM(s, !1, null)), i.getTooltipAxes && n && c.get("show")) {
  5774. var d = "axis" === c.get("trigger"),
  5775. f = "cross" === c.get("axisPointer.type"),
  5776. p = i.getTooltipAxes(c.get("axisPointer.axis"));
  5777. (d || f) && nM(p.baseAxes, rM(s, f ? "cross" : !0, d)), f && nM(p.otherAxes, rM(s, "cross", !1));
  5778. }
  5779. }
  5780. });
  5781. }
  5782. function Ec(t, e, i, r, a, o) {
  5783. var l = e.getModel("axisPointer"),
  5784. u = {};
  5785. nM(["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate", "animationEasingUpdate", "z"], function (t) {
  5786. u[t] = n(l.get(t));
  5787. }), u.snap = "category" !== t.type && !!o, "cross" === l.get("type") && (u.type = "line");
  5788. var h = u.label || (u.label = {});
  5789. if (null == h.show && (h.show = !1), "cross" === a) {
  5790. var c = l.get("label.show");
  5791. if (h.show = null != c ? c : !0, !o) {
  5792. var d = u.lineStyle = l.get("crossStyle");
  5793. d && s(h, d.textStyle);
  5794. }
  5795. }
  5796. return t.model.getModel("axisPointer", new Ja(u, i, r));
  5797. }
  5798. function Rc(t, e) {
  5799. e.eachSeries(function (e) {
  5800. var i = e.coordinateSystem,
  5801. n = e.get("tooltip.trigger", !0),
  5802. r = e.get("tooltip.show", !0);
  5803. i && "none" !== n && n !== !1 && "item" !== n && r !== !1 && e.get("axisPointer.show", !0) !== !1 && nM(t.coordSysAxesInfo[Wc(i.model)], function (t) {
  5804. var n = t.axis;
  5805. i.getAxis(n.dim) === n && (t.seriesModels.push(e), null == t.seriesDataCount && (t.seriesDataCount = 0), t.seriesDataCount += e.getData().count());
  5806. });
  5807. }, this);
  5808. }
  5809. function Bc(t, e) {
  5810. for (var i = e.model, n = e.dim, r = 0; r < t.length; r++) {
  5811. var a = t[r] || {};
  5812. if (Nc(a[n + "AxisId"], i.id) || Nc(a[n + "AxisIndex"], i.componentIndex) || Nc(a[n + "AxisName"], i.name)) return r;
  5813. }
  5814. }
  5815. function Nc(t, e) {
  5816. return "all" === t || x(t) && u(t, e) >= 0 || t === e;
  5817. }
  5818. function Fc(t) {
  5819. var e = Gc(t);
  5820. if (e) {
  5821. var i = e.axisPointerModel,
  5822. n = e.axis.scale,
  5823. r = i.option,
  5824. a = i.get("status"),
  5825. o = i.get("value");
  5826. null != o && (o = n.parse(o));
  5827. var s = Hc(i);
  5828. null == a && (r.status = s ? "show" : "hide");
  5829. var l = n.getExtent().slice();
  5830. l[0] > l[1] && l.reverse(), (null == o || o > l[1]) && (o = l[1]), o < l[0] && (o = l[0]), r.value = o, s && (r.status = e.axis.scale.isBlank() ? "hide" : "show");
  5831. }
  5832. }
  5833. function Gc(t) {
  5834. var e = (t.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo;
  5835. return e && e.axesInfo[Wc(t)];
  5836. }
  5837. function Vc(t) {
  5838. var e = Gc(t);
  5839. return e && e.axisPointerModel;
  5840. }
  5841. function Hc(t) {
  5842. return !!t.get("handle.show");
  5843. }
  5844. function Wc(t) {
  5845. return t.type + "||" + t.id;
  5846. }
  5847. function Uc(t, e, i, n, r, a) {
  5848. var o = aM.getAxisPointerClass(t.axisPointerClass);
  5849. if (o) {
  5850. var s = Vc(e);
  5851. s ? (t._axisPointer || (t._axisPointer = new o())).render(e, s, n, a) : Xc(t, n);
  5852. }
  5853. }
  5854. function Xc(t, e, i) {
  5855. var n = t._axisPointer;
  5856. n && n.dispose(e, i), t._axisPointer = null;
  5857. }
  5858. function Yc(t, e, i) {
  5859. i = i || {};
  5860. var n = t.coordinateSystem,
  5861. r = e.axis,
  5862. a = {},
  5863. o = r.getAxesOnZeroOf()[0],
  5864. s = r.position,
  5865. l = o ? "onZero" : s,
  5866. u = r.dim,
  5867. h = n.getRect(),
  5868. c = [h.x, h.x + h.width, h.y, h.y + h.height],
  5869. d = {
  5870. left: 0,
  5871. right: 1,
  5872. top: 0,
  5873. bottom: 1,
  5874. onZero: 2
  5875. },
  5876. f = e.get("offset") || 0,
  5877. p = "x" === u ? [c[2] - f, c[3] + f] : [c[0] - f, c[1] + f];
  5878. if (o) {
  5879. var g = o.toGlobalCoord(o.dataToCoord(0));
  5880. p[d.onZero] = Math.max(Math.min(g, p[1]), p[0]);
  5881. }
  5882. 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);
  5883. var m = {
  5884. top: -1,
  5885. bottom: 1,
  5886. left: -1,
  5887. right: 1
  5888. };
  5889. a.labelDirection = a.tickDirection = a.nameDirection = m[s], a.labelOffset = o ? p[d[s]] - p[d.onZero] : 0, e.get("axisTick.inside") && (a.tickDirection = -a.tickDirection), D(i.labelInside, e.get("axisLabel.inside")) && (a.labelDirection = -a.labelDirection);
  5890. var v = e.get("axisLabel.rotate");
  5891. return a.labelRotate = "top" === l ? -v : v, a.z2 = 1, a;
  5892. }
  5893. function jc(t, e, i) {
  5894. Bm.call(this), this.updateData(t, e, i);
  5895. }
  5896. function qc(t) {
  5897. return [t[0] / 2, t[1] / 2];
  5898. }
  5899. function Zc(t, e) {
  5900. this.parent.drift(t, e);
  5901. }
  5902. function Kc(t, e) {
  5903. if (!this.incremental && !this.useHoverLayer) if ("emphasis" === e) {
  5904. var i = this.__symbolOriginalScale,
  5905. n = i[1] / i[0],
  5906. r = {
  5907. scale: [Math.max(1.1 * i[0], i[0] + 3), Math.max(1.1 * i[1], i[1] + 3 * n)]
  5908. };
  5909. this.animateTo(r, 400, "elasticOut");
  5910. } else "normal" === e && this.animateTo({
  5911. scale: this.__symbolOriginalScale
  5912. }, 400, "elasticOut");
  5913. }
  5914. function $c(t) {
  5915. this.group = new Bm(), this._symbolCtor = t || jc;
  5916. }
  5917. function Qc(t, e, i, n) {
  5918. return !(!e || isNaN(e[0]) || isNaN(e[1]) || n.isIgnore && n.isIgnore(i) || n.clipShape && !n.clipShape.contain(e[0], e[1]) || "none" === t.getItemVisual(i, "symbol"));
  5919. }
  5920. function Jc(t) {
  5921. return null == t || S(t) || (t = {
  5922. isIgnore: t
  5923. }), t || {};
  5924. }
  5925. function td(t) {
  5926. var e = t.hostModel;
  5927. return {
  5928. itemStyle: e.getModel("itemStyle").getItemStyle(["color"]),
  5929. hoverItemStyle: e.getModel("emphasis.itemStyle").getItemStyle(),
  5930. symbolRotate: e.get("symbolRotate"),
  5931. symbolOffset: e.get("symbolOffset"),
  5932. hoverAnimation: e.get("hoverAnimation"),
  5933. labelModel: e.getModel("label"),
  5934. hoverLabelModel: e.getModel("emphasis.label"),
  5935. cursorStyle: e.get("cursor")
  5936. };
  5937. }
  5938. function ed(t, e, i) {
  5939. var n,
  5940. r = t.getBaseAxis(),
  5941. a = t.getOtherAxis(r),
  5942. o = id(a, i),
  5943. s = r.dim,
  5944. l = a.dim,
  5945. u = e.mapDimension(l),
  5946. h = e.mapDimension(s),
  5947. c = "x" === l || "radius" === l ? 1 : 0,
  5948. d = p(t.dimensions, function (t) {
  5949. return e.mapDimension(t);
  5950. }),
  5951. f = e.getCalculationInfo("stackResultDimension");
  5952. return (n |= ju(e, d[0])) && (d[0] = f), (n |= ju(e, d[1])) && (d[1] = f), {
  5953. dataDimsForPoint: d,
  5954. valueStart: o,
  5955. valueAxisDim: l,
  5956. baseAxisDim: s,
  5957. stacked: !!n,
  5958. valueDim: u,
  5959. baseDim: h,
  5960. baseDataOffset: c,
  5961. stackedOverDimension: e.getCalculationInfo("stackedOverDimension")
  5962. };
  5963. }
  5964. function id(t, e) {
  5965. var i = 0,
  5966. n = t.scale.getExtent();
  5967. return "start" === e ? i = n[0] : "end" === e ? i = n[1] : n[0] > 0 ? i = n[0] : n[1] < 0 && (i = n[1]), i;
  5968. }
  5969. function nd(t, e, i, n) {
  5970. var r = 0 / 0;
  5971. t.stacked && (r = i.get(i.getCalculationInfo("stackedOverDimension"), n)), isNaN(r) && (r = t.valueStart);
  5972. var a = t.baseDataOffset,
  5973. o = [];
  5974. return o[a] = i.get(t.baseDim, n), o[1 - a] = r, e.dataToPoint(o);
  5975. }
  5976. function rd(t, e) {
  5977. var i = [];
  5978. return e.diff(t).add(function (t) {
  5979. i.push({
  5980. cmd: "+",
  5981. idx: t
  5982. });
  5983. }).update(function (t, e) {
  5984. i.push({
  5985. cmd: "=",
  5986. idx: e,
  5987. idx1: t
  5988. });
  5989. }).remove(function (t) {
  5990. i.push({
  5991. cmd: "-",
  5992. idx: t
  5993. });
  5994. }).execute(), i;
  5995. }
  5996. function ad(t) {
  5997. return isNaN(t[0]) || isNaN(t[1]);
  5998. }
  5999. function od(t, e, i, n, r, a, o, s, l, u) {
  6000. return "none" !== u && u ? sd.apply(this, arguments) : ld.apply(this, arguments);
  6001. }
  6002. function sd(t, e, i, n, r, a, o, s, l, u, h) {
  6003. for (var c = 0, d = i, f = 0; n > f; f++) {
  6004. var p = e[d];
  6005. if (d >= r || 0 > d) break;
  6006. if (ad(p)) {
  6007. if (h) {
  6008. d += a;
  6009. continue;
  6010. }
  6011. break;
  6012. }
  6013. if (d === i) t[a > 0 ? "moveTo" : "lineTo"](p[0], p[1]);else if (l > 0) {
  6014. var g = e[c],
  6015. m = "y" === u ? 1 : 0,
  6016. v = (p[m] - g[m]) * l;
  6017. wM(SM, g), SM[m] = g[m] + v, wM(MM, p), MM[m] = p[m] - v, t.bezierCurveTo(SM[0], SM[1], MM[0], MM[1], p[0], p[1]);
  6018. } else t.lineTo(p[0], p[1]);
  6019. c = d, d += a;
  6020. }
  6021. return f;
  6022. }
  6023. function ld(t, e, i, n, r, a, o, s, l, u, h) {
  6024. for (var c = 0, d = i, f = 0; n > f; f++) {
  6025. var p = e[d];
  6026. if (d >= r || 0 > d) break;
  6027. if (ad(p)) {
  6028. if (h) {
  6029. d += a;
  6030. continue;
  6031. }
  6032. break;
  6033. }
  6034. if (d === i) t[a > 0 ? "moveTo" : "lineTo"](p[0], p[1]), wM(SM, p);else if (l > 0) {
  6035. var g = d + a,
  6036. m = e[g];
  6037. if (h) for (; m && ad(e[g]);) g += a, m = e[g];
  6038. var v = .5,
  6039. y = e[c],
  6040. m = e[g];
  6041. if (!m || ad(m)) wM(MM, p);else {
  6042. ad(m) && !h && (m = p), j(bM, m, y);
  6043. var _, x;
  6044. if ("x" === u || "y" === u) {
  6045. var w = "x" === u ? 0 : 1;
  6046. _ = Math.abs(p[w] - y[w]), x = Math.abs(p[w] - m[w]);
  6047. } else _ = Hg(p, y), x = Hg(p, m);
  6048. v = x / (x + _), xM(MM, p, bM, -l * (1 - v));
  6049. }
  6050. yM(SM, SM, s), _M(SM, SM, o), yM(MM, MM, s), _M(MM, MM, o), t.bezierCurveTo(SM[0], SM[1], MM[0], MM[1], p[0], p[1]), xM(SM, p, bM, l * v);
  6051. } else t.lineTo(p[0], p[1]);
  6052. c = d, d += a;
  6053. }
  6054. return f;
  6055. }
  6056. function ud(t, e) {
  6057. var i = [1 / 0, 1 / 0],
  6058. n = [-1 / 0, -1 / 0];
  6059. if (e) for (var r = 0; r < t.length; r++) {
  6060. var a = t[r];
  6061. 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[1]);
  6062. }
  6063. return {
  6064. min: e ? i : n,
  6065. max: e ? n : i
  6066. };
  6067. }
  6068. function hd(t, e) {
  6069. if (t.length === e.length) {
  6070. for (var i = 0; i < t.length; i++) {
  6071. var n = t[i],
  6072. r = e[i];
  6073. if (n[0] !== r[0] || n[1] !== r[1]) return;
  6074. }
  6075. return !0;
  6076. }
  6077. }
  6078. function cd(t) {
  6079. return "number" == typeof t ? t : t ? .5 : 0;
  6080. }
  6081. function dd(t, e, i) {
  6082. if (!i.valueDim) return [];
  6083. for (var n = [], r = 0, a = e.count(); a > r; r++) n.push(nd(i, t, e, r));
  6084. return n;
  6085. }
  6086. function fd(t, e, i) {
  6087. for (var n = e.getBaseAxis(), r = "x" === n.dim || "radius" === n.dim ? 0 : 1, a = [], o = 0; o < t.length - 1; o++) {
  6088. var s = t[o + 1],
  6089. l = t[o];
  6090. a.push(l);
  6091. var u = [];
  6092. switch (i) {
  6093. case "end":
  6094. u[r] = s[r], u[1 - r] = l[1 - r], a.push(u);
  6095. break;
  6096. case "middle":
  6097. var h = (l[r] + s[r]) / 2,
  6098. c = [];
  6099. u[r] = c[r] = h, u[1 - r] = l[1 - r], c[1 - r] = s[1 - r], a.push(u), a.push(c);
  6100. break;
  6101. default:
  6102. u[r] = l[r], u[1 - r] = s[1 - r], a.push(u);
  6103. }
  6104. }
  6105. return t[o] && a.push(t[o]), a;
  6106. }
  6107. function pd(t, e) {
  6108. var i = t.getVisual("visualMeta");
  6109. if (i && i.length && t.count() && "cartesian2d" === e.type) {
  6110. for (var n, r, a = i.length - 1; a >= 0; a--) {
  6111. var o = i[a].dimension,
  6112. s = t.dimensions[o],
  6113. l = t.getDimensionInfo(s);
  6114. if (n = l && l.coordDim, "x" === n || "y" === n) {
  6115. r = i[a];
  6116. break;
  6117. }
  6118. }
  6119. if (r) {
  6120. var u = e.getAxis(n),
  6121. h = p(r.stops, function (t) {
  6122. return {
  6123. coord: u.toGlobalCoord(u.dataToCoord(t.value)),
  6124. color: t.color
  6125. };
  6126. }),
  6127. c = h.length,
  6128. d = r.outerColors.slice();
  6129. c && h[0].coord > h[c - 1].coord && (h.reverse(), d.reverse());
  6130. var g = 10,
  6131. m = h[0].coord - g,
  6132. v = h[c - 1].coord + g,
  6133. y = v - m;
  6134. if (.001 > y) return "transparent";
  6135. f(h, function (t) {
  6136. t.offset = (t.coord - m) / y;
  6137. }), h.push({
  6138. offset: c ? h[c - 1].offset : .5,
  6139. color: d[1] || "transparent"
  6140. }), h.unshift({
  6141. offset: c ? h[0].offset : .5,
  6142. color: d[0] || "transparent"
  6143. });
  6144. var _ = new v_(0, 0, 0, 0, h, !0);
  6145. return _[n] = m, _[n + "2"] = v, _;
  6146. }
  6147. }
  6148. }
  6149. function gd(t, e, i) {
  6150. var n = t.get("showAllSymbol"),
  6151. r = "auto" === n;
  6152. if (!n || r) {
  6153. var a = i.getAxesByScale("ordinal")[0];
  6154. if (a && (!r || !md(a, e))) {
  6155. var o = e.mapDimension(a.dim),
  6156. s = {};
  6157. return f(a.getViewLabels(), function (t) {
  6158. s[t.tickValue] = 1;
  6159. }), function (t) {
  6160. return !s.hasOwnProperty(e.get(o, t));
  6161. };
  6162. }
  6163. }
  6164. }
  6165. function md(t, e) {
  6166. var i = t.getExtent(),
  6167. n = Math.abs(i[1] - i[0]) / t.scale.count();
  6168. isNaN(n) && (n = 0);
  6169. for (var r = e.count(), a = Math.max(1, Math.round(r / 5)), o = 0; r > o; o += a) if (1.5 * jc.getSymbolSize(e, o)[t.isHorizontal() ? 1 : 0] > n) return !1;
  6170. return !0;
  6171. }
  6172. function vd(t, e, i) {
  6173. if ("cartesian2d" === t.type) {
  6174. var n = t.getBaseAxis().isHorizontal(),
  6175. r = gc(t, e, i);
  6176. if (!i.get("clip", !0)) {
  6177. var a = r.shape,
  6178. o = Math.max(a.width, a.height);
  6179. n ? (a.y -= o, a.height += 2 * o) : (a.x -= o, a.width += 2 * o);
  6180. }
  6181. return r;
  6182. }
  6183. return mc(t, e, i);
  6184. }
  6185. function yd(t, e, i, n) {
  6186. var r = e.getData(),
  6187. a = this.dataIndex,
  6188. o = r.getName(a),
  6189. s = e.get("selectedOffset");
  6190. n.dispatchAction({
  6191. type: "pieToggleSelect",
  6192. from: t,
  6193. name: o,
  6194. seriesId: e.id
  6195. }), r.each(function (t) {
  6196. _d(r.getItemGraphicEl(t), r.getItemLayout(t), e.isSelected(r.getName(t)), s, i);
  6197. });
  6198. }
  6199. function _d(t, e, i, n, r) {
  6200. var a = (e.startAngle + e.endAngle) / 2,
  6201. o = Math.cos(a),
  6202. s = Math.sin(a),
  6203. l = i ? n : 0,
  6204. u = [o * l, s * l];
  6205. r ? t.animate().when(200, {
  6206. position: u
  6207. }).start("bounceOut") : t.attr("position", u);
  6208. }
  6209. function xd(t, e) {
  6210. Bm.call(this);
  6211. var i = new e_({
  6212. z2: 2
  6213. }),
  6214. n = new o_(),
  6215. r = new $y();
  6216. this.add(i), this.add(n), this.add(r), this.updateData(t, e, !0);
  6217. }
  6218. function wd(t, e, i, n, r, a, o) {
  6219. function s(e, i, n) {
  6220. for (var r = e; i > r; r++) if (t[r].y += n, r > e && i > r + 1 && t[r + 1].y > t[r].y + t[r].height) return void l(r, n / 2);
  6221. l(i - 1, n / 2);
  6222. }
  6223. function l(e, i) {
  6224. for (var n = e; n >= 0 && (t[n].y -= i, !(n > 0 && t[n].y > t[n - 1].y + t[n - 1].height)); n--);
  6225. }
  6226. function u(t, e, i, n, r, a) {
  6227. for (var o = a > 0 ? e ? Number.MAX_VALUE : 0 : e ? Number.MAX_VALUE : 0, s = 0, l = t.length; l > s; s++) {
  6228. var u = Math.abs(t[s].y - n),
  6229. h = t[s].len,
  6230. c = t[s].len2,
  6231. d = r + h > u ? Math.sqrt((r + h + c) * (r + h + c) - u * u) : Math.abs(t[s].x - i);
  6232. e && d >= o && (d = o - 10), !e && o >= d && (d = o + 10), t[s].x = i + d * a, o = d;
  6233. }
  6234. }
  6235. t.sort(function (t, e) {
  6236. return t.y - e.y;
  6237. });
  6238. for (var h, c = 0, d = t.length, f = [], p = [], g = 0; d > g; g++) h = t[g].y - c, 0 > h && s(g, d, -h, r), c = t[g].y + t[g].height;
  6239. 0 > o - c && l(d - 1, c - o);
  6240. for (var g = 0; d > g; g++) t[g].y >= i ? p.push(t[g]) : f.push(t[g]);
  6241. u(f, !1, e, i, n, r), u(p, !0, e, i, n, r);
  6242. }
  6243. function bd(t, e, i, n, r, a) {
  6244. for (var o = [], s = [], l = 0; l < t.length; l++) Sd(t[l]) || (t[l].x < e ? o.push(t[l]) : s.push(t[l]));
  6245. wd(s, e, i, n, 1, r, a), wd(o, e, i, n, -1, r, a);
  6246. for (var l = 0; l < t.length; l++) if (!Sd(t[l])) {
  6247. var u = t[l].linePoints;
  6248. if (u) {
  6249. var h = u[1][0] - u[2][0];
  6250. u[2][0] = t[l].x < e ? t[l].x + 3 : t[l].x - 3, u[1][1] = u[2][1] = t[l].y, u[1][0] = u[2][0] + h;
  6251. }
  6252. }
  6253. }
  6254. function Sd(t) {
  6255. return "center" === t.position;
  6256. }
  6257. function Md(t) {
  6258. for (var e, i = 0; i < t.length; i++) {
  6259. var n = t[i].getBoundingRect();
  6260. e = e || n.clone(), e.union(n);
  6261. }
  6262. return e;
  6263. }
  6264. function Id(t, e) {
  6265. var i,
  6266. n,
  6267. r = t.svgXML;
  6268. try {
  6269. i = r && Al(r, {
  6270. ignoreViewBox: !0,
  6271. ignoreRootClip: !0
  6272. }) || {}, n = i.root, O(null != n);
  6273. } catch (a) {
  6274. throw new Error("Invalid svg format\n" + a.message);
  6275. }
  6276. var o = i.width,
  6277. s = i.height,
  6278. l = i.viewBoxRect;
  6279. if (e || (e = null == o || null == s ? n.getBoundingRect() : new wi(0, 0, 0, 0), null != o && (e.width = o), null != s && (e.height = s)), l) {
  6280. var u = Dl(l, e.width, e.height),
  6281. h = n;
  6282. n = new Bm(), n.add(h), h.scale = u.scale, h.position = u.position;
  6283. }
  6284. return n.setClipPath(new u_({
  6285. shape: e.plain()
  6286. })), {
  6287. root: n,
  6288. boundingRect: e
  6289. };
  6290. }
  6291. function Td(t) {
  6292. return function (e, i) {
  6293. var n = Cd(e),
  6294. r = [];
  6295. return f(n, function (n) {
  6296. var a = aI[n.type][t];
  6297. a && r.push(a(e, n, i));
  6298. }), r;
  6299. };
  6300. }
  6301. function Cd(t) {
  6302. var e = kw.retrieveMap(t) || [];
  6303. return e;
  6304. }
  6305. function Dd(t, e) {
  6306. return !!Ad(t)[e];
  6307. }
  6308. function Ad(t) {
  6309. return t[lI] || (t[lI] = {});
  6310. }
  6311. function kd(t) {
  6312. this.pointerChecker, this._zr = t, this._opt = {};
  6313. var e = y,
  6314. i = e(Pd, this),
  6315. r = e(Ld, this),
  6316. a = e(Od, this),
  6317. o = e(zd, this),
  6318. l = e(Ed, this);
  6319. Yg.call(this), this.setPointerChecker = function (t) {
  6320. this.pointerChecker = t;
  6321. }, this.enable = function (e, u) {
  6322. this.disable(), this._opt = s(n(u) || {}, {
  6323. zoomOnMouseWheel: !0,
  6324. moveOnMouseMove: !0,
  6325. moveOnMouseWheel: !1,
  6326. preventDefaultMouseMove: !0
  6327. }), null == e && (e = !0), (e === !0 || "move" === e || "pan" === e) && (t.on("mousedown", i), t.on("mousemove", r), t.on("mouseup", a)), (e === !0 || "scale" === e || "zoom" === e) && (t.on("mousewheel", o), t.on("pinch", l));
  6328. }, this.disable = function () {
  6329. t.off("mousedown", i), t.off("mousemove", r), t.off("mouseup", a), t.off("mousewheel", o), t.off("pinch", l);
  6330. }, this.dispose = this.disable, this.isDragging = function () {
  6331. return this._dragging;
  6332. }, this.isPinching = function () {
  6333. return this._pinching;
  6334. };
  6335. }
  6336. function Pd(t) {
  6337. if (!(we(t) || t.target && t.target.draggable)) {
  6338. var e = t.offsetX,
  6339. i = t.offsetY;
  6340. this.pointerChecker && this.pointerChecker(t, e, i) && (this._x = e, this._y = i, this._dragging = !0);
  6341. }
  6342. }
  6343. function Ld(t) {
  6344. if (this._dragging && Nd("moveOnMouseMove", t, this._opt) && "pinch" !== t.gestureEvent && !Dd(this._zr, "globalPan")) {
  6345. var e = t.offsetX,
  6346. i = t.offsetY,
  6347. n = this._x,
  6348. r = this._y,
  6349. a = e - n,
  6350. o = i - r;
  6351. this._x = e, this._y = i, this._opt.preventDefaultMouseMove && Qg(t.event), Bd(this, "pan", "moveOnMouseMove", t, {
  6352. dx: a,
  6353. dy: o,
  6354. oldX: n,
  6355. oldY: r,
  6356. newX: e,
  6357. newY: i
  6358. });
  6359. }
  6360. }
  6361. function Od(t) {
  6362. we(t) || (this._dragging = !1);
  6363. }
  6364. function zd(t) {
  6365. var e = Nd("zoomOnMouseWheel", t, this._opt),
  6366. i = Nd("moveOnMouseWheel", t, this._opt),
  6367. n = t.wheelDelta,
  6368. r = Math.abs(n),
  6369. a = t.offsetX,
  6370. o = t.offsetY;
  6371. if (0 !== n && (e || i)) {
  6372. if (e) {
  6373. var s = r > 3 ? 1.4 : r > 1 ? 1.2 : 1.1,
  6374. l = n > 0 ? s : 1 / s;
  6375. Rd(this, "zoom", "zoomOnMouseWheel", t, {
  6376. scale: l,
  6377. originX: a,
  6378. originY: o
  6379. });
  6380. }
  6381. if (i) {
  6382. var u = Math.abs(n),
  6383. h = (n > 0 ? 1 : -1) * (u > 3 ? .4 : u > 1 ? .15 : .05);
  6384. Rd(this, "scrollMove", "moveOnMouseWheel", t, {
  6385. scrollDelta: h,
  6386. originX: a,
  6387. originY: o
  6388. });
  6389. }
  6390. }
  6391. }
  6392. function Ed(t) {
  6393. if (!Dd(this._zr, "globalPan")) {
  6394. var e = t.pinchScale > 1 ? 1.1 : 1 / 1.1;
  6395. Rd(this, "zoom", null, t, {
  6396. scale: e,
  6397. originX: t.pinchX,
  6398. originY: t.pinchY
  6399. });
  6400. }
  6401. }
  6402. function Rd(t, e, i, n, r) {
  6403. t.pointerChecker && t.pointerChecker(n, r.originX, r.originY) && (Qg(n.event), Bd(t, e, i, n, r));
  6404. }
  6405. function Bd(t, e, i, n, r) {
  6406. r.isAvailableBehavior = y(Nd, null, i, n), t.trigger(e, r);
  6407. }
  6408. function Nd(t, e, i) {
  6409. var n = i[t];
  6410. return !t || n && (!b(n) || e.event[n + "Key"]);
  6411. }
  6412. function Fd(t, e, i) {
  6413. var n = t.target,
  6414. r = n.position;
  6415. r[0] += e, r[1] += i, n.dirty();
  6416. }
  6417. function Gd(t, e, i, n) {
  6418. var r = t.target,
  6419. a = t.zoomLimit,
  6420. o = r.position,
  6421. s = r.scale,
  6422. l = t.zoom = t.zoom || 1;
  6423. if (l *= e, a) {
  6424. var u = a.min || 0,
  6425. h = a.max || 1 / 0;
  6426. l = Math.max(Math.min(h, l), u);
  6427. }
  6428. var c = l / t.zoom;
  6429. t.zoom = l, o[0] -= (i - o[0]) * (c - 1), o[1] -= (n - o[1]) * (c - 1), s[0] *= c, s[1] *= c, r.dirty();
  6430. }
  6431. function Vd(t, e, i) {
  6432. var n = e.getComponentByElement(t.topTarget),
  6433. r = n && n.coordinateSystem;
  6434. return n && n !== i && !uI[n.mainType] && r && r.model !== i;
  6435. }
  6436. function Hd(t) {
  6437. var e = t.getItemStyle(),
  6438. i = t.get("areaColor");
  6439. return null != i && (e.fill = i), e;
  6440. }
  6441. function Wd(t, e, i, n, r) {
  6442. i.off("click"), i.off("mousedown"), e.get("selectedMode") && (i.on("mousedown", function () {
  6443. t._mouseDownFlag = !0;
  6444. }), i.on("click", function (a) {
  6445. if (t._mouseDownFlag) {
  6446. t._mouseDownFlag = !1;
  6447. for (var o = a.target; !o.__regions;) o = o.parent;
  6448. if (o) {
  6449. var s = {
  6450. type: ("geo" === e.mainType ? "geo" : "map") + "ToggleSelect",
  6451. batch: p(o.__regions, function (t) {
  6452. return {
  6453. name: t.name,
  6454. from: r.uid
  6455. };
  6456. })
  6457. };
  6458. s[e.mainType + "Id"] = e.id, n.dispatchAction(s), Ud(e, i);
  6459. }
  6460. }
  6461. }));
  6462. }
  6463. function Ud(t, e) {
  6464. e.eachChild(function (e) {
  6465. f(e.__regions, function (i) {
  6466. e.trigger(t.isSelected(i.name) ? "emphasis" : "normal");
  6467. });
  6468. });
  6469. }
  6470. function Xd(t, e) {
  6471. var i = new Bm();
  6472. this.uid = io("ec_map_draw"), this._controller = new kd(t.getZr()), this._controllerHost = {
  6473. target: e ? i : null
  6474. }, this.group = i, this._updateGroup = e, this._mouseDownFlag, this._mapName, this._initialized, i.add(this._regionsGroup = new Bm()), i.add(this._backgroundGroup = new Bm());
  6475. }
  6476. function Yd(t) {
  6477. var e = this[hI];
  6478. e && e.recordVersion === this[cI] && jd(e, t);
  6479. }
  6480. function jd(t, e) {
  6481. var i = t.circle,
  6482. n = t.labelModel,
  6483. r = t.hoverLabelModel,
  6484. a = t.emphasisText,
  6485. o = t.normalText;
  6486. e ? (i.style.extendFrom(ka({}, r, {
  6487. text: r.get("show") ? a : null
  6488. }, {
  6489. isRectText: !0,
  6490. useInsideStyle: !1
  6491. }, !0)), i.__mapOriginalZ2 = i.z2, i.z2 += S_) : (ka(i.style, n, {
  6492. text: n.get("show") ? o : null,
  6493. textPosition: n.getShallow("position") || "bottom"
  6494. }, {
  6495. isRectText: !0,
  6496. useInsideStyle: !1
  6497. }), i.dirty(!1), null != i.__mapOriginalZ2 && (i.z2 = i.__mapOriginalZ2, i.__mapOriginalZ2 = null));
  6498. }
  6499. function qd(t, e, i) {
  6500. var n = t.getZoom(),
  6501. r = t.getCenter(),
  6502. a = e.zoom,
  6503. o = t.dataToPoint(r);
  6504. if (null != e.dx && null != e.dy) {
  6505. o[0] -= e.dx, o[1] -= e.dy;
  6506. var r = t.pointToData(o);
  6507. t.setCenter(r);
  6508. }
  6509. if (null != a) {
  6510. if (i) {
  6511. var s = i.min || 0,
  6512. l = i.max || 1 / 0;
  6513. a = Math.max(Math.min(n * a, l), s) / n;
  6514. }
  6515. t.scale[0] *= a, t.scale[1] *= a;
  6516. var u = t.position,
  6517. h = (e.originX - u[0]) * (a - 1),
  6518. c = (e.originY - u[1]) * (a - 1);
  6519. u[0] -= h, u[1] -= c, t.updateTransform();
  6520. var r = t.pointToData(o);
  6521. t.setCenter(r), t.setZoom(a * n);
  6522. }
  6523. return {
  6524. center: t.getCenter(),
  6525. zoom: t.getZoom()
  6526. };
  6527. }
  6528. function Zd() {
  6529. lm.call(this);
  6530. }
  6531. function Kd(t) {
  6532. this.name = t, this.zoomLimit, lm.call(this), this._roamTransformable = new Zd(), this._rawTransformable = new Zd(), this._center, this._zoom;
  6533. }
  6534. function $d(t, e, i, n) {
  6535. var r = i.seriesModel,
  6536. a = r ? r.coordinateSystem : null;
  6537. return a === this ? a[t](n) : null;
  6538. }
  6539. function Qd(t, e, i, n) {
  6540. Kd.call(this, t), this.map = e;
  6541. var r = oI.load(e, i);
  6542. this._nameCoordMap = r.nameCoordMap, this._regionsMap = r.regionsMap, this._invertLongitute = null == n ? !0 : n, this.regions = r.regions, this._rect = r.boundingRect;
  6543. }
  6544. function Jd(t, e, i, n) {
  6545. var r = i.geoModel,
  6546. a = i.seriesModel,
  6547. o = r ? r.coordinateSystem : a ? a.coordinateSystem || (a.getReferringComponents("geo")[0] || {}).coordinateSystem : null;
  6548. return o === this ? o[t](n) : null;
  6549. }
  6550. function tf(t, e) {
  6551. var i = t.get("boundingCoords");
  6552. if (null != i) {
  6553. var n = i[0],
  6554. r = i[1];
  6555. isNaN(n[0]) || isNaN(n[1]) || isNaN(r[0]) || isNaN(r[1]) || this.setBoundingRect(n[0], n[1], r[0] - n[0], r[1] - n[1]);
  6556. }
  6557. var a,
  6558. o = this.getBoundingRect(),
  6559. s = t.get("layoutCenter"),
  6560. l = t.get("layoutSize"),
  6561. u = e.getWidth(),
  6562. h = e.getHeight(),
  6563. c = o.width / o.height * this.aspectScale,
  6564. d = !1;
  6565. s && l && (s = [so(s[0], u), so(s[1], h)], l = so(l, Math.min(u, h)), isNaN(s[0]) || isNaN(s[1]) || isNaN(l) || (d = !0));
  6566. var f;
  6567. if (d) {
  6568. var f = {};
  6569. 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] - f.width / 2;
  6570. } else a = t.getBoxLayoutParams(), a.aspect = c, f = Ro(a, {
  6571. width: u,
  6572. height: h
  6573. });
  6574. this.setViewRect(f.x, f.y, f.width, f.height), this.setCenter(t.get("center")), this.setZoom(t.get("zoom"));
  6575. }
  6576. function ef(t, e) {
  6577. f(e.get("geoCoord"), function (e, i) {
  6578. t.addGeoCoord(i, e);
  6579. });
  6580. }
  6581. function nf(t, e) {
  6582. var i = {};
  6583. return f(t, function (t) {
  6584. t.each(t.mapDimension("value"), function (e, n) {
  6585. var r = "ec-" + t.getName(n);
  6586. i[r] = i[r] || [], isNaN(e) || i[r].push(e);
  6587. });
  6588. }), t[0].map(t[0].mapDimension("value"), function (n, r) {
  6589. for (var a = "ec-" + t[0].getName(r), o = 0, s = 1 / 0, l = -1 / 0, u = i[a].length, h = 0; u > h; h++) s = Math.min(s, i[a][h]), l = Math.max(l, i[a][h]), o += i[a][h];
  6590. var c;
  6591. return c = "min" === e ? s : "max" === e ? l : "average" === e ? o / u : o, 0 === u ? 0 / 0 : c;
  6592. });
  6593. }
  6594. function rf(t, e) {
  6595. var i = t.get("center"),
  6596. n = e.getWidth(),
  6597. r = e.getHeight(),
  6598. a = Math.min(n, r),
  6599. o = so(i[0], e.getWidth()),
  6600. s = so(i[1], e.getHeight()),
  6601. l = so(t.get("radius"), a / 2);
  6602. return {
  6603. cx: o,
  6604. cy: s,
  6605. r: l
  6606. };
  6607. }
  6608. function af(t, e) {
  6609. return e && ("string" == typeof e ? t = e.replace("{value}", null != t ? t : "") : "function" == typeof e && (t = e(t))), t;
  6610. }
  6611. function of(t, e) {
  6612. e.update = "updateView", uu(e, function (e, i) {
  6613. var n = {};
  6614. return i.eachComponent({
  6615. mainType: "geo",
  6616. query: e
  6617. }, function (i) {
  6618. i[t](e.name);
  6619. var r = i.coordinateSystem;
  6620. f(r.regions, function (t) {
  6621. n[t.name] = i.isSelected(t.name) || !1;
  6622. });
  6623. }), {
  6624. selected: n,
  6625. name: e.name
  6626. };
  6627. });
  6628. }
  6629. function sf(t, e, i) {
  6630. this.dimension = "single", this.dimensions = ["single"], this._axis = null, this._rect, this._init(t, e, i), this.model = t;
  6631. }
  6632. function lf(t, e) {
  6633. var i = [];
  6634. return t.eachComponent("singleAxis", function (n, r) {
  6635. var a = new sf(n, t, e);
  6636. a.name = "single_" + r, a.resize(n, e), n.coordinateSystem = a, i.push(a);
  6637. }), t.eachSeries(function (e) {
  6638. if ("singleAxis" === e.get("coordinateSystem")) {
  6639. var i = t.queryComponents({
  6640. mainType: "singleAxis",
  6641. index: e.get("singleAxisIndex"),
  6642. id: e.get("singleAxisId")
  6643. })[0];
  6644. e.coordinateSystem = i && i.coordinateSystem;
  6645. }
  6646. }), i;
  6647. }
  6648. function uf(t, e) {
  6649. e = e || {};
  6650. var i = t.coordinateSystem,
  6651. n = t.axis,
  6652. r = {},
  6653. a = n.position,
  6654. o = n.orient,
  6655. s = i.getRect(),
  6656. l = [s.x, s.x + s.width, s.y, s.y + s.height],
  6657. u = {
  6658. horizontal: {
  6659. top: l[2],
  6660. bottom: l[3]
  6661. },
  6662. vertical: {
  6663. left: l[0],
  6664. right: l[1]
  6665. }
  6666. };
  6667. r.position = ["vertical" === o ? u.vertical[a] : l[0], "horizontal" === o ? u.horizontal[a] : l[3]];
  6668. var h = {
  6669. horizontal: 0,
  6670. vertical: 1
  6671. };
  6672. r.rotation = Math.PI / 2 * h[o];
  6673. var c = {
  6674. top: -1,
  6675. bottom: 1,
  6676. right: 1,
  6677. left: -1
  6678. };
  6679. r.labelDirection = r.tickDirection = r.nameDirection = c[a], t.get("axisTick.inside") && (r.tickDirection = -r.tickDirection), D(e.labelInside, t.get("axisLabel.inside")) && (r.labelDirection = -r.labelDirection);
  6680. var d = e.rotate;
  6681. return null == d && (d = t.get("axisLabel.rotate")), r.labelRotation = "top" === a ? -d : d, r.z2 = 1, r;
  6682. }
  6683. function hf(t, e) {
  6684. return e.type || (e.data ? "category" : "value");
  6685. }
  6686. function cf(t, e, i, n, r) {
  6687. var a = t.axis;
  6688. if (!a.scale.isBlank() && a.containData(e)) {
  6689. if (!t.involveSeries) return void i.showPointer(t, e);
  6690. var s = df(e, t),
  6691. l = s.payloadBatch,
  6692. u = s.snapToValue;
  6693. l[0] && null == r.seriesIndex && o(r, l[0]), !n && t.snap && a.containData(u) && null != u && (e = u), i.showPointer(t, e, l, r), i.showTooltip(t, s, u);
  6694. }
  6695. }
  6696. function df(t, e) {
  6697. var i = e.axis,
  6698. n = i.dim,
  6699. r = t,
  6700. a = [],
  6701. o = Number.MAX_VALUE,
  6702. s = -1;
  6703. return DI(e.seriesModels, function (e) {
  6704. var l,
  6705. u,
  6706. h = e.getData().mapDimension(n, !0);
  6707. if (e.getAxisTooltipData) {
  6708. var c = e.getAxisTooltipData(h, t, i);
  6709. u = c.dataIndices, l = c.nestestValue;
  6710. } else {
  6711. if (u = e.getData().indicesOfNearest(h[0], t, "category" === i.type ? .5 : null), !u.length) return;
  6712. l = e.getData().get(h[0], u[0]);
  6713. }
  6714. if (null != l && isFinite(l)) {
  6715. var d = t - l,
  6716. f = Math.abs(d);
  6717. o >= f && ((o > f || d >= 0 && 0 > s) && (o = f, s = d, r = l, a.length = 0), DI(u, function (t) {
  6718. a.push({
  6719. seriesIndex: e.seriesIndex,
  6720. dataIndexInside: t,
  6721. dataIndex: e.getData().getRawIndex(t)
  6722. });
  6723. }));
  6724. }
  6725. }), {
  6726. payloadBatch: a,
  6727. snapToValue: r
  6728. };
  6729. }
  6730. function ff(t, e, i, n) {
  6731. t[e.key] = {
  6732. value: i,
  6733. payloadBatch: n
  6734. };
  6735. }
  6736. function pf(t, e, i, n) {
  6737. var r = i.payloadBatch,
  6738. a = e.axis,
  6739. o = a.model,
  6740. s = e.axisPointerModel;
  6741. if (e.triggerTooltip && r.length) {
  6742. var l = e.coordSys.model,
  6743. u = Wc(l),
  6744. h = t.map[u];
  6745. h || (h = t.map[u] = {
  6746. coordSysId: l.id,
  6747. coordSysIndex: l.componentIndex,
  6748. coordSysType: l.type,
  6749. coordSysMainType: l.mainType,
  6750. dataByAxis: []
  6751. }, t.list.push(h)), h.dataByAxis.push({
  6752. axisDim: a.dim,
  6753. axisIndex: o.componentIndex,
  6754. axisType: o.type,
  6755. axisId: o.id,
  6756. value: n,
  6757. valueLabelOpt: {
  6758. precision: s.get("label.precision"),
  6759. formatter: s.get("label.formatter")
  6760. },
  6761. seriesDataIndices: r.slice()
  6762. });
  6763. }
  6764. }
  6765. function gf(t, e, i) {
  6766. var n = i.axesInfo = [];
  6767. DI(e, function (e, i) {
  6768. var r = e.axisPointerModel.option,
  6769. a = t[i];
  6770. a ? (!e.useHandle && (r.status = "show"), r.value = a.value, r.seriesDataIndices = (a.payloadBatch || []).slice()) : !e.useHandle && (r.status = "hide"), "show" === r.status && n.push({
  6771. axisDim: e.axis.dim,
  6772. axisIndex: e.axis.model.componentIndex,
  6773. value: r.value
  6774. });
  6775. });
  6776. }
  6777. function mf(t, e, i, n) {
  6778. if (xf(e) || !t.list.length) return void n({
  6779. type: "hideTip"
  6780. });
  6781. var r = ((t.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};
  6782. n({
  6783. type: "showTip",
  6784. escapeConnect: !0,
  6785. x: e[0],
  6786. y: e[1],
  6787. tooltipOption: i.tooltipOption,
  6788. position: i.position,
  6789. dataIndexInside: r.dataIndexInside,
  6790. dataIndex: r.dataIndex,
  6791. seriesIndex: r.seriesIndex,
  6792. dataByCoordSys: t.list
  6793. });
  6794. }
  6795. function vf(t, e, i) {
  6796. var n = i.getZr(),
  6797. r = "axisPointerLastHighlights",
  6798. a = kI(n)[r] || {},
  6799. o = kI(n)[r] = {};
  6800. DI(t, function (t) {
  6801. var e = t.axisPointerModel.option;
  6802. "show" === e.status && DI(e.seriesDataIndices, function (t) {
  6803. var e = t.seriesIndex + " | " + t.dataIndex;
  6804. o[e] = t;
  6805. });
  6806. });
  6807. var s = [],
  6808. l = [];
  6809. f(a, function (t, e) {
  6810. !o[e] && l.push(t);
  6811. }), f(o, function (t, e) {
  6812. !a[e] && s.push(t);
  6813. }), l.length && i.dispatchAction({
  6814. type: "downplay",
  6815. escapeConnect: !0,
  6816. batch: l
  6817. }), s.length && i.dispatchAction({
  6818. type: "highlight",
  6819. escapeConnect: !0,
  6820. batch: s
  6821. });
  6822. }
  6823. function yf(t, e) {
  6824. for (var i = 0; i < (t || []).length; i++) {
  6825. var n = t[i];
  6826. if (e.axis.dim === n.axisDim && e.axis.model.componentIndex === n.axisIndex) return n;
  6827. }
  6828. }
  6829. function _f(t) {
  6830. var e = t.axis.model,
  6831. i = {},
  6832. n = i.axisDim = t.axis.dim;
  6833. return i.axisIndex = i[n + "AxisIndex"] = e.componentIndex, i.axisName = i[n + "AxisName"] = e.name, i.axisId = i[n + "AxisId"] = e.id, i;
  6834. }
  6835. function xf(t) {
  6836. return !t || null == t[0] || isNaN(t[0]) || null == t[1] || isNaN(t[1]);
  6837. }
  6838. function wf(t, e, i) {
  6839. if (!Mg.node) {
  6840. var n = e.getZr();
  6841. LI(n).records || (LI(n).records = {}), bf(n, e);
  6842. var r = LI(n).records[t] || (LI(n).records[t] = {});
  6843. r.handler = i;
  6844. }
  6845. }
  6846. function bf(t, e) {
  6847. function i(i, n) {
  6848. t.on(i, function (i) {
  6849. var r = Tf(e);
  6850. OI(LI(t).records, function (t) {
  6851. t && n(t, i, r.dispatchAction);
  6852. }), Sf(r.pendings, e);
  6853. });
  6854. }
  6855. LI(t).initialized || (LI(t).initialized = !0, i("click", _(If, "click")), i("mousemove", _(If, "mousemove")), i("globalout", Mf));
  6856. }
  6857. function Sf(t, e) {
  6858. var i,
  6859. n = t.showTip.length,
  6860. r = t.hideTip.length;
  6861. n ? i = t.showTip[n - 1] : r && (i = t.hideTip[r - 1]), i && (i.dispatchAction = null, e.dispatchAction(i));
  6862. }
  6863. function Mf(t, e, i) {
  6864. t.handler("leave", null, i);
  6865. }
  6866. function If(t, e, i, n) {
  6867. e.handler(t, i, n);
  6868. }
  6869. function Tf(t) {
  6870. var e = {
  6871. showTip: [],
  6872. hideTip: []
  6873. },
  6874. i = function (n) {
  6875. var r = e[n.type];
  6876. r ? r.push(n) : (n.dispatchAction = i, t.dispatchAction(n));
  6877. };
  6878. return {
  6879. dispatchAction: i,
  6880. pendings: e
  6881. };
  6882. }
  6883. function Cf(t, e) {
  6884. if (!Mg.node) {
  6885. var i = e.getZr(),
  6886. n = (LI(i).records || {})[t];
  6887. n && (LI(i).records[t] = null);
  6888. }
  6889. }
  6890. function Df() {}
  6891. function Af(t, e, i, n) {
  6892. kf(EI(i).lastProp, n) || (EI(i).lastProp = n, e ? Ga(i, n, t) : (i.stopAnimation(), i.attr(n)));
  6893. }
  6894. function kf(t, e) {
  6895. if (S(t) && S(e)) {
  6896. var i = !0;
  6897. return f(e, function (e, n) {
  6898. i = i && kf(t[n], e);
  6899. }), !!i;
  6900. }
  6901. return t === e;
  6902. }
  6903. function Pf(t, e) {
  6904. t[e.get("label.show") ? "show" : "hide"]();
  6905. }
  6906. function Lf(t) {
  6907. return {
  6908. position: t.position.slice(),
  6909. rotation: t.rotation || 0
  6910. };
  6911. }
  6912. function Of(t, e, i) {
  6913. var n = e.get("z"),
  6914. r = e.get("zlevel");
  6915. t && t.traverse(function (t) {
  6916. "group" !== t.type && (null != n && (t.z = n), null != r && (t.zlevel = r), t.silent = i);
  6917. });
  6918. }
  6919. function zf(t) {
  6920. var e,
  6921. i = t.get("type"),
  6922. n = t.getModel(i + "Style");
  6923. return "line" === i ? (e = n.getLineStyle(), e.fill = null) : "shadow" === i && (e = n.getAreaStyle(), e.stroke = null), e;
  6924. }
  6925. function Ef(t, e, i, n, r) {
  6926. var a = i.get("value"),
  6927. o = Bf(a, e.axis, e.ecModel, i.get("seriesDataIndices"), {
  6928. precision: i.get("label.precision"),
  6929. formatter: i.get("label.formatter")
  6930. }),
  6931. s = i.getModel("label"),
  6932. l = Y_(s.get("padding") || 0),
  6933. u = s.getFont(),
  6934. h = Gi(o, u),
  6935. c = r.position,
  6936. d = h.width + l[1] + l[3],
  6937. f = h.height + l[0] + l[2],
  6938. p = r.align;
  6939. "right" === p && (c[0] -= d), "center" === p && (c[0] -= d / 2);
  6940. var g = r.verticalAlign;
  6941. "bottom" === g && (c[1] -= f), "middle" === g && (c[1] -= f / 2), Rf(c, d, f, n);
  6942. var m = s.get("backgroundColor");
  6943. m && "auto" !== m || (m = e.get("axisLine.lineStyle.color")), t.label = {
  6944. shape: {
  6945. x: 0,
  6946. y: 0,
  6947. width: d,
  6948. height: f,
  6949. r: s.get("borderRadius")
  6950. },
  6951. position: c.slice(),
  6952. style: {
  6953. text: o,
  6954. textFont: u,
  6955. textFill: s.getTextColor(),
  6956. textPosition: "inside",
  6957. textPadding: l,
  6958. fill: m,
  6959. stroke: s.get("borderColor") || "transparent",
  6960. lineWidth: s.get("borderWidth") || 0,
  6961. shadowBlur: s.get("shadowBlur"),
  6962. shadowColor: s.get("shadowColor"),
  6963. shadowOffsetX: s.get("shadowOffsetX"),
  6964. shadowOffsetY: s.get("shadowOffsetY")
  6965. },
  6966. z2: 10
  6967. };
  6968. }
  6969. function Rf(t, e, i, n) {
  6970. var r = n.getWidth(),
  6971. a = n.getHeight();
  6972. t[0] = Math.min(t[0] + e, r) - e, t[1] = Math.min(t[1] + i, a) - i, t[0] = Math.max(t[0], 0), t[1] = Math.max(t[1], 0);
  6973. }
  6974. function Bf(t, e, i, n, r) {
  6975. t = e.scale.parse(t);
  6976. var a = e.scale.getLabel(t, {
  6977. precision: r.precision
  6978. }),
  6979. o = r.formatter;
  6980. if (o) {
  6981. var s = {
  6982. value: Ih(e, t),
  6983. axisDimension: e.dim,
  6984. axisIndex: e.index,
  6985. seriesData: []
  6986. };
  6987. f(n, function (t) {
  6988. var e = i.getSeriesByIndex(t.seriesIndex),
  6989. n = t.dataIndexInside,
  6990. r = e && e.getDataParams(n);
  6991. r && s.seriesData.push(r);
  6992. }), b(o) ? a = o.replace("{value}", a) : w(o) && (a = o(s));
  6993. }
  6994. return a;
  6995. }
  6996. function Nf(t, e, i) {
  6997. var n = De();
  6998. return Oe(n, n, i.rotation), Le(n, n, i.position), Wa([t.dataToCoord(e), (i.labelOffset || 0) + (i.labelDirection || 1) * (i.labelMargin || 0)], n);
  6999. }
  7000. function Ff(t, e, i, n, r, a) {
  7001. var o = QS.innerTextLayout(i.rotation, 0, i.labelDirection);
  7002. i.labelMargin = r.get("label.margin"), Ef(e, n, r, a, {
  7003. position: Nf(n.axis, t, i),
  7004. align: o.textAlign,
  7005. verticalAlign: o.textVerticalAlign
  7006. });
  7007. }
  7008. function Gf(t, e, i) {
  7009. return i = i || 0, {
  7010. x1: t[i],
  7011. y1: t[1 - i],
  7012. x2: e[i],
  7013. y2: e[1 - i]
  7014. };
  7015. }
  7016. function Vf(t, e, i) {
  7017. return i = i || 0, {
  7018. x: t[i],
  7019. y: t[1 - i],
  7020. width: e[i],
  7021. height: e[1 - i]
  7022. };
  7023. }
  7024. function Hf(t, e) {
  7025. var i = {};
  7026. return i[e.dim + "AxisIndex"] = e.index, t.getCartesian(i);
  7027. }
  7028. function Wf(t) {
  7029. return "x" === t.dim ? 0 : 1;
  7030. }
  7031. function Uf(t) {
  7032. return t.isHorizontal() ? 0 : 1;
  7033. }
  7034. function Xf(t, e) {
  7035. var i = t.getRect();
  7036. return [i[GI[e]], i[GI[e]] + i[VI[e]]];
  7037. }
  7038. function Yf(t, e, i) {
  7039. var n,
  7040. r = {},
  7041. a = "toggleSelected" === t;
  7042. return i.eachComponent("legend", function (i) {
  7043. a && null != n ? i[n ? "select" : "unSelect"](e.name) : "allSelect" === t || "inverseSelect" === t ? i[t]() : (i[t](e.name), n = i.isSelected(e.name));
  7044. var o = i.getData();
  7045. f(o, function (t) {
  7046. var e = t.get("name");
  7047. if ("\n" !== e && "" !== e) {
  7048. var n = i.isSelected(e);
  7049. r[e] = r.hasOwnProperty(e) ? r[e] && n : n;
  7050. }
  7051. });
  7052. }), "allSelect" === t || "inverseSelect" === t ? {
  7053. selected: r
  7054. } : {
  7055. name: e.name,
  7056. selected: r
  7057. };
  7058. }
  7059. function jf(t, e) {
  7060. var i = Y_(e.get("padding")),
  7061. n = e.getItemStyle(["color", "opacity"]);
  7062. n.fill = e.get("backgroundColor");
  7063. var t = new u_({
  7064. shape: {
  7065. x: t.x - i[3],
  7066. y: t.y - i[0],
  7067. width: t.width + i[1] + i[3],
  7068. height: t.height + i[0] + i[2],
  7069. r: e.get("borderRadius")
  7070. },
  7071. style: n,
  7072. silent: !0,
  7073. z2: -1
  7074. });
  7075. return t;
  7076. }
  7077. function qf(t, e, i, n, r, a) {
  7078. var o;
  7079. return "line" !== e && e.indexOf("empty") < 0 ? (o = i.getItemStyle(), t.style.stroke = n, a || (o.stroke = r)) : o = i.getItemStyle(["borderWidth", "borderColor"]), t.setStyle(o);
  7080. }
  7081. function Zf(t, e) {
  7082. e.dispatchAction({
  7083. type: "legendToggleSelect",
  7084. name: t
  7085. });
  7086. }
  7087. function Kf(t, e, i, n) {
  7088. var r = i.getZr().storage.getDisplayList()[0];
  7089. r && r.useHoverLayer || i.dispatchAction({
  7090. type: "highlight",
  7091. seriesName: t,
  7092. name: e,
  7093. excludeSeriesId: n
  7094. });
  7095. }
  7096. function $f(t, e, i, n) {
  7097. var r = i.getZr().storage.getDisplayList()[0];
  7098. r && r.useHoverLayer || i.dispatchAction({
  7099. type: "downplay",
  7100. seriesName: t,
  7101. name: e,
  7102. excludeSeriesId: n
  7103. });
  7104. }
  7105. function Qf(t, e, i) {
  7106. var n = t.getOrient(),
  7107. r = [1, 1];
  7108. r[n.index] = 0, Bo(e, i, {
  7109. type: "box",
  7110. ignoreSize: r
  7111. });
  7112. }
  7113. function Jf(t) {
  7114. var e = "cubic-bezier(0.23, 1, 0.32, 1)",
  7115. i = "left " + t + "s " + e + ",top " + t + "s " + e;
  7116. return p(aT, function (t) {
  7117. return t + "transition:" + i;
  7118. }).join(";");
  7119. }
  7120. function tp(t) {
  7121. var e = [],
  7122. i = t.get("fontSize"),
  7123. n = t.getTextColor();
  7124. return n && e.push("color:" + n), e.push("font:" + t.getFont()), i && e.push("line-height:" + Math.round(3 * i / 2) + "px"), nT(["decoration", "align"], function (i) {
  7125. var n = t.get(i);
  7126. n && e.push("text-" + i + ":" + n);
  7127. }), e.join(";");
  7128. }
  7129. function ep(t) {
  7130. var e = [],
  7131. i = t.get("transitionDuration"),
  7132. n = t.get("backgroundColor"),
  7133. r = t.getModel("textStyle"),
  7134. a = t.get("padding");
  7135. return i && e.push(Jf(i)), n && (Mg.canvasSupported ? e.push("background-Color:" + n) : (e.push("background-Color:#" + Je(n)), e.push("filter:alpha(opacity=70)"))), nT(["width", "color", "radius"], function (i) {
  7136. var n = "border-" + i,
  7137. r = rT(n),
  7138. a = t.get(r);
  7139. null != a && e.push(n + ":" + a + ("color" === i ? "" : "px"));
  7140. }), e.push(tp(r)), null != a && e.push("padding:" + Y_(a).join("px ") + "px"), e.join(";") + ";";
  7141. }
  7142. function ip(t, e) {
  7143. if (Mg.wxa) return null;
  7144. var i = document.createElement("div"),
  7145. n = this._zr = e.getZr();
  7146. this.el = i, this._x = e.getWidth() / 2, this._y = e.getHeight() / 2, t.appendChild(i), this._container = t, this._show = !1, this._hideTimeout;
  7147. var r = this;
  7148. i.onmouseenter = function () {
  7149. r._enterable && (clearTimeout(r._hideTimeout), r._show = !0), r._inContent = !0;
  7150. }, i.onmousemove = function (e) {
  7151. if (e = e || window.event, !r._enterable) {
  7152. var i = n.handler;
  7153. ye(t, e, !0), i.dispatch("mousemove", e);
  7154. }
  7155. }, i.onmouseleave = function () {
  7156. r._enterable && r._show && r.hideLater(r._hideDelay), r._inContent = !1;
  7157. };
  7158. }
  7159. function np(t) {
  7160. this._zr = t.getZr(), this._show = !1, this._hideTimeout;
  7161. }
  7162. function rp(t) {
  7163. for (var e = t.pop(); t.length;) {
  7164. var i = t.pop();
  7165. i && (Ja.isInstance(i) && (i = i.get("tooltip", !0)), "string" == typeof i && (i = {
  7166. formatter: i
  7167. }), e = new Ja(i, e, e.ecModel));
  7168. }
  7169. return e;
  7170. }
  7171. function ap(t, e) {
  7172. return t.dispatchAction || y(e.dispatchAction, e);
  7173. }
  7174. function op(t, e, i, n, r, a, o) {
  7175. var s = i.getOuterSize(),
  7176. l = s.width,
  7177. u = s.height;
  7178. return null != a && (t + l + a > n ? t -= l + a : t += a), null != o && (e + u + o > r ? e -= u + o : e += o), [t, e];
  7179. }
  7180. function sp(t, e, i, n, r) {
  7181. var a = i.getOuterSize(),
  7182. o = a.width,
  7183. s = a.height;
  7184. return t = Math.min(t + o, n) - o, e = Math.min(e + s, r) - s, t = Math.max(t, 0), e = Math.max(e, 0), [t, e];
  7185. }
  7186. function lp(t, e, i) {
  7187. var n = i[0],
  7188. r = i[1],
  7189. a = 5,
  7190. o = 0,
  7191. s = 0,
  7192. l = e.width,
  7193. u = e.height;
  7194. switch (t) {
  7195. case "inside":
  7196. o = e.x + l / 2 - n / 2, s = e.y + u / 2 - r / 2;
  7197. break;
  7198. case "top":
  7199. o = e.x + l / 2 - n / 2, s = e.y - r - a;
  7200. break;
  7201. case "bottom":
  7202. o = e.x + l / 2 - n / 2, s = e.y + u + a;
  7203. break;
  7204. case "left":
  7205. o = e.x - n - a, s = e.y + u / 2 - r / 2;
  7206. break;
  7207. case "right":
  7208. o = e.x + l + a, s = e.y + u / 2 - r / 2;
  7209. }
  7210. return [o, s];
  7211. }
  7212. function up(t) {
  7213. return "center" === t || "middle" === t;
  7214. }
  7215. function hp(t) {
  7216. Vn(t, "label", ["show"]);
  7217. }
  7218. function cp(t) {
  7219. return !(isNaN(parseFloat(t.x)) && isNaN(parseFloat(t.y)));
  7220. }
  7221. function dp(t) {
  7222. return !isNaN(parseFloat(t.x)) && !isNaN(parseFloat(t.y));
  7223. }
  7224. function fp(t, e, i, n, r, a) {
  7225. var o = [],
  7226. s = ju(e, n),
  7227. l = s ? e.getCalculationInfo("stackResultDimension") : n,
  7228. u = _p(e, l, t),
  7229. h = e.indicesOfNearest(l, u)[0];
  7230. o[r] = e.get(i, h), o[a] = e.get(n, h);
  7231. var c = ho(e.get(n, h));
  7232. return c = Math.min(c, 20), c >= 0 && (o[a] = +o[a].toFixed(c)), o;
  7233. }
  7234. function pp(t, e) {
  7235. var i = t.getData(),
  7236. r = t.coordinateSystem;
  7237. if (e && !dp(e) && !x(e.coord) && r) {
  7238. var a = r.dimensions,
  7239. o = gp(e, i, r, t);
  7240. if (e = n(e), e.type && mT[e.type] && o.baseAxis && o.valueAxis) {
  7241. var s = pT(a, o.baseAxis.dim),
  7242. l = pT(a, o.valueAxis.dim);
  7243. e.coord = mT[e.type](i, o.baseDataDim, o.valueDataDim, s, l), e.value = e.coord[l];
  7244. } else {
  7245. for (var u = [null != e.xAxis ? e.xAxis : e.radiusAxis, null != e.yAxis ? e.yAxis : e.angleAxis], h = 0; 2 > h; h++) mT[u[h]] && (u[h] = _p(i, i.mapDimension(a[h]), u[h]));
  7246. e.coord = u;
  7247. }
  7248. }
  7249. return e;
  7250. }
  7251. function gp(t, e, i, n) {
  7252. var r = {};
  7253. return null != t.valueIndex || null != t.valueDim ? (r.valueDataDim = null != t.valueIndex ? e.getDimension(t.valueIndex) : t.valueDim, r.valueAxis = i.getAxis(mp(n, r.valueDataDim)), r.baseAxis = i.getOtherAxis(r.valueAxis), r.baseDataDim = e.mapDimension(r.baseAxis.dim)) : (r.baseAxis = n.getBaseAxis(), r.valueAxis = i.getOtherAxis(r.baseAxis), r.baseDataDim = e.mapDimension(r.baseAxis.dim), r.valueDataDim = e.mapDimension(r.valueAxis.dim)), r;
  7254. }
  7255. function mp(t, e) {
  7256. var i = t.getData(),
  7257. n = i.dimensions;
  7258. e = i.getDimension(e);
  7259. for (var r = 0; r < n.length; r++) {
  7260. var a = i.getDimensionInfo(n[r]);
  7261. if (a.name === e) return a.coordDim;
  7262. }
  7263. }
  7264. function vp(t, e) {
  7265. return t && t.containData && e.coord && !cp(e) ? t.containData(e.coord) : !0;
  7266. }
  7267. function yp(t, e, i, n) {
  7268. return 2 > n ? t.coord && t.coord[n] : t.value;
  7269. }
  7270. function _p(t, e, i) {
  7271. if ("average" === i) {
  7272. var n = 0,
  7273. r = 0;
  7274. return t.each(e, function (t) {
  7275. isNaN(t) || (n += t, r++);
  7276. }), n / r;
  7277. }
  7278. return "median" === i ? t.getMedian(e) : t.getDataExtent(e, !0)["max" === i ? 1 : 0];
  7279. }
  7280. function xp(t, e, i) {
  7281. var n = e.coordinateSystem;
  7282. t.each(function (r) {
  7283. var a,
  7284. o = t.getItemModel(r),
  7285. s = so(o.get("x"), i.getWidth()),
  7286. l = so(o.get("y"), i.getHeight());
  7287. if (isNaN(s) || isNaN(l)) {
  7288. if (e.getMarkerPosition) a = e.getMarkerPosition(t.getValues(t.dimensions, r));else if (n) {
  7289. var u = t.get(n.dimensions[0], r),
  7290. h = t.get(n.dimensions[1], r);
  7291. a = n.dataToPoint([u, h]);
  7292. }
  7293. } else a = [s, l];
  7294. isNaN(s) || (a[0] = s), isNaN(l) || (a[1] = l), t.setItemLayout(r, a);
  7295. });
  7296. }
  7297. function wp(t, e, i) {
  7298. var n;
  7299. n = t ? p(t && t.dimensions, function (t) {
  7300. var i = e.getData().getDimensionInfo(e.getData().mapDimension(t)) || {};
  7301. return s({
  7302. name: t
  7303. }, i);
  7304. }) : [{
  7305. name: "value",
  7306. type: "float"
  7307. }];
  7308. var r = new kb(n, i),
  7309. a = p(i.get("data"), _(pp, e));
  7310. return t && (a = m(a, _(vp, t))), r.initData(a, null, t ? yp : function (t) {
  7311. return t.value;
  7312. }), r;
  7313. }
  7314. function bp(t) {
  7315. return isNaN(+t.cpx1) || isNaN(+t.cpy1);
  7316. }
  7317. function Sp(t) {
  7318. return "_" + t + "Type";
  7319. }
  7320. function Mp(t, e, i) {
  7321. var n = e.getItemVisual(i, "color"),
  7322. r = e.getItemVisual(i, t),
  7323. a = e.getItemVisual(i, t + "Size");
  7324. if (r && "none" !== r) {
  7325. x(a) || (a = [a, a]);
  7326. var o = Ph(r, -a[0] / 2, -a[1] / 2, a[0], a[1], n);
  7327. return o.name = t, o;
  7328. }
  7329. }
  7330. function Ip(t) {
  7331. var e = new xT({
  7332. name: "line",
  7333. subPixelOptimize: !0
  7334. });
  7335. return Tp(e.shape, t), e;
  7336. }
  7337. function Tp(t, e) {
  7338. t.x1 = e[0][0], t.y1 = e[0][1], t.x2 = e[1][0], t.y2 = e[1][1], t.percent = 1;
  7339. var i = e[2];
  7340. i ? (t.cpx1 = i[0], t.cpy1 = i[1]) : (t.cpx1 = 0 / 0, t.cpy1 = 0 / 0);
  7341. }
  7342. function Cp() {
  7343. var t = this,
  7344. e = t.childOfName("fromSymbol"),
  7345. i = t.childOfName("toSymbol"),
  7346. n = t.childOfName("label");
  7347. if (e || i || !n.ignore) {
  7348. for (var r = 1, a = this.parent; a;) a.scale && (r /= a.scale[0]), a = a.parent;
  7349. var o = t.childOfName("line");
  7350. if (this.__dirty || o.__dirty) {
  7351. var s = o.shape.percent,
  7352. l = o.pointAt(0),
  7353. u = o.pointAt(s),
  7354. h = j([], u, l);
  7355. if (te(h, h), e) {
  7356. e.attr("position", l);
  7357. var c = o.tangentAt(0);
  7358. e.attr("rotation", Math.PI / 2 - Math.atan2(c[1], c[0])), e.attr("scale", [r * s, r * s]);
  7359. }
  7360. if (i) {
  7361. i.attr("position", u);
  7362. var c = o.tangentAt(1);
  7363. i.attr("rotation", -Math.PI / 2 - Math.atan2(c[1], c[0])), i.attr("scale", [r * s, r * s]);
  7364. }
  7365. if (!n.ignore) {
  7366. n.attr("position", u);
  7367. var d,
  7368. f,
  7369. p,
  7370. g = 5 * r;
  7371. if ("end" === n.__position) d = [h[0] * g + u[0], h[1] * g + u[1]], f = h[0] > .8 ? "left" : h[0] < -.8 ? "right" : "center", p = h[1] > .8 ? "top" : h[1] < -.8 ? "bottom" : "middle";else if ("middle" === n.__position) {
  7372. var m = s / 2,
  7373. c = o.tangentAt(m),
  7374. v = [c[1], -c[0]],
  7375. y = o.pointAt(m);
  7376. 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";
  7377. var _ = -Math.atan2(c[1], c[0]);
  7378. u[0] < l[0] && (_ = Math.PI + _), n.attr("rotation", _);
  7379. } else d = [-h[0] * g + l[0], -h[1] * g + l[1]], f = h[0] > .8 ? "right" : h[0] < -.8 ? "left" : "center", p = h[1] > .8 ? "bottom" : h[1] < -.8 ? "top" : "middle";
  7380. n.attr({
  7381. style: {
  7382. textVerticalAlign: n.__verticalAlign || p,
  7383. textAlign: n.__textAlign || f
  7384. },
  7385. position: d,
  7386. scale: [r, r]
  7387. });
  7388. }
  7389. }
  7390. }
  7391. }
  7392. function Dp(t, e, i) {
  7393. Bm.call(this), this._createLine(t, e, i);
  7394. }
  7395. function Ap(t) {
  7396. this._ctor = t || Dp, this.group = new Bm();
  7397. }
  7398. function kp(t, e, i, n) {
  7399. var r = e.getItemLayout(i);
  7400. if (zp(r)) {
  7401. var a = new t._ctor(e, i, n);
  7402. e.setItemGraphicEl(i, a), t.group.add(a);
  7403. }
  7404. }
  7405. function Pp(t, e, i, n, r, a) {
  7406. var o = e.getItemGraphicEl(n);
  7407. return zp(i.getItemLayout(r)) ? (o ? o.updateData(i, r, a) : o = new t._ctor(i, r, a), i.setItemGraphicEl(r, o), void t.group.add(o)) : void t.group.remove(o);
  7408. }
  7409. function Lp(t) {
  7410. var e = t.hostModel;
  7411. return {
  7412. lineStyle: e.getModel("lineStyle").getLineStyle(),
  7413. hoverLineStyle: e.getModel("emphasis.lineStyle").getLineStyle(),
  7414. labelModel: e.getModel("label"),
  7415. hoverLabelModel: e.getModel("emphasis.label")
  7416. };
  7417. }
  7418. function Op(t) {
  7419. return isNaN(t[0]) || isNaN(t[1]);
  7420. }
  7421. function zp(t) {
  7422. return !Op(t[0]) && !Op(t[1]);
  7423. }
  7424. function Ep(t) {
  7425. return !isNaN(t) && !isFinite(t);
  7426. }
  7427. function Rp(t, e, i, n) {
  7428. var r = 1 - t,
  7429. a = n.dimensions[t];
  7430. return Ep(e[r]) && Ep(i[r]) && e[t] === i[t] && n.getAxis(a).containData(e[t]);
  7431. }
  7432. function Bp(t, e) {
  7433. if ("cartesian2d" === t.type) {
  7434. var i = e[0].coord,
  7435. n = e[1].coord;
  7436. if (i && n && (Rp(1, i, n, t) || Rp(0, i, n, t))) return !0;
  7437. }
  7438. return vp(t, e[0]) && vp(t, e[1]);
  7439. }
  7440. function Np(t, e, i, n, r) {
  7441. var a,
  7442. o = n.coordinateSystem,
  7443. s = t.getItemModel(e),
  7444. l = so(s.get("x"), r.getWidth()),
  7445. u = so(s.get("y"), r.getHeight());
  7446. if (isNaN(l) || isNaN(u)) {
  7447. if (n.getMarkerPosition) a = n.getMarkerPosition(t.getValues(t.dimensions, e));else {
  7448. var h = o.dimensions,
  7449. c = t.get(h[0], e),
  7450. d = t.get(h[1], e);
  7451. a = o.dataToPoint([c, d]);
  7452. }
  7453. if ("cartesian2d" === o.type) {
  7454. var f = o.getAxis("x"),
  7455. p = o.getAxis("y"),
  7456. h = o.dimensions;
  7457. Ep(t.get(h[0], e)) ? a[0] = f.toGlobalCoord(f.getExtent()[i ? 0 : 1]) : Ep(t.get(h[1], e)) && (a[1] = p.toGlobalCoord(p.getExtent()[i ? 0 : 1]));
  7458. }
  7459. isNaN(l) || (a[0] = l), isNaN(u) || (a[1] = u);
  7460. } else a = [l, u];
  7461. t.setItemLayout(e, a);
  7462. }
  7463. function Fp(t, e, i) {
  7464. var n;
  7465. n = t ? p(t && t.dimensions, function (t) {
  7466. var i = e.getData().getDimensionInfo(e.getData().mapDimension(t)) || {};
  7467. return s({
  7468. name: t
  7469. }, i);
  7470. }) : [{
  7471. name: "value",
  7472. type: "float"
  7473. }];
  7474. var r = new kb(n, i),
  7475. a = new kb(n, i),
  7476. o = new kb([], i),
  7477. l = p(i.get("data"), _(MT, e, t, i));
  7478. t && (l = m(l, _(Bp, t)));
  7479. var u = t ? yp : function (t) {
  7480. return t.value;
  7481. };
  7482. return r.initData(p(l, function (t) {
  7483. return t[0];
  7484. }), null, u), a.initData(p(l, function (t) {
  7485. return t[1];
  7486. }), null, u), o.initData(p(l, function (t) {
  7487. return t[2];
  7488. })), o.hasItemOption = !0, {
  7489. from: r,
  7490. to: a,
  7491. line: o
  7492. };
  7493. }
  7494. function Gp(t) {
  7495. return !isNaN(t) && !isFinite(t);
  7496. }
  7497. function Vp(t, e, i) {
  7498. var n = 1 - t;
  7499. return Gp(e[n]) && Gp(i[n]);
  7500. }
  7501. function Hp(t, e) {
  7502. var i = e.coord[0],
  7503. n = e.coord[1];
  7504. return "cartesian2d" === t.type && i && n && (Vp(1, i, n, t) || Vp(0, i, n, t)) ? !0 : vp(t, {
  7505. coord: i,
  7506. x: e.x0,
  7507. y: e.y0
  7508. }) || vp(t, {
  7509. coord: n,
  7510. x: e.x1,
  7511. y: e.y1
  7512. });
  7513. }
  7514. function Wp(t, e, i, n, r) {
  7515. var a,
  7516. o = n.coordinateSystem,
  7517. s = t.getItemModel(e),
  7518. l = so(s.get(i[0]), r.getWidth()),
  7519. u = so(s.get(i[1]), r.getHeight());
  7520. if (isNaN(l) || isNaN(u)) {
  7521. if (n.getMarkerPosition) a = n.getMarkerPosition(t.getValues(i, e));else {
  7522. var h = t.get(i[0], e),
  7523. c = t.get(i[1], e),
  7524. d = [h, c];
  7525. o.clampData && o.clampData(d, d), a = o.dataToPoint(d, !0);
  7526. }
  7527. if ("cartesian2d" === o.type) {
  7528. var f = o.getAxis("x"),
  7529. p = o.getAxis("y"),
  7530. h = t.get(i[0], e),
  7531. c = t.get(i[1], e);
  7532. Gp(h) ? a[0] = f.toGlobalCoord(f.getExtent()["x0" === i[0] ? 0 : 1]) : Gp(c) && (a[1] = p.toGlobalCoord(p.getExtent()["y0" === i[1] ? 0 : 1]));
  7533. }
  7534. isNaN(l) || (a[0] = l), isNaN(u) || (a[1] = u);
  7535. } else a = [l, u];
  7536. return a;
  7537. }
  7538. function Up(t, e, i) {
  7539. var n,
  7540. r,
  7541. a = ["x0", "y0", "x1", "y1"];
  7542. t ? (n = p(t && t.dimensions, function (t) {
  7543. var i = e.getData(),
  7544. n = i.getDimensionInfo(i.mapDimension(t)) || {};
  7545. return s({
  7546. name: t
  7547. }, n);
  7548. }), r = new kb(p(a, function (t, e) {
  7549. return {
  7550. name: t,
  7551. type: n[e % 2].type
  7552. };
  7553. }), i)) : (n = [{
  7554. name: "value",
  7555. type: "float"
  7556. }], r = new kb(n, i));
  7557. var o = p(i.get("data"), _(IT, e, t, i));
  7558. t && (o = m(o, _(Hp, t)));
  7559. var l = t ? function (t, e, i, n) {
  7560. return t.coord[Math.floor(n / 2)][n % 2];
  7561. } : function (t) {
  7562. return t.value;
  7563. };
  7564. return r.initData(o, null, l), r.hasItemOption = !0, r;
  7565. }
  7566. function Xp(t) {
  7567. return document.createElementNS(CT, t);
  7568. }
  7569. function Yp(t) {
  7570. return PT(1e4 * t) / 1e4;
  7571. }
  7572. function jp(t) {
  7573. return BT > t && t > -BT;
  7574. }
  7575. function qp(t, e) {
  7576. var i = e ? t.textFill : t.fill;
  7577. return null != i && i !== kT;
  7578. }
  7579. function Zp(t, e) {
  7580. var i = e ? t.textStroke : t.stroke;
  7581. return null != i && i !== kT;
  7582. }
  7583. function Kp(t, e) {
  7584. e && $p(t, "transform", "matrix(" + AT.call(e, ",") + ")");
  7585. }
  7586. function $p(t, e, i) {
  7587. (!i || "linear" !== i.type && "radial" !== i.type) && t.setAttribute(e, i);
  7588. }
  7589. function Qp(t, e, i) {
  7590. t.setAttributeNS("http://www.w3.org/1999/xlink", e, i);
  7591. }
  7592. function Jp(t, e, i, n) {
  7593. if (qp(e, i)) {
  7594. var r = i ? e.textFill : e.fill;
  7595. r = "transparent" === r ? kT : r, $p(t, "fill", r), $p(t, "fill-opacity", null != e.fillOpacity ? e.fillOpacity * e.opacity : e.opacity);
  7596. } else $p(t, "fill", kT);
  7597. if (Zp(e, i)) {
  7598. var a = i ? e.textStroke : e.stroke;
  7599. a = "transparent" === a ? kT : a, $p(t, "stroke", a);
  7600. var o = i ? e.textStrokeWidth : e.lineWidth,
  7601. s = !i && e.strokeNoScale ? n.getLineScale() : 1;
  7602. $p(t, "stroke-width", o / s), $p(t, "paint-order", i ? "stroke" : "fill"), $p(t, "stroke-opacity", null != e.strokeOpacity ? e.strokeOpacity : e.opacity);
  7603. var l = e.lineDash;
  7604. l ? ($p(t, "stroke-dasharray", e.lineDash.join(",")), $p(t, "stroke-dashoffset", PT(e.lineDashOffset || 0))) : $p(t, "stroke-dasharray", ""), e.lineCap && $p(t, "stroke-linecap", e.lineCap), e.lineJoin && $p(t, "stroke-linejoin", e.lineJoin), e.miterLimit && $p(t, "stroke-miterlimit", e.miterLimit);
  7605. } else $p(t, "stroke", kT);
  7606. }
  7607. function tg(t) {
  7608. for (var e = [], i = t.data, n = t.len(), r = 0; n > r;) {
  7609. var a = i[r++],
  7610. o = "",
  7611. s = 0;
  7612. switch (a) {
  7613. case DT.M:
  7614. o = "M", s = 2;
  7615. break;
  7616. case DT.L:
  7617. o = "L", s = 2;
  7618. break;
  7619. case DT.Q:
  7620. o = "Q", s = 4;
  7621. break;
  7622. case DT.C:
  7623. o = "C", s = 6;
  7624. break;
  7625. case DT.A:
  7626. var l = i[r++],
  7627. u = i[r++],
  7628. h = i[r++],
  7629. c = i[r++],
  7630. d = i[r++],
  7631. f = i[r++],
  7632. p = i[r++],
  7633. g = i[r++],
  7634. m = Math.abs(f),
  7635. v = jp(m - ET) || (g ? f >= ET : -f >= ET),
  7636. y = f > 0 ? f % ET : f % ET + ET,
  7637. _ = !1;
  7638. _ = v ? !0 : jp(m) ? !1 : y >= zT == !!g;
  7639. var x = Yp(l + h * OT(d)),
  7640. w = Yp(u + c * LT(d));
  7641. v && (f = g ? ET - 1e-4 : -ET + 1e-4, _ = !0, 9 === r && e.push("M", x, w));
  7642. var b = Yp(l + h * OT(d + f)),
  7643. S = Yp(u + c * LT(d + f));
  7644. e.push("A", Yp(h), Yp(c), PT(p * RT), +_, +g, b, S);
  7645. break;
  7646. case DT.Z:
  7647. o = "Z";
  7648. break;
  7649. case DT.R:
  7650. var b = Yp(i[r++]),
  7651. S = Yp(i[r++]),
  7652. M = Yp(i[r++]),
  7653. I = Yp(i[r++]);
  7654. e.push("M", b, S, "L", b + M, S, "L", b + M, S + I, "L", b, S + I, "L", b, S);
  7655. }
  7656. o && e.push(o);
  7657. for (var T = 0; s > T; T++) e.push(Yp(i[r++]));
  7658. }
  7659. return e.join(" ");
  7660. }
  7661. function eg(t, e, i, n, r, a, o) {
  7662. Ae(WT), e && i && ke(WT, i);
  7663. var s = n.textRotation;
  7664. if (r && s) {
  7665. var l = n.textOrigin;
  7666. "center" === l ? (a = r.width / 2 + r.x, o = r.height / 2 + r.y) : l && (a = l[0] + r.x, o = l[1] + r.y), WT[4] -= a, WT[5] -= o, Oe(WT, WT, s), WT[4] += a, WT[5] += o;
  7667. }
  7668. Kp(t, WT);
  7669. }
  7670. function ig(t, e, i) {
  7671. return "right" === e ? t - i[1] : "center" === e ? t + i[3] / 2 - i[1] / 2 : t + i[3];
  7672. }
  7673. function ng(t, e, i, n) {
  7674. $p(t, "dominant-baseline", "middle"), $p(t, "text-anchor", UT[e]), $p(t, "x", i), $p(t, "y", n);
  7675. }
  7676. function rg() {}
  7677. function ag(t, e) {
  7678. for (var i = 0, n = e.length, r = 0, a = 0; n > i; i++) {
  7679. var o = e[i];
  7680. if (o.removed) {
  7681. for (var s = [], l = a; l < a + o.count; l++) s.push(l);
  7682. o.indices = s, a += o.count;
  7683. } else {
  7684. for (var s = [], l = r; l < r + o.count; l++) s.push(l);
  7685. o.indices = s, r += o.count, o.added || (a += o.count);
  7686. }
  7687. }
  7688. return e;
  7689. }
  7690. function og(t) {
  7691. return {
  7692. newPos: t.newPos,
  7693. components: t.components.slice(0)
  7694. };
  7695. }
  7696. function sg(t, e, i, n, r) {
  7697. this._zrId = t, this._svgRoot = e, this._tagNames = "string" == typeof i ? [i] : i, this._markLabel = n, this._domName = r || "_dom", this.nextId = 0;
  7698. }
  7699. function lg(t, e) {
  7700. sg.call(this, t, e, ["linearGradient", "radialGradient"], "__gradient_in_use__");
  7701. }
  7702. function ug(t, e) {
  7703. sg.call(this, t, e, "clipPath", "__clippath_in_use__");
  7704. }
  7705. function hg(t, e) {
  7706. sg.call(this, t, e, ["filter"], "__filter_in_use__", "_shadowDom");
  7707. }
  7708. function cg(t) {
  7709. return t && (t.shadowBlur || t.shadowOffsetX || t.shadowOffsetY || t.textShadowBlur || t.textShadowOffsetX || t.textShadowOffsetY);
  7710. }
  7711. function dg(t) {
  7712. return parseInt(t, 10);
  7713. }
  7714. function fg(t) {
  7715. return t instanceof Vr ? NT : t instanceof Sn ? FT : t instanceof $y ? GT : NT;
  7716. }
  7717. function pg(t, e) {
  7718. return e && t && e.parentNode !== t;
  7719. }
  7720. function gg(t, e, i) {
  7721. if (pg(t, e) && i) {
  7722. var n = i.nextSibling;
  7723. n ? t.insertBefore(e, n) : t.appendChild(e);
  7724. }
  7725. }
  7726. function mg(t, e) {
  7727. if (pg(t, e)) {
  7728. var i = t.firstChild;
  7729. i ? t.insertBefore(e, i) : t.appendChild(e);
  7730. }
  7731. }
  7732. function vg(t, e) {
  7733. e && t && e.parentNode === t && t.removeChild(e);
  7734. }
  7735. function yg(t) {
  7736. return t.__textSvgEl;
  7737. }
  7738. function _g(t) {
  7739. return t.__svgEl;
  7740. }
  7741. function xg(t) {
  7742. return function () {
  7743. Pm('In SVG mode painter not support method "' + t + '"');
  7744. };
  7745. }
  7746. var wg = 2311,
  7747. bg = function () {
  7748. return wg++;
  7749. },
  7750. Sg = {};
  7751. Sg = "object" == typeof wx && "function" == typeof uni.getSystemInfoSync ? {
  7752. browser: {},
  7753. os: {},
  7754. node: !1,
  7755. wxa: !0,
  7756. canvasSupported: !0,
  7757. svgSupported: !1,
  7758. touchEventsSupported: !0,
  7759. domSupported: !1
  7760. } : "undefined" == typeof document && "undefined" != typeof self ? {
  7761. browser: {},
  7762. os: {},
  7763. node: !1,
  7764. worker: !0,
  7765. canvasSupported: !0,
  7766. domSupported: !1
  7767. } : "undefined" == typeof navigator ? {
  7768. browser: {},
  7769. os: {},
  7770. node: !0,
  7771. worker: !1,
  7772. canvasSupported: !0,
  7773. svgSupported: !0,
  7774. domSupported: !1
  7775. } : e(navigator.userAgent);
  7776. var Mg = Sg,
  7777. Ig = {
  7778. "[object Function]": 1,
  7779. "[object RegExp]": 1,
  7780. "[object Date]": 1,
  7781. "[object Error]": 1,
  7782. "[object CanvasGradient]": 1,
  7783. "[object CanvasPattern]": 1,
  7784. "[object Image]": 1,
  7785. "[object Canvas]": 1
  7786. },
  7787. Tg = {
  7788. "[object Int8Array]": 1,
  7789. "[object Uint8Array]": 1,
  7790. "[object Uint8ClampedArray]": 1,
  7791. "[object Int16Array]": 1,
  7792. "[object Uint16Array]": 1,
  7793. "[object Int32Array]": 1,
  7794. "[object Uint32Array]": 1,
  7795. "[object Float32Array]": 1,
  7796. "[object Float64Array]": 1
  7797. },
  7798. Cg = Object.prototype.toString,
  7799. Dg = Array.prototype,
  7800. Ag = Dg.forEach,
  7801. kg = Dg.filter,
  7802. Pg = Dg.slice,
  7803. Lg = Dg.map,
  7804. Og = Dg.reduce,
  7805. zg = {},
  7806. Eg = function () {
  7807. return zg.createCanvas();
  7808. };
  7809. zg.createCanvas = function () {
  7810. return document.createElement("canvas");
  7811. };
  7812. var Rg,
  7813. Bg = "__ec_primitive__";
  7814. B.prototype = {
  7815. constructor: B,
  7816. get: function (t) {
  7817. return this.data.hasOwnProperty(t) ? this.data[t] : null;
  7818. },
  7819. set: function (t, e) {
  7820. return this.data[t] = e;
  7821. },
  7822. each: function (t, e) {
  7823. void 0 !== e && (t = y(t, e));
  7824. for (var i in this.data) this.data.hasOwnProperty(i) && t(this.data[i], i);
  7825. },
  7826. removeKey: function (t) {
  7827. delete this.data[t];
  7828. }
  7829. };
  7830. var Ng = (Object.freeze || Object)({
  7831. $override: i,
  7832. clone: n,
  7833. merge: r,
  7834. mergeAll: a,
  7835. extend: o,
  7836. defaults: s,
  7837. createCanvas: Eg,
  7838. getContext: l,
  7839. indexOf: u,
  7840. inherits: h,
  7841. mixin: c,
  7842. isArrayLike: d,
  7843. each: f,
  7844. map: p,
  7845. reduce: g,
  7846. filter: m,
  7847. find: v,
  7848. bind: y,
  7849. curry: _,
  7850. isArray: x,
  7851. isFunction: w,
  7852. isString: b,
  7853. isObject: S,
  7854. isBuiltInObject: M,
  7855. isTypedArray: I,
  7856. isDom: T,
  7857. eqNaN: C,
  7858. retrieve: D,
  7859. retrieve2: A,
  7860. retrieve3: k,
  7861. slice: P,
  7862. normalizeCssArray: L,
  7863. assert: O,
  7864. trim: z,
  7865. setAsPrimitive: E,
  7866. isPrimitive: R,
  7867. createHashMap: N,
  7868. concatArray: F,
  7869. noop: G
  7870. }),
  7871. Fg = "undefined" == typeof Float32Array ? Array : Float32Array,
  7872. Gg = q,
  7873. Vg = Z,
  7874. Hg = ee,
  7875. Wg = ie,
  7876. Ug = (Object.freeze || Object)({
  7877. create: V,
  7878. copy: H,
  7879. clone: W,
  7880. set: U,
  7881. add: X,
  7882. scaleAndAdd: Y,
  7883. sub: j,
  7884. len: q,
  7885. length: Gg,
  7886. lenSquare: Z,
  7887. lengthSquare: Vg,
  7888. mul: K,
  7889. div: $,
  7890. dot: Q,
  7891. scale: J,
  7892. normalize: te,
  7893. distance: ee,
  7894. dist: Hg,
  7895. distanceSquare: ie,
  7896. distSquare: Wg,
  7897. negate: ne,
  7898. lerp: re,
  7899. applyTransform: ae,
  7900. min: oe,
  7901. max: se
  7902. });
  7903. le.prototype = {
  7904. constructor: le,
  7905. _dragStart: function (t) {
  7906. var e = t.target;
  7907. e && e.draggable && (this._draggingTarget = e, e.dragging = !0, this._x = t.offsetX, this._y = t.offsetY, this.dispatchToElement(ue(e, t), "dragstart", t.event));
  7908. },
  7909. _drag: function (t) {
  7910. var e = this._draggingTarget;
  7911. if (e) {
  7912. var i = t.offsetX,
  7913. n = t.offsetY,
  7914. r = i - this._x,
  7915. a = n - this._y;
  7916. this._x = i, this._y = n, e.drift(r, a, t), this.dispatchToElement(ue(e, t), "drag", t.event);
  7917. var o = this.findHover(i, n, e).target,
  7918. s = this._dropTarget;
  7919. this._dropTarget = o, e !== o && (s && o !== s && this.dispatchToElement(ue(s, t), "dragleave", t.event), o && o !== s && this.dispatchToElement(ue(o, t), "dragenter", t.event));
  7920. }
  7921. },
  7922. _dragEnd: function (t) {
  7923. var e = this._draggingTarget;
  7924. e && (e.dragging = !1), this.dispatchToElement(ue(e, t), "dragend", t.event), this._dropTarget && this.dispatchToElement(ue(this._dropTarget, t), "drop", t.event), this._draggingTarget = null, this._dropTarget = null;
  7925. }
  7926. };
  7927. var Xg = Array.prototype.slice,
  7928. Yg = function (t) {
  7929. this._$handlers = {}, this._$eventProcessor = t;
  7930. };
  7931. Yg.prototype = {
  7932. constructor: Yg,
  7933. one: function (t, e, i, n) {
  7934. return ce(this, t, e, i, n, !0);
  7935. },
  7936. on: function (t, e, i, n) {
  7937. return ce(this, t, e, i, n, !1);
  7938. },
  7939. isSilent: function (t) {
  7940. var e = this._$handlers;
  7941. return !e[t] || !e[t].length;
  7942. },
  7943. off: function (t, e) {
  7944. var i = this._$handlers;
  7945. if (!t) return this._$handlers = {}, this;
  7946. if (e) {
  7947. if (i[t]) {
  7948. for (var n = [], r = 0, a = i[t].length; a > r; r++) i[t][r].h !== e && n.push(i[t][r]);
  7949. i[t] = n;
  7950. }
  7951. i[t] && 0 === i[t].length && delete i[t];
  7952. } else delete i[t];
  7953. return this;
  7954. },
  7955. trigger: function (t) {
  7956. var e = this._$handlers[t],
  7957. i = this._$eventProcessor;
  7958. if (e) {
  7959. var n = arguments,
  7960. r = n.length;
  7961. r > 3 && (n = Xg.call(n, 1));
  7962. for (var a = e.length, o = 0; a > o;) {
  7963. var s = e[o];
  7964. if (i && i.filter && null != s.query && !i.filter(t, s.query)) o++;else {
  7965. switch (r) {
  7966. case 1:
  7967. s.h.call(s.ctx);
  7968. break;
  7969. case 2:
  7970. s.h.call(s.ctx, n[1]);
  7971. break;
  7972. case 3:
  7973. s.h.call(s.ctx, n[1], n[2]);
  7974. break;
  7975. default:
  7976. s.h.apply(s.ctx, n);
  7977. }
  7978. s.one ? (e.splice(o, 1), a--) : o++;
  7979. }
  7980. }
  7981. }
  7982. return i && i.afterTrigger && i.afterTrigger(t), this;
  7983. },
  7984. triggerWithContext: function (t) {
  7985. var e = this._$handlers[t],
  7986. i = this._$eventProcessor;
  7987. if (e) {
  7988. var n = arguments,
  7989. r = n.length;
  7990. r > 4 && (n = Xg.call(n, 1, n.length - 1));
  7991. for (var a = n[n.length - 1], o = e.length, s = 0; o > s;) {
  7992. var l = e[s];
  7993. if (i && i.filter && null != l.query && !i.filter(t, l.query)) s++;else {
  7994. switch (r) {
  7995. case 1:
  7996. l.h.call(a);
  7997. break;
  7998. case 2:
  7999. l.h.call(a, n[1]);
  8000. break;
  8001. case 3:
  8002. l.h.call(a, n[1], n[2]);
  8003. break;
  8004. default:
  8005. l.h.apply(a, n);
  8006. }
  8007. l.one ? (e.splice(s, 1), o--) : s++;
  8008. }
  8009. }
  8010. }
  8011. return i && i.afterTrigger && i.afterTrigger(t), this;
  8012. }
  8013. };
  8014. var jg = Math.log(2),
  8015. qg = "undefined" != typeof window && !!window.addEventListener,
  8016. Zg = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
  8017. Kg = "___zrEVENTSAVED",
  8018. $g = [],
  8019. Qg = qg ? function (t) {
  8020. t.preventDefault(), t.stopPropagation(), t.cancelBubble = !0;
  8021. } : function (t) {
  8022. t.returnValue = !1, t.cancelBubble = !0;
  8023. },
  8024. Jg = function () {
  8025. this._track = [];
  8026. };
  8027. Jg.prototype = {
  8028. constructor: Jg,
  8029. recognize: function (t, e, i) {
  8030. return this._doTrack(t, e, i), this._recognize(t);
  8031. },
  8032. clear: function () {
  8033. return this._track.length = 0, this;
  8034. },
  8035. _doTrack: function (t, e, i) {
  8036. var n = t.touches;
  8037. if (n) {
  8038. for (var r = {
  8039. points: [],
  8040. touches: [],
  8041. target: e,
  8042. event: t
  8043. }, a = 0, o = n.length; o > a; a++) {
  8044. var s = n[a],
  8045. l = pe(i, s, {});
  8046. r.points.push([l.zrX, l.zrY]), r.touches.push(s);
  8047. }
  8048. this._track.push(r);
  8049. }
  8050. },
  8051. _recognize: function (t) {
  8052. for (var e in tm) if (tm.hasOwnProperty(e)) {
  8053. var i = tm[e](this._track, t);
  8054. if (i) return i;
  8055. }
  8056. }
  8057. };
  8058. var tm = {
  8059. pinch: function (t, e) {
  8060. var i = t.length;
  8061. if (i) {
  8062. var n = (t[i - 1] || {}).points,
  8063. r = (t[i - 2] || {}).points || n;
  8064. if (r && r.length > 1 && n && n.length > 1) {
  8065. var a = be(n) / be(r);
  8066. !isFinite(a) && (a = 1), e.pinchScale = a;
  8067. var o = Se(n);
  8068. return e.pinchX = o[0], e.pinchY = o[1], {
  8069. type: "pinch",
  8070. target: t[0].target,
  8071. event: e
  8072. };
  8073. }
  8074. }
  8075. }
  8076. },
  8077. em = "silent";
  8078. Te.prototype.dispose = function () {};
  8079. var im = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"],
  8080. nm = function (t, e, i, n) {
  8081. Yg.call(this), this.storage = t, this.painter = e, this.painterRoot = n, i = i || new Te(), this.proxy = null, this._hovered = {}, this._lastTouchMoment, this._lastX, this._lastY, this._gestureMgr, le.call(this), this.setHandlerProxy(i);
  8082. };
  8083. nm.prototype = {
  8084. constructor: nm,
  8085. setHandlerProxy: function (t) {
  8086. this.proxy && this.proxy.dispose(), t && (f(im, function (e) {
  8087. t.on && t.on(e, this[e], this);
  8088. }, this), t.handler = this), this.proxy = t;
  8089. },
  8090. mousemove: function (t) {
  8091. var e = t.zrX,
  8092. i = t.zrY,
  8093. n = this._hovered,
  8094. r = n.target;
  8095. r && !r.__zr && (n = this.findHover(n.x, n.y), r = n.target);
  8096. var a = this._hovered = this.findHover(e, i),
  8097. o = a.target,
  8098. s = this.proxy;
  8099. s.setCursor && s.setCursor(o ? o.cursor : "default"), r && o !== r && this.dispatchToElement(n, "mouseout", t), this.dispatchToElement(a, "mousemove", t), o && o !== r && this.dispatchToElement(a, "mouseover", t);
  8100. },
  8101. mouseout: function (t) {
  8102. this.dispatchToElement(this._hovered, "mouseout", t);
  8103. var e,
  8104. i = t.toElement || t.relatedTarget;
  8105. do i = i && i.parentNode; while (i && 9 !== i.nodeType && !(e = i === this.painterRoot));
  8106. !e && this.trigger("globalout", {
  8107. event: t
  8108. });
  8109. },
  8110. resize: function () {
  8111. this._hovered = {};
  8112. },
  8113. dispatch: function (t, e) {
  8114. var i = this[t];
  8115. i && i.call(this, e);
  8116. },
  8117. dispose: function () {
  8118. this.proxy.dispose(), this.storage = this.proxy = this.painter = null;
  8119. },
  8120. setCursorStyle: function (t) {
  8121. var e = this.proxy;
  8122. e.setCursor && e.setCursor(t);
  8123. },
  8124. dispatchToElement: function (t, e, i) {
  8125. t = t || {};
  8126. var n = t.target;
  8127. if (!n || !n.silent) {
  8128. for (var r = "on" + e, a = Me(e, t, i); n && (n[r] && (a.cancelBubble = n[r].call(n, a)), n.trigger(e, a), n = n.parent, !a.cancelBubble););
  8129. a.cancelBubble || (this.trigger(e, a), this.painter && this.painter.eachOtherLayer(function (t) {
  8130. "function" == typeof t[r] && t[r].call(t, a), t.trigger && t.trigger(e, a);
  8131. }));
  8132. }
  8133. },
  8134. findHover: function (t, e, i) {
  8135. for (var n = this.storage.getDisplayList(), r = {
  8136. x: t,
  8137. y: e
  8138. }, a = n.length - 1; a >= 0; a--) {
  8139. var o;
  8140. if (n[a] !== i && !n[a].ignore && (o = Ce(n[a], t, e)) && (!r.topTarget && (r.topTarget = n[a]), o !== em)) {
  8141. r.target = n[a];
  8142. break;
  8143. }
  8144. }
  8145. return r;
  8146. },
  8147. processGesture: function (t, e) {
  8148. this._gestureMgr || (this._gestureMgr = new Jg());
  8149. var i = this._gestureMgr;
  8150. "start" === e && i.clear();
  8151. var n = i.recognize(t, this.findHover(t.zrX, t.zrY, null).target, this.proxy.dom);
  8152. if ("end" === e && i.clear(), n) {
  8153. var r = n.type;
  8154. t.gestureEvent = r, this.dispatchToElement({
  8155. target: n.target
  8156. }, r, n.event);
  8157. }
  8158. }
  8159. }, f(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function (t) {
  8160. nm.prototype[t] = function (e) {
  8161. var i = this.findHover(e.zrX, e.zrY),
  8162. n = i.target;
  8163. if ("mousedown" === t) this._downEl = n, this._downPoint = [e.zrX, e.zrY], this._upEl = n;else if ("mouseup" === t) this._upEl = n;else if ("click" === t) {
  8164. if (this._downEl !== this._upEl || !this._downPoint || Hg(this._downPoint, [e.zrX, e.zrY]) > 4) return;
  8165. this._downPoint = null;
  8166. }
  8167. this.dispatchToElement(i, t, e);
  8168. };
  8169. }), c(nm, Yg), c(nm, le);
  8170. var rm = "undefined" == typeof Float32Array ? Array : Float32Array,
  8171. am = (Object.freeze || Object)({
  8172. create: De,
  8173. identity: Ae,
  8174. copy: ke,
  8175. mul: Pe,
  8176. translate: Le,
  8177. rotate: Oe,
  8178. scale: ze,
  8179. invert: Ee,
  8180. clone: Re
  8181. }),
  8182. om = Ae,
  8183. sm = 5e-5,
  8184. lm = function (t) {
  8185. t = t || {}, t.position || (this.position = [0, 0]), null == t.rotation && (this.rotation = 0), t.scale || (this.scale = [1, 1]), this.origin = this.origin || null;
  8186. },
  8187. um = lm.prototype;
  8188. um.transform = null, um.needLocalTransform = function () {
  8189. return Be(this.rotation) || Be(this.position[0]) || Be(this.position[1]) || Be(this.scale[0] - 1) || Be(this.scale[1] - 1);
  8190. };
  8191. var hm = [];
  8192. um.updateTransform = function () {
  8193. var t = this.parent,
  8194. e = t && t.transform,
  8195. i = this.needLocalTransform(),
  8196. n = this.transform;
  8197. if (!i && !e) return void (n && om(n));
  8198. n = n || De(), i ? this.getLocalTransform(n) : om(n), e && (i ? Pe(n, t.transform, n) : ke(n, t.transform)), this.transform = n;
  8199. var r = this.globalScaleRatio;
  8200. if (null != r && 1 !== r) {
  8201. this.getGlobalScale(hm);
  8202. var a = hm[0] < 0 ? -1 : 1,
  8203. o = hm[1] < 0 ? -1 : 1,
  8204. s = ((hm[0] - a) * r + a) / hm[0] || 0,
  8205. l = ((hm[1] - o) * r + o) / hm[1] || 0;
  8206. n[0] *= s, n[1] *= s, n[2] *= l, n[3] *= l;
  8207. }
  8208. this.invTransform = this.invTransform || De(), Ee(this.invTransform, n);
  8209. }, um.getLocalTransform = function (t) {
  8210. return lm.getLocalTransform(this, t);
  8211. }, um.setTransform = function (t) {
  8212. var e = this.transform,
  8213. i = t.dpr || 1;
  8214. 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);
  8215. }, um.restoreTransform = function (t) {
  8216. var e = t.dpr || 1;
  8217. t.setTransform(e, 0, 0, e, 0, 0);
  8218. };
  8219. var cm = [],
  8220. dm = De();
  8221. um.setLocalTransform = function (t) {
  8222. if (t) {
  8223. var e = t[0] * t[0] + t[1] * t[1],
  8224. i = t[2] * t[2] + t[3] * t[3],
  8225. n = this.position,
  8226. r = this.scale;
  8227. Be(e - 1) && (e = Math.sqrt(e)), Be(i - 1) && (i = Math.sqrt(i)), t[0] < 0 && (e = -e), t[3] < 0 && (i = -i), n[0] = t[4], n[1] = t[5], r[0] = e, r[1] = i, this.rotation = Math.atan2(-t[1] / i, t[0] / e);
  8228. }
  8229. }, um.decomposeTransform = function () {
  8230. if (this.transform) {
  8231. var t = this.parent,
  8232. e = this.transform;
  8233. t && t.transform && (Pe(cm, t.invTransform, e), e = cm);
  8234. var i = this.origin;
  8235. i && (i[0] || i[1]) && (dm[4] = i[0], dm[5] = i[1], Pe(cm, e, dm), cm[4] -= i[0], cm[5] -= i[1], e = cm), this.setLocalTransform(e);
  8236. }
  8237. }, um.getGlobalScale = function (t) {
  8238. var e = this.transform;
  8239. 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]), e[0] < 0 && (t[0] = -t[0]), e[3] < 0 && (t[1] = -t[1]), t) : (t[0] = 1, t[1] = 1, t);
  8240. }, um.transformCoordToLocal = function (t, e) {
  8241. var i = [t, e],
  8242. n = this.invTransform;
  8243. return n && ae(i, i, n), i;
  8244. }, um.transformCoordToGlobal = function (t, e) {
  8245. var i = [t, e],
  8246. n = this.transform;
  8247. return n && ae(i, i, n), i;
  8248. }, lm.getLocalTransform = function (t, e) {
  8249. e = e || [], om(e);
  8250. var i = t.origin,
  8251. n = t.scale || [1, 1],
  8252. r = t.rotation || 0,
  8253. a = t.position || [0, 0];
  8254. return i && (e[4] -= i[0], e[5] -= i[1]), ze(e, e, n), r && Oe(e, e, r), i && (e[4] += i[0], e[5] += i[1]), e[4] += a[0], e[5] += a[1], e;
  8255. };
  8256. var fm = {
  8257. linear: function (t) {
  8258. return t;
  8259. },
  8260. quadraticIn: function (t) {
  8261. return t * t;
  8262. },
  8263. quadraticOut: function (t) {
  8264. return t * (2 - t);
  8265. },
  8266. quadraticInOut: function (t) {
  8267. return (t *= 2) < 1 ? .5 * t * t : -.5 * (--t * (t - 2) - 1);
  8268. },
  8269. cubicIn: function (t) {
  8270. return t * t * t;
  8271. },
  8272. cubicOut: function (t) {
  8273. return --t * t * t + 1;
  8274. },
  8275. cubicInOut: function (t) {
  8276. return (t *= 2) < 1 ? .5 * t * t * t : .5 * ((t -= 2) * t * t + 2);
  8277. },
  8278. quarticIn: function (t) {
  8279. return t * t * t * t;
  8280. },
  8281. quarticOut: function (t) {
  8282. return 1 - --t * t * t * t;
  8283. },
  8284. quarticInOut: function (t) {
  8285. return (t *= 2) < 1 ? .5 * t * t * t * t : -.5 * ((t -= 2) * t * t * t - 2);
  8286. },
  8287. quinticIn: function (t) {
  8288. return t * t * t * t * t;
  8289. },
  8290. quinticOut: function (t) {
  8291. return --t * t * t * t * t + 1;
  8292. },
  8293. quinticInOut: function (t) {
  8294. return (t *= 2) < 1 ? .5 * t * t * t * t * t : .5 * ((t -= 2) * t * t * t * t + 2);
  8295. },
  8296. sinusoidalIn: function (t) {
  8297. return 1 - Math.cos(t * Math.PI / 2);
  8298. },
  8299. sinusoidalOut: function (t) {
  8300. return Math.sin(t * Math.PI / 2);
  8301. },
  8302. sinusoidalInOut: function (t) {
  8303. return .5 * (1 - Math.cos(Math.PI * t));
  8304. },
  8305. exponentialIn: function (t) {
  8306. return 0 === t ? 0 : Math.pow(1024, t - 1);
  8307. },
  8308. exponentialOut: function (t) {
  8309. return 1 === t ? 1 : 1 - Math.pow(2, -10 * t);
  8310. },
  8311. exponentialInOut: function (t) {
  8312. return 0 === t ? 0 : 1 === t ? 1 : (t *= 2) < 1 ? .5 * Math.pow(1024, t - 1) : .5 * (-Math.pow(2, -10 * (t - 1)) + 2);
  8313. },
  8314. circularIn: function (t) {
  8315. return 1 - Math.sqrt(1 - t * t);
  8316. },
  8317. circularOut: function (t) {
  8318. return Math.sqrt(1 - --t * t);
  8319. },
  8320. circularInOut: function (t) {
  8321. return (t *= 2) < 1 ? -.5 * (Math.sqrt(1 - t * t) - 1) : .5 * (Math.sqrt(1 - (t -= 2) * t) + 1);
  8322. },
  8323. elasticIn: function (t) {
  8324. var e,
  8325. i = .1,
  8326. n = .4;
  8327. return 0 === t ? 0 : 1 === t ? 1 : (!i || 1 > i ? (i = 1, e = n / 4) : e = n * Math.asin(1 / i) / (2 * Math.PI), -(i * Math.pow(2, 10 * (t -= 1)) * Math.sin(2 * (t - e) * Math.PI / n)));
  8328. },
  8329. elasticOut: function (t) {
  8330. var e,
  8331. i = .1,
  8332. n = .4;
  8333. return 0 === t ? 0 : 1 === t ? 1 : (!i || 1 > i ? (i = 1, e = n / 4) : e = n * Math.asin(1 / i) / (2 * Math.PI), i * Math.pow(2, -10 * t) * Math.sin(2 * (t - e) * Math.PI / n) + 1);
  8334. },
  8335. elasticInOut: function (t) {
  8336. var e,
  8337. i = .1,
  8338. n = .4;
  8339. return 0 === t ? 0 : 1 === t ? 1 : (!i || 1 > i ? (i = 1, e = n / 4) : e = n * Math.asin(1 / i) / (2 * Math.PI), (t *= 2) < 1 ? -.5 * i * Math.pow(2, 10 * (t -= 1)) * Math.sin(2 * (t - e) * Math.PI / n) : i * Math.pow(2, -10 * (t -= 1)) * Math.sin(2 * (t - e) * Math.PI / n) * .5 + 1);
  8340. },
  8341. backIn: function (t) {
  8342. var e = 1.70158;
  8343. return t * t * ((e + 1) * t - e);
  8344. },
  8345. backOut: function (t) {
  8346. var e = 1.70158;
  8347. return --t * t * ((e + 1) * t + e) + 1;
  8348. },
  8349. backInOut: function (t) {
  8350. var e = 2.5949095;
  8351. return (t *= 2) < 1 ? .5 * t * t * ((e + 1) * t - e) : .5 * ((t -= 2) * t * ((e + 1) * t + e) + 2);
  8352. },
  8353. bounceIn: function (t) {
  8354. return 1 - fm.bounceOut(1 - t);
  8355. },
  8356. bounceOut: function (t) {
  8357. return 1 / 2.75 > t ? 7.5625 * t * t : 2 / 2.75 > t ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : 2.5 / 2.75 > t ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;
  8358. },
  8359. bounceInOut: function (t) {
  8360. return .5 > t ? .5 * fm.bounceIn(2 * t) : .5 * fm.bounceOut(2 * t - 1) + .5;
  8361. }
  8362. };
  8363. Ne.prototype = {
  8364. constructor: Ne,
  8365. step: function (t, e) {
  8366. if (this._initialized || (this._startTime = t + this._delay, this._initialized = !0), this._paused) return void (this._pausedTime += e);
  8367. var i = (t - this._startTime - this._pausedTime) / this._life;
  8368. if (!(0 > i)) {
  8369. i = Math.min(i, 1);
  8370. var n = this.easing,
  8371. r = "string" == typeof n ? fm[n] : n,
  8372. a = "function" == typeof r ? r(i) : i;
  8373. return this.fire("frame", a), 1 === i ? this.loop ? (this.restart(t), "restart") : (this._needsRemove = !0, "destroy") : null;
  8374. }
  8375. },
  8376. restart: function (t) {
  8377. var e = (t - this._startTime - this._pausedTime) % this._life;
  8378. this._startTime = t - e + this.gap, this._pausedTime = 0, this._needsRemove = !1;
  8379. },
  8380. fire: function (t, e) {
  8381. t = "on" + t, this[t] && this[t](this._target, e);
  8382. },
  8383. pause: function () {
  8384. this._paused = !0;
  8385. },
  8386. resume: function () {
  8387. this._paused = !1;
  8388. }
  8389. };
  8390. var pm = function () {
  8391. this.head = null, this.tail = null, this._len = 0;
  8392. },
  8393. gm = pm.prototype;
  8394. gm.insert = function (t) {
  8395. var e = new mm(t);
  8396. return this.insertEntry(e), e;
  8397. }, gm.insertEntry = function (t) {
  8398. this.head ? (this.tail.next = t, t.prev = this.tail, t.next = null, this.tail = t) : this.head = this.tail = t, this._len++;
  8399. }, gm.remove = function (t) {
  8400. var e = t.prev,
  8401. i = t.next;
  8402. e ? e.next = i : this.head = i, i ? i.prev = e : this.tail = e, t.next = t.prev = null, this._len--;
  8403. }, gm.len = function () {
  8404. return this._len;
  8405. }, gm.clear = function () {
  8406. this.head = this.tail = null, this._len = 0;
  8407. };
  8408. var mm = function (t) {
  8409. this.value = t, this.next, this.prev;
  8410. },
  8411. vm = function (t) {
  8412. this._list = new pm(), this._map = {}, this._maxSize = t || 10, this._lastRemovedEntry = null;
  8413. },
  8414. ym = vm.prototype;
  8415. ym.put = function (t, e) {
  8416. var i = this._list,
  8417. n = this._map,
  8418. r = null;
  8419. if (null == n[t]) {
  8420. var a = i.len(),
  8421. o = this._lastRemovedEntry;
  8422. if (a >= this._maxSize && a > 0) {
  8423. var s = i.head;
  8424. i.remove(s), delete n[s.key], r = s.value, this._lastRemovedEntry = s;
  8425. }
  8426. o ? o.value = e : o = new mm(e), o.key = t, i.insertEntry(o), n[t] = o;
  8427. }
  8428. return r;
  8429. }, ym.get = function (t) {
  8430. var e = this._map[t],
  8431. i = this._list;
  8432. return null != e ? (e !== i.tail && (i.remove(e), i.insertEntry(e)), e.value) : void 0;
  8433. }, ym.clear = function () {
  8434. this._list.clear(), this._map = {};
  8435. };
  8436. var _m = {
  8437. transparent: [0, 0, 0, 0],
  8438. aliceblue: [240, 248, 255, 1],
  8439. antiquewhite: [250, 235, 215, 1],
  8440. aqua: [0, 255, 255, 1],
  8441. aquamarine: [127, 255, 212, 1],
  8442. azure: [240, 255, 255, 1],
  8443. beige: [245, 245, 220, 1],
  8444. bisque: [255, 228, 196, 1],
  8445. black: [0, 0, 0, 1],
  8446. blanchedalmond: [255, 235, 205, 1],
  8447. blue: [0, 0, 255, 1],
  8448. blueviolet: [138, 43, 226, 1],
  8449. brown: [165, 42, 42, 1],
  8450. burlywood: [222, 184, 135, 1],
  8451. cadetblue: [95, 158, 160, 1],
  8452. chartreuse: [127, 255, 0, 1],
  8453. chocolate: [210, 105, 30, 1],
  8454. coral: [255, 127, 80, 1],
  8455. cornflowerblue: [100, 149, 237, 1],
  8456. cornsilk: [255, 248, 220, 1],
  8457. crimson: [220, 20, 60, 1],
  8458. cyan: [0, 255, 255, 1],
  8459. darkblue: [0, 0, 139, 1],
  8460. darkcyan: [0, 139, 139, 1],
  8461. darkgoldenrod: [184, 134, 11, 1],
  8462. darkgray: [169, 169, 169, 1],
  8463. darkgreen: [0, 100, 0, 1],
  8464. darkgrey: [169, 169, 169, 1],
  8465. darkkhaki: [189, 183, 107, 1],
  8466. darkmagenta: [139, 0, 139, 1],
  8467. darkolivegreen: [85, 107, 47, 1],
  8468. darkorange: [255, 140, 0, 1],
  8469. darkorchid: [153, 50, 204, 1],
  8470. darkred: [139, 0, 0, 1],
  8471. darksalmon: [233, 150, 122, 1],
  8472. darkseagreen: [143, 188, 143, 1],
  8473. darkslateblue: [72, 61, 139, 1],
  8474. darkslategray: [47, 79, 79, 1],
  8475. darkslategrey: [47, 79, 79, 1],
  8476. darkturquoise: [0, 206, 209, 1],
  8477. darkviolet: [148, 0, 211, 1],
  8478. deeppink: [255, 20, 147, 1],
  8479. deepskyblue: [0, 191, 255, 1],
  8480. dimgray: [105, 105, 105, 1],
  8481. dimgrey: [105, 105, 105, 1],
  8482. dodgerblue: [30, 144, 255, 1],
  8483. firebrick: [178, 34, 34, 1],
  8484. floralwhite: [255, 250, 240, 1],
  8485. forestgreen: [34, 139, 34, 1],
  8486. fuchsia: [255, 0, 255, 1],
  8487. gainsboro: [220, 220, 220, 1],
  8488. ghostwhite: [248, 248, 255, 1],
  8489. gold: [255, 215, 0, 1],
  8490. goldenrod: [218, 165, 32, 1],
  8491. gray: [128, 128, 128, 1],
  8492. green: [0, 128, 0, 1],
  8493. greenyellow: [173, 255, 47, 1],
  8494. grey: [128, 128, 128, 1],
  8495. honeydew: [240, 255, 240, 1],
  8496. hotpink: [255, 105, 180, 1],
  8497. indianred: [205, 92, 92, 1],
  8498. indigo: [75, 0, 130, 1],
  8499. ivory: [255, 255, 240, 1],
  8500. khaki: [240, 230, 140, 1],
  8501. lavender: [230, 230, 250, 1],
  8502. lavenderblush: [255, 240, 245, 1],
  8503. lawngreen: [124, 252, 0, 1],
  8504. lemonchiffon: [255, 250, 205, 1],
  8505. lightblue: [173, 216, 230, 1],
  8506. lightcoral: [240, 128, 128, 1],
  8507. lightcyan: [224, 255, 255, 1],
  8508. lightgoldenrodyellow: [250, 250, 210, 1],
  8509. lightgray: [211, 211, 211, 1],
  8510. lightgreen: [144, 238, 144, 1],
  8511. lightgrey: [211, 211, 211, 1],
  8512. lightpink: [255, 182, 193, 1],
  8513. lightsalmon: [255, 160, 122, 1],
  8514. lightseagreen: [32, 178, 170, 1],
  8515. lightskyblue: [135, 206, 250, 1],
  8516. lightslategray: [119, 136, 153, 1],
  8517. lightslategrey: [119, 136, 153, 1],
  8518. lightsteelblue: [176, 196, 222, 1],
  8519. lightyellow: [255, 255, 224, 1],
  8520. lime: [0, 255, 0, 1],
  8521. limegreen: [50, 205, 50, 1],
  8522. linen: [250, 240, 230, 1],
  8523. magenta: [255, 0, 255, 1],
  8524. maroon: [128, 0, 0, 1],
  8525. mediumaquamarine: [102, 205, 170, 1],
  8526. mediumblue: [0, 0, 205, 1],
  8527. mediumorchid: [186, 85, 211, 1],
  8528. mediumpurple: [147, 112, 219, 1],
  8529. mediumseagreen: [60, 179, 113, 1],
  8530. mediumslateblue: [123, 104, 238, 1],
  8531. mediumspringgreen: [0, 250, 154, 1],
  8532. mediumturquoise: [72, 209, 204, 1],
  8533. mediumvioletred: [199, 21, 133, 1],
  8534. midnightblue: [25, 25, 112, 1],
  8535. mintcream: [245, 255, 250, 1],
  8536. mistyrose: [255, 228, 225, 1],
  8537. moccasin: [255, 228, 181, 1],
  8538. navajowhite: [255, 222, 173, 1],
  8539. navy: [0, 0, 128, 1],
  8540. oldlace: [253, 245, 230, 1],
  8541. olive: [128, 128, 0, 1],
  8542. olivedrab: [107, 142, 35, 1],
  8543. orange: [255, 165, 0, 1],
  8544. orangered: [255, 69, 0, 1],
  8545. orchid: [218, 112, 214, 1],
  8546. palegoldenrod: [238, 232, 170, 1],
  8547. palegreen: [152, 251, 152, 1],
  8548. paleturquoise: [175, 238, 238, 1],
  8549. palevioletred: [219, 112, 147, 1],
  8550. papayawhip: [255, 239, 213, 1],
  8551. peachpuff: [255, 218, 185, 1],
  8552. peru: [205, 133, 63, 1],
  8553. pink: [255, 192, 203, 1],
  8554. plum: [221, 160, 221, 1],
  8555. powderblue: [176, 224, 230, 1],
  8556. purple: [128, 0, 128, 1],
  8557. red: [255, 0, 0, 1],
  8558. rosybrown: [188, 143, 143, 1],
  8559. royalblue: [65, 105, 225, 1],
  8560. saddlebrown: [139, 69, 19, 1],
  8561. salmon: [250, 128, 114, 1],
  8562. sandybrown: [244, 164, 96, 1],
  8563. seagreen: [46, 139, 87, 1],
  8564. seashell: [255, 245, 238, 1],
  8565. sienna: [160, 82, 45, 1],
  8566. silver: [192, 192, 192, 1],
  8567. skyblue: [135, 206, 235, 1],
  8568. slateblue: [106, 90, 205, 1],
  8569. slategray: [112, 128, 144, 1],
  8570. slategrey: [112, 128, 144, 1],
  8571. snow: [255, 250, 250, 1],
  8572. springgreen: [0, 255, 127, 1],
  8573. steelblue: [70, 130, 180, 1],
  8574. tan: [210, 180, 140, 1],
  8575. teal: [0, 128, 128, 1],
  8576. thistle: [216, 191, 216, 1],
  8577. tomato: [255, 99, 71, 1],
  8578. turquoise: [64, 224, 208, 1],
  8579. violet: [238, 130, 238, 1],
  8580. wheat: [245, 222, 179, 1],
  8581. white: [255, 255, 255, 1],
  8582. whitesmoke: [245, 245, 245, 1],
  8583. yellow: [255, 255, 0, 1],
  8584. yellowgreen: [154, 205, 50, 1]
  8585. },
  8586. xm = new vm(20),
  8587. wm = null,
  8588. bm = ti,
  8589. Sm = ei,
  8590. Mm = (Object.freeze || Object)({
  8591. parse: Ze,
  8592. lift: Qe,
  8593. toHex: Je,
  8594. fastLerp: ti,
  8595. fastMapToColor: bm,
  8596. lerp: ei,
  8597. mapToColor: Sm,
  8598. modifyHSL: ii,
  8599. modifyAlpha: ni,
  8600. stringify: ri
  8601. }),
  8602. Im = Array.prototype.slice,
  8603. Tm = function (t, e, i, n) {
  8604. this._tracks = {}, this._target = t, this._loop = e || !1, this._getter = i || ai, this._setter = n || oi, this._clipCount = 0, this._delay = 0, this._doneList = [], this._onframeList = [], this._clipList = [];
  8605. };
  8606. Tm.prototype = {
  8607. when: function (t, e) {
  8608. var i = this._tracks;
  8609. for (var n in e) if (e.hasOwnProperty(n)) {
  8610. if (!i[n]) {
  8611. i[n] = [];
  8612. var r = this._getter(this._target, n);
  8613. if (null == r) continue;
  8614. 0 !== t && i[n].push({
  8615. time: 0,
  8616. value: pi(r)
  8617. });
  8618. }
  8619. i[n].push({
  8620. time: t,
  8621. value: e[n]
  8622. });
  8623. }
  8624. return this;
  8625. },
  8626. during: function (t) {
  8627. return this._onframeList.push(t), this;
  8628. },
  8629. pause: function () {
  8630. for (var t = 0; t < this._clipList.length; t++) this._clipList[t].pause();
  8631. this._paused = !0;
  8632. },
  8633. resume: function () {
  8634. for (var t = 0; t < this._clipList.length; t++) this._clipList[t].resume();
  8635. this._paused = !1;
  8636. },
  8637. isPaused: function () {
  8638. return !!this._paused;
  8639. },
  8640. _doneCallback: function () {
  8641. this._tracks = {}, this._clipList.length = 0;
  8642. for (var t = this._doneList, e = t.length, i = 0; e > i; i++) t[i].call(this);
  8643. },
  8644. start: function (t, e) {
  8645. var i,
  8646. n = this,
  8647. r = 0,
  8648. a = function () {
  8649. r--, r || n._doneCallback();
  8650. };
  8651. for (var o in this._tracks) if (this._tracks.hasOwnProperty(o)) {
  8652. var s = vi(this, t, a, this._tracks[o], o, e);
  8653. s && (this._clipList.push(s), r++, this.animation && this.animation.addClip(s), i = s);
  8654. }
  8655. if (i) {
  8656. var l = i.onframe;
  8657. i.onframe = function (t, e) {
  8658. l(t, e);
  8659. for (var i = 0; i < n._onframeList.length; i++) n._onframeList[i](t, e);
  8660. };
  8661. }
  8662. return r || this._doneCallback(), this;
  8663. },
  8664. stop: function (t) {
  8665. for (var e = this._clipList, i = this.animation, n = 0; n < e.length; n++) {
  8666. var r = e[n];
  8667. t && r.onframe(this._target, 1), i && i.removeClip(r);
  8668. }
  8669. e.length = 0;
  8670. },
  8671. delay: function (t) {
  8672. return this._delay = t, this;
  8673. },
  8674. done: function (t) {
  8675. return t && this._doneList.push(t), this;
  8676. },
  8677. getClips: function () {
  8678. return this._clipList;
  8679. }
  8680. };
  8681. var Cm = 1;
  8682. "undefined" != typeof window && (Cm = Math.max(window.devicePixelRatio || 1, 1));
  8683. var Dm = 0,
  8684. Am = Cm,
  8685. km = function () {};
  8686. 1 === Dm && (km = console.error);
  8687. var Pm = km,
  8688. Lm = function () {
  8689. this.animators = [];
  8690. };
  8691. Lm.prototype = {
  8692. constructor: Lm,
  8693. animate: function (t, e) {
  8694. var i,
  8695. n = !1,
  8696. r = this,
  8697. a = this.__zr;
  8698. if (t) {
  8699. var o = t.split("."),
  8700. s = r;
  8701. n = "shape" === o[0];
  8702. for (var l = 0, h = o.length; h > l; l++) s && (s = s[o[l]]);
  8703. s && (i = s);
  8704. } else i = r;
  8705. if (!i) return void Pm('Property "' + t + '" is not existed in element ' + r.id);
  8706. var c = r.animators,
  8707. d = new Tm(i, e);
  8708. return d.during(function () {
  8709. r.dirty(n);
  8710. }).done(function () {
  8711. c.splice(u(c, d), 1);
  8712. }), c.push(d), a && a.animation.addAnimator(d), d;
  8713. },
  8714. stopAnimation: function (t) {
  8715. for (var e = this.animators, i = e.length, n = 0; i > n; n++) e[n].stop(t);
  8716. return e.length = 0, this;
  8717. },
  8718. animateTo: function (t, e, i, n, r, a) {
  8719. yi(this, t, e, i, n, r, a);
  8720. },
  8721. animateFrom: function (t, e, i, n, r, a) {
  8722. yi(this, t, e, i, n, r, a, !0);
  8723. }
  8724. };
  8725. var Om = function (t) {
  8726. lm.call(this, t), Yg.call(this, t), Lm.call(this, t), this.id = t.id || bg();
  8727. };
  8728. Om.prototype = {
  8729. type: "element",
  8730. name: "",
  8731. __zr: null,
  8732. ignore: !1,
  8733. clipPath: null,
  8734. isGroup: !1,
  8735. drift: function (t, e) {
  8736. switch (this.draggable) {
  8737. case "horizontal":
  8738. e = 0;
  8739. break;
  8740. case "vertical":
  8741. t = 0;
  8742. }
  8743. var i = this.transform;
  8744. i || (i = this.transform = [1, 0, 0, 1, 0, 0]), i[4] += t, i[5] += e, this.decomposeTransform(), this.dirty(!1);
  8745. },
  8746. beforeUpdate: function () {},
  8747. afterUpdate: function () {},
  8748. update: function () {
  8749. this.updateTransform();
  8750. },
  8751. traverse: function () {},
  8752. attrKV: function (t, e) {
  8753. if ("position" === t || "scale" === t || "origin" === t) {
  8754. if (e) {
  8755. var i = this[t];
  8756. i || (i = this[t] = []), i[0] = e[0], i[1] = e[1];
  8757. }
  8758. } else this[t] = e;
  8759. },
  8760. hide: function () {
  8761. this.ignore = !0, this.__zr && this.__zr.refresh();
  8762. },
  8763. show: function () {
  8764. this.ignore = !1, this.__zr && this.__zr.refresh();
  8765. },
  8766. attr: function (t, e) {
  8767. if ("string" == typeof t) this.attrKV(t, e);else if (S(t)) for (var i in t) t.hasOwnProperty(i) && this.attrKV(i, t[i]);
  8768. return this.dirty(!1), this;
  8769. },
  8770. setClipPath: function (t) {
  8771. var e = this.__zr;
  8772. e && t.addSelfToZr(e), this.clipPath && this.clipPath !== t && this.removeClipPath(), this.clipPath = t, t.__zr = e, t.__clipTarget = this, this.dirty(!1);
  8773. },
  8774. removeClipPath: function () {
  8775. var t = this.clipPath;
  8776. t && (t.__zr && t.removeSelfFromZr(t.__zr), t.__zr = null, t.__clipTarget = null, this.clipPath = null, this.dirty(!1));
  8777. },
  8778. addSelfToZr: function (t) {
  8779. this.__zr = t;
  8780. var e = this.animators;
  8781. if (e) for (var i = 0; i < e.length; i++) t.animation.addAnimator(e[i]);
  8782. this.clipPath && this.clipPath.addSelfToZr(t);
  8783. },
  8784. removeSelfFromZr: function (t) {
  8785. this.__zr = null;
  8786. var e = this.animators;
  8787. if (e) for (var i = 0; i < e.length; i++) t.animation.removeAnimator(e[i]);
  8788. this.clipPath && this.clipPath.removeSelfFromZr(t);
  8789. }
  8790. }, c(Om, Lm), c(Om, lm), c(Om, Yg);
  8791. var zm = ae,
  8792. Em = Math.min,
  8793. Rm = Math.max;
  8794. wi.prototype = {
  8795. constructor: wi,
  8796. union: function (t) {
  8797. var e = Em(t.x, this.x),
  8798. i = Em(t.y, this.y);
  8799. this.width = Rm(t.x + t.width, this.x + this.width) - e, this.height = Rm(t.y + t.height, this.y + this.height) - i, this.x = e, this.y = i;
  8800. },
  8801. applyTransform: function () {
  8802. var t = [],
  8803. e = [],
  8804. i = [],
  8805. n = [];
  8806. return function (r) {
  8807. if (r) {
  8808. 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, zm(t, t, r), zm(e, e, r), zm(i, i, r), zm(n, n, r), this.x = Em(t[0], e[0], i[0], n[0]), this.y = Em(t[1], e[1], i[1], n[1]);
  8809. var a = Rm(t[0], e[0], i[0], n[0]),
  8810. o = Rm(t[1], e[1], i[1], n[1]);
  8811. this.width = a - this.x, this.height = o - this.y;
  8812. }
  8813. };
  8814. }(),
  8815. calculateTransform: function (t) {
  8816. var e = this,
  8817. i = t.width / e.width,
  8818. n = t.height / e.height,
  8819. r = De();
  8820. return Le(r, r, [-e.x, -e.y]), ze(r, r, [i, n]), Le(r, r, [t.x, t.y]), r;
  8821. },
  8822. intersect: function (t) {
  8823. if (!t) return !1;
  8824. t instanceof wi || (t = wi.create(t));
  8825. var e = this,
  8826. i = e.x,
  8827. n = e.x + e.width,
  8828. r = e.y,
  8829. a = e.y + e.height,
  8830. o = t.x,
  8831. s = t.x + t.width,
  8832. l = t.y,
  8833. u = t.y + t.height;
  8834. return !(o > n || i > s || l > a || r > u);
  8835. },
  8836. contain: function (t, e) {
  8837. var i = this;
  8838. return t >= i.x && t <= i.x + i.width && e >= i.y && e <= i.y + i.height;
  8839. },
  8840. clone: function () {
  8841. return new wi(this.x, this.y, this.width, this.height);
  8842. },
  8843. copy: function (t) {
  8844. this.x = t.x, this.y = t.y, this.width = t.width, this.height = t.height;
  8845. },
  8846. plain: function () {
  8847. return {
  8848. x: this.x,
  8849. y: this.y,
  8850. width: this.width,
  8851. height: this.height
  8852. };
  8853. }
  8854. }, wi.create = function (t) {
  8855. return new wi(t.x, t.y, t.width, t.height);
  8856. };
  8857. var Bm = function (t) {
  8858. t = t || {}, Om.call(this, t);
  8859. for (var e in t) t.hasOwnProperty(e) && (this[e] = t[e]);
  8860. this._children = [], this.__storage = null, this.__dirty = !0;
  8861. };
  8862. Bm.prototype = {
  8863. constructor: Bm,
  8864. isGroup: !0,
  8865. type: "group",
  8866. silent: !1,
  8867. children: function () {
  8868. return this._children.slice();
  8869. },
  8870. childAt: function (t) {
  8871. return this._children[t];
  8872. },
  8873. childOfName: function (t) {
  8874. for (var e = this._children, i = 0; i < e.length; i++) if (e[i].name === t) return e[i];
  8875. },
  8876. childCount: function () {
  8877. return this._children.length;
  8878. },
  8879. add: function (t) {
  8880. return t && t !== this && t.parent !== this && (this._children.push(t), this._doAdd(t)), this;
  8881. },
  8882. addBefore: function (t, e) {
  8883. if (t && t !== this && t.parent !== this && e && e.parent === this) {
  8884. var i = this._children,
  8885. n = i.indexOf(e);
  8886. n >= 0 && (i.splice(n, 0, t), this._doAdd(t));
  8887. }
  8888. return this;
  8889. },
  8890. _doAdd: function (t) {
  8891. t.parent && t.parent.remove(t), t.parent = this;
  8892. var e = this.__storage,
  8893. i = this.__zr;
  8894. e && e !== t.__storage && (e.addToStorage(t), t instanceof Bm && t.addChildrenToStorage(e)), i && i.refresh();
  8895. },
  8896. remove: function (t) {
  8897. var e = this.__zr,
  8898. i = this.__storage,
  8899. n = this._children,
  8900. r = u(n, t);
  8901. return 0 > r ? this : (n.splice(r, 1), t.parent = null, i && (i.delFromStorage(t), t instanceof Bm && t.delChildrenFromStorage(i)), e && e.refresh(), this);
  8902. },
  8903. removeAll: function () {
  8904. var t,
  8905. e,
  8906. i = this._children,
  8907. n = this.__storage;
  8908. for (e = 0; e < i.length; e++) t = i[e], n && (n.delFromStorage(t), t instanceof Bm && t.delChildrenFromStorage(n)), t.parent = null;
  8909. return i.length = 0, this;
  8910. },
  8911. eachChild: function (t, e) {
  8912. for (var i = this._children, n = 0; n < i.length; n++) {
  8913. var r = i[n];
  8914. t.call(e, r, n);
  8915. }
  8916. return this;
  8917. },
  8918. traverse: function (t, e) {
  8919. for (var i = 0; i < this._children.length; i++) {
  8920. var n = this._children[i];
  8921. t.call(e, n), "group" === n.type && n.traverse(t, e);
  8922. }
  8923. return this;
  8924. },
  8925. addChildrenToStorage: function (t) {
  8926. for (var e = 0; e < this._children.length; e++) {
  8927. var i = this._children[e];
  8928. t.addToStorage(i), i instanceof Bm && i.addChildrenToStorage(t);
  8929. }
  8930. },
  8931. delChildrenFromStorage: function (t) {
  8932. for (var e = 0; e < this._children.length; e++) {
  8933. var i = this._children[e];
  8934. t.delFromStorage(i), i instanceof Bm && i.delChildrenFromStorage(t);
  8935. }
  8936. },
  8937. dirty: function () {
  8938. return this.__dirty = !0, this.__zr && this.__zr.refresh(), this;
  8939. },
  8940. getBoundingRect: function (t) {
  8941. for (var e = null, i = new wi(0, 0, 0, 0), n = t || this._children, r = [], a = 0; a < n.length; a++) {
  8942. var o = n[a];
  8943. if (!o.ignore && !o.invisible) {
  8944. var s = o.getBoundingRect(),
  8945. l = o.getLocalTransform(r);
  8946. l ? (i.copy(s), i.applyTransform(l), e = e || i.clone(), e.union(i)) : (e = e || s.clone(), e.union(s));
  8947. }
  8948. }
  8949. return e || i;
  8950. }
  8951. }, h(Bm, Om);
  8952. var Nm = 32,
  8953. Fm = 7,
  8954. Gm = function () {
  8955. this._roots = [], this._displayList = [], this._displayListLen = 0;
  8956. };
  8957. Gm.prototype = {
  8958. constructor: Gm,
  8959. traverse: function (t, e) {
  8960. for (var i = 0; i < this._roots.length; i++) this._roots[i].traverse(t, e);
  8961. },
  8962. getDisplayList: function (t, e) {
  8963. return e = e || !1, t && this.updateDisplayList(e), this._displayList;
  8964. },
  8965. updateDisplayList: function (t) {
  8966. this._displayListLen = 0;
  8967. for (var e = this._roots, i = this._displayList, n = 0, r = e.length; r > n; n++) this._updateAndAddDisplayable(e[n], null, t);
  8968. i.length = this._displayListLen, Mg.canvasSupported && Ai(i, ki);
  8969. },
  8970. _updateAndAddDisplayable: function (t, e, i) {
  8971. if (!t.ignore || i) {
  8972. t.beforeUpdate(), t.__dirty && t.update(), t.afterUpdate();
  8973. var n = t.clipPath;
  8974. if (n) {
  8975. e = e ? e.slice() : [];
  8976. for (var r = n, a = t; r;) r.parent = a, r.updateTransform(), e.push(r), a = r, r = r.clipPath;
  8977. }
  8978. if (t.isGroup) {
  8979. for (var o = t._children, s = 0; s < o.length; s++) {
  8980. var l = o[s];
  8981. t.__dirty && (l.__dirty = !0), this._updateAndAddDisplayable(l, e, i);
  8982. }
  8983. t.__dirty = !1;
  8984. } else t.__clipPaths = e, this._displayList[this._displayListLen++] = t;
  8985. }
  8986. },
  8987. addRoot: function (t) {
  8988. t.__storage !== this && (t instanceof Bm && t.addChildrenToStorage(this), this.addToStorage(t), this._roots.push(t));
  8989. },
  8990. delRoot: function (t) {
  8991. if (null == t) {
  8992. for (var e = 0; e < this._roots.length; e++) {
  8993. var i = this._roots[e];
  8994. i instanceof Bm && i.delChildrenFromStorage(this);
  8995. }
  8996. return this._roots = [], this._displayList = [], void (this._displayListLen = 0);
  8997. }
  8998. if (t instanceof Array) for (var e = 0, n = t.length; n > e; e++) this.delRoot(t[e]);else {
  8999. var r = u(this._roots, t);
  9000. r >= 0 && (this.delFromStorage(t), this._roots.splice(r, 1), t instanceof Bm && t.delChildrenFromStorage(this));
  9001. }
  9002. },
  9003. addToStorage: function (t) {
  9004. return t && (t.__storage = this, t.dirty(!1)), this;
  9005. },
  9006. delFromStorage: function (t) {
  9007. return t && (t.__storage = null), this;
  9008. },
  9009. dispose: function () {
  9010. this._renderList = this._roots = null;
  9011. },
  9012. displayableSortFunc: ki
  9013. };
  9014. var Vm = {
  9015. shadowBlur: 1,
  9016. shadowOffsetX: 1,
  9017. shadowOffsetY: 1,
  9018. textShadowBlur: 1,
  9019. textShadowOffsetX: 1,
  9020. textShadowOffsetY: 1,
  9021. textBoxShadowBlur: 1,
  9022. textBoxShadowOffsetX: 1,
  9023. textBoxShadowOffsetY: 1
  9024. },
  9025. Hm = function (t, e, i) {
  9026. return Vm.hasOwnProperty(e) ? i *= t.dpr : i;
  9027. },
  9028. Wm = {
  9029. NONE: 0,
  9030. STYLE_BIND: 1,
  9031. PLAIN_TEXT: 2
  9032. },
  9033. Um = 9,
  9034. Xm = [["shadowBlur", 0], ["shadowOffsetX", 0], ["shadowOffsetY", 0], ["shadowColor", "#000"], ["lineCap", "butt"], ["lineJoin", "miter"], ["miterLimit", 10]],
  9035. Ym = function (t) {
  9036. this.extendFrom(t, !1);
  9037. };
  9038. Ym.prototype = {
  9039. constructor: Ym,
  9040. fill: "#000",
  9041. stroke: null,
  9042. opacity: 1,
  9043. fillOpacity: null,
  9044. strokeOpacity: null,
  9045. lineDash: null,
  9046. lineDashOffset: 0,
  9047. shadowBlur: 0,
  9048. shadowOffsetX: 0,
  9049. shadowOffsetY: 0,
  9050. lineWidth: 1,
  9051. strokeNoScale: !1,
  9052. text: null,
  9053. font: null,
  9054. textFont: null,
  9055. fontStyle: null,
  9056. fontWeight: null,
  9057. fontSize: null,
  9058. fontFamily: null,
  9059. textTag: null,
  9060. textFill: "#000",
  9061. textStroke: null,
  9062. textWidth: null,
  9063. textHeight: null,
  9064. textStrokeWidth: 0,
  9065. textLineHeight: null,
  9066. textPosition: "inside",
  9067. textRect: null,
  9068. textOffset: null,
  9069. textAlign: null,
  9070. textVerticalAlign: null,
  9071. textDistance: 5,
  9072. textShadowColor: "transparent",
  9073. textShadowBlur: 0,
  9074. textShadowOffsetX: 0,
  9075. textShadowOffsetY: 0,
  9076. textBoxShadowColor: "transparent",
  9077. textBoxShadowBlur: 0,
  9078. textBoxShadowOffsetX: 0,
  9079. textBoxShadowOffsetY: 0,
  9080. transformText: !1,
  9081. textRotation: 0,
  9082. textOrigin: null,
  9083. textBackgroundColor: null,
  9084. textBorderColor: null,
  9085. textBorderWidth: 0,
  9086. textBorderRadius: 0,
  9087. textPadding: null,
  9088. rich: null,
  9089. truncate: null,
  9090. blend: null,
  9091. bind: function (t, e, i) {
  9092. var n = this,
  9093. r = i && i.style,
  9094. a = !r || t.__attrCachedBy !== Wm.STYLE_BIND;
  9095. t.__attrCachedBy = Wm.STYLE_BIND;
  9096. for (var o = 0; o < Xm.length; o++) {
  9097. var s = Xm[o],
  9098. l = s[0];
  9099. (a || n[l] !== r[l]) && (t[l] = Hm(t, l, n[l] || s[1]));
  9100. }
  9101. if ((a || n.fill !== r.fill) && (t.fillStyle = n.fill), (a || n.stroke !== r.stroke) && (t.strokeStyle = n.stroke), (a || n.opacity !== r.opacity) && (t.globalAlpha = null == n.opacity ? 1 : n.opacity), (a || n.blend !== r.blend) && (t.globalCompositeOperation = n.blend || "source-over"), this.hasStroke()) {
  9102. var u = n.lineWidth;
  9103. t.lineWidth = u / (this.strokeNoScale && e && e.getLineScale ? e.getLineScale() : 1);
  9104. }
  9105. },
  9106. hasFill: function () {
  9107. var t = this.fill;
  9108. return null != t && "none" !== t;
  9109. },
  9110. hasStroke: function () {
  9111. var t = this.stroke;
  9112. return null != t && "none" !== t && this.lineWidth > 0;
  9113. },
  9114. extendFrom: function (t, e) {
  9115. if (t) for (var i in t) !t.hasOwnProperty(i) || e !== !0 && (e === !1 ? this.hasOwnProperty(i) : null == t[i]) || (this[i] = t[i]);
  9116. },
  9117. set: function (t, e) {
  9118. "string" == typeof t ? this[t] = e : this.extendFrom(t, !0);
  9119. },
  9120. clone: function () {
  9121. var t = new this.constructor();
  9122. return t.extendFrom(this, !0), t;
  9123. },
  9124. getGradient: function (t, e, i) {
  9125. for (var n = "radial" === e.type ? Li : Pi, r = n(t, e, i), a = e.colorStops, o = 0; o < a.length; o++) r.addColorStop(a[o].offset, a[o].color);
  9126. return r;
  9127. }
  9128. };
  9129. for (var jm = Ym.prototype, qm = 0; qm < Xm.length; qm++) {
  9130. var Zm = Xm[qm];
  9131. Zm[0] in jm || (jm[Zm[0]] = Zm[1]);
  9132. }
  9133. Ym.getGradient = jm.getGradient;
  9134. var Km = function (t, e) {
  9135. this.image = t, this.repeat = e, this.type = "pattern";
  9136. };
  9137. Km.prototype.getCanvasPattern = function (t) {
  9138. return t.createPattern(this.image, this.repeat || "repeat");
  9139. };
  9140. var $m = function (t, e, i) {
  9141. var n;
  9142. i = i || Am, "string" == typeof t ? n = zi(t, e, i) : S(t) && (n = t, t = n.id), this.id = t, this.dom = n;
  9143. var r = n.style;
  9144. r && (n.onselectstart = Oi, r["-webkit-user-select"] = "none", r["user-select"] = "none", r["-webkit-touch-callout"] = "none", r["-webkit-tap-highlight-color"] = "rgba(0,0,0,0)", r.padding = 0, r.margin = 0, r["border-width"] = 0), this.domBack = null, this.ctxBack = null, this.painter = e, this.config = null, this.clearColor = 0, this.motionBlur = !1, this.lastFrameAlpha = .7, this.dpr = i;
  9145. };
  9146. $m.prototype = {
  9147. constructor: $m,
  9148. __dirty: !0,
  9149. __used: !1,
  9150. __drawIndex: 0,
  9151. __startIndex: 0,
  9152. __endIndex: 0,
  9153. incremental: !1,
  9154. getElementCount: function () {
  9155. return this.__endIndex - this.__startIndex;
  9156. },
  9157. initContext: function () {
  9158. this.ctx = this.dom.getContext("2d"), this.ctx.dpr = this.dpr;
  9159. },
  9160. createBackBuffer: function () {
  9161. var t = this.dpr;
  9162. this.domBack = zi("back-" + this.id, this.painter, t), this.ctxBack = this.domBack.getContext("2d"), 1 !== t && this.ctxBack.scale(t, t);
  9163. },
  9164. resize: function (t, e) {
  9165. var i = this.dpr,
  9166. n = this.dom,
  9167. r = n.style,
  9168. a = this.domBack;
  9169. r && (r.width = t + "px", r.height = e + "px"), n.width = t * i, n.height = e * i, a && (a.width = t * i, a.height = e * i, 1 !== i && this.ctxBack.scale(i, i));
  9170. },
  9171. clear: function (t, e) {
  9172. var i = this.dom,
  9173. n = this.ctx,
  9174. r = i.width,
  9175. a = i.height,
  9176. e = e || this.clearColor,
  9177. o = this.motionBlur && !t,
  9178. s = this.lastFrameAlpha,
  9179. l = this.dpr;
  9180. if (o && (this.domBack || this.createBackBuffer(), this.ctxBack.globalCompositeOperation = "copy", this.ctxBack.drawImage(i, 0, 0, r / l, a / l)), n.clearRect(0, 0, r, a), e && "transparent" !== e) {
  9181. var u;
  9182. e.colorStops ? (u = e.__canvasGradient || Ym.getGradient(n, e, {
  9183. x: 0,
  9184. y: 0,
  9185. width: r,
  9186. height: a
  9187. }), e.__canvasGradient = u) : e.image && (u = Km.prototype.getCanvasPattern.call(e, n)), n.save(), n.fillStyle = u || e, n.fillRect(0, 0, r, a), n.restore();
  9188. }
  9189. if (o) {
  9190. var h = this.domBack;
  9191. n.save(), n.globalAlpha = s, n.drawImage(h, 0, 0, r, a), n.restore();
  9192. }
  9193. }
  9194. };
  9195. var Qm = "undefined" != typeof window && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame) || function (t) {
  9196. setTimeout(t, 16);
  9197. },
  9198. Jm = new vm(50),
  9199. tv = {},
  9200. ev = 0,
  9201. iv = 5e3,
  9202. nv = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,
  9203. rv = "12px sans-serif",
  9204. av = {};
  9205. av.measureText = function (t, e) {
  9206. var i = l();
  9207. return i.font = e || rv, i.measureText(t);
  9208. };
  9209. var ov = rv,
  9210. sv = {
  9211. left: 1,
  9212. right: 1,
  9213. center: 1
  9214. },
  9215. lv = {
  9216. top: 1,
  9217. bottom: 1,
  9218. middle: 1
  9219. },
  9220. uv = [["textShadowBlur", "shadowBlur", 0], ["textShadowOffsetX", "shadowOffsetX", 0], ["textShadowOffsetY", "shadowOffsetY", 0], ["textShadowColor", "shadowColor", "transparent"]],
  9221. hv = {},
  9222. cv = {},
  9223. dv = new wi(),
  9224. fv = function () {};
  9225. // #ifdef MP-WEIXIN
  9226. this.$scope.animate("style",t)
  9227. // #endif
  9228. // #ifndef MP-WEIXIN
  9229. fv.prototype = {
  9230. constructor: fv,
  9231. drawRectText: function (t, e) {
  9232. var i = this.style;
  9233. e = i.textRect || e, this.__dirty && rn(i, !0);
  9234. var n = i.text;
  9235. if (null != n && (n += ""), wn(n, i)) {
  9236. t.save();
  9237. var r = this.transform;
  9238. i.transformText ? this.setTransform(t) : r && (dv.copy(e), dv.applyTransform(r), e = dv), on(this, t, n, i, e, Um), t.restore();
  9239. }
  9240. }
  9241. }, bn.prototype = {
  9242. constructor: bn,
  9243. type: "displayable",
  9244. __dirty: !0,
  9245. invisible: !1,
  9246. z: 0,
  9247. z2: 0,
  9248. zlevel: 0,
  9249. draggable: !1,
  9250. dragging: !1,
  9251. silent: !1,
  9252. culling: !1,
  9253. cursor: "pointer",
  9254. rectHover: !1,
  9255. progressive: !1,
  9256. incremental: !1,
  9257. globalScaleRatio: 1,
  9258. beforeBrush: function () {},
  9259. afterBrush: function () {},
  9260. brush: function () {},
  9261. getBoundingRect: function () {},
  9262. contain: function (t, e) {
  9263. return this.rectContain(t, e);
  9264. },
  9265. traverse: function (t, e) {
  9266. t.call(e, this);
  9267. },
  9268. rectContain: function (t, e) {
  9269. var i = this.transformCoordToLocal(t, e),
  9270. n = this.getBoundingRect();
  9271. return n.contain(i[0], i[1]);
  9272. },
  9273. dirty: function () {
  9274. this.__dirty = this.__dirtyText = !0, this._rect = null, this.__zr && this.__zr.refresh();
  9275. },
  9276. animateStyle: function (t) {
  9277. return this.animate("style", t);
  9278. },
  9279. attrKV: function (t, e) {
  9280. "style" !== t ? Om.prototype.attrKV.call(this, t, e) : this.style.set(e);
  9281. },
  9282. setStyle: function (t, e) {
  9283. return this.style.set(t, e), this.dirty(!1), this;
  9284. },
  9285. useStyle: function (t) {
  9286. return this.style = new Ym(t, this), this.dirty(!1), this;
  9287. },
  9288. calculateTextPosition: null
  9289. }, h(bn, Om), c(bn, fv), Sn.prototype = {
  9290. constructor: Sn,
  9291. type: "image",
  9292. brush: function (t, e) {
  9293. var i = this.style,
  9294. n = i.image;
  9295. i.bind(t, this, e);
  9296. var r = this._image = Ri(n, this._image, this, this.onload);
  9297. if (r && Ni(r)) {
  9298. var a = i.x || 0,
  9299. o = i.y || 0,
  9300. s = i.width,
  9301. l = i.height,
  9302. u = r.width / r.height;
  9303. if (null == s && null != l ? s = l * u : null == l && null != s ? l = s / u : null == s && null == l && (s = r.width, l = r.height), this.setTransform(t), i.sWidth && i.sHeight) {
  9304. var h = i.sx || 0,
  9305. c = i.sy || 0;
  9306. t.drawImage(r, h, c, i.sWidth, i.sHeight, a, o, s, l);
  9307. } else if (i.sx && i.sy) {
  9308. var h = i.sx,
  9309. c = i.sy,
  9310. d = s - h,
  9311. f = l - c;
  9312. t.drawImage(r, h, c, d, f, a, o, s, l);
  9313. } else t.drawImage(r, a, o, s, l);
  9314. null != i.text && (this.restoreTransform(t), this.drawRectText(t, this.getBoundingRect()));
  9315. }
  9316. },
  9317. getBoundingRect: function () {
  9318. var t = this.style;
  9319. return this._rect || (this._rect = new wi(t.x || 0, t.y || 0, t.width || 0, t.height || 0)), this._rect;
  9320. }
  9321. }, h(Sn, bn);
  9322. // #endif
  9323. var pv = 1e5,
  9324. gv = 314159,
  9325. mv = .01,
  9326. vv = .001,
  9327. yv = new wi(0, 0, 0, 0),
  9328. _v = new wi(0, 0, 0, 0),
  9329. xv = function (t, e, i) {
  9330. this.type = "canvas";
  9331. var n = !t.nodeName || "CANVAS" === t.nodeName.toUpperCase();
  9332. this._opts = i = o({}, i || {}), this.dpr = i.devicePixelRatio || Am, this._singleCanvas = n, this.root = t;
  9333. var r = t.style;
  9334. r && (r["-webkit-tap-highlight-color"] = "transparent", r["-webkit-user-select"] = r["user-select"] = r["-webkit-touch-callout"] = "none", t.innerHTML = ""), this.storage = e;
  9335. var a = this._zlevelList = [],
  9336. s = this._layers = {};
  9337. if (this._layerConfig = {}, this._needsManuallyCompositing = !1, n) {
  9338. var l = t.width,
  9339. u = t.height;
  9340. null != i.width && (l = i.width), null != i.height && (u = i.height), this.dpr = i.devicePixelRatio || 1, t.width = l * this.dpr, t.height = u * this.dpr, this._width = l, this._height = u;
  9341. var h = new $m(t, this, this.dpr);
  9342. h.__builtin__ = !0, h.initContext(), s[gv] = h, h.zlevel = gv, a.push(gv), this._domRoot = t;
  9343. } else {
  9344. this._width = this._getSize(0), this._height = this._getSize(1);
  9345. var c = this._domRoot = An(this._width, this._height);
  9346. t.appendChild(c);
  9347. }
  9348. this._hoverlayer = null, this._hoverElements = [];
  9349. };
  9350. xv.prototype = {
  9351. constructor: xv,
  9352. getType: function () {
  9353. return "canvas";
  9354. },
  9355. isSingleCanvas: function () {
  9356. return this._singleCanvas;
  9357. },
  9358. getViewportRoot: function () {
  9359. return this._domRoot;
  9360. },
  9361. getViewportRootOffset: function () {
  9362. var t = this.getViewportRoot();
  9363. return t ? {
  9364. offsetLeft: t.offsetLeft || 0,
  9365. offsetTop: t.offsetTop || 0
  9366. } : void 0;
  9367. },
  9368. refresh: function (t) {
  9369. var e = this.storage.getDisplayList(!0),
  9370. i = this._zlevelList;
  9371. this._redrawId = Math.random(), this._paintList(e, t, this._redrawId);
  9372. for (var n = 0; n < i.length; n++) {
  9373. var r = i[n],
  9374. a = this._layers[r];
  9375. if (!a.__builtin__ && a.refresh) {
  9376. var o = 0 === n ? this._backgroundColor : null;
  9377. a.refresh(o);
  9378. }
  9379. }
  9380. return this.refreshHover(), this;
  9381. },
  9382. addHover: function (t, e) {
  9383. if (!t.__hoverMir) {
  9384. var i = new t.constructor({
  9385. style: t.style,
  9386. shape: t.shape,
  9387. z: t.z,
  9388. z2: t.z2,
  9389. silent: t.silent
  9390. });
  9391. return i.__from = t, t.__hoverMir = i, e && i.setStyle(e), this._hoverElements.push(i), i;
  9392. }
  9393. },
  9394. removeHover: function (t) {
  9395. var e = t.__hoverMir,
  9396. i = this._hoverElements,
  9397. n = u(i, e);
  9398. n >= 0 && i.splice(n, 1), t.__hoverMir = null;
  9399. },
  9400. clearHover: function () {
  9401. for (var t = this._hoverElements, e = 0; e < t.length; e++) {
  9402. var i = t[e].__from;
  9403. i && (i.__hoverMir = null);
  9404. }
  9405. t.length = 0;
  9406. },
  9407. refreshHover: function () {
  9408. var t = this._hoverElements,
  9409. e = t.length,
  9410. i = this._hoverlayer;
  9411. if (i && i.clear(), e) {
  9412. Ai(t, this.storage.displayableSortFunc), i || (i = this._hoverlayer = this.getLayer(pv));
  9413. var n = {};
  9414. i.ctx.save();
  9415. for (var r = 0; e > r;) {
  9416. var a = t[r],
  9417. o = a.__from;
  9418. o && o.__zr ? (r++, o.invisible || (a.transform = o.transform, a.invTransform = o.invTransform, a.__clipPaths = o.__clipPaths, this._doPaintEl(a, i, !0, n))) : (t.splice(r, 1), o.__hoverMir = null, e--);
  9419. }
  9420. i.ctx.restore();
  9421. }
  9422. },
  9423. getHoverLayer: function () {
  9424. return this.getLayer(pv);
  9425. },
  9426. _paintList: function (t, e, i) {
  9427. if (this._redrawId === i) {
  9428. e = e || !1, this._updateLayerStatus(t);
  9429. var n = this._doPaintList(t, e);
  9430. if (this._needsManuallyCompositing && this._compositeManually(), !n) {
  9431. var r = this;
  9432. Qm(function () {
  9433. r._paintList(t, e, i);
  9434. });
  9435. }
  9436. }
  9437. },
  9438. _compositeManually: function () {
  9439. var t = this.getLayer(gv).ctx,
  9440. e = this._domRoot.width,
  9441. i = this._domRoot.height;
  9442. t.clearRect(0, 0, e, i), this.eachBuiltinLayer(function (n) {
  9443. n.virtual && t.drawImage(n.dom, 0, 0, e, i);
  9444. });
  9445. },
  9446. _doPaintList: function (t, e) {
  9447. for (var i = [], n = 0; n < this._zlevelList.length; n++) {
  9448. var r = this._zlevelList[n],
  9449. a = this._layers[r];
  9450. a.__builtin__ && a !== this._hoverlayer && (a.__dirty || e) && i.push(a);
  9451. }
  9452. for (var o = !0, s = 0; s < i.length; s++) {
  9453. var a = i[s],
  9454. l = a.ctx,
  9455. u = {};
  9456. l.save();
  9457. var h = e ? a.__startIndex : a.__drawIndex,
  9458. c = !e && a.incremental && Date.now,
  9459. d = c && Date.now(),
  9460. p = a.zlevel === this._zlevelList[0] ? this._backgroundColor : null;
  9461. if (a.__startIndex === a.__endIndex) a.clear(!1, p);else if (h === a.__startIndex) {
  9462. var g = t[h];
  9463. g.incremental && g.notClear && !e || a.clear(!1, p);
  9464. }
  9465. -1 === h && (console.error("For some unknown reason. drawIndex is -1"), h = a.__startIndex);
  9466. for (var m = h; m < a.__endIndex; m++) {
  9467. var v = t[m];
  9468. if (this._doPaintEl(v, a, e, u), v.__dirty = v.__dirtyText = !1, c) {
  9469. var y = Date.now() - d;
  9470. if (y > 15) break;
  9471. }
  9472. }
  9473. a.__drawIndex = m, a.__drawIndex < a.__endIndex && (o = !1), u.prevElClipPaths && l.restore(), l.restore();
  9474. }
  9475. return Mg.wxa && f(this._layers, function (t) {
  9476. t && t.ctx && t.ctx.draw && t.ctx.draw();
  9477. }), o;
  9478. },
  9479. _doPaintEl: function (t, e, i, n) {
  9480. var r = e.ctx,
  9481. a = t.transform;
  9482. if (!(!e.__dirty && !i || t.invisible || 0 === t.style.opacity || a && !a[0] && !a[3] || t.culling && Tn(t, this._width, this._height))) {
  9483. var o = t.__clipPaths,
  9484. s = n.prevElClipPaths;
  9485. (!s || Cn(o, s)) && (s && (r.restore(), n.prevElClipPaths = null, n.prevEl = null), o && (r.save(), Dn(o, r), n.prevElClipPaths = o)), t.beforeBrush && t.beforeBrush(r), t.brush(r, n.prevEl || null), n.prevEl = t, t.afterBrush && t.afterBrush(r);
  9486. }
  9487. },
  9488. getLayer: function (t, e) {
  9489. this._singleCanvas && !this._needsManuallyCompositing && (t = gv);
  9490. var i = this._layers[t];
  9491. return i || (i = new $m("zr_" + t, this, this.dpr), i.zlevel = t, i.__builtin__ = !0, this._layerConfig[t] && r(i, this._layerConfig[t], !0), e && (i.virtual = e), this.insertLayer(t, i), i.initContext()), i;
  9492. },
  9493. insertLayer: function (t, e) {
  9494. var i = this._layers,
  9495. n = this._zlevelList,
  9496. r = n.length,
  9497. a = null,
  9498. o = -1,
  9499. s = this._domRoot;
  9500. if (i[t]) return void Pm("ZLevel " + t + " has been used already");
  9501. if (!In(e)) return void Pm("Layer of zlevel " + t + " is not valid");
  9502. if (r > 0 && t > n[0]) {
  9503. for (o = 0; r - 1 > o && !(n[o] < t && n[o + 1] > t); o++);
  9504. a = i[n[o]];
  9505. }
  9506. if (n.splice(o + 1, 0, t), i[t] = e, !e.virtual) if (a) {
  9507. var l = a.dom;
  9508. l.nextSibling ? s.insertBefore(e.dom, l.nextSibling) : s.appendChild(e.dom);
  9509. } else s.firstChild ? s.insertBefore(e.dom, s.firstChild) : s.appendChild(e.dom);
  9510. },
  9511. eachLayer: function (t, e) {
  9512. var i,
  9513. n,
  9514. r = this._zlevelList;
  9515. for (n = 0; n < r.length; n++) i = r[n], t.call(e, this._layers[i], i);
  9516. },
  9517. eachBuiltinLayer: function (t, e) {
  9518. var i,
  9519. n,
  9520. r,
  9521. a = this._zlevelList;
  9522. for (r = 0; r < a.length; r++) n = a[r], i = this._layers[n], i.__builtin__ && t.call(e, i, n);
  9523. },
  9524. eachOtherLayer: function (t, e) {
  9525. var i,
  9526. n,
  9527. r,
  9528. a = this._zlevelList;
  9529. for (r = 0; r < a.length; r++) n = a[r], i = this._layers[n], i.__builtin__ || t.call(e, i, n);
  9530. },
  9531. getLayers: function () {
  9532. return this._layers;
  9533. },
  9534. _updateLayerStatus: function (t) {
  9535. function e(t) {
  9536. r && (r.__endIndex !== t && (r.__dirty = !0), r.__endIndex = t);
  9537. }
  9538. if (this.eachBuiltinLayer(function (t) {
  9539. t.__dirty = t.__used = !1;
  9540. }), this._singleCanvas) for (var i = 1; i < t.length; i++) {
  9541. var n = t[i];
  9542. if (n.zlevel !== t[i - 1].zlevel || n.incremental) {
  9543. this._needsManuallyCompositing = !0;
  9544. break;
  9545. }
  9546. }
  9547. for (var r = null, a = 0, i = 0; i < t.length; i++) {
  9548. var o,
  9549. n = t[i],
  9550. s = n.zlevel;
  9551. n.incremental ? (o = this.getLayer(s + vv, this._needsManuallyCompositing), o.incremental = !0, a = 1) : o = this.getLayer(s + (a > 0 ? mv : 0), this._needsManuallyCompositing), o.__builtin__ || Pm("ZLevel " + s + " has been used by unkown layer " + o.id), o !== r && (o.__used = !0, o.__startIndex !== i && (o.__dirty = !0), o.__startIndex = i, o.__drawIndex = o.incremental ? -1 : i, e(i), r = o), n.__dirty && (o.__dirty = !0, o.incremental && o.__drawIndex < 0 && (o.__drawIndex = i));
  9552. }
  9553. e(i), this.eachBuiltinLayer(function (t) {
  9554. !t.__used && t.getElementCount() > 0 && (t.__dirty = !0, t.__startIndex = t.__endIndex = t.__drawIndex = 0), t.__dirty && t.__drawIndex < 0 && (t.__drawIndex = t.__startIndex);
  9555. });
  9556. },
  9557. clear: function () {
  9558. return this.eachBuiltinLayer(this._clearLayer), this;
  9559. },
  9560. _clearLayer: function (t) {
  9561. t.clear();
  9562. },
  9563. setBackgroundColor: function (t) {
  9564. this._backgroundColor = t;
  9565. },
  9566. configLayer: function (t, e) {
  9567. if (e) {
  9568. var i = this._layerConfig;
  9569. i[t] ? r(i[t], e, !0) : i[t] = e;
  9570. for (var n = 0; n < this._zlevelList.length; n++) {
  9571. var a = this._zlevelList[n];
  9572. if (a === t || a === t + mv) {
  9573. var o = this._layers[a];
  9574. r(o, i[t], !0);
  9575. }
  9576. }
  9577. }
  9578. },
  9579. delLayer: function (t) {
  9580. var e = this._layers,
  9581. i = this._zlevelList,
  9582. n = e[t];
  9583. n && (n.dom.parentNode.removeChild(n.dom), delete e[t], i.splice(u(i, t), 1));
  9584. },
  9585. resize: function (t, e) {
  9586. if (this._domRoot.style) {
  9587. var i = this._domRoot;
  9588. i.style.display = "none";
  9589. var n = this._opts;
  9590. if (null != t && (n.width = t), null != e && (n.height = e), t = this._getSize(0), e = this._getSize(1), i.style.display = "", this._width !== t || e !== this._height) {
  9591. i.style.width = t + "px", i.style.height = e + "px";
  9592. for (var r in this._layers) this._layers.hasOwnProperty(r) && this._layers[r].resize(t, e);
  9593. f(this._progressiveLayers, function (i) {
  9594. i.resize(t, e);
  9595. }), this.refresh(!0);
  9596. }
  9597. this._width = t, this._height = e;
  9598. } else {
  9599. if (null == t || null == e) return;
  9600. this._width = t, this._height = e, this.getLayer(gv).resize(t, e);
  9601. }
  9602. return this;
  9603. },
  9604. clearLayer: function (t) {
  9605. var e = this._layers[t];
  9606. e && e.clear();
  9607. },
  9608. dispose: function () {
  9609. this.root.innerHTML = "", this.root = this.storage = this._domRoot = this._layers = null;
  9610. },
  9611. getRenderedCanvas: function (t) {
  9612. if (t = t || {}, this._singleCanvas && !this._compositeManually) return this._layers[gv].dom;
  9613. var e = new $m("image", this, t.pixelRatio || this.dpr);
  9614. if (e.initContext(), e.clear(!1, t.backgroundColor || this._backgroundColor), t.pixelRatio <= this.dpr) {
  9615. this.refresh();
  9616. var i = e.dom.width,
  9617. n = e.dom.height,
  9618. r = e.ctx;
  9619. this.eachLayer(function (t) {
  9620. t.__builtin__ ? r.drawImage(t.dom, 0, 0, i, n) : t.renderToCanvas && (e.ctx.save(), t.renderToCanvas(e.ctx), e.ctx.restore());
  9621. });
  9622. } else for (var a = {}, o = this.storage.getDisplayList(!0), s = 0; s < o.length; s++) {
  9623. var l = o[s];
  9624. this._doPaintEl(l, e, !0, a);
  9625. }
  9626. return e.dom;
  9627. },
  9628. getWidth: function () {
  9629. return this._width;
  9630. },
  9631. getHeight: function () {
  9632. return this._height;
  9633. },
  9634. _getSize: function (t) {
  9635. var e = this._opts,
  9636. i = ["width", "height"][t],
  9637. n = ["clientWidth", "clientHeight"][t],
  9638. r = ["paddingLeft", "paddingTop"][t],
  9639. a = ["paddingRight", "paddingBottom"][t];
  9640. if (null != e[i] && "auto" !== e[i]) return parseFloat(e[i]);
  9641. var o = this.root,
  9642. s = document.defaultView.getComputedStyle(o);
  9643. return (o[n] || Mn(s[i]) || Mn(o.style[i])) - (Mn(s[r]) || 0) - (Mn(s[a]) || 0) | 0;
  9644. },
  9645. pathToImage: function (t, e) {
  9646. e = e || this.dpr;
  9647. var i = document.createElement("canvas"),
  9648. n = i.getContext("2d"),
  9649. r = t.getBoundingRect(),
  9650. a = t.style,
  9651. o = a.shadowBlur * e,
  9652. s = a.shadowOffsetX * e,
  9653. l = a.shadowOffsetY * e,
  9654. u = a.hasStroke() ? a.lineWidth : 0,
  9655. h = Math.max(u / 2, -s + o),
  9656. c = Math.max(u / 2, s + o),
  9657. d = Math.max(u / 2, -l + o),
  9658. f = Math.max(u / 2, l + o),
  9659. p = r.width + h + c,
  9660. g = r.height + d + f;
  9661. i.width = p * e, i.height = g * e, n.scale(e, e), n.clearRect(0, 0, p, g), n.dpr = e;
  9662. var m = {
  9663. position: t.position,
  9664. rotation: t.rotation,
  9665. scale: t.scale
  9666. };
  9667. t.position = [h - r.x, d - r.y], t.rotation = 0, t.scale = [1, 1], t.updateTransform(), t && t.brush(n);
  9668. var v = Sn,
  9669. y = new v({
  9670. style: {
  9671. x: 0,
  9672. y: 0,
  9673. image: i
  9674. }
  9675. });
  9676. return null != m.position && (y.position = t.position = m.position), null != m.rotation && (y.rotation = t.rotation = m.rotation), null != m.scale && (y.scale = t.scale = m.scale), y;
  9677. }
  9678. };
  9679. var wv = function (t) {
  9680. t = t || {}, this.stage = t.stage || {}, this.onframe = t.onframe || function () {}, this._clips = [], this._running = !1, this._time, this._pausedTime, this._pauseStart, this._paused = !1, Yg.call(this);
  9681. };
  9682. wv.prototype = {
  9683. constructor: wv,
  9684. addClip: function (t) {
  9685. this._clips.push(t);
  9686. },
  9687. addAnimator: function (t) {
  9688. t.animation = this;
  9689. for (var e = t.getClips(), i = 0; i < e.length; i++) this.addClip(e[i]);
  9690. },
  9691. removeClip: function (t) {
  9692. var e = u(this._clips, t);
  9693. e >= 0 && this._clips.splice(e, 1);
  9694. },
  9695. removeAnimator: function (t) {
  9696. for (var e = t.getClips(), i = 0; i < e.length; i++) this.removeClip(e[i]);
  9697. t.animation = null;
  9698. },
  9699. _update: function () {
  9700. for (var t = new Date().getTime() - this._pausedTime, e = t - this._time, i = this._clips, n = i.length, r = [], a = [], o = 0; n > o; o++) {
  9701. var s = i[o],
  9702. l = s.step(t, e);
  9703. l && (r.push(l), a.push(s));
  9704. }
  9705. for (var o = 0; n > o;) i[o]._needsRemove ? (i[o] = i[n - 1], i.pop(), n--) : o++;
  9706. n = r.length;
  9707. for (var o = 0; n > o; o++) a[o].fire(r[o]);
  9708. this._time = t, this.onframe(e), this.trigger("frame", e), this.stage.update && this.stage.update();
  9709. },
  9710. _startLoop: function () {
  9711. function t() {
  9712. e._running && (Qm(t), !e._paused && e._update());
  9713. }
  9714. var e = this;
  9715. this._running = !0, Qm(t);
  9716. },
  9717. start: function () {
  9718. this._time = new Date().getTime(), this._pausedTime = 0, this._startLoop();
  9719. },
  9720. stop: function () {
  9721. this._running = !1;
  9722. },
  9723. pause: function () {
  9724. this._paused || (this._pauseStart = new Date().getTime(), this._paused = !0);
  9725. },
  9726. resume: function () {
  9727. this._paused && (this._pausedTime += new Date().getTime() - this._pauseStart, this._paused = !1);
  9728. },
  9729. clear: function () {
  9730. this._clips = [];
  9731. },
  9732. isFinished: function () {
  9733. return !this._clips.length;
  9734. },
  9735. animate: function (t, e) {
  9736. e = e || {};
  9737. var i = new Tm(t, e.loop, e.getter, e.setter);
  9738. return this.addAnimator(i), i;
  9739. }
  9740. }, c(wv, Yg);
  9741. var bv = 300,
  9742. Sv = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"],
  9743. Mv = ["touchstart", "touchend", "touchmove"],
  9744. Iv = {
  9745. pointerdown: 1,
  9746. pointerup: 1,
  9747. pointermove: 1,
  9748. pointerout: 1
  9749. },
  9750. Tv = p(Sv, function (t) {
  9751. var e = t.replace("mouse", "pointer");
  9752. return Iv[e] ? e : t;
  9753. }),
  9754. Cv = {
  9755. mousemove: function (t) {
  9756. t = ye(this.dom, t), this.trigger("mousemove", t);
  9757. },
  9758. mouseout: function (t) {
  9759. t = ye(this.dom, t);
  9760. var e = t.toElement || t.relatedTarget;
  9761. if (e !== this.dom) for (; e && 9 !== e.nodeType;) {
  9762. if (e === this.dom) return;
  9763. e = e.parentNode;
  9764. }
  9765. this.trigger("mouseout", t);
  9766. },
  9767. touchstart: function (t) {
  9768. t = ye(this.dom, t), t.zrByTouch = !0, this._lastTouchMoment = new Date(), this.handler.processGesture(t, "start"), Cv.mousemove.call(this, t), Cv.mousedown.call(this, t), Pn(this);
  9769. },
  9770. touchmove: function (t) {
  9771. t = ye(this.dom, t), t.zrByTouch = !0, this.handler.processGesture(t, "change"), Cv.mousemove.call(this, t), Pn(this);
  9772. },
  9773. touchend: function (t) {
  9774. t = ye(this.dom, t), t.zrByTouch = !0, this.handler.processGesture(t, "end"), Cv.mouseup.call(this, t), +new Date() - this._lastTouchMoment < bv && Cv.click.call(this, t), Pn(this);
  9775. },
  9776. pointerdown: function (t) {
  9777. Cv.mousedown.call(this, t);
  9778. },
  9779. pointermove: function (t) {
  9780. Ln(t) || Cv.mousemove.call(this, t);
  9781. },
  9782. pointerup: function (t) {
  9783. Cv.mouseup.call(this, t);
  9784. },
  9785. pointerout: function (t) {
  9786. Ln(t) || Cv.mouseout.call(this, t);
  9787. }
  9788. };
  9789. f(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function (t) {
  9790. Cv[t] = function (e) {
  9791. e = ye(this.dom, e), this.trigger(t, e);
  9792. };
  9793. });
  9794. var Dv = zn.prototype;
  9795. Dv.dispose = function () {
  9796. for (var t = Sv.concat(Mv), e = 0; e < t.length; e++) {
  9797. var i = t[e];
  9798. xe(this.dom, kn(i), this._handlers[i]);
  9799. }
  9800. }, Dv.setCursor = function (t) {
  9801. this.dom.style && (this.dom.style.cursor = t || "default");
  9802. }, c(zn, Yg);
  9803. var Av = !Mg.canvasSupported,
  9804. kv = {
  9805. canvas: xv
  9806. },
  9807. Pv = {},
  9808. Lv = "4.1.2",
  9809. Ov = function (t, e, i) {
  9810. i = i || {}, this.dom = e, this.id = t;
  9811. var n = this,
  9812. r = new Gm(),
  9813. a = i.renderer;
  9814. if (Av) {
  9815. if (!kv.vml) throw new Error("You need to require 'zrender/vml/vml' to support IE8");
  9816. a = "vml";
  9817. } else a && kv[a] || (a = "canvas");
  9818. var o = new kv[a](e, r, i, t);
  9819. this.storage = r, this.painter = o;
  9820. var s = Mg.node || Mg.worker ? null : new zn(o.getViewportRoot());
  9821. this.handler = new nm(r, o, s, o.root), this.animation = new wv({
  9822. stage: {
  9823. update: y(this.flush, this)
  9824. }
  9825. }), this.animation.start(), this._needsRefresh;
  9826. var l = r.delFromStorage,
  9827. u = r.addToStorage;
  9828. r.delFromStorage = function (t) {
  9829. l.call(r, t), t && t.removeSelfFromZr(n);
  9830. }, r.addToStorage = function (t) {
  9831. u.call(r, t), t.addSelfToZr(n);
  9832. };
  9833. };
  9834. Ov.prototype = {
  9835. constructor: Ov,
  9836. getId: function () {
  9837. return this.id;
  9838. },
  9839. add: function (t) {
  9840. this.storage.addRoot(t), this._needsRefresh = !0;
  9841. },
  9842. remove: function (t) {
  9843. this.storage.delRoot(t), this._needsRefresh = !0;
  9844. },
  9845. configLayer: function (t, e) {
  9846. this.painter.configLayer && this.painter.configLayer(t, e), this._needsRefresh = !0;
  9847. },
  9848. setBackgroundColor: function (t) {
  9849. this.painter.setBackgroundColor && this.painter.setBackgroundColor(t), this._needsRefresh = !0;
  9850. },
  9851. refreshImmediately: function () {
  9852. this._needsRefresh = this._needsRefreshHover = !1, this.painter.refresh(), this._needsRefresh = this._needsRefreshHover = !1;
  9853. },
  9854. refresh: function () {
  9855. this._needsRefresh = !0;
  9856. },
  9857. flush: function () {
  9858. var t;
  9859. this._needsRefresh && (t = !0, this.refreshImmediately()), this._needsRefreshHover && (t = !0, this.refreshHoverImmediately()), t && this.trigger("rendered");
  9860. },
  9861. addHover: function (t, e) {
  9862. if (this.painter.addHover) {
  9863. var i = this.painter.addHover(t, e);
  9864. return this.refreshHover(), i;
  9865. }
  9866. },
  9867. removeHover: function (t) {
  9868. this.painter.removeHover && (this.painter.removeHover(t), this.refreshHover());
  9869. },
  9870. clearHover: function () {
  9871. this.painter.clearHover && (this.painter.clearHover(), this.refreshHover());
  9872. },
  9873. refreshHover: function () {
  9874. this._needsRefreshHover = !0;
  9875. },
  9876. refreshHoverImmediately: function () {
  9877. this._needsRefreshHover = !1, this.painter.refreshHover && this.painter.refreshHover();
  9878. },
  9879. resize: function (t) {
  9880. t = t || {}, this.painter.resize(t.width, t.height), this.handler.resize();
  9881. },
  9882. clearAnimation: function () {
  9883. this.animation.clear();
  9884. },
  9885. getWidth: function () {
  9886. return this.painter.getWidth();
  9887. },
  9888. getHeight: function () {
  9889. return this.painter.getHeight();
  9890. },
  9891. pathToImage: function (t, e) {
  9892. return this.painter.pathToImage(t, e);
  9893. },
  9894. setCursorStyle: function (t) {
  9895. this.handler.setCursorStyle(t);
  9896. },
  9897. findHover: function (t, e) {
  9898. return this.handler.findHover(t, e);
  9899. },
  9900. on: function (t, e, i) {
  9901. this.handler.on(t, e, i);
  9902. },
  9903. off: function (t, e) {
  9904. this.handler.off(t, e);
  9905. },
  9906. trigger: function (t, e) {
  9907. this.handler.trigger(t, e);
  9908. },
  9909. clear: function () {
  9910. this.storage.delRoot(), this.painter.clear();
  9911. },
  9912. dispose: function () {
  9913. this.animation.stop(), this.clear(), this.storage.dispose(), this.painter.dispose(), this.handler.dispose(), this.animation = this.storage = this.painter = this.handler = null, Fn(this.id);
  9914. }
  9915. };
  9916. var zv = (Object.freeze || Object)({
  9917. version: Lv,
  9918. init: En,
  9919. dispose: Rn,
  9920. getInstance: Bn,
  9921. registerPainter: Nn
  9922. }),
  9923. Ev = f,
  9924. Rv = S,
  9925. Bv = x,
  9926. Nv = "series\x00",
  9927. Fv = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "rich", "tag", "color", "textBorderColor", "textBorderWidth", "width", "height", "lineHeight", "align", "verticalAlign", "baseline", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY", "backgroundColor", "borderColor", "borderWidth", "borderRadius", "padding"],
  9928. Gv = 0,
  9929. Vv = ".",
  9930. Hv = "___EC__COMPONENT__CONTAINER___",
  9931. Wv = 0,
  9932. Uv = function (t) {
  9933. for (var e = 0; e < t.length; e++) t[e][1] || (t[e][1] = t[e][0]);
  9934. return function (e, i, n) {
  9935. for (var r = {}, a = 0; a < t.length; a++) {
  9936. var o = t[a][1];
  9937. if (!(i && u(i, o) >= 0 || n && u(n, o) < 0)) {
  9938. var s = e.getShallow(o);
  9939. null != s && (r[t[a][0]] = s);
  9940. }
  9941. }
  9942. return r;
  9943. };
  9944. },
  9945. Xv = Uv([["lineWidth", "width"], ["stroke", "color"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]]),
  9946. Yv = {
  9947. getLineStyle: function (t) {
  9948. var e = Xv(this, t);
  9949. return e.lineDash = this.getLineDash(e.lineWidth), e;
  9950. },
  9951. getLineDash: function (t) {
  9952. null == t && (t = 1);
  9953. var e = this.get("type"),
  9954. i = Math.max(t, 2),
  9955. n = 4 * t;
  9956. return "solid" === e || null == e ? !1 : "dashed" === e ? [n, n] : [i, i];
  9957. }
  9958. },
  9959. jv = Uv([["fill", "color"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["opacity"], ["shadowColor"]]),
  9960. qv = {
  9961. getAreaStyle: function (t, e) {
  9962. return jv(this, t, e);
  9963. }
  9964. },
  9965. Zv = Math.pow,
  9966. Kv = Math.sqrt,
  9967. $v = 1e-8,
  9968. Qv = 1e-4,
  9969. Jv = Kv(3),
  9970. ty = 1 / 3,
  9971. ey = V(),
  9972. iy = V(),
  9973. ny = V(),
  9974. ry = Math.min,
  9975. ay = Math.max,
  9976. oy = Math.sin,
  9977. sy = Math.cos,
  9978. ly = 2 * Math.PI,
  9979. uy = V(),
  9980. hy = V(),
  9981. cy = V(),
  9982. dy = [],
  9983. fy = [],
  9984. py = {
  9985. M: 1,
  9986. L: 2,
  9987. C: 3,
  9988. Q: 4,
  9989. A: 5,
  9990. Z: 6,
  9991. R: 7
  9992. },
  9993. gy = [],
  9994. my = [],
  9995. vy = [],
  9996. yy = [],
  9997. _y = Math.min,
  9998. xy = Math.max,
  9999. wy = Math.cos,
  10000. by = Math.sin,
  10001. Sy = Math.sqrt,
  10002. My = Math.abs,
  10003. Iy = "undefined" != typeof Float32Array,
  10004. Ty = function (t) {
  10005. this._saveData = !t, this._saveData && (this.data = []), this._ctx = null;
  10006. };
  10007. Ty.prototype = {
  10008. constructor: Ty,
  10009. _xi: 0,
  10010. _yi: 0,
  10011. _x0: 0,
  10012. _y0: 0,
  10013. _ux: 0,
  10014. _uy: 0,
  10015. _len: 0,
  10016. _lineDash: null,
  10017. _dashOffset: 0,
  10018. _dashIdx: 0,
  10019. _dashSum: 0,
  10020. setScale: function (t, e, i) {
  10021. i = i || 0, this._ux = My(i / Am / t) || 0, this._uy = My(i / Am / e) || 0;
  10022. },
  10023. getContext: function () {
  10024. return this._ctx;
  10025. },
  10026. beginPath: function (t) {
  10027. return this._ctx = t, t && t.beginPath(), t && (this.dpr = t.dpr), this._saveData && (this._len = 0), this._lineDash && (this._lineDash = null, this._dashOffset = 0), this;
  10028. },
  10029. moveTo: function (t, e) {
  10030. return this.addData(py.M, t, e), this._ctx && this._ctx.moveTo(t, e), this._x0 = t, this._y0 = e, this._xi = t, this._yi = e, this;
  10031. },
  10032. lineTo: function (t, e) {
  10033. var i = My(t - this._xi) > this._ux || My(e - this._yi) > this._uy || this._len < 5;
  10034. return this.addData(py.L, t, e), this._ctx && i && (this._needsDash() ? this._dashedLineTo(t, e) : this._ctx.lineTo(t, e)), i && (this._xi = t, this._yi = e), this;
  10035. },
  10036. bezierCurveTo: function (t, e, i, n, r, a) {
  10037. return this.addData(py.C, t, e, i, n, r, a), this._ctx && (this._needsDash() ? this._dashedBezierTo(t, e, i, n, r, a) : this._ctx.bezierCurveTo(t, e, i, n, r, a)), this._xi = r, this._yi = a, this;
  10038. },
  10039. quadraticCurveTo: function (t, e, i, n) {
  10040. return this.addData(py.Q, t, e, i, n), this._ctx && (this._needsDash() ? this._dashedQuadraticTo(t, e, i, n) : this._ctx.quadraticCurveTo(t, e, i, n)), this._xi = i, this._yi = n, this;
  10041. },
  10042. arc: function (t, e, i, n, r, a) {
  10043. return this.addData(py.A, t, e, i, i, n, r - n, 0, a ? 0 : 1), this._ctx && this._ctx.arc(t, e, i, n, r, a), this._xi = wy(r) * i + t, this._yi = by(r) * i + e, this;
  10044. },
  10045. arcTo: function (t, e, i, n, r) {
  10046. return this._ctx && this._ctx.arcTo(t, e, i, n, r), this;
  10047. },
  10048. rect: function (t, e, i, n) {
  10049. return this._ctx && this._ctx.rect(t, e, i, n), this.addData(py.R, t, e, i, n), this;
  10050. },
  10051. closePath: function () {
  10052. this.addData(py.Z);
  10053. var t = this._ctx,
  10054. e = this._x0,
  10055. i = this._y0;
  10056. return t && (this._needsDash() && this._dashedLineTo(e, i), t.closePath()), this._xi = e, this._yi = i, this;
  10057. },
  10058. fill: function (t) {
  10059. t && t.fill(), this.toStatic();
  10060. },
  10061. stroke: function (t) {
  10062. t && t.stroke(), this.toStatic();
  10063. },
  10064. setLineDash: function (t) {
  10065. if (t instanceof Array) {
  10066. this._lineDash = t, this._dashIdx = 0;
  10067. for (var e = 0, i = 0; i < t.length; i++) e += t[i];
  10068. this._dashSum = e;
  10069. }
  10070. return this;
  10071. },
  10072. setLineDashOffset: function (t) {
  10073. return this._dashOffset = t, this;
  10074. },
  10075. len: function () {
  10076. return this._len;
  10077. },
  10078. setData: function (t) {
  10079. var e = t.length;
  10080. this.data && this.data.length === e || !Iy || (this.data = new Float32Array(e));
  10081. for (var i = 0; e > i; i++) this.data[i] = t[i];
  10082. this._len = e;
  10083. },
  10084. appendPath: function (t) {
  10085. t instanceof Array || (t = [t]);
  10086. for (var e = t.length, i = 0, n = this._len, r = 0; e > r; r++) i += t[r].len();
  10087. Iy && this.data instanceof Float32Array && (this.data = new Float32Array(n + i));
  10088. for (var r = 0; e > r; r++) for (var a = t[r].data, o = 0; o < a.length; o++) this.data[n++] = a[o];
  10089. this._len = n;
  10090. },
  10091. addData: function (t) {
  10092. if (this._saveData) {
  10093. var e = this.data;
  10094. this._len + arguments.length > e.length && (this._expandData(), e = this.data);
  10095. for (var i = 0; i < arguments.length; i++) e[this._len++] = arguments[i];
  10096. this._prevCmd = t;
  10097. }
  10098. },
  10099. _expandData: function () {
  10100. if (!(this.data instanceof Array)) {
  10101. for (var t = [], e = 0; e < this._len; e++) t[e] = this.data[e];
  10102. this.data = t;
  10103. }
  10104. },
  10105. _needsDash: function () {
  10106. return this._lineDash;
  10107. },
  10108. _dashedLineTo: function (t, e) {
  10109. var i,
  10110. n,
  10111. r = this._dashSum,
  10112. a = this._dashOffset,
  10113. o = this._lineDash,
  10114. s = this._ctx,
  10115. l = this._xi,
  10116. u = this._yi,
  10117. h = t - l,
  10118. c = e - u,
  10119. d = Sy(h * h + c * c),
  10120. f = l,
  10121. p = u,
  10122. g = o.length;
  10123. for (h /= d, c /= d, 0 > a && (a = r + a), a %= r, f -= a * h, p -= a * c; h > 0 && t >= f || 0 > h && f >= t || 0 === h && (c > 0 && e >= p || 0 > c && p >= e);) n = this._dashIdx, i = o[n], f += h * i, p += c * i, this._dashIdx = (n + 1) % g, h > 0 && l > f || 0 > h && f > l || c > 0 && u > p || 0 > c && p > u || s[n % 2 ? "moveTo" : "lineTo"](h >= 0 ? _y(f, t) : xy(f, t), c >= 0 ? _y(p, e) : xy(p, e));
  10124. h = f - t, c = p - e, this._dashOffset = -Sy(h * h + c * c);
  10125. },
  10126. _dashedBezierTo: function (t, e, i, n, r, a) {
  10127. var o,
  10128. s,
  10129. l,
  10130. u,
  10131. h,
  10132. c = this._dashSum,
  10133. d = this._dashOffset,
  10134. f = this._lineDash,
  10135. p = this._ctx,
  10136. g = this._xi,
  10137. m = this._yi,
  10138. v = hr,
  10139. y = 0,
  10140. _ = this._dashIdx,
  10141. x = f.length,
  10142. w = 0;
  10143. for (0 > d && (d = c + d), d %= c, o = 0; 1 > o; o += .1) s = v(g, t, i, r, o + .1) - v(g, t, i, r, o), l = v(m, e, n, a, o + .1) - v(m, e, n, a, o), y += Sy(s * s + l * l);
  10144. for (; x > _ && (w += f[_], !(w > d)); _++);
  10145. for (o = (w - d) / y; 1 >= o;) u = v(g, t, i, r, o), h = v(m, e, n, a, o), _ % 2 ? p.moveTo(u, h) : p.lineTo(u, h), o += f[_] / y, _ = (_ + 1) % x;
  10146. _ % 2 !== 0 && p.lineTo(r, a), s = r - u, l = a - h, this._dashOffset = -Sy(s * s + l * l);
  10147. },
  10148. _dashedQuadraticTo: function (t, e, i, n) {
  10149. var r = i,
  10150. a = n;
  10151. i = (i + 2 * t) / 3, n = (n + 2 * e) / 3, t = (this._xi + 2 * t) / 3, e = (this._yi + 2 * e) / 3, this._dashedBezierTo(t, e, i, n, r, a);
  10152. },
  10153. toStatic: function () {
  10154. var t = this.data;
  10155. t instanceof Array && (t.length = this._len, Iy && (this.data = new Float32Array(t)));
  10156. },
  10157. getBoundingRect: function () {
  10158. gy[0] = gy[1] = vy[0] = vy[1] = Number.MAX_VALUE, my[0] = my[1] = yy[0] = yy[1] = -Number.MAX_VALUE;
  10159. for (var t = this.data, e = 0, i = 0, n = 0, r = 0, a = 0; a < t.length;) {
  10160. var o = t[a++];
  10161. switch (1 === a && (e = t[a], i = t[a + 1], n = e, r = i), o) {
  10162. case py.M:
  10163. n = t[a++], r = t[a++], e = n, i = r, vy[0] = n, vy[1] = r, yy[0] = n, yy[1] = r;
  10164. break;
  10165. case py.L:
  10166. Sr(e, i, t[a], t[a + 1], vy, yy), e = t[a++], i = t[a++];
  10167. break;
  10168. case py.C:
  10169. Mr(e, i, t[a++], t[a++], t[a++], t[a++], t[a], t[a + 1], vy, yy), e = t[a++], i = t[a++];
  10170. break;
  10171. case py.Q:
  10172. Ir(e, i, t[a++], t[a++], t[a], t[a + 1], vy, yy), e = t[a++], i = t[a++];
  10173. break;
  10174. case py.A:
  10175. var s = t[a++],
  10176. l = t[a++],
  10177. u = t[a++],
  10178. h = t[a++],
  10179. c = t[a++],
  10180. d = t[a++] + c;
  10181. a += 1;
  10182. var f = 1 - t[a++];
  10183. 1 === a && (n = wy(c) * u + s, r = by(c) * h + l), Tr(s, l, u, h, c, d, f, vy, yy), e = wy(d) * u + s, i = by(d) * h + l;
  10184. break;
  10185. case py.R:
  10186. n = e = t[a++], r = i = t[a++];
  10187. var p = t[a++],
  10188. g = t[a++];
  10189. Sr(n, r, n + p, r + g, vy, yy);
  10190. break;
  10191. case py.Z:
  10192. e = n, i = r;
  10193. }
  10194. oe(gy, gy, vy), se(my, my, yy);
  10195. }
  10196. return 0 === a && (gy[0] = gy[1] = my[0] = my[1] = 0), new wi(gy[0], gy[1], my[0] - gy[0], my[1] - gy[1]);
  10197. },
  10198. rebuildPath: function (t) {
  10199. for (var e, i, n, r, a, o, s = this.data, l = this._ux, u = this._uy, h = this._len, c = 0; h > c;) {
  10200. var d = s[c++];
  10201. switch (1 === c && (n = s[c], r = s[c + 1], e = n, i = r), d) {
  10202. case py.M:
  10203. e = n = s[c++], i = r = s[c++], t.moveTo(n, r);
  10204. break;
  10205. case py.L:
  10206. a = s[c++], o = s[c++], (My(a - n) > l || My(o - r) > u || c === h - 1) && (t.lineTo(a, o), n = a, r = o);
  10207. break;
  10208. case py.C:
  10209. t.bezierCurveTo(s[c++], s[c++], s[c++], s[c++], s[c++], s[c++]), n = s[c - 2], r = s[c - 1];
  10210. break;
  10211. case py.Q:
  10212. t.quadraticCurveTo(s[c++], s[c++], s[c++], s[c++]), n = s[c - 2], r = s[c - 1];
  10213. break;
  10214. case py.A:
  10215. var f = s[c++],
  10216. p = s[c++],
  10217. g = s[c++],
  10218. m = s[c++],
  10219. v = s[c++],
  10220. y = s[c++],
  10221. _ = s[c++],
  10222. x = s[c++],
  10223. w = g > m ? g : m,
  10224. b = g > m ? 1 : g / m,
  10225. S = g > m ? m / g : 1,
  10226. M = Math.abs(g - m) > .001,
  10227. I = v + y;
  10228. M ? (t.translate(f, p), t.rotate(_), t.scale(b, S), t.arc(0, 0, w, v, I, 1 - x), t.scale(1 / b, 1 / S), t.rotate(-_), t.translate(-f, -p)) : t.arc(f, p, w, v, I, 1 - x), 1 === c && (e = wy(v) * g + f, i = by(v) * m + p), n = wy(I) * g + f, r = by(I) * m + p;
  10229. break;
  10230. case py.R:
  10231. e = n = s[c], i = r = s[c + 1], t.rect(s[c++], s[c++], s[c++], s[c++]);
  10232. break;
  10233. case py.Z:
  10234. t.closePath(), n = e, r = i;
  10235. }
  10236. }
  10237. }
  10238. }, Ty.CMD = py;
  10239. var Cy = 2 * Math.PI,
  10240. Dy = 2 * Math.PI,
  10241. Ay = Ty.CMD,
  10242. ky = 2 * Math.PI,
  10243. Py = 1e-4,
  10244. Ly = [-1, -1, -1],
  10245. Oy = [-1, -1],
  10246. zy = Km.prototype.getCanvasPattern,
  10247. Ey = Math.abs,
  10248. Ry = new Ty(!0);
  10249. // #ifdef MP-WEIXIN
  10250. this.$scope.animate("shape",t)
  10251. // #endif
  10252. // #ifndef MP-WEIXIN
  10253. Vr.prototype = {
  10254. constructor: Vr,
  10255. type: "path",
  10256. __dirtyPath: !0,
  10257. strokeContainThreshold: 5,
  10258. segmentIgnoreThreshold: 0,
  10259. subPixelOptimize: !1,
  10260. brush: function (t, e) {
  10261. var i = this.style,
  10262. n = this.path || Ry,
  10263. r = i.hasStroke(),
  10264. a = i.hasFill(),
  10265. o = i.fill,
  10266. s = i.stroke,
  10267. l = a && !!o.colorStops,
  10268. u = r && !!s.colorStops,
  10269. h = a && !!o.image,
  10270. c = r && !!s.image;
  10271. if (i.bind(t, this, e), this.setTransform(t), this.__dirty) {
  10272. var d;
  10273. l && (d = d || this.getBoundingRect(), this._fillGradient = i.getGradient(t, o, d)), u && (d = d || this.getBoundingRect(), this._strokeGradient = i.getGradient(t, s, d));
  10274. }
  10275. l ? t.fillStyle = this._fillGradient : h && (t.fillStyle = zy.call(o, t)), u ? t.strokeStyle = this._strokeGradient : c && (t.strokeStyle = zy.call(s, t));
  10276. var f = i.lineDash,
  10277. p = i.lineDashOffset,
  10278. g = !!t.setLineDash,
  10279. m = this.getGlobalScale();
  10280. if (n.setScale(m[0], m[1], this.segmentIgnoreThreshold), this.__dirtyPath || f && !g && r ? (n.beginPath(t), f && !g && (n.setLineDash(f), n.setLineDashOffset(p)), this.buildPath(n, this.shape, !1), this.path && (this.__dirtyPath = !1)) : (t.beginPath(), this.path.rebuildPath(t)), a) if (null != i.fillOpacity) {
  10281. var v = t.globalAlpha;
  10282. t.globalAlpha = i.fillOpacity * i.opacity, n.fill(t), t.globalAlpha = v;
  10283. } else n.fill(t);
  10284. if (f && g && (t.setLineDash(f), t.lineDashOffset = p), r) if (null != i.strokeOpacity) {
  10285. var v = t.globalAlpha;
  10286. t.globalAlpha = i.strokeOpacity * i.opacity, n.stroke(t), t.globalAlpha = v;
  10287. } else n.stroke(t);
  10288. f && g && t.setLineDash([]), null != i.text && (this.restoreTransform(t), this.drawRectText(t, this.getBoundingRect()));
  10289. },
  10290. buildPath: function () {},
  10291. createPathProxy: function () {
  10292. this.path = new Ty();
  10293. },
  10294. getBoundingRect: function () {
  10295. var t = this._rect,
  10296. e = this.style,
  10297. i = !t;
  10298. if (i) {
  10299. var n = this.path;
  10300. n || (n = this.path = new Ty()), this.__dirtyPath && (n.beginPath(), this.buildPath(n, this.shape, !1)), t = n.getBoundingRect();
  10301. }
  10302. if (this._rect = t, e.hasStroke()) {
  10303. var r = this._rectWithStroke || (this._rectWithStroke = t.clone());
  10304. if (this.__dirty || i) {
  10305. r.copy(t);
  10306. var a = e.lineWidth,
  10307. o = e.strokeNoScale ? this.getLineScale() : 1;
  10308. e.hasFill() || (a = Math.max(a, this.strokeContainThreshold || 4)), o > 1e-10 && (r.width += a / o, r.height += a / o, r.x -= a / o / 2, r.y -= a / o / 2);
  10309. }
  10310. return r;
  10311. }
  10312. return t;
  10313. },
  10314. contain: function (t, e) {
  10315. var i = this.transformCoordToLocal(t, e),
  10316. n = this.getBoundingRect(),
  10317. r = this.style;
  10318. if (t = i[0], e = i[1], n.contain(t, e)) {
  10319. var a = this.path.data;
  10320. if (r.hasStroke()) {
  10321. var o = r.lineWidth,
  10322. s = r.strokeNoScale ? this.getLineScale() : 1;
  10323. if (s > 1e-10 && (r.hasFill() || (o = Math.max(o, this.strokeContainThreshold)), Gr(a, o / s, t, e))) return !0;
  10324. }
  10325. if (r.hasFill()) return Fr(a, t, e);
  10326. }
  10327. return !1;
  10328. },
  10329. dirty: function (t) {
  10330. null == t && (t = !0), t && (this.__dirtyPath = t, this._rect = null), this.__dirty = this.__dirtyText = !0, this.__zr && this.__zr.refresh(), this.__clipTarget && this.__clipTarget.dirty();
  10331. },
  10332. animateShape: function (t) {
  10333. return this.animate("shape", t);
  10334. },
  10335. attrKV: function (t, e) {
  10336. "shape" === t ? (this.setShape(e), this.__dirtyPath = !0, this._rect = null) : bn.prototype.attrKV.call(this, t, e);
  10337. },
  10338. setShape: function (t, e) {
  10339. var i = this.shape;
  10340. if (i) {
  10341. if (S(t)) for (var n in t) t.hasOwnProperty(n) && (i[n] = t[n]);else i[t] = e;
  10342. this.dirty(!0);
  10343. }
  10344. return this;
  10345. },
  10346. getLineScale: function () {
  10347. var t = this.transform;
  10348. return t && Ey(t[0] - 1) > 1e-10 && Ey(t[3] - 1) > 1e-10 ? Math.sqrt(Ey(t[0] * t[3] - t[2] * t[1])) : 1;
  10349. }
  10350. }, Vr.extend = function (t) {
  10351. var e = function (e) {
  10352. Vr.call(this, e), t.style && this.style.extendFrom(t.style, !1);
  10353. var i = t.shape;
  10354. if (i) {
  10355. this.shape = this.shape || {};
  10356. var n = this.shape;
  10357. for (var r in i) !n.hasOwnProperty(r) && i.hasOwnProperty(r) && (n[r] = i[r]);
  10358. }
  10359. t.init && t.init.call(this, e);
  10360. };
  10361. h(e, Vr);
  10362. for (var i in t) "style" !== i && "shape" !== i && (e.prototype[i] = t[i]);
  10363. return e;
  10364. }, h(Vr, bn);
  10365. // #endif
  10366. var By = Ty.CMD,
  10367. Ny = [[], [], []],
  10368. Fy = Math.sqrt,
  10369. Gy = Math.atan2,
  10370. Vy = function (t, e) {
  10371. var i,
  10372. n,
  10373. r,
  10374. a,
  10375. o,
  10376. s,
  10377. l = t.data,
  10378. u = By.M,
  10379. h = By.C,
  10380. c = By.L,
  10381. d = By.R,
  10382. f = By.A,
  10383. p = By.Q;
  10384. for (r = 0, a = 0; r < l.length;) {
  10385. switch (i = l[r++], a = r, n = 0, i) {
  10386. case u:
  10387. n = 1;
  10388. break;
  10389. case c:
  10390. n = 1;
  10391. break;
  10392. case h:
  10393. n = 3;
  10394. break;
  10395. case p:
  10396. n = 2;
  10397. break;
  10398. case f:
  10399. var g = e[4],
  10400. m = e[5],
  10401. v = Fy(e[0] * e[0] + e[1] * e[1]),
  10402. y = Fy(e[2] * e[2] + e[3] * e[3]),
  10403. _ = Gy(-e[1] / y, e[0] / v);
  10404. l[r] *= v, l[r++] += g, l[r] *= y, l[r++] += m, l[r++] *= v, l[r++] *= y, l[r++] += _, l[r++] += _, r += 2, a = r;
  10405. break;
  10406. case d:
  10407. s[0] = l[r++], s[1] = l[r++], ae(s, s, e), l[a++] = s[0], l[a++] = s[1], s[0] += l[r++], s[1] += l[r++], ae(s, s, e), l[a++] = s[0], l[a++] = s[1];
  10408. }
  10409. for (o = 0; n > o; o++) {
  10410. var s = Ny[o];
  10411. s[0] = l[r++], s[1] = l[r++], ae(s, s, e), l[a++] = s[0], l[a++] = s[1];
  10412. }
  10413. }
  10414. },
  10415. Hy = Math.sqrt,
  10416. Wy = Math.sin,
  10417. Uy = Math.cos,
  10418. Xy = Math.PI,
  10419. Yy = function (t) {
  10420. return Math.sqrt(t[0] * t[0] + t[1] * t[1]);
  10421. },
  10422. jy = function (t, e) {
  10423. return (t[0] * e[0] + t[1] * e[1]) / (Yy(t) * Yy(e));
  10424. },
  10425. qy = function (t, e) {
  10426. return (t[0] * e[1] < t[1] * e[0] ? -1 : 1) * Math.acos(jy(t, e));
  10427. },
  10428. Zy = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,
  10429. Ky = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g,
  10430. $y = function (t) {
  10431. bn.call(this, t);
  10432. };
  10433. $y.prototype = {
  10434. constructor: $y,
  10435. type: "text",
  10436. brush: function (t, e) {
  10437. var i = this.style;
  10438. this.__dirty && rn(i, !0), i.fill = i.stroke = i.shadowBlur = i.shadowColor = i.shadowOffsetX = i.shadowOffsetY = null;
  10439. var n = i.text;
  10440. return null != n && (n += ""), wn(n, i) ? (this.setTransform(t), on(this, t, n, i, null, e), void this.restoreTransform(t)) : void (t.__attrCachedBy = Wm.NONE);
  10441. },
  10442. getBoundingRect: function () {
  10443. var t = this.style;
  10444. if (this.__dirty && rn(t, !0), !this._rect) {
  10445. var e = t.text;
  10446. null != e ? e += "" : e = "";
  10447. var i = Gi(t.text + "", t.font, t.textAlign, t.textVerticalAlign, t.textPadding, t.textLineHeight, t.rich);
  10448. if (i.x += t.x || 0, i.y += t.y || 0, vn(t.textStroke, t.textStrokeWidth)) {
  10449. var n = t.textStrokeWidth;
  10450. i.x -= n / 2, i.y -= n / 2, i.width += n, i.height += n;
  10451. }
  10452. this._rect = i;
  10453. }
  10454. return this._rect;
  10455. }
  10456. }, h($y, bn);
  10457. var Qy = Vr.extend({
  10458. type: "circle",
  10459. shape: {
  10460. cx: 0,
  10461. cy: 0,
  10462. r: 0
  10463. },
  10464. buildPath: function (t, e, i) {
  10465. i && t.moveTo(e.cx + e.r, e.cy), t.arc(e.cx, e.cy, e.r, 0, 2 * Math.PI, !0);
  10466. }
  10467. }),
  10468. Jy = [["shadowBlur", 0], ["shadowColor", "#000"], ["shadowOffsetX", 0], ["shadowOffsetY", 0]],
  10469. t_ = function (t) {
  10470. return Mg.browser.ie && Mg.browser.version >= 11 ? function () {
  10471. var e,
  10472. i = this.__clipPaths,
  10473. n = this.style;
  10474. if (i) for (var r = 0; r < i.length; r++) {
  10475. var a = i[r],
  10476. o = a && a.shape,
  10477. s = a && a.type;
  10478. if (o && ("sector" === s && o.startAngle === o.endAngle || "rect" === s && (!o.width || !o.height))) {
  10479. for (var l = 0; l < Jy.length; l++) Jy[l][2] = n[Jy[l][0]], n[Jy[l][0]] = Jy[l][1];
  10480. e = !0;
  10481. break;
  10482. }
  10483. }
  10484. if (t.apply(this, arguments), e) for (var l = 0; l < Jy.length; l++) n[Jy[l][0]] = Jy[l][2];
  10485. } : t;
  10486. },
  10487. e_ = Vr.extend({
  10488. type: "sector",
  10489. shape: {
  10490. cx: 0,
  10491. cy: 0,
  10492. r0: 0,
  10493. r: 0,
  10494. startAngle: 0,
  10495. endAngle: 2 * Math.PI,
  10496. clockwise: !0
  10497. },
  10498. brush: t_(Vr.prototype.brush),
  10499. buildPath: function (t, e) {
  10500. var i = e.cx,
  10501. n = e.cy,
  10502. r = Math.max(e.r0 || 0, 0),
  10503. a = Math.max(e.r, 0),
  10504. o = e.startAngle,
  10505. s = e.endAngle,
  10506. l = e.clockwise,
  10507. u = Math.cos(o),
  10508. h = Math.sin(o);
  10509. t.moveTo(u * r + i, h * r + n), t.lineTo(u * a + i, h * a + n), t.arc(i, n, a, o, s, !l), t.lineTo(Math.cos(s) * r + i, Math.sin(s) * r + n), 0 !== r && t.arc(i, n, r, s, o, l), t.closePath();
  10510. }
  10511. }),
  10512. i_ = Vr.extend({
  10513. type: "ring",
  10514. shape: {
  10515. cx: 0,
  10516. cy: 0,
  10517. r: 0,
  10518. r0: 0
  10519. },
  10520. buildPath: function (t, e) {
  10521. var i = e.cx,
  10522. n = e.cy,
  10523. r = 2 * Math.PI;
  10524. t.moveTo(i + e.r, n), t.arc(i, n, e.r, 0, r, !1), t.moveTo(i + e.r0, n), t.arc(i, n, e.r0, 0, r, !0);
  10525. }
  10526. }),
  10527. n_ = function (t, e) {
  10528. for (var i = t.length, n = [], r = 0, a = 1; i > a; a++) r += ee(t[a - 1], t[a]);
  10529. var o = r / 2;
  10530. o = i > o ? i : o;
  10531. for (var a = 0; o > a; a++) {
  10532. var s,
  10533. l,
  10534. u,
  10535. h = a / (o - 1) * (e ? i : i - 1),
  10536. c = Math.floor(h),
  10537. d = h - c,
  10538. f = t[c % i];
  10539. 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 - 2 ? i - 1 : c + 1], u = t[c > i - 3 ? i - 1 : c + 2]);
  10540. var p = d * d,
  10541. g = d * p;
  10542. n.push([qr(s[0], f[0], l[0], u[0], d, p, g), qr(s[1], f[1], l[1], u[1], d, p, g)]);
  10543. }
  10544. return n;
  10545. },
  10546. r_ = function (t, e, i, n) {
  10547. var r,
  10548. a,
  10549. o,
  10550. s,
  10551. l = [],
  10552. u = [],
  10553. h = [],
  10554. c = [];
  10555. if (n) {
  10556. o = [1 / 0, 1 / 0], s = [-1 / 0, -1 / 0];
  10557. for (var d = 0, f = t.length; f > d; d++) oe(o, o, t[d]), se(s, s, t[d]);
  10558. oe(o, o, n[0]), se(s, s, n[1]);
  10559. }
  10560. for (var d = 0, f = t.length; f > d; d++) {
  10561. var p = t[d];
  10562. if (i) r = t[d ? d - 1 : f - 1], a = t[(d + 1) % f];else {
  10563. if (0 === d || d === f - 1) {
  10564. l.push(W(t[d]));
  10565. continue;
  10566. }
  10567. r = t[d - 1], a = t[d + 1];
  10568. }
  10569. j(u, a, r), J(u, u, e);
  10570. var g = ee(p, r),
  10571. m = ee(p, a),
  10572. v = g + m;
  10573. 0 !== v && (g /= v, m /= v), J(h, u, -g), J(c, u, m);
  10574. var y = X([], p, h),
  10575. _ = X([], p, c);
  10576. n && (se(y, y, o), oe(y, y, s), se(_, _, o), oe(_, _, s)), l.push(y), l.push(_);
  10577. }
  10578. return i && l.push(l.shift()), l;
  10579. },
  10580. a_ = Vr.extend({
  10581. type: "polygon",
  10582. shape: {
  10583. points: null,
  10584. smooth: !1,
  10585. smoothConstraint: null
  10586. },
  10587. buildPath: function (t, e) {
  10588. Zr(t, e, !0);
  10589. }
  10590. }),
  10591. o_ = Vr.extend({
  10592. type: "polyline",
  10593. shape: {
  10594. points: null,
  10595. smooth: !1,
  10596. smoothConstraint: null
  10597. },
  10598. style: {
  10599. stroke: "#000",
  10600. fill: null
  10601. },
  10602. buildPath: function (t, e) {
  10603. Zr(t, e, !1);
  10604. }
  10605. }),
  10606. s_ = Math.round,
  10607. l_ = {},
  10608. u_ = Vr.extend({
  10609. type: "rect",
  10610. shape: {
  10611. r: 0,
  10612. x: 0,
  10613. y: 0,
  10614. width: 0,
  10615. height: 0
  10616. },
  10617. buildPath: function (t, e) {
  10618. var i, n, r, a;
  10619. this.subPixelOptimize ? ($r(l_, e, this.style), i = l_.x, n = l_.y, r = l_.width, a = l_.height, l_.r = e.r, e = l_) : (i = e.x, n = e.y, r = e.width, a = e.height), e.r ? nn(t, e) : t.rect(i, n, r, a), t.closePath();
  10620. }
  10621. }),
  10622. h_ = {},
  10623. c_ = Vr.extend({
  10624. type: "line",
  10625. shape: {
  10626. x1: 0,
  10627. y1: 0,
  10628. x2: 0,
  10629. y2: 0,
  10630. percent: 1
  10631. },
  10632. style: {
  10633. stroke: "#000",
  10634. fill: null
  10635. },
  10636. buildPath: function (t, e) {
  10637. var i, n, r, a;
  10638. this.subPixelOptimize ? (Kr(h_, e, this.style), i = h_.x1, n = h_.y1, r = h_.x2, a = h_.y2) : (i = e.x1, n = e.y1, r = e.x2, a = e.y2);
  10639. var o = e.percent;
  10640. 0 !== o && (t.moveTo(i, n), 1 > o && (r = i * (1 - o) + r * o, a = n * (1 - o) + a * o), t.lineTo(r, a));
  10641. },
  10642. pointAt: function (t) {
  10643. var e = this.shape;
  10644. return [e.x1 * (1 - t) + e.x2 * t, e.y1 * (1 - t) + e.y2 * t];
  10645. }
  10646. }),
  10647. d_ = [],
  10648. f_ = Vr.extend({
  10649. type: "bezier-curve",
  10650. shape: {
  10651. x1: 0,
  10652. y1: 0,
  10653. x2: 0,
  10654. y2: 0,
  10655. cpx1: 0,
  10656. cpy1: 0,
  10657. percent: 1
  10658. },
  10659. style: {
  10660. stroke: "#000",
  10661. fill: null
  10662. },
  10663. buildPath: function (t, e) {
  10664. var i = e.x1,
  10665. n = e.y1,
  10666. r = e.x2,
  10667. a = e.y2,
  10668. o = e.cpx1,
  10669. s = e.cpy1,
  10670. l = e.cpx2,
  10671. u = e.cpy2,
  10672. h = e.percent;
  10673. 0 !== h && (t.moveTo(i, n), null == l || null == u ? (1 > h && (xr(i, o, r, h, d_), o = d_[1], r = d_[2], xr(n, s, a, h, d_), s = d_[1], a = d_[2]), t.quadraticCurveTo(o, s, r, a)) : (1 > h && (pr(i, o, l, r, h, d_), o = d_[1], l = d_[2], r = d_[3], pr(n, s, u, a, h, d_), s = d_[1], u = d_[2], a = d_[3]), t.bezierCurveTo(o, s, l, u, r, a)));
  10674. },
  10675. pointAt: function (t) {
  10676. return Jr(this.shape, t, !1);
  10677. },
  10678. tangentAt: function (t) {
  10679. var e = Jr(this.shape, t, !0);
  10680. return te(e, e);
  10681. }
  10682. }),
  10683. p_ = Vr.extend({
  10684. type: "arc",
  10685. shape: {
  10686. cx: 0,
  10687. cy: 0,
  10688. r: 0,
  10689. startAngle: 0,
  10690. endAngle: 2 * Math.PI,
  10691. clockwise: !0
  10692. },
  10693. style: {
  10694. stroke: "#000",
  10695. fill: null
  10696. },
  10697. buildPath: function (t, e) {
  10698. var i = e.cx,
  10699. n = e.cy,
  10700. r = Math.max(e.r, 0),
  10701. a = e.startAngle,
  10702. o = e.endAngle,
  10703. s = e.clockwise,
  10704. l = Math.cos(a),
  10705. u = Math.sin(a);
  10706. t.moveTo(l * r + i, u * r + n), t.arc(i, n, r, a, o, !s);
  10707. }
  10708. }),
  10709. g_ = Vr.extend({
  10710. type: "compound",
  10711. shape: {
  10712. paths: null
  10713. },
  10714. _updatePathDirty: function () {
  10715. for (var t = this.__dirtyPath, e = this.shape.paths, i = 0; i < e.length; i++) t = t || e[i].__dirtyPath;
  10716. this.__dirtyPath = t, this.__dirty = this.__dirty || t;
  10717. },
  10718. beforeBrush: function () {
  10719. this._updatePathDirty();
  10720. for (var t = this.shape.paths || [], e = this.getGlobalScale(), i = 0; i < t.length; i++) t[i].path || t[i].createPathProxy(), t[i].path.setScale(e[0], e[1], t[i].segmentIgnoreThreshold);
  10721. },
  10722. buildPath: function (t, e) {
  10723. for (var i = e.paths || [], n = 0; n < i.length; n++) i[n].buildPath(t, i[n].shape, !0);
  10724. },
  10725. afterBrush: function () {
  10726. for (var t = this.shape.paths || [], e = 0; e < t.length; e++) t[e].__dirtyPath = !1;
  10727. },
  10728. getBoundingRect: function () {
  10729. return this._updatePathDirty(), Vr.prototype.getBoundingRect.call(this);
  10730. }
  10731. }),
  10732. m_ = function (t) {
  10733. this.colorStops = t || [];
  10734. };
  10735. m_.prototype = {
  10736. constructor: m_,
  10737. addColorStop: function (t, e) {
  10738. this.colorStops.push({
  10739. offset: t,
  10740. color: e
  10741. });
  10742. }
  10743. };
  10744. var v_ = function (t, e, i, n, r, a) {
  10745. this.x = null == t ? 0 : t, this.y = null == e ? 0 : e, this.x2 = null == i ? 1 : i, this.y2 = null == n ? 0 : n, this.type = "linear", this.global = a || !1, m_.call(this, r);
  10746. };
  10747. v_.prototype = {
  10748. constructor: v_
  10749. }, h(v_, m_);
  10750. var y_ = function (t, e, i, n, r) {
  10751. this.x = null == t ? .5 : t, this.y = null == e ? .5 : e, this.r = null == i ? .5 : i, this.type = "radial", this.global = r || !1, m_.call(this, n);
  10752. };
  10753. y_.prototype = {
  10754. constructor: y_
  10755. }, h(y_, m_), ta.prototype.incremental = !0, ta.prototype.clearDisplaybles = function () {
  10756. this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.dirty(), this.notClear = !1;
  10757. }, ta.prototype.addDisplayable = function (t, e) {
  10758. e ? this._temporaryDisplayables.push(t) : this._displayables.push(t), this.dirty();
  10759. }, ta.prototype.addDisplayables = function (t, e) {
  10760. e = e || !1;
  10761. for (var i = 0; i < t.length; i++) this.addDisplayable(t[i], e);
  10762. }, ta.prototype.eachPendingDisplayable = function (t) {
  10763. for (var e = this._cursor; e < this._displayables.length; e++) t && t(this._displayables[e]);
  10764. for (var e = 0; e < this._temporaryDisplayables.length; e++) t && t(this._temporaryDisplayables[e]);
  10765. }, ta.prototype.update = function () {
  10766. this.updateTransform();
  10767. for (var t = this._cursor; t < this._displayables.length; t++) {
  10768. var e = this._displayables[t];
  10769. e.parent = this, e.update(), e.parent = null;
  10770. }
  10771. for (var t = 0; t < this._temporaryDisplayables.length; t++) {
  10772. var e = this._temporaryDisplayables[t];
  10773. e.parent = this, e.update(), e.parent = null;
  10774. }
  10775. }, ta.prototype.brush = function (t) {
  10776. for (var e = this._cursor; e < this._displayables.length; e++) {
  10777. var i = this._displayables[e];
  10778. i.beforeBrush && i.beforeBrush(t), i.brush(t, e === this._cursor ? null : this._displayables[e - 1]), i.afterBrush && i.afterBrush(t);
  10779. }
  10780. this._cursor = e;
  10781. for (var e = 0; e < this._temporaryDisplayables.length; e++) {
  10782. var i = this._temporaryDisplayables[e];
  10783. i.beforeBrush && i.beforeBrush(t), i.brush(t, 0 === e ? null : this._temporaryDisplayables[e - 1]), i.afterBrush && i.afterBrush(t);
  10784. }
  10785. this._temporaryDisplayables = [], this.notClear = !0;
  10786. };
  10787. var __ = [];
  10788. ta.prototype.getBoundingRect = function () {
  10789. if (!this._rect) {
  10790. for (var t = new wi(1 / 0, 1 / 0, -1 / 0, -1 / 0), e = 0; e < this._displayables.length; e++) {
  10791. var i = this._displayables[e],
  10792. n = i.getBoundingRect().clone();
  10793. i.needLocalTransform() && n.applyTransform(i.getLocalTransform(__)), t.union(n);
  10794. }
  10795. this._rect = t;
  10796. }
  10797. return this._rect;
  10798. }, ta.prototype.contain = function (t, e) {
  10799. var i = this.transformCoordToLocal(t, e),
  10800. n = this.getBoundingRect();
  10801. if (n.contain(i[0], i[1])) for (var r = 0; r < this._displayables.length; r++) {
  10802. var a = this._displayables[r];
  10803. if (a.contain(t, e)) return !0;
  10804. }
  10805. return !1;
  10806. }, h(ta, bn);
  10807. var x_ = Math.max,
  10808. w_ = Math.min,
  10809. b_ = {},
  10810. S_ = 1,
  10811. M_ = {
  10812. color: "textFill",
  10813. textBorderColor: "textStroke",
  10814. textBorderWidth: "textStrokeWidth"
  10815. },
  10816. I_ = "emphasis",
  10817. T_ = "normal",
  10818. C_ = 1,
  10819. D_ = {},
  10820. A_ = {},
  10821. k_ = jr,
  10822. P_ = Qr,
  10823. L_ = N(),
  10824. O_ = 0;
  10825. na("circle", Qy), na("sector", e_), na("ring", i_), na("polygon", a_), na("polyline", o_), na("rect", u_), na("line", c_), na("bezierCurve", f_), na("arc", p_);
  10826. var z_ = (Object.freeze || Object)({
  10827. Z2_EMPHASIS_LIFT: S_,
  10828. CACHED_LABEL_STYLE_PROPERTIES: M_,
  10829. extendShape: ea,
  10830. extendPath: ia,
  10831. registerShape: na,
  10832. getShapeClass: ra,
  10833. makePath: aa,
  10834. makeImage: oa,
  10835. mergePath: k_,
  10836. resizePath: la,
  10837. subPixelOptimizeLine: ua,
  10838. subPixelOptimizeRect: ha,
  10839. subPixelOptimize: P_,
  10840. setElementHoverStyle: ya,
  10841. setHoverStyle: Ma,
  10842. setAsHighDownDispatcher: Ia,
  10843. isHighDownDispatcher: Ta,
  10844. getHighlightDigit: Ca,
  10845. setLabelStyle: Da,
  10846. modifyLabelStyle: Aa,
  10847. setTextStyle: ka,
  10848. setText: Pa,
  10849. getFont: Na,
  10850. updateProps: Ga,
  10851. initProps: Va,
  10852. getTransform: Ha,
  10853. applyTransform: Wa,
  10854. transformDirection: Ua,
  10855. groupTransition: Xa,
  10856. clipPointsByRect: Ya,
  10857. clipRectByRect: ja,
  10858. createIcon: qa,
  10859. linePolygonIntersect: Za,
  10860. lineLineIntersect: Ka,
  10861. Group: Bm,
  10862. Image: Sn,
  10863. Text: $y,
  10864. Circle: Qy,
  10865. Sector: e_,
  10866. Ring: i_,
  10867. Polygon: a_,
  10868. Polyline: o_,
  10869. Rect: u_,
  10870. Line: c_,
  10871. BezierCurve: f_,
  10872. Arc: p_,
  10873. IncrementalDisplayable: ta,
  10874. CompoundPath: g_,
  10875. LinearGradient: v_,
  10876. RadialGradient: y_,
  10877. BoundingRect: wi
  10878. }),
  10879. E_ = ["textStyle", "color"],
  10880. R_ = {
  10881. getTextColor: function (t) {
  10882. var e = this.ecModel;
  10883. return this.getShallow("color") || (!t && e ? e.get(E_) : null);
  10884. },
  10885. getFont: function () {
  10886. return Na({
  10887. fontStyle: this.getShallow("fontStyle"),
  10888. fontWeight: this.getShallow("fontWeight"),
  10889. fontSize: this.getShallow("fontSize"),
  10890. fontFamily: this.getShallow("fontFamily")
  10891. }, this.ecModel);
  10892. },
  10893. getTextRect: function (t) {
  10894. return Gi(t, this.getFont(), this.getShallow("align"), this.getShallow("verticalAlign") || this.getShallow("baseline"), this.getShallow("padding"), this.getShallow("lineHeight"), this.getShallow("rich"), this.getShallow("truncateText"));
  10895. }
  10896. },
  10897. B_ = Uv([["fill", "color"], ["stroke", "borderColor"], ["lineWidth", "borderWidth"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"], ["textPosition"], ["textAlign"]]),
  10898. N_ = {
  10899. getItemStyle: function (t, e) {
  10900. var i = B_(this, t, e),
  10901. n = this.getBorderLineDash();
  10902. return n && (i.lineDash = n), i;
  10903. },
  10904. getBorderLineDash: function () {
  10905. var t = this.get("borderType");
  10906. return "solid" === t || null == t ? null : "dashed" === t ? [5, 5] : [1, 1];
  10907. }
  10908. },
  10909. F_ = c,
  10910. G_ = Zn();
  10911. Ja.prototype = {
  10912. constructor: Ja,
  10913. init: null,
  10914. mergeOption: function (t) {
  10915. r(this.option, t, !0);
  10916. },
  10917. get: function (t, e) {
  10918. return null == t ? this.option : to(this.option, this.parsePath(t), !e && eo(this, t));
  10919. },
  10920. getShallow: function (t, e) {
  10921. var i = this.option,
  10922. n = null == i ? i : i[t],
  10923. r = !e && eo(this, t);
  10924. return null == n && r && (n = r.getShallow(t)), n;
  10925. },
  10926. getModel: function (t, e) {
  10927. var i,
  10928. n = null == t ? this.option : to(this.option, t = this.parsePath(t));
  10929. return e = e || (i = eo(this, t)) && i.getModel(t), new Ja(n, e, this.ecModel);
  10930. },
  10931. isEmpty: function () {
  10932. return null == this.option;
  10933. },
  10934. restoreData: function () {},
  10935. clone: function () {
  10936. var t = this.constructor;
  10937. return new t(n(this.option));
  10938. },
  10939. setReadOnly: function () {},
  10940. parsePath: function (t) {
  10941. return "string" == typeof t && (t = t.split(".")), t;
  10942. },
  10943. customizeGetParent: function (t) {
  10944. G_(this).getParent = t;
  10945. },
  10946. isAnimationEnabled: function () {
  10947. if (!Mg.node) {
  10948. if (null != this.option.animation) return !!this.option.animation;
  10949. if (this.parentModel) return this.parentModel.isAnimationEnabled();
  10950. }
  10951. }
  10952. }, nr(Ja), rr(Ja), F_(Ja, Yv), F_(Ja, qv), F_(Ja, R_), F_(Ja, N_);
  10953. var V_ = 0,
  10954. H_ = 1e-4,
  10955. W_ = 9007199254740991,
  10956. U_ = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,
  10957. X_ = (Object.freeze || Object)({
  10958. linearMap: oo,
  10959. parsePercent: so,
  10960. round: lo,
  10961. asc: uo,
  10962. getPrecision: ho,
  10963. getPrecisionSafe: co,
  10964. getPixelPrecision: fo,
  10965. getPercentWithPrecision: po,
  10966. MAX_SAFE_INTEGER: W_,
  10967. remRadian: go,
  10968. isRadianAroundZero: mo,
  10969. parseDate: vo,
  10970. quantity: yo,
  10971. quantityExponent: _o,
  10972. nice: xo,
  10973. quantile: wo,
  10974. reformIntervals: bo,
  10975. isNumeric: So
  10976. }),
  10977. Y_ = L,
  10978. j_ = /([&<>"'])/g,
  10979. q_ = {
  10980. "&": "&amp;",
  10981. "<": "&lt;",
  10982. ">": "&gt;",
  10983. '"': "&quot;",
  10984. "'": "&#39;"
  10985. },
  10986. Z_ = ["a", "b", "c", "d", "e", "f", "g"],
  10987. K_ = function (t, e) {
  10988. return "{" + t + (null == e ? "" : e) + "}";
  10989. },
  10990. $_ = Yi,
  10991. Q_ = (Object.freeze || Object)({
  10992. addCommas: Mo,
  10993. toCamelCase: Io,
  10994. normalizeCssArray: Y_,
  10995. encodeHTML: To,
  10996. formatTpl: Co,
  10997. formatTplSimple: Do,
  10998. getTooltipMarker: Ao,
  10999. formatTime: Po,
  11000. capitalFirst: Lo,
  11001. truncateText: $_,
  11002. getTextBoundingRect: Oo,
  11003. getTextRect: zo
  11004. }),
  11005. J_ = f,
  11006. tx = ["left", "right", "top", "bottom", "width", "height"],
  11007. ex = [["width", "left", "right"], ["height", "top", "bottom"]],
  11008. ix = Eo,
  11009. nx = (_(Eo, "vertical"), _(Eo, "horizontal"), {
  11010. getBoxLayoutParams: function () {
  11011. return {
  11012. left: this.get("left"),
  11013. top: this.get("top"),
  11014. right: this.get("right"),
  11015. bottom: this.get("bottom"),
  11016. width: this.get("width"),
  11017. height: this.get("height")
  11018. };
  11019. }
  11020. }),
  11021. rx = Zn(),
  11022. ax = Ja.extend({
  11023. type: "component",
  11024. id: "",
  11025. name: "",
  11026. mainType: "",
  11027. subType: "",
  11028. componentIndex: 0,
  11029. defaultOption: null,
  11030. ecModel: null,
  11031. dependentModels: [],
  11032. uid: null,
  11033. layoutMode: null,
  11034. $constructor: function (t, e, i, n) {
  11035. Ja.call(this, t, e, i, n), this.uid = io("ec_cpt_model");
  11036. },
  11037. init: function (t, e, i) {
  11038. this.mergeDefaultAndTheme(t, i);
  11039. },
  11040. mergeDefaultAndTheme: function (t, e) {
  11041. var i = this.layoutMode,
  11042. n = i ? No(t) : {},
  11043. a = e.getTheme();
  11044. r(t, a.get(this.mainType)), r(t, this.getDefaultOption()), i && Bo(t, n, i);
  11045. },
  11046. mergeOption: function (t) {
  11047. r(this.option, t, !0);
  11048. var e = this.layoutMode;
  11049. e && Bo(this.option, t, e);
  11050. },
  11051. optionUpdated: function () {},
  11052. getDefaultOption: function () {
  11053. var t = rx(this);
  11054. if (!t.defaultOption) {
  11055. for (var e = [], i = this.constructor; i;) {
  11056. var n = i.prototype.defaultOption;
  11057. n && e.push(n), i = i.superClass;
  11058. }
  11059. for (var a = {}, o = e.length - 1; o >= 0; o--) a = r(a, e[o], !0);
  11060. t.defaultOption = a;
  11061. }
  11062. return t.defaultOption;
  11063. },
  11064. getReferringComponents: function (t) {
  11065. return this.ecModel.queryComponents({
  11066. mainType: t,
  11067. index: this.get(t + "Index", !0),
  11068. id: this.get(t + "Id", !0)
  11069. });
  11070. }
  11071. });
  11072. sr(ax, {
  11073. registerWhenExtend: !0
  11074. }), no(ax), ro(ax, Go), c(ax, nx);
  11075. var ox = "";
  11076. "undefined" != typeof navigator && (ox = navigator.platform || "");
  11077. var sx = {
  11078. color: ["#c23531", "#2f4554", "#61a0a8", "#d48265", "#91c7ae", "#749f83", "#ca8622", "#bda29a", "#6e7074", "#546570", "#c4ccd3"],
  11079. gradientColor: ["#f6efa6", "#d88273", "#bf444c"],
  11080. textStyle: {
  11081. fontFamily: ox.match(/^Win/) ? "Microsoft YaHei" : "sans-serif",
  11082. fontSize: 12,
  11083. fontStyle: "normal",
  11084. fontWeight: "normal"
  11085. },
  11086. blendMode: null,
  11087. animation: "auto",
  11088. animationDuration: 1e3,
  11089. animationDurationUpdate: 300,
  11090. animationEasing: "exponentialOut",
  11091. animationEasingUpdate: "cubicOut",
  11092. animationThreshold: 2e3,
  11093. progressiveThreshold: 3e3,
  11094. progressive: 400,
  11095. hoverLayerThreshold: 3e3,
  11096. useUTC: !1
  11097. },
  11098. lx = Zn(),
  11099. ux = {
  11100. clearColorPalette: function () {
  11101. lx(this).colorIdx = 0, lx(this).colorNameMap = {};
  11102. },
  11103. getColorFromPalette: function (t, e, i) {
  11104. e = e || this;
  11105. var n = lx(e),
  11106. r = n.colorIdx || 0,
  11107. a = n.colorNameMap = n.colorNameMap || {};
  11108. if (a.hasOwnProperty(t)) return a[t];
  11109. var o = Gn(this.get("color", !0)),
  11110. s = this.get("colorLayer", !0),
  11111. l = null != i && s ? Vo(s, i) : o;
  11112. if (l = l || o, l && l.length) {
  11113. var u = l[r];
  11114. return t && (a[t] = u), n.colorIdx = (r + 1) % l.length, u;
  11115. }
  11116. }
  11117. },
  11118. hx = {
  11119. cartesian2d: function (t, e, i, n) {
  11120. var r = t.getReferringComponents("xAxis")[0],
  11121. a = t.getReferringComponents("yAxis")[0];
  11122. e.coordSysDims = ["x", "y"], i.set("x", r), i.set("y", a), Wo(r) && (n.set("x", r), e.firstCategoryDimIndex = 0), Wo(a) && (n.set("y", a), e.firstCategoryDimIndex = 1);
  11123. },
  11124. singleAxis: function (t, e, i, n) {
  11125. var r = t.getReferringComponents("singleAxis")[0];
  11126. e.coordSysDims = ["single"], i.set("single", r), Wo(r) && (n.set("single", r), e.firstCategoryDimIndex = 0);
  11127. },
  11128. polar: function (t, e, i, n) {
  11129. var r = t.getReferringComponents("polar")[0],
  11130. a = r.findAxisModel("radiusAxis"),
  11131. o = r.findAxisModel("angleAxis");
  11132. e.coordSysDims = ["radius", "angle"], i.set("radius", a), i.set("angle", o), Wo(a) && (n.set("radius", a), e.firstCategoryDimIndex = 0), Wo(o) && (n.set("angle", o), e.firstCategoryDimIndex = 1);
  11133. },
  11134. geo: function (t, e) {
  11135. e.coordSysDims = ["lng", "lat"];
  11136. },
  11137. parallel: function (t, e, i, n) {
  11138. var r = t.ecModel,
  11139. a = r.getComponent("parallel", t.get("parallelIndex")),
  11140. o = e.coordSysDims = a.dimensions.slice();
  11141. f(a.parallelAxisIndex, function (t, a) {
  11142. var s = r.getComponent("parallelAxis", t),
  11143. l = o[a];
  11144. i.set(l, s), Wo(s) && null == e.firstCategoryDimIndex && (n.set(l, s), e.firstCategoryDimIndex = a);
  11145. });
  11146. }
  11147. },
  11148. cx = "original",
  11149. dx = "arrayRows",
  11150. fx = "objectRows",
  11151. px = "keyedColumns",
  11152. gx = "unknown",
  11153. mx = "typedArray",
  11154. vx = "column",
  11155. yx = "row";
  11156. Uo.seriesDataToSource = function (t) {
  11157. return new Uo({
  11158. data: t,
  11159. sourceFormat: I(t) ? mx : cx,
  11160. fromDataset: !1
  11161. });
  11162. }, rr(Uo);
  11163. var _x = Zn(),
  11164. xx = "\x00_ec_inner",
  11165. bx = Ja.extend({
  11166. init: function (t, e, i, n) {
  11167. i = i || {}, this.option = null, this._theme = new Ja(i), this._optionManager = n;
  11168. },
  11169. setOption: function (t, e) {
  11170. O(!(xx in t), "please use chart.getOption()"), this._optionManager.setOption(t, e), this.resetOption(null);
  11171. },
  11172. resetOption: function (t) {
  11173. var e = !1,
  11174. i = this._optionManager;
  11175. if (!t || "recreate" === t) {
  11176. var n = i.mountOption("recreate" === t);
  11177. this.option && "recreate" !== t ? (this.restoreData(), this.mergeOption(n)) : as.call(this, n), e = !0;
  11178. }
  11179. if (("timeline" === t || "media" === t) && this.restoreData(), !t || "recreate" === t || "timeline" === t) {
  11180. var r = i.getTimelineOption(this);
  11181. r && (this.mergeOption(r), e = !0);
  11182. }
  11183. if (!t || "recreate" === t || "media" === t) {
  11184. var a = i.getMediaOption(this, this._api);
  11185. a.length && f(a, function (t) {
  11186. this.mergeOption(t, e = !0);
  11187. }, this);
  11188. }
  11189. return e;
  11190. },
  11191. mergeOption: function (t) {
  11192. function e(e, n) {
  11193. var r = Gn(t[e]),
  11194. s = Un(a.get(e), r);
  11195. Xn(s), f(s, function (t) {
  11196. var i = t.option;
  11197. S(i) && (t.keyInfo.mainType = e, t.keyInfo.subType = ss(e, i, t.exist));
  11198. });
  11199. var l = os(a, n);
  11200. i[e] = [], a.set(e, []), f(s, function (t, n) {
  11201. var r = t.exist,
  11202. s = t.option;
  11203. if (O(S(s) || r, "Empty component definition"), s) {
  11204. var u = ax.getClass(e, t.keyInfo.subType, !0);
  11205. if (r && r.constructor === u) r.name = t.keyInfo.name, r.mergeOption(s, this), r.optionUpdated(s, !1);else {
  11206. var h = o({
  11207. dependentModels: l,
  11208. componentIndex: n
  11209. }, t.keyInfo);
  11210. r = new u(s, this, this, h), o(r, h), r.init(s, this, this, h), r.optionUpdated(null, !0);
  11211. }
  11212. } else r.mergeOption({}, this), r.optionUpdated({}, !1);
  11213. a.get(e)[n] = r, i[e][n] = r.option;
  11214. }, this), "series" === e && ls(this, a.get("series"));
  11215. }
  11216. var i = this.option,
  11217. a = this._componentsMap,
  11218. s = [];
  11219. jo(this), f(t, function (t, e) {
  11220. null != t && (ax.hasClass(e) ? e && s.push(e) : i[e] = null == i[e] ? n(t) : r(i[e], t, !0));
  11221. }), ax.topologicalTravel(s, ax.getAllClassMainTypes(), e, this), this._seriesIndicesMap = N(this._seriesIndices = this._seriesIndices || []);
  11222. },
  11223. getOption: function () {
  11224. var t = n(this.option);
  11225. return f(t, function (e, i) {
  11226. if (ax.hasClass(i)) {
  11227. for (var e = Gn(e), n = e.length - 1; n >= 0; n--) jn(e[n]) && e.splice(n, 1);
  11228. t[i] = e;
  11229. }
  11230. }), delete t[xx], t;
  11231. },
  11232. getTheme: function () {
  11233. return this._theme;
  11234. },
  11235. getComponent: function (t, e) {
  11236. var i = this._componentsMap.get(t);
  11237. return i ? i[e || 0] : void 0;
  11238. },
  11239. queryComponents: function (t) {
  11240. var e = t.mainType;
  11241. if (!e) return [];
  11242. var i = t.index,
  11243. n = t.id,
  11244. r = t.name,
  11245. a = this._componentsMap.get(e);
  11246. if (!a || !a.length) return [];
  11247. var o;
  11248. if (null != i) x(i) || (i = [i]), o = m(p(i, function (t) {
  11249. return a[t];
  11250. }), function (t) {
  11251. return !!t;
  11252. });else if (null != n) {
  11253. var s = x(n);
  11254. o = m(a, function (t) {
  11255. return s && u(n, t.id) >= 0 || !s && t.id === n;
  11256. });
  11257. } else if (null != r) {
  11258. var l = x(r);
  11259. o = m(a, function (t) {
  11260. return l && u(r, t.name) >= 0 || !l && t.name === r;
  11261. });
  11262. } else o = a.slice();
  11263. return us(o, t);
  11264. },
  11265. findComponents: function (t) {
  11266. function e(t) {
  11267. var e = r + "Index",
  11268. i = r + "Id",
  11269. n = r + "Name";
  11270. return !t || null == t[e] && null == t[i] && null == t[n] ? null : {
  11271. mainType: r,
  11272. index: t[e],
  11273. id: t[i],
  11274. name: t[n]
  11275. };
  11276. }
  11277. function i(e) {
  11278. return t.filter ? m(e, t.filter) : e;
  11279. }
  11280. var n = t.query,
  11281. r = t.mainType,
  11282. a = e(n),
  11283. o = a ? this.queryComponents(a) : this._componentsMap.get(r);
  11284. return i(us(o, t));
  11285. },
  11286. eachComponent: function (t, e, i) {
  11287. var n = this._componentsMap;
  11288. if ("function" == typeof t) i = e, e = t, n.each(function (t, n) {
  11289. f(t, function (t, r) {
  11290. e.call(i, n, t, r);
  11291. });
  11292. });else if (b(t)) f(n.get(t), e, i);else if (S(t)) {
  11293. var r = this.findComponents(t);
  11294. f(r, e, i);
  11295. }
  11296. },
  11297. getSeriesByName: function (t) {
  11298. var e = this._componentsMap.get("series");
  11299. return m(e, function (e) {
  11300. return e.name === t;
  11301. });
  11302. },
  11303. getSeriesByIndex: function (t) {
  11304. return this._componentsMap.get("series")[t];
  11305. },
  11306. getSeriesByType: function (t) {
  11307. var e = this._componentsMap.get("series");
  11308. return m(e, function (e) {
  11309. return e.subType === t;
  11310. });
  11311. },
  11312. getSeries: function () {
  11313. return this._componentsMap.get("series").slice();
  11314. },
  11315. getSeriesCount: function () {
  11316. return this._componentsMap.get("series").length;
  11317. },
  11318. eachSeries: function (t, e) {
  11319. f(this._seriesIndices, function (i) {
  11320. var n = this._componentsMap.get("series")[i];
  11321. t.call(e, n, i);
  11322. }, this);
  11323. },
  11324. eachRawSeries: function (t, e) {
  11325. f(this._componentsMap.get("series"), t, e);
  11326. },
  11327. eachSeriesByType: function (t, e, i) {
  11328. f(this._seriesIndices, function (n) {
  11329. var r = this._componentsMap.get("series")[n];
  11330. r.subType === t && e.call(i, r, n);
  11331. }, this);
  11332. },
  11333. eachRawSeriesByType: function (t, e, i) {
  11334. return f(this.getSeriesByType(t), e, i);
  11335. },
  11336. isSeriesFiltered: function (t) {
  11337. return null == this._seriesIndicesMap.get(t.componentIndex);
  11338. },
  11339. getCurrentSeriesIndices: function () {
  11340. return (this._seriesIndices || []).slice();
  11341. },
  11342. filterSeries: function (t, e) {
  11343. var i = m(this._componentsMap.get("series"), t, e);
  11344. ls(this, i);
  11345. },
  11346. restoreData: function (t) {
  11347. var e = this._componentsMap;
  11348. ls(this, e.get("series"));
  11349. var i = [];
  11350. e.each(function (t, e) {
  11351. i.push(e);
  11352. }), ax.topologicalTravel(i, ax.getAllClassMainTypes(), function (i) {
  11353. f(e.get(i), function (e) {
  11354. ("series" !== i || !ns(e, t)) && e.restoreData();
  11355. });
  11356. });
  11357. }
  11358. });
  11359. c(bx, ux);
  11360. var Sx = ["getDom", "getZr", "getWidth", "getHeight", "getDevicePixelRatio", "dispatchAction", "isDisposed", "on", "off", "getDataURL", "getConnectedDataURL", "getModel", "getOption", "getViewOfComponentModel", "getViewOfSeriesModel"],
  11361. Mx = {};
  11362. cs.prototype = {
  11363. constructor: cs,
  11364. create: function (t, e) {
  11365. var i = [];
  11366. f(Mx, function (n) {
  11367. var r = n.create(t, e);
  11368. i = i.concat(r || []);
  11369. }), this._coordinateSystems = i;
  11370. },
  11371. update: function (t, e) {
  11372. f(this._coordinateSystems, function (i) {
  11373. i.update && i.update(t, e);
  11374. });
  11375. },
  11376. getCoordinateSystems: function () {
  11377. return this._coordinateSystems.slice();
  11378. }
  11379. }, cs.register = function (t, e) {
  11380. Mx[t] = e;
  11381. }, cs.get = function (t) {
  11382. return Mx[t];
  11383. };
  11384. var Ix = f,
  11385. Tx = n,
  11386. Cx = p,
  11387. Dx = r,
  11388. Ax = /^(min|max)?(.+)$/;
  11389. ds.prototype = {
  11390. constructor: ds,
  11391. setOption: function (t, e) {
  11392. t && f(Gn(t.series), function (t) {
  11393. t && t.data && I(t.data) && E(t.data);
  11394. }), t = Tx(t);
  11395. var i = this._optionBackup,
  11396. n = fs.call(this, t, e, !i);
  11397. this._newBaseOption = n.baseOption, i ? (vs(i.baseOption, n.baseOption), n.timelineOptions.length && (i.timelineOptions = n.timelineOptions), n.mediaList.length && (i.mediaList = n.mediaList), n.mediaDefault && (i.mediaDefault = n.mediaDefault)) : this._optionBackup = n;
  11398. },
  11399. mountOption: function (t) {
  11400. var e = this._optionBackup;
  11401. return this._timelineOptions = Cx(e.timelineOptions, Tx), this._mediaList = Cx(e.mediaList, Tx), this._mediaDefault = Tx(e.mediaDefault), this._currentMediaIndices = [], Tx(t ? e.baseOption : this._newBaseOption);
  11402. },
  11403. getTimelineOption: function (t) {
  11404. var e,
  11405. i = this._timelineOptions;
  11406. if (i.length) {
  11407. var n = t.getComponent("timeline");
  11408. n && (e = Tx(i[n.getCurrentIndex()], !0));
  11409. }
  11410. return e;
  11411. },
  11412. getMediaOption: function () {
  11413. var t = this._api.getWidth(),
  11414. e = this._api.getHeight(),
  11415. i = this._mediaList,
  11416. n = this._mediaDefault,
  11417. r = [],
  11418. a = [];
  11419. if (!i.length && !n) return a;
  11420. for (var o = 0, s = i.length; s > o; o++) ps(i[o].query, t, e) && r.push(o);
  11421. return !r.length && n && (r = [-1]), r.length && !ms(r, this._currentMediaIndices) && (a = Cx(r, function (t) {
  11422. return Tx(-1 === t ? n.option : i[t].option);
  11423. })), this._currentMediaIndices = r, a;
  11424. }
  11425. };
  11426. var kx = f,
  11427. Px = S,
  11428. Lx = ["areaStyle", "lineStyle", "nodeStyle", "linkStyle", "chordStyle", "label", "labelLine"],
  11429. Ox = function (t, e) {
  11430. kx(Ms(t.series), function (t) {
  11431. Px(t) && Ss(t);
  11432. });
  11433. var i = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "parallelAxis", "radar"];
  11434. e && i.push("valueAxis", "categoryAxis", "logAxis", "timeAxis"), kx(i, function (e) {
  11435. kx(Ms(t[e]), function (t) {
  11436. t && (ws(t, "axisLabel"), ws(t.axisPointer, "label"));
  11437. });
  11438. }), kx(Ms(t.parallel), function (t) {
  11439. var e = t && t.parallelAxisDefault;
  11440. ws(e, "axisLabel"), ws(e && e.axisPointer, "label");
  11441. }), kx(Ms(t.calendar), function (t) {
  11442. _s(t, "itemStyle"), ws(t, "dayLabel"), ws(t, "monthLabel"), ws(t, "yearLabel");
  11443. }), kx(Ms(t.radar), function (t) {
  11444. ws(t, "name");
  11445. }), kx(Ms(t.geo), function (t) {
  11446. Px(t) && (bs(t), kx(Ms(t.regions), function (t) {
  11447. bs(t);
  11448. }));
  11449. }), kx(Ms(t.timeline), function (t) {
  11450. bs(t), _s(t, "label"), _s(t, "itemStyle"), _s(t, "controlStyle", !0);
  11451. var e = t.data;
  11452. x(e) && f(e, function (t) {
  11453. S(t) && (_s(t, "label"), _s(t, "itemStyle"));
  11454. });
  11455. }), kx(Ms(t.toolbox), function (t) {
  11456. _s(t, "iconStyle"), kx(t.feature, function (t) {
  11457. _s(t, "iconStyle");
  11458. });
  11459. }), ws(Is(t.axisPointer), "label"), ws(Is(t.tooltip).axisPointer, "label");
  11460. },
  11461. zx = [["x", "left"], ["y", "top"], ["x2", "right"], ["y2", "bottom"]],
  11462. Ex = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"],
  11463. Rx = function (t, e) {
  11464. Ox(t, e), t.series = Gn(t.series), f(t.series, function (t) {
  11465. if (S(t)) {
  11466. var e = t.type;
  11467. if ("line" === e) null != t.clipOverflow && (t.clip = t.clipOverflow);else if ("pie" === e || "gauge" === e) null != t.clockWise && (t.clockwise = t.clockWise);else if ("gauge" === e) {
  11468. var i = Ts(t, "pointer.color");
  11469. null != i && Cs(t, "itemStyle.color", i);
  11470. }
  11471. Ds(t);
  11472. }
  11473. }), t.dataRange && (t.visualMap = t.dataRange), f(Ex, function (e) {
  11474. var i = t[e];
  11475. i && (x(i) || (i = [i]), f(i, function (t) {
  11476. Ds(t);
  11477. }));
  11478. });
  11479. },
  11480. Bx = function (t) {
  11481. var e = N();
  11482. t.eachSeries(function (t) {
  11483. var i = t.get("stack");
  11484. if (i) {
  11485. var n = e.get(i) || e.set(i, []),
  11486. r = t.getData(),
  11487. a = {
  11488. stackResultDimension: r.getCalculationInfo("stackResultDimension"),
  11489. stackedOverDimension: r.getCalculationInfo("stackedOverDimension"),
  11490. stackedDimension: r.getCalculationInfo("stackedDimension"),
  11491. stackedByDimension: r.getCalculationInfo("stackedByDimension"),
  11492. isStackedByIndex: r.getCalculationInfo("isStackedByIndex"),
  11493. data: r,
  11494. seriesModel: t
  11495. };
  11496. if (!a.stackedDimension || !a.isStackedByIndex && !a.stackedByDimension) return;
  11497. n.length && r.setCalculationInfo("stackedOnSeries", n[n.length - 1].seriesModel), n.push(a);
  11498. }
  11499. }), e.each(As);
  11500. },
  11501. Nx = ks.prototype;
  11502. Nx.pure = !1, Nx.persistent = !0, Nx.getSource = function () {
  11503. return this._source;
  11504. };
  11505. var Fx = {
  11506. arrayRows_column: {
  11507. pure: !0,
  11508. count: function () {
  11509. return Math.max(0, this._data.length - this._source.startIndex);
  11510. },
  11511. getItem: function (t) {
  11512. return this._data[t + this._source.startIndex];
  11513. },
  11514. appendData: Os
  11515. },
  11516. arrayRows_row: {
  11517. pure: !0,
  11518. count: function () {
  11519. var t = this._data[0];
  11520. return t ? Math.max(0, t.length - this._source.startIndex) : 0;
  11521. },
  11522. getItem: function (t) {
  11523. t += this._source.startIndex;
  11524. for (var e = [], i = this._data, n = 0; n < i.length; n++) {
  11525. var r = i[n];
  11526. e.push(r ? r[t] : null);
  11527. }
  11528. return e;
  11529. },
  11530. appendData: function () {
  11531. throw new Error('Do not support appendData when set seriesLayoutBy: "row".');
  11532. }
  11533. },
  11534. objectRows: {
  11535. pure: !0,
  11536. count: Ps,
  11537. getItem: Ls,
  11538. appendData: Os
  11539. },
  11540. keyedColumns: {
  11541. pure: !0,
  11542. count: function () {
  11543. var t = this._source.dimensionsDefine[0].name,
  11544. e = this._data[t];
  11545. return e ? e.length : 0;
  11546. },
  11547. getItem: function (t) {
  11548. for (var e = [], i = this._source.dimensionsDefine, n = 0; n < i.length; n++) {
  11549. var r = this._data[i[n].name];
  11550. e.push(r ? r[t] : null);
  11551. }
  11552. return e;
  11553. },
  11554. appendData: function (t) {
  11555. var e = this._data;
  11556. f(t, function (t, i) {
  11557. for (var n = e[i] || (e[i] = []), r = 0; r < (t || []).length; r++) n.push(t[r]);
  11558. });
  11559. }
  11560. },
  11561. original: {
  11562. count: Ps,
  11563. getItem: Ls,
  11564. appendData: Os
  11565. },
  11566. typedArray: {
  11567. persistent: !1,
  11568. pure: !0,
  11569. count: function () {
  11570. return this._data ? this._data.length / this._dimSize : 0;
  11571. },
  11572. getItem: function (t, e) {
  11573. t -= this._offset, e = e || [];
  11574. for (var i = this._dimSize * t, n = 0; n < this._dimSize; n++) e[n] = this._data[i + n];
  11575. return e;
  11576. },
  11577. appendData: function (t) {
  11578. this._data = t;
  11579. },
  11580. clean: function () {
  11581. this._offset += this.count(), this._data = null;
  11582. }
  11583. }
  11584. },
  11585. Gx = {
  11586. arrayRows: zs,
  11587. objectRows: function (t, e, i, n) {
  11588. return null != i ? t[n] : t;
  11589. },
  11590. keyedColumns: zs,
  11591. original: function (t, e, i) {
  11592. var n = Hn(t);
  11593. return null != i && n instanceof Array ? n[i] : n;
  11594. },
  11595. typedArray: zs
  11596. },
  11597. Vx = {
  11598. arrayRows: Es,
  11599. objectRows: function (t, e) {
  11600. return Rs(t[e], this._dimensionInfos[e]);
  11601. },
  11602. keyedColumns: Es,
  11603. original: function (t, e, i, n) {
  11604. var r = t && (null == t.value ? t : t.value);
  11605. return !this._rawData.pure && Wn(t) && (this.hasItemOption = !0), Rs(r instanceof Array ? r[n] : r, this._dimensionInfos[e]);
  11606. },
  11607. typedArray: function (t, e, i, n) {
  11608. return t[n];
  11609. }
  11610. },
  11611. Hx = /\{@(.+?)\}/g,
  11612. Wx = {
  11613. getDataParams: function (t, e) {
  11614. var i = this.getData(e),
  11615. n = this.getRawValue(t, e),
  11616. r = i.getRawIndex(t),
  11617. a = i.getName(t),
  11618. o = i.getRawDataItem(t),
  11619. s = i.getItemVisual(t, "color"),
  11620. l = i.getItemVisual(t, "borderColor"),
  11621. u = this.ecModel.getComponent("tooltip"),
  11622. h = u && u.get("renderMode"),
  11623. c = tr(h),
  11624. d = this.mainType,
  11625. f = "series" === d,
  11626. p = i.userOutput;
  11627. return {
  11628. componentType: d,
  11629. componentSubType: this.subType,
  11630. componentIndex: this.componentIndex,
  11631. seriesType: f ? this.subType : null,
  11632. seriesIndex: this.seriesIndex,
  11633. seriesId: f ? this.id : null,
  11634. seriesName: f ? this.name : null,
  11635. name: a,
  11636. dataIndex: r,
  11637. data: o,
  11638. dataType: e,
  11639. value: n,
  11640. color: s,
  11641. borderColor: l,
  11642. dimensionNames: p ? p.dimensionNames : null,
  11643. encode: p ? p.encode : null,
  11644. marker: Ao({
  11645. color: s,
  11646. renderMode: c
  11647. }),
  11648. $vars: ["seriesName", "name", "value"]
  11649. };
  11650. },
  11651. getFormattedLabel: function (t, e, i, n, r) {
  11652. e = e || "normal";
  11653. var a = this.getData(i),
  11654. o = a.getItemModel(t),
  11655. s = this.getDataParams(t, i);
  11656. null != n && s.value instanceof Array && (s.value = s.value[n]);
  11657. var l = o.get("normal" === e ? [r || "label", "formatter"] : [e, r || "label", "formatter"]);
  11658. if ("function" == typeof l) return s.status = e, s.dimensionIndex = n, l(s);
  11659. if ("string" == typeof l) {
  11660. var u = Co(l, s);
  11661. return u.replace(Hx, function (e, i) {
  11662. var n = i.length;
  11663. return "[" === i.charAt(0) && "]" === i.charAt(n - 1) && (i = +i.slice(1, n - 1)), Bs(a, t, i);
  11664. });
  11665. }
  11666. },
  11667. getRawValue: function (t, e) {
  11668. return Bs(this.getData(e), t);
  11669. },
  11670. formatTooltip: function () {}
  11671. },
  11672. Ux = Gs.prototype;
  11673. Ux.perform = function (t) {
  11674. function e(t) {
  11675. return !(t >= 1) && (t = 1), t;
  11676. }
  11677. var i = this._upstream,
  11678. n = t && t.skip;
  11679. if (this._dirty && i) {
  11680. var r = this.context;
  11681. r.data = r.outputData = i.context.outputData;
  11682. }
  11683. this.__pipeline && (this.__pipeline.currentTask = this);
  11684. var a;
  11685. this._plan && !n && (a = this._plan(this.context));
  11686. var o = e(this._modBy),
  11687. s = this._modDataCount || 0,
  11688. l = e(t && t.modBy),
  11689. u = t && t.modDataCount || 0;
  11690. (o !== l || s !== u) && (a = "reset");
  11691. var h;
  11692. (this._dirty || "reset" === a) && (this._dirty = !1, h = Hs(this, n)), this._modBy = l, this._modDataCount = u;
  11693. var c = t && t.step;
  11694. if (this._dueEnd = i ? i._outputDueEnd : this._count ? this._count(this.context) : 1 / 0, this._progress) {
  11695. var d = this._dueIndex,
  11696. f = Math.min(null != c ? this._dueIndex + c : 1 / 0, this._dueEnd);
  11697. if (!n && (h || f > d)) {
  11698. var p = this._progress;
  11699. if (x(p)) for (var g = 0; g < p.length; g++) Vs(this, p[g], d, f, l, u);else Vs(this, p, d, f, l, u);
  11700. }
  11701. this._dueIndex = f;
  11702. var m = null != this._settedOutputEnd ? this._settedOutputEnd : f;
  11703. this._outputDueEnd = m;
  11704. } else this._dueIndex = this._outputDueEnd = null != this._settedOutputEnd ? this._settedOutputEnd : this._dueEnd;
  11705. return this.unfinished();
  11706. };
  11707. var Xx = function () {
  11708. function t() {
  11709. return i > n ? n++ : null;
  11710. }
  11711. function e() {
  11712. var t = n % o * r + Math.ceil(n / o),
  11713. e = n >= i ? null : a > t ? t : n;
  11714. return n++, e;
  11715. }
  11716. var i,
  11717. n,
  11718. r,
  11719. a,
  11720. o,
  11721. s = {
  11722. reset: function (l, u, h, c) {
  11723. n = l, i = u, r = h, a = c, o = Math.ceil(a / r), s.next = r > 1 && a > 0 ? e : t;
  11724. }
  11725. };
  11726. return s;
  11727. }();
  11728. Ux.dirty = function () {
  11729. this._dirty = !0, this._onDirty && this._onDirty(this.context);
  11730. }, Ux.unfinished = function () {
  11731. return this._progress && this._dueIndex < this._dueEnd;
  11732. }, Ux.pipe = function (t) {
  11733. (this._downstream !== t || this._dirty) && (this._downstream = t, t._upstream = this, t.dirty());
  11734. }, Ux.dispose = function () {
  11735. this._disposed || (this._upstream && (this._upstream._downstream = null), this._downstream && (this._downstream._upstream = null), this._dirty = !1, this._disposed = !0);
  11736. }, Ux.getUpstream = function () {
  11737. return this._upstream;
  11738. }, Ux.getDownstream = function () {
  11739. return this._downstream;
  11740. }, Ux.setOutputEnd = function (t) {
  11741. this._outputDueEnd = this._settedOutputEnd = t;
  11742. };
  11743. var Yx = Zn(),
  11744. jx = ax.extend({
  11745. type: "series.__base__",
  11746. seriesIndex: 0,
  11747. coordinateSystem: null,
  11748. defaultOption: null,
  11749. legendDataProvider: null,
  11750. visualColorAccessPath: "itemStyle.color",
  11751. visualBorderColorAccessPath: "itemStyle.borderColor",
  11752. layoutMode: null,
  11753. init: function (t, e, i) {
  11754. this.seriesIndex = this.componentIndex, this.dataTask = Fs({
  11755. count: Xs,
  11756. reset: Ys
  11757. }), this.dataTask.context = {
  11758. model: this
  11759. }, this.mergeDefaultAndTheme(t, i), qo(this);
  11760. var n = this.getInitialData(t, i);
  11761. qs(n, this), this.dataTask.context.data = n, Yx(this).dataBeforeProcessed = n, Ws(this);
  11762. },
  11763. mergeDefaultAndTheme: function (t, e) {
  11764. var i = this.layoutMode,
  11765. n = i ? No(t) : {},
  11766. a = this.subType;
  11767. ax.hasClass(a) && (a += "Series"), r(t, e.getTheme().get(this.subType)), r(t, this.getDefaultOption()), Vn(t, "label", ["show"]), this.fillDataTextStyle(t.data), i && Bo(t, n, i);
  11768. },
  11769. mergeOption: function (t, e) {
  11770. t = r(this.option, t, !0), this.fillDataTextStyle(t.data);
  11771. var i = this.layoutMode;
  11772. i && Bo(this.option, t, i), qo(this);
  11773. var n = this.getInitialData(t, e);
  11774. qs(n, this), this.dataTask.dirty(), this.dataTask.context.data = n, Yx(this).dataBeforeProcessed = n, Ws(this);
  11775. },
  11776. fillDataTextStyle: function (t) {
  11777. if (t && !I(t)) for (var e = ["show"], i = 0; i < t.length; i++) t[i] && t[i].label && Vn(t[i], "label", e);
  11778. },
  11779. getInitialData: function () {},
  11780. appendData: function (t) {
  11781. var e = this.getRawData();
  11782. e.appendData(t.data);
  11783. },
  11784. getData: function (t) {
  11785. var e = Ks(this);
  11786. if (e) {
  11787. var i = e.context.data;
  11788. return null == t ? i : i.getLinkedData(t);
  11789. }
  11790. return Yx(this).data;
  11791. },
  11792. setData: function (t) {
  11793. var e = Ks(this);
  11794. if (e) {
  11795. var i = e.context;
  11796. i.data !== t && e.modifyOutputEnd && e.setOutputEnd(t.count()), i.outputData = t, e !== this.dataTask && (i.data = t);
  11797. }
  11798. Yx(this).data = t;
  11799. },
  11800. getSource: function () {
  11801. return Yo(this);
  11802. },
  11803. getRawData: function () {
  11804. return Yx(this).dataBeforeProcessed;
  11805. },
  11806. getBaseAxis: function () {
  11807. var t = this.coordinateSystem;
  11808. return t && t.getBaseAxis && t.getBaseAxis();
  11809. },
  11810. formatTooltip: function (t, e, i, n) {
  11811. function r(i) {
  11812. function r(t, i) {
  11813. var r = c.getDimensionInfo(i);
  11814. if (r && r.otherDims.tooltip !== !1) {
  11815. var d = r.type,
  11816. f = "sub" + o.seriesIndex + "at" + h,
  11817. p = Ao({
  11818. color: y,
  11819. type: "subItem",
  11820. renderMode: n,
  11821. markerId: f
  11822. }),
  11823. g = "string" == typeof p ? p : p.content,
  11824. m = (a ? g + To(r.displayName || "-") + ": " : "") + To("ordinal" === d ? t + "" : "time" === d ? e ? "" : Po("yyyy/MM/dd hh:mm:ss", t) : Mo(t));
  11825. m && s.push(m), l && (u[f] = y, ++h);
  11826. }
  11827. }
  11828. var a = g(i, function (t, e, i) {
  11829. var n = c.getDimensionInfo(i);
  11830. return t |= n && n.tooltip !== !1 && null != n.displayName;
  11831. }, 0),
  11832. s = [];
  11833. d.length ? f(d, function (e) {
  11834. r(Bs(c, t, e), e);
  11835. }) : f(i, r);
  11836. var p = a ? l ? "\n" : "<br/>" : "",
  11837. m = p + s.join(p || ", ");
  11838. return {
  11839. renderMode: n,
  11840. content: m,
  11841. style: u
  11842. };
  11843. }
  11844. function a(t) {
  11845. return {
  11846. renderMode: n,
  11847. content: To(Mo(t)),
  11848. style: u
  11849. };
  11850. }
  11851. var o = this;
  11852. n = n || "html";
  11853. var s = "html" === n ? "<br/>" : "\n",
  11854. l = "richText" === n,
  11855. u = {},
  11856. h = 0,
  11857. c = this.getData(),
  11858. d = c.mapDimension("defaultedTooltip", !0),
  11859. p = d.length,
  11860. m = this.getRawValue(t),
  11861. v = x(m),
  11862. y = c.getItemVisual(t, "color");
  11863. S(y) && y.colorStops && (y = (y.colorStops[0] || {}).color), y = y || "transparent";
  11864. var _ = p > 1 || v && !p ? r(m) : a(p ? Bs(c, t, d[0]) : v ? m[0] : m),
  11865. w = _.content,
  11866. b = o.seriesIndex + "at" + h,
  11867. M = Ao({
  11868. color: y,
  11869. type: "item",
  11870. renderMode: n,
  11871. markerId: b
  11872. });
  11873. u[b] = y, ++h;
  11874. var I = c.getName(t),
  11875. T = this.name;
  11876. Yn(this) || (T = ""), T = T ? To(T) + (e ? ": " : s) : "";
  11877. var C = "string" == typeof M ? M : M.content,
  11878. D = e ? C + T + w : T + C + (I ? To(I) + ": " + w : w);
  11879. return {
  11880. html: D,
  11881. markers: u
  11882. };
  11883. },
  11884. isAnimationEnabled: function () {
  11885. if (Mg.node) return !1;
  11886. var t = this.getShallow("animation");
  11887. return t && this.getData().count() > this.getShallow("animationThreshold") && (t = !1), t;
  11888. },
  11889. restoreData: function () {
  11890. this.dataTask.dirty();
  11891. },
  11892. getColorFromPalette: function (t, e, i) {
  11893. var n = this.ecModel,
  11894. r = ux.getColorFromPalette.call(this, t, e, i);
  11895. return r || (r = n.getColorFromPalette(t, e, i)), r;
  11896. },
  11897. coordDimToDataDim: function (t) {
  11898. return this.getRawData().mapDimension(t, !0);
  11899. },
  11900. getProgressive: function () {
  11901. return this.get("progressive");
  11902. },
  11903. getProgressiveThreshold: function () {
  11904. return this.get("progressiveThreshold");
  11905. },
  11906. getAxisTooltipData: null,
  11907. getTooltipPosition: null,
  11908. pipeTask: null,
  11909. preventIncremental: null,
  11910. pipelineContext: null
  11911. });
  11912. c(jx, Wx), c(jx, ux);
  11913. var qx = function () {
  11914. this.group = new Bm(), this.uid = io("viewComponent");
  11915. };
  11916. qx.prototype = {
  11917. constructor: qx,
  11918. init: function () {},
  11919. render: function () {},
  11920. dispose: function () {},
  11921. filterForExposedEvent: null
  11922. };
  11923. var Zx = qx.prototype;
  11924. Zx.updateView = Zx.updateLayout = Zx.updateVisual = function () {}, nr(qx), sr(qx, {
  11925. registerWhenExtend: !0
  11926. });
  11927. var Kx = function () {
  11928. var t = Zn();
  11929. return function (e) {
  11930. var i = t(e),
  11931. n = e.pipelineContext,
  11932. r = i.large,
  11933. a = i.progressiveRender,
  11934. o = i.large = n.large,
  11935. s = i.progressiveRender = n.progressiveRender;
  11936. return !!(r ^ o || a ^ s) && "reset";
  11937. };
  11938. },
  11939. $x = Zn(),
  11940. Qx = Kx();
  11941. $s.prototype = {
  11942. type: "chart",
  11943. init: function () {},
  11944. render: function () {},
  11945. highlight: function (t, e, i, n) {
  11946. Js(t.getData(), n, "emphasis");
  11947. },
  11948. downplay: function (t, e, i, n) {
  11949. Js(t.getData(), n, "normal");
  11950. },
  11951. remove: function () {
  11952. this.group.removeAll();
  11953. },
  11954. dispose: function () {},
  11955. incrementalPrepareRender: null,
  11956. incrementalRender: null,
  11957. updateTransform: null,
  11958. filterForExposedEvent: null
  11959. };
  11960. var Jx = $s.prototype;
  11961. Jx.updateView = Jx.updateLayout = Jx.updateVisual = function (t, e, i, n) {
  11962. this.render(t, e, i, n);
  11963. }, nr($s, ["dispose"]), sr($s, {
  11964. registerWhenExtend: !0
  11965. }), $s.markUpdateMethod = function (t, e) {
  11966. $x(t).updateMethod = e;
  11967. };
  11968. var tw = {
  11969. incrementalPrepareRender: {
  11970. progress: function (t, e) {
  11971. e.view.incrementalRender(t, e.model, e.ecModel, e.api, e.payload);
  11972. }
  11973. },
  11974. render: {
  11975. forceFirstProgress: !0,
  11976. progress: function (t, e) {
  11977. e.view.render(e.model, e.ecModel, e.api, e.payload);
  11978. }
  11979. }
  11980. },
  11981. ew = "\x00__throttleOriginMethod",
  11982. iw = "\x00__throttleRate",
  11983. nw = "\x00__throttleType",
  11984. rw = {
  11985. createOnAllSeries: !0,
  11986. performRawSeries: !0,
  11987. reset: function (t, e) {
  11988. var i = t.getData(),
  11989. n = (t.visualColorAccessPath || "itemStyle.color").split("."),
  11990. r = t.get(n) || t.getColorFromPalette(t.name, null, e.getSeriesCount());
  11991. i.setVisual("color", r);
  11992. var a = (t.visualBorderColorAccessPath || "itemStyle.borderColor").split("."),
  11993. o = t.get(a);
  11994. if (i.setVisual("borderColor", o), !e.isSeriesFiltered(t)) {
  11995. "function" != typeof r || r instanceof m_ || i.each(function (e) {
  11996. i.setItemVisual(e, "color", r(t.getDataParams(e)));
  11997. });
  11998. var s = function (t, e) {
  11999. var i = t.getItemModel(e),
  12000. r = i.get(n, !0),
  12001. o = i.get(a, !0);
  12002. null != r && t.setItemVisual(e, "color", r), null != o && t.setItemVisual(e, "borderColor", o);
  12003. };
  12004. return {
  12005. dataEach: i.hasItemOption ? s : null
  12006. };
  12007. }
  12008. }
  12009. },
  12010. aw = {
  12011. legend: {
  12012. selector: {
  12013. all: "全选",
  12014. inverse: "反选"
  12015. }
  12016. },
  12017. toolbox: {
  12018. brush: {
  12019. title: {
  12020. rect: "矩形选择",
  12021. polygon: "圈选",
  12022. lineX: "横向选择",
  12023. lineY: "纵向选择",
  12024. keep: "保持选择",
  12025. clear: "清除选择"
  12026. }
  12027. },
  12028. dataView: {
  12029. title: "数据视图",
  12030. lang: ["数据视图", "关闭", "刷新"]
  12031. },
  12032. dataZoom: {
  12033. title: {
  12034. zoom: "区域缩放",
  12035. back: "区域缩放还原"
  12036. }
  12037. },
  12038. magicType: {
  12039. title: {
  12040. line: "切换为折线图",
  12041. bar: "切换为柱状图",
  12042. stack: "切换为堆叠",
  12043. tiled: "切换为平铺"
  12044. }
  12045. },
  12046. restore: {
  12047. title: "还原"
  12048. },
  12049. saveAsImage: {
  12050. title: "保存为图片",
  12051. lang: ["右键另存为图片"]
  12052. }
  12053. },
  12054. series: {
  12055. typeNames: {
  12056. pie: "饼图",
  12057. bar: "柱状图",
  12058. line: "折线图",
  12059. scatter: "散点图",
  12060. effectScatter: "涟漪散点图",
  12061. radar: "雷达图",
  12062. tree: "树图",
  12063. treemap: "矩形树图",
  12064. boxplot: "箱型图",
  12065. candlestick: "K线图",
  12066. k: "K线图",
  12067. heatmap: "热力图",
  12068. map: "地图",
  12069. parallel: "平行坐标图",
  12070. lines: "线图",
  12071. graph: "关系图",
  12072. sankey: "桑基图",
  12073. funnel: "漏斗图",
  12074. gauge: "仪表盘图",
  12075. pictorialBar: "象形柱图",
  12076. themeRiver: "主题河流图",
  12077. sunburst: "旭日图"
  12078. }
  12079. },
  12080. aria: {
  12081. general: {
  12082. withTitle: "这是一个关于“{title}”的图表。",
  12083. withoutTitle: "这是一个图表,"
  12084. },
  12085. series: {
  12086. single: {
  12087. prefix: "",
  12088. withName: "图表类型是{seriesType},表示{seriesName}。",
  12089. withoutName: "图表类型是{seriesType}。"
  12090. },
  12091. multiple: {
  12092. prefix: "它由{seriesCount}个图表系列组成。",
  12093. withName: "第{seriesId}个系列是一个表示{seriesName}的{seriesType},",
  12094. withoutName: "第{seriesId}个系列是一个{seriesType},",
  12095. separator: {
  12096. middle: ";",
  12097. end: "。"
  12098. }
  12099. }
  12100. },
  12101. data: {
  12102. allData: "其数据是——",
  12103. partialData: "其中,前{displayCnt}项是——",
  12104. withName: "{name}的数据是{value}",
  12105. withoutName: "{value}",
  12106. separator: {
  12107. middle: ",",
  12108. end: ""
  12109. }
  12110. }
  12111. }
  12112. },
  12113. ow = function (t, e) {
  12114. function i(t, e) {
  12115. if ("string" != typeof t) return t;
  12116. var i = t;
  12117. return f(e, function (t, e) {
  12118. i = i.replace(new RegExp("\\{\\s*" + e + "\\s*\\}", "g"), t);
  12119. }), i;
  12120. }
  12121. function n(t) {
  12122. var e = o.get(t);
  12123. if (null == e) {
  12124. for (var i = t.split("."), n = aw.aria, r = 0; r < i.length; ++r) n = n[i[r]];
  12125. return n;
  12126. }
  12127. return e;
  12128. }
  12129. function r() {
  12130. var t = e.getModel("title").option;
  12131. return t && t.length && (t = t[0]), t && t.text;
  12132. }
  12133. function a(t) {
  12134. return aw.series.typeNames[t] || "自定义图";
  12135. }
  12136. var o = e.getModel("aria");
  12137. if (o.get("show")) {
  12138. if (o.get("description")) return void t.setAttribute("aria-label", o.get("description"));
  12139. var s = 0;
  12140. e.eachSeries(function () {
  12141. ++s;
  12142. }, this);
  12143. var l,
  12144. u = o.get("data.maxCount") || 10,
  12145. h = o.get("series.maxCount") || 10,
  12146. c = Math.min(s, h);
  12147. if (!(1 > s)) {
  12148. var d = r();
  12149. l = d ? i(n("general.withTitle"), {
  12150. title: d
  12151. }) : n("general.withoutTitle");
  12152. var p = [],
  12153. g = s > 1 ? "series.multiple.prefix" : "series.single.prefix";
  12154. l += i(n(g), {
  12155. seriesCount: s
  12156. }), e.eachSeries(function (t, e) {
  12157. if (c > e) {
  12158. var r,
  12159. o = t.get("name"),
  12160. l = "series." + (s > 1 ? "multiple" : "single") + ".";
  12161. r = n(o ? l + "withName" : l + "withoutName"), r = i(r, {
  12162. seriesId: t.seriesIndex,
  12163. seriesName: t.get("name"),
  12164. seriesType: a(t.subType)
  12165. });
  12166. var h = t.getData();
  12167. window.data = h, r += h.count() > u ? i(n("data.partialData"), {
  12168. displayCnt: u
  12169. }) : n("data.allData");
  12170. for (var d = [], f = 0; f < h.count(); f++) if (u > f) {
  12171. var g = h.getName(f),
  12172. m = Bs(h, f);
  12173. d.push(i(n(g ? "data.withName" : "data.withoutName"), {
  12174. name: g,
  12175. value: m
  12176. }));
  12177. }
  12178. r += d.join(n("data.separator.middle")) + n("data.separator.end"), p.push(r);
  12179. }
  12180. }), l += p.join(n("series.multiple.separator.middle")) + n("series.multiple.separator.end"), t.setAttribute("aria-label", l);
  12181. }
  12182. }
  12183. },
  12184. sw = Math.PI,
  12185. lw = function (t, e) {
  12186. e = e || {}, s(e, {
  12187. text: "loading",
  12188. color: "#c23531",
  12189. textColor: "#000",
  12190. maskColor: "rgba(255, 255, 255, 0.8)",
  12191. zlevel: 0
  12192. });
  12193. var i = new u_({
  12194. style: {
  12195. fill: e.maskColor
  12196. },
  12197. zlevel: e.zlevel,
  12198. z: 1e4
  12199. }),
  12200. n = new p_({
  12201. shape: {
  12202. startAngle: -sw / 2,
  12203. endAngle: -sw / 2 + .1,
  12204. r: 10
  12205. },
  12206. style: {
  12207. stroke: e.color,
  12208. lineCap: "round",
  12209. lineWidth: 5
  12210. },
  12211. zlevel: e.zlevel,
  12212. z: 10001
  12213. }),
  12214. r = new u_({
  12215. style: {
  12216. fill: "none",
  12217. text: e.text,
  12218. textPosition: "right",
  12219. textDistance: 10,
  12220. textFill: e.textColor
  12221. },
  12222. zlevel: e.zlevel,
  12223. z: 10001
  12224. });
  12225. n.animateShape(!0).when(1e3, {
  12226. endAngle: 3 * sw / 2
  12227. }).start("circularInOut"), n.animateShape(!0).when(1e3, {
  12228. startAngle: 3 * sw / 2
  12229. }).delay(300).start("circularInOut");
  12230. var a = new Bm();
  12231. return a.add(n), a.add(r), a.add(i), a.resize = function () {
  12232. var e = t.getWidth() / 2,
  12233. a = t.getHeight() / 2;
  12234. n.setShape({
  12235. cx: e,
  12236. cy: a
  12237. });
  12238. var o = n.shape.r;
  12239. r.setShape({
  12240. x: e - o,
  12241. y: a - o,
  12242. width: 2 * o,
  12243. height: 2 * o
  12244. }), i.setShape({
  12245. x: 0,
  12246. y: 0,
  12247. width: t.getWidth(),
  12248. height: t.getHeight()
  12249. });
  12250. }, a.resize(), a;
  12251. },
  12252. uw = rl.prototype;
  12253. uw.restoreData = function (t, e) {
  12254. t.restoreData(e), this._stageTaskMap.each(function (t) {
  12255. var e = t.overallTask;
  12256. e && e.dirty();
  12257. });
  12258. }, uw.getPerformArgs = function (t, e) {
  12259. if (t.__pipeline) {
  12260. var i = this._pipelineMap.get(t.__pipeline.id),
  12261. n = i.context,
  12262. r = !e && i.progressiveEnabled && (!n || n.progressiveRender) && t.__idxInPipeline > i.blockIndex,
  12263. a = r ? i.step : null,
  12264. o = n && n.modDataCount,
  12265. s = null != o ? Math.ceil(o / a) : null;
  12266. return {
  12267. step: a,
  12268. modBy: s,
  12269. modDataCount: o
  12270. };
  12271. }
  12272. }, uw.getPipeline = function (t) {
  12273. return this._pipelineMap.get(t);
  12274. }, uw.updateStreamModes = function (t, e) {
  12275. var i = this._pipelineMap.get(t.uid),
  12276. n = t.getData(),
  12277. r = n.count(),
  12278. a = i.progressiveEnabled && e.incrementalPrepareRender && r >= i.threshold,
  12279. o = t.get("large") && r >= t.get("largeThreshold"),
  12280. s = "mod" === t.get("progressiveChunkMode") ? r : null;
  12281. t.pipelineContext = i.context = {
  12282. progressiveRender: a,
  12283. modDataCount: s,
  12284. large: o
  12285. };
  12286. }, uw.restorePipelines = function (t) {
  12287. var e = this,
  12288. i = e._pipelineMap = N();
  12289. t.eachSeries(function (t) {
  12290. var n = t.getProgressive(),
  12291. r = t.uid;
  12292. i.set(r, {
  12293. id: r,
  12294. head: null,
  12295. tail: null,
  12296. threshold: t.getProgressiveThreshold(),
  12297. progressiveEnabled: n && !(t.preventIncremental && t.preventIncremental()),
  12298. blockIndex: -1,
  12299. step: Math.round(n || 700),
  12300. count: 0
  12301. }), ml(e, t, t.dataTask);
  12302. });
  12303. }, uw.prepareStageTasks = function () {
  12304. var t = this._stageTaskMap,
  12305. e = this.ecInstance.getModel(),
  12306. i = this.api;
  12307. f(this._allHandlers, function (n) {
  12308. var r = t.get(n.uid) || t.set(n.uid, []);
  12309. n.reset && ol(this, n, r, e, i), n.overallReset && sl(this, n, r, e, i);
  12310. }, this);
  12311. }, uw.prepareView = function (t, e, i, n) {
  12312. var r = t.renderTask,
  12313. a = r.context;
  12314. a.model = e, a.ecModel = i, a.api = n, r.__block = !t.incrementalPrepareRender, ml(this, e, r);
  12315. }, uw.performDataProcessorTasks = function (t, e) {
  12316. al(this, this._dataProcessorHandlers, t, e, {
  12317. block: !0
  12318. });
  12319. }, uw.performVisualTasks = function (t, e, i) {
  12320. al(this, this._visualHandlers, t, e, i);
  12321. }, uw.performSeriesTasks = function (t) {
  12322. var e;
  12323. t.eachSeries(function (t) {
  12324. e |= t.dataTask.perform();
  12325. }), this.unfinished |= e;
  12326. }, uw.plan = function () {
  12327. this._pipelineMap.each(function (t) {
  12328. var e = t.tail;
  12329. do {
  12330. if (e.__block) {
  12331. t.blockIndex = e.__idxInPipeline;
  12332. break;
  12333. }
  12334. e = e.getUpstream();
  12335. } while (e);
  12336. });
  12337. };
  12338. var hw = uw.updatePayload = function (t, e) {
  12339. "remain" !== e && (t.context.payload = e);
  12340. },
  12341. cw = pl(0);
  12342. rl.wrapStageHandler = function (t, e) {
  12343. return w(t) && (t = {
  12344. overallReset: t,
  12345. seriesType: vl(t)
  12346. }), t.uid = io("stageHandler"), e && (t.visualType = e), t;
  12347. };
  12348. var dw,
  12349. fw = {},
  12350. pw = {};
  12351. yl(fw, bx), yl(pw, hs), fw.eachSeriesByType = fw.eachRawSeriesByType = function (t) {
  12352. dw = t;
  12353. }, fw.eachComponent = function (t) {
  12354. "series" === t.mainType && t.subType && (dw = t.subType);
  12355. };
  12356. var gw = ["#37A2DA", "#32C5E9", "#67E0E3", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#E062AE", "#E690D1", "#e7bcf3", "#9d96f5", "#8378EA", "#96BFFF"],
  12357. mw = {
  12358. color: gw,
  12359. colorLayer: [["#37A2DA", "#ffd85c", "#fd7b5f"], ["#37A2DA", "#67E0E3", "#FFDB5C", "#ff9f7f", "#E062AE", "#9d96f5"], ["#37A2DA", "#32C5E9", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#e7bcf3", "#8378EA", "#96BFFF"], gw]
  12360. },
  12361. vw = "#eee",
  12362. yw = function () {
  12363. return {
  12364. axisLine: {
  12365. lineStyle: {
  12366. color: vw
  12367. }
  12368. },
  12369. axisTick: {
  12370. lineStyle: {
  12371. color: vw
  12372. }
  12373. },
  12374. axisLabel: {
  12375. textStyle: {
  12376. color: vw
  12377. }
  12378. },
  12379. splitLine: {
  12380. lineStyle: {
  12381. type: "dashed",
  12382. color: "#aaa"
  12383. }
  12384. },
  12385. splitArea: {
  12386. areaStyle: {
  12387. color: vw
  12388. }
  12389. }
  12390. };
  12391. },
  12392. _w = ["#dd6b66", "#759aa0", "#e69d87", "#8dc1a9", "#ea7e53", "#eedd78", "#73a373", "#73b9bc", "#7289ab", "#91ca8c", "#f49f42"],
  12393. xw = {
  12394. color: _w,
  12395. backgroundColor: "#333",
  12396. tooltip: {
  12397. axisPointer: {
  12398. lineStyle: {
  12399. color: vw
  12400. },
  12401. crossStyle: {
  12402. color: vw
  12403. }
  12404. }
  12405. },
  12406. legend: {
  12407. textStyle: {
  12408. color: vw
  12409. }
  12410. },
  12411. textStyle: {
  12412. color: vw
  12413. },
  12414. title: {
  12415. textStyle: {
  12416. color: vw
  12417. }
  12418. },
  12419. toolbox: {
  12420. iconStyle: {
  12421. normal: {
  12422. borderColor: vw
  12423. }
  12424. }
  12425. },
  12426. dataZoom: {
  12427. textStyle: {
  12428. color: vw
  12429. }
  12430. },
  12431. visualMap: {
  12432. textStyle: {
  12433. color: vw
  12434. }
  12435. },
  12436. timeline: {
  12437. lineStyle: {
  12438. color: vw
  12439. },
  12440. itemStyle: {
  12441. normal: {
  12442. color: _w[1]
  12443. }
  12444. },
  12445. label: {
  12446. normal: {
  12447. textStyle: {
  12448. color: vw
  12449. }
  12450. }
  12451. },
  12452. controlStyle: {
  12453. normal: {
  12454. color: vw,
  12455. borderColor: vw
  12456. }
  12457. }
  12458. },
  12459. timeAxis: yw(),
  12460. logAxis: yw(),
  12461. valueAxis: yw(),
  12462. categoryAxis: yw(),
  12463. line: {
  12464. symbol: "circle"
  12465. },
  12466. graph: {
  12467. color: _w
  12468. },
  12469. gauge: {
  12470. title: {
  12471. textStyle: {
  12472. color: vw
  12473. }
  12474. }
  12475. },
  12476. candlestick: {
  12477. itemStyle: {
  12478. normal: {
  12479. color: "#FD1050",
  12480. color0: "#0CF49B",
  12481. borderColor: "#FD1050",
  12482. borderColor0: "#0CF49B"
  12483. }
  12484. }
  12485. }
  12486. };
  12487. xw.categoryAxis.splitLine.show = !1, ax.extend({
  12488. type: "dataset",
  12489. defaultOption: {
  12490. seriesLayoutBy: vx,
  12491. sourceHeader: null,
  12492. dimensions: null,
  12493. source: null
  12494. },
  12495. optionUpdated: function () {
  12496. Xo(this);
  12497. }
  12498. }), qx.extend({
  12499. type: "dataset"
  12500. });
  12501. var ww = Vr.extend({
  12502. type: "ellipse",
  12503. shape: {
  12504. cx: 0,
  12505. cy: 0,
  12506. rx: 0,
  12507. ry: 0
  12508. },
  12509. buildPath: function (t, e) {
  12510. var i = .5522848,
  12511. n = e.cx,
  12512. r = e.cy,
  12513. a = e.rx,
  12514. o = e.ry,
  12515. s = a * i,
  12516. l = o * i;
  12517. t.moveTo(n - a, r), t.bezierCurveTo(n - a, r - l, n - s, r - o, n, r - o), t.bezierCurveTo(n + s, r - o, n + a, r - l, n + a, r), t.bezierCurveTo(n + a, r + l, n + s, r + o, n, r + o), t.bezierCurveTo(n - s, r + o, n - a, r + l, n - a, r), t.closePath();
  12518. }
  12519. }),
  12520. bw = /[\s,]+/;
  12521. xl.prototype.parse = function (t, e) {
  12522. e = e || {};
  12523. var i = _l(t);
  12524. if (!i) throw new Error("Illegal svg");
  12525. var n = new Bm();
  12526. this._root = n;
  12527. var r = i.getAttribute("viewBox") || "",
  12528. a = parseFloat(i.getAttribute("width") || e.width),
  12529. o = parseFloat(i.getAttribute("height") || e.height);
  12530. isNaN(a) && (a = null), isNaN(o) && (o = null), Ml(i, n, null, !0);
  12531. for (var s = i.firstChild; s;) this._parseNode(s, n), s = s.nextSibling;
  12532. var l, u;
  12533. if (r) {
  12534. var h = z(r).split(bw);
  12535. h.length >= 4 && (l = {
  12536. x: parseFloat(h[0] || 0),
  12537. y: parseFloat(h[1] || 0),
  12538. width: parseFloat(h[2]),
  12539. height: parseFloat(h[3])
  12540. });
  12541. }
  12542. if (l && null != a && null != o && (u = Dl(l, a, o), !e.ignoreViewBox)) {
  12543. var c = n;
  12544. n = new Bm(), n.add(c), c.scale = u.scale.slice(), c.position = u.position.slice();
  12545. }
  12546. return e.ignoreRootClip || null == a || null == o || n.setClipPath(new u_({
  12547. shape: {
  12548. x: 0,
  12549. y: 0,
  12550. width: a,
  12551. height: o
  12552. }
  12553. })), {
  12554. root: n,
  12555. width: a,
  12556. height: o,
  12557. viewBoxRect: l,
  12558. viewBoxTransform: u
  12559. };
  12560. }, xl.prototype._parseNode = function (t, e) {
  12561. var i = t.nodeName.toLowerCase();
  12562. "defs" === i ? this._isDefine = !0 : "text" === i && (this._isText = !0);
  12563. var n;
  12564. if (this._isDefine) {
  12565. var r = Mw[i];
  12566. if (r) {
  12567. var a = r.call(this, t),
  12568. o = t.getAttribute("id");
  12569. o && (this._defs[o] = a);
  12570. }
  12571. } else {
  12572. var r = Sw[i];
  12573. r && (n = r.call(this, t, e), e.add(n));
  12574. }
  12575. for (var s = t.firstChild; s;) 1 === s.nodeType && this._parseNode(s, n), 3 === s.nodeType && this._isText && this._parseText(s, n), s = s.nextSibling;
  12576. "defs" === i ? this._isDefine = !1 : "text" === i && (this._isText = !1);
  12577. }, xl.prototype._parseText = function (t, e) {
  12578. if (1 === t.nodeType) {
  12579. var i = t.getAttribute("dx") || 0,
  12580. n = t.getAttribute("dy") || 0;
  12581. this._textX += parseFloat(i), this._textY += parseFloat(n);
  12582. }
  12583. var r = new $y({
  12584. style: {
  12585. text: t.textContent,
  12586. transformText: !0
  12587. },
  12588. position: [this._textX || 0, this._textY || 0]
  12589. });
  12590. bl(e, r), Ml(t, r, this._defs);
  12591. var a = r.style.fontSize;
  12592. a && 9 > a && (r.style.fontSize = 9, r.scale = r.scale || [1, 1], r.scale[0] *= a / 9, r.scale[1] *= a / 9);
  12593. var o = r.getBoundingRect();
  12594. return this._textX += o.width, e.add(r), r;
  12595. };
  12596. var Sw = {
  12597. g: function (t, e) {
  12598. var i = new Bm();
  12599. return bl(e, i), Ml(t, i, this._defs), i;
  12600. },
  12601. rect: function (t, e) {
  12602. var i = new u_();
  12603. return bl(e, i), Ml(t, i, this._defs), i.setShape({
  12604. x: parseFloat(t.getAttribute("x") || 0),
  12605. y: parseFloat(t.getAttribute("y") || 0),
  12606. width: parseFloat(t.getAttribute("width") || 0),
  12607. height: parseFloat(t.getAttribute("height") || 0)
  12608. }), i;
  12609. },
  12610. circle: function (t, e) {
  12611. var i = new Qy();
  12612. return bl(e, i), Ml(t, i, this._defs), i.setShape({
  12613. cx: parseFloat(t.getAttribute("cx") || 0),
  12614. cy: parseFloat(t.getAttribute("cy") || 0),
  12615. r: parseFloat(t.getAttribute("r") || 0)
  12616. }), i;
  12617. },
  12618. line: function (t, e) {
  12619. var i = new c_();
  12620. return bl(e, i), Ml(t, i, this._defs), i.setShape({
  12621. x1: parseFloat(t.getAttribute("x1") || 0),
  12622. y1: parseFloat(t.getAttribute("y1") || 0),
  12623. x2: parseFloat(t.getAttribute("x2") || 0),
  12624. y2: parseFloat(t.getAttribute("y2") || 0)
  12625. }), i;
  12626. },
  12627. ellipse: function (t, e) {
  12628. var i = new ww();
  12629. return bl(e, i), Ml(t, i, this._defs), i.setShape({
  12630. cx: parseFloat(t.getAttribute("cx") || 0),
  12631. cy: parseFloat(t.getAttribute("cy") || 0),
  12632. rx: parseFloat(t.getAttribute("rx") || 0),
  12633. ry: parseFloat(t.getAttribute("ry") || 0)
  12634. }), i;
  12635. },
  12636. polygon: function (t, e) {
  12637. var i = t.getAttribute("points");
  12638. i && (i = Sl(i));
  12639. var n = new a_({
  12640. shape: {
  12641. points: i || []
  12642. }
  12643. });
  12644. return bl(e, n), Ml(t, n, this._defs), n;
  12645. },
  12646. polyline: function (t, e) {
  12647. var i = new Vr();
  12648. bl(e, i), Ml(t, i, this._defs);
  12649. var n = t.getAttribute("points");
  12650. n && (n = Sl(n));
  12651. var r = new o_({
  12652. shape: {
  12653. points: n || []
  12654. }
  12655. });
  12656. return r;
  12657. },
  12658. image: function (t, e) {
  12659. var i = new Sn();
  12660. return bl(e, i), Ml(t, i, this._defs), i.setStyle({
  12661. image: t.getAttribute("xlink:href"),
  12662. x: t.getAttribute("x"),
  12663. y: t.getAttribute("y"),
  12664. width: t.getAttribute("width"),
  12665. height: t.getAttribute("height")
  12666. }), i;
  12667. },
  12668. text: function (t, e) {
  12669. var i = t.getAttribute("x") || 0,
  12670. n = t.getAttribute("y") || 0,
  12671. r = t.getAttribute("dx") || 0,
  12672. a = t.getAttribute("dy") || 0;
  12673. this._textX = parseFloat(i) + parseFloat(r), this._textY = parseFloat(n) + parseFloat(a);
  12674. var o = new Bm();
  12675. return bl(e, o), Ml(t, o, this._defs), o;
  12676. },
  12677. tspan: function (t, e) {
  12678. var i = t.getAttribute("x"),
  12679. n = t.getAttribute("y");
  12680. null != i && (this._textX = parseFloat(i)), null != n && (this._textY = parseFloat(n));
  12681. var r = t.getAttribute("dx") || 0,
  12682. a = t.getAttribute("dy") || 0,
  12683. o = new Bm();
  12684. return bl(e, o), Ml(t, o, this._defs), this._textX += r, this._textY += a, o;
  12685. },
  12686. path: function (t, e) {
  12687. var i = t.getAttribute("d") || "",
  12688. n = Xr(i);
  12689. return bl(e, n), Ml(t, n, this._defs), n;
  12690. }
  12691. },
  12692. Mw = {
  12693. lineargradient: function (t) {
  12694. var e = parseInt(t.getAttribute("x1") || 0, 10),
  12695. i = parseInt(t.getAttribute("y1") || 0, 10),
  12696. n = parseInt(t.getAttribute("x2") || 10, 10),
  12697. r = parseInt(t.getAttribute("y2") || 0, 10),
  12698. a = new v_(e, i, n, r);
  12699. return wl(t, a), a;
  12700. },
  12701. radialgradient: function () {}
  12702. },
  12703. Iw = {
  12704. fill: "fill",
  12705. stroke: "stroke",
  12706. "stroke-width": "lineWidth",
  12707. opacity: "opacity",
  12708. "fill-opacity": "fillOpacity",
  12709. "stroke-opacity": "strokeOpacity",
  12710. "stroke-dasharray": "lineDash",
  12711. "stroke-dashoffset": "lineDashOffset",
  12712. "stroke-linecap": "lineCap",
  12713. "stroke-linejoin": "lineJoin",
  12714. "stroke-miterlimit": "miterLimit",
  12715. "font-family": "fontFamily",
  12716. "font-size": "fontSize",
  12717. "font-style": "fontStyle",
  12718. "font-weight": "fontWeight",
  12719. "text-align": "textAlign",
  12720. "alignment-baseline": "textBaseline"
  12721. },
  12722. Tw = /url\(\s*#(.*?)\)/,
  12723. Cw = /(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,
  12724. Dw = /([^\s:;]+)\s*:\s*([^:;]+)/g,
  12725. Aw = N(),
  12726. kw = {
  12727. registerMap: function (t, e, i) {
  12728. var n;
  12729. return x(e) ? n = e : e.svg ? n = [{
  12730. type: "svg",
  12731. source: e.svg,
  12732. specialAreas: e.specialAreas
  12733. }] : (e.geoJson && !e.features && (i = e.specialAreas, e = e.geoJson), n = [{
  12734. type: "geoJSON",
  12735. source: e,
  12736. specialAreas: i
  12737. }]), f(n, function (t) {
  12738. var e = t.type;
  12739. "geoJson" === e && (e = t.type = "geoJSON");
  12740. var i = Pw[e];
  12741. i(t);
  12742. }), Aw.set(t, n);
  12743. },
  12744. retrieveMap: function (t) {
  12745. return Aw.get(t);
  12746. }
  12747. },
  12748. Pw = {
  12749. geoJSON: function (t) {
  12750. var e = t.source;
  12751. t.geoJSON = b(e) ? "undefined" != typeof JSON && JSON.parse ? JSON.parse(e) : new Function("return (" + e + ");")() : e;
  12752. },
  12753. svg: function (t) {
  12754. t.svgXML = _l(t.source);
  12755. }
  12756. },
  12757. Lw = O,
  12758. Ow = f,
  12759. zw = w,
  12760. Ew = S,
  12761. Rw = ax.parseClassType,
  12762. Bw = "4.5.0",
  12763. Nw = {
  12764. zrender: "4.1.2"
  12765. },
  12766. Fw = 1,
  12767. Gw = 1e3,
  12768. Vw = 800,
  12769. Hw = 900,
  12770. Ww = 5e3,
  12771. Uw = 1e3,
  12772. Xw = 1100,
  12773. Yw = 2e3,
  12774. jw = 3e3,
  12775. qw = 3500,
  12776. Zw = 4e3,
  12777. Kw = 5e3,
  12778. $w = {
  12779. PROCESSOR: {
  12780. FILTER: Gw,
  12781. SERIES_FILTER: Vw,
  12782. STATISTIC: Ww
  12783. },
  12784. VISUAL: {
  12785. LAYOUT: Uw,
  12786. PROGRESSIVE_LAYOUT: Xw,
  12787. GLOBAL: Yw,
  12788. CHART: jw,
  12789. POST_CHART_LAYOUT: qw,
  12790. COMPONENT: Zw,
  12791. BRUSH: Kw
  12792. }
  12793. },
  12794. Qw = "__flagInMainProcess",
  12795. Jw = "__optionUpdated",
  12796. tb = /^[a-zA-Z0-9_]+$/;
  12797. Pl.prototype.on = kl("on", !0), Pl.prototype.off = kl("off", !0), Pl.prototype.one = kl("one", !0), c(Pl, Yg);
  12798. var eb = Ll.prototype;
  12799. eb._onframe = function () {
  12800. if (!this._disposed) {
  12801. var t = this._scheduler;
  12802. if (this[Jw]) {
  12803. var e = this[Jw].silent;
  12804. this[Qw] = !0, zl(this), ib.update.call(this), this[Qw] = !1, this[Jw] = !1, Nl.call(this, e), Fl.call(this, e);
  12805. } else if (t.unfinished) {
  12806. var i = Fw,
  12807. n = this._model,
  12808. r = this._api;
  12809. t.unfinished = !1;
  12810. do {
  12811. var a = +new Date();
  12812. t.performSeriesTasks(n), t.performDataProcessorTasks(n), Rl(this, n), t.performVisualTasks(n), Xl(this, this._model, r, "remain"), i -= +new Date() - a;
  12813. } while (i > 0 && t.unfinished);
  12814. t.unfinished || this._zr.flush();
  12815. }
  12816. }
  12817. }, eb.getDom = function () {
  12818. return this._dom;
  12819. }, eb.getZr = function () {
  12820. return this._zr;
  12821. }, eb.setOption = function (t, e, i) {
  12822. if (!this._disposed) {
  12823. var n;
  12824. if (Ew(e) && (i = e.lazyUpdate, n = e.silent, e = e.notMerge), this[Qw] = !0, !this._model || e) {
  12825. var r = new ds(this._api),
  12826. a = this._theme,
  12827. o = this._model = new bx();
  12828. o.scheduler = this._scheduler, o.init(null, null, a, r);
  12829. }
  12830. this._model.setOption(t, sb), i ? (this[Jw] = {
  12831. silent: n
  12832. }, this[Qw] = !1) : (zl(this), ib.update.call(this), this._zr.flush(), this[Jw] = !1, this[Qw] = !1, Nl.call(this, n), Fl.call(this, n));
  12833. }
  12834. }, eb.setTheme = function () {
  12835. console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0");
  12836. }, eb.getModel = function () {
  12837. return this._model;
  12838. }, eb.getOption = function () {
  12839. return this._model && this._model.getOption();
  12840. }, eb.getWidth = function () {
  12841. return this._zr.getWidth();
  12842. }, eb.getHeight = function () {
  12843. return this._zr.getHeight();
  12844. }, eb.getDevicePixelRatio = function () {
  12845. return this._zr.painter.dpr || window.devicePixelRatio || 1;
  12846. }, eb.getRenderedCanvas = function (t) {
  12847. if (Mg.canvasSupported) {
  12848. t = t || {}, t.pixelRatio = t.pixelRatio || 1, t.backgroundColor = t.backgroundColor || this._model.get("backgroundColor");
  12849. var e = this._zr;
  12850. return e.painter.getRenderedCanvas(t);
  12851. }
  12852. }, eb.getSvgDataUrl = function () {
  12853. if (Mg.svgSupported) {
  12854. var t = this._zr,
  12855. e = t.storage.getDisplayList();
  12856. return f(e, function (t) {
  12857. t.stopAnimation(!0);
  12858. }), t.painter.pathToDataUrl();
  12859. }
  12860. }, eb.getDataURL = function (t) {
  12861. if (!this._disposed) {
  12862. t = t || {};
  12863. var e = t.excludeComponents,
  12864. i = this._model,
  12865. n = [],
  12866. r = this;
  12867. Ow(e, function (t) {
  12868. i.eachComponent({
  12869. mainType: t
  12870. }, function (t) {
  12871. var e = r._componentsMap[t.__viewId];
  12872. e.group.ignore || (n.push(e), e.group.ignore = !0);
  12873. });
  12874. });
  12875. var a = "svg" === this._zr.painter.getType() ? this.getSvgDataUrl() : this.getRenderedCanvas(t).toDataURL("image/" + (t && t.type || "png"));
  12876. return Ow(n, function (t) {
  12877. t.group.ignore = !1;
  12878. }), a;
  12879. }
  12880. }, eb.getConnectedDataURL = function (t) {
  12881. if (!this._disposed && Mg.canvasSupported) {
  12882. var e = this.group,
  12883. i = Math.min,
  12884. r = Math.max,
  12885. a = 1 / 0;
  12886. if (fb[e]) {
  12887. var o = a,
  12888. s = a,
  12889. l = -a,
  12890. u = -a,
  12891. h = [],
  12892. c = t && t.pixelRatio || 1;
  12893. f(db, function (a) {
  12894. if (a.group === e) {
  12895. var c = a.getRenderedCanvas(n(t)),
  12896. d = a.getDom().getBoundingClientRect();
  12897. o = i(d.left, o), s = i(d.top, s), l = r(d.right, l), u = r(d.bottom, u), h.push({
  12898. dom: c,
  12899. left: d.left,
  12900. top: d.top
  12901. });
  12902. }
  12903. }), o *= c, s *= c, l *= c, u *= c;
  12904. var d = l - o,
  12905. p = u - s,
  12906. g = Eg();
  12907. g.width = d, g.height = p;
  12908. var m = En(g);
  12909. return t.connectedBackgroundColor && m.add(new u_({
  12910. shape: {
  12911. x: 0,
  12912. y: 0,
  12913. width: d,
  12914. height: p
  12915. },
  12916. style: {
  12917. fill: t.connectedBackgroundColor
  12918. }
  12919. })), Ow(h, function (t) {
  12920. var e = new Sn({
  12921. style: {
  12922. x: t.left * c - o,
  12923. y: t.top * c - s,
  12924. image: t.dom
  12925. }
  12926. });
  12927. m.add(e);
  12928. }), m.refreshImmediately(), g.toDataURL("image/" + (t && t.type || "png"));
  12929. }
  12930. return this.getDataURL(t);
  12931. }
  12932. }, eb.convertToPixel = _(Ol, "convertToPixel"), eb.convertFromPixel = _(Ol, "convertFromPixel"), eb.containPixel = function (t, e) {
  12933. if (!this._disposed) {
  12934. var i,
  12935. n = this._model;
  12936. return t = Kn(n, t), f(t, function (t, n) {
  12937. n.indexOf("Models") >= 0 && f(t, function (t) {
  12938. var r = t.coordinateSystem;
  12939. if (r && r.containPoint) i |= !!r.containPoint(e);else if ("seriesModels" === n) {
  12940. var a = this._chartsMap[t.__viewId];
  12941. a && a.containPoint && (i |= a.containPoint(e, t));
  12942. }
  12943. }, this);
  12944. }, this), !!i;
  12945. }
  12946. }, eb.getVisual = function (t, e) {
  12947. var i = this._model;
  12948. t = Kn(i, t, {
  12949. defaultMainType: "series"
  12950. });
  12951. var n = t.seriesModel,
  12952. r = n.getData(),
  12953. a = t.hasOwnProperty("dataIndexInside") ? t.dataIndexInside : t.hasOwnProperty("dataIndex") ? r.indexOfRawIndex(t.dataIndex) : null;
  12954. return null != a ? r.getItemVisual(a, e) : r.getVisual(e);
  12955. }, eb.getViewOfComponentModel = function (t) {
  12956. return this._componentsMap[t.__viewId];
  12957. }, eb.getViewOfSeriesModel = function (t) {
  12958. return this._chartsMap[t.__viewId];
  12959. };
  12960. var ib = {
  12961. prepareAndUpdate: function (t) {
  12962. zl(this), ib.update.call(this, t);
  12963. },
  12964. update: function (t) {
  12965. var e = this._model,
  12966. i = this._api,
  12967. n = this._zr,
  12968. r = this._coordSysMgr,
  12969. a = this._scheduler;
  12970. if (e) {
  12971. a.restoreData(e, t), a.performSeriesTasks(e), r.create(e, i), a.performDataProcessorTasks(e, t), Rl(this, e), r.update(e, i), Hl(e), a.performVisualTasks(e, t), Wl(this, e, i, t);
  12972. var o = e.get("backgroundColor") || "transparent";
  12973. if (Mg.canvasSupported) n.setBackgroundColor(o);else {
  12974. var s = Ze(o);
  12975. o = ri(s, "rgb"), 0 === s[3] && (o = "transparent");
  12976. }
  12977. Yl(e, i);
  12978. }
  12979. },
  12980. updateTransform: function (t) {
  12981. var e = this._model,
  12982. i = this,
  12983. n = this._api;
  12984. if (e) {
  12985. var r = [];
  12986. e.eachComponent(function (a, o) {
  12987. var s = i.getViewOfComponentModel(o);
  12988. if (s && s.__alive) if (s.updateTransform) {
  12989. var l = s.updateTransform(o, e, n, t);
  12990. l && l.update && r.push(s);
  12991. } else r.push(s);
  12992. });
  12993. var a = N();
  12994. e.eachSeries(function (r) {
  12995. var o = i._chartsMap[r.__viewId];
  12996. if (o.updateTransform) {
  12997. var s = o.updateTransform(r, e, n, t);
  12998. s && s.update && a.set(r.uid, 1);
  12999. } else a.set(r.uid, 1);
  13000. }), Hl(e), this._scheduler.performVisualTasks(e, t, {
  13001. setDirty: !0,
  13002. dirtyMap: a
  13003. }), Xl(i, e, n, t, a), Yl(e, this._api);
  13004. }
  13005. },
  13006. updateView: function (t) {
  13007. var e = this._model;
  13008. e && ($s.markUpdateMethod(t, "updateView"), Hl(e), this._scheduler.performVisualTasks(e, t, {
  13009. setDirty: !0
  13010. }), Wl(this, this._model, this._api, t), Yl(e, this._api));
  13011. },
  13012. updateVisual: function (t) {
  13013. ib.update.call(this, t);
  13014. },
  13015. updateLayout: function (t) {
  13016. ib.update.call(this, t);
  13017. }
  13018. };
  13019. eb.resize = function (t) {
  13020. if (!this._disposed) {
  13021. this._zr.resize(t);
  13022. var e = this._model;
  13023. if (this._loadingFX && this._loadingFX.resize(), e) {
  13024. var i = e.resetOption("media"),
  13025. n = t && t.silent;
  13026. this[Qw] = !0, i && zl(this), ib.update.call(this), this[Qw] = !1, Nl.call(this, n), Fl.call(this, n);
  13027. }
  13028. }
  13029. }, eb.showLoading = function (t, e) {
  13030. if (!this._disposed && (Ew(t) && (e = t, t = ""), t = t || "default", this.hideLoading(), cb[t])) {
  13031. var i = cb[t](this._api, e),
  13032. n = this._zr;
  13033. this._loadingFX = i, n.add(i);
  13034. }
  13035. }, eb.hideLoading = function () {
  13036. this._disposed || (this._loadingFX && this._zr.remove(this._loadingFX), this._loadingFX = null);
  13037. }, eb.makeActionFromEvent = function (t) {
  13038. var e = o({}, t);
  13039. return e.type = ab[t.type], e;
  13040. }, eb.dispatchAction = function (t, e) {
  13041. if (!this._disposed && (Ew(e) || (e = {
  13042. silent: !!e
  13043. }), rb[t.type] && this._model)) {
  13044. if (this[Qw]) return void this._pendingActions.push(t);
  13045. Bl.call(this, t, e.silent), e.flush ? this._zr.flush(!0) : e.flush !== !1 && Mg.browser.weChat && this._throttledZrFlush(), Nl.call(this, e.silent), Fl.call(this, e.silent);
  13046. }
  13047. }, eb.appendData = function (t) {
  13048. if (!this._disposed) {
  13049. var e = t.seriesIndex,
  13050. i = this.getModel(),
  13051. n = i.getSeriesByIndex(e);
  13052. n.appendData(t), this._scheduler.unfinished = !0;
  13053. }
  13054. }, eb.on = kl("on", !1), eb.off = kl("off", !1), eb.one = kl("one", !1);
  13055. var nb = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout", "contextmenu"];
  13056. eb._initEvents = function () {
  13057. Ow(nb, function (t) {
  13058. var e = function (e) {
  13059. var i,
  13060. n = this.getModel(),
  13061. r = e.target,
  13062. a = "globalout" === t;
  13063. if (a) i = {};else if (r && null != r.dataIndex) {
  13064. var s = r.dataModel || n.getSeriesByIndex(r.seriesIndex);
  13065. i = s && s.getDataParams(r.dataIndex, r.dataType, r) || {};
  13066. } else r && r.eventData && (i = o({}, r.eventData));
  13067. if (i) {
  13068. var l = i.componentType,
  13069. u = i.componentIndex;
  13070. ("markLine" === l || "markPoint" === l || "markArea" === l) && (l = "series", u = i.seriesIndex);
  13071. var h = l && null != u && n.getComponent(l, u),
  13072. c = h && this["series" === h.mainType ? "_chartsMap" : "_componentsMap"][h.__viewId];
  13073. i.event = e, i.type = t, this._ecEventProcessor.eventInfo = {
  13074. targetEl: r,
  13075. packedEvent: i,
  13076. model: h,
  13077. view: c
  13078. }, this.trigger(t, i);
  13079. }
  13080. };
  13081. e.zrEventfulCallAtLast = !0, this._zr.on(t, e, this);
  13082. }, this), Ow(ab, function (t, e) {
  13083. this._messageCenter.on(e, function (t) {
  13084. this.trigger(e, t);
  13085. }, this);
  13086. }, this);
  13087. }, eb.isDisposed = function () {
  13088. return this._disposed;
  13089. }, eb.clear = function () {
  13090. this._disposed || this.setOption({
  13091. series: []
  13092. }, !0);
  13093. }, eb.dispose = function () {
  13094. if (!this._disposed) {
  13095. this._disposed = !0, Qn(this.getDom(), mb, "");
  13096. var t = this._api,
  13097. e = this._model;
  13098. Ow(this._componentsViews, function (i) {
  13099. i.dispose(e, t);
  13100. }), Ow(this._chartsViews, function (i) {
  13101. i.dispose(e, t);
  13102. }), this._zr.dispose(), delete db[this.id];
  13103. }
  13104. }, c(Ll, Yg), $l.prototype = {
  13105. constructor: $l,
  13106. normalizeQuery: function (t) {
  13107. var e = {},
  13108. i = {},
  13109. n = {};
  13110. if (b(t)) {
  13111. var r = Rw(t);
  13112. e.mainType = r.main || null, e.subType = r.sub || null;
  13113. } else {
  13114. var a = ["Index", "Name", "Id"],
  13115. o = {
  13116. name: 1,
  13117. dataIndex: 1,
  13118. dataType: 1
  13119. };
  13120. f(t, function (t, r) {
  13121. for (var s = !1, l = 0; l < a.length; l++) {
  13122. var u = a[l],
  13123. h = r.lastIndexOf(u);
  13124. if (h > 0 && h === r.length - u.length) {
  13125. var c = r.slice(0, h);
  13126. "data" !== c && (e.mainType = c, e[u.toLowerCase()] = t, s = !0);
  13127. }
  13128. }
  13129. o.hasOwnProperty(r) && (i[r] = t, s = !0), s || (n[r] = t);
  13130. });
  13131. }
  13132. return {
  13133. cptQuery: e,
  13134. dataQuery: i,
  13135. otherQuery: n
  13136. };
  13137. },
  13138. filter: function (t, e) {
  13139. function i(t, e, i, n) {
  13140. return null == t[i] || e[n || i] === t[i];
  13141. }
  13142. var n = this.eventInfo;
  13143. if (!n) return !0;
  13144. var r = n.targetEl,
  13145. a = n.packedEvent,
  13146. o = n.model,
  13147. s = n.view;
  13148. if (!o || !s) return !0;
  13149. var l = e.cptQuery,
  13150. u = e.dataQuery;
  13151. return i(l, o, "mainType") && i(l, o, "subType") && i(l, o, "index", "componentIndex") && i(l, o, "name") && i(l, o, "id") && i(u, a, "name") && i(u, a, "dataIndex") && i(u, a, "dataType") && (!s.filterForExposedEvent || s.filterForExposedEvent(t, e.otherQuery, r, a));
  13152. },
  13153. afterTrigger: function () {
  13154. this.eventInfo = null;
  13155. }
  13156. };
  13157. var rb = {},
  13158. ab = {},
  13159. ob = [],
  13160. sb = [],
  13161. lb = [],
  13162. ub = [],
  13163. hb = {},
  13164. cb = {},
  13165. db = {},
  13166. fb = {},
  13167. pb = new Date() - 0,
  13168. gb = new Date() - 0,
  13169. mb = "_echarts_instance_",
  13170. vb = eu;
  13171. fu(Yw, rw), ou(Rx), su(Hw, Bx), gu("default", lw), uu({
  13172. type: "highlight",
  13173. event: "highlight",
  13174. update: "highlight"
  13175. }, G), uu({
  13176. type: "downplay",
  13177. event: "downplay",
  13178. update: "downplay"
  13179. }, G), au("light", mw), au("dark", xw);
  13180. var yb = {};
  13181. Mu.prototype = {
  13182. constructor: Mu,
  13183. add: function (t) {
  13184. return this._add = t, this;
  13185. },
  13186. update: function (t) {
  13187. return this._update = t, this;
  13188. },
  13189. remove: function (t) {
  13190. return this._remove = t, this;
  13191. },
  13192. execute: function () {
  13193. var t,
  13194. e = this._old,
  13195. i = this._new,
  13196. n = {},
  13197. r = {},
  13198. a = [],
  13199. o = [];
  13200. for (Iu(e, n, a, "_oldKeyGetter", this), Iu(i, r, o, "_newKeyGetter", this), t = 0; t < e.length; t++) {
  13201. var s = a[t],
  13202. l = r[s];
  13203. if (null != l) {
  13204. var u = l.length;
  13205. u ? (1 === u && (r[s] = null), l = l.shift()) : r[s] = null, this._update && this._update(l, t);
  13206. } else this._remove && this._remove(t);
  13207. }
  13208. for (var t = 0; t < o.length; t++) {
  13209. var s = o[t];
  13210. if (r.hasOwnProperty(s)) {
  13211. var l = r[s];
  13212. if (null == l) continue;
  13213. if (l.length) for (var h = 0, u = l.length; u > h; h++) this._add && this._add(l[h]);else this._add && this._add(l);
  13214. }
  13215. }
  13216. }
  13217. };
  13218. var _b = N(["tooltip", "label", "itemName", "itemId", "seriesName"]),
  13219. xb = S,
  13220. wb = "undefined",
  13221. bb = -1,
  13222. Sb = "e\x00\x00",
  13223. Mb = {
  13224. "float": typeof Float64Array === wb ? Array : Float64Array,
  13225. "int": typeof Int32Array === wb ? Array : Int32Array,
  13226. ordinal: Array,
  13227. number: Array,
  13228. time: Array
  13229. },
  13230. Ib = typeof Uint32Array === wb ? Array : Uint32Array,
  13231. Tb = typeof Int32Array === wb ? Array : Int32Array,
  13232. Cb = typeof Uint16Array === wb ? Array : Uint16Array,
  13233. Db = ["hasItemOption", "_nameList", "_idList", "_invertedIndicesMap", "_rawData", "_chunkSize", "_chunkCount", "_dimValueGetter", "_count", "_rawCount", "_nameDimIdx", "_idDimIdx"],
  13234. Ab = ["_extent", "_approximateExtent", "_rawExtent"],
  13235. kb = function (t, e) {
  13236. t = t || ["x", "y"];
  13237. for (var i = {}, n = [], r = {}, a = 0; a < t.length; a++) {
  13238. var o = t[a];
  13239. b(o) && (o = {
  13240. name: o
  13241. });
  13242. var s = o.name;
  13243. o.type = o.type || "float", o.coordDim || (o.coordDim = s, o.coordDimIndex = 0), o.otherDims = o.otherDims || {}, n.push(s), i[s] = o, o.index = a, o.createInvertedIndices && (r[s] = []);
  13244. }
  13245. this.dimensions = n, this._dimensionInfos = i, this.hostModel = e, this.dataType, this._indices = null, this._count = 0, this._rawCount = 0, this._storage = {}, this._nameList = [], this._idList = [], this._optionModels = [], this._visual = {}, this._layout = {}, this._itemVisuals = [], this.hasItemVisual = {}, this._itemLayouts = [], this._graphicEls = [], this._chunkSize = 1e5, this._chunkCount = 0, this._rawData, this._rawExtent = {}, this._extent = {}, this._approximateExtent = {}, this._dimensionsSummary = Tu(this), this._invertedIndicesMap = r, this._calculationInfo = {}, this.userOutput = this._dimensionsSummary.userOutput;
  13246. },
  13247. Pb = kb.prototype;
  13248. Pb.type = "list", Pb.hasItemOption = !0, Pb.getDimension = function (t) {
  13249. return ("number" == typeof t || !isNaN(t) && !this._dimensionInfos.hasOwnProperty(t)) && (t = this.dimensions[t]), t;
  13250. }, Pb.getDimensionInfo = function (t) {
  13251. return this._dimensionInfos[this.getDimension(t)];
  13252. }, Pb.getDimensionsOnCoord = function () {
  13253. return this._dimensionsSummary.dataDimsOnCoord.slice();
  13254. }, Pb.mapDimension = function (t, e) {
  13255. var i = this._dimensionsSummary;
  13256. if (null == e) return i.encodeFirstDimNotExtra[t];
  13257. var n = i.encode[t];
  13258. return e === !0 ? (n || []).slice() : n && n[e];
  13259. }, Pb.initData = function (t, e, i) {
  13260. var n = Uo.isInstance(t) || d(t);
  13261. n && (t = new ks(t, this.dimensions.length)), this._rawData = t, this._storage = {}, this._indices = null, this._nameList = e || [], this._idList = [], this._nameRepeatCount = {}, i || (this.hasItemOption = !1), this.defaultDimValueGetter = Vx[this._rawData.getSource().sourceFormat], this._dimValueGetter = i = i || this.defaultDimValueGetter, this._dimValueGetterArrayRows = Vx.arrayRows, this._rawExtent = {}, this._initDataFromProvider(0, t.count()), t.pure && (this.hasItemOption = !1);
  13262. }, Pb.getProvider = function () {
  13263. return this._rawData;
  13264. }, Pb.appendData = function (t) {
  13265. var e = this._rawData,
  13266. i = this.count();
  13267. e.appendData(t);
  13268. var n = e.count();
  13269. e.persistent || (n += i), this._initDataFromProvider(i, n);
  13270. }, Pb.appendValues = function (t, e) {
  13271. for (var i = this._chunkSize, n = this._storage, r = this.dimensions, a = r.length, o = this._rawExtent, s = this.count(), l = s + Math.max(t.length, e ? e.length : 0), u = this._chunkCount, h = 0; a > h; h++) {
  13272. var c = r[h];
  13273. o[c] || (o[c] = Hu()), n[c] || (n[c] = []), Ou(n, this._dimensionInfos[c], i, u, l), this._chunkCount = n[c].length;
  13274. }
  13275. for (var d = new Array(a), f = s; l > f; f++) {
  13276. for (var p = f - s, g = Math.floor(f / i), m = f % i, v = 0; a > v; v++) {
  13277. var c = r[v],
  13278. y = this._dimValueGetterArrayRows(t[p] || d, c, p, v);
  13279. n[c][g][m] = y;
  13280. var _ = o[c];
  13281. y < _[0] && (_[0] = y), y > _[1] && (_[1] = y);
  13282. }
  13283. e && (this._nameList[f] = e[p]);
  13284. }
  13285. this._rawCount = this._count = l, this._extent = {}, zu(this);
  13286. }, Pb._initDataFromProvider = function (t, e) {
  13287. if (!(t >= e)) {
  13288. for (var i, n = this._chunkSize, r = this._rawData, a = this._storage, o = this.dimensions, s = o.length, l = this._dimensionInfos, u = this._nameList, h = this._idList, c = this._rawExtent, d = this._nameRepeatCount = {}, f = this._chunkCount, p = 0; s > p; p++) {
  13289. var g = o[p];
  13290. c[g] || (c[g] = Hu());
  13291. var m = l[g];
  13292. 0 === m.otherDims.itemName && (i = this._nameDimIdx = p), 0 === m.otherDims.itemId && (this._idDimIdx = p), a[g] || (a[g] = []), Ou(a, m, n, f, e), this._chunkCount = a[g].length;
  13293. }
  13294. for (var v = new Array(s), y = t; e > y; y++) {
  13295. v = r.getItem(y, v);
  13296. for (var _ = Math.floor(y / n), x = y % n, w = 0; s > w; w++) {
  13297. var g = o[w],
  13298. b = a[g][_],
  13299. S = this._dimValueGetter(v, g, y, w);
  13300. b[x] = S;
  13301. var M = c[g];
  13302. S < M[0] && (M[0] = S), S > M[1] && (M[1] = S);
  13303. }
  13304. if (!r.pure) {
  13305. var I = u[y];
  13306. if (v && null == I) if (null != v.name) u[y] = I = v.name;else if (null != i) {
  13307. var T = o[i],
  13308. C = a[T][_];
  13309. if (C) {
  13310. I = C[x];
  13311. var D = l[T].ordinalMeta;
  13312. D && D.categories.length && (I = D.categories[I]);
  13313. }
  13314. }
  13315. var A = null == v ? null : v.id;
  13316. null == A && null != I && (d[I] = d[I] || 0, A = I, d[I] > 0 && (A += "__ec__" + d[I]), d[I]++), null != A && (h[y] = A);
  13317. }
  13318. }
  13319. !r.persistent && r.clean && r.clean(), this._rawCount = this._count = e, this._extent = {}, zu(this);
  13320. }
  13321. }, Pb.count = function () {
  13322. return this._count;
  13323. }, Pb.getIndices = function () {
  13324. var t,
  13325. e = this._indices;
  13326. if (e) {
  13327. var i = e.constructor,
  13328. n = this._count;
  13329. if (i === Array) {
  13330. t = new i(n);
  13331. for (var r = 0; n > r; r++) t[r] = e[r];
  13332. } else t = new i(e.buffer, 0, n);
  13333. } else for (var i = ku(this), t = new i(this.count()), r = 0; r < t.length; r++) t[r] = r;
  13334. return t;
  13335. }, Pb.get = function (t, e) {
  13336. if (!(e >= 0 && e < this._count)) return 0 / 0;
  13337. var i = this._storage;
  13338. if (!i[t]) return 0 / 0;
  13339. e = this.getRawIndex(e);
  13340. var n = Math.floor(e / this._chunkSize),
  13341. r = e % this._chunkSize,
  13342. a = i[t][n],
  13343. o = a[r];
  13344. return o;
  13345. }, Pb.getByRawIndex = function (t, e) {
  13346. if (!(e >= 0 && e < this._rawCount)) return 0 / 0;
  13347. var i = this._storage[t];
  13348. if (!i) return 0 / 0;
  13349. var n = Math.floor(e / this._chunkSize),
  13350. r = e % this._chunkSize,
  13351. a = i[n];
  13352. return a[r];
  13353. }, Pb._getFast = function (t, e) {
  13354. var i = Math.floor(e / this._chunkSize),
  13355. n = e % this._chunkSize,
  13356. r = this._storage[t][i];
  13357. return r[n];
  13358. }, Pb.getValues = function (t, e) {
  13359. var i = [];
  13360. x(t) || (e = t, t = this.dimensions);
  13361. for (var n = 0, r = t.length; r > n; n++) i.push(this.get(t[n], e));
  13362. return i;
  13363. }, Pb.hasValue = function (t) {
  13364. for (var e = this._dimensionsSummary.dataDimsOnCoord, i = 0, n = e.length; n > i; i++) if (isNaN(this.get(e[i], t))) return !1;
  13365. return !0;
  13366. }, Pb.getDataExtent = function (t) {
  13367. t = this.getDimension(t);
  13368. var e = this._storage[t],
  13369. i = Hu();
  13370. if (!e) return i;
  13371. var n,
  13372. r = this.count(),
  13373. a = !this._indices;
  13374. if (a) return this._rawExtent[t].slice();
  13375. if (n = this._extent[t]) return n.slice();
  13376. n = i;
  13377. for (var o = n[0], s = n[1], l = 0; r > l; l++) {
  13378. var u = this._getFast(t, this.getRawIndex(l));
  13379. o > u && (o = u), u > s && (s = u);
  13380. }
  13381. return n = [o, s], this._extent[t] = n, n;
  13382. }, Pb.getApproximateExtent = function (t) {
  13383. return t = this.getDimension(t), this._approximateExtent[t] || this.getDataExtent(t);
  13384. }, Pb.setApproximateExtent = function (t, e) {
  13385. e = this.getDimension(e), this._approximateExtent[e] = t.slice();
  13386. }, Pb.getCalculationInfo = function (t) {
  13387. return this._calculationInfo[t];
  13388. }, Pb.setCalculationInfo = function (t, e) {
  13389. xb(t) ? o(this._calculationInfo, t) : this._calculationInfo[t] = e;
  13390. }, Pb.getSum = function (t) {
  13391. var e = this._storage[t],
  13392. i = 0;
  13393. if (e) for (var n = 0, r = this.count(); r > n; n++) {
  13394. var a = this.get(t, n);
  13395. isNaN(a) || (i += a);
  13396. }
  13397. return i;
  13398. }, Pb.getMedian = function (t) {
  13399. var e = [];
  13400. this.each(t, function (t) {
  13401. isNaN(t) || e.push(t);
  13402. });
  13403. var i = [].concat(e).sort(function (t, e) {
  13404. return t - e;
  13405. }),
  13406. n = this.count();
  13407. return 0 === n ? 0 : n % 2 === 1 ? i[(n - 1) / 2] : (i[n / 2] + i[n / 2 - 1]) / 2;
  13408. }, Pb.rawIndexOf = function (t, e) {
  13409. var i = t && this._invertedIndicesMap[t],
  13410. n = i[e];
  13411. return null == n || isNaN(n) ? bb : n;
  13412. }, Pb.indexOfName = function (t) {
  13413. for (var e = 0, i = this.count(); i > e; e++) if (this.getName(e) === t) return e;
  13414. return -1;
  13415. }, Pb.indexOfRawIndex = function (t) {
  13416. if (t >= this._rawCount || 0 > t) return -1;
  13417. if (!this._indices) return t;
  13418. var e = this._indices,
  13419. i = e[t];
  13420. if (null != i && i < this._count && i === t) return t;
  13421. for (var n = 0, r = this._count - 1; r >= n;) {
  13422. var a = (n + r) / 2 | 0;
  13423. if (e[a] < t) n = a + 1;else {
  13424. if (!(e[a] > t)) return a;
  13425. r = a - 1;
  13426. }
  13427. }
  13428. return -1;
  13429. }, Pb.indicesOfNearest = function (t, e, i) {
  13430. var n = this._storage,
  13431. r = n[t],
  13432. a = [];
  13433. if (!r) return a;
  13434. null == i && (i = 1 / 0);
  13435. for (var o = Number.MAX_VALUE, s = -1, l = 0, u = this.count(); u > l; l++) {
  13436. var h = e - this.get(t, l),
  13437. c = Math.abs(h);
  13438. i >= h && o >= c && ((o > c || h >= 0 && 0 > s) && (o = c, s = h, a.length = 0), a.push(l));
  13439. }
  13440. return a;
  13441. }, Pb.getRawIndex = Ru, Pb.getRawDataItem = function (t) {
  13442. if (this._rawData.persistent) return this._rawData.getItem(this.getRawIndex(t));
  13443. for (var e = [], i = 0; i < this.dimensions.length; i++) {
  13444. var n = this.dimensions[i];
  13445. e.push(this.get(n, t));
  13446. }
  13447. return e;
  13448. }, Pb.getName = function (t) {
  13449. var e = this.getRawIndex(t);
  13450. return this._nameList[e] || Eu(this, this._nameDimIdx, e) || "";
  13451. }, Pb.getId = function (t) {
  13452. return Nu(this, this.getRawIndex(t));
  13453. }, Pb.each = function (t, e, i, n) {
  13454. if (this._count) {
  13455. "function" == typeof t && (n = i, i = e, e = t, t = []), i = i || n || this, t = p(Fu(t), this.getDimension, this);
  13456. for (var r = t.length, a = 0; a < this.count(); a++) switch (r) {
  13457. case 0:
  13458. e.call(i, a);
  13459. break;
  13460. case 1:
  13461. e.call(i, this.get(t[0], a), a);
  13462. break;
  13463. case 2:
  13464. e.call(i, this.get(t[0], a), this.get(t[1], a), a);
  13465. break;
  13466. default:
  13467. for (var o = 0, s = []; r > o; o++) s[o] = this.get(t[o], a);
  13468. s[o] = a, e.apply(i, s);
  13469. }
  13470. }
  13471. }, Pb.filterSelf = function (t, e, i, n) {
  13472. if (this._count) {
  13473. "function" == typeof t && (n = i, i = e, e = t, t = []), i = i || n || this, t = p(Fu(t), this.getDimension, this);
  13474. for (var r = this.count(), a = ku(this), o = new a(r), s = [], l = t.length, u = 0, h = t[0], c = 0; r > c; c++) {
  13475. var d,
  13476. f = this.getRawIndex(c);
  13477. if (0 === l) d = e.call(i, c);else if (1 === l) {
  13478. var g = this._getFast(h, f);
  13479. d = e.call(i, g, c);
  13480. } else {
  13481. for (var m = 0; l > m; m++) s[m] = this._getFast(h, f);
  13482. s[m] = c, d = e.apply(i, s);
  13483. }
  13484. d && (o[u++] = f);
  13485. }
  13486. return r > u && (this._indices = o), this._count = u, this._extent = {}, this.getRawIndex = this._indices ? Bu : Ru, this;
  13487. }
  13488. }, Pb.selectRange = function (t) {
  13489. if (this._count) {
  13490. var e = [];
  13491. for (var i in t) t.hasOwnProperty(i) && e.push(i);
  13492. var n = e.length;
  13493. if (n) {
  13494. var r = this.count(),
  13495. a = ku(this),
  13496. o = new a(r),
  13497. s = 0,
  13498. l = e[0],
  13499. u = t[l][0],
  13500. h = t[l][1],
  13501. c = !1;
  13502. if (!this._indices) {
  13503. var d = 0;
  13504. if (1 === n) {
  13505. for (var f = this._storage[e[0]], p = 0; p < this._chunkCount; p++) for (var g = f[p], m = Math.min(this._count - p * this._chunkSize, this._chunkSize), v = 0; m > v; v++) {
  13506. var y = g[v];
  13507. (y >= u && h >= y || isNaN(y)) && (o[s++] = d), d++;
  13508. }
  13509. c = !0;
  13510. } else if (2 === n) {
  13511. for (var f = this._storage[l], _ = this._storage[e[1]], x = t[e[1]][0], w = t[e[1]][1], p = 0; p < this._chunkCount; p++) for (var g = f[p], b = _[p], m = Math.min(this._count - p * this._chunkSize, this._chunkSize), v = 0; m > v; v++) {
  13512. var y = g[v],
  13513. S = b[v];
  13514. (y >= u && h >= y || isNaN(y)) && (S >= x && w >= S || isNaN(S)) && (o[s++] = d), d++;
  13515. }
  13516. c = !0;
  13517. }
  13518. }
  13519. if (!c) if (1 === n) for (var v = 0; r > v; v++) {
  13520. var M = this.getRawIndex(v),
  13521. y = this._getFast(l, M);
  13522. (y >= u && h >= y || isNaN(y)) && (o[s++] = M);
  13523. } else for (var v = 0; r > v; v++) {
  13524. for (var I = !0, M = this.getRawIndex(v), p = 0; n > p; p++) {
  13525. var T = e[p],
  13526. y = this._getFast(i, M);
  13527. (y < t[T][0] || y > t[T][1]) && (I = !1);
  13528. }
  13529. I && (o[s++] = this.getRawIndex(v));
  13530. }
  13531. return r > s && (this._indices = o), this._count = s, this._extent = {}, this.getRawIndex = this._indices ? Bu : Ru, this;
  13532. }
  13533. }
  13534. }, Pb.mapArray = function (t, e, i, n) {
  13535. "function" == typeof t && (n = i, i = e, e = t, t = []), i = i || n || this;
  13536. var r = [];
  13537. return this.each(t, function () {
  13538. r.push(e && e.apply(this, arguments));
  13539. }, i), r;
  13540. }, Pb.map = function (t, e, i, n) {
  13541. i = i || n || this, t = p(Fu(t), this.getDimension, this);
  13542. var r = Gu(this, t);
  13543. r._indices = this._indices, r.getRawIndex = r._indices ? Bu : Ru;
  13544. for (var a = r._storage, o = [], s = this._chunkSize, l = t.length, u = this.count(), h = [], c = r._rawExtent, d = 0; u > d; d++) {
  13545. for (var f = 0; l > f; f++) h[f] = this.get(t[f], d);
  13546. h[l] = d;
  13547. var g = e && e.apply(i, h);
  13548. if (null != g) {
  13549. "object" != typeof g && (o[0] = g, g = o);
  13550. for (var m = this.getRawIndex(d), v = Math.floor(m / s), y = m % s, _ = 0; _ < g.length; _++) {
  13551. var x = t[_],
  13552. w = g[_],
  13553. b = c[x],
  13554. S = a[x];
  13555. S && (S[v][y] = w), w < b[0] && (b[0] = w), w > b[1] && (b[1] = w);
  13556. }
  13557. }
  13558. }
  13559. return r;
  13560. }, Pb.downSample = function (t, e, i, n) {
  13561. for (var r = Gu(this, [t]), a = r._storage, o = [], s = Math.floor(1 / e), l = a[t], u = this.count(), h = this._chunkSize, c = r._rawExtent[t], d = new (ku(this))(u), f = 0, p = 0; u > p; p += s) {
  13562. s > u - p && (s = u - p, o.length = s);
  13563. for (var g = 0; s > g; g++) {
  13564. var m = this.getRawIndex(p + g),
  13565. v = Math.floor(m / h),
  13566. y = m % h;
  13567. o[g] = l[v][y];
  13568. }
  13569. var _ = i(o),
  13570. x = this.getRawIndex(Math.min(p + n(o, _) || 0, u - 1)),
  13571. w = Math.floor(x / h),
  13572. b = x % h;
  13573. l[w][b] = _, _ < c[0] && (c[0] = _), _ > c[1] && (c[1] = _), d[f++] = x;
  13574. }
  13575. return r._count = f, r._indices = d, r.getRawIndex = Bu, r;
  13576. }, Pb.getItemModel = function (t) {
  13577. var e = this.hostModel;
  13578. return new Ja(this.getRawDataItem(t), e, e && e.ecModel);
  13579. }, Pb.diff = function (t) {
  13580. var e = this;
  13581. return new Mu(t ? t.getIndices() : [], this.getIndices(), function (e) {
  13582. return Nu(t, e);
  13583. }, function (t) {
  13584. return Nu(e, t);
  13585. });
  13586. }, Pb.getVisual = function (t) {
  13587. var e = this._visual;
  13588. return e && e[t];
  13589. }, Pb.setVisual = function (t, e) {
  13590. if (xb(t)) for (var i in t) t.hasOwnProperty(i) && this.setVisual(i, t[i]);else this._visual = this._visual || {}, this._visual[t] = e;
  13591. }, Pb.setLayout = function (t, e) {
  13592. if (xb(t)) for (var i in t) t.hasOwnProperty(i) && this.setLayout(i, t[i]);else this._layout[t] = e;
  13593. }, Pb.getLayout = function (t) {
  13594. return this._layout[t];
  13595. }, Pb.getItemLayout = function (t) {
  13596. return this._itemLayouts[t];
  13597. }, Pb.setItemLayout = function (t, e, i) {
  13598. this._itemLayouts[t] = i ? o(this._itemLayouts[t] || {}, e) : e;
  13599. }, Pb.clearItemLayouts = function () {
  13600. this._itemLayouts.length = 0;
  13601. }, Pb.getItemVisual = function (t, e, i) {
  13602. var n = this._itemVisuals[t],
  13603. r = n && n[e];
  13604. return null != r || i ? r : this.getVisual(e);
  13605. }, Pb.setItemVisual = function (t, e, i) {
  13606. var n = this._itemVisuals[t] || {},
  13607. r = this.hasItemVisual;
  13608. if (this._itemVisuals[t] = n, xb(e)) for (var a in e) e.hasOwnProperty(a) && (n[a] = e[a], r[a] = !0);else n[e] = i, r[e] = !0;
  13609. }, Pb.clearAllVisual = function () {
  13610. this._visual = {}, this._itemVisuals = [], this.hasItemVisual = {};
  13611. };
  13612. var Lb = function (t) {
  13613. t.seriesIndex = this.seriesIndex, t.dataIndex = this.dataIndex, t.dataType = this.dataType;
  13614. };
  13615. Pb.setItemGraphicEl = function (t, e) {
  13616. var i = this.hostModel;
  13617. e && (e.dataIndex = t, e.dataType = this.dataType, e.seriesIndex = i && i.seriesIndex, "group" === e.type && e.traverse(Lb, e)), this._graphicEls[t] = e;
  13618. }, Pb.getItemGraphicEl = function (t) {
  13619. return this._graphicEls[t];
  13620. }, Pb.eachItemGraphicEl = function (t, e) {
  13621. f(this._graphicEls, function (i, n) {
  13622. i && t && t.call(e, i, n);
  13623. });
  13624. }, Pb.cloneShallow = function (t) {
  13625. if (!t) {
  13626. var e = p(this.dimensions, this.getDimensionInfo, this);
  13627. t = new kb(e, this.hostModel);
  13628. }
  13629. if (t._storage = this._storage, Lu(t, this), this._indices) {
  13630. var i = this._indices.constructor;
  13631. t._indices = new i(this._indices);
  13632. } else t._indices = null;
  13633. return t.getRawIndex = t._indices ? Bu : Ru, t;
  13634. }, Pb.wrapMethod = function (t, e) {
  13635. var i = this[t];
  13636. "function" == typeof i && (this.__wrappedMethods = this.__wrappedMethods || [], this.__wrappedMethods.push(t), this[t] = function () {
  13637. var t = i.apply(this, arguments);
  13638. return e.apply(this, [t].concat(P(arguments)));
  13639. });
  13640. }, Pb.TRANSFERABLE_METHODS = ["cloneShallow", "downSample", "map"], Pb.CHANGABLE_METHODS = ["filterSelf", "selectRange"];
  13641. var Ob = function (t, e) {
  13642. return e = e || {}, Wu(e.coordDimensions || [], t, {
  13643. dimsDef: e.dimensionsDefine || t.dimensionsDefine,
  13644. encodeDef: e.encodeDefine || t.encodeDefine,
  13645. dimCount: e.dimensionsCount,
  13646. generateCoord: e.generateCoord,
  13647. generateCoordCount: e.generateCoordCount
  13648. });
  13649. };
  13650. Qu.prototype.parse = function (t) {
  13651. return t;
  13652. }, Qu.prototype.getSetting = function (t) {
  13653. return this._setting[t];
  13654. }, Qu.prototype.contain = function (t) {
  13655. var e = this._extent;
  13656. return t >= e[0] && t <= e[1];
  13657. }, Qu.prototype.normalize = function (t) {
  13658. var e = this._extent;
  13659. return e[1] === e[0] ? .5 : (t - e[0]) / (e[1] - e[0]);
  13660. }, Qu.prototype.scale = function (t) {
  13661. var e = this._extent;
  13662. return t * (e[1] - e[0]) + e[0];
  13663. }, Qu.prototype.unionExtent = function (t) {
  13664. var e = this._extent;
  13665. t[0] < e[0] && (e[0] = t[0]), t[1] > e[1] && (e[1] = t[1]);
  13666. }, Qu.prototype.unionExtentFromData = function (t, e) {
  13667. this.unionExtent(t.getApproximateExtent(e));
  13668. }, Qu.prototype.getExtent = function () {
  13669. return this._extent.slice();
  13670. }, Qu.prototype.setExtent = function (t, e) {
  13671. var i = this._extent;
  13672. isNaN(t) || (i[0] = t), isNaN(e) || (i[1] = e);
  13673. }, Qu.prototype.isBlank = function () {
  13674. return this._isBlank;
  13675. }, Qu.prototype.setBlank = function (t) {
  13676. this._isBlank = t;
  13677. }, Qu.prototype.getLabel = null, nr(Qu), sr(Qu, {
  13678. registerWhenExtend: !0
  13679. }), Ju.createByAxisModel = function (t) {
  13680. var e = t.option,
  13681. i = e.data,
  13682. n = i && p(i, eh);
  13683. return new Ju({
  13684. categories: n,
  13685. needCollect: !n,
  13686. deduplication: e.dedplication !== !1
  13687. });
  13688. };
  13689. var zb = Ju.prototype;
  13690. zb.getOrdinal = function (t) {
  13691. return th(this).get(t);
  13692. }, zb.parseAndCollect = function (t) {
  13693. var e,
  13694. i = this._needCollect;
  13695. if ("string" != typeof t && !i) return t;
  13696. if (i && !this._deduplication) return e = this.categories.length, this.categories[e] = t, e;
  13697. var n = th(this);
  13698. return e = n.get(t), null == e && (i ? (e = this.categories.length, this.categories[e] = t, n.set(t, e)) : e = 0 / 0), e;
  13699. };
  13700. var Eb = Qu.prototype,
  13701. Rb = Qu.extend({
  13702. type: "ordinal",
  13703. init: function (t, e) {
  13704. (!t || x(t)) && (t = new Ju({
  13705. categories: t
  13706. })), this._ordinalMeta = t, this._extent = e || [0, t.categories.length - 1];
  13707. },
  13708. parse: function (t) {
  13709. return "string" == typeof t ? this._ordinalMeta.getOrdinal(t) : Math.round(t);
  13710. },
  13711. contain: function (t) {
  13712. return t = this.parse(t), Eb.contain.call(this, t) && null != this._ordinalMeta.categories[t];
  13713. },
  13714. normalize: function (t) {
  13715. return Eb.normalize.call(this, this.parse(t));
  13716. },
  13717. scale: function (t) {
  13718. return Math.round(Eb.scale.call(this, t));
  13719. },
  13720. getTicks: function () {
  13721. for (var t = [], e = this._extent, i = e[0]; i <= e[1];) t.push(i), i++;
  13722. return t;
  13723. },
  13724. getLabel: function (t) {
  13725. return this.isBlank() ? void 0 : this._ordinalMeta.categories[t];
  13726. },
  13727. count: function () {
  13728. return this._extent[1] - this._extent[0] + 1;
  13729. },
  13730. unionExtentFromData: function (t, e) {
  13731. this.unionExtent(t.getApproximateExtent(e));
  13732. },
  13733. getOrdinalMeta: function () {
  13734. return this._ordinalMeta;
  13735. },
  13736. niceTicks: G,
  13737. niceExtent: G
  13738. });
  13739. Rb.create = function () {
  13740. return new Rb();
  13741. };
  13742. var Bb = lo,
  13743. Nb = lo,
  13744. Fb = Qu.extend({
  13745. type: "interval",
  13746. _interval: 0,
  13747. _intervalPrecision: 2,
  13748. setExtent: function (t, e) {
  13749. var i = this._extent;
  13750. isNaN(t) || (i[0] = parseFloat(t)), isNaN(e) || (i[1] = parseFloat(e));
  13751. },
  13752. unionExtent: function (t) {
  13753. var e = this._extent;
  13754. t[0] < e[0] && (e[0] = t[0]), t[1] > e[1] && (e[1] = t[1]), Fb.prototype.setExtent.call(this, e[0], e[1]);
  13755. },
  13756. getInterval: function () {
  13757. return this._interval;
  13758. },
  13759. setInterval: function (t) {
  13760. this._interval = t, this._niceExtent = this._extent.slice(), this._intervalPrecision = nh(t);
  13761. },
  13762. getTicks: function () {
  13763. return oh(this._interval, this._extent, this._niceExtent, this._intervalPrecision);
  13764. },
  13765. getLabel: function (t, e) {
  13766. if (null == t) return "";
  13767. var i = e && e.precision;
  13768. return null == i ? i = co(t) || 0 : "auto" === i && (i = this._intervalPrecision), t = Nb(t, i, !0), Mo(t);
  13769. },
  13770. niceTicks: function (t, e, i) {
  13771. t = t || 5;
  13772. var n = this._extent,
  13773. r = n[1] - n[0];
  13774. if (isFinite(r)) {
  13775. 0 > r && (r = -r, n.reverse());
  13776. var a = ih(n, t, e, i);
  13777. this._intervalPrecision = a.intervalPrecision, this._interval = a.interval, this._niceExtent = a.niceTickExtent;
  13778. }
  13779. },
  13780. niceExtent: function (t) {
  13781. var e = this._extent;
  13782. if (e[0] === e[1]) if (0 !== e[0]) {
  13783. var i = e[0];
  13784. t.fixMax ? e[0] -= i / 2 : (e[1] += i / 2, e[0] -= i / 2);
  13785. } else e[1] = 1;
  13786. var n = e[1] - e[0];
  13787. isFinite(n) || (e[0] = 0, e[1] = 1), this.niceTicks(t.splitNumber, t.minInterval, t.maxInterval);
  13788. var r = this._interval;
  13789. t.fixMin || (e[0] = Nb(Math.floor(e[0] / r) * r)), t.fixMax || (e[1] = Nb(Math.ceil(e[1] / r) * r));
  13790. }
  13791. });
  13792. Fb.create = function () {
  13793. return new Fb();
  13794. };
  13795. var Gb = "__ec_stack_",
  13796. Vb = .5,
  13797. Hb = "undefined" != typeof Float32Array ? Float32Array : Array,
  13798. Wb = {
  13799. seriesType: "bar",
  13800. plan: Kx(),
  13801. reset: function (t) {
  13802. function e(t, e) {
  13803. for (var i, c = t.count, d = new Hb(2 * c), f = new Hb(c), p = [], g = [], m = 0, v = 0; null != (i = t.next());) g[u] = e.get(o, i), g[1 - u] = e.get(s, i), p = n.dataToPoint(g, null, p), d[m++] = p[0], d[m++] = p[1], f[v++] = i;
  13804. e.setLayout({
  13805. largePoints: d,
  13806. largeDataIndices: f,
  13807. barWidth: h,
  13808. valueAxisStart: vh(r, a, !1),
  13809. valueAxisHorizontal: l
  13810. });
  13811. }
  13812. if (gh(t) && mh(t)) {
  13813. var i = t.getData(),
  13814. n = t.coordinateSystem,
  13815. r = n.getBaseAxis(),
  13816. a = n.getOtherAxis(r),
  13817. o = i.mapDimension(a.dim),
  13818. s = i.mapDimension(r.dim),
  13819. l = a.isHorizontal(),
  13820. u = l ? 0 : 1,
  13821. h = fh(ch([t]), r, t).width;
  13822. return h > Vb || (h = Vb), {
  13823. progress: e
  13824. };
  13825. }
  13826. }
  13827. },
  13828. Ub = Fb.prototype,
  13829. Xb = Math.ceil,
  13830. Yb = Math.floor,
  13831. jb = 1e3,
  13832. qb = 60 * jb,
  13833. Zb = 60 * qb,
  13834. Kb = 24 * Zb,
  13835. $b = function (t, e, i, n) {
  13836. for (; n > i;) {
  13837. var r = i + n >>> 1;
  13838. t[r][1] < e ? i = r + 1 : n = r;
  13839. }
  13840. return i;
  13841. },
  13842. Qb = Fb.extend({
  13843. type: "time",
  13844. getLabel: function (t) {
  13845. var e = this._stepLvl,
  13846. i = new Date(t);
  13847. return Po(e[0], i, this.getSetting("useUTC"));
  13848. },
  13849. niceExtent: function (t) {
  13850. var e = this._extent;
  13851. if (e[0] === e[1] && (e[0] -= Kb, e[1] += Kb), e[1] === -1 / 0 && 1 / 0 === e[0]) {
  13852. var i = new Date();
  13853. e[1] = +new Date(i.getFullYear(), i.getMonth(), i.getDate()), e[0] = e[1] - Kb;
  13854. }
  13855. this.niceTicks(t.splitNumber, t.minInterval, t.maxInterval);
  13856. var n = this._interval;
  13857. t.fixMin || (e[0] = lo(Yb(e[0] / n) * n)), t.fixMax || (e[1] = lo(Xb(e[1] / n) * n));
  13858. },
  13859. niceTicks: function (t, e, i) {
  13860. t = t || 10;
  13861. var n = this._extent,
  13862. r = n[1] - n[0],
  13863. a = r / t;
  13864. null != e && e > a && (a = e), null != i && a > i && (a = i);
  13865. var o = Jb.length,
  13866. s = $b(Jb, a, 0, o),
  13867. l = Jb[Math.min(s, o - 1)],
  13868. u = l[1];
  13869. if ("year" === l[0]) {
  13870. var h = r / u,
  13871. c = xo(h / t, !0);
  13872. u *= c;
  13873. }
  13874. var d = this.getSetting("useUTC") ? 0 : 60 * new Date(+n[0] || +n[1]).getTimezoneOffset() * 1e3,
  13875. f = [Math.round(Xb((n[0] - d) / u) * u + d), Math.round(Yb((n[1] - d) / u) * u + d)];
  13876. ah(f, n), this._stepLvl = l, this._interval = u, this._niceExtent = f;
  13877. },
  13878. parse: function (t) {
  13879. return +vo(t);
  13880. }
  13881. });
  13882. f(["contain", "normalize"], function (t) {
  13883. Qb.prototype[t] = function (e) {
  13884. return Ub[t].call(this, this.parse(e));
  13885. };
  13886. });
  13887. var Jb = [["hh:mm:ss", jb], ["hh:mm:ss", 5 * jb], ["hh:mm:ss", 10 * jb], ["hh:mm:ss", 15 * jb], ["hh:mm:ss", 30 * jb], ["hh:mm\nMM-dd", qb], ["hh:mm\nMM-dd", 5 * qb], ["hh:mm\nMM-dd", 10 * qb], ["hh:mm\nMM-dd", 15 * qb], ["hh:mm\nMM-dd", 30 * qb], ["hh:mm\nMM-dd", Zb], ["hh:mm\nMM-dd", 2 * Zb], ["hh:mm\nMM-dd", 6 * Zb], ["hh:mm\nMM-dd", 12 * Zb], ["MM-dd\nyyyy", Kb], ["MM-dd\nyyyy", 2 * Kb], ["MM-dd\nyyyy", 3 * Kb], ["MM-dd\nyyyy", 4 * Kb], ["MM-dd\nyyyy", 5 * Kb], ["MM-dd\nyyyy", 6 * Kb], ["week", 7 * Kb], ["MM-dd\nyyyy", 10 * Kb], ["week", 14 * Kb], ["week", 21 * Kb], ["month", 31 * Kb], ["week", 42 * Kb], ["month", 62 * Kb], ["week", 70 * Kb], ["quarter", 95 * Kb], ["month", 31 * Kb * 4], ["month", 31 * Kb * 5], ["half-year", 380 * Kb / 2], ["month", 31 * Kb * 8], ["month", 31 * Kb * 10], ["year", 380 * Kb]];
  13888. Qb.create = function (t) {
  13889. return new Qb({
  13890. useUTC: t.ecModel.get("useUTC")
  13891. });
  13892. };
  13893. var tS = Qu.prototype,
  13894. eS = Fb.prototype,
  13895. iS = co,
  13896. nS = lo,
  13897. rS = Math.floor,
  13898. aS = Math.ceil,
  13899. oS = Math.pow,
  13900. sS = Math.log,
  13901. lS = Qu.extend({
  13902. type: "log",
  13903. base: 10,
  13904. $constructor: function () {
  13905. Qu.apply(this, arguments), this._originalScale = new Fb();
  13906. },
  13907. getTicks: function () {
  13908. var t = this._originalScale,
  13909. e = this._extent,
  13910. i = t.getExtent();
  13911. return p(eS.getTicks.call(this), function (n) {
  13912. var r = lo(oS(this.base, n));
  13913. return r = n === e[0] && t.__fixMin ? yh(r, i[0]) : r, r = n === e[1] && t.__fixMax ? yh(r, i[1]) : r;
  13914. }, this);
  13915. },
  13916. getLabel: eS.getLabel,
  13917. scale: function (t) {
  13918. return t = tS.scale.call(this, t), oS(this.base, t);
  13919. },
  13920. setExtent: function (t, e) {
  13921. var i = this.base;
  13922. t = sS(t) / sS(i), e = sS(e) / sS(i), eS.setExtent.call(this, t, e);
  13923. },
  13924. getExtent: function () {
  13925. var t = this.base,
  13926. e = tS.getExtent.call(this);
  13927. e[0] = oS(t, e[0]), e[1] = oS(t, e[1]);
  13928. var i = this._originalScale,
  13929. n = i.getExtent();
  13930. return i.__fixMin && (e[0] = yh(e[0], n[0])), i.__fixMax && (e[1] = yh(e[1], n[1])), e;
  13931. },
  13932. unionExtent: function (t) {
  13933. this._originalScale.unionExtent(t);
  13934. var e = this.base;
  13935. t[0] = sS(t[0]) / sS(e), t[1] = sS(t[1]) / sS(e), tS.unionExtent.call(this, t);
  13936. },
  13937. unionExtentFromData: function (t, e) {
  13938. this.unionExtent(t.getApproximateExtent(e));
  13939. },
  13940. niceTicks: function (t) {
  13941. t = t || 10;
  13942. var e = this._extent,
  13943. i = e[1] - e[0];
  13944. if (!(1 / 0 === i || 0 >= i)) {
  13945. var n = yo(i),
  13946. r = t / i * n;
  13947. for (.5 >= r && (n *= 10); !isNaN(n) && Math.abs(n) < 1 && Math.abs(n) > 0;) n *= 10;
  13948. var a = [lo(aS(e[0] / n) * n), lo(rS(e[1] / n) * n)];
  13949. this._interval = n, this._niceExtent = a;
  13950. }
  13951. },
  13952. niceExtent: function (t) {
  13953. eS.niceExtent.call(this, t);
  13954. var e = this._originalScale;
  13955. e.__fixMin = t.fixMin, e.__fixMax = t.fixMax;
  13956. }
  13957. });
  13958. f(["contain", "normalize"], function (t) {
  13959. lS.prototype[t] = function (e) {
  13960. return e = sS(e) / sS(this.base), tS[t].call(this, e);
  13961. };
  13962. }), lS.create = function () {
  13963. return new lS();
  13964. };
  13965. var uS = {
  13966. getMin: function (t) {
  13967. var e = this.option,
  13968. i = t || null == e.rangeStart ? e.min : e.rangeStart;
  13969. return this.axis && null != i && "dataMin" !== i && "function" != typeof i && !C(i) && (i = this.axis.scale.parse(i)), i;
  13970. },
  13971. getMax: function (t) {
  13972. var e = this.option,
  13973. i = t || null == e.rangeEnd ? e.max : e.rangeEnd;
  13974. return this.axis && null != i && "dataMax" !== i && "function" != typeof i && !C(i) && (i = this.axis.scale.parse(i)), i;
  13975. },
  13976. getNeedCrossZero: function () {
  13977. var t = this.option;
  13978. return null != t.rangeStart || null != t.rangeEnd ? !1 : !t.scale;
  13979. },
  13980. getCoordSysModel: G,
  13981. setRange: function (t, e) {
  13982. this.option.rangeStart = t, this.option.rangeEnd = e;
  13983. },
  13984. resetRange: function () {
  13985. this.option.rangeStart = this.option.rangeEnd = null;
  13986. }
  13987. },
  13988. hS = ea({
  13989. type: "triangle",
  13990. shape: {
  13991. cx: 0,
  13992. cy: 0,
  13993. width: 0,
  13994. height: 0
  13995. },
  13996. buildPath: function (t, e) {
  13997. var i = e.cx,
  13998. n = e.cy,
  13999. r = e.width / 2,
  14000. a = e.height / 2;
  14001. t.moveTo(i, n - a), t.lineTo(i + r, n + a), t.lineTo(i - r, n + a), t.closePath();
  14002. }
  14003. }),
  14004. cS = ea({
  14005. type: "diamond",
  14006. shape: {
  14007. cx: 0,
  14008. cy: 0,
  14009. width: 0,
  14010. height: 0
  14011. },
  14012. buildPath: function (t, e) {
  14013. var i = e.cx,
  14014. n = e.cy,
  14015. r = e.width / 2,
  14016. a = e.height / 2;
  14017. t.moveTo(i, n - a), t.lineTo(i + r, n), t.lineTo(i, n + a), t.lineTo(i - r, n), t.closePath();
  14018. }
  14019. }),
  14020. dS = ea({
  14021. type: "pin",
  14022. shape: {
  14023. x: 0,
  14024. y: 0,
  14025. width: 0,
  14026. height: 0
  14027. },
  14028. buildPath: function (t, e) {
  14029. var i = e.x,
  14030. n = e.y,
  14031. r = e.width / 5 * 3,
  14032. a = Math.max(r, e.height),
  14033. o = r / 2,
  14034. s = o * o / (a - o),
  14035. l = n - a + o + s,
  14036. u = Math.asin(s / o),
  14037. h = Math.cos(u) * o,
  14038. c = Math.sin(u),
  14039. d = Math.cos(u),
  14040. f = .6 * o,
  14041. p = .7 * o;
  14042. t.moveTo(i - h, l + s), t.arc(i, l, o, Math.PI - u, 2 * Math.PI + u), t.bezierCurveTo(i + h - c * f, l + s + d * 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();
  14043. }
  14044. }),
  14045. fS = ea({
  14046. type: "arrow",
  14047. shape: {
  14048. x: 0,
  14049. y: 0,
  14050. width: 0,
  14051. height: 0
  14052. },
  14053. buildPath: function (t, e) {
  14054. var i = e.height,
  14055. n = e.width,
  14056. r = e.x,
  14057. a = e.y,
  14058. o = n / 3 * 2;
  14059. t.moveTo(r, a), t.lineTo(r + o, a + i), t.lineTo(r, a + i / 4 * 3), t.lineTo(r - o, a + i), t.lineTo(r, a), t.closePath();
  14060. }
  14061. }),
  14062. pS = {
  14063. line: c_,
  14064. rect: u_,
  14065. roundRect: u_,
  14066. square: u_,
  14067. circle: Qy,
  14068. diamond: cS,
  14069. pin: dS,
  14070. arrow: fS,
  14071. triangle: hS
  14072. },
  14073. gS = {
  14074. line: function (t, e, i, n, r) {
  14075. r.x1 = t, r.y1 = e + n / 2, r.x2 = t + i, r.y2 = e + n / 2;
  14076. },
  14077. rect: function (t, e, i, n, r) {
  14078. r.x = t, r.y = e, r.width = i, r.height = n;
  14079. },
  14080. roundRect: function (t, e, i, n, r) {
  14081. r.x = t, r.y = e, r.width = i, r.height = n, r.r = Math.min(i, n) / 4;
  14082. },
  14083. square: function (t, e, i, n, r) {
  14084. var a = Math.min(i, n);
  14085. r.x = t, r.y = e, r.width = a, r.height = a;
  14086. },
  14087. circle: function (t, e, i, n, r) {
  14088. r.cx = t + i / 2, r.cy = e + n / 2, r.r = Math.min(i, n) / 2;
  14089. },
  14090. diamond: function (t, e, i, n, r) {
  14091. r.cx = t + i / 2, r.cy = e + n / 2, r.width = i, r.height = n;
  14092. },
  14093. pin: function (t, e, i, n, r) {
  14094. r.x = t + i / 2, r.y = e + n / 2, r.width = i, r.height = n;
  14095. },
  14096. arrow: function (t, e, i, n, r) {
  14097. r.x = t + i / 2, r.y = e + n / 2, r.width = i, r.height = n;
  14098. },
  14099. triangle: function (t, e, i, n, r) {
  14100. r.cx = t + i / 2, r.cy = e + n / 2, r.width = i, r.height = n;
  14101. }
  14102. },
  14103. mS = {};
  14104. f(pS, function (t, e) {
  14105. mS[e] = new t();
  14106. });
  14107. var vS = ea({
  14108. type: "symbol",
  14109. shape: {
  14110. symbolType: "",
  14111. x: 0,
  14112. y: 0,
  14113. width: 0,
  14114. height: 0
  14115. },
  14116. calculateTextPosition: function (t, e, i) {
  14117. var n = Xi(t, e, i),
  14118. r = this.shape;
  14119. return r && "pin" === r.symbolType && "inside" === e.textPosition && (n.y = i.y + .4 * i.height), n;
  14120. },
  14121. buildPath: function (t, e, i) {
  14122. var n = e.symbolType;
  14123. if ("none" !== n) {
  14124. var r = mS[n];
  14125. r || (n = "rect", r = mS[n]), gS[n](e.x, e.y, e.width, e.height, r.shape), r.buildPath(t, r.shape, i);
  14126. }
  14127. }
  14128. }),
  14129. yS = {
  14130. isDimensionStacked: ju,
  14131. enableDataStack: Yu,
  14132. getStackedDimension: qu
  14133. },
  14134. _S = (Object.freeze || Object)({
  14135. createList: Lh,
  14136. getLayoutRect: Ro,
  14137. dataStack: yS,
  14138. createScale: Oh,
  14139. mixinAxisModelCommonMethods: zh,
  14140. completeDimensions: Wu,
  14141. createDimensions: Ob,
  14142. createSymbol: Ph
  14143. }),
  14144. xS = 1e-8;
  14145. Bh.prototype = {
  14146. constructor: Bh,
  14147. properties: null,
  14148. getBoundingRect: function () {
  14149. var t = this._rect;
  14150. if (t) return t;
  14151. for (var e = Number.MAX_VALUE, i = [e, e], n = [-e, -e], r = [], a = [], o = this.geometries, s = 0; s < o.length; s++) if ("polygon" === o[s].type) {
  14152. var l = o[s].exterior;
  14153. br(l, r, a), oe(i, i, r), se(n, n, a);
  14154. }
  14155. return 0 === s && (i[0] = i[1] = n[0] = n[1] = 0), this._rect = new wi(i[0], i[1], n[0] - i[0], n[1] - i[1]);
  14156. },
  14157. contain: function (t) {
  14158. var e = this.getBoundingRect(),
  14159. i = this.geometries;
  14160. if (!e.contain(t[0], t[1])) return !1;
  14161. t: for (var n = 0, r = i.length; r > n; n++) if ("polygon" === i[n].type) {
  14162. var a = i[n].exterior,
  14163. o = i[n].interiors;
  14164. if (Rh(a, t[0], t[1])) {
  14165. for (var s = 0; s < (o ? o.length : 0); s++) if (Rh(o[s])) continue t;
  14166. return !0;
  14167. }
  14168. }
  14169. return !1;
  14170. },
  14171. transformTo: function (t, e, i, n) {
  14172. var r = this.getBoundingRect(),
  14173. a = r.width / r.height;
  14174. i ? n || (n = i / a) : i = a * n;
  14175. for (var o = new wi(t, e, i, n), s = r.calculateTransform(o), l = this.geometries, u = 0; u < l.length; u++) if ("polygon" === l[u].type) {
  14176. for (var h = l[u].exterior, c = l[u].interiors, d = 0; d < h.length; d++) ae(h[d], h[d], s);
  14177. for (var f = 0; f < (c ? c.length : 0); f++) for (var d = 0; d < c[f].length; d++) ae(c[f][d], c[f][d], s);
  14178. }
  14179. r = this._rect, r.copy(o), this.center = [r.x + r.width / 2, r.y + r.height / 2];
  14180. },
  14181. cloneShallow: function (t) {
  14182. null == t && (t = this.name);
  14183. var e = new Bh(t, this.geometries, this.center);
  14184. return e._rect = this._rect, e.transformTo = null, e;
  14185. }
  14186. };
  14187. var wS = function (t) {
  14188. return Nh(t), p(m(t.features, function (t) {
  14189. return t.geometry && t.properties && t.geometry.coordinates.length > 0;
  14190. }), function (t) {
  14191. var e = t.properties,
  14192. i = t.geometry,
  14193. n = i.coordinates,
  14194. r = [];
  14195. "Polygon" === i.type && r.push({
  14196. type: "polygon",
  14197. exterior: n[0],
  14198. interiors: n.slice(1)
  14199. }), "MultiPolygon" === i.type && f(n, function (t) {
  14200. t[0] && r.push({
  14201. type: "polygon",
  14202. exterior: t[0],
  14203. interiors: t.slice(1)
  14204. });
  14205. });
  14206. var a = new Bh(e.name, r, e.cp);
  14207. return a.properties = e, a;
  14208. });
  14209. },
  14210. bS = Zn(),
  14211. SS = [0, 1],
  14212. MS = function (t, e, i) {
  14213. this.dim = t, this.scale = e, this._extent = i || [0, 0], this.inverse = !1, this.onBand = !1;
  14214. };
  14215. MS.prototype = {
  14216. constructor: MS,
  14217. contain: function (t) {
  14218. var e = this._extent,
  14219. i = Math.min(e[0], e[1]),
  14220. n = Math.max(e[0], e[1]);
  14221. return t >= i && n >= t;
  14222. },
  14223. containData: function (t) {
  14224. return this.contain(this.dataToCoord(t));
  14225. },
  14226. getExtent: function () {
  14227. return this._extent.slice();
  14228. },
  14229. getPixelPrecision: function (t) {
  14230. return fo(t || this.scale.getExtent(), this._extent);
  14231. },
  14232. setExtent: function (t, e) {
  14233. var i = this._extent;
  14234. i[0] = t, i[1] = e;
  14235. },
  14236. dataToCoord: function (t, e) {
  14237. var i = this._extent,
  14238. n = this.scale;
  14239. return t = n.normalize(t), this.onBand && "ordinal" === n.type && (i = i.slice(), tc(i, n.count())), oo(t, SS, i, e);
  14240. },
  14241. coordToData: function (t, e) {
  14242. var i = this._extent,
  14243. n = this.scale;
  14244. this.onBand && "ordinal" === n.type && (i = i.slice(), tc(i, n.count()));
  14245. var r = oo(t, i, SS, e);
  14246. return this.scale.scale(r);
  14247. },
  14248. pointToData: function () {},
  14249. getTicksCoords: function (t) {
  14250. t = t || {};
  14251. var e = t.tickModel || this.getTickModel(),
  14252. i = Vh(this, e),
  14253. n = i.ticks,
  14254. r = p(n, function (t) {
  14255. return {
  14256. coord: this.dataToCoord(t),
  14257. tickValue: t
  14258. };
  14259. }, this),
  14260. a = e.get("alignWithLabel");
  14261. return ec(this, r, a, t.clamp), r;
  14262. },
  14263. getViewLabels: function () {
  14264. return Gh(this).labels;
  14265. },
  14266. getLabelModel: function () {
  14267. return this.model.getModel("axisLabel");
  14268. },
  14269. getTickModel: function () {
  14270. return this.model.getModel("axisTick");
  14271. },
  14272. getBandWidth: function () {
  14273. var t = this._extent,
  14274. e = this.scale.getExtent(),
  14275. i = e[1] - e[0] + (this.onBand ? 1 : 0);
  14276. 0 === i && (i = 1);
  14277. var n = Math.abs(t[1] - t[0]);
  14278. return Math.abs(n) / i;
  14279. },
  14280. isHorizontal: null,
  14281. getRotate: null,
  14282. calculateCategoryInterval: function () {
  14283. return Kh(this);
  14284. }
  14285. };
  14286. var IS = wS,
  14287. TS = {};
  14288. f(["map", "each", "filter", "indexOf", "inherits", "reduce", "filter", "bind", "curry", "isArray", "isString", "isObject", "isFunction", "extend", "defaults", "clone", "merge"], function (t) {
  14289. TS[t] = Ng[t];
  14290. });
  14291. var CS = {};
  14292. f(["extendShape", "extendPath", "makePath", "makeImage", "mergePath", "resizePath", "createIcon", "setHoverStyle", "setLabelStyle", "setTextStyle", "setText", "getFont", "updateProps", "initProps", "getTransform", "clipPointsByRect", "clipRectByRect", "registerShape", "getShapeClass", "Group", "Image", "Text", "Circle", "Sector", "Ring", "Polygon", "Polyline", "Rect", "Line", "BezierCurve", "Arc", "IncrementalDisplayable", "CompoundPath", "LinearGradient", "RadialGradient", "BoundingRect"], function (t) {
  14293. CS[t] = z_[t];
  14294. });
  14295. var DS = function (t) {
  14296. this._axes = {}, this._dimList = [], this.name = t || "";
  14297. };
  14298. DS.prototype = {
  14299. constructor: DS,
  14300. type: "cartesian",
  14301. getAxis: function (t) {
  14302. return this._axes[t];
  14303. },
  14304. getAxes: function () {
  14305. return p(this._dimList, ic, this);
  14306. },
  14307. getAxesByScale: function (t) {
  14308. return t = t.toLowerCase(), m(this.getAxes(), function (e) {
  14309. return e.scale.type === t;
  14310. });
  14311. },
  14312. addAxis: function (t) {
  14313. var e = t.dim;
  14314. this._axes[e] = t, this._dimList.push(e);
  14315. },
  14316. dataToCoord: function (t) {
  14317. return this._dataCoordConvert(t, "dataToCoord");
  14318. },
  14319. coordToData: function (t) {
  14320. return this._dataCoordConvert(t, "coordToData");
  14321. },
  14322. _dataCoordConvert: function (t, e) {
  14323. for (var i = this._dimList, n = t instanceof Array ? [] : {}, r = 0; r < i.length; r++) {
  14324. var a = i[r],
  14325. o = this._axes[a];
  14326. n[a] = o[e](t[a]);
  14327. }
  14328. return n;
  14329. }
  14330. }, nc.prototype = {
  14331. constructor: nc,
  14332. type: "cartesian2d",
  14333. dimensions: ["x", "y"],
  14334. getBaseAxis: function () {
  14335. return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAxis("x");
  14336. },
  14337. containPoint: function (t) {
  14338. var e = this.getAxis("x"),
  14339. i = this.getAxis("y");
  14340. return e.contain(e.toLocalCoord(t[0])) && i.contain(i.toLocalCoord(t[1]));
  14341. },
  14342. containData: function (t) {
  14343. return this.getAxis("x").containData(t[0]) && this.getAxis("y").containData(t[1]);
  14344. },
  14345. dataToPoint: function (t, e, i) {
  14346. var n = this.getAxis("x"),
  14347. r = this.getAxis("y");
  14348. return i = i || [], i[0] = n.toGlobalCoord(n.dataToCoord(t[0])), i[1] = r.toGlobalCoord(r.dataToCoord(t[1])), i;
  14349. },
  14350. clampData: function (t, e) {
  14351. var i = this.getAxis("x").scale,
  14352. n = this.getAxis("y").scale,
  14353. r = i.getExtent(),
  14354. a = n.getExtent(),
  14355. o = i.parse(t[0]),
  14356. s = n.parse(t[1]);
  14357. return e = e || [], e[0] = Math.min(Math.max(Math.min(r[0], r[1]), o), Math.max(r[0], r[1])), e[1] = Math.min(Math.max(Math.min(a[0], a[1]), s), Math.max(a[0], a[1])), e;
  14358. },
  14359. pointToData: function (t, e) {
  14360. var i = this.getAxis("x"),
  14361. n = this.getAxis("y");
  14362. return e = e || [], e[0] = i.coordToData(i.toLocalCoord(t[0])), e[1] = n.coordToData(n.toLocalCoord(t[1])), e;
  14363. },
  14364. getOtherAxis: function (t) {
  14365. return this.getAxis("x" === t.dim ? "y" : "x");
  14366. },
  14367. getArea: function () {
  14368. var t = this.getAxis("x").getGlobalExtent(),
  14369. e = this.getAxis("y").getGlobalExtent(),
  14370. i = Math.min(t[0], t[1]),
  14371. n = Math.min(e[0], e[1]),
  14372. r = Math.max(t[0], t[1]) - i,
  14373. a = Math.max(e[0], e[1]) - n,
  14374. o = new wi(i, n, r, a);
  14375. return o;
  14376. }
  14377. }, h(nc, DS);
  14378. var AS = function (t, e, i, n, r) {
  14379. MS.call(this, t, e, i), this.type = n || "value", this.position = r || "bottom";
  14380. };
  14381. AS.prototype = {
  14382. constructor: AS,
  14383. index: 0,
  14384. getAxesOnZeroOf: null,
  14385. model: null,
  14386. isHorizontal: function () {
  14387. var t = this.position;
  14388. return "top" === t || "bottom" === t;
  14389. },
  14390. getGlobalExtent: function (t) {
  14391. var e = this.getExtent();
  14392. return e[0] = this.toGlobalCoord(e[0]), e[1] = this.toGlobalCoord(e[1]), t && e[0] > e[1] && e.reverse(), e;
  14393. },
  14394. getOtherAxis: function () {
  14395. this.grid.getOtherAxis();
  14396. },
  14397. pointToData: function (t, e) {
  14398. return this.coordToData(this.toLocalCoord(t["x" === this.dim ? 0 : 1]), e);
  14399. },
  14400. toLocalCoord: null,
  14401. toGlobalCoord: null
  14402. }, h(AS, MS);
  14403. var kS = {
  14404. show: !0,
  14405. zlevel: 0,
  14406. z: 0,
  14407. inverse: !1,
  14408. name: "",
  14409. nameLocation: "end",
  14410. nameRotate: null,
  14411. nameTruncate: {
  14412. maxWidth: null,
  14413. ellipsis: "...",
  14414. placeholder: "."
  14415. },
  14416. nameTextStyle: {},
  14417. nameGap: 15,
  14418. silent: !1,
  14419. triggerEvent: !1,
  14420. tooltip: {
  14421. show: !1
  14422. },
  14423. axisPointer: {},
  14424. axisLine: {
  14425. show: !0,
  14426. onZero: !0,
  14427. onZeroAxisIndex: null,
  14428. lineStyle: {
  14429. color: "#333",
  14430. width: 1,
  14431. type: "solid"
  14432. },
  14433. symbol: ["none", "none"],
  14434. symbolSize: [10, 15]
  14435. },
  14436. axisTick: {
  14437. show: !0,
  14438. inside: !1,
  14439. length: 5,
  14440. lineStyle: {
  14441. width: 1
  14442. }
  14443. },
  14444. axisLabel: {
  14445. show: !0,
  14446. inside: !1,
  14447. rotate: 0,
  14448. showMinLabel: null,
  14449. showMaxLabel: null,
  14450. margin: 8,
  14451. fontSize: 12
  14452. },
  14453. splitLine: {
  14454. show: !0,
  14455. lineStyle: {
  14456. color: ["#ccc"],
  14457. width: 1,
  14458. type: "solid"
  14459. }
  14460. },
  14461. splitArea: {
  14462. show: !1,
  14463. areaStyle: {
  14464. color: ["rgba(250,250,250,0.3)", "rgba(200,200,200,0.3)"]
  14465. }
  14466. }
  14467. },
  14468. PS = {};
  14469. PS.categoryAxis = r({
  14470. boundaryGap: !0,
  14471. deduplication: null,
  14472. splitLine: {
  14473. show: !1
  14474. },
  14475. axisTick: {
  14476. alignWithLabel: !1,
  14477. interval: "auto"
  14478. },
  14479. axisLabel: {
  14480. interval: "auto"
  14481. }
  14482. }, kS), PS.valueAxis = r({
  14483. boundaryGap: [0, 0],
  14484. splitNumber: 5
  14485. }, kS), PS.timeAxis = s({
  14486. scale: !0,
  14487. min: "dataMin",
  14488. max: "dataMax"
  14489. }, PS.valueAxis), PS.logAxis = s({
  14490. scale: !0,
  14491. logBase: 10
  14492. }, PS.valueAxis);
  14493. var LS = ["value", "category", "time", "log"],
  14494. OS = function (t, e, i, n) {
  14495. f(LS, function (o) {
  14496. e.extend({
  14497. type: t + "Axis." + o,
  14498. mergeDefaultAndTheme: function (e, n) {
  14499. var a = this.layoutMode,
  14500. s = a ? No(e) : {},
  14501. l = n.getTheme();
  14502. r(e, l.get(o + "Axis")), r(e, this.getDefaultOption()), e.type = i(t, e), a && Bo(e, s, a);
  14503. },
  14504. optionUpdated: function () {
  14505. var t = this.option;
  14506. "category" === t.type && (this.__ordinalMeta = Ju.createByAxisModel(this));
  14507. },
  14508. getCategories: function (t) {
  14509. var e = this.option;
  14510. return "category" === e.type ? t ? e.data : this.__ordinalMeta.categories : void 0;
  14511. },
  14512. getOrdinalMeta: function () {
  14513. return this.__ordinalMeta;
  14514. },
  14515. defaultOption: a([{}, PS[o + "Axis"], n], !0)
  14516. });
  14517. }), ax.registerSubTypeDefaulter(t + "Axis", _(i, t));
  14518. },
  14519. zS = ax.extend({
  14520. type: "cartesian2dAxis",
  14521. axis: null,
  14522. init: function () {
  14523. zS.superApply(this, "init", arguments), this.resetRange();
  14524. },
  14525. mergeOption: function () {
  14526. zS.superApply(this, "mergeOption", arguments), this.resetRange();
  14527. },
  14528. restoreData: function () {
  14529. zS.superApply(this, "restoreData", arguments), this.resetRange();
  14530. },
  14531. getCoordSysModel: function () {
  14532. return this.ecModel.queryComponents({
  14533. mainType: "grid",
  14534. index: this.option.gridIndex,
  14535. id: this.option.gridId
  14536. })[0];
  14537. }
  14538. });
  14539. r(zS.prototype, uS);
  14540. var ES = {
  14541. offset: 0
  14542. };
  14543. OS("x", zS, rc, ES), OS("y", zS, rc, ES), ax.extend({
  14544. type: "grid",
  14545. dependencies: ["xAxis", "yAxis"],
  14546. layoutMode: "box",
  14547. coordinateSystem: null,
  14548. defaultOption: {
  14549. show: !1,
  14550. zlevel: 0,
  14551. z: 0,
  14552. left: "10%",
  14553. top: 60,
  14554. right: "10%",
  14555. bottom: 60,
  14556. containLabel: !1,
  14557. backgroundColor: "rgba(0,0,0,0)",
  14558. borderWidth: 1,
  14559. borderColor: "#ccc"
  14560. }
  14561. });
  14562. var RS = oc.prototype;
  14563. RS.type = "grid", RS.axisPointerEnabled = !0, RS.getRect = function () {
  14564. return this._rect;
  14565. }, RS.update = function (t, e) {
  14566. var i = this._axesMap;
  14567. this._updateScale(t, this.model), f(i.x, function (t) {
  14568. wh(t.scale, t.model);
  14569. }), f(i.y, function (t) {
  14570. wh(t.scale, t.model);
  14571. });
  14572. var n = {};
  14573. f(i.x, function (t) {
  14574. sc(i, "y", t, n);
  14575. }), f(i.y, function (t) {
  14576. sc(i, "x", t, n);
  14577. }), this.resize(this.model, e);
  14578. }, RS.resize = function (t, e, i) {
  14579. function n() {
  14580. f(a, function (t) {
  14581. var e = t.isHorizontal(),
  14582. i = e ? [0, r.width] : [0, r.height],
  14583. n = t.inverse ? 1 : 0;
  14584. t.setExtent(i[n], i[1 - n]), uc(t, e ? r.x : r.y);
  14585. });
  14586. }
  14587. var r = Ro(t.getBoxLayoutParams(), {
  14588. width: e.getWidth(),
  14589. height: e.getHeight()
  14590. });
  14591. this._rect = r;
  14592. var a = this._axesList;
  14593. n(), !i && t.get("containLabel") && (f(a, function (t) {
  14594. if (!t.model.get("axisLabel.inside")) {
  14595. var e = Th(t);
  14596. if (e) {
  14597. var i = t.isHorizontal() ? "height" : "width",
  14598. n = t.model.get("axisLabel.margin");
  14599. r[i] -= e[i] + n, "top" === t.position ? r.y += e.height + n : "left" === t.position && (r.x += e.width + n);
  14600. }
  14601. }
  14602. }), n());
  14603. }, RS.getAxis = function (t, e) {
  14604. var i = this._axesMap[t];
  14605. if (null != i) {
  14606. if (null == e) for (var n in i) if (i.hasOwnProperty(n)) return i[n];
  14607. return i[e];
  14608. }
  14609. }, RS.getAxes = function () {
  14610. return this._axesList.slice();
  14611. }, RS.getCartesian = function (t, e) {
  14612. if (null != t && null != e) {
  14613. var i = "x" + t + "y" + e;
  14614. return this._coordsMap[i];
  14615. }
  14616. S(t) && (e = t.yAxisIndex, t = t.xAxisIndex);
  14617. for (var n = 0, r = this._coordsList; n < r.length; n++) if (r[n].getAxis("x").index === t || r[n].getAxis("y").index === e) return r[n];
  14618. }, RS.getCartesians = function () {
  14619. return this._coordsList.slice();
  14620. }, RS.convertToPixel = function (t, e, i) {
  14621. var n = this._findConvertTarget(t, e);
  14622. return n.cartesian ? n.cartesian.dataToPoint(i) : n.axis ? n.axis.toGlobalCoord(n.axis.dataToCoord(i)) : null;
  14623. }, RS.convertFromPixel = function (t, e, i) {
  14624. var n = this._findConvertTarget(t, e);
  14625. return n.cartesian ? n.cartesian.pointToData(i) : n.axis ? n.axis.coordToData(n.axis.toLocalCoord(i)) : null;
  14626. }, RS._findConvertTarget = function (t, e) {
  14627. var i,
  14628. n,
  14629. r = e.seriesModel,
  14630. a = e.xAxisModel || r && r.getReferringComponents("xAxis")[0],
  14631. o = e.yAxisModel || r && r.getReferringComponents("yAxis")[0],
  14632. s = e.gridModel,
  14633. l = this._coordsList;
  14634. if (r) i = r.coordinateSystem, u(l, i) < 0 && (i = null);else if (a && o) i = this.getCartesian(a.componentIndex, o.componentIndex);else if (a) n = this.getAxis("x", a.componentIndex);else if (o) n = this.getAxis("y", o.componentIndex);else if (s) {
  14635. var h = s.coordinateSystem;
  14636. h === this && (i = this._coordsList[0]);
  14637. }
  14638. return {
  14639. cartesian: i,
  14640. axis: n
  14641. };
  14642. }, RS.containPoint = function (t) {
  14643. var e = this._coordsList[0];
  14644. return e ? e.containPoint(t) : void 0;
  14645. }, RS._initCartesian = function (t, e) {
  14646. function i(i) {
  14647. return function (o, s) {
  14648. if (ac(o, t, e)) {
  14649. var l = o.get("position");
  14650. "x" === i ? "top" !== l && "bottom" !== l && (l = n.bottom ? "top" : "bottom") : "left" !== l && "right" !== l && (l = n.left ? "right" : "left"), n[l] = !0;
  14651. var u = new AS(i, bh(o), [0, 0], o.get("type"), l),
  14652. h = "category" === u.type;
  14653. u.onBand = h && o.get("boundaryGap"), u.inverse = o.get("inverse"), o.axis = u, u.model = o, u.grid = this, u.index = s, this._axesList.push(u), r[i][s] = u, a[i]++;
  14654. }
  14655. };
  14656. }
  14657. var n = {
  14658. left: !1,
  14659. right: !1,
  14660. top: !1,
  14661. bottom: !1
  14662. },
  14663. r = {
  14664. x: {},
  14665. y: {}
  14666. },
  14667. a = {
  14668. x: 0,
  14669. y: 0
  14670. };
  14671. return e.eachComponent("xAxis", i("x"), this), e.eachComponent("yAxis", i("y"), this), a.x && a.y ? (this._axesMap = r, void f(r.x, function (e, i) {
  14672. f(r.y, function (n, r) {
  14673. var a = "x" + i + "y" + r,
  14674. o = new nc(a);
  14675. o.grid = this, o.model = t, this._coordsMap[a] = o, this._coordsList.push(o), o.addAxis(e), o.addAxis(n);
  14676. }, this);
  14677. }, this)) : (this._axesMap = {}, void (this._axesList = []));
  14678. }, RS._updateScale = function (t, e) {
  14679. function i(t, e) {
  14680. f(t.mapDimension(e.dim, !0), function (i) {
  14681. e.scale.unionExtentFromData(t, qu(t, i));
  14682. });
  14683. }
  14684. f(this._axesList, function (t) {
  14685. t.scale.setExtent(1 / 0, -1 / 0);
  14686. }), t.eachSeries(function (n) {
  14687. if (cc(n)) {
  14688. var r = hc(n, t),
  14689. a = r[0],
  14690. o = r[1];
  14691. if (!ac(a, e, t) || !ac(o, e, t)) return;
  14692. var s = this.getCartesian(a.componentIndex, o.componentIndex),
  14693. l = n.getData(),
  14694. u = s.getAxis("x"),
  14695. h = s.getAxis("y");
  14696. "list" === l.type && (i(l, u, n), i(l, h, n));
  14697. }
  14698. }, this);
  14699. }, RS.getTooltipAxes = function (t) {
  14700. var e = [],
  14701. i = [];
  14702. return f(this.getCartesians(), function (n) {
  14703. var r = null != t && "auto" !== t ? n.getAxis(t) : n.getBaseAxis(),
  14704. a = n.getOtherAxis(r);
  14705. u(e, r) < 0 && e.push(r), u(i, a) < 0 && i.push(a);
  14706. }), {
  14707. baseAxes: e,
  14708. otherAxes: i
  14709. };
  14710. };
  14711. var BS = ["xAxis", "yAxis"];
  14712. oc.create = function (t, e) {
  14713. var i = [];
  14714. return t.eachComponent("grid", function (n, r) {
  14715. var a = new oc(n, t, e);
  14716. a.name = "grid_" + r, a.resize(n, e, !0), n.coordinateSystem = a, i.push(a);
  14717. }), t.eachSeries(function (e) {
  14718. if (cc(e)) {
  14719. var i = hc(e, t),
  14720. n = i[0],
  14721. r = i[1],
  14722. a = n.getCoordSysModel(),
  14723. o = a.coordinateSystem;
  14724. e.coordinateSystem = o.getCartesian(n.componentIndex, r.componentIndex);
  14725. }
  14726. }), i;
  14727. }, oc.dimensions = oc.prototype.dimensions = nc.prototype.dimensions, cs.register("cartesian2d", oc);
  14728. var NS = jx.extend({
  14729. type: "series.__base_bar__",
  14730. getInitialData: function () {
  14731. return Zu(this.getSource(), this);
  14732. },
  14733. getMarkerPosition: function (t) {
  14734. var e = this.coordinateSystem;
  14735. if (e) {
  14736. var i = e.dataToPoint(e.clampData(t)),
  14737. n = this.getData(),
  14738. r = n.getLayout("offset"),
  14739. a = n.getLayout("size"),
  14740. o = e.getBaseAxis().isHorizontal() ? 0 : 1;
  14741. return i[o] += r + a / 2, i;
  14742. }
  14743. return [0 / 0, 0 / 0];
  14744. },
  14745. defaultOption: {
  14746. zlevel: 0,
  14747. z: 2,
  14748. coordinateSystem: "cartesian2d",
  14749. legendHoverLink: !0,
  14750. barMinHeight: 0,
  14751. barMinAngle: 0,
  14752. large: !1,
  14753. largeThreshold: 400,
  14754. progressive: 3e3,
  14755. progressiveChunkMode: "mod",
  14756. itemStyle: {},
  14757. emphasis: {}
  14758. }
  14759. });
  14760. NS.extend({
  14761. type: "series.bar",
  14762. dependencies: ["grid", "polar"],
  14763. brushSelector: "rect",
  14764. getProgressive: function () {
  14765. return this.get("large") ? this.get("progressive") : !1;
  14766. },
  14767. getProgressiveThreshold: function () {
  14768. var t = this.get("progressiveThreshold"),
  14769. e = this.get("largeThreshold");
  14770. return e > t && (t = e), t;
  14771. },
  14772. defaultOption: {
  14773. clip: !0,
  14774. roundCap: !1
  14775. }
  14776. });
  14777. var FS = Uv([["fill", "color"], ["stroke", "borderColor"], ["lineWidth", "borderWidth"], ["stroke", "barBorderColor"], ["lineWidth", "barBorderWidth"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]]),
  14778. GS = {
  14779. getBarItemStyle: function (t) {
  14780. var e = FS(this, t);
  14781. if (this.getBorderLineDash) {
  14782. var i = this.getBorderLineDash();
  14783. i && (e.lineDash = i);
  14784. }
  14785. return e;
  14786. }
  14787. },
  14788. VS = ea({
  14789. type: "sausage",
  14790. shape: {
  14791. cx: 0,
  14792. cy: 0,
  14793. r0: 0,
  14794. r: 0,
  14795. startAngle: 0,
  14796. endAngle: 2 * Math.PI,
  14797. clockwise: !0
  14798. },
  14799. buildPath: function (t, e) {
  14800. var i = e.cx,
  14801. n = e.cy,
  14802. r = Math.max(e.r0 || 0, 0),
  14803. a = Math.max(e.r, 0),
  14804. o = .5 * (a - r),
  14805. s = r + o,
  14806. l = e.startAngle,
  14807. u = e.endAngle,
  14808. h = e.clockwise,
  14809. c = Math.cos(l),
  14810. d = Math.sin(l),
  14811. f = Math.cos(u),
  14812. p = Math.sin(u),
  14813. g = h ? u - l < 2 * Math.PI : l - u < 2 * Math.PI;
  14814. g && (t.moveTo(c * r + i, d * r + n), t.arc(c * s + i, d * s + n, o, -Math.PI + l, l, !h)), t.arc(i, n, a, l, u, !h), t.moveTo(f * a + i, p * a + n), t.arc(f * s + i, p * s + n, o, u - 2 * Math.PI, u - Math.PI, !h), 0 !== r && (t.arc(i, n, r, u, l, h), t.moveTo(c * r + i, p * r + n)), t.closePath();
  14815. }
  14816. }),
  14817. HS = ["itemStyle", "barBorderWidth"],
  14818. WS = [0, 0];
  14819. o(Ja.prototype, GS), _u({
  14820. type: "bar",
  14821. render: function (t, e, i) {
  14822. this._updateDrawMode(t);
  14823. var n = t.get("coordinateSystem");
  14824. return ("cartesian2d" === n || "polar" === n) && (this._isLargeDraw ? this._renderLarge(t, e, i) : this._renderNormal(t, e, i)), this.group;
  14825. },
  14826. incrementalPrepareRender: function (t) {
  14827. this._clear(), this._updateDrawMode(t);
  14828. },
  14829. incrementalRender: function (t, e) {
  14830. this._incrementalRenderLarge(t, e);
  14831. },
  14832. _updateDrawMode: function (t) {
  14833. var e = t.pipelineContext.large;
  14834. (null == this._isLargeDraw || e ^ this._isLargeDraw) && (this._isLargeDraw = e, this._clear());
  14835. },
  14836. _renderNormal: function (t) {
  14837. var e,
  14838. i = this.group,
  14839. n = t.getData(),
  14840. r = this._data,
  14841. a = t.coordinateSystem,
  14842. o = a.getBaseAxis();
  14843. "cartesian2d" === a.type ? e = o.isHorizontal() : "polar" === a.type && (e = "angle" === o.dim);
  14844. var s = t.isAnimationEnabled() ? t : null,
  14845. l = t.get("clip", !0),
  14846. u = yc(a, n);
  14847. i.removeClipPath();
  14848. var h = t.get("roundCap", !0);
  14849. n.diff(r).add(function (r) {
  14850. if (n.hasValue(r)) {
  14851. var o = n.getItemModel(r),
  14852. c = qS[a.type](n, r, o);
  14853. if (l) {
  14854. var d = YS[a.type](u, c);
  14855. if (d) return void i.remove(f);
  14856. }
  14857. var f = jS[a.type](r, c, e, s, !1, h);
  14858. n.setItemGraphicEl(r, f), i.add(f), wc(f, n, r, o, c, t, e, "polar" === a.type);
  14859. }
  14860. }).update(function (o, c) {
  14861. var d = r.getItemGraphicEl(c);
  14862. if (!n.hasValue(o)) return void i.remove(d);
  14863. var f = n.getItemModel(o),
  14864. p = qS[a.type](n, o, f);
  14865. if (l) {
  14866. var g = YS[a.type](u, p);
  14867. if (g) return void i.remove(d);
  14868. }
  14869. d ? Ga(d, {
  14870. shape: p
  14871. }, s, o) : d = jS[a.type](o, p, e, s, !0, h), n.setItemGraphicEl(o, d), i.add(d), wc(d, n, o, f, p, t, e, "polar" === a.type);
  14872. }).remove(function (t) {
  14873. var e = r.getItemGraphicEl(t);
  14874. "cartesian2d" === a.type ? e && _c(t, s, e) : e && xc(t, s, e);
  14875. }).execute(), this._data = n;
  14876. },
  14877. _renderLarge: function (t) {
  14878. this._clear(), Sc(t, this.group);
  14879. var e = t.get("clip", !0) ? vc(t.coordinateSystem, !1, t) : null;
  14880. e ? this.group.setClipPath(e) : this.group.removeClipPath();
  14881. },
  14882. _incrementalRenderLarge: function (t, e) {
  14883. Sc(e, this.group, !0);
  14884. },
  14885. dispose: G,
  14886. remove: function (t) {
  14887. this._clear(t);
  14888. },
  14889. _clear: function (t) {
  14890. var e = this.group,
  14891. i = this._data;
  14892. t && t.get("animation") && i && !this._isLargeDraw ? i.eachItemGraphicEl(function (e) {
  14893. "sector" === e.type ? xc(e.dataIndex, t, e) : _c(e.dataIndex, t, e);
  14894. }) : e.removeAll(), this._data = null;
  14895. }
  14896. });
  14897. var US = Math.max,
  14898. XS = Math.min,
  14899. YS = {
  14900. cartesian2d: function (t, e) {
  14901. var i = e.width < 0 ? -1 : 1,
  14902. n = e.height < 0 ? -1 : 1;
  14903. 0 > i && (e.x += e.width, e.width = -e.width), 0 > n && (e.y += e.height, e.height = -e.height);
  14904. var r = US(e.x, t.x),
  14905. a = XS(e.x + e.width, t.x + t.width),
  14906. o = US(e.y, t.y),
  14907. s = XS(e.y + e.height, t.y + t.height);
  14908. e.x = r, e.y = o, e.width = a - r, e.height = s - o;
  14909. var l = e.width < 0 || e.height < 0;
  14910. return 0 > i && (e.x += e.width, e.width = -e.width), 0 > n && (e.y += e.height, e.height = -e.height), l;
  14911. },
  14912. polar: function () {
  14913. return !1;
  14914. }
  14915. },
  14916. jS = {
  14917. cartesian2d: function (t, e, i, n, r) {
  14918. var a = new u_({
  14919. shape: o({}, e)
  14920. });
  14921. if (n) {
  14922. var s = a.shape,
  14923. l = i ? "height" : "width",
  14924. u = {};
  14925. s[l] = 0, u[l] = e[l], z_[r ? "updateProps" : "initProps"](a, {
  14926. shape: u
  14927. }, n, t);
  14928. }
  14929. return a;
  14930. },
  14931. polar: function (t, e, i, n, r, a) {
  14932. var o = e.startAngle < e.endAngle,
  14933. l = !i && a ? VS : e_,
  14934. u = new l({
  14935. shape: s({
  14936. clockwise: o
  14937. }, e)
  14938. });
  14939. if (n) {
  14940. var h = u.shape,
  14941. c = i ? "r" : "endAngle",
  14942. d = {};
  14943. h[c] = i ? 0 : e.startAngle, d[c] = e[c], z_[r ? "updateProps" : "initProps"](u, {
  14944. shape: d
  14945. }, n, t);
  14946. }
  14947. return u;
  14948. }
  14949. },
  14950. qS = {
  14951. cartesian2d: function (t, e, i) {
  14952. var n = t.getItemLayout(e),
  14953. r = bc(i, n),
  14954. a = n.width > 0 ? 1 : -1,
  14955. o = n.height > 0 ? 1 : -1;
  14956. return {
  14957. x: n.x + a * r / 2,
  14958. y: n.y + o * r / 2,
  14959. width: n.width - a * r,
  14960. height: n.height - o * r
  14961. };
  14962. },
  14963. polar: function (t, e) {
  14964. var i = t.getItemLayout(e);
  14965. return {
  14966. cx: i.cx,
  14967. cy: i.cy,
  14968. r0: i.r0,
  14969. r: i.r,
  14970. startAngle: i.startAngle,
  14971. endAngle: i.endAngle
  14972. };
  14973. }
  14974. },
  14975. ZS = Vr.extend({
  14976. type: "largeBar",
  14977. shape: {
  14978. points: []
  14979. },
  14980. buildPath: function (t, e) {
  14981. for (var i = e.points, n = this.__startPoint, r = this.__baseDimIdx, a = 0; a < i.length; a += 2) n[r] = i[a + r], t.moveTo(n[0], n[1]), t.lineTo(i[a], i[a + 1]);
  14982. }
  14983. }),
  14984. KS = il(function (t) {
  14985. var e = this,
  14986. i = Mc(e, t.offsetX, t.offsetY);
  14987. e.dataIndex = i >= 0 ? i : null;
  14988. }, 30, !1),
  14989. $S = Math.PI,
  14990. QS = function (t, e) {
  14991. this.opt = e, this.axisModel = t, s(e, {
  14992. labelOffset: 0,
  14993. nameDirection: 1,
  14994. tickDirection: 1,
  14995. labelDirection: 1,
  14996. silent: !0
  14997. }), this.group = new Bm();
  14998. var i = new Bm({
  14999. position: e.position.slice(),
  15000. rotation: e.rotation
  15001. });
  15002. i.updateTransform(), this._transform = i.transform, this._dumbGroup = i;
  15003. };
  15004. QS.prototype = {
  15005. constructor: QS,
  15006. hasBuilder: function (t) {
  15007. return !!JS[t];
  15008. },
  15009. add: function (t) {
  15010. JS[t].call(this);
  15011. },
  15012. getGroup: function () {
  15013. return this.group;
  15014. }
  15015. };
  15016. var JS = {
  15017. axisLine: function () {
  15018. var t = this.opt,
  15019. e = this.axisModel;
  15020. if (e.get("axisLine.show")) {
  15021. var i = this.axisModel.axis.getExtent(),
  15022. n = this._transform,
  15023. r = [i[0], 0],
  15024. a = [i[1], 0];
  15025. n && (ae(r, r, n), ae(a, a, n));
  15026. var s = o({
  15027. lineCap: "round"
  15028. }, e.getModel("axisLine.lineStyle").getLineStyle());
  15029. this.group.add(new c_({
  15030. anid: "line",
  15031. subPixelOptimize: !0,
  15032. shape: {
  15033. x1: r[0],
  15034. y1: r[1],
  15035. x2: a[0],
  15036. y2: a[1]
  15037. },
  15038. style: s,
  15039. strokeContainThreshold: t.strokeContainThreshold || 5,
  15040. silent: !0,
  15041. z2: 1
  15042. }));
  15043. var l = e.get("axisLine.symbol"),
  15044. u = e.get("axisLine.symbolSize"),
  15045. h = e.get("axisLine.symbolOffset") || 0;
  15046. if ("number" == typeof h && (h = [h, h]), null != l) {
  15047. "string" == typeof l && (l = [l, l]), ("string" == typeof u || "number" == typeof u) && (u = [u, u]);
  15048. var c = u[0],
  15049. d = u[1];
  15050. f([{
  15051. rotate: t.rotation + Math.PI / 2,
  15052. offset: h[0],
  15053. r: 0
  15054. }, {
  15055. rotate: t.rotation - Math.PI / 2,
  15056. offset: h[1],
  15057. r: Math.sqrt((r[0] - a[0]) * (r[0] - a[0]) + (r[1] - a[1]) * (r[1] - a[1]))
  15058. }], function (e, i) {
  15059. if ("none" !== l[i] && null != l[i]) {
  15060. var n = Ph(l[i], -c / 2, -d / 2, c, d, s.stroke, !0),
  15061. a = e.r + e.offset,
  15062. o = [r[0] + a * Math.cos(t.rotation), r[1] - a * Math.sin(t.rotation)];
  15063. n.attr({
  15064. rotation: e.rotate,
  15065. position: o,
  15066. silent: !0,
  15067. z2: 11
  15068. }), this.group.add(n);
  15069. }
  15070. }, this);
  15071. }
  15072. }
  15073. },
  15074. axisTickLabel: function () {
  15075. var t = this.axisModel,
  15076. e = this.opt,
  15077. i = Pc(this, t, e),
  15078. n = Lc(this, t, e);
  15079. Cc(t, n, i);
  15080. },
  15081. axisName: function () {
  15082. var t = this.opt,
  15083. e = this.axisModel,
  15084. i = D(t.axisName, e.get("name"));
  15085. if (i) {
  15086. var n,
  15087. r = e.get("nameLocation"),
  15088. a = t.nameDirection,
  15089. s = e.getModel("nameTextStyle"),
  15090. l = e.get("nameGap") || 0,
  15091. u = this.axisModel.axis.getExtent(),
  15092. h = u[0] > u[1] ? -1 : 1,
  15093. c = ["start" === r ? u[0] - h * l : "end" === r ? u[1] + h * l : (u[0] + u[1]) / 2, kc(r) ? t.labelOffset + a * l : 0],
  15094. d = e.get("nameRotate");
  15095. null != d && (d = d * $S / 180);
  15096. var f;
  15097. kc(r) ? n = eM(t.rotation, null != d ? d : t.rotation, a) : (n = Tc(t, r, d || 0, u), f = t.axisNameAvailableWidth, null != f && (f = Math.abs(f / Math.sin(n.rotation)), !isFinite(f) && (f = null)));
  15098. var p = s.getFont(),
  15099. g = e.get("nameTruncate", !0) || {},
  15100. m = g.ellipsis,
  15101. v = D(t.nameTruncateMaxWidth, g.maxWidth, f),
  15102. y = null != m && null != v ? $_(i, v, p, m, {
  15103. minChar: 2,
  15104. placeholder: g.placeholder
  15105. }) : i,
  15106. _ = e.get("tooltip", !0),
  15107. x = e.mainType,
  15108. w = {
  15109. componentType: x,
  15110. name: i,
  15111. $vars: ["name"]
  15112. };
  15113. w[x + "Index"] = e.componentIndex;
  15114. var b = new $y({
  15115. anid: "name",
  15116. __fullText: i,
  15117. __truncatedText: y,
  15118. position: c,
  15119. rotation: n.rotation,
  15120. silent: iM(e),
  15121. z2: 1,
  15122. tooltip: _ && _.show ? o({
  15123. content: i,
  15124. formatter: function () {
  15125. return i;
  15126. },
  15127. formatterParams: w
  15128. }, _) : null
  15129. });
  15130. ka(b.style, s, {
  15131. text: y,
  15132. textFont: p,
  15133. textFill: s.getTextColor() || e.get("axisLine.lineStyle.color"),
  15134. textAlign: s.get("align") || n.textAlign,
  15135. textVerticalAlign: s.get("verticalAlign") || n.textVerticalAlign
  15136. }), e.get("triggerEvent") && (b.eventData = tM(e), b.eventData.targetType = "axisName", b.eventData.name = i), this._dumbGroup.add(b), b.updateTransform(), this.group.add(b), b.decomposeTransform();
  15137. }
  15138. }
  15139. },
  15140. tM = QS.makeAxisEventDataBase = function (t) {
  15141. var e = {
  15142. componentType: t.mainType,
  15143. componentIndex: t.componentIndex
  15144. };
  15145. return e[t.mainType + "Index"] = t.componentIndex, e;
  15146. },
  15147. eM = QS.innerTextLayout = function (t, e, i) {
  15148. var n,
  15149. r,
  15150. a = go(e - t);
  15151. return mo(a) ? (r = i > 0 ? "top" : "bottom", n = "center") : mo(a - $S) ? (r = i > 0 ? "bottom" : "top", n = "center") : (r = "middle", n = a > 0 && $S > a ? i > 0 ? "right" : "left" : i > 0 ? "left" : "right"), {
  15152. rotation: a,
  15153. textAlign: n,
  15154. textVerticalAlign: r
  15155. };
  15156. },
  15157. iM = QS.isLabelSilent = function (t) {
  15158. var e = t.get("tooltip");
  15159. return t.get("silent") || !(t.get("triggerEvent") || e && e.show);
  15160. },
  15161. nM = f,
  15162. rM = _,
  15163. aM = vu({
  15164. type: "axis",
  15165. _axisPointer: null,
  15166. axisPointerClass: null,
  15167. render: function (t, e, i, n) {
  15168. this.axisPointerClass && Fc(t), aM.superApply(this, "render", arguments), Uc(this, t, e, i, n, !0);
  15169. },
  15170. updateAxisPointer: function (t, e, i, n) {
  15171. Uc(this, t, e, i, n, !1);
  15172. },
  15173. remove: function (t, e) {
  15174. var i = this._axisPointer;
  15175. i && i.remove(e), aM.superApply(this, "remove", arguments);
  15176. },
  15177. dispose: function (t, e) {
  15178. Xc(this, e), aM.superApply(this, "dispose", arguments);
  15179. }
  15180. }),
  15181. oM = [];
  15182. aM.registerAxisPointerClass = function (t, e) {
  15183. oM[t] = e;
  15184. }, aM.getAxisPointerClass = function (t) {
  15185. return t && oM[t];
  15186. };
  15187. var sM = ["axisLine", "axisTickLabel", "axisName"],
  15188. lM = ["splitArea", "splitLine"],
  15189. uM = aM.extend({
  15190. type: "cartesianAxis",
  15191. axisPointerClass: "CartesianAxisPointer",
  15192. render: function (t, e, i, n) {
  15193. this.group.removeAll();
  15194. var r = this._axisGroup;
  15195. if (this._axisGroup = new Bm(), this.group.add(this._axisGroup), t.get("show")) {
  15196. var a = t.getCoordSysModel(),
  15197. o = Yc(a, t),
  15198. s = new QS(t, o);
  15199. f(sM, s.add, s), this._axisGroup.add(s.getGroup()), f(lM, function (e) {
  15200. t.get(e + ".show") && this["_" + e](t, a);
  15201. }, this), Xa(r, this._axisGroup, t), uM.superCall(this, "render", t, e, i, n);
  15202. }
  15203. },
  15204. remove: function () {
  15205. this._splitAreaColors = null;
  15206. },
  15207. _splitLine: function (t, e) {
  15208. var i = t.axis;
  15209. if (!i.scale.isBlank()) {
  15210. var n = t.getModel("splitLine"),
  15211. r = n.getModel("lineStyle"),
  15212. a = r.get("color");
  15213. a = x(a) ? a : [a];
  15214. for (var o = e.coordinateSystem.getRect(), l = i.isHorizontal(), u = 0, h = i.getTicksCoords({
  15215. tickModel: n
  15216. }), c = [], d = [], f = r.getLineStyle(), p = 0; p < h.length; p++) {
  15217. var g = i.toGlobalCoord(h[p].coord);
  15218. l ? (c[0] = g, c[1] = o.y, d[0] = g, d[1] = o.y + o.height) : (c[0] = o.x, c[1] = g, d[0] = o.x + o.width, d[1] = g);
  15219. var m = u++ % a.length,
  15220. v = h[p].tickValue;
  15221. this._axisGroup.add(new c_({
  15222. anid: null != v ? "line_" + h[p].tickValue : null,
  15223. subPixelOptimize: !0,
  15224. shape: {
  15225. x1: c[0],
  15226. y1: c[1],
  15227. x2: d[0],
  15228. y2: d[1]
  15229. },
  15230. style: s({
  15231. stroke: a[m]
  15232. }, f),
  15233. silent: !0
  15234. }));
  15235. }
  15236. }
  15237. },
  15238. _splitArea: function (t, e) {
  15239. var i = t.axis;
  15240. if (!i.scale.isBlank()) {
  15241. var n = t.getModel("splitArea"),
  15242. r = n.getModel("areaStyle"),
  15243. a = r.get("color"),
  15244. o = e.coordinateSystem.getRect(),
  15245. l = i.getTicksCoords({
  15246. tickModel: n,
  15247. clamp: !0
  15248. });
  15249. if (l.length) {
  15250. var u = a.length,
  15251. h = this._splitAreaColors,
  15252. c = N(),
  15253. d = 0;
  15254. if (h) for (var f = 0; f < l.length; f++) {
  15255. var p = h.get(l[f].tickValue);
  15256. if (null != p) {
  15257. d = (p + (u - 1) * f) % u;
  15258. break;
  15259. }
  15260. }
  15261. var g = i.toGlobalCoord(l[0].coord),
  15262. m = r.getAreaStyle();
  15263. a = x(a) ? a : [a];
  15264. for (var f = 1; f < l.length; f++) {
  15265. var v,
  15266. y,
  15267. _,
  15268. w,
  15269. b = i.toGlobalCoord(l[f].coord);
  15270. i.isHorizontal() ? (v = g, y = o.y, _ = b - v, w = o.height, g = v + _) : (v = o.x, y = g, _ = o.width, w = b - y, g = y + w);
  15271. var S = l[f - 1].tickValue;
  15272. null != S && c.set(S, d), this._axisGroup.add(new u_({
  15273. anid: null != S ? "area_" + S : null,
  15274. shape: {
  15275. x: v,
  15276. y: y,
  15277. width: _,
  15278. height: w
  15279. },
  15280. style: s({
  15281. fill: a[d]
  15282. }, m),
  15283. silent: !0
  15284. })), d = (d + 1) % u;
  15285. }
  15286. this._splitAreaColors = c;
  15287. }
  15288. }
  15289. }
  15290. });
  15291. uM.extend({
  15292. type: "xAxis"
  15293. }), uM.extend({
  15294. type: "yAxis"
  15295. }), vu({
  15296. type: "grid",
  15297. render: function (t) {
  15298. this.group.removeAll(), t.get("show") && this.group.add(new u_({
  15299. shape: t.coordinateSystem.getRect(),
  15300. style: s({
  15301. fill: t.get("backgroundColor")
  15302. }, t.getItemStyle()),
  15303. silent: !0,
  15304. z2: -1
  15305. }));
  15306. }
  15307. }), ou(function (t) {
  15308. t.xAxis && t.yAxis && !t.grid && (t.grid = {});
  15309. }), du($w.VISUAL.LAYOUT, _(ph, "bar")), du($w.VISUAL.PROGRESSIVE_LAYOUT, Wb), fu({
  15310. seriesType: "bar",
  15311. reset: function (t) {
  15312. t.getData().setVisual("legendSymbol", "roundRect");
  15313. }
  15314. }), jx.extend({
  15315. type: "series.line",
  15316. dependencies: ["grid", "polar"],
  15317. getInitialData: function () {
  15318. return Zu(this.getSource(), this);
  15319. },
  15320. defaultOption: {
  15321. zlevel: 0,
  15322. z: 2,
  15323. coordinateSystem: "cartesian2d",
  15324. legendHoverLink: !0,
  15325. hoverAnimation: !0,
  15326. clip: !0,
  15327. label: {
  15328. position: "top"
  15329. },
  15330. lineStyle: {
  15331. width: 2,
  15332. type: "solid"
  15333. },
  15334. step: !1,
  15335. smooth: !1,
  15336. smoothMonotone: null,
  15337. symbol: "emptyCircle",
  15338. symbolSize: 4,
  15339. symbolRotate: null,
  15340. showSymbol: !0,
  15341. showAllSymbol: "auto",
  15342. connectNulls: !1,
  15343. sampling: "none",
  15344. animationEasing: "linear",
  15345. progressive: 0,
  15346. hoverLayerThreshold: 1 / 0
  15347. }
  15348. });
  15349. var hM = jc.prototype,
  15350. cM = jc.getSymbolSize = function (t, e) {
  15351. var i = t.getItemVisual(e, "symbolSize");
  15352. return i instanceof Array ? i.slice() : [+i, +i];
  15353. };
  15354. hM._createSymbol = function (t, e, i, n, r) {
  15355. this.removeAll();
  15356. var a = e.getItemVisual(i, "color"),
  15357. o = Ph(t, -1, -1, 2, 2, a, r);
  15358. o.attr({
  15359. z2: 100,
  15360. culling: !0,
  15361. scale: qc(n)
  15362. }), o.drift = Zc, this._symbolType = t, this.add(o);
  15363. }, hM.stopSymbolAnimation = function (t) {
  15364. this.childAt(0).stopAnimation(t);
  15365. }, hM.getSymbolPath = function () {
  15366. return this.childAt(0);
  15367. }, hM.getScale = function () {
  15368. return this.childAt(0).scale;
  15369. }, hM.highlight = function () {
  15370. this.childAt(0).trigger("emphasis");
  15371. }, hM.downplay = function () {
  15372. this.childAt(0).trigger("normal");
  15373. }, hM.setZ = function (t, e) {
  15374. var i = this.childAt(0);
  15375. i.zlevel = t, i.z = e;
  15376. }, hM.setDraggable = function (t) {
  15377. var e = this.childAt(0);
  15378. e.draggable = t, e.cursor = t ? "move" : e.cursor;
  15379. }, hM.updateData = function (t, e, i) {
  15380. this.silent = !1;
  15381. var n = t.getItemVisual(e, "symbol") || "circle",
  15382. r = t.hostModel,
  15383. a = cM(t, e),
  15384. o = n !== this._symbolType;
  15385. if (o) {
  15386. var s = t.getItemVisual(e, "symbolKeepAspect");
  15387. this._createSymbol(n, t, e, a, s);
  15388. } else {
  15389. var l = this.childAt(0);
  15390. l.silent = !1, Ga(l, {
  15391. scale: qc(a)
  15392. }, r, e);
  15393. }
  15394. if (this._updateCommon(t, e, a, i), o) {
  15395. var l = this.childAt(0),
  15396. u = i && i.fadeIn,
  15397. h = {
  15398. scale: l.scale.slice()
  15399. };
  15400. u && (h.style = {
  15401. opacity: l.style.opacity
  15402. }), l.scale = [0, 0], u && (l.style.opacity = 0), Va(l, h, r, e);
  15403. }
  15404. this._seriesModel = r;
  15405. };
  15406. var dM = ["itemStyle"],
  15407. fM = ["emphasis", "itemStyle"],
  15408. pM = ["label"],
  15409. gM = ["emphasis", "label"];
  15410. hM._updateCommon = function (t, e, i, n) {
  15411. function r(e) {
  15412. return b ? t.getName(e) : dc(t, e);
  15413. }
  15414. var a = this.childAt(0),
  15415. s = t.hostModel,
  15416. l = t.getItemVisual(e, "color");
  15417. "image" !== a.type ? a.useStyle({
  15418. strokeNoScale: !0
  15419. }) : a.setStyle({
  15420. opacity: null,
  15421. shadowBlur: null,
  15422. shadowOffsetX: null,
  15423. shadowOffsetY: null,
  15424. shadowColor: null
  15425. });
  15426. var u = n && n.itemStyle,
  15427. h = n && n.hoverItemStyle,
  15428. c = n && n.symbolRotate,
  15429. d = n && n.symbolOffset,
  15430. f = n && n.labelModel,
  15431. p = n && n.hoverLabelModel,
  15432. g = n && n.hoverAnimation,
  15433. m = n && n.cursorStyle;
  15434. if (!n || t.hasItemOption) {
  15435. var v = n && n.itemModel ? n.itemModel : t.getItemModel(e);
  15436. u = v.getModel(dM).getItemStyle(["color"]), h = v.getModel(fM).getItemStyle(), c = v.getShallow("symbolRotate"), d = v.getShallow("symbolOffset"), f = v.getModel(pM), p = v.getModel(gM), g = v.getShallow("hoverAnimation"), m = v.getShallow("cursor");
  15437. } else h = o({}, h);
  15438. var y = a.style;
  15439. a.attr("rotation", (c || 0) * Math.PI / 180 || 0), d && a.attr("position", [so(d[0], i[0]), so(d[1], i[1])]), m && a.attr("cursor", m), a.setColor(l, n && n.symbolInnerColor), a.setStyle(u);
  15440. var _ = t.getItemVisual(e, "opacity");
  15441. null != _ && (y.opacity = _);
  15442. var x = t.getItemVisual(e, "liftZ"),
  15443. w = a.__z2Origin;
  15444. null != x ? null == w && (a.__z2Origin = a.z2, a.z2 += x) : null != w && (a.z2 = w, a.__z2Origin = null);
  15445. var b = n && n.useNameLabel;
  15446. Da(y, h, f, p, {
  15447. labelFetcher: s,
  15448. labelDataIndex: e,
  15449. defaultText: r,
  15450. isRectText: !0,
  15451. autoColor: l
  15452. }), a.__symbolOriginalScale = qc(i), a.hoverStyle = h, a.highDownOnUpdate = g && s.isAnimationEnabled() ? Kc : null, Ma(a);
  15453. }, hM.fadeOut = function (t, e) {
  15454. var i = this.childAt(0);
  15455. this.silent = i.silent = !0, !(e && e.keepLabel) && (i.style.text = null), Ga(i, {
  15456. style: {
  15457. opacity: 0
  15458. },
  15459. scale: [0, 0]
  15460. }, this._seriesModel, this.dataIndex, t);
  15461. }, h(jc, Bm);
  15462. var mM = $c.prototype;
  15463. mM.updateData = function (t, e) {
  15464. e = Jc(e);
  15465. var i = this.group,
  15466. n = t.hostModel,
  15467. r = this._data,
  15468. a = this._symbolCtor,
  15469. o = td(t);
  15470. r || i.removeAll(), t.diff(r).add(function (n) {
  15471. var r = t.getItemLayout(n);
  15472. if (Qc(t, r, n, e)) {
  15473. var s = new a(t, n, o);
  15474. s.attr("position", r), t.setItemGraphicEl(n, s), i.add(s);
  15475. }
  15476. }).update(function (s, l) {
  15477. var u = r.getItemGraphicEl(l),
  15478. h = t.getItemLayout(s);
  15479. return Qc(t, h, s, e) ? (u ? (u.updateData(t, s, o), Ga(u, {
  15480. position: h
  15481. }, n)) : (u = new a(t, s), u.attr("position", h)), i.add(u), void t.setItemGraphicEl(s, u)) : void i.remove(u);
  15482. }).remove(function (t) {
  15483. var e = r.getItemGraphicEl(t);
  15484. e && e.fadeOut(function () {
  15485. i.remove(e);
  15486. });
  15487. }).execute(), this._data = t;
  15488. }, mM.isPersistent = function () {
  15489. return !0;
  15490. }, mM.updateLayout = function () {
  15491. var t = this._data;
  15492. t && t.eachItemGraphicEl(function (e, i) {
  15493. var n = t.getItemLayout(i);
  15494. e.attr("position", n);
  15495. });
  15496. }, mM.incrementalPrepareUpdate = function (t) {
  15497. this._seriesScope = td(t), this._data = null, this.group.removeAll();
  15498. }, mM.incrementalUpdate = function (t, e, i) {
  15499. function n(t) {
  15500. t.isGroup || (t.incremental = t.useHoverLayer = !0);
  15501. }
  15502. i = Jc(i);
  15503. for (var r = t.start; r < t.end; r++) {
  15504. var a = e.getItemLayout(r);
  15505. if (Qc(e, a, r, i)) {
  15506. var o = new this._symbolCtor(e, r, this._seriesScope);
  15507. o.traverse(n), o.attr("position", a), this.group.add(o), e.setItemGraphicEl(r, o);
  15508. }
  15509. }
  15510. }, mM.remove = function (t) {
  15511. var e = this.group,
  15512. i = this._data;
  15513. i && t ? i.eachItemGraphicEl(function (t) {
  15514. t.fadeOut(function () {
  15515. e.remove(t);
  15516. });
  15517. }) : e.removeAll();
  15518. };
  15519. var vM = function (t, e, i, n, r, a, o, s) {
  15520. for (var l = rd(t, e), u = [], h = [], c = [], d = [], f = [], p = [], g = [], m = ed(r, e, o), v = ed(a, t, s), y = 0; y < l.length; y++) {
  15521. var _ = l[y],
  15522. x = !0;
  15523. switch (_.cmd) {
  15524. case "=":
  15525. var w = t.getItemLayout(_.idx),
  15526. b = e.getItemLayout(_.idx1);
  15527. (isNaN(w[0]) || isNaN(w[1])) && (w = b.slice()), u.push(w), h.push(b), c.push(i[_.idx]), d.push(n[_.idx1]), g.push(e.getRawIndex(_.idx1));
  15528. break;
  15529. case "+":
  15530. var S = _.idx;
  15531. u.push(r.dataToPoint([e.get(m.dataDimsForPoint[0], S), e.get(m.dataDimsForPoint[1], S)])), h.push(e.getItemLayout(S).slice()), c.push(nd(m, r, e, S)), d.push(n[S]), g.push(e.getRawIndex(S));
  15532. break;
  15533. case "-":
  15534. var S = _.idx,
  15535. M = t.getRawIndex(S);
  15536. M !== S ? (u.push(t.getItemLayout(S)), h.push(a.dataToPoint([t.get(v.dataDimsForPoint[0], S), t.get(v.dataDimsForPoint[1], S)])), c.push(i[S]), d.push(nd(v, a, t, S)), g.push(M)) : x = !1;
  15537. }
  15538. x && (f.push(_), p.push(p.length));
  15539. }
  15540. p.sort(function (t, e) {
  15541. return g[t] - g[e];
  15542. });
  15543. for (var I = [], T = [], C = [], D = [], A = [], y = 0; y < p.length; y++) {
  15544. var S = p[y];
  15545. I[y] = u[S], T[y] = h[S], C[y] = c[S], D[y] = d[S], A[y] = f[S];
  15546. }
  15547. return {
  15548. current: I,
  15549. next: T,
  15550. stackedOnCurrent: C,
  15551. stackedOnNext: D,
  15552. status: A
  15553. };
  15554. },
  15555. yM = oe,
  15556. _M = se,
  15557. xM = Y,
  15558. wM = H,
  15559. bM = [],
  15560. SM = [],
  15561. MM = [],
  15562. IM = Vr.extend({
  15563. type: "ec-polyline",
  15564. shape: {
  15565. points: [],
  15566. smooth: 0,
  15567. smoothConstraint: !0,
  15568. smoothMonotone: null,
  15569. connectNulls: !1
  15570. },
  15571. style: {
  15572. fill: null,
  15573. stroke: "#000"
  15574. },
  15575. brush: t_(Vr.prototype.brush),
  15576. buildPath: function (t, e) {
  15577. var i = e.points,
  15578. n = 0,
  15579. r = i.length,
  15580. a = ud(i, e.smoothConstraint);
  15581. if (e.connectNulls) {
  15582. for (; r > 0 && ad(i[r - 1]); r--);
  15583. for (; r > n && ad(i[n]); n++);
  15584. }
  15585. for (; r > n;) n += od(t, i, n, r, r, 1, a.min, a.max, e.smooth, e.smoothMonotone, e.connectNulls) + 1;
  15586. }
  15587. }),
  15588. TM = Vr.extend({
  15589. type: "ec-polygon",
  15590. shape: {
  15591. points: [],
  15592. stackedOnPoints: [],
  15593. smooth: 0,
  15594. stackedOnSmooth: 0,
  15595. smoothConstraint: !0,
  15596. smoothMonotone: null,
  15597. connectNulls: !1
  15598. },
  15599. brush: t_(Vr.prototype.brush),
  15600. buildPath: function (t, e) {
  15601. var i = e.points,
  15602. n = e.stackedOnPoints,
  15603. r = 0,
  15604. a = i.length,
  15605. o = e.smoothMonotone,
  15606. s = ud(i, e.smoothConstraint),
  15607. l = ud(n, e.smoothConstraint);
  15608. if (e.connectNulls) {
  15609. for (; a > 0 && ad(i[a - 1]); a--);
  15610. for (; a > r && ad(i[r]); r++);
  15611. }
  15612. for (; a > r;) {
  15613. var u = od(t, i, r, a, a, 1, s.min, s.max, e.smooth, o, e.connectNulls);
  15614. od(t, n, r + u - 1, u, a, -1, l.min, l.max, e.stackedOnSmooth, o, e.connectNulls), r += u + 1, t.closePath();
  15615. }
  15616. }
  15617. });
  15618. $s.extend({
  15619. type: "line",
  15620. init: function () {
  15621. var t = new Bm(),
  15622. e = new $c();
  15623. this.group.add(e.group), this._symbolDraw = e, this._lineGroup = t;
  15624. },
  15625. render: function (t, e, i) {
  15626. var n = t.coordinateSystem,
  15627. r = this.group,
  15628. a = t.getData(),
  15629. o = t.getModel("lineStyle"),
  15630. l = t.getModel("areaStyle"),
  15631. u = a.mapArray(a.getItemLayout),
  15632. h = "polar" === n.type,
  15633. c = this._coordSys,
  15634. d = this._symbolDraw,
  15635. f = this._polyline,
  15636. p = this._polygon,
  15637. g = this._lineGroup,
  15638. m = t.get("animation"),
  15639. v = !l.isEmpty(),
  15640. y = l.get("origin"),
  15641. _ = ed(n, a, y),
  15642. x = dd(n, a, _),
  15643. w = t.get("showSymbol"),
  15644. b = w && !h && gd(t, a, n),
  15645. S = this._data;
  15646. S && S.eachItemGraphicEl(function (t, e) {
  15647. t.__temp && (r.remove(t), S.setItemGraphicEl(e, null));
  15648. }), w || d.remove(), r.add(g);
  15649. var M,
  15650. I = !h && t.get("step");
  15651. n && n.getArea && (M = n.getArea(), null != M.width ? (M.x -= .1, M.y -= .1, M.width += .2, M.height += .2) : M.r0 && (M.r0 -= .5, M.r1 += .5)), f && c.type === n.type && I === this._step ? (v && !p ? p = this._newPolygon(u, x, n, m) : p && !v && (g.remove(p), p = this._polygon = null), g.setClipPath(vd(n, !1, t)), w && d.updateData(a, {
  15652. isIgnore: b,
  15653. clipShape: M
  15654. }), a.eachItemGraphicEl(function (t) {
  15655. t.stopAnimation(!0);
  15656. }), hd(this._stackedOnPoints, x) && hd(this._points, u) || (m ? this._updateAnimation(a, x, n, i, I, y) : (I && (u = fd(u, n, I), x = fd(x, n, I)), f.setShape({
  15657. points: u
  15658. }), p && p.setShape({
  15659. points: u,
  15660. stackedOnPoints: x
  15661. })))) : (w && d.updateData(a, {
  15662. isIgnore: b,
  15663. clipShape: M
  15664. }), I && (u = fd(u, n, I), x = fd(x, n, I)), f = this._newPolyline(u, n, m), v && (p = this._newPolygon(u, x, n, m)), g.setClipPath(vd(n, !0, t)));
  15665. var T = pd(a, n) || a.getVisual("color");
  15666. f.useStyle(s(o.getLineStyle(), {
  15667. fill: "none",
  15668. stroke: T,
  15669. lineJoin: "bevel"
  15670. }));
  15671. var C = t.get("smooth");
  15672. if (C = cd(t.get("smooth")), f.setShape({
  15673. smooth: C,
  15674. smoothMonotone: t.get("smoothMonotone"),
  15675. connectNulls: t.get("connectNulls")
  15676. }), p) {
  15677. var D = a.getCalculationInfo("stackedOnSeries"),
  15678. A = 0;
  15679. p.useStyle(s(l.getAreaStyle(), {
  15680. fill: T,
  15681. opacity: .7,
  15682. lineJoin: "bevel"
  15683. })), D && (A = cd(D.get("smooth"))), p.setShape({
  15684. smooth: C,
  15685. stackedOnSmooth: A,
  15686. smoothMonotone: t.get("smoothMonotone"),
  15687. connectNulls: t.get("connectNulls")
  15688. });
  15689. }
  15690. this._data = a, this._coordSys = n, this._stackedOnPoints = x, this._points = u, this._step = I, this._valueOrigin = y;
  15691. },
  15692. dispose: function () {},
  15693. highlight: function (t, e, i, n) {
  15694. var r = t.getData(),
  15695. a = qn(r, n);
  15696. if (!(a instanceof Array) && null != a && a >= 0) {
  15697. var o = r.getItemGraphicEl(a);
  15698. if (!o) {
  15699. var s = r.getItemLayout(a);
  15700. if (!s) return;
  15701. o = new jc(r, a), o.position = s, o.setZ(t.get("zlevel"), t.get("z")), o.ignore = isNaN(s[0]) || isNaN(s[1]), o.__temp = !0, r.setItemGraphicEl(a, o), o.stopSymbolAnimation(!0), this.group.add(o);
  15702. }
  15703. o.highlight();
  15704. } else $s.prototype.highlight.call(this, t, e, i, n);
  15705. },
  15706. downplay: function (t, e, i, n) {
  15707. var r = t.getData(),
  15708. a = qn(r, n);
  15709. if (null != a && a >= 0) {
  15710. var o = r.getItemGraphicEl(a);
  15711. o && (o.__temp ? (r.setItemGraphicEl(a, null), this.group.remove(o)) : o.downplay());
  15712. } else $s.prototype.downplay.call(this, t, e, i, n);
  15713. },
  15714. _newPolyline: function (t) {
  15715. var e = this._polyline;
  15716. return e && this._lineGroup.remove(e), e = new IM({
  15717. shape: {
  15718. points: t
  15719. },
  15720. silent: !0,
  15721. z2: 10
  15722. }), this._lineGroup.add(e), this._polyline = e, e;
  15723. },
  15724. _newPolygon: function (t, e) {
  15725. var i = this._polygon;
  15726. return i && this._lineGroup.remove(i), i = new TM({
  15727. shape: {
  15728. points: t,
  15729. stackedOnPoints: e
  15730. },
  15731. silent: !0
  15732. }), this._lineGroup.add(i), this._polygon = i, i;
  15733. },
  15734. _updateAnimation: function (t, e, i, n, r, a) {
  15735. var o = this._polyline,
  15736. s = this._polygon,
  15737. l = t.hostModel,
  15738. u = vM(this._data, t, this._stackedOnPoints, e, this._coordSys, i, this._valueOrigin, a),
  15739. h = u.current,
  15740. c = u.stackedOnCurrent,
  15741. d = u.next,
  15742. f = u.stackedOnNext;
  15743. r && (h = fd(u.current, i, r), c = fd(u.stackedOnCurrent, i, r), d = fd(u.next, i, r), f = fd(u.stackedOnNext, i, r)), o.shape.__points = u.current, o.shape.points = h, Ga(o, {
  15744. shape: {
  15745. points: d
  15746. }
  15747. }, l), s && (s.setShape({
  15748. points: h,
  15749. stackedOnPoints: c
  15750. }), Ga(s, {
  15751. shape: {
  15752. points: d,
  15753. stackedOnPoints: f
  15754. }
  15755. }, l));
  15756. for (var p = [], g = u.status, m = 0; m < g.length; m++) {
  15757. var v = g[m].cmd;
  15758. if ("=" === v) {
  15759. var y = t.getItemGraphicEl(g[m].idx1);
  15760. y && p.push({
  15761. el: y,
  15762. ptIdx: m
  15763. });
  15764. }
  15765. }
  15766. o.animators && o.animators.length && o.animators[0].during(function () {
  15767. for (var t = 0; t < p.length; t++) {
  15768. var e = p[t].el;
  15769. e.attr("position", o.shape.__points[p[t].ptIdx]);
  15770. }
  15771. });
  15772. },
  15773. remove: function () {
  15774. var t = this.group,
  15775. e = this._data;
  15776. this._lineGroup.removeAll(), this._symbolDraw.remove(!0), e && e.eachItemGraphicEl(function (i, n) {
  15777. i.__temp && (t.remove(i), e.setItemGraphicEl(n, null));
  15778. }), this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._data = null;
  15779. }
  15780. });
  15781. var CM = function (t, e, i) {
  15782. return {
  15783. seriesType: t,
  15784. performRawSeries: !0,
  15785. reset: function (t, n) {
  15786. function r(e, i) {
  15787. if (c) {
  15788. var n = t.getRawValue(i),
  15789. r = t.getDataParams(i);
  15790. u && e.setItemVisual(i, "symbol", o(n, r)), h && e.setItemVisual(i, "symbolSize", s(n, r));
  15791. }
  15792. if (e.hasItemOption) {
  15793. var a = e.getItemModel(i),
  15794. l = a.getShallow("symbol", !0),
  15795. d = a.getShallow("symbolSize", !0),
  15796. f = a.getShallow("symbolKeepAspect", !0);
  15797. null != l && e.setItemVisual(i, "symbol", l), null != d && e.setItemVisual(i, "symbolSize", d), null != f && e.setItemVisual(i, "symbolKeepAspect", f);
  15798. }
  15799. }
  15800. var a = t.getData(),
  15801. o = t.get("symbol"),
  15802. s = t.get("symbolSize"),
  15803. l = t.get("symbolKeepAspect"),
  15804. u = w(o),
  15805. h = w(s),
  15806. c = u || h,
  15807. d = !u && o ? o : e,
  15808. f = h ? null : s;
  15809. return a.setVisual({
  15810. legendSymbol: i || d,
  15811. symbol: d,
  15812. symbolSize: f,
  15813. symbolKeepAspect: l
  15814. }), n.isSeriesFiltered(t) ? void 0 : {
  15815. dataEach: a.hasItemOption || c ? r : null
  15816. };
  15817. }
  15818. };
  15819. },
  15820. DM = function (t) {
  15821. return {
  15822. seriesType: t,
  15823. plan: Kx(),
  15824. reset: function (t) {
  15825. function e(t, e) {
  15826. for (var i = t.end - t.start, r = a && new Float32Array(i * s), l = t.start, u = 0, h = [], c = []; l < t.end; l++) {
  15827. var d;
  15828. if (1 === s) {
  15829. var f = e.get(o[0], l);
  15830. d = !isNaN(f) && n.dataToPoint(f, null, c);
  15831. } else {
  15832. var f = h[0] = e.get(o[0], l),
  15833. p = h[1] = e.get(o[1], l);
  15834. d = !isNaN(f) && !isNaN(p) && n.dataToPoint(h, null, c);
  15835. }
  15836. a ? (r[u++] = d ? d[0] : 0 / 0, r[u++] = d ? d[1] : 0 / 0) : e.setItemLayout(l, d && d.slice() || [0 / 0, 0 / 0]);
  15837. }
  15838. a && e.setLayout("symbolPoints", r);
  15839. }
  15840. var i = t.getData(),
  15841. n = t.coordinateSystem,
  15842. r = t.pipelineContext,
  15843. a = r.large;
  15844. if (n) {
  15845. var o = p(n.dimensions, function (t) {
  15846. return i.mapDimension(t);
  15847. }).slice(0, 2),
  15848. s = o.length,
  15849. l = i.getCalculationInfo("stackResultDimension");
  15850. return ju(i, o[0]) && (o[0] = l), ju(i, o[1]) && (o[1] = l), s && {
  15851. progress: e
  15852. };
  15853. }
  15854. }
  15855. };
  15856. },
  15857. AM = {
  15858. average: function (t) {
  15859. for (var e = 0, i = 0, n = 0; n < t.length; n++) isNaN(t[n]) || (e += t[n], i++);
  15860. return 0 === i ? 0 / 0 : e / i;
  15861. },
  15862. sum: function (t) {
  15863. for (var e = 0, i = 0; i < t.length; i++) e += t[i] || 0;
  15864. return e;
  15865. },
  15866. max: function (t) {
  15867. for (var e = -1 / 0, i = 0; i < t.length; i++) t[i] > e && (e = t[i]);
  15868. return isFinite(e) ? e : 0 / 0;
  15869. },
  15870. min: function (t) {
  15871. for (var e = 1 / 0, i = 0; i < t.length; i++) t[i] < e && (e = t[i]);
  15872. return isFinite(e) ? e : 0 / 0;
  15873. },
  15874. nearest: function (t) {
  15875. return t[0];
  15876. }
  15877. },
  15878. kM = function (t) {
  15879. return Math.round(t.length / 2);
  15880. },
  15881. PM = function (t) {
  15882. return {
  15883. seriesType: t,
  15884. modifyOutputEnd: !0,
  15885. reset: function (t) {
  15886. var e = t.getData(),
  15887. i = t.get("sampling"),
  15888. n = t.coordinateSystem;
  15889. if ("cartesian2d" === n.type && i) {
  15890. var r = n.getBaseAxis(),
  15891. a = n.getOtherAxis(r),
  15892. o = r.getExtent(),
  15893. s = o[1] - o[0],
  15894. l = Math.round(e.count() / s);
  15895. if (l > 1) {
  15896. var u;
  15897. "string" == typeof i ? u = AM[i] : "function" == typeof i && (u = i), u && t.setData(e.downSample(e.mapDimension(a.dim), 1 / l, u, kM));
  15898. }
  15899. }
  15900. }
  15901. };
  15902. };
  15903. fu(CM("line", "circle", "line")), du(DM("line")), su($w.PROCESSOR.STATISTIC, PM("line"));
  15904. var LM = function (t, e, i) {
  15905. e = x(e) && {
  15906. coordDimensions: e
  15907. } || o({}, e);
  15908. var n = t.getSource(),
  15909. r = Ob(n, e),
  15910. a = new kb(r, t);
  15911. return a.initData(n, i), a;
  15912. },
  15913. OM = {
  15914. updateSelectedMap: function (t) {
  15915. this._targetList = x(t) ? t.slice() : [], this._selectTargetMap = g(t || [], function (t, e) {
  15916. return t.set(e.name, e), t;
  15917. }, N());
  15918. },
  15919. select: function (t, e) {
  15920. var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t),
  15921. n = this.get("selectedMode");
  15922. "single" === n && this._selectTargetMap.each(function (t) {
  15923. t.selected = !1;
  15924. }), i && (i.selected = !0);
  15925. },
  15926. unSelect: function (t, e) {
  15927. var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t);
  15928. i && (i.selected = !1);
  15929. },
  15930. toggleSelected: function (t, e) {
  15931. var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t);
  15932. return null != i ? (this[i.selected ? "unSelect" : "select"](t, e), i.selected) : void 0;
  15933. },
  15934. isSelected: function (t, e) {
  15935. var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t);
  15936. return i && i.selected;
  15937. }
  15938. },
  15939. zM = yu({
  15940. type: "series.pie",
  15941. init: function (t) {
  15942. zM.superApply(this, "init", arguments), this.legendDataProvider = function () {
  15943. return this.getRawData();
  15944. }, this.updateSelectedMap(this._createSelectableList()), this._defaultLabelLine(t);
  15945. },
  15946. mergeOption: function (t) {
  15947. zM.superCall(this, "mergeOption", t), this.updateSelectedMap(this._createSelectableList());
  15948. },
  15949. getInitialData: function () {
  15950. return LM(this, ["value"]);
  15951. },
  15952. _createSelectableList: function () {
  15953. for (var t = this.getRawData(), e = t.mapDimension("value"), i = [], n = 0, r = t.count(); r > n; n++) i.push({
  15954. name: t.getName(n),
  15955. value: t.get(e, n),
  15956. selected: Ns(t, n, "selected")
  15957. });
  15958. return i;
  15959. },
  15960. getDataParams: function (t) {
  15961. var e = this.getData(),
  15962. i = zM.superCall(this, "getDataParams", t),
  15963. n = [];
  15964. return e.each(e.mapDimension("value"), function (t) {
  15965. n.push(t);
  15966. }), i.percent = po(n, t, e.hostModel.get("percentPrecision")), i.$vars.push("percent"), i;
  15967. },
  15968. _defaultLabelLine: function (t) {
  15969. Vn(t, "labelLine", ["show"]);
  15970. var e = t.labelLine,
  15971. i = t.emphasis.labelLine;
  15972. e.show = e.show && t.label.show, i.show = i.show && t.emphasis.label.show;
  15973. },
  15974. defaultOption: {
  15975. zlevel: 0,
  15976. z: 2,
  15977. legendHoverLink: !0,
  15978. hoverAnimation: !0,
  15979. center: ["50%", "50%"],
  15980. radius: [0, "75%"],
  15981. clockwise: !0,
  15982. startAngle: 90,
  15983. minAngle: 0,
  15984. minShowLabelAngle: 0,
  15985. selectedOffset: 10,
  15986. hoverOffset: 10,
  15987. avoidLabelOverlap: !0,
  15988. percentPrecision: 2,
  15989. stillShowZeroSum: !0,
  15990. label: {
  15991. rotate: !1,
  15992. show: !0,
  15993. position: "outer"
  15994. },
  15995. labelLine: {
  15996. show: !0,
  15997. length: 15,
  15998. length2: 15,
  15999. smooth: !1,
  16000. lineStyle: {
  16001. width: 1,
  16002. type: "solid"
  16003. }
  16004. },
  16005. itemStyle: {
  16006. borderWidth: 1
  16007. },
  16008. animationType: "expansion",
  16009. animationTypeUpdate: "transition",
  16010. animationEasing: "cubicOut"
  16011. }
  16012. });
  16013. c(zM, OM);
  16014. var EM = xd.prototype;
  16015. EM.updateData = function (t, e, i) {
  16016. var n = this.childAt(0),
  16017. r = this.childAt(1),
  16018. a = this.childAt(2),
  16019. l = t.hostModel,
  16020. u = t.getItemModel(e),
  16021. h = t.getItemLayout(e),
  16022. c = o({}, h);
  16023. c.label = null;
  16024. var d = l.getShallow("animationTypeUpdate");
  16025. if (i) {
  16026. n.setShape(c);
  16027. var f = l.getShallow("animationType");
  16028. "scale" === f ? (n.shape.r = h.r0, Va(n, {
  16029. shape: {
  16030. r: h.r
  16031. }
  16032. }, l, e)) : (n.shape.endAngle = h.startAngle, Ga(n, {
  16033. shape: {
  16034. endAngle: h.endAngle
  16035. }
  16036. }, l, e));
  16037. } else "expansion" === d ? n.setShape(c) : Ga(n, {
  16038. shape: c
  16039. }, l, e);
  16040. var p = t.getItemVisual(e, "color");
  16041. n.useStyle(s({
  16042. lineJoin: "bevel",
  16043. fill: p
  16044. }, u.getModel("itemStyle").getItemStyle())), n.hoverStyle = u.getModel("emphasis.itemStyle").getItemStyle();
  16045. var g = u.getShallow("cursor");
  16046. g && n.attr("cursor", g), _d(this, t.getItemLayout(e), l.isSelected(null, e), l.get("selectedOffset"), l.get("animation"));
  16047. var m = !i && "transition" === d;
  16048. this._updateLabel(t, e, m), this.highDownOnUpdate = u.get("hoverAnimation") && l.isAnimationEnabled() ? function (t, e) {
  16049. "emphasis" === e ? (r.ignore = r.hoverIgnore, a.ignore = a.hoverIgnore, n.stopAnimation(!0), n.animateTo({
  16050. shape: {
  16051. r: h.r + l.get("hoverOffset")
  16052. }
  16053. }, 300, "elasticOut")) : (r.ignore = r.normalIgnore, a.ignore = a.normalIgnore, n.stopAnimation(!0), n.animateTo({
  16054. shape: {
  16055. r: h.r
  16056. }
  16057. }, 300, "elasticOut"));
  16058. } : null, Ma(this);
  16059. }, EM._updateLabel = function (t, e, i) {
  16060. var n = this.childAt(1),
  16061. r = this.childAt(2),
  16062. a = t.hostModel,
  16063. o = t.getItemModel(e),
  16064. s = t.getItemLayout(e),
  16065. l = s.label,
  16066. u = t.getItemVisual(e, "color");
  16067. if (!l || isNaN(l.x) || isNaN(l.y)) return void (r.ignore = r.normalIgnore = r.hoverIgnore = n.ignore = n.normalIgnore = n.hoverIgnore = !0);
  16068. var h = {
  16069. points: l.linePoints || [[l.x, l.y], [l.x, l.y], [l.x, l.y]]
  16070. },
  16071. c = {
  16072. x: l.x,
  16073. y: l.y
  16074. };
  16075. i ? (Ga(n, {
  16076. shape: h
  16077. }, a, e), Ga(r, {
  16078. style: c
  16079. }, a, e)) : (n.attr({
  16080. shape: h
  16081. }), r.attr({
  16082. style: c
  16083. })), r.attr({
  16084. rotation: l.rotation,
  16085. origin: [l.x, l.y],
  16086. z2: 10
  16087. });
  16088. var d = o.getModel("label"),
  16089. f = o.getModel("emphasis.label"),
  16090. p = o.getModel("labelLine"),
  16091. g = o.getModel("emphasis.labelLine"),
  16092. u = t.getItemVisual(e, "color");
  16093. Da(r.style, r.hoverStyle = {}, d, f, {
  16094. labelFetcher: t.hostModel,
  16095. labelDataIndex: e,
  16096. defaultText: t.getName(e),
  16097. autoColor: u,
  16098. useInsideStyle: !!l.inside
  16099. }, {
  16100. textAlign: l.textAlign,
  16101. textVerticalAlign: l.verticalAlign,
  16102. opacity: t.getItemVisual(e, "opacity")
  16103. }), r.ignore = r.normalIgnore = !d.get("show"), r.hoverIgnore = !f.get("show"), n.ignore = n.normalIgnore = !p.get("show"), n.hoverIgnore = !g.get("show"), n.setStyle({
  16104. stroke: u,
  16105. opacity: t.getItemVisual(e, "opacity")
  16106. }), n.setStyle(p.getModel("lineStyle").getLineStyle()), n.hoverStyle = g.getModel("lineStyle").getLineStyle();
  16107. var m = p.get("smooth");
  16108. m && m === !0 && (m = .4), n.setShape({
  16109. smooth: m
  16110. });
  16111. }, h(xd, Bm);
  16112. var RM = ($s.extend({
  16113. type: "pie",
  16114. init: function () {
  16115. var t = new Bm();
  16116. this._sectorGroup = t;
  16117. },
  16118. render: function (t, e, i, n) {
  16119. if (!n || n.from !== this.uid) {
  16120. var r = t.getData(),
  16121. a = this._data,
  16122. o = this.group,
  16123. s = e.get("animation"),
  16124. l = !a,
  16125. u = t.get("animationType"),
  16126. h = t.get("animationTypeUpdate"),
  16127. c = _(yd, this.uid, t, s, i),
  16128. d = t.get("selectedMode");
  16129. if (r.diff(a).add(function (t) {
  16130. var e = new xd(r, t);
  16131. l && "scale" !== u && e.eachChild(function (t) {
  16132. t.stopAnimation(!0);
  16133. }), d && e.on("click", c), r.setItemGraphicEl(t, e), o.add(e);
  16134. }).update(function (t, e) {
  16135. var i = a.getItemGraphicEl(e);
  16136. l || "transition" === h || i.eachChild(function (t) {
  16137. t.stopAnimation(!0);
  16138. }), i.updateData(r, t), i.off("click"), d && i.on("click", c), o.add(i), r.setItemGraphicEl(t, i);
  16139. }).remove(function (t) {
  16140. var e = a.getItemGraphicEl(t);
  16141. o.remove(e);
  16142. }).execute(), s && r.count() > 0 && (l ? "scale" !== u : "transition" !== h)) {
  16143. for (var f = r.getItemLayout(0), p = 1; isNaN(f.startAngle) && p < r.count(); ++p) f = r.getItemLayout(p);
  16144. var g = Math.max(i.getWidth(), i.getHeight()) / 2,
  16145. m = y(o.removeClipPath, o);
  16146. o.setClipPath(this._createClipPath(f.cx, f.cy, g, f.startAngle, f.clockwise, m, t, l));
  16147. } else o.removeClipPath();
  16148. this._data = r;
  16149. }
  16150. },
  16151. dispose: function () {},
  16152. _createClipPath: function (t, e, i, n, r, a, o, s) {
  16153. var l = new e_({
  16154. shape: {
  16155. cx: t,
  16156. cy: e,
  16157. r0: 0,
  16158. r: i,
  16159. startAngle: n,
  16160. endAngle: n,
  16161. clockwise: r
  16162. }
  16163. }),
  16164. u = s ? Va : Ga;
  16165. return u(l, {
  16166. shape: {
  16167. endAngle: n + (r ? 1 : -1) * Math.PI * 2
  16168. }
  16169. }, o, a), l;
  16170. },
  16171. containPoint: function (t, e) {
  16172. var i = e.getData(),
  16173. n = i.getItemLayout(0);
  16174. if (n) {
  16175. var r = t[0] - n.cx,
  16176. a = t[1] - n.cy,
  16177. o = Math.sqrt(r * r + a * a);
  16178. return o <= n.r && o >= n.r0;
  16179. }
  16180. }
  16181. }), function (t, e) {
  16182. f(e, function (e) {
  16183. e.update = "updateView", uu(e, function (i, n) {
  16184. var r = {};
  16185. return n.eachComponent({
  16186. mainType: "series",
  16187. subType: t,
  16188. query: i
  16189. }, function (t) {
  16190. t[e.method] && t[e.method](i.name, i.dataIndex);
  16191. var n = t.getData();
  16192. n.each(function (e) {
  16193. var i = n.getName(e);
  16194. r[i] = t.isSelected(i) || !1;
  16195. });
  16196. }), {
  16197. name: i.name,
  16198. selected: r,
  16199. seriesId: i.seriesId
  16200. };
  16201. });
  16202. });
  16203. }),
  16204. BM = function (t) {
  16205. return {
  16206. getTargetSeries: function (e) {
  16207. var i = {},
  16208. n = N();
  16209. return e.eachSeriesByType(t, function (t) {
  16210. t.__paletteScope = i, n.set(t.uid, t);
  16211. }), n;
  16212. },
  16213. reset: function (t) {
  16214. var e = t.getRawData(),
  16215. i = {},
  16216. n = t.getData();
  16217. n.each(function (t) {
  16218. var e = n.getRawIndex(t);
  16219. i[e] = t;
  16220. }), e.each(function (r) {
  16221. var a,
  16222. o = i[r],
  16223. s = null != o && n.getItemVisual(o, "color", !0),
  16224. l = null != o && n.getItemVisual(o, "borderColor", !0);
  16225. if (s && l || (a = e.getItemModel(r)), s) e.setItemVisual(r, "color", s);else {
  16226. var u = a.get("itemStyle.color") || t.getColorFromPalette(e.getName(r) || r + "", t.__paletteScope, e.count());
  16227. e.setItemVisual(r, "color", u), null != o && n.setItemVisual(o, "color", u);
  16228. }
  16229. if (l) e.setItemVisual(r, "borderColor", l);else {
  16230. var h = a.get("itemStyle.borderColor");
  16231. e.setItemVisual(r, "borderColor", h), null != o && n.setItemVisual(o, "borderColor", h);
  16232. }
  16233. });
  16234. }
  16235. };
  16236. },
  16237. NM = Math.PI / 180,
  16238. FM = function (t, e, i, n) {
  16239. var r,
  16240. a,
  16241. o = t.getData(),
  16242. s = [],
  16243. l = !1,
  16244. u = (t.get("minShowLabelAngle") || 0) * NM;
  16245. o.each(function (i) {
  16246. var n = o.getItemLayout(i),
  16247. h = o.getItemModel(i),
  16248. c = h.getModel("label"),
  16249. d = c.get("position") || h.get("emphasis.label.position"),
  16250. f = h.getModel("labelLine"),
  16251. p = f.get("length"),
  16252. g = f.get("length2");
  16253. if (!(n.angle < u)) {
  16254. var m,
  16255. v,
  16256. y,
  16257. _,
  16258. x = (n.startAngle + n.endAngle) / 2,
  16259. w = Math.cos(x),
  16260. b = Math.sin(x);
  16261. r = n.cx, a = n.cy;
  16262. var S = "inside" === d || "inner" === d;
  16263. if ("center" === d) m = n.cx, v = n.cy, _ = "center";else {
  16264. var M = (S ? (n.r + n.r0) / 2 * w : n.r * w) + r,
  16265. I = (S ? (n.r + n.r0) / 2 * b : n.r * b) + a;
  16266. if (m = M + 3 * w, v = I + 3 * b, !S) {
  16267. var T = M + w * (p + e - n.r),
  16268. C = I + b * (p + e - n.r),
  16269. D = T + (0 > w ? -1 : 1) * g,
  16270. A = C;
  16271. m = D + (0 > w ? -5 : 5), v = A, y = [[M, I], [T, C], [D, A]];
  16272. }
  16273. _ = S ? "center" : w > 0 ? "left" : "right";
  16274. }
  16275. var k,
  16276. P = c.getFont(),
  16277. L = c.get("rotate");
  16278. k = "number" == typeof L ? L * (Math.PI / 180) : L ? 0 > w ? -x + Math.PI : -x : 0;
  16279. var O = t.getFormattedLabel(i, "normal") || o.getName(i),
  16280. z = Gi(O, P, _, "top");
  16281. l = !!k, n.label = {
  16282. x: m,
  16283. y: v,
  16284. position: d,
  16285. height: z.height,
  16286. len: p,
  16287. len2: g,
  16288. linePoints: y,
  16289. textAlign: _,
  16290. verticalAlign: "middle",
  16291. rotation: k,
  16292. inside: S
  16293. }, S || s.push(n.label);
  16294. }
  16295. }), !l && t.get("avoidLabelOverlap") && bd(s, r, a, e, i, n);
  16296. },
  16297. GM = 2 * Math.PI,
  16298. VM = Math.PI / 180,
  16299. HM = function (t, e, i) {
  16300. e.eachSeriesByType(t, function (t) {
  16301. var e = t.getData(),
  16302. n = e.mapDimension("value"),
  16303. r = t.get("center"),
  16304. a = t.get("radius");
  16305. x(a) || (a = [0, a]), x(r) || (r = [r, r]);
  16306. var o = i.getWidth(),
  16307. s = i.getHeight(),
  16308. l = Math.min(o, s),
  16309. u = so(r[0], o),
  16310. h = so(r[1], s),
  16311. c = so(a[0], l / 2),
  16312. d = so(a[1], l / 2),
  16313. f = -t.get("startAngle") * VM,
  16314. p = t.get("minAngle") * VM,
  16315. g = 0;
  16316. e.each(n, function (t) {
  16317. !isNaN(t) && g++;
  16318. });
  16319. var m = e.getSum(n),
  16320. v = Math.PI / (m || g) * 2,
  16321. y = t.get("clockwise"),
  16322. _ = t.get("roseType"),
  16323. w = t.get("stillShowZeroSum"),
  16324. b = e.getDataExtent(n);
  16325. b[0] = 0;
  16326. var S = GM,
  16327. M = 0,
  16328. I = f,
  16329. T = y ? 1 : -1;
  16330. if (e.each(n, function (t, i) {
  16331. var n;
  16332. if (isNaN(t)) return void e.setItemLayout(i, {
  16333. angle: 0 / 0,
  16334. startAngle: 0 / 0,
  16335. endAngle: 0 / 0,
  16336. clockwise: y,
  16337. cx: u,
  16338. cy: h,
  16339. r0: c,
  16340. r: _ ? 0 / 0 : d
  16341. });
  16342. n = "area" !== _ ? 0 === m && w ? v : t * v : GM / g, p > n ? (n = p, S -= p) : M += t;
  16343. var r = I + T * n;
  16344. e.setItemLayout(i, {
  16345. angle: n,
  16346. startAngle: I,
  16347. endAngle: r,
  16348. clockwise: y,
  16349. cx: u,
  16350. cy: h,
  16351. r0: c,
  16352. r: _ ? oo(t, b, [c, d]) : d
  16353. }), I = r;
  16354. }), GM > S && g) if (.001 >= S) {
  16355. var C = GM / g;
  16356. e.each(n, function (t, i) {
  16357. if (!isNaN(t)) {
  16358. var n = e.getItemLayout(i);
  16359. n.angle = C, n.startAngle = f + T * i * C, n.endAngle = f + T * (i + 1) * C;
  16360. }
  16361. });
  16362. } else v = S / M, I = f, e.each(n, function (t, i) {
  16363. if (!isNaN(t)) {
  16364. var n = e.getItemLayout(i),
  16365. r = n.angle === p ? p : t * v;
  16366. n.startAngle = I, n.endAngle = I + T * r, I += T * r;
  16367. }
  16368. });
  16369. FM(t, d, o, s);
  16370. });
  16371. },
  16372. WM = function (t) {
  16373. return {
  16374. seriesType: t,
  16375. reset: function (t, e) {
  16376. var i = e.findComponents({
  16377. mainType: "legend"
  16378. });
  16379. if (i && i.length) {
  16380. var n = t.getData();
  16381. n.filterSelf(function (t) {
  16382. for (var e = n.getName(t), r = 0; r < i.length; r++) if (!i[r].isSelected(e)) return !1;
  16383. return !0;
  16384. });
  16385. }
  16386. }
  16387. };
  16388. };
  16389. RM("pie", [{
  16390. type: "pieToggleSelect",
  16391. event: "pieselectchanged",
  16392. method: "toggleSelected"
  16393. }, {
  16394. type: "pieSelect",
  16395. event: "pieselected",
  16396. method: "select"
  16397. }, {
  16398. type: "pieUnSelect",
  16399. event: "pieunselected",
  16400. method: "unSelect"
  16401. }]), fu(BM("pie")), du(_(HM, "pie")), su(WM("pie"));
  16402. for (var UM = [126, 25], XM = [[[0, 3.5], [7, 11.2], [15, 11.9], [30, 7], [42, .7], [52, .7], [56, 7.7], [59, .7], [64, .7], [64, 0], [5, 0], [0, 3.5]], [[13, 16.1], [19, 14.7], [16, 21.7], [11, 23.1], [13, 16.1]], [[12, 32.2], [14, 38.5], [15, 38.5], [13, 32.2], [12, 32.2]], [[16, 47.6], [12, 53.2], [13, 53.2], [18, 47.6], [16, 47.6]], [[6, 64.4], [8, 70], [9, 70], [8, 64.4], [6, 64.4]], [[23, 82.6], [29, 79.8], [30, 79.8], [25, 82.6], [23, 82.6]], [[37, 70.7], [43, 62.3], [44, 62.3], [39, 70.7], [37, 70.7]], [[48, 51.1], [51, 45.5], [53, 45.5], [50, 51.1], [48, 51.1]], [[51, 35], [51, 28.7], [53, 28.7], [53, 35], [51, 35]], [[52, 22.4], [55, 17.5], [56, 17.5], [53, 22.4], [52, 22.4]], [[58, 12.6], [62, 7], [63, 7], [60, 12.6], [58, 12.6]], [[0, 3.5], [0, 93.1], [64, 93.1], [64, 0], [63, 0], [63, 92.4], [1, 92.4], [1, 3.5], [0, 3.5]]], YM = 0; YM < XM.length; YM++) for (var jM = 0; jM < XM[YM].length; jM++) XM[YM][jM][0] /= 10.5, XM[YM][jM][1] /= -14, XM[YM][jM][0] += UM[0], XM[YM][jM][1] += UM[1];
  16403. var qM = function (t, e) {
  16404. "china" === t && e.push(new Bh("南海诸岛", p(XM, function (t) {
  16405. return {
  16406. type: "polygon",
  16407. exterior: t
  16408. };
  16409. }), UM));
  16410. },
  16411. ZM = {
  16412. "南海诸岛": [32, 80],
  16413. "广东": [0, -10],
  16414. "香港": [10, 5],
  16415. "澳门": [-10, 10],
  16416. "天津": [5, 5]
  16417. },
  16418. KM = function (t, e) {
  16419. if ("china" === t) {
  16420. var i = ZM[e.name];
  16421. if (i) {
  16422. var n = e.center;
  16423. n[0] += i[0] / 10.5, n[1] += -i[1] / 14;
  16424. }
  16425. }
  16426. },
  16427. $M = {
  16428. Russia: [100, 60],
  16429. "United States": [-99, 38],
  16430. "United States of America": [-99, 38]
  16431. },
  16432. QM = function (t, e) {
  16433. if ("world" === t) {
  16434. var i = $M[e.name];
  16435. if (i) {
  16436. var n = e.center;
  16437. n[0] = i[0], n[1] = i[1];
  16438. }
  16439. }
  16440. },
  16441. JM = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]],
  16442. tI = function (t, e) {
  16443. "china" === t && "台湾" === e.name && e.geometries.push({
  16444. type: "polygon",
  16445. exterior: JM[0]
  16446. });
  16447. },
  16448. eI = Zn(),
  16449. iI = {
  16450. load: function (t, e) {
  16451. var i = eI(e).parsed;
  16452. if (i) return i;
  16453. var n,
  16454. r = e.specialAreas || {},
  16455. a = e.geoJSON;
  16456. try {
  16457. n = a ? wS(a) : [];
  16458. } catch (o) {
  16459. throw new Error("Invalid geoJson format\n" + o.message);
  16460. }
  16461. return qM(t, n), f(n, function (e) {
  16462. var i = e.name;
  16463. KM(t, e), QM(t, e), tI(t, e);
  16464. var n = r[i];
  16465. n && e.transformTo(n.left, n.top, n.width, n.height);
  16466. }), eI(e).parsed = {
  16467. regions: n,
  16468. boundingRect: Md(n)
  16469. };
  16470. }
  16471. },
  16472. nI = Zn(),
  16473. rI = {
  16474. load: function (t, e) {
  16475. var i = nI(e).originRoot;
  16476. if (i) return {
  16477. root: i,
  16478. boundingRect: nI(e).boundingRect
  16479. };
  16480. var n = Id(e);
  16481. return nI(e).originRoot = n.root, nI(e).boundingRect = n.boundingRect, n;
  16482. },
  16483. makeGraphic: function (t, e, i) {
  16484. var n = nI(e),
  16485. r = n.rootMap || (n.rootMap = N()),
  16486. a = r.get(i);
  16487. if (a) return a;
  16488. var o = n.originRoot,
  16489. s = n.boundingRect;
  16490. return n.originRootHostKey ? a = Id(e, s).root : (n.originRootHostKey = i, a = o), r.set(i, a);
  16491. },
  16492. removeGraphic: function (t, e, i) {
  16493. var n = nI(e),
  16494. r = n.rootMap;
  16495. r && r.removeKey(i), i === n.originRootHostKey && (n.originRootHostKey = null);
  16496. }
  16497. },
  16498. aI = {
  16499. geoJSON: iI,
  16500. svg: rI
  16501. },
  16502. oI = {
  16503. load: function (t, e) {
  16504. var i,
  16505. n = [],
  16506. r = N(),
  16507. a = N(),
  16508. o = Cd(t);
  16509. return f(o, function (o) {
  16510. var s = aI[o.type].load(t, o);
  16511. f(s.regions, function (t) {
  16512. var i = t.name;
  16513. e && e.hasOwnProperty(i) && (t = t.cloneShallow(i = e[i])), n.push(t), r.set(i, t), a.set(i, t.center);
  16514. });
  16515. var l = s.boundingRect;
  16516. l && (i ? i.union(l) : i = l.clone());
  16517. }), {
  16518. regions: n,
  16519. regionsMap: r,
  16520. nameCoordMap: a,
  16521. boundingRect: i || new wi(0, 0, 0, 0)
  16522. };
  16523. },
  16524. makeGraphic: Td("makeGraphic"),
  16525. removeGraphic: Td("removeGraphic")
  16526. },
  16527. sI = jx.extend({
  16528. type: "series.map",
  16529. dependencies: ["geo"],
  16530. layoutMode: "box",
  16531. needsDrawMap: !1,
  16532. seriesGroup: [],
  16533. getInitialData: function () {
  16534. for (var t = LM(this, ["value"]), e = t.mapDimension("value"), i = N(), n = [], r = [], a = 0, o = t.count(); o > a; a++) {
  16535. var s = t.getName(a);
  16536. i.set(s, !0), n.push({
  16537. name: s,
  16538. value: t.get(e, a),
  16539. selected: Ns(t, a, "selected")
  16540. });
  16541. }
  16542. var l = oI.load(this.getMapType(), this.option.nameMap);
  16543. return f(l.regions, function (t) {
  16544. var e = t.name;
  16545. i.get(e) || (n.push({
  16546. name: e
  16547. }), r.push(e));
  16548. }), this.updateSelectedMap(n), t.appendValues([], r), t;
  16549. },
  16550. getHostGeoModel: function () {
  16551. var t = this.option.geoIndex;
  16552. return null != t ? this.dependentModels.geo[t] : null;
  16553. },
  16554. getMapType: function () {
  16555. return (this.getHostGeoModel() || this).option.map;
  16556. },
  16557. getRawValue: function (t) {
  16558. var e = this.getData();
  16559. return e.get(e.mapDimension("value"), t);
  16560. },
  16561. getRegionModel: function (t) {
  16562. var e = this.getData();
  16563. return e.getItemModel(e.indexOfName(t));
  16564. },
  16565. formatTooltip: function (t) {
  16566. for (var e = this.getData(), i = Mo(this.getRawValue(t)), n = e.getName(t), r = this.seriesGroup, a = [], o = 0; o < r.length; o++) {
  16567. var s = r[o].originalData.indexOfName(n),
  16568. l = e.mapDimension("value");
  16569. isNaN(r[o].originalData.get(l, s)) || a.push(To(r[o].name));
  16570. }
  16571. return a.join(", ") + "<br />" + To(n + " : " + i);
  16572. },
  16573. getTooltipPosition: function (t) {
  16574. if (null != t) {
  16575. var e = this.getData().getName(t),
  16576. i = this.coordinateSystem,
  16577. n = i.getRegion(e);
  16578. return n && i.dataToPoint(n.center);
  16579. }
  16580. },
  16581. setZoom: function (t) {
  16582. this.option.zoom = t;
  16583. },
  16584. setCenter: function (t) {
  16585. this.option.center = t;
  16586. },
  16587. defaultOption: {
  16588. zlevel: 0,
  16589. z: 2,
  16590. coordinateSystem: "geo",
  16591. map: "",
  16592. left: "center",
  16593. top: "center",
  16594. aspectScale: .75,
  16595. showLegendSymbol: !0,
  16596. dataRangeHoverLink: !0,
  16597. boundingCoords: null,
  16598. center: null,
  16599. zoom: 1,
  16600. scaleLimit: null,
  16601. label: {
  16602. show: !1,
  16603. color: "#000"
  16604. },
  16605. itemStyle: {
  16606. borderWidth: .5,
  16607. borderColor: "#444",
  16608. areaColor: "#eee"
  16609. },
  16610. emphasis: {
  16611. label: {
  16612. show: !0,
  16613. color: "rgb(100,0,0)"
  16614. },
  16615. itemStyle: {
  16616. areaColor: "rgba(255,215,0,0.8)"
  16617. }
  16618. }
  16619. }
  16620. });
  16621. c(sI, OM);
  16622. var lI = "\x00_ec_interaction_mutex";
  16623. uu({
  16624. type: "takeGlobalCursor",
  16625. event: "globalCursorTaken",
  16626. update: "update"
  16627. }, function () {}), c(kd, Yg);
  16628. var uI = {
  16629. axisPointer: 1,
  16630. tooltip: 1,
  16631. brush: 1
  16632. };
  16633. Xd.prototype = {
  16634. constructor: Xd,
  16635. draw: function (t, e, i, n) {
  16636. var r = "geo" === t.mainType,
  16637. a = t.getData && t.getData();
  16638. r && e.eachComponent({
  16639. mainType: "series",
  16640. subType: "map"
  16641. }, function (e) {
  16642. a || e.getHostGeoModel() !== t || (a = e.getData());
  16643. });
  16644. var o = t.coordinateSystem;
  16645. this._updateBackground(o);
  16646. var s = this._regionsGroup,
  16647. l = this.group;
  16648. o._roamTransformable.transform && (l.transform = o._roamTransformable.transform.slice(), l.decomposeTransform());
  16649. var u = o._rawTransformable.scale,
  16650. h = o._rawTransformable.position;
  16651. s.removeAll();
  16652. var c = ["itemStyle"],
  16653. d = ["emphasis", "itemStyle"],
  16654. p = ["label"],
  16655. g = ["emphasis", "label"],
  16656. m = N();
  16657. f(o.regions, function (e) {
  16658. var i = m.get(e.name) || m.set(e.name, new Bm()),
  16659. n = new g_({
  16660. segmentIgnoreThreshold: 1,
  16661. shape: {
  16662. paths: []
  16663. }
  16664. });
  16665. i.add(n);
  16666. var o,
  16667. v = t.getRegionModel(e.name) || t,
  16668. y = v.getModel(c),
  16669. _ = v.getModel(d),
  16670. x = Hd(y),
  16671. w = Hd(_),
  16672. b = v.getModel(p),
  16673. S = v.getModel(g);
  16674. if (a) {
  16675. o = a.indexOfName(e.name);
  16676. var M = a.getItemVisual(o, "color", !0);
  16677. M && (x.fill = M);
  16678. }
  16679. var I = function (t) {
  16680. return [t[0] * u[0] + h[0], t[1] * u[1] + h[1]];
  16681. };
  16682. f(e.geometries, function (t) {
  16683. if ("polygon" === t.type) {
  16684. for (var e = [], i = 0; i < t.exterior.length; ++i) e.push(I(t.exterior[i]));
  16685. n.shape.paths.push(new a_({
  16686. segmentIgnoreThreshold: 1,
  16687. shape: {
  16688. points: e
  16689. }
  16690. }));
  16691. for (var i = 0; i < (t.interiors ? t.interiors.length : 0); ++i) {
  16692. for (var r = t.interiors[i], e = [], a = 0; a < r.length; ++a) e.push(I(r[a]));
  16693. n.shape.paths.push(new a_({
  16694. segmentIgnoreThreshold: 1,
  16695. shape: {
  16696. points: e
  16697. }
  16698. }));
  16699. }
  16700. }
  16701. }), n.setStyle(x), n.style.strokeNoScale = !0, n.culling = !0;
  16702. var T = b.get("show"),
  16703. C = S.get("show"),
  16704. D = a && isNaN(a.get(a.mapDimension("value"), o)),
  16705. A = a && a.getItemLayout(o);
  16706. if (r || D && (T || C) || A && A.showLabel) {
  16707. var k,
  16708. P = r ? e.name : o;
  16709. (!a || o >= 0) && (k = t);
  16710. var L = new $y({
  16711. position: I(e.center.slice()),
  16712. scale: [1 / l.scale[0], 1 / l.scale[1]],
  16713. z2: 10,
  16714. silent: !0
  16715. });
  16716. Da(L.style, L.hoverStyle = {}, b, S, {
  16717. labelFetcher: k,
  16718. labelDataIndex: P,
  16719. defaultText: e.name,
  16720. useInsideStyle: !1
  16721. }, {
  16722. textAlign: "center",
  16723. textVerticalAlign: "middle"
  16724. }), i.add(L);
  16725. }
  16726. if (a) a.setItemGraphicEl(o, i);else {
  16727. var v = t.getRegionModel(e.name);
  16728. n.eventData = {
  16729. componentType: "geo",
  16730. componentIndex: t.componentIndex,
  16731. geoIndex: t.componentIndex,
  16732. name: e.name,
  16733. region: v && v.option || {}
  16734. };
  16735. }
  16736. var O = i.__regions || (i.__regions = []);
  16737. O.push(e), i.highDownSilentOnTouch = !!t.get("selectedMode"), Ma(i, w), s.add(i);
  16738. }), this._updateController(t, e, i), Wd(this, t, s, i, n), Ud(t, s);
  16739. },
  16740. remove: function () {
  16741. this._regionsGroup.removeAll(), this._backgroundGroup.removeAll(), this._controller.dispose(), this._mapName && oI.removeGraphic(this._mapName, this.uid), this._mapName = null, this._controllerHost = {};
  16742. },
  16743. _updateBackground: function (t) {
  16744. var e = t.map;
  16745. this._mapName !== e && f(oI.makeGraphic(e, this.uid), function (t) {
  16746. this._backgroundGroup.add(t);
  16747. }, this), this._mapName = e;
  16748. },
  16749. _updateController: function (t, e, i) {
  16750. function n() {
  16751. var e = {
  16752. type: "geoRoam",
  16753. componentType: l
  16754. };
  16755. return e[l + "Id"] = t.id, e;
  16756. }
  16757. var r = t.coordinateSystem,
  16758. a = this._controller,
  16759. s = this._controllerHost;
  16760. s.zoomLimit = t.get("scaleLimit"), s.zoom = r.getZoom(), a.enable(t.get("roam") || !1);
  16761. var l = t.mainType;
  16762. a.off("pan").on("pan", function (t) {
  16763. this._mouseDownFlag = !1, Fd(s, t.dx, t.dy), i.dispatchAction(o(n(), {
  16764. dx: t.dx,
  16765. dy: t.dy
  16766. }));
  16767. }, this), a.off("zoom").on("zoom", function (t) {
  16768. if (this._mouseDownFlag = !1, Gd(s, t.scale, t.originX, t.originY), i.dispatchAction(o(n(), {
  16769. zoom: t.scale,
  16770. originX: t.originX,
  16771. originY: t.originY
  16772. })), this._updateGroup) {
  16773. var e = this.group.scale;
  16774. this._regionsGroup.traverse(function (t) {
  16775. "text" === t.type && t.attr("scale", [1 / e[0], 1 / e[1]]);
  16776. });
  16777. }
  16778. }, this), a.setPointerChecker(function (e, n, a) {
  16779. return r.getViewRectAfterRoam().contain(n, a) && !Vd(e, i, t);
  16780. });
  16781. }
  16782. };
  16783. var hI = "__seriesMapHighDown",
  16784. cI = "__seriesMapCallKey";
  16785. _u({
  16786. type: "map",
  16787. render: function (t, e, i, n) {
  16788. if (!n || "mapToggleSelect" !== n.type || n.from !== this.uid) {
  16789. var r = this.group;
  16790. if (r.removeAll(), !t.getHostGeoModel()) {
  16791. if (n && "geoRoam" === n.type && "series" === n.componentType && n.seriesId === t.id) {
  16792. var a = this._mapDraw;
  16793. a && r.add(a.group);
  16794. } else if (t.needsDrawMap) {
  16795. var a = this._mapDraw || new Xd(i, !0);
  16796. r.add(a.group), a.draw(t, e, i, this, n), this._mapDraw = a;
  16797. } else this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
  16798. t.get("showLegendSymbol") && e.getComponent("legend") && this._renderSymbols(t, e, i);
  16799. }
  16800. }
  16801. },
  16802. remove: function () {
  16803. this._mapDraw && this._mapDraw.remove(), this._mapDraw = null, this.group.removeAll();
  16804. },
  16805. dispose: function () {
  16806. this._mapDraw && this._mapDraw.remove(), this._mapDraw = null;
  16807. },
  16808. _renderSymbols: function (t) {
  16809. var e = t.originalData,
  16810. i = this.group;
  16811. e.each(e.mapDimension("value"), function (n, r) {
  16812. if (!isNaN(n)) {
  16813. var a = e.getItemLayout(r);
  16814. if (a && a.point) {
  16815. var s = a.point,
  16816. l = a.offset,
  16817. u = new Qy({
  16818. style: {
  16819. fill: t.getData().getVisual("color")
  16820. },
  16821. shape: {
  16822. cx: s[0] + 9 * l,
  16823. cy: s[1],
  16824. r: 3
  16825. },
  16826. silent: !0,
  16827. z2: 8 + (l ? 0 : S_ + 1)
  16828. });
  16829. if (!l) {
  16830. var h = t.mainSeries.getData(),
  16831. c = e.getName(r),
  16832. d = h.indexOfName(c),
  16833. f = e.getItemModel(r),
  16834. p = f.getModel("label"),
  16835. g = f.getModel("emphasis.label"),
  16836. m = h.getItemGraphicEl(d),
  16837. v = A(t.getFormattedLabel(d, "normal"), c),
  16838. y = A(t.getFormattedLabel(d, "emphasis"), v),
  16839. x = m[hI],
  16840. w = Math.random();
  16841. if (!x) {
  16842. x = m[hI] = {};
  16843. var b = _(Yd, !0),
  16844. S = _(Yd, !1);
  16845. m.on("mouseover", b).on("mouseout", S).on("emphasis", b).on("normal", S);
  16846. }
  16847. m[cI] = w, o(x, {
  16848. recordVersion: w,
  16849. circle: u,
  16850. labelModel: p,
  16851. hoverLabelModel: g,
  16852. emphasisText: y,
  16853. normalText: v
  16854. }), jd(x, !1);
  16855. }
  16856. i.add(u);
  16857. }
  16858. }
  16859. });
  16860. }
  16861. }), uu({
  16862. type: "geoRoam",
  16863. event: "geoRoam",
  16864. update: "updateTransform"
  16865. }, function (t, e) {
  16866. var i = t.componentType || "series";
  16867. e.eachComponent({
  16868. mainType: i,
  16869. query: t
  16870. }, function (e) {
  16871. var n = e.coordinateSystem;
  16872. if ("geo" === n.type) {
  16873. var r = qd(n, t, e.get("scaleLimit"));
  16874. e.setCenter && e.setCenter(r.center), e.setZoom && e.setZoom(r.zoom), "series" === i && f(e.seriesGroup, function (t) {
  16875. t.setCenter(r.center), t.setZoom(r.zoom);
  16876. });
  16877. }
  16878. });
  16879. });
  16880. var dI = ae;
  16881. c(Zd, lm), Kd.prototype = {
  16882. constructor: Kd,
  16883. type: "view",
  16884. dimensions: ["x", "y"],
  16885. setBoundingRect: function (t, e, i, n) {
  16886. return this._rect = new wi(t, e, i, n), this._rect;
  16887. },
  16888. getBoundingRect: function () {
  16889. return this._rect;
  16890. },
  16891. setViewRect: function (t, e, i, n) {
  16892. this.transformTo(t, e, i, n), this._viewRect = new wi(t, e, i, n);
  16893. },
  16894. transformTo: function (t, e, i, n) {
  16895. var r = this.getBoundingRect(),
  16896. a = this._rawTransformable;
  16897. a.transform = r.calculateTransform(new wi(t, e, i, n)), a.decomposeTransform(), this._updateTransform();
  16898. },
  16899. setCenter: function (t) {
  16900. t && (this._center = t, this._updateCenterAndZoom());
  16901. },
  16902. setZoom: function (t) {
  16903. t = t || 1;
  16904. var e = this.zoomLimit;
  16905. e && (null != e.max && (t = Math.min(e.max, t)), null != e.min && (t = Math.max(e.min, t))), this._zoom = t, this._updateCenterAndZoom();
  16906. },
  16907. getDefaultCenter: function () {
  16908. var t = this.getBoundingRect(),
  16909. e = t.x + t.width / 2,
  16910. i = t.y + t.height / 2;
  16911. return [e, i];
  16912. },
  16913. getCenter: function () {
  16914. return this._center || this.getDefaultCenter();
  16915. },
  16916. getZoom: function () {
  16917. return this._zoom || 1;
  16918. },
  16919. getRoamTransform: function () {
  16920. return this._roamTransformable.getLocalTransform();
  16921. },
  16922. _updateCenterAndZoom: function () {
  16923. var t = this._rawTransformable.getLocalTransform(),
  16924. e = this._roamTransformable,
  16925. i = this.getDefaultCenter(),
  16926. n = this.getCenter(),
  16927. r = this.getZoom();
  16928. n = ae([], n, t), i = ae([], i, t), e.origin = n, e.position = [i[0] - n[0], i[1] - n[1]], e.scale = [r, r], this._updateTransform();
  16929. },
  16930. _updateTransform: function () {
  16931. var t = this._roamTransformable,
  16932. e = this._rawTransformable;
  16933. e.parent = t, t.updateTransform(), e.updateTransform(), ke(this.transform || (this.transform = []), e.transform || De()), this._rawTransform = e.getLocalTransform(), this.invTransform = this.invTransform || [], Ee(this.invTransform, this.transform), this.decomposeTransform();
  16934. },
  16935. getViewRect: function () {
  16936. return this._viewRect;
  16937. },
  16938. getViewRectAfterRoam: function () {
  16939. var t = this.getBoundingRect().clone();
  16940. return t.applyTransform(this.transform), t;
  16941. },
  16942. dataToPoint: function (t, e, i) {
  16943. var n = e ? this._rawTransform : this.transform;
  16944. return i = i || [], n ? dI(i, t, n) : H(i, t);
  16945. },
  16946. pointToData: function (t) {
  16947. var e = this.invTransform;
  16948. return e ? dI([], t, e) : [t[0], t[1]];
  16949. },
  16950. convertToPixel: _($d, "dataToPoint"),
  16951. convertFromPixel: _($d, "pointToData"),
  16952. containPoint: function (t) {
  16953. return this.getViewRectAfterRoam().contain(t[0], t[1]);
  16954. }
  16955. }, c(Kd, lm), Qd.prototype = {
  16956. constructor: Qd,
  16957. type: "geo",
  16958. dimensions: ["lng", "lat"],
  16959. containCoord: function (t) {
  16960. for (var e = this.regions, i = 0; i < e.length; i++) if (e[i].contain(t)) return !0;
  16961. return !1;
  16962. },
  16963. transformTo: function (t, e, i, n) {
  16964. var r = this.getBoundingRect(),
  16965. a = this._invertLongitute;
  16966. r = r.clone(), a && (r.y = -r.y - r.height);
  16967. var o = this._rawTransformable;
  16968. if (o.transform = r.calculateTransform(new wi(t, e, i, n)), o.decomposeTransform(), a) {
  16969. var s = o.scale;
  16970. s[1] = -s[1];
  16971. }
  16972. o.updateTransform(), this._updateTransform();
  16973. },
  16974. getRegion: function (t) {
  16975. return this._regionsMap.get(t);
  16976. },
  16977. getRegionByCoord: function (t) {
  16978. for (var e = this.regions, i = 0; i < e.length; i++) if (e[i].contain(t)) return e[i];
  16979. },
  16980. addGeoCoord: function (t, e) {
  16981. this._nameCoordMap.set(t, e);
  16982. },
  16983. getGeoCoord: function (t) {
  16984. return this._nameCoordMap.get(t);
  16985. },
  16986. getBoundingRect: function () {
  16987. return this._rect;
  16988. },
  16989. dataToPoint: function (t, e, i) {
  16990. return "string" == typeof t && (t = this.getGeoCoord(t)), t ? Kd.prototype.dataToPoint.call(this, t, e, i) : void 0;
  16991. },
  16992. convertToPixel: _(Jd, "dataToPoint"),
  16993. convertFromPixel: _(Jd, "pointToData")
  16994. }, c(Qd, Kd);
  16995. var fI = {
  16996. dimensions: Qd.prototype.dimensions,
  16997. create: function (t, e) {
  16998. var i = [];
  16999. t.eachComponent("geo", function (t, n) {
  17000. var r = t.get("map"),
  17001. a = t.get("aspectScale"),
  17002. o = !0,
  17003. s = kw.retrieveMap(r);
  17004. s && s[0] && "svg" === s[0].type ? (null == a && (a = 1), o = !1) : null == a && (a = .75);
  17005. var l = new Qd(r + n, r, t.get("nameMap"), o);
  17006. l.aspectScale = a, l.zoomLimit = t.get("scaleLimit"), i.push(l), ef(l, t), t.coordinateSystem = l, l.model = t, l.resize = tf, l.resize(t, e);
  17007. }), t.eachSeries(function (t) {
  17008. var e = t.get("coordinateSystem");
  17009. if ("geo" === e) {
  17010. var n = t.get("geoIndex") || 0;
  17011. t.coordinateSystem = i[n];
  17012. }
  17013. });
  17014. var n = {};
  17015. return t.eachSeriesByType("map", function (t) {
  17016. if (!t.getHostGeoModel()) {
  17017. var e = t.getMapType();
  17018. n[e] = n[e] || [], n[e].push(t);
  17019. }
  17020. }), f(n, function (t, n) {
  17021. var r = p(t, function (t) {
  17022. return t.get("nameMap");
  17023. }),
  17024. o = new Qd(n, n, a(r));
  17025. o.zoomLimit = D.apply(null, p(t, function (t) {
  17026. return t.get("scaleLimit");
  17027. })), i.push(o), o.resize = tf, o.aspectScale = t[0].get("aspectScale"), o.resize(t[0], e), f(t, function (t) {
  17028. t.coordinateSystem = o, ef(o, t);
  17029. });
  17030. }), i;
  17031. },
  17032. getFilledRegions: function (t, e, i) {
  17033. for (var n = (t || []).slice(), r = N(), a = 0; a < n.length; a++) r.set(n[a].name, n[a]);
  17034. var o = oI.load(e, i);
  17035. return f(o.regions, function (t) {
  17036. var e = t.name;
  17037. !r.get(e) && n.push({
  17038. name: e
  17039. });
  17040. }), n;
  17041. }
  17042. };
  17043. hu("geo", fI);
  17044. var pI = function (t) {
  17045. var e = {};
  17046. t.eachSeriesByType("map", function (i) {
  17047. var n = i.getMapType();
  17048. if (!i.getHostGeoModel() && !e[n]) {
  17049. var r = {};
  17050. f(i.seriesGroup, function (e) {
  17051. var i = e.coordinateSystem,
  17052. n = e.originalData;
  17053. e.get("showLegendSymbol") && t.getComponent("legend") && n.each(n.mapDimension("value"), function (t, e) {
  17054. var a = n.getName(e),
  17055. o = i.getRegion(a);
  17056. if (o && !isNaN(t)) {
  17057. var s = r[a] || 0,
  17058. l = i.dataToPoint(o.center);
  17059. r[a] = s + 1, n.setItemLayout(e, {
  17060. point: l,
  17061. offset: s
  17062. });
  17063. }
  17064. });
  17065. });
  17066. var a = i.getData();
  17067. a.each(function (t) {
  17068. var e = a.getName(t),
  17069. i = a.getItemLayout(t) || {};
  17070. i.showLabel = !r[e], a.setItemLayout(t, i);
  17071. }), e[n] = !0;
  17072. }
  17073. });
  17074. },
  17075. gI = function (t) {
  17076. t.eachSeriesByType("map", function (t) {
  17077. var e = t.get("color"),
  17078. i = t.getModel("itemStyle"),
  17079. n = i.get("areaColor"),
  17080. r = i.get("color") || e[t.seriesIndex % e.length];
  17081. t.getData().setVisual({
  17082. areaColor: n,
  17083. color: r
  17084. });
  17085. });
  17086. },
  17087. mI = function (t) {
  17088. var e = {};
  17089. t.eachSeriesByType("map", function (t) {
  17090. var i = t.getHostGeoModel(),
  17091. n = i ? "o" + i.id : "i" + t.getMapType();
  17092. (e[n] = e[n] || []).push(t);
  17093. }), f(e, function (t) {
  17094. for (var e = nf(p(t, function (t) {
  17095. return t.getData();
  17096. }), t[0].get("mapValueCalculation")), i = 0; i < t.length; i++) t[i].originalData = t[i].getData();
  17097. for (var i = 0; i < t.length; i++) t[i].seriesGroup = t, t[i].needsDrawMap = 0 === i && !t[i].getHostGeoModel(), t[i].setData(e.cloneShallow()), t[i].mainSeries = t[0];
  17098. });
  17099. },
  17100. vI = function (t) {
  17101. var e = [];
  17102. f(t.series, function (t) {
  17103. t && "map" === t.type && (e.push(t), t.map = t.map || t.mapType, s(t, t.mapLocation));
  17104. });
  17105. };
  17106. du(pI), fu(gI), su($w.PROCESSOR.STATISTIC, mI), ou(vI), RM("map", [{
  17107. type: "mapToggleSelect",
  17108. event: "mapselectchanged",
  17109. method: "toggleSelected"
  17110. }, {
  17111. type: "mapSelect",
  17112. event: "mapselected",
  17113. method: "select"
  17114. }, {
  17115. type: "mapUnSelect",
  17116. event: "mapunselected",
  17117. method: "unSelect"
  17118. }]);
  17119. var yI = (jx.extend({
  17120. type: "series.gauge",
  17121. getInitialData: function () {
  17122. return LM(this, ["value"]);
  17123. },
  17124. defaultOption: {
  17125. zlevel: 0,
  17126. z: 2,
  17127. center: ["50%", "50%"],
  17128. legendHoverLink: !0,
  17129. radius: "75%",
  17130. startAngle: 225,
  17131. endAngle: -45,
  17132. clockwise: !0,
  17133. min: 0,
  17134. max: 100,
  17135. splitNumber: 10,
  17136. axisLine: {
  17137. show: !0,
  17138. lineStyle: {
  17139. color: [[.2, "#91c7ae"], [.8, "#63869e"], [1, "#c23531"]],
  17140. width: 30
  17141. }
  17142. },
  17143. splitLine: {
  17144. show: !0,
  17145. length: 30,
  17146. lineStyle: {
  17147. color: "#eee",
  17148. width: 2,
  17149. type: "solid"
  17150. }
  17151. },
  17152. axisTick: {
  17153. show: !0,
  17154. splitNumber: 5,
  17155. length: 8,
  17156. lineStyle: {
  17157. color: "#eee",
  17158. width: 1,
  17159. type: "solid"
  17160. }
  17161. },
  17162. axisLabel: {
  17163. show: !0,
  17164. distance: 5,
  17165. color: "auto"
  17166. },
  17167. pointer: {
  17168. show: !0,
  17169. length: "80%",
  17170. width: 8
  17171. },
  17172. itemStyle: {
  17173. color: "auto"
  17174. },
  17175. title: {
  17176. show: !0,
  17177. offsetCenter: [0, "-40%"],
  17178. color: "#333",
  17179. fontSize: 15
  17180. },
  17181. detail: {
  17182. show: !0,
  17183. backgroundColor: "rgba(0,0,0,0)",
  17184. borderWidth: 0,
  17185. borderColor: "#ccc",
  17186. width: 100,
  17187. height: null,
  17188. padding: [5, 10],
  17189. offsetCenter: [0, "40%"],
  17190. color: "auto",
  17191. fontSize: 30
  17192. }
  17193. }
  17194. }), Vr.extend({
  17195. type: "echartsGaugePointer",
  17196. shape: {
  17197. angle: 0,
  17198. width: 10,
  17199. r: 10,
  17200. x: 0,
  17201. y: 0
  17202. },
  17203. buildPath: function (t, e) {
  17204. var i = Math.cos,
  17205. n = Math.sin,
  17206. r = e.r,
  17207. a = e.width,
  17208. o = e.angle,
  17209. s = e.x - i(o) * a * (a >= r / 3 ? 1 : 2),
  17210. l = e.y - n(o) * a * (a >= r / 3 ? 1 : 2);
  17211. o = e.angle - Math.PI / 2, t.moveTo(s, l), t.lineTo(e.x + i(o) * a, e.y + n(o) * a), t.lineTo(e.x + i(e.angle) * r, e.y + n(e.angle) * r), t.lineTo(e.x - i(o) * a, e.y - n(o) * a), t.lineTo(s, l);
  17212. }
  17213. })),
  17214. _I = 2 * Math.PI,
  17215. xI = ($s.extend({
  17216. type: "gauge",
  17217. render: function (t, e, i) {
  17218. this.group.removeAll();
  17219. var n = t.get("axisLine.lineStyle.color"),
  17220. r = rf(t, i);
  17221. this._renderMain(t, e, i, n, r);
  17222. },
  17223. dispose: function () {},
  17224. _renderMain: function (t, e, i, n, r) {
  17225. for (var a = this.group, o = t.getModel("axisLine"), s = o.getModel("lineStyle"), l = t.get("clockwise"), u = -t.get("startAngle") / 180 * Math.PI, h = -t.get("endAngle") / 180 * Math.PI, c = (h - u) % _I, d = u, f = s.get("width"), p = o.get("show"), g = 0; p && g < n.length; g++) {
  17226. var m = Math.min(Math.max(n[g][0], 0), 1),
  17227. h = u + c * m,
  17228. v = new e_({
  17229. shape: {
  17230. startAngle: d,
  17231. endAngle: h,
  17232. cx: r.cx,
  17233. cy: r.cy,
  17234. clockwise: l,
  17235. r0: r.r - f,
  17236. r: r.r
  17237. },
  17238. silent: !0
  17239. });
  17240. v.setStyle({
  17241. fill: n[g][1]
  17242. }), v.setStyle(s.getLineStyle(["color", "borderWidth", "borderColor"])), a.add(v), d = h;
  17243. }
  17244. var y = function (t) {
  17245. if (0 >= t) return n[0][1];
  17246. for (var e = 0; e < n.length; e++) if (n[e][0] >= t && (0 === e ? 0 : n[e - 1][0]) < t) return n[e][1];
  17247. return n[e - 1][1];
  17248. };
  17249. if (!l) {
  17250. var _ = u;
  17251. u = h, h = _;
  17252. }
  17253. this._renderTicks(t, e, i, y, r, u, h, l), this._renderPointer(t, e, i, y, r, u, h, l), this._renderTitle(t, e, i, y, r), this._renderDetail(t, e, i, y, r);
  17254. },
  17255. _renderTicks: function (t, e, i, n, r, a, o) {
  17256. for (var s = this.group, l = r.cx, u = r.cy, h = r.r, c = +t.get("min"), d = +t.get("max"), f = t.getModel("splitLine"), p = t.getModel("axisTick"), g = t.getModel("axisLabel"), m = t.get("splitNumber"), v = p.get("splitNumber"), y = so(f.get("length"), h), _ = so(p.get("length"), h), x = a, w = (o - a) / m, b = w / v, S = f.getModel("lineStyle").getLineStyle(), M = p.getModel("lineStyle").getLineStyle(), I = 0; m >= I; I++) {
  17257. var T = Math.cos(x),
  17258. C = Math.sin(x);
  17259. if (f.get("show")) {
  17260. var D = new c_({
  17261. shape: {
  17262. x1: T * h + l,
  17263. y1: C * h + u,
  17264. x2: T * (h - y) + l,
  17265. y2: C * (h - y) + u
  17266. },
  17267. style: S,
  17268. silent: !0
  17269. });
  17270. "auto" === S.stroke && D.setStyle({
  17271. stroke: n(I / m)
  17272. }), s.add(D);
  17273. }
  17274. if (g.get("show")) {
  17275. var A = af(lo(I / m * (d - c) + c), g.get("formatter")),
  17276. k = g.get("distance"),
  17277. P = n(I / m);
  17278. s.add(new $y({
  17279. style: ka({}, g, {
  17280. text: A,
  17281. x: T * (h - y - k) + l,
  17282. y: C * (h - y - k) + u,
  17283. textVerticalAlign: -.4 > C ? "top" : C > .4 ? "bottom" : "middle",
  17284. textAlign: -.4 > T ? "left" : T > .4 ? "right" : "center"
  17285. }, {
  17286. autoColor: P
  17287. }),
  17288. silent: !0
  17289. }));
  17290. }
  17291. if (p.get("show") && I !== m) {
  17292. for (var L = 0; v >= L; L++) {
  17293. var T = Math.cos(x),
  17294. C = Math.sin(x),
  17295. O = new c_({
  17296. shape: {
  17297. x1: T * h + l,
  17298. y1: C * h + u,
  17299. x2: T * (h - _) + l,
  17300. y2: C * (h - _) + u
  17301. },
  17302. silent: !0,
  17303. style: M
  17304. });
  17305. "auto" === M.stroke && O.setStyle({
  17306. stroke: n((I + L / v) / m)
  17307. }), s.add(O), x += b;
  17308. }
  17309. x -= b;
  17310. } else x += w;
  17311. }
  17312. },
  17313. _renderPointer: function (t, e, i, n, r, a, o) {
  17314. var s = this.group,
  17315. l = this._data;
  17316. if (!t.get("pointer.show")) return void (l && l.eachItemGraphicEl(function (t) {
  17317. s.remove(t);
  17318. }));
  17319. var u = [+t.get("min"), +t.get("max")],
  17320. h = [a, o],
  17321. c = t.getData(),
  17322. d = c.mapDimension("value");
  17323. c.diff(l).add(function (e) {
  17324. var i = new yI({
  17325. shape: {
  17326. angle: a
  17327. }
  17328. });
  17329. Va(i, {
  17330. shape: {
  17331. angle: oo(c.get(d, e), u, h, !0)
  17332. }
  17333. }, t), s.add(i), c.setItemGraphicEl(e, i);
  17334. }).update(function (e, i) {
  17335. var n = l.getItemGraphicEl(i);
  17336. Ga(n, {
  17337. shape: {
  17338. angle: oo(c.get(d, e), u, h, !0)
  17339. }
  17340. }, t), s.add(n), c.setItemGraphicEl(e, n);
  17341. }).remove(function (t) {
  17342. var e = l.getItemGraphicEl(t);
  17343. s.remove(e);
  17344. }).execute(), c.eachItemGraphicEl(function (t, e) {
  17345. var i = c.getItemModel(e),
  17346. a = i.getModel("pointer");
  17347. t.setShape({
  17348. x: r.cx,
  17349. y: r.cy,
  17350. width: so(a.get("width"), r.r),
  17351. r: so(a.get("length"), r.r)
  17352. }), t.useStyle(i.getModel("itemStyle").getItemStyle()), "auto" === t.style.fill && t.setStyle("fill", n(oo(c.get(d, e), u, [0, 1], !0))), Ma(t, i.getModel("emphasis.itemStyle").getItemStyle());
  17353. }), this._data = c;
  17354. },
  17355. _renderTitle: function (t, e, i, n, r) {
  17356. var a = t.getData(),
  17357. o = a.mapDimension("value"),
  17358. s = t.getModel("title");
  17359. if (s.get("show")) {
  17360. var l = s.get("offsetCenter"),
  17361. u = r.cx + so(l[0], r.r),
  17362. h = r.cy + so(l[1], r.r),
  17363. c = +t.get("min"),
  17364. d = +t.get("max"),
  17365. f = t.getData().get(o, 0),
  17366. p = n(oo(f, [c, d], [0, 1], !0));
  17367. this.group.add(new $y({
  17368. silent: !0,
  17369. style: ka({}, s, {
  17370. x: u,
  17371. y: h,
  17372. text: a.getName(0),
  17373. textAlign: "center",
  17374. textVerticalAlign: "middle"
  17375. }, {
  17376. autoColor: p,
  17377. forceRich: !0
  17378. })
  17379. }));
  17380. }
  17381. },
  17382. _renderDetail: function (t, e, i, n, r) {
  17383. var a = t.getModel("detail"),
  17384. o = +t.get("min"),
  17385. s = +t.get("max");
  17386. if (a.get("show")) {
  17387. var l = a.get("offsetCenter"),
  17388. u = r.cx + so(l[0], r.r),
  17389. h = r.cy + so(l[1], r.r),
  17390. c = so(a.get("width"), r.r),
  17391. d = so(a.get("height"), r.r),
  17392. f = t.getData(),
  17393. p = f.get(f.mapDimension("value"), 0),
  17394. g = n(oo(p, [o, s], [0, 1], !0));
  17395. this.group.add(new $y({
  17396. silent: !0,
  17397. style: ka({}, a, {
  17398. x: u,
  17399. y: h,
  17400. text: af(p, a.get("formatter")),
  17401. textWidth: isNaN(c) ? null : c,
  17402. textHeight: isNaN(d) ? null : d,
  17403. textAlign: "center",
  17404. textVerticalAlign: "middle"
  17405. }, {
  17406. autoColor: g,
  17407. forceRich: !0
  17408. })
  17409. }));
  17410. }
  17411. }
  17412. }), ax.extend({
  17413. type: "geo",
  17414. coordinateSystem: null,
  17415. layoutMode: "box",
  17416. init: function (t) {
  17417. ax.prototype.init.apply(this, arguments), Vn(t, "label", ["show"]);
  17418. },
  17419. optionUpdated: function () {
  17420. var t = this.option,
  17421. e = this;
  17422. t.regions = fI.getFilledRegions(t.regions, t.map, t.nameMap), this._optionModelMap = g(t.regions || [], function (t, i) {
  17423. return i.name && t.set(i.name, new Ja(i, e)), t;
  17424. }, N()), this.updateSelectedMap(t.regions);
  17425. },
  17426. defaultOption: {
  17427. zlevel: 0,
  17428. z: 0,
  17429. show: !0,
  17430. left: "center",
  17431. top: "center",
  17432. aspectScale: null,
  17433. silent: !1,
  17434. map: "",
  17435. boundingCoords: null,
  17436. center: null,
  17437. zoom: 1,
  17438. scaleLimit: null,
  17439. label: {
  17440. show: !1,
  17441. color: "#000"
  17442. },
  17443. itemStyle: {
  17444. borderWidth: .5,
  17445. borderColor: "#444",
  17446. color: "#eee"
  17447. },
  17448. emphasis: {
  17449. label: {
  17450. show: !0,
  17451. color: "rgb(100,0,0)"
  17452. },
  17453. itemStyle: {
  17454. color: "rgba(255,215,0,0.8)"
  17455. }
  17456. },
  17457. regions: []
  17458. },
  17459. getRegionModel: function (t) {
  17460. return this._optionModelMap.get(t) || new Ja(null, this, this.ecModel);
  17461. },
  17462. getFormattedLabel: function (t, e) {
  17463. var i = this.getRegionModel(t),
  17464. n = i.get("label" + ("normal" === e ? "." : e + ".") + "formatter"),
  17465. r = {
  17466. name: t
  17467. };
  17468. return "function" == typeof n ? (r.status = e, n(r)) : "string" == typeof n ? n.replace("{a}", null != t ? t : "") : void 0;
  17469. },
  17470. setZoom: function (t) {
  17471. this.option.zoom = t;
  17472. },
  17473. setCenter: function (t) {
  17474. this.option.center = t;
  17475. }
  17476. }));
  17477. c(xI, OM), vu({
  17478. type: "geo",
  17479. init: function (t, e) {
  17480. var i = new Xd(e, !0);
  17481. this._mapDraw = i, this.group.add(i.group);
  17482. },
  17483. render: function (t, e, i, n) {
  17484. if (!n || "geoToggleSelect" !== n.type || n.from !== this.uid) {
  17485. var r = this._mapDraw;
  17486. t.get("show") ? r.draw(t, e, i, this, n) : this._mapDraw.group.removeAll(), this.group.silent = t.get("silent");
  17487. }
  17488. },
  17489. dispose: function () {
  17490. this._mapDraw && this._mapDraw.remove();
  17491. }
  17492. }), of("toggleSelected", {
  17493. type: "geoToggleSelect",
  17494. event: "geoselectchanged"
  17495. }), of("select", {
  17496. type: "geoSelect",
  17497. event: "geoselected"
  17498. }), of("unSelect", {
  17499. type: "geoUnSelect",
  17500. event: "geounselected"
  17501. });
  17502. var wI = function (t, e, i, n, r) {
  17503. MS.call(this, t, e, i), this.type = n || "value", this.position = r || "bottom", this.orient = null;
  17504. };
  17505. wI.prototype = {
  17506. constructor: wI,
  17507. model: null,
  17508. isHorizontal: function () {
  17509. var t = this.position;
  17510. return "top" === t || "bottom" === t;
  17511. },
  17512. pointToData: function (t, e) {
  17513. return this.coordinateSystem.pointToData(t, e)[0];
  17514. },
  17515. toGlobalCoord: null,
  17516. toLocalCoord: null
  17517. }, h(wI, MS), sf.prototype = {
  17518. type: "singleAxis",
  17519. axisPointerEnabled: !0,
  17520. constructor: sf,
  17521. _init: function (t) {
  17522. var e = this.dimension,
  17523. i = new wI(e, bh(t), [0, 0], t.get("type"), t.get("position")),
  17524. n = "category" === i.type;
  17525. i.onBand = n && t.get("boundaryGap"), i.inverse = t.get("inverse"), i.orient = t.get("orient"), t.axis = i, i.model = t, i.coordinateSystem = this, this._axis = i;
  17526. },
  17527. update: function (t) {
  17528. t.eachSeries(function (t) {
  17529. if (t.coordinateSystem === this) {
  17530. var e = t.getData();
  17531. f(e.mapDimension(this.dimension, !0), function (t) {
  17532. this._axis.scale.unionExtentFromData(e, t);
  17533. }, this), wh(this._axis.scale, this._axis.model);
  17534. }
  17535. }, this);
  17536. },
  17537. resize: function (t, e) {
  17538. this._rect = Ro({
  17539. left: t.get("left"),
  17540. top: t.get("top"),
  17541. right: t.get("right"),
  17542. bottom: t.get("bottom"),
  17543. width: t.get("width"),
  17544. height: t.get("height")
  17545. }, {
  17546. width: e.getWidth(),
  17547. height: e.getHeight()
  17548. }), this._adjustAxis();
  17549. },
  17550. getRect: function () {
  17551. return this._rect;
  17552. },
  17553. _adjustAxis: function () {
  17554. var t = this._rect,
  17555. e = this._axis,
  17556. i = e.isHorizontal(),
  17557. n = i ? [0, t.width] : [0, t.height],
  17558. r = e.reverse ? 1 : 0;
  17559. e.setExtent(n[r], n[1 - r]), this._updateAxisTransform(e, i ? t.x : t.y);
  17560. },
  17561. _updateAxisTransform: function (t, e) {
  17562. var i = t.getExtent(),
  17563. n = i[0] + i[1],
  17564. r = t.isHorizontal();
  17565. t.toGlobalCoord = r ? function (t) {
  17566. return t + e;
  17567. } : function (t) {
  17568. return n - t + e;
  17569. }, t.toLocalCoord = r ? function (t) {
  17570. return t - e;
  17571. } : function (t) {
  17572. return n - t + e;
  17573. };
  17574. },
  17575. getAxis: function () {
  17576. return this._axis;
  17577. },
  17578. getBaseAxis: function () {
  17579. return this._axis;
  17580. },
  17581. getAxes: function () {
  17582. return [this._axis];
  17583. },
  17584. getTooltipAxes: function () {
  17585. return {
  17586. baseAxes: [this.getAxis()]
  17587. };
  17588. },
  17589. containPoint: function (t) {
  17590. var e = this.getRect(),
  17591. i = this.getAxis(),
  17592. n = i.orient;
  17593. return "horizontal" === n ? i.contain(i.toLocalCoord(t[0])) && t[1] >= e.y && t[1] <= e.y + e.height : i.contain(i.toLocalCoord(t[1])) && t[0] >= e.y && t[0] <= e.y + e.height;
  17594. },
  17595. pointToData: function (t) {
  17596. var e = this.getAxis();
  17597. return [e.coordToData(e.toLocalCoord(t["horizontal" === e.orient ? 0 : 1]))];
  17598. },
  17599. dataToPoint: function (t) {
  17600. var e = this.getAxis(),
  17601. i = this.getRect(),
  17602. n = [],
  17603. r = "horizontal" === e.orient ? 0 : 1;
  17604. return t instanceof Array && (t = t[0]), n[r] = e.toGlobalCoord(e.dataToCoord(+t)), n[1 - r] = 0 === r ? i.y + i.height / 2 : i.x + i.width / 2, n;
  17605. }
  17606. }, cs.register("single", {
  17607. create: lf,
  17608. dimensions: sf.prototype.dimensions
  17609. });
  17610. var bI = ["axisLine", "axisTickLabel", "axisName"],
  17611. SI = "splitLine",
  17612. MI = aM.extend({
  17613. type: "singleAxis",
  17614. axisPointerClass: "SingleAxisPointer",
  17615. render: function (t, e, i, n) {
  17616. var r = this.group;
  17617. r.removeAll();
  17618. var a = uf(t),
  17619. o = new QS(t, a);
  17620. f(bI, o.add, o), r.add(o.getGroup()), t.get(SI + ".show") && this["_" + SI](t), MI.superCall(this, "render", t, e, i, n);
  17621. },
  17622. _splitLine: function (t) {
  17623. var e = t.axis;
  17624. if (!e.scale.isBlank()) {
  17625. var i = t.getModel("splitLine"),
  17626. n = i.getModel("lineStyle"),
  17627. r = n.get("width"),
  17628. a = n.get("color");
  17629. a = a instanceof Array ? a : [a];
  17630. for (var o = t.coordinateSystem.getRect(), s = e.isHorizontal(), l = [], u = 0, h = e.getTicksCoords({
  17631. tickModel: i
  17632. }), c = [], d = [], f = 0; f < h.length; ++f) {
  17633. var p = e.toGlobalCoord(h[f].coord);
  17634. s ? (c[0] = p, c[1] = o.y, d[0] = p, d[1] = o.y + o.height) : (c[0] = o.x, c[1] = p, d[0] = o.x + o.width, d[1] = p);
  17635. var g = u++ % a.length;
  17636. l[g] = l[g] || [], l[g].push(new c_({
  17637. subPixelOptimize: !0,
  17638. shape: {
  17639. x1: c[0],
  17640. y1: c[1],
  17641. x2: d[0],
  17642. y2: d[1]
  17643. },
  17644. style: {
  17645. lineWidth: r
  17646. },
  17647. silent: !0
  17648. }));
  17649. }
  17650. for (var f = 0; f < l.length; ++f) this.group.add(k_(l[f], {
  17651. style: {
  17652. stroke: a[f % a.length],
  17653. lineDash: n.getLineDash(r),
  17654. lineWidth: r
  17655. },
  17656. silent: !0
  17657. }));
  17658. }
  17659. }
  17660. }),
  17661. II = ax.extend({
  17662. type: "singleAxis",
  17663. layoutMode: "box",
  17664. axis: null,
  17665. coordinateSystem: null,
  17666. getCoordSysModel: function () {
  17667. return this;
  17668. }
  17669. }),
  17670. TI = {
  17671. left: "5%",
  17672. top: "5%",
  17673. right: "5%",
  17674. bottom: "5%",
  17675. type: "value",
  17676. position: "bottom",
  17677. orient: "horizontal",
  17678. axisLine: {
  17679. show: !0,
  17680. lineStyle: {
  17681. width: 1,
  17682. type: "solid"
  17683. }
  17684. },
  17685. tooltip: {
  17686. show: !0
  17687. },
  17688. axisTick: {
  17689. show: !0,
  17690. length: 6,
  17691. lineStyle: {
  17692. width: 1
  17693. }
  17694. },
  17695. axisLabel: {
  17696. show: !0,
  17697. interval: "auto"
  17698. },
  17699. splitLine: {
  17700. show: !0,
  17701. lineStyle: {
  17702. type: "dashed",
  17703. opacity: .2
  17704. }
  17705. }
  17706. };
  17707. r(II.prototype, uS), OS("single", II, hf, TI);
  17708. var CI = function (t, e) {
  17709. var i,
  17710. n = [],
  17711. r = t.seriesIndex;
  17712. if (null == r || !(i = e.getSeriesByIndex(r))) return {
  17713. point: []
  17714. };
  17715. var a = i.getData(),
  17716. o = qn(a, t);
  17717. if (null == o || 0 > o || x(o)) return {
  17718. point: []
  17719. };
  17720. var s = a.getItemGraphicEl(o),
  17721. l = i.coordinateSystem;
  17722. if (i.getTooltipPosition) n = i.getTooltipPosition(o) || [];else if (l && l.dataToPoint) n = l.dataToPoint(a.getValues(p(l.dimensions, function (t) {
  17723. return a.mapDimension(t);
  17724. }), o, !0)) || [];else if (s) {
  17725. var u = s.getBoundingRect().clone();
  17726. u.applyTransform(s.transform), n = [u.x + u.width / 2, u.y + u.height / 2];
  17727. }
  17728. return {
  17729. point: n,
  17730. el: s
  17731. };
  17732. },
  17733. DI = f,
  17734. AI = _,
  17735. kI = Zn(),
  17736. PI = function (t, e, i) {
  17737. var n = t.currTrigger,
  17738. r = [t.x, t.y],
  17739. a = t,
  17740. o = t.dispatchAction || y(i.dispatchAction, i),
  17741. s = e.getComponent("axisPointer").coordSysAxesInfo;
  17742. if (s) {
  17743. xf(r) && (r = CI({
  17744. seriesIndex: a.seriesIndex,
  17745. dataIndex: a.dataIndex
  17746. }, e).point);
  17747. var l = xf(r),
  17748. u = a.axesInfo,
  17749. h = s.axesInfo,
  17750. c = "leave" === n || xf(r),
  17751. d = {},
  17752. f = {},
  17753. p = {
  17754. list: [],
  17755. map: {}
  17756. },
  17757. g = {
  17758. showPointer: AI(ff, f),
  17759. showTooltip: AI(pf, p)
  17760. };
  17761. DI(s.coordSysMap, function (t, e) {
  17762. var i = l || t.containPoint(r);
  17763. DI(s.coordSysAxesInfo[e], function (t) {
  17764. var e = t.axis,
  17765. n = yf(u, t);
  17766. if (!c && i && (!u || n)) {
  17767. var a = n && n.value;
  17768. null != a || l || (a = e.pointToData(r)), null != a && cf(t, a, g, !1, d);
  17769. }
  17770. });
  17771. });
  17772. var m = {};
  17773. return DI(h, function (t, e) {
  17774. var i = t.linkGroup;
  17775. i && !f[e] && DI(i.axesInfo, function (e, n) {
  17776. var r = f[n];
  17777. if (e !== t && r) {
  17778. var a = r.value;
  17779. i.mapper && (a = t.axis.scale.parse(i.mapper(a, _f(e), _f(t)))), m[t.key] = a;
  17780. }
  17781. });
  17782. }), DI(m, function (t, e) {
  17783. cf(h[e], t, g, !0, d);
  17784. }), gf(f, h, d), mf(p, r, t, o), vf(h, o, i), d;
  17785. }
  17786. },
  17787. LI = (mu({
  17788. type: "axisPointer",
  17789. coordSysAxesInfo: null,
  17790. defaultOption: {
  17791. show: "auto",
  17792. triggerOn: null,
  17793. zlevel: 0,
  17794. z: 50,
  17795. type: "line",
  17796. snap: !1,
  17797. triggerTooltip: !0,
  17798. value: null,
  17799. status: null,
  17800. link: [],
  17801. animation: null,
  17802. animationDurationUpdate: 200,
  17803. lineStyle: {
  17804. color: "#aaa",
  17805. width: 1,
  17806. type: "solid"
  17807. },
  17808. shadowStyle: {
  17809. color: "rgba(150,150,150,0.3)"
  17810. },
  17811. label: {
  17812. show: !0,
  17813. formatter: null,
  17814. precision: "auto",
  17815. margin: 3,
  17816. color: "#fff",
  17817. padding: [5, 7, 5, 7],
  17818. backgroundColor: "auto",
  17819. borderColor: null,
  17820. borderWidth: 0,
  17821. shadowBlur: 3,
  17822. shadowColor: "#aaa"
  17823. },
  17824. handle: {
  17825. show: !1,
  17826. 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",
  17827. size: 45,
  17828. margin: 50,
  17829. color: "#333",
  17830. shadowBlur: 3,
  17831. shadowColor: "#aaa",
  17832. shadowOffsetX: 0,
  17833. shadowOffsetY: 2,
  17834. throttle: 40
  17835. }
  17836. }
  17837. }), Zn()),
  17838. OI = f,
  17839. zI = vu({
  17840. type: "axisPointer",
  17841. render: function (t, e, i) {
  17842. var n = e.getComponent("tooltip"),
  17843. r = t.get("triggerOn") || n && n.get("triggerOn") || "mousemove|click";
  17844. wf("axisPointer", i, function (t, e, i) {
  17845. "none" !== r && ("leave" === t || r.indexOf(t) >= 0) && i({
  17846. type: "updateAxisPointer",
  17847. currTrigger: t,
  17848. x: e && e.offsetX,
  17849. y: e && e.offsetY
  17850. });
  17851. });
  17852. },
  17853. remove: function (t, e) {
  17854. Cf(e.getZr(), "axisPointer"), zI.superApply(this._model, "remove", arguments);
  17855. },
  17856. dispose: function (t, e) {
  17857. Cf("axisPointer", e), zI.superApply(this._model, "dispose", arguments);
  17858. }
  17859. }),
  17860. EI = Zn(),
  17861. RI = n,
  17862. BI = y;
  17863. Df.prototype = {
  17864. _group: null,
  17865. _lastGraphicKey: null,
  17866. _handle: null,
  17867. _dragging: !1,
  17868. _lastValue: null,
  17869. _lastStatus: null,
  17870. _payloadInfo: null,
  17871. animationThreshold: 15,
  17872. render: function (t, e, i, n) {
  17873. var r = e.get("value"),
  17874. a = e.get("status");
  17875. if (this._axisModel = t, this._axisPointerModel = e, this._api = i, n || this._lastValue !== r || this._lastStatus !== a) {
  17876. this._lastValue = r, this._lastStatus = a;
  17877. var o = this._group,
  17878. s = this._handle;
  17879. if (!a || "hide" === a) return o && o.hide(), void (s && s.hide());
  17880. o && o.show(), s && s.show();
  17881. var l = {};
  17882. this.makeElOption(l, r, t, e, i);
  17883. var u = l.graphicKey;
  17884. u !== this._lastGraphicKey && this.clear(i), this._lastGraphicKey = u;
  17885. var h = this._moveAnimation = this.determineAnimation(t, e);
  17886. if (o) {
  17887. var c = _(Af, e, h);
  17888. this.updatePointerEl(o, l, c, e), this.updateLabelEl(o, l, c, e);
  17889. } else o = this._group = new Bm(), this.createPointerEl(o, l, t, e), this.createLabelEl(o, l, t, e), i.getZr().add(o);
  17890. Of(o, e, !0), this._renderHandle(r);
  17891. }
  17892. },
  17893. remove: function (t) {
  17894. this.clear(t);
  17895. },
  17896. dispose: function (t) {
  17897. this.clear(t);
  17898. },
  17899. determineAnimation: function (t, e) {
  17900. var i = e.get("animation"),
  17901. n = t.axis,
  17902. r = "category" === n.type,
  17903. a = e.get("snap");
  17904. if (!a && !r) return !1;
  17905. if ("auto" === i || null == i) {
  17906. var o = this.animationThreshold;
  17907. if (r && n.getBandWidth() > o) return !0;
  17908. if (a) {
  17909. var s = Gc(t).seriesDataCount,
  17910. l = n.getExtent();
  17911. return Math.abs(l[0] - l[1]) / s > o;
  17912. }
  17913. return !1;
  17914. }
  17915. return i === !0;
  17916. },
  17917. makeElOption: function () {},
  17918. createPointerEl: function (t, e) {
  17919. var i = e.pointer;
  17920. if (i) {
  17921. var n = EI(t).pointerEl = new z_[i.type](RI(e.pointer));
  17922. t.add(n);
  17923. }
  17924. },
  17925. createLabelEl: function (t, e, i, n) {
  17926. if (e.label) {
  17927. var r = EI(t).labelEl = new u_(RI(e.label));
  17928. t.add(r), Pf(r, n);
  17929. }
  17930. },
  17931. updatePointerEl: function (t, e, i) {
  17932. var n = EI(t).pointerEl;
  17933. n && e.pointer && (n.setStyle(e.pointer.style), i(n, {
  17934. shape: e.pointer.shape
  17935. }));
  17936. },
  17937. updateLabelEl: function (t, e, i, n) {
  17938. var r = EI(t).labelEl;
  17939. r && (r.setStyle(e.label.style), i(r, {
  17940. shape: e.label.shape,
  17941. position: e.label.position
  17942. }), Pf(r, n));
  17943. },
  17944. _renderHandle: function (t) {
  17945. if (!this._dragging && this.updateHandleTransform) {
  17946. var e = this._axisPointerModel,
  17947. i = this._api.getZr(),
  17948. n = this._handle,
  17949. r = e.getModel("handle"),
  17950. a = e.get("status");
  17951. if (!r.get("show") || !a || "hide" === a) return n && i.remove(n), void (this._handle = null);
  17952. var o;
  17953. this._handle || (o = !0, n = this._handle = qa(r.get("icon"), {
  17954. cursor: "move",
  17955. draggable: !0,
  17956. onmousemove: function (t) {
  17957. Qg(t.event);
  17958. },
  17959. onmousedown: BI(this._onHandleDragMove, this, 0, 0),
  17960. drift: BI(this._onHandleDragMove, this),
  17961. ondragend: BI(this._onHandleDragEnd, this)
  17962. }), i.add(n)), Of(n, e, !1);
  17963. var s = ["color", "borderColor", "borderWidth", "opacity", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"];
  17964. n.setStyle(r.getItemStyle(null, s));
  17965. var l = r.get("size");
  17966. x(l) || (l = [l, l]), n.attr("scale", [l[0] / 2, l[1] / 2]), nl(this, "_doDispatchAxisPointer", r.get("throttle") || 0, "fixRate"), this._moveHandleToValue(t, o);
  17967. }
  17968. },
  17969. _moveHandleToValue: function (t, e) {
  17970. Af(this._axisPointerModel, !e && this._moveAnimation, this._handle, Lf(this.getHandleTransform(t, this._axisModel, this._axisPointerModel)));
  17971. },
  17972. _onHandleDragMove: function (t, e) {
  17973. var i = this._handle;
  17974. if (i) {
  17975. this._dragging = !0;
  17976. var n = this.updateHandleTransform(Lf(i), [t, e], this._axisModel, this._axisPointerModel);
  17977. this._payloadInfo = n, i.stopAnimation(), i.attr(Lf(n)), EI(i).lastProp = null, this._doDispatchAxisPointer();
  17978. }
  17979. },
  17980. _doDispatchAxisPointer: function () {
  17981. var t = this._handle;
  17982. if (t) {
  17983. var e = this._payloadInfo,
  17984. i = this._axisModel;
  17985. this._api.dispatchAction({
  17986. type: "updateAxisPointer",
  17987. x: e.cursorPoint[0],
  17988. y: e.cursorPoint[1],
  17989. tooltipOption: e.tooltipOption,
  17990. axesInfo: [{
  17991. axisDim: i.axis.dim,
  17992. axisIndex: i.componentIndex
  17993. }]
  17994. });
  17995. }
  17996. },
  17997. _onHandleDragEnd: function () {
  17998. this._dragging = !1;
  17999. var t = this._handle;
  18000. if (t) {
  18001. var e = this._axisPointerModel.get("value");
  18002. this._moveHandleToValue(e), this._api.dispatchAction({
  18003. type: "hideTip"
  18004. });
  18005. }
  18006. },
  18007. getHandleTransform: null,
  18008. updateHandleTransform: null,
  18009. clear: function (t) {
  18010. this._lastValue = null, this._lastStatus = null;
  18011. var e = t.getZr(),
  18012. i = this._group,
  18013. n = this._handle;
  18014. e && i && (this._lastGraphicKey = null, i && e.remove(i), n && e.remove(n), this._group = null, this._handle = null, this._payloadInfo = null);
  18015. },
  18016. doClear: function () {},
  18017. buildLabel: function (t, e, i) {
  18018. return i = i || 0, {
  18019. x: t[i],
  18020. y: t[1 - i],
  18021. width: e[i],
  18022. height: e[1 - i]
  18023. };
  18024. }
  18025. }, Df.prototype.constructor = Df, nr(Df);
  18026. var NI = Df.extend({
  18027. makeElOption: function (t, e, i, n, r) {
  18028. var a = i.axis,
  18029. o = a.grid,
  18030. s = n.get("type"),
  18031. l = Hf(o, a).getOtherAxis(a).getGlobalExtent(),
  18032. u = a.toGlobalCoord(a.dataToCoord(e, !0));
  18033. if (s && "none" !== s) {
  18034. var h = zf(n),
  18035. c = FI[s](a, u, l);
  18036. c.style = h, t.graphicKey = c.type, t.pointer = c;
  18037. }
  18038. var d = Yc(o.model, i);
  18039. Ff(e, t, d, i, n, r);
  18040. },
  18041. getHandleTransform: function (t, e, i) {
  18042. var n = Yc(e.axis.grid.model, e, {
  18043. labelInside: !1
  18044. });
  18045. return n.labelMargin = i.get("handle.margin"), {
  18046. position: Nf(e.axis, t, n),
  18047. rotation: n.rotation + (n.labelDirection < 0 ? Math.PI : 0)
  18048. };
  18049. },
  18050. updateHandleTransform: function (t, e, i) {
  18051. var n = i.axis,
  18052. r = n.grid,
  18053. a = n.getGlobalExtent(!0),
  18054. o = Hf(r, n).getOtherAxis(n).getGlobalExtent(),
  18055. s = "x" === n.dim ? 0 : 1,
  18056. l = t.position;
  18057. l[s] += e[s], l[s] = Math.min(a[1], l[s]), l[s] = Math.max(a[0], l[s]);
  18058. var u = (o[1] + o[0]) / 2,
  18059. h = [u, u];
  18060. h[s] = l[s];
  18061. var c = [{
  18062. verticalAlign: "middle"
  18063. }, {
  18064. align: "center"
  18065. }];
  18066. return {
  18067. position: l,
  18068. rotation: t.rotation,
  18069. cursorPoint: h,
  18070. tooltipOption: c[s]
  18071. };
  18072. }
  18073. }),
  18074. FI = {
  18075. line: function (t, e, i) {
  18076. var n = Gf([e, i[0]], [e, i[1]], Wf(t));
  18077. return {
  18078. type: "Line",
  18079. subPixelOptimize: !0,
  18080. shape: n
  18081. };
  18082. },
  18083. shadow: function (t, e, i) {
  18084. var n = Math.max(1, t.getBandWidth()),
  18085. r = i[1] - i[0];
  18086. return {
  18087. type: "Rect",
  18088. shape: Vf([e - n / 2, i[0]], [n, r], Wf(t))
  18089. };
  18090. }
  18091. };
  18092. aM.registerAxisPointerClass("CartesianAxisPointer", NI), ou(function (t) {
  18093. if (t) {
  18094. (!t.axisPointer || 0 === t.axisPointer.length) && (t.axisPointer = {});
  18095. var e = t.axisPointer.link;
  18096. e && !x(e) && (t.axisPointer.link = [e]);
  18097. }
  18098. }), su($w.PROCESSOR.STATISTIC, function (t, e) {
  18099. t.getComponent("axisPointer").coordSysAxesInfo = Oc(t, e);
  18100. }), uu({
  18101. type: "updateAxisPointer",
  18102. event: "updateAxisPointer",
  18103. update: ":updateAxisPointer"
  18104. }, PI);
  18105. var GI = ["x", "y"],
  18106. VI = ["width", "height"],
  18107. HI = Df.extend({
  18108. makeElOption: function (t, e, i, n, r) {
  18109. var a = i.axis,
  18110. o = a.coordinateSystem,
  18111. s = Xf(o, 1 - Uf(a)),
  18112. l = o.dataToPoint(e)[0],
  18113. u = n.get("type");
  18114. if (u && "none" !== u) {
  18115. var h = zf(n),
  18116. c = WI[u](a, l, s);
  18117. c.style = h, t.graphicKey = c.type, t.pointer = c;
  18118. }
  18119. var d = uf(i);
  18120. Ff(e, t, d, i, n, r);
  18121. },
  18122. getHandleTransform: function (t, e, i) {
  18123. var n = uf(e, {
  18124. labelInside: !1
  18125. });
  18126. return n.labelMargin = i.get("handle.margin"), {
  18127. position: Nf(e.axis, t, n),
  18128. rotation: n.rotation + (n.labelDirection < 0 ? Math.PI : 0)
  18129. };
  18130. },
  18131. updateHandleTransform: function (t, e, i) {
  18132. var n = i.axis,
  18133. r = n.coordinateSystem,
  18134. a = Uf(n),
  18135. o = Xf(r, a),
  18136. s = t.position;
  18137. s[a] += e[a], s[a] = Math.min(o[1], s[a]), s[a] = Math.max(o[0], s[a]);
  18138. var l = Xf(r, 1 - a),
  18139. u = (l[1] + l[0]) / 2,
  18140. h = [u, u];
  18141. return h[a] = s[a], {
  18142. position: s,
  18143. rotation: t.rotation,
  18144. cursorPoint: h,
  18145. tooltipOption: {
  18146. verticalAlign: "middle"
  18147. }
  18148. };
  18149. }
  18150. }),
  18151. WI = {
  18152. line: function (t, e, i) {
  18153. var n = Gf([e, i[0]], [e, i[1]], Uf(t));
  18154. return {
  18155. type: "Line",
  18156. subPixelOptimize: !0,
  18157. shape: n
  18158. };
  18159. },
  18160. shadow: function (t, e, i) {
  18161. var n = t.getBandWidth(),
  18162. r = i[1] - i[0];
  18163. return {
  18164. type: "Rect",
  18165. shape: Vf([e - n / 2, i[0]], [n, r], Uf(t))
  18166. };
  18167. }
  18168. };
  18169. aM.registerAxisPointerClass("SingleAxisPointer", HI), vu({
  18170. type: "single"
  18171. }), mu({
  18172. type: "title",
  18173. layoutMode: {
  18174. type: "box",
  18175. ignoreSize: !0
  18176. },
  18177. defaultOption: {
  18178. zlevel: 0,
  18179. z: 6,
  18180. show: !0,
  18181. text: "",
  18182. target: "blank",
  18183. subtext: "",
  18184. subtarget: "blank",
  18185. left: 0,
  18186. top: 0,
  18187. backgroundColor: "rgba(0,0,0,0)",
  18188. borderColor: "#ccc",
  18189. borderWidth: 0,
  18190. padding: 5,
  18191. itemGap: 10,
  18192. textStyle: {
  18193. fontSize: 18,
  18194. fontWeight: "bolder",
  18195. color: "#333"
  18196. },
  18197. subtextStyle: {
  18198. color: "#aaa"
  18199. }
  18200. }
  18201. }), vu({
  18202. type: "title",
  18203. render: function (t, e, i) {
  18204. if (this.group.removeAll(), t.get("show")) {
  18205. var n = this.group,
  18206. r = t.getModel("textStyle"),
  18207. a = t.getModel("subtextStyle"),
  18208. o = t.get("textAlign"),
  18209. s = A(t.get("textBaseline"), t.get("textVerticalAlign")),
  18210. l = new $y({
  18211. style: ka({}, r, {
  18212. text: t.get("text"),
  18213. textFill: r.getTextColor()
  18214. }, {
  18215. disableBox: !0
  18216. }),
  18217. z2: 10
  18218. }),
  18219. u = l.getBoundingRect(),
  18220. h = t.get("subtext"),
  18221. c = new $y({
  18222. style: ka({}, a, {
  18223. text: h,
  18224. textFill: a.getTextColor(),
  18225. y: u.height + t.get("itemGap"),
  18226. textVerticalAlign: "top"
  18227. }, {
  18228. disableBox: !0
  18229. }),
  18230. z2: 10
  18231. }),
  18232. d = t.get("link"),
  18233. f = t.get("sublink"),
  18234. p = t.get("triggerEvent", !0);
  18235. l.silent = !d && !p, c.silent = !f && !p, d && l.on("click", function () {
  18236. window.open(d, "_" + t.get("target"));
  18237. }), f && c.on("click", function () {
  18238. window.open(f, "_" + t.get("subtarget"));
  18239. }), l.eventData = c.eventData = p ? {
  18240. componentType: "title",
  18241. componentIndex: t.componentIndex
  18242. } : null, n.add(l), h && n.add(c);
  18243. var g = n.getBoundingRect(),
  18244. m = t.getBoxLayoutParams();
  18245. m.width = g.width, m.height = g.height;
  18246. var v = Ro(m, {
  18247. width: i.getWidth(),
  18248. height: i.getHeight()
  18249. }, t.get("padding"));
  18250. o || (o = t.get("left") || t.get("right"), "middle" === o && (o = "center"), "right" === o ? v.x += v.width : "center" === o && (v.x += v.width / 2)), s || (s = t.get("top") || t.get("bottom"), "center" === s && (s = "middle"), "bottom" === s ? v.y += v.height : "middle" === s && (v.y += v.height / 2), s = s || "top"), n.attr("position", [v.x, v.y]);
  18251. var y = {
  18252. textAlign: o,
  18253. textVerticalAlign: s
  18254. };
  18255. l.setStyle(y), c.setStyle(y), g = n.getBoundingRect();
  18256. var _ = v.margin,
  18257. x = t.getItemStyle(["color", "opacity"]);
  18258. x.fill = t.get("backgroundColor");
  18259. var w = new u_({
  18260. shape: {
  18261. x: g.x - _[3],
  18262. y: g.y - _[0],
  18263. width: g.width + _[1] + _[3],
  18264. height: g.height + _[0] + _[2],
  18265. r: t.get("borderRadius")
  18266. },
  18267. style: x,
  18268. subPixelOptimize: !0,
  18269. silent: !0
  18270. });
  18271. n.add(w);
  18272. }
  18273. }
  18274. });
  18275. var UI = aw.legend.selector,
  18276. XI = {
  18277. all: {
  18278. type: "all",
  18279. title: n(UI.all)
  18280. },
  18281. inverse: {
  18282. type: "inverse",
  18283. title: n(UI.inverse)
  18284. }
  18285. },
  18286. YI = mu({
  18287. type: "legend.plain",
  18288. dependencies: ["series"],
  18289. layoutMode: {
  18290. type: "box",
  18291. ignoreSize: !0
  18292. },
  18293. init: function (t, e, i) {
  18294. this.mergeDefaultAndTheme(t, i), t.selected = t.selected || {}, this._updateSelector(t);
  18295. },
  18296. mergeOption: function (t) {
  18297. YI.superCall(this, "mergeOption", t), this._updateSelector(t);
  18298. },
  18299. _updateSelector: function (t) {
  18300. var e = t.selector;
  18301. e === !0 && (e = t.selector = ["all", "inverse"]), x(e) && f(e, function (t, i) {
  18302. b(t) && (t = {
  18303. type: t
  18304. }), e[i] = r(t, XI[t.type]);
  18305. });
  18306. },
  18307. optionUpdated: function () {
  18308. this._updateData(this.ecModel);
  18309. var t = this._data;
  18310. if (t[0] && "single" === this.get("selectedMode")) {
  18311. for (var e = !1, i = 0; i < t.length; i++) {
  18312. var n = t[i].get("name");
  18313. if (this.isSelected(n)) {
  18314. this.select(n), e = !0;
  18315. break;
  18316. }
  18317. }
  18318. !e && this.select(t[0].get("name"));
  18319. }
  18320. },
  18321. _updateData: function (t) {
  18322. var e = [],
  18323. i = [];
  18324. t.eachRawSeries(function (n) {
  18325. var r = n.name;
  18326. i.push(r);
  18327. var a;
  18328. if (n.legendDataProvider) {
  18329. var o = n.legendDataProvider(),
  18330. s = o.mapArray(o.getName);
  18331. t.isSeriesFiltered(n) || (i = i.concat(s)), s.length ? e = e.concat(s) : a = !0;
  18332. } else a = !0;
  18333. a && Yn(n) && e.push(n.name);
  18334. }), this._availableNames = i;
  18335. var n = this.get("data") || e,
  18336. r = p(n, function (t) {
  18337. return ("string" == typeof t || "number" == typeof t) && (t = {
  18338. name: t
  18339. }), new Ja(t, this, this.ecModel);
  18340. }, this);
  18341. this._data = r;
  18342. },
  18343. getData: function () {
  18344. return this._data;
  18345. },
  18346. select: function (t) {
  18347. var e = this.option.selected,
  18348. i = this.get("selectedMode");
  18349. if ("single" === i) {
  18350. var n = this._data;
  18351. f(n, function (t) {
  18352. e[t.get("name")] = !1;
  18353. });
  18354. }
  18355. e[t] = !0;
  18356. },
  18357. unSelect: function (t) {
  18358. "single" !== this.get("selectedMode") && (this.option.selected[t] = !1);
  18359. },
  18360. toggleSelected: function (t) {
  18361. var e = this.option.selected;
  18362. e.hasOwnProperty(t) || (e[t] = !0), this[e[t] ? "unSelect" : "select"](t);
  18363. },
  18364. allSelect: function () {
  18365. var t = this._data,
  18366. e = this.option.selected;
  18367. f(t, function (t) {
  18368. e[t.get("name", !0)] = !0;
  18369. });
  18370. },
  18371. inverseSelect: function () {
  18372. var t = this._data,
  18373. e = this.option.selected;
  18374. f(t, function (t) {
  18375. var i = t.get("name", !0);
  18376. e.hasOwnProperty(i) || (e[i] = !0), e[i] = !e[i];
  18377. });
  18378. },
  18379. isSelected: function (t) {
  18380. var e = this.option.selected;
  18381. return !(e.hasOwnProperty(t) && !e[t]) && u(this._availableNames, t) >= 0;
  18382. },
  18383. getOrient: function () {
  18384. return "vertical" === this.get("orient") ? {
  18385. index: 1,
  18386. name: "vertical"
  18387. } : {
  18388. index: 0,
  18389. name: "horizontal"
  18390. };
  18391. },
  18392. defaultOption: {
  18393. zlevel: 0,
  18394. z: 4,
  18395. show: !0,
  18396. orient: "horizontal",
  18397. left: "center",
  18398. top: 0,
  18399. align: "auto",
  18400. backgroundColor: "rgba(0,0,0,0)",
  18401. borderColor: "#ccc",
  18402. borderRadius: 0,
  18403. borderWidth: 0,
  18404. padding: 5,
  18405. itemGap: 10,
  18406. itemWidth: 25,
  18407. itemHeight: 14,
  18408. inactiveColor: "#ccc",
  18409. inactiveBorderColor: "#ccc",
  18410. itemStyle: {
  18411. borderWidth: 0
  18412. },
  18413. textStyle: {
  18414. color: "#333"
  18415. },
  18416. selectedMode: !0,
  18417. selector: !1,
  18418. selectorLabel: {
  18419. show: !0,
  18420. borderRadius: 10,
  18421. padding: [3, 5, 3, 5],
  18422. fontSize: 12,
  18423. fontFamily: " sans-serif",
  18424. color: "#666",
  18425. borderWidth: 1,
  18426. borderColor: "#666"
  18427. },
  18428. emphasis: {
  18429. selectorLabel: {
  18430. show: !0,
  18431. color: "#eee",
  18432. backgroundColor: "#666"
  18433. }
  18434. },
  18435. selectorPosition: "auto",
  18436. selectorItemGap: 7,
  18437. selectorButtonGap: 10,
  18438. tooltip: {
  18439. show: !1
  18440. }
  18441. }
  18442. });
  18443. uu("legendToggleSelect", "legendselectchanged", _(Yf, "toggleSelected")), uu("legendAllSelect", "legendselectall", _(Yf, "allSelect")), uu("legendInverseSelect", "legendinverseselect", _(Yf, "inverseSelect")), uu("legendSelect", "legendselected", _(Yf, "select")), uu("legendUnSelect", "legendunselected", _(Yf, "unSelect"));
  18444. var jI = _,
  18445. qI = f,
  18446. ZI = Bm,
  18447. KI = vu({
  18448. type: "legend.plain",
  18449. newlineDisabled: !1,
  18450. init: function () {
  18451. this.group.add(this._contentGroup = new ZI()), this._backgroundEl, this.group.add(this._selectorGroup = new ZI()), this._isFirstRender = !0;
  18452. },
  18453. getContentGroup: function () {
  18454. return this._contentGroup;
  18455. },
  18456. getSelectorGroup: function () {
  18457. return this._selectorGroup;
  18458. },
  18459. render: function (t, e, i) {
  18460. var n = this._isFirstRender;
  18461. if (this._isFirstRender = !1, this.resetInner(), t.get("show", !0)) {
  18462. var r = t.get("align"),
  18463. a = t.get("orient");
  18464. r && "auto" !== r || (r = "right" === t.get("left") && "vertical" === a ? "right" : "left");
  18465. var o = t.get("selector", !0),
  18466. l = t.get("selectorPosition", !0);
  18467. !o || l && "auto" !== l || (l = "horizontal" === a ? "end" : "start"), this.renderInner(r, t, e, i, o, a, l);
  18468. var u = t.getBoxLayoutParams(),
  18469. h = {
  18470. width: i.getWidth(),
  18471. height: i.getHeight()
  18472. },
  18473. c = t.get("padding"),
  18474. d = Ro(u, h, c),
  18475. f = this.layoutInner(t, r, d, n, o, l),
  18476. p = Ro(s({
  18477. width: f.width,
  18478. height: f.height
  18479. }, u), h, c);
  18480. this.group.attr("position", [p.x - f.x, p.y - f.y]), this.group.add(this._backgroundEl = jf(f, t));
  18481. }
  18482. },
  18483. resetInner: function () {
  18484. this.getContentGroup().removeAll(), this._backgroundEl && this.group.remove(this._backgroundEl), this.getSelectorGroup().removeAll();
  18485. },
  18486. renderInner: function (t, e, i, n, r, a, o) {
  18487. var s = this.getContentGroup(),
  18488. l = N(),
  18489. u = e.get("selectedMode"),
  18490. h = [];
  18491. i.eachRawSeries(function (t) {
  18492. !t.get("legendHoverLink") && h.push(t.id);
  18493. }), qI(e.getData(), function (r, a) {
  18494. var o = r.get("name");
  18495. if (!this.newlineDisabled && ("" === o || "\n" === o)) return void s.add(new ZI({
  18496. newline: !0
  18497. }));
  18498. var c = i.getSeriesByName(o)[0];
  18499. if (!l.get(o)) if (c) {
  18500. var d = c.getData(),
  18501. f = d.getVisual("color"),
  18502. p = d.getVisual("borderColor");
  18503. "function" == typeof f && (f = f(c.getDataParams(0))), "function" == typeof p && (p = p(c.getDataParams(0)));
  18504. var g = d.getVisual("legendSymbol") || "roundRect",
  18505. m = d.getVisual("symbol"),
  18506. v = this._createItem(o, a, r, e, g, m, t, f, p, u);
  18507. v.on("click", jI(Zf, o, n)).on("mouseover", jI(Kf, c.name, null, n, h)).on("mouseout", jI($f, c.name, null, n, h)), l.set(o, !0);
  18508. } else i.eachRawSeries(function (i) {
  18509. if (!l.get(o) && i.legendDataProvider) {
  18510. var s = i.legendDataProvider(),
  18511. c = s.indexOfName(o);
  18512. if (0 > c) return;
  18513. var d = s.getItemVisual(c, "color"),
  18514. f = s.getItemVisual(c, "borderColor"),
  18515. p = "roundRect",
  18516. g = this._createItem(o, a, r, e, p, null, t, d, f, u);
  18517. g.on("click", jI(Zf, o, n)).on("mouseover", jI(Kf, null, o, n, h)).on("mouseout", jI($f, null, o, n, h)), l.set(o, !0);
  18518. }
  18519. }, this);
  18520. }, this), r && this._createSelector(r, e, n, a, o);
  18521. },
  18522. _createSelector: function (t, e, i) {
  18523. function n(t) {
  18524. var n = t.type,
  18525. a = new $y({
  18526. style: {
  18527. x: 0,
  18528. y: 0,
  18529. align: "center",
  18530. verticalAlign: "middle"
  18531. },
  18532. onclick: function () {
  18533. i.dispatchAction({
  18534. type: "all" === n ? "legendAllSelect" : "legendInverseSelect"
  18535. });
  18536. }
  18537. });
  18538. r.add(a);
  18539. var o = e.getModel("selectorLabel"),
  18540. s = e.getModel("emphasis.selectorLabel");
  18541. Da(a.style, a.hoverStyle = {}, o, s, {
  18542. defaultText: t.title,
  18543. isRectText: !1
  18544. }), Ma(a);
  18545. }
  18546. var r = this.getSelectorGroup();
  18547. qI(t, function (t) {
  18548. n(t);
  18549. });
  18550. },
  18551. _createItem: function (t, e, i, n, r, a, s, l, u, h) {
  18552. var c = n.get("itemWidth"),
  18553. d = n.get("itemHeight"),
  18554. f = n.get("inactiveColor"),
  18555. p = n.get("inactiveBorderColor"),
  18556. g = n.get("symbolKeepAspect"),
  18557. m = n.getModel("itemStyle"),
  18558. v = n.isSelected(t),
  18559. y = new ZI(),
  18560. _ = i.getModel("textStyle"),
  18561. x = i.get("icon"),
  18562. w = i.getModel("tooltip"),
  18563. b = w.parentModel;
  18564. r = x || r;
  18565. var S = Ph(r, 0, 0, c, d, v ? l : f, null == g ? !0 : g);
  18566. if (y.add(qf(S, r, m, u, p, v)), !x && a && (a !== r || "none" === a)) {
  18567. var M = .8 * d;
  18568. "none" === a && (a = "circle");
  18569. var I = Ph(a, (c - M) / 2, (d - M) / 2, M, M, v ? l : f, null == g ? !0 : g);
  18570. y.add(qf(I, a, m, u, p, v));
  18571. }
  18572. var T = "left" === s ? c + 5 : -5,
  18573. C = s,
  18574. D = n.get("formatter"),
  18575. A = t;
  18576. "string" == typeof D && D ? A = D.replace("{name}", null != t ? t : "") : "function" == typeof D && (A = D(t)), y.add(new $y({
  18577. style: ka({}, _, {
  18578. text: A,
  18579. x: T,
  18580. y: d / 2,
  18581. textFill: v ? _.getTextColor() : f,
  18582. textAlign: C,
  18583. textVerticalAlign: "middle"
  18584. })
  18585. }));
  18586. var k = new u_({
  18587. shape: y.getBoundingRect(),
  18588. invisible: !0,
  18589. tooltip: w.get("show") ? o({
  18590. content: t,
  18591. formatter: b.get("formatter", !0) || function () {
  18592. return t;
  18593. },
  18594. formatterParams: {
  18595. componentType: "legend",
  18596. legendIndex: n.componentIndex,
  18597. name: t,
  18598. $vars: ["name"]
  18599. }
  18600. }, w.option) : null
  18601. });
  18602. return y.add(k), y.eachChild(function (t) {
  18603. t.silent = !0;
  18604. }), k.silent = !h, this.getContentGroup().add(y), Ma(y), y.__legendDataIndex = e, y;
  18605. },
  18606. layoutInner: function (t, e, i, n, r, a) {
  18607. var o = this.getContentGroup(),
  18608. s = this.getSelectorGroup();
  18609. ix(t.get("orient"), o, t.get("itemGap"), i.width, i.height);
  18610. var l = o.getBoundingRect(),
  18611. u = [-l.x, -l.y];
  18612. if (r) {
  18613. ix("horizontal", s, t.get("selectorItemGap", !0));
  18614. var h = s.getBoundingRect(),
  18615. c = [-h.x, -h.y],
  18616. d = t.get("selectorButtonGap", !0),
  18617. f = t.getOrient().index,
  18618. p = 0 === f ? "width" : "height",
  18619. g = 0 === f ? "height" : "width",
  18620. m = 0 === f ? "y" : "x";
  18621. "end" === a ? c[f] += l[p] + d : u[f] += h[p] + d, c[1 - f] += l[g] / 2 - h[g] / 2, s.attr("position", c), o.attr("position", u);
  18622. var v = {
  18623. x: 0,
  18624. y: 0
  18625. };
  18626. return v[p] = l[p] + d + h[p], v[g] = Math.max(l[g], h[g]), v[m] = Math.min(0, h[m] + c[1 - f]), v;
  18627. }
  18628. return o.attr("position", u), this.group.getBoundingRect();
  18629. },
  18630. remove: function () {
  18631. this.getContentGroup().removeAll(), this._isFirstRender = !0;
  18632. }
  18633. }),
  18634. $I = function (t) {
  18635. var e = t.findComponents({
  18636. mainType: "legend"
  18637. });
  18638. e && e.length && t.filterSeries(function (t) {
  18639. for (var i = 0; i < e.length; i++) if (!e[i].isSelected(t.name)) return !1;
  18640. return !0;
  18641. });
  18642. };
  18643. su($w.PROCESSOR.SERIES_FILTER, $I), ax.registerSubTypeDefaulter("legend", function () {
  18644. return "plain";
  18645. });
  18646. var QI = YI.extend({
  18647. type: "legend.scroll",
  18648. setScrollDataIndex: function (t) {
  18649. this.option.scrollDataIndex = t;
  18650. },
  18651. defaultOption: {
  18652. scrollDataIndex: 0,
  18653. pageButtonItemGap: 5,
  18654. pageButtonGap: null,
  18655. pageButtonPosition: "end",
  18656. pageFormatter: "{current}/{total}",
  18657. pageIcons: {
  18658. horizontal: ["M0,0L12,-10L12,10z", "M0,0L-12,-10L-12,10z"],
  18659. vertical: ["M0,0L20,0L10,-20z", "M0,0L20,0L10,20z"]
  18660. },
  18661. pageIconColor: "#2f4554",
  18662. pageIconInactiveColor: "#aaa",
  18663. pageIconSize: 15,
  18664. pageTextStyle: {
  18665. color: "#333"
  18666. },
  18667. animationDurationUpdate: 800
  18668. },
  18669. init: function (t, e, i, n) {
  18670. var r = No(t);
  18671. QI.superCall(this, "init", t, e, i, n), Qf(this, t, r);
  18672. },
  18673. mergeOption: function (t, e) {
  18674. QI.superCall(this, "mergeOption", t, e), Qf(this, this.option, t);
  18675. }
  18676. }),
  18677. JI = Bm,
  18678. tT = ["width", "height"],
  18679. eT = ["x", "y"],
  18680. iT = KI.extend({
  18681. type: "legend.scroll",
  18682. newlineDisabled: !0,
  18683. init: function () {
  18684. iT.superCall(this, "init"), this._currentIndex = 0, this.group.add(this._containerGroup = new JI()), this._containerGroup.add(this.getContentGroup()), this.group.add(this._controllerGroup = new JI()), this._showController;
  18685. },
  18686. resetInner: function () {
  18687. iT.superCall(this, "resetInner"), this._controllerGroup.removeAll(), this._containerGroup.removeClipPath(), this._containerGroup.__rectSize = null;
  18688. },
  18689. renderInner: function (t, e, i, n, r, a, o) {
  18690. function s(t, i) {
  18691. var r = t + "DataIndex",
  18692. a = qa(e.get("pageIcons", !0)[e.getOrient().name][i], {
  18693. onclick: y(l._pageGo, l, r, e, n)
  18694. }, {
  18695. x: -h[0] / 2,
  18696. y: -h[1] / 2,
  18697. width: h[0],
  18698. height: h[1]
  18699. });
  18700. a.name = t, u.add(a);
  18701. }
  18702. var l = this;
  18703. iT.superCall(this, "renderInner", t, e, i, n, r, a, o);
  18704. var u = this._controllerGroup,
  18705. h = e.get("pageIconSize", !0);
  18706. x(h) || (h = [h, h]), s("pagePrev", 0);
  18707. var c = e.getModel("pageTextStyle");
  18708. u.add(new $y({
  18709. name: "pageText",
  18710. style: {
  18711. textFill: c.getTextColor(),
  18712. font: c.getFont(),
  18713. textVerticalAlign: "middle",
  18714. textAlign: "center"
  18715. },
  18716. silent: !0
  18717. })), s("pageNext", 1);
  18718. },
  18719. layoutInner: function (t, e, i, r, a, o) {
  18720. var s = this.getSelectorGroup(),
  18721. l = t.getOrient().index,
  18722. u = tT[l],
  18723. h = eT[l],
  18724. c = tT[1 - l],
  18725. d = eT[1 - l];
  18726. a && ix("horizontal", s, t.get("selectorItemGap", !0));
  18727. var f = t.get("selectorButtonGap", !0),
  18728. p = s.getBoundingRect(),
  18729. g = [-p.x, -p.y],
  18730. m = n(i);
  18731. a && (m[u] = i[u] - p[u] - f);
  18732. var v = this._layoutContentAndController(t, r, m, l, u, c, d);
  18733. if (a) {
  18734. if ("end" === o) g[l] += v[u] + f;else {
  18735. var y = p[u] + f;
  18736. g[l] -= y, v[h] -= y;
  18737. }
  18738. v[u] += p[u] + f, g[1 - l] += v[d] + v[c] / 2 - p[c] / 2, v[c] = Math.max(v[c], p[c]), v[d] = Math.min(v[d], p[d] + g[1 - l]), s.attr("position", g);
  18739. }
  18740. return v;
  18741. },
  18742. _layoutContentAndController: function (t, e, i, n, r, a, o) {
  18743. var s = this.getContentGroup(),
  18744. l = this._containerGroup,
  18745. u = this._controllerGroup;
  18746. ix(t.get("orient"), s, t.get("itemGap"), n ? i.width : null, n ? null : i.height), ix("horizontal", u, t.get("pageButtonItemGap", !0));
  18747. var h = s.getBoundingRect(),
  18748. c = u.getBoundingRect(),
  18749. d = this._showController = h[r] > i[r],
  18750. f = [-h.x, -h.y];
  18751. e || (f[n] = s.position[n]);
  18752. var p = [0, 0],
  18753. g = [-c.x, -c.y],
  18754. m = A(t.get("pageButtonGap", !0), t.get("itemGap", !0));
  18755. if (d) {
  18756. var v = t.get("pageButtonPosition", !0);
  18757. "end" === v ? g[n] += i[r] - c[r] : p[n] += c[r] + m;
  18758. }
  18759. g[1 - n] += h[a] / 2 - c[a] / 2, s.attr("position", f), l.attr("position", p), u.attr("position", g);
  18760. var y = {
  18761. x: 0,
  18762. y: 0
  18763. };
  18764. if (y[r] = d ? i[r] : h[r], y[a] = Math.max(h[a], c[a]), y[o] = Math.min(0, c[o] + g[1 - n]), l.__rectSize = i[r], d) {
  18765. var _ = {
  18766. x: 0,
  18767. y: 0
  18768. };
  18769. _[r] = Math.max(i[r] - c[r] - m, 0), _[a] = y[a], l.setClipPath(new u_({
  18770. shape: _
  18771. })), l.__rectSize = _[r];
  18772. } else u.eachChild(function (t) {
  18773. t.attr({
  18774. invisible: !0,
  18775. silent: !0
  18776. });
  18777. });
  18778. var x = this._getPageInfo(t);
  18779. return null != x.pageIndex && Ga(s, {
  18780. position: x.contentPosition
  18781. }, d ? t : !1), this._updatePageInfoView(t, x), y;
  18782. },
  18783. _pageGo: function (t, e, i) {
  18784. var n = this._getPageInfo(e)[t];
  18785. null != n && i.dispatchAction({
  18786. type: "legendScroll",
  18787. scrollDataIndex: n,
  18788. legendId: e.id
  18789. });
  18790. },
  18791. _updatePageInfoView: function (t, e) {
  18792. var i = this._controllerGroup;
  18793. f(["pagePrev", "pageNext"], function (n) {
  18794. var r = null != e[n + "DataIndex"],
  18795. a = i.childOfName(n);
  18796. a && (a.setStyle("fill", r ? t.get("pageIconColor", !0) : t.get("pageIconInactiveColor", !0)), a.cursor = r ? "pointer" : "default");
  18797. });
  18798. var n = i.childOfName("pageText"),
  18799. r = t.get("pageFormatter"),
  18800. a = e.pageIndex,
  18801. o = null != a ? a + 1 : 0,
  18802. s = e.pageCount;
  18803. n && r && n.setStyle("text", b(r) ? r.replace("{current}", o).replace("{total}", s) : r({
  18804. current: o,
  18805. total: s
  18806. }));
  18807. },
  18808. _getPageInfo: function (t) {
  18809. function e(t) {
  18810. if (t) {
  18811. var e = t.getBoundingRect(),
  18812. i = e[l] + t.position[o];
  18813. return {
  18814. s: i,
  18815. e: i + e[s],
  18816. i: t.__legendDataIndex
  18817. };
  18818. }
  18819. }
  18820. function i(t, e) {
  18821. return t.e >= e && t.s <= e + a;
  18822. }
  18823. var n = t.get("scrollDataIndex", !0),
  18824. r = this.getContentGroup(),
  18825. a = this._containerGroup.__rectSize,
  18826. o = t.getOrient().index,
  18827. s = tT[o],
  18828. l = eT[o],
  18829. u = this._findTargetItemIndex(n),
  18830. h = r.children(),
  18831. c = h[u],
  18832. d = h.length,
  18833. f = d ? 1 : 0,
  18834. p = {
  18835. contentPosition: r.position.slice(),
  18836. pageCount: f,
  18837. pageIndex: f - 1,
  18838. pagePrevDataIndex: null,
  18839. pageNextDataIndex: null
  18840. };
  18841. if (!c) return p;
  18842. var g = e(c);
  18843. p.contentPosition[o] = -g.s;
  18844. for (var m = u + 1, v = g, y = g, _ = null; d >= m; ++m) _ = e(h[m]), (!_ && y.e > v.s + a || _ && !i(_, v.s)) && (v = y.i > v.i ? y : _, v && (null == p.pageNextDataIndex && (p.pageNextDataIndex = v.i), ++p.pageCount)), y = _;
  18845. for (var m = u - 1, v = g, y = g, _ = null; m >= -1; --m) _ = e(h[m]), _ && i(y, _.s) || !(v.i < y.i) || (y = v, null == p.pagePrevDataIndex && (p.pagePrevDataIndex = v.i), ++p.pageCount, ++p.pageIndex), v = _;
  18846. return p;
  18847. },
  18848. _findTargetItemIndex: function (t) {
  18849. var e,
  18850. i,
  18851. n = this.getContentGroup();
  18852. return this._showController && n.eachChild(function (n, r) {
  18853. var a = n.__legendDataIndex;
  18854. null == i && null != a && (i = r), a === t && (e = r);
  18855. }), null != e ? e : i;
  18856. }
  18857. });
  18858. uu("legendScroll", "legendscroll", function (t, e) {
  18859. var i = t.scrollDataIndex;
  18860. null != i && e.eachComponent({
  18861. mainType: "legend",
  18862. subType: "scroll",
  18863. query: t
  18864. }, function (t) {
  18865. t.setScrollDataIndex(i);
  18866. });
  18867. }), mu({
  18868. type: "tooltip",
  18869. dependencies: ["axisPointer"],
  18870. defaultOption: {
  18871. zlevel: 0,
  18872. z: 60,
  18873. show: !0,
  18874. showContent: !0,
  18875. trigger: "item",
  18876. triggerOn: "mousemove|click",
  18877. alwaysShowContent: !1,
  18878. displayMode: "single",
  18879. renderMode: "auto",
  18880. confine: !1,
  18881. showDelay: 0,
  18882. hideDelay: 100,
  18883. transitionDuration: .4,
  18884. enterable: !1,
  18885. backgroundColor: "rgba(50,50,50,0.7)",
  18886. borderColor: "#333",
  18887. borderRadius: 4,
  18888. borderWidth: 0,
  18889. padding: 5,
  18890. extraCssText: "",
  18891. axisPointer: {
  18892. type: "line",
  18893. axis: "auto",
  18894. animation: "auto",
  18895. animationDurationUpdate: 200,
  18896. animationEasingUpdate: "exponentialOut",
  18897. crossStyle: {
  18898. color: "#999",
  18899. width: 1,
  18900. type: "dashed",
  18901. textStyle: {}
  18902. }
  18903. },
  18904. textStyle: {
  18905. color: "#fff",
  18906. fontSize: 14
  18907. }
  18908. }
  18909. });
  18910. var nT = f,
  18911. rT = Io,
  18912. aT = ["", "-webkit-", "-moz-", "-o-"],
  18913. oT = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";
  18914. ip.prototype = {
  18915. constructor: ip,
  18916. _enterable: !0,
  18917. update: function () {
  18918. var t = this._container,
  18919. e = t.currentStyle || document.defaultView.getComputedStyle(t),
  18920. i = t.style;
  18921. "absolute" !== i.position && "absolute" !== e.position && (i.position = "relative");
  18922. },
  18923. show: function (t) {
  18924. clearTimeout(this._hideTimeout);
  18925. var e = this.el;
  18926. e.style.cssText = oT + ep(t) + ";left:" + this._x + "px;top:" + this._y + "px;" + (t.get("extraCssText") || ""), e.style.display = e.innerHTML ? "block" : "none", e.style.pointerEvents = this._enterable ? "auto" : "none", this._show = !0;
  18927. },
  18928. setContent: function (t) {
  18929. this.el.innerHTML = null == t ? "" : t;
  18930. },
  18931. setEnterable: function (t) {
  18932. this._enterable = t;
  18933. },
  18934. getSize: function () {
  18935. var t = this.el;
  18936. return [t.clientWidth, t.clientHeight];
  18937. },
  18938. moveTo: function (t, e) {
  18939. var i,
  18940. n = this._zr;
  18941. n && n.painter && (i = n.painter.getViewportRootOffset()) && (t += i.offsetLeft, e += i.offsetTop);
  18942. var r = this.el.style;
  18943. r.left = t + "px", r.top = e + "px", this._x = t, this._y = e;
  18944. },
  18945. hide: function () {
  18946. this.el.style.display = "none", this._show = !1;
  18947. },
  18948. hideLater: function (t) {
  18949. !this._show || this._inContent && this._enterable || (t ? (this._hideDelay = t, this._show = !1, this._hideTimeout = setTimeout(y(this.hide, this), t)) : this.hide());
  18950. },
  18951. isShow: function () {
  18952. return this._show;
  18953. },
  18954. getOuterSize: function () {
  18955. var t = this.el.clientWidth,
  18956. e = this.el.clientHeight;
  18957. if (document.defaultView && document.defaultView.getComputedStyle) {
  18958. var i = document.defaultView.getComputedStyle(this.el);
  18959. i && (t += parseInt(i.borderLeftWidth, 10) + parseInt(i.borderRightWidth, 10), e += parseInt(i.borderTopWidth, 10) + parseInt(i.borderBottomWidth, 10));
  18960. }
  18961. return {
  18962. width: t,
  18963. height: e
  18964. };
  18965. }
  18966. }, np.prototype = {
  18967. constructor: np,
  18968. _enterable: !0,
  18969. update: function () {},
  18970. show: function () {
  18971. this._hideTimeout && clearTimeout(this._hideTimeout), this.el.attr("show", !0), this._show = !0;
  18972. },
  18973. setContent: function (t, e, i) {
  18974. this.el && this._zr.remove(this.el);
  18975. for (var n = {}, r = t, a = "{marker", o = "|}", s = r.indexOf(a); s >= 0;) {
  18976. var l = r.indexOf(o),
  18977. u = r.substr(s + a.length, l - s - a.length);
  18978. n["marker" + u] = u.indexOf("sub") > -1 ? {
  18979. textWidth: 4,
  18980. textHeight: 4,
  18981. textBorderRadius: 2,
  18982. textBackgroundColor: e[u],
  18983. textOffset: [3, 0]
  18984. } : {
  18985. textWidth: 10,
  18986. textHeight: 10,
  18987. textBorderRadius: 5,
  18988. textBackgroundColor: e[u]
  18989. }, r = r.substr(l + 1), s = r.indexOf("{marker");
  18990. }
  18991. this.el = new $y({
  18992. style: {
  18993. rich: n,
  18994. text: t,
  18995. textLineHeight: 20,
  18996. textBackgroundColor: i.get("backgroundColor"),
  18997. textBorderRadius: i.get("borderRadius"),
  18998. textFill: i.get("textStyle.color"),
  18999. textPadding: i.get("padding")
  19000. },
  19001. z: i.get("z")
  19002. }), this._zr.add(this.el);
  19003. var h = this;
  19004. this.el.on("mouseover", function () {
  19005. h._enterable && (clearTimeout(h._hideTimeout), h._show = !0), h._inContent = !0;
  19006. }), this.el.on("mouseout", function () {
  19007. h._enterable && h._show && h.hideLater(h._hideDelay), h._inContent = !1;
  19008. });
  19009. },
  19010. setEnterable: function (t) {
  19011. this._enterable = t;
  19012. },
  19013. getSize: function () {
  19014. var t = this.el.getBoundingRect();
  19015. return [t.width, t.height];
  19016. },
  19017. moveTo: function (t, e) {
  19018. this.el && this.el.attr("position", [t, e]);
  19019. },
  19020. hide: function () {
  19021. this.el && this.el.hide(), this._show = !1;
  19022. },
  19023. hideLater: function (t) {
  19024. !this._show || this._inContent && this._enterable || (t ? (this._hideDelay = t, this._show = !1, this._hideTimeout = setTimeout(y(this.hide, this), t)) : this.hide());
  19025. },
  19026. isShow: function () {
  19027. return this._show;
  19028. },
  19029. getOuterSize: function () {
  19030. var t = this.getSize();
  19031. return {
  19032. width: t[0],
  19033. height: t[1]
  19034. };
  19035. }
  19036. };
  19037. var sT = y,
  19038. lT = f,
  19039. uT = so,
  19040. hT = new u_({
  19041. shape: {
  19042. x: -1,
  19043. y: -1,
  19044. width: 2,
  19045. height: 2
  19046. }
  19047. });
  19048. vu({
  19049. type: "tooltip",
  19050. init: function (t, e) {
  19051. if (!Mg.node) {
  19052. var i = t.getComponent("tooltip"),
  19053. n = i.get("renderMode");
  19054. this._renderMode = tr(n);
  19055. var r;
  19056. "html" === this._renderMode ? (r = new ip(e.getDom(), e), this._newLine = "<br/>") : (r = new np(e), this._newLine = "\n"), this._tooltipContent = r;
  19057. }
  19058. },
  19059. render: function (t, e, i) {
  19060. if (!Mg.node) {
  19061. this.group.removeAll(), this._tooltipModel = t, this._ecModel = e, this._api = i, this._lastDataByCoordSys = null, this._alwaysShowContent = t.get("alwaysShowContent");
  19062. var n = this._tooltipContent;
  19063. n.update(), n.setEnterable(t.get("enterable")), this._initGlobalListener(), this._keepShow();
  19064. }
  19065. },
  19066. _initGlobalListener: function () {
  19067. var t = this._tooltipModel,
  19068. e = t.get("triggerOn");
  19069. wf("itemTooltip", this._api, sT(function (t, i, n) {
  19070. "none" !== e && (e.indexOf(t) >= 0 ? this._tryShow(i, n) : "leave" === t && this._hide(n));
  19071. }, this));
  19072. },
  19073. _keepShow: function () {
  19074. var t = this._tooltipModel,
  19075. e = this._ecModel,
  19076. i = this._api;
  19077. if (null != this._lastX && null != this._lastY && "none" !== t.get("triggerOn")) {
  19078. var n = this;
  19079. clearTimeout(this._refreshUpdateTimeout), this._refreshUpdateTimeout = setTimeout(function () {
  19080. !i.isDisposed() && n.manuallyShowTip(t, e, i, {
  19081. x: n._lastX,
  19082. y: n._lastY
  19083. });
  19084. });
  19085. }
  19086. },
  19087. manuallyShowTip: function (t, e, i, n) {
  19088. if (n.from !== this.uid && !Mg.node) {
  19089. var r = ap(n, i);
  19090. this._ticket = "";
  19091. var a = n.dataByCoordSys;
  19092. if (n.tooltip && null != n.x && null != n.y) {
  19093. var o = hT;
  19094. o.position = [n.x, n.y], o.update(), o.tooltip = n.tooltip, this._tryShow({
  19095. offsetX: n.x,
  19096. offsetY: n.y,
  19097. target: o
  19098. }, r);
  19099. } else if (a) this._tryShow({
  19100. offsetX: n.x,
  19101. offsetY: n.y,
  19102. position: n.position,
  19103. event: {},
  19104. dataByCoordSys: n.dataByCoordSys,
  19105. tooltipOption: n.tooltipOption
  19106. }, r);else if (null != n.seriesIndex) {
  19107. if (this._manuallyAxisShowTip(t, e, i, n)) return;
  19108. var s = CI(n, e),
  19109. l = s.point[0],
  19110. u = s.point[1];
  19111. null != l && null != u && this._tryShow({
  19112. offsetX: l,
  19113. offsetY: u,
  19114. position: n.position,
  19115. target: s.el,
  19116. event: {}
  19117. }, r);
  19118. } else null != n.x && null != n.y && (i.dispatchAction({
  19119. type: "updateAxisPointer",
  19120. x: n.x,
  19121. y: n.y
  19122. }), this._tryShow({
  19123. offsetX: n.x,
  19124. offsetY: n.y,
  19125. position: n.position,
  19126. target: i.getZr().findHover(n.x, n.y).target,
  19127. event: {}
  19128. }, r));
  19129. }
  19130. },
  19131. manuallyHideTip: function (t, e, i, n) {
  19132. var r = this._tooltipContent;
  19133. !this._alwaysShowContent && this._tooltipModel && r.hideLater(this._tooltipModel.get("hideDelay")), this._lastX = this._lastY = null, n.from !== this.uid && this._hide(ap(n, i));
  19134. },
  19135. _manuallyAxisShowTip: function (t, e, i, n) {
  19136. var r = n.seriesIndex,
  19137. a = n.dataIndex,
  19138. o = e.getComponent("axisPointer").coordSysAxesInfo;
  19139. if (null != r && null != a && null != o) {
  19140. var s = e.getSeriesByIndex(r);
  19141. if (s) {
  19142. var l = s.getData(),
  19143. t = rp([l.getItemModel(a), s, (s.coordinateSystem || {}).model, t]);
  19144. if ("axis" === t.get("trigger")) return i.dispatchAction({
  19145. type: "updateAxisPointer",
  19146. seriesIndex: r,
  19147. dataIndex: a,
  19148. position: n.position
  19149. }), !0;
  19150. }
  19151. }
  19152. },
  19153. _tryShow: function (t, e) {
  19154. var i = t.target,
  19155. n = this._tooltipModel;
  19156. if (n) {
  19157. this._lastX = t.offsetX, this._lastY = t.offsetY;
  19158. var r = t.dataByCoordSys;
  19159. r && r.length ? this._showAxisTooltip(r, t) : i && null != i.dataIndex ? (this._lastDataByCoordSys = null, this._showSeriesItemTooltip(t, i, e)) : i && i.tooltip ? (this._lastDataByCoordSys = null, this._showComponentItemTooltip(t, i, e)) : (this._lastDataByCoordSys = null, this._hide(e));
  19160. }
  19161. },
  19162. _showOrMove: function (t, e) {
  19163. var i = t.get("showDelay");
  19164. e = y(e, this), clearTimeout(this._showTimout), i > 0 ? this._showTimout = setTimeout(e, i) : e();
  19165. },
  19166. _showAxisTooltip: function (t, e) {
  19167. var i = this._ecModel,
  19168. n = this._tooltipModel,
  19169. a = [e.offsetX, e.offsetY],
  19170. o = [],
  19171. s = [],
  19172. l = rp([e.tooltipOption, n]),
  19173. u = this._renderMode,
  19174. h = this._newLine,
  19175. c = {};
  19176. lT(t, function (t) {
  19177. lT(t.dataByAxis, function (t) {
  19178. var e = i.getComponent(t.axisDim + "Axis", t.axisIndex),
  19179. n = t.value,
  19180. a = [];
  19181. if (e && null != n) {
  19182. var l = Bf(n, e.axis, i, t.seriesDataIndices, t.valueLabelOpt);
  19183. f(t.seriesDataIndices, function (o) {
  19184. var h = i.getSeriesByIndex(o.seriesIndex),
  19185. d = o.dataIndexInside,
  19186. f = h && h.getDataParams(d);
  19187. if (f.axisDim = t.axisDim, f.axisIndex = t.axisIndex, f.axisType = t.axisType, f.axisId = t.axisId, f.axisValue = Ih(e.axis, n), f.axisValueLabel = l, f) {
  19188. s.push(f);
  19189. var p,
  19190. g = h.formatTooltip(d, !0, null, u);
  19191. if (S(g)) {
  19192. p = g.html;
  19193. var m = g.markers;
  19194. r(c, m);
  19195. } else p = g;
  19196. a.push(p);
  19197. }
  19198. });
  19199. var d = l;
  19200. o.push("html" !== u ? a.join(h) : (d ? To(d) + h : "") + a.join(h));
  19201. }
  19202. });
  19203. }, this), o.reverse(), o = o.join(this._newLine + this._newLine);
  19204. var d = e.position;
  19205. this._showOrMove(l, function () {
  19206. this._updateContentNotChangedOnAxis(t) ? this._updatePosition(l, d, a[0], a[1], this._tooltipContent, s) : this._showTooltipContent(l, o, s, Math.random(), a[0], a[1], d, void 0, c);
  19207. });
  19208. },
  19209. _showSeriesItemTooltip: function (t, e, i) {
  19210. var n = this._ecModel,
  19211. r = e.seriesIndex,
  19212. a = n.getSeriesByIndex(r),
  19213. o = e.dataModel || a,
  19214. s = e.dataIndex,
  19215. l = e.dataType,
  19216. u = o.getData(),
  19217. h = rp([u.getItemModel(s), o, a && (a.coordinateSystem || {}).model, this._tooltipModel]),
  19218. c = h.get("trigger");
  19219. if (null == c || "item" === c) {
  19220. var d,
  19221. f,
  19222. p = o.getDataParams(s, l),
  19223. g = o.formatTooltip(s, !1, l, this._renderMode);
  19224. S(g) ? (d = g.html, f = g.markers) : (d = g, f = null);
  19225. var m = "item_" + o.name + "_" + s;
  19226. this._showOrMove(h, function () {
  19227. this._showTooltipContent(h, d, p, m, t.offsetX, t.offsetY, t.position, t.target, f);
  19228. }), i({
  19229. type: "showTip",
  19230. dataIndexInside: s,
  19231. dataIndex: u.getRawIndex(s),
  19232. seriesIndex: r,
  19233. from: this.uid
  19234. });
  19235. }
  19236. },
  19237. _showComponentItemTooltip: function (t, e, i) {
  19238. var n = e.tooltip;
  19239. if ("string" == typeof n) {
  19240. var r = n;
  19241. n = {
  19242. content: r,
  19243. formatter: r
  19244. };
  19245. }
  19246. var a = new Ja(n, this._tooltipModel, this._ecModel),
  19247. o = a.get("content"),
  19248. s = Math.random();
  19249. this._showOrMove(a, function () {
  19250. this._showTooltipContent(a, o, a.get("formatterParams") || {}, s, t.offsetX, t.offsetY, t.position, e);
  19251. }), i({
  19252. type: "showTip",
  19253. from: this.uid
  19254. });
  19255. },
  19256. _showTooltipContent: function (t, e, i, n, r, a, o, s, l) {
  19257. if (this._ticket = "", t.get("showContent") && t.get("show")) {
  19258. var u = this._tooltipContent,
  19259. h = t.get("formatter");
  19260. o = o || t.get("position");
  19261. var c = e;
  19262. if (h && "string" == typeof h) c = Co(h, i, !0);else if ("function" == typeof h) {
  19263. var d = sT(function (e, n) {
  19264. e === this._ticket && (u.setContent(n, l, t), this._updatePosition(t, o, r, a, u, i, s));
  19265. }, this);
  19266. this._ticket = n, c = h(i, n, d);
  19267. }
  19268. u.setContent(c, l, t), u.show(t), this._updatePosition(t, o, r, a, u, i, s);
  19269. }
  19270. },
  19271. _updatePosition: function (t, e, i, n, r, a, o) {
  19272. var s = this._api.getWidth(),
  19273. l = this._api.getHeight();
  19274. e = e || t.get("position");
  19275. var u = r.getSize(),
  19276. h = t.get("align"),
  19277. c = t.get("verticalAlign"),
  19278. d = o && o.getBoundingRect().clone();
  19279. if (o && d.applyTransform(o.transform), "function" == typeof e && (e = e([i, n], a, r.el, d, {
  19280. viewSize: [s, l],
  19281. contentSize: u.slice()
  19282. })), x(e)) i = uT(e[0], s), n = uT(e[1], l);else if (S(e)) {
  19283. e.width = u[0], e.height = u[1];
  19284. var f = Ro(e, {
  19285. width: s,
  19286. height: l
  19287. });
  19288. i = f.x, n = f.y, h = null, c = null;
  19289. } else if ("string" == typeof e && o) {
  19290. var p = lp(e, d, u);
  19291. i = p[0], n = p[1];
  19292. } else {
  19293. var p = op(i, n, r, s, l, h ? null : 20, c ? null : 20);
  19294. i = p[0], n = p[1];
  19295. }
  19296. if (h && (i -= up(h) ? u[0] / 2 : "right" === h ? u[0] : 0), c && (n -= up(c) ? u[1] / 2 : "bottom" === c ? u[1] : 0), t.get("confine")) {
  19297. var p = sp(i, n, r, s, l);
  19298. i = p[0], n = p[1];
  19299. }
  19300. r.moveTo(i, n);
  19301. },
  19302. _updateContentNotChangedOnAxis: function (t) {
  19303. var e = this._lastDataByCoordSys,
  19304. i = !!e && e.length === t.length;
  19305. return i && lT(e, function (e, n) {
  19306. var r = e.dataByAxis || {},
  19307. a = t[n] || {},
  19308. o = a.dataByAxis || [];
  19309. i &= r.length === o.length, i && lT(r, function (t, e) {
  19310. var n = o[e] || {},
  19311. r = t.seriesDataIndices || [],
  19312. a = n.seriesDataIndices || [];
  19313. i &= t.value === n.value && t.axisType === n.axisType && t.axisId === n.axisId && r.length === a.length, i && lT(r, function (t, e) {
  19314. var n = a[e];
  19315. i &= t.seriesIndex === n.seriesIndex && t.dataIndex === n.dataIndex;
  19316. });
  19317. });
  19318. }), this._lastDataByCoordSys = t, !!i;
  19319. },
  19320. _hide: function (t) {
  19321. this._lastDataByCoordSys = null, t({
  19322. type: "hideTip",
  19323. from: this.uid
  19324. });
  19325. },
  19326. dispose: function (t, e) {
  19327. Mg.node || (this._tooltipContent.hide(), Cf("itemTooltip", e));
  19328. }
  19329. }), uu({
  19330. type: "showTip",
  19331. event: "showTip",
  19332. update: "tooltip:manuallyShowTip"
  19333. }, function () {}), uu({
  19334. type: "hideTip",
  19335. event: "hideTip",
  19336. update: "tooltip:manuallyHideTip"
  19337. }, function () {});
  19338. var cT = Mo,
  19339. dT = To,
  19340. fT = mu({
  19341. type: "marker",
  19342. dependencies: ["series", "grid", "polar", "geo"],
  19343. init: function (t, e, i) {
  19344. this.mergeDefaultAndTheme(t, i), this._mergeOption(t, i, !1, !0);
  19345. },
  19346. isAnimationEnabled: function () {
  19347. if (Mg.node) return !1;
  19348. var t = this.__hostSeries;
  19349. return this.getShallow("animation") && t && t.isAnimationEnabled();
  19350. },
  19351. mergeOption: function (t, e) {
  19352. this._mergeOption(t, e, !1, !1);
  19353. },
  19354. _mergeOption: function (t, e, i, n) {
  19355. var r = this.constructor,
  19356. a = this.mainType + "Model";
  19357. i || e.eachSeries(function (t) {
  19358. var i = t.get(this.mainType, !0),
  19359. s = t[a];
  19360. return i && i.data ? (s ? s._mergeOption(i, e, !0) : (n && hp(i), f(i.data, function (t) {
  19361. t instanceof Array ? (hp(t[0]), hp(t[1])) : hp(t);
  19362. }), s = new r(i, this, e), o(s, {
  19363. mainType: this.mainType,
  19364. seriesIndex: t.seriesIndex,
  19365. name: t.name,
  19366. createdBySelf: !0
  19367. }), s.__hostSeries = t), void (t[a] = s)) : void (t[a] = null);
  19368. }, this);
  19369. },
  19370. formatTooltip: function (t) {
  19371. var e = this.getData(),
  19372. i = this.getRawValue(t),
  19373. n = x(i) ? p(i, cT).join(", ") : cT(i),
  19374. r = e.getName(t),
  19375. a = dT(this.name);
  19376. return (null != i || r) && (a += "<br />"), r && (a += dT(r), null != i && (a += " : ")), null != i && (a += dT(n)), a;
  19377. },
  19378. getData: function () {
  19379. return this._data;
  19380. },
  19381. setData: function (t) {
  19382. this._data = t;
  19383. }
  19384. });
  19385. c(fT, Wx), fT.extend({
  19386. type: "markPoint",
  19387. defaultOption: {
  19388. zlevel: 0,
  19389. z: 5,
  19390. symbol: "pin",
  19391. symbolSize: 50,
  19392. tooltip: {
  19393. trigger: "item"
  19394. },
  19395. label: {
  19396. show: !0,
  19397. position: "inside"
  19398. },
  19399. itemStyle: {
  19400. borderWidth: 2
  19401. },
  19402. emphasis: {
  19403. label: {
  19404. show: !0
  19405. }
  19406. }
  19407. }
  19408. });
  19409. var pT = u,
  19410. gT = _,
  19411. mT = {
  19412. min: gT(fp, "min"),
  19413. max: gT(fp, "max"),
  19414. average: gT(fp, "average")
  19415. },
  19416. vT = vu({
  19417. type: "marker",
  19418. init: function () {
  19419. this.markerGroupMap = N();
  19420. },
  19421. render: function (t, e, i) {
  19422. var n = this.markerGroupMap;
  19423. n.each(function (t) {
  19424. t.__keep = !1;
  19425. });
  19426. var r = this.type + "Model";
  19427. e.eachSeries(function (t) {
  19428. var n = t[r];
  19429. n && this.renderSeries(t, n, e, i);
  19430. }, this), n.each(function (t) {
  19431. !t.__keep && this.group.remove(t.group);
  19432. }, this);
  19433. },
  19434. renderSeries: function () {}
  19435. });
  19436. vT.extend({
  19437. type: "markPoint",
  19438. updateTransform: function (t, e, i) {
  19439. e.eachSeries(function (t) {
  19440. var e = t.markPointModel;
  19441. e && (xp(e.getData(), t, i), this.markerGroupMap.get(t.id).updateLayout(e));
  19442. }, this);
  19443. },
  19444. renderSeries: function (t, e, i, n) {
  19445. var r = t.coordinateSystem,
  19446. a = t.id,
  19447. o = t.getData(),
  19448. s = this.markerGroupMap,
  19449. l = s.get(a) || s.set(a, new $c()),
  19450. u = wp(r, t, e);
  19451. e.setData(u), xp(e.getData(), t, n), u.each(function (t) {
  19452. var i = u.getItemModel(t),
  19453. n = i.getShallow("symbol"),
  19454. r = i.getShallow("symbolSize"),
  19455. a = w(n),
  19456. s = w(r);
  19457. if (a || s) {
  19458. var l = e.getRawValue(t),
  19459. h = e.getDataParams(t);
  19460. a && (n = n(l, h)), s && (r = r(l, h));
  19461. }
  19462. u.setItemVisual(t, {
  19463. symbol: n,
  19464. symbolSize: r,
  19465. color: i.get("itemStyle.color") || o.getVisual("color")
  19466. });
  19467. }), l.updateData(u), this.group.add(l.group), u.eachItemGraphicEl(function (t) {
  19468. t.traverse(function (t) {
  19469. t.dataModel = e;
  19470. });
  19471. }), l.__keep = !0, l.group.silent = e.get("silent") || t.get("silent");
  19472. }
  19473. }), ou(function (t) {
  19474. t.markPoint = t.markPoint || {};
  19475. }), fT.extend({
  19476. type: "markLine",
  19477. defaultOption: {
  19478. zlevel: 0,
  19479. z: 5,
  19480. symbol: ["circle", "arrow"],
  19481. symbolSize: [8, 16],
  19482. precision: 2,
  19483. tooltip: {
  19484. trigger: "item"
  19485. },
  19486. label: {
  19487. show: !0,
  19488. position: "end"
  19489. },
  19490. lineStyle: {
  19491. type: "dashed"
  19492. },
  19493. emphasis: {
  19494. label: {
  19495. show: !0
  19496. },
  19497. lineStyle: {
  19498. width: 3
  19499. }
  19500. },
  19501. animationEasing: "linear"
  19502. }
  19503. });
  19504. var yT = c_.prototype,
  19505. _T = f_.prototype,
  19506. xT = ea({
  19507. type: "ec-line",
  19508. style: {
  19509. stroke: "#000",
  19510. fill: null
  19511. },
  19512. shape: {
  19513. x1: 0,
  19514. y1: 0,
  19515. x2: 0,
  19516. y2: 0,
  19517. percent: 1,
  19518. cpx1: null,
  19519. cpy1: null
  19520. },
  19521. buildPath: function (t, e) {
  19522. this[bp(e) ? "_buildPathLine" : "_buildPathCurve"](t, e);
  19523. },
  19524. _buildPathLine: yT.buildPath,
  19525. _buildPathCurve: _T.buildPath,
  19526. pointAt: function (t) {
  19527. return this[bp(this.shape) ? "_pointAtLine" : "_pointAtCurve"](t);
  19528. },
  19529. _pointAtLine: yT.pointAt,
  19530. _pointAtCurve: _T.pointAt,
  19531. tangentAt: function (t) {
  19532. var e = this.shape,
  19533. i = bp(e) ? [e.x2 - e.x1, e.y2 - e.y1] : this._tangentAtCurve(t);
  19534. return te(i, i);
  19535. },
  19536. _tangentAtCurve: _T.tangentAt
  19537. }),
  19538. wT = ["fromSymbol", "toSymbol"],
  19539. bT = Dp.prototype;
  19540. bT.beforeUpdate = Cp, bT._createLine = function (t, e, i) {
  19541. var n = t.hostModel,
  19542. r = t.getItemLayout(e),
  19543. a = Ip(r);
  19544. a.shape.percent = 0, Va(a, {
  19545. shape: {
  19546. percent: 1
  19547. }
  19548. }, n, e), this.add(a);
  19549. var o = new $y({
  19550. name: "label",
  19551. lineLabelOriginalOpacity: 1
  19552. });
  19553. this.add(o), f(wT, function (i) {
  19554. var n = Mp(i, t, e);
  19555. this.add(n), this[Sp(i)] = t.getItemVisual(e, i);
  19556. }, this), this._updateCommonStl(t, e, i);
  19557. }, bT.updateData = function (t, e, i) {
  19558. var n = t.hostModel,
  19559. r = this.childOfName("line"),
  19560. a = t.getItemLayout(e),
  19561. o = {
  19562. shape: {}
  19563. };
  19564. Tp(o.shape, a), Ga(r, o, n, e), f(wT, function (i) {
  19565. var n = t.getItemVisual(e, i),
  19566. r = Sp(i);
  19567. if (this[r] !== n) {
  19568. this.remove(this.childOfName(i));
  19569. var a = Mp(i, t, e);
  19570. this.add(a);
  19571. }
  19572. this[r] = n;
  19573. }, this), this._updateCommonStl(t, e, i);
  19574. }, bT._updateCommonStl = function (t, e, i) {
  19575. var n = t.hostModel,
  19576. r = this.childOfName("line"),
  19577. a = i && i.lineStyle,
  19578. o = i && i.hoverLineStyle,
  19579. l = i && i.labelModel,
  19580. u = i && i.hoverLabelModel;
  19581. if (!i || t.hasItemOption) {
  19582. var h = t.getItemModel(e);
  19583. a = h.getModel("lineStyle").getLineStyle(), o = h.getModel("emphasis.lineStyle").getLineStyle(), l = h.getModel("label"), u = h.getModel("emphasis.label");
  19584. }
  19585. var c = t.getItemVisual(e, "color"),
  19586. d = k(t.getItemVisual(e, "opacity"), a.opacity, 1);
  19587. r.useStyle(s({
  19588. strokeNoScale: !0,
  19589. fill: "none",
  19590. stroke: c,
  19591. opacity: d
  19592. }, a)), r.hoverStyle = o, f(wT, function (t) {
  19593. var e = this.childOfName(t);
  19594. e && (e.setColor(c), e.setStyle({
  19595. opacity: d
  19596. }));
  19597. }, this);
  19598. var p,
  19599. g,
  19600. m = l.getShallow("show"),
  19601. v = u.getShallow("show"),
  19602. y = this.childOfName("label");
  19603. if ((m || v) && (p = c || "#000", g = n.getFormattedLabel(e, "normal", t.dataType), null == g)) {
  19604. var _ = n.getRawValue(e);
  19605. g = null == _ ? t.getName(e) : isFinite(_) ? lo(_) : _;
  19606. }
  19607. var x = m ? g : null,
  19608. w = v ? A(n.getFormattedLabel(e, "emphasis", t.dataType), g) : null,
  19609. b = y.style;
  19610. (null != x || null != w) && (ka(y.style, l, {
  19611. text: x
  19612. }, {
  19613. autoColor: p
  19614. }), y.__textAlign = b.textAlign, y.__verticalAlign = b.textVerticalAlign, y.__position = l.get("position") || "middle"), y.hoverStyle = null != w ? {
  19615. text: w,
  19616. textFill: u.getTextColor(!0),
  19617. fontStyle: u.getShallow("fontStyle"),
  19618. fontWeight: u.getShallow("fontWeight"),
  19619. fontSize: u.getShallow("fontSize"),
  19620. fontFamily: u.getShallow("fontFamily")
  19621. } : {
  19622. text: null
  19623. }, y.ignore = !m && !v, Ma(this);
  19624. }, bT.highlight = function () {
  19625. this.trigger("emphasis");
  19626. }, bT.downplay = function () {
  19627. this.trigger("normal");
  19628. }, bT.updateLayout = function (t, e) {
  19629. this.setLinePoints(t.getItemLayout(e));
  19630. }, bT.setLinePoints = function (t) {
  19631. var e = this.childOfName("line");
  19632. Tp(e.shape, t), e.dirty();
  19633. }, h(Dp, Bm);
  19634. var ST = Ap.prototype;
  19635. ST.isPersistent = function () {
  19636. return !0;
  19637. }, ST.updateData = function (t) {
  19638. var e = this,
  19639. i = e.group,
  19640. n = e._lineData;
  19641. e._lineData = t, n || i.removeAll();
  19642. var r = Lp(t);
  19643. t.diff(n).add(function (i) {
  19644. kp(e, t, i, r);
  19645. }).update(function (i, a) {
  19646. Pp(e, n, t, a, i, r);
  19647. }).remove(function (t) {
  19648. i.remove(n.getItemGraphicEl(t));
  19649. }).execute();
  19650. }, ST.updateLayout = function () {
  19651. var t = this._lineData;
  19652. t && t.eachItemGraphicEl(function (e, i) {
  19653. e.updateLayout(t, i);
  19654. }, this);
  19655. }, ST.incrementalPrepareUpdate = function (t) {
  19656. this._seriesScope = Lp(t), this._lineData = null, this.group.removeAll();
  19657. }, ST.incrementalUpdate = function (t, e) {
  19658. function i(t) {
  19659. t.isGroup || (t.incremental = t.useHoverLayer = !0);
  19660. }
  19661. for (var n = t.start; n < t.end; n++) {
  19662. var r = e.getItemLayout(n);
  19663. if (zp(r)) {
  19664. var a = new this._ctor(e, n, this._seriesScope);
  19665. a.traverse(i), this.group.add(a), e.setItemGraphicEl(n, a);
  19666. }
  19667. }
  19668. }, ST.remove = function () {
  19669. this._clearIncremental(), this._incremental = null, this.group.removeAll();
  19670. }, ST._clearIncremental = function () {
  19671. var t = this._incremental;
  19672. t && t.clearDisplaybles();
  19673. };
  19674. var MT = function (t, e, i, a) {
  19675. var s = t.getData(),
  19676. l = a.type;
  19677. if (!x(a) && ("min" === l || "max" === l || "average" === l || "median" === l || null != a.xAxis || null != a.yAxis)) {
  19678. var u, h;
  19679. if (null != a.yAxis || null != a.xAxis) u = e.getAxis(null != a.yAxis ? "y" : "x"), h = D(a.yAxis, a.xAxis);else {
  19680. var c = gp(a, s, e, t);
  19681. u = c.valueAxis;
  19682. var d = qu(s, c.valueDataDim);
  19683. h = _p(s, d, l);
  19684. }
  19685. var f = "x" === u.dim ? 0 : 1,
  19686. p = 1 - f,
  19687. g = n(a),
  19688. m = {};
  19689. g.type = null, g.coord = [], m.coord = [], g.coord[p] = -1 / 0, m.coord[p] = 1 / 0;
  19690. var v = i.get("precision");
  19691. v >= 0 && "number" == typeof h && (h = +h.toFixed(Math.min(v, 20))), g.coord[f] = m.coord[f] = h, a = [g, m, {
  19692. type: l,
  19693. valueIndex: a.valueIndex,
  19694. value: h
  19695. }];
  19696. }
  19697. return a = [pp(t, a[0]), pp(t, a[1]), o({}, a[2])], a[2].type = a[2].type || "", r(a[2], a[0]), r(a[2], a[1]), a;
  19698. };
  19699. vT.extend({
  19700. type: "markLine",
  19701. updateTransform: function (t, e, i) {
  19702. e.eachSeries(function (t) {
  19703. var e = t.markLineModel;
  19704. if (e) {
  19705. var n = e.getData(),
  19706. r = e.__from,
  19707. a = e.__to;
  19708. r.each(function (e) {
  19709. Np(r, e, !0, t, i), Np(a, e, !1, t, i);
  19710. }), n.each(function (t) {
  19711. n.setItemLayout(t, [r.getItemLayout(t), a.getItemLayout(t)]);
  19712. }), this.markerGroupMap.get(t.id).updateLayout();
  19713. }
  19714. }, this);
  19715. },
  19716. renderSeries: function (t, e, i, n) {
  19717. function r(e, i, r) {
  19718. var a = e.getItemModel(i);
  19719. Np(e, i, r, t, n), e.setItemVisual(i, {
  19720. symbolSize: a.get("symbolSize") || g[r ? 0 : 1],
  19721. symbol: a.get("symbol", !0) || p[r ? 0 : 1],
  19722. color: a.get("itemStyle.color") || s.getVisual("color")
  19723. });
  19724. }
  19725. var a = t.coordinateSystem,
  19726. o = t.id,
  19727. s = t.getData(),
  19728. l = this.markerGroupMap,
  19729. u = l.get(o) || l.set(o, new Ap());
  19730. this.group.add(u.group);
  19731. var h = Fp(a, t, e),
  19732. c = h.from,
  19733. d = h.to,
  19734. f = h.line;
  19735. e.__from = c, e.__to = d, e.setData(f);
  19736. var p = e.get("symbol"),
  19737. g = e.get("symbolSize");
  19738. x(p) || (p = [p, p]), "number" == typeof g && (g = [g, g]), h.from.each(function (t) {
  19739. r(c, t, !0), r(d, t, !1);
  19740. }), f.each(function (t) {
  19741. var e = f.getItemModel(t).get("lineStyle.color");
  19742. f.setItemVisual(t, {
  19743. color: e || c.getItemVisual(t, "color")
  19744. }), f.setItemLayout(t, [c.getItemLayout(t), d.getItemLayout(t)]), f.setItemVisual(t, {
  19745. fromSymbolSize: c.getItemVisual(t, "symbolSize"),
  19746. fromSymbol: c.getItemVisual(t, "symbol"),
  19747. toSymbolSize: d.getItemVisual(t, "symbolSize"),
  19748. toSymbol: d.getItemVisual(t, "symbol")
  19749. });
  19750. }), u.updateData(f), h.line.eachItemGraphicEl(function (t) {
  19751. t.traverse(function (t) {
  19752. t.dataModel = e;
  19753. });
  19754. }), u.__keep = !0, u.group.silent = e.get("silent") || t.get("silent");
  19755. }
  19756. }), ou(function (t) {
  19757. t.markLine = t.markLine || {};
  19758. }), fT.extend({
  19759. type: "markArea",
  19760. defaultOption: {
  19761. zlevel: 0,
  19762. z: 1,
  19763. tooltip: {
  19764. trigger: "item"
  19765. },
  19766. animation: !1,
  19767. label: {
  19768. show: !0,
  19769. position: "top"
  19770. },
  19771. itemStyle: {
  19772. borderWidth: 0
  19773. },
  19774. emphasis: {
  19775. label: {
  19776. show: !0,
  19777. position: "top"
  19778. }
  19779. }
  19780. }
  19781. });
  19782. var IT = function (t, e, i, n) {
  19783. var r = pp(t, n[0]),
  19784. o = pp(t, n[1]),
  19785. s = D,
  19786. l = r.coord,
  19787. u = o.coord;
  19788. 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);
  19789. var h = a([{}, r, o]);
  19790. return h.coord = [r.coord, o.coord], h.x0 = r.x, h.y0 = r.y, h.x1 = o.x, h.y1 = o.y, h;
  19791. },
  19792. TT = [["x0", "y0"], ["x1", "y0"], ["x1", "y1"], ["x0", "y1"]];
  19793. vT.extend({
  19794. type: "markArea",
  19795. updateTransform: function (t, e, i) {
  19796. e.eachSeries(function (t) {
  19797. var e = t.markAreaModel;
  19798. if (e) {
  19799. var n = e.getData();
  19800. n.each(function (e) {
  19801. var r = p(TT, function (r) {
  19802. return Wp(n, e, r, t, i);
  19803. });
  19804. n.setItemLayout(e, r);
  19805. var a = n.getItemGraphicEl(e);
  19806. a.setShape("points", r);
  19807. });
  19808. }
  19809. }, this);
  19810. },
  19811. renderSeries: function (t, e, i, n) {
  19812. var r = t.coordinateSystem,
  19813. a = t.id,
  19814. o = t.getData(),
  19815. l = this.markerGroupMap,
  19816. u = l.get(a) || l.set(a, {
  19817. group: new Bm()
  19818. });
  19819. this.group.add(u.group), u.__keep = !0;
  19820. var h = Up(r, t, e);
  19821. e.setData(h), h.each(function (e) {
  19822. h.setItemLayout(e, p(TT, function (i) {
  19823. return Wp(h, e, i, t, n);
  19824. })), h.setItemVisual(e, {
  19825. color: o.getVisual("color")
  19826. });
  19827. }), h.diff(u.__data).add(function (t) {
  19828. var e = new a_({
  19829. shape: {
  19830. points: h.getItemLayout(t)
  19831. }
  19832. });
  19833. h.setItemGraphicEl(t, e), u.group.add(e);
  19834. }).update(function (t, i) {
  19835. var n = u.__data.getItemGraphicEl(i);
  19836. Ga(n, {
  19837. shape: {
  19838. points: h.getItemLayout(t)
  19839. }
  19840. }, e, t), u.group.add(n), h.setItemGraphicEl(t, n);
  19841. }).remove(function (t) {
  19842. var e = u.__data.getItemGraphicEl(t);
  19843. u.group.remove(e);
  19844. }).execute(), h.eachItemGraphicEl(function (t, i) {
  19845. var n = h.getItemModel(i),
  19846. r = n.getModel("label"),
  19847. a = n.getModel("emphasis.label"),
  19848. o = h.getItemVisual(i, "color");
  19849. t.useStyle(s(n.getModel("itemStyle").getItemStyle(), {
  19850. fill: ni(o, .4),
  19851. stroke: o
  19852. })), t.hoverStyle = n.getModel("emphasis.itemStyle").getItemStyle(), Da(t.style, t.hoverStyle, r, a, {
  19853. labelFetcher: e,
  19854. labelDataIndex: i,
  19855. defaultText: h.getName(i) || "",
  19856. isRectText: !0,
  19857. autoColor: o
  19858. }), Ma(t, {}), t.dataModel = e;
  19859. }), u.__data = h, u.group.silent = e.get("silent") || t.get("silent");
  19860. }
  19861. }), ou(function (t) {
  19862. t.markArea = t.markArea || {};
  19863. });
  19864. var CT = "http://www.w3.org/2000/svg",
  19865. DT = Ty.CMD,
  19866. AT = Array.prototype.join,
  19867. kT = "none",
  19868. PT = Math.round,
  19869. LT = Math.sin,
  19870. OT = Math.cos,
  19871. zT = Math.PI,
  19872. ET = 2 * Math.PI,
  19873. RT = 180 / zT,
  19874. BT = 1e-4,
  19875. NT = {};
  19876. NT.brush = function (t) {
  19877. var e = t.style,
  19878. i = t.__svgEl;
  19879. i || (i = Xp("path"), t.__svgEl = i), t.path || t.createPathProxy();
  19880. var n = t.path;
  19881. if (t.__dirtyPath) {
  19882. n.beginPath(), n.subPixelOptimize = !1, t.buildPath(n, t.shape), t.__dirtyPath = !1;
  19883. var r = tg(n);
  19884. r.indexOf("NaN") < 0 && $p(i, "d", r);
  19885. }
  19886. Jp(i, e, !1, t), Kp(i, t.transform), null != e.text && XT(t, t.getBoundingRect());
  19887. };
  19888. var FT = {};
  19889. FT.brush = function (t) {
  19890. var e = t.style,
  19891. i = e.image;
  19892. if (i instanceof HTMLImageElement) {
  19893. var n = i.src;
  19894. i = n;
  19895. }
  19896. if (i) {
  19897. var r = e.x || 0,
  19898. a = e.y || 0,
  19899. o = e.width,
  19900. s = e.height,
  19901. l = t.__svgEl;
  19902. l || (l = Xp("image"), t.__svgEl = l), i !== t.__imageSrc && (Qp(l, "href", i), t.__imageSrc = i), $p(l, "width", o), $p(l, "height", s), $p(l, "x", r), $p(l, "y", a), Kp(l, t.transform), null != e.text && XT(t, t.getBoundingRect());
  19903. }
  19904. };
  19905. var GT = {},
  19906. VT = new wi(),
  19907. HT = {},
  19908. WT = [],
  19909. UT = {
  19910. left: "start",
  19911. right: "end",
  19912. center: "middle",
  19913. middle: "middle"
  19914. },
  19915. XT = function (t, e) {
  19916. var i = t.style,
  19917. n = t.transform,
  19918. r = t instanceof $y || i.transformText;
  19919. t.__dirty && rn(i, !0);
  19920. var a = i.text;
  19921. if (null != a && (a += ""), wn(a, i)) {
  19922. null == a && (a = ""), !r && n && (VT.copy(e), VT.applyTransform(n), e = VT);
  19923. var o = t.__textSvgEl;
  19924. o || (o = Xp("text"), t.__textSvgEl = o);
  19925. var s = o.style,
  19926. l = i.font || rv,
  19927. u = o.__computedFont;
  19928. l !== o.__styleFont && (s.font = o.__styleFont = l, u = o.__computedFont = s.font);
  19929. var h = i.textPadding,
  19930. c = i.textLineHeight,
  19931. d = t.__textCotentBlock;
  19932. (!d || t.__dirtyText) && (d = t.__textCotentBlock = Qi(a, u, h, c, i.truncate));
  19933. var f = d.outerHeight,
  19934. p = d.lineHeight;
  19935. gn(HT, t, i, e);
  19936. var g = HT.baseX,
  19937. m = HT.baseY,
  19938. v = HT.textAlign || "left",
  19939. y = HT.textVerticalAlign;
  19940. eg(o, r, n, i, e, g, m);
  19941. var _ = Ui(m, f, y),
  19942. x = g,
  19943. w = _;
  19944. h && (x = ig(g, v, h), w += h[0]), w += p / 2, Jp(o, i, !0, t);
  19945. var b = d.canCacheByTextString,
  19946. S = t.__tspanList || (t.__tspanList = []),
  19947. M = S.length;
  19948. if (b && t.__canCacheByTextString && t.__text === a) {
  19949. if (t.__dirtyText && M) for (var I = 0; M > I; ++I) ng(S[I], v, x, w + I * p);
  19950. } else {
  19951. t.__text = a, t.__canCacheByTextString = b;
  19952. for (var T = d.lines, C = T.length, I = 0; C > I; I++) {
  19953. var D = S[I],
  19954. A = T[I];
  19955. D ? D.__zrText !== A && (D.innerHTML = "", D.appendChild(document.createTextNode(A))) : (D = S[I] = Xp("tspan"), o.appendChild(D), D.appendChild(document.createTextNode(A))), ng(D, v, x, w + I * p);
  19956. }
  19957. if (M > C) {
  19958. for (; M > I; I++) o.removeChild(S[I]);
  19959. S.length = C;
  19960. }
  19961. }
  19962. }
  19963. };
  19964. GT.drawRectText = XT, GT.brush = function (t) {
  19965. var e = t.style;
  19966. null != e.text && XT(t, !1);
  19967. }, rg.prototype = {
  19968. diff: function (t, e, i) {
  19969. function n() {
  19970. for (var i = -1 * s; s >= i; i += 2) {
  19971. var n,
  19972. l = u[i - 1],
  19973. h = u[i + 1],
  19974. c = (h ? h.newPos : 0) - i;
  19975. l && (u[i - 1] = void 0);
  19976. var d = l && l.newPos + 1 < a,
  19977. f = h && c >= 0 && o > c;
  19978. if (d || f) {
  19979. if (!d || f && l.newPos < h.newPos ? (n = og(h), r.pushComponent(n.components, void 0, !0)) : (n = l, n.newPos++, r.pushComponent(n.components, !0, void 0)), c = r.extractCommon(n, e, t, i), n.newPos + 1 >= a && c + 1 >= o) return ag(r, n.components, e, t);
  19980. u[i] = n;
  19981. } else u[i] = void 0;
  19982. }
  19983. s++;
  19984. }
  19985. i || (i = function (t, e) {
  19986. return t === e;
  19987. }), this.equals = i;
  19988. var r = this;
  19989. t = t.slice(), e = e.slice();
  19990. var a = e.length,
  19991. o = t.length,
  19992. s = 1,
  19993. l = a + o,
  19994. u = [{
  19995. newPos: -1,
  19996. components: []
  19997. }],
  19998. h = this.extractCommon(u[0], e, t, 0);
  19999. if (u[0].newPos + 1 >= a && h + 1 >= o) {
  20000. for (var c = [], d = 0; d < e.length; d++) c.push(d);
  20001. return [{
  20002. indices: c,
  20003. count: e.length
  20004. }];
  20005. }
  20006. for (; l >= s;) {
  20007. var f = n();
  20008. if (f) return f;
  20009. }
  20010. },
  20011. pushComponent: function (t, e, i) {
  20012. var n = t[t.length - 1];
  20013. n && n.added === e && n.removed === i ? t[t.length - 1] = {
  20014. count: n.count + 1,
  20015. added: e,
  20016. removed: i
  20017. } : t.push({
  20018. count: 1,
  20019. added: e,
  20020. removed: i
  20021. });
  20022. },
  20023. extractCommon: function (t, e, i, n) {
  20024. for (var r = e.length, a = i.length, o = t.newPos, s = o - n, l = 0; r > o + 1 && a > s + 1 && this.equals(e[o + 1], i[s + 1]);) o++, s++, l++;
  20025. return l && t.components.push({
  20026. count: l
  20027. }), t.newPos = o, s;
  20028. },
  20029. tokenize: function (t) {
  20030. return t.slice();
  20031. },
  20032. join: function (t) {
  20033. return t.slice();
  20034. }
  20035. };
  20036. var YT = new rg(),
  20037. jT = function (t, e, i) {
  20038. return YT.diff(t, e, i);
  20039. },
  20040. qT = "0",
  20041. ZT = "1";
  20042. sg.prototype.createElement = Xp, sg.prototype.getDefs = function (t) {
  20043. var e = this._svgRoot,
  20044. i = this._svgRoot.getElementsByTagName("defs");
  20045. return 0 === i.length ? t ? (i = e.insertBefore(this.createElement("defs"), e.firstChild), i.contains || (i.contains = function (t) {
  20046. var e = i.children;
  20047. if (!e) return !1;
  20048. for (var n = e.length - 1; n >= 0; --n) if (e[n] === t) return !0;
  20049. return !1;
  20050. }), i) : null : i[0];
  20051. }, sg.prototype.update = function (t, e) {
  20052. if (t) {
  20053. var i = this.getDefs(!1);
  20054. if (t[this._domName] && i.contains(t[this._domName])) "function" == typeof e && e(t);else {
  20055. var n = this.add(t);
  20056. n && (t[this._domName] = n);
  20057. }
  20058. }
  20059. }, sg.prototype.addDom = function (t) {
  20060. var e = this.getDefs(!0);
  20061. e.appendChild(t);
  20062. }, sg.prototype.removeDom = function (t) {
  20063. var e = this.getDefs(!1);
  20064. e && t[this._domName] && (e.removeChild(t[this._domName]), t[this._domName] = null);
  20065. }, sg.prototype.getDoms = function () {
  20066. var t = this.getDefs(!1);
  20067. if (!t) return [];
  20068. var e = [];
  20069. return f(this._tagNames, function (i) {
  20070. var n = t.getElementsByTagName(i);
  20071. e = e.concat([].slice.call(n));
  20072. }), e;
  20073. }, sg.prototype.markAllUnused = function () {
  20074. var t = this.getDoms(),
  20075. e = this;
  20076. f(t, function (t) {
  20077. t[e._markLabel] = qT;
  20078. });
  20079. }, sg.prototype.markUsed = function (t) {
  20080. t && (t[this._markLabel] = ZT);
  20081. }, sg.prototype.removeUnused = function () {
  20082. var t = this.getDefs(!1);
  20083. if (t) {
  20084. var e = this.getDoms(),
  20085. i = this;
  20086. f(e, function (e) {
  20087. e[i._markLabel] !== ZT && t.removeChild(e);
  20088. });
  20089. }
  20090. }, sg.prototype.getSvgProxy = function (t) {
  20091. return t instanceof Vr ? NT : t instanceof Sn ? FT : t instanceof $y ? GT : NT;
  20092. }, sg.prototype.getTextSvgElement = function (t) {
  20093. return t.__textSvgEl;
  20094. }, sg.prototype.getSvgElement = function (t) {
  20095. return t.__svgEl;
  20096. }, h(lg, sg), lg.prototype.addWithoutUpdate = function (t, e) {
  20097. if (e && e.style) {
  20098. var i = this;
  20099. f(["fill", "stroke"], function (n) {
  20100. if (e.style[n] && ("linear" === e.style[n].type || "radial" === e.style[n].type)) {
  20101. var r,
  20102. a = e.style[n],
  20103. o = i.getDefs(!0);
  20104. a._dom ? (r = a._dom, o.contains(a._dom) || i.addDom(r)) : r = i.add(a), i.markUsed(e);
  20105. var s = r.getAttribute("id");
  20106. t.setAttribute(n, "url(#" + s + ")");
  20107. }
  20108. });
  20109. }
  20110. }, lg.prototype.add = function (t) {
  20111. var e;
  20112. if ("linear" === t.type) e = this.createElement("linearGradient");else {
  20113. if ("radial" !== t.type) return Pm("Illegal gradient type."), null;
  20114. e = this.createElement("radialGradient");
  20115. }
  20116. return t.id = t.id || this.nextId++, e.setAttribute("id", "zr" + this._zrId + "-gradient-" + t.id), this.updateDom(t, e), this.addDom(e), e;
  20117. }, lg.prototype.update = function (t) {
  20118. var e = this;
  20119. sg.prototype.update.call(this, t, function () {
  20120. var i = t.type,
  20121. n = t._dom.tagName;
  20122. "linear" === i && "linearGradient" === n || "radial" === i && "radialGradient" === n ? e.updateDom(t, t._dom) : (e.removeDom(t), e.add(t));
  20123. });
  20124. }, lg.prototype.updateDom = function (t, e) {
  20125. if ("linear" === t.type) e.setAttribute("x1", t.x), e.setAttribute("y1", t.y), e.setAttribute("x2", t.x2), e.setAttribute("y2", t.y2);else {
  20126. if ("radial" !== t.type) return void Pm("Illegal gradient type.");
  20127. e.setAttribute("cx", t.x), e.setAttribute("cy", t.y), e.setAttribute("r", t.r);
  20128. }
  20129. t.global ? e.setAttribute("gradientUnits", "userSpaceOnUse") : e.setAttribute("gradientUnits", "objectBoundingBox"), e.innerHTML = "";
  20130. for (var i = t.colorStops, n = 0, r = i.length; r > n; ++n) {
  20131. var a = this.createElement("stop");
  20132. a.setAttribute("offset", 100 * i[n].offset + "%");
  20133. var o = i[n].color;
  20134. if (o.indexOf(!1)) {
  20135. var s = Ze(o)[3],
  20136. l = Je(o);
  20137. a.setAttribute("stop-color", "#" + l), a.setAttribute("stop-opacity", s);
  20138. } else a.setAttribute("stop-color", i[n].color);
  20139. e.appendChild(a);
  20140. }
  20141. t._dom = e;
  20142. }, lg.prototype.markUsed = function (t) {
  20143. if (t.style) {
  20144. var e = t.style.fill;
  20145. e && e._dom && sg.prototype.markUsed.call(this, e._dom), e = t.style.stroke, e && e._dom && sg.prototype.markUsed.call(this, e._dom);
  20146. }
  20147. }, h(ug, sg), ug.prototype.update = function (t) {
  20148. var e = this.getSvgElement(t);
  20149. e && this.updateDom(e, t.__clipPaths, !1);
  20150. var i = this.getTextSvgElement(t);
  20151. i && this.updateDom(i, t.__clipPaths, !0), this.markUsed(t);
  20152. }, ug.prototype.updateDom = function (t, e, i) {
  20153. if (e && e.length > 0) {
  20154. var n,
  20155. r,
  20156. a = this.getDefs(!0),
  20157. o = e[0],
  20158. s = i ? "_textDom" : "_dom";
  20159. o[s] ? (r = o[s].getAttribute("id"), n = o[s], a.contains(n) || a.appendChild(n)) : (r = "zr" + this._zrId + "-clip-" + this.nextId, ++this.nextId, n = this.createElement("clipPath"), n.setAttribute("id", r), a.appendChild(n), o[s] = n);
  20160. var l = this.getSvgProxy(o);
  20161. if (o.transform && o.parent.invTransform && !i) {
  20162. var u = Array.prototype.slice.call(o.transform);
  20163. Pe(o.transform, o.parent.invTransform, o.transform), l.brush(o), o.transform = u;
  20164. } else l.brush(o);
  20165. var h = this.getSvgElement(o);
  20166. n.innerHTML = "", n.appendChild(h.cloneNode()), t.setAttribute("clip-path", "url(#" + r + ")"), e.length > 1 && this.updateDom(n, e.slice(1), i);
  20167. } else t && t.setAttribute("clip-path", "none");
  20168. }, ug.prototype.markUsed = function (t) {
  20169. var e = this;
  20170. t.__clipPaths && f(t.__clipPaths, function (t) {
  20171. t._dom && sg.prototype.markUsed.call(e, t._dom), t._textDom && sg.prototype.markUsed.call(e, t._textDom);
  20172. });
  20173. }, h(hg, sg), hg.prototype.addWithoutUpdate = function (t, e) {
  20174. if (e && cg(e.style)) {
  20175. var i;
  20176. if (e._shadowDom) {
  20177. i = e._shadowDom;
  20178. var n = this.getDefs(!0);
  20179. n.contains(e._shadowDom) || this.addDom(i);
  20180. } else i = this.add(e);
  20181. this.markUsed(e);
  20182. var r = i.getAttribute("id");
  20183. t.style.filter = "url(#" + r + ")";
  20184. }
  20185. }, hg.prototype.add = function (t) {
  20186. var e = this.createElement("filter");
  20187. return t._shadowDomId = t._shadowDomId || this.nextId++, e.setAttribute("id", "zr" + this._zrId + "-shadow-" + t._shadowDomId), this.updateDom(t, e), this.addDom(e), e;
  20188. }, hg.prototype.update = function (t, e) {
  20189. var i = e.style;
  20190. if (cg(i)) {
  20191. var n = this;
  20192. sg.prototype.update.call(this, e, function () {
  20193. n.updateDom(e, e._shadowDom);
  20194. });
  20195. } else this.remove(t, e);
  20196. }, hg.prototype.remove = function (t, e) {
  20197. null != e._shadowDomId && (this.removeDom(t), t.style.filter = "");
  20198. }, hg.prototype.updateDom = function (t, e) {
  20199. var i = e.getElementsByTagName("feDropShadow");
  20200. i = 0 === i.length ? this.createElement("feDropShadow") : i[0];
  20201. var n,
  20202. r,
  20203. a,
  20204. o,
  20205. s = t.style,
  20206. l = t.scale ? t.scale[0] || 1 : 1,
  20207. u = t.scale ? t.scale[1] || 1 : 1;
  20208. if (s.shadowBlur || s.shadowOffsetX || s.shadowOffsetY) n = s.shadowOffsetX || 0, r = s.shadowOffsetY || 0, a = s.shadowBlur, o = s.shadowColor;else {
  20209. if (!s.textShadowBlur) return void this.removeDom(e, s);
  20210. n = s.textShadowOffsetX || 0, r = s.textShadowOffsetY || 0, a = s.textShadowBlur, o = s.textShadowColor;
  20211. }
  20212. i.setAttribute("dx", n / l), i.setAttribute("dy", r / u), i.setAttribute("flood-color", o);
  20213. var h = a / 2 / l,
  20214. c = a / 2 / u,
  20215. d = h + " " + c;
  20216. i.setAttribute("stdDeviation", d), e.setAttribute("x", "-100%"), e.setAttribute("y", "-100%"), e.setAttribute("width", Math.ceil(a / 2 * 200) + "%"), e.setAttribute("height", Math.ceil(a / 2 * 200) + "%"), e.appendChild(i), t._shadowDom = e;
  20217. }, hg.prototype.markUsed = function (t) {
  20218. t._shadowDom && sg.prototype.markUsed.call(this, t._shadowDom);
  20219. };
  20220. var KT = function (t, e, i, n) {
  20221. this.root = t, this.storage = e, this._opts = i = o({}, i || {});
  20222. var r = Xp("svg");
  20223. r.setAttribute("xmlns", "http://www.w3.org/2000/svg"), r.setAttribute("version", "1.1"), r.setAttribute("baseProfile", "full"), r.style.cssText = "user-select:none;position:absolute;left:0;top:0;", this.gradientManager = new lg(n, r), this.clipPathManager = new ug(n, r), this.shadowManager = new hg(n, r);
  20224. var a = document.createElement("div");
  20225. a.style.cssText = "overflow:hidden;position:relative", this._svgRoot = r, this._viewport = a, t.appendChild(a), a.appendChild(r), this.resize(i.width, i.height), this._visibleList = [];
  20226. };
  20227. KT.prototype = {
  20228. constructor: KT,
  20229. getType: function () {
  20230. return "svg";
  20231. },
  20232. getViewportRoot: function () {
  20233. return this._viewport;
  20234. },
  20235. getViewportRootOffset: function () {
  20236. var t = this.getViewportRoot();
  20237. return t ? {
  20238. offsetLeft: t.offsetLeft || 0,
  20239. offsetTop: t.offsetTop || 0
  20240. } : void 0;
  20241. },
  20242. refresh: function () {
  20243. var t = this.storage.getDisplayList(!0);
  20244. this._paintList(t);
  20245. },
  20246. setBackgroundColor: function (t) {
  20247. this._viewport.style.background = t;
  20248. },
  20249. _paintList: function (t) {
  20250. this.gradientManager.markAllUnused(), this.clipPathManager.markAllUnused(), this.shadowManager.markAllUnused();
  20251. var e,
  20252. i = this._svgRoot,
  20253. n = this._visibleList,
  20254. r = t.length,
  20255. a = [];
  20256. for (e = 0; r > e; e++) {
  20257. var o = t[e],
  20258. s = fg(o),
  20259. l = _g(o) || yg(o);
  20260. o.invisible || (o.__dirty && (s && s.brush(o), this.clipPathManager.update(o), o.style && (this.gradientManager.update(o.style.fill), this.gradientManager.update(o.style.stroke), this.shadowManager.update(l, o)), o.__dirty = !1), a.push(o));
  20261. }
  20262. var u,
  20263. h = jT(n, a);
  20264. for (e = 0; e < h.length; e++) {
  20265. var c = h[e];
  20266. if (c.removed) for (var d = 0; d < c.count; d++) {
  20267. var o = n[c.indices[d]],
  20268. l = _g(o),
  20269. f = yg(o);
  20270. vg(i, l), vg(i, f);
  20271. }
  20272. }
  20273. for (e = 0; e < h.length; e++) {
  20274. var c = h[e];
  20275. if (c.added) for (var d = 0; d < c.count; d++) {
  20276. var o = a[c.indices[d]],
  20277. l = _g(o),
  20278. f = yg(o);
  20279. u ? gg(i, l, u) : mg(i, l), l ? gg(i, f, l) : u ? gg(i, f, u) : mg(i, f), gg(i, f, l), u = f || l || u, this.gradientManager.addWithoutUpdate(l || f, o), this.shadowManager.addWithoutUpdate(l || f, o), this.clipPathManager.markUsed(o);
  20280. } else if (!c.removed) for (var d = 0; d < c.count; d++) {
  20281. var o = a[c.indices[d]];
  20282. u = yg(o) || _g(o) || u;
  20283. var l = _g(o),
  20284. f = yg(o);
  20285. this.gradientManager.markUsed(o), this.gradientManager.addWithoutUpdate(l || f, o), this.shadowManager.markUsed(o), this.shadowManager.addWithoutUpdate(l || f, o), this.clipPathManager.markUsed(o);
  20286. }
  20287. }
  20288. this.gradientManager.removeUnused(), this.clipPathManager.removeUnused(), this.shadowManager.removeUnused(), this._visibleList = a;
  20289. },
  20290. _getDefs: function (t) {
  20291. var e = this._svgRoot,
  20292. i = this._svgRoot.getElementsByTagName("defs");
  20293. if (0 === i.length) {
  20294. if (t) {
  20295. var i = e.insertBefore(Xp("defs"), e.firstChild);
  20296. return i.contains || (i.contains = function (t) {
  20297. var e = i.children;
  20298. if (!e) return !1;
  20299. for (var n = e.length - 1; n >= 0; --n) if (e[n] === t) return !0;
  20300. return !1;
  20301. }), i;
  20302. }
  20303. return null;
  20304. }
  20305. return i[0];
  20306. },
  20307. resize: function (t, e) {
  20308. var i = this._viewport;
  20309. i.style.display = "none";
  20310. var n = this._opts;
  20311. if (null != t && (n.width = t), null != e && (n.height = e), t = this._getSize(0), e = this._getSize(1), i.style.display = "", this._width !== t || this._height !== e) {
  20312. this._width = t, this._height = e;
  20313. var r = i.style;
  20314. r.width = t + "px", r.height = e + "px";
  20315. var a = this._svgRoot;
  20316. a.setAttribute("width", t), a.setAttribute("height", e);
  20317. }
  20318. },
  20319. getWidth: function () {
  20320. return this._width;
  20321. },
  20322. getHeight: function () {
  20323. return this._height;
  20324. },
  20325. _getSize: function (t) {
  20326. var e = this._opts,
  20327. i = ["width", "height"][t],
  20328. n = ["clientWidth", "clientHeight"][t],
  20329. r = ["paddingLeft", "paddingTop"][t],
  20330. a = ["paddingRight", "paddingBottom"][t];
  20331. if (null != e[i] && "auto" !== e[i]) return parseFloat(e[i]);
  20332. var o = this.root,
  20333. s = document.defaultView.getComputedStyle(o);
  20334. return (o[n] || dg(s[i]) || dg(o.style[i])) - (dg(s[r]) || 0) - (dg(s[a]) || 0) | 0;
  20335. },
  20336. dispose: function () {
  20337. this.root.innerHTML = "", this._svgRoot = this._viewport = this.storage = null;
  20338. },
  20339. clear: function () {
  20340. this._viewport && this.root.removeChild(this._viewport);
  20341. },
  20342. pathToDataUrl: function () {
  20343. this.refresh();
  20344. var t = this._svgRoot.outerHTML;
  20345. return "data:image/svg+xml;charset=UTF-8," + t;
  20346. }
  20347. }, f(["getLayer", "insertLayer", "eachLayer", "eachBuiltinLayer", "eachOtherLayer", "getLayers", "modLayer", "delLayer", "clearLayer", "toDataURL", "pathToImage"], function (t) {
  20348. KT.prototype[t] = xg(t);
  20349. }), Nn("svg", KT), t.version = Bw, t.dependencies = Nw, t.PRIORITY = $w, t.init = Jl, t.connect = tu, t.disConnect = eu, t.disconnect = vb, t.dispose = iu, t.getInstanceByDom = nu, t.getInstanceById = ru, t.registerTheme = au, t.registerPreprocessor = ou, t.registerProcessor = su, t.registerPostUpdate = lu, t.registerAction = uu, t.registerCoordinateSystem = hu, t.getCoordinateSystemDimensions = cu, t.registerLayout = du, t.registerVisual = fu, t.registerLoading = gu, t.extendComponentModel = mu, t.extendComponentView = vu, t.extendSeriesModel = yu, t.extendChartView = _u, t.setCanvasCreator = xu, t.registerMap = wu, t.getMap = bu, t.dataTool = yb, t.zrender = zv, t.number = X_, t.format = Q_, t.throttle = il, t.helper = _S, t.matrix = am, t.vector = Ug, t.color = Mm, t.parseGeoJSON = wS, t.parseGeoJson = IS, t.util = TS, t.graphic = CS, t.List = kb, t.Model = Ja, t.Axis = MS, t.env = Mg;
  20350. });