12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417254182541925420254212542225423254242542525426254272542825429254302543125432254332543425435254362543725438254392544025441254422544325444254452544625447254482544925450254512545225453254542545525456254572545825459254602546125462254632546425465254662546725468254692547025471254722547325474254752547625477254782547925480254812548225483254842548525486254872548825489254902549125492254932549425495254962549725498254992550025501255022550325504255052550625507255082550925510255112551225513255142551525516255172551825519255202552125522255232552425525255262552725528255292553025531255322553325534255352553625537255382553925540255412554225543255442554525546255472554825549255502555125552255532555425555255562555725558255592556025561255622556325564255652556625567255682556925570255712557225573255742557525576255772557825579255802558125582255832558425585255862558725588255892559025591255922559325594255952559625597255982559925600256012560225603256042560525606256072560825609256102561125612256132561425615256162561725618256192562025621256222562325624256252562625627256282562925630256312563225633256342563525636256372563825639256402564125642256432564425645256462564725648256492565025651256522565325654256552565625657256582565925660256612566225663256642566525666256672566825669256702567125672256732567425675256762567725678256792568025681256822568325684256852568625687256882568925690256912569225693256942569525696256972569825699257002570125702257032570425705257062570725708257092571025711257122571325714257152571625717257182571925720257212572225723257242572525726257272572825729257302573125732257332573425735257362573725738257392574025741257422574325744257452574625747257482574925750257512575225753257542575525756257572575825759257602576125762257632576425765257662576725768257692577025771257722577325774257752577625777257782577925780257812578225783257842578525786257872578825789257902579125792257932579425795257962579725798257992580025801258022580325804258052580625807258082580925810258112581225813258142581525816258172581825819258202582125822258232582425825258262582725828258292583025831258322583325834258352583625837258382583925840258412584225843258442584525846258472584825849258502585125852258532585425855258562585725858258592586025861258622586325864258652586625867258682586925870258712587225873258742587525876258772587825879258802588125882258832588425885258862588725888258892589025891258922589325894258952589625897258982589925900259012590225903259042590525906259072590825909259102591125912259132591425915259162591725918259192592025921259222592325924259252592625927259282592925930259312593225933259342593525936259372593825939259402594125942259432594425945259462594725948259492595025951259522595325954259552595625957259582595925960259612596225963259642596525966259672596825969259702597125972259732597425975259762597725978259792598025981259822598325984259852598625987259882598925990259912599225993259942599525996259972599825999260002600126002260032600426005260062600726008260092601026011260122601326014260152601626017260182601926020260212602226023260242602526026260272602826029260302603126032260332603426035260362603726038260392604026041260422604326044260452604626047260482604926050260512605226053260542605526056260572605826059260602606126062260632606426065260662606726068260692607026071260722607326074260752607626077260782607926080260812608226083260842608526086260872608826089260902609126092260932609426095260962609726098260992610026101261022610326104261052610626107261082610926110261112611226113261142611526116261172611826119261202612126122261232612426125261262612726128261292613026131261322613326134261352613626137261382613926140261412614226143261442614526146261472614826149261502615126152261532615426155261562615726158261592616026161261622616326164261652616626167261682616926170261712617226173261742617526176261772617826179261802618126182261832618426185261862618726188261892619026191261922619326194261952619626197261982619926200262012620226203262042620526206262072620826209262102621126212262132621426215262162621726218262192622026221262222622326224262252622626227262282622926230262312623226233262342623526236262372623826239262402624126242262432624426245262462624726248262492625026251262522625326254262552625626257262582625926260262612626226263262642626526266262672626826269262702627126272262732627426275262762627726278262792628026281262822628326284262852628626287262882628926290262912629226293262942629526296262972629826299263002630126302263032630426305263062630726308263092631026311263122631326314263152631626317263182631926320263212632226323263242632526326263272632826329263302633126332263332633426335263362633726338263392634026341263422634326344263452634626347263482634926350263512635226353263542635526356263572635826359263602636126362263632636426365263662636726368263692637026371263722637326374263752637626377263782637926380263812638226383263842638526386263872638826389263902639126392263932639426395263962639726398263992640026401264022640326404264052640626407264082640926410264112641226413264142641526416264172641826419264202642126422264232642426425264262642726428264292643026431264322643326434264352643626437264382643926440264412644226443264442644526446264472644826449264502645126452264532645426455264562645726458264592646026461264622646326464264652646626467264682646926470264712647226473264742647526476264772647826479264802648126482264832648426485264862648726488264892649026491264922649326494264952649626497264982649926500265012650226503265042650526506265072650826509265102651126512265132651426515265162651726518265192652026521265222652326524265252652626527265282652926530265312653226533265342653526536265372653826539265402654126542265432654426545265462654726548265492655026551265522655326554265552655626557265582655926560265612656226563265642656526566265672656826569265702657126572265732657426575265762657726578265792658026581265822658326584265852658626587265882658926590265912659226593265942659526596265972659826599266002660126602266032660426605266062660726608266092661026611266122661326614266152661626617266182661926620266212662226623266242662526626266272662826629266302663126632266332663426635266362663726638266392664026641266422664326644266452664626647266482664926650266512665226653266542665526656266572665826659266602666126662266632666426665266662666726668266692667026671266722667326674266752667626677266782667926680266812668226683266842668526686266872668826689266902669126692266932669426695266962669726698266992670026701267022670326704267052670626707267082670926710267112671226713267142671526716267172671826719267202672126722267232672426725267262672726728267292673026731267322673326734267352673626737267382673926740267412674226743267442674526746267472674826749267502675126752267532675426755267562675726758267592676026761267622676326764267652676626767267682676926770267712677226773267742677526776267772677826779267802678126782267832678426785267862678726788267892679026791267922679326794267952679626797267982679926800268012680226803268042680526806268072680826809268102681126812268132681426815268162681726818268192682026821268222682326824268252682626827268282682926830268312683226833268342683526836268372683826839268402684126842268432684426845268462684726848268492685026851268522685326854268552685626857268582685926860268612686226863268642686526866268672686826869268702687126872268732687426875268762687726878268792688026881268822688326884268852688626887268882688926890268912689226893268942689526896268972689826899269002690126902269032690426905269062690726908269092691026911269122691326914269152691626917269182691926920269212692226923269242692526926269272692826929269302693126932269332693426935269362693726938269392694026941269422694326944269452694626947269482694926950269512695226953269542695526956269572695826959269602696126962269632696426965269662696726968269692697026971269722697326974269752697626977269782697926980269812698226983269842698526986269872698826989269902699126992269932699426995269962699726998269992700027001270022700327004270052700627007270082700927010270112701227013270142701527016270172701827019270202702127022270232702427025270262702727028270292703027031270322703327034270352703627037270382703927040270412704227043270442704527046270472704827049270502705127052270532705427055270562705727058270592706027061270622706327064270652706627067270682706927070270712707227073270742707527076270772707827079270802708127082270832708427085270862708727088270892709027091270922709327094270952709627097270982709927100271012710227103271042710527106271072710827109271102711127112271132711427115271162711727118271192712027121271222712327124271252712627127271282712927130271312713227133271342713527136271372713827139271402714127142271432714427145271462714727148271492715027151271522715327154271552715627157271582715927160271612716227163271642716527166271672716827169271702717127172271732717427175271762717727178271792718027181271822718327184271852718627187271882718927190271912719227193271942719527196271972719827199272002720127202272032720427205272062720727208272092721027211272122721327214272152721627217272182721927220272212722227223272242722527226272272722827229272302723127232272332723427235272362723727238272392724027241272422724327244272452724627247272482724927250272512725227253272542725527256272572725827259272602726127262272632726427265272662726727268272692727027271272722727327274272752727627277272782727927280272812728227283272842728527286272872728827289272902729127292272932729427295272962729727298272992730027301273022730327304273052730627307273082730927310273112731227313273142731527316273172731827319273202732127322273232732427325273262732727328273292733027331273322733327334273352733627337273382733927340273412734227343273442734527346273472734827349273502735127352273532735427355273562735727358273592736027361273622736327364273652736627367273682736927370273712737227373273742737527376273772737827379273802738127382273832738427385273862738727388273892739027391 |
- import { ref as Le, reactive as z0, nextTick as fo, openBlock as Je, createElementBlock as qe, normalizeStyle as Ar, createElementVNode as ar, toDisplayString as yn, unref as X0, createCommentVNode as qn, createTextVNode as qp, Fragment as tl, renderList as el, normalizeClass as G0, defineCustomElement as Qp } from "vue";
- const go = {
- //图表配置
- chart: {
- spacingTop: 30,
- backgroundColor: "rgba(0,0,0,0)"
- },
- title: {
- enabled: !1
- },
- exporting: {
- enabled: !1
- },
- boost: {
- useGPUTranslations: !0
- },
- //默认颜色配置
- colors: [
- "#00f",
- "#f00",
- "#999",
- "#000",
- "#7cb5ec",
- "#90ed7d",
- "#f7a35c",
- "#8085e9",
- "#f15c80",
- "#e4d354",
- "#2b908f",
- "#f45b5b",
- "#91e8e1"
- ],
- //版权信息
- credits: { enabled: !1 },
- //数据列通用配置
- plotOptions: {
- series: {
- turboThreshold: 0,
- //不限制数据点个数
- boostThreshold: 0,
- dataGrouping: {
- enabled: !1
- },
- //取消数据大自动数据合并
- animation: {
- duration: 1e3
- }
- },
- areaspline: {
- lineWidth: 1,
- stacking: "normal",
- marker: {
- enabled: !1
- }
- // fillOpacity: 0.5,
- },
- column: {
- pointPadding: 0.05,
- stacking: "normal"
- },
- scatter: {
- turboThreshold: 0,
- marker: {
- symbol: "circle",
- radius: 5,
- states: {
- hover: {
- enabled: !0
- }
- }
- },
- states: {
- hover: {
- marker: {
- enabled: !0
- }
- }
- }
- }
- },
- //范围选择器
- rangeSelector: {
- enabled: !1,
- selected: 2
- },
- //悬浮提示框
- tooltip: {
- split: !1,
- shared: !0,
- dateTimeLabelFormats: {
- // 时间格式化字符
- day: "%Y/%m/%d",
- week: "%Y/%m",
- month: "%Y/%m",
- year: "%Y/%m"
- },
- xDateFormat: "%Y/%m/%d",
- className: "chart-tooltips-box"
- // formatter:function(e){
- // return `<p>${this.x}</p><p>aaa</p>`
- // // return e
- // }
- // outside: true,
- // valueDecimals: 4,
- },
- //图例
- legend: {
- enabled: !0,
- verticalAlign: "top",
- margin: 3
- // layout: 'vertical'
- },
- //滚动条
- scrollbar: {
- enabled: !1
- },
- //导航器
- navigator: {
- enabled: !1
- },
- //范围选择器
- rangeSelector: {
- enabled: !1
- },
- xAxis: {
- tickPosition: "inside",
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- tickLength: 5,
- type: "datetime",
- ordinal: !1,
- dateTimeLabelFormats: {
- day: "%y/%m",
- week: "%y/%m",
- month: "%y/%m",
- year: "%y/%m"
- }
- // gridLineWidth:0
- }
- }, H0 = {
- //默认颜色配置
- colors: ["#4B0082", "#7FFFAA", "#FF4500", "#808000", "#EEE8AA", "#849EC1", "#8A4294", "#578B5A", "#FDA8C7", "#53B3FF", "#999999", "#000000", "#FFDF0C", "#FF0000", "#0033FF"],
- yAxis: {
- lineWidth: 1,
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- offset: 0,
- opposite: !1,
- reversed: !1,
- visible: !0,
- gridLineWidth: 0,
- tickWidth: 1,
- tickLength: 5,
- tickPosition: "inside",
- endOnTick: !1,
- startOnTick: !1,
- showLastLabel: !0,
- //显示最后刻度值
- tickPixelInterval: 50
- }
- }, wn = {
- tickPosition: "inside",
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- tickLength: 5,
- ordinal: !1,
- type: "linear"
- }, dr = {
- tickWidth: 1,
- tickLength: 5,
- lineWidth: 1,
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- // offset: 0,
- visible: !0,
- gridLineWidth: 0,
- tickPosition: "inside",
- endOnTick: !1,
- startOnTick: !1,
- showLastLabel: !0,
- tickPixelInterval: 50
- }, tu = {
- tickPosition: "inside",
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- tickLength: 5,
- type: "datetime",
- ordinal: !1,
- dateTimeLabelFormats: {
- day: "%y/%m",
- week: "%y/%m",
- month: "%y/%m",
- year: "%y/%m"
- },
- xDateFormat: "%Y-%m-%d"
- }, F0 = {
- 年: "Y",
- 季: "Q",
- 月: "M",
- 周: "W",
- 天: "D"
- }, Op = {
- 年: "Year",
- 季: "Season",
- 月: "Month",
- 周: "Week",
- 天: "Day"
- };
- var Gr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
- function Mn(r) {
- return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
- }
- var eu = { exports: {} };
- (function(r) {
- (function(d, C) {
- r.exports ? (C.default = C, r.exports = d.document ? C(d) : C) : (d.Highcharts && d.Highcharts.error(16, !0), d.Highcharts = C(d));
- })(typeof window < "u" ? window : Gr, function(d) {
- function C(y, N, _, U) {
- y.hasOwnProperty(N) || (y[N] = U.apply(null, _));
- }
- var o = {};
- return C(o, "Core/Globals.js", [], function() {
- var y = typeof d < "u" ? d : typeof window < "u" ? window : {}, N;
- return function(_) {
- _.SVG_NS = "http://www.w3.org/2000/svg", _.product = "Highcharts", _.version = "9.3.3", _.win = y, _.doc = _.win.document, _.svg = _.doc && _.doc.createElementNS && !!_.doc.createElementNS(_.SVG_NS, "svg").createSVGRect, _.userAgent = _.win.navigator && _.win.navigator.userAgent || "", _.isChrome = _.userAgent.indexOf("Chrome") !== -1, _.isFirefox = _.userAgent.indexOf("Firefox") !== -1, _.isMS = /(edge|msie|trident)/i.test(_.userAgent) && !_.win.opera, _.isSafari = !_.isChrome && _.userAgent.indexOf("Safari") !== -1, _.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(_.userAgent), _.isWebKit = _.userAgent.indexOf("AppleWebKit") !== -1, _.deg2rad = 2 * Math.PI / 360, _.hasBidiBug = _.isFirefox && 4 > parseInt(_.userAgent.split("Firefox/")[1], 10), _.hasTouch = !!_.win.TouchEvent, _.marginNames = ["plotTop", "marginRight", "marginBottom", "plotLeft"], _.noop = function() {
- }, _.supportsPassiveEvents = function() {
- var U = !1;
- if (!_.isMS) {
- var G = Object.defineProperty({}, "passive", { get: function() {
- U = !0;
- } });
- _.win.addEventListener && _.win.removeEventListener && (_.win.addEventListener(
- "testPassive",
- _.noop,
- G
- ), _.win.removeEventListener("testPassive", _.noop, G));
- }
- return U;
- }(), _.charts = [], _.dateFormats = {}, _.seriesTypes = {}, _.symbolSizes = {}, _.chartCount = 0;
- }(N || (N = {})), N;
- }), C(o, "Core/Utilities.js", [o["Core/Globals.js"]], function(y) {
- function N(t, s, n, P) {
- var D = s ? "Highcharts error" : "Highcharts warning";
- t === 32 && (t = D + ": Deprecated member");
- var I = w(t), W = I ? D + " #" + t + ": www.highcharts.com/errors/" + t + "/" : t.toString();
- if (typeof P < "u") {
- var E = "";
- I && (W += "?"), b(P, function(X, g) {
- E += `
- - ` + g + ": " + X, I && (W += encodeURI(g) + "=" + encodeURI(X));
- }), W += E;
- }
- v(y, "displayError", { chart: n, code: t, message: W, params: P }, function() {
- if (s)
- throw Error(W);
- u.console && N.messages.indexOf(W) === -1 && console.warn(W);
- }), N.messages.push(W);
- }
- function _(t, s) {
- var n = {};
- return b(t, function(P, D) {
- F(t[D], !0) && !t.nodeType && s[D] ? (P = _(t[D], s[D]), Object.keys(P).length && (n[D] = P)) : (F(t[D]) || t[D] !== s[D]) && (n[D] = t[D]);
- }), n;
- }
- function U(t, s) {
- return parseInt(t, s || 10);
- }
- function G(t) {
- return typeof t == "string";
- }
- function V(t) {
- return t = Object.prototype.toString.call(t), t === "[object Array]" || t === "[object Array Iterator]";
- }
- function F(t, s) {
- return !!t && typeof t == "object" && (!s || !V(t));
- }
- function B(t) {
- return F(t) && typeof t.nodeType == "number";
- }
- function j(t) {
- var s = t && t.constructor;
- return !(!F(t, !0) || B(t) || !s || !s.name || s.name === "Object");
- }
- function w(t) {
- return typeof t == "number" && !isNaN(t) && 1 / 0 > t && -1 / 0 < t;
- }
- function x(t) {
- return typeof t < "u" && t !== null;
- }
- function f(t, s, n) {
- var P;
- return G(s) ? x(n) ? t.setAttribute(s, n) : t && t.getAttribute && ((P = t.getAttribute(s)) || s !== "class" || (P = t.getAttribute(s + "Name"))) : b(s, function(D, I) {
- x(D) ? t.setAttribute(I, D) : t.removeAttribute(I);
- }), P;
- }
- function l(t, s) {
- var n;
- t || (t = {});
- for (n in s)
- t[n] = s[n];
- return t;
- }
- function T() {
- for (var t = arguments, s = t.length, n = 0; n < s; n++) {
- var P = t[n];
- if (typeof P < "u" && P !== null)
- return P;
- }
- }
- function O(t, s) {
- y.isMS && !y.svg && s && typeof s.opacity < "u" && (s.filter = "alpha(opacity=" + 100 * s.opacity + ")"), l(t.style, s);
- }
- function R(t, s) {
- return 1e14 < t ? t : parseFloat(t.toPrecision(s || 14));
- }
- function k(t, s, n) {
- var P = y.getStyle || k;
- if (s === "width")
- return s = Math.min(t.offsetWidth, t.scrollWidth), n = t.getBoundingClientRect && t.getBoundingClientRect().width, n < s && n >= s - 1 && (s = Math.floor(n)), Math.max(0, s - (P(t, "padding-left", !0) || 0) - (P(t, "padding-right", !0) || 0));
- if (s === "height")
- return Math.max(0, Math.min(t.offsetHeight, t.scrollHeight) - (P(t, "padding-top", !0) || 0) - (P(t, "padding-bottom", !0) || 0));
- if (u.getComputedStyle || N(27, !0), t = u.getComputedStyle(t, void 0)) {
- var D = t.getPropertyValue(s);
- T(n, s !== "opacity") && (D = U(D));
- }
- return D;
- }
- function b(t, s, n) {
- for (var P in t)
- Object.hasOwnProperty.call(t, P) && s.call(n || t[P], t[P], P, t);
- }
- function S(t, s, n) {
- function P(E, X) {
- var g = t.removeEventListener || y.removeEventListenerPolyfill;
- g && g.call(t, E, X, !1);
- }
- function D(E) {
- var X;
- if (t.nodeName) {
- if (s) {
- var g = {};
- g[s] = !0;
- } else
- g = E;
- b(g, function(m, L) {
- if (E[L])
- for (X = E[L].length; X--; )
- P(L, E[L][X].fn);
- });
- }
- }
- var I = typeof t == "function" && t.prototype || t;
- if (Object.hasOwnProperty.call(I, "hcEvents")) {
- var W = I.hcEvents;
- s ? (I = W[s] || [], n ? (W[s] = I.filter(function(E) {
- return n !== E.fn;
- }), P(s, n)) : (D(W), W[s] = [])) : (D(W), delete I.hcEvents);
- }
- }
- function v(t, s, n, P) {
- if (n = n || {}, c.createEvent && (t.dispatchEvent || t.fireEvent && t !== y)) {
- var D = c.createEvent("Events");
- D.initEvent(s, !0, !0), n = l(D, n), t.dispatchEvent ? t.dispatchEvent(n) : t.fireEvent(s, n);
- } else if (t.hcEvents) {
- n.target || l(n, { preventDefault: function() {
- n.defaultPrevented = !0;
- }, target: t, type: s }), D = [];
- for (var I = t, W = !1; I.hcEvents; )
- Object.hasOwnProperty.call(I, "hcEvents") && I.hcEvents[s] && (D.length && (W = !0), D.unshift.apply(D, I.hcEvents[s])), I = Object.getPrototypeOf(I);
- W && D.sort(function(E, X) {
- return E.order - X.order;
- }), D.forEach(function(E) {
- E.fn.call(t, n) === !1 && n.preventDefault();
- });
- }
- P && !n.defaultPrevented && P.call(t, n);
- }
- var h = y.charts, c = y.doc, u = y.win;
- (N || (N = {})).messages = [], Math.easeInOutSine = function(t) {
- return -0.5 * (Math.cos(Math.PI * t) - 1);
- };
- var i = Array.prototype.find ? function(t, s) {
- return t.find(s);
- } : function(t, s) {
- var n, P = t.length;
- for (n = 0; n < P; n++)
- if (s(t[n], n))
- return t[n];
- };
- b({ map: "map", each: "forEach", grep: "filter", reduce: "reduce", some: "some" }, function(t, s) {
- y[s] = function(n) {
- var P;
- return N(32, !1, void 0, (P = {}, P["Highcharts." + s] = "use Array." + t, P)), Array.prototype[t].apply(n, [].slice.call(arguments, 1));
- };
- });
- var p, a = function() {
- var t = Math.random().toString(36).substring(2, 9) + "-", s = 0;
- return function() {
- return "highcharts-" + (p ? "" : t) + s++;
- };
- }();
- return u.jQuery && (u.jQuery.fn.highcharts = function() {
- var t = [].slice.call(arguments);
- if (this[0])
- return t[0] ? (new y[G(t[0]) ? t.shift() : "Chart"](this[0], t[0], t[1]), this) : h[f(this[0], "data-highcharts-chart")];
- }), i = { addEvent: function(t, s, n, P) {
- P === void 0 && (P = {});
- var D = typeof t == "function" && t.prototype || t;
- Object.hasOwnProperty.call(D, "hcEvents") || (D.hcEvents = {}), D = D.hcEvents, y.Point && t instanceof y.Point && t.series && t.series.chart && (t.series.chart.runTrackerClick = !0);
- var I = t.addEventListener || y.addEventListenerPolyfill;
- return I && I.call(t, s, n, y.supportsPassiveEvents ? { passive: P.passive === void 0 ? s.indexOf("touch") !== -1 : P.passive, capture: !1 } : !1), D[s] || (D[s] = []), D[s].push({ fn: n, order: typeof P.order == "number" ? P.order : 1 / 0 }), D[s].sort(function(W, E) {
- return W.order - E.order;
- }), function() {
- S(t, s, n);
- };
- }, arrayMax: function(t) {
- for (var s = t.length, n = t[0]; s--; )
- t[s] > n && (n = t[s]);
- return n;
- }, arrayMin: function(t) {
- for (var s = t.length, n = t[0]; s--; )
- t[s] < n && (n = t[s]);
- return n;
- }, attr: f, clamp: function(t, s, n) {
- return t > s ? t < n ? t : n : s;
- }, cleanRecursively: _, clearTimeout: function(t) {
- x(t) && clearTimeout(t);
- }, correctFloat: R, createElement: function(t, s, n, P, D) {
- return t = c.createElement(t), s && l(t, s), D && O(t, { padding: "0", border: "none", margin: "0" }), n && O(t, n), P && P.appendChild(t), t;
- }, css: O, defined: x, destroyObjectProperties: function(t, s) {
- b(t, function(n, P) {
- n && n !== s && n.destroy && n.destroy(), delete t[P];
- });
- }, discardElement: function(t) {
- t && t.parentElement && t.parentElement.removeChild(t);
- }, erase: function(t, s) {
- for (var n = t.length; n--; )
- if (t[n] === s) {
- t.splice(n, 1);
- break;
- }
- }, error: N, extend: l, extendClass: function(t, s) {
- var n = function() {
- };
- return n.prototype = new t(), l(n.prototype, s), n;
- }, find: i, fireEvent: v, getMagnitude: function(t) {
- return Math.pow(10, Math.floor(Math.log(t) / Math.LN10));
- }, getNestedProperty: function(t, s) {
- for (t = t.split("."); t.length && x(s); ) {
- var n = t.shift();
- if (typeof n > "u" || n === "__proto__" || (s = s[n], !x(s) || typeof s == "function" || typeof s.nodeType == "number" || s === u))
- return;
- }
- return s;
- }, getStyle: k, inArray: function(t, s, n) {
- return N(32, !1, void 0, { "Highcharts.inArray": "use Array.indexOf" }), s.indexOf(t, n);
- }, isArray: V, isClass: j, isDOMElement: B, isFunction: function(t) {
- return typeof t == "function";
- }, isNumber: w, isObject: F, isString: G, keys: function(t) {
- return N(32, !1, void 0, { "Highcharts.keys": "use Object.keys" }), Object.keys(t);
- }, merge: function() {
- var t, s = arguments, n = {}, P = function(I, W) {
- return typeof I != "object" && (I = {}), b(W, function(E, X) {
- X !== "__proto__" && X !== "constructor" && (!F(E, !0) || j(E) || B(E) ? I[X] = W[X] : I[X] = P(I[X] || {}, E));
- }), I;
- };
- s[0] === !0 && (n = s[1], s = Array.prototype.slice.call(s, 2));
- var D = s.length;
- for (t = 0; t < D; t++)
- n = P(n, s[t]);
- return n;
- }, normalizeTickInterval: function(t, s, n, P, D) {
- var I = t;
- n = T(n, 1);
- var W = t / n;
- for (s || (s = D ? [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10] : [1, 2, 2.5, 5, 10], P === !1 && (n === 1 ? s = s.filter(function(E) {
- return E % 1 === 0;
- }) : 0.1 >= n && (s = [1 / n]))), P = 0; P < s.length && (I = s[P], !(D && I * n >= t || !D && W <= (s[P] + (s[P + 1] || s[P])) / 2)); P++)
- ;
- return I = R(I * n, -Math.round(Math.log(1e-3) / Math.LN10));
- }, objectEach: b, offset: function(t) {
- var s = c.documentElement;
- return t = t.parentElement || t.parentNode ? t.getBoundingClientRect() : { top: 0, left: 0, width: 0, height: 0 }, { top: t.top + (u.pageYOffset || s.scrollTop) - (s.clientTop || 0), left: t.left + (u.pageXOffset || s.scrollLeft) - (s.clientLeft || 0), width: t.width, height: t.height };
- }, pad: function(t, s, n) {
- return Array((s || 2) + 1 - String(t).replace("-", "").length).join(n || "0") + t;
- }, pick: T, pInt: U, relativeLength: function(t, s, n) {
- return /%$/.test(t) ? s * parseFloat(t) / 100 + (n || 0) : parseFloat(t);
- }, removeEvent: S, splat: function(t) {
- return V(t) ? t : [t];
- }, stableSort: function(t, s) {
- var n = t.length, P, D;
- for (D = 0; D < n; D++)
- t[D].safeI = D;
- for (t.sort(function(I, W) {
- return P = s(I, W), P === 0 ? I.safeI - W.safeI : P;
- }), D = 0; D < n; D++)
- delete t[D].safeI;
- }, syncTimeout: function(t, s, n) {
- return 0 < s ? setTimeout(t, s, n) : (t.call(0, n), -1);
- }, timeUnits: {
- millisecond: 1,
- second: 1e3,
- minute: 6e4,
- hour: 36e5,
- day: 864e5,
- week: 6048e5,
- month: 24192e5,
- year: 314496e5
- }, uniqueKey: a, useSerialIds: function(t) {
- return p = T(t, p);
- }, wrap: function(t, s, n) {
- var P = t[s];
- t[s] = function() {
- var D = Array.prototype.slice.call(arguments), I = arguments, W = this;
- return W.proceed = function() {
- P.apply(W, arguments.length ? arguments : I);
- }, D.unshift(P), D = n.apply(this, D), W.proceed = null, D;
- };
- } }, i;
- }), C(o, "Core/Chart/ChartDefaults.js", [], function() {
- return { panning: { enabled: !1, type: "x" }, styledMode: !1, borderRadius: 0, colorCount: 10, defaultSeriesType: "line", ignoreHiddenSeries: !0, spacing: [
- 10,
- 10,
- 15,
- 10
- ], resetZoomButton: { theme: { zIndex: 6 }, position: { align: "right", x: -10, y: 10 } }, zoomBySingleTouch: !1, width: null, height: null, borderColor: "#335cad", backgroundColor: "#ffffff", plotBorderColor: "#cccccc" };
- }), C(o, "Core/Color/Color.js", [o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N) {
- var _ = N.isNumber, U = N.merge, G = N.pInt;
- return N = function() {
- function V(F) {
- this.rgba = [NaN, NaN, NaN, NaN], this.input = F;
- var B = y.Color;
- if (B && B !== V)
- return new B(F);
- if (!(this instanceof V))
- return new V(F);
- this.init(F);
- }
- return V.parse = function(F) {
- return F ? new V(F) : V.None;
- }, V.prototype.init = function(F) {
- var B;
- if (typeof F == "object" && typeof F.stops < "u")
- this.stops = F.stops.map(function(f) {
- return new V(f[1]);
- });
- else if (typeof F == "string") {
- if (this.input = F = V.names[F.toLowerCase()] || F, F.charAt(0) === "#") {
- var j = F.length, w = parseInt(F.substr(1), 16);
- j === 7 ? B = [(w & 16711680) >> 16, (w & 65280) >> 8, w & 255, 1] : j === 4 && (B = [(w & 3840) >> 4 | (w & 3840) >> 8, (w & 240) >> 4 | w & 240, (w & 15) << 4 | w & 15, 1]);
- }
- if (!B)
- for (w = V.parsers.length; w-- && !B; ) {
- var x = V.parsers[w];
- (j = x.regex.exec(F)) && (B = x.parse(j));
- }
- }
- B && (this.rgba = B);
- }, V.prototype.get = function(F) {
- var B = this.input, j = this.rgba;
- if (typeof B == "object" && typeof this.stops < "u") {
- var w = U(B);
- return w.stops = [].slice.call(w.stops), this.stops.forEach(function(x, f) {
- w.stops[f] = [w.stops[f][0], x.get(F)];
- }), w;
- }
- return j && _(j[0]) ? F === "rgb" || !F && j[3] === 1 ? "rgb(" + j[0] + "," + j[1] + "," + j[2] + ")" : F === "a" ? "" + j[3] : "rgba(" + j.join(",") + ")" : B;
- }, V.prototype.brighten = function(F) {
- var B = this.rgba;
- if (this.stops)
- this.stops.forEach(function(w) {
- w.brighten(F);
- });
- else if (_(F) && F !== 0)
- for (var j = 0; 3 > j; j++)
- B[j] += G(255 * F), 0 > B[j] && (B[j] = 0), 255 < B[j] && (B[j] = 255);
- return this;
- }, V.prototype.setOpacity = function(F) {
- return this.rgba[3] = F, this;
- }, V.prototype.tweenTo = function(F, B) {
- var j = this.rgba, w = F.rgba;
- return !_(j[0]) || !_(w[0]) ? F.input || "none" : (F = w[3] !== 1 || j[3] !== 1, (F ? "rgba(" : "rgb(") + Math.round(w[0] + (j[0] - w[0]) * (1 - B)) + "," + Math.round(w[1] + (j[1] - w[1]) * (1 - B)) + "," + Math.round(w[2] + (j[2] - w[2]) * (1 - B)) + (F ? "," + (w[3] + (j[3] - w[3]) * (1 - B)) : "") + ")");
- }, V.names = { white: "#ffffff", black: "#000000" }, V.parsers = [{
- regex: /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,
- parse: function(F) {
- return [G(F[1]), G(F[2]), G(F[3]), parseFloat(F[4], 10)];
- }
- }, { regex: /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/, parse: function(F) {
- return [G(F[1]), G(F[2]), G(F[3]), 1];
- } }], V.None = new V(""), V;
- }(), N;
- }), C(o, "Core/Color/Palettes.js", [], function() {
- return { colors: "#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" ") };
- }), C(o, "Core/Time.js", [o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N) {
- var _ = y.win, U = N.defined, G = N.error, V = N.extend, F = N.isObject, B = N.merge, j = N.objectEach, w = N.pad, x = N.pick, f = N.splat, l = N.timeUnits, T = y.isSafari && _.Intl && _.Intl.DateTimeFormat.prototype.formatRange, O = y.isSafari && _.Intl && !_.Intl.DateTimeFormat.prototype.formatRange;
- return N = function() {
- function R(k) {
- this.options = {}, this.variableTimezone = this.useUTC = !1, this.Date = _.Date, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.update(k);
- }
- return R.prototype.get = function(k, b) {
- if (this.variableTimezone || this.timezoneOffset) {
- var S = b.getTime(), v = S - this.getTimezoneOffset(b);
- return b.setTime(v), k = b["getUTC" + k](), b.setTime(S), k;
- }
- return this.useUTC ? b["getUTC" + k]() : b["get" + k]();
- }, R.prototype.set = function(k, b, S) {
- if (this.variableTimezone || this.timezoneOffset) {
- if (k === "Milliseconds" || k === "Seconds" || k === "Minutes" && this.getTimezoneOffset(b) % 36e5 === 0)
- return b["setUTC" + k](S);
- var v = this.getTimezoneOffset(b);
- return v = b.getTime() - v, b.setTime(v), b["setUTC" + k](S), k = this.getTimezoneOffset(b), v = b.getTime() + k, b.setTime(v);
- }
- return this.useUTC || T && k === "FullYear" ? b["setUTC" + k](S) : b["set" + k](S);
- }, R.prototype.update = function(k) {
- var b = x(k && k.useUTC, !0);
- this.options = k = B(!0, this.options || {}, k), this.Date = k.Date || _.Date || Date, this.timezoneOffset = (this.useUTC = b) && k.timezoneOffset, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.variableTimezone = b && !(!k.getTimezoneOffset && !k.timezone);
- }, R.prototype.makeTime = function(k, b, S, v, h, c) {
- if (this.useUTC) {
- var u = this.Date.UTC.apply(0, arguments), i = this.getTimezoneOffset(u);
- u += i;
- var p = this.getTimezoneOffset(u);
- i !== p ? u += p - i : i - 36e5 !== this.getTimezoneOffset(u - 36e5) || O || (u -= 36e5);
- } else
- u = new this.Date(k, b, x(S, 1), x(v, 0), x(h, 0), x(c, 0)).getTime();
- return u;
- }, R.prototype.timezoneOffsetFunction = function() {
- var k = this, b = this.options, S = b.getTimezoneOffset, v = b.moment || _.moment;
- if (!this.useUTC)
- return function(h) {
- return 6e4 * new Date(h.toString()).getTimezoneOffset();
- };
- if (b.timezone) {
- if (v)
- return function(h) {
- return 6e4 * -v.tz(h, b.timezone).utcOffset();
- };
- G(25);
- }
- return this.useUTC && S ? function(h) {
- return 6e4 * S(h.valueOf());
- } : function() {
- return 6e4 * (k.timezoneOffset || 0);
- };
- }, R.prototype.dateFormat = function(k, b, S) {
- if (!U(b) || isNaN(b))
- return y.defaultOptions.lang && y.defaultOptions.lang.invalidDate || "";
- k = x(k, "%Y-%m-%d %H:%M:%S");
- var v = this, h = new this.Date(b), c = this.get("Hours", h), u = this.get("Day", h), i = this.get("Date", h), p = this.get("Month", h), a = this.get("FullYear", h), t = y.defaultOptions.lang, s = t && t.weekdays, n = t && t.shortWeekdays;
- return h = V({ a: n ? n[u] : s[u].substr(0, 3), A: s[u], d: w(i), e: w(i, 2, " "), w: u, b: t.shortMonths[p], B: t.months[p], m: w(p + 1), o: p + 1, y: a.toString().substr(2, 2), Y: a, H: w(c), k: c, I: w(c % 12 || 12), l: c % 12 || 12, M: w(this.get("Minutes", h)), p: 12 > c ? "AM" : "PM", P: 12 > c ? "am" : "pm", S: w(h.getSeconds()), L: w(Math.floor(b % 1e3), 3) }, y.dateFormats), j(h, function(P, D) {
- for (; k.indexOf("%" + D) !== -1; )
- k = k.replace("%" + D, typeof P == "function" ? P.call(v, b) : P);
- }), S ? k.substr(0, 1).toUpperCase() + k.substr(1) : k;
- }, R.prototype.resolveDTLFormat = function(k) {
- return F(k, !0) ? k : (k = f(k), { main: k[0], from: k[1], to: k[2] });
- }, R.prototype.getTimeTicks = function(k, b, S, v) {
- var h = this, c = [], u = {}, i = new h.Date(b), p = k.unitRange, a = k.count || 1, t;
- if (v = x(v, 1), U(b)) {
- if (h.set(
- "Milliseconds",
- i,
- p >= l.second ? 0 : a * Math.floor(h.get("Milliseconds", i) / a)
- ), p >= l.second && h.set("Seconds", i, p >= l.minute ? 0 : a * Math.floor(h.get("Seconds", i) / a)), p >= l.minute && h.set("Minutes", i, p >= l.hour ? 0 : a * Math.floor(h.get("Minutes", i) / a)), p >= l.hour && h.set("Hours", i, p >= l.day ? 0 : a * Math.floor(h.get("Hours", i) / a)), p >= l.day && h.set("Date", i, p >= l.month ? 1 : Math.max(1, a * Math.floor(h.get("Date", i) / a))), p >= l.month) {
- h.set("Month", i, p >= l.year ? 0 : a * Math.floor(h.get("Month", i) / a));
- var s = h.get("FullYear", i);
- }
- p >= l.year && h.set(
- "FullYear",
- i,
- s - s % a
- ), p === l.week && (s = h.get("Day", i), h.set("Date", i, h.get("Date", i) - s + v + (s < v ? -7 : 0))), s = h.get("FullYear", i), v = h.get("Month", i);
- var n = h.get("Date", i), P = h.get("Hours", i);
- for (b = i.getTime(), !h.variableTimezone && h.useUTC || !U(S) || (t = S - b > 4 * l.month || h.getTimezoneOffset(b) !== h.getTimezoneOffset(S)), b = i.getTime(), i = 1; b < S; )
- c.push(b), b = p === l.year ? h.makeTime(s + i * a, 0) : p === l.month ? h.makeTime(s, v + i * a) : !t || p !== l.day && p !== l.week ? t && p === l.hour && 1 < a ? h.makeTime(s, v, n, P + i * a) : b + p * a : h.makeTime(s, v, n + i * a * (p === l.day ? 1 : 7)), i++;
- c.push(b), p <= l.hour && 1e4 > c.length && c.forEach(function(D) {
- D % 18e5 === 0 && h.dateFormat("%H%M%S%L", D) === "000000000" && (u[D] = "day");
- });
- }
- return c.info = V(k, { higherRanks: u, totalRange: p * a }), c;
- }, R.prototype.getDateFormat = function(k, b, S, v) {
- var h = this.dateFormat("%m-%d %H:%M:%S.%L", b), c = { millisecond: 15, second: 12, minute: 9, hour: 6, day: 3 }, u = "millisecond";
- for (i in l) {
- if (k === l.week && +this.dateFormat("%w", b) === S && h.substr(6) === "00:00:00.000") {
- var i = "week";
- break;
- }
- if (l[i] > k) {
- i = u;
- break;
- }
- if (c[i] && h.substr(c[i]) !== "01-01 00:00:00.000".substr(c[i]))
- break;
- i !== "week" && (u = i);
- }
- if (i)
- var p = this.resolveDTLFormat(v[i]).main;
- return p;
- }, R;
- }(), N;
- }), C(o, "Core/DefaultOptions.js", [o["Core/Chart/ChartDefaults.js"], o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Color/Palettes.js"], o["Core/Time.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V) {
- N = N.parse;
- var F = V.merge, B = {
- colors: U.colors,
- symbols: ["circle", "diamond", "square", "triangle", "triangle-down"],
- lang: {
- loading: "Loading...",
- months: "January February March April May June July August September October November December".split(" "),
- shortMonths: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),
- weekdays: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
- decimalPoint: ".",
- numericSymbols: "kMGTPE".split(""),
- resetZoom: "Reset zoom",
- resetZoomTitle: "Reset zoom level 1:1",
- thousandsSep: " "
- },
- global: {},
- time: { Date: void 0, getTimezoneOffset: void 0, timezone: void 0, timezoneOffset: 0, useUTC: !0 },
- chart: y,
- title: { text: "Chart title", align: "center", margin: 15, widthAdjust: -44 },
- subtitle: { text: "", align: "center", widthAdjust: -44 },
- caption: { margin: 15, text: "", align: "left", verticalAlign: "bottom" },
- plotOptions: {},
- labels: { style: { position: "absolute", color: "#333333" } },
- legend: {
- enabled: !0,
- align: "center",
- alignColumns: !0,
- className: "highcharts-no-tooltip",
- layout: "horizontal",
- labelFormatter: function() {
- return this.name;
- },
- borderColor: "#999999",
- borderRadius: 0,
- navigation: { activeColor: "#003399", inactiveColor: "#cccccc" },
- itemStyle: { color: "#333333", cursor: "pointer", fontSize: "12px", fontWeight: "bold", textOverflow: "ellipsis" },
- itemHoverStyle: { color: "#000000" },
- itemHiddenStyle: { color: "#cccccc" },
- shadow: !1,
- itemCheckboxStyle: { position: "absolute", width: "13px", height: "13px" },
- squareSymbol: !0,
- symbolPadding: 5,
- verticalAlign: "bottom",
- x: 0,
- y: 0,
- title: { style: { fontWeight: "bold" } }
- },
- loading: { labelStyle: { fontWeight: "bold", position: "relative", top: "45%" }, style: { position: "absolute", backgroundColor: "#ffffff", opacity: 0.5, textAlign: "center" } },
- tooltip: {
- enabled: !0,
- animation: _.svg,
- borderRadius: 3,
- dateTimeLabelFormats: {
- millisecond: "%A, %b %e, %H:%M:%S.%L",
- second: "%A, %b %e, %H:%M:%S",
- minute: "%A, %b %e, %H:%M",
- hour: "%A, %b %e, %H:%M",
- day: "%A, %b %e, %Y",
- week: "Week from %A, %b %e, %Y",
- month: "%B %Y",
- year: "%Y"
- },
- footerFormat: "",
- headerShape: "callout",
- hideDelay: 500,
- padding: 8,
- shape: "callout",
- shared: !1,
- snap: _.isTouchDevice ? 25 : 10,
- headerFormat: '<span style="font-size: 10px">{point.key}</span><br/>',
- pointFormat: '<span style="color:{point.color}">●</span> {series.name}: <b>{point.y}</b><br/>',
- backgroundColor: N("#f7f7f7").setOpacity(0.85).get(),
- borderWidth: 1,
- shadow: !0,
- stickOnContact: !1,
- style: { color: "#333333", cursor: "default", fontSize: "12px", whiteSpace: "nowrap" },
- useHTML: !1
- },
- credits: { enabled: !0, href: "https://www.highcharts.com?credits", position: { align: "right", x: -10, verticalAlign: "bottom", y: -5 }, style: { cursor: "pointer", color: "#999999", fontSize: "9px" }, text: "Highcharts.com" }
- };
- B.chart.styledMode = !1;
- var j = new G(F(B.global, B.time));
- return y = { defaultOptions: B, defaultTime: j, getOptions: function() {
- return B;
- }, setOptions: function(w) {
- return F(!0, B, w), (w.time || w.global) && (_.time ? _.time.update(F(
- B.global,
- B.time,
- w.global,
- w.time
- )) : _.time = j), B;
- } }, y;
- }), C(o, "Core/Animation/Fx.js", [o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N, _) {
- var U = y.parse, G = N.win, V = _.isNumber, F = _.objectEach;
- return function() {
- function B(j, w, x) {
- this.pos = NaN, this.options = w, this.elem = j, this.prop = x;
- }
- return B.prototype.dSetter = function() {
- var j = this.paths, w = j && j[0];
- j = j && j[1];
- var x = this.now || 0, f = [];
- if (x !== 1 && w && j)
- if (w.length === j.length && 1 > x)
- for (var l = 0; l < j.length; l++) {
- for (var T = w[l], O = j[l], R = [], k = 0; k < O.length; k++) {
- var b = T[k], S = O[k];
- V(b) && V(S) && (O[0] !== "A" || k !== 4 && k !== 5) ? R[k] = b + x * (S - b) : R[k] = S;
- }
- f.push(R);
- }
- else
- f = j;
- else
- f = this.toD || [];
- this.elem.attr("d", f, void 0, !0);
- }, B.prototype.update = function() {
- var j = this.elem, w = this.prop, x = this.now, f = this.options.step;
- this[w + "Setter"] ? this[w + "Setter"]() : j.attr ? j.element && j.attr(w, x, null, !0) : j.style[w] = x + this.unit, f && f.call(j, x, this);
- }, B.prototype.run = function(j, w, x) {
- var f = this, l = f.options, T = function(k) {
- return T.stopped ? !1 : f.step(k);
- }, O = G.requestAnimationFrame || function(k) {
- setTimeout(
- k,
- 13
- );
- }, R = function() {
- for (var k = 0; k < B.timers.length; k++)
- B.timers[k]() || B.timers.splice(k--, 1);
- B.timers.length && O(R);
- };
- j !== w || this.elem["forceAnimate:" + this.prop] ? (this.startTime = +/* @__PURE__ */ new Date(), this.start = j, this.end = w, this.unit = x, this.now = this.start, this.pos = 0, T.elem = this.elem, T.prop = this.prop, T() && B.timers.push(T) === 1 && O(R)) : (delete l.curAnim[this.prop], l.complete && Object.keys(l.curAnim).length === 0 && l.complete.call(this.elem));
- }, B.prototype.step = function(j) {
- var w = +/* @__PURE__ */ new Date(), x = this.options, f = this.elem, l = x.complete, T = x.duration, O = x.curAnim;
- if (f.attr && !f.element)
- j = !1;
- else if (j || w >= T + this.startTime) {
- this.now = this.end, this.pos = 1, this.update();
- var R = O[this.prop] = !0;
- F(O, function(k) {
- k !== !0 && (R = !1);
- }), R && l && l.call(f), j = !1;
- } else
- this.pos = x.easing((w - this.startTime) / T), this.now = this.start + (this.end - this.start) * this.pos, this.update(), j = !0;
- return j;
- }, B.prototype.initPath = function(j, w, x) {
- function f(h, c) {
- for (; h.length < v; ) {
- var u = h[0], i = c[v - h.length];
- i && u[0] === "M" && (h[0] = i[0] === "C" ? ["C", u[1], u[2], u[1], u[2], u[1], u[2]] : [
- "L",
- u[1],
- u[2]
- ]), h.unshift(u), R && (u = h.pop(), h.push(h[h.length - 1], u));
- }
- }
- function l(h, c) {
- for (; h.length < v; )
- if (c = h[Math.floor(h.length / k) - 1].slice(), c[0] === "C" && (c[1] = c[5], c[2] = c[6]), R) {
- var u = h[Math.floor(h.length / k)].slice();
- h.splice(h.length / 2, 0, c, u);
- } else
- h.push(c);
- }
- var T = j.startX, O = j.endX;
- x = x.slice();
- var R = j.isArea, k = R ? 2 : 1;
- if (w = w && w.slice(), !w)
- return [x, x];
- if (T && O && O.length) {
- for (j = 0; j < T.length; j++)
- if (T[j] === O[0]) {
- var b = j;
- break;
- } else if (T[0] === O[O.length - T.length + j]) {
- b = j;
- var S = !0;
- break;
- } else if (T[T.length - 1] === O[O.length - T.length + j]) {
- b = T.length - j;
- break;
- }
- typeof b > "u" && (w = []);
- }
- if (w.length && V(b)) {
- var v = x.length + b * k;
- S ? (f(w, x), l(x, w)) : (f(x, w), l(w, x));
- }
- return [w, x];
- }, B.prototype.fillSetter = function() {
- B.prototype.strokeSetter.apply(this, arguments);
- }, B.prototype.strokeSetter = function() {
- this.elem.attr(this.prop, U(this.start).tweenTo(U(this.end), this.pos), void 0, !0);
- }, B.timers = [], B;
- }();
- }), C(o, "Core/Animation/AnimationUtilities.js", [o["Core/Animation/Fx.js"], o["Core/Utilities.js"]], function(y, N) {
- function _(l) {
- return j(l) ? w({ duration: 500, defer: 0 }, l) : { duration: l ? 500 : 0, defer: 0 };
- }
- function U(l, T) {
- for (var O = y.timers.length; O--; )
- y.timers[O].elem !== l || T && T !== y.timers[O].prop || (y.timers[O].stopped = !0);
- }
- var G = N.defined, V = N.getStyle, F = N.isArray, B = N.isNumber, j = N.isObject, w = N.merge, x = N.objectEach, f = N.pick;
- return { animate: function(l, T, O) {
- var R, k = "", b, S;
- if (!j(O)) {
- var v = arguments;
- O = { duration: v[2], easing: v[3], complete: v[4] };
- }
- B(O.duration) || (O.duration = 400), O.easing = typeof O.easing == "function" ? O.easing : Math[O.easing] || Math.easeInOutSine, O.curAnim = w(T), x(T, function(h, c) {
- U(l, c), S = new y(l, O, c), b = void 0, c === "d" && F(T.d) ? (S.paths = S.initPath(l, l.pathArray, T.d), S.toD = T.d, R = 0, b = 1) : l.attr ? R = l.attr(c) : (R = parseFloat(V(l, c)) || 0, c !== "opacity" && (k = "px")), b || (b = h), typeof b == "string" && b.match("px") && (b = b.replace(/px/g, "")), S.run(R, b, k);
- });
- }, animObject: _, getDeferredAnimation: function(l, T, O) {
- var R = _(T), k = 0, b = 0;
- return (O ? [O] : l.series).forEach(function(S) {
- S = _(S.options.animation), k = T && G(T.defer) ? R.defer : Math.max(k, S.duration + S.defer), b = Math.min(R.duration, S.duration);
- }), l.renderer.forExport && (k = 0), { defer: Math.max(0, k - b), duration: Math.min(k, b) };
- }, setAnimation: function(l, T) {
- T.renderer.globalAnimation = f(l, T.options.chart.animation, !0);
- }, stop: U };
- }), C(o, "Core/Renderer/HTML/AST.js", [o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N) {
- var _ = y.SVG_NS, U = N.attr, G = N.createElement, V = N.error, F = N.isFunction, B = N.isString, j = N.objectEach, w = N.splat, x = (N = y.win.trustedTypes) && F(N.createPolicy) && N.createPolicy("highcharts", { createHTML: function(T) {
- return T;
- } }), f = x ? x.createHTML("") : "";
- try {
- var l = !!new DOMParser().parseFromString(f, "text/html");
- } catch {
- l = !1;
- }
- return F = function() {
- function T(O) {
- this.nodes = typeof O == "string" ? this.parseMarkup(O) : O;
- }
- return T.filterUserAttributes = function(O) {
- return j(O, function(R, k) {
- var b = !0;
- T.allowedAttributes.indexOf(k) === -1 && (b = !1), ["background", "dynsrc", "href", "lowsrc", "src"].indexOf(k) !== -1 && (b = B(R) && T.allowedReferences.some(function(S) {
- return R.indexOf(S) === 0;
- })), b || (V("Highcharts warning: Invalid attribute '" + k + "' in config"), delete O[k]);
- }), O;
- }, T.setElementHTML = function(O, R) {
- O.innerHTML = T.emptyHTML, R && new T(R).addToDOM(O);
- }, T.prototype.addToDOM = function(O) {
- function R(k, b) {
- var S;
- return w(k).forEach(function(v) {
- var h = v.tagName, c = v.textContent ? y.doc.createTextNode(v.textContent) : void 0;
- if (h)
- if (h === "#text")
- var u = c;
- else if (T.allowedTags.indexOf(h) !== -1) {
- h = y.doc.createElementNS(h === "svg" ? _ : b.namespaceURI || _, h);
- var i = v.attributes || {};
- j(v, function(p, a) {
- a !== "tagName" && a !== "attributes" && a !== "children" && a !== "textContent" && (i[a] = p);
- }), U(h, T.filterUserAttributes(i)), c && h.appendChild(c), R(v.children || [], h), u = h;
- } else
- V("Highcharts warning: Invalid tagName " + h + " in config");
- u && b.appendChild(u), S = u;
- }), S;
- }
- return R(this.nodes, O);
- }, T.prototype.parseMarkup = function(O) {
- var R = [];
- if (O = O.trim(), l)
- O = new DOMParser().parseFromString(x ? x.createHTML(O) : O, "text/html");
- else {
- var k = G("div");
- k.innerHTML = O, O = { body: k };
- }
- var b = function(S, v) {
- var h = S.nodeName.toLowerCase(), c = { tagName: h };
- if (h === "#text" && (c.textContent = S.textContent || ""), h = S.attributes) {
- var u = {};
- [].forEach.call(h, function(p) {
- u[p.name] = p.value;
- }), c.attributes = u;
- }
- if (S.childNodes.length) {
- var i = [];
- [].forEach.call(S.childNodes, function(p) {
- b(p, i);
- }), i.length && (c.children = i);
- }
- v.push(c);
- };
- return [].forEach.call(O.body.childNodes, function(S) {
- return b(S, R);
- }), R;
- }, T.allowedAttributes = "aria-controls aria-describedby aria-expanded aria-haspopup aria-hidden aria-label aria-labelledby aria-live aria-pressed aria-readonly aria-roledescription aria-selected class clip-path color colspan cx cy d dx dy disabled fill height href id in markerHeight markerWidth offset opacity orient padding paddingLeft paddingRight patternUnits r refX refY role scope slope src startOffset stdDeviation stroke stroke-linecap stroke-width style tableValues result rowspan summary target tabindex text-align textAnchor textLength title type valign width x x1 x2 y y1 y2 zIndex".split(" "), T.allowedReferences = "https:// http:// mailto: / ../ ./ #".split(" "), T.allowedTags = "a abbr b br button caption circle clipPath code dd defs div dl dt em feComponentTransfer feFuncA feFuncB feFuncG feFuncR feGaussianBlur feOffset feMerge feMergeNode filter h1 h2 h3 h4 h5 h6 hr i img li linearGradient marker ol p path pattern pre rect small span stop strong style sub sup svg table text thead tbody tspan td th tr u ul #text".split(" "), T.emptyHTML = f, T;
- }(), F;
- }), C(
- o,
- "Core/FormatUtilities.js",
- [o["Core/DefaultOptions.js"], o["Core/Utilities.js"]],
- function(y, N) {
- function _(w, x, f, l) {
- w = +w || 0, x = +x;
- var T = U.lang, O = (w.toString().split(".")[1] || "").split("e")[0].length, R = w.toString().split("e"), k = x;
- if (x === -1)
- x = Math.min(O, 20);
- else if (!F(x))
- x = 2;
- else if (x && R[1] && 0 > R[1]) {
- var b = x + +R[1];
- 0 <= b ? (R[0] = (+R[0]).toExponential(b).split("e")[0], x = b) : (R[0] = R[0].split(".")[0] || 0, w = 20 > x ? (R[0] * Math.pow(10, R[1])).toFixed(x) : 0, R[1] = 0);
- }
- b = (Math.abs(R[1] ? R[0] : w) + Math.pow(10, -Math.max(x, O) - 1)).toFixed(x), O = String(j(b));
- var S = 3 < O.length ? O.length % 3 : 0;
- return f = B(f, T.decimalPoint), l = B(l, T.thousandsSep), w = (0 > w ? "-" : "") + (S ? O.substr(0, S) + l : ""), w = 0 > +R[1] && !k ? "0" : w + O.substr(S).replace(/(\d{3})(?=\d)/g, "$1" + l), x && (w += f + b.slice(-x)), R[1] && +w != 0 && (w += "e" + R[1]), w;
- }
- var U = y.defaultOptions, G = y.defaultTime, V = N.getNestedProperty, F = N.isNumber, B = N.pick, j = N.pInt;
- return { dateFormat: function(w, x, f) {
- return G.dateFormat(w, x, f);
- }, format: function(w, x, f) {
- var l = "{", T = !1, O = /f$/, R = /\.([0-9])/, k = U.lang, b = f && f.time || G;
- f = f && f.numberFormatter || _;
- for (var S = []; w; ) {
- var v = w.indexOf(l);
- if (v === -1)
- break;
- var h = w.slice(0, v);
- if (T) {
- if (h = h.split(":"), l = V(h.shift() || "", x), h.length && typeof l == "number")
- if (h = h.join(":"), O.test(h)) {
- var c = parseInt((h.match(R) || ["", "-1"])[1], 10);
- l !== null && (l = f(l, c, k.decimalPoint, -1 < h.indexOf(",") ? k.thousandsSep : ""));
- } else
- l = b.dateFormat(h, l);
- S.push(l);
- } else
- S.push(h);
- w = w.slice(v + 1), l = (T = !T) ? "}" : "{";
- }
- return S.push(w), S.join("");
- }, numberFormat: _ };
- }
- ), C(o, "Core/Renderer/RendererUtilities.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.clamp, _ = y.pick, U = y.stableSort, G;
- return function(V) {
- function F(B, j, w) {
- var x = B, f = x.reducedLen || j, l = function(S, v) {
- return (v.rank || 0) - (S.rank || 0);
- }, T = function(S, v) {
- return S.target - v.target;
- }, O, R = !0, k = [], b = 0;
- for (O = B.length; O--; )
- b += B[O].size;
- if (b > f) {
- for (U(B, l), b = O = 0; b <= f; )
- b += B[O].size, O++;
- k = B.splice(O - 1, B.length);
- }
- for (U(B, T), B = B.map(function(S) {
- return { size: S.size, targets: [S.target], align: _(S.align, 0.5) };
- }); R; ) {
- for (O = B.length; O--; )
- f = B[O], l = (Math.min.apply(0, f.targets) + Math.max.apply(0, f.targets)) / 2, f.pos = N(
- l - f.size * f.align,
- 0,
- j - f.size
- );
- for (O = B.length, R = !1; O--; )
- 0 < O && B[O - 1].pos + B[O - 1].size > B[O].pos && (B[O - 1].size += B[O].size, B[O - 1].targets = B[O - 1].targets.concat(B[O].targets), B[O - 1].align = 0.5, B[O - 1].pos + B[O - 1].size > j && (B[O - 1].pos = j - B[O - 1].size), B.splice(O, 1), R = !0);
- }
- return x.push.apply(x, k), O = 0, B.some(function(S) {
- var v = 0;
- return (S.targets || []).some(function() {
- return x[O].pos = S.pos + v, typeof w < "u" && Math.abs(x[O].pos - x[O].target) > w ? (x.slice(0, O + 1).forEach(function(h) {
- return delete h.pos;
- }), x.reducedLen = (x.reducedLen || j) - 0.1 * j, x.reducedLen > 0.1 * j && F(x, j, w), !0) : (v += x[O].size, O++, !1);
- });
- }), U(x, T), x;
- }
- V.distribute = F;
- }(G || (G = {})), G;
- }), C(o, "Core/Renderer/SVG/SVGElement.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Renderer/HTML/AST.js"], o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N, _, U, G) {
- var V = y.animate, F = y.animObject, B = y.stop, j = U.deg2rad, w = U.doc, x = U.noop, f = U.svg, l = U.SVG_NS, T = U.win, O = G.addEvent, R = G.attr, k = G.createElement, b = G.css, S = G.defined, v = G.erase, h = G.extend, c = G.fireEvent, u = G.isArray, i = G.isFunction, p = G.isNumber, a = G.isString, t = G.merge, s = G.objectEach, n = G.pick, P = G.pInt, D = G.syncTimeout, I = G.uniqueKey;
- return y = function() {
- function W() {
- this.element = void 0, this.onEvents = {}, this.opacity = 1, this.renderer = void 0, this.SVG_NS = l, this.symbolCustomAttribs = "x y width height r start end innerR anchorX anchorY rounded".split(" ");
- }
- return W.prototype._defaultGetter = function(E) {
- return E = n(this[E + "Value"], this[E], this.element ? this.element.getAttribute(E) : null, 0), /^[\-0-9\.]+$/.test(E) && (E = parseFloat(E)), E;
- }, W.prototype._defaultSetter = function(E, X, g) {
- g.setAttribute(X, E);
- }, W.prototype.add = function(E) {
- var X = this.renderer, g = this.element;
- if (E && (this.parentGroup = E), this.parentInverted = E && E.inverted, typeof this.textStr < "u" && this.element.nodeName === "text" && X.buildText(this), this.added = !0, !E || E.handleZ || this.zIndex)
- var m = this.zIndexSetter();
- return m || (E ? E.element : X.box).appendChild(g), this.onAdd && this.onAdd(), this;
- }, W.prototype.addClass = function(E, X) {
- var g = X ? "" : this.attr("class") || "";
- return E = (E || "").split(/ /g).reduce(function(m, L) {
- return g.indexOf(L) === -1 && m.push(L), m;
- }, g ? [g] : []).join(" "), E !== g && this.attr("class", E), this;
- }, W.prototype.afterSetters = function() {
- this.doTransform && (this.updateTransform(), this.doTransform = !1);
- }, W.prototype.align = function(E, X, g) {
- var m = {}, L = this.renderer, z = L.alignedObjects, $, Q, A;
- E ? (this.alignOptions = E, this.alignByTranslate = X, (!g || a(g)) && (this.alignTo = $ = g || "renderer", v(z, this), z.push(this), g = void 0)) : (E = this.alignOptions, X = this.alignByTranslate, $ = this.alignTo), g = n(g, L[$], $ === "scrollablePlotBox" ? L.plotBox : void 0, L), $ = E.align;
- var H = E.verticalAlign;
- return L = (g.x || 0) + (E.x || 0), z = (g.y || 0) + (E.y || 0), $ === "right" ? Q = 1 : $ === "center" && (Q = 2), Q && (L += (g.width - (E.width || 0)) / Q), m[X ? "translateX" : "x"] = Math.round(L), H === "bottom" ? A = 1 : H === "middle" && (A = 2), A && (z += (g.height - (E.height || 0)) / A), m[X ? "translateY" : "y"] = Math.round(z), this[this.placed ? "animate" : "attr"](m), this.placed = !0, this.alignAttr = m, this;
- }, W.prototype.alignSetter = function(E) {
- var X = { left: "start", center: "middle", right: "end" };
- X[E] && (this.alignValue = E, this.element.setAttribute(
- "text-anchor",
- X[E]
- ));
- }, W.prototype.animate = function(E, X, g) {
- var m = this, L = F(n(X, this.renderer.globalAnimation, !0));
- return X = L.defer, n(w.hidden, w.msHidden, w.webkitHidden, !1) && (L.duration = 0), L.duration !== 0 ? (g && (L.complete = g), D(function() {
- m.element && V(m, E, L);
- }, X)) : (this.attr(E, void 0, g), s(E, function(z, $) {
- L.step && L.step.call(this, z, { prop: $, pos: 1, elem: this });
- }, this)), this;
- }, W.prototype.applyTextOutline = function(E) {
- var X = this.element;
- E.indexOf("contrast") !== -1 && (E = E.replace(/contrast/g, this.renderer.getContrast(X.style.fill)));
- var g = E.split(" ");
- if (E = g[g.length - 1], (g = g[0]) && g !== "none" && U.svg) {
- this.fakeTS = !0, this.ySetter = this.xSetter, g = g.replace(/(^[\d\.]+)(.*?)$/g, function(z, $, Q) {
- return 2 * Number($) + Q;
- }), this.removeTextOutline();
- var m = w.createElementNS(l, "tspan");
- R(m, { class: "highcharts-text-outline", fill: E, stroke: E, "stroke-width": g, "stroke-linejoin": "round" }), [].forEach.call(X.childNodes, function(z) {
- var $ = z.cloneNode(!0);
- $.removeAttribute && ["fill", "stroke", "stroke-width", "stroke"].forEach(function(Q) {
- return $.removeAttribute(Q);
- }), m.appendChild($);
- });
- var L = w.createElementNS(l, "tspan");
- L.textContent = "", ["x", "y"].forEach(function(z) {
- var $ = X.getAttribute(z);
- $ && L.setAttribute(z, $);
- }), m.appendChild(L), X.insertBefore(m, X.firstChild);
- }
- }, W.prototype.attr = function(E, X, g, m) {
- var L = this.element, z = this.symbolCustomAttribs, $, Q = this, A, H;
- if (typeof E == "string" && typeof X < "u") {
- var Y = E;
- E = {}, E[Y] = X;
- }
- return typeof E == "string" ? Q = (this[E + "Getter"] || this._defaultGetter).call(this, E, L) : (s(E, function(Z, q) {
- A = !1, m || B(this, q), this.symbolName && z.indexOf(q) !== -1 && ($ || (this.symbolAttr(E), $ = !0), A = !0), !this.rotation || q !== "x" && q !== "y" || (this.doTransform = !0), A || (H = this[q + "Setter"] || this._defaultSetter, H.call(this, Z, q, L), !this.styledMode && this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(q) && this.updateShadows(q, Z, H));
- }, this), this.afterSetters()), g && g.call(this), Q;
- }, W.prototype.clip = function(E) {
- return this.attr("clip-path", E ? "url(" + this.renderer.url + "#" + E.id + ")" : "none");
- }, W.prototype.crisp = function(E, X) {
- X = X || E.strokeWidth || 0;
- var g = Math.round(X) % 2 / 2;
- return E.x = Math.floor(E.x || this.x || 0) + g, E.y = Math.floor(E.y || this.y || 0) + g, E.width = Math.floor((E.width || this.width || 0) - 2 * g), E.height = Math.floor((E.height || this.height || 0) - 2 * g), S(E.strokeWidth) && (E.strokeWidth = X), E;
- }, W.prototype.complexColor = function(E, X, g) {
- var m = this.renderer, L, z, $, Q, A, H, Y, Z, q, it, et = [], nt;
- c(this.renderer, "complexColor", { args: arguments }, function() {
- if (E.radialGradient ? z = "radialGradient" : E.linearGradient && (z = "linearGradient"), z) {
- if ($ = E[z], A = m.gradients, H = E.stops, q = g.radialReference, u($) && (E[z] = $ = { x1: $[0], y1: $[1], x2: $[2], y2: $[3], gradientUnits: "userSpaceOnUse" }), z === "radialGradient" && q && !S($.gradientUnits) && (Q = $, $ = t($, m.getRadialAttr(q, Q), { gradientUnits: "userSpaceOnUse" })), s($, function(ct, gt) {
- gt !== "id" && et.push(gt, ct);
- }), s(H, function(ct) {
- et.push(ct);
- }), et = et.join(","), A[et])
- it = A[et].attr("id");
- else {
- $.id = it = I();
- var rt = A[et] = m.createElement(z).attr($).add(m.defs);
- rt.radAttr = Q, rt.stops = [], H.forEach(function(ct) {
- ct[1].indexOf("rgba") === 0 ? (L = _.parse(ct[1]), Y = L.get("rgb"), Z = L.get("a")) : (Y = ct[1], Z = 1), ct = m.createElement("stop").attr({
- offset: ct[0],
- "stop-color": Y,
- "stop-opacity": Z
- }).add(rt), rt.stops.push(ct);
- });
- }
- nt = "url(" + m.url + "#" + it + ")", g.setAttribute(X, nt), g.gradient = et, E.toString = function() {
- return nt;
- };
- }
- });
- }, W.prototype.css = function(E) {
- var X = this.styles, g = {}, m = this.element, L = ["textOutline", "textOverflow", "width"], z = "", $ = !X;
- if (E && E.color && (E.fill = E.color), X && s(E, function(H, Y) {
- X && X[Y] !== H && (g[Y] = H, $ = !0);
- }), $) {
- if (X && (E = h(X, g)), E) {
- if (E.width === null || E.width === "auto")
- delete this.textWidth;
- else if (m.nodeName.toLowerCase() === "text" && E.width)
- var Q = this.textWidth = P(E.width);
- }
- if (this.styles = E, Q && !f && this.renderer.forExport && delete E.width, m.namespaceURI === this.SVG_NS) {
- var A = function(H, Y) {
- return "-" + Y.toLowerCase();
- };
- s(E, function(H, Y) {
- L.indexOf(Y) === -1 && (z += Y.replace(/([A-Z])/g, A) + ":" + H + ";");
- }), z && R(m, "style", z);
- } else
- b(m, E);
- this.added && (this.element.nodeName === "text" && this.renderer.buildText(this), E && E.textOutline && this.applyTextOutline(E.textOutline));
- }
- return this;
- }, W.prototype.dashstyleSetter = function(E) {
- var X = this["stroke-width"];
- if (X === "inherit" && (X = 1), E = E && E.toLowerCase()) {
- var g = E.replace("shortdashdotdot", "3,1,1,1,1,1,").replace("shortdashdot", "3,1,1,1").replace("shortdot", "1,1,").replace("shortdash", "3,1,").replace("longdash", "8,3,").replace(/dot/g, "1,3,").replace("dash", "4,3,").replace(/,$/, "").split(",");
- for (E = g.length; E--; )
- g[E] = "" + P(g[E]) * n(X, NaN);
- E = g.join(",").replace(/NaN/g, "none"), this.element.setAttribute("stroke-dasharray", E);
- }
- }, W.prototype.destroy = function() {
- var E = this, X = E.element || {}, g = E.renderer, m = X.ownerSVGElement, L = g.isSVG && X.nodeName === "SPAN" && E.parentGroup || void 0;
- if (X.onclick = X.onmouseout = X.onmouseover = X.onmousemove = X.point = null, B(E), E.clipPath && m) {
- var z = E.clipPath;
- [].forEach.call(m.querySelectorAll("[clip-path],[CLIP-PATH]"), function($) {
- -1 < $.getAttribute("clip-path").indexOf(z.element.id) && $.removeAttribute("clip-path");
- }), E.clipPath = z.destroy();
- }
- if (E.stops) {
- for (m = 0; m < E.stops.length; m++)
- E.stops[m].destroy();
- E.stops.length = 0, E.stops = void 0;
- }
- for (E.safeRemoveChild(X), g.styledMode || E.destroyShadows(); L && L.div && L.div.childNodes.length === 0; )
- X = L.parentGroup, E.safeRemoveChild(L.div), delete L.div, L = X;
- E.alignTo && v(g.alignedObjects, E), s(E, function($, Q) {
- E[Q] && E[Q].parentGroup === E && E[Q].destroy && E[Q].destroy(), delete E[Q];
- });
- }, W.prototype.destroyShadows = function() {
- (this.shadows || []).forEach(function(E) {
- this.safeRemoveChild(E);
- }, this), this.shadows = void 0;
- }, W.prototype.destroyTextPath = function(E, X) {
- var g = E.getElementsByTagName("text")[0];
- if (g) {
- if (g.removeAttribute("dx"), g.removeAttribute("dy"), X.element.setAttribute("id", ""), this.textPathWrapper && g.getElementsByTagName("textPath").length) {
- for (E = this.textPathWrapper.element.childNodes; E.length; )
- g.appendChild(E[0]);
- g.removeChild(this.textPathWrapper.element);
- }
- } else
- (E.getAttribute("dx") || E.getAttribute("dy")) && (E.removeAttribute("dx"), E.removeAttribute("dy"));
- this.textPathWrapper && (this.textPathWrapper = this.textPathWrapper.destroy());
- }, W.prototype.dSetter = function(E, X, g) {
- u(E) && (typeof E[0] == "string" && (E = this.renderer.pathToSegments(E)), this.pathArray = E, E = E.reduce(function(m, L, z) {
- return L && L.join ? (z ? m + " " : "") + L.join(" ") : (L || "").toString();
- }, "")), /(NaN| {2}|^$)/.test(E) && (E = "M 0 0"), this[X] !== E && (g.setAttribute(X, E), this[X] = E);
- }, W.prototype.fadeOut = function(E) {
- var X = this;
- X.animate({ opacity: 0 }, { duration: n(E, 150), complete: function() {
- X.attr({ y: -9999 }).hide();
- } });
- }, W.prototype.fillSetter = function(E, X, g) {
- typeof E == "string" ? g.setAttribute(X, E) : E && this.complexColor(E, X, g);
- }, W.prototype.getBBox = function(E, X) {
- var g = this.renderer, m = this.element, L = this.styles, z = this.textStr, $ = g.cache, Q = g.cacheKeys, A = m.namespaceURI === this.SVG_NS;
- X = n(X, this.rotation, 0);
- var H = g.styledMode ? m && W.prototype.getStyle.call(m, "font-size") : L && L.fontSize, Y;
- if (S(z)) {
- var Z = z.toString();
- Z.indexOf("<") === -1 && (Z = Z.replace(/[0-9]/g, "0")), Z += ["", X, H, this.textWidth, L && L.textOverflow, L && L.fontWeight].join();
- }
- if (Z && !E && (Y = $[Z]), !Y) {
- if (A || g.forExport) {
- try {
- var q = this.fakeTS && function(it) {
- var et = m.querySelector(".highcharts-text-outline");
- et && b(et, { display: it });
- };
- i(q) && q("none"), Y = m.getBBox ? h({}, m.getBBox()) : { width: m.offsetWidth, height: m.offsetHeight }, i(q) && q("");
- } catch {
- }
- (!Y || 0 > Y.width) && (Y = {
- width: 0,
- height: 0
- });
- } else
- Y = this.htmlGetBBox();
- if (g.isSVG && (E = Y.width, g = Y.height, A && (Y.height = g = { "11px,17": 14, "13px,20": 16 }[(H || "") + "," + Math.round(g)] || g), X && (A = X * j, Y.width = Math.abs(g * Math.sin(A)) + Math.abs(E * Math.cos(A)), Y.height = Math.abs(g * Math.cos(A)) + Math.abs(E * Math.sin(A)))), Z && (z === "" || 0 < Y.height)) {
- for (; 250 < Q.length; )
- delete $[Q.shift()];
- $[Z] || Q.push(Z), $[Z] = Y;
- }
- }
- return Y;
- }, W.prototype.getStyle = function(E) {
- return T.getComputedStyle(this.element || this, "").getPropertyValue(E);
- }, W.prototype.hasClass = function(E) {
- return ("" + this.attr("class")).split(" ").indexOf(E) !== -1;
- }, W.prototype.hide = function(E) {
- return E ? this.attr({ y: -9999 }) : this.attr({ visibility: "hidden" }), this;
- }, W.prototype.htmlGetBBox = function() {
- return { height: 0, width: 0, x: 0, y: 0 };
- }, W.prototype.init = function(E, X) {
- this.element = X === "span" ? k(X) : w.createElementNS(this.SVG_NS, X), this.renderer = E, c(this, "afterInit");
- }, W.prototype.invert = function(E) {
- return this.inverted = E, this.updateTransform(), this;
- }, W.prototype.on = function(E, X) {
- var g = this.onEvents;
- return g[E] && g[E](), g[E] = O(
- this.element,
- E,
- X
- ), this;
- }, W.prototype.opacitySetter = function(E, X, g) {
- this.opacity = E = Number(Number(E).toFixed(3)), g.setAttribute(X, E);
- }, W.prototype.removeClass = function(E) {
- return this.attr("class", ("" + this.attr("class")).replace(a(E) ? new RegExp("(^| )" + E + "( |$)") : E, " ").replace(/ +/g, " ").trim());
- }, W.prototype.removeTextOutline = function() {
- var E = this.element.querySelector("tspan.highcharts-text-outline");
- E && this.safeRemoveChild(E);
- }, W.prototype.safeRemoveChild = function(E) {
- var X = E.parentNode;
- X && X.removeChild(E);
- }, W.prototype.setRadialReference = function(E) {
- var X = this.element.gradient && this.renderer.gradients[this.element.gradient];
- return this.element.radialReference = E, X && X.radAttr && X.animate(this.renderer.getRadialAttr(E, X.radAttr)), this;
- }, W.prototype.setTextPath = function(E, X) {
- var g = this.element, m = this.text ? this.text.element : g, L = { textAnchor: "text-anchor" }, z = !1, $ = this.textPathWrapper, Q = !$;
- X = t(!0, { enabled: !0, attributes: { dy: -5, startOffset: "50%", textAnchor: "middle" } }, X);
- var A = N.filterUserAttributes(X.attributes);
- if (E && X && X.enabled) {
- $ && $.element.parentNode === null ? (Q = !0, $ = $.destroy()) : $ && this.removeTextOutline.call($.parentGroup), this.options && this.options.padding && (A.dx = -this.options.padding), $ || (this.textPathWrapper = $ = this.renderer.createElement("textPath"), z = !0);
- var H = $.element;
- if ((X = E.element.getAttribute("id")) || E.element.setAttribute("id", X = I()), Q)
- for (m.setAttribute("y", 0), p(A.dx) && m.setAttribute("x", -A.dx), E = [].slice.call(m.childNodes), Q = 0; Q < E.length; Q++) {
- var Y = E[Q];
- Y.nodeType !== T.Node.TEXT_NODE && Y.nodeName !== "tspan" || H.appendChild(Y);
- }
- z && $ && $.add({ element: m }), H.setAttributeNS("http://www.w3.org/1999/xlink", "href", this.renderer.url + "#" + X), S(A.dy) && (H.parentNode.setAttribute("dy", A.dy), delete A.dy), S(A.dx) && (H.parentNode.setAttribute("dx", A.dx), delete A.dx), s(A, function(Z, q) {
- H.setAttribute(L[q] || q, Z);
- }), g.removeAttribute("transform"), this.removeTextOutline.call($), this.text && !this.renderer.styledMode && this.attr({ fill: "none", "stroke-width": 0 }), this.applyTextOutline = this.updateTransform = x;
- } else
- $ && (delete this.updateTransform, delete this.applyTextOutline, this.destroyTextPath(g, E), this.updateTransform(), this.options && this.options.rotation && this.applyTextOutline(this.options.style.textOutline));
- return this;
- }, W.prototype.shadow = function(E, X, g) {
- var m = [], L = this.element, z = this.oldShadowOptions, $ = { color: "#000000", offsetX: this.parentInverted ? -1 : 1, offsetY: this.parentInverted ? -1 : 1, opacity: 0.15, width: 3 }, Q = !1, A;
- if (E === !0 ? A = $ : typeof E == "object" && (A = h($, E)), A && (A && z && s(A, function(it, et) {
- it !== z[et] && (Q = !0);
- }), Q && this.destroyShadows(), this.oldShadowOptions = A), !A)
- this.destroyShadows();
- else if (!this.shadows) {
- var H = A.opacity / A.width, Y = this.parentInverted ? "translate(" + A.offsetY + ", " + A.offsetX + ")" : "translate(" + A.offsetX + ", " + A.offsetY + ")";
- for ($ = 1; $ <= A.width; $++) {
- var Z = L.cloneNode(!1), q = 2 * A.width + 1 - 2 * $;
- R(Z, { stroke: E.color || "#000000", "stroke-opacity": H * $, "stroke-width": q, transform: Y, fill: "none" }), Z.setAttribute("class", (Z.getAttribute("class") || "") + " highcharts-shadow"), g && (R(Z, "height", Math.max(R(Z, "height") - q, 0)), Z.cutHeight = q), X ? X.element.appendChild(Z) : L.parentNode && L.parentNode.insertBefore(Z, L), m.push(Z);
- }
- this.shadows = m;
- }
- return this;
- }, W.prototype.show = function(E) {
- return this.attr({ visibility: E ? "inherit" : "visible" });
- }, W.prototype.strokeSetter = function(E, X, g) {
- this[X] = E, this.stroke && this["stroke-width"] ? (W.prototype.fillSetter.call(this, this.stroke, "stroke", g), g.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0) : X === "stroke-width" && E === 0 && this.hasStroke ? (g.removeAttribute("stroke"), this.hasStroke = !1) : this.renderer.styledMode && this["stroke-width"] && (g.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0);
- }, W.prototype.strokeWidth = function() {
- if (!this.renderer.styledMode)
- return this["stroke-width"] || 0;
- var E = this.getStyle("stroke-width"), X = 0;
- if (E.indexOf("px") === E.length - 2)
- X = P(E);
- else if (E !== "") {
- var g = w.createElementNS(l, "rect");
- R(g, { width: E, "stroke-width": 0 }), this.element.parentNode.appendChild(g), X = g.getBBox().width, g.parentNode.removeChild(g);
- }
- return X;
- }, W.prototype.symbolAttr = function(E) {
- var X = this;
- "x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(g) {
- X[g] = n(E[g], X[g]);
- }), X.attr({ d: X.renderer.symbols[X.symbolName](X.x, X.y, X.width, X.height, X) });
- }, W.prototype.textSetter = function(E) {
- E !== this.textStr && (delete this.textPxLength, this.textStr = E, this.added && this.renderer.buildText(this));
- }, W.prototype.titleSetter = function(E) {
- var X = this.element, g = X.getElementsByTagName("title")[0] || w.createElementNS(this.SVG_NS, "title");
- X.insertBefore ? X.insertBefore(g, X.firstChild) : X.appendChild(g), g.textContent = String(n(E, "")).replace(/<[^>]*>/g, "").replace(/</g, "<").replace(
- />/g,
- ">"
- );
- }, W.prototype.toFront = function() {
- var E = this.element;
- return E.parentNode.appendChild(E), this;
- }, W.prototype.translate = function(E, X) {
- return this.attr({ translateX: E, translateY: X });
- }, W.prototype.updateShadows = function(E, X, g) {
- var m = this.shadows;
- if (m)
- for (var L = m.length; L--; )
- g.call(m[L], E === "height" ? Math.max(X - (m[L].cutHeight || 0), 0) : E === "d" ? this.d : X, E, m[L]);
- }, W.prototype.updateTransform = function() {
- var E = this.scaleX, X = this.scaleY, g = this.inverted, m = this.rotation, L = this.matrix, z = this.element, $ = this.translateX || 0, Q = this.translateY || 0;
- g && ($ += this.width, Q += this.height), $ = ["translate(" + $ + "," + Q + ")"], S(L) && $.push("matrix(" + L.join(",") + ")"), g ? $.push("rotate(90) scale(-1,1)") : m && $.push("rotate(" + m + " " + n(this.rotationOriginX, z.getAttribute("x"), 0) + " " + n(this.rotationOriginY, z.getAttribute("y") || 0) + ")"), (S(E) || S(X)) && $.push("scale(" + n(E, 1) + " " + n(X, 1) + ")"), $.length && z.setAttribute("transform", $.join(" "));
- }, W.prototype.visibilitySetter = function(E, X, g) {
- E === "inherit" ? g.removeAttribute(X) : this[X] !== E && g.setAttribute(
- X,
- E
- ), this[X] = E;
- }, W.prototype.xGetter = function(E) {
- return this.element.nodeName === "circle" && (E === "x" ? E = "cx" : E === "y" && (E = "cy")), this._defaultGetter(E);
- }, W.prototype.zIndexSetter = function(E, X) {
- var g = this.renderer, m = this.parentGroup, L = (m || g).element || g.box, z = this.element;
- g = L === g.box;
- var $ = !1, Q = this.added, A;
- if (S(E) ? (z.setAttribute("data-z-index", E), E = +E, this[X] === E && (Q = !1)) : S(this[X]) && z.removeAttribute("data-z-index"), this[X] = E, Q) {
- for ((E = this.zIndex) && m && (m.handleZ = !0), X = L.childNodes, A = X.length - 1; 0 <= A && !$; A--) {
- m = X[A], Q = m.getAttribute("data-z-index");
- var H = !S(Q);
- m !== z && (0 > E && H && !g && !A ? (L.insertBefore(z, X[A]), $ = !0) : (P(Q) <= E || H && (!S(E) || 0 <= E)) && (L.insertBefore(z, X[A + 1] || null), $ = !0));
- }
- $ || (L.insertBefore(z, X[g ? 3 : 0] || null), $ = !0);
- }
- return $;
- }, W;
- }(), y.prototype["stroke-widthSetter"] = y.prototype.strokeSetter, y.prototype.yGetter = y.prototype.xGetter, y.prototype.matrixSetter = y.prototype.rotationOriginXSetter = y.prototype.rotationOriginYSetter = y.prototype.rotationSetter = y.prototype.scaleXSetter = y.prototype.scaleYSetter = y.prototype.translateXSetter = y.prototype.translateYSetter = y.prototype.verticalAlignSetter = function(W, E) {
- this[E] = W, this.doTransform = !0;
- }, y;
- }), C(o, "Core/Renderer/RendererRegistry.js", [o["Core/Globals.js"]], function(y) {
- var N;
- return function(_) {
- _.rendererTypes = {};
- var U;
- _.getRendererType = function(G) {
- return G === void 0 && (G = U), _.rendererTypes[G] || _.rendererTypes[U];
- }, _.registerRendererType = function(G, V, F) {
- _.rendererTypes[G] = V, (!U || F) && (U = G, y.Renderer = V);
- };
- }(N || (N = {})), N;
- }), C(
- o,
- "Core/Renderer/SVG/SVGLabel.js",
- [o["Core/Renderer/SVG/SVGElement.js"], o["Core/Utilities.js"]],
- function(y, N) {
- var _ = this && this.__extends || function() {
- var w = function(x, f) {
- return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(l, T) {
- l.__proto__ = T;
- } || function(l, T) {
- for (var O in T)
- T.hasOwnProperty(O) && (l[O] = T[O]);
- }, w(x, f);
- };
- return function(x, f) {
- function l() {
- this.constructor = x;
- }
- w(x, f), x.prototype = f === null ? Object.create(f) : (l.prototype = f.prototype, new l());
- };
- }(), U = N.defined, G = N.extend, V = N.isNumber, F = N.merge, B = N.pick, j = N.removeEvent;
- return function(w) {
- function x(f, l, T, O, R, k, b, S, v, h) {
- var c = w.call(this) || this;
- c.paddingLeftSetter = c.paddingSetter, c.paddingRightSetter = c.paddingSetter, c.init(f, "g"), c.textStr = l, c.x = T, c.y = O, c.anchorX = k, c.anchorY = b, c.baseline = v, c.className = h, c.addClass(h === "button" ? "highcharts-no-tooltip" : "highcharts-label"), h && c.addClass("highcharts-" + h), c.text = f.text(void 0, 0, 0, S).attr({ zIndex: 1 });
- var u;
- return typeof R == "string" && ((u = /^url\((.*?)\)$/.test(R)) || c.renderer.symbols[R]) && (c.symbolKey = R), c.bBox = x.emptyBBox, c.padding = 3, c.baselineOffset = 0, c.needsBox = f.styledMode || u, c.deferredAttr = {}, c.alignFactor = 0, c;
- }
- return _(x, w), x.prototype.alignSetter = function(f) {
- f = { left: 0, center: 0.5, right: 1 }[f], f !== this.alignFactor && (this.alignFactor = f, this.bBox && V(this.xSetting) && this.attr({ x: this.xSetting }));
- }, x.prototype.anchorXSetter = function(f, l) {
- this.anchorX = f, this.boxAttr(l, Math.round(f) - this.getCrispAdjust() - this.xSetting);
- }, x.prototype.anchorYSetter = function(f, l) {
- this.anchorY = f, this.boxAttr(l, f - this.ySetting);
- }, x.prototype.boxAttr = function(f, l) {
- this.box ? this.box.attr(f, l) : this.deferredAttr[f] = l;
- }, x.prototype.css = function(f) {
- if (f) {
- var l = {};
- f = F(f), x.textProps.forEach(function(O) {
- typeof f[O] < "u" && (l[O] = f[O], delete f[O]);
- }), this.text.css(l);
- var T = "width" in l;
- "fontSize" in l || "fontWeight" in l ? this.updateTextPadding() : T && this.updateBoxSize();
- }
- return y.prototype.css.call(this, f);
- }, x.prototype.destroy = function() {
- j(this.element, "mouseenter"), j(this.element, "mouseleave"), this.text && this.text.destroy(), this.box && (this.box = this.box.destroy()), y.prototype.destroy.call(this);
- }, x.prototype.fillSetter = function(f, l) {
- f && (this.needsBox = !0), this.fill = f, this.boxAttr(l, f);
- }, x.prototype.getBBox = function() {
- this.textStr && this.bBox.width === 0 && this.bBox.height === 0 && this.updateBoxSize();
- var f = this.padding, l = B(this.paddingLeft, f);
- return { width: this.width, height: this.height, x: this.bBox.x - l, y: this.bBox.y - f };
- }, x.prototype.getCrispAdjust = function() {
- return this.renderer.styledMode && this.box ? this.box.strokeWidth() % 2 / 2 : (this["stroke-width"] ? parseInt(
- this["stroke-width"],
- 10
- ) : 0) % 2 / 2;
- }, x.prototype.heightSetter = function(f) {
- this.heightSetting = f;
- }, x.prototype.onAdd = function() {
- var f = this.textStr;
- this.text.add(this), this.attr({ text: U(f) ? f : "", x: this.x, y: this.y }), this.box && U(this.anchorX) && this.attr({ anchorX: this.anchorX, anchorY: this.anchorY });
- }, x.prototype.paddingSetter = function(f, l) {
- V(f) ? f !== this[l] && (this[l] = f, this.updateTextPadding()) : this[l] = void 0;
- }, x.prototype.rSetter = function(f, l) {
- this.boxAttr(l, f);
- }, x.prototype.shadow = function(f) {
- return f && !this.renderer.styledMode && (this.updateBoxSize(), this.box && this.box.shadow(f)), this;
- }, x.prototype.strokeSetter = function(f, l) {
- this.stroke = f, this.boxAttr(l, f);
- }, x.prototype["stroke-widthSetter"] = function(f, l) {
- f && (this.needsBox = !0), this["stroke-width"] = f, this.boxAttr(l, f);
- }, x.prototype["text-alignSetter"] = function(f) {
- this.textAlign = f;
- }, x.prototype.textSetter = function(f) {
- typeof f < "u" && this.text.attr({ text: f }), this.updateTextPadding();
- }, x.prototype.updateBoxSize = function() {
- var f = this.text.element.style, l = {}, T = this.padding, O = this.bBox = V(this.widthSetting) && V(this.heightSetting) && !this.textAlign || !U(this.text.textStr) ? x.emptyBBox : this.text.getBBox();
- this.width = this.getPaddedWidth(), this.height = (this.heightSetting || O.height || 0) + 2 * T, f = this.renderer.fontMetrics(f && f.fontSize, this.text), this.baselineOffset = T + Math.min((this.text.firstLineMetrics || f).b, O.height || 1 / 0), this.heightSetting && (this.baselineOffset += (this.heightSetting - f.h) / 2), this.needsBox && (this.box || (T = this.box = this.symbolKey ? this.renderer.symbol(this.symbolKey) : this.renderer.rect(), T.addClass((this.className === "button" ? "" : "highcharts-label-box") + (this.className ? " highcharts-" + this.className + "-box" : "")), T.add(this)), T = this.getCrispAdjust(), l.x = T, l.y = (this.baseline ? -this.baselineOffset : 0) + T, l.width = Math.round(this.width), l.height = Math.round(this.height), this.box.attr(G(l, this.deferredAttr)), this.deferredAttr = {});
- }, x.prototype.updateTextPadding = function() {
- var f = this.text;
- this.updateBoxSize();
- var l = this.baseline ? 0 : this.baselineOffset, T = B(this.paddingLeft, this.padding);
- U(this.widthSetting) && this.bBox && (this.textAlign === "center" || this.textAlign === "right") && (T += { center: 0.5, right: 1 }[this.textAlign] * (this.widthSetting - this.bBox.width)), (T !== f.x || l !== f.y) && (f.attr("x", T), f.hasBoxWidthChanged && (this.bBox = f.getBBox(!0)), typeof l < "u" && f.attr("y", l)), f.x = T, f.y = l;
- }, x.prototype.widthSetter = function(f) {
- this.widthSetting = V(f) ? f : void 0;
- }, x.prototype.getPaddedWidth = function() {
- var f = this.padding, l = B(this.paddingLeft, f);
- return f = B(this.paddingRight, f), (this.widthSetting || this.bBox.width || 0) + l + f;
- }, x.prototype.xSetter = function(f) {
- this.x = f, this.alignFactor && (f -= this.alignFactor * this.getPaddedWidth(), this["forceAnimate:x"] = !0), this.xSetting = Math.round(f), this.attr("translateX", this.xSetting);
- }, x.prototype.ySetter = function(f) {
- this.ySetting = this.y = Math.round(f), this.attr("translateY", this.ySetting);
- }, x.emptyBBox = { width: 0, height: 0, x: 0, y: 0 }, x.textProps = "color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" "), x;
- }(y);
- }
- ), C(
- o,
- "Core/Renderer/SVG/Symbols.js",
- [o["Core/Utilities.js"]],
- function(y) {
- function N(B, j, w, x, f) {
- var l = [];
- if (f) {
- var T = f.start || 0, O = F(f.r, w);
- w = F(f.r, x || w);
- var R = (f.end || 0) - 1e-3;
- x = f.innerR;
- var k = F(f.open, 1e-3 > Math.abs((f.end || 0) - T - 2 * Math.PI)), b = Math.cos(T), S = Math.sin(T), v = Math.cos(R), h = Math.sin(R);
- T = F(f.longArc, 1e-3 > R - T - Math.PI ? 0 : 1), l.push(["M", B + O * b, j + w * S], ["A", O, w, 0, T, F(f.clockwise, 1), B + O * v, j + w * h]), G(x) && l.push(k ? ["M", B + x * v, j + x * h] : ["L", B + x * v, j + x * h], ["A", x, x, 0, T, G(f.clockwise) ? 1 - f.clockwise : 0, B + x * b, j + x * S]), k || l.push(["Z"]);
- }
- return l;
- }
- function _(B, j, w, x, f) {
- return f && f.r ? U(B, j, w, x, f) : [["M", B, j], ["L", B + w, j], ["L", B + w, j + x], ["L", B, j + x], ["Z"]];
- }
- function U(B, j, w, x, f) {
- return f = f && f.r || 0, [["M", B + f, j], ["L", B + w - f, j], ["C", B + w, j, B + w, j, B + w, j + f], ["L", B + w, j + x - f], ["C", B + w, j + x, B + w, j + x, B + w - f, j + x], ["L", B + f, j + x], ["C", B, j + x, B, j + x, B, j + x - f], ["L", B, j + f], ["C", B, j, B, j, B + f, j]];
- }
- var G = y.defined, V = y.isNumber, F = y.pick;
- return { arc: N, callout: function(B, j, w, x, f) {
- var l = Math.min(f && f.r || 0, w, x), T = l + 6, O = f && f.anchorX;
- f = f && f.anchorY || 0;
- var R = U(B, j, w, x, { r: l });
- return V(O) && (B + O >= w ? f > j + T && f < j + x - T ? R.splice(3, 1, ["L", B + w, f - 6], ["L", B + w + 6, f], ["L", B + w, f + 6], ["L", B + w, j + x - l]) : R.splice(3, 1, ["L", B + w, x / 2], ["L", O, f], ["L", B + w, x / 2], ["L", B + w, j + x - l]) : 0 >= B + O ? f > j + T && f < j + x - T ? R.splice(7, 1, ["L", B, f + 6], ["L", B - 6, f], ["L", B, f - 6], ["L", B, j + l]) : R.splice(7, 1, ["L", B, x / 2], ["L", O, f], ["L", B, x / 2], ["L", B, j + l]) : f && f > x && O > B + T && O < B + w - T ? R.splice(5, 1, ["L", O + 6, j + x], ["L", O, j + x + 6], ["L", O - 6, j + x], ["L", B + l, j + x]) : f && 0 > f && O > B + T && O < B + w - T && R.splice(1, 1, ["L", O - 6, j], ["L", O, j - 6], ["L", O + 6, j], ["L", w - l, j])), R;
- }, circle: function(B, j, w, x) {
- return N(B + w / 2, j + x / 2, w / 2, x / 2, { start: 0.5 * Math.PI, end: 2.5 * Math.PI, open: !1 });
- }, diamond: function(B, j, w, x) {
- return [["M", B + w / 2, j], ["L", B + w, j + x / 2], ["L", B + w / 2, j + x], ["L", B, j + x / 2], ["Z"]];
- }, rect: _, roundedRect: U, square: _, triangle: function(B, j, w, x) {
- return [["M", B + w / 2, j], ["L", B + w, j + x], ["L", B, j + x], ["Z"]];
- }, "triangle-down": function(B, j, w, x) {
- return [["M", B, j], ["L", B + w, j], ["L", B + w / 2, j + x], ["Z"]];
- } };
- }
- ), C(o, "Core/Renderer/SVG/TextBuilder.js", [o["Core/Renderer/HTML/AST.js"], o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N, _) {
- var U = N.doc, G = N.SVG_NS, V = N.win, F = _.attr, B = _.isString, j = _.objectEach, w = _.pick;
- return function() {
- function x(f) {
- var l = f.styles;
- this.renderer = f.renderer, this.svgElement = f, this.width = f.textWidth, this.textLineHeight = l && l.lineHeight, this.textOutline = l && l.textOutline, this.ellipsis = !(!l || l.textOverflow !== "ellipsis"), this.noWrap = !(!l || l.whiteSpace !== "nowrap"), this.fontSize = l && l.fontSize;
- }
- return x.prototype.buildSVG = function() {
- var f = this.svgElement, l = f.element, T = f.renderer, O = w(f.textStr, "").toString(), R = O.indexOf("<") !== -1, k = l.childNodes;
- T = this.width && !f.added && T.box;
- var b = /<br.*?>/g, S = [O, this.ellipsis, this.noWrap, this.textLineHeight, this.textOutline, this.fontSize, this.width].join();
- if (S !== f.textCache) {
- for (f.textCache = S, delete f.actualWidth, S = k.length; S--; )
- l.removeChild(k[S]);
- R || this.ellipsis || this.width || O.indexOf(" ") !== -1 && (!this.noWrap || b.test(O)) ? O !== "" && (T && T.appendChild(l), O = new y(O), this.modifyTree(O.nodes), O.addToDOM(f.element), this.modifyDOM(), this.ellipsis && (l.textContent || "").indexOf("…") !== -1 && f.attr(
- "title",
- this.unescapeEntities(f.textStr || "", ["<", ">"])
- ), T && T.removeChild(l)) : l.appendChild(U.createTextNode(this.unescapeEntities(O))), B(this.textOutline) && f.applyTextOutline && f.applyTextOutline(this.textOutline);
- }
- }, x.prototype.modifyDOM = function() {
- var f = this, l = this.svgElement, T = F(l.element, "x");
- l.firstLineMetrics = void 0;
- for (var O; (O = l.element.firstChild) && /^[\s\u200B]*$/.test(O.textContent || " "); )
- l.element.removeChild(O);
- [].forEach.call(l.element.querySelectorAll("tspan.highcharts-br"), function(S, v) {
- S.nextSibling && S.previousSibling && (v === 0 && S.previousSibling.nodeType === 1 && (l.firstLineMetrics = l.renderer.fontMetrics(void 0, S.previousSibling)), F(S, { dy: f.getLineHeight(S.nextSibling), x: T }));
- });
- var R = this.width || 0;
- if (R) {
- var k = function(S, v) {
- var h = S.textContent || "", c = h.replace(/([^\^])-/g, "$1- ").split(" "), u = !f.noWrap && (1 < c.length || 1 < l.element.childNodes.length), i = f.getLineHeight(v), p = 0, a = l.actualWidth;
- if (f.ellipsis)
- h && f.truncate(S, h, void 0, 0, Math.max(0, R - parseInt(f.fontSize || 12, 10)), function(t, s) {
- return t.substring(
- 0,
- s
- ) + "…";
- });
- else if (u) {
- for (h = [], u = []; v.firstChild && v.firstChild !== S; )
- u.push(v.firstChild), v.removeChild(v.firstChild);
- for (; c.length; )
- c.length && !f.noWrap && 0 < p && (h.push(S.textContent || ""), S.textContent = c.join(" ").replace(/- /g, "-")), f.truncate(S, void 0, c, p === 0 && a || 0, R, function(t, s) {
- return c.slice(0, s).join(" ").replace(/- /g, "-");
- }), a = l.actualWidth, p++;
- u.forEach(function(t) {
- v.insertBefore(t, S);
- }), h.forEach(function(t) {
- v.insertBefore(U.createTextNode(t), S), t = U.createElementNS(G, "tspan"), t.textContent = "", F(t, { dy: i, x: T }), v.insertBefore(t, S);
- });
- }
- }, b = function(S) {
- [].slice.call(S.childNodes).forEach(function(v) {
- v.nodeType === V.Node.TEXT_NODE ? k(v, S) : (v.className.baseVal.indexOf("highcharts-br") !== -1 && (l.actualWidth = 0), b(v));
- });
- };
- b(l.element);
- }
- }, x.prototype.getLineHeight = function(f) {
- var l;
- return f = f.nodeType === V.Node.TEXT_NODE ? f.parentElement : f, this.renderer.styledMode || (l = f && /(px|em)$/.test(f.style.fontSize) ? f.style.fontSize : this.fontSize || this.renderer.style.fontSize || 12), this.textLineHeight ? parseInt(
- this.textLineHeight.toString(),
- 10
- ) : this.renderer.fontMetrics(l, f || this.svgElement.element).h;
- }, x.prototype.modifyTree = function(f) {
- var l = this, T = function(O, R) {
- var k = O.attributes;
- k = k === void 0 ? {} : k;
- var b = O.children, S = O.tagName, v = l.renderer.styledMode;
- S === "b" || S === "strong" ? v ? k.class = "highcharts-strong" : k.style = "font-weight:bold;" + (k.style || "") : (S === "i" || S === "em") && (v ? k.class = "highcharts-emphasized" : k.style = "font-style:italic;" + (k.style || "")), B(k.style) && (k.style = k.style.replace(/(;| |^)color([ :])/, "$1fill$2")), S === "br" ? (k.class = "highcharts-br", O.textContent = "", (R = f[R + 1]) && R.textContent && (R.textContent = R.textContent.replace(/^ +/gm, ""))) : S === "a" && b && b.some(function(h) {
- return h.tagName === "#text";
- }) && (O.children = [{ children: b, tagName: "tspan" }]), S !== "#text" && S !== "a" && (O.tagName = "tspan"), O.attributes = k, b && b.filter(function(h) {
- return h.tagName !== "#text";
- }).forEach(T);
- };
- f.forEach(T);
- }, x.prototype.truncate = function(f, l, T, O, R, k) {
- var b = this.svgElement, S = b.renderer, v = b.rotation, h = [], c = T ? 1 : 0, u = (l || T || "").length, i = u, p, a = function(s, n) {
- n = n || s;
- var P = f.parentNode;
- if (P && typeof h[n] > "u")
- if (P.getSubStringLength)
- try {
- h[n] = O + P.getSubStringLength(0, T ? n + 1 : n);
- } catch {
- }
- else
- S.getSpanWidth && (f.textContent = k(l || T, s), h[n] = O + S.getSpanWidth(b, f));
- return h[n];
- };
- b.rotation = 0;
- var t = a(f.textContent.length);
- if (O + t > R) {
- for (; c <= u; )
- i = Math.ceil((c + u) / 2), T && (p = k(T, i)), t = a(i, p && p.length - 1), c === u ? c = u + 1 : t > R ? u = i - 1 : c = i;
- u === 0 ? f.textContent = "" : l && u === l.length - 1 || (f.textContent = p || k(l || T, i));
- }
- T && T.splice(0, i), b.actualWidth = t, b.rotation = v;
- }, x.prototype.unescapeEntities = function(f, l) {
- return j(this.renderer.escapes, function(T, O) {
- l && l.indexOf(T) !== -1 || (f = f.toString().replace(new RegExp(T, "g"), O));
- }), f;
- }, x;
- }();
- }), C(o, "Core/Renderer/SVG/SVGRenderer.js", [o["Core/Renderer/HTML/AST.js"], o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Renderer/RendererRegistry.js"], o["Core/Renderer/SVG/SVGElement.js"], o["Core/Renderer/SVG/SVGLabel.js"], o["Core/Renderer/SVG/Symbols.js"], o["Core/Renderer/SVG/TextBuilder.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V, F, B, j) {
- var w = _.charts, x = _.deg2rad, f = _.doc, l = _.isFirefox, T = _.isMS, O = _.isWebKit, R = _.noop, k = _.SVG_NS, b = _.symbolSizes, S = _.win, v = j.addEvent, h = j.attr, c = j.createElement, u = j.css, i = j.defined, p = j.destroyObjectProperties, a = j.extend, t = j.isArray, s = j.isNumber, n = j.isObject, P = j.isString, D = j.merge, I = j.pick, W = j.pInt, E = j.uniqueKey, X;
- return _ = function() {
- function g(m, L, z, $, Q, A, H) {
- this.width = this.url = this.style = this.isSVG = this.imgCount = this.height = this.gradients = this.globalAnimation = this.defs = this.chartIndex = this.cacheKeys = this.cache = this.boxWrapper = this.box = this.alignedObjects = void 0, this.init(m, L, z, $, Q, A, H);
- }
- return g.prototype.init = function(m, L, z, $, Q, A, H) {
- var Y = this.createElement("svg").attr({ version: "1.1", class: "highcharts-root" }), Z = Y.element;
- H || Y.css(this.getStyle($)), m.appendChild(Z), h(m, "dir", "ltr"), m.innerHTML.indexOf("xmlns") === -1 && h(Z, "xmlns", this.SVG_NS), this.isSVG = !0, this.box = Z, this.boxWrapper = Y, this.alignedObjects = [], this.url = this.getReferenceURL(), this.createElement("desc").add().element.appendChild(f.createTextNode("Created with Highcharts 9.3.3")), this.defs = this.createElement("defs").add(), this.allowHTML = A, this.forExport = Q, this.styledMode = H, this.gradients = {}, this.cache = {}, this.cacheKeys = [], this.imgCount = 0, this.setSize(L, z, !1);
- var q;
- l && m.getBoundingClientRect && (L = function() {
- u(m, { left: 0, top: 0 }), q = m.getBoundingClientRect(), u(m, { left: Math.ceil(q.left) - q.left + "px", top: Math.ceil(q.top) - q.top + "px" });
- }, L(), this.unSubPixelFix = v(S, "resize", L));
- }, g.prototype.definition = function(m) {
- return new y([m]).addToDOM(this.defs.element);
- }, g.prototype.getReferenceURL = function() {
- if ((l || O) && f.getElementsByTagName("base").length) {
- if (!i(X)) {
- var m = E();
- m = new y([{ tagName: "svg", attributes: { width: 8, height: 8 }, children: [{ tagName: "defs", children: [{ tagName: "clipPath", attributes: { id: m }, children: [{ tagName: "rect", attributes: { width: 4, height: 4 } }] }] }, { tagName: "rect", attributes: { id: "hitme", width: 8, height: 8, "clip-path": "url(#" + m + ")", fill: "rgba(0,0,0,0.001)" } }] }]).addToDOM(f.body), u(m, { position: "fixed", top: 0, left: 0, zIndex: 9e5 });
- var L = f.elementFromPoint(6, 6);
- X = (L && L.id) === "hitme", f.body.removeChild(m);
- }
- if (X)
- return S.location.href.split("#")[0].replace(/<[^>]*>/g, "").replace(/([\('\)])/g, "\\$1").replace(/ /g, "%20");
- }
- return "";
- }, g.prototype.getStyle = function(m) {
- return this.style = a({ fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif', fontSize: "12px" }, m);
- }, g.prototype.setStyle = function(m) {
- this.boxWrapper.css(this.getStyle(m));
- }, g.prototype.isHidden = function() {
- return !this.boxWrapper.getBBox().width;
- }, g.prototype.destroy = function() {
- var m = this.defs;
- return this.box = null, this.boxWrapper = this.boxWrapper.destroy(), p(this.gradients || {}), this.gradients = null, m && (this.defs = m.destroy()), this.unSubPixelFix && this.unSubPixelFix(), this.alignedObjects = null;
- }, g.prototype.createElement = function(m) {
- var L = new this.Element();
- return L.init(this, m), L;
- }, g.prototype.getRadialAttr = function(m, L) {
- return { cx: m[0] - m[2] / 2 + (L.cx || 0) * m[2], cy: m[1] - m[2] / 2 + (L.cy || 0) * m[2], r: (L.r || 0) * m[2] };
- }, g.prototype.buildText = function(m) {
- new B(m).buildSVG();
- }, g.prototype.getContrast = function(m) {
- return m = N.parse(m).rgba, m[0] *= 1, m[1] *= 1.2, m[2] *= 0.5, 459 < m[0] + m[1] + m[2] ? "#000000" : "#FFFFFF";
- }, g.prototype.button = function(m, L, z, $, Q, A, H, Y, Z, q) {
- var it = this.label(m, L, z, Z, void 0, void 0, q, void 0, "button"), et = this.styledMode, nt = 0, rt = Q ? D(Q) : {};
- if (m = rt && rt.style || {}, rt = y.filterUserAttributes(rt), it.attr(D({ padding: 8, r: 2 }, rt)), !et) {
- rt = D({ fill: "#f7f7f7", stroke: "#cccccc", "stroke-width": 1, style: { color: "#333333", cursor: "pointer", fontWeight: "normal" } }, { style: m }, rt);
- var ct = rt.style;
- delete rt.style, A = D(rt, { fill: "#e6e6e6" }, y.filterUserAttributes(A || {}));
- var gt = A.style;
- delete A.style, H = D(rt, { fill: "#e6ebf5", style: { color: "#000000", fontWeight: "bold" } }, y.filterUserAttributes(H || {}));
- var dt = H.style;
- delete H.style, Y = D(rt, { style: { color: "#cccccc" } }, y.filterUserAttributes(Y || {}));
- var ht = Y.style;
- delete Y.style;
- }
- return v(it.element, T ? "mouseover" : "mouseenter", function() {
- nt !== 3 && it.setState(1);
- }), v(it.element, T ? "mouseout" : "mouseleave", function() {
- nt !== 3 && it.setState(nt);
- }), it.setState = function(at) {
- at !== 1 && (it.state = nt = at), it.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-" + ["normal", "hover", "pressed", "disabled"][at || 0]), et || it.attr([rt, A, H, Y][at || 0]).css([ct, gt, dt, ht][at || 0]);
- }, et || it.attr(rt).css(a({ cursor: "default" }, ct)), it.on("touchstart", function(at) {
- return at.stopPropagation();
- }).on("click", function(at) {
- nt !== 3 && $.call(it, at);
- });
- }, g.prototype.crispLine = function(m, L, z) {
- z === void 0 && (z = "round");
- var $ = m[0], Q = m[1];
- return i($[1]) && $[1] === Q[1] && ($[1] = Q[1] = Math[z]($[1]) - L % 2 / 2), i($[2]) && $[2] === Q[2] && ($[2] = Q[2] = Math[z]($[2]) + L % 2 / 2), m;
- }, g.prototype.path = function(m) {
- var L = this.styledMode ? {} : { fill: "none" };
- return t(m) ? L.d = m : n(m) && a(L, m), this.createElement("path").attr(L);
- }, g.prototype.circle = function(m, L, z) {
- return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, r: z }, L = this.createElement("circle"), L.xSetter = L.ySetter = function($, Q, A) {
- A.setAttribute("c" + Q, $);
- }, L.attr(m);
- }, g.prototype.arc = function(m, L, z, $, Q, A) {
- return n(m) ? ($ = m, L = $.y, z = $.r, m = $.x) : $ = { innerR: $, start: Q, end: A }, m = this.symbol("arc", m, L, z, z, $), m.r = z, m;
- }, g.prototype.rect = function(m, L, z, $, Q, A) {
- Q = n(m) ? m.r : Q;
- var H = this.createElement("rect");
- return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, width: Math.max(z, 0), height: Math.max($, 0) }, this.styledMode || (typeof A < "u" && (m["stroke-width"] = A, m = H.crisp(m)), m.fill = "none"), Q && (m.r = Q), H.rSetter = function(Y, Z, q) {
- H.r = Y, h(q, { rx: Y, ry: Y });
- }, H.rGetter = function() {
- return H.r || 0;
- }, H.attr(m);
- }, g.prototype.setSize = function(m, L, z) {
- this.width = m, this.height = L, this.boxWrapper.animate({ width: m, height: L }, { step: function() {
- this.attr({ viewBox: "0 0 " + this.attr("width") + " " + this.attr("height") });
- }, duration: I(
- z,
- !0
- ) ? void 0 : 0 }), this.alignElements();
- }, g.prototype.g = function(m) {
- var L = this.createElement("g");
- return m ? L.attr({ class: "highcharts-" + m }) : L;
- }, g.prototype.image = function(m, L, z, $, Q, A) {
- var H = { preserveAspectRatio: "none" }, Y = function(q, it) {
- q.setAttributeNS ? q.setAttributeNS("http://www.w3.org/1999/xlink", "href", it) : q.setAttribute("hc-svg-href", it);
- };
- s(L) && (H.x = L), s(z) && (H.y = z), s($) && (H.width = $), s(Q) && (H.height = Q);
- var Z = this.createElement("image").attr(H);
- return L = function(q) {
- Y(Z.element, m), A.call(Z, q);
- }, A ? (Y(
- Z.element,
- "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
- ), z = new S.Image(), v(z, "load", L), z.src = m, z.complete && L({})) : Y(Z.element, m), Z;
- }, g.prototype.symbol = function(m, L, z, $, Q, A) {
- var H = this, Y = /^url\((.*?)\)$/, Z = Y.test(m), q = !Z && (this.symbols[m] ? m : "circle"), it = q && this.symbols[q], et;
- if (it) {
- typeof L == "number" && (et = it.call(this.symbols, Math.round(L || 0), Math.round(z || 0), $ || 0, Q || 0, A));
- var nt = this.path(et);
- H.styledMode || nt.attr("fill", "none"), a(nt, { symbolName: q || void 0, x: L, y: z, width: $, height: Q }), A && a(nt, A);
- } else if (Z) {
- var rt = m.match(Y)[1], ct = nt = this.image(rt);
- ct.imgwidth = I(b[rt] && b[rt].width, A && A.width), ct.imgheight = I(b[rt] && b[rt].height, A && A.height);
- var gt = function(dt) {
- return dt.attr({ width: dt.width, height: dt.height });
- };
- ["width", "height"].forEach(function(dt) {
- ct[dt + "Setter"] = function(ht, at) {
- var J = this["img" + at];
- this[at] = ht, i(J) && (A && A.backgroundSize === "within" && this.width && this.height && (J = Math.round(J * Math.min(this.width / this.imgwidth, this.height / this.imgheight))), this.element && this.element.setAttribute(at, J), this.alignByTranslate || (ht = ((this[at] || 0) - J) / 2, this.attr(at === "width" ? { translateX: ht } : { translateY: ht })));
- };
- }), i(L) && ct.attr({ x: L, y: z }), ct.isImg = !0, i(ct.imgwidth) && i(ct.imgheight) ? gt(ct) : (ct.attr({ width: 0, height: 0 }), c("img", { onload: function() {
- var dt = w[H.chartIndex];
- this.width === 0 && (u(this, { position: "absolute", top: "-999em" }), f.body.appendChild(this)), b[rt] = { width: this.width, height: this.height }, ct.imgwidth = this.width, ct.imgheight = this.height, ct.element && gt(ct), this.parentNode && this.parentNode.removeChild(this), H.imgCount--, !H.imgCount && dt && !dt.hasLoaded && dt.onload();
- }, src: rt }), this.imgCount++);
- }
- return nt;
- }, g.prototype.clipRect = function(m, L, z, $) {
- var Q = E() + "-", A = this.createElement("clipPath").attr({ id: Q }).add(this.defs);
- return m = this.rect(m, L, z, $, 0).add(A), m.id = Q, m.clipPath = A, m.count = 0, m;
- }, g.prototype.text = function(m, L, z, $) {
- var Q = {};
- return $ && (this.allowHTML || !this.forExport) ? this.html(m, L, z) : (Q.x = Math.round(L || 0), z && (Q.y = Math.round(z)), i(m) && (Q.text = m), m = this.createElement("text").attr(Q), (!$ || this.forExport && !this.allowHTML) && (m.xSetter = function(A, H, Y) {
- for (var Z = Y.getElementsByTagName("tspan"), q = Y.getAttribute(H), it = 0, et; it < Z.length; it++)
- et = Z[it], et.getAttribute(H) === q && et.setAttribute(H, A);
- Y.setAttribute(H, A);
- }), m);
- }, g.prototype.fontMetrics = function(m, L) {
- return m = !this.styledMode && /px/.test(m) || !S.getComputedStyle ? m || L && L.style && L.style.fontSize || this.style && this.style.fontSize : L && G.prototype.getStyle.call(L, "font-size"), m = /px/.test(m) ? W(m) : 12, L = 24 > m ? m + 3 : Math.round(1.2 * m), { h: L, b: Math.round(0.8 * L), f: m };
- }, g.prototype.rotCorr = function(m, L, z) {
- var $ = m;
- return L && z && ($ = Math.max($ * Math.cos(L * x), 4)), { x: -m / 3 * Math.sin(L * x), y: $ };
- }, g.prototype.pathToSegments = function(m) {
- for (var L = [], z = [], $ = { A: 8, C: 7, H: 2, L: 3, M: 3, Q: 5, S: 5, T: 3, V: 2 }, Q = 0; Q < m.length; Q++)
- P(z[0]) && s(m[Q]) && z.length === $[z[0].toUpperCase()] && m.splice(Q, 0, z[0].replace("M", "L").replace("m", "l")), typeof m[Q] == "string" && (z.length && L.push(z.slice(0)), z.length = 0), z.push(m[Q]);
- return L.push(z.slice(0)), L;
- }, g.prototype.label = function(m, L, z, $, Q, A, H, Y, Z) {
- return new V(this, m, L, z, $, Q, A, H, Y, Z);
- }, g.prototype.alignElements = function() {
- this.alignedObjects.forEach(function(m) {
- return m.align();
- });
- }, g;
- }(), a(_.prototype, { Element: G, SVG_NS: k, escapes: { "&": "&", "<": "<", ">": ">", "'": "'", '"': """ }, symbols: F, draw: R }), U.registerRendererType("svg", _, !0), _;
- }), C(o, "Core/Renderer/HTML/HTMLElement.js", [o["Core/Globals.js"], o["Core/Renderer/SVG/SVGElement.js"], o["Core/Utilities.js"]], function(y, N, _) {
- var U = this && this.__extends || function() {
- var T = function(O, R) {
- return T = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(k, b) {
- k.__proto__ = b;
- } || function(k, b) {
- for (var S in b)
- b.hasOwnProperty(S) && (k[S] = b[S]);
- }, T(O, R);
- };
- return function(O, R) {
- function k() {
- this.constructor = O;
- }
- T(O, R), O.prototype = R === null ? Object.create(R) : (k.prototype = R.prototype, new k());
- };
- }(), G = y.isFirefox, V = y.isMS, F = y.isWebKit, B = y.win, j = _.css, w = _.defined, x = _.extend, f = _.pick, l = _.pInt;
- return function(T) {
- function O() {
- return T !== null && T.apply(this, arguments) || this;
- }
- return U(O, T), O.compose = function(R) {
- if (O.composedClasses.indexOf(R) === -1) {
- O.composedClasses.push(R);
- var k = O.prototype, b = R.prototype;
- b.getSpanCorrection = k.getSpanCorrection, b.htmlCss = k.htmlCss, b.htmlGetBBox = k.htmlGetBBox, b.htmlUpdateTransform = k.htmlUpdateTransform, b.setSpanRotation = k.setSpanRotation;
- }
- return R;
- }, O.prototype.getSpanCorrection = function(R, k, b) {
- this.xCorr = -R * b, this.yCorr = -k;
- }, O.prototype.htmlCss = function(R) {
- var k = this.element.tagName === "SPAN" && R && "width" in R, b = f(k && R.width, void 0);
- if (k) {
- delete R.width, this.textWidth = b;
- var S = !0;
- }
- return R && R.textOverflow === "ellipsis" && (R.whiteSpace = "nowrap", R.overflow = "hidden"), this.styles = x(this.styles, R), j(this.element, R), S && this.htmlUpdateTransform(), this;
- }, O.prototype.htmlGetBBox = function() {
- var R = this.element;
- return { x: R.offsetLeft, y: R.offsetTop, width: R.offsetWidth, height: R.offsetHeight };
- }, O.prototype.htmlUpdateTransform = function() {
- if (this.added) {
- var R = this.renderer, k = this.element, b = this.translateX || 0, S = this.translateY || 0, v = this.x || 0, h = this.y || 0, c = this.textAlign || "left", u = { left: 0, center: 0.5, right: 1 }[c], i = this.styles;
- if (i = i && i.whiteSpace, j(k, { marginLeft: b, marginTop: S }), !R.styledMode && this.shadows && this.shadows.forEach(function(P) {
- j(P, { marginLeft: b + 1, marginTop: S + 1 });
- }), this.inverted && [].forEach.call(k.childNodes, function(P) {
- R.invertChild(P, k);
- }), k.tagName === "SPAN") {
- var p = this.rotation, a = this.textWidth && l(this.textWidth), t = [p, c, k.innerHTML, this.textWidth, this.textAlign].join(), s = void 0;
- if (s = !1, a !== this.oldTextWidth) {
- if (this.textPxLength)
- var n = this.textPxLength;
- else
- j(k, { width: "", whiteSpace: i || "nowrap" }), n = k.offsetWidth;
- (a > this.oldTextWidth || n > a) && (/[ \-]/.test(k.textContent || k.innerText) || k.style.textOverflow === "ellipsis") && (j(k, { width: n > a || p ? a + "px" : "auto", display: "block", whiteSpace: i || "normal" }), this.oldTextWidth = a, s = !0);
- }
- this.hasBoxWidthChanged = s, t !== this.cTT && (s = R.fontMetrics(k.style.fontSize, k).b, !w(p) || p === (this.oldRotation || 0) && c === this.oldAlign || this.setSpanRotation(p, u, s), this.getSpanCorrection(!w(p) && this.textPxLength || k.offsetWidth, s, u, p, c)), j(k, { left: v + (this.xCorr || 0) + "px", top: h + (this.yCorr || 0) + "px" }), this.cTT = t, this.oldRotation = p, this.oldAlign = c;
- }
- } else
- this.alignOnAdd = !0;
- }, O.prototype.setSpanRotation = function(R, k, b) {
- var S = {}, v = V && !/Edge/.test(B.navigator.userAgent) ? "-ms-transform" : F ? "-webkit-transform" : G ? "MozTransform" : B.opera ? "-o-transform" : void 0;
- v && (S[v] = S.transform = "rotate(" + R + "deg)", S[v + (G ? "Origin" : "-origin")] = S.transformOrigin = 100 * k + "% " + b + "px", j(this.element, S));
- }, O.composedClasses = [], O;
- }(N);
- }), C(
- o,
- "Core/Renderer/HTML/HTMLRenderer.js",
- [o["Core/Renderer/HTML/AST.js"], o["Core/Renderer/SVG/SVGElement.js"], o["Core/Renderer/SVG/SVGRenderer.js"], o["Core/Utilities.js"]],
- function(y, N, _, U) {
- var G = this && this.__extends || function() {
- var w = function(x, f) {
- return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(l, T) {
- l.__proto__ = T;
- } || function(l, T) {
- for (var O in T)
- T.hasOwnProperty(O) && (l[O] = T[O]);
- }, w(x, f);
- };
- return function(x, f) {
- function l() {
- this.constructor = x;
- }
- w(x, f), x.prototype = f === null ? Object.create(f) : (l.prototype = f.prototype, new l());
- };
- }(), V = U.attr, F = U.createElement, B = U.extend, j = U.pick;
- return function(w) {
- function x() {
- return w !== null && w.apply(this, arguments) || this;
- }
- return G(x, w), x.compose = function(f) {
- return x.composedClasses.indexOf(f) === -1 && (x.composedClasses.push(f), f.prototype.html = x.prototype.html), f;
- }, x.prototype.html = function(f, l, T) {
- var O = this.createElement("span"), R = O.element, k = O.renderer, b = k.isSVG, S = function(v, h) {
- ["opacity", "visibility"].forEach(function(c) {
- v[c + "Setter"] = function(u, i, p) {
- var a = v.div ? v.div.style : h;
- N.prototype[c + "Setter"].call(this, u, i, p), a && (a[i] = u);
- };
- }), v.addedSetters = !0;
- };
- return O.textSetter = function(v) {
- v !== this.textStr && (delete this.bBox, delete this.oldTextWidth, y.setElementHTML(this.element, j(v, "")), this.textStr = v, O.doTransform = !0);
- }, b && S(O, O.element.style), O.xSetter = O.ySetter = O.alignSetter = O.rotationSetter = function(v, h) {
- h === "align" ? O.alignValue = O.textAlign = v : O[h] = v, O.doTransform = !0;
- }, O.afterSetters = function() {
- this.doTransform && (this.htmlUpdateTransform(), this.doTransform = !1);
- }, O.attr({ text: f, x: Math.round(l), y: Math.round(T) }).css({ position: "absolute" }), k.styledMode || O.css({ fontFamily: this.style.fontFamily, fontSize: this.style.fontSize }), R.style.whiteSpace = "nowrap", O.css = O.htmlCss, b && (O.add = function(v) {
- var h = k.box.parentNode, c = [];
- if (this.parentGroup = v) {
- var u = v.div;
- if (!u) {
- for (; v; )
- c.push(v), v = v.parentGroup;
- c.reverse().forEach(function(i) {
- function p(n, P) {
- i[P] = n, P === "translateX" ? s.left = n + "px" : s.top = n + "px", i.doTransform = !0;
- }
- var a = V(i.element, "class"), t = i.styles || {};
- u = i.div = i.div || F("div", a ? { className: a } : void 0, {
- position: "absolute",
- left: (i.translateX || 0) + "px",
- top: (i.translateY || 0) + "px",
- display: i.display,
- opacity: i.opacity,
- cursor: t.cursor,
- pointerEvents: t.pointerEvents,
- visibility: i.visibility
- }, u || h);
- var s = u.style;
- B(i, { classSetter: function(n) {
- return function(P) {
- this.element.setAttribute("class", P), n.className = P;
- };
- }(u), on: function() {
- return c[0].div && O.on.apply({ element: c[0].div, onEvents: i.onEvents }, arguments), i;
- }, translateXSetter: p, translateYSetter: p }), i.addedSetters || S(i);
- });
- }
- } else
- u = h;
- return u.appendChild(R), O.added = !0, O.alignOnAdd && O.htmlUpdateTransform(), O;
- }), O;
- }, x.composedClasses = [], x;
- }(_);
- }
- ), C(o, "Core/Axis/AxisDefaults.js", [], function() {
- var y;
- return function(N) {
- N.defaultXAxisOptions = { alignTicks: !0, allowDecimals: void 0, panningEnabled: !0, zIndex: 2, zoomEnabled: !0, dateTimeLabelFormats: { millisecond: { main: "%H:%M:%S.%L", range: !1 }, second: { main: "%H:%M:%S", range: !1 }, minute: { main: "%H:%M", range: !1 }, hour: { main: "%H:%M", range: !1 }, day: { main: "%e. %b" }, week: { main: "%e. %b" }, month: { main: "%b '%y" }, year: { main: "%Y" } }, endOnTick: !1, gridLineDashStyle: "Solid", gridZIndex: 1, labels: {
- autoRotation: void 0,
- autoRotationLimit: 80,
- distance: void 0,
- enabled: !0,
- indentation: 10,
- overflow: "justify",
- padding: 5,
- reserveSpace: void 0,
- rotation: void 0,
- staggerLines: 0,
- step: 0,
- useHTML: !1,
- x: 0,
- zIndex: 7,
- style: { color: "#666666", cursor: "default", fontSize: "11px" }
- }, maxPadding: 0.01, minorGridLineDashStyle: "Solid", minorTickLength: 2, minorTickPosition: "outside", minPadding: 0.01, offset: void 0, opposite: !1, reversed: void 0, reversedStacks: !1, showEmpty: !0, showFirstLabel: !0, showLastLabel: !0, startOfWeek: 1, startOnTick: !1, tickLength: 10, tickPixelInterval: 100, tickmarkPlacement: "between", tickPosition: "outside", title: {
- align: "middle",
- rotation: 0,
- useHTML: !1,
- x: 0,
- y: 0,
- style: { color: "#666666" }
- }, type: "linear", uniqueNames: !0, visible: !0, minorGridLineColor: "#f2f2f2", minorGridLineWidth: 1, minorTickColor: "#999999", lineColor: "#ccd6eb", lineWidth: 1, gridLineColor: "#e6e6e6", gridLineWidth: void 0, tickColor: "#ccd6eb" }, N.defaultYAxisOptions = { reversedStacks: !0, endOnTick: !0, maxPadding: 0.05, minPadding: 0.05, tickPixelInterval: 72, showLastLabel: !0, labels: { x: -8 }, startOnTick: !0, title: { rotation: 270, text: "Values" }, stackLabels: {
- animation: {},
- allowOverlap: !1,
- enabled: !1,
- crop: !0,
- overflow: "justify",
- formatter: function() {
- var _ = this.axis.chart.numberFormatter;
- return _(this.total, -1);
- },
- style: { color: "#000000", fontSize: "11px", fontWeight: "bold", textOutline: "1px contrast" }
- }, gridLineWidth: 1, lineWidth: 0 }, N.defaultLeftAxisOptions = { labels: { x: -15 }, title: { rotation: 270 } }, N.defaultRightAxisOptions = { labels: { x: 15 }, title: { rotation: 90 } }, N.defaultBottomAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } }, N.defaultTopAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } };
- }(y || (y = {})), y;
- }), C(o, "Core/Foundation.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.addEvent, _ = y.isFunction, U = y.objectEach, G = y.removeEvent, V;
- return function(F) {
- F.registerEventOptions = function(B, j) {
- B.eventOptions = B.eventOptions || {}, U(j.events, function(w, x) {
- B.eventOptions[x] !== w && (B.eventOptions[x] && (G(B, x, B.eventOptions[x]), delete B.eventOptions[x]), _(w) && (B.eventOptions[x] = w, N(B, x, w)));
- });
- };
- }(V || (V = {})), V;
- }), C(
- o,
- "Core/Axis/Tick.js",
- [o["Core/FormatUtilities.js"], o["Core/Globals.js"], o["Core/Utilities.js"]],
- function(y, N, _) {
- var U = N.deg2rad, G = _.clamp, V = _.correctFloat, F = _.defined, B = _.destroyObjectProperties, j = _.extend, w = _.fireEvent, x = _.isNumber, f = _.merge, l = _.objectEach, T = _.pick;
- return N = function() {
- function O(R, k, b, S, v) {
- this.isNewLabel = this.isNew = !0, this.axis = R, this.pos = k, this.type = b || "", this.parameters = v || {}, this.tickmarkOffset = this.parameters.tickmarkOffset, this.options = this.parameters.options, w(this, "init"), b || S || this.addLabel();
- }
- return O.prototype.addLabel = function() {
- var R = this, k = R.axis, b = k.options, S = k.chart, v = k.categories, h = k.logarithmic, c = k.names, u = R.pos, i = T(R.options && R.options.labels, b.labels), p = k.tickPositions, a = u === p[0], t = u === p[p.length - 1], s = (!i.step || i.step === 1) && k.tickInterval === 1;
- p = p.info;
- var n = R.label, P;
- if (v = this.parameters.category || (v ? T(v[u], c[u], u) : u), h && x(v) && (v = V(h.lin2log(v))), k.dateTime)
- if (p)
- var D = S.time.resolveDTLFormat(b.dateTimeLabelFormats[!b.grid && p.higherRanks[u] || p.unitName]), I = D.main;
- else
- x(v) && (I = k.dateTime.getXDateFormat(v, b.dateTimeLabelFormats || {}));
- R.isFirst = a, R.isLast = t;
- var W = {
- axis: k,
- chart: S,
- dateTimeLabelFormat: I,
- isFirst: a,
- isLast: t,
- pos: u,
- tick: R,
- tickPositionInfo: p,
- value: v
- };
- w(this, "labelFormat", W);
- var E = function(g) {
- return i.formatter ? i.formatter.call(g, g) : i.format ? (g.text = k.defaultLabelFormatter.call(g), y.format(i.format, g, S)) : k.defaultLabelFormatter.call(g, g);
- };
- b = E.call(W, W);
- var X = D && D.list;
- R.shortenLabel = X ? function() {
- for (P = 0; P < X.length; P++)
- if (j(W, { dateTimeLabelFormat: X[P] }), n.attr({ text: E.call(W, W) }), n.getBBox().width < k.getSlotWidth(R) - 2 * i.padding)
- return;
- n.attr({ text: "" });
- } : void 0, s && k._addedPlotLB && R.moveLabel(b, i), F(n) || R.movedLabel ? n && n.textStr !== b && !s && (!n.textWidth || i.style.width || n.styles.width || n.css({ width: null }), n.attr({ text: b }), n.textPxLength = n.getBBox().width) : (R.label = n = R.createLabel({ x: 0, y: 0 }, b, i), R.rotation = 0);
- }, O.prototype.createLabel = function(R, k, b) {
- var S = this.axis, v = S.chart;
- return (R = F(k) && b.enabled ? v.renderer.text(k, R.x, R.y, b.useHTML).add(S.labelGroup) : null) && (v.styledMode || R.css(f(b.style)), R.textPxLength = R.getBBox().width), R;
- }, O.prototype.destroy = function() {
- B(
- this,
- this.axis
- );
- }, O.prototype.getPosition = function(R, k, b, S) {
- var v = this.axis, h = v.chart, c = S && h.oldChartHeight || h.chartHeight;
- return R = { x: R ? V(v.translate(k + b, null, null, S) + v.transB) : v.left + v.offset + (v.opposite ? (S && h.oldChartWidth || h.chartWidth) - v.right - v.left : 0), y: R ? c - v.bottom + v.offset - (v.opposite ? v.height : 0) : V(c - v.translate(k + b, null, null, S) - v.transB) }, R.y = G(R.y, -1e5, 1e5), w(this, "afterGetPosition", { pos: R }), R;
- }, O.prototype.getLabelPosition = function(R, k, b, S, v, h, c, u) {
- var i = this.axis, p = i.transA, a = i.isLinked && i.linkedParent ? i.linkedParent.reversed : i.reversed, t = i.staggerLines, s = i.tickRotCorr || { x: 0, y: 0 }, n = S || i.reserveSpaceDefault ? 0 : -i.labelOffset * (i.labelAlign === "center" ? 0.5 : 1), P = {}, D = v.y;
- return F(D) || (D = i.side === 0 ? b.rotation ? -8 : -b.getBBox().height : i.side === 2 ? s.y + 8 : Math.cos(b.rotation * U) * (s.y - b.getBBox(!1, 0).height / 2)), R = R + v.x + n + s.x - (h && S ? h * p * (a ? -1 : 1) : 0), k = k + D - (h && !S ? h * p * (a ? 1 : -1) : 0), t && (b = c / (u || 1) % t, i.opposite && (b = t - b - 1), k += i.labelOffset / t * b), P.x = R, P.y = Math.round(k), w(this, "afterGetLabelPosition", { pos: P, tickmarkOffset: h, index: c }), P;
- }, O.prototype.getLabelSize = function() {
- return this.label ? this.label.getBBox()[this.axis.horiz ? "height" : "width"] : 0;
- }, O.prototype.getMarkPath = function(R, k, b, S, v, h) {
- return h.crispLine([["M", R, k], ["L", R + (v ? 0 : -b), k + (v ? b : 0)]], S);
- }, O.prototype.handleOverflow = function(R) {
- var k = this.axis, b = k.options.labels, S = R.x, v = k.chart.chartWidth, h = k.chart.spacing, c = T(k.labelLeft, Math.min(k.pos, h[3]));
- h = T(k.labelRight, Math.max(k.isRadial ? 0 : k.pos + k.len, v - h[1]));
- var u = this.label, i = this.rotation, p = { left: 0, center: 0.5, right: 1 }[k.labelAlign || u.attr("align")], a = u.getBBox().width, t = k.getSlotWidth(this), s = {}, n = t, P = 1, D;
- i || b.overflow !== "justify" ? 0 > i && S - p * a < c ? D = Math.round(S / Math.cos(i * U) - c) : 0 < i && S + p * a > h && (D = Math.round((v - S) / Math.cos(i * U))) : (v = S + (1 - p) * a, S - p * a < c ? n = R.x + n * (1 - p) - c : v > h && (n = h - R.x + n * p, P = -1), n = Math.min(t, n), n < t && k.labelAlign === "center" && (R.x += P * (t - n - p * (t - Math.min(a, n)))), (a > n || k.autoRotation && (u.styles || {}).width) && (D = n)), D && (this.shortenLabel ? this.shortenLabel() : (s.width = Math.floor(D) + "px", (b.style || {}).textOverflow || (s.textOverflow = "ellipsis"), u.css(s)));
- }, O.prototype.moveLabel = function(R, k) {
- var b = this, S = b.label, v = b.axis, h = v.reversed, c = !1;
- if (S && S.textStr === R ? (b.movedLabel = S, c = !0, delete b.label) : l(v.ticks, function(i) {
- c || i.isNew || i === b || !i.label || i.label.textStr !== R || (b.movedLabel = i.label, c = !0, i.labelPos = b.movedLabel.xy, delete i.label);
- }), !c && (b.labelPos || S)) {
- var u = b.labelPos || S.xy;
- S = v.horiz ? h ? 0 : v.width + v.left : u.x, v = v.horiz ? u.y : h ? v.width + v.left : 0, b.movedLabel = b.createLabel({ x: S, y: v }, R, k), b.movedLabel && b.movedLabel.attr({ opacity: 0 });
- }
- }, O.prototype.render = function(R, k, b) {
- var S = this.axis, v = S.horiz, h = this.pos, c = T(this.tickmarkOffset, S.tickmarkOffset);
- h = this.getPosition(v, h, c, k), c = h.x;
- var u = h.y;
- S = v && c === S.pos + S.len || !v && u === S.pos ? -1 : 1, v = T(b, this.label && this.label.newOpacity, 1), b = T(b, 1), this.isActive = !0, this.renderGridLine(k, b, S), this.renderMark(h, b, S), this.renderLabel(h, k, v, R), this.isNew = !1, w(this, "afterRender");
- }, O.prototype.renderGridLine = function(R, k, b) {
- var S = this.axis, v = S.options, h = {}, c = this.pos, u = this.type, i = T(
- this.tickmarkOffset,
- S.tickmarkOffset
- ), p = S.chart.renderer, a = this.gridLine, t = v.gridLineWidth, s = v.gridLineColor, n = v.gridLineDashStyle;
- this.type === "minor" && (t = v.minorGridLineWidth, s = v.minorGridLineColor, n = v.minorGridLineDashStyle), a || (S.chart.styledMode || (h.stroke = s, h["stroke-width"] = t || 0, h.dashstyle = n), u || (h.zIndex = 1), R && (k = 0), this.gridLine = a = p.path().attr(h).addClass("highcharts-" + (u ? u + "-" : "") + "grid-line").add(S.gridGroup)), a && (b = S.getPlotLinePath({ value: c + i, lineWidth: a.strokeWidth() * b, force: "pass", old: R })) && a[R || this.isNew ? "attr" : "animate"]({ d: b, opacity: k });
- }, O.prototype.renderMark = function(R, k, b) {
- var S = this.axis, v = S.options, h = S.chart.renderer, c = this.type, u = S.tickSize(c ? c + "Tick" : "tick"), i = R.x;
- R = R.y;
- var p = T(v[c !== "minor" ? "tickWidth" : "minorTickWidth"], !c && S.isXAxis ? 1 : 0);
- v = v[c !== "minor" ? "tickColor" : "minorTickColor"];
- var a = this.mark, t = !a;
- u && (S.opposite && (u[0] = -u[0]), a || (this.mark = a = h.path().addClass("highcharts-" + (c ? c + "-" : "") + "tick").add(S.axisGroup), S.chart.styledMode || a.attr({ stroke: v, "stroke-width": p })), a[t ? "attr" : "animate"]({ d: this.getMarkPath(
- i,
- R,
- u[0],
- a.strokeWidth() * b,
- S.horiz,
- h
- ), opacity: k }));
- }, O.prototype.renderLabel = function(R, k, b, S) {
- var v = this.axis, h = v.horiz, c = v.options, u = this.label, i = c.labels, p = i.step;
- v = T(this.tickmarkOffset, v.tickmarkOffset);
- var a = R.x;
- R = R.y;
- var t = !0;
- u && x(a) && (u.xy = R = this.getLabelPosition(a, R, u, h, i, v, S, p), this.isFirst && !this.isLast && !c.showFirstLabel || this.isLast && !this.isFirst && !c.showLastLabel ? t = !1 : !h || i.step || i.rotation || k || b === 0 || this.handleOverflow(R), p && S % p && (t = !1), t && x(R.y) ? (R.opacity = b, u[this.isNewLabel ? "attr" : "animate"](R), this.isNewLabel = !1) : (u.attr("y", -9999), this.isNewLabel = !0));
- }, O.prototype.replaceMovedLabel = function() {
- var R = this.label, k = this.axis, b = k.reversed;
- if (R && !this.isNew) {
- var S = k.horiz ? b ? k.left : k.width + k.left : R.xy.x;
- b = k.horiz ? R.xy.y : b ? k.width + k.top : k.top, R.animate({ x: S, y: b, opacity: 0 }, void 0, R.destroy), delete this.label;
- }
- k.isDirty = !0, this.label = this.movedLabel, delete this.movedLabel;
- }, O;
- }(), N;
- }
- ), C(o, "Core/Axis/Axis.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/Axis/AxisDefaults.js"],
- o["Core/Color/Color.js"],
- o["Core/DefaultOptions.js"],
- o["Core/Foundation.js"],
- o["Core/Globals.js"],
- o["Core/Axis/Tick.js"],
- o["Core/Utilities.js"]
- ], function(y, N, _, U, G, V, F, B) {
- var j = y.animObject, w = U.defaultOptions, x = G.registerEventOptions, f = V.deg2rad, l = B.arrayMax, T = B.arrayMin, O = B.clamp, R = B.correctFloat, k = B.defined, b = B.destroyObjectProperties, S = B.erase, v = B.error, h = B.extend, c = B.fireEvent, u = B.getMagnitude, i = B.isArray, p = B.isNumber, a = B.isString, t = B.merge, s = B.normalizeTickInterval, n = B.objectEach, P = B.pick, D = B.relativeLength, I = B.removeEvent, W = B.splat, E = B.syncTimeout;
- return y = function() {
- function X(g, m) {
- this.zoomEnabled = this.width = this.visible = this.userOptions = this.translationSlope = this.transB = this.transA = this.top = this.ticks = this.tickRotCorr = this.tickPositions = this.tickmarkOffset = this.tickInterval = this.tickAmount = this.side = this.series = this.right = this.positiveValuesOnly = this.pos = this.pointRangePadding = this.pointRange = this.plotLinesAndBandsGroups = this.plotLinesAndBands = this.paddedTicks = this.overlap = this.options = this.offset = this.names = this.minPixelPadding = this.minorTicks = this.minorTickInterval = this.min = this.maxLabelLength = this.max = this.len = this.left = this.labelFormatter = this.labelEdge = this.isLinked = this.height = this.hasVisibleSeries = this.hasNames = this.eventOptions = this.coll = this.closestPointRange = this.chart = this.categories = this.bottom = this.alternateBands = void 0, this.init(g, m);
- }
- return X.prototype.init = function(g, m) {
- var L = m.isX;
- this.chart = g, this.horiz = g.inverted && !this.isZAxis ? !L : L, this.isXAxis = L, this.coll = this.coll || (L ? "xAxis" : "yAxis"), c(this, "init", { userOptions: m }), this.opposite = P(m.opposite, this.opposite), this.side = P(m.side, this.side, this.horiz ? this.opposite ? 0 : 2 : this.opposite ? 1 : 3), this.setOptions(m);
- var z = this.options, $ = z.labels, Q = z.type;
- this.userOptions = m, this.minPixelPadding = 0, this.reversed = P(z.reversed, this.reversed), this.visible = z.visible, this.zoomEnabled = z.zoomEnabled, this.hasNames = Q === "category" || z.categories === !0, this.categories = z.categories || this.hasNames, this.names || (this.names = [], this.names.keys = {}), this.plotLinesAndBandsGroups = {}, this.positiveValuesOnly = !!this.logarithmic, this.isLinked = k(z.linkedTo), this.ticks = {}, this.labelEdge = [], this.minorTicks = {}, this.plotLinesAndBands = [], this.alternateBands = {}, this.len = 0, this.minRange = this.userMinRange = z.minRange || z.maxZoom, this.range = z.range, this.offset = z.offset || 0, this.min = this.max = null, m = P(z.crosshair, W(g.options.tooltip.crosshairs)[L ? 0 : 1]), this.crosshair = m === !0 ? {} : m, g.axes.indexOf(this) === -1 && (L ? g.axes.splice(g.xAxis.length, 0, this) : g.axes.push(this), g[this.coll].push(this)), this.series = this.series || [], g.inverted && !this.isZAxis && L && typeof this.reversed > "u" && (this.reversed = !0), this.labelRotation = p($.rotation) ? $.rotation : void 0, x(this, z), c(this, "afterInit");
- }, X.prototype.setOptions = function(g) {
- this.options = t(N.defaultXAxisOptions, this.coll === "yAxis" && N.defaultYAxisOptions, [N.defaultTopAxisOptions, N.defaultRightAxisOptions, N.defaultBottomAxisOptions, N.defaultLeftAxisOptions][this.side], t(w[this.coll], g)), c(this, "afterSetOptions", { userOptions: g });
- }, X.prototype.defaultLabelFormatter = function(g) {
- var m = this.axis;
- g = this.chart.numberFormatter;
- var L = p(this.value) ? this.value : NaN, z = m.chart.time, $ = this.dateTimeLabelFormat, Q = w.lang, A = Q.numericSymbols;
- Q = Q.numericSymbolMagnitude || 1e3;
- var H = m.logarithmic ? Math.abs(L) : m.tickInterval, Y = A && A.length;
- if (m.categories)
- var Z = "" + this.value;
- else if ($)
- Z = z.dateFormat($, L);
- else if (Y && 1e3 <= H)
- for (; Y-- && typeof Z > "u"; )
- m = Math.pow(Q, Y + 1), H >= m && 10 * L % m === 0 && A[Y] !== null && L !== 0 && (Z = g(L / m, -1) + A[Y]);
- return typeof Z > "u" && (Z = 1e4 <= Math.abs(L) ? g(L, -1) : g(L, -1, void 0, "")), Z;
- }, X.prototype.getSeriesExtremes = function() {
- var g = this, m = g.chart, L;
- c(this, "getSeriesExtremes", null, function() {
- g.hasVisibleSeries = !1, g.dataMin = g.dataMax = g.threshold = null, g.softThreshold = !g.isXAxis, g.stacking && g.stacking.buildStacks(), g.series.forEach(function(z) {
- if (z.visible || !m.options.chart.ignoreHiddenSeries) {
- var $ = z.options, Q = $.threshold;
- if (g.hasVisibleSeries = !0, g.positiveValuesOnly && 0 >= Q && (Q = null), g.isXAxis) {
- if ($ = z.xData, $.length) {
- $ = g.logarithmic ? $.filter(g.validatePositiveValue) : $, L = z.getXExtremes($);
- var A = L.min, H = L.max;
- p(A) || A instanceof Date || ($ = $.filter(p), L = z.getXExtremes($), A = L.min, H = L.max), $.length && (g.dataMin = Math.min(P(g.dataMin, A), A), g.dataMax = Math.max(P(g.dataMax, H), H));
- }
- } else
- z = z.applyExtremes(), p(z.dataMin) && (A = z.dataMin, g.dataMin = Math.min(P(g.dataMin, A), A)), p(z.dataMax) && (H = z.dataMax, g.dataMax = Math.max(P(g.dataMax, H), H)), k(Q) && (g.threshold = Q), (!$.softThreshold || g.positiveValuesOnly) && (g.softThreshold = !1);
- }
- });
- }), c(this, "afterGetSeriesExtremes");
- }, X.prototype.translate = function(g, m, L, z, $, Q) {
- var A = this.linkedParent || this, H = z && A.old ? A.old.min : A.min, Y = A.minPixelPadding;
- $ = (A.isOrdinal || A.brokenAxis && A.brokenAxis.hasBreaks || A.logarithmic && $) && A.lin2val;
- var Z = 1, q = 0;
- return z = z && A.old ? A.old.transA : A.transA, z || (z = A.transA), L && (Z *= -1, q = A.len), A.reversed && (Z *= -1, q -= Z * (A.sector || A.len)), m ? (g = (g * Z + q - Y) / z + H, $ && (g = A.lin2val(g))) : ($ && (g = A.val2lin(g)), g = p(H) ? Z * (g - H) * z + q + Z * Y + (p(Q) ? z * Q : 0) : void 0), g;
- }, X.prototype.toPixels = function(g, m) {
- return this.translate(
- g,
- !1,
- !this.horiz,
- null,
- !0
- ) + (m ? 0 : this.pos);
- }, X.prototype.toValue = function(g, m) {
- return this.translate(g - (m ? 0 : this.pos), !0, !this.horiz, null, !0);
- }, X.prototype.getPlotLinePath = function(g) {
- function m(at, J, tt) {
- return (nt !== "pass" && at < J || at > tt) && (nt ? at = O(at, J, tt) : ht = !0), at;
- }
- var L = this, z = L.chart, $ = L.left, Q = L.top, A = g.old, H = g.value, Y = g.lineWidth, Z = A && z.oldChartHeight || z.chartHeight, q = A && z.oldChartWidth || z.chartWidth, it = L.transB, et = g.translatedValue, nt = g.force, rt, ct, gt, dt, ht;
- return g = {
- value: H,
- lineWidth: Y,
- old: A,
- force: nt,
- acrossPanes: g.acrossPanes,
- translatedValue: et
- }, c(this, "getPlotLinePath", g, function(at) {
- et = P(et, L.translate(H, null, null, A)), et = O(et, -1e5, 1e5), rt = gt = Math.round(et + it), ct = dt = Math.round(Z - et - it), p(et) ? L.horiz ? (ct = Q, dt = Z - L.bottom, rt = gt = m(rt, $, $ + L.width)) : (rt = $, gt = q - L.right, ct = dt = m(ct, Q, Q + L.height)) : (ht = !0, nt = !1), at.path = ht && !nt ? null : z.renderer.crispLine([["M", rt, ct], ["L", gt, dt]], Y || 1);
- }), g.path;
- }, X.prototype.getLinearTickPositions = function(g, m, L) {
- var z = R(Math.floor(m / g) * g);
- L = R(Math.ceil(L / g) * g);
- var $ = [], Q;
- if (R(z + g) === z && (Q = 20), this.single)
- return [m];
- for (m = z; m <= L && ($.push(m), m = R(m + g, Q), m !== A); )
- var A = m;
- return $;
- }, X.prototype.getMinorTickInterval = function() {
- var g = this.options;
- return g.minorTicks === !0 ? P(g.minorTickInterval, "auto") : g.minorTicks === !1 ? null : g.minorTickInterval;
- }, X.prototype.getMinorTickPositions = function() {
- var g = this.options, m = this.tickPositions, L = this.minorTickInterval, z = this.pointRangePadding || 0, $ = this.min - z;
- z = this.max + z;
- var Q = z - $, A = [];
- if (Q && Q / L < this.len / 3) {
- var H = this.logarithmic;
- if (H)
- this.paddedTicks.forEach(function(Y, Z, q) {
- Z && A.push.apply(
- A,
- H.getLogTickPositions(L, q[Z - 1], q[Z], !0)
- );
- });
- else if (this.dateTime && this.getMinorTickInterval() === "auto")
- A = A.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(L), $, z, g.startOfWeek));
- else
- for (g = $ + (m[0] - $) % L; g <= z && g !== A[0]; g += L)
- A.push(g);
- }
- return A.length !== 0 && this.trimTicks(A), A;
- }, X.prototype.adjustForMinRange = function() {
- var g = this.options, m = this.logarithmic, L = this.min, z = this.max, $ = 0, Q, A, H, Y;
- if (this.isXAxis && typeof this.minRange > "u" && !m && (k(g.min) || k(g.max) || k(g.floor) || k(g.ceiling) ? this.minRange = null : (this.series.forEach(function(et) {
- if (H = et.xData, Y = et.xIncrement ? 1 : H.length - 1, 1 < H.length)
- for (Q = Y; 0 < Q; Q--)
- A = H[Q] - H[Q - 1], (!$ || A < $) && ($ = A);
- }), this.minRange = Math.min(5 * $, this.dataMax - this.dataMin))), z - L < this.minRange) {
- var Z = this.dataMax - this.dataMin >= this.minRange, q = this.minRange, it = (q - z + L) / 2;
- it = [L - it, P(g.min, L - it)], Z && (it[2] = this.logarithmic ? this.logarithmic.log2lin(this.dataMin) : this.dataMin), L = l(it), z = [L + q, P(g.max, L + q)], Z && (z[2] = m ? m.log2lin(this.dataMax) : this.dataMax), z = T(z), z - L < q && (it[0] = z - q, it[1] = P(g.min, z - q), L = l(it));
- }
- this.min = L, this.max = z;
- }, X.prototype.getClosest = function() {
- var g;
- return this.categories ? g = 1 : this.series.forEach(function(m) {
- var L = m.closestPointRange, z = m.visible || !m.chart.options.chart.ignoreHiddenSeries;
- !m.noSharedTooltip && k(L) && z && (g = k(g) ? Math.min(g, L) : L);
- }), g;
- }, X.prototype.nameToX = function(g) {
- var m = i(this.categories), L = m ? this.categories : this.names, z = g.options.x;
- if (g.series.requireSorting = !1, k(z) || (z = this.options.uniqueNames ? m ? L.indexOf(g.name) : P(L.keys[g.name], -1) : g.series.autoIncrement()), z === -1) {
- if (!m)
- var $ = L.length;
- } else
- $ = z;
- return typeof $ < "u" && (this.names[$] = g.name, this.names.keys[g.name] = $), $;
- }, X.prototype.updateNames = function() {
- var g = this, m = this.names;
- 0 < m.length && (Object.keys(m.keys).forEach(function(L) {
- delete m.keys[L];
- }), m.length = 0, this.minRange = this.userMinRange, (this.series || []).forEach(function(L) {
- L.xIncrement = null, (!L.points || L.isDirtyData) && (g.max = Math.max(g.max, L.xData.length - 1), L.processData(), L.generatePoints()), L.data.forEach(function(z, $) {
- if (z && z.options && typeof z.name < "u") {
- var Q = g.nameToX(z);
- typeof Q < "u" && Q !== z.x && (z.x = Q, L.xData[$] = Q);
- }
- });
- }));
- }, X.prototype.setAxisTranslation = function() {
- var g = this, m = g.max - g.min, L = g.linkedParent, z = !!g.categories, $ = g.isXAxis, Q = g.axisPointRange || 0, A = 0, H = 0, Y = g.transA;
- if ($ || z || Q) {
- var Z = g.getClosest();
- L ? (A = L.minPointOffset, H = L.pointRangePadding) : g.series.forEach(function(q) {
- var it = z ? 1 : $ ? P(q.options.pointRange, Z, 0) : g.axisPointRange || 0, et = q.options.pointPlacement;
- Q = Math.max(Q, it), (!g.single || z) && (q = q.is("xrange") ? !$ : $, A = Math.max(A, q && a(et) ? 0 : it / 2), H = Math.max(H, q && et === "on" ? 0 : it));
- }), L = g.ordinal && g.ordinal.slope && Z ? g.ordinal.slope / Z : 1, g.minPointOffset = A *= L, g.pointRangePadding = H *= L, g.pointRange = Math.min(Q, g.single && z ? 1 : m), $ && (g.closestPointRange = Z);
- }
- g.translationSlope = g.transA = Y = g.staticScale || g.len / (m + H || 1), g.transB = g.horiz ? g.left : g.bottom, g.minPixelPadding = Y * A, c(this, "afterSetAxisTranslation");
- }, X.prototype.minFromRange = function() {
- return this.max - this.range;
- }, X.prototype.setTickInterval = function(g) {
- var m = this.chart, L = this.logarithmic, z = this.options, $ = this.isXAxis, Q = this.isLinked, A = z.tickPixelInterval, H = this.categories, Y = this.softThreshold, Z = z.maxPadding, q = z.minPadding, it = p(z.tickInterval) && 0 <= z.tickInterval ? z.tickInterval : void 0, et = p(this.threshold) ? this.threshold : null;
- this.dateTime || H || Q || this.getTickAmount();
- var nt = P(this.userMin, z.min), rt = P(this.userMax, z.max);
- if (Q) {
- this.linkedParent = m[this.coll][z.linkedTo];
- var ct = this.linkedParent.getExtremes();
- this.min = P(ct.min, ct.dataMin), this.max = P(ct.max, ct.dataMax), z.type !== this.linkedParent.options.type && v(11, 1, m);
- } else {
- if (Y && k(et)) {
- if (this.dataMin >= et)
- ct = et, q = 0;
- else if (this.dataMax <= et) {
- var gt = et;
- Z = 0;
- }
- }
- this.min = P(nt, ct, this.dataMin), this.max = P(rt, gt, this.dataMax);
- }
- if (L && (this.positiveValuesOnly && !g && 0 >= Math.min(this.min, P(this.dataMin, this.min)) && v(10, 1, m), this.min = R(L.log2lin(this.min), 16), this.max = R(L.log2lin(this.max), 16)), this.range && k(this.max) && (this.userMin = this.min = nt = Math.max(this.dataMin, this.minFromRange()), this.userMax = rt = this.max, this.range = null), c(this, "foundExtremes"), this.beforePadding && this.beforePadding(), this.adjustForMinRange(), !(H || this.axisPointRange || this.stacking && this.stacking.usePercentage || Q) && k(this.min) && k(this.max) && (m = this.max - this.min) && (!k(nt) && q && (this.min -= m * q), !k(rt) && Z && (this.max += m * Z)), p(this.userMin) || (p(z.softMin) && z.softMin < this.min && (this.min = nt = z.softMin), p(z.floor) && (this.min = Math.max(this.min, z.floor))), p(this.userMax) || (p(z.softMax) && z.softMax > this.max && (this.max = rt = z.softMax), p(z.ceiling) && (this.max = Math.min(this.max, z.ceiling))), Y && k(this.dataMin) && (et = et || 0, !k(nt) && this.min < et && this.dataMin >= et ? this.min = this.options.minRange ? Math.min(et, this.max - this.minRange) : et : !k(rt) && this.max > et && this.dataMax <= et && (this.max = this.options.minRange ? Math.max(et, this.min + this.minRange) : et)), p(this.min) && p(this.max) && !this.chart.polar && this.min > this.max && (k(this.options.min) ? this.max = this.min : k(this.options.max) && (this.min = this.max)), this.tickInterval = this.min === this.max || typeof this.min > "u" || typeof this.max > "u" ? 1 : Q && this.linkedParent && !it && A === this.linkedParent.options.tickPixelInterval ? it = this.linkedParent.tickInterval : P(it, this.tickAmount ? (this.max - this.min) / Math.max(this.tickAmount - 1, 1) : void 0, H ? 1 : (this.max - this.min) * A / Math.max(this.len, A)), $ && !g) {
- var dt = this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max);
- this.series.forEach(function(ht) {
- ht.forceCrop = ht.forceCropping && ht.forceCropping(), ht.processData(dt);
- }), c(this, "postProcessData", { hasExtemesChanged: dt });
- }
- this.setAxisTranslation(), c(this, "initialAxisTranslation"), this.pointRange && !it && (this.tickInterval = Math.max(this.pointRange, this.tickInterval)), g = P(z.minTickInterval, this.dateTime && !this.series.some(function(ht) {
- return ht.noSharedTooltip;
- }) ? this.closestPointRange : 0), !it && this.tickInterval < g && (this.tickInterval = g), this.dateTime || this.logarithmic || it || (this.tickInterval = s(this.tickInterval, void 0, u(this.tickInterval), P(z.allowDecimals, 0.5 > this.tickInterval || this.tickAmount !== void 0), !!this.tickAmount)), this.tickAmount || (this.tickInterval = this.unsquish()), this.setTickPositions();
- }, X.prototype.setTickPositions = function() {
- var g = this.options, m = g.tickPositions, L = this.getMinorTickInterval(), z = this.hasVerticalPanning(), $ = this.coll === "colorAxis", Q = ($ || !z) && g.startOnTick;
- z = ($ || !z) && g.endOnTick, $ = g.tickPositioner, this.tickmarkOffset = this.categories && g.tickmarkPlacement === "between" && this.tickInterval === 1 ? 0.5 : 0, this.minorTickInterval = L === "auto" && this.tickInterval ? this.tickInterval / 5 : L, this.single = this.min === this.max && k(this.min) && !this.tickAmount && (parseInt(this.min, 10) === this.min || g.allowDecimals !== !1), this.tickPositions = L = m && m.slice(), !L && (this.ordinal && this.ordinal.positions || !((this.max - this.min) / this.tickInterval > Math.max(2 * this.len, 200)) ? L = this.dateTime ? this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval, g.units), this.min, this.max, g.startOfWeek, this.ordinal && this.ordinal.positions, this.closestPointRange, !0) : this.logarithmic ? this.logarithmic.getLogTickPositions(this.tickInterval, this.min, this.max) : this.getLinearTickPositions(
- this.tickInterval,
- this.min,
- this.max
- ) : (L = [this.min, this.max], v(19, !1, this.chart)), L.length > this.len && (L = [L[0], L.pop()], L[0] === L[1] && (L.length = 1)), this.tickPositions = L, $ && ($ = $.apply(this, [this.min, this.max]))) && (this.tickPositions = L = $), this.paddedTicks = L.slice(0), this.trimTicks(L, Q, z), this.isLinked || (this.single && 2 > L.length && !this.categories && !this.series.some(function(A) {
- return A.is("heatmap") && A.options.pointPlacement === "between";
- }) && (this.min -= 0.5, this.max += 0.5), m || $ || this.adjustTickAmount()), c(this, "afterSetTickPositions");
- }, X.prototype.trimTicks = function(g, m, L) {
- var z = g[0], $ = g[g.length - 1], Q = !this.isOrdinal && this.minPointOffset || 0;
- if (c(this, "trimTicks"), !this.isLinked) {
- if (m && z !== -1 / 0)
- this.min = z;
- else
- for (; this.min - Q > g[0]; )
- g.shift();
- if (L)
- this.max = $;
- else
- for (; this.max + Q < g[g.length - 1]; )
- g.pop();
- g.length === 0 && k(z) && !this.options.tickPositions && g.push(($ + z) / 2);
- }
- }, X.prototype.alignToOthers = function() {
- var g = {}, m = this.options, L;
- return this.chart.options.chart.alignTicks !== !1 && m.alignTicks && m.startOnTick !== !1 && m.endOnTick !== !1 && !this.logarithmic && this.chart[this.coll].forEach(function(z) {
- var $ = z.options;
- $ = [z.horiz ? $.left : $.top, $.width, $.height, $.pane].join(), z.series.length && (g[$] ? L = !0 : g[$] = 1);
- }), L;
- }, X.prototype.getTickAmount = function() {
- var g = this.options, m = g.tickPixelInterval, L = g.tickAmount;
- !k(g.tickInterval) && !L && this.len < m && !this.isRadial && !this.logarithmic && g.startOnTick && g.endOnTick && (L = 2), !L && this.alignToOthers() && (L = Math.ceil(this.len / m) + 1), 4 > L && (this.finalTickAmt = L, L = 5), this.tickAmount = L;
- }, X.prototype.adjustTickAmount = function() {
- var g = this.options, m = this.tickInterval, L = this.tickPositions, z = this.tickAmount, $ = this.finalTickAmt, Q = L && L.length, A = P(this.threshold, this.softThreshold ? 0 : null);
- if (this.hasData() && p(this.min) && p(this.max)) {
- if (Q < z) {
- for (; L.length < z; )
- L.length % 2 || this.min === A ? L.push(R(L[L.length - 1] + m)) : L.unshift(R(L[0] - m));
- this.transA *= (Q - 1) / (z - 1), this.min = g.startOnTick ? L[0] : Math.min(this.min, L[0]), this.max = g.endOnTick ? L[L.length - 1] : Math.max(this.max, L[L.length - 1]);
- } else
- Q > z && (this.tickInterval *= 2, this.setTickPositions());
- if (k($)) {
- for (m = g = L.length; m--; )
- ($ === 3 && m % 2 === 1 || 2 >= $ && 0 < m && m < g - 1) && L.splice(m, 1);
- this.finalTickAmt = void 0;
- }
- }
- }, X.prototype.setScale = function() {
- var g = !1, m = !1;
- this.series.forEach(function(z) {
- g = g || z.isDirtyData || z.isDirty, m = m || z.xAxis && z.xAxis.isDirty || !1;
- }), this.setAxisSize();
- var L = this.len !== (this.old && this.old.len);
- L || g || m || this.isLinked || this.forceRedraw || this.userMin !== (this.old && this.old.userMin) || this.userMax !== (this.old && this.old.userMax) || this.alignToOthers() ? (this.stacking && this.stacking.resetStacks(), this.forceRedraw = !1, this.getSeriesExtremes(), this.setTickInterval(), this.isDirty || (this.isDirty = L || this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max))) : this.stacking && this.stacking.cleanStacks(), g && this.panningState && (this.panningState.isDirty = !0), c(this, "afterSetScale");
- }, X.prototype.setExtremes = function(g, m, L, z, $) {
- var Q = this, A = Q.chart;
- L = P(L, !0), Q.series.forEach(function(H) {
- delete H.kdTree;
- }), $ = h($, { min: g, max: m }), c(Q, "setExtremes", $, function() {
- Q.userMin = g, Q.userMax = m, Q.eventArgs = $, L && A.redraw(z);
- });
- }, X.prototype.zoom = function(g, m) {
- var L = this, z = this.dataMin, $ = this.dataMax, Q = this.options, A = Math.min(z, P(Q.min, z)), H = Math.max($, P(Q.max, $));
- return g = { newMin: g, newMax: m }, c(this, "zoom", g, function(Y) {
- var Z = Y.newMin, q = Y.newMax;
- (Z !== L.min || q !== L.max) && (L.allowZoomOutside || (k(z) && (Z < A && (Z = A), Z > H && (Z = H)), k($) && (q < A && (q = A), q > H && (q = H))), L.displayBtn = typeof Z < "u" || typeof q < "u", L.setExtremes(Z, q, !1, void 0, { trigger: "zoom" })), Y.zoomed = !0;
- }), g.zoomed;
- }, X.prototype.setAxisSize = function() {
- var g = this.chart, m = this.options, L = m.offsets || [0, 0, 0, 0], z = this.horiz, $ = this.width = Math.round(D(P(m.width, g.plotWidth - L[3] + L[1]), g.plotWidth)), Q = this.height = Math.round(D(P(m.height, g.plotHeight - L[0] + L[2]), g.plotHeight)), A = this.top = Math.round(D(P(m.top, g.plotTop + L[0]), g.plotHeight, g.plotTop));
- m = this.left = Math.round(D(P(m.left, g.plotLeft + L[3]), g.plotWidth, g.plotLeft)), this.bottom = g.chartHeight - Q - A, this.right = g.chartWidth - $ - m, this.len = Math.max(z ? $ : Q, 0), this.pos = z ? m : A;
- }, X.prototype.getExtremes = function() {
- var g = this.logarithmic;
- return { min: g ? R(g.lin2log(this.min)) : this.min, max: g ? R(g.lin2log(this.max)) : this.max, dataMin: this.dataMin, dataMax: this.dataMax, userMin: this.userMin, userMax: this.userMax };
- }, X.prototype.getThreshold = function(g) {
- var m = this.logarithmic, L = m ? m.lin2log(this.min) : this.min;
- return m = m ? m.lin2log(this.max) : this.max, g === null || g === -1 / 0 ? g = L : g === 1 / 0 ? g = m : L > g ? g = L : m < g && (g = m), this.translate(g, 0, 1, 0, 1);
- }, X.prototype.autoLabelAlign = function(g) {
- var m = (P(g, 0) - 90 * this.side + 720) % 360;
- return g = { align: "center" }, c(
- this,
- "autoLabelAlign",
- g,
- function(L) {
- 15 < m && 165 > m ? L.align = "right" : 195 < m && 345 > m && (L.align = "left");
- }
- ), g.align;
- }, X.prototype.tickSize = function(g) {
- var m = this.options, L = P(m[g === "tick" ? "tickWidth" : "minorTickWidth"], g === "tick" && this.isXAxis && !this.categories ? 1 : 0), z = m[g === "tick" ? "tickLength" : "minorTickLength"];
- if (L && z) {
- m[g + "Position"] === "inside" && (z = -z);
- var $ = [z, L];
- }
- return g = { tickSize: $ }, c(this, "afterTickSize", g), g.tickSize;
- }, X.prototype.labelMetrics = function() {
- var g = this.tickPositions && this.tickPositions[0] || 0;
- return this.chart.renderer.fontMetrics(
- this.options.labels.style.fontSize,
- this.ticks[g] && this.ticks[g].label
- );
- }, X.prototype.unsquish = function() {
- var g = this.options.labels, m = this.horiz, L = this.tickInterval, z = this.len / (((this.categories ? 1 : 0) + this.max - this.min) / L), $ = g.rotation, Q = this.labelMetrics(), A = Math.max(this.max - this.min, 0), H = function(nt) {
- var rt = nt / (z || 1);
- return rt = 1 < rt ? Math.ceil(rt) : 1, rt * L > A && nt !== 1 / 0 && z !== 1 / 0 && A && (rt = Math.ceil(A / L)), R(rt * L);
- }, Y = L, Z, q, it = Number.MAX_VALUE;
- if (m) {
- if (!g.staggerLines && !g.step)
- if (p($))
- var et = [$];
- else
- z < g.autoRotationLimit && (et = g.autoRotation);
- et && et.forEach(function(nt) {
- if (nt === $ || nt && -90 <= nt && 90 >= nt) {
- q = H(Math.abs(Q.h / Math.sin(f * nt)));
- var rt = q + Math.abs(nt / 360);
- rt < it && (it = rt, Z = nt, Y = q);
- }
- });
- } else
- g.step || (Y = H(Q.h));
- return this.autoRotation = et, this.labelRotation = P(Z, p($) ? $ : 0), Y;
- }, X.prototype.getSlotWidth = function(g) {
- var m = this.chart, L = this.horiz, z = this.options.labels, $ = Math.max(this.tickPositions.length - (this.categories ? 0 : 1), 1), Q = m.margin[3];
- if (g && p(g.slotWidth))
- return g.slotWidth;
- if (L && 2 > z.step)
- return z.rotation ? 0 : (this.staggerLines || 1) * this.len / $;
- if (!L) {
- if (g = z.style.width, g !== void 0)
- return parseInt(String(g), 10);
- if (Q)
- return Q - m.spacing[3];
- }
- return 0.33 * m.chartWidth;
- }, X.prototype.renderUnsquish = function() {
- var g = this.chart, m = g.renderer, L = this.tickPositions, z = this.ticks, $ = this.options.labels, Q = $.style, A = this.horiz, H = this.getSlotWidth(), Y = Math.max(1, Math.round(H - 2 * $.padding)), Z = {}, q = this.labelMetrics(), it = Q.textOverflow, et = 0;
- if (a($.rotation) || (Z.rotation = $.rotation || 0), L.forEach(function(gt) {
- gt = z[gt], gt.movedLabel && gt.replaceMovedLabel(), gt && gt.label && gt.label.textPxLength > et && (et = gt.label.textPxLength);
- }), this.maxLabelLength = et, this.autoRotation)
- et > Y && et > q.h ? Z.rotation = this.labelRotation : this.labelRotation = 0;
- else if (H) {
- var nt = Y;
- if (!it) {
- var rt = "clip";
- for (Y = L.length; !A && Y--; ) {
- var ct = L[Y];
- (ct = z[ct].label) && (ct.styles && ct.styles.textOverflow === "ellipsis" ? ct.css({ textOverflow: "clip" }) : ct.textPxLength > H && ct.css({ width: H + "px" }), ct.getBBox().height > this.len / L.length - (q.h - q.f) && (ct.specificTextOverflow = "ellipsis"));
- }
- }
- }
- Z.rotation && (nt = et > 0.5 * g.chartHeight ? 0.33 * g.chartHeight : et, it || (rt = "ellipsis")), (this.labelAlign = $.align || this.autoLabelAlign(this.labelRotation)) && (Z.align = this.labelAlign), L.forEach(function(gt) {
- var dt = (gt = z[gt]) && gt.label, ht = Q.width, at = {};
- dt && (dt.attr(Z), gt.shortenLabel ? gt.shortenLabel() : nt && !ht && Q.whiteSpace !== "nowrap" && (nt < dt.textPxLength || dt.element.tagName === "SPAN") ? (at.width = nt + "px", it || (at.textOverflow = dt.specificTextOverflow || rt), dt.css(at)) : dt.styles && dt.styles.width && !at.width && !ht && dt.css({ width: null }), delete dt.specificTextOverflow, gt.rotation = Z.rotation);
- }, this), this.tickRotCorr = m.rotCorr(q.b, this.labelRotation || 0, this.side !== 0);
- }, X.prototype.hasData = function() {
- return this.series.some(function(g) {
- return g.hasData();
- }) || this.options.showEmpty && k(this.min) && k(this.max);
- }, X.prototype.addTitle = function(g) {
- var m = this.chart.renderer, L = this.horiz, z = this.opposite, $ = this.options.title, Q = this.chart.styledMode, A;
- this.axisTitle || ((A = $.textAlign) || (A = (L ? { low: "left", middle: "center", high: "right" } : { low: z ? "right" : "left", middle: "center", high: z ? "left" : "right" })[$.align]), this.axisTitle = m.text($.text || "", 0, 0, $.useHTML).attr({ zIndex: 7, rotation: $.rotation, align: A }).addClass("highcharts-axis-title"), Q || this.axisTitle.css(t($.style)), this.axisTitle.add(this.axisGroup), this.axisTitle.isNew = !0), Q || $.style.width || this.isRadial || this.axisTitle.css({ width: this.len + "px" }), this.axisTitle[g ? "show" : "hide"](g);
- }, X.prototype.generateTick = function(g) {
- var m = this.ticks;
- m[g] ? m[g].addLabel() : m[g] = new F(this, g);
- }, X.prototype.getOffset = function() {
- var g = this, m = this, L = m.chart, z = m.horiz, $ = m.options, Q = m.side, A = m.ticks, H = m.tickPositions, Y = m.coll, Z = m.axisParent, q = L.renderer, it = L.inverted && !m.isZAxis ? [1, 0, 3, 2][Q] : Q, et = m.hasData(), nt = $.title, rt = $.labels, ct = L.axisOffset;
- L = L.clipOffset;
- var gt = [
- -1,
- 1,
- 1,
- -1
- ][Q], dt = $.className, ht, at = 0, J = 0, tt = 0;
- if (m.showAxis = ht = et || $.showEmpty, m.staggerLines = m.horiz && rt.staggerLines || void 0, !m.axisGroup) {
- var ot = function(pt, yt, vt) {
- return q.g(pt).attr({ zIndex: vt }).addClass("highcharts-" + Y.toLowerCase() + yt + " " + (g.isRadial ? "highcharts-radial-axis" + yt + " " : "") + (dt || "")).add(Z);
- };
- m.gridGroup = ot("grid", "-grid", $.gridZIndex), m.axisGroup = ot("axis", "", $.zIndex), m.labelGroup = ot("axis-labels", "-labels", rt.zIndex);
- }
- if (et || m.isLinked ? (H.forEach(function(pt) {
- m.generateTick(pt);
- }), m.renderUnsquish(), m.reserveSpaceDefault = Q === 0 || Q === 2 || { 1: "left", 3: "right" }[Q] === m.labelAlign, P(rt.reserveSpace, m.labelAlign === "center" ? !0 : null, m.reserveSpaceDefault) && H.forEach(function(pt) {
- tt = Math.max(A[pt].getLabelSize(), tt);
- }), m.staggerLines && (tt *= m.staggerLines), m.labelOffset = tt * (m.opposite ? -1 : 1)) : n(A, function(pt, yt) {
- pt.destroy(), delete A[yt];
- }), nt && nt.text && nt.enabled !== !1 && (m.addTitle(ht), ht && nt.reserveSpace !== !1)) {
- m.titleOffset = at = m.axisTitle.getBBox()[z ? "height" : "width"];
- var lt = nt.offset;
- J = k(lt) ? 0 : P(nt.margin, z ? 5 : 10);
- }
- m.renderLine(), m.offset = gt * P(
- $.offset,
- ct[Q] ? ct[Q] + ($.margin || 0) : 0
- ), m.tickRotCorr = m.tickRotCorr || { x: 0, y: 0 }, nt = Q === 0 ? -m.labelMetrics().h : Q === 2 ? m.tickRotCorr.y : 0, et = Math.abs(tt) + J, tt && (et = et - nt + gt * (z ? P(rt.y, m.tickRotCorr.y + 8 * gt) : rt.x)), m.axisTitleMargin = P(lt, et), m.getMaxLabelDimensions && (m.maxLabelDimensions = m.getMaxLabelDimensions(A, H)), Y !== "colorAxis" && (z = this.tickSize("tick"), ct[Q] = Math.max(ct[Q], (m.axisTitleMargin || 0) + at + gt * m.offset, et, H && H.length && z ? z[0] + gt * m.offset : 0), $ = !m.axisLine || $.offset ? 0 : 2 * Math.floor(m.axisLine.strokeWidth() / 2), L[it] = Math.max(
- L[it],
- $
- )), c(this, "afterGetOffset");
- }, X.prototype.getLinePath = function(g) {
- var m = this.chart, L = this.opposite, z = this.offset, $ = this.horiz, Q = this.left + (L ? this.width : 0) + z;
- return z = m.chartHeight - this.bottom - (L ? this.height : 0) + z, L && (g *= -1), m.renderer.crispLine([["M", $ ? this.left : Q, $ ? z : this.top], ["L", $ ? m.chartWidth - this.right : Q, $ ? z : m.chartHeight - this.bottom]], g);
- }, X.prototype.renderLine = function() {
- this.axisLine || (this.axisLine = this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup), this.chart.styledMode || this.axisLine.attr({ stroke: this.options.lineColor, "stroke-width": this.options.lineWidth, zIndex: 7 }));
- }, X.prototype.getTitlePosition = function() {
- var g = this.horiz, m = this.left, L = this.top, z = this.len, $ = this.options.title, Q = g ? m : L, A = this.opposite, H = this.offset, Y = $.x, Z = $.y, q = this.axisTitle, it = this.chart.renderer.fontMetrics($.style.fontSize, q);
- return q = Math.max(q.getBBox(null, 0).height - it.h - 1, 0), z = { low: Q + (g ? 0 : z), middle: Q + z / 2, high: Q + (g ? z : 0) }[$.align], m = (g ? L + this.height : m) + (g ? 1 : -1) * (A ? -1 : 1) * this.axisTitleMargin + [
- -q,
- q,
- it.f,
- -q
- ][this.side], g = { x: g ? z + Y : m + (A ? this.width : 0) + H + Y, y: g ? m + Z - (A ? this.height : 0) + H : z + Z }, c(this, "afterGetTitlePosition", { titlePosition: g }), g;
- }, X.prototype.renderMinorTick = function(g, m) {
- var L = this.minorTicks;
- L[g] || (L[g] = new F(this, g, "minor")), m && L[g].isNew && L[g].render(null, !0), L[g].render(null, !1, 1);
- }, X.prototype.renderTick = function(g, m, L) {
- var z = this.ticks;
- (!this.isLinked || g >= this.min && g <= this.max || this.grid && this.grid.isColumn) && (z[g] || (z[g] = new F(this, g)), L && z[g].isNew && z[g].render(m, !0, -1), z[g].render(m));
- }, X.prototype.render = function() {
- var g = this, m = g.chart, L = g.logarithmic, z = g.options, $ = g.isLinked, Q = g.tickPositions, A = g.axisTitle, H = g.ticks, Y = g.minorTicks, Z = g.alternateBands, q = z.stackLabels, it = z.alternateGridColor, et = g.tickmarkOffset, nt = g.axisLine, rt = g.showAxis, ct = j(m.renderer.globalAnimation), gt, dt;
- if (g.labelEdge.length = 0, g.overlap = !1, [H, Y, Z].forEach(function(at) {
- n(at, function(J) {
- J.isActive = !1;
- });
- }), g.hasData() || $) {
- var ht = g.chart.hasRendered && g.old && p(g.old.min);
- g.minorTickInterval && !g.categories && g.getMinorTickPositions().forEach(function(at) {
- g.renderMinorTick(
- at,
- ht
- );
- }), Q.length && (Q.forEach(function(at, J) {
- g.renderTick(at, J, ht);
- }), et && (g.min === 0 || g.single) && (H[-1] || (H[-1] = new F(g, -1, null, !0)), H[-1].render(-1))), it && Q.forEach(function(at, J) {
- dt = typeof Q[J + 1] < "u" ? Q[J + 1] + et : g.max - et, J % 2 === 0 && at < g.max && dt <= g.max + (m.polar ? -et : et) && (Z[at] || (Z[at] = new V.PlotLineOrBand(g)), gt = at + et, Z[at].options = { from: L ? L.lin2log(gt) : gt, to: L ? L.lin2log(dt) : dt, color: it, className: "highcharts-alternate-grid" }, Z[at].render(), Z[at].isActive = !0);
- }), g._addedPlotLB || (g._addedPlotLB = !0, (z.plotLines || []).concat(z.plotBands || []).forEach(function(at) {
- g.addPlotBandOrLine(at);
- }));
- }
- [H, Y, Z].forEach(function(at) {
- var J = [], tt = ct.duration;
- n(at, function(ot, lt) {
- ot.isActive || (ot.render(lt, !1, 0), ot.isActive = !1, J.push(lt));
- }), E(function() {
- for (var ot = J.length; ot--; )
- at[J[ot]] && !at[J[ot]].isActive && (at[J[ot]].destroy(), delete at[J[ot]]);
- }, at !== Z && m.hasRendered && tt ? tt : 0);
- }), nt && (nt[nt.isPlaced ? "animate" : "attr"]({ d: this.getLinePath(nt.strokeWidth()) }), nt.isPlaced = !0, nt[rt ? "show" : "hide"](rt)), A && rt && (z = g.getTitlePosition(), p(z.y) ? (A[A.isNew ? "attr" : "animate"](z), A.isNew = !1) : (A.attr(
- "y",
- -9999
- ), A.isNew = !0)), q && q.enabled && g.stacking && g.stacking.renderStackTotals(), g.old = { len: g.len, max: g.max, min: g.min, transA: g.transA, userMax: g.userMax, userMin: g.userMin }, g.isDirty = !1, c(this, "afterRender");
- }, X.prototype.redraw = function() {
- this.visible && (this.render(), this.plotLinesAndBands.forEach(function(g) {
- g.render();
- })), this.series.forEach(function(g) {
- g.isDirty = !0;
- });
- }, X.prototype.getKeepProps = function() {
- return this.keepProps || X.keepProps;
- }, X.prototype.destroy = function(g) {
- var m = this, L = m.plotLinesAndBands, z = this.eventOptions;
- if (c(this, "destroy", { keepEvents: g }), g || I(m), [m.ticks, m.minorTicks, m.alternateBands].forEach(function(Q) {
- b(Q);
- }), L)
- for (g = L.length; g--; )
- L[g].destroy();
- "axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach(function(Q) {
- m[Q] && (m[Q] = m[Q].destroy());
- });
- for (var $ in m.plotLinesAndBandsGroups)
- m.plotLinesAndBandsGroups[$] = m.plotLinesAndBandsGroups[$].destroy();
- n(m, function(Q, A) {
- m.getKeepProps().indexOf(A) === -1 && delete m[A];
- }), this.eventOptions = z;
- }, X.prototype.drawCrosshair = function(g, m) {
- var L = this.crosshair, z = P(L && L.snap, !0), $ = this.chart, Q, A = this.cross;
- if (c(this, "drawCrosshair", { e: g, point: m }), g || (g = this.cross && this.cross.e), L && (k(m) || !z) !== !1) {
- if (z ? k(m) && (Q = P(this.coll !== "colorAxis" ? m.crosshairPos : null, this.isXAxis ? m.plotX : this.len - m.plotY)) : Q = g && (this.horiz ? g.chartX - this.pos : this.len - g.chartY + this.pos), k(Q)) {
- var H = { value: m && (this.isXAxis ? m.x : P(m.stackY, m.y)), translatedValue: Q };
- $.polar && h(H, { isCrosshair: !0, chartX: g && g.chartX, chartY: g && g.chartY, point: m }), H = this.getPlotLinePath(H) || null;
- }
- if (!k(H)) {
- this.hideCrosshair();
- return;
- }
- z = this.categories && !this.isRadial, A || (this.cross = A = $.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-" + (z ? "category " : "thin ") + (L.className || "")).attr({ zIndex: P(L.zIndex, 2) }).add(), $.styledMode || (A.attr({ stroke: L.color || (z ? _.parse("#ccd6eb").setOpacity(0.25).get() : "#cccccc"), "stroke-width": P(L.width, 1) }).css({ "pointer-events": "none" }), L.dashStyle && A.attr({ dashstyle: L.dashStyle }))), A.show().attr({ d: H }), z && !L.width && A.attr({ "stroke-width": this.transA }), this.cross.e = g;
- } else
- this.hideCrosshair();
- c(this, "afterDrawCrosshair", { e: g, point: m });
- }, X.prototype.hideCrosshair = function() {
- this.cross && this.cross.hide(), c(this, "afterHideCrosshair");
- }, X.prototype.hasVerticalPanning = function() {
- var g = this.chart.options.chart.panning;
- return !!(g && g.enabled && /y/.test(g.type));
- }, X.prototype.validatePositiveValue = function(g) {
- return p(g) && 0 < g;
- }, X.prototype.update = function(g, m) {
- var L = this.chart;
- g = t(this.userOptions, g), this.destroy(!0), this.init(L, g), L.isDirtyBox = !0, P(m, !0) && L.redraw();
- }, X.prototype.remove = function(g) {
- for (var m = this.chart, L = this.coll, z = this.series, $ = z.length; $--; )
- z[$] && z[$].remove(!1);
- S(m.axes, this), S(m[L], this), m[L].forEach(function(Q, A) {
- Q.options.index = Q.userOptions.index = A;
- }), this.destroy(), m.isDirtyBox = !0, P(g, !0) && m.redraw();
- }, X.prototype.setTitle = function(g, m) {
- this.update({ title: g }, m);
- }, X.prototype.setCategories = function(g, m) {
- this.update({ categories: g }, m);
- }, X.defaultOptions = N.defaultXAxisOptions, X.keepProps = "extKey hcEvents names series userMax userMin".split(" "), X;
- }(), y;
- }), C(o, "Core/Axis/DateTimeAxis.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.addEvent, _ = y.getMagnitude, U = y.normalizeTickInterval, G = y.timeUnits, V;
- return function(F) {
- function B() {
- return this.chart.time.getTimeTicks.apply(this.chart.time, arguments);
- }
- function j(f) {
- f.userOptions.type !== "datetime" ? this.dateTime = void 0 : this.dateTime || (this.dateTime = new x(this));
- }
- var w = [];
- F.compose = function(f) {
- return w.indexOf(f) === -1 && (w.push(f), f.keepProps.push("dateTime"), f.prototype.getTimeTicks = B, N(
- f,
- "init",
- j
- )), f;
- };
- var x = function() {
- function f(l) {
- this.axis = l;
- }
- return f.prototype.normalizeTimeTickInterval = function(l, T) {
- var O = T || [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2]], ["week", [1, 2]], ["month", [1, 2, 3, 4, 6]], ["year", null]];
- T = O[O.length - 1];
- var R = G[T[0]], k = T[1], b;
- for (b = 0; b < O.length && (T = O[b], R = G[T[0]], k = T[1], !(O[b + 1] && l <= (R * k[k.length - 1] + G[O[b + 1][0]]) / 2)); b++)
- ;
- return R === G.year && l < 5 * R && (k = [1, 2, 5]), l = U(l / R, k, T[0] === "year" ? Math.max(_(l / R), 1) : 1), { unitRange: R, count: l, unitName: T[0] };
- }, f.prototype.getXDateFormat = function(l, T) {
- var O = this.axis;
- return O.closestPointRange ? O.chart.time.getDateFormat(O.closestPointRange, l, O.options.startOfWeek, T) || T.year : T.day;
- }, f;
- }();
- F.Additions = x;
- }(V || (V = {})), V;
- }), C(o, "Core/Axis/LogarithmicAxis.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.addEvent, _ = y.getMagnitude, U = y.normalizeTickInterval, G = y.pick, V;
- return function(F) {
- function B(f) {
- var l = this.logarithmic;
- f.userOptions.type !== "logarithmic" ? this.logarithmic = void 0 : l || (this.logarithmic = new x(this));
- }
- function j() {
- var f = this.logarithmic;
- f && (this.lin2val = function(l) {
- return f.lin2log(l);
- }, this.val2lin = function(l) {
- return f.log2lin(l);
- });
- }
- var w = [];
- F.compose = function(f) {
- return w.indexOf(f) === -1 && (w.push(f), f.keepProps.push("logarithmic"), N(f, "init", B), N(f, "afterInit", j)), f;
- };
- var x = function() {
- function f(l) {
- this.axis = l;
- }
- return f.prototype.getLogTickPositions = function(l, T, O, R) {
- var k = this.axis, b = k.len, S = k.options, v = [];
- if (R || (this.minorAutoInterval = void 0), 0.5 <= l)
- l = Math.round(l), v = k.getLinearTickPositions(l, T, O);
- else if (0.08 <= l) {
- var h = Math.floor(T), c, u = S = void 0;
- for (b = 0.3 < l ? [1, 2, 4] : 0.15 < l ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; h < O + 1 && !u; h++) {
- var i = b.length;
- for (c = 0; c < i && !u; c++) {
- var p = this.log2lin(this.lin2log(h) * b[c]);
- p > T && (!R || S <= O) && typeof S < "u" && v.push(S), S > O && (u = !0), S = p;
- }
- }
- } else
- T = this.lin2log(T), O = this.lin2log(O), l = R ? k.getMinorTickInterval() : S.tickInterval, l = G(l === "auto" ? null : l, this.minorAutoInterval, S.tickPixelInterval / (R ? 5 : 1) * (O - T) / ((R ? b / k.tickPositions.length : b) || 1)), l = U(l, void 0, _(l)), v = k.getLinearTickPositions(l, T, O).map(this.log2lin), R || (this.minorAutoInterval = l / 5);
- return R || (k.tickInterval = l), v;
- }, f.prototype.lin2log = function(l) {
- return Math.pow(10, l);
- }, f.prototype.log2lin = function(l) {
- return Math.log(l) / Math.LN10;
- }, f;
- }();
- F.Additions = x;
- }(V || (V = {})), V;
- }), C(o, "Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.erase, _ = y.extend, U = y.isNumber, G;
- return function(V) {
- var F = [], B;
- V.compose = function(w, x) {
- return B || (B = w), F.indexOf(x) === -1 && (F.push(x), _(x.prototype, j.prototype)), x;
- };
- var j = function() {
- function w() {
- }
- return w.prototype.getPlotBandPath = function(x, f, l) {
- l === void 0 && (l = this.options);
- var T = this.getPlotLinePath({ value: f, force: !0, acrossPanes: l.acrossPanes }), O = [], R = this.horiz;
- if (f = !U(this.min) || !U(this.max) || x < this.min && f < this.min || x > this.max && f > this.max, x = this.getPlotLinePath({ value: x, force: !0, acrossPanes: l.acrossPanes }), l = 1, x && T) {
- if (f) {
- var k = x.toString() === T.toString();
- l = 0;
- }
- for (f = 0; f < x.length; f += 2) {
- var b = x[f], S = x[f + 1], v = T[f], h = T[f + 1];
- b[0] !== "M" && b[0] !== "L" || S[0] !== "M" && S[0] !== "L" || v[0] !== "M" && v[0] !== "L" || h[0] !== "M" && h[0] !== "L" || (R && v[1] === b[1] ? (v[1] += l, h[1] += l) : R || v[2] !== b[2] || (v[2] += l, h[2] += l), O.push(["M", b[1], b[2]], ["L", S[1], S[2]], ["L", h[1], h[2]], ["L", v[1], v[2]], ["Z"])), O.isFlat = k;
- }
- }
- return O;
- }, w.prototype.addPlotBand = function(x) {
- return this.addPlotBandOrLine(x, "plotBands");
- }, w.prototype.addPlotLine = function(x) {
- return this.addPlotBandOrLine(x, "plotLines");
- }, w.prototype.addPlotBandOrLine = function(x, f) {
- var l = this, T = this.userOptions, O = new B(this, x);
- if (this.visible && (O = O.render()), O) {
- if (this._addedPlotLB || (this._addedPlotLB = !0, (T.plotLines || []).concat(T.plotBands || []).forEach(function(k) {
- l.addPlotBandOrLine(k);
- })), f) {
- var R = T[f] || [];
- R.push(x), T[f] = R;
- }
- this.plotLinesAndBands.push(O);
- }
- return O;
- }, w.prototype.removePlotBandOrLine = function(x) {
- var f = this.plotLinesAndBands, l = this.options, T = this.userOptions;
- if (f) {
- for (var O = f.length; O--; )
- f[O].id === x && f[O].destroy();
- [l.plotLines || [], T.plotLines || [], l.plotBands || [], T.plotBands || []].forEach(function(R) {
- for (O = R.length; O--; )
- (R[O] || {}).id === x && N(R, R[O]);
- });
- }
- }, w.prototype.removePlotBand = function(x) {
- this.removePlotBandOrLine(x);
- }, w.prototype.removePlotLine = function(x) {
- this.removePlotBandOrLine(x);
- }, w;
- }();
- }(G || (G = {})), G;
- }), C(o, "Core/Axis/PlotLineOrBand/PlotLineOrBand.js", [o["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"], o["Core/Utilities.js"]], function(y, N) {
- var _ = N.arrayMax, U = N.arrayMin, G = N.defined, V = N.destroyObjectProperties, F = N.erase, B = N.fireEvent, j = N.merge, w = N.objectEach, x = N.pick;
- return N = function() {
- function f(l, T) {
- this.axis = l, T && (this.options = T, this.id = T.id);
- }
- return f.compose = function(l) {
- return y.compose(f, l);
- }, f.prototype.render = function() {
- B(this, "render");
- var l = this, T = l.axis, O = T.horiz, R = T.logarithmic, k = l.options, b = k.color, S = x(k.zIndex, 0), v = k.events, h = {}, c = T.chart.renderer, u = k.label, i = l.label, p = k.to, a = k.from, t = k.value, s = l.svgElem, n = [], P = G(a) && G(p);
- n = G(t);
- var D = !s, I = { class: "highcharts-plot-" + (P ? "band " : "line ") + (k.className || "") }, W = P ? "bands" : "lines";
- if (R && (a = R.log2lin(a), p = R.log2lin(p), t = R.log2lin(t)), T.chart.styledMode || (n ? (I.stroke = b || "#999999", I["stroke-width"] = x(k.width, 1), k.dashStyle && (I.dashstyle = k.dashStyle)) : P && (I.fill = b || "#e6ebf5", k.borderWidth && (I.stroke = k.borderColor, I["stroke-width"] = k.borderWidth))), h.zIndex = S, W += "-" + S, (R = T.plotLinesAndBandsGroups[W]) || (T.plotLinesAndBandsGroups[W] = R = c.g("plot-" + W).attr(h).add()), D && (l.svgElem = s = c.path().attr(I).add(R)), n)
- n = T.getPlotLinePath({ value: t, lineWidth: s.strokeWidth(), acrossPanes: k.acrossPanes });
- else if (P)
- n = T.getPlotBandPath(
- a,
- p,
- k
- );
- else
- return;
- return !l.eventsAdded && v && (w(v, function(E, X) {
- s.on(X, function(g) {
- v[X].apply(l, [g]);
- });
- }), l.eventsAdded = !0), (D || !s.d) && n && n.length ? s.attr({ d: n }) : s && (n ? (s.show(!0), s.animate({ d: n })) : s.d && (s.hide(), i && (l.label = i = i.destroy()))), u && (G(u.text) || G(u.formatter)) && n && n.length && 0 < T.width && 0 < T.height && !n.isFlat ? (u = j({ align: O && P && "center", x: O ? !P && 4 : 10, verticalAlign: !O && P && "middle", y: O ? P ? 16 : 10 : P ? 6 : -4, rotation: O && !P && 90 }, u), this.renderLabel(u, n, P, S)) : i && i.hide(), l;
- }, f.prototype.renderLabel = function(l, T, O, R) {
- var k = this.axis, b = k.chart.renderer, S = this.label;
- S || (this.label = S = b.text(this.getLabelText(l), 0, 0, l.useHTML).attr({ align: l.textAlign || l.align, rotation: l.rotation, class: "highcharts-plot-" + (O ? "band" : "line") + "-label " + (l.className || ""), zIndex: R }).add(), k.chart.styledMode || S.css(j({ textOverflow: "ellipsis" }, l.style))), R = T.xBounds || [T[0][1], T[1][1], O ? T[2][1] : T[0][1]], T = T.yBounds || [T[0][2], T[1][2], O ? T[2][2] : T[0][2]], O = U(R), b = U(T), S.align(l, !1, { x: O, y: b, width: _(R) - O, height: _(T) - b }), S.alignValue && S.alignValue !== "left" || S.css({ width: (S.rotation === 90 ? k.height - (S.alignAttr.y - k.top) : k.width - (S.alignAttr.x - k.left)) + "px" }), S.show(!0);
- }, f.prototype.getLabelText = function(l) {
- return G(l.formatter) ? l.formatter.call(this) : l.text;
- }, f.prototype.destroy = function() {
- F(this.axis.plotLinesAndBands, this), delete this.axis, V(this);
- }, f;
- }(), N;
- }), C(
- o,
- "Core/Tooltip.js",
- [o["Core/FormatUtilities.js"], o["Core/Globals.js"], o["Core/Renderer/RendererUtilities.js"], o["Core/Renderer/RendererRegistry.js"], o["Core/Utilities.js"]],
- function(y, N, _, U, G) {
- var V = y.format, F = N.doc, B = _.distribute, j = G.addEvent, w = G.clamp, x = G.css, f = G.defined, l = G.discardElement, T = G.extend, O = G.fireEvent, R = G.isArray, k = G.isNumber, b = G.isString, S = G.merge, v = G.pick, h = G.splat, c = G.syncTimeout;
- return y = function() {
- function u(i, p) {
- this.allowShared = !0, this.container = void 0, this.crosshairs = [], this.distance = 0, this.isHidden = !0, this.isSticky = !1, this.now = {}, this.options = {}, this.outside = !1, this.chart = i, this.init(i, p);
- }
- return u.prototype.applyFilter = function() {
- var i = this.chart;
- i.renderer.definition({
- tagName: "filter",
- attributes: { id: "drop-shadow-" + i.index, opacity: 0.5 },
- children: [{ tagName: "feGaussianBlur", attributes: { in: "SourceAlpha", stdDeviation: 1 } }, { tagName: "feOffset", attributes: { dx: 1, dy: 1 } }, { tagName: "feComponentTransfer", children: [{ tagName: "feFuncA", attributes: { type: "linear", slope: 0.3 } }] }, { tagName: "feMerge", children: [{ tagName: "feMergeNode" }, { tagName: "feMergeNode", attributes: { in: "SourceGraphic" } }] }]
- });
- }, u.prototype.bodyFormatter = function(i) {
- return i.map(function(p) {
- var a = p.series.tooltipOptions;
- return (a[(p.point.formatPrefix || "point") + "Formatter"] || p.point.tooltipFormatter).call(p.point, a[(p.point.formatPrefix || "point") + "Format"] || "");
- });
- }, u.prototype.cleanSplit = function(i) {
- this.chart.series.forEach(function(p) {
- var a = p && p.tt;
- a && (!a.isActive || i ? p.tt = a.destroy() : a.isActive = !1);
- });
- }, u.prototype.defaultFormatter = function(i) {
- var p = this.points || h(this), a = [i.tooltipFooterHeaderFormatter(p[0])];
- return a = a.concat(i.bodyFormatter(p)), a.push(i.tooltipFooterHeaderFormatter(p[0], !0)), a;
- }, u.prototype.destroy = function() {
- this.label && (this.label = this.label.destroy()), this.split && this.tt && (this.cleanSplit(!0), this.tt = this.tt.destroy()), this.renderer && (this.renderer = this.renderer.destroy(), l(this.container)), G.clearTimeout(this.hideTimer), G.clearTimeout(this.tooltipTimeout);
- }, u.prototype.getAnchor = function(i, p) {
- var a = this.chart, t = a.pointer, s = a.inverted, n = a.plotTop, P = a.plotLeft, D, I, W = 0, E = 0;
- return i = h(i), this.followPointer && p ? (typeof p.chartX > "u" && (p = t.normalize(p)), t = [p.chartX - P, p.chartY - n]) : i[0].tooltipPos ? t = i[0].tooltipPos : (i.forEach(function(X) {
- D = X.series.yAxis, I = X.series.xAxis, W += X.plotX || 0, E += X.plotLow ? (X.plotLow + (X.plotHigh || 0)) / 2 : X.plotY || 0, I && D && (s ? (W += n + a.plotHeight - I.len - I.pos, E += P + a.plotWidth - D.len - D.pos) : (W += I.pos - P, E += D.pos - n));
- }), W /= i.length, E /= i.length, t = [s ? a.plotWidth - E : W, s ? a.plotHeight - W : E], this.shared && 1 < i.length && p && (s ? t[0] = p.chartX - P : t[1] = p.chartY - n)), t.map(Math.round);
- }, u.prototype.getLabel = function() {
- var i = this, p = this.chart.styledMode, a = this.options, t = this.split && this.allowShared, s = "tooltip" + (f(a.className) ? " " + a.className : ""), n = a.style.pointerEvents || (!this.followPointer && a.stickOnContact ? "auto" : "none"), P = function() {
- i.inContact = !0;
- }, D = function(z) {
- var $ = i.chart.hoverSeries;
- i.inContact = i.shouldStickOnContact() && i.chart.pointer.inClass(z.relatedTarget, "highcharts-tooltip"), !i.inContact && $ && $.onMouseOut && $.onMouseOut();
- }, I, W = this.chart.renderer;
- if (i.label) {
- var E = !i.label.hasClass("highcharts-label");
- (t && !E || !t && E) && i.destroy();
- }
- if (!this.label) {
- if (this.outside) {
- E = this.chart.options.chart.style;
- var X = U.getRendererType();
- this.container = I = N.doc.createElement("div"), I.className = "highcharts-tooltip-container", x(I, { position: "absolute", top: "1px", pointerEvents: n, zIndex: Math.max(this.options.style.zIndex || 0, (E && E.zIndex || 0) + 3) }), j(I, "mouseenter", P), j(I, "mouseleave", D), N.doc.body.appendChild(I), this.renderer = W = new X(I, 0, 0, E, void 0, void 0, W.styledMode);
- }
- if (t ? this.label = W.g(s) : (this.label = W.label("", 0, 0, a.shape, void 0, void 0, a.useHTML, void 0, s).attr({ padding: a.padding, r: a.borderRadius }), p || this.label.attr({
- fill: a.backgroundColor,
- "stroke-width": a.borderWidth
- }).css(a.style).css({ pointerEvents: n }).shadow(a.shadow)), p && a.shadow && (this.applyFilter(), this.label.attr({ filter: "url(#drop-shadow-" + this.chart.index + ")" })), i.outside && !i.split) {
- var g = this.label, m = g.xSetter, L = g.ySetter;
- g.xSetter = function(z) {
- m.call(g, i.distance), I.style.left = z + "px";
- }, g.ySetter = function(z) {
- L.call(g, i.distance), I.style.top = z + "px";
- };
- }
- this.label.on("mouseenter", P).on("mouseleave", D).attr({ zIndex: 8 }).add();
- }
- return this.label;
- }, u.prototype.getPosition = function(i, p, a) {
- var t = this.chart, s = this.distance, n = {}, P = t.inverted && a.h || 0, D = this.outside, I = D ? F.documentElement.clientWidth - 2 * s : t.chartWidth, W = D ? Math.max(F.body.scrollHeight, F.documentElement.scrollHeight, F.body.offsetHeight, F.documentElement.offsetHeight, F.documentElement.clientHeight) : t.chartHeight, E = t.pointer.getChartPosition(), X = function(Y) {
- var Z = Y === "x";
- return [Y, Z ? I : W, Z ? i : p].concat(D ? [Z ? i * E.scaleX : p * E.scaleY, Z ? E.left - s + (a.plotX + t.plotLeft) * E.scaleX : E.top - s + (a.plotY + t.plotTop) * E.scaleY, 0, Z ? I : W] : [Z ? i : p, Z ? a.plotX + t.plotLeft : a.plotY + t.plotTop, Z ? t.plotLeft : t.plotTop, Z ? t.plotLeft + t.plotWidth : t.plotTop + t.plotHeight]);
- }, g = X("y"), m = X("x"), L;
- X = !!a.negative, !t.polar && t.hoverSeries && t.hoverSeries.yAxis && t.hoverSeries.yAxis.reversed && (X = !X);
- var z = !this.followPointer && v(a.ttBelow, !t.inverted === X), $ = function(Y, Z, q, it, et, nt, rt) {
- var ct = D ? Y === "y" ? s * E.scaleY : s * E.scaleX : s, gt = (q - it) / 2, dt = it < et - s, ht = et + s + it < Z, at = et - ct - q + gt;
- if (et = et + ct - gt, z && ht)
- n[Y] = et;
- else if (!z && dt)
- n[Y] = at;
- else if (dt)
- n[Y] = Math.min(rt - it, 0 > at - P ? at : at - P);
- else if (ht)
- n[Y] = Math.max(nt, et + P + q > Z ? et : et + P);
- else
- return !1;
- }, Q = function(Y, Z, q, it, et) {
- var nt;
- return et < s || et > Z - s ? nt = !1 : n[Y] = et < q / 2 ? 1 : et > Z - it / 2 ? Z - it - 2 : et - q / 2, nt;
- }, A = function(Y) {
- var Z = g;
- g = m, m = Z, L = Y;
- }, H = function() {
- $.apply(0, g) !== !1 ? Q.apply(0, m) !== !1 || L || (A(!0), H()) : L ? n.x = n.y = 0 : (A(!0), H());
- };
- return (t.inverted || 1 < this.len) && A(), H(), n;
- }, u.prototype.hide = function(i) {
- var p = this;
- G.clearTimeout(this.hideTimer), i = v(i, this.options.hideDelay), this.isHidden || (this.hideTimer = c(function() {
- p.getLabel().fadeOut(i && void 0), p.isHidden = !0;
- }, i));
- }, u.prototype.init = function(i, p) {
- this.chart = i, this.options = p, this.crosshairs = [], this.now = { x: 0, y: 0 }, this.isHidden = !0, this.split = p.split && !i.inverted && !i.polar, this.shared = p.shared || this.split, this.outside = v(p.outside, !(!i.scrollablePixelsX && !i.scrollablePixelsY));
- }, u.prototype.shouldStickOnContact = function() {
- return !(this.followPointer || !this.options.stickOnContact);
- }, u.prototype.isStickyOnContact = function() {
- return !(!this.shouldStickOnContact() || !this.inContact);
- }, u.prototype.move = function(i, p, a, t) {
- var s = this, n = s.now, P = s.options.animation !== !1 && !s.isHidden && (1 < Math.abs(i - n.x) || 1 < Math.abs(p - n.y)), D = s.followPointer || 1 < s.len;
- T(n, { x: P ? (2 * n.x + i) / 3 : i, y: P ? (n.y + p) / 2 : p, anchorX: D ? void 0 : P ? (2 * n.anchorX + a) / 3 : a, anchorY: D ? void 0 : P ? (n.anchorY + t) / 2 : t }), s.getLabel().attr(n), s.drawTracker(), P && (G.clearTimeout(this.tooltipTimeout), this.tooltipTimeout = setTimeout(function() {
- s && s.move(i, p, a, t);
- }, 32));
- }, u.prototype.refresh = function(i, p) {
- var a = this.chart, t = this.options, s = h(i), n = s[0], P = [], D = t.formatter || this.defaultFormatter, I = this.shared, W = a.styledMode, E = {};
- if (t.enabled) {
- G.clearTimeout(this.hideTimer), this.allowShared = !(!R(i) && i.series && i.series.noSharedTooltip), this.followPointer = !this.split && n.series.tooltipOptions.followPointer, i = this.getAnchor(i, p);
- var X = i[0], g = i[1];
- if (I && this.allowShared ? (a.pointer.applyInactiveState(s), s.forEach(function(z) {
- z.setState("hover"), P.push(z.getLabelConfig());
- }), E = { x: n.category, y: n.y }, E.points = P) : E = n.getLabelConfig(), this.len = P.length, D = D.call(E, this), I = n.series, this.distance = v(I.tooltipOptions.distance, 16), D === !1)
- this.hide();
- else {
- if (this.split && this.allowShared)
- this.renderSplit(
- D,
- s
- );
- else {
- var m = X, L = g;
- if (p && a.pointer.isDirectTouch && (m = p.chartX - a.plotLeft, L = p.chartY - a.plotTop), a.polar || I.options.clip === !1 || s.some(function(z) {
- return z.series.shouldShowTooltip(m, L);
- }))
- p = this.getLabel(), t.style.width && !W || p.css({ width: this.chart.spacingBox.width + "px" }), p.attr({ text: D && D.join ? D.join("") : D }), p.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-" + v(n.colorIndex, I.colorIndex)), W || p.attr({ stroke: t.borderColor || n.color || I.color || "#666666" }), this.updatePosition({
- plotX: X,
- plotY: g,
- negative: n.negative,
- ttBelow: n.ttBelow,
- h: i[2] || 0
- });
- else {
- this.hide();
- return;
- }
- }
- this.isHidden && this.label && this.label.attr({ opacity: 1 }).show(), this.isHidden = !1;
- }
- O(this, "refresh");
- }
- }, u.prototype.renderSplit = function(i, p) {
- function a(ht, at, J, tt, ot) {
- return ot === void 0 && (ot = !0), J ? (at = it ? 0 : ct, ht = w(ht - tt / 2, Y.left, Y.right - tt - (t.outside ? et : 0))) : (at -= nt, ht = ot ? ht - tt - Q : ht + Q, ht = w(ht, ot ? ht : Y.left, Y.right)), { x: ht, y: at };
- }
- var t = this, s = t.chart, n = t.chart, P = n.chartWidth, D = n.chartHeight, I = n.plotHeight, W = n.plotLeft, E = n.plotTop, X = n.pointer, g = n.scrollablePixelsY;
- g = g === void 0 ? 0 : g;
- var m = n.scrollablePixelsX, L = n.scrollingContainer;
- L = L === void 0 ? { scrollLeft: 0, scrollTop: 0 } : L;
- var z = L.scrollLeft;
- L = L.scrollTop;
- var $ = n.styledMode, Q = t.distance, A = t.options, H = t.options.positioner, Y = t.outside && typeof m != "number" ? F.documentElement.getBoundingClientRect() : { left: z, right: z + P, top: L, bottom: L + D }, Z = t.getLabel(), q = this.renderer || s.renderer, it = !(!s.xAxis[0] || !s.xAxis[0].opposite);
- s = X.getChartPosition();
- var et = s.left;
- s = s.top;
- var nt = E + L, rt = 0, ct = I - g;
- b(i) && (i = [!1, i]), i = i.slice(0, p.length + 1).reduce(function(ht, at, J) {
- if (at !== !1 && at !== "") {
- J = p[J - 1] || { isHeader: !0, plotX: p[0].plotX, plotY: I, series: {} };
- var tt = J.isHeader, ot = tt ? t : J.series;
- at = at.toString();
- var lt = ot.tt, pt = J.isHeader, yt = J.series, vt = "highcharts-color-" + v(J.colorIndex, yt.colorIndex, "none");
- if (lt || (lt = { padding: A.padding, r: A.borderRadius }, $ || (lt.fill = A.backgroundColor, lt["stroke-width"] = A.borderWidth), lt = q.label("", 0, 0, A[pt ? "headerShape" : "shape"], void 0, void 0, A.useHTML).addClass((pt ? "highcharts-tooltip-header " : "") + "highcharts-tooltip-box " + vt).attr(lt).add(Z)), lt.isActive = !0, lt.attr({ text: at }), $ || lt.css(A.style).shadow(A.shadow).attr({ stroke: A.borderColor || J.color || yt.color || "#333333" }), ot = ot.tt = lt, pt = ot.getBBox(), at = pt.width + ot.strokeWidth(), tt && (rt = pt.height, ct += rt, it && (nt -= rt)), yt = J.plotX, yt = yt === void 0 ? 0 : yt, vt = J.plotY, vt = vt === void 0 ? 0 : vt, lt = J.series, J.isHeader) {
- yt = W + yt;
- var Ct = E + I / 2;
- } else {
- var Pt = lt.xAxis, At = lt.yAxis;
- yt = Pt.pos + w(yt, -Q, Pt.len + Q), lt.shouldShowTooltip(0, At.pos - E + vt, { ignoreX: !0 }) && (Ct = At.pos + vt);
- }
- yt = w(yt, Y.left - Q, Y.right + Q), typeof Ct == "number" ? (pt = pt.height + 1, vt = H ? H.call(t, at, pt, J) : a(
- yt,
- Ct,
- tt,
- at
- ), ht.push({ align: H ? 0 : void 0, anchorX: yt, anchorY: Ct, boxWidth: at, point: J, rank: v(vt.rank, tt ? 1 : 0), size: pt, target: vt.y, tt: ot, x: vt.x })) : ot.isActive = !1;
- }
- return ht;
- }, []), !H && i.some(function(ht) {
- var at = (t.outside ? et : 0) + ht.anchorX;
- return at < Y.left && at + ht.boxWidth < Y.right ? !0 : at < et - Y.left + ht.boxWidth && Y.right - at > at;
- }) && (i = i.map(function(ht) {
- var at = a(ht.anchorX, ht.anchorY, ht.point.isHeader, ht.boxWidth, !1);
- return T(ht, { target: at.y, x: at.x });
- })), t.cleanSplit(), B(i, ct);
- var gt = et, dt = et;
- i.forEach(function(ht) {
- var at = ht.x, J = ht.boxWidth;
- ht = ht.isHeader, ht || (t.outside && et + at < gt && (gt = et + at), !ht && t.outside && gt + J > dt && (dt = et + at));
- }), i.forEach(function(ht) {
- var at = ht.x, J = ht.anchorX, tt = ht.pos, ot = ht.point.isHeader;
- if (tt = { visibility: typeof tt > "u" ? "hidden" : "inherit", x: at, y: tt + nt, anchorX: J, anchorY: ht.anchorY }, t.outside && at < J) {
- var lt = et - gt;
- 0 < lt && (ot || (tt.x = at + lt, tt.anchorX = J + lt), ot && (tt.x = (dt - gt) / 2, tt.anchorX = J + lt));
- }
- ht.tt.attr(tt);
- }), i = t.container, g = t.renderer, t.outside && i && g && (n = Z.getBBox(), g.setSize(n.width + n.x, n.height + n.y, !1), i.style.left = gt + "px", i.style.top = s + "px");
- }, u.prototype.drawTracker = function() {
- if (this.followPointer || !this.options.stickOnContact)
- this.tracker && this.tracker.destroy();
- else {
- var i = this.chart, p = this.label, a = this.shared ? i.hoverPoints : i.hoverPoint;
- if (p && a) {
- var t = { x: 0, y: 0, width: 0, height: 0 };
- a = this.getAnchor(a);
- var s = p.getBBox();
- a[0] += i.plotLeft - p.translateX, a[1] += i.plotTop - p.translateY, t.x = Math.min(0, a[0]), t.y = Math.min(0, a[1]), t.width = 0 > a[0] ? Math.max(Math.abs(a[0]), s.width - a[0]) : Math.max(Math.abs(a[0]), s.width), t.height = 0 > a[1] ? Math.max(Math.abs(a[1]), s.height - Math.abs(a[1])) : Math.max(Math.abs(a[1]), s.height), this.tracker ? this.tracker.attr(t) : (this.tracker = p.renderer.rect(t).addClass("highcharts-tracker").add(p), i.styledMode || this.tracker.attr({ fill: "rgba(0,0,0,0)" }));
- }
- }
- }, u.prototype.styledModeFormat = function(i) {
- return i.replace('style="font-size: 10px"', 'class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g, 'class="highcharts-color-{$1.colorIndex}"');
- }, u.prototype.tooltipFooterHeaderFormatter = function(i, p) {
- var a = i.series, t = a.tooltipOptions, s = a.xAxis, n = s && s.dateTime;
- s = {
- isFooter: p,
- labelConfig: i
- };
- var P = t.xDateFormat, D = t[p ? "footerFormat" : "headerFormat"];
- return O(this, "headerFormatter", s, function(I) {
- n && !P && k(i.key) && (P = n.getXDateFormat(i.key, t.dateTimeLabelFormats)), n && P && (i.point && i.point.tooltipDateKeys || ["key"]).forEach(function(W) {
- D = D.replace("{point." + W + "}", "{point." + W + ":" + P + "}");
- }), a.chart.styledMode && (D = this.styledModeFormat(D)), I.text = V(D, { point: i, series: a }, this.chart);
- }), s.text;
- }, u.prototype.update = function(i) {
- this.destroy(), S(!0, this.chart.options.tooltip.userOptions, i), this.init(this.chart, S(!0, this.options, i));
- }, u.prototype.updatePosition = function(i) {
- var p = this.chart, a = this.options, t = p.pointer, s = this.getLabel();
- t = t.getChartPosition();
- var n = (a.positioner || this.getPosition).call(this, s.width, s.height, i), P = i.plotX + p.plotLeft;
- i = i.plotY + p.plotTop, this.outside && (a = a.borderWidth + 2 * this.distance, this.renderer.setSize(s.width + a, s.height + a, !1), (t.scaleX !== 1 || t.scaleY !== 1) && (x(this.container, { transform: "scale(" + t.scaleX + ", " + t.scaleY + ")" }), P *= t.scaleX, i *= t.scaleY), P += t.left - n.x, i += t.top - n.y), this.move(Math.round(n.x), Math.round(n.y || 0), P, i);
- }, u;
- }(), y;
- }
- ), C(o, "Core/Series/Point.js", [o["Core/Renderer/HTML/AST.js"], o["Core/Animation/AnimationUtilities.js"], o["Core/DefaultOptions.js"], o["Core/FormatUtilities.js"], o["Core/Utilities.js"]], function(y, N, _, U, G) {
- var V = N.animObject, F = _.defaultOptions, B = U.format, j = G.addEvent, w = G.defined, x = G.erase, f = G.extend, l = G.fireEvent, T = G.getNestedProperty, O = G.isArray, R = G.isFunction, k = G.isNumber, b = G.isObject, S = G.merge, v = G.objectEach, h = G.pick, c = G.syncTimeout, u = G.removeEvent, i = G.uniqueKey;
- return N = function() {
- function p() {
- this.colorIndex = this.category = void 0, this.formatPrefix = "point", this.id = void 0, this.isNull = !1, this.percentage = this.options = this.name = void 0, this.selected = !1, this.total = this.series = void 0, this.visible = !0, this.x = void 0;
- }
- return p.prototype.animateBeforeDestroy = function() {
- var a = this, t = { x: a.startXPos, opacity: 0 }, s = a.getGraphicalProps();
- s.singular.forEach(function(n) {
- a[n] = a[n].animate(n === "dataLabel" ? {
- x: a[n].startXPos,
- y: a[n].startYPos,
- opacity: 0
- } : t);
- }), s.plural.forEach(function(n) {
- a[n].forEach(function(P) {
- P.element && P.animate(f({ x: a.startXPos }, P.startYPos ? { x: P.startXPos, y: P.startYPos } : {}));
- });
- });
- }, p.prototype.applyOptions = function(a, t) {
- var s = this.series, n = s.options.pointValKey || s.pointValKey;
- return a = p.prototype.optionsToObject.call(this, a), f(this, a), this.options = this.options ? f(this.options, a) : a, a.group && delete this.group, a.dataLabels && delete this.dataLabels, n && (this.y = p.prototype.getNestedProperty.call(this, n)), this.formatPrefix = (this.isNull = h(this.isValid && !this.isValid(), this.x === null || !k(this.y))) ? "null" : "point", this.selected && (this.state = "select"), "name" in this && typeof t > "u" && s.xAxis && s.xAxis.hasNames && (this.x = s.xAxis.nameToX(this)), typeof this.x > "u" && s ? this.x = typeof t > "u" ? s.autoIncrement() : t : k(a.x) && s.options.relativeXValue && (this.x = s.autoIncrement(a.x)), this;
- }, p.prototype.destroy = function() {
- function a() {
- (t.graphic || t.dataLabel || t.dataLabels) && (u(t), t.destroyElements());
- for (I in t)
- t[I] = null;
- }
- var t = this, s = t.series, n = s.chart;
- s = s.options.dataSorting;
- var P = n.hoverPoints, D = V(t.series.chart.renderer.globalAnimation), I;
- t.legendItem && n.legend.destroyItem(t), P && (t.setState(), x(P, t), P.length || (n.hoverPoints = null)), t === n.hoverPoint && t.onMouseOut(), s && s.enabled ? (this.animateBeforeDestroy(), c(a, D.duration)) : a(), n.pointCount--;
- }, p.prototype.destroyElements = function(a) {
- var t = this;
- a = t.getGraphicalProps(a), a.singular.forEach(function(s) {
- t[s] = t[s].destroy();
- }), a.plural.forEach(function(s) {
- t[s].forEach(function(n) {
- n.element && n.destroy();
- }), delete t[s];
- });
- }, p.prototype.firePointEvent = function(a, t, s) {
- var n = this, P = this.series.options;
- (P.point.events[a] || n.options && n.options.events && n.options.events[a]) && n.importEvents(), a === "click" && P.allowPointSelect && (s = function(D) {
- n.select && n.select(null, D.ctrlKey || D.metaKey || D.shiftKey);
- }), l(n, a, t, s);
- }, p.prototype.getClassName = function() {
- return "highcharts-point" + (this.selected ? " highcharts-point-select" : "") + (this.negative ? " highcharts-negative" : "") + (this.isNull ? " highcharts-null-point" : "") + (typeof this.colorIndex < "u" ? " highcharts-color-" + this.colorIndex : "") + (this.options.className ? " " + this.options.className : "") + (this.zone && this.zone.className ? " " + this.zone.className.replace("highcharts-negative", "") : "");
- }, p.prototype.getGraphicalProps = function(a) {
- var t = this, s = [], n = { singular: [], plural: [] }, P;
- for (a = a || { graphic: 1, dataLabel: 1 }, a.graphic && s.push("graphic", "upperGraphic", "shadowGroup"), a.dataLabel && s.push("dataLabel", "dataLabelUpper", "connector"), P = s.length; P--; ) {
- var D = s[P];
- t[D] && n.singular.push(D);
- }
- return ["dataLabel", "connector"].forEach(function(I) {
- var W = I + "s";
- a[I] && t[W] && n.plural.push(W);
- }), n;
- }, p.prototype.getLabelConfig = function() {
- return { x: this.category, y: this.y, color: this.color, colorIndex: this.colorIndex, key: this.name || this.category, series: this.series, point: this, percentage: this.percentage, total: this.total || this.stackTotal };
- }, p.prototype.getNestedProperty = function(a) {
- if (a)
- return a.indexOf("custom.") === 0 ? T(a, this.options) : this[a];
- }, p.prototype.getZone = function() {
- var a = this.series, t = a.zones;
- a = a.zoneAxis || "y";
- var s, n = 0;
- for (s = t[n]; this[a] >= s.value; )
- s = t[++n];
- return this.nonZonedColor || (this.nonZonedColor = this.color), this.color = s && s.color && !this.options.color ? s.color : this.nonZonedColor, s;
- }, p.prototype.hasNewShapeType = function() {
- return (this.graphic && (this.graphic.symbolName || this.graphic.element.nodeName)) !== this.shapeType;
- }, p.prototype.init = function(a, t, s) {
- return this.series = a, this.applyOptions(t, s), this.id = w(this.id) ? this.id : i(), this.resolveColor(), a.chart.pointCount++, l(this, "afterInit"), this;
- }, p.prototype.optionsToObject = function(a) {
- var t = this.series, s = t.options.keys, n = s || t.pointArrayMap || ["y"], P = n.length, D = {}, I = 0, W = 0;
- if (k(a) || a === null)
- D[n[0]] = a;
- else if (O(a))
- for (!s && a.length > P && (t = typeof a[0], t === "string" ? D.name = a[0] : t === "number" && (D.x = a[0]), I++); W < P; )
- s && typeof a[I] > "u" || (0 < n[W].indexOf(".") ? p.prototype.setNestedProperty(D, a[I], n[W]) : D[n[W]] = a[I]), I++, W++;
- else
- typeof a == "object" && (D = a, a.dataLabels && (t._hasPointLabels = !0), a.marker && (t._hasPointMarkers = !0));
- return D;
- }, p.prototype.resolveColor = function() {
- var a = this.series, t = a.chart.styledMode, s = a.chart.options.chart.colorCount;
- if (delete this.nonZonedColor, a.options.colorByPoint) {
- if (!t) {
- s = a.options.colors || a.chart.options.colors;
- var n = s[a.colorCounter];
- s = s.length;
- }
- t = a.colorCounter, a.colorCounter++, a.colorCounter === s && (a.colorCounter = 0);
- } else
- t || (n = a.color), t = a.colorIndex;
- this.colorIndex = h(this.options.colorIndex, t), this.color = h(this.options.color, n);
- }, p.prototype.setNestedProperty = function(a, t, s) {
- return s.split(".").reduce(function(n, P, D, I) {
- return n[P] = I.length - 1 === D ? t : b(n[P], !0) ? n[P] : {}, n[P];
- }, a), a;
- }, p.prototype.tooltipFormatter = function(a) {
- var t = this.series, s = t.tooltipOptions, n = h(s.valueDecimals, ""), P = s.valuePrefix || "", D = s.valueSuffix || "";
- return t.chart.styledMode && (a = t.chart.tooltip.styledModeFormat(a)), (t.pointArrayMap || ["y"]).forEach(function(I) {
- I = "{point." + I, (P || D) && (a = a.replace(RegExp(I + "}", "g"), P + I + "}" + D)), a = a.replace(RegExp(I + "}", "g"), I + ":,." + n + "f}");
- }), B(a, { point: this, series: this.series }, t.chart);
- }, p.prototype.update = function(a, t, s, n) {
- function P() {
- D.applyOptions(a);
- var m = W && D.hasDummyGraphic;
- m = D.y === null ? !m : m, W && m && (D.graphic = W.destroy(), delete D.hasDummyGraphic), b(a, !0) && (W && W.element && a && a.marker && typeof a.marker.symbol < "u" && (D.graphic = W.destroy()), a && a.dataLabels && D.dataLabel && (D.dataLabel = D.dataLabel.destroy()), D.connector && (D.connector = D.connector.destroy())), g = D.index, I.updateParallelArrays(D, g), X.data[g] = b(X.data[g], !0) || b(a, !0) ? D.options : h(a, X.data[g]), I.isDirty = I.isDirtyData = !0, !I.fixedBox && I.hasCartesianSeries && (E.isDirtyBox = !0), X.legendType === "point" && (E.isDirtyLegend = !0), t && E.redraw(s);
- }
- var D = this, I = D.series, W = D.graphic, E = I.chart, X = I.options, g;
- t = h(t, !0), n === !1 ? P() : D.firePointEvent("update", { options: a }, P);
- }, p.prototype.remove = function(a, t) {
- this.series.removePoint(this.series.data.indexOf(this), a, t);
- }, p.prototype.select = function(a, t) {
- var s = this, n = s.series, P = n.chart;
- this.selectedStaging = a = h(a, !s.selected), s.firePointEvent(a ? "select" : "unselect", { accumulate: t }, function() {
- s.selected = s.options.selected = a, n.options.data[n.data.indexOf(s)] = s.options, s.setState(a && "select"), t || P.getSelectedPoints().forEach(function(D) {
- var I = D.series;
- D.selected && D !== s && (D.selected = D.options.selected = !1, I.options.data[I.data.indexOf(D)] = D.options, D.setState(P.hoverPoints && I.options.inactiveOtherPoints ? "inactive" : ""), D.firePointEvent("unselect"));
- });
- }), delete this.selectedStaging;
- }, p.prototype.onMouseOver = function(a) {
- var t = this.series.chart, s = t.pointer;
- a = a ? s.normalize(a) : s.getChartCoordinatesFromPoint(this, t.inverted), s.runPointActions(
- a,
- this
- );
- }, p.prototype.onMouseOut = function() {
- var a = this.series.chart;
- this.firePointEvent("mouseOut"), this.series.options.inactiveOtherPoints || (a.hoverPoints || []).forEach(function(t) {
- t.setState();
- }), a.hoverPoints = a.hoverPoint = null;
- }, p.prototype.importEvents = function() {
- if (!this.hasImportedEvents) {
- var a = this, t = S(a.series.options.point, a.options).events;
- a.events = t, v(t, function(s, n) {
- R(s) && j(a, n, s);
- }), this.hasImportedEvents = !0;
- }
- }, p.prototype.setState = function(a, t) {
- var s = this.series, n = this.state, P = s.options.states[a || "normal"] || {}, D = F.plotOptions[s.type].marker && s.options.marker, I = D && D.enabled === !1, W = D && D.states && D.states[a || "normal"] || {}, E = W.enabled === !1, X = this.marker || {}, g = s.chart, m = D && s.markerAttribs, L = s.halo, z, $ = s.stateMarkerGraphic;
- if (a = a || "", !(a === this.state && !t || this.selected && a !== "select" || P.enabled === !1 || a && (E || I && W.enabled === !1) || a && X.states && X.states[a] && X.states[a].enabled === !1)) {
- if (this.state = a, m && (z = s.markerAttribs(this, a)), this.graphic && !this.hasDummyGraphic) {
- if (n && this.graphic.removeClass("highcharts-point-" + n), a && this.graphic.addClass("highcharts-point-" + a), !g.styledMode) {
- var Q = s.pointAttribs(this, a), A = h(g.options.chart.animation, P.animation);
- s.options.inactiveOtherPoints && k(Q.opacity) && ((this.dataLabels || []).forEach(function(H) {
- H && H.animate({ opacity: Q.opacity }, A);
- }), this.connector && this.connector.animate({ opacity: Q.opacity }, A)), this.graphic.animate(Q, A);
- }
- z && this.graphic.animate(z, h(g.options.chart.animation, W.animation, D.animation)), $ && $.hide();
- } else
- a && W && (n = X.symbol || s.symbol, $ && $.currentSymbol !== n && ($ = $.destroy()), z && ($ ? $[t ? "animate" : "attr"]({ x: z.x, y: z.y }) : n && (s.stateMarkerGraphic = $ = g.renderer.symbol(n, z.x, z.y, z.width, z.height).add(s.markerGroup), $.currentSymbol = n)), !g.styledMode && $ && this.state !== "inactive" && $.attr(s.pointAttribs(this, a))), $ && ($[a && this.isInside ? "show" : "hide"](), $.element.point = this, $.addClass(this.getClassName(), !0));
- P = P.halo, z = ($ = this.graphic || $) && $.visibility || "inherit", P && P.size && $ && z !== "hidden" && !this.isCluster ? (L || (s.halo = L = g.renderer.path().add($.parentGroup)), L.show()[t ? "animate" : "attr"]({ d: this.haloPath(P.size) }), L.attr({ class: "highcharts-halo highcharts-color-" + h(this.colorIndex, s.colorIndex) + (this.className ? " " + this.className : ""), visibility: z, zIndex: -1 }), L.point = this, g.styledMode || L.attr(f({ fill: this.color || s.color, "fill-opacity": P.opacity }, y.filterUserAttributes(P.attributes || {})))) : L && L.point && L.point.haloPath && L.animate({ d: L.point.haloPath(0) }, null, L.hide), l(this, "afterSetState", { state: a });
- }
- }, p.prototype.haloPath = function(a) {
- return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX) - a, this.plotY - a, 2 * a, 2 * a);
- }, p;
- }(), N;
- }), C(o, "Core/Pointer.js", [o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Tooltip.js"], o["Core/Utilities.js"]], function(y, N, _, U) {
- var G = y.parse, V = N.charts, F = N.noop, B = U.addEvent, j = U.attr, w = U.css, x = U.defined, f = U.extend, l = U.find, T = U.fireEvent, O = U.isNumber, R = U.isObject, k = U.objectEach, b = U.offset, S = U.pick, v = U.splat;
- return y = function() {
- function h(c, u) {
- this.lastValidTouch = {}, this.pinchDown = [], this.runChartClick = !1, this.eventsToUnbind = [], this.chart = c, this.hasDragged = !1, this.options = u, this.init(c, u);
- }
- return h.prototype.applyInactiveState = function(c) {
- var u = [], i;
- (c || []).forEach(function(p) {
- i = p.series, u.push(i), i.linkedParent && u.push(i.linkedParent), i.linkedSeries && (u = u.concat(i.linkedSeries)), i.navigatorSeries && u.push(i.navigatorSeries);
- }), this.chart.series.forEach(function(p) {
- u.indexOf(p) === -1 ? p.setState("inactive", !0) : p.options.inactiveOtherPoints && p.setAllPointsToState("inactive");
- });
- }, h.prototype.destroy = function() {
- var c = this;
- this.eventsToUnbind.forEach(function(u) {
- return u();
- }), this.eventsToUnbind = [], N.chartCount || (h.unbindDocumentMouseUp && (h.unbindDocumentMouseUp = h.unbindDocumentMouseUp()), h.unbindDocumentTouchEnd && (h.unbindDocumentTouchEnd = h.unbindDocumentTouchEnd())), clearInterval(c.tooltipTimeout), k(c, function(u, i) {
- c[i] = void 0;
- });
- }, h.prototype.drag = function(c) {
- var u = this.chart, i = u.options.chart, p = this.zoomHor, a = this.zoomVert, t = u.plotLeft, s = u.plotTop, n = u.plotWidth, P = u.plotHeight, D = this.mouseDownX || 0, I = this.mouseDownY || 0, W = R(i.panning) ? i.panning && i.panning.enabled : i.panning, E = i.panKey && c[i.panKey + "Key"], X = c.chartX, g = c.chartY, m = this.selectionMarker;
- if ((!m || !m.touch) && (X < t ? X = t : X > t + n && (X = t + n), g < s ? g = s : g > s + P && (g = s + P), this.hasDragged = Math.sqrt(Math.pow(D - X, 2) + Math.pow(I - g, 2)), 10 < this.hasDragged)) {
- var L = u.isInsidePlot(D - t, I - s, { visiblePlotOnly: !0 });
- !u.hasCartesianSeries && !u.mapView || !this.zoomX && !this.zoomY || !L || E || m || (this.selectionMarker = m = u.renderer.rect(t, s, p ? 1 : n, a ? 1 : P, 0).attr({ class: "highcharts-selection-marker", zIndex: 7 }).add(), u.styledMode || m.attr({ fill: i.selectionMarkerFill || G("#335cad").setOpacity(0.25).get() })), m && p && (p = X - D, m.attr({ width: Math.abs(p), x: (0 < p ? 0 : p) + D })), m && a && (p = g - I, m.attr({ height: Math.abs(p), y: (0 < p ? 0 : p) + I })), L && !m && W && u.pan(c, i.panning);
- }
- }, h.prototype.dragStart = function(c) {
- var u = this.chart;
- u.mouseIsDown = c.type, u.cancelClick = !1, u.mouseDownX = this.mouseDownX = c.chartX, u.mouseDownY = this.mouseDownY = c.chartY;
- }, h.prototype.drop = function(c) {
- var u = this, i = this.chart, p = this.hasPinched;
- if (this.selectionMarker) {
- var a = this.selectionMarker, t = a.attr ? a.attr("x") : a.x, s = a.attr ? a.attr("y") : a.y, n = a.attr ? a.attr("width") : a.width, P = a.attr ? a.attr("height") : a.height, D = { originalEvent: c, xAxis: [], yAxis: [], x: t, y: s, width: n, height: P }, I = !!i.mapView;
- (this.hasDragged || p) && (i.axes.forEach(function(W) {
- if (W.zoomEnabled && x(W.min) && (p || u[{ xAxis: "zoomX", yAxis: "zoomY" }[W.coll]]) && O(t) && O(s)) {
- var E = W.horiz, X = c.type === "touchend" ? W.minPixelPadding : 0, g = W.toValue((E ? t : s) + X);
- E = W.toValue((E ? t + n : s + P) - X), D[W.coll].push({ axis: W, min: Math.min(g, E), max: Math.max(g, E) }), I = !0;
- }
- }), I && T(i, "selection", D, function(W) {
- i.zoom(f(
- W,
- p ? { animation: !1 } : null
- ));
- })), O(i.index) && (this.selectionMarker = this.selectionMarker.destroy()), p && this.scaleGroups();
- }
- i && O(i.index) && (w(i.container, { cursor: i._cursor }), i.cancelClick = 10 < this.hasDragged, i.mouseIsDown = this.hasDragged = this.hasPinched = !1, this.pinchDown = []);
- }, h.prototype.findNearestKDPoint = function(c, u, i) {
- var p = this.chart, a = p.hoverPoint;
- if (p = p.tooltip, a && p && p.isStickyOnContact())
- return a;
- var t;
- return c.forEach(function(s) {
- var n = !(s.noSharedTooltip && u) && 0 > s.options.findNearestPointBy.indexOf("y");
- if (s = s.searchPoint(i, n), (n = R(s, !0) && s.series) && !(n = !R(t, !0))) {
- n = t.distX - s.distX;
- var P = t.dist - s.dist, D = (s.series.group && s.series.group.zIndex) - (t.series.group && t.series.group.zIndex);
- n = 0 < (n !== 0 && u ? n : P !== 0 ? P : D !== 0 ? D : t.series.index > s.series.index ? -1 : 1);
- }
- n && (t = s);
- }), t;
- }, h.prototype.getChartCoordinatesFromPoint = function(c, u) {
- var i = c.series, p = i.xAxis;
- i = i.yAxis;
- var a = c.shapeArgs;
- if (p && i) {
- var t = S(c.clientX, c.plotX), s = c.plotY || 0;
- return c.isNode && a && O(a.x) && O(a.y) && (t = a.x, s = a.y), u ? { chartX: i.len + i.pos - s, chartY: p.len + p.pos - t } : { chartX: t + p.pos, chartY: s + i.pos };
- }
- if (a && a.x && a.y)
- return { chartX: a.x, chartY: a.y };
- }, h.prototype.getChartPosition = function() {
- if (this.chartPosition)
- return this.chartPosition;
- var c = this.chart.container, u = b(c);
- this.chartPosition = { left: u.left, top: u.top, scaleX: 1, scaleY: 1 };
- var i = c.offsetWidth;
- return c = c.offsetHeight, 2 < i && 2 < c && (this.chartPosition.scaleX = u.width / i, this.chartPosition.scaleY = u.height / c), this.chartPosition;
- }, h.prototype.getCoordinates = function(c) {
- var u = { xAxis: [], yAxis: [] };
- return this.chart.axes.forEach(function(i) {
- u[i.isXAxis ? "xAxis" : "yAxis"].push({ axis: i, value: i.toValue(c[i.horiz ? "chartX" : "chartY"]) });
- }), u;
- }, h.prototype.getHoverData = function(c, u, i, p, a, t) {
- var s = [];
- p = !(!p || !c);
- var n = { chartX: t ? t.chartX : void 0, chartY: t ? t.chartY : void 0, shared: a };
- T(this, "beforeGetHoverData", n);
- var P = u && !u.stickyTracking ? [u] : i.filter(function(I) {
- return n.filter ? n.filter(I) : I.visible && !(!a && I.directTouch) && S(I.options.enableMouseTracking, !0) && I.stickyTracking;
- }), D = p || !t ? c : this.findNearestKDPoint(P, a, t);
- return u = D && D.series, D && (a && !u.noSharedTooltip ? (P = i.filter(function(I) {
- return n.filter ? n.filter(I) : I.visible && !(!a && I.directTouch) && S(I.options.enableMouseTracking, !0) && !I.noSharedTooltip;
- }), P.forEach(function(I) {
- var W = l(I.points, function(E) {
- return E.x === D.x && !E.isNull;
- });
- R(W) && (I.chart.isBoosting && (W = I.getPoint(W)), s.push(W));
- })) : s.push(D)), n = { hoverPoint: D }, T(this, "afterGetHoverData", n), { hoverPoint: n.hoverPoint, hoverSeries: u, hoverPoints: s };
- }, h.prototype.getPointFromEvent = function(c) {
- c = c.target;
- for (var u; c && !u; )
- u = c.point, c = c.parentNode;
- return u;
- }, h.prototype.onTrackerMouseOut = function(c) {
- c = c.relatedTarget || c.toElement;
- var u = this.chart.hoverSeries;
- this.isDirectTouch = !1, !u || !c || u.stickyTracking || this.inClass(c, "highcharts-tooltip") || this.inClass(c, "highcharts-series-" + u.index) && this.inClass(c, "highcharts-tracker") || u.onMouseOut();
- }, h.prototype.inClass = function(c, u) {
- for (var i; c; ) {
- if (i = j(c, "class")) {
- if (i.indexOf(u) !== -1)
- return !0;
- if (i.indexOf("highcharts-container") !== -1)
- return !1;
- }
- c = c.parentNode;
- }
- }, h.prototype.init = function(c, u) {
- this.options = u, this.chart = c, this.runChartClick = !(!u.chart.events || !u.chart.events.click), this.pinchDown = [], this.lastValidTouch = {}, _ && (c.tooltip = new _(c, u.tooltip), this.followTouchMove = S(u.tooltip.followTouchMove, !0)), this.setDOMEvents();
- }, h.prototype.normalize = function(c, u) {
- var i = c.touches, p = i ? i.length ? i.item(0) : S(i.changedTouches, c.changedTouches)[0] : c;
- return u || (u = this.getChartPosition()), i = p.pageX - u.left, p = p.pageY - u.top, i /= u.scaleX, p /= u.scaleY, f(c, { chartX: Math.round(i), chartY: Math.round(p) });
- }, h.prototype.onContainerClick = function(c) {
- var u = this.chart, i = u.hoverPoint;
- c = this.normalize(c);
- var p = u.plotLeft, a = u.plotTop;
- u.cancelClick || (i && this.inClass(c.target, "highcharts-tracker") ? (T(i.series, "click", f(c, { point: i })), u.hoverPoint && i.firePointEvent("click", c)) : (f(c, this.getCoordinates(c)), u.isInsidePlot(c.chartX - p, c.chartY - a, { visiblePlotOnly: !0 }) && T(u, "click", c)));
- }, h.prototype.onContainerMouseDown = function(c) {
- var u = ((c.buttons || c.button) & 1) === 1;
- c = this.normalize(c), N.isFirefox && c.button !== 0 && this.onContainerMouseMove(c), (typeof c.button > "u" || u) && (this.zoomOption(c), u && c.preventDefault && c.preventDefault(), this.dragStart(c));
- }, h.prototype.onContainerMouseLeave = function(c) {
- var u = V[S(h.hoverChartIndex, -1)], i = this.chart.tooltip;
- i && i.shouldStickOnContact() && this.inClass(c.relatedTarget, "highcharts-tooltip-container") || (c = this.normalize(c), u && (c.relatedTarget || c.toElement) && (u.pointer.reset(), u.pointer.chartPosition = void 0), i && !i.isHidden && this.reset());
- }, h.prototype.onContainerMouseEnter = function(c) {
- delete this.chartPosition;
- }, h.prototype.onContainerMouseMove = function(c) {
- var u = this.chart;
- c = this.normalize(c), this.setHoverChartIndex(), c.preventDefault || (c.returnValue = !1), (u.mouseIsDown === "mousedown" || this.touchSelect(c)) && this.drag(c), u.openMenu || !this.inClass(c.target, "highcharts-tracker") && !u.isInsidePlot(c.chartX - u.plotLeft, c.chartY - u.plotTop, { visiblePlotOnly: !0 }) || (this.inClass(c.target, "highcharts-no-tooltip") ? this.reset(!1, 0) : this.runPointActions(c));
- }, h.prototype.onDocumentTouchEnd = function(c) {
- var u = V[S(
- h.hoverChartIndex,
- -1
- )];
- u && u.pointer.drop(c);
- }, h.prototype.onContainerTouchMove = function(c) {
- this.touchSelect(c) ? this.onContainerMouseMove(c) : this.touch(c);
- }, h.prototype.onContainerTouchStart = function(c) {
- this.touchSelect(c) ? this.onContainerMouseDown(c) : (this.zoomOption(c), this.touch(c, !0));
- }, h.prototype.onDocumentMouseMove = function(c) {
- var u = this.chart, i = this.chartPosition;
- c = this.normalize(c, i);
- var p = u.tooltip;
- !i || p && p.isStickyOnContact() || u.isInsidePlot(c.chartX - u.plotLeft, c.chartY - u.plotTop, { visiblePlotOnly: !0 }) || this.inClass(c.target, "highcharts-tracker") || this.reset();
- }, h.prototype.onDocumentMouseUp = function(c) {
- var u = V[S(h.hoverChartIndex, -1)];
- u && u.pointer.drop(c);
- }, h.prototype.pinch = function(c) {
- var u = this, i = u.chart, p = u.pinchDown, a = c.touches || [], t = a.length, s = u.lastValidTouch, n = u.hasZoom, P = {}, D = t === 1 && (u.inClass(c.target, "highcharts-tracker") && i.runTrackerClick || u.runChartClick), I = {}, W = u.selectionMarker;
- 1 < t ? u.initiated = !0 : t === 1 && this.followTouchMove && (u.initiated = !1), n && u.initiated && !D && c.cancelable !== !1 && c.preventDefault(), [].map.call(a, function(E) {
- return u.normalize(E);
- }), c.type === "touchstart" ? ([].forEach.call(a, function(E, X) {
- p[X] = { chartX: E.chartX, chartY: E.chartY };
- }), s.x = [p[0].chartX, p[1] && p[1].chartX], s.y = [p[0].chartY, p[1] && p[1].chartY], i.axes.forEach(function(E) {
- if (E.zoomEnabled) {
- var X = i.bounds[E.horiz ? "h" : "v"], g = E.minPixelPadding, m = E.toPixels(Math.min(S(E.options.min, E.dataMin), E.dataMin)), L = E.toPixels(Math.max(S(E.options.max, E.dataMax), E.dataMax)), z = Math.max(m, L);
- X.min = Math.min(E.pos, Math.min(
- m,
- L
- ) - g), X.max = Math.max(E.pos + E.len, z + g);
- }
- }), u.res = !0) : u.followTouchMove && t === 1 ? this.runPointActions(u.normalize(c)) : p.length && (T(i, "touchpan", { originalEvent: c }, function() {
- W || (u.selectionMarker = W = f({ destroy: F, touch: !0 }, i.plotBox)), u.pinchTranslate(p, a, P, W, I, s), u.hasPinched = n, u.scaleGroups(P, I);
- }), u.res && (u.res = !1, this.reset(!1, 0)));
- }, h.prototype.pinchTranslate = function(c, u, i, p, a, t) {
- this.zoomHor && this.pinchTranslateDirection(!0, c, u, i, p, a, t), this.zoomVert && this.pinchTranslateDirection(!1, c, u, i, p, a, t);
- }, h.prototype.pinchTranslateDirection = function(c, u, i, p, a, t, s, n) {
- var P = this.chart, D = c ? "x" : "y", I = c ? "X" : "Y", W = "chart" + I, E = c ? "width" : "height", X = P["plot" + (c ? "Left" : "Top")], g = P.inverted, m = P.bounds[c ? "h" : "v"], L = u.length === 1, z = u[0][W], $ = !L && u[1][W];
- u = function() {
- typeof Z == "number" && 20 < Math.abs(z - $) && (H = n || Math.abs(Y - Z) / Math.abs(z - $)), A = (X - Y) / H + z, Q = P["plot" + (c ? "Width" : "Height")] / H;
- };
- var Q, A, H = n || 1, Y = i[0][W], Z = !L && i[1][W];
- if (u(), i = A, i < m.min) {
- i = m.min;
- var q = !0;
- } else
- i + Q > m.max && (i = m.max - Q, q = !0);
- q ? (Y -= 0.8 * (Y - s[D][0]), typeof Z == "number" && (Z -= 0.8 * (Z - s[D][1])), u()) : s[D] = [Y, Z], g || (t[D] = A - X, t[E] = Q), t = g ? 1 / H : H, a[E] = Q, a[D] = i, p[g ? c ? "scaleY" : "scaleX" : "scale" + I] = H, p["translate" + I] = t * X + (Y - t * z);
- }, h.prototype.reset = function(c, u) {
- var i = this.chart, p = i.hoverSeries, a = i.hoverPoint, t = i.hoverPoints, s = i.tooltip, n = s && s.shared ? t : a;
- c && n && v(n).forEach(function(P) {
- P.series.isCartesian && typeof P.plotX > "u" && (c = !1);
- }), c ? s && n && v(n).length && (s.refresh(n), s.shared && t ? t.forEach(function(P) {
- P.setState(P.state, !0), P.series.isCartesian && (P.series.xAxis.crosshair && P.series.xAxis.drawCrosshair(
- null,
- P
- ), P.series.yAxis.crosshair && P.series.yAxis.drawCrosshair(null, P));
- }) : a && (a.setState(a.state, !0), i.axes.forEach(function(P) {
- P.crosshair && a.series[P.coll] === P && P.drawCrosshair(null, a);
- }))) : (a && a.onMouseOut(), t && t.forEach(function(P) {
- P.setState();
- }), p && p.onMouseOut(), s && s.hide(u), this.unDocMouseMove && (this.unDocMouseMove = this.unDocMouseMove()), i.axes.forEach(function(P) {
- P.hideCrosshair();
- }), this.hoverX = i.hoverPoints = i.hoverPoint = null);
- }, h.prototype.runPointActions = function(c, u) {
- var i = this.chart, p = i.tooltip && i.tooltip.options.enabled ? i.tooltip : void 0, a = p ? p.shared : !1, t = u || i.hoverPoint, s = t && t.series || i.hoverSeries;
- u = this.getHoverData(t, s, i.series, (!c || c.type !== "touchmove") && (!!u || s && s.directTouch && this.isDirectTouch), a, c), t = u.hoverPoint, s = u.hoverSeries;
- var n = u.hoverPoints;
- if (u = s && s.tooltipOptions.followPointer && !s.tooltipOptions.split, a = a && s && !s.noSharedTooltip, t && (t !== i.hoverPoint || p && p.isHidden)) {
- if ((i.hoverPoints || []).forEach(function(P) {
- n.indexOf(P) === -1 && P.setState();
- }), i.hoverSeries !== s && s.onMouseOver(), this.applyInactiveState(n), (n || []).forEach(function(P) {
- P.setState("hover");
- }), i.hoverPoint && i.hoverPoint.firePointEvent("mouseOut"), !t.series)
- return;
- i.hoverPoints = n, i.hoverPoint = t, t.firePointEvent("mouseOver"), p && p.refresh(a ? n : t, c);
- } else
- u && p && !p.isHidden && (t = p.getAnchor([{}], c), i.isInsidePlot(t[0], t[1], { visiblePlotOnly: !0 }) && p.updatePosition({ plotX: t[0], plotY: t[1] }));
- this.unDocMouseMove || (this.unDocMouseMove = B(i.container.ownerDocument, "mousemove", function(P) {
- var D = V[h.hoverChartIndex];
- D && D.pointer.onDocumentMouseMove(P);
- }), this.eventsToUnbind.push(this.unDocMouseMove)), i.axes.forEach(function(P) {
- var D = S((P.crosshair || {}).snap, !0), I;
- D && ((I = i.hoverPoint) && I.series[P.coll] === P || (I = l(n, function(W) {
- return W.series[P.coll] === P;
- }))), I || !D ? P.drawCrosshair(c, I) : P.hideCrosshair();
- });
- }, h.prototype.scaleGroups = function(c, u) {
- var i = this.chart;
- i.series.forEach(function(p) {
- var a = c || p.getPlotBox();
- p.group && (p.xAxis && p.xAxis.zoomEnabled || i.mapView) && (p.group.attr(a), p.markerGroup && (p.markerGroup.attr(a), p.markerGroup.clip(u ? i.clipRect : null)), p.dataLabelsGroup && p.dataLabelsGroup.attr(a));
- }), i.clipRect.attr(u || i.clipBox);
- }, h.prototype.setDOMEvents = function() {
- var c = this, u = this.chart.container, i = u.ownerDocument;
- u.onmousedown = this.onContainerMouseDown.bind(this), u.onmousemove = this.onContainerMouseMove.bind(this), u.onclick = this.onContainerClick.bind(this), this.eventsToUnbind.push(B(u, "mouseenter", this.onContainerMouseEnter.bind(this))), this.eventsToUnbind.push(B(u, "mouseleave", this.onContainerMouseLeave.bind(this))), h.unbindDocumentMouseUp || (h.unbindDocumentMouseUp = B(i, "mouseup", this.onDocumentMouseUp.bind(this)));
- for (var p = this.chart.renderTo.parentElement; p && p.tagName !== "BODY"; )
- this.eventsToUnbind.push(B(p, "scroll", function() {
- delete c.chartPosition;
- })), p = p.parentElement;
- N.hasTouch && (this.eventsToUnbind.push(B(u, "touchstart", this.onContainerTouchStart.bind(this), { passive: !1 })), this.eventsToUnbind.push(B(u, "touchmove", this.onContainerTouchMove.bind(this), { passive: !1 })), h.unbindDocumentTouchEnd || (h.unbindDocumentTouchEnd = B(i, "touchend", this.onDocumentTouchEnd.bind(this), { passive: !1 })));
- }, h.prototype.setHoverChartIndex = function() {
- var c = this.chart, u = N.charts[S(h.hoverChartIndex, -1)];
- u && u !== c && u.pointer.onContainerMouseLeave({ relatedTarget: !0 }), u && u.mouseIsDown || (h.hoverChartIndex = c.index);
- }, h.prototype.touch = function(c, u) {
- var i = this.chart;
- if (this.setHoverChartIndex(), c.touches.length === 1)
- if (c = this.normalize(c), i.isInsidePlot(c.chartX - i.plotLeft, c.chartY - i.plotTop, { visiblePlotOnly: !0 }) && !i.openMenu) {
- if (u && this.runPointActions(c), c.type === "touchmove") {
- u = this.pinchDown;
- var p = u[0] ? 4 <= Math.sqrt(Math.pow(u[0].chartX - c.chartX, 2) + Math.pow(u[0].chartY - c.chartY, 2)) : !1;
- }
- S(p, !0) && this.pinch(c);
- } else
- u && this.reset();
- else
- c.touches.length === 2 && this.pinch(c);
- }, h.prototype.touchSelect = function(c) {
- return !(!this.chart.options.chart.zoomBySingleTouch || !c.touches || c.touches.length !== 1);
- }, h.prototype.zoomOption = function(c) {
- var u = this.chart, i = u.options.chart;
- u = u.inverted;
- var p = i.zoomType || "";
- /touch/.test(c.type) && (p = S(i.pinchType, p)), this.zoomX = c = /x/.test(p), this.zoomY = i = /y/.test(p), this.zoomHor = c && !u || i && u, this.zoomVert = i && !u || c && u, this.hasZoom = c || i;
- }, h;
- }(), y;
- }), C(o, "Core/MSPointer.js", [o["Core/Globals.js"], o["Core/Pointer.js"], o["Core/Utilities.js"]], function(y, N, _) {
- function U() {
- var k = [];
- return k.item = function(b) {
- return this[b];
- }, l(O, function(b) {
- k.push({ pageX: b.pageX, pageY: b.pageY, target: b.target });
- }), k;
- }
- function G(k, b, S, v) {
- var h = F[N.hoverChartIndex || NaN];
- k.pointerType !== "touch" && k.pointerType !== k.MSPOINTER_TYPE_TOUCH || !h || (h = h.pointer, v(k), h[b]({ type: S, target: k.currentTarget, preventDefault: j, touches: U() }));
- }
- var V = this && this.__extends || function() {
- var k = function(b, S) {
- return k = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, h) {
- v.__proto__ = h;
- } || function(v, h) {
- for (var c in h)
- h.hasOwnProperty(c) && (v[c] = h[c]);
- }, k(b, S);
- };
- return function(b, S) {
- function v() {
- this.constructor = b;
- }
- k(b, S), b.prototype = S === null ? Object.create(S) : (v.prototype = S.prototype, new v());
- };
- }(), F = y.charts, B = y.doc, j = y.noop, w = y.win, x = _.addEvent, f = _.css, l = _.objectEach, T = _.removeEvent, O = {}, R = !!w.PointerEvent;
- return function(k) {
- function b() {
- return k !== null && k.apply(this, arguments) || this;
- }
- return V(b, k), b.isRequired = function() {
- return !(y.hasTouch || !w.PointerEvent && !w.MSPointerEvent);
- }, b.prototype.batchMSEvents = function(S) {
- S(this.chart.container, R ? "pointerdown" : "MSPointerDown", this.onContainerPointerDown), S(this.chart.container, R ? "pointermove" : "MSPointerMove", this.onContainerPointerMove), S(B, R ? "pointerup" : "MSPointerUp", this.onDocumentPointerUp);
- }, b.prototype.destroy = function() {
- this.batchMSEvents(T), k.prototype.destroy.call(this);
- }, b.prototype.init = function(S, v) {
- k.prototype.init.call(this, S, v), this.hasZoom && f(S.container, { "-ms-touch-action": "none", "touch-action": "none" });
- }, b.prototype.onContainerPointerDown = function(S) {
- G(S, "onContainerTouchStart", "touchstart", function(v) {
- O[v.pointerId] = { pageX: v.pageX, pageY: v.pageY, target: v.currentTarget };
- });
- }, b.prototype.onContainerPointerMove = function(S) {
- G(S, "onContainerTouchMove", "touchmove", function(v) {
- O[v.pointerId] = {
- pageX: v.pageX,
- pageY: v.pageY
- }, O[v.pointerId].target || (O[v.pointerId].target = v.currentTarget);
- });
- }, b.prototype.onDocumentPointerUp = function(S) {
- G(S, "onDocumentTouchEnd", "touchend", function(v) {
- delete O[v.pointerId];
- });
- }, b.prototype.setDOMEvents = function() {
- k.prototype.setDOMEvents.call(this), (this.hasZoom || this.followTouchMove) && this.batchMSEvents(x);
- }, b;
- }(N);
- }), C(o, "Core/Legend/Legend.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/FormatUtilities.js"],
- o["Core/Globals.js"],
- o["Core/Series/Point.js"],
- o["Core/Renderer/RendererUtilities.js"],
- o["Core/Utilities.js"]
- ], function(y, N, _, U, G, V) {
- var F = y.animObject, B = y.setAnimation, j = N.format;
- y = _.isFirefox;
- var w = _.marginNames;
- _ = _.win;
- var x = G.distribute, f = V.addEvent, l = V.createElement, T = V.css, O = V.defined, R = V.discardElement, k = V.find, b = V.fireEvent, S = V.isNumber, v = V.merge, h = V.pick, c = V.relativeLength, u = V.stableSort, i = V.syncTimeout;
- return G = V.wrap, V = function() {
- function p(a, t) {
- this.allItems = [], this.contentGroup = this.box = void 0, this.display = !1, this.group = void 0, this.offsetWidth = this.maxLegendWidth = this.maxItemWidth = this.legendWidth = this.legendHeight = this.lastLineHeight = this.lastItemY = this.itemY = this.itemX = this.itemMarginTop = this.itemMarginBottom = this.itemHeight = this.initialItemY = 0, this.options = {}, this.padding = 0, this.pages = [], this.proximate = !1, this.scrollGroup = void 0, this.widthOption = this.totalItemWidth = this.titleHeight = this.symbolWidth = this.symbolHeight = 0, this.chart = a, this.init(a, t);
- }
- return p.prototype.init = function(a, t) {
- this.chart = a, this.setOptions(t), t.enabled && (this.render(), f(this.chart, "endResize", function() {
- this.legend.positionCheckboxes();
- }), this.proximate ? this.unchartrender = f(this.chart, "render", function() {
- this.legend.proximatePositions(), this.legend.positionItems();
- }) : this.unchartrender && this.unchartrender());
- }, p.prototype.setOptions = function(a) {
- var t = h(a.padding, 8);
- this.options = a, this.chart.styledMode || (this.itemStyle = a.itemStyle, this.itemHiddenStyle = v(this.itemStyle, a.itemHiddenStyle)), this.itemMarginTop = a.itemMarginTop || 0, this.itemMarginBottom = a.itemMarginBottom || 0, this.padding = t, this.initialItemY = t - 5, this.symbolWidth = h(
- a.symbolWidth,
- 16
- ), this.pages = [], this.proximate = a.layout === "proximate" && !this.chart.inverted, this.baseline = void 0;
- }, p.prototype.update = function(a, t) {
- var s = this.chart;
- this.setOptions(v(!0, this.options, a)), this.destroy(), s.isDirtyLegend = s.isDirtyBox = !0, h(t, !0) && s.redraw(), b(this, "afterUpdate");
- }, p.prototype.colorizeItem = function(a, t) {
- if (a.legendGroup[t ? "removeClass" : "addClass"]("highcharts-legend-item-hidden"), !this.chart.styledMode) {
- var s = this.options, n = a.legendItem, P = a.legendLine, D = a.legendSymbol, I = this.itemHiddenStyle.color;
- s = t ? s.itemStyle.color : I;
- var W = t && a.color || I, E = a.options && a.options.marker, X = { fill: W };
- n && n.css({ fill: s, color: s }), P && P.attr({ stroke: W }), D && (E && D.isMarker && (X = a.pointAttribs(), t || (X.stroke = X.fill = I)), D.attr(X));
- }
- b(this, "afterColorizeItem", { item: a, visible: t });
- }, p.prototype.positionItems = function() {
- this.allItems.forEach(this.positionItem, this), this.chart.isResizing || this.positionCheckboxes();
- }, p.prototype.positionItem = function(a) {
- var t = this, s = this.options, n = s.symbolPadding, P = !s.rtl, D = a._legendItemPos;
- s = D[0], D = D[1];
- var I = a.checkbox, W = a.legendGroup;
- W && W.element && (n = { translateX: P ? s : this.legendWidth - s - 2 * n - 4, translateY: D }, P = function() {
- b(t, "afterPositionItem", { item: a });
- }, O(W.translateY) ? W.animate(n, void 0, P) : (W.attr(n), P())), I && (I.x = s, I.y = D);
- }, p.prototype.destroyItem = function(a) {
- var t = a.checkbox;
- ["legendItem", "legendLine", "legendSymbol", "legendGroup"].forEach(function(s) {
- a[s] && (a[s] = a[s].destroy());
- }), t && R(a.checkbox);
- }, p.prototype.destroy = function() {
- function a(t) {
- this[t] && (this[t] = this[t].destroy());
- }
- this.getAllItems().forEach(function(t) {
- [
- "legendItem",
- "legendGroup"
- ].forEach(a, t);
- }), "clipRect up down pager nav box title group".split(" ").forEach(a, this), this.display = null;
- }, p.prototype.positionCheckboxes = function() {
- var a = this.group && this.group.alignAttr, t = this.clipHeight || this.legendHeight, s = this.titleHeight;
- if (a) {
- var n = a.translateY;
- this.allItems.forEach(function(P) {
- var D = P.checkbox;
- if (D) {
- var I = n + s + D.y + (this.scrollOffset || 0) + 3;
- T(D, { left: a.translateX + P.checkboxOffset + D.x - 20 + "px", top: I + "px", display: this.proximate || I > n - 6 && I < n + t - 6 ? "" : "none" });
- }
- }, this);
- }
- }, p.prototype.renderTitle = function() {
- var a = this.options, t = this.padding, s = a.title, n = 0;
- s.text && (this.title || (this.title = this.chart.renderer.label(s.text, t - 3, t - 4, null, null, null, a.useHTML, null, "legend-title").attr({ zIndex: 1 }), this.chart.styledMode || this.title.css(s.style), this.title.add(this.group)), s.width || this.title.css({ width: this.maxLegendWidth + "px" }), a = this.title.getBBox(), n = a.height, this.offsetWidth = a.width, this.contentGroup.attr({ translateY: n })), this.titleHeight = n;
- }, p.prototype.setText = function(a) {
- var t = this.options;
- a.legendItem.attr({ text: t.labelFormat ? j(t.labelFormat, a, this.chart) : t.labelFormatter.call(a) });
- }, p.prototype.renderItem = function(a) {
- var t = this.chart, s = t.renderer, n = this.options, P = this.symbolWidth, D = n.symbolPadding || 0, I = this.itemStyle, W = this.itemHiddenStyle, E = n.layout === "horizontal" ? h(n.itemDistance, 20) : 0, X = !n.rtl, g = !a.series, m = !g && a.series.drawLegendSymbol ? a.series : a, L = m.options, z = this.createCheckboxForItem && L && L.showCheckbox, $ = n.useHTML, Q = a.options.className, A = a.legendItem;
- L = P + D + E + (z ? 20 : 0), A || (a.legendGroup = s.g("legend-item").addClass("highcharts-" + m.type + "-series highcharts-color-" + a.colorIndex + (Q ? " " + Q : "") + (g ? " highcharts-series-" + a.index : "")).attr({ zIndex: 1 }).add(this.scrollGroup), a.legendItem = A = s.text("", X ? P + D : -D, this.baseline || 0, $), t.styledMode || A.css(v(a.visible ? I : W)), A.attr({ align: X ? "left" : "right", zIndex: 2 }).add(a.legendGroup), this.baseline || (this.fontMetrics = s.fontMetrics(t.styledMode ? 12 : I.fontSize, A), this.baseline = this.fontMetrics.f + 3 + this.itemMarginTop, A.attr("y", this.baseline), this.symbolHeight = n.symbolHeight || this.fontMetrics.f, n.squareSymbol && (this.symbolWidth = h(n.symbolWidth, Math.max(this.symbolHeight, 16)), L = this.symbolWidth + D + E + (z ? 20 : 0), X && A.attr("x", this.symbolWidth + D))), m.drawLegendSymbol(this, a), this.setItemEvents && this.setItemEvents(a, A, $)), z && !a.checkbox && this.createCheckboxForItem && this.createCheckboxForItem(a), this.colorizeItem(a, a.visible), !t.styledMode && I.width || A.css({ width: (n.itemWidth || this.widthOption || t.spacingBox.width) - L + "px" }), this.setText(a), t = A.getBBox(), s = this.fontMetrics && this.fontMetrics.h || 0, a.itemWidth = a.checkboxOffset = n.itemWidth || a.legendItemWidth || t.width + L, this.maxItemWidth = Math.max(this.maxItemWidth, a.itemWidth), this.totalItemWidth += a.itemWidth, this.itemHeight = a.itemHeight = Math.round(a.legendItemHeight || (t.height > 1.5 * s ? t.height : s));
- }, p.prototype.layoutItem = function(a) {
- var t = this.options, s = this.padding, n = t.layout === "horizontal", P = a.itemHeight, D = this.itemMarginBottom, I = this.itemMarginTop, W = n ? h(t.itemDistance, 20) : 0, E = this.maxLegendWidth;
- t = t.alignColumns && this.totalItemWidth > E ? this.maxItemWidth : a.itemWidth, n && this.itemX - s + t > E && (this.itemX = s, this.lastLineHeight && (this.itemY += I + this.lastLineHeight + D), this.lastLineHeight = 0), this.lastItemY = I + this.itemY + D, this.lastLineHeight = Math.max(P, this.lastLineHeight), a._legendItemPos = [this.itemX, this.itemY], n ? this.itemX += t : (this.itemY += I + P + D, this.lastLineHeight = P), this.offsetWidth = this.widthOption || Math.max((n ? this.itemX - s - (a.checkbox ? 0 : W) : t) + s, this.offsetWidth);
- }, p.prototype.getAllItems = function() {
- var a = [];
- return this.chart.series.forEach(function(t) {
- var s = t && t.options;
- t && h(s.showInLegend, O(s.linkedTo) ? !1 : void 0, !0) && (a = a.concat(t.legendItems || (s.legendType === "point" ? t.data : t)));
- }), b(this, "afterGetAllItems", { allItems: a }), a;
- }, p.prototype.getAlignment = function() {
- var a = this.options;
- return this.proximate ? a.align.charAt(0) + "tv" : a.floating ? "" : a.align.charAt(0) + a.verticalAlign.charAt(0) + a.layout.charAt(0);
- }, p.prototype.adjustMargins = function(a, t) {
- var s = this.chart, n = this.options, P = this.getAlignment();
- P && [/(lth|ct|rth)/, /(rtv|rm|rbv)/, /(rbh|cb|lbh)/, /(lbv|lm|ltv)/].forEach(function(D, I) {
- D.test(P) && !O(a[I]) && (s[w[I]] = Math.max(s[w[I]], s.legend[(I + 1) % 2 ? "legendHeight" : "legendWidth"] + [1, -1, -1, 1][I] * n[I % 2 ? "x" : "y"] + h(n.margin, 12) + t[I] + (s.titleOffset[I] || 0)));
- });
- }, p.prototype.proximatePositions = function() {
- var a = this.chart, t = [], s = this.options.align === "left";
- this.allItems.forEach(function(n) {
- var P, D = s;
- if (n.yAxis) {
- n.xAxis.options.reversed && (D = !D), n.points && (P = k(D ? n.points : n.points.slice(0).reverse(), function(W) {
- return S(W.plotY);
- })), D = this.itemMarginTop + n.legendItem.getBBox().height + this.itemMarginBottom;
- var I = n.yAxis.top - a.plotTop;
- n.visible ? (P = P ? P.plotY : n.yAxis.height, P += I - 0.3 * D) : P = I + n.yAxis.height, t.push({ target: P, size: D, item: n });
- }
- }, this), x(t, a.plotHeight).forEach(function(n) {
- n.item._legendItemPos && (n.item._legendItemPos[1] = a.plotTop - a.spacing[0] + n.pos);
- });
- }, p.prototype.render = function() {
- var a = this.chart, t = a.renderer, s = this.options, n = this.padding, P = this.getAllItems(), D = this.group, I = this.box;
- this.itemX = n, this.itemY = this.initialItemY, this.lastItemY = this.offsetWidth = 0, this.widthOption = c(s.width, a.spacingBox.width - n);
- var W = a.spacingBox.width - 2 * n - s.x;
- -1 < ["rm", "lm"].indexOf(this.getAlignment().substring(0, 2)) && (W /= 2), this.maxLegendWidth = this.widthOption || W, D || (this.group = D = t.g("legend").addClass(s.className || "").attr({ zIndex: 7 }).add(), this.contentGroup = t.g().attr({ zIndex: 1 }).add(D), this.scrollGroup = t.g().add(this.contentGroup)), this.renderTitle(), u(P, function(X, g) {
- return (X.options && X.options.legendIndex || 0) - (g.options && g.options.legendIndex || 0);
- }), s.reversed && P.reverse(), this.allItems = P, this.display = W = !!P.length, this.itemHeight = this.totalItemWidth = this.maxItemWidth = this.lastLineHeight = 0, P.forEach(this.renderItem, this), P.forEach(this.layoutItem, this), P = (this.widthOption || this.offsetWidth) + n;
- var E = this.lastItemY + this.lastLineHeight + this.titleHeight;
- E = this.handleOverflow(E), E += n, I || (this.box = I = t.rect().addClass("highcharts-legend-box").attr({ r: s.borderRadius }).add(D), I.isNew = !0), a.styledMode || I.attr({ stroke: s.borderColor, "stroke-width": s.borderWidth || 0, fill: s.backgroundColor || "none" }).shadow(s.shadow), 0 < P && 0 < E && (I[I.isNew ? "attr" : "animate"](I.crisp.call({}, { x: 0, y: 0, width: P, height: E }, I.strokeWidth())), I.isNew = !1), I[W ? "show" : "hide"](), a.styledMode && D.getStyle("display") === "none" && (P = E = 0), this.legendWidth = P, this.legendHeight = E, W && this.align(), this.proximate || this.positionItems(), b(this, "afterRender");
- }, p.prototype.align = function(a) {
- a === void 0 && (a = this.chart.spacingBox);
- var t = this.chart, s = this.options, n = a.y;
- /(lth|ct|rth)/.test(this.getAlignment()) && 0 < t.titleOffset[0] ? n += t.titleOffset[0] : /(lbh|cb|rbh)/.test(this.getAlignment()) && 0 < t.titleOffset[2] && (n -= t.titleOffset[2]), n !== a.y && (a = v(a, { y: n })), this.group.align(v(s, { width: this.legendWidth, height: this.legendHeight, verticalAlign: this.proximate ? "top" : s.verticalAlign }), !0, a);
- }, p.prototype.handleOverflow = function(a) {
- var t = this, s = this.chart, n = s.renderer, P = this.options, D = P.y, I = P.verticalAlign === "top", W = this.padding, E = P.maxHeight, X = P.navigation, g = h(X.animation, !0), m = X.arrowSize || 12, L = this.pages, z = this.allItems, $ = function(q) {
- typeof q == "number" ? Z.attr({ height: q }) : Z && (t.clipRect = Z.destroy(), t.contentGroup.clip()), t.contentGroup.div && (t.contentGroup.div.style.clip = q ? "rect(" + W + "px,9999px," + (W + q) + "px,0)" : "auto");
- }, Q = function(q) {
- return t[q] = n.circle(0, 0, 1.3 * m).translate(m / 2, m / 2).add(Y), s.styledMode || t[q].attr("fill", "rgba(0,0,0,0.0001)"), t[q];
- }, A, H;
- D = s.spacingBox.height + (I ? -D : D) - W;
- var Y = this.nav, Z = this.clipRect;
- return P.layout !== "horizontal" || P.verticalAlign === "middle" || P.floating || (D /= 2), E && (D = Math.min(D, E)), L.length = 0, a && 0 < D && a > D && X.enabled !== !1 ? (this.clipHeight = A = Math.max(D - 20 - this.titleHeight - W, 0), this.currentPage = h(this.currentPage, 1), this.fullHeight = a, z.forEach(function(q, it) {
- var et = q._legendItemPos[1], nt = Math.round(q.legendItem.getBBox().height), rt = L.length;
- (!rt || et - L[rt - 1] > A && (H || et) !== L[rt - 1]) && (L.push(H || et), rt++), q.pageIx = rt - 1, H && (z[it - 1].pageIx = rt - 1), it === z.length - 1 && et + nt - L[rt - 1] > A && nt <= A && (L.push(et), q.pageIx = rt), et !== H && (H = et);
- }), Z || (Z = t.clipRect = n.clipRect(0, W, 9999, 0), t.contentGroup.clip(Z)), $(A), Y || (this.nav = Y = n.g().attr({ zIndex: 1 }).add(this.group), this.up = n.symbol("triangle", 0, 0, m, m).add(Y), Q("upTracker").on(
- "click",
- function() {
- t.scroll(-1, g);
- }
- ), this.pager = n.text("", 15, 10).addClass("highcharts-legend-navigation"), s.styledMode || this.pager.css(X.style), this.pager.add(Y), this.down = n.symbol("triangle-down", 0, 0, m, m).add(Y), Q("downTracker").on("click", function() {
- t.scroll(1, g);
- })), t.scroll(0), a = D) : Y && ($(), this.nav = Y.destroy(), this.scrollGroup.attr({ translateY: 1 }), this.clipHeight = 0), a;
- }, p.prototype.scroll = function(a, t) {
- var s = this, n = this.chart, P = this.pages, D = P.length, I = this.clipHeight, W = this.options.navigation, E = this.pager, X = this.padding, g = this.currentPage + a;
- g > D && (g = D), 0 < g && (typeof t < "u" && B(t, n), this.nav.attr({ translateX: X, translateY: I + this.padding + 7 + this.titleHeight, visibility: "visible" }), [this.up, this.upTracker].forEach(function(m) {
- m.attr({ class: g === 1 ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
- }), E.attr({ text: g + "/" + D }), [this.down, this.downTracker].forEach(
- function(m) {
- m.attr({ x: 18 + this.pager.getBBox().width, class: g === D ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
- },
- this
- ), n.styledMode || (this.up.attr({ fill: g === 1 ? W.inactiveColor : W.activeColor }), this.upTracker.css({ cursor: g === 1 ? "default" : "pointer" }), this.down.attr({ fill: g === D ? W.inactiveColor : W.activeColor }), this.downTracker.css({ cursor: g === D ? "default" : "pointer" })), this.scrollOffset = -P[g - 1] + this.initialItemY, this.scrollGroup.animate({ translateY: this.scrollOffset }), this.currentPage = g, this.positionCheckboxes(), a = F(h(t, n.renderer.globalAnimation, !0)), i(function() {
- b(s, "afterScroll", { currentPage: g });
- }, a.duration));
- }, p.prototype.setItemEvents = function(a, t, s) {
- var n = this, P = n.chart.renderer.boxWrapper, D = a instanceof U, I = "highcharts-legend-" + (D ? "point" : "series") + "-active", W = n.chart.styledMode, E = function(X) {
- n.allItems.forEach(function(g) {
- a !== g && [g].concat(g.linkedSeries || []).forEach(function(m) {
- m.setState(X, !D);
- });
- });
- };
- (s ? [t, a.legendSymbol] : [a.legendGroup]).forEach(function(X) {
- X && X.on("mouseover", function() {
- a.visible && E("inactive"), a.setState("hover"), a.visible && P.addClass(I), W || t.css(n.options.itemHoverStyle);
- }).on("mouseout", function() {
- n.chart.styledMode || t.css(v(a.visible ? n.itemStyle : n.itemHiddenStyle)), E(""), P.removeClass(I), a.setState();
- }).on("click", function(g) {
- var m = function() {
- a.setVisible && a.setVisible(), E(a.visible ? "inactive" : "");
- };
- P.removeClass(I), g = { browserEvent: g }, a.firePointEvent ? a.firePointEvent("legendItemClick", g, m) : b(a, "legendItemClick", g, m);
- });
- });
- }, p.prototype.createCheckboxForItem = function(a) {
- a.checkbox = l(
- "input",
- { type: "checkbox", className: "highcharts-legend-checkbox", checked: a.selected, defaultChecked: a.selected },
- this.options.itemCheckboxStyle,
- this.chart.container
- ), f(a.checkbox, "click", function(t) {
- b(a.series || a, "checkboxClick", { checked: t.target.checked, item: a }, function() {
- a.select();
- });
- });
- }, p;
- }(), (/Trident\/7\.0/.test(_.navigator && _.navigator.userAgent) || y) && G(V.prototype, "positionItem", function(p, a) {
- var t = this, s = function() {
- a._legendItemPos && p.call(t, a);
- };
- s(), t.bubbleLegend || setTimeout(s);
- }), V;
- }), C(
- o,
- "Core/Series/SeriesRegistry.js",
- [o["Core/Globals.js"], o["Core/DefaultOptions.js"], o["Core/Series/Point.js"], o["Core/Utilities.js"]],
- function(y, N, _, U) {
- var G = N.defaultOptions, V = U.error, F = U.extendClass, B = U.merge, j;
- return function(w) {
- function x(f, l) {
- var T = G.plotOptions || {}, O = l.defaultOptions;
- l.prototype.pointClass || (l.prototype.pointClass = _), l.prototype.type = f, O && (T[f] = O), w.seriesTypes[f] = l;
- }
- w.seriesTypes = y.seriesTypes, w.getSeries = function(f, l) {
- l === void 0 && (l = {});
- var T = f.options.chart;
- T = l.type || T.type || T.defaultSeriesType || "";
- var O = w.seriesTypes[T];
- return w || V(17, !0, f, { missingModuleFor: T }), T = new O(), typeof T.init == "function" && T.init(f, l), T;
- }, w.registerSeriesType = x, w.seriesType = function(f, l, T, O, R) {
- var k = G.plotOptions || {};
- return l = l || "", k[f] = B(k[l], T), x(f, F(w.seriesTypes[l] || function() {
- }, O)), w.seriesTypes[f].prototype.type = f, R && (w.seriesTypes[f].prototype.pointClass = F(_, R)), w.seriesTypes[f];
- };
- }(j || (j = {})), j;
- }
- ), C(o, "Core/Chart/Chart.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/Axis/Axis.js"],
- o["Core/FormatUtilities.js"],
- o["Core/Foundation.js"],
- o["Core/Globals.js"],
- o["Core/Legend/Legend.js"],
- o["Core/MSPointer.js"],
- o["Core/DefaultOptions.js"],
- o["Core/Pointer.js"],
- o["Core/Renderer/RendererRegistry.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Renderer/SVG/SVGRenderer.js"],
- o["Core/Time.js"],
- o["Core/Utilities.js"],
- o["Core/Renderer/HTML/AST.js"]
- ], function(y, N, _, U, G, V, F, B, j, w, x, f, l, T, O) {
- var R = y.animate, k = y.animObject, b = y.setAnimation, S = _.numberFormat, v = U.registerEventOptions, h = G.charts, c = G.doc, u = G.marginNames, i = G.svg, p = G.win, a = B.defaultOptions, t = B.defaultTime, s = x.seriesTypes, n = T.addEvent, P = T.attr, D = T.cleanRecursively, I = T.createElement, W = T.css, E = T.defined, X = T.discardElement, g = T.erase, m = T.error, L = T.extend, z = T.find, $ = T.fireEvent, Q = T.getStyle, A = T.isArray, H = T.isNumber, Y = T.isObject, Z = T.isString, q = T.merge, it = T.objectEach, et = T.pick, nt = T.pInt, rt = T.relativeLength, ct = T.removeEvent, gt = T.splat, dt = T.syncTimeout, ht = T.uniqueKey;
- return y = function() {
- function at(J, tt, ot) {
- this.series = this.renderTo = this.renderer = this.pointer = this.pointCount = this.plotWidth = this.plotTop = this.plotLeft = this.plotHeight = this.plotBox = this.options = this.numberFormatter = this.margin = this.legend = this.labelCollectors = this.isResizing = this.index = this.eventOptions = this.container = this.colorCounter = this.clipBox = this.chartWidth = this.chartHeight = this.bounds = this.axisOffset = this.axes = void 0, this.sharedClips = {}, this.yAxis = this.xAxis = this.userOptions = this.titleOffset = this.time = this.symbolCounter = this.spacingBox = this.spacing = void 0, this.getArgs(J, tt, ot);
- }
- return at.chart = function(J, tt, ot) {
- return new at(J, tt, ot);
- }, at.prototype.getArgs = function(J, tt, ot) {
- Z(J) || J.nodeName ? (this.renderTo = J, this.init(tt, ot)) : this.init(J, tt);
- }, at.prototype.init = function(J, tt) {
- var ot = J.plotOptions || {};
- $(this, "init", { args: arguments }, function() {
- var lt = q(a, J), pt = lt.chart;
- it(lt.plotOptions, function(yt, vt) {
- Y(yt) && (yt.tooltip = ot[vt] && q(ot[vt].tooltip) || void 0);
- }), lt.tooltip.userOptions = J.chart && J.chart.forExport && J.tooltip.userOptions || J.tooltip, this.userOptions = J, this.margin = [], this.spacing = [], this.bounds = { h: {}, v: {} }, this.labelCollectors = [], this.callback = tt, this.isResizing = 0, this.options = lt, this.axes = [], this.series = [], this.time = J.time && Object.keys(J.time).length ? new l(J.time) : G.time, this.numberFormatter = pt.numberFormatter || S, this.styledMode = pt.styledMode, this.hasCartesianSeries = pt.showAxes, this.index = h.length, h.push(this), G.chartCount++, v(this, pt), this.xAxis = [], this.yAxis = [], this.pointCount = this.colorCounter = this.symbolCounter = 0, $(this, "afterInit"), this.firstRender();
- });
- }, at.prototype.initSeries = function(J) {
- var tt = this.options.chart;
- tt = J.type || tt.type || tt.defaultSeriesType;
- var ot = s[tt];
- return ot || m(17, !0, this, { missingModuleFor: tt }), tt = new ot(), typeof tt.init == "function" && tt.init(this, J), tt;
- }, at.prototype.setSeriesData = function() {
- this.getSeriesOrderByLinks().forEach(function(J) {
- J.points || J.data || !J.enabledDataSorting || J.setData(J.options.data, !1);
- });
- }, at.prototype.getSeriesOrderByLinks = function() {
- return this.series.concat().sort(function(J, tt) {
- return J.linkedSeries.length || tt.linkedSeries.length ? tt.linkedSeries.length - J.linkedSeries.length : 0;
- });
- }, at.prototype.orderSeries = function(J) {
- var tt = this.series;
- J = J || 0;
- for (var ot = tt.length; J < ot; ++J)
- tt[J] && (tt[J].index = J, tt[J].name = tt[J].getName());
- }, at.prototype.isInsidePlot = function(J, tt, ot) {
- ot === void 0 && (ot = {});
- var lt = this.inverted, pt = this.plotBox, yt = this.plotLeft, vt = this.plotTop, Ct = this.scrollablePlotBox, Pt = 0, At = 0;
- ot.visiblePlotOnly && this.scrollingContainer && (At = this.scrollingContainer, Pt = At.scrollLeft, At = At.scrollTop);
- var St = ot.series;
- if (pt = ot.visiblePlotOnly && Ct || pt, Ct = ot.inverted ? tt : J, tt = ot.inverted ? J : tt, J = { x: Ct, y: tt, isInsidePlot: !0 }, !ot.ignoreX) {
- var Dt = St && (lt ? St.yAxis : St.xAxis) || { pos: yt, len: 1 / 0 };
- Ct = ot.paneCoordinates ? Dt.pos + Ct : yt + Ct, Ct >= Math.max(Pt + yt, Dt.pos) && Ct <= Math.min(Pt + yt + pt.width, Dt.pos + Dt.len) || (J.isInsidePlot = !1);
- }
- return !ot.ignoreY && J.isInsidePlot && (lt = St && (lt ? St.xAxis : St.yAxis) || { pos: vt, len: 1 / 0 }, ot = ot.paneCoordinates ? lt.pos + tt : vt + tt, ot >= Math.max(At + vt, lt.pos) && ot <= Math.min(At + vt + pt.height, lt.pos + lt.len) || (J.isInsidePlot = !1)), $(this, "afterIsInsidePlot", J), J.isInsidePlot;
- }, at.prototype.redraw = function(J) {
- $(this, "beforeRedraw");
- var tt = this.hasCartesianSeries ? this.axes : this.colorAxis || [], ot = this.series, lt = this.pointer, pt = this.legend, yt = this.userOptions.legend, vt = this.renderer, Ct = vt.isHidden(), Pt = [], At = this.isDirtyBox, St = this.isDirtyLegend;
- for (this.setResponsive && this.setResponsive(!1), b(this.hasRendered ? J : !1, this), Ct && this.temporaryDisplay(), this.layOutTitles(), J = ot.length; J--; ) {
- var Dt = ot[J];
- if (Dt.options.stacking || Dt.options.centerInCategory) {
- var _t = !0;
- if (Dt.isDirty) {
- var Nt = !0;
- break;
- }
- }
- }
- if (Nt)
- for (J = ot.length; J--; )
- Dt = ot[J], Dt.options.stacking && (Dt.isDirty = !0);
- ot.forEach(function(Ot) {
- Ot.isDirty && (Ot.options.legendType === "point" ? (typeof Ot.updateTotals == "function" && Ot.updateTotals(), St = !0) : yt && (yt.labelFormatter || yt.labelFormat) && (St = !0)), Ot.isDirtyData && $(Ot, "updatedData");
- }), St && pt && pt.options.enabled && (pt.render(), this.isDirtyLegend = !1), _t && this.getStacks(), tt.forEach(function(Ot) {
- Ot.updateNames(), Ot.setScale();
- }), this.getMargins(), tt.forEach(function(Ot) {
- Ot.isDirty && (At = !0);
- }), tt.forEach(function(Ot) {
- var Kt = Ot.min + "," + Ot.max;
- Ot.extKey !== Kt && (Ot.extKey = Kt, Pt.push(function() {
- $(Ot, "afterSetExtremes", L(Ot.eventArgs, Ot.getExtremes())), delete Ot.eventArgs;
- })), (At || _t) && Ot.redraw();
- }), At && this.drawChartBox(), $(this, "predraw"), ot.forEach(function(Ot) {
- (At || Ot.isDirty) && Ot.visible && Ot.redraw(), Ot.isDirtyData = !1;
- }), lt && lt.reset(!0), vt.draw(), $(this, "redraw"), $(this, "render"), Ct && this.temporaryDisplay(!0), Pt.forEach(function(Ot) {
- Ot.call();
- });
- }, at.prototype.get = function(J) {
- function tt(yt) {
- return yt.id === J || yt.options && yt.options.id === J;
- }
- for (var ot = this.series, lt = z(this.axes, tt) || z(this.series, tt), pt = 0; !lt && pt < ot.length; pt++)
- lt = z(ot[pt].points || [], tt);
- return lt;
- }, at.prototype.getAxes = function() {
- var J = this, tt = this.options, ot = tt.xAxis = gt(tt.xAxis || {});
- tt = tt.yAxis = gt(tt.yAxis || {}), $(this, "getAxes"), ot.forEach(function(lt, pt) {
- lt.index = pt, lt.isX = !0;
- }), tt.forEach(function(lt, pt) {
- lt.index = pt;
- }), ot.concat(tt).forEach(function(lt) {
- new N(J, lt);
- }), $(this, "afterGetAxes");
- }, at.prototype.getSelectedPoints = function() {
- return this.series.reduce(function(J, tt) {
- return tt.getPointsCollection().forEach(function(ot) {
- et(ot.selectedStaging, ot.selected) && J.push(ot);
- }), J;
- }, []);
- }, at.prototype.getSelectedSeries = function() {
- return this.series.filter(function(J) {
- return J.selected;
- });
- }, at.prototype.setTitle = function(J, tt, ot) {
- this.applyDescription("title", J), this.applyDescription("subtitle", tt), this.applyDescription("caption", void 0), this.layOutTitles(ot);
- }, at.prototype.applyDescription = function(J, tt) {
- var ot = this, lt = J === "title" ? { color: "#333333", fontSize: this.options.isStock ? "16px" : "18px" } : { color: "#666666" };
- lt = this.options[J] = q(!this.styledMode && { style: lt }, this.options[J], tt);
- var pt = this[J];
- pt && tt && (this[J] = pt = pt.destroy()), lt && !pt && (pt = this.renderer.text(lt.text, 0, 0, lt.useHTML).attr({ align: lt.align, class: "highcharts-" + J, zIndex: lt.zIndex || 4 }).add(), pt.update = function(yt) {
- ot[{ title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }[J]](yt);
- }, this.styledMode || pt.css(lt.style), this[J] = pt);
- }, at.prototype.layOutTitles = function(J) {
- var tt = [0, 0, 0], ot = this.renderer, lt = this.spacingBox;
- ["title", "subtitle", "caption"].forEach(function(yt) {
- var vt = this[yt], Ct = this.options[yt], Pt = Ct.verticalAlign || "top";
- yt = yt === "title" ? Pt === "top" ? -3 : 0 : Pt === "top" ? tt[0] + 2 : 0;
- var At;
- if (vt) {
- this.styledMode || (At = Ct.style && Ct.style.fontSize), At = ot.fontMetrics(At, vt).b, vt.css({ width: (Ct.width || lt.width + (Ct.widthAdjust || 0)) + "px" });
- var St = Math.round(vt.getBBox(Ct.useHTML).height);
- vt.align(
- L({ y: Pt === "bottom" ? At : yt + At, height: St }, Ct),
- !1,
- "spacingBox"
- ), Ct.floating || (Pt === "top" ? tt[0] = Math.ceil(tt[0] + St) : Pt === "bottom" && (tt[2] = Math.ceil(tt[2] + St)));
- }
- }, this), tt[0] && (this.options.title.verticalAlign || "top") === "top" && (tt[0] += this.options.title.margin), tt[2] && this.options.caption.verticalAlign === "bottom" && (tt[2] += this.options.caption.margin);
- var pt = !this.titleOffset || this.titleOffset.join(",") !== tt.join(",");
- this.titleOffset = tt, $(this, "afterLayOutTitles"), !this.isDirtyBox && pt && (this.isDirtyBox = this.isDirtyLegend = pt, this.hasRendered && et(J, !0) && this.isDirtyBox && this.redraw());
- }, at.prototype.getChartSize = function() {
- var J = this.options.chart, tt = J.width;
- J = J.height;
- var ot = this.renderTo;
- E(tt) || (this.containerWidth = Q(ot, "width")), E(J) || (this.containerHeight = Q(ot, "height")), this.chartWidth = Math.max(0, tt || this.containerWidth || 600), this.chartHeight = Math.max(0, rt(J, this.chartWidth) || (1 < this.containerHeight ? this.containerHeight : 400));
- }, at.prototype.temporaryDisplay = function(J) {
- var tt = this.renderTo;
- if (J)
- for (; tt && tt.style; )
- tt.hcOrigStyle && (W(tt, tt.hcOrigStyle), delete tt.hcOrigStyle), tt.hcOrigDetached && (c.body.removeChild(tt), tt.hcOrigDetached = !1), tt = tt.parentNode;
- else
- for (; tt && tt.style && (c.body.contains(tt) || tt.parentNode || (tt.hcOrigDetached = !0, c.body.appendChild(tt)), (Q(tt, "display", !1) === "none" || tt.hcOricDetached) && (tt.hcOrigStyle = { display: tt.style.display, height: tt.style.height, overflow: tt.style.overflow }, J = { display: "block", overflow: "hidden" }, tt !== this.renderTo && (J.height = 0), W(tt, J), tt.offsetWidth || tt.style.setProperty("display", "block", "important")), tt = tt.parentNode, tt !== c.body); )
- ;
- }, at.prototype.setClassName = function(J) {
- this.container.className = "highcharts-container " + (J || "");
- }, at.prototype.getContainer = function() {
- var J = this.options, tt = J.chart, ot = ht(), lt, pt = this.renderTo;
- pt || (this.renderTo = pt = tt.renderTo), Z(pt) && (this.renderTo = pt = c.getElementById(pt)), pt || m(13, !0, this);
- var yt = nt(P(pt, "data-highcharts-chart"));
- H(yt) && h[yt] && h[yt].hasRendered && h[yt].destroy(), P(pt, "data-highcharts-chart", this.index), pt.innerHTML = O.emptyHTML, tt.skipClone || pt.offsetWidth || this.temporaryDisplay(), this.getChartSize(), yt = this.chartWidth;
- var vt = this.chartHeight;
- if (W(pt, { overflow: "hidden" }), this.styledMode || (lt = L({ position: "relative", overflow: "hidden", width: yt + "px", height: vt + "px", textAlign: "left", lineHeight: "normal", zIndex: 0, "-webkit-tap-highlight-color": "rgba(0,0,0,0)", userSelect: "none", "touch-action": "manipulation", outline: "none" }, tt.style || {})), this.container = ot = I("div", { id: ot }, lt, pt), this._cursor = ot.style.cursor, this.renderer = new (tt.renderer || !i ? w.getRendererType(tt.renderer) : f)(ot, yt, vt, void 0, tt.forExport, J.exporting && J.exporting.allowHTML, this.styledMode), b(
- void 0,
- this
- ), this.setClassName(tt.className), this.styledMode)
- for (var Ct in J.defs)
- this.renderer.definition(J.defs[Ct]);
- else
- this.renderer.setStyle(tt.style);
- this.renderer.chartIndex = this.index, $(this, "afterGetContainer");
- }, at.prototype.getMargins = function(J) {
- var tt = this.spacing, ot = this.margin, lt = this.titleOffset;
- this.resetMargins(), lt[0] && !E(ot[0]) && (this.plotTop = Math.max(this.plotTop, lt[0] + tt[0])), lt[2] && !E(ot[2]) && (this.marginBottom = Math.max(this.marginBottom, lt[2] + tt[2])), this.legend && this.legend.display && this.legend.adjustMargins(
- ot,
- tt
- ), $(this, "getMargins"), J || this.getAxisMargins();
- }, at.prototype.getAxisMargins = function() {
- var J = this, tt = J.axisOffset = [0, 0, 0, 0], ot = J.colorAxis, lt = J.margin, pt = function(yt) {
- yt.forEach(function(vt) {
- vt.visible && vt.getOffset();
- });
- };
- J.hasCartesianSeries ? pt(J.axes) : ot && ot.length && pt(ot), u.forEach(function(yt, vt) {
- E(lt[vt]) || (J[yt] += tt[vt]);
- }), J.setChartSize();
- }, at.prototype.reflow = function(J) {
- var tt = this, ot = tt.options.chart, lt = tt.renderTo, pt = E(ot.width) && E(ot.height), yt = ot.width || Q(lt, "width");
- ot = ot.height || Q(lt, "height"), lt = J ? J.target : p, delete tt.pointer.chartPosition, !pt && !tt.isPrinting && yt && ot && (lt === p || lt === c) && ((yt !== tt.containerWidth || ot !== tt.containerHeight) && (T.clearTimeout(tt.reflowTimeout), tt.reflowTimeout = dt(function() {
- tt.container && tt.setSize(void 0, void 0, !1);
- }, J ? 100 : 0)), tt.containerWidth = yt, tt.containerHeight = ot);
- }, at.prototype.setReflow = function(J) {
- var tt = this;
- J === !1 || this.unbindReflow ? J === !1 && this.unbindReflow && (this.unbindReflow = this.unbindReflow()) : (this.unbindReflow = n(p, "resize", function(ot) {
- tt.options && tt.reflow(ot);
- }), n(this, "destroy", this.unbindReflow));
- }, at.prototype.setSize = function(J, tt, ot) {
- var lt = this, pt = lt.renderer;
- lt.isResizing += 1, b(ot, lt), ot = pt.globalAnimation, lt.oldChartHeight = lt.chartHeight, lt.oldChartWidth = lt.chartWidth, typeof J < "u" && (lt.options.chart.width = J), typeof tt < "u" && (lt.options.chart.height = tt), lt.getChartSize(), lt.styledMode || (ot ? R : W)(lt.container, { width: lt.chartWidth + "px", height: lt.chartHeight + "px" }, ot), lt.setChartSize(!0), pt.setSize(lt.chartWidth, lt.chartHeight, ot), lt.axes.forEach(function(yt) {
- yt.isDirty = !0, yt.setScale();
- }), lt.isDirtyLegend = !0, lt.isDirtyBox = !0, lt.layOutTitles(), lt.getMargins(), lt.redraw(ot), lt.oldChartHeight = null, $(lt, "resize"), dt(function() {
- lt && $(lt, "endResize", null, function() {
- --lt.isResizing;
- });
- }, k(ot).duration);
- }, at.prototype.setChartSize = function(J) {
- var tt = this.inverted, ot = this.renderer, lt = this.chartWidth, pt = this.chartHeight, yt = this.options.chart, vt = this.spacing, Ct = this.clipOffset, Pt, At, St, Dt;
- this.plotLeft = Pt = Math.round(this.plotLeft), this.plotTop = At = Math.round(this.plotTop), this.plotWidth = St = Math.max(0, Math.round(lt - Pt - this.marginRight)), this.plotHeight = Dt = Math.max(0, Math.round(pt - At - this.marginBottom)), this.plotSizeX = tt ? Dt : St, this.plotSizeY = tt ? St : Dt, this.plotBorderWidth = yt.plotBorderWidth || 0, this.spacingBox = ot.spacingBox = { x: vt[3], y: vt[0], width: lt - vt[3] - vt[1], height: pt - vt[0] - vt[2] }, this.plotBox = ot.plotBox = { x: Pt, y: At, width: St, height: Dt }, tt = 2 * Math.floor(this.plotBorderWidth / 2), lt = Math.ceil(Math.max(tt, Ct[3]) / 2), pt = Math.ceil(Math.max(tt, Ct[0]) / 2), this.clipBox = { x: lt, y: pt, width: Math.floor(this.plotSizeX - Math.max(tt, Ct[1]) / 2 - lt), height: Math.max(0, Math.floor(this.plotSizeY - Math.max(tt, Ct[2]) / 2 - pt)) }, J || (this.axes.forEach(function(_t) {
- _t.setAxisSize(), _t.setAxisTranslation();
- }), ot.alignElements()), $(this, "afterSetChartSize", { skipAxes: J });
- }, at.prototype.resetMargins = function() {
- $(this, "resetMargins");
- var J = this, tt = J.options.chart;
- ["margin", "spacing"].forEach(function(ot) {
- var lt = tt[ot], pt = Y(lt) ? lt : [lt, lt, lt, lt];
- ["Top", "Right", "Bottom", "Left"].forEach(function(yt, vt) {
- J[ot][vt] = et(tt[ot + yt], pt[vt]);
- });
- }), u.forEach(function(ot, lt) {
- J[ot] = et(J.margin[lt], J.spacing[lt]);
- }), J.axisOffset = [0, 0, 0, 0], J.clipOffset = [0, 0, 0, 0];
- }, at.prototype.drawChartBox = function() {
- var J = this.options.chart, tt = this.renderer, ot = this.chartWidth, lt = this.chartHeight, pt = this.styledMode, yt = this.plotBGImage, vt = J.backgroundColor, Ct = J.plotBackgroundColor, Pt = J.plotBackgroundImage, At = this.plotLeft, St = this.plotTop, Dt = this.plotWidth, _t = this.plotHeight, Nt = this.plotBox, Ot = this.clipRect, Kt = this.clipBox, Gt = this.chartBackground, Wt = this.plotBackground, Jt = this.plotBorder, be, Yt = "animate";
- if (Gt || (this.chartBackground = Gt = tt.rect().addClass("highcharts-background").add(), Yt = "attr"), pt)
- var Vt = be = Gt.strokeWidth();
- else
- Vt = J.borderWidth || 0, be = Vt + (J.shadow ? 8 : 0), vt = { fill: vt || "none" }, (Vt || Gt["stroke-width"]) && (vt.stroke = J.borderColor, vt["stroke-width"] = Vt), Gt.attr(vt).shadow(J.shadow);
- Gt[Yt]({ x: be / 2, y: be / 2, width: ot - be - Vt % 2, height: lt - be - Vt % 2, r: J.borderRadius }), Yt = "animate", Wt || (Yt = "attr", this.plotBackground = Wt = tt.rect().addClass("highcharts-plot-background").add()), Wt[Yt](Nt), pt || (Wt.attr({ fill: Ct || "none" }).shadow(J.plotShadow), Pt && (yt ? (Pt !== yt.attr("href") && yt.attr("href", Pt), yt.animate(Nt)) : this.plotBGImage = tt.image(Pt, At, St, Dt, _t).add())), Ot ? Ot.animate({ width: Kt.width, height: Kt.height }) : this.clipRect = tt.clipRect(Kt), Yt = "animate", Jt || (Yt = "attr", this.plotBorder = Jt = tt.rect().addClass("highcharts-plot-border").attr({ zIndex: 1 }).add()), pt || Jt.attr({ stroke: J.plotBorderColor, "stroke-width": J.plotBorderWidth || 0, fill: "none" }), Jt[Yt](Jt.crisp({ x: At, y: St, width: Dt, height: _t }, -Jt.strokeWidth())), this.isDirtyBox = !1, $(this, "afterDrawChartBox");
- }, at.prototype.propFromSeries = function() {
- var J = this, tt = J.options.chart, ot = J.options.series, lt, pt, yt;
- ["inverted", "angular", "polar"].forEach(function(vt) {
- for (pt = s[tt.type || tt.defaultSeriesType], yt = tt[vt] || pt && pt.prototype[vt], lt = ot && ot.length; !yt && lt--; )
- (pt = s[ot[lt].type]) && pt.prototype[vt] && (yt = !0);
- J[vt] = yt;
- });
- }, at.prototype.linkSeries = function() {
- var J = this, tt = J.series;
- tt.forEach(function(ot) {
- ot.linkedSeries.length = 0;
- }), tt.forEach(function(ot) {
- var lt = ot.options.linkedTo;
- Z(lt) && (lt = lt === ":previous" ? J.series[ot.index - 1] : J.get(lt)) && lt.linkedParent !== ot && (lt.linkedSeries.push(ot), ot.linkedParent = lt, lt.enabledDataSorting && ot.setDataSortingOptions(), ot.visible = et(ot.options.visible, lt.options.visible, ot.visible));
- }), $(this, "afterLinkSeries");
- }, at.prototype.renderSeries = function() {
- this.series.forEach(function(J) {
- J.translate(), J.render();
- });
- }, at.prototype.renderLabels = function() {
- var J = this, tt = J.options.labels;
- tt.items && tt.items.forEach(function(ot) {
- var lt = L(tt.style, ot.style), pt = nt(lt.left) + J.plotLeft, yt = nt(lt.top) + J.plotTop + 12;
- delete lt.left, delete lt.top, J.renderer.text(ot.html, pt, yt).attr({ zIndex: 2 }).css(lt).add();
- });
- }, at.prototype.render = function() {
- var J = this.axes, tt = this.colorAxis, ot = this.renderer, lt = this.options, pt = function(At) {
- At.forEach(function(St) {
- St.visible && St.render();
- });
- }, yt = 0;
- this.setTitle(), this.legend = new V(this, lt.legend), this.getStacks && this.getStacks(), this.getMargins(!0), this.setChartSize(), lt = this.plotWidth, J.some(function(At) {
- if (At.horiz && At.visible && At.options.labels.enabled && At.series.length)
- return yt = 21, !0;
- });
- var vt = this.plotHeight = Math.max(this.plotHeight - yt, 0);
- J.forEach(function(At) {
- At.setScale();
- }), this.getAxisMargins();
- var Ct = 1.1 < lt / this.plotWidth, Pt = 1.05 < vt / this.plotHeight;
- (Ct || Pt) && (J.forEach(function(At) {
- (At.horiz && Ct || !At.horiz && Pt) && At.setTickInterval(!0);
- }), this.getMargins()), this.drawChartBox(), this.hasCartesianSeries ? pt(J) : tt && tt.length && pt(tt), this.seriesGroup || (this.seriesGroup = ot.g("series-group").attr({ zIndex: 3 }).add()), this.renderSeries(), this.renderLabels(), this.addCredits(), this.setResponsive && this.setResponsive(), this.hasRendered = !0;
- }, at.prototype.addCredits = function(J) {
- var tt = this, ot = q(!0, this.options.credits, J);
- ot.enabled && !this.credits && (this.credits = this.renderer.text(ot.text + (this.mapCredits || ""), 0, 0).addClass("highcharts-credits").on("click", function() {
- ot.href && (p.location.href = ot.href);
- }).attr({ align: ot.position.align, zIndex: 8 }), tt.styledMode || this.credits.css(ot.style), this.credits.add().align(ot.position), this.credits.update = function(lt) {
- tt.credits = tt.credits.destroy(), tt.addCredits(lt);
- });
- }, at.prototype.destroy = function() {
- var J = this, tt = J.axes, ot = J.series, lt = J.container, pt = lt && lt.parentNode, yt;
- for ($(J, "destroy"), J.renderer.forExport ? g(h, J) : h[J.index] = void 0, G.chartCount--, J.renderTo.removeAttribute("data-highcharts-chart"), ct(J), yt = tt.length; yt--; )
- tt[yt] = tt[yt].destroy();
- for (this.scroller && this.scroller.destroy && this.scroller.destroy(), yt = ot.length; yt--; )
- ot[yt] = ot[yt].destroy();
- "title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach(function(vt) {
- var Ct = J[vt];
- Ct && Ct.destroy && (J[vt] = Ct.destroy());
- }), lt && (lt.innerHTML = O.emptyHTML, ct(lt), pt && X(lt)), it(J, function(vt, Ct) {
- delete J[Ct];
- });
- }, at.prototype.firstRender = function() {
- var J = this, tt = J.options;
- (!J.isReadyToRender || J.isReadyToRender()) && (J.getContainer(), J.resetMargins(), J.setChartSize(), J.propFromSeries(), J.getAxes(), (A(tt.series) ? tt.series : []).forEach(function(ot) {
- J.initSeries(ot);
- }), J.linkSeries(), J.setSeriesData(), $(J, "beforeRender"), j && (F.isRequired() ? J.pointer = new F(J, tt) : J.pointer = new j(J, tt)), J.render(), J.pointer.getChartPosition(), !J.renderer.imgCount && !J.hasLoaded && J.onload(), J.temporaryDisplay(!0));
- }, at.prototype.onload = function() {
- this.callbacks.concat([this.callback]).forEach(function(J) {
- J && typeof this.index < "u" && J.apply(this, [this]);
- }, this), $(this, "load"), $(this, "render"), E(this.index) && this.setReflow(this.options.chart.reflow), this.hasLoaded = !0;
- }, at.prototype.addSeries = function(J, tt, ot) {
- var lt = this, pt;
- return J && (tt = et(tt, !0), $(lt, "addSeries", { options: J }, function() {
- pt = lt.initSeries(J), lt.isDirtyLegend = !0, lt.linkSeries(), pt.enabledDataSorting && pt.setData(J.data, !1), $(lt, "afterAddSeries", { series: pt }), tt && lt.redraw(ot);
- })), pt;
- }, at.prototype.addAxis = function(J, tt, ot, lt) {
- return this.createAxis(tt ? "xAxis" : "yAxis", { axis: J, redraw: ot, animation: lt });
- }, at.prototype.addColorAxis = function(J, tt, ot) {
- return this.createAxis("colorAxis", { axis: J, redraw: tt, animation: ot });
- }, at.prototype.createAxis = function(J, tt) {
- return J = new N(this, q(tt.axis, { index: this[J].length, isX: J === "xAxis" })), et(tt.redraw, !0) && this.redraw(tt.animation), J;
- }, at.prototype.showLoading = function(J) {
- var tt = this, ot = tt.options, lt = ot.loading, pt = function() {
- yt && W(yt, { left: tt.plotLeft + "px", top: tt.plotTop + "px", width: tt.plotWidth + "px", height: tt.plotHeight + "px" });
- }, yt = tt.loadingDiv, vt = tt.loadingSpan;
- yt || (tt.loadingDiv = yt = I("div", { className: "highcharts-loading highcharts-loading-hidden" }, null, tt.container)), vt || (tt.loadingSpan = vt = I(
- "span",
- { className: "highcharts-loading-inner" },
- null,
- yt
- ), n(tt, "redraw", pt)), yt.className = "highcharts-loading", O.setElementHTML(vt, et(J, ot.lang.loading, "")), tt.styledMode || (W(yt, L(lt.style, { zIndex: 10 })), W(vt, lt.labelStyle), tt.loadingShown || (W(yt, { opacity: 0, display: "" }), R(yt, { opacity: lt.style.opacity || 0.5 }, { duration: lt.showDuration || 0 }))), tt.loadingShown = !0, pt();
- }, at.prototype.hideLoading = function() {
- var J = this.options, tt = this.loadingDiv;
- tt && (tt.className = "highcharts-loading highcharts-loading-hidden", this.styledMode || R(tt, { opacity: 0 }, {
- duration: J.loading.hideDuration || 100,
- complete: function() {
- W(tt, { display: "none" });
- }
- })), this.loadingShown = !1;
- }, at.prototype.update = function(J, tt, ot, lt) {
- var pt = this, yt = { credits: "addCredits", title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }, vt = J.isResponsiveOptions, Ct = [], Pt, At;
- $(pt, "update", { options: J }), vt || pt.setResponsive(!1, !0), J = D(J, pt.options), pt.userOptions = q(pt.userOptions, J);
- var St = J.chart;
- if (St) {
- if (q(!0, pt.options.chart, St), "className" in St && pt.setClassName(St.className), "reflow" in St && pt.setReflow(St.reflow), "inverted" in St || "polar" in St || "type" in St) {
- pt.propFromSeries();
- var Dt = !0;
- }
- "alignTicks" in St && (Dt = !0), "events" in St && v(this, St), it(St, function(_t, Nt) {
- pt.propsRequireUpdateSeries.indexOf("chart." + Nt) !== -1 && (Pt = !0), pt.propsRequireDirtyBox.indexOf(Nt) !== -1 && (pt.isDirtyBox = !0), pt.propsRequireReflow.indexOf(Nt) !== -1 && (vt ? pt.isDirtyBox = !0 : At = !0);
- }), !pt.styledMode && St.style && pt.renderer.setStyle(pt.options.chart.style || {});
- }
- !pt.styledMode && J.colors && (this.options.colors = J.colors), J.time && (this.time === t && (this.time = new l(J.time)), q(!0, pt.options.time, J.time)), it(J, function(_t, Nt) {
- pt[Nt] && typeof pt[Nt].update == "function" ? pt[Nt].update(_t, !1) : typeof pt[yt[Nt]] == "function" ? pt[yt[Nt]](_t) : Nt !== "colors" && pt.collectionsWithUpdate.indexOf(Nt) === -1 && q(!0, pt.options[Nt], J[Nt]), Nt !== "chart" && pt.propsRequireUpdateSeries.indexOf(Nt) !== -1 && (Pt = !0);
- }), this.collectionsWithUpdate.forEach(function(_t) {
- if (J[_t]) {
- var Nt = [];
- pt[_t].forEach(function(Ot, Kt) {
- Ot.options.isInternal || Nt.push(et(Ot.options.index, Kt));
- }), gt(J[_t]).forEach(function(Ot, Kt) {
- var Gt = E(Ot.id), Wt;
- Gt && (Wt = pt.get(Ot.id)), !Wt && pt[_t] && (Wt = pt[_t][Nt ? Nt[Kt] : Kt]) && Gt && E(Wt.options.id) && (Wt = void 0), Wt && Wt.coll === _t && (Wt.update(Ot, !1), ot && (Wt.touched = !0)), !Wt && ot && pt.collectionsWithInit[_t] && (pt.collectionsWithInit[_t][0].apply(pt, [Ot].concat(pt.collectionsWithInit[_t][1] || []).concat([!1])).touched = !0);
- }), ot && pt[_t].forEach(function(Ot) {
- Ot.touched || Ot.options.isInternal ? delete Ot.touched : Ct.push(Ot);
- });
- }
- }), Ct.forEach(function(_t) {
- _t.chart && _t.remove && _t.remove(!1);
- }), Dt && pt.axes.forEach(function(_t) {
- _t.update({}, !1);
- }), Pt && pt.getSeriesOrderByLinks().forEach(function(_t) {
- _t.chart && _t.update({}, !1);
- }, this), Dt = St && St.width, St = St && (Z(St.height) ? rt(St.height, Dt || pt.chartWidth) : St.height), At || H(Dt) && Dt !== pt.chartWidth || H(St) && St !== pt.chartHeight ? pt.setSize(Dt, St, lt) : et(tt, !0) && pt.redraw(lt), $(pt, "afterUpdate", { options: J, redraw: tt, animation: lt });
- }, at.prototype.setSubtitle = function(J, tt) {
- this.applyDescription("subtitle", J), this.layOutTitles(tt);
- }, at.prototype.setCaption = function(J, tt) {
- this.applyDescription("caption", J), this.layOutTitles(tt);
- }, at.prototype.showResetZoom = function() {
- function J() {
- tt.zoomOut();
- }
- var tt = this, ot = a.lang, lt = tt.options.chart.resetZoomButton, pt = lt.theme, yt = pt.states, vt = lt.relativeTo === "chart" || lt.relativeTo === "spacingBox" ? null : "scrollablePlotBox";
- $(this, "beforeShowResetZoom", null, function() {
- tt.resetZoomButton = tt.renderer.button(ot.resetZoom, null, null, J, pt, yt && yt.hover).attr({ align: lt.position.align, title: ot.resetZoomTitle }).addClass("highcharts-reset-zoom").add().align(lt.position, !1, vt);
- }), $(this, "afterShowResetZoom");
- }, at.prototype.zoomOut = function() {
- $(this, "selection", { resetSelection: !0 }, this.zoom);
- }, at.prototype.zoom = function(J) {
- var tt = this, ot = tt.pointer, lt = tt.inverted ? ot.mouseDownX : ot.mouseDownY, pt = !1, yt;
- !J || J.resetSelection ? (tt.axes.forEach(function(Ct) {
- yt = Ct.zoom();
- }), ot.initiated = !1) : J.xAxis.concat(J.yAxis).forEach(function(Ct) {
- var Pt = Ct.axis, At = tt.inverted ? Pt.left : Pt.top, St = tt.inverted ? At + Pt.width : At + Pt.height, Dt = Pt.isXAxis, _t = !1;
- (!Dt && lt >= At && lt <= St || Dt || !E(lt)) && (_t = !0), ot[Dt ? "zoomX" : "zoomY"] && _t && (yt = Pt.zoom(Ct.min, Ct.max), Pt.displayBtn && (pt = !0));
- });
- var vt = tt.resetZoomButton;
- pt && !vt ? tt.showResetZoom() : !pt && Y(vt) && (tt.resetZoomButton = vt.destroy()), yt && tt.redraw(et(
- tt.options.chart.animation,
- J && J.animation,
- 100 > tt.pointCount
- ));
- }, at.prototype.pan = function(J, tt) {
- var ot = this, lt = ot.hoverPoints;
- tt = typeof tt == "object" ? tt : { enabled: tt, type: "x" };
- var pt = ot.options.chart, yt = ot.options.mapNavigation && ot.options.mapNavigation.enabled;
- pt && pt.panning && (pt.panning = tt);
- var vt = tt.type, Ct;
- $(this, "pan", { originalEvent: J }, function() {
- lt && lt.forEach(function(St) {
- St.setState();
- });
- var Pt = ot.xAxis;
- vt === "xy" ? Pt = Pt.concat(ot.yAxis) : vt === "y" && (Pt = ot.yAxis);
- var At = {};
- Pt.forEach(function(St) {
- if (St.options.panningEnabled && !St.options.isInternal) {
- var Dt = St.horiz, _t = J[Dt ? "chartX" : "chartY"];
- Dt = Dt ? "mouseDownX" : "mouseDownY";
- var Nt = ot[Dt], Ot = St.minPointOffset || 0, Kt = St.reversed && !ot.inverted || !St.reversed && ot.inverted ? -1 : 1, Gt = St.getExtremes(), Wt = St.toValue(Nt - _t, !0) + Ot * Kt, Jt = St.toValue(Nt + St.len - _t, !0) - (Ot * Kt || St.isXAxis && St.pointRangePadding || 0), be = Jt < Wt;
- Kt = St.hasVerticalPanning(), Nt = be ? Jt : Wt, Wt = be ? Wt : Jt;
- var Yt = St.panningState;
- !Kt || St.isXAxis || Yt && !Yt.isDirty || St.series.forEach(function(Vt) {
- var Me = Vt.getProcessedData(!0);
- Me = Vt.getExtremes(Me.yData, !0), Yt || (Yt = { startMin: Number.MAX_VALUE, startMax: -Number.MAX_VALUE }), H(Me.dataMin) && H(Me.dataMax) && (Yt.startMin = Math.min(et(Vt.options.threshold, 1 / 0), Me.dataMin, Yt.startMin), Yt.startMax = Math.max(et(Vt.options.threshold, -1 / 0), Me.dataMax, Yt.startMax));
- }), Kt = Math.min(et(Yt && Yt.startMin, Gt.dataMin), Ot ? Gt.min : St.toValue(St.toPixels(Gt.min) - St.minPixelPadding)), Jt = Math.max(et(Yt && Yt.startMax, Gt.dataMax), Ot ? Gt.max : St.toValue(St.toPixels(Gt.max) + St.minPixelPadding)), St.panningState = Yt, St.isOrdinal || (Ot = Kt - Nt, 0 < Ot && (Wt += Ot, Nt = Kt), Ot = Wt - Jt, 0 < Ot && (Wt = Jt, Nt -= Ot), St.series.length && Nt !== Gt.min && Wt !== Gt.max && Nt >= Kt && Wt <= Jt && (St.setExtremes(Nt, Wt, !1, !1, { trigger: "pan" }), ot.resetZoomButton || yt || Nt === Kt || Wt === Jt || !vt.match("y") || (ot.showResetZoom(), St.displayBtn = !1), Ct = !0), At[Dt] = _t);
- }
- }), it(At, function(St, Dt) {
- ot[Dt] = St;
- }), Ct && ot.redraw(!1), W(ot.container, { cursor: "move" });
- });
- }, at;
- }(), L(y.prototype, {
- callbacks: [],
- collectionsWithInit: { xAxis: [y.prototype.addAxis, [!0]], yAxis: [y.prototype.addAxis, [!1]], series: [y.prototype.addSeries] },
- collectionsWithUpdate: ["xAxis", "yAxis", "series"],
- propsRequireDirtyBox: "backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),
- propsRequireReflow: "margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),
- propsRequireUpdateSeries: "chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" ")
- }), y;
- }), C(o, "Core/Legend/LegendSymbol.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.merge, _ = y.pick, U;
- return function(G) {
- G.drawLineMarker = function(V) {
- var F = this.options, B = V.symbolWidth, j = V.symbolHeight, w = j / 2, x = this.chart.renderer, f = this.legendGroup;
- V = V.baseline - Math.round(0.3 * V.fontMetrics.b);
- var l = {}, T = F.marker;
- this.chart.styledMode || (l = { "stroke-width": F.lineWidth || 0 }, F.dashStyle && (l.dashstyle = F.dashStyle)), this.legendLine = x.path([["M", 0, V], ["L", B, V]]).addClass("highcharts-graph").attr(l).add(f), T && T.enabled !== !1 && B && (F = Math.min(_(T.radius, w), w), this.symbol.indexOf("url") === 0 && (T = N(T, { width: j, height: j }), F = 0), this.legendSymbol = B = x.symbol(this.symbol, B / 2 - F, V - F, 2 * F, 2 * F, T).addClass("highcharts-point").add(f), B.isMarker = !0);
- }, G.drawRectangle = function(V, F) {
- var B = V.symbolHeight, j = V.options.squareSymbol;
- F.legendSymbol = this.chart.renderer.rect(j ? (V.symbolWidth - B) / 2 : 0, V.baseline - B + 1, j ? B : V.symbolWidth, B, _(V.options.symbolRadius, B / 2)).addClass("highcharts-point").attr({ zIndex: 3 }).add(F.legendGroup);
- };
- }(U || (U = {})), U;
- }), C(o, "Core/Series/SeriesDefaults.js", [], function() {
- return { lineWidth: 2, allowPointSelect: !1, crisp: !0, showCheckbox: !1, animation: { duration: 1e3 }, events: {}, marker: { enabledThreshold: 2, lineColor: "#ffffff", lineWidth: 0, radius: 4, states: {
- normal: { animation: !0 },
- hover: { animation: { duration: 50 }, enabled: !0, radiusPlus: 2, lineWidthPlus: 1 },
- select: { fillColor: "#cccccc", lineColor: "#000000", lineWidth: 2 }
- } }, point: { events: {} }, dataLabels: { animation: {}, align: "center", defer: !0, formatter: function() {
- var y = this.series.chart.numberFormatter;
- return typeof this.y != "number" ? "" : y(this.y, -1);
- }, padding: 5, style: { fontSize: "11px", fontWeight: "bold", color: "contrast", textOutline: "1px contrast" }, verticalAlign: "bottom", x: 0, y: 0 }, cropThreshold: 300, opacity: 1, pointRange: 0, softThreshold: !0, states: {
- normal: { animation: !0 },
- hover: { animation: { duration: 50 }, lineWidthPlus: 1, marker: {}, halo: { size: 10, opacity: 0.25 } },
- select: { animation: { duration: 0 } },
- inactive: { animation: { duration: 50 }, opacity: 0.2 }
- }, stickyTracking: !0, turboThreshold: 1e3, findNearestPointBy: "x" };
- }), C(o, "Core/Series/Series.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/DefaultOptions.js"],
- o["Core/Foundation.js"],
- o["Core/Globals.js"],
- o["Core/Legend/LegendSymbol.js"],
- o["Core/Series/Point.js"],
- o["Core/Series/SeriesDefaults.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Renderer/SVG/SVGElement.js"],
- o["Core/Utilities.js"]
- ], function(y, N, _, U, G, V, F, B, j, w) {
- var x = y.animObject, f = y.setAnimation, l = N.defaultOptions, T = _.registerEventOptions, O = U.hasTouch, R = U.svg, k = U.win, b = B.seriesTypes, S = w.addEvent, v = w.arrayMax, h = w.arrayMin, c = w.clamp, u = w.cleanRecursively, i = w.correctFloat, p = w.defined, a = w.erase, t = w.error, s = w.extend, n = w.find, P = w.fireEvent, D = w.getNestedProperty, I = w.isArray, W = w.isNumber, E = w.isString, X = w.merge, g = w.objectEach, m = w.pick, L = w.removeEvent, z = w.splat, $ = w.syncTimeout;
- return y = function() {
- function Q() {
- this.zones = this.yAxis = this.xAxis = this.userOptions = this.tooltipOptions = this.processedYData = this.processedXData = this.points = this.options = this.linkedSeries = this.index = this.eventsToUnbind = this.eventOptions = this.data = this.chart = this._i = void 0;
- }
- return Q.prototype.init = function(A, H) {
- P(this, "init", { options: H });
- var Y = this, Z = A.series;
- this.eventsToUnbind = [], Y.chart = A, Y.options = Y.setOptions(H), H = Y.options, Y.linkedSeries = [], Y.bindAxes(), s(Y, { name: H.name, state: "", visible: H.visible !== !1, selected: H.selected === !0 }), T(this, H);
- var q = H.events;
- (q && q.click || H.point && H.point.events && H.point.events.click || H.allowPointSelect) && (A.runTrackerClick = !0), Y.getColor(), Y.getSymbol(), Y.parallelArrays.forEach(function(et) {
- Y[et + "Data"] || (Y[et + "Data"] = []);
- }), Y.isCartesian && (A.hasCartesianSeries = !0);
- var it;
- Z.length && (it = Z[Z.length - 1]), Y._i = m(it && it._i, -1) + 1, Y.opacity = Y.options.opacity, A.orderSeries(this.insert(Z)), H.dataSorting && H.dataSorting.enabled ? Y.setDataSortingOptions() : Y.points || Y.data || Y.setData(H.data, !1), P(this, "afterInit");
- }, Q.prototype.is = function(A) {
- return b[A] && this instanceof b[A];
- }, Q.prototype.insert = function(A) {
- var H = this.options.index, Y;
- if (W(H)) {
- for (Y = A.length; Y--; )
- if (H >= m(A[Y].options.index, A[Y]._i)) {
- A.splice(Y + 1, 0, this);
- break;
- }
- Y === -1 && A.unshift(this), Y += 1;
- } else
- A.push(this);
- return m(Y, A.length - 1);
- }, Q.prototype.bindAxes = function() {
- var A = this, H = A.options, Y = A.chart, Z;
- P(this, "bindAxes", null, function() {
- (A.axisTypes || []).forEach(function(q) {
- var it = 0;
- Y[q].forEach(function(et) {
- Z = et.options, (H[q] === it && !Z.isInternal || typeof H[q] < "u" && H[q] === Z.id || typeof H[q] > "u" && Z.index === 0) && (A.insert(et.series), A[q] = et, et.isDirty = !0), Z.isInternal || it++;
- }), A[q] || A.optionalAxis === q || t(18, !0, Y);
- });
- }), P(this, "afterBindAxes");
- }, Q.prototype.updateParallelArrays = function(A, H) {
- var Y = A.series, Z = arguments, q = W(H) ? function(it) {
- var et = it === "y" && Y.toYData ? Y.toYData(A) : A[it];
- Y[it + "Data"][H] = et;
- } : function(it) {
- Array.prototype[H].apply(Y[it + "Data"], Array.prototype.slice.call(Z, 2));
- };
- Y.parallelArrays.forEach(q);
- }, Q.prototype.hasData = function() {
- return this.visible && typeof this.dataMax < "u" && typeof this.dataMin < "u" || this.visible && this.yData && 0 < this.yData.length;
- }, Q.prototype.autoIncrement = function(A) {
- var H = this.options, Y = H.pointIntervalUnit, Z = H.relativeXValue, q = this.chart.time, it = this.xIncrement, et;
- return it = m(it, H.pointStart, 0), this.pointInterval = et = m(this.pointInterval, H.pointInterval, 1), Z && W(A) && (et *= A), Y && (H = new q.Date(it), Y === "day" ? q.set("Date", H, q.get("Date", H) + et) : Y === "month" ? q.set("Month", H, q.get("Month", H) + et) : Y === "year" && q.set("FullYear", H, q.get("FullYear", H) + et), et = H.getTime() - it), Z && W(A) ? it + et : (this.xIncrement = it + et, it);
- }, Q.prototype.setDataSortingOptions = function() {
- var A = this.options;
- s(this, { requireSorting: !1, sorted: !1, enabledDataSorting: !0, allowDG: !1 }), p(A.pointRange) || (A.pointRange = 1);
- }, Q.prototype.setOptions = function(A) {
- var H = this.chart, Y = H.options, Z = Y.plotOptions, q = H.userOptions || {};
- A = X(A), H = H.styledMode;
- var it = { plotOptions: Z, userOptions: A };
- P(this, "setOptions", it);
- var et = it.plotOptions[this.type], nt = q.plotOptions || {};
- return this.userOptions = it.userOptions, q = X(et, Z.series, q.plotOptions && q.plotOptions[this.type], A), this.tooltipOptions = X(l.tooltip, l.plotOptions.series && l.plotOptions.series.tooltip, l.plotOptions[this.type].tooltip, Y.tooltip.userOptions, Z.series && Z.series.tooltip, Z[this.type].tooltip, A.tooltip), this.stickyTracking = m(A.stickyTracking, nt[this.type] && nt[this.type].stickyTracking, nt.series && nt.series.stickyTracking, this.tooltipOptions.shared && !this.noSharedTooltip ? !0 : q.stickyTracking), et.marker === null && delete q.marker, this.zoneAxis = q.zoneAxis, Z = this.zones = (q.zones || []).slice(), !q.negativeColor && !q.negativeFillColor || q.zones || (Y = { value: q[this.zoneAxis + "Threshold"] || q.threshold || 0, className: "highcharts-negative" }, H || (Y.color = q.negativeColor, Y.fillColor = q.negativeFillColor), Z.push(Y)), Z.length && p(Z[Z.length - 1].value) && Z.push(H ? {} : { color: this.color, fillColor: this.fillColor }), P(this, "afterSetOptions", { options: q }), q;
- }, Q.prototype.getName = function() {
- return m(this.options.name, "Series " + (this.index + 1));
- }, Q.prototype.getCyclic = function(A, H, Y) {
- var Z = this.chart, q = this.userOptions, it = A + "Index", et = A + "Counter", nt = Y ? Y.length : m(Z.options.chart[A + "Count"], Z[A + "Count"]);
- if (!H) {
- var rt = m(q[it], q["_" + it]);
- p(rt) || (Z.series.length || (Z[et] = 0), q["_" + it] = rt = Z[et] % nt, Z[et] += 1), Y && (H = Y[rt]);
- }
- typeof rt < "u" && (this[it] = rt), this[A] = H;
- }, Q.prototype.getColor = function() {
- this.chart.styledMode ? this.getCyclic("color") : this.options.colorByPoint ? this.color = "#cccccc" : this.getCyclic("color", this.options.color || l.plotOptions[this.type].color, this.chart.options.colors);
- }, Q.prototype.getPointsCollection = function() {
- return (this.hasGroupedData ? this.points : this.data) || [];
- }, Q.prototype.getSymbol = function() {
- this.getCyclic("symbol", this.options.marker.symbol, this.chart.options.symbols);
- }, Q.prototype.findPointIndex = function(A, H) {
- var Y = A.id, Z = A.x, q = this.points, it = this.options.dataSorting, et, nt;
- if (Y)
- it = this.chart.get(Y), it instanceof V && (et = it);
- else if ((this.linkedParent || this.enabledDataSorting || this.options.relativeXValue) && (et = function(ct) {
- return !ct.touched && ct.index === A.index;
- }, it && it.matchByName ? et = function(ct) {
- return !ct.touched && ct.name === A.name;
- } : this.options.relativeXValue && (et = function(ct) {
- return !ct.touched && ct.options.x === A.x;
- }), et = n(q, et), !et))
- return;
- if (et) {
- var rt = et && et.index;
- typeof rt < "u" && (nt = !0);
- }
- return typeof rt > "u" && W(Z) && (rt = this.xData.indexOf(Z, H)), rt !== -1 && typeof rt < "u" && this.cropped && (rt = rt >= this.cropStart ? rt - this.cropStart : rt), !nt && W(rt) && q[rt] && q[rt].touched && (rt = void 0), rt;
- }, Q.prototype.updateData = function(A, H) {
- var Y = this.options, Z = Y.dataSorting, q = this.points, it = [], et = this.requireSorting, nt = A.length === q.length, rt, ct, gt, dt = !0;
- if (this.xIncrement = null, A.forEach(function(ht, at) {
- var J = p(ht) && this.pointClass.prototype.optionsToObject.call({ series: this }, ht) || {}, tt = J.x;
- J.id || W(tt) ? (J = this.findPointIndex(J, gt), J === -1 || typeof J > "u" ? it.push(ht) : q[J] && ht !== Y.data[J] ? (q[J].update(ht, !1, null, !1), q[J].touched = !0, et && (gt = J + 1)) : q[J] && (q[J].touched = !0), (!nt || at !== J || Z && Z.enabled || this.hasDerivedData) && (rt = !0)) : it.push(ht);
- }, this), rt)
- for (A = q.length; A--; )
- (ct = q[A]) && !ct.touched && ct.remove && ct.remove(!1, H);
- else
- !nt || Z && Z.enabled ? dt = !1 : (A.forEach(function(ht, at) {
- ht !== q[at].y && q[at].update && q[at].update(
- ht,
- !1,
- null,
- !1
- );
- }), it.length = 0);
- return q.forEach(function(ht) {
- ht && (ht.touched = !1);
- }), dt ? (it.forEach(function(ht) {
- this.addPoint(ht, !1, null, null, !1);
- }, this), this.xIncrement === null && this.xData && this.xData.length && (this.xIncrement = v(this.xData), this.autoIncrement()), !0) : !1;
- }, Q.prototype.setData = function(A, H, Y, Z) {
- var q = this, it = q.points, et = it && it.length || 0, nt = q.options, rt = q.chart, ct = nt.dataSorting, gt = q.xAxis, dt = nt.turboThreshold, ht = this.xData, at = this.yData, J = q.pointArrayMap;
- J = J && J.length;
- var tt = nt.keys, ot, lt = 0, pt = 1, yt = null;
- A = A || [];
- var vt = A.length;
- if (H = m(H, !0), ct && ct.enabled && (A = this.sortData(A)), Z !== !1 && vt && et && !q.cropped && !q.hasGroupedData && q.visible && !q.isSeriesBoosting && (ot = this.updateData(A, Y)), !ot) {
- if (q.xIncrement = null, q.colorCounter = 0, this.parallelArrays.forEach(function(Ct) {
- q[Ct + "Data"].length = 0;
- }), dt && vt > dt)
- if (yt = q.getFirstValidPoint(A), W(yt))
- for (Y = 0; Y < vt; Y++)
- ht[Y] = this.autoIncrement(), at[Y] = A[Y];
- else if (I(yt))
- if (J)
- if (yt.length === J)
- for (Y = 0; Y < vt; Y++)
- ht[Y] = this.autoIncrement(), at[Y] = A[Y];
- else
- for (Y = 0; Y < vt; Y++)
- Z = A[Y], ht[Y] = Z[0], at[Y] = Z.slice(
- 1,
- J + 1
- );
- else if (tt && (lt = tt.indexOf("x"), pt = tt.indexOf("y"), lt = 0 <= lt ? lt : 0, pt = 0 <= pt ? pt : 1), yt.length === 1 && (pt = 0), lt === pt)
- for (Y = 0; Y < vt; Y++)
- ht[Y] = this.autoIncrement(), at[Y] = A[Y][pt];
- else
- for (Y = 0; Y < vt; Y++)
- Z = A[Y], ht[Y] = Z[lt], at[Y] = Z[pt];
- else
- t(12, !1, rt);
- else
- for (Y = 0; Y < vt; Y++)
- typeof A[Y] < "u" && (Z = { series: q }, q.pointClass.prototype.applyOptions.apply(Z, [A[Y]]), q.updateParallelArrays(Z, Y));
- for (at && E(at[0]) && t(14, !0, rt), q.data = [], q.options.data = q.userOptions.data = A, Y = et; Y--; )
- it[Y] && it[Y].destroy && it[Y].destroy();
- gt && (gt.minRange = gt.userMinRange), q.isDirty = rt.isDirtyBox = !0, q.isDirtyData = !!it, Y = !1;
- }
- nt.legendType === "point" && (this.processData(), this.generatePoints()), H && rt.redraw(Y);
- }, Q.prototype.sortData = function(A) {
- var H = this, Y = H.options.dataSorting.sortKey || "y", Z = function(q, it) {
- return p(it) && q.pointClass.prototype.optionsToObject.call({ series: q }, it) || {};
- };
- return A.forEach(function(q, it) {
- A[it] = Z(H, q), A[it].index = it;
- }, this), A.concat().sort(function(q, it) {
- return q = D(Y, q), it = D(Y, it), it < q ? -1 : it > q ? 1 : 0;
- }).forEach(function(q, it) {
- q.x = it;
- }, this), H.linkedSeries && H.linkedSeries.forEach(function(q) {
- var it = q.options, et = it.data;
- it.dataSorting && it.dataSorting.enabled || !et || (et.forEach(function(nt, rt) {
- et[rt] = Z(q, nt), A[rt] && (et[rt].x = A[rt].x, et[rt].index = rt);
- }), q.setData(et, !1));
- }), A;
- }, Q.prototype.getProcessedData = function(A) {
- var H = this.xAxis, Y = this.options, Z = Y.cropThreshold, q = A || this.getExtremesFromAll || Y.getExtremesFromAll, it = this.isCartesian;
- A = H && H.val2lin, Y = !(!H || !H.logarithmic);
- var et = 0, nt = this.xData, rt = this.yData, ct = this.requireSorting, gt = !1, dt = nt.length;
- if (H) {
- gt = H.getExtremes();
- var ht = gt.min, at = gt.max;
- gt = H.categories && !H.names.length;
- }
- if (it && this.sorted && !q && (!Z || dt > Z || this.forceCrop)) {
- if (nt[dt - 1] < ht || nt[0] > at)
- nt = [], rt = [];
- else if (this.yData && (nt[0] < ht || nt[dt - 1] > at)) {
- var J = this.cropData(this.xData, this.yData, ht, at);
- nt = J.xData, rt = J.yData, et = J.start, J = !0;
- }
- }
- for (Z = nt.length || 1; --Z; )
- if (H = Y ? A(nt[Z]) - A(nt[Z - 1]) : nt[Z] - nt[Z - 1], 0 < H && (typeof tt > "u" || H < tt))
- var tt = H;
- else
- 0 > H && ct && !gt && (t(15, !1, this.chart), ct = !1);
- return { xData: nt, yData: rt, cropped: J, cropStart: et, closestPointRange: tt };
- }, Q.prototype.processData = function(A) {
- var H = this.xAxis;
- if (this.isCartesian && !this.isDirty && !H.isDirty && !this.yAxis.isDirty && !A)
- return !1;
- A = this.getProcessedData(), this.cropped = A.cropped, this.cropStart = A.cropStart, this.processedXData = A.xData, this.processedYData = A.yData, this.closestPointRange = this.basePointRange = A.closestPointRange, P(this, "afterProcessData");
- }, Q.prototype.cropData = function(A, H, Y, Z, q) {
- var it = A.length, et, nt = 0, rt = it;
- for (q = m(q, this.cropShoulder), et = 0; et < it; et++)
- if (A[et] >= Y) {
- nt = Math.max(0, et - q);
- break;
- }
- for (Y = et; Y < it; Y++)
- if (A[Y] > Z) {
- rt = Y + q;
- break;
- }
- return { xData: A.slice(nt, rt), yData: H.slice(
- nt,
- rt
- ), start: nt, end: rt };
- }, Q.prototype.generatePoints = function() {
- var A = this.options, H = A.data, Y = this.processedXData, Z = this.processedYData, q = this.pointClass, it = Y.length, et = this.cropStart || 0, nt = this.hasGroupedData, rt = A.keys, ct = [];
- A = A.dataGrouping && A.dataGrouping.groupAll ? et : 0;
- var gt, dt, ht = this.data;
- if (!ht && !nt) {
- var at = [];
- at.length = H.length, ht = this.data = at;
- }
- for (rt && nt && (this.options.keys = !1), dt = 0; dt < it; dt++) {
- if (at = et + dt, nt) {
- var J = new q().init(this, [Y[dt]].concat(z(Z[dt])));
- J.dataGroup = this.groupMap[A + dt], J.dataGroup.options && (J.options = J.dataGroup.options, s(J, J.dataGroup.options), delete J.dataLabels);
- } else
- (J = ht[at]) || typeof H[at] > "u" || (ht[at] = J = new q().init(this, H[at], Y[dt]));
- J && (J.index = nt ? A + dt : at, ct[dt] = J);
- }
- if (this.options.keys = rt, ht && (it !== (gt = ht.length) || nt))
- for (dt = 0; dt < gt; dt++)
- dt !== et || nt || (dt += it), ht[dt] && (ht[dt].destroyElements(), ht[dt].plotX = void 0);
- this.data = ht, this.points = ct, P(this, "afterGeneratePoints");
- }, Q.prototype.getXExtremes = function(A) {
- return { min: h(A), max: v(A) };
- }, Q.prototype.getExtremes = function(A, H) {
- var Y = this.xAxis, Z = this.yAxis, q = this.processedXData || this.xData, it = [], et = this.requireSorting ? this.cropShoulder : 0;
- Z = Z ? Z.positiveValuesOnly : !1;
- var nt, rt = 0, ct = 0, gt = 0;
- A = A || this.stackedYData || this.processedYData || [];
- var dt = A.length;
- if (Y) {
- var ht = Y.getExtremes();
- rt = ht.min, ct = ht.max;
- }
- for (nt = 0; nt < dt; nt++) {
- var at = q[nt];
- ht = A[nt];
- var J = (W(ht) || I(ht)) && (ht.length || 0 < ht || !Z);
- if (at = H || this.getExtremesFromAll || this.options.getExtremesFromAll || this.cropped || !Y || (q[nt + et] || at) >= rt && (q[nt - et] || at) <= ct, J && at)
- if (J = ht.length)
- for (; J--; )
- W(ht[J]) && (it[gt++] = ht[J]);
- else
- it[gt++] = ht;
- }
- return A = { activeYData: it, dataMin: h(it), dataMax: v(it) }, P(this, "afterGetExtremes", { dataExtremes: A }), A;
- }, Q.prototype.applyExtremes = function() {
- var A = this.getExtremes();
- return this.dataMin = A.dataMin, this.dataMax = A.dataMax, A;
- }, Q.prototype.getFirstValidPoint = function(A) {
- for (var H = A.length, Y = 0, Z = null; Z === null && Y < H; )
- Z = A[Y], Y++;
- return Z;
- }, Q.prototype.translate = function() {
- this.processedXData || this.processData(), this.generatePoints();
- var A = this.options, H = A.stacking, Y = this.xAxis, Z = Y.categories, q = this.enabledDataSorting, it = this.yAxis, et = this.points, nt = et.length, rt = this.pointPlacementToXValue(), ct = !!rt, gt = A.threshold, dt = A.startFromThreshold ? gt : 0, ht = this.zoneAxis || "y", at, J, tt = Number.MAX_VALUE;
- for (at = 0; at < nt; at++) {
- var ot = et[at], lt = ot.x, pt = void 0, yt = void 0, vt = ot.y, Ct = ot.low, Pt = H && it.stacking && it.stacking.stacks[(this.negStacks && vt < (dt ? 0 : gt) ? "-" : "") + this.stackKey];
- if ((it.positiveValuesOnly && !it.validatePositiveValue(vt) || Y.positiveValuesOnly && !Y.validatePositiveValue(lt)) && (ot.isNull = !0), ot.plotX = J = i(c(Y.translate(lt, 0, 0, 0, 1, rt, this.type === "flags"), -1e5, 1e5)), H && this.visible && Pt && Pt[lt]) {
- var At = this.getStackIndicator(
- At,
- lt,
- this.index
- );
- ot.isNull || (pt = Pt[lt], yt = pt.points[At.key]);
- }
- if (I(yt) && (Ct = yt[0], vt = yt[1], Ct === dt && At.key === Pt[lt].base && (Ct = m(W(gt) && gt, it.min)), it.positiveValuesOnly && 0 >= Ct && (Ct = null), ot.total = ot.stackTotal = pt.total, ot.percentage = pt.total && ot.y / pt.total * 100, ot.stackY = vt, this.irregularWidths || pt.setOffset(this.pointXOffset || 0, this.barW || 0)), ot.yBottom = p(Ct) ? c(it.translate(Ct, 0, 1, 0, 1), -1e5, 1e5) : null, this.dataModify && (vt = this.dataModify.modifyValue(vt, at)), ot.plotY = void 0, W(vt) && (pt = it.translate(vt, !1, !0, !1, !0), typeof pt < "u" && (ot.plotY = c(
- pt,
- -1e5,
- 1e5
- ))), ot.isInside = this.isPointInside(ot), ot.clientX = ct ? i(Y.translate(lt, 0, 0, 0, 1, rt)) : J, ot.negative = ot[ht] < (A[ht + "Threshold"] || gt || 0), ot.category = Z && typeof Z[ot.x] < "u" ? Z[ot.x] : ot.x, !ot.isNull && ot.visible !== !1) {
- typeof St < "u" && (tt = Math.min(tt, Math.abs(J - St)));
- var St = J;
- }
- ot.zone = this.zones.length ? ot.getZone() : void 0, !ot.graphic && this.group && q && (ot.isNew = !0);
- }
- this.closestPointRangePx = tt, P(this, "afterTranslate");
- }, Q.prototype.getValidPoints = function(A, H, Y) {
- var Z = this.chart;
- return (A || this.points || []).filter(function(q) {
- return H && !Z.isInsidePlot(q.plotX, q.plotY, { inverted: Z.inverted }) ? !1 : q.visible !== !1 && (Y || !q.isNull);
- });
- }, Q.prototype.getClipBox = function() {
- var A = this.chart, H = this.xAxis, Y = this.yAxis, Z = X(A.clipBox);
- return H && H.len !== A.plotSizeX && (Z.width = H.len), Y && Y.len !== A.plotSizeY && (Z.height = Y.len), Z;
- }, Q.prototype.getSharedClipKey = function() {
- return this.sharedClipKey = (this.options.xAxis || 0) + "," + (this.options.yAxis || 0);
- }, Q.prototype.setClip = function() {
- var A = this.chart, H = this.group, Y = this.markerGroup, Z = A.sharedClips;
- A = A.renderer;
- var q = this.getClipBox(), it = this.getSharedClipKey(), et = Z[it];
- et ? et.animate(q) : Z[it] = et = A.clipRect(q), H && H.clip(this.options.clip === !1 ? void 0 : et), Y && Y.clip();
- }, Q.prototype.animate = function(A) {
- var H = this.chart, Y = this.group, Z = this.markerGroup, q = H.inverted, it = x(this.options.animation), et = [this.getSharedClipKey(), it.duration, it.easing, it.defer].join(), nt = H.sharedClips[et], rt = H.sharedClips[et + "m"];
- if (A && Y)
- it = this.getClipBox(), nt ? nt.attr("height", it.height) : (it.width = 0, q && (it.x = H.plotHeight), nt = H.renderer.clipRect(it), H.sharedClips[et] = nt, rt = H.renderer.clipRect({ x: q ? (H.plotSizeX || 0) + 99 : -99, y: q ? -H.plotLeft : -H.plotTop, width: 99, height: q ? H.chartWidth : H.chartHeight }), H.sharedClips[et + "m"] = rt), Y.clip(nt), Z && Z.clip(rt);
- else if (nt && !nt.hasClass("highcharts-animating")) {
- H = this.getClipBox();
- var ct = it.step;
- Z && Z.element.childNodes.length && (it.step = function(gt, dt) {
- ct && ct.apply(dt, arguments), rt && rt.element && rt.attr(dt.prop, dt.prop === "width" ? gt + 99 : gt);
- }), nt.addClass("highcharts-animating").animate(H, it);
- }
- }, Q.prototype.afterAnimate = function() {
- var A = this;
- this.setClip(), g(
- this.chart.sharedClips,
- function(H, Y, Z) {
- H && !A.chart.container.querySelector('[clip-path="url(#' + H.id + ')"]') && (H.destroy(), delete Z[Y]);
- }
- ), this.finishedAnimating = !0, P(this, "afterAnimate");
- }, Q.prototype.drawPoints = function() {
- var A = this.points, H = this.chart, Y = this.options.marker, Z = this[this.specialGroup] || this.markerGroup, q = this.xAxis, it = m(Y.enabled, !q || q.isRadial ? !0 : null, this.closestPointRangePx >= Y.enabledThreshold * Y.radius), et, nt;
- if (Y.enabled !== !1 || this._hasPointMarkers)
- for (et = 0; et < A.length; et++) {
- var rt = A[et], ct = (nt = rt.graphic) ? "animate" : "attr", gt = rt.marker || {}, dt = !!rt.marker;
- if ((it && typeof gt.enabled > "u" || gt.enabled) && !rt.isNull && rt.visible !== !1) {
- var ht = m(gt.symbol, this.symbol, "rect"), at = this.markerAttribs(rt, rt.selected && "select");
- this.enabledDataSorting && (rt.startXPos = q.reversed ? -(at.width || 0) : q.width);
- var J = rt.isInside !== !1;
- nt ? nt[J ? "show" : "hide"](J).animate(at) : J && (0 < (at.width || 0) || rt.hasImage) && (rt.graphic = nt = H.renderer.symbol(ht, at.x, at.y, at.width, at.height, dt ? gt : Y).add(Z), this.enabledDataSorting && H.hasRendered && (nt.attr({ x: rt.startXPos }), ct = "animate")), nt && ct === "animate" && nt[J ? "show" : "hide"](J).animate(at), nt && !H.styledMode && nt[ct](this.pointAttribs(rt, rt.selected && "select")), nt && nt.addClass(rt.getClassName(), !0);
- } else
- nt && (rt.graphic = nt.destroy());
- }
- }, Q.prototype.markerAttribs = function(A, H) {
- var Y = this.options, Z = Y.marker, q = A.marker || {}, it = q.symbol || Z.symbol, et = m(q.radius, Z.radius);
- return H && (Z = Z.states[H], H = q.states && q.states[H], et = m(H && H.radius, Z && Z.radius, et + (Z && Z.radiusPlus || 0))), A.hasImage = it && it.indexOf("url") === 0, A.hasImage && (et = 0), A = { x: Y.crisp ? Math.floor(A.plotX - et) : A.plotX - et, y: A.plotY - et }, et && (A.width = A.height = 2 * et), A;
- }, Q.prototype.pointAttribs = function(A, H) {
- var Y = this.options.marker, Z = A && A.options, q = Z && Z.marker || {}, it = Z && Z.color, et = A && A.color, nt = A && A.zone && A.zone.color, rt = this.color;
- return A = m(q.lineWidth, Y.lineWidth), Z = 1, rt = it || nt || et || rt, it = q.fillColor || Y.fillColor || rt, et = q.lineColor || Y.lineColor || rt, H = H || "normal", Y = Y.states[H] || {}, H = q.states && q.states[H] || {}, A = m(H.lineWidth, Y.lineWidth, A + m(H.lineWidthPlus, Y.lineWidthPlus, 0)), it = H.fillColor || Y.fillColor || it, et = H.lineColor || Y.lineColor || et, Z = m(H.opacity, Y.opacity, Z), { stroke: et, "stroke-width": A, fill: it, opacity: Z };
- }, Q.prototype.destroy = function(A) {
- var H = this, Y = H.chart, Z = /AppleWebKit\/533/.test(k.navigator.userAgent), q = H.data || [], it, et, nt, rt;
- for (P(H, "destroy"), this.removeEvents(A), (H.axisTypes || []).forEach(function(ct) {
- (rt = H[ct]) && rt.series && (a(rt.series, H), rt.isDirty = rt.forceRedraw = !0);
- }), H.legendItem && H.chart.legend.destroyItem(H), et = q.length; et--; )
- (nt = q[et]) && nt.destroy && nt.destroy();
- H.clips && H.clips.forEach(function(ct) {
- return ct.destroy();
- }), w.clearTimeout(H.animationTimeout), g(H, function(ct, gt) {
- ct instanceof j && !ct.survive && (it = Z && gt === "group" ? "hide" : "destroy", ct[it]());
- }), Y.hoverSeries === H && (Y.hoverSeries = void 0), a(Y.series, H), Y.orderSeries(), g(H, function(ct, gt) {
- A && gt === "hcEvents" || delete H[gt];
- });
- }, Q.prototype.applyZones = function() {
- var A = this, H = this.chart, Y = H.renderer, Z = this.zones, q = this.clips || [], it = this.graph, et = this.area, nt = Math.max(H.chartWidth, H.chartHeight), rt = this[(this.zoneAxis || "y") + "Axis"], ct = H.inverted, gt, dt, ht, at, J, tt, ot, lt, pt = !1;
- if (Z.length && (it || et) && rt && typeof rt.min < "u") {
- var yt = rt.reversed, vt = rt.horiz;
- it && !this.showLine && it.hide(), et && et.hide();
- var Ct = rt.getExtremes();
- Z.forEach(function(Pt, At) {
- gt = yt ? vt ? H.plotWidth : 0 : vt ? 0 : rt.toPixels(Ct.min) || 0, gt = c(m(dt, gt), 0, nt), dt = c(Math.round(rt.toPixels(m(Pt.value, Ct.max), !0) || 0), 0, nt), pt && (gt = dt = rt.toPixels(Ct.max)), at = Math.abs(gt - dt), J = Math.min(gt, dt), tt = Math.max(gt, dt), rt.isXAxis ? (ht = { x: ct ? tt : J, y: 0, width: at, height: nt }, vt || (ht.x = H.plotHeight - ht.x)) : (ht = { x: 0, y: ct ? tt : J, width: nt, height: at }, vt && (ht.y = H.plotWidth - ht.y)), ct && Y.isVML && (ht = rt.isXAxis ? {
- x: 0,
- y: yt ? J : tt,
- height: ht.width,
- width: H.chartWidth
- } : { x: ht.y - H.plotLeft - H.spacingBox.x, y: 0, width: ht.height, height: H.chartHeight }), q[At] ? q[At].animate(ht) : q[At] = Y.clipRect(ht), ot = A["zone-area-" + At], lt = A["zone-graph-" + At], it && lt && lt.clip(q[At]), et && ot && ot.clip(q[At]), pt = Pt.value > Ct.max, A.resetZones && dt === 0 && (dt = void 0);
- }), this.clips = q;
- } else
- A.visible && (it && it.show(!0), et && et.show(!0));
- }, Q.prototype.invertGroups = function(A) {
- function H() {
- ["group", "markerGroup"].forEach(function(q) {
- Y[q] && (Z.renderer.isVML && Y[q].attr({ width: Y.yAxis.len, height: Y.xAxis.len }), Y[q].width = Y.yAxis.len, Y[q].height = Y.xAxis.len, Y[q].invert(Y.isRadialSeries ? !1 : A));
- });
- }
- var Y = this, Z = Y.chart;
- Y.xAxis && (Y.eventsToUnbind.push(S(Z, "resize", H)), H(), Y.invertGroups = H);
- }, Q.prototype.plotGroup = function(A, H, Y, Z, q) {
- var it = this[A], et = !it;
- return Y = { visibility: Y, zIndex: Z || 0.1 }, typeof this.opacity > "u" || this.chart.styledMode || this.state === "inactive" || (Y.opacity = this.opacity), et && (this[A] = it = this.chart.renderer.g().add(q)), it.addClass("highcharts-" + H + " highcharts-series-" + this.index + " highcharts-" + this.type + "-series " + (p(this.colorIndex) ? "highcharts-color-" + this.colorIndex + " " : "") + (this.options.className || "") + (it.hasClass("highcharts-tracker") ? " highcharts-tracker" : ""), !0), it.attr(Y)[et ? "attr" : "animate"](this.getPlotBox()), it;
- }, Q.prototype.getPlotBox = function() {
- var A = this.chart, H = this.xAxis, Y = this.yAxis;
- return A.inverted && (H = Y, Y = this.xAxis), { translateX: H ? H.left : A.plotLeft, translateY: Y ? Y.top : A.plotTop, scaleX: 1, scaleY: 1 };
- }, Q.prototype.removeEvents = function(A) {
- A || L(this), this.eventsToUnbind.length && (this.eventsToUnbind.forEach(function(H) {
- H();
- }), this.eventsToUnbind.length = 0);
- }, Q.prototype.render = function() {
- var A = this, H = A.chart, Y = A.options, Z = x(Y.animation), q = A.visible ? "inherit" : "hidden", it = Y.zIndex, et = A.hasRendered, nt = H.seriesGroup, rt = H.inverted;
- H = !A.finishedAnimating && H.renderer.isSVG ? Z.duration : 0, P(this, "render");
- var ct = A.plotGroup("group", "series", q, it, nt);
- A.markerGroup = A.plotGroup("markerGroup", "markers", q, it, nt), Y.clip !== !1 && A.setClip(), A.animate && H && A.animate(!0), ct.inverted = m(A.invertible, A.isCartesian) ? rt : !1, A.drawGraph && (A.drawGraph(), A.applyZones()), A.visible && A.drawPoints(), A.drawDataLabels && A.drawDataLabels(), A.redrawPoints && A.redrawPoints(), A.drawTracker && A.options.enableMouseTracking !== !1 && A.drawTracker(), A.invertGroups(rt), A.animate && H && A.animate(), et || (H && Z.defer && (H += Z.defer), A.animationTimeout = $(function() {
- A.afterAnimate();
- }, H || 0)), A.isDirty = !1, A.hasRendered = !0, P(A, "afterRender");
- }, Q.prototype.redraw = function() {
- var A = this.chart, H = this.isDirty || this.isDirtyData, Y = this.group, Z = this.xAxis, q = this.yAxis;
- Y && (A.inverted && Y.attr({
- width: A.plotWidth,
- height: A.plotHeight
- }), Y.animate({ translateX: m(Z && Z.left, A.plotLeft), translateY: m(q && q.top, A.plotTop) })), this.translate(), this.render(), H && delete this.kdTree;
- }, Q.prototype.searchPoint = function(A, H) {
- var Y = this.xAxis, Z = this.yAxis, q = this.chart.inverted;
- return this.searchKDTree({ clientX: q ? Y.len - A.chartY + Y.pos : A.chartX - Y.pos, plotY: q ? Z.len - A.chartX + Z.pos : A.chartY - Z.pos }, H, A);
- }, Q.prototype.buildKDTree = function(A) {
- function H(q, it, et) {
- var nt = q && q.length;
- if (nt) {
- var rt = Y.kdAxisArray[it % et];
- return q.sort(function(ct, gt) {
- return ct[rt] - gt[rt];
- }), nt = Math.floor(nt / 2), { point: q[nt], left: H(q.slice(0, nt), it + 1, et), right: H(q.slice(nt + 1), it + 1, et) };
- }
- }
- this.buildingKdTree = !0;
- var Y = this, Z = -1 < Y.options.findNearestPointBy.indexOf("y") ? 2 : 1;
- delete Y.kdTree, $(function() {
- Y.kdTree = H(Y.getValidPoints(null, !Y.directTouch), Z, Z), Y.buildingKdTree = !1;
- }, Y.options.kdNow || A && A.type === "touchstart" ? 0 : 1);
- }, Q.prototype.searchKDTree = function(A, H, Y) {
- function Z(rt, ct, gt, dt) {
- var ht = ct.point, at = q.kdAxisArray[gt % dt], J = ht, tt = p(rt[it]) && p(ht[it]) ? Math.pow(rt[it] - ht[it], 2) : null, ot = p(rt[et]) && p(ht[et]) ? Math.pow(rt[et] - ht[et], 2) : null;
- return ot = (tt || 0) + (ot || 0), ht.dist = p(ot) ? Math.sqrt(ot) : Number.MAX_VALUE, ht.distX = p(tt) ? Math.sqrt(tt) : Number.MAX_VALUE, at = rt[at] - ht[at], ot = 0 > at ? "left" : "right", tt = 0 > at ? "right" : "left", ct[ot] && (ot = Z(rt, ct[ot], gt + 1, dt), J = ot[nt] < J[nt] ? ot : ht), ct[tt] && Math.sqrt(at * at) < J[nt] && (rt = Z(rt, ct[tt], gt + 1, dt), J = rt[nt] < J[nt] ? rt : J), J;
- }
- var q = this, it = this.kdAxisArray[0], et = this.kdAxisArray[1], nt = H ? "distX" : "dist";
- if (H = -1 < q.options.findNearestPointBy.indexOf("y") ? 2 : 1, this.kdTree || this.buildingKdTree || this.buildKDTree(Y), this.kdTree)
- return Z(
- A,
- this.kdTree,
- H,
- H
- );
- }, Q.prototype.pointPlacementToXValue = function() {
- var A = this.options, H = A.pointRange, Y = this.xAxis;
- return A = A.pointPlacement, A === "between" && (A = Y.reversed ? -0.5 : 0.5), W(A) ? A * (H || Y.pointRange) : 0;
- }, Q.prototype.isPointInside = function(A) {
- var H = this.chart, Y = this.xAxis, Z = this.yAxis;
- return typeof A.plotY < "u" && typeof A.plotX < "u" && 0 <= A.plotY && A.plotY <= (Z ? Z.len : H.plotHeight) && 0 <= A.plotX && A.plotX <= (Y ? Y.len : H.plotWidth);
- }, Q.prototype.drawTracker = function() {
- var A = this, H = A.options, Y = H.trackByArea, Z = [].concat(Y ? A.areaPath : A.graphPath), q = A.chart, it = q.pointer, et = q.renderer, nt = q.options.tooltip.snap, rt = A.tracker, ct = function(dt) {
- q.hoverSeries !== A && A.onMouseOver();
- }, gt = "rgba(192,192,192," + (R ? 1e-4 : 2e-3) + ")";
- rt ? rt.attr({ d: Z }) : A.graph && (A.tracker = et.path(Z).attr({ visibility: A.visible ? "visible" : "hidden", zIndex: 2 }).addClass(Y ? "highcharts-tracker-area" : "highcharts-tracker-line").add(A.group), q.styledMode || A.tracker.attr({ "stroke-linecap": "round", "stroke-linejoin": "round", stroke: gt, fill: Y ? gt : "none", "stroke-width": A.graph.strokeWidth() + (Y ? 0 : 2 * nt) }), [A.tracker, A.markerGroup, A.dataLabelsGroup].forEach(function(dt) {
- dt && (dt.addClass("highcharts-tracker").on("mouseover", ct).on("mouseout", function(ht) {
- it.onTrackerMouseOut(ht);
- }), H.cursor && !q.styledMode && dt.css({ cursor: H.cursor }), O) && dt.on("touchstart", ct);
- })), P(this, "afterDrawTracker");
- }, Q.prototype.addPoint = function(A, H, Y, Z, q) {
- var it = this.options, et = this.data, nt = this.chart, rt = this.xAxis;
- rt = rt && rt.hasNames && rt.names;
- var ct = it.data, gt = this.xData, dt;
- H = m(H, !0);
- var ht = { series: this };
- this.pointClass.prototype.applyOptions.apply(
- ht,
- [A]
- );
- var at = ht.x, J = gt.length;
- if (this.requireSorting && at < gt[J - 1])
- for (dt = !0; J && gt[J - 1] > at; )
- J--;
- this.updateParallelArrays(ht, "splice", J, 0, 0), this.updateParallelArrays(ht, J), rt && ht.name && (rt[at] = ht.name), ct.splice(J, 0, A), dt && (this.data.splice(J, 0, null), this.processData()), it.legendType === "point" && this.generatePoints(), Y && (et[0] && et[0].remove ? et[0].remove(!1) : (et.shift(), this.updateParallelArrays(ht, "shift"), ct.shift())), q !== !1 && P(this, "addPoint", { point: ht }), this.isDirtyData = this.isDirty = !0, H && nt.redraw(Z);
- }, Q.prototype.removePoint = function(A, H, Y) {
- var Z = this, q = Z.data, it = q[A], et = Z.points, nt = Z.chart, rt = function() {
- et && et.length === q.length && et.splice(A, 1), q.splice(A, 1), Z.options.data.splice(A, 1), Z.updateParallelArrays(it || { series: Z }, "splice", A, 1), it && it.destroy(), Z.isDirty = !0, Z.isDirtyData = !0, H && nt.redraw();
- };
- f(Y, nt), H = m(H, !0), it ? it.firePointEvent("remove", null, rt) : rt();
- }, Q.prototype.remove = function(A, H, Y, Z) {
- function q() {
- it.destroy(Z), et.isDirtyLegend = et.isDirtyBox = !0, et.linkSeries(), m(A, !0) && et.redraw(H);
- }
- var it = this, et = it.chart;
- Y !== !1 ? P(
- it,
- "remove",
- null,
- q
- ) : q();
- }, Q.prototype.update = function(A, H) {
- A = u(A, this.userOptions), P(this, "update", { options: A });
- var Y = this, Z = Y.chart, q = Y.userOptions, it = Y.initialType || Y.type, et = Z.options.plotOptions, nt = b[it].prototype, rt = Y.finishedAnimating && { animation: !1 }, ct = {}, gt, dt = ["eventOptions", "navigatorSeries", "baseSeries"], ht = A.type || q.type || Z.options.chart.type, at = !(this.hasDerivedData || ht && ht !== this.type || typeof A.pointStart < "u" || typeof A.pointInterval < "u" || typeof A.relativeXValue < "u" || Y.hasOptionChanged("dataGrouping") || Y.hasOptionChanged("pointStart") || Y.hasOptionChanged("pointInterval") || Y.hasOptionChanged("pointIntervalUnit") || Y.hasOptionChanged("keys"));
- if (ht = ht || it, at && (dt.push("data", "isDirtyData", "points", "processedXData", "processedYData", "xIncrement", "cropped", "_hasPointMarkers", "_hasPointLabels", "clips", "nodes", "layout", "mapMap", "mapData", "minY", "maxY", "minX", "maxX"), A.visible !== !1 && dt.push("area", "graph"), Y.parallelArrays.forEach(function(tt) {
- dt.push(tt + "Data");
- }), A.data && (A.dataSorting && s(Y.options.dataSorting, A.dataSorting), this.setData(A.data, !1))), A = X(q, rt, { index: typeof q.index > "u" ? Y.index : q.index, pointStart: m(et && et.series && et.series.pointStart, q.pointStart, Y.xData[0]) }, !at && { data: Y.options.data }, A), at && A.data && (A.data = Y.options.data), dt = ["group", "markerGroup", "dataLabelsGroup", "transformGroup"].concat(dt), dt.forEach(function(tt) {
- dt[tt] = Y[tt], delete Y[tt];
- }), et = !1, b[ht]) {
- if (et = ht !== Y.type, Y.remove(!1, !1, !1, !0), et)
- if (Object.setPrototypeOf)
- Object.setPrototypeOf(Y, b[ht].prototype);
- else {
- rt = Object.hasOwnProperty.call(Y, "hcEvents") && Y.hcEvents;
- for (gt in nt)
- Y[gt] = void 0;
- s(Y, b[ht].prototype), rt ? Y.hcEvents = rt : delete Y.hcEvents;
- }
- } else
- t(17, !0, Z, { missingModuleFor: ht });
- if (dt.forEach(function(tt) {
- Y[tt] = dt[tt];
- }), Y.init(Z, A), at && this.points) {
- var J = Y.options;
- J.visible === !1 ? (ct.graphic = 1, ct.dataLabel = 1) : Y._hasPointLabels || (A = J.marker, nt = J.dataLabels, !A || A.enabled !== !1 && (q.marker && q.marker.symbol) === A.symbol || (ct.graphic = 1), nt && nt.enabled === !1 && (ct.dataLabel = 1)), this.points.forEach(function(tt) {
- tt && tt.series && (tt.resolveColor(), Object.keys(ct).length && tt.destroyElements(ct), J.showInLegend === !1 && tt.legendItem && Z.legend.destroyItem(tt));
- }, this);
- }
- Y.initialType = it, Z.linkSeries(), et && Y.linkedSeries.length && (Y.isDirtyData = !0), P(this, "afterUpdate"), m(H, !0) && Z.redraw(at ? void 0 : !1);
- }, Q.prototype.setName = function(A) {
- this.name = this.options.name = this.userOptions.name = A, this.chart.isDirtyLegend = !0;
- }, Q.prototype.hasOptionChanged = function(A) {
- var H = this.options[A], Y = this.chart.options.plotOptions, Z = this.userOptions[A];
- return Z ? H !== Z : H !== m(
- Y && Y[this.type] && Y[this.type][A],
- Y && Y.series && Y.series[A],
- H
- );
- }, Q.prototype.onMouseOver = function() {
- var A = this.chart, H = A.hoverSeries;
- A.pointer.setHoverChartIndex(), H && H !== this && H.onMouseOut(), this.options.events.mouseOver && P(this, "mouseOver"), this.setState("hover"), A.hoverSeries = this;
- }, Q.prototype.onMouseOut = function() {
- var A = this.options, H = this.chart, Y = H.tooltip, Z = H.hoverPoint;
- H.hoverSeries = null, Z && Z.onMouseOut(), this && A.events.mouseOut && P(this, "mouseOut"), !Y || this.stickyTracking || Y.shared && !this.noSharedTooltip || Y.hide(), H.series.forEach(function(q) {
- q.setState(
- "",
- !0
- );
- });
- }, Q.prototype.setState = function(A, H) {
- var Y = this, Z = Y.options, q = Y.graph, it = Z.inactiveOtherPoints, et = Z.states, nt = m(et[A || "normal"] && et[A || "normal"].animation, Y.chart.options.chart.animation), rt = Z.lineWidth, ct = 0, gt = Z.opacity;
- if (A = A || "", Y.state !== A && ([Y.group, Y.markerGroup, Y.dataLabelsGroup].forEach(function(dt) {
- dt && (Y.state && dt.removeClass("highcharts-series-" + Y.state), A && dt.addClass("highcharts-series-" + A));
- }), Y.state = A, !Y.chart.styledMode)) {
- if (et[A] && et[A].enabled === !1)
- return;
- if (A && (rt = et[A].lineWidth || rt + (et[A].lineWidthPlus || 0), gt = m(et[A].opacity, gt)), q && !q.dashstyle)
- for (Z = { "stroke-width": rt }, q.animate(Z, nt); Y["zone-graph-" + ct]; )
- Y["zone-graph-" + ct].animate(Z, nt), ct += 1;
- it || [Y.group, Y.markerGroup, Y.dataLabelsGroup, Y.labelBySeries].forEach(function(dt) {
- dt && dt.animate({ opacity: gt }, nt);
- });
- }
- H && it && Y.points && Y.setAllPointsToState(A || void 0);
- }, Q.prototype.setAllPointsToState = function(A) {
- this.points.forEach(function(H) {
- H.setState && H.setState(A);
- });
- }, Q.prototype.setVisible = function(A, H) {
- var Y = this, Z = Y.chart, q = Y.legendItem, it = Z.options.chart.ignoreHiddenSeries, et = Y.visible, nt = (Y.visible = A = Y.options.visible = Y.userOptions.visible = typeof A > "u" ? !et : A) ? "show" : "hide";
- ["group", "dataLabelsGroup", "markerGroup", "tracker", "tt"].forEach(function(rt) {
- Y[rt] && Y[rt][nt]();
- }), (Z.hoverSeries === Y || (Z.hoverPoint && Z.hoverPoint.series) === Y) && Y.onMouseOut(), q && Z.legend.colorizeItem(Y, A), Y.isDirty = !0, Y.options.stacking && Z.series.forEach(function(rt) {
- rt.options.stacking && rt.visible && (rt.isDirty = !0);
- }), Y.linkedSeries.forEach(function(rt) {
- rt.setVisible(A, !1);
- }), it && (Z.isDirtyBox = !0), P(Y, nt), H !== !1 && Z.redraw();
- }, Q.prototype.show = function() {
- this.setVisible(!0);
- }, Q.prototype.hide = function() {
- this.setVisible(!1);
- }, Q.prototype.select = function(A) {
- this.selected = A = this.options.selected = typeof A > "u" ? !this.selected : A, this.checkbox && (this.checkbox.checked = A), P(this, A ? "select" : "unselect");
- }, Q.prototype.shouldShowTooltip = function(A, H, Y) {
- return Y === void 0 && (Y = {}), Y.series = this, Y.visiblePlotOnly = !0, this.chart.isInsidePlot(A, H, Y);
- }, Q.defaultOptions = F, Q;
- }(), s(y.prototype, { axisTypes: [
- "xAxis",
- "yAxis"
- ], coll: "series", colorCounter: 0, cropShoulder: 1, directTouch: !1, drawLegendSymbol: G.drawLineMarker, isCartesian: !0, kdAxisArray: ["clientX", "plotY"], parallelArrays: ["x", "y"], pointClass: V, requireSorting: !0, sorted: !0 }), B.series = y, y;
- }), C(o, "Extensions/ScrollablePlotArea.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Axis/Axis.js"], o["Core/Chart/Chart.js"], o["Core/Series/Series.js"], o["Core/Renderer/RendererRegistry.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V) {
- var F = y.stop, B = V.addEvent, j = V.createElement, w = V.merge, x = V.pick;
- B(_, "afterSetChartSize", function(f) {
- var l = this.options.chart.scrollablePlotArea, T = l && l.minWidth;
- if (l = l && l.minHeight, !this.renderer.forExport) {
- if (T) {
- if (this.scrollablePixelsX = T = Math.max(0, T - this.chartWidth)) {
- this.scrollablePlotBox = this.renderer.scrollablePlotBox = w(this.plotBox), this.plotBox.width = this.plotWidth += T, this.inverted ? this.clipBox.height += T : this.clipBox.width += T;
- var O = { 1: { name: "right", value: T } };
- }
- } else
- l && (this.scrollablePixelsY = T = Math.max(
- 0,
- l - this.chartHeight
- )) && (this.scrollablePlotBox = this.renderer.scrollablePlotBox = w(this.plotBox), this.plotBox.height = this.plotHeight += T, this.inverted ? this.clipBox.width += T : this.clipBox.height += T, O = { 2: { name: "bottom", value: T } });
- O && !f.skipAxes && this.axes.forEach(function(R) {
- O[R.side] ? R.getPlotLinePath = function() {
- var k = O[R.side].name, b = this[k];
- this[k] = b - O[R.side].value;
- var S = N.prototype.getPlotLinePath.apply(this, arguments);
- return this[k] = b, S;
- } : (R.setAxisSize(), R.setAxisTranslation());
- });
- }
- }), B(_, "render", function() {
- this.scrollablePixelsX || this.scrollablePixelsY ? (this.setUpScrolling && this.setUpScrolling(), this.applyFixed()) : this.fixedDiv && this.applyFixed();
- }), _.prototype.setUpScrolling = function() {
- var f = this, l = { WebkitOverflowScrolling: "touch", overflowX: "hidden", overflowY: "hidden" };
- this.scrollablePixelsX && (l.overflowX = "auto"), this.scrollablePixelsY && (l.overflowY = "auto"), this.scrollingParent = j("div", { className: "highcharts-scrolling-parent" }, { position: "relative" }, this.renderTo), this.scrollingContainer = j(
- "div",
- { className: "highcharts-scrolling" },
- l,
- this.scrollingParent
- ), B(this.scrollingContainer, "scroll", function() {
- f.pointer && delete f.pointer.chartPosition;
- }), this.innerContainer = j("div", { className: "highcharts-inner-container" }, null, this.scrollingContainer), this.innerContainer.appendChild(this.container), this.setUpScrolling = null;
- }, _.prototype.moveFixedElements = function() {
- var f = this.container, l = this.fixedRenderer, T = ".highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-drillup-button .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" "), O;
- this.scrollablePixelsX && !this.inverted ? O = ".highcharts-yaxis" : this.scrollablePixelsX && this.inverted || this.scrollablePixelsY && !this.inverted ? O = ".highcharts-xaxis" : this.scrollablePixelsY && this.inverted && (O = ".highcharts-yaxis"), O && T.push(O + ":not(.highcharts-radial-axis)", O + "-labels:not(.highcharts-radial-axis-labels)"), T.forEach(function(R) {
- [].forEach.call(f.querySelectorAll(R), function(k) {
- (k.namespaceURI === l.SVG_NS ? l.box : l.box.parentNode).appendChild(k), k.style.pointerEvents = "auto";
- });
- });
- }, _.prototype.applyFixed = function() {
- var f = !this.fixedDiv, l = this.options.chart, T = l.scrollablePlotArea, O = G.getRendererType();
- f ? (this.fixedDiv = j("div", { className: "highcharts-fixed" }, { position: "absolute", overflow: "hidden", pointerEvents: "none", zIndex: (l.style && l.style.zIndex || 0) + 2, top: 0 }, null, !0), this.scrollingContainer && this.scrollingContainer.parentNode.insertBefore(this.fixedDiv, this.scrollingContainer), this.renderTo.style.overflow = "visible", this.fixedRenderer = l = new O(
- this.fixedDiv,
- this.chartWidth,
- this.chartHeight,
- this.options.chart.style
- ), this.scrollableMask = l.path().attr({ fill: this.options.chart.backgroundColor || "#fff", "fill-opacity": x(T.opacity, 0.85), zIndex: -1 }).addClass("highcharts-scrollable-mask").add(), B(this, "afterShowResetZoom", this.moveFixedElements), B(this, "afterDrilldown", this.moveFixedElements), B(this, "afterLayOutTitles", this.moveFixedElements)) : this.fixedRenderer.setSize(this.chartWidth, this.chartHeight), (this.scrollableDirty || f) && (this.scrollableDirty = !1, this.moveFixedElements()), l = this.chartWidth + (this.scrollablePixelsX || 0), O = this.chartHeight + (this.scrollablePixelsY || 0), F(this.container), this.container.style.width = l + "px", this.container.style.height = O + "px", this.renderer.boxWrapper.attr({ width: l, height: O, viewBox: [0, 0, l, O].join(" ") }), this.chartBackground.attr({ width: l, height: O }), this.scrollingContainer.style.height = this.chartHeight + "px", f && (T.scrollPositionX && (this.scrollingContainer.scrollLeft = this.scrollablePixelsX * T.scrollPositionX), T.scrollPositionY && (this.scrollingContainer.scrollTop = this.scrollablePixelsY * T.scrollPositionY)), O = this.axisOffset, f = this.plotTop - O[0] - 1, T = this.plotLeft - O[3] - 1, l = this.plotTop + this.plotHeight + O[2] + 1, O = this.plotLeft + this.plotWidth + O[1] + 1;
- var R = this.plotLeft + this.plotWidth - (this.scrollablePixelsX || 0), k = this.plotTop + this.plotHeight - (this.scrollablePixelsY || 0);
- f = this.scrollablePixelsX ? [["M", 0, f], ["L", this.plotLeft - 1, f], ["L", this.plotLeft - 1, l], ["L", 0, l], ["Z"], ["M", R, f], ["L", this.chartWidth, f], ["L", this.chartWidth, l], ["L", R, l], ["Z"]] : this.scrollablePixelsY ? [["M", T, 0], ["L", T, this.plotTop - 1], ["L", O, this.plotTop - 1], ["L", O, 0], ["Z"], ["M", T, k], ["L", T, this.chartHeight], ["L", O, this.chartHeight], ["L", O, k], ["Z"]] : [["M", 0, 0]], this.redrawTrigger !== "adjustHeight" && this.scrollableMask.attr({ d: f });
- }, B(N, "afterInit", function() {
- this.chart.scrollableDirty = !0;
- }), B(U, "show", function() {
- this.chart.scrollableDirty = !0;
- });
- }), C(o, "Core/Axis/StackingAxis.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Axis/Axis.js"], o["Core/Utilities.js"]], function(y, N, _) {
- var U = y.getDeferredAnimation, G = _.addEvent, V = _.destroyObjectProperties, F = _.fireEvent, B = _.isNumber, j = _.objectEach, w;
- return function(x) {
- function f() {
- var R = this.stacking;
- if (R) {
- var k = R.stacks;
- j(k, function(b, S) {
- V(b), k[S] = null;
- }), R && R.stackTotalGroup && R.stackTotalGroup.destroy();
- }
- }
- function l() {
- this.stacking || (this.stacking = new O(this));
- }
- var T = [];
- x.compose = function(R) {
- return T.indexOf(R) === -1 && (T.push(R), G(R, "init", l), G(R, "destroy", f)), R;
- };
- var O = function() {
- function R(k) {
- this.oldStacks = {}, this.stacks = {}, this.stacksTouched = 0, this.axis = k;
- }
- return R.prototype.buildStacks = function() {
- var k = this.axis, b = k.series, S = k.options.reversedStacks, v = b.length, h;
- if (!k.isXAxis) {
- for (this.usePercentage = !1, h = v; h--; ) {
- var c = b[S ? h : v - h - 1];
- c.setStackedPoints(), c.setGroupedPoints();
- }
- for (h = 0; h < v; h++)
- b[h].modifyStacks();
- F(k, "afterBuildStacks");
- }
- }, R.prototype.cleanStacks = function() {
- if (!this.axis.isXAxis) {
- if (this.oldStacks)
- var k = this.stacks = this.oldStacks;
- j(k, function(b) {
- j(b, function(S) {
- S.cumulative = S.total;
- });
- });
- }
- }, R.prototype.resetStacks = function() {
- var k = this, b = k.stacks;
- k.axis.isXAxis || j(b, function(S) {
- j(
- S,
- function(v, h) {
- B(v.touched) && v.touched < k.stacksTouched ? (v.destroy(), delete S[h]) : (v.total = null, v.cumulative = null);
- }
- );
- });
- }, R.prototype.renderStackTotals = function() {
- var k = this.axis, b = k.chart, S = b.renderer, v = this.stacks;
- k = U(b, k.options.stackLabels && k.options.stackLabels.animation || !1);
- var h = this.stackTotalGroup = this.stackTotalGroup || S.g("stack-labels").attr({ visibility: "visible", zIndex: 6, opacity: 0 }).add();
- h.translate(b.plotLeft, b.plotTop), j(v, function(c) {
- j(c, function(u) {
- u.render(h);
- });
- }), h.animate(
- { opacity: 1 },
- k
- );
- }, R;
- }();
- x.Additions = O;
- }(w || (w = {})), w;
- }), C(o, "Extensions/Stacking.js", [o["Core/Axis/Axis.js"], o["Core/Chart/Chart.js"], o["Core/FormatUtilities.js"], o["Core/Globals.js"], o["Core/Series/Series.js"], o["Core/Axis/StackingAxis.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V, F) {
- var B = _.format, j = F.correctFloat, w = F.defined, x = F.destroyObjectProperties, f = F.isArray, l = F.isNumber, T = F.objectEach, O = F.pick, R = function() {
- function k(b, S, v, h, c) {
- var u = b.chart.inverted;
- this.axis = b, this.isNegative = v, this.options = S = S || {}, this.x = h, this.total = null, this.points = {}, this.hasValidPoints = !1, this.stack = c, this.rightCliff = this.leftCliff = 0, this.alignOptions = { align: S.align || (u ? v ? "left" : "right" : "center"), verticalAlign: S.verticalAlign || (u ? "middle" : v ? "bottom" : "top"), y: S.y, x: S.x }, this.textAlign = S.textAlign || (u ? v ? "right" : "left" : "center");
- }
- return k.prototype.destroy = function() {
- x(this, this.axis);
- }, k.prototype.render = function(b) {
- var S = this.axis.chart, v = this.options, h = v.format;
- h = h ? B(h, this, S) : v.formatter.call(this), this.label ? this.label.attr({
- text: h,
- visibility: "hidden"
- }) : (this.label = S.renderer.label(h, null, null, v.shape, null, null, v.useHTML, !1, "stack-labels"), h = { r: v.borderRadius || 0, text: h, rotation: v.rotation, padding: O(v.padding, 5), visibility: "hidden" }, S.styledMode || (h.fill = v.backgroundColor, h.stroke = v.borderColor, h["stroke-width"] = v.borderWidth, this.label.css(v.style)), this.label.attr(h), this.label.added || this.label.add(b)), this.label.labelrank = S.plotSizeY;
- }, k.prototype.setOffset = function(b, S, v, h, c) {
- var u = this.axis, i = u.chart;
- h = u.translate(u.stacking.usePercentage ? 100 : h || this.total, 0, 0, 0, 1), v = u.translate(v || 0), v = w(h) && Math.abs(h - v), b = O(c, i.xAxis[0].translate(this.x)) + b, u = w(h) && this.getStackBox(i, this, b, h, S, v, u), S = this.label, v = this.isNegative, b = O(this.options.overflow, "justify") === "justify";
- var p = this.textAlign;
- S && u && (c = S.getBBox(), h = S.padding, p = p === "left" ? i.inverted ? -h : h : p === "right" ? c.width : i.inverted && p === "center" ? c.width / 2 : i.inverted ? v ? c.width + h : -h : c.width / 2, v = i.inverted ? c.height / 2 : v ? -h : c.height, this.alignOptions.x = O(this.options.x, 0), this.alignOptions.y = O(this.options.y, 0), u.x -= p, u.y -= v, S.align(this.alignOptions, null, u), i.isInsidePlot(S.alignAttr.x + p - this.alignOptions.x, S.alignAttr.y + v - this.alignOptions.y) ? S.show() : (S.alignAttr.y = -9999, b = !1), b && G.prototype.justifyDataLabel.call(this.axis, S, this.alignOptions, S.alignAttr, c, u), S.attr({ x: S.alignAttr.x, y: S.alignAttr.y }), O(!b && this.options.crop, !0) && ((i = l(S.x) && l(S.y) && i.isInsidePlot(S.x - h + S.width, S.y) && i.isInsidePlot(S.x + h, S.y)) || S.hide()));
- }, k.prototype.getStackBox = function(b, S, v, h, c, u, i) {
- var p = S.axis.reversed, a = b.inverted, t = i.height + i.pos - (a ? b.plotLeft : b.plotTop);
- return S = S.isNegative && !p || !S.isNegative && p, { x: a ? S ? h - i.right : h - u + i.pos - b.plotLeft : v + b.xAxis[0].transB - b.plotLeft, y: a ? i.height - v - c : S ? t - h - u : t - h, width: a ? u : c, height: a ? c : u };
- }, k;
- }();
- return N.prototype.getStacks = function() {
- var k = this, b = k.inverted;
- k.yAxis.forEach(function(S) {
- S.stacking && S.stacking.stacks && S.hasVisibleSeries && (S.stacking.oldStacks = S.stacking.stacks);
- }), k.series.forEach(function(S) {
- var v = S.xAxis && S.xAxis.options || {};
- !S.options.stacking || S.visible !== !0 && k.options.chart.ignoreHiddenSeries !== !1 || (S.stackKey = [S.type, O(S.options.stack, ""), b ? v.top : v.left, b ? v.height : v.width].join());
- });
- }, V.compose(y), G.prototype.setGroupedPoints = function() {
- var k = this.yAxis.stacking;
- this.options.centerInCategory && (this.is("column") || this.is("columnrange")) && !this.options.stacking && 1 < this.chart.series.length ? G.prototype.setStackedPoints.call(this, "group") : k && T(k.stacks, function(b, S) {
- S.slice(-5) === "group" && (T(b, function(v) {
- return v.destroy();
- }), delete k.stacks[S]);
- });
- }, G.prototype.setStackedPoints = function(k) {
- var b = k || this.options.stacking;
- if (b && (this.visible === !0 || this.chart.options.chart.ignoreHiddenSeries === !1)) {
- var S = this.processedXData, v = this.processedYData, h = [], c = v.length, u = this.options, i = u.threshold, p = O(u.startFromThreshold && i, 0);
- u = u.stack, k = k ? this.type + "," + b : this.stackKey;
- var a = "-" + k, t = this.negStacks, s = this.yAxis, n = s.stacking.stacks, P = s.stacking.oldStacks, D, I;
- for (s.stacking.stacksTouched += 1, I = 0; I < c; I++) {
- var W = S[I], E = v[I], X = this.getStackIndicator(
- X,
- W,
- this.index
- ), g = X.key, m = (D = t && E < (p ? 0 : i)) ? a : k;
- n[m] || (n[m] = {}), n[m][W] || (P[m] && P[m][W] ? (n[m][W] = P[m][W], n[m][W].total = null) : n[m][W] = new R(s, s.options.stackLabels, D, W, u)), m = n[m][W], E !== null ? (m.points[g] = m.points[this.index] = [O(m.cumulative, p)], w(m.cumulative) || (m.base = g), m.touched = s.stacking.stacksTouched, 0 < X.index && this.singleStacks === !1 && (m.points[g][0] = m.points[this.index + "," + W + ",0"][0])) : m.points[g] = m.points[this.index] = null, b === "percent" ? (D = D ? k : a, t && n[D] && n[D][W] ? (D = n[D][W], m.total = D.total = Math.max(D.total, m.total) + Math.abs(E) || 0) : m.total = j(m.total + (Math.abs(E) || 0))) : b === "group" ? (f(E) && (E = E[0]), E !== null && (m.total = (m.total || 0) + 1)) : m.total = j(m.total + (E || 0)), m.cumulative = b === "group" ? (m.total || 1) - 1 : O(m.cumulative, p) + (E || 0), E !== null && (m.points[g].push(m.cumulative), h[I] = m.cumulative, m.hasValidPoints = !0);
- }
- b === "percent" && (s.stacking.usePercentage = !0), b !== "group" && (this.stackedYData = h), s.stacking.oldStacks = {};
- }
- }, G.prototype.modifyStacks = function() {
- var k = this, b = k.stackKey, S = k.yAxis.stacking.stacks, v = k.processedXData, h, c = k.options.stacking;
- k[c + "Stacker"] && [b, "-" + b].forEach(function(u) {
- for (var i = v.length, p, a; i--; )
- p = v[i], h = k.getStackIndicator(h, p, k.index, u), (a = (p = S[u] && S[u][p]) && p.points[h.key]) && k[c + "Stacker"](a, p, i);
- });
- }, G.prototype.percentStacker = function(k, b, S) {
- b = b.total ? 100 / b.total : 0, k[0] = j(k[0] * b), k[1] = j(k[1] * b), this.stackedYData[S] = k[1];
- }, G.prototype.getStackIndicator = function(k, b, S, v) {
- return !w(k) || k.x !== b || v && k.key !== v ? k = { x: b, index: 0, key: v } : k.index++, k.key = [S, b, k.index].join(), k;
- }, U.StackItem = R, U.StackItem;
- }), C(o, "Series/Line/LineSeries.js", [o["Core/Series/Series.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, _) {
- var U = this && this.__extends || function() {
- var F = function(B, j) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, x) {
- w.__proto__ = x;
- } || function(w, x) {
- for (var f in x)
- x.hasOwnProperty(f) && (w[f] = x[f]);
- }, F(B, j);
- };
- return function(B, j) {
- function w() {
- this.constructor = B;
- }
- F(B, j), B.prototype = j === null ? Object.create(j) : (w.prototype = j.prototype, new w());
- };
- }(), G = _.defined, V = _.merge;
- return _ = function(F) {
- function B() {
- var j = F !== null && F.apply(this, arguments) || this;
- return j.data = void 0, j.options = void 0, j.points = void 0, j;
- }
- return U(B, F), B.prototype.drawGraph = function() {
- var j = this, w = this.options, x = (this.gappedPath || this.getGraphPath).call(this), f = this.chart.styledMode, l = [["graph", "highcharts-graph"]];
- f || l[0].push(w.lineColor || this.color || "#cccccc", w.dashStyle), l = j.getZonesGraphs(l), l.forEach(function(T, O) {
- var R = T[0], k = j[R], b = k ? "animate" : "attr";
- k ? (k.endX = j.preventGraphAnimation ? null : x.xMap, k.animate({ d: x })) : x.length && (j[R] = k = j.chart.renderer.path(x).addClass(T[1]).attr({ zIndex: 1 }).add(j.group)), k && !f && (R = { stroke: T[2], "stroke-width": w.lineWidth, fill: j.fillGraph && j.color || "none" }, T[3] ? R.dashstyle = T[3] : w.linecap !== "square" && (R["stroke-linecap"] = R["stroke-linejoin"] = "round"), k[b](R).shadow(2 > O && w.shadow)), k && (k.startX = x.xMap, k.isArea = x.isArea);
- });
- }, B.prototype.getGraphPath = function(j, w, x) {
- var f = this, l = f.options, T = [], O = [], R, k = l.step;
- j = j || f.points;
- var b = j.reversed;
- return b && j.reverse(), (k = { right: 1, center: 2 }[k] || k && 3) && b && (k = 4 - k), j = this.getValidPoints(j, !1, !(l.connectNulls && !w && !x)), j.forEach(function(S, v) {
- var h = S.plotX, c = S.plotY, u = j[v - 1];
- (S.leftCliff || u && u.rightCliff) && !x && (R = !0), S.isNull && !G(w) && 0 < v ? R = !l.connectNulls : S.isNull && !w ? R = !0 : (v === 0 || R ? v = [["M", S.plotX, S.plotY]] : f.getPointSpline ? v = [f.getPointSpline(j, S, v)] : k ? (v = k === 1 ? [["L", u.plotX, c]] : k === 2 ? [["L", (u.plotX + h) / 2, u.plotY], ["L", (u.plotX + h) / 2, c]] : [["L", h, u.plotY]], v.push(["L", h, c])) : v = [["L", h, c]], O.push(S.x), k && (O.push(S.x), k === 2 && O.push(S.x)), T.push.apply(T, v), R = !1);
- }), T.xMap = O, f.graphPath = T;
- }, B.prototype.getZonesGraphs = function(j) {
- return this.zones.forEach(function(w, x) {
- x = ["zone-graph-" + x, "highcharts-graph highcharts-zone-graph-" + x + " " + (w.className || "")], this.chart.styledMode || x.push(w.color || this.color, w.dashStyle || this.options.dashStyle), j.push(x);
- }, this), j;
- }, B.defaultOptions = V(y.defaultOptions, {}), B;
- }(y), N.registerSeriesType("line", _), _;
- }), C(o, "Series/Area/AreaSeries.js", [
- o["Core/Color/Color.js"],
- o["Core/Legend/LegendSymbol.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Utilities.js"]
- ], function(y, N, _, U) {
- var G = this && this.__extends || function() {
- var x = function(f, l) {
- return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(T, O) {
- T.__proto__ = O;
- } || function(T, O) {
- for (var R in O)
- O.hasOwnProperty(R) && (T[R] = O[R]);
- }, x(f, l);
- };
- return function(f, l) {
- function T() {
- this.constructor = f;
- }
- x(f, l), f.prototype = l === null ? Object.create(l) : (T.prototype = l.prototype, new T());
- };
- }(), V = y.parse, F = _.seriesTypes.line;
- y = U.extend;
- var B = U.merge, j = U.objectEach, w = U.pick;
- return U = function(x) {
- function f() {
- var l = x !== null && x.apply(this, arguments) || this;
- return l.data = void 0, l.options = void 0, l.points = void 0, l;
- }
- return G(f, x), f.prototype.drawGraph = function() {
- this.areaPath = [], x.prototype.drawGraph.apply(this);
- var l = this, T = this.areaPath, O = this.options, R = [["area", "highcharts-area", this.color, O.fillColor]];
- this.zones.forEach(function(k, b) {
- R.push(["zone-area-" + b, "highcharts-area highcharts-zone-area-" + b + " " + k.className, k.color || l.color, k.fillColor || O.fillColor]);
- }), R.forEach(function(k) {
- var b = k[0], S = l[b], v = S ? "animate" : "attr", h = {};
- S ? (S.endX = l.preventGraphAnimation ? null : T.xMap, S.animate({ d: T })) : (h.zIndex = 0, S = l[b] = l.chart.renderer.path(T).addClass(k[1]).add(l.group), S.isArea = !0), l.chart.styledMode || (h.fill = w(k[3], V(k[2]).setOpacity(w(O.fillOpacity, 0.75)).get())), S[v](h), S.startX = T.xMap, S.shiftUnit = O.step ? 2 : 1;
- });
- }, f.prototype.getGraphPath = function(l) {
- var T = F.prototype.getGraphPath, O = this.options, R = O.stacking, k = this.yAxis, b, S = [], v = [], h = this.index, c = k.stacking.stacks[this.stackKey], u = O.threshold, i = Math.round(k.getThreshold(O.threshold));
- O = w(O.connectNulls, R === "percent");
- var p = function(n, P, D) {
- var I = l[n];
- n = R && c[I.x].points[h];
- var W = I[D + "Null"] || 0;
- if (D = I[D + "Cliff"] || 0, I = !0, D || W) {
- var E = (W ? n[0] : n[1]) + D, X = n[0] + D;
- I = !!W;
- } else
- !R && l[P] && l[P].isNull && (E = X = u);
- typeof E < "u" && (v.push({ plotX: t, plotY: E === null ? i : k.getThreshold(E), isNull: I, isCliff: !0 }), S.push({ plotX: t, plotY: X === null ? i : k.getThreshold(X), doCurve: !1 }));
- };
- for (l = l || this.points, R && (l = this.getStackPoints(l)), b = 0; b < l.length; b++) {
- R || (l[b].leftCliff = l[b].rightCliff = l[b].leftNull = l[b].rightNull = void 0);
- var a = l[b].isNull, t = w(l[b].rectPlotX, l[b].plotX), s = R ? w(l[b].yBottom, i) : i;
- (!a || O) && (O || p(b, b - 1, "left"), a && !R && O || (v.push(l[b]), S.push({ x: b, plotX: t, plotY: s })), O || p(b, b + 1, "right"));
- }
- return b = T.call(this, v, !0, !0), S.reversed = !0, a = T.call(this, S, !0, !0), (s = a[0]) && s[0] === "M" && (a[0] = ["L", s[1], s[2]]), a = b.concat(a), a.length && a.push(["Z"]), T = T.call(this, v, !1, O), a.xMap = b.xMap, this.areaPath = a, T;
- }, f.prototype.getStackPoints = function(l) {
- var T = this, O = [], R = [], k = this.xAxis, b = this.yAxis, S = b.stacking.stacks[this.stackKey], v = {}, h = b.series, c = h.length, u = b.options.reversedStacks ? 1 : -1, i = h.indexOf(T);
- if (l = l || this.points, this.options.stacking) {
- for (var p = 0; p < l.length; p++)
- l[p].leftNull = l[p].rightNull = void 0, v[l[p].x] = l[p];
- j(S, function(t, s) {
- t.total !== null && R.push(s);
- }), R.sort(function(t, s) {
- return t - s;
- });
- var a = h.map(function(t) {
- return t.visible;
- });
- R.forEach(function(t, s) {
- var n = 0, P, D;
- if (v[t] && !v[t].isNull)
- O.push(v[t]), [-1, 1].forEach(function(W) {
- var E = W === 1 ? "rightNull" : "leftNull", X = 0, g = S[R[s + W]];
- if (g)
- for (var m = i; 0 <= m && m < c; ) {
- var L = h[m].index;
- P = g.points[L], P || (L === T.index ? v[t][E] = !0 : a[m] && (D = S[t].points[L]) && (X -= D[1] - D[0])), m += u;
- }
- v[t][W === 1 ? "rightCliff" : "leftCliff"] = X;
- });
- else {
- for (var I = i; 0 <= I && I < c; ) {
- if (P = S[t].points[h[I].index]) {
- n = P[1];
- break;
- }
- I += u;
- }
- n = w(n, 0), n = b.translate(n, 0, 1, 0, 1), O.push({ isNull: !0, plotX: k.translate(t, 0, 0, 0, 1), x: t, plotY: n, yBottom: n });
- }
- });
- }
- return O;
- }, f.defaultOptions = B(F.defaultOptions, { threshold: 0 }), f;
- }(F), y(U.prototype, {
- singleStacks: !1,
- drawLegendSymbol: N.drawRectangle
- }), _.registerSeriesType("area", U), U;
- }), C(o, "Series/Spline/SplineSeries.js", [o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N) {
- var _ = this && this.__extends || function() {
- var F = function(B, j) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, x) {
- w.__proto__ = x;
- } || function(w, x) {
- for (var f in x)
- x.hasOwnProperty(f) && (w[f] = x[f]);
- }, F(B, j);
- };
- return function(B, j) {
- function w() {
- this.constructor = B;
- }
- F(B, j), B.prototype = j === null ? Object.create(j) : (w.prototype = j.prototype, new w());
- };
- }(), U = y.seriesTypes.line, G = N.merge, V = N.pick;
- return N = function(F) {
- function B() {
- var j = F !== null && F.apply(this, arguments) || this;
- return j.data = void 0, j.options = void 0, j.points = void 0, j;
- }
- return _(B, F), B.prototype.getPointSpline = function(j, w, x) {
- var f = w.plotX || 0, l = w.plotY || 0, T = j[x - 1];
- if (x = j[x + 1], T && !T.isNull && T.doCurve !== !1 && !w.isCliff && x && !x.isNull && x.doCurve !== !1 && !w.isCliff) {
- j = T.plotY || 0;
- var O = x.plotX || 0;
- x = x.plotY || 0;
- var R = 0, k = (1.5 * f + (T.plotX || 0)) / 2.5, b = (1.5 * l + j) / 2.5;
- O = (1.5 * f + O) / 2.5;
- var S = (1.5 * l + x) / 2.5;
- O !== k && (R = (S - b) * (O - f) / (O - k) + l - S), b += R, S += R, b > j && b > l ? (b = Math.max(j, l), S = 2 * l - b) : b < j && b < l && (b = Math.min(j, l), S = 2 * l - b), S > x && S > l ? (S = Math.max(x, l), b = 2 * l - S) : S < x && S < l && (S = Math.min(x, l), b = 2 * l - S), w.rightContX = O, w.rightContY = S;
- }
- return w = ["C", V(T.rightContX, T.plotX, 0), V(T.rightContY, T.plotY, 0), V(k, f, 0), V(b, l, 0), f, l], T.rightContX = T.rightContY = void 0, w;
- }, B.defaultOptions = G(U.defaultOptions), B;
- }(U), y.registerSeriesType("spline", N), N;
- }), C(
- o,
- "Series/AreaSpline/AreaSplineSeries.js",
- [o["Series/Area/AreaSeries.js"], o["Series/Spline/SplineSeries.js"], o["Core/Legend/LegendSymbol.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]],
- function(y, N, _, U, G) {
- var V = this && this.__extends || function() {
- var w = function(x, f) {
- return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(l, T) {
- l.__proto__ = T;
- } || function(l, T) {
- for (var O in T)
- T.hasOwnProperty(O) && (l[O] = T[O]);
- }, w(x, f);
- };
- return function(x, f) {
- function l() {
- this.constructor = x;
- }
- w(x, f), x.prototype = f === null ? Object.create(f) : (l.prototype = f.prototype, new l());
- };
- }(), F = y.prototype, B = G.extend, j = G.merge;
- return G = function(w) {
- function x() {
- var f = w !== null && w.apply(this, arguments) || this;
- return f.data = void 0, f.points = void 0, f.options = void 0, f;
- }
- return V(x, w), x.defaultOptions = j(N.defaultOptions, y.defaultOptions), x;
- }(N), B(G.prototype, { getGraphPath: F.getGraphPath, getStackPoints: F.getStackPoints, drawGraph: F.drawGraph, drawLegendSymbol: _.drawRectangle }), U.registerSeriesType("areaspline", G), G;
- }
- ), C(o, "Series/Column/ColumnSeries.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/Color/Color.js"],
- o["Core/Globals.js"],
- o["Core/Legend/LegendSymbol.js"],
- o["Core/Series/Series.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Utilities.js"]
- ], function(y, N, _, U, G, V, F) {
- var B = this && this.__extends || function() {
- var c = function(u, i) {
- return c = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(p, a) {
- p.__proto__ = a;
- } || function(p, a) {
- for (var t in a)
- a.hasOwnProperty(t) && (p[t] = a[t]);
- }, c(u, i);
- };
- return function(u, i) {
- function p() {
- this.constructor = u;
- }
- c(u, i), u.prototype = i === null ? Object.create(i) : (p.prototype = i.prototype, new p());
- };
- }(), j = y.animObject, w = N.parse, x = _.hasTouch;
- y = _.noop;
- var f = F.clamp, l = F.css, T = F.defined, O = F.extend, R = F.fireEvent, k = F.isArray, b = F.isNumber, S = F.merge, v = F.pick, h = F.objectEach;
- return F = function(c) {
- function u() {
- var i = c !== null && c.apply(this, arguments) || this;
- return i.borderWidth = void 0, i.data = void 0, i.group = void 0, i.options = void 0, i.points = void 0, i;
- }
- return B(u, c), u.prototype.animate = function(i) {
- var p = this, a = this.yAxis, t = p.options, s = this.chart.inverted, n = {}, P = s ? "translateX" : "translateY";
- if (i)
- n.scaleY = 1e-3, i = f(a.toPixels(t.threshold), a.pos, a.pos + a.len), s ? n.translateX = i - a.len : n.translateY = i, p.clipBox && p.setClip(), p.group.attr(n);
- else {
- var D = Number(p.group.attr(P));
- p.group.animate({ scaleY: 1 }, O(j(p.options.animation), { step: function(I, W) {
- p.group && (n[P] = D + W.pos * (a.pos - D), p.group.attr(n));
- } }));
- }
- }, u.prototype.init = function(i, p) {
- c.prototype.init.apply(this, arguments);
- var a = this;
- i = a.chart, i.hasRendered && i.series.forEach(function(t) {
- t.type === a.type && (t.isDirty = !0);
- });
- }, u.prototype.getColumnMetrics = function() {
- var i = this, p = i.options, a = i.xAxis, t = i.yAxis, s = a.options.reversedStacks;
- s = a.reversed && !s || !a.reversed && s;
- var n = {}, P, D = 0;
- p.grouping === !1 ? D = 1 : i.chart.series.forEach(function(X) {
- var g = X.yAxis, m = X.options;
- if (X.type === i.type && (X.visible || !i.chart.options.chart.ignoreHiddenSeries) && t.len === g.len && t.pos === g.pos) {
- if (m.stacking && m.stacking !== "group") {
- P = X.stackKey, typeof n[P] > "u" && (n[P] = D++);
- var L = n[P];
- } else
- m.grouping !== !1 && (L = D++);
- X.columnIndex = L;
- }
- });
- var I = Math.min(Math.abs(a.transA) * (a.ordinal && a.ordinal.slope || p.pointRange || a.closestPointRange || a.tickInterval || 1), a.len), W = I * p.groupPadding, E = (I - 2 * W) / (D || 1);
- return p = Math.min(p.maxPointWidth || a.len, v(p.pointWidth, E * (1 - 2 * p.pointPadding))), i.columnMetrics = { width: p, offset: (E - p) / 2 + (W + ((i.columnIndex || 0) + (s ? 1 : 0)) * E - I / 2) * (s ? -1 : 1), paddedWidth: E, columnCount: D }, i.columnMetrics;
- }, u.prototype.crispCol = function(i, p, a, t) {
- var s = this.chart, n = this.borderWidth, P = -(n % 2 ? 0.5 : 0);
- return n = n % 2 ? 0.5 : 1, s.inverted && s.renderer.isVML && (n += 1), this.options.crisp && (a = Math.round(i + a) + P, i = Math.round(i) + P, a -= i), t = Math.round(p + t) + n, P = 0.5 >= Math.abs(p) && 0.5 < t, p = Math.round(p) + n, t -= p, P && t && (--p, t += 1), { x: i, y: p, width: a, height: t };
- }, u.prototype.adjustForMissingColumns = function(i, p, a, t) {
- var s = this, n = this.options.stacking;
- if (!a.isNull && 1 < t.columnCount) {
- var P = 0, D = 0;
- h(this.yAxis.stacking && this.yAxis.stacking.stacks, function(I) {
- if (typeof a.x == "number" && (I = I[a.x.toString()])) {
- var W = I.points[s.index], E = I.total;
- n ? (W && (P = D), I.hasValidPoints && D++) : k(W) && (P = W[1], D = E || 0);
- }
- }), i = (a.plotX || 0) + ((D - 1) * t.paddedWidth + p) / 2 - p - P * t.paddedWidth;
- }
- return i;
- }, u.prototype.translate = function() {
- var i = this, p = i.chart, a = i.options, t = i.dense = 2 > i.closestPointRange * i.xAxis.transA;
- t = i.borderWidth = v(a.borderWidth, t ? 0 : 1);
- var s = i.xAxis, n = i.yAxis, P = a.threshold, D = i.translatedThreshold = n.getThreshold(P), I = v(a.minPointLength, 5), W = i.getColumnMetrics(), E = W.width, X = i.pointXOffset = W.offset, g = i.dataMin, m = i.dataMax, L = i.barW = Math.max(E, 1 + 2 * t);
- p.inverted && (D -= 0.5), a.pointPadding && (L = Math.ceil(L)), G.prototype.translate.apply(i), i.points.forEach(function(z) {
- var $ = v(z.yBottom, D), Q = 999 + Math.abs($), A = z.plotX || 0;
- Q = f(z.plotY, -Q, n.len + Q);
- var H = Math.min(Q, $), Y = Math.max(Q, $) - H, Z = E, q = A + X, it = L;
- I && Math.abs(Y) < I && (Y = I, A = !n.reversed && !z.negative || n.reversed && z.negative, b(P) && b(m) && z.y === P && m <= P && (n.min || 0) < P && (g !== m || (n.max || 0) <= P) && (A = !A), H = Math.abs(H - D) > I ? $ - I : D - (A ? I : 0)), T(z.options.pointWidth) && (Z = it = Math.ceil(z.options.pointWidth), q -= Math.round((Z - E) / 2)), a.centerInCategory && (q = i.adjustForMissingColumns(q, Z, z, W)), z.barX = q, z.pointWidth = Z, z.tooltipPos = p.inverted ? [f(n.len + n.pos - p.plotLeft - Q, n.pos - p.plotLeft, n.len + n.pos - p.plotLeft), s.len + s.pos - p.plotTop - q - it / 2, Y] : [s.left - p.plotLeft + q + it / 2, f(Q + n.pos - p.plotTop, n.pos - p.plotTop, n.len + n.pos - p.plotTop), Y], z.shapeType = i.pointClass.prototype.shapeType || "rect", z.shapeArgs = i.crispCol.apply(i, z.isNull ? [q, D, it, 0] : [q, H, it, Y]);
- });
- }, u.prototype.drawGraph = function() {
- this.group[this.dense ? "addClass" : "removeClass"]("highcharts-dense-data");
- }, u.prototype.pointAttribs = function(i, p) {
- var a = this.options, t = this.pointAttrToOptions || {}, s = t.stroke || "borderColor", n = t["stroke-width"] || "borderWidth", P = i && i.color || this.color, D = i && i[s] || a[s] || P;
- t = i && i.options.dashStyle || a.dashStyle;
- var I = i && i[n] || a[n] || this[n] || 0, W = v(i && i.opacity, a.opacity, 1);
- if (i && this.zones.length) {
- var E = i.getZone();
- P = i.options.color || E && (E.color || i.nonZonedColor) || this.color, E && (D = E.borderColor || D, t = E.dashStyle || t, I = E.borderWidth || I);
- }
- return p && i && (i = S(a.states[p], i.options.states && i.options.states[p] || {}), p = i.brightness, P = i.color || typeof p < "u" && w(P).brighten(i.brightness).get() || P, D = i[s] || D, I = i[n] || I, t = i.dashStyle || t, W = v(i.opacity, W)), s = { fill: P, stroke: D, "stroke-width": I, opacity: W }, t && (s.dashstyle = t), s;
- }, u.prototype.drawPoints = function() {
- var i = this, p = this.chart, a = i.options, t = p.renderer, s = a.animationLimit || 250, n;
- i.points.forEach(function(P) {
- var D = P.graphic, I = !!D, W = D && p.pointCount < s ? "animate" : "attr";
- b(P.plotY) && P.y !== null ? (n = P.shapeArgs, D && P.hasNewShapeType() && (D = D.destroy()), i.enabledDataSorting && (P.startXPos = i.xAxis.reversed ? -(n && n.width || 0) : i.xAxis.width), D || (P.graphic = D = t[P.shapeType](n).add(P.group || i.group)) && i.enabledDataSorting && p.hasRendered && p.pointCount < s && (D.attr({ x: P.startXPos }), I = !0, W = "animate"), D && I && D[W](S(n)), a.borderRadius && D[W]({ r: a.borderRadius }), p.styledMode || D[W](i.pointAttribs(P, P.selected && "select")).shadow(P.allowShadow !== !1 && a.shadow, null, a.stacking && !a.borderRadius), D && (D.addClass(P.getClassName(), !0), D.attr({ visibility: P.visible ? "inherit" : "hidden" }))) : D && (P.graphic = D.destroy());
- });
- }, u.prototype.drawTracker = function() {
- var i = this, p = i.chart, a = p.pointer, t = function(n) {
- var P = a.getPointFromEvent(n);
- typeof P < "u" && (a.isDirectTouch = !0, P.onMouseOver(n));
- }, s;
- i.points.forEach(function(n) {
- s = k(n.dataLabels) ? n.dataLabels : n.dataLabel ? [n.dataLabel] : [], n.graphic && (n.graphic.element.point = n), s.forEach(function(P) {
- P.div ? P.div.point = n : P.element.point = n;
- });
- }), i._hasTracking || (i.trackerGroups.forEach(function(n) {
- i[n] && (i[n].addClass("highcharts-tracker").on("mouseover", t).on("mouseout", function(P) {
- a.onTrackerMouseOut(P);
- }), x && i[n].on(
- "touchstart",
- t
- ), !p.styledMode && i.options.cursor && i[n].css(l).css({ cursor: i.options.cursor }));
- }), i._hasTracking = !0), R(this, "afterDrawTracker");
- }, u.prototype.remove = function() {
- var i = this, p = i.chart;
- p.hasRendered && p.series.forEach(function(a) {
- a.type === i.type && (a.isDirty = !0);
- }), G.prototype.remove.apply(i, arguments);
- }, u.defaultOptions = S(G.defaultOptions, { borderRadius: 0, centerInCategory: !1, groupPadding: 0.2, marker: null, pointPadding: 0.1, minPointLength: 0, cropThreshold: 50, pointRange: null, states: {
- hover: { halo: !1, brightness: 0.1 },
- select: { color: "#cccccc", borderColor: "#000000" }
- }, dataLabels: { align: void 0, verticalAlign: void 0, y: void 0 }, startFromThreshold: !0, stickyTracking: !1, tooltip: { distance: 6 }, threshold: 0, borderColor: "#ffffff" }), u;
- }(G), O(F.prototype, { cropShoulder: 0, directTouch: !0, drawLegendSymbol: U.drawRectangle, getSymbol: y, negStacks: !0, trackerGroups: ["group", "dataLabelsGroup"] }), V.registerSeriesType("column", F), F;
- }), C(o, "Core/Series/DataLabel.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/FormatUtilities.js"],
- o["Core/Utilities.js"]
- ], function(y, N, _) {
- var U = y.getDeferredAnimation, G = N.format, V = _.defined, F = _.extend, B = _.fireEvent, j = _.isArray, w = _.merge, x = _.objectEach, f = _.pick, l = _.splat, T;
- return function(O) {
- function R(u, i, p, a, t) {
- var s = this, n = this.chart, P = this.isCartesian && n.inverted, D = this.enabledDataSorting, I = f(u.dlBox && u.dlBox.centerX, u.plotX, -9999), W = f(u.plotY, -9999), E = i.getBBox(), X = p.rotation, g = p.align, m = n.isInsidePlot(I, Math.round(W), { inverted: P, paneCoordinates: !0, series: s }), L = function(A) {
- D && s.xAxis && !z && s.setDataLabelStartPos(
- u,
- i,
- t,
- m,
- A
- );
- }, z = f(p.overflow, D ? "none" : "justify") === "justify", $ = this.visible && u.visible !== !1 && (u.series.forceDL || D && !z || m || f(p.inside, !!this.options.stacking) && a && n.isInsidePlot(I, P ? a.x + 1 : a.y + a.height - 1, { inverted: P, paneCoordinates: !0, series: s }));
- if ($) {
- var Q = n.renderer.fontMetrics(n.styledMode ? void 0 : p.style.fontSize, i).b;
- a = F({ x: P ? this.yAxis.len - W : I, y: Math.round(P ? this.xAxis.len - I : W), width: 0, height: 0 }, a), F(p, { width: E.width, height: E.height }), X ? (z = !1, I = n.renderer.rotCorr(Q, X), I = { x: a.x + (p.x || 0) + a.width / 2 + I.x, y: a.y + (p.y || 0) + { top: 0, middle: 0.5, bottom: 1 }[p.verticalAlign] * a.height }, L(I), i[t ? "attr" : "animate"](I).attr({ align: g }), L = (X + 720) % 360, L = 180 < L && 360 > L, g === "left" ? I.y -= L ? E.height : 0 : g === "center" ? (I.x -= E.width / 2, I.y -= E.height / 2) : g === "right" && (I.x -= E.width, I.y -= L ? 0 : E.height), i.placed = !0, i.alignAttr = I) : (L(a), i.align(p, void 0, a), I = i.alignAttr), z && 0 <= a.height ? this.justifyDataLabel(i, p, I, E, a, t) : f(p.crop, !0) && ($ = n.isInsidePlot(I.x, I.y, { paneCoordinates: !0, series: s }) && n.isInsidePlot(I.x + E.width, I.y + E.height, {
- paneCoordinates: !0,
- series: s
- })), p.shape && !X && i[t ? "attr" : "animate"]({ anchorX: P ? n.plotWidth - u.plotY : u.plotX, anchorY: P ? n.plotHeight - u.plotX : u.plotY });
- }
- t && D && (i.placed = !1), $ || D && !z || (i.hide(!0), i.placed = !1);
- }
- function k(u, i) {
- var p = i.filter;
- return p ? (i = p.operator, u = u[p.property], p = p.value, i === ">" && u > p || i === "<" && u < p || i === ">=" && u >= p || i === "<=" && u <= p || i === "==" && u == p || i === "===" && u === p) : !0;
- }
- function b() {
- var u = this, i = u.chart, p = u.options, a = u.points, t = u.hasRendered || 0, s = i.renderer, n = p.dataLabels, P, D = n.animation;
- if (D = n.defer ? U(
- i,
- D,
- u
- ) : { defer: 0, duration: 0 }, n = v(v(i.options.plotOptions && i.options.plotOptions.series && i.options.plotOptions.series.dataLabels, i.options.plotOptions && i.options.plotOptions[u.type] && i.options.plotOptions[u.type].dataLabels), n), B(this, "drawDataLabels"), j(n) || n.enabled || u._hasPointLabels) {
- var I = u.plotGroup("dataLabelsGroup", "data-labels", t ? "inherit" : "hidden", n.zIndex || 6);
- I.attr({ opacity: +t }), !t && (t = u.dataLabelsGroup) && (u.visible && I.show(!0), t[p.animation ? "animate" : "attr"]({ opacity: 1 }, D)), a.forEach(function(W) {
- P = l(v(n, W.dlOptions || W.options && W.options.dataLabels)), P.forEach(function(E, X) {
- var g = E.enabled && (!W.isNull || W.dataLabelOnNull) && k(W, E), m = W.connectors ? W.connectors[X] : W.connector, L = W.dataLabels ? W.dataLabels[X] : W.dataLabel, z = f(E.distance, W.labelDistance), $ = !L;
- if (g) {
- var Q = W.getLabelConfig(), A = f(E[W.formatPrefix + "Format"], E.format);
- Q = V(A) ? G(A, Q, i) : (E[W.formatPrefix + "Formatter"] || E.formatter).call(Q, E), A = E.style;
- var H = E.rotation;
- i.styledMode || (A.color = f(E.color, A.color, u.color, "#000000"), A.color === "contrast" ? (W.contrastColor = s.getContrast(W.color || u.color), A.color = !V(z) && E.inside || 0 > z || p.stacking ? W.contrastColor : "#000000") : delete W.contrastColor, p.cursor && (A.cursor = p.cursor));
- var Y = { r: E.borderRadius || 0, rotation: H, padding: E.padding, zIndex: 1 };
- i.styledMode || (Y.fill = E.backgroundColor, Y.stroke = E.borderColor, Y["stroke-width"] = E.borderWidth), x(Y, function(Z, q) {
- typeof Z > "u" && delete Y[q];
- });
- }
- !L || g && V(Q) && !!L.div == !!E.useHTML || (W.dataLabel = L = W.dataLabel && W.dataLabel.destroy(), W.dataLabels && (W.dataLabels.length === 1 ? delete W.dataLabels : delete W.dataLabels[X]), X || delete W.dataLabel, m && (W.connector = W.connector.destroy(), W.connectors && (W.connectors.length === 1 ? delete W.connectors : delete W.connectors[X]))), g && V(Q) && (L ? Y.text = Q : (W.dataLabels = W.dataLabels || [], L = W.dataLabels[X] = H ? s.text(Q, 0, -9999, E.useHTML).addClass("highcharts-data-label") : s.label(Q, 0, -9999, E.shape, null, null, E.useHTML, null, "data-label"), X || (W.dataLabel = L), L.addClass(" highcharts-data-label-color-" + W.colorIndex + " " + (E.className || "") + (E.useHTML ? " highcharts-tracker" : ""))), L.options = E, L.attr(Y), i.styledMode || L.css(A).shadow(E.shadow), L.added || L.add(I), E.textPath && !E.useHTML && (L.setTextPath(W.getDataLabelPath && W.getDataLabelPath(L) || W.graphic, E.textPath), W.dataLabelPath && !E.textPath.enabled && (W.dataLabelPath = W.dataLabelPath.destroy())), u.alignDataLabel(W, L, E, null, $));
- });
- });
- }
- B(this, "afterDrawDataLabels");
- }
- function S(u, i, p, a, t, s) {
- var n = this.chart, P = i.align, D = i.verticalAlign, I = u.box ? 0 : u.padding || 0, W = i.x;
- W = W === void 0 ? 0 : W;
- var E = i.y;
- E = E === void 0 ? 0 : E;
- var X = (p.x || 0) + I;
- if (0 > X) {
- P === "right" && 0 <= W ? (i.align = "left", i.inside = !0) : W -= X;
- var g = !0;
- }
- return X = (p.x || 0) + a.width - I, X > n.plotWidth && (P === "left" && 0 >= W ? (i.align = "right", i.inside = !0) : W += n.plotWidth - X, g = !0), X = p.y + I, 0 > X && (D === "bottom" && 0 <= E ? (i.verticalAlign = "top", i.inside = !0) : E -= X, g = !0), X = (p.y || 0) + a.height - I, X > n.plotHeight && (D === "top" && 0 >= E ? (i.verticalAlign = "bottom", i.inside = !0) : E += n.plotHeight - X, g = !0), g && (i.x = W, i.y = E, u.placed = !s, u.align(i, void 0, t)), g;
- }
- function v(u, i) {
- var p = [], a;
- if (j(u) && !j(i))
- p = u.map(function(t) {
- return w(t, i);
- });
- else if (j(i) && !j(u))
- p = i.map(function(t) {
- return w(u, t);
- });
- else if (j(u) || j(i))
- for (a = Math.max(u.length, i.length); a--; )
- p[a] = w(u[a], i[a]);
- else
- p = w(u, i);
- return p;
- }
- function h(u, i, p, a, t) {
- var s = this.chart, n = s.inverted, P = this.xAxis, D = P.reversed, I = n ? i.height / 2 : i.width / 2;
- u = (u = u.pointWidth) ? u / 2 : 0, i.startXPos = n ? t.x : D ? -I - u : P.width - I + u, i.startYPos = n ? D ? this.yAxis.height - I + u : -I - u : t.y, a ? i.visibility === "hidden" && (i.show(), i.attr({ opacity: 0 }).animate({ opacity: 1 })) : i.attr({ opacity: 1 }).animate(
- { opacity: 0 },
- void 0,
- i.hide
- ), s.hasRendered && (p && i.attr({ x: i.startXPos, y: i.startYPos }), i.placed = !0);
- }
- var c = [];
- O.compose = function(u) {
- if (c.indexOf(u) === -1) {
- var i = u.prototype;
- c.push(u), i.alignDataLabel = R, i.drawDataLabels = b, i.justifyDataLabel = S, i.setDataLabelStartPos = h;
- }
- };
- }(T || (T = {})), T;
- }), C(o, "Series/Column/ColumnDataLabel.js", [o["Core/Series/DataLabel.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, _) {
- var U = N.series, G = _.merge, V = _.pick, F;
- return function(B) {
- function j(x, f, l, T, O) {
- var R = this.chart.inverted, k = x.series, b = (k.xAxis ? k.xAxis.len : this.chart.plotSizeX) || 0;
- k = (k.yAxis ? k.yAxis.len : this.chart.plotSizeY) || 0;
- var S = x.dlBox || x.shapeArgs, v = V(x.below, x.plotY > V(this.translatedThreshold, k)), h = V(l.inside, !!this.options.stacking);
- S && (T = G(S), 0 > T.y && (T.height += T.y, T.y = 0), S = T.y + T.height - k, 0 < S && S < T.height && (T.height -= S), R && (T = { x: k - T.y - T.height, y: b - T.x - T.width, width: T.height, height: T.width }), h || (R ? (T.x += v ? 0 : T.width, T.width = 0) : (T.y += v ? T.height : 0, T.height = 0))), l.align = V(l.align, !R || h ? "center" : v ? "right" : "left"), l.verticalAlign = V(l.verticalAlign, R || h ? "middle" : v ? "top" : "bottom"), U.prototype.alignDataLabel.call(this, x, f, l, T, O), l.inside && x.contrastColor && f.css({ color: x.contrastColor });
- }
- var w = [];
- B.compose = function(x) {
- y.compose(U), w.indexOf(x) === -1 && (w.push(x), x.prototype.alignDataLabel = j);
- };
- }(F || (F = {})), F;
- }), C(o, "Series/Bar/BarSeries.js", [o["Series/Column/ColumnSeries.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, _) {
- var U = this && this.__extends || function() {
- var F = function(B, j) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, x) {
- w.__proto__ = x;
- } || function(w, x) {
- for (var f in x)
- x.hasOwnProperty(f) && (w[f] = x[f]);
- }, F(B, j);
- };
- return function(B, j) {
- function w() {
- this.constructor = B;
- }
- F(B, j), B.prototype = j === null ? Object.create(j) : (w.prototype = j.prototype, new w());
- };
- }(), G = _.extend, V = _.merge;
- return _ = function(F) {
- function B() {
- var j = F !== null && F.apply(this, arguments) || this;
- return j.data = void 0, j.options = void 0, j.points = void 0, j;
- }
- return U(B, F), B.defaultOptions = V(
- y.defaultOptions,
- {}
- ), B;
- }(y), G(_.prototype, { inverted: !0 }), N.registerSeriesType("bar", _), _;
- }), C(o, "Series/Scatter/ScatterSeries.js", [o["Series/Column/ColumnSeries.js"], o["Series/Line/LineSeries.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, _, U) {
- var G = this && this.__extends || function() {
- var j = function(w, x) {
- return j = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(f, l) {
- f.__proto__ = l;
- } || function(f, l) {
- for (var T in l)
- l.hasOwnProperty(T) && (f[T] = l[T]);
- }, j(w, x);
- };
- return function(w, x) {
- function f() {
- this.constructor = w;
- }
- j(w, x), w.prototype = x === null ? Object.create(x) : (f.prototype = x.prototype, new f());
- };
- }(), V = U.addEvent, F = U.extend, B = U.merge;
- return U = function(j) {
- function w() {
- var x = j !== null && j.apply(this, arguments) || this;
- return x.data = void 0, x.options = void 0, x.points = void 0, x;
- }
- return G(w, j), w.prototype.applyJitter = function() {
- var x = this, f = this.options.jitter, l = this.points.length;
- f && this.points.forEach(function(T, O) {
- ["x", "y"].forEach(function(R, k) {
- var b = "plot" + R.toUpperCase();
- if (f[R] && !T.isNull) {
- var S = x[R + "Axis"], v = f[R] * S.transA;
- if (S && !S.isLog) {
- var h = Math.max(0, T[b] - v);
- S = Math.min(S.len, T[b] + v), k = 1e4 * Math.sin(O + k * l), T[b] = h + (S - h) * (k - Math.floor(k)), R === "x" && (T.clientX = T.plotX);
- }
- }
- });
- });
- }, w.prototype.drawGraph = function() {
- this.options.lineWidth ? j.prototype.drawGraph.call(this) : this.graph && (this.graph = this.graph.destroy());
- }, w.defaultOptions = B(N.defaultOptions, { lineWidth: 0, findNearestPointBy: "xy", jitter: { x: 0, y: 0 }, marker: { enabled: !0 }, tooltip: {
- headerFormat: '<span style="color:{point.color}">●</span> <span style="font-size: 10px"> {series.name}</span><br/>',
- pointFormat: "x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"
- } }), w;
- }(N), F(U.prototype, { drawTracker: y.prototype.drawTracker, sorted: !1, requireSorting: !1, noSharedTooltip: !0, trackerGroups: ["group", "markerGroup", "dataLabelsGroup"], takeOrdinalPosition: !1 }), V(U, "afterTranslate", function() {
- this.applyJitter();
- }), _.registerSeriesType("scatter", U), U;
- }), C(o, "Series/CenteredUtilities.js", [o["Core/Globals.js"], o["Core/Series/Series.js"], o["Core/Utilities.js"]], function(y, N, _) {
- var U = y.deg2rad, G = _.isNumber, V = _.pick, F = _.relativeLength, B;
- return function(j) {
- j.getCenter = function() {
- var w = this.options, x = this.chart, f = 2 * (w.slicedOffset || 0), l = x.plotWidth - 2 * f, T = x.plotHeight - 2 * f, O = w.center, R = Math.min(l, T), k = w.size, b = w.innerSize || 0;
- for (typeof k == "string" && (k = parseFloat(k)), typeof b == "string" && (b = parseFloat(b)), w = [V(O[0], "50%"), V(O[1], "50%"), V(k && 0 > k ? void 0 : w.size, "100%"), V(b && 0 > b ? void 0 : w.innerSize || 0, "0%")], !x.angular || this instanceof N || (w[3] = 0), O = 0; 4 > O; ++O)
- k = w[O], x = 2 > O || O === 2 && /%$/.test(k), w[O] = F(k, [l, T, R, w[2]][O]) + (x ? f : 0);
- return w[3] > w[2] && (w[3] = w[2]), w;
- }, j.getStartAndEndRadians = function(w, x) {
- return w = G(w) ? w : 0, x = G(x) && x > w && 360 > x - w ? x : w + 360, { start: U * (w + -90), end: U * (x + -90) };
- };
- }(B || (B = {})), B;
- }), C(o, "Series/Pie/PiePoint.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Series/Point.js"], o["Core/Utilities.js"]], function(y, N, _) {
- var U = this && this.__extends || function() {
- var x = function(f, l) {
- return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(T, O) {
- T.__proto__ = O;
- } || function(T, O) {
- for (var R in O)
- O.hasOwnProperty(R) && (T[R] = O[R]);
- }, x(f, l);
- };
- return function(f, l) {
- function T() {
- this.constructor = f;
- }
- x(f, l), f.prototype = l === null ? Object.create(l) : (T.prototype = l.prototype, new T());
- };
- }(), G = y.setAnimation, V = _.addEvent, F = _.defined;
- y = _.extend;
- var B = _.isNumber, j = _.pick, w = _.relativeLength;
- return N = function(x) {
- function f() {
- var l = x !== null && x.apply(this, arguments) || this;
- return l.labelDistance = void 0, l.options = void 0, l.series = void 0, l;
- }
- return U(f, x), f.prototype.getConnectorPath = function() {
- var l = this.labelPosition, T = this.series.options.dataLabels, O = this.connectorShapes, R = T.connectorShape;
- return O[R] && (R = O[R]), R.call(this, { x: l.final.x, y: l.final.y, alignment: l.alignment }, l.connectorPosition, T);
- }, f.prototype.getTranslate = function() {
- return this.sliced ? this.slicedTranslation : { translateX: 0, translateY: 0 };
- }, f.prototype.haloPath = function(l) {
- var T = this.shapeArgs;
- return this.sliced || !this.visible ? [] : this.series.chart.renderer.symbols.arc(T.x, T.y, T.r + l, T.r + l, { innerR: T.r - 1, start: T.start, end: T.end });
- }, f.prototype.init = function() {
- var l = this;
- x.prototype.init.apply(
- this,
- arguments
- ), this.name = j(this.name, "Slice");
- var T = function(O) {
- l.slice(O.type === "select");
- };
- return V(this, "select", T), V(this, "unselect", T), this;
- }, f.prototype.isValid = function() {
- return B(this.y) && 0 <= this.y;
- }, f.prototype.setVisible = function(l, T) {
- var O = this, R = this.series, k = R.chart, b = R.options.ignoreHiddenPoint;
- T = j(T, b), l !== this.visible && (this.visible = this.options.visible = l = typeof l > "u" ? !this.visible : l, R.options.data[R.data.indexOf(this)] = this.options, ["graphic", "dataLabel", "connector", "shadowGroup"].forEach(function(S) {
- O[S] && O[S][l ? "show" : "hide"](l);
- }), this.legendItem && k.legend.colorizeItem(this, l), l || this.state !== "hover" || this.setState(""), b && (R.isDirty = !0), T && k.redraw());
- }, f.prototype.slice = function(l, T, O) {
- var R = this.series;
- G(O, R.chart), j(T, !0), this.sliced = this.options.sliced = F(l) ? l : !this.sliced, R.options.data[R.data.indexOf(this)] = this.options, this.graphic && this.graphic.animate(this.getTranslate()), this.shadowGroup && this.shadowGroup.animate(this.getTranslate());
- }, f;
- }(N), y(N.prototype, { connectorShapes: { fixedOffset: function(x, f, l) {
- var T = f.breakAt;
- return f = f.touchingSliceAt, [["M", x.x, x.y], l.softConnector ? ["C", x.x + (x.alignment === "left" ? -5 : 5), x.y, 2 * T.x - f.x, 2 * T.y - f.y, T.x, T.y] : ["L", T.x, T.y], ["L", f.x, f.y]];
- }, straight: function(x, f) {
- return f = f.touchingSliceAt, [["M", x.x, x.y], ["L", f.x, f.y]];
- }, crookedLine: function(x, f, l) {
- f = f.touchingSliceAt;
- var T = this.series, O = T.center[0], R = T.chart.plotWidth, k = T.chart.plotLeft;
- T = x.alignment;
- var b = this.shapeArgs.r;
- return l = w(l.crookDistance, 1), R = T === "left" ? O + b + (R + k - O - b) * (1 - l) : k + (O - b) * l, l = ["L", R, x.y], O = !0, (T === "left" ? R > x.x || R < f.x : R < x.x || R > f.x) && (O = !1), x = [["M", x.x, x.y]], O && x.push(l), x.push(["L", f.x, f.y]), x;
- } } }), N;
- }), C(o, "Series/Pie/PieSeries.js", [o["Series/CenteredUtilities.js"], o["Series/Column/ColumnSeries.js"], o["Core/Globals.js"], o["Core/Legend/LegendSymbol.js"], o["Series/Pie/PiePoint.js"], o["Core/Series/Series.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Renderer/SVG/Symbols.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V, F, B, j) {
- var w = this && this.__extends || function() {
- var b = function(S, v) {
- return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(h, c) {
- h.__proto__ = c;
- } || function(h, c) {
- for (var u in c)
- c.hasOwnProperty(u) && (h[u] = c[u]);
- }, b(S, v);
- };
- return function(S, v) {
- function h() {
- this.constructor = S;
- }
- b(S, v), S.prototype = v === null ? Object.create(v) : (h.prototype = v.prototype, new h());
- };
- }(), x = y.getStartAndEndRadians;
- _ = _.noop;
- var f = j.clamp, l = j.extend, T = j.fireEvent, O = j.merge, R = j.pick, k = j.relativeLength;
- return j = function(b) {
- function S() {
- var v = b !== null && b.apply(this, arguments) || this;
- return v.center = void 0, v.data = void 0, v.maxLabelDistance = void 0, v.options = void 0, v.points = void 0, v;
- }
- return w(S, b), S.prototype.animate = function(v) {
- var h = this, c = h.points, u = h.startAngleRad;
- v || c.forEach(function(i) {
- var p = i.graphic, a = i.shapeArgs;
- p && a && (p.attr({ r: R(i.startR, h.center && h.center[3] / 2), start: u, end: u }), p.animate({ r: a.r, start: a.start, end: a.end }, h.options.animation));
- });
- }, S.prototype.drawEmpty = function() {
- var v = this.startAngleRad, h = this.endAngleRad, c = this.options;
- if (this.total === 0 && this.center) {
- var u = this.center[0], i = this.center[1];
- this.graph || (this.graph = this.chart.renderer.arc(u, i, this.center[1] / 2, 0, v, h).addClass("highcharts-empty-series").add(this.group)), this.graph.attr({ d: B.arc(u, i, this.center[2] / 2, 0, { start: v, end: h, innerR: this.center[3] / 2 }) }), this.chart.styledMode || this.graph.attr({ "stroke-width": c.borderWidth, fill: c.fillColor || "none", stroke: c.color || "#cccccc" });
- } else
- this.graph && (this.graph = this.graph.destroy());
- }, S.prototype.drawPoints = function() {
- var v = this.chart.renderer;
- this.points.forEach(function(h) {
- h.graphic && h.hasNewShapeType() && (h.graphic = h.graphic.destroy()), h.graphic || (h.graphic = v[h.shapeType](h.shapeArgs).add(h.series.group), h.delayedRendering = !0);
- });
- }, S.prototype.generatePoints = function() {
- b.prototype.generatePoints.call(this), this.updateTotals();
- }, S.prototype.getX = function(v, h, c) {
- var u = this.center, i = this.radii ? this.radii[c.index] || 0 : u[2] / 2;
- return v = Math.asin(f((v - u[1]) / (i + c.labelDistance), -1, 1)), u[0] + (h ? -1 : 1) * Math.cos(v) * (i + c.labelDistance) + (0 < c.labelDistance ? (h ? -1 : 1) * this.options.dataLabels.padding : 0);
- }, S.prototype.hasData = function() {
- return !!this.processedXData.length;
- }, S.prototype.redrawPoints = function() {
- var v = this, h = v.chart, c = h.renderer, u = v.options.shadow, i, p, a, t;
- this.drawEmpty(), !u || v.shadowGroup || h.styledMode || (v.shadowGroup = c.g("shadow").attr({ zIndex: -1 }).add(v.group)), v.points.forEach(function(s) {
- var n = {};
- if (p = s.graphic, !s.isNull && p) {
- var P = void 0;
- t = s.shapeArgs, i = s.getTranslate(), h.styledMode || (P = s.shadowGroup, u && !P && (P = s.shadowGroup = c.g("shadow").add(v.shadowGroup)), P && P.attr(i), a = v.pointAttribs(s, s.selected && "select")), s.delayedRendering ? (p.setRadialReference(v.center).attr(t).attr(i), h.styledMode || p.attr(a).attr({ "stroke-linejoin": "round" }).shadow(u, P), s.delayedRendering = !1) : (p.setRadialReference(v.center), h.styledMode || O(!0, n, a), O(!0, n, t, i), p.animate(n)), p.attr({ visibility: s.visible ? "inherit" : "hidden" }), p.addClass(s.getClassName(), !0);
- } else
- p && (s.graphic = p.destroy());
- });
- }, S.prototype.sortByAngle = function(v, h) {
- v.sort(function(c, u) {
- return typeof c.angle < "u" && (u.angle - c.angle) * h;
- });
- }, S.prototype.translate = function(v) {
- this.generatePoints();
- var h = this.options, c = h.slicedOffset, u = c + (h.borderWidth || 0), i = x(h.startAngle, h.endAngle), p = this.startAngleRad = i.start;
- i = (this.endAngleRad = i.end) - p;
- var a = this.points, t = h.dataLabels.distance;
- h = h.ignoreHiddenPoint;
- var s = a.length, n, P = 0;
- for (v || (this.center = v = this.getCenter()), n = 0; n < s; n++) {
- var D = a[n], I = p + P * i;
- !D.isValid() || h && !D.visible || (P += D.percentage / 100);
- var W = p + P * i, E = { x: v[0], y: v[1], r: v[2] / 2, innerR: v[3] / 2, start: Math.round(1e3 * I) / 1e3, end: Math.round(1e3 * W) / 1e3 };
- D.shapeType = "arc", D.shapeArgs = E, D.labelDistance = R(D.options.dataLabels && D.options.dataLabels.distance, t), D.labelDistance = k(D.labelDistance, E.r), this.maxLabelDistance = Math.max(this.maxLabelDistance || 0, D.labelDistance), W = (W + I) / 2, W > 1.5 * Math.PI ? W -= 2 * Math.PI : W < -Math.PI / 2 && (W += 2 * Math.PI), D.slicedTranslation = { translateX: Math.round(Math.cos(W) * c), translateY: Math.round(Math.sin(W) * c) }, E = Math.cos(W) * v[2] / 2;
- var X = Math.sin(W) * v[2] / 2;
- D.tooltipPos = [v[0] + 0.7 * E, v[1] + 0.7 * X], D.half = W < -Math.PI / 2 || W > Math.PI / 2 ? 1 : 0, D.angle = W, I = Math.min(u, D.labelDistance / 5), D.labelPosition = { natural: { x: v[0] + E + Math.cos(W) * D.labelDistance, y: v[1] + X + Math.sin(W) * D.labelDistance }, final: {}, alignment: 0 > D.labelDistance ? "center" : D.half ? "right" : "left", connectorPosition: { breakAt: { x: v[0] + E + Math.cos(W) * I, y: v[1] + X + Math.sin(W) * I }, touchingSliceAt: { x: v[0] + E, y: v[1] + X } } };
- }
- T(this, "afterTranslate");
- }, S.prototype.updateTotals = function() {
- var v = this.points, h = v.length, c = this.options.ignoreHiddenPoint, u, i = 0;
- for (u = 0; u < h; u++) {
- var p = v[u];
- !p.isValid() || c && !p.visible || (i += p.y);
- }
- for (this.total = i, u = 0; u < h; u++)
- p = v[u], p.percentage = 0 < i && (p.visible || !c) ? p.y / i * 100 : 0, p.total = i;
- }, S.defaultOptions = O(V.defaultOptions, {
- center: [null, null],
- clip: !1,
- colorByPoint: !0,
- dataLabels: { allowOverlap: !0, connectorPadding: 5, connectorShape: "fixedOffset", crookDistance: "70%", distance: 30, enabled: !0, formatter: function() {
- return this.point.isNull ? void 0 : this.point.name;
- }, softConnector: !0, x: 0 },
- fillColor: void 0,
- ignoreHiddenPoint: !0,
- inactiveOtherPoints: !0,
- legendType: "point",
- marker: null,
- size: null,
- showInLegend: !1,
- slicedOffset: 10,
- stickyTracking: !1,
- tooltip: { followPointer: !0 },
- borderColor: "#ffffff",
- borderWidth: 1,
- lineWidth: void 0,
- states: { hover: { brightness: 0.1 } }
- }), S;
- }(V), l(j.prototype, { axisTypes: [], directTouch: !0, drawGraph: void 0, drawLegendSymbol: U.drawRectangle, drawTracker: N.prototype.drawTracker, getCenter: y.getCenter, getSymbol: _, isCartesian: !1, noSharedTooltip: !0, pointAttribs: N.prototype.pointAttribs, pointClass: G, requireSorting: !1, searchPoint: _, trackerGroups: ["group", "dataLabelsGroup"] }), F.registerSeriesType("pie", j), j;
- }), C(o, "Series/Pie/PieDataLabel.js", [
- o["Core/Series/DataLabel.js"],
- o["Core/Globals.js"],
- o["Core/Renderer/RendererUtilities.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Utilities.js"]
- ], function(y, N, _, U, G) {
- var V = N.noop, F = _.distribute, B = U.series, j = G.arrayMax, w = G.clamp, x = G.defined, f = G.merge, l = G.pick, T = G.relativeLength, O;
- return function(R) {
- function k() {
- var c = this, u = c.data, i = c.chart, p = c.options.dataLabels || {}, a = p.connectorPadding, t = i.plotWidth, s = i.plotHeight, n = i.plotLeft, P = Math.round(i.chartWidth / 3), D = c.center, I = D[2] / 2, W = D[1], E = [[], []], X = [0, 0, 0, 0], g = c.dataLabelPositioners, m, L, z, $, Q, A, H, Y, Z, q, it, et;
- c.visible && (p.enabled || c._hasPointLabels) && (u.forEach(function(nt) {
- nt.dataLabel && nt.visible && nt.dataLabel.shortened && (nt.dataLabel.attr({ width: "auto" }).css({ width: "auto", textOverflow: "clip" }), nt.dataLabel.shortened = !1);
- }), B.prototype.drawDataLabels.apply(c), u.forEach(function(nt) {
- nt.dataLabel && (nt.visible ? (E[nt.half].push(nt), nt.dataLabel._pos = null, !x(p.style.width) && !x(nt.options.dataLabels && nt.options.dataLabels.style && nt.options.dataLabels.style.width) && nt.dataLabel.getBBox().width > P && (nt.dataLabel.css({ width: Math.round(0.7 * P) + "px" }), nt.dataLabel.shortened = !0)) : (nt.dataLabel = nt.dataLabel.destroy(), nt.dataLabels && nt.dataLabels.length === 1 && delete nt.dataLabels));
- }), E.forEach(function(nt, rt) {
- var ct = nt.length, gt = [], dt;
- if (ct) {
- if (c.sortByAngle(nt, rt - 0.5), 0 < c.maxLabelDistance) {
- var ht = Math.max(0, W - I - c.maxLabelDistance), at = Math.min(W + I + c.maxLabelDistance, i.plotHeight);
- nt.forEach(function(J) {
- 0 < J.labelDistance && J.dataLabel && (J.top = Math.max(0, W - I - J.labelDistance), J.bottom = Math.min(W + I + J.labelDistance, i.plotHeight), dt = J.dataLabel.getBBox().height || 21, J.distributeBox = { target: J.labelPosition.natural.y - J.top + dt / 2, size: dt, rank: J.y }, gt.push(J.distributeBox));
- }), ht = at + dt - ht, F(gt, ht, ht / 5);
- }
- for (it = 0; it < ct; it++) {
- if (m = nt[it], A = m.labelPosition, $ = m.dataLabel, q = m.visible === !1 ? "hidden" : "inherit", Z = ht = A.natural.y, gt && x(m.distributeBox) && (typeof m.distributeBox.pos > "u" ? q = "hidden" : (H = m.distributeBox.size, Z = g.radialDistributionY(m))), delete m.positionIndex, p.justify)
- Y = g.justify(m, I, D);
- else
- switch (p.alignTo) {
- case "connectors":
- Y = g.alignToConnectors(nt, rt, t, n);
- break;
- case "plotEdges":
- Y = g.alignToPlotEdges($, rt, t, n);
- break;
- default:
- Y = g.radialDistributionX(c, m, Z, ht);
- }
- $._attr = { visibility: q, align: A.alignment }, et = m.options.dataLabels || {}, $._pos = { x: Y + l(et.x, p.x) + ({ left: a, right: -a }[A.alignment] || 0), y: Z + l(et.y, p.y) - 10 }, A.final.x = Y, A.final.y = Z, l(p.crop, !0) && (Q = $.getBBox().width, ht = null, Y - Q < a && rt === 1 ? (ht = Math.round(Q - Y + a), X[3] = Math.max(ht, X[3])) : Y + Q > t - a && rt === 0 && (ht = Math.round(Y + Q - t + a), X[1] = Math.max(ht, X[1])), 0 > Z - H / 2 ? X[0] = Math.max(Math.round(-Z + H / 2), X[0]) : Z + H / 2 > s && (X[2] = Math.max(Math.round(Z + H / 2 - s), X[2])), $.sideOverflow = ht);
- }
- }
- }), j(X) === 0 || this.verifyDataLabelOverflow(X)) && (this.placeDataLabels(), this.points.forEach(function(nt) {
- if (et = f(p, nt.options.dataLabels), L = l(et.connectorWidth, 1)) {
- var rt;
- z = nt.connector, ($ = nt.dataLabel) && $._pos && nt.visible && 0 < nt.labelDistance ? (q = $._attr.visibility, (rt = !z) && (nt.connector = z = i.renderer.path().addClass("highcharts-data-label-connector highcharts-color-" + nt.colorIndex + (nt.className ? " " + nt.className : "")).add(c.dataLabelsGroup), i.styledMode || z.attr({ "stroke-width": L, stroke: et.connectorColor || nt.color || "#666666" })), z[rt ? "attr" : "animate"]({ d: nt.getConnectorPath() }), z.attr("visibility", q)) : z && (nt.connector = z.destroy());
- }
- }));
- }
- function b() {
- this.points.forEach(function(c) {
- var u = c.dataLabel, i;
- u && c.visible && ((i = u._pos) ? (u.sideOverflow && (u._attr.width = Math.max(u.getBBox().width - u.sideOverflow, 0), u.css({ width: u._attr.width + "px", textOverflow: (this.options.dataLabels.style || {}).textOverflow || "ellipsis" }), u.shortened = !0), u.attr(u._attr), u[u.moved ? "animate" : "attr"](i), u.moved = !0) : u && u.attr({ y: -9999 })), delete c.distributeBox;
- }, this);
- }
- function S(c) {
- var u = this.center, i = this.options, p = i.center, a = i.minSize || 80, t = i.size !== null;
- if (!t) {
- if (p[0] !== null)
- var s = Math.max(u[2] - Math.max(c[1], c[3]), a);
- else
- s = Math.max(u[2] - c[1] - c[3], a), u[0] += (c[3] - c[1]) / 2;
- p[1] !== null ? s = w(s, a, u[2] - Math.max(c[0], c[2])) : (s = w(s, a, u[2] - c[0] - c[2]), u[1] += (c[0] - c[2]) / 2), s < u[2] ? (u[2] = s, u[3] = Math.min(T(i.innerSize || 0, s), s), this.translate(u), this.drawDataLabels && this.drawDataLabels()) : t = !0;
- }
- return t;
- }
- var v = [], h = { radialDistributionY: function(c) {
- return c.top + c.distributeBox.pos;
- }, radialDistributionX: function(c, u, i, p) {
- return c.getX(i < u.top + 2 || i > u.bottom - 2 ? p : i, u.half, u);
- }, justify: function(c, u, i) {
- return i[0] + (c.half ? -1 : 1) * (u + c.labelDistance);
- }, alignToPlotEdges: function(c, u, i, p) {
- return c = c.getBBox().width, u ? c + p : i - c - p;
- }, alignToConnectors: function(c, u, i, p) {
- var a = 0, t;
- return c.forEach(function(s) {
- t = s.dataLabel.getBBox().width, t > a && (a = t);
- }), u ? a + p : i - a - p;
- } };
- R.compose = function(c) {
- y.compose(B), v.indexOf(c) === -1 && (v.push(c), c = c.prototype, c.dataLabelPositioners = h, c.alignDataLabel = V, c.drawDataLabels = k, c.placeDataLabels = b, c.verifyDataLabelOverflow = S);
- };
- }(O || (O = {})), O;
- }), C(o, "Extensions/OverlappingDataLabels.js", [o["Core/Chart/Chart.js"], o["Core/Utilities.js"]], function(y, N) {
- function _(w, x) {
- var f = !1;
- if (w) {
- var l = w.newOpacity;
- w.oldOpacity !== l && (w.alignAttr && w.placed ? (w[l ? "removeClass" : "addClass"]("highcharts-data-label-hidden"), f = !0, w.alignAttr.opacity = l, w[w.isOld ? "animate" : "attr"](w.alignAttr, null, function() {
- x.styledMode || w.css({ pointerEvents: l ? "auto" : "none" });
- }), G(x, "afterHideOverlappingLabel")) : w.attr({ opacity: l })), w.isOld = !0;
- }
- return f;
- }
- var U = N.addEvent, G = N.fireEvent, V = N.isArray, F = N.isNumber, B = N.objectEach, j = N.pick;
- U(y, "render", function() {
- var w = this, x = [];
- (this.labelCollectors || []).forEach(function(f) {
- x = x.concat(f());
- }), (this.yAxis || []).forEach(function(f) {
- f.stacking && f.options.stackLabels && !f.options.stackLabels.allowOverlap && B(f.stacking.stacks, function(l) {
- B(l, function(T) {
- T.label && T.label.visibility !== "hidden" && x.push(T.label);
- });
- });
- }), (this.series || []).forEach(function(f) {
- var l = f.options.dataLabels;
- f.visible && (l.enabled !== !1 || f._hasPointLabels) && (l = function(T) {
- return T.forEach(function(O) {
- O.visible && (V(O.dataLabels) ? O.dataLabels : O.dataLabel ? [O.dataLabel] : []).forEach(function(R) {
- var k = R.options;
- R.labelrank = j(k.labelrank, O.labelrank, O.shapeArgs && O.shapeArgs.height), k.allowOverlap ? (R.oldOpacity = R.opacity, R.newOpacity = 1, _(R, w)) : x.push(R);
- });
- });
- }, l(f.nodes || []), l(f.points));
- }), this.hideOverlappingLabels(x);
- }), y.prototype.hideOverlappingLabels = function(w) {
- var x = this, f = w.length, l = x.renderer, T, O, R, k = !1, b = function(h) {
- var c, u = h.box ? 0 : h.padding || 0, i = c = 0, p;
- if (h && (!h.alignAttr || h.placed)) {
- var a = h.alignAttr || { x: h.attr("x"), y: h.attr("y") }, t = h.parentGroup;
- h.width || (c = h.getBBox(), h.width = c.width, h.height = c.height, c = l.fontMetrics(null, h.element).h);
- var s = h.width - 2 * u;
- return (p = { left: "0", center: "0.5", right: "1" }[h.alignValue]) ? i = +p * s : F(h.x) && Math.round(h.x) !== h.translateX && (i = h.x - h.translateX), { x: a.x + (t.translateX || 0) + u - (i || 0), y: a.y + (t.translateY || 0) + u - c, width: h.width - 2 * u, height: h.height - 2 * u };
- }
- };
- for (O = 0; O < f; O++)
- (T = w[O]) && (T.oldOpacity = T.opacity, T.newOpacity = 1, T.absoluteBox = b(T));
- for (w.sort(function(h, c) {
- return (c.labelrank || 0) - (h.labelrank || 0);
- }), O = 0; O < f; O++) {
- var S = (b = w[O]) && b.absoluteBox;
- for (T = O + 1; T < f; ++T) {
- var v = (R = w[T]) && R.absoluteBox;
- !S || !v || b === R || b.newOpacity === 0 || R.newOpacity === 0 || v.x >= S.x + S.width || v.x + v.width <= S.x || v.y >= S.y + S.height || v.y + v.height <= S.y || ((b.labelrank < R.labelrank ? b : R).newOpacity = 0);
- }
- }
- w.forEach(function(h) {
- _(h, x) && (k = !0);
- }), k && G(x, "afterHideAllOverlappingLabels");
- };
- }), C(
- o,
- "Core/Responsive.js",
- [o["Core/Utilities.js"]],
- function(y) {
- var N = y.extend, _ = y.find, U = y.isArray, G = y.isObject, V = y.merge, F = y.objectEach, B = y.pick, j = y.splat, w = y.uniqueKey, x;
- return function(f) {
- var l = [];
- f.compose = function(O) {
- return l.indexOf(O) === -1 && (l.push(O), N(O.prototype, T.prototype)), O;
- };
- var T = function() {
- function O() {
- }
- return O.prototype.currentOptions = function(R) {
- function k(v, h, c, u) {
- var i;
- F(v, function(p, a) {
- if (!u && -1 < b.collectionsWithUpdate.indexOf(a) && h[a])
- for (p = j(p), c[a] = [], i = 0; i < Math.max(p.length, h[a].length); i++)
- h[a][i] && (p[i] === void 0 ? c[a][i] = h[a][i] : (c[a][i] = {}, k(p[i], h[a][i], c[a][i], u + 1)));
- else
- G(p) ? (c[a] = U(p) ? [] : {}, k(p, h[a] || {}, c[a], u + 1)) : c[a] = typeof h[a] > "u" ? null : h[a];
- });
- }
- var b = this, S = {};
- return k(R, this.options, S, 0), S;
- }, O.prototype.matchResponsiveRule = function(R, k) {
- var b = R.condition;
- (b.callback || function() {
- return this.chartWidth <= B(b.maxWidth, Number.MAX_VALUE) && this.chartHeight <= B(b.maxHeight, Number.MAX_VALUE) && this.chartWidth >= B(b.minWidth, 0) && this.chartHeight >= B(b.minHeight, 0);
- }).call(this) && k.push(R._id);
- }, O.prototype.setResponsive = function(R, k) {
- var b = this, S = this.options.responsive, v = this.currentResponsive, h = [];
- !k && S && S.rules && S.rules.forEach(function(c) {
- typeof c._id > "u" && (c._id = w()), b.matchResponsiveRule(c, h);
- }, this), k = V.apply(void 0, h.map(function(c) {
- return _((S || {}).rules || [], function(u) {
- return u._id === c;
- });
- }).map(function(c) {
- return c && c.chartOptions;
- })), k.isResponsiveOptions = !0, h = h.toString() || void 0, h !== (v && v.ruleIds) && (v && this.update(v.undoOptions, R, !0), h ? (v = this.currentOptions(k), v.isResponsiveOptions = !0, this.currentResponsive = { ruleIds: h, mergedOptions: k, undoOptions: v }, this.update(k, R, !0)) : this.currentResponsive = void 0);
- }, O;
- }();
- }(x || (x = {})), x;
- }
- ), C(o, "masters/highcharts.src.js", [
- o["Core/Globals.js"],
- o["Core/Utilities.js"],
- o["Core/DefaultOptions.js"],
- o["Core/Animation/Fx.js"],
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/Renderer/HTML/AST.js"],
- o["Core/FormatUtilities.js"],
- o["Core/Renderer/RendererUtilities.js"],
- o["Core/Renderer/SVG/SVGElement.js"],
- o["Core/Renderer/SVG/SVGRenderer.js"],
- o["Core/Renderer/HTML/HTMLElement.js"],
- o["Core/Renderer/HTML/HTMLRenderer.js"],
- o["Core/Axis/Axis.js"],
- o["Core/Axis/DateTimeAxis.js"],
- o["Core/Axis/LogarithmicAxis.js"],
- o["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],
- o["Core/Axis/Tick.js"],
- o["Core/Tooltip.js"],
- o["Core/Series/Point.js"],
- o["Core/Pointer.js"],
- o["Core/MSPointer.js"],
- o["Core/Legend/Legend.js"],
- o["Core/Chart/Chart.js"],
- o["Core/Series/Series.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Series/Column/ColumnSeries.js"],
- o["Series/Column/ColumnDataLabel.js"],
- o["Series/Pie/PieSeries.js"],
- o["Series/Pie/PieDataLabel.js"],
- o["Core/Series/DataLabel.js"],
- o["Core/Responsive.js"],
- o["Core/Color/Color.js"],
- o["Core/Time.js"]
- ], function(y, N, _, U, G, V, F, B, j, w, x, f, l, T, O, R, k, b, S, v, h, c, u, i, p, a, t, s, n, P, D, I, W) {
- return y.animate = G.animate, y.animObject = G.animObject, y.getDeferredAnimation = G.getDeferredAnimation, y.setAnimation = G.setAnimation, y.stop = G.stop, y.timers = U.timers, y.AST = V, y.Axis = l, y.Chart = u, y.chart = u.chart, y.Fx = U, y.Legend = c, y.PlotLineOrBand = R, y.Point = S, y.Pointer = h.isRequired() ? h : v, y.Series = i, y.SVGElement = j, y.SVGRenderer = w, y.Tick = k, y.Time = W, y.Tooltip = b, y.Color = I, y.color = I.parse, f.compose(w), x.compose(j), y.defaultOptions = _.defaultOptions, y.getOptions = _.getOptions, y.time = _.defaultTime, y.setOptions = _.setOptions, y.dateFormat = F.dateFormat, y.format = F.format, y.numberFormat = F.numberFormat, y.addEvent = N.addEvent, y.arrayMax = N.arrayMax, y.arrayMin = N.arrayMin, y.attr = N.attr, y.clearTimeout = N.clearTimeout, y.correctFloat = N.correctFloat, y.createElement = N.createElement, y.css = N.css, y.defined = N.defined, y.destroyObjectProperties = N.destroyObjectProperties, y.discardElement = N.discardElement, y.distribute = B.distribute, y.erase = N.erase, y.error = N.error, y.extend = N.extend, y.extendClass = N.extendClass, y.find = N.find, y.fireEvent = N.fireEvent, y.getMagnitude = N.getMagnitude, y.getStyle = N.getStyle, y.inArray = N.inArray, y.isArray = N.isArray, y.isClass = N.isClass, y.isDOMElement = N.isDOMElement, y.isFunction = N.isFunction, y.isNumber = N.isNumber, y.isObject = N.isObject, y.isString = N.isString, y.keys = N.keys, y.merge = N.merge, y.normalizeTickInterval = N.normalizeTickInterval, y.objectEach = N.objectEach, y.offset = N.offset, y.pad = N.pad, y.pick = N.pick, y.pInt = N.pInt, y.relativeLength = N.relativeLength, y.removeEvent = N.removeEvent, y.seriesType = p.seriesType, y.splat = N.splat, y.stableSort = N.stableSort, y.syncTimeout = N.syncTimeout, y.timeUnits = N.timeUnits, y.uniqueKey = N.uniqueKey, y.useSerialIds = N.useSerialIds, y.wrap = N.wrap, t.compose(a), P.compose(i), T.compose(l), O.compose(l), n.compose(s), R.compose(l), D.compose(u), y;
- }), C(o, "Core/Axis/OrdinalAxis.js", [
- o["Core/Axis/Axis.js"],
- o["Core/Globals.js"],
- o["Core/Series/Series.js"],
- o["Core/Utilities.js"]
- ], function(y, N, _, U) {
- var G = U.addEvent, V = U.correctFloat, F = U.css, B = U.defined, j = U.error, w = U.pick, x = U.timeUnits, f = [], l;
- return function(T) {
- function O(t, s, n, P, D, I, W) {
- D === void 0 && (D = []), I === void 0 && (I = 0);
- var E = {}, X = this.options.tickPixelInterval, g = this.chart.time, m = [], L, z, $ = 0, Q = [], A = -Number.MAX_VALUE;
- if (!this.options.ordinal && !this.options.breaks || !D || 3 > D.length || typeof s > "u")
- return g.getTimeTicks.apply(g, arguments);
- var H = D.length;
- for (L = 0; L < H; L++) {
- var Y = L && D[L - 1] > n;
- if (D[L] < s && ($ = L), L === H - 1 || D[L + 1] - D[L] > 5 * I || Y) {
- if (D[L] > A) {
- for (z = g.getTimeTicks(t, D[$], D[L], P); z.length && z[0] <= A; )
- z.shift();
- z.length && (A = z[z.length - 1]), m.push(Q.length), Q = Q.concat(z);
- }
- $ = L + 1;
- }
- if (Y)
- break;
- }
- if (z) {
- if (z = z.info, W && z.unitRange <= x.hour) {
- for (L = Q.length - 1, $ = 1; $ < L; $++)
- if (g.dateFormat("%d", Q[$]) !== g.dateFormat("%d", Q[$ - 1])) {
- E[Q[$]] = "day";
- var Z = !0;
- }
- Z && (E[Q[0]] = "day"), z.higherRanks = E;
- }
- z.segmentStarts = m, Q.info = z;
- } else
- j(12, !1, this.chart);
- if (W && B(X)) {
- for (z = Q.length, g = [], $ = [], L = void 0, Z = z; Z--; )
- m = this.translate(Q[Z]), L && ($[Z] = L - m), g[Z] = L = m;
- for ($.sort(), $ = $[Math.floor($.length / 2)], $ < 0.6 * X && ($ = null), Z = Q[z - 1] > n ? z - 1 : z, L = void 0; Z--; )
- m = g[Z], z = Math.abs(L - m), L && z < 0.8 * X && ($ === null || z < 0.8 * $) ? (E[Q[Z]] && !E[Q[Z + 1]] ? (z = Z + 1, L = m) : z = Z, Q.splice(z, 1)) : L = m;
- }
- return Q;
- }
- function R(t) {
- var s = this.ordinal.positions;
- if (!s)
- return t;
- var n = s.length - 1;
- if (0 > t)
- t = s[0];
- else if (t > n)
- t = s[n];
- else {
- n = Math.floor(t);
- var P = t - n;
- }
- return typeof P < "u" && typeof s[n] < "u" ? s[n] + (P ? P * (s[n + 1] - s[n]) : 0) : t;
- }
- function k(t) {
- var s = this.ordinal, n = s.positions;
- if (!n)
- return t;
- var P = (t - (this.old ? this.old.min : this.min)) * (this.old ? this.old.transA : this.transA) + this.minPixelPadding;
- if (0 < P && P < this.left + this.len || (s.extendedOrdinalPositions || (s.extendedOrdinalPositions = s.getExtendedPositions()), n = s.extendedOrdinalPositions), n && n.length) {
- if (t = s.getIndexOfPoint(P, n), s = V(t % 1), 0 <= t && t < n.length - 1)
- return n[Math.floor(t)] + s * (n[Math.ceil(t)] - n[Math.floor(t)]);
- s = n.length, P = n[0], n = n[s - 1];
- var D = (n - P) / (s - 1);
- return 0 > t ? P + D * t : n + D * (t - s);
- }
- return t;
- }
- function b(t, s) {
- var n = T.Additions.findIndexOf(t, s, !0);
- return t[n] === s ? n : n + (s - t[n]) / (t[n + 1] - t[n]);
- }
- function S() {
- this.ordinal || (this.ordinal = new T.Additions(this));
- }
- function v() {
- this.isXAxis && B(this.options.overscroll) && this.max === this.dataMax && (!this.chart.mouseIsDown || this.isInternal) && (!this.eventArgs || this.eventArgs && this.eventArgs.trigger !== "navigator") && (this.max += this.options.overscroll, !this.isInternal && B(this.userMin) && (this.min += this.options.overscroll));
- }
- function h() {
- this.horiz && !this.isDirty && (this.isDirty = this.isOrdinal && this.chart.navigator && !this.chart.navigator.adaptToUpdatedData);
- }
- function c() {
- this.ordinal && (this.ordinal.beforeSetTickPositions(), this.tickInterval = this.ordinal.postProcessTickInterval(this.tickInterval));
- }
- function u(t) {
- var s = this.xAxis[0], n = s.options.overscroll, P = t.originalEvent.chartX, D = this.options.chart.panning, I = !1;
- if (D && D.type !== "y" && s.options.ordinal && s.series.length) {
- var W = this.mouseDownX, E = s.getExtremes(), X = E.dataMax, g = E.min, m = E.max, L = this.hoverPoints, z = s.closestPointRange || s.ordinal && s.ordinal.overscrollPointsRange;
- W = (W - P) / (s.translationSlope * (s.ordinal.slope || z)), z = { ordinal: { positions: s.ordinal.getExtendedPositions() } };
- var $ = s.index2val, Q = s.val2lin, A = void 0, H = A = void 0, Y = void 0;
- z.ordinal.positions ? 1 < Math.abs(W) && (L && L.forEach(function(Z) {
- Z.setState();
- }), 0 > W ? (H = z, Y = s.ordinal.positions ? s : z) : (H = s.ordinal.positions ? s : z, Y = z), A = Y.ordinal.positions, X > A[A.length - 1] && A.push(X), this.fixedRange = m - g, A = s.navigatorAxis.toFixedRange(void 0, void 0, $.apply(H, [Q.apply(H, [g, !0]) + W]), $.apply(Y, [Q.apply(Y, [m, !0]) + W])), A.min >= Math.min(
- E.dataMin,
- g
- ) && A.max <= Math.max(X, m) + n && s.setExtremes(A.min, A.max, !0, !1, { trigger: "pan" }), this.mouseDownX = P, F(this.container, { cursor: "move" })) : I = !0;
- } else
- I = !0;
- I || D && /y/.test(D.type) ? n && (s.max = s.dataMax + n) : t.preventDefault();
- }
- function i() {
- var t = this.xAxis;
- t && t.options.ordinal && (delete t.ordinal.index, delete t.ordinal.extendedOrdinalPositions);
- }
- function p(t, s) {
- var n = this.ordinal, P = n.positions, D = n.slope, I = n.extendedOrdinalPositions;
- if (!P)
- return t;
- var W = P.length;
- if (P[0] <= t && P[W - 1] >= t)
- t = b(P, t);
- else {
- if (I || (I = n.getExtendedPositions && n.getExtendedPositions(), n.extendedOrdinalPositions = I), !I || !I.length)
- return t;
- W = I.length, D || (D = (I[W - 1] - I[0]) / W), P = b(I, P[0]), t >= I[0] && t <= I[W - 1] ? t = b(I, t) - P : t < I[0] ? (t = I[0] - t, t = -P - t / D) : (t -= I[W - 1], t = t / D + W - P);
- }
- return s ? t : D * (t || 0) + n.offset;
- }
- T.compose = function(t, s, n) {
- if (f.indexOf(t) === -1) {
- f.push(t);
- var P = t.prototype;
- P.getTimeTicks = O, P.index2val = R, P.lin2val = k, P.val2lin = p, P.ordinal2lin = P.val2lin, G(t, "afterInit", S), G(t, "foundExtremes", v), G(t, "afterSetScale", h), G(t, "initialAxisTranslation", c);
- }
- return f.indexOf(n) === -1 && (f.push(n), G(n, "pan", u)), f.indexOf(s) === -1 && (f.push(s), G(s, "updatedData", i)), t;
- };
- var a = function() {
- function t(s) {
- this.index = {}, this.axis = s;
- }
- return t.prototype.beforeSetTickPositions = function() {
- var s = this.axis, n = s.ordinal, P = s.getExtremes(), D = P.min, I = P.max, W = s.isXAxis && !!s.options.breaks;
- P = s.options.ordinal;
- var E = s.chart.options.chart.ignoreHiddenSeries, X, g, m = [], L = Number.MAX_VALUE, z = !1;
- if (P || W) {
- s.series.forEach(function(A, H) {
- if (X = [], !(E && A.visible === !1 || A.takeOrdinalPosition === !1 && !W) && (m = m.concat(A.processedXData), $ = m.length, m.sort(function(Y, Z) {
- return Y - Z;
- }), L = Math.min(L, w(A.closestPointRange, L)), $)) {
- for (H = 0; H < $ - 1; )
- m[H] !== m[H + 1] && X.push(m[H + 1]), H++;
- X[0] !== m[0] && X.unshift(m[0]), m = X;
- }
- });
- var $ = m.length;
- if (2 < $) {
- var Q = m[1] - m[0];
- for (g = $ - 1; g-- && !z; )
- m[g + 1] - m[g] !== Q && (z = !0);
- !s.options.keepOrdinalPadding && (m[0] - D > Q || I - m[m.length - 1] > Q) && (z = !0);
- } else
- s.options.overscroll && ($ === 2 ? L = m[1] - m[0] : $ === 1 ? (L = s.options.overscroll, m = [m[0], m[0] + L]) : L = n.overscrollPointsRange);
- z || s.forceOrdinal ? (s.options.overscroll && (n.overscrollPointsRange = L, m = m.concat(n.getOverscrollPositions())), n.positions = m, Q = s.ordinal2lin(Math.max(D, m[0]), !0), g = Math.max(s.ordinal2lin(Math.min(I, m[m.length - 1]), !0), 1), n.slope = I = (I - D) / (g - Q), n.offset = D - Q * I) : (n.overscrollPointsRange = w(s.closestPointRange, n.overscrollPointsRange), n.positions = s.ordinal.slope = n.offset = void 0);
- }
- s.isOrdinal = P && z, n.groupIntervalFactor = null;
- }, t.findIndexOf = function(s, n, P) {
- for (var D = 0, I = s.length - 1, W; D < I; )
- W = Math.ceil((D + I) / 2), s[W] <= n ? D = W : I = W - 1;
- return s[D] === n || P ? D : -1;
- }, t.prototype.getExtendedPositions = function() {
- var s = this, n = s.axis, P = n.constructor.prototype, D = n.chart, I = n.series[0].currentDataGrouping, W = I ? I.count + I.unitName : "raw", E = n.options.overscroll, X = n.getExtremes(), g = void 0, m = s.index;
- if (m || (m = s.index = {}), !m[W]) {
- var L = {
- series: [],
- chart: D,
- forceOrdinal: !1,
- getExtremes: function() {
- return { min: X.dataMin, max: X.dataMax + E };
- },
- getGroupPixelWidth: P.getGroupPixelWidth,
- getTimeTicks: P.getTimeTicks,
- options: { ordinal: !0 },
- ordinal: { getGroupIntervalFactor: this.getGroupIntervalFactor },
- ordinal2lin: P.ordinal2lin,
- getIndexOfPoint: P.getIndexOfPoint,
- val2lin: P.val2lin
- };
- L.ordinal.axis = L, n.series.forEach(function(z) {
- g = { xAxis: L, xData: z.xData.slice(), chart: D, destroyGroupedData: N.noop, getProcessedData: _.prototype.getProcessedData, applyGrouping: _.prototype.applyGrouping }, g.xData = g.xData.concat(s.getOverscrollPositions()), g.options = { dataGrouping: I ? { firstAnchor: "firstPoint", anchor: "middle", lastAnchor: "lastPoint", enabled: !0, forced: !0, approximation: "open", units: [[I.unitName, [I.count]]] } : { enabled: !1 } }, L.series.push(g), z.processData.apply(g);
- }), g.closestPointRange !== g.basePointRange && g.currentDataGrouping && (L.forceOrdinal = !0), n.ordinal.beforeSetTickPositions.apply({ axis: L }), m[W] = L.ordinal.positions;
- }
- return m[W];
- }, t.prototype.getGroupIntervalFactor = function(s, n, P) {
- P = P.processedXData;
- var D = P.length, I = [], W = this.groupIntervalFactor;
- if (!W) {
- for (W = 0; W < D - 1; W++)
- I[W] = P[W + 1] - P[W];
- I.sort(function(E, X) {
- return E - X;
- }), I = I[Math.floor(D / 2)], s = Math.max(s, P[0]), n = Math.min(n, P[D - 1]), this.groupIntervalFactor = W = D * I / (n - s);
- }
- return W;
- }, t.prototype.getIndexOfPoint = function(s, n) {
- var P = this.axis, D = this.positions ? this.positions[0] : 0, I = P.series[0].points && P.series[0].points[0] && P.series[0].points[0].plotX || P.minPixelPadding;
- return 1 < P.series.length && P.series.forEach(function(W) {
- W.points && B(W.points[0]) && B(W.points[0].plotX) && W.points[0].plotX < I && (I = W.points[0].plotX);
- }), s = (s - I) / (P.translationSlope * (this.slope || P.closestPointRange || this.overscrollPointsRange)), t.findIndexOf(n, D) + s;
- }, t.prototype.getOverscrollPositions = function() {
- var s = this.axis, n = s.options.overscroll, P = this.overscrollPointsRange, D = [], I = s.dataMax;
- if (B(P))
- for (; I <= s.dataMax + n; )
- I += P, D.push(I);
- return D;
- }, t.prototype.postProcessTickInterval = function(s) {
- var n = this.axis, P = this.slope;
- return P ? n.options.breaks ? n.closestPointRange || s : s / (P / n.closestPointRange) : s;
- }, t;
- }();
- T.Additions = a;
- }(l || (l = {})), l;
- }), C(o, "Series/DataModifyComposition.js", [o["Core/Axis/Axis.js"], o["Core/Series/Point.js"], o["Core/Series/Series.js"], o["Core/Utilities.js"]], function(y, N, _, U) {
- var G = N.prototype.tooltipFormatter, V = U.addEvent, F = U.arrayMax, B = U.arrayMin, j = U.correctFloat, w = U.defined, x = U.isArray, f = U.isNumber, l = U.isString, T = U.pick, O;
- return function(R) {
- function k(s, n, P) {
- this.isXAxis || (this.series.forEach(function(D) {
- s === "compare" && typeof n != "boolean" ? D.setCompare(n, !1) : s !== "cumulative" || l(n) || D.setCumulative(n, !1);
- }), T(P, !0) && this.chart.redraw());
- }
- function b(s) {
- var n = this, P = n.series.chart.numberFormatter, D = function(I) {
- s = s.replace("{point." + I + "}", (0 < n[I] && I === "change" ? "+" : "") + P(n[I], T(n.series.tooltipOptions.changeDecimals, 2)));
- };
- return w(n.change) && D("change"), w(n.cumulativeSum) && D("cumulativeSum"), G.apply(this, [s]);
- }
- function S() {
- var s = this.options.compare;
- if (s === "percent" || s === "value" || this.options.cumulative) {
- var n = new t(this);
- s === "percent" || s === "value" ? n.initCompare(s) : n.initCumulative();
- }
- this.dataModify = n;
- }
- function v(s) {
- s = s.dataExtremes;
- var n = s.activeYData;
- if (this.dataModify && s) {
- var P = void 0;
- this.options.compare ? P = [this.dataModify.modifyValue(s.dataMin), this.dataModify.modifyValue(s.dataMax)] : this.options.cumulative && x(n) && 2 <= n.length && (P = t.getCumulativeExtremes(n)), P && (s.dataMin = B(P), s.dataMax = F(P));
- }
- }
- function h(s, n) {
- this.options.compare = this.userOptions.compare = s, this.update({}, T(n, !0)), !this.dataModify || s !== "value" && s !== "percent" ? this.points.forEach(function(P) {
- delete P.change;
- }) : this.dataModify.initCompare(s);
- }
- function c() {
- if (this.xAxis && this.processedYData && this.dataModify) {
- var s = this.processedXData, n = this.processedYData, P = n.length, D = this.options.compareStart === !0 ? 0 : 1, I = -1, W;
- for (this.pointArrayMap && (I = this.pointArrayMap.indexOf(this.options.pointValKey || this.pointValKey || "y")), W = 0; W < P - D; W++) {
- var E = n[W] && -1 < I ? n[W][I] : n[W];
- if (f(E) && E !== 0 && s[W + D] >= (this.xAxis.min || 0)) {
- this.dataModify.compareValue = E;
- break;
- }
- }
- }
- }
- function u(s, n) {
- this.setModifier("compare", s, n);
- }
- function i(s, n) {
- s = T(s, !1), this.options.cumulative = this.userOptions.cumulative = s, this.update({}, T(n, !0)), this.dataModify ? this.dataModify.initCumulative() : this.points.forEach(function(P) {
- delete P.cumulativeSum;
- });
- }
- function p(s, n) {
- this.setModifier("cumulative", s, n);
- }
- var a = [];
- R.compose = function(s, n, P) {
- if (a.indexOf(s) === -1) {
- a.push(s);
- var D = s.prototype;
- D.setCompare = h, D.setCumulative = i, V(s, "afterInit", S), V(s, "afterGetExtremes", v), V(s, "afterProcessData", c);
- }
- return a.indexOf(n) === -1 && (a.push(n), n = n.prototype, n.setCompare = u, n.setModifier = k, n.setCumulative = p), a.indexOf(P) === -1 && (a.push(P), P.prototype.tooltipFormatter = b), s;
- };
- var t = function() {
- function s(n) {
- this.series = n;
- }
- return s.prototype.modifyValue = function() {
- return 0;
- }, s.getCumulativeExtremes = function(n) {
- var P = 1 / 0, D = -1 / 0;
- return n.reduce(function(I, W) {
- return W = I + W, P = Math.min(P, W, I), D = Math.max(
- D,
- W,
- I
- ), W;
- }), [P, D];
- }, s.prototype.initCompare = function(n) {
- this.modifyValue = function(P, D) {
- P === null && (P = 0);
- var I = this.compareValue;
- return typeof P < "u" && typeof I < "u" ? (P = n === "value" ? P - I : P / I * 100 - (this.series.options.compareBase === 100 ? 0 : 100), typeof D < "u" && (D = this.series.points[D]) && (D.change = P), P) : 0;
- };
- }, s.prototype.initCumulative = function() {
- this.modifyValue = function(n, P) {
- if (n === null && (n = 0), n !== void 0 && P !== void 0) {
- var D = 0 < P ? this.series.points[P - 1] : null;
- return D && D.cumulativeSum && (n = j(D.cumulativeSum + n)), (P = this.series.points[P]) && (P.cumulativeSum = n), n;
- }
- return 0;
- };
- }, s;
- }();
- R.Additions = t;
- }(O || (O = {})), O;
- }), C(o, "Core/Axis/BrokenAxis.js", [o["Extensions/Stacking.js"], o["Core/Utilities.js"]], function(y, N) {
- var _ = N.addEvent, U = N.find, G = N.fireEvent, V = N.isArray, F = N.isNumber, B = N.pick, j;
- return function(w) {
- function x() {
- typeof this.brokenAxis < "u" && this.brokenAxis.setBreaks(this.options.breaks, !1);
- }
- function f() {
- this.brokenAxis && this.brokenAxis.hasBreaks && (this.options.ordinal = !1);
- }
- function l() {
- var h = this.brokenAxis;
- if (h && h.hasBreaks) {
- for (var c = this.tickPositions, u = this.tickPositions.info, i = [], p = 0; p < c.length; p++)
- h.isInAnyBreak(c[p]) || i.push(c[p]);
- this.tickPositions = i, this.tickPositions.info = u;
- }
- }
- function T() {
- this.brokenAxis || (this.brokenAxis = new v(this));
- }
- function O() {
- var h = this.options.connectNulls, c = this.points, u = this.xAxis, i = this.yAxis;
- if (this.isDirty)
- for (var p = c.length; p--; ) {
- var a = c[p], t = !(a.y === null && h === !1) && (u && u.brokenAxis && u.brokenAxis.isInAnyBreak(a.x, !0) || i && i.brokenAxis && i.brokenAxis.isInAnyBreak(a.y, !0));
- a.visible = t ? !1 : a.options.visible !== !1;
- }
- }
- function R() {
- this.drawBreaks(this.xAxis, ["x"]), this.drawBreaks(this.yAxis, B(this.pointArrayMap, ["y"]));
- }
- function k(h, c) {
- var u = this, i = u.points, p, a, t, s;
- if (h && h.brokenAxis && h.brokenAxis.hasBreaks) {
- var n = h.brokenAxis;
- c.forEach(function(P) {
- p = n && n.breakArray || [], a = h.isXAxis ? h.min : B(u.options.threshold, h.min), i.forEach(function(D) {
- s = B(D["stack" + P.toUpperCase()], D[P]), p.forEach(function(I) {
- F(a) && F(s) && (t = !1, a < I.from && s > I.to || a > I.from && s < I.from ? t = "pointBreak" : (a < I.from && s > I.from && s < I.to || a > I.from && s > I.to && s < I.from) && (t = "pointInBreak"), t && G(h, t, { point: D, brk: I }));
- });
- });
- });
- }
- }
- function b() {
- var h = this.currentDataGrouping, c = h && h.gapSize;
- h = this.points.slice();
- var u = this.yAxis, i = this.options.gapSize, p = h.length - 1, a;
- if (i && 0 < p)
- for (this.options.gapUnit !== "value" && (i *= this.basePointRange), c && c > i && c >= this.basePointRange && (i = c), a = void 0; p--; )
- a && a.visible !== !1 || (a = h[p + 1]), c = h[p], a.visible !== !1 && c.visible !== !1 && (a.x - c.x > i && (a = (c.x + a.x) / 2, h.splice(p + 1, 0, { isNull: !0, x: a }), u.stacking && this.options.stacking && (a = u.stacking.stacks[this.stackKey][a] = new y(u, u.options.stackLabels, !1, a, this.stack), a.total = 0)), a = c);
- return this.getGraphPath(h);
- }
- var S = [];
- w.compose = function(h, c) {
- if (S.indexOf(h) === -1 && (S.push(h), h.keepProps.push("brokenAxis"), _(h, "init", T), _(h, "afterInit", x), _(h, "afterSetTickPositions", l), _(h, "afterSetOptions", f)), S.indexOf(c) === -1) {
- S.push(c);
- var u = c.prototype;
- u.drawBreaks = k, u.gappedPath = b, _(c, "afterGeneratePoints", O), _(
- c,
- "afterRender",
- R
- );
- }
- return h;
- };
- var v = function() {
- function h(c) {
- this.hasBreaks = !1, this.axis = c;
- }
- return h.isInBreak = function(c, u) {
- var i = c.repeat || 1 / 0, p = c.from, a = c.to - c.from;
- return u = u >= p ? (u - p) % i : i - (p - u) % i, c.inclusive ? u <= a : u < a && u !== 0;
- }, h.lin2Val = function(c) {
- var u = this.brokenAxis;
- if (u = u && u.breakArray, !u || !F(c))
- return c;
- var i;
- for (i = 0; i < u.length; i++) {
- var p = u[i];
- if (p.from >= c)
- break;
- (p.to < c || h.isInBreak(p, c)) && (c += p.len);
- }
- return c;
- }, h.val2Lin = function(c) {
- var u = this.brokenAxis;
- if (u = u && u.breakArray, !u || !F(c))
- return c;
- var i = c, p;
- for (p = 0; p < u.length; p++) {
- var a = u[p];
- if (a.to <= c)
- i -= a.len;
- else {
- if (a.from >= c)
- break;
- if (h.isInBreak(a, c)) {
- i -= c - a.from;
- break;
- }
- }
- }
- return i;
- }, h.prototype.findBreakAt = function(c, u) {
- return U(u, function(i) {
- return i.from < c && c < i.to;
- });
- }, h.prototype.isInAnyBreak = function(c, u) {
- var i = this.axis, p = i.options.breaks || [], a = p.length, t;
- if (a && F(c)) {
- for (; a--; )
- if (h.isInBreak(p[a], c)) {
- var s = !0;
- t || (t = B(p[a].showPoints, !i.isXAxis));
- }
- var n = s && u ? s && !t : s;
- }
- return n;
- }, h.prototype.setBreaks = function(c, u) {
- var i = this, p = i.axis, a = V(c) && !!c.length;
- p.isDirty = i.hasBreaks !== a, i.hasBreaks = a, p.options.breaks = p.userOptions.breaks = c, p.forceRedraw = !0, p.series.forEach(function(t) {
- t.isDirty = !0;
- }), a || p.val2lin !== h.val2Lin || (delete p.val2lin, delete p.lin2val), a && (p.userOptions.ordinal = !1, p.lin2val = h.lin2Val, p.val2lin = h.val2Lin, p.setExtremes = function(t, s, n, P, D) {
- if (i.hasBreaks) {
- for (var I = this.options.breaks || [], W; W = i.findBreakAt(t, I); )
- t = W.to;
- for (; W = i.findBreakAt(s, I); )
- s = W.from;
- s < t && (s = t);
- }
- p.constructor.prototype.setExtremes.call(this, t, s, n, P, D);
- }, p.setAxisTranslation = function() {
- if (p.constructor.prototype.setAxisTranslation.call(this), i.unitLength = void 0, i.hasBreaks) {
- var t = p.options.breaks || [], s = [], n = [], P = B(p.pointRangePadding, 0), D = 0, I, W = p.userMin || p.min, E = p.userMax || p.max, X;
- t.forEach(function(L) {
- I = L.repeat || 1 / 0, F(W) && F(E) && (h.isInBreak(L, W) && (W += L.to % I - W % I), h.isInBreak(L, E) && (E -= E % I - L.from % I));
- }), t.forEach(function(L) {
- if (m = L.from, I = L.repeat || 1 / 0, F(W) && F(E)) {
- for (; m - I > W; )
- m -= I;
- for (; m < W; )
- m += I;
- for (X = m; X < E; X += I)
- s.push({ value: X, move: "in" }), s.push({ value: X + L.to - L.from, move: "out", size: L.breakSize });
- }
- }), s.sort(function(L, z) {
- return L.value === z.value ? (L.move === "in" ? 0 : 1) - (z.move === "in" ? 0 : 1) : L.value - z.value;
- });
- var g = 0, m = W;
- s.forEach(function(L) {
- g += L.move === "in" ? 1 : -1, g === 1 && L.move === "in" && (m = L.value), g === 0 && F(m) && (n.push({ from: m, to: L.value, len: L.value - m - (L.size || 0) }), D += L.value - m - (L.size || 0));
- }), i.breakArray = n, F(W) && F(E) && F(p.min) && (i.unitLength = E - W - D + P, G(p, "afterBreaks"), p.staticScale ? p.transA = p.staticScale : i.unitLength && (p.transA *= (E - p.min + P) / i.unitLength), P && (p.minPixelPadding = p.transA * (p.minPointOffset || 0)), p.min = W, p.max = E);
- }
- }), B(u, !0) && p.chart.redraw();
- }, h;
- }();
- w.Additions = v;
- }(j || (j = {})), j;
- }), C(o, "masters/modules/broken-axis.src.js", [o["Core/Globals.js"], o["Core/Axis/BrokenAxis.js"]], function(y, N) {
- N.compose(y.Axis, y.Series);
- }), C(o, "Extensions/DataGrouping.js", [
- o["Core/Axis/Axis.js"],
- o["Core/Axis/DateTimeAxis.js"],
- o["Core/FormatUtilities.js"],
- o["Core/Globals.js"],
- o["Core/Series/Point.js"],
- o["Core/Series/Series.js"],
- o["Core/Tooltip.js"],
- o["Core/DefaultOptions.js"],
- o["Core/Utilities.js"]
- ], function(y, N, _, U, G, V, F, B, j) {
- var w = _.format, x = V.prototype;
- _ = j.addEvent;
- var f = j.arrayMax, l = j.arrayMin, T = j.correctFloat, O = j.defined, R = j.error, k = j.extend, b = j.isNumber, S = j.merge, v = j.pick, h = U.approximations = {
- sum: function(t) {
- var s = t.length;
- if (!s && t.hasNulls)
- var n = null;
- else if (s)
- for (n = 0; s--; )
- n += t[s];
- return n;
- },
- average: function(t) {
- var s = t.length;
- return t = h.sum(t), b(t) && s && (t = T(t / s)), t;
- },
- averages: function() {
- var t = [];
- return [].forEach.call(arguments, function(s) {
- t.push(h.average(s));
- }), typeof t[0] > "u" ? void 0 : t;
- },
- open: function(t) {
- return t.length ? t[0] : t.hasNulls ? null : void 0;
- },
- high: function(t) {
- return t.length ? f(t) : t.hasNulls ? null : void 0;
- },
- low: function(t) {
- return t.length ? l(t) : t.hasNulls ? null : void 0;
- },
- close: function(t) {
- return t.length ? t[t.length - 1] : t.hasNulls ? null : void 0;
- },
- hlc: function(t, s, n) {
- if (t = h.high(t), s = h.low(s), n = h.close(n), b(t) || b(s) || b(n))
- return [t, s, n];
- },
- ohlc: function(t, s, n, P) {
- if (t = h.open(t), s = h.high(s), n = h.low(n), P = h.close(P), b(t) || b(s) || b(n) || b(P))
- return [t, s, n, P];
- },
- range: function(t, s) {
- if (t = h.low(t), s = h.high(s), b(t) || b(s))
- return [t, s];
- if (t === null && s === null)
- return null;
- }
- };
- j = function(t, s, n, P) {
- var D = this, I = D.data, W = D.options && D.options.data, E = [], X = [], g = [], m = t.length, L = !!s, z = [], $ = D.pointArrayMap, Q = $ && $.length, A = ["x"].concat($ || ["y"]), H = this.options.dataGrouping && this.options.dataGrouping.groupAll, Y = 0, Z = 0, q;
- P = typeof P == "function" ? P : h[P] ? h[P] : h[D.getDGApproximation && D.getDGApproximation() || "average"], Q ? $.forEach(function() {
- z.push([]);
- }) : z.push([]);
- var it = Q || 1;
- for (q = 0; q <= m && !(t[q] >= n[0]); q++)
- ;
- for (q; q <= m; q++) {
- for (; typeof n[Y + 1] < "u" && t[q] >= n[Y + 1] || q === m; ) {
- var et = n[Y];
- D.dataGroupInfo = { start: H ? Z : D.cropStart + Z, length: z[0].length };
- var nt = P.apply(D, z);
- for (D.pointClass && !O(D.dataGroupInfo.options) && (D.dataGroupInfo.options = S(D.pointClass.prototype.optionsToObject.call({ series: D }, D.options.data[D.cropStart + Z])), A.forEach(function(ct) {
- delete D.dataGroupInfo.options[ct];
- })), typeof nt < "u" && (E.push(et), X.push(nt), g.push(D.dataGroupInfo)), Z = q, et = 0; et < it; et++)
- z[et].length = 0, z[et].hasNulls = !1;
- if (Y += 1, q === m)
- break;
- }
- if (q === m)
- break;
- if ($) {
- et = D.options.dataGrouping && D.options.dataGrouping.groupAll ? q : D.cropStart + q, nt = I && I[et] || D.pointClass.prototype.applyOptions.apply({ series: D }, [W[et]]);
- var rt = void 0;
- for (et = 0; et < Q; et++)
- rt = nt[$[et]], b(rt) ? z[et].push(rt) : rt === null && (z[et].hasNulls = !0);
- } else
- et = L ? s[q] : null, b(et) ? z[0].push(et) : et === null && (z[0].hasNulls = !0);
- }
- return { groupedXData: E, groupedYData: X, groupMap: g };
- };
- var c = { approximations: h, groupData: j }, u = x.generatePoints, i = { groupPixelWidth: 2, dateTimeLabelFormats: { millisecond: [
- "%A, %b %e, %H:%M:%S.%L",
- "%A, %b %e, %H:%M:%S.%L",
- "-%H:%M:%S.%L"
- ], second: ["%A, %b %e, %H:%M:%S", "%A, %b %e, %H:%M:%S", "-%H:%M:%S"], minute: ["%A, %b %e, %H:%M", "%A, %b %e, %H:%M", "-%H:%M"], hour: ["%A, %b %e, %H:%M", "%A, %b %e, %H:%M", "-%H:%M"], day: ["%A, %b %e, %Y", "%A, %b %e", "-%A, %b %e, %Y"], week: ["Week from %A, %b %e, %Y", "%A, %b %e", "-%A, %b %e, %Y"], month: ["%B %Y", "%B", "-%B %Y"], year: ["%Y", "%Y", "-%Y"] } }, p = {
- line: {},
- spline: {},
- area: {},
- areaspline: {},
- arearange: {},
- column: { groupPixelWidth: 10 },
- columnrange: { groupPixelWidth: 10 },
- candlestick: { groupPixelWidth: 10 },
- ohlc: { groupPixelWidth: 5 },
- hlc: { groupPixelWidth: 5 },
- heikinashi: { groupPixelWidth: 10 }
- }, a = U.defaultDataGroupingUnits = [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1]], ["week", [1]], ["month", [1, 3, 6]], ["year", null]];
- return x.getDGApproximation = function() {
- return this.is("arearange") ? "range" : this.is("ohlc") ? "ohlc" : this.is("hlc") ? "hlc" : this.is("column") ? "sum" : "average";
- }, x.groupData = j, x.applyGrouping = function(t) {
- var s = this.chart, n = this.options.dataGrouping, P = this.allowDG !== !1 && n && v(n.enabled, s.options.isStock), D = this.visible || !s.options.chart.ignoreHiddenSeries, I, W = this.currentDataGrouping, E = !1;
- if (P && !this.requireSorting && (this.requireSorting = E = !0), t = !!(this.isCartesian && !this.isDirty && !this.xAxis.isDirty && !this.yAxis.isDirty && !t) || !P, E && (this.requireSorting = !1), !t) {
- this.destroyGroupedData(), P = n.groupAll ? this.xData : this.processedXData;
- var X = n.groupAll ? this.yData : this.processedYData;
- t = s.plotSizeX, E = this.xAxis;
- var g = E.options.ordinal, m = this.groupPixelWidth;
- if (m && P && P.length) {
- this.isDirty = I = !0, this.points = null;
- var L = E.getExtremes(), z = L.min;
- L = L.max, g = g && E.ordinal && E.ordinal.getGroupIntervalFactor(z, L, this) || 1, t = E.getTimeTicks(N.Additions.prototype.normalizeTimeTickInterval(m * (L - z) / t * g, n.units || a), Math.min(z, P[0]), Math.max(L, P[P.length - 1]), E.options.startOfWeek, P, this.closestPointRange), m = x.groupData.apply(this, [P, X, t, n.approximation]), P = m.groupedXData, X = m.groupedYData, g = 0, n && n.smoothed && P.length && (n.firstAnchor = "firstPoint", n.anchor = "middle", n.lastAnchor = "lastPoint", R(32, !1, s, { "dataGrouping.smoothed": "use dataGrouping.anchor" })), s = P;
- var $ = this.options.dataGrouping;
- if (z = this.currentDataGrouping && this.currentDataGrouping.gapSize, $ && this.xData && z && this.groupMap) {
- var Q = s.length - 1, A = $.anchor, H = v($.firstAnchor, A);
- if ($ = v($.lastAnchor, A), A && A !== "start") {
- var Y = z * { middle: 0.5, end: 1 }[A];
- for (A = s.length - 1; A-- && 0 < A; )
- s[A] += Y;
- }
- if (H && H !== "start" && this.xData[0] >= s[0]) {
- A = this.groupMap[0].start, Y = this.groupMap[0].length;
- var Z = void 0;
- b(A) && b(Y) && (Z = A + (Y - 1)), s[0] = { middle: s[0] + 0.5 * z, end: s[0] + z, firstPoint: this.xData[0], lastPoint: Z && this.xData[Z] }[H];
- }
- $ && $ !== "start" && z && s[Q] >= L - z && (L = this.groupMap[this.groupMap.length - 1].start, s[Q] = { middle: s[Q] + 0.5 * z, end: s[Q] + z, firstPoint: L && this.xData[L], lastPoint: this.xData[this.xData.length - 1] }[$]);
- }
- for (L = 1; L < t.length; L++)
- t.info.segmentStarts && t.info.segmentStarts.indexOf(L) !== -1 || (g = Math.max(t[L] - t[L - 1], g));
- L = t.info, L.gapSize = g, this.closestPointRange = t.info.totalRange, this.groupMap = m.groupMap, D && (D = P, O(D[0]) && b(E.min) && b(E.dataMin) && D[0] < E.min && ((!O(E.options.min) && E.min <= E.dataMin || E.min === E.dataMin) && (E.min = Math.min(D[0], E.min)), E.dataMin = Math.min(D[0], E.dataMin)), O(D[D.length - 1]) && b(E.max) && b(E.dataMax) && D[D.length - 1] > E.max && ((!O(E.options.max) && b(E.dataMax) && E.max >= E.dataMax || E.max === E.dataMax) && (E.max = Math.max(D[D.length - 1], E.max)), E.dataMax = Math.max(D[D.length - 1], E.dataMax))), n.groupAll && (this.allGroupedData = X, n = this.cropData(P, X, E.min, E.max, 1), P = n.xData, X = n.yData, this.cropStart = n.start), this.processedXData = P, this.processedYData = X;
- } else
- this.groupMap = null;
- this.hasGroupedData = I, this.currentDataGrouping = L, this.preventGraphAnimation = (W && W.totalRange) !== (L && L.totalRange);
- }
- }, x.destroyGroupedData = function() {
- this.groupedData && (this.groupedData.forEach(function(t, s) {
- t && (this.groupedData[s] = t.destroy ? t.destroy() : null);
- }, this), this.groupedData.length = 0);
- }, x.generatePoints = function() {
- u.apply(this), this.destroyGroupedData(), this.groupedData = this.hasGroupedData ? this.points : null;
- }, y.prototype.applyGrouping = function(t) {
- var s = this;
- s.series.forEach(function(n) {
- n.groupPixelWidth = void 0, n.groupPixelWidth = s.getGroupPixelWidth && s.getGroupPixelWidth(), n.groupPixelWidth && (n.hasProcessed = !0), n.applyGrouping(!!t.hasExtemesChanged);
- });
- }, y.prototype.getGroupPixelWidth = function() {
- var t = this.series, s = t.length, n, P = 0, D = !1, I;
- for (n = s; n--; )
- (I = t[n].options.dataGrouping) && (P = Math.max(P, v(I.groupPixelWidth, i.groupPixelWidth)));
- for (n = s; n--; )
- (I = t[n].options.dataGrouping) && (s = (t[n].processedXData || t[n].data).length, (t[n].groupPixelWidth || s > this.chart.plotSizeX / P || s && I.forced) && (D = !0));
- return D ? P : 0;
- }, y.prototype.setDataGrouping = function(t, s) {
- var n;
- if (s = v(s, !0), t || (t = { forced: !1, units: null }), this instanceof y)
- for (n = this.series.length; n--; )
- this.series[n].update({ dataGrouping: t }, !1);
- else
- this.chart.options.series.forEach(function(P) {
- P.dataGrouping = t;
- }, !1);
- this.ordinal && (this.ordinal.slope = void 0), s && this.chart.redraw();
- }, _(y, "postProcessData", y.prototype.applyGrouping), _(G, "update", function() {
- if (this.dataGroup)
- return R(
- 24,
- !1,
- this.series.chart
- ), !1;
- }), _(F, "headerFormatter", function(t) {
- var s = this.chart, n = s.time, P = t.labelConfig, D = P.series, I = D.tooltipOptions, W = D.options.dataGrouping, E = I.xDateFormat, X = D.xAxis, g = I[t.isFooter ? "footerFormat" : "headerFormat"];
- if (X && X.options.type === "datetime" && W && b(P.key)) {
- var m = D.currentDataGrouping;
- if (W = W.dateTimeLabelFormats || i.dateTimeLabelFormats, m)
- if (I = W[m.unitName], m.count === 1)
- E = I[0];
- else {
- E = I[1];
- var L = I[2];
- }
- else
- !E && W && X.dateTime && (E = X.dateTime.getXDateFormat(P.x, I.dateTimeLabelFormats));
- E = n.dateFormat(E, P.key), L && (E += n.dateFormat(L, P.key + m.totalRange - 1)), D.chart.styledMode && (g = this.styledModeFormat(g)), t.text = w(g, { point: k(P.point, { key: E }), series: D }, s), t.preventDefault();
- }
- }), _(V, "destroy", x.destroyGroupedData), _(V, "afterSetOptions", function(t) {
- t = t.options;
- var s = this.type, n = this.chart.options.plotOptions, P = B.defaultOptions.plotOptions[s].dataGrouping, D = this.useCommonDataGrouping && i;
- if (n && (p[s] || D)) {
- P || (P = S(i, p[s]));
- var I = this.chart.rangeSelector;
- t.dataGrouping = S(
- D,
- P,
- n.series && n.series.dataGrouping,
- n[s].dataGrouping,
- this.userOptions.dataGrouping,
- !t.isInternal && I && b(I.selected) && I.buttonOptions[I.selected].dataGrouping
- );
- }
- }), _(y, "afterSetScale", function() {
- this.series.forEach(function(t) {
- t.hasProcessed = !1;
- });
- }), U.dataGrouping = c, c;
- }), C(o, "Series/HLC/HLCPoint.js", [o["Core/Series/SeriesRegistry.js"]], function(y) {
- var N = this && this.__extends || function() {
- var _ = function(U, G) {
- return _ = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(V, F) {
- V.__proto__ = F;
- } || function(V, F) {
- for (var B in F)
- F.hasOwnProperty(B) && (V[B] = F[B]);
- }, _(U, G);
- };
- return function(U, G) {
- function V() {
- this.constructor = U;
- }
- _(U, G), U.prototype = G === null ? Object.create(G) : (V.prototype = G.prototype, new V());
- };
- }();
- return function(_) {
- function U() {
- var G = _ !== null && _.apply(this, arguments) || this;
- return G.close = void 0, G.high = void 0, G.low = void 0, G.options = void 0, G.plotClose = void 0, G.series = void 0, G;
- }
- return N(U, _), U;
- }(y.seriesTypes.column.prototype.pointClass);
- }), C(
- o,
- "Series/HLC/HLCSeries.js",
- [o["Series/HLC/HLCPoint.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]],
- function(y, N, _) {
- var U = this && this.__extends || function() {
- var B = function(j, w) {
- return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, f) {
- x.__proto__ = f;
- } || function(x, f) {
- for (var l in f)
- f.hasOwnProperty(l) && (x[l] = f[l]);
- }, B(j, w);
- };
- return function(j, w) {
- function x() {
- this.constructor = j;
- }
- B(j, w), j.prototype = w === null ? Object.create(w) : (x.prototype = w.prototype, new x());
- };
- }(), G = N.seriesTypes.column, V = _.extend, F = _.merge;
- return _ = function(B) {
- function j() {
- var w = B !== null && B.apply(this, arguments) || this;
- return w.data = void 0, w.options = void 0, w.points = void 0, w.yData = void 0, w;
- }
- return U(j, B), j.prototype.extendStem = function(w, x, f) {
- var l = w[0];
- w = w[1], typeof l[2] == "number" && (l[2] = Math.max(f + x, l[2])), typeof w[2] == "number" && (w[2] = Math.min(f - x, w[2]));
- }, j.prototype.getPointPath = function(w, x) {
- x = x.strokeWidth();
- var f = w.series, l = x % 2 / 2, T = Math.round(w.plotX) - l, O = Math.round(w.shapeArgs.width / 2), R = [["M", T, Math.round(w.yBottom)], ["L", T, Math.round(w.plotHigh)]];
- return w.close !== null && (w = Math.round(w.plotClose) + l, R.push(["M", T, w], ["L", T + O, w]), f.extendStem(R, x / 2, w)), R;
- }, j.prototype.drawSinglePoint = function(w) {
- var x = w.series, f = x.chart, l = w.graphic, T = !l;
- typeof w.plotY < "u" && (l || (w.graphic = l = f.renderer.path().add(x.group)), f.styledMode || l.attr(x.pointAttribs(w, w.selected && "select")), x = x.getPointPath(w, l), l[T ? "attr" : "animate"]({ d: x }).addClass(w.getClassName(), !0));
- }, j.prototype.drawPoints = function() {
- this.points.forEach(this.drawSinglePoint);
- }, j.prototype.init = function() {
- B.prototype.init.apply(this, arguments), this.options.stacking = void 0;
- }, j.prototype.pointAttribs = function(w, x) {
- return w = B.prototype.pointAttribs.call(this, w, x), delete w.fill, w;
- }, j.prototype.toYData = function(w) {
- return [w.high, w.low, w.close];
- }, j.prototype.translate = function() {
- var w = this, x = w.yAxis, f = this.pointArrayMap && this.pointArrayMap.slice() || [], l = f.map(function(T) {
- return "plot" + (T.charAt(0).toUpperCase() + T.slice(1));
- });
- l.push("yBottom"), f.push("low"), B.prototype.translate.apply(w), w.points.forEach(function(T) {
- f.forEach(function(O, R) {
- O = T[O], O !== null && (w.dataModify && (O = w.dataModify.modifyValue(O)), T[l[R]] = x.toPixels(O, !0));
- }), T.tooltipPos[1] = T.plotHigh + x.pos - w.chart.plotTop;
- });
- }, j.defaultOptions = F(G.defaultOptions, { lineWidth: 1, tooltip: { pointFormat: '<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>High: {point.high}<br/>Low: {point.low}<br/>Close: {point.close}<br/>' }, threshold: null, states: { hover: { lineWidth: 3 } }, stickyTracking: !0 }), j;
- }(G), V(_.prototype, { animate: null, directTouch: !1, pointArrayMap: ["high", "low", "close"], pointAttrToOptions: {
- stroke: "color",
- "stroke-width": "lineWidth"
- }, pointValKey: "close" }), _.prototype.pointClass = y, N.registerSeriesType("hlc", _), _;
- }
- ), C(o, "Series/OHLC/OHLCPoint.js", [o["Core/Series/SeriesRegistry.js"]], function(y) {
- var N = this && this.__extends || function() {
- var _ = function(U, G) {
- return _ = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(V, F) {
- V.__proto__ = F;
- } || function(V, F) {
- for (var B in F)
- F.hasOwnProperty(B) && (V[B] = F[B]);
- }, _(U, G);
- };
- return function(U, G) {
- function V() {
- this.constructor = U;
- }
- _(U, G), U.prototype = G === null ? Object.create(G) : (V.prototype = G.prototype, new V());
- };
- }();
- return function(_) {
- function U() {
- var G = _ !== null && _.apply(this, arguments) || this;
- return G.open = void 0, G.options = void 0, G.plotOpen = void 0, G.series = void 0, G;
- }
- return N(U, _), U.prototype.getClassName = function() {
- return _.prototype.getClassName.call(this) + (this.open < this.close ? " highcharts-point-up" : " highcharts-point-down");
- }, U.prototype.resolveUpColor = function() {
- this.open < this.close && !this.options.color && this.series.options.upColor && (this.color = this.series.options.upColor);
- }, U.prototype.resolveColor = function() {
- _.prototype.resolveColor.call(this), this.resolveUpColor();
- }, U.prototype.getZone = function() {
- var G = _.prototype.getZone.call(this);
- return this.resolveUpColor(), G;
- }, U.prototype.applyOptions = function() {
- return _.prototype.applyOptions.apply(this, arguments), this.resolveColor && this.resolveColor(), this;
- }, U;
- }(y.seriesTypes.hlc.prototype.pointClass);
- }), C(
- o,
- "Series/OHLC/OHLCSeries.js",
- [o["Series/OHLC/OHLCPoint.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]],
- function(y, N, _) {
- var U = this && this.__extends || function() {
- var x = function(f, l) {
- return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(T, O) {
- T.__proto__ = O;
- } || function(T, O) {
- for (var R in O)
- O.hasOwnProperty(R) && (T[R] = O[R]);
- }, x(f, l);
- };
- return function(f, l) {
- function T() {
- this.constructor = f;
- }
- x(f, l), f.prototype = l === null ? Object.create(l) : (T.prototype = l.prototype, new T());
- };
- }(), G = N.series, V = N.seriesTypes.hlc, F = _.addEvent, B = _.extend, j = _.merge, w = function(x) {
- function f() {
- var l = x !== null && x.apply(this, arguments) || this;
- return l.data = void 0, l.options = void 0, l.points = void 0, l;
- }
- return U(f, x), f.prototype.getPointPath = function(l, T) {
- var O = x.prototype.getPointPath.call(this, l, T);
- T = T.strokeWidth();
- var R = T % 2 / 2, k = Math.round(l.plotX) - R, b = Math.round(l.shapeArgs.width / 2);
- return l.open !== null && (l = Math.round(l.plotOpen) + R, O.push(["M", k, l], ["L", k - b, l]), x.prototype.extendStem.call(this, O, T / 2, l)), O;
- }, f.prototype.pointAttribs = function(l, T) {
- T = x.prototype.pointAttribs.call(this, l, T);
- var O = this.options;
- return delete T.fill, !l.options.color && O.upColor && l.open < l.close && (T.stroke = O.upColor), T;
- }, f.prototype.toYData = function(l) {
- return [l.open, l.high, l.low, l.close];
- }, f.defaultOptions = j(V.defaultOptions, { tooltip: { pointFormat: '<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>Open: {point.open}<br/>High: {point.high}<br/>Low: {point.low}<br/>Close: {point.close}<br/>' } }), f;
- }(V);
- return B(w.prototype, { pointArrayMap: ["open", "high", "low", "close"] }), w.prototype.pointClass = y, N.registerSeriesType("ohlc", w), F(G, "init", function(x) {
- x = x.options, x.useOhlcData && x.id !== "highcharts-navigator-series" && B(this, { pointValKey: w.prototype.pointValKey, pointArrayMap: w.prototype.pointArrayMap, toYData: w.prototype.toYData });
- }), F(G, "afterSetOptions", function(x) {
- x = x.options;
- var f = x.dataGrouping;
- f && x.useOhlcData && x.id !== "highcharts-navigator-series" && (f.approximation = "ohlc");
- }), w;
- }
- ), C(o, "Series/Candlestick/CandlestickSeries.js", [o["Core/DefaultOptions.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, _) {
- var U = this && this.__extends || function() {
- var j = function(w, x) {
- return j = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(f, l) {
- f.__proto__ = l;
- } || function(f, l) {
- for (var T in l)
- l.hasOwnProperty(T) && (f[T] = l[T]);
- }, j(w, x);
- };
- return function(w, x) {
- function f() {
- this.constructor = w;
- }
- j(w, x), w.prototype = x === null ? Object.create(x) : (f.prototype = x.prototype, new f());
- };
- }(), G = y.defaultOptions;
- y = N.seriesTypes;
- var V = y.column, F = y.ohlc, B = _.merge;
- return _ = function(j) {
- function w() {
- var x = j !== null && j.apply(this, arguments) || this;
- return x.data = void 0, x.options = void 0, x.points = void 0, x;
- }
- return U(w, j), w.prototype.pointAttribs = function(x, f) {
- var l = V.prototype.pointAttribs.call(this, x, f), T = this.options, O = x.open < x.close, R = T.lineColor || this.color, k = x.color || this.color;
- return l["stroke-width"] = T.lineWidth, l.fill = x.options.color || O && T.upColor || k, l.stroke = x.options.lineColor || O && T.upLineColor || R, f && (x = T.states[f], l.fill = x.color || l.fill, l.stroke = x.lineColor || l.stroke, l["stroke-width"] = x.lineWidth || l["stroke-width"]), l;
- }, w.prototype.drawPoints = function() {
- var x = this, f = x.chart, l = x.yAxis.reversed;
- x.points.forEach(function(T) {
- var O = T.graphic, R = !O;
- if (typeof T.plotY < "u") {
- O || (T.graphic = O = f.renderer.path().add(x.group)), x.chart.styledMode || O.attr(x.pointAttribs(T, T.selected && "select")).shadow(x.options.shadow);
- var k = O.strokeWidth() % 2 / 2, b = Math.round(T.plotX) - k, S = T.plotOpen, v = T.plotClose, h = Math.min(S, v);
- S = Math.max(S, v);
- var c = Math.round(T.shapeArgs.width / 2);
- v = l ? S !== T.yBottom : Math.round(h) !== Math.round(T.plotHigh);
- var u = l ? Math.round(h) !== Math.round(T.plotHigh) : S !== T.yBottom;
- h = Math.round(h) + k, S = Math.round(S) + k, k = [], k.push(["M", b - c, S], ["L", b - c, h], ["L", b + c, h], ["L", b + c, S], ["Z"], ["M", b, h], ["L", b, v ? Math.round(l ? T.yBottom : T.plotHigh) : h], ["M", b, S], ["L", b, u ? Math.round(l ? T.plotHigh : T.yBottom) : S]), O[R ? "attr" : "animate"]({ d: k }).addClass(T.getClassName(), !0);
- }
- });
- }, w.defaultOptions = B(F.defaultOptions, G.plotOptions, { states: { hover: { lineWidth: 2 } }, tooltip: G.plotOptions.ohlc.tooltip, threshold: null, lineColor: "#000000", lineWidth: 1, upColor: "#ffffff", stickyTracking: !0 }), w;
- }(F), N.registerSeriesType("candlestick", _), _;
- }), C(o, "Series/Flags/FlagsPoint.js", [o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N) {
- var _ = this && this.__extends || function() {
- var G = function(V, F) {
- return G = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(B, j) {
- B.__proto__ = j;
- } || function(B, j) {
- for (var w in j)
- j.hasOwnProperty(w) && (B[w] = j[w]);
- }, G(V, F);
- };
- return function(V, F) {
- function B() {
- this.constructor = V;
- }
- G(V, F), V.prototype = F === null ? Object.create(F) : (B.prototype = F.prototype, new B());
- };
- }(), U = N.isNumber;
- return function(G) {
- function V() {
- var F = G !== null && G.apply(this, arguments) || this;
- return F.options = void 0, F.series = void 0, F;
- }
- return _(V, G), V.prototype.isValid = function() {
- return U(this.y) || typeof this.y > "u";
- }, V.prototype.hasNewShapeType = function() {
- var F = this.options.shape || this.series.options.shape;
- return this.graphic && F && F !== this.graphic.symbolKey;
- }, V;
- }(y.seriesTypes.column.prototype.pointClass);
- }), C(o, "Series/OnSeriesComposition.js", [
- o["Series/Column/ColumnSeries.js"],
- o["Core/Series/Series.js"],
- o["Core/Utilities.js"]
- ], function(y, N, _) {
- var U = y.prototype, G = N.prototype, V = _.defined, F = _.stableSort, B;
- return function(j) {
- function w() {
- return G.getPlotBox.call(this.options.onSeries && this.chart.get(this.options.onSeries) || this);
- }
- function x() {
- U.translate.apply(this);
- var l = this, T = l.options, O = l.chart, R = l.points, k = T.onSeries, b = (k = k && O.get(k)) && k.options.step, S = k && k.points, v = O.inverted, h = l.xAxis, c = l.yAxis;
- O = R.length - 1;
- var u;
- T = T.onKey || "y";
- var i = S && S.length, p = 0, a;
- if (k && k.visible && i) {
- p = (k.pointXOffset || 0) + (k.barW || 0) / 2;
- var t = k.currentDataGrouping, s = S[i - 1].x + (t ? t.totalRange : 0);
- for (F(R, function(D, I) {
- return D.x - I.x;
- }), T = "plot" + T[0].toUpperCase() + T.substr(1); i-- && R[O]; ) {
- var n = S[i];
- if (t = R[O], t.y = n.y, n.x <= t.x && typeof n[T] < "u") {
- if (t.x <= s && (t.plotY = n[T], n.x < t.x && !b && (a = S[i + 1]) && typeof a[T] < "u")) {
- var P = (t.x - n.x) / (a.x - n.x);
- t.plotY += P * (a[T] - n[T]), t.y += P * (a.y - n.y);
- }
- if (O--, i++, 0 > O)
- break;
- }
- }
- }
- R.forEach(function(D, I) {
- if (D.plotX += p, (typeof D.plotY > "u" || v) && (0 <= D.plotX && D.plotX <= h.len ? v ? (D.plotY = h.translate(D.x, 0, 1, 0, 1), D.plotX = V(D.y) ? c.translate(D.y, 0, 0, 0, 1) : 0) : D.plotY = (h.opposite ? 0 : l.yAxis.len) + h.offset : D.shapeArgs = {}), (u = R[I - 1]) && u.plotX === D.plotX) {
- typeof u.stackIndex > "u" && (u.stackIndex = 0);
- var W = u.stackIndex + 1;
- }
- D.stackIndex = W;
- }), this.onSeries = k;
- }
- var f = [];
- j.compose = function(l) {
- if (f.indexOf(l) === -1) {
- f.push(l);
- var T = l.prototype;
- T.getPlotBox = w, T.translate = x;
- }
- return l;
- }, j.getPlotBox = w, j.translate = x;
- }(B || (B = {})), B;
- }), C(
- o,
- "Series/Flags/FlagsSymbols.js",
- [o["Core/Renderer/RendererRegistry.js"], o["Core/Renderer/SVG/SVGRenderer.js"]],
- function(y, N) {
- function _(G) {
- U[G + "pin"] = function(V, F, B, j, w) {
- var x = w && w.anchorX;
- w = w && w.anchorY, G === "circle" && j > B && (V -= Math.round((j - B) / 2), B = j);
- var f = U[G](V, F, B, j);
- if (x && w) {
- var l = x;
- G === "circle" ? l = V + B / 2 : (V = f[0], B = f[1], V[0] === "M" && B[0] === "L" && (l = (V[1] + B[1]) / 2)), f.push(["M", l, F > w ? F : F + j], ["L", x, w]), f = f.concat(U.circle(x - 1, w - 1, 2, 2));
- }
- return f;
- };
- }
- var U = N.prototype.symbols;
- return U.flag = function(G, V, F, B, j) {
- var w = j && j.anchorX || G;
- j = j && j.anchorY || V;
- var x = U.circle(w - 1, j - 1, 2, 2);
- return x.push(["M", w, j], ["L", G, V + B], ["L", G, V], ["L", G + F, V], ["L", G + F, V + B], ["L", G, V + B], ["Z"]), x;
- }, _("circle"), _("square"), y = y.getRendererType(), y !== N && (y.prototype.symbols.circlepin = U.circlepin, y.prototype.symbols.flag = U.flag, y.prototype.symbols.squarepin = U.squarepin), U;
- }
- ), C(o, "Series/Flags/FlagsSeries.js", [
- o["Series/Flags/FlagsPoint.js"],
- o["Core/Globals.js"],
- o["Series/OnSeriesComposition.js"],
- o["Core/Renderer/RendererUtilities.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Renderer/SVG/SVGElement.js"],
- o["Core/Utilities.js"]
- ], function(y, N, _, U, G, V, F) {
- var B = this && this.__extends || function() {
- var k = function(b, S) {
- return k = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, h) {
- v.__proto__ = h;
- } || function(v, h) {
- for (var c in h)
- h.hasOwnProperty(c) && (v[c] = h[c]);
- }, k(b, S);
- };
- return function(b, S) {
- function v() {
- this.constructor = b;
- }
- k(b, S), b.prototype = S === null ? Object.create(S) : (v.prototype = S.prototype, new v());
- };
- }();
- N = N.noop;
- var j = U.distribute, w = G.series, x = G.seriesTypes.column, f = F.addEvent, l = F.defined;
- U = F.extend;
- var T = F.merge, O = F.objectEach, R = F.wrap;
- return F = function(k) {
- function b() {
- var S = k !== null && k.apply(this, arguments) || this;
- return S.data = void 0, S.options = void 0, S.points = void 0, S;
- }
- return B(b, k), b.prototype.animate = function(S) {
- S && this.setClip();
- }, b.prototype.drawPoints = function() {
- var S = this.points, v = this.chart, h = v.renderer, c = v.inverted, u = this.options, i = u.y, p, a = this.yAxis, t = {}, s = [];
- for (p = S.length; p--; ) {
- var n = S[p], P = (c ? n.plotY : n.plotX) > this.xAxis.len, D = n.plotX, I = n.stackIndex, W = n.options.shape || u.shape, E = n.plotY;
- typeof E < "u" && (E = n.plotY + i - (typeof I < "u" && I * u.stackDistance)), n.anchorX = I ? void 0 : n.plotX;
- var X = I ? void 0 : n.plotY, g = W !== "flag";
- I = n.graphic, typeof E < "u" && 0 <= D && !P ? (I && n.hasNewShapeType() && (I = I.destroy()), I || (I = n.graphic = h.label("", null, null, W, null, null, u.useHTML).addClass("highcharts-point").add(this.markerGroup), n.graphic.div && (n.graphic.div.point = n), I.isNew = !0), I.attr({
- align: g ? "center" : "left",
- width: u.width,
- height: u.height,
- "text-align": u.textAlign
- }), v.styledMode || I.attr(this.pointAttribs(n)).css(T(u.style, n.style)).shadow(u.shadow), 0 < D && (D -= I.strokeWidth() % 2), W = { y: E, anchorY: X }, u.allowOverlapX && (W.x = D, W.anchorX = n.anchorX), I.attr({ text: n.options.title || u.title || "A" })[I.isNew ? "attr" : "animate"](W), u.allowOverlapX || (t[n.plotX] ? t[n.plotX].size = Math.max(t[n.plotX].size, I.width) : t[n.plotX] = { align: g ? 0.5 : 0, size: I.width, target: D, anchorX: D }), n.tooltipPos = [D, E + a.pos - v.plotTop]) : I && (n.graphic = I.destroy());
- }
- if (!u.allowOverlapX) {
- var m = 100;
- O(t, function(L) {
- L.plotX = L.anchorX, s.push(L), m = Math.max(L.size, m);
- }), j(s, c ? a.len : this.xAxis.len, m), S.forEach(function(L) {
- var z = L.graphic && t[L.plotX];
- z && (L.graphic[L.graphic.isNew ? "attr" : "animate"]({ x: z.pos + z.align * z.size, anchorX: L.anchorX }), l(z.pos) ? L.graphic.isNew = !1 : (L.graphic.attr({ x: -9999, anchorX: -9999 }), L.graphic.isNew = !0));
- });
- }
- u.useHTML && R(this.markerGroup, "on", function(L) {
- return V.prototype.on.apply(L.apply(this, [].slice.call(arguments, 1)), [].slice.call(arguments, 1));
- });
- }, b.prototype.drawTracker = function() {
- var S = this.points;
- k.prototype.drawTracker.call(this), S.forEach(function(v) {
- var h = v.graphic;
- h && (v.unbindMouseOver && v.unbindMouseOver(), v.unbindMouseOver = f(h.element, "mouseover", function() {
- 0 < v.stackIndex && !v.raised && (v._y = h.y, h.attr({ y: v._y - 8 }), v.raised = !0), S.forEach(function(c) {
- c !== v && c.raised && c.graphic && (c.graphic.attr({ y: c._y }), c.raised = !1);
- });
- }));
- });
- }, b.prototype.pointAttribs = function(S, v) {
- var h = this.options, c = S && S.color || this.color, u = h.lineColor, i = S && S.lineWidth;
- return S = S && S.fillColor || h.fillColor, v && (S = h.states[v].fillColor, u = h.states[v].lineColor, i = h.states[v].lineWidth), { fill: S || c, stroke: u || c, "stroke-width": i || h.lineWidth || 0 };
- }, b.prototype.setClip = function() {
- w.prototype.setClip.apply(this, arguments), this.options.clip !== !1 && this.sharedClipKey && this.markerGroup && this.markerGroup.clip(this.chart.sharedClips[this.sharedClipKey]);
- }, b.defaultOptions = T(x.defaultOptions, {
- pointRange: 0,
- allowOverlapX: !1,
- shape: "flag",
- stackDistance: 12,
- textAlign: "center",
- tooltip: { pointFormat: "{point.text}" },
- threshold: null,
- y: -30,
- fillColor: "#ffffff",
- lineWidth: 1,
- states: { hover: { lineColor: "#000000", fillColor: "#ccd6eb" } },
- style: { fontSize: "11px", fontWeight: "bold" }
- }), b;
- }(x), _.compose(F), U(F.prototype, { allowDG: !1, forceCrop: !0, invertible: !1, noSharedTooltip: !0, pointClass: y, sorted: !1, takeOrdinalPosition: !1, trackerGroups: ["markerGroup"], buildKDTree: N, init: w.prototype.init, invertGroups: N }), G.registerSeriesType("flags", F), F;
- }), C(o, "Core/Axis/ScrollbarAxis.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.addEvent, _ = y.defined, U = y.pick;
- return function() {
- function G() {
- }
- return G.compose = function(V, F) {
- if (G.composed.indexOf(V) === -1)
- G.composed.push(V);
- else
- return V;
- var B = function(j) {
- var w = U(j.options && j.options.min, j.min), x = U(j.options && j.options.max, j.max);
- return { axisMin: w, axisMax: x, scrollMin: _(j.dataMin) ? Math.min(w, j.min, j.dataMin, U(j.threshold, 1 / 0)) : w, scrollMax: _(j.dataMax) ? Math.max(x, j.max, j.dataMax, U(j.threshold, -1 / 0)) : x };
- };
- return N(V, "afterInit", function() {
- var j = this;
- j.options && j.options.scrollbar && j.options.scrollbar.enabled && (j.options.scrollbar.vertical = !j.horiz, j.options.startOnTick = j.options.endOnTick = !1, j.scrollbar = new F(j.chart.renderer, j.options.scrollbar, j.chart), N(j.scrollbar, "changed", function(w) {
- var x = B(j), f = x.axisMax, l = x.scrollMin, T = x.scrollMax - l;
- _(x.axisMin) && _(f) && (j.horiz && !j.reversed || !j.horiz && j.reversed ? (x = l + T * this.to, l += T * this.from) : (x = l + T * (1 - this.from), l += T * (1 - this.to)), this.shouldUpdateExtremes(w.DOMType) ? j.setExtremes(l, x, !0, w.DOMType !== "mousemove" && w.DOMType !== "touchmove", w) : this.setRange(
- this.from,
- this.to
- ));
- }));
- }), N(V, "afterRender", function() {
- var j = B(this), w = j.scrollMin, x = j.scrollMax;
- j = this.scrollbar;
- var f = this.axisTitleMargin + (this.titleOffset || 0), l = this.chart.scrollbarsOffsets, T = this.options.margin || 0;
- j && (this.horiz ? (this.opposite || (l[1] += f), j.position(this.left, this.top + this.height + 2 + l[1] - (this.opposite ? T : 0), this.width, this.height), this.opposite || (l[1] += T), f = 1) : (this.opposite && (l[0] += f), j.position(
- j.options.opposite ? this.left + this.width + 2 + l[0] - (this.opposite ? 0 : T) : this.opposite ? 0 : T,
- this.top,
- this.width,
- this.height
- ), this.opposite && (l[0] += T), f = 0), l[f] += j.size + j.options.margin, isNaN(w) || isNaN(x) || !_(this.min) || !_(this.max) || this.min === this.max ? j.setRange(0, 1) : (l = (this.min - w) / (x - w), w = (this.max - w) / (x - w), this.horiz && !this.reversed || !this.horiz && this.reversed ? j.setRange(l, w) : j.setRange(1 - w, 1 - l)));
- }), N(V, "afterGetOffset", function() {
- var j = this.scrollbar && !this.scrollbar.options.opposite;
- j = this.horiz ? 2 : j ? 3 : 1;
- var w = this.scrollbar;
- w && (this.chart.scrollbarsOffsets = [0, 0], this.chart.axisOffset[j] += w.size + w.options.margin);
- }), V;
- }, G.composed = [], G;
- }();
- }), C(o, "Core/ScrollbarDefaults.js", [o["Core/Globals.js"]], function(y) {
- return {
- height: y.isTouchDevice ? 20 : 14,
- barBorderRadius: 0,
- buttonBorderRadius: 0,
- liveRedraw: void 0,
- margin: 10,
- minWidth: 6,
- opposite: !0,
- step: 0.2,
- zIndex: 3,
- barBackgroundColor: "#cccccc",
- barBorderWidth: 1,
- barBorderColor: "#cccccc",
- buttonArrowColor: "#333333",
- buttonBackgroundColor: "#e6e6e6",
- buttonBorderColor: "#cccccc",
- buttonBorderWidth: 1,
- rifleColor: "#333333",
- trackBackgroundColor: "#f2f2f2",
- trackBorderColor: "#f2f2f2",
- trackBorderWidth: 1
- };
- }), C(o, "Core/Scrollbar.js", [o["Core/DefaultOptions.js"], o["Core/Globals.js"], o["Core/Axis/ScrollbarAxis.js"], o["Core/ScrollbarDefaults.js"], o["Core/Utilities.js"]], function(y, N, _, U, G) {
- var V = y.defaultOptions, F = G.addEvent, B = G.correctFloat, j = G.defined, w = G.destroyObjectProperties, x = G.fireEvent, f = G.merge, l = G.pick, T = G.removeEvent;
- return y = function() {
- function O(R, k, b) {
- this._events = [], this.chart = void 0, this.from = this.chartY = this.chartX = 0, this.scrollbar = this.renderer = this.options = this.group = void 0, this.scrollbarButtons = [], this.scrollbarGroup = void 0, this.scrollbarLeft = 0, this.scrollbarRifles = void 0, this.scrollbarStrokeWidth = 1, this.to = this.size = this.scrollbarTop = 0, this.track = void 0, this.trackBorderWidth = 1, this.userOptions = void 0, this.y = this.x = 0, this.init(R, k, b);
- }
- return O.compose = function(R) {
- _.compose(R, O);
- }, O.swapXY = function(R, k) {
- return k && R.forEach(function(b) {
- for (var S = b.length, v, h = 0; h < S; h += 2)
- v = b[h + 1], typeof v == "number" && (b[h + 1] = b[h + 2], b[h + 2] = v);
- }), R;
- }, O.prototype.addEvents = function() {
- var R = this.options.inverted ? [1, 0] : [0, 1], k = this.scrollbarButtons, b = this.scrollbarGroup.element, S = this.track.element, v = this.mouseDownHandler.bind(this), h = this.mouseMoveHandler.bind(this), c = this.mouseUpHandler.bind(this);
- R = [[k[R[0]].element, "click", this.buttonToMinClick.bind(this)], [k[R[1]].element, "click", this.buttonToMaxClick.bind(this)], [S, "click", this.trackClick.bind(this)], [b, "mousedown", v], [b.ownerDocument, "mousemove", h], [b.ownerDocument, "mouseup", c]], N.hasTouch && R.push(
- [b, "touchstart", v],
- [b.ownerDocument, "touchmove", h],
- [b.ownerDocument, "touchend", c]
- ), R.forEach(function(u) {
- F.apply(null, u);
- }), this._events = R;
- }, O.prototype.buttonToMaxClick = function(R) {
- var k = (this.to - this.from) * l(this.options.step, 0.2);
- this.updatePosition(this.from + k, this.to + k), x(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMEvent: R });
- }, O.prototype.buttonToMinClick = function(R) {
- var k = B(this.to - this.from) * l(this.options.step, 0.2);
- this.updatePosition(B(this.from - k), B(this.to - k)), x(this, "changed", {
- from: this.from,
- to: this.to,
- trigger: "scrollbar",
- DOMEvent: R
- });
- }, O.prototype.cursorToScrollbarPosition = function(R) {
- var k = this.options;
- return k = k.minWidth > this.calculatedWidth ? k.minWidth : 0, { chartX: (R.chartX - this.x - this.xOffset) / (this.barWidth - k), chartY: (R.chartY - this.y - this.yOffset) / (this.barWidth - k) };
- }, O.prototype.destroy = function() {
- var R = this, k = R.chart.scroller;
- R.removeEvents(), ["track", "scrollbarRifles", "scrollbar", "scrollbarGroup", "group"].forEach(function(b) {
- R[b] && R[b].destroy && (R[b] = R[b].destroy());
- }), k && R === k.scrollbar && (k.scrollbar = null, w(k.scrollbarButtons));
- }, O.prototype.drawScrollbarButton = function(R) {
- var k = this.renderer, b = this.scrollbarButtons, S = this.options, v = this.size, h = k.g().add(this.group);
- b.push(h), h = k.rect().addClass("highcharts-scrollbar-button").add(h), this.chart.styledMode || h.attr({ stroke: S.buttonBorderColor, "stroke-width": S.buttonBorderWidth, fill: S.buttonBackgroundColor }), h.attr(h.crisp({ x: -0.5, y: -0.5, width: v + 1, height: v + 1, r: S.buttonBorderRadius }, h.strokeWidth())), h = k.path(O.swapXY([["M", v / 2 + (R ? -1 : 1), v / 2 - 3], ["L", v / 2 + (R ? -1 : 1), v / 2 + 3], ["L", v / 2 + (R ? 2 : -2), v / 2]], S.vertical)).addClass("highcharts-scrollbar-arrow").add(b[R]), this.chart.styledMode || h.attr({ fill: S.buttonArrowColor });
- }, O.prototype.init = function(R, k, b) {
- this.scrollbarButtons = [], this.renderer = R, this.userOptions = k, this.options = f(U, V.scrollbar, k), this.chart = b, this.size = l(this.options.size, this.options.height), k.enabled && (this.render(), this.addEvents());
- }, O.prototype.mouseDownHandler = function(R) {
- R = this.chart.pointer.normalize(R), R = this.cursorToScrollbarPosition(R), this.chartX = R.chartX, this.chartY = R.chartY, this.initPositions = [this.from, this.to], this.grabbedCenter = !0;
- }, O.prototype.mouseMoveHandler = function(R) {
- var k = this.chart.pointer.normalize(R), b = this.options.vertical ? "chartY" : "chartX", S = this.initPositions || [];
- !this.grabbedCenter || R.touches && R.touches[0][b] === 0 || (k = this.cursorToScrollbarPosition(k)[b], b = this[b], b = k - b, this.hasDragged = !0, this.updatePosition(S[0] + b, S[1] + b), this.hasDragged && x(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMType: R.type, DOMEvent: R }));
- }, O.prototype.mouseUpHandler = function(R) {
- this.hasDragged && x(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMType: R.type, DOMEvent: R }), this.grabbedCenter = this.hasDragged = this.chartX = this.chartY = null;
- }, O.prototype.position = function(R, k, b, S) {
- var v = this.options.vertical, h = this.rendered ? "animate" : "attr", c = 0;
- this.x = R, this.y = k + this.trackBorderWidth, this.width = b, this.xOffset = this.height = S, this.yOffset = c, v ? (this.width = this.yOffset = b = c = this.size, this.xOffset = k = 0, this.barWidth = S - 2 * b, this.x = R += this.options.margin) : (this.height = this.xOffset = S = k = this.size, this.barWidth = b - 2 * S, this.y += this.options.margin), this.group[h]({ translateX: R, translateY: this.y }), this.track[h]({ width: b, height: S }), this.scrollbarButtons[1][h]({ translateX: v ? 0 : b - k, translateY: v ? S - c : 0 });
- }, O.prototype.removeEvents = function() {
- this._events.forEach(function(R) {
- T.apply(null, R);
- }), this._events.length = 0;
- }, O.prototype.render = function() {
- var R = this.renderer, k = this.options, b = this.size, S = this.chart.styledMode, v = R.g("scrollbar").attr({ zIndex: k.zIndex, translateY: -99999 }).add();
- this.group = v, this.track = R.rect().addClass("highcharts-scrollbar-track").attr({ x: 0, r: k.trackBorderRadius || 0, height: b, width: b }).add(v), S || this.track.attr({ fill: k.trackBackgroundColor, stroke: k.trackBorderColor, "stroke-width": k.trackBorderWidth }), this.trackBorderWidth = this.track.strokeWidth(), this.track.attr({ y: -this.trackBorderWidth % 2 / 2 }), this.scrollbarGroup = R.g().add(v), this.scrollbar = R.rect().addClass("highcharts-scrollbar-thumb").attr({ height: b, width: b, r: k.barBorderRadius || 0 }).add(this.scrollbarGroup), this.scrollbarRifles = R.path(O.swapXY([["M", -3, b / 4], ["L", -3, 2 * b / 3], ["M", 0, b / 4], ["L", 0, 2 * b / 3], ["M", 3, b / 4], ["L", 3, 2 * b / 3]], k.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup), S || (this.scrollbar.attr({ fill: k.barBackgroundColor, stroke: k.barBorderColor, "stroke-width": k.barBorderWidth }), this.scrollbarRifles.attr({ stroke: k.rifleColor, "stroke-width": 1 })), this.scrollbarStrokeWidth = this.scrollbar.strokeWidth(), this.scrollbarGroup.translate(-this.scrollbarStrokeWidth % 2 / 2, -this.scrollbarStrokeWidth % 2 / 2), this.drawScrollbarButton(0), this.drawScrollbarButton(1);
- }, O.prototype.setRange = function(R, k) {
- var b = this.options, S = b.vertical, v = b.minWidth, h = this.barWidth, c = !this.rendered || this.hasDragged || this.chart.navigator && this.chart.navigator.hasDragged ? "attr" : "animate";
- if (j(h)) {
- var u = h * Math.min(k, 1);
- R = Math.max(R, 0);
- var i = Math.ceil(h * R);
- this.calculatedWidth = u = B(u - i), u < v && (i = (h - v + u) * R, u = v), v = Math.floor(i + this.xOffset + this.yOffset), h = u / 2 - 0.5, this.from = R, this.to = k, S ? (this.scrollbarGroup[c]({ translateY: v }), this.scrollbar[c]({ height: u }), this.scrollbarRifles[c]({ translateY: h }), this.scrollbarTop = v, this.scrollbarLeft = 0) : (this.scrollbarGroup[c]({ translateX: v }), this.scrollbar[c]({ width: u }), this.scrollbarRifles[c]({ translateX: h }), this.scrollbarLeft = v, this.scrollbarTop = 0), 12 >= u ? this.scrollbarRifles.hide() : this.scrollbarRifles.show(!0), b.showFull === !1 && (0 >= R && 1 <= k ? this.group.hide() : this.group.show()), this.rendered = !0;
- }
- }, O.prototype.shouldUpdateExtremes = function(R) {
- return l(this.options.liveRedraw, N.svg && !N.isTouchDevice && !this.chart.isBoosting) || R === "mouseup" || R === "touchend" || !j(R);
- }, O.prototype.trackClick = function(R) {
- var k = this.chart.pointer.normalize(R), b = this.to - this.from, S = this.y + this.scrollbarTop, v = this.x + this.scrollbarLeft;
- this.options.vertical && k.chartY > S || !this.options.vertical && k.chartX > v ? this.updatePosition(this.from + b, this.to + b) : this.updatePosition(this.from - b, this.to - b), x(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMEvent: R });
- }, O.prototype.update = function(R) {
- this.destroy(), this.init(this.chart.renderer, f(
- !0,
- this.options,
- R
- ), this.chart);
- }, O.prototype.updatePosition = function(R, k) {
- 1 < k && (R = B(1 - B(k - R)), k = 1), 0 > R && (k = B(k - R), R = 0), this.from = R, this.to = k;
- }, O.defaultOptions = U, O;
- }(), V.scrollbar = f(!0, y.defaultOptions, V.scrollbar), y;
- }), C(o, "Core/Axis/NavigatorAxis.js", [o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N) {
- var _ = y.isTouchDevice, U = N.addEvent, G = N.correctFloat, V = N.defined, F = N.isNumber, B = N.pick, j = function() {
- function w(x) {
- this.axis = x;
- }
- return w.prototype.destroy = function() {
- this.axis = void 0;
- }, w.prototype.toFixedRange = function(x, f, l, T) {
- var O = this.axis, R = O.chart;
- R = R && R.fixedRange;
- var k = (O.pointRange || 0) / 2;
- return x = B(l, O.translate(x, !0, !O.horiz)), f = B(T, O.translate(f, !0, !O.horiz)), O = R && (f - x) / R, V(l) || (x = G(x + k)), V(T) || (f = G(f - k)), 0.7 < O && 1.3 > O && (T ? x = f - R : f = x + R), F(x) && F(f) || (x = f = void 0), { min: x, max: f };
- }, w;
- }();
- return function() {
- function w() {
- }
- return w.compose = function(x) {
- x.keepProps.push("navigatorAxis"), U(x, "init", function() {
- this.navigatorAxis || (this.navigatorAxis = new j(this));
- }), U(x, "zoom", function(f) {
- var l = this.chart.options, T = l.navigator, O = this.navigatorAxis, R = l.chart.pinchType, k = l.rangeSelector;
- l = l.chart.zoomType, this.isXAxis && (T && T.enabled || k && k.enabled) && (l === "y" ? f.zoomed = !1 : (!_ && l === "xy" || _ && R === "xy") && this.options.range && (T = O.previousZoom, V(f.newMin) ? O.previousZoom = [this.min, this.max] : T && (f.newMin = T[0], f.newMax = T[1], O.previousZoom = void 0))), typeof f.zoomed < "u" && f.preventDefault();
- });
- }, w.AdditionsClass = j, w;
- }();
- }), C(o, "Core/Navigator.js", [
- o["Core/Axis/Axis.js"],
- o["Core/Chart/Chart.js"],
- o["Core/Color/Color.js"],
- o["Core/Globals.js"],
- o["Core/Axis/NavigatorAxis.js"],
- o["Core/DefaultOptions.js"],
- o["Core/Renderer/RendererRegistry.js"],
- o["Core/Scrollbar.js"],
- o["Core/Series/Series.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Utilities.js"]
- ], function(y, N, _, U, G, V, F, B, j, w, x) {
- _ = _.parse;
- var f = U.hasTouch, l = U.isTouchDevice, T = V.defaultOptions, O = x.addEvent, R = x.clamp, k = x.correctFloat, b = x.defined, S = x.destroyObjectProperties, v = x.erase, h = x.extend, c = x.find, u = x.isArray, i = x.isNumber, p = x.merge, a = x.pick, t = x.removeEvent, s = x.splat, n = function(D) {
- for (var I = [], W = 1; W < arguments.length; W++)
- I[W - 1] = arguments[W];
- if (I = [].filter.call(I, i), I.length)
- return Math[D].apply(0, I);
- };
- V = typeof w.seriesTypes.areaspline > "u" ? "line" : "areaspline", h(T, { navigator: { height: 40, margin: 25, maskInside: !0, handles: { width: 7, height: 15, symbols: ["navigator-handle", "navigator-handle"], enabled: !0, lineWidth: 1, backgroundColor: "#f2f2f2", borderColor: "#999999" }, maskFill: _("#6685c2").setOpacity(0.3).get(), outlineColor: "#cccccc", outlineWidth: 1, series: {
- type: V,
- fillOpacity: 0.05,
- lineWidth: 1,
- compare: null,
- dataGrouping: { approximation: "average", enabled: !0, groupPixelWidth: 2, firstAnchor: "firstPoint", anchor: "middle", lastAnchor: "lastPoint", units: [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2, 3, 4]], ["week", [1, 2, 3]], ["month", [1, 3, 6]], ["year", null]] },
- dataLabels: { enabled: !1, zIndex: 2 },
- id: "highcharts-navigator-series",
- className: "highcharts-navigator-series",
- lineColor: null,
- marker: { enabled: !1 },
- threshold: null
- }, xAxis: { overscroll: 0, className: "highcharts-navigator-xaxis", tickLength: 0, lineWidth: 0, gridLineColor: "#e6e6e6", gridLineWidth: 1, tickPixelInterval: 200, labels: { align: "left", style: { color: "#999999" }, x: 3, y: -4 }, crosshair: !1 }, yAxis: { className: "highcharts-navigator-yaxis", gridLineWidth: 0, startOnTick: !1, endOnTick: !1, minPadding: 0.1, maxPadding: 0.1, labels: { enabled: !1 }, crosshair: !1, title: { text: null }, tickLength: 0, tickWidth: 0 } } }), F.getRendererType().prototype.symbols["navigator-handle"] = function(D, I, W, E, X) {
- return D = (X && X.width || 0) / 2, I = Math.round(D / 3) + 0.5, X = X && X.height || 0, [["M", -D - 1, 0.5], ["L", D, 0.5], ["L", D, X + 0.5], ["L", -D - 1, X + 0.5], ["L", -D - 1, 0.5], ["M", -I, 4], ["L", -I, X - 3], ["M", I - 1, 4], ["L", I - 1, X - 3]];
- };
- var P = function() {
- function D(I) {
- this.zoomedMin = this.zoomedMax = this.yAxis = this.xAxis = this.top = this.size = this.shades = this.rendered = this.range = this.outlineHeight = this.outline = this.opposite = this.navigatorSize = this.navigatorSeries = this.navigatorOptions = this.navigatorGroup = this.navigatorEnabled = this.left = this.height = this.handles = this.chart = this.baseSeries = void 0, this.init(I);
- }
- return D.prototype.drawHandle = function(I, W, E, X) {
- var g = this.navigatorOptions.handles.height;
- this.handles[W][X](E ? { translateX: Math.round(this.left + this.height / 2), translateY: Math.round(this.top + parseInt(I, 10) + 0.5 - g) } : { translateX: Math.round(this.left + parseInt(I, 10)), translateY: Math.round(this.top + this.height / 2 - g / 2 - 1) });
- }, D.prototype.drawOutline = function(I, W, E, X) {
- var g = this.navigatorOptions.maskInside, m = this.outline.strokeWidth(), L = m / 2, z = m % 2 / 2;
- m = this.outlineHeight;
- var $ = this.scrollbarHeight || 0, Q = this.size, A = this.left - $, H = this.top;
- E ? (A -= L, E = H + W + z, W = H + I + z, z = [["M", A + m, H - $ - z], ["L", A + m, E], ["L", A, E], ["L", A, W], ["L", A + m, W], ["L", A + m, H + Q + $]], g && z.push(["M", A + m, E - L], ["L", A + m, W + L])) : (I += A + $ - z, W += A + $ - z, H += L, z = [["M", A, H], ["L", I, H], ["L", I, H + m], ["L", W, H + m], ["L", W, H], ["L", A + Q + 2 * $, H]], g && z.push(["M", I - L, H], ["L", W + L, H])), this.outline[X]({ d: z });
- }, D.prototype.drawMasks = function(I, W, E, X) {
- var g = this.left, m = this.top, L = this.height;
- if (E)
- var z = [g, g, g], $ = [m, m + I, m + W], Q = [L, L, L], A = [I, W - I, this.size - W];
- else
- z = [g, g + I, g + W], $ = [m, m, m], Q = [I, W - I, this.size - W], A = [L, L, L];
- this.shades.forEach(function(H, Y) {
- H[X]({ x: z[Y], y: $[Y], width: Q[Y], height: A[Y] });
- });
- }, D.prototype.renderElements = function() {
- var I = this, W = I.navigatorOptions, E = W.maskInside, X = I.chart, g = X.renderer, m, L = { cursor: X.inverted ? "ns-resize" : "ew-resize" };
- I.navigatorGroup = m = g.g("navigator").attr({ zIndex: 8, visibility: "hidden" }).add(), [!E, E, !E].forEach(function(z, $) {
- I.shades[$] = g.rect().addClass("highcharts-navigator-mask" + ($ === 1 ? "-inside" : "-outside")).add(m), X.styledMode || I.shades[$].attr({ fill: z ? W.maskFill : "rgba(0,0,0,0)" }).css($ === 1 && L);
- }), I.outline = g.path().addClass("highcharts-navigator-outline").add(m), X.styledMode || I.outline.attr({ "stroke-width": W.outlineWidth, stroke: W.outlineColor }), W.handles.enabled && [0, 1].forEach(function(z) {
- if (W.handles.inverted = X.inverted, I.handles[z] = g.symbol(W.handles.symbols[z], -W.handles.width / 2 - 1, 0, W.handles.width, W.handles.height, W.handles), I.handles[z].attr({ zIndex: 7 - z }).addClass("highcharts-navigator-handle highcharts-navigator-handle-" + ["left", "right"][z]).add(m), !X.styledMode) {
- var $ = W.handles;
- I.handles[z].attr({ fill: $.backgroundColor, stroke: $.borderColor, "stroke-width": $.lineWidth }).css(L);
- }
- });
- }, D.prototype.update = function(I) {
- (this.series || []).forEach(function(W) {
- W.baseSeries && delete W.baseSeries.navigatorSeries;
- }), this.destroy(), p(!0, this.chart.options.navigator, this.options, I), this.init(this.chart);
- }, D.prototype.render = function(I, W, E, X) {
- var g = this.chart, m = this.scrollbarHeight, L, z = this.xAxis, $ = z.pointRange || 0, Q = z.navigatorAxis.fake ? g.xAxis[0] : z, A = this.navigatorEnabled, H, Y = this.rendered, Z = g.inverted, q = g.xAxis[0].minRange, it = g.xAxis[0].options.maxRange;
- if (!this.hasDragged || b(E)) {
- if (I = k(I - $ / 2), W = k(W + $ / 2), !i(I) || !i(W))
- if (Y)
- E = 0, X = a(z.width, Q.width);
- else
- return;
- this.left = a(z.left, g.plotLeft + m + (Z ? g.plotWidth : 0)), this.size = H = L = a(z.len, (Z ? g.plotHeight : g.plotWidth) - 2 * m), g = Z ? m : L + 2 * m, E = a(E, z.toPixels(I, !0)), X = a(X, z.toPixels(W, !0)), i(E) && Math.abs(E) !== 1 / 0 || (E = 0, X = g), I = z.toValue(E, !0), W = z.toValue(X, !0);
- var et = Math.abs(k(W - I));
- et < q ? this.grabbedLeft ? E = z.toPixels(W - q - $, !0) : this.grabbedRight && (X = z.toPixels(I + q + $, !0)) : b(it) && k(et - $) > it && (this.grabbedLeft ? E = z.toPixels(W - it - $, !0) : this.grabbedRight && (X = z.toPixels(I + it + $, !0))), this.zoomedMax = R(Math.max(E, X), 0, H), this.zoomedMin = R(this.fixedWidth ? this.zoomedMax - this.fixedWidth : Math.min(E, X), 0, H), this.range = this.zoomedMax - this.zoomedMin, H = Math.round(this.zoomedMax), E = Math.round(this.zoomedMin), A && (this.navigatorGroup.attr({ visibility: "visible" }), Y = Y && !this.hasDragged ? "animate" : "attr", this.drawMasks(E, H, Z, Y), this.drawOutline(E, H, Z, Y), this.navigatorOptions.handles.enabled && (this.drawHandle(E, 0, Z, Y), this.drawHandle(H, 1, Z, Y))), this.scrollbar && (Z ? (Z = this.top - m, Q = this.left - m + (A || !Q.opposite ? 0 : (Q.titleOffset || 0) + Q.axisTitleMargin), m = L + 2 * m) : (Z = this.top + (A ? this.height : -m), Q = this.left - m), this.scrollbar.position(Q, Z, g, m), this.scrollbar.setRange(this.zoomedMin / (L || 1), this.zoomedMax / (L || 1))), this.rendered = !0;
- }
- }, D.prototype.addMouseEvents = function() {
- var I = this, W = I.chart, E = W.container, X = [], g, m;
- I.mouseMoveHandler = g = function(L) {
- I.onMouseMove(L);
- }, I.mouseUpHandler = m = function(L) {
- I.onMouseUp(L);
- }, X = I.getPartsEvents("mousedown"), X.push(O(W.renderTo, "mousemove", g), O(E.ownerDocument, "mouseup", m)), f && (X.push(O(W.renderTo, "touchmove", g), O(E.ownerDocument, "touchend", m)), X.concat(I.getPartsEvents("touchstart"))), I.eventsToUnbind = X, I.series && I.series[0] && X.push(O(I.series[0].xAxis, "foundExtremes", function() {
- W.navigator.modifyNavigatorAxisExtremes();
- }));
- }, D.prototype.getPartsEvents = function(I) {
- var W = this, E = [];
- return ["shades", "handles"].forEach(function(X) {
- W[X].forEach(function(g, m) {
- E.push(O(g.element, I, function(L) {
- W[X + "Mousedown"](L, m);
- }));
- });
- }), E;
- }, D.prototype.shadesMousedown = function(I, W) {
- I = this.chart.pointer.normalize(I);
- var E = this.chart, X = this.xAxis, g = this.zoomedMin, m = this.left, L = this.size, z = this.range, $ = I.chartX;
- if (E.inverted && ($ = I.chartY, m = this.top), W === 1)
- this.grabbedCenter = $, this.fixedWidth = z, this.dragOffset = $ - g;
- else {
- if (I = $ - m - z / 2, W === 0)
- I = Math.max(0, I);
- else if (W === 2 && I + z >= L)
- if (I = L - z, this.reversedExtremes) {
- I -= z;
- var Q = this.getUnionExtremes().dataMin;
- } else
- var A = this.getUnionExtremes().dataMax;
- I !== g && (this.fixedWidth = z, W = X.navigatorAxis.toFixedRange(I, I + z, Q, A), b(W.min) && E.xAxis[0].setExtremes(Math.min(W.min, W.max), Math.max(W.min, W.max), !0, null, { trigger: "navigator" }));
- }
- }, D.prototype.handlesMousedown = function(I, W) {
- this.chart.pointer.normalize(I), I = this.chart;
- var E = I.xAxis[0], X = this.reversedExtremes;
- W === 0 ? (this.grabbedLeft = !0, this.otherHandlePos = this.zoomedMax, this.fixedExtreme = X ? E.min : E.max) : (this.grabbedRight = !0, this.otherHandlePos = this.zoomedMin, this.fixedExtreme = X ? E.max : E.min), I.fixedRange = null;
- }, D.prototype.onMouseMove = function(I) {
- var W = this, E = W.chart, X = W.left, g = W.navigatorSize, m = W.range, L = W.dragOffset, z = E.inverted;
- I.touches && I.touches[0].pageX === 0 || (I = E.pointer.normalize(I), E = I.chartX, z && (X = W.top, E = I.chartY), W.grabbedLeft ? (W.hasDragged = !0, W.render(0, 0, E - X, W.otherHandlePos)) : W.grabbedRight ? (W.hasDragged = !0, W.render(0, 0, W.otherHandlePos, E - X)) : W.grabbedCenter && (W.hasDragged = !0, E < L ? E = L : E > g + L - m && (E = g + L - m), W.render(0, 0, E - L, E - L + m)), W.hasDragged && W.scrollbar && a(W.scrollbar.options.liveRedraw, U.svg && !l && !this.chart.isBoosting) && (I.DOMType = I.type, setTimeout(function() {
- W.onMouseUp(I);
- }, 0)));
- }, D.prototype.onMouseUp = function(I) {
- var W = this.chart, E = this.xAxis, X = this.scrollbar, g = I.DOMEvent || I, m = W.inverted, L = this.rendered && !this.hasDragged ? "animate" : "attr";
- if (this.hasDragged && (!X || !X.hasDragged) || I.trigger === "scrollbar") {
- if (X = this.getUnionExtremes(), this.zoomedMin === this.otherHandlePos)
- var z = this.fixedExtreme;
- else if (this.zoomedMax === this.otherHandlePos)
- var $ = this.fixedExtreme;
- this.zoomedMax === this.size && ($ = this.reversedExtremes ? X.dataMin : X.dataMax), this.zoomedMin === 0 && (z = this.reversedExtremes ? X.dataMax : X.dataMin), E = E.navigatorAxis.toFixedRange(this.zoomedMin, this.zoomedMax, z, $), b(E.min) && W.xAxis[0].setExtremes(Math.min(E.min, E.max), Math.max(E.min, E.max), !0, this.hasDragged ? !1 : null, { trigger: "navigator", triggerOp: "navigator-drag", DOMEvent: g });
- }
- I.DOMType !== "mousemove" && I.DOMType !== "touchmove" && (this.grabbedLeft = this.grabbedRight = this.grabbedCenter = this.fixedWidth = this.fixedExtreme = this.otherHandlePos = this.hasDragged = this.dragOffset = null), this.navigatorEnabled && i(this.zoomedMin) && i(this.zoomedMax) && (W = Math.round(this.zoomedMin), I = Math.round(this.zoomedMax), this.shades && this.drawMasks(W, I, m, L), this.outline && this.drawOutline(W, I, m, L), this.navigatorOptions.handles.enabled && Object.keys(this.handles).length === this.handles.length && (this.drawHandle(W, 0, m, L), this.drawHandle(I, 1, m, L)));
- }, D.prototype.removeEvents = function() {
- this.eventsToUnbind && (this.eventsToUnbind.forEach(function(I) {
- I();
- }), this.eventsToUnbind = void 0), this.removeBaseSeriesEvents();
- }, D.prototype.removeBaseSeriesEvents = function() {
- var I = this.baseSeries || [];
- this.navigatorEnabled && I[0] && (this.navigatorOptions.adaptToUpdatedData !== !1 && I.forEach(function(W) {
- t(W, "updatedData", this.updatedDataHandler);
- }, this), I[0].xAxis && t(I[0].xAxis, "foundExtremes", this.modifyBaseAxisExtremes));
- }, D.prototype.init = function(I) {
- var W = I.options, E = W.navigator, X = E.enabled, g = W.scrollbar, m = g.enabled;
- W = X ? E.height : 0;
- var L = m ? g.height : 0;
- this.handles = [], this.shades = [], this.chart = I, this.setBaseSeries(), this.height = W, this.scrollbarHeight = L, this.scrollbarEnabled = m, this.navigatorEnabled = X, this.navigatorOptions = E, this.scrollbarOptions = g, this.outlineHeight = W + L, this.opposite = a(E.opposite, !(X || !I.inverted));
- var z = this;
- X = z.baseSeries, g = I.xAxis.length, m = I.yAxis.length;
- var $ = X && X[0] && X[0].xAxis || I.xAxis[0] || { options: {} };
- I.isDirtyBox = !0, z.navigatorEnabled ? (z.xAxis = new y(I, p(
- { breaks: $.options.breaks, ordinal: $.options.ordinal },
- E.xAxis,
- { id: "navigator-x-axis", yAxis: "navigator-y-axis", isX: !0, type: "datetime", index: g, isInternal: !0, offset: 0, keepOrdinalPadding: !0, startOnTick: !1, endOnTick: !1, minPadding: 0, maxPadding: 0, zoomEnabled: !1 },
- I.inverted ? { offsets: [L, 0, -L, 0], width: W } : { offsets: [0, -L, 0, L], height: W }
- )), z.yAxis = new y(I, p(E.yAxis, { id: "navigator-y-axis", alignTicks: !1, offset: 0, index: m, isInternal: !0, reversed: a(E.yAxis && E.yAxis.reversed, I.yAxis[0] && I.yAxis[0].reversed, !1), zoomEnabled: !1 }, I.inverted ? { width: W } : { height: W })), X || E.series.data ? z.updateNavigatorSeries(!1) : I.series.length === 0 && (z.unbindRedraw = O(I, "beforeRedraw", function() {
- 0 < I.series.length && !z.series && (z.setBaseSeries(), z.unbindRedraw());
- })), z.reversedExtremes = I.inverted && !z.xAxis.reversed || !I.inverted && z.xAxis.reversed, z.renderElements(), z.addMouseEvents()) : (z.xAxis = {
- chart: I,
- navigatorAxis: { fake: !0 },
- translate: function(Q, A) {
- var H = I.xAxis[0], Y = H.getExtremes(), Z = H.len - 2 * L, q = n("min", H.options.min, Y.dataMin);
- return H = n("max", H.options.max, Y.dataMax) - q, A ? Q * H / Z + q : Z * (Q - q) / H;
- },
- toPixels: function(Q) {
- return this.translate(Q);
- },
- toValue: function(Q) {
- return this.translate(Q, !0);
- }
- }, z.xAxis.navigatorAxis.axis = z.xAxis, z.xAxis.navigatorAxis.toFixedRange = G.AdditionsClass.prototype.toFixedRange.bind(z.xAxis.navigatorAxis)), I.options.scrollbar.enabled && (I.scrollbar = z.scrollbar = new B(I.renderer, p(I.options.scrollbar, { margin: z.navigatorEnabled ? 0 : 10, vertical: I.inverted }), I), O(z.scrollbar, "changed", function(Q) {
- var A = z.size, H = A * this.to;
- A *= this.from, z.hasDragged = z.scrollbar.hasDragged, z.render(0, 0, A, H), this.shouldUpdateExtremes(Q.DOMType) && setTimeout(function() {
- z.onMouseUp(Q);
- });
- })), z.addBaseSeriesEvents(), z.addChartEvents();
- }, D.prototype.getUnionExtremes = function(I) {
- var W = this.chart.xAxis[0], E = this.xAxis, X = E.options, g = W.options, m;
- return I && W.dataMin === null || (m = { dataMin: a(X && X.min, n("min", g.min, W.dataMin, E.dataMin, E.min)), dataMax: a(X && X.max, n("max", g.max, W.dataMax, E.dataMax, E.max)) }), m;
- }, D.prototype.setBaseSeries = function(I, W) {
- var E = this.chart, X = this.baseSeries = [];
- I = I || E.options && E.options.navigator.baseSeries || (E.series.length ? c(
- E.series,
- function(g) {
- return !g.options.isInternal;
- }
- ).index : 0), (E.series || []).forEach(function(g, m) {
- g.options.isInternal || !g.options.showInNavigator && (m !== I && g.options.id !== I || g.options.showInNavigator === !1) || X.push(g);
- }), this.xAxis && !this.xAxis.navigatorAxis.fake && this.updateNavigatorSeries(!0, W);
- }, D.prototype.updateNavigatorSeries = function(I, W) {
- var E = this, X = E.chart, g = E.baseSeries, m, L, z = E.navigatorOptions.series, $, Q = {
- enableMouseTracking: !1,
- index: null,
- linkedTo: null,
- group: "nav",
- padXAxis: !1,
- xAxis: "navigator-x-axis",
- yAxis: "navigator-y-axis",
- showInLegend: !1,
- stacking: void 0,
- isInternal: !0,
- states: { inactive: { opacity: 1 } }
- }, A = E.series = (E.series || []).filter(function(H) {
- var Y = H.baseSeries;
- return 0 > g.indexOf(Y) ? (Y && (t(Y, "updatedData", E.updatedDataHandler), delete Y.navigatorSeries), H.chart && H.destroy(), !1) : !0;
- });
- g && g.length && g.forEach(function(H) {
- var Y = H.navigatorSeries, Z = h({ color: H.color, visible: H.visible }, u(z) ? T.navigator.series : z);
- Y && E.navigatorOptions.adaptToUpdatedData === !1 || (Q.name = "Navigator " + g.length, m = H.options || {}, $ = m.navigatorOptions || {}, Z.dataLabels = s(Z.dataLabels), L = p(m, Q, Z, $), L.pointRange = a(Z.pointRange, $.pointRange, T.plotOptions[L.type || "line"].pointRange), Z = $.data || Z.data, E.hasNavigatorData = E.hasNavigatorData || !!Z, L.data = Z || m.data && m.data.slice(0), Y && Y.options ? Y.update(L, W) : (H.navigatorSeries = X.initSeries(L), H.navigatorSeries.baseSeries = H, A.push(H.navigatorSeries)));
- }), (z.data && (!g || !g.length) || u(z)) && (E.hasNavigatorData = !1, z = s(z), z.forEach(function(H, Y) {
- Q.name = "Navigator " + (A.length + 1), L = p(
- T.navigator.series,
- { color: X.series[Y] && !X.series[Y].options.isInternal && X.series[Y].color || X.options.colors[Y] || X.options.colors[0] },
- Q,
- H
- ), L.data = H.data, L.data && (E.hasNavigatorData = !0, A.push(X.initSeries(L)));
- })), I && this.addBaseSeriesEvents();
- }, D.prototype.addBaseSeriesEvents = function() {
- var I = this, W = I.baseSeries || [];
- W[0] && W[0].xAxis && W[0].eventsToUnbind.push(O(W[0].xAxis, "foundExtremes", this.modifyBaseAxisExtremes)), W.forEach(function(E) {
- E.eventsToUnbind.push(O(E, "show", function() {
- this.navigatorSeries && this.navigatorSeries.setVisible(
- !0,
- !1
- );
- })), E.eventsToUnbind.push(O(E, "hide", function() {
- this.navigatorSeries && this.navigatorSeries.setVisible(!1, !1);
- })), this.navigatorOptions.adaptToUpdatedData !== !1 && E.xAxis && E.eventsToUnbind.push(O(E, "updatedData", this.updatedDataHandler)), E.eventsToUnbind.push(O(E, "remove", function() {
- this.navigatorSeries && (v(I.series, this.navigatorSeries), b(this.navigatorSeries.options) && this.navigatorSeries.remove(!1), delete this.navigatorSeries);
- }));
- }, this);
- }, D.prototype.getBaseSeriesMin = function(I) {
- return this.baseSeries.reduce(function(W, E) {
- return Math.min(W, E.xData ? E.xData[0] : W);
- }, I);
- }, D.prototype.modifyNavigatorAxisExtremes = function() {
- var I = this.xAxis, W;
- typeof I.getExtremes < "u" && (!(W = this.getUnionExtremes(!0)) || W.dataMin === I.min && W.dataMax === I.max || (I.min = W.dataMin, I.max = W.dataMax));
- }, D.prototype.modifyBaseAxisExtremes = function() {
- var I = this.chart.navigator, W = this.getExtremes(), E = W.dataMin, X = W.dataMax;
- W = W.max - W.min;
- var g = I.stickToMin, m = I.stickToMax, L = a(this.options.overscroll, 0), z = I.series && I.series[0], $ = !!this.setExtremes;
- if (!this.eventArgs || this.eventArgs.trigger !== "rangeSelectorButton") {
- if (g)
- var Q = E, A = Q + W;
- m && (A = X + L, g || (Q = Math.max(E, A - W, I.getBaseSeriesMin(z && z.xData ? z.xData[0] : -Number.MAX_VALUE)))), $ && (g || m) && i(Q) && (this.min = this.userMin = Q, this.max = this.userMax = A);
- }
- I.stickToMin = I.stickToMax = null;
- }, D.prototype.updatedDataHandler = function() {
- var I = this.chart.navigator, W = this.navigatorSeries;
- I.stickToMax = I.reversedExtremes ? Math.round(I.zoomedMin) === 0 : Math.round(I.zoomedMax) >= Math.round(I.size), I.stickToMin = I.shouldStickToMin(
- this,
- I
- ), W && !I.hasNavigatorData && (W.options.pointStart = this.xData[0], W.setData(this.options.data, !1, null, !1));
- }, D.prototype.shouldStickToMin = function(I, W) {
- W = W.getBaseSeriesMin(I.xData[0]);
- var E = I.xAxis;
- I = E.max;
- var X = E.min;
- return E = E.options.range, i(I) && i(X) ? E && 0 < I - W ? I - W < E : X <= W : !1;
- }, D.prototype.addChartEvents = function() {
- this.eventsToUnbind || (this.eventsToUnbind = []), this.eventsToUnbind.push(O(this.chart, "redraw", function() {
- var I = this.navigator, W = I && (I.baseSeries && I.baseSeries[0] && I.baseSeries[0].xAxis || this.xAxis[0]);
- W && I.render(W.min, W.max);
- }), O(this.chart, "getMargins", function() {
- var I = this.navigator, W = I.opposite ? "plotTop" : "marginBottom";
- this.inverted && (W = I.opposite ? "marginRight" : "plotLeft"), this[W] = (this[W] || 0) + (I.navigatorEnabled || !this.inverted ? I.outlineHeight : 0) + I.navigatorOptions.margin;
- }));
- }, D.prototype.destroy = function() {
- this.removeEvents(), this.xAxis && (v(this.chart.xAxis, this.xAxis), v(this.chart.axes, this.xAxis)), this.yAxis && (v(this.chart.yAxis, this.yAxis), v(this.chart.axes, this.yAxis)), (this.series || []).forEach(function(I) {
- I.destroy && I.destroy();
- }), "series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" ").forEach(function(I) {
- this[I] && this[I].destroy && this[I].destroy(), this[I] = null;
- }, this), [this.handles].forEach(function(I) {
- S(I);
- }, this);
- }, D;
- }();
- return U.Navigator || (U.Navigator = P, G.compose(y), O(N, "beforeShowResetZoom", function() {
- var D = this.options, I = D.navigator, W = D.rangeSelector;
- if ((I && I.enabled || W && W.enabled) && (!l && D.chart.zoomType === "x" || l && D.chart.pinchType === "x"))
- return !1;
- }), O(N, "beforeRender", function() {
- var D = this.options;
- (D.navigator.enabled || D.scrollbar.enabled) && (this.scroller = this.navigator = new P(this));
- }), O(N, "afterSetChartSize", function() {
- var D = this.legend, I = this.navigator;
- if (I) {
- var W = D && D.options, E = I.xAxis, X = I.yAxis, g = I.scrollbarHeight;
- this.inverted ? (I.left = I.opposite ? this.chartWidth - g - I.height : this.spacing[3] + g, I.top = this.plotTop + g) : (I.left = a(E.left, this.plotLeft + g), I.top = I.navigatorOptions.top || this.chartHeight - I.height - g - this.spacing[2] - (this.rangeSelector && this.extraBottomMargin ? this.rangeSelector.getHeight() : 0) - (W && W.verticalAlign === "bottom" && W.layout !== "proximate" && W.enabled && !W.floating ? D.legendHeight + a(W.margin, 10) : 0) - (this.titleOffset ? this.titleOffset[2] : 0)), E && X && (this.inverted ? E.options.left = X.options.left = I.left : E.options.top = X.options.top = I.top, E.setAxisSize(), X.setAxisSize());
- }
- }), O(N, "update", function(D) {
- var I = D.options.navigator || {}, W = D.options.scrollbar || {};
- this.navigator || this.scroller || !I.enabled && !W.enabled || (p(
- !0,
- this.options.navigator,
- I
- ), p(!0, this.options.scrollbar, W), delete D.options.navigator, delete D.options.scrollbar);
- }), O(N, "afterUpdate", function(D) {
- this.navigator || this.scroller || !this.options.navigator.enabled && !this.options.scrollbar.enabled || (this.scroller = this.navigator = new P(this), a(D.redraw, !0) && this.redraw(D.animation));
- }), O(N, "afterAddSeries", function() {
- this.navigator && this.navigator.setBaseSeries(null, !1);
- }), O(j, "afterUpdate", function() {
- this.chart.navigator && !this.options.isInternal && this.chart.navigator.setBaseSeries(
- null,
- !1
- );
- }), N.prototype.callbacks.push(function(D) {
- var I = D.navigator;
- I && D.xAxis[0] && (D = D.xAxis[0].getExtremes(), I.render(D.min, D.max));
- })), U.Navigator = P, U.Navigator;
- }), C(o, "Extensions/RangeSelector.js", [o["Core/Axis/Axis.js"], o["Core/Chart/Chart.js"], o["Core/Globals.js"], o["Core/DefaultOptions.js"], o["Core/Renderer/SVG/SVGElement.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V) {
- function F(s) {
- if (s.indexOf("%L") !== -1)
- return "text";
- var n = "aAdewbBmoyY".split("").some(function(D) {
- return s.indexOf("%" + D) !== -1;
- }), P = "HkIlMS".split("").some(function(D) {
- return s.indexOf("%" + D) !== -1;
- });
- return n && P ? "datetime-local" : n ? "date" : P ? "time" : "text";
- }
- var B = U.defaultOptions, j = V.addEvent, w = V.createElement, x = V.css, f = V.defined, l = V.destroyObjectProperties, T = V.discardElement, O = V.extend, R = V.find, k = V.fireEvent, b = V.isNumber, S = V.merge, v = V.objectEach, h = V.pad, c = V.pick, u = V.pInt, i = V.splat;
- O(B, { rangeSelector: { allButtonsEnabled: !1, buttons: void 0, buttonSpacing: 5, dropdown: "responsive", enabled: void 0, verticalAlign: "top", buttonTheme: {
- width: 28,
- height: 18,
- padding: 2,
- zIndex: 7
- }, floating: !1, x: 0, y: 0, height: void 0, inputBoxBorderColor: "none", inputBoxHeight: 17, inputBoxWidth: void 0, inputDateFormat: "%b %e, %Y", inputDateParser: void 0, inputEditDateFormat: "%Y-%m-%d", inputEnabled: !0, inputPosition: { align: "right", x: 0, y: 0 }, inputSpacing: 5, selected: void 0, buttonPosition: { align: "left", x: 0, y: 0 }, inputStyle: { color: "#335cad", cursor: "pointer" }, labelStyle: { color: "#666666" } } }), O(B.lang, { rangeSelectorZoom: "Zoom", rangeSelectorFrom: "", rangeSelectorTo: "→" });
- var p = function() {
- function s(n) {
- this.buttons = void 0, this.buttonOptions = s.prototype.defaultButtons, this.initialButtonGroupWidth = 0, this.options = void 0, this.chart = n, this.init(n);
- }
- return s.prototype.clickButton = function(n, P) {
- var D = this.chart, I = this.buttonOptions[n], W = D.xAxis[0], E = D.scroller && D.scroller.getUnionExtremes() || W || {}, X = E.dataMin, g = E.dataMax, m = W && Math.round(Math.min(W.max, c(g, W.max))), L = I.type;
- E = I._range;
- var z, $ = I.dataGrouping;
- if (X !== null && g !== null) {
- if (D.fixedRange = E, this.setSelected(n), $ && (this.forcedDataGrouping = !0, y.prototype.setDataGrouping.call(W || { chart: this.chart }, $, !1), this.frozenStates = I.preserveDataGrouping), L === "month" || L === "year")
- if (W) {
- L = { range: I, max: m, chart: D, dataMin: X, dataMax: g };
- var Q = W.minFromRange.call(L);
- b(L.newMax) && (m = L.newMax);
- } else
- E = I;
- else if (E)
- Q = Math.max(m - E, X), m = Math.min(Q + E, g);
- else if (L === "ytd")
- if (W)
- typeof g > "u" && (X = Number.MAX_VALUE, g = Number.MIN_VALUE, D.series.forEach(function(Z) {
- Z = Z.xData, X = Math.min(Z[0], X), g = Math.max(Z[Z.length - 1], g);
- }), P = !1), m = this.getYTDExtremes(
- g,
- X,
- D.time.useUTC
- ), Q = z = m.min, m = m.max;
- else {
- this.deferredYTDClick = n;
- return;
- }
- else
- L === "all" && W && (D.navigator && D.navigator.baseSeries[0] && (D.navigator.baseSeries[0].xAxis.options.range = void 0), Q = X, m = g);
- if (f(Q) && (Q += I._offsetMin), f(m) && (m += I._offsetMax), this.dropdown && (this.dropdown.selectedIndex = n + 1), W)
- W.setExtremes(Q, m, c(P, !0), void 0, { trigger: "rangeSelectorButton", rangeSelectorButton: I });
- else {
- var A = i(D.options.xAxis)[0], H = A.range;
- A.range = E;
- var Y = A.min;
- A.min = z, j(D, "load", function() {
- A.range = H, A.min = Y;
- });
- }
- k(
- this,
- "afterBtnClick"
- );
- }
- }, s.prototype.setSelected = function(n) {
- this.selected = this.options.selected = n;
- }, s.prototype.init = function(n) {
- var P = this, D = n.options.rangeSelector, I = D.buttons || P.defaultButtons.slice(), W = D.selected, E = function() {
- var X = P.minInput, g = P.maxInput;
- X && X.blur && k(X, "blur"), g && g.blur && k(g, "blur");
- };
- P.chart = n, P.options = D, P.buttons = [], P.buttonOptions = I, this.eventsToUnbind = [], this.eventsToUnbind.push(j(n.container, "mousedown", E)), this.eventsToUnbind.push(j(n, "resize", E)), I.forEach(P.computeButtonRange), typeof W < "u" && I[W] && this.clickButton(W, !1), this.eventsToUnbind.push(j(n, "load", function() {
- n.xAxis && n.xAxis[0] && j(n.xAxis[0], "setExtremes", function(X) {
- this.max - this.min !== n.fixedRange && X.trigger !== "rangeSelectorButton" && X.trigger !== "updatedData" && P.forcedDataGrouping && !P.frozenStates && this.setDataGrouping(!1, !1);
- });
- }));
- }, s.prototype.updateButtonStates = function() {
- var n = this, P = this.chart, D = this.dropdown, I = P.xAxis[0], W = Math.round(I.max - I.min), E = !I.hasVisibleSeries, X = P.scroller && P.scroller.getUnionExtremes() || I, g = X.dataMin, m = X.dataMax;
- P = n.getYTDExtremes(m, g, P.time.useUTC);
- var L = P.min, z = P.max, $ = n.selected, Q = b($), A = n.options.allButtonsEnabled, H = n.buttons;
- n.buttonOptions.forEach(function(Y, Z) {
- var q = Y._range, it = Y.type, et = Y.count || 1, nt = H[Z], rt = 0, ct = Y._offsetMax - Y._offsetMin;
- Y = Z === $;
- var gt = q > m - g, dt = q < I.minRange, ht = !1, at = !1;
- q = q === W, (it === "month" || it === "year") && W + 36e5 >= 864e5 * { month: 28, year: 365 }[it] * et - ct && W - 36e5 <= 864e5 * { month: 31, year: 366 }[it] * et + ct ? q = !0 : it === "ytd" ? (q = z - L + ct === W, ht = !Y) : it === "all" && (q = I.max - I.min >= m - g, at = !Y && Q && q), it = !A && (gt || dt || at || E), et = Y && q || q && !Q && !ht || Y && n.frozenStates, it ? rt = 3 : et && (Q = !0, rt = 2), nt.state !== rt && (nt.setState(rt), D && (D.options[Z + 1].disabled = it, rt === 2 && (D.selectedIndex = Z + 1)), rt === 0 && $ === Z && n.setSelected());
- });
- }, s.prototype.computeButtonRange = function(n) {
- var P = n.type, D = n.count || 1, I = { millisecond: 1, second: 1e3, minute: 6e4, hour: 36e5, day: 864e5, week: 6048e5 };
- I[P] ? n._range = I[P] * D : (P === "month" || P === "year") && (n._range = 864e5 * { month: 30, year: 365 }[P] * D), n._offsetMin = c(n.offsetMin, 0), n._offsetMax = c(n.offsetMax, 0), n._range += n._offsetMax - n._offsetMin;
- }, s.prototype.getInputValue = function(n) {
- n = n === "min" ? this.minInput : this.maxInput;
- var P = this.chart.options.rangeSelector, D = this.chart.time;
- return n ? (n.type === "text" && P.inputDateParser || this.defaultInputDateParser)(n.value, D.useUTC, D) : 0;
- }, s.prototype.setInputValue = function(n, P) {
- var D = this.options, I = this.chart.time, W = n === "min" ? this.minInput : this.maxInput;
- if (n = n === "min" ? this.minDateBox : this.maxDateBox, W) {
- var E = W.getAttribute("data-hc-time");
- E = f(E) ? Number(E) : void 0, f(P) && (f(E) && W.setAttribute("data-hc-time-previous", E), W.setAttribute("data-hc-time", P), E = P), W.value = I.dateFormat(this.inputTypeFormats[W.type] || D.inputEditDateFormat, E), n && n.attr({ text: I.dateFormat(D.inputDateFormat, E) });
- }
- }, s.prototype.setInputExtremes = function(n, P, D) {
- if (n = n === "min" ? this.minInput : this.maxInput) {
- var I = this.inputTypeFormats[n.type], W = this.chart.time;
- I && (P = W.dateFormat(I, P), n.min !== P && (n.min = P), D = W.dateFormat(I, D), n.max !== D && (n.max = D));
- }
- }, s.prototype.showInput = function(n) {
- var P = n === "min" ? this.minDateBox : this.maxDateBox;
- if ((n = n === "min" ? this.minInput : this.maxInput) && P && this.inputGroup) {
- var D = n.type === "text", I = this.inputGroup, W = I.translateX;
- I = I.translateY;
- var E = this.options.inputBoxWidth;
- x(n, { width: D ? P.width + (E ? -2 : 20) + "px" : "auto", height: D ? P.height - 2 + "px" : "auto", border: "2px solid silver" }), D && E ? x(n, { left: W + P.x + "px", top: I + "px" }) : x(n, { left: Math.min(Math.round(P.x + W - (n.offsetWidth - P.width) / 2), this.chart.chartWidth - n.offsetWidth) + "px", top: I - (n.offsetHeight - P.height) / 2 + "px" });
- }
- }, s.prototype.hideInput = function(n) {
- (n = n === "min" ? this.minInput : this.maxInput) && x(n, { top: "-9999em", border: 0, width: "1px", height: "1px" });
- }, s.prototype.defaultInputDateParser = function(n, P, D) {
- var I = n.split("/").join("-").split(" ").join("T");
- if (I.indexOf("T") === -1 && (I += "T00:00"), P)
- I += "Z";
- else {
- var W;
- (W = _.isSafari) && (W = I, W = !(6 < W.length && (W.lastIndexOf("-") === W.length - 6 || W.lastIndexOf("+") === W.length - 6))), W && (W = new Date(I).getTimezoneOffset() / 60, I += 0 >= W ? "+" + h(-W) + ":00" : "-" + h(W) + ":00");
- }
- return I = Date.parse(I), b(I) || (n = n.split("-"), I = Date.UTC(u(n[0]), u(n[1]) - 1, u(n[2]))), D && P && b(I) && (I += D.getTimezoneOffset(I)), I;
- }, s.prototype.drawInput = function(n) {
- function P() {
- var A = E.getInputValue(n), H = D.xAxis[0], Y = D.scroller && D.scroller.xAxis ? D.scroller.xAxis : H, Z = Y.dataMin;
- Y = Y.dataMax;
- var q = E.maxInput, it = E.minInput;
- A !== Number($.getAttribute("data-hc-time-previous")) && b(A) && ($.setAttribute("data-hc-time-previous", A), L && q && b(Z) ? A > Number(q.getAttribute("data-hc-time")) ? A = void 0 : A < Z && (A = Z) : it && b(Y) && (A < Number(it.getAttribute("data-hc-time")) ? A = void 0 : A > Y && (A = Y)), typeof A < "u" && H.setExtremes(L ? A : H.min, L ? H.max : A, void 0, void 0, { trigger: "rangeSelectorInput" }));
- }
- var D = this.chart, I = this.div, W = this.inputGroup, E = this, X = D.renderer.style || {}, g = D.renderer, m = D.options.rangeSelector, L = n === "min", z = B.lang[L ? "rangeSelectorFrom" : "rangeSelectorTo"] || "";
- z = g.label(z, 0).addClass("highcharts-range-label").attr({ padding: z ? 2 : 0, height: z ? m.inputBoxHeight : 0 }).add(W), g = g.label("", 0).addClass("highcharts-range-input").attr({ padding: 2, width: m.inputBoxWidth, height: m.inputBoxHeight, "text-align": "center" }).on(
- "click",
- function() {
- E.showInput(n), E[n + "Input"].focus();
- }
- ), D.styledMode || g.attr({ stroke: m.inputBoxBorderColor, "stroke-width": 1 }), g.add(W);
- var $ = w("input", { name: n, className: "highcharts-range-selector" }, void 0, I);
- $.setAttribute("type", F(m.inputDateFormat || "%b %e, %Y")), D.styledMode || (z.css(S(X, m.labelStyle)), g.css(S({ color: "#333333" }, X, m.inputStyle)), x($, O({
- position: "absolute",
- border: 0,
- boxShadow: "0 0 15px rgba(0,0,0,0.3)",
- width: "1px",
- height: "1px",
- padding: 0,
- textAlign: "center",
- fontSize: X.fontSize,
- fontFamily: X.fontFamily,
- top: "-9999em"
- }, m.inputStyle))), $.onfocus = function() {
- E.showInput(n);
- }, $.onblur = function() {
- $ === _.doc.activeElement && P(), E.hideInput(n), E.setInputValue(n), $.blur();
- };
- var Q = !1;
- return $.onchange = function() {
- Q || (P(), E.hideInput(n), $.blur());
- }, $.onkeypress = function(A) {
- A.keyCode === 13 && P();
- }, $.onkeydown = function(A) {
- Q = !0, A.keyCode !== 38 && A.keyCode !== 40 || P();
- }, $.onkeyup = function() {
- Q = !1;
- }, { dateBox: g, input: $, label: z };
- }, s.prototype.getPosition = function() {
- var n = this.chart, P = n.options.rangeSelector;
- return n = P.verticalAlign === "top" ? n.plotTop - n.axisOffset[0] : 0, { buttonTop: n + P.buttonPosition.y, inputTop: n + P.inputPosition.y - 10 };
- }, s.prototype.getYTDExtremes = function(n, P, D) {
- var I = this.chart.time, W = new I.Date(n), E = I.get("FullYear", W);
- return D = D ? I.Date.UTC(E, 0, 1) : +new I.Date(E, 0, 1), P = Math.max(P, D), W = W.getTime(), { max: Math.min(n || W, W), min: P };
- }, s.prototype.render = function(n, P) {
- var D = this.chart, I = D.renderer, W = D.container, E = D.options, X = E.rangeSelector, g = c(E.chart.style && E.chart.style.zIndex, 0) + 1;
- if (E = X.inputEnabled, X.enabled !== !1) {
- if (this.rendered || (this.group = I.g("range-selector-group").attr({ zIndex: 7 }).add(), this.div = w("div", void 0, { position: "relative", height: 0, zIndex: g }), this.buttonOptions.length && this.renderButtons(), W.parentNode && W.parentNode.insertBefore(this.div, W), E && (this.inputGroup = I.g("input-group").add(this.group), I = this.drawInput("min"), this.minDateBox = I.dateBox, this.minLabel = I.label, this.minInput = I.input, I = this.drawInput("max"), this.maxDateBox = I.dateBox, this.maxLabel = I.label, this.maxInput = I.input)), E && (this.setInputValue(
- "min",
- n
- ), this.setInputValue("max", P), n = D.scroller && D.scroller.getUnionExtremes() || D.xAxis[0] || {}, f(n.dataMin) && f(n.dataMax) && (D = D.xAxis[0].minRange || 0, this.setInputExtremes("min", n.dataMin, Math.min(n.dataMax, this.getInputValue("max")) - D), this.setInputExtremes("max", Math.max(n.dataMin, this.getInputValue("min")) + D, n.dataMax)), this.inputGroup)) {
- var m = 0;
- [this.minLabel, this.minDateBox, this.maxLabel, this.maxDateBox].forEach(function(L) {
- if (L) {
- var z = L.getBBox().width;
- z && (L.attr({ x: m }), m += z + X.inputSpacing);
- }
- });
- }
- this.alignElements(), this.rendered = !0;
- }
- }, s.prototype.renderButtons = function() {
- var n = this, P = this.buttons, D = this.options, I = B.lang, W = this.chart.renderer, E = S(D.buttonTheme), X = E && E.states, g = E.width || 28;
- delete E.width, delete E.states, this.buttonGroup = W.g("range-selector-buttons").add(this.group);
- var m = this.dropdown = w("select", void 0, { position: "absolute", width: "1px", height: "1px", padding: 0, border: 0, top: "-9999em", cursor: "pointer", opacity: 1e-4 }, this.div);
- j(m, "touchstart", function() {
- m.style.fontSize = "16px";
- }), [[_.isMS ? "mouseover" : "mouseenter"], [_.isMS ? "mouseout" : "mouseleave"], ["change", "click"]].forEach(function(L) {
- var z = L[0], $ = L[1];
- j(m, z, function() {
- var Q = P[n.currentButtonIndex()];
- Q && k(Q.element, $ || z);
- });
- }), this.zoomText = W.label(I && I.rangeSelectorZoom || "", 0).attr({ padding: D.buttonTheme.padding, height: D.buttonTheme.height, paddingLeft: 0, paddingRight: 0 }).add(this.buttonGroup), this.chart.styledMode || (this.zoomText.css(D.labelStyle), E["stroke-width"] = c(E["stroke-width"], 0)), w(
- "option",
- { textContent: this.zoomText.textStr, disabled: !0 },
- void 0,
- m
- ), this.buttonOptions.forEach(function(L, z) {
- w("option", { textContent: L.title || L.text }, void 0, m), P[z] = W.button(L.text, 0, 0, function($) {
- var Q = L.events && L.events.click, A;
- Q && (A = Q.call(L, $)), A !== !1 && n.clickButton(z), n.isActive = !0;
- }, E, X && X.hover, X && X.select, X && X.disabled).attr({ "text-align": "center", width: g }).add(n.buttonGroup), L.title && P[z].attr("title", L.title);
- });
- }, s.prototype.alignElements = function() {
- var n = this, P = this.buttonGroup, D = this.buttons, I = this.chart, W = this.group, E = this.inputGroup, X = this.options, g = this.zoomText, m = I.options, L = m.exporting && m.exporting.enabled !== !1 && m.navigation && m.navigation.buttonOptions;
- m = X.buttonPosition;
- var z = X.inputPosition, $ = X.verticalAlign, Q = function(Z, q) {
- return L && n.titleCollision(I) && $ === "top" && q.align === "right" && q.y - Z.getBBox().height - 12 < (L.y || 0) + (L.height || 0) + I.spacing[0] ? -40 : 0;
- }, A = I.plotLeft;
- if (W && m && z) {
- var H = m.x - I.spacing[3];
- if (P) {
- if (this.positionButtons(), !this.initialButtonGroupWidth) {
- var Y = 0;
- g && (Y += g.getBBox().width + 5), D.forEach(function(Z, q) {
- Y += Z.width, q !== D.length - 1 && (Y += X.buttonSpacing);
- }), this.initialButtonGroupWidth = Y;
- }
- A -= I.spacing[3], this.updateButtonStates(), g = Q(P, m), this.alignButtonGroup(g), W.placed = P.placed = I.hasLoaded;
- }
- P = 0, E && (P = Q(E, z), z.align === "left" ? H = A : z.align === "right" && (H = -Math.max(I.axisOffset[1], -P)), E.align({ y: z.y, width: E.getBBox().width, align: z.align, x: z.x + H - 2 }, !0, I.spacingBox), E.placed = I.hasLoaded), this.handleCollision(P), W.align({ verticalAlign: $ }, !0, I.spacingBox), E = W.alignAttr.translateY, P = W.getBBox().height + 20, Q = 0, $ === "bottom" && (Q = (Q = I.legend && I.legend.options) && Q.verticalAlign === "bottom" && Q.enabled && !Q.floating ? I.legend.legendHeight + c(Q.margin, 10) : 0, P = P + Q - 20, Q = E - P - (X.floating ? 0 : X.y) - (I.titleOffset ? I.titleOffset[2] : 0) - 10), $ === "top" ? (X.floating && (Q = 0), I.titleOffset && I.titleOffset[0] && (Q = I.titleOffset[0]), Q += I.margin[0] - I.spacing[0] || 0) : $ === "middle" && (z.y === m.y ? Q = E : (z.y || m.y) && (Q = 0 > z.y || 0 > m.y ? Q - Math.min(z.y, m.y) : E - P)), W.translate(X.x, X.y + Math.floor(Q)), m = this.minInput, z = this.maxInput, E = this.dropdown, X.inputEnabled && m && z && (m.style.marginTop = W.translateY + "px", z.style.marginTop = W.translateY + "px"), E && (E.style.marginTop = W.translateY + "px");
- }
- }, s.prototype.alignButtonGroup = function(n, P) {
- var D = this.chart, I = this.buttonGroup, W = this.options.buttonPosition, E = D.plotLeft - D.spacing[3], X = W.x - D.spacing[3];
- W.align === "right" ? X += n - E : W.align === "center" && (X -= E / 2), I && I.align({ y: W.y, width: c(P, this.initialButtonGroupWidth), align: W.align, x: X }, !0, D.spacingBox);
- }, s.prototype.positionButtons = function() {
- var n = this.buttons, P = this.chart, D = this.options, I = this.zoomText, W = P.hasLoaded ? "animate" : "attr", E = D.buttonPosition, X = P.plotLeft, g = X;
- I && I.visibility !== "hidden" && (I[W]({ x: c(X + E.x, X) }), g += E.x + I.getBBox().width + 5), this.buttonOptions.forEach(function(m, L) {
- n[L].visibility !== "hidden" ? (n[L][W]({ x: g }), g += n[L].width + D.buttonSpacing) : n[L][W]({ x: X });
- });
- }, s.prototype.handleCollision = function(n) {
- var P = this, D = this.chart, I = this.buttonGroup, W = this.inputGroup, E = this.options, X = E.buttonPosition, g = E.dropdown, m = E.inputPosition;
- E = function() {
- var $ = 0;
- return P.buttons.forEach(function(Q) {
- Q = Q.getBBox(), Q.width > $ && ($ = Q.width);
- }), $;
- };
- var L = function($) {
- if (W && I) {
- var Q = W.alignAttr.translateX + W.alignOptions.x - n + W.getBBox().x + 2, A = W.alignOptions.width, H = I.alignAttr.translateX + I.getBBox().x;
- return H + $ > Q && Q + A > H && X.y < m.y + W.getBBox().height;
- }
- return !1;
- }, z = function() {
- W && I && W.attr({ translateX: W.alignAttr.translateX + (D.axisOffset[1] >= -n ? 0 : -n), translateY: W.alignAttr.translateY + I.getBBox().height + 10 });
- };
- if (I) {
- if (g === "always") {
- this.collapseButtons(n), L(E()) && z();
- return;
- }
- g === "never" && this.expandButtons();
- }
- W && I ? m.align === X.align || L(this.initialButtonGroupWidth + 20) ? g === "responsive" ? (this.collapseButtons(n), L(E()) && z()) : z() : g === "responsive" && this.expandButtons() : I && g === "responsive" && (this.initialButtonGroupWidth > D.plotWidth ? this.collapseButtons(n) : this.expandButtons());
- }, s.prototype.collapseButtons = function(n) {
- var P = this.buttons, D = this.buttonOptions, I = this.chart, W = this.dropdown, E = this.options, X = this.zoomText, g = I.userOptions.rangeSelector && I.userOptions.rangeSelector.buttonTheme || {}, m = function(z) {
- return { text: z ? z + " ▾" : "▾", width: "auto", paddingLeft: c(E.buttonTheme.paddingLeft, g.padding, 8), paddingRight: c(E.buttonTheme.paddingRight, g.padding, 8) };
- };
- X && X.hide();
- var L = !1;
- D.forEach(function(z, $) {
- $ = P[$], $.state !== 2 ? $.hide() : ($.show(), $.attr(m(z.text)), L = !0);
- }), L || (W && (W.selectedIndex = 0), P[0].show(), P[0].attr(m(this.zoomText && this.zoomText.textStr))), D = E.buttonPosition.align, this.positionButtons(), D !== "right" && D !== "center" || this.alignButtonGroup(n, P[this.currentButtonIndex()].getBBox().width), this.showDropdown();
- }, s.prototype.expandButtons = function() {
- var n = this.buttons, P = this.buttonOptions, D = this.options, I = this.zoomText;
- this.hideDropdown(), I && I.show(), P.forEach(function(W, E) {
- E = n[E], E.show(), E.attr({ text: W.text, width: D.buttonTheme.width || 28, paddingLeft: c(D.buttonTheme.paddingLeft, "unset"), paddingRight: c(D.buttonTheme.paddingRight, "unset") }), 2 > E.state && E.setState(0);
- }), this.positionButtons();
- }, s.prototype.currentButtonIndex = function() {
- var n = this.dropdown;
- return n && 0 < n.selectedIndex ? n.selectedIndex - 1 : 0;
- }, s.prototype.showDropdown = function() {
- var n = this.buttonGroup, P = this.buttons, D = this.chart, I = this.dropdown;
- if (n && I) {
- var W = n.translateX;
- n = n.translateY, P = P[this.currentButtonIndex()].getBBox(), x(I, { left: D.plotLeft + W + "px", top: n + 0.5 + "px", width: P.width + "px", height: P.height + "px" }), this.hasVisibleDropdown = !0;
- }
- }, s.prototype.hideDropdown = function() {
- var n = this.dropdown;
- n && (x(n, { top: "-9999em", width: "1px", height: "1px" }), this.hasVisibleDropdown = !1);
- }, s.prototype.getHeight = function() {
- var n = this.options, P = this.group, D = n.y, I = n.buttonPosition.y, W = n.inputPosition.y;
- return n.height ? n.height : (this.alignElements(), n = P ? P.getBBox(!0).height + 13 + D : 0, P = Math.min(W, I), (0 > W && 0 > I || 0 < W && 0 < I) && (n += Math.abs(P)), n);
- }, s.prototype.titleCollision = function(n) {
- return !(n.options.title.text || n.options.subtitle.text);
- }, s.prototype.update = function(n) {
- var P = this.chart;
- S(!0, P.options.rangeSelector, n), this.destroy(), this.init(P), this.render();
- }, s.prototype.destroy = function() {
- var n = this, P = n.minInput, D = n.maxInput;
- n.eventsToUnbind && (n.eventsToUnbind.forEach(function(I) {
- return I();
- }), n.eventsToUnbind = void 0), l(n.buttons), P && (P.onfocus = P.onblur = P.onchange = null), D && (D.onfocus = D.onblur = D.onchange = null), v(n, function(I, W) {
- I && W !== "chart" && (I instanceof G ? I.destroy() : I instanceof window.HTMLElement && T(I)), I !== s.prototype[W] && (n[W] = null);
- }, this);
- }, s;
- }();
- if (p.prototype.defaultButtons = [
- { type: "month", count: 1, text: "1m", title: "View 1 month" },
- { type: "month", count: 3, text: "3m", title: "View 3 months" },
- { type: "month", count: 6, text: "6m", title: "View 6 months" },
- { type: "ytd", text: "YTD", title: "View year to date" },
- { type: "year", count: 1, text: "1y", title: "View 1 year" },
- { type: "all", text: "All", title: "View all" }
- ], p.prototype.inputTypeFormats = { "datetime-local": "%Y-%m-%dT%H:%M:%S", date: "%Y-%m-%d", time: "%H:%M:%S" }, y.prototype.minFromRange = function() {
- var s = this.range, n = s.type, P = this.max, D = this.chart.time, I = function(g, m) {
- var L = n === "year" ? "FullYear" : "Month", z = new D.Date(g), $ = D.get(L, z);
- return D.set(L, z, $ + m), $ === D.get(L, z) && D.set("Date", z, 0), z.getTime() - g;
- };
- if (b(s))
- var W = P - s, E = s;
- else
- W = P + I(P, -s.count), this.chart && (this.chart.fixedRange = P - W);
- var X = c(this.dataMin, Number.MIN_VALUE);
- return b(W) || (W = X), W <= X && (W = X, typeof E > "u" && (E = I(W, s.count)), this.newMax = Math.min(W + E, this.dataMax)), b(P) || (W = void 0), W;
- }, !_.RangeSelector) {
- var a = [], t = function(s) {
- function n() {
- D && (P = s.xAxis[0].getExtremes(), I = s.legend, E = D && D.options.verticalAlign, b(P.min) && D.render(P.min, P.max), I.display && E === "top" && E === I.options.verticalAlign && (W = S(s.spacingBox), W.y = I.options.layout === "vertical" ? s.plotTop : W.y + D.getHeight(), I.group.placed = !1, I.align(W)));
- }
- var P, D = s.rangeSelector, I, W, E;
- D && (R(a, function(X) {
- return X[0] === s;
- }) || a.push([s, [j(s.xAxis[0], "afterSetExtremes", function(X) {
- D && D.render(X.min, X.max);
- }), j(s, "redraw", n)]]), n());
- };
- j(N, "afterGetContainer", function() {
- this.options.rangeSelector && this.options.rangeSelector.enabled && (this.rangeSelector = new p(this));
- }), j(N, "beforeRender", function() {
- var s = this.axes, n = this.rangeSelector;
- n && (b(n.deferredYTDClick) && (n.clickButton(n.deferredYTDClick), delete n.deferredYTDClick), s.forEach(function(P) {
- P.updateNames(), P.setScale();
- }), this.getAxisMargins(), n.render(), s = n.options.verticalAlign, n.options.floating || (s === "bottom" ? this.extraBottomMargin = !0 : s !== "middle" && (this.extraTopMargin = !0)));
- }), j(N, "update", function(s) {
- var n = s.options.rangeSelector;
- s = this.rangeSelector;
- var P = this.extraBottomMargin, D = this.extraTopMargin;
- n && n.enabled && !f(s) && this.options.rangeSelector && (this.options.rangeSelector.enabled = !0, this.rangeSelector = s = new p(this)), this.extraTopMargin = this.extraBottomMargin = !1, s && (t(this), n = n && n.verticalAlign || s.options && s.options.verticalAlign, s.options.floating || (n === "bottom" ? this.extraBottomMargin = !0 : n !== "middle" && (this.extraTopMargin = !0)), this.extraBottomMargin !== P || this.extraTopMargin !== D) && (this.isDirtyBox = !0);
- }), j(N, "render", function() {
- var s = this.rangeSelector;
- s && !s.options.floating && (s.render(), s = s.options.verticalAlign, s === "bottom" ? this.extraBottomMargin = !0 : s !== "middle" && (this.extraTopMargin = !0));
- }), j(N, "getMargins", function() {
- var s = this.rangeSelector;
- s && (s = s.getHeight(), this.extraTopMargin && (this.plotTop += s), this.extraBottomMargin && (this.marginBottom += s));
- }), N.prototype.callbacks.push(t), j(N, "destroy", function() {
- for (var s = 0; s < a.length; s++) {
- var n = a[s];
- if (n[0] === this) {
- n[1].forEach(function(P) {
- return P();
- }), a.splice(s, 1);
- break;
- }
- }
- }), _.RangeSelector = p;
- }
- return p;
- }), C(
- o,
- "Core/Chart/StockChart.js",
- [o["Core/Animation/AnimationUtilities.js"], o["Core/Axis/Axis.js"], o["Core/Chart/Chart.js"], o["Core/FormatUtilities.js"], o["Core/DefaultOptions.js"], o["Core/Series/Series.js"], o["Core/Renderer/SVG/SVGRenderer.js"], o["Core/Utilities.js"]],
- function(y, N, _, U, G, V, F, B) {
- function j(u, i) {
- return u === "xAxis" ? { minPadding: 0, maxPadding: 0, overscroll: 0, ordinal: !0, title: { text: null }, labels: { overflow: "justify" }, showLastLabel: !0 } : u === "yAxis" ? { labels: { y: -2 }, opposite: h(i.opposite, !0), showLastLabel: !(!i.categories && i.type !== "category"), title: { text: null } } : {};
- }
- function w(u, i) {
- if (u === "xAxis") {
- u = l();
- var p = { type: "datetime", categories: void 0 };
- return h(i.navigator && i.navigator.enabled, u.navigator.enabled, !0) && (p.startOnTick = !1, p.endOnTick = !1), p;
- }
- return {};
- }
- var x = this && this.__extends || function() {
- var u = function(i, p) {
- return u = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(a, t) {
- a.__proto__ = t;
- } || function(a, t) {
- for (var s in t)
- t.hasOwnProperty(s) && (a[s] = t[s]);
- }, u(i, p);
- };
- return function(i, p) {
- function a() {
- this.constructor = i;
- }
- u(i, p), i.prototype = p === null ? Object.create(p) : (a.prototype = p.prototype, new a());
- };
- }(), f = U.format, l = G.getOptions;
- y = B.addEvent;
- var T = B.clamp, O = B.defined, R = B.extend, k = B.find, b = B.isNumber, S = B.isString, v = B.merge, h = B.pick, c = B.splat;
- return B = function(u) {
- function i() {
- return u !== null && u.apply(this, arguments) || this;
- }
- return x(i, u), i.prototype.init = function(p, a) {
- var t = l(), s = p.xAxis, n = p.yAxis, P = h(p.navigator && p.navigator.enabled, t.navigator.enabled, !0);
- p.xAxis = p.yAxis = void 0, P = v({ chart: { panning: { enabled: !0, type: "x" }, pinchType: "x" }, navigator: { enabled: P }, scrollbar: { enabled: h(t.scrollbar && t.scrollbar.enabled, !0) }, rangeSelector: { enabled: h(t.rangeSelector.enabled, !0) }, title: { text: null }, tooltip: { split: h(t.tooltip.split, !0), crosshairs: !0 }, legend: { enabled: !1 } }, p, { isStock: !0 }), p.xAxis = s, p.yAxis = n, P.xAxis = c(p.xAxis || {}).map(function(D, I) {
- return v(j("xAxis", D), t.xAxis, t.xAxis && t.xAxis[I], D, w("xAxis", p));
- }), P.yAxis = c(p.yAxis || {}).map(function(D, I) {
- return v(j("yAxis", D), t.yAxis, t.yAxis && t.yAxis[I], D);
- }), u.prototype.init.call(this, P, a);
- }, i.prototype.createAxis = function(p, a) {
- return a.axis = v(j(p, a.axis), a.axis, w(p, this.userOptions)), u.prototype.createAxis.call(this, p, a);
- }, i;
- }(_), function(u) {
- u.stockChart = function(i, p, a) {
- return new u(i, p, a);
- };
- }(B || (B = {})), y(V, "setOptions", function(u) {
- var i;
- this.chart.options.isStock && (this.is("column") || this.is("columnrange") ? i = { borderWidth: 0, shadow: !1 } : this.is("scatter") || this.is("sma") || (i = { marker: { enabled: !1, radius: 2 } }), i && (u.plotOptions[this.type] = v(u.plotOptions[this.type], i)));
- }), y(N, "autoLabelAlign", function(u) {
- var i = this.chart, p = this.options;
- i = i._labelPanes = i._labelPanes || {};
- var a = this.options.labels;
- this.chart.options.isStock && this.coll === "yAxis" && (p = p.top + "," + p.height, !i[p] && a.enabled && (a.x === 15 && (a.x = 0), typeof a.align > "u" && (a.align = "right"), i[p] = this, u.align = "right", u.preventDefault()));
- }), y(N, "destroy", function() {
- var u = this.chart, i = this.options && this.options.top + "," + this.options.height;
- i && u._labelPanes && u._labelPanes[i] === this && delete u._labelPanes[i];
- }), y(N, "getPlotLinePath", function(u) {
- function i(H) {
- var Y = H === "xAxis" ? "yAxis" : "xAxis";
- return H = p.options[Y], b(H) ? [t[Y][H]] : S(H) ? [t.get(H)] : a.map(function(Z) {
- return Z[Y];
- });
- }
- var p = this, a = this.isLinked && !this.series ? this.linkedParent.series : this.series, t = p.chart, s = t.renderer, n = p.left, P = p.top, D, I, W, E, X = [], g = [], m = u.translatedValue, L = u.value, z = u.force;
- if (t.options.isStock && u.acrossPanes !== !1 && p.coll === "xAxis" || p.coll === "yAxis") {
- u.preventDefault(), g = i(p.coll);
- var $ = p.isXAxis ? t.yAxis : t.xAxis;
- $.forEach(function(H) {
- if (!O(H.options.id) || H.options.id.indexOf("navigator") === -1) {
- var Y = H.isXAxis ? "yAxis" : "xAxis";
- Y = O(H.options[Y]) ? t[Y][H.options[Y]] : t[Y][0], p === Y && g.push(H);
- }
- });
- var Q = g.length ? [] : [p.isXAxis ? t.yAxis[0] : t.xAxis[0]];
- g.forEach(function(H) {
- Q.indexOf(H) !== -1 || k(Q, function(Y) {
- return Y.pos === H.pos && Y.len === H.len;
- }) || Q.push(H);
- });
- var A = h(m, p.translate(L, null, null, u.old));
- b(A) && (p.horiz ? Q.forEach(function(H) {
- var Y;
- I = H.pos, E = I + H.len, D = W = Math.round(A + p.transB), z !== "pass" && (D < n || D > n + p.width) && (z ? D = W = T(D, n, n + p.width) : Y = !0), Y || X.push(["M", D, I], ["L", W, E]);
- }) : Q.forEach(function(H) {
- var Y;
- D = H.pos, W = D + H.len, I = E = Math.round(P + p.height - A), z !== "pass" && (I < P || I > P + p.height) && (z ? I = E = T(I, P, P + p.height) : Y = !0), Y || X.push(["M", D, I], ["L", W, E]);
- })), u.path = 0 < X.length ? s.crispPolyLine(X, u.lineWidth || 1) : null;
- }
- }), F.prototype.crispPolyLine = function(u, i) {
- for (var p = 0; p < u.length; p += 2) {
- var a = u[p], t = u[p + 1];
- a[1] === t[1] && (a[1] = t[1] = Math.round(a[1]) - i % 2 / 2), a[2] === t[2] && (a[2] = t[2] = Math.round(a[2]) + i % 2 / 2);
- }
- return u;
- }, y(N, "afterHideCrosshair", function() {
- this.crossLabel && (this.crossLabel = this.crossLabel.hide());
- }), y(N, "afterDrawCrosshair", function(u) {
- var i, p;
- if (this.crosshair && this.crosshair.label && this.crosshair.label.enabled && this.cross && b(this.min) && b(this.max)) {
- var a = this.chart, t = this.logarithmic, s = this.crosshair.label, n = this.horiz, P = this.opposite, D = this.left, I = this.top, W = this.crossLabel, E = s.format, X = "", g = this.options.tickPosition === "inside", m = this.crosshair.snap !== !1, L = 0, z = u.e || this.cross && this.cross.e;
- u = u.point;
- var $ = this.min, Q = this.max;
- t && ($ = t.lin2log($), Q = t.lin2log(Q)), t = n ? "center" : P ? this.labelAlign === "right" ? "right" : "left" : this.labelAlign === "left" ? "left" : "center", W || (W = this.crossLabel = a.renderer.label("", 0, void 0, s.shape || "callout").addClass("highcharts-crosshair-label highcharts-color-" + (u ? u.series.colorIndex : this.series[0] && this.series[0].colorIndex)).attr({ align: s.align || t, padding: h(s.padding, 8), r: h(s.borderRadius, 3), zIndex: 2 }).add(this.labelGroup), a.styledMode || W.attr({ fill: s.backgroundColor || u && u.series && u.series.color || "#666666", stroke: s.borderColor || "", "stroke-width": s.borderWidth || 0 }).css(R({ color: "#ffffff", fontWeight: "normal", fontSize: "11px", textAlign: "center" }, s.style || {}))), n ? (t = m ? (u.plotX || 0) + D : z.chartX, I += P ? 0 : this.height) : (t = P ? this.width + D : 0, I = m ? (u.plotY || 0) + I : z.chartY), E || s.formatter || (this.dateTime && (X = "%b %d, %Y"), E = "{value" + (X ? ":" + X : "") + "}"), X = m ? this.isXAxis ? u.x : u.y : this.toValue(n ? z.chartX : z.chartY), m = u ? u.series.isPointInside(u) : b(X) && X > $ && X < Q, z = "", E ? z = f(E, { value: X }, a) : s.formatter && b(X) && (z = s.formatter.call(this, X)), W.attr({ text: z, x: t, y: I, visibility: m ? "visible" : "hidden" }), s = W.getBBox(), b(W.y) && (n ? (g && !P || !g && P) && (I = W.y - s.height) : I = W.y - s.height / 2), n ? (i = D - s.x, p = D + this.width - s.x) : (i = this.labelAlign === "left" ? D : 0, p = this.labelAlign === "right" ? D + this.width : a.chartWidth), W.translateX < i && (L = i - W.translateX), W.translateX + s.width >= p && (L = -(W.translateX + s.width - p)), W.attr({ x: t + L, y: I, anchorX: n ? t : this.opposite ? 0 : a.chartWidth, anchorY: n ? this.opposite ? a.chartHeight : 0 : I + s.height / 2 });
- }
- }), V.prototype.forceCropping = function() {
- var u = this.chart, i = this.options.dataGrouping;
- return this.allowDG !== !1 && i && h(i.enabled, u.options.isStock);
- }, y(_, "update", function(u) {
- u = u.options, "scrollbar" in u && this.navigator && (v(!0, this.options.scrollbar, u.scrollbar), this.navigator.update({}, !1), delete u.scrollbar);
- }), B;
- }
- ), C(o, "masters/modules/stock.src.js", [
- o["Core/Globals.js"],
- o["Core/Axis/OrdinalAxis.js"],
- o["Series/DataModifyComposition.js"],
- o["Core/Scrollbar.js"],
- o["Core/Chart/StockChart.js"]
- ], function(y, N, _, U, G) {
- y.Scrollbar = U, y.StockChart = y.stockChart = G.stockChart, U.compose(y.Axis), N.compose(y.Axis, y.Series, y.Chart), _.compose(y.Series, y.Axis, y.Point);
- }), C(o, "masters/highstock.src.js", [o["masters/highcharts.src.js"]], function(y) {
- return y.product = "Highstock", y;
- }), o["masters/highstock.src.js"]._modules = o, o["masters/highstock.src.js"];
- });
- })(eu);
- var U0 = eu.exports;
- const Vr = /* @__PURE__ */ Mn(U0);
- var iu = { exports: {} };
- (function(r) {
- (function(d, C) {
- r.exports ? (C.default = C, r.exports = d.document ? C(d) : C) : (d.Highcharts && d.Highcharts.error(16, !0), d.Highcharts = C(d));
- })(typeof window < "u" ? window : Gr, function(d) {
- function C(y, N, _, U) {
- y.hasOwnProperty(N) || (y[N] = U.apply(null, _));
- }
- var o = {};
- return C(o, "Core/Globals.js", [], function() {
- var y = typeof d < "u" ? d : typeof window < "u" ? window : {}, N;
- return function(_) {
- _.SVG_NS = "http://www.w3.org/2000/svg", _.product = "Highcharts", _.version = "9.3.3", _.win = y, _.doc = _.win.document, _.svg = _.doc && _.doc.createElementNS && !!_.doc.createElementNS(_.SVG_NS, "svg").createSVGRect, _.userAgent = _.win.navigator && _.win.navigator.userAgent || "", _.isChrome = _.userAgent.indexOf("Chrome") !== -1, _.isFirefox = _.userAgent.indexOf("Firefox") !== -1, _.isMS = /(edge|msie|trident)/i.test(_.userAgent) && !_.win.opera, _.isSafari = !_.isChrome && _.userAgent.indexOf("Safari") !== -1, _.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(_.userAgent), _.isWebKit = _.userAgent.indexOf("AppleWebKit") !== -1, _.deg2rad = 2 * Math.PI / 360, _.hasBidiBug = _.isFirefox && 4 > parseInt(_.userAgent.split("Firefox/")[1], 10), _.hasTouch = !!_.win.TouchEvent, _.marginNames = ["plotTop", "marginRight", "marginBottom", "plotLeft"], _.noop = function() {
- }, _.supportsPassiveEvents = function() {
- var U = !1;
- if (!_.isMS) {
- var G = Object.defineProperty({}, "passive", { get: function() {
- U = !0;
- } });
- _.win.addEventListener && _.win.removeEventListener && (_.win.addEventListener(
- "testPassive",
- _.noop,
- G
- ), _.win.removeEventListener("testPassive", _.noop, G));
- }
- return U;
- }(), _.charts = [], _.dateFormats = {}, _.seriesTypes = {}, _.symbolSizes = {}, _.chartCount = 0;
- }(N || (N = {})), N;
- }), C(o, "Core/Utilities.js", [o["Core/Globals.js"]], function(y) {
- function N(t, s, n, P) {
- var D = s ? "Highcharts error" : "Highcharts warning";
- t === 32 && (t = D + ": Deprecated member");
- var I = w(t), W = I ? D + " #" + t + ": www.highcharts.com/errors/" + t + "/" : t.toString();
- if (typeof P < "u") {
- var E = "";
- I && (W += "?"), b(P, function(X, g) {
- E += `
- - ` + g + ": " + X, I && (W += encodeURI(g) + "=" + encodeURI(X));
- }), W += E;
- }
- v(y, "displayError", { chart: n, code: t, message: W, params: P }, function() {
- if (s)
- throw Error(W);
- u.console && N.messages.indexOf(W) === -1 && console.warn(W);
- }), N.messages.push(W);
- }
- function _(t, s) {
- var n = {};
- return b(t, function(P, D) {
- F(t[D], !0) && !t.nodeType && s[D] ? (P = _(t[D], s[D]), Object.keys(P).length && (n[D] = P)) : (F(t[D]) || t[D] !== s[D]) && (n[D] = t[D]);
- }), n;
- }
- function U(t, s) {
- return parseInt(t, s || 10);
- }
- function G(t) {
- return typeof t == "string";
- }
- function V(t) {
- return t = Object.prototype.toString.call(t), t === "[object Array]" || t === "[object Array Iterator]";
- }
- function F(t, s) {
- return !!t && typeof t == "object" && (!s || !V(t));
- }
- function B(t) {
- return F(t) && typeof t.nodeType == "number";
- }
- function j(t) {
- var s = t && t.constructor;
- return !(!F(t, !0) || B(t) || !s || !s.name || s.name === "Object");
- }
- function w(t) {
- return typeof t == "number" && !isNaN(t) && 1 / 0 > t && -1 / 0 < t;
- }
- function x(t) {
- return typeof t < "u" && t !== null;
- }
- function f(t, s, n) {
- var P;
- return G(s) ? x(n) ? t.setAttribute(s, n) : t && t.getAttribute && ((P = t.getAttribute(s)) || s !== "class" || (P = t.getAttribute(s + "Name"))) : b(s, function(D, I) {
- x(D) ? t.setAttribute(I, D) : t.removeAttribute(I);
- }), P;
- }
- function l(t, s) {
- var n;
- t || (t = {});
- for (n in s)
- t[n] = s[n];
- return t;
- }
- function T() {
- for (var t = arguments, s = t.length, n = 0; n < s; n++) {
- var P = t[n];
- if (typeof P < "u" && P !== null)
- return P;
- }
- }
- function O(t, s) {
- y.isMS && !y.svg && s && typeof s.opacity < "u" && (s.filter = "alpha(opacity=" + 100 * s.opacity + ")"), l(t.style, s);
- }
- function R(t, s) {
- return 1e14 < t ? t : parseFloat(t.toPrecision(s || 14));
- }
- function k(t, s, n) {
- var P = y.getStyle || k;
- if (s === "width")
- return s = Math.min(t.offsetWidth, t.scrollWidth), n = t.getBoundingClientRect && t.getBoundingClientRect().width, n < s && n >= s - 1 && (s = Math.floor(n)), Math.max(0, s - (P(t, "padding-left", !0) || 0) - (P(t, "padding-right", !0) || 0));
- if (s === "height")
- return Math.max(0, Math.min(t.offsetHeight, t.scrollHeight) - (P(t, "padding-top", !0) || 0) - (P(t, "padding-bottom", !0) || 0));
- if (u.getComputedStyle || N(27, !0), t = u.getComputedStyle(t, void 0)) {
- var D = t.getPropertyValue(s);
- T(n, s !== "opacity") && (D = U(D));
- }
- return D;
- }
- function b(t, s, n) {
- for (var P in t)
- Object.hasOwnProperty.call(t, P) && s.call(n || t[P], t[P], P, t);
- }
- function S(t, s, n) {
- function P(E, X) {
- var g = t.removeEventListener || y.removeEventListenerPolyfill;
- g && g.call(t, E, X, !1);
- }
- function D(E) {
- var X;
- if (t.nodeName) {
- if (s) {
- var g = {};
- g[s] = !0;
- } else
- g = E;
- b(g, function(m, L) {
- if (E[L])
- for (X = E[L].length; X--; )
- P(L, E[L][X].fn);
- });
- }
- }
- var I = typeof t == "function" && t.prototype || t;
- if (Object.hasOwnProperty.call(I, "hcEvents")) {
- var W = I.hcEvents;
- s ? (I = W[s] || [], n ? (W[s] = I.filter(function(E) {
- return n !== E.fn;
- }), P(s, n)) : (D(W), W[s] = [])) : (D(W), delete I.hcEvents);
- }
- }
- function v(t, s, n, P) {
- if (n = n || {}, c.createEvent && (t.dispatchEvent || t.fireEvent && t !== y)) {
- var D = c.createEvent("Events");
- D.initEvent(s, !0, !0), n = l(D, n), t.dispatchEvent ? t.dispatchEvent(n) : t.fireEvent(s, n);
- } else if (t.hcEvents) {
- n.target || l(n, { preventDefault: function() {
- n.defaultPrevented = !0;
- }, target: t, type: s }), D = [];
- for (var I = t, W = !1; I.hcEvents; )
- Object.hasOwnProperty.call(I, "hcEvents") && I.hcEvents[s] && (D.length && (W = !0), D.unshift.apply(D, I.hcEvents[s])), I = Object.getPrototypeOf(I);
- W && D.sort(function(E, X) {
- return E.order - X.order;
- }), D.forEach(function(E) {
- E.fn.call(t, n) === !1 && n.preventDefault();
- });
- }
- P && !n.defaultPrevented && P.call(t, n);
- }
- var h = y.charts, c = y.doc, u = y.win;
- (N || (N = {})).messages = [], Math.easeInOutSine = function(t) {
- return -0.5 * (Math.cos(Math.PI * t) - 1);
- };
- var i = Array.prototype.find ? function(t, s) {
- return t.find(s);
- } : function(t, s) {
- var n, P = t.length;
- for (n = 0; n < P; n++)
- if (s(t[n], n))
- return t[n];
- };
- b({ map: "map", each: "forEach", grep: "filter", reduce: "reduce", some: "some" }, function(t, s) {
- y[s] = function(n) {
- var P;
- return N(32, !1, void 0, (P = {}, P["Highcharts." + s] = "use Array." + t, P)), Array.prototype[t].apply(n, [].slice.call(arguments, 1));
- };
- });
- var p, a = function() {
- var t = Math.random().toString(36).substring(2, 9) + "-", s = 0;
- return function() {
- return "highcharts-" + (p ? "" : t) + s++;
- };
- }();
- return u.jQuery && (u.jQuery.fn.highcharts = function() {
- var t = [].slice.call(arguments);
- if (this[0])
- return t[0] ? (new y[G(t[0]) ? t.shift() : "Chart"](this[0], t[0], t[1]), this) : h[f(this[0], "data-highcharts-chart")];
- }), i = { addEvent: function(t, s, n, P) {
- P === void 0 && (P = {});
- var D = typeof t == "function" && t.prototype || t;
- Object.hasOwnProperty.call(D, "hcEvents") || (D.hcEvents = {}), D = D.hcEvents, y.Point && t instanceof y.Point && t.series && t.series.chart && (t.series.chart.runTrackerClick = !0);
- var I = t.addEventListener || y.addEventListenerPolyfill;
- return I && I.call(t, s, n, y.supportsPassiveEvents ? { passive: P.passive === void 0 ? s.indexOf("touch") !== -1 : P.passive, capture: !1 } : !1), D[s] || (D[s] = []), D[s].push({ fn: n, order: typeof P.order == "number" ? P.order : 1 / 0 }), D[s].sort(function(W, E) {
- return W.order - E.order;
- }), function() {
- S(t, s, n);
- };
- }, arrayMax: function(t) {
- for (var s = t.length, n = t[0]; s--; )
- t[s] > n && (n = t[s]);
- return n;
- }, arrayMin: function(t) {
- for (var s = t.length, n = t[0]; s--; )
- t[s] < n && (n = t[s]);
- return n;
- }, attr: f, clamp: function(t, s, n) {
- return t > s ? t < n ? t : n : s;
- }, cleanRecursively: _, clearTimeout: function(t) {
- x(t) && clearTimeout(t);
- }, correctFloat: R, createElement: function(t, s, n, P, D) {
- return t = c.createElement(t), s && l(t, s), D && O(t, { padding: "0", border: "none", margin: "0" }), n && O(t, n), P && P.appendChild(t), t;
- }, css: O, defined: x, destroyObjectProperties: function(t, s) {
- b(t, function(n, P) {
- n && n !== s && n.destroy && n.destroy(), delete t[P];
- });
- }, discardElement: function(t) {
- t && t.parentElement && t.parentElement.removeChild(t);
- }, erase: function(t, s) {
- for (var n = t.length; n--; )
- if (t[n] === s) {
- t.splice(n, 1);
- break;
- }
- }, error: N, extend: l, extendClass: function(t, s) {
- var n = function() {
- };
- return n.prototype = new t(), l(n.prototype, s), n;
- }, find: i, fireEvent: v, getMagnitude: function(t) {
- return Math.pow(10, Math.floor(Math.log(t) / Math.LN10));
- }, getNestedProperty: function(t, s) {
- for (t = t.split("."); t.length && x(s); ) {
- var n = t.shift();
- if (typeof n > "u" || n === "__proto__" || (s = s[n], !x(s) || typeof s == "function" || typeof s.nodeType == "number" || s === u))
- return;
- }
- return s;
- }, getStyle: k, inArray: function(t, s, n) {
- return N(32, !1, void 0, { "Highcharts.inArray": "use Array.indexOf" }), s.indexOf(t, n);
- }, isArray: V, isClass: j, isDOMElement: B, isFunction: function(t) {
- return typeof t == "function";
- }, isNumber: w, isObject: F, isString: G, keys: function(t) {
- return N(32, !1, void 0, { "Highcharts.keys": "use Object.keys" }), Object.keys(t);
- }, merge: function() {
- var t, s = arguments, n = {}, P = function(I, W) {
- return typeof I != "object" && (I = {}), b(W, function(E, X) {
- X !== "__proto__" && X !== "constructor" && (!F(E, !0) || j(E) || B(E) ? I[X] = W[X] : I[X] = P(I[X] || {}, E));
- }), I;
- };
- s[0] === !0 && (n = s[1], s = Array.prototype.slice.call(s, 2));
- var D = s.length;
- for (t = 0; t < D; t++)
- n = P(n, s[t]);
- return n;
- }, normalizeTickInterval: function(t, s, n, P, D) {
- var I = t;
- n = T(n, 1);
- var W = t / n;
- for (s || (s = D ? [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10] : [1, 2, 2.5, 5, 10], P === !1 && (n === 1 ? s = s.filter(function(E) {
- return E % 1 === 0;
- }) : 0.1 >= n && (s = [1 / n]))), P = 0; P < s.length && (I = s[P], !(D && I * n >= t || !D && W <= (s[P] + (s[P + 1] || s[P])) / 2)); P++)
- ;
- return I = R(I * n, -Math.round(Math.log(1e-3) / Math.LN10));
- }, objectEach: b, offset: function(t) {
- var s = c.documentElement;
- return t = t.parentElement || t.parentNode ? t.getBoundingClientRect() : { top: 0, left: 0, width: 0, height: 0 }, { top: t.top + (u.pageYOffset || s.scrollTop) - (s.clientTop || 0), left: t.left + (u.pageXOffset || s.scrollLeft) - (s.clientLeft || 0), width: t.width, height: t.height };
- }, pad: function(t, s, n) {
- return Array((s || 2) + 1 - String(t).replace("-", "").length).join(n || "0") + t;
- }, pick: T, pInt: U, relativeLength: function(t, s, n) {
- return /%$/.test(t) ? s * parseFloat(t) / 100 + (n || 0) : parseFloat(t);
- }, removeEvent: S, splat: function(t) {
- return V(t) ? t : [t];
- }, stableSort: function(t, s) {
- var n = t.length, P, D;
- for (D = 0; D < n; D++)
- t[D].safeI = D;
- for (t.sort(function(I, W) {
- return P = s(I, W), P === 0 ? I.safeI - W.safeI : P;
- }), D = 0; D < n; D++)
- delete t[D].safeI;
- }, syncTimeout: function(t, s, n) {
- return 0 < s ? setTimeout(t, s, n) : (t.call(0, n), -1);
- }, timeUnits: {
- millisecond: 1,
- second: 1e3,
- minute: 6e4,
- hour: 36e5,
- day: 864e5,
- week: 6048e5,
- month: 24192e5,
- year: 314496e5
- }, uniqueKey: a, useSerialIds: function(t) {
- return p = T(t, p);
- }, wrap: function(t, s, n) {
- var P = t[s];
- t[s] = function() {
- var D = Array.prototype.slice.call(arguments), I = arguments, W = this;
- return W.proceed = function() {
- P.apply(W, arguments.length ? arguments : I);
- }, D.unshift(P), D = n.apply(this, D), W.proceed = null, D;
- };
- } }, i;
- }), C(o, "Core/Chart/ChartDefaults.js", [], function() {
- return { panning: { enabled: !1, type: "x" }, styledMode: !1, borderRadius: 0, colorCount: 10, defaultSeriesType: "line", ignoreHiddenSeries: !0, spacing: [
- 10,
- 10,
- 15,
- 10
- ], resetZoomButton: { theme: { zIndex: 6 }, position: { align: "right", x: -10, y: 10 } }, zoomBySingleTouch: !1, width: null, height: null, borderColor: "#335cad", backgroundColor: "#ffffff", plotBorderColor: "#cccccc" };
- }), C(o, "Core/Color/Color.js", [o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N) {
- var _ = N.isNumber, U = N.merge, G = N.pInt;
- return N = function() {
- function V(F) {
- this.rgba = [NaN, NaN, NaN, NaN], this.input = F;
- var B = y.Color;
- if (B && B !== V)
- return new B(F);
- if (!(this instanceof V))
- return new V(F);
- this.init(F);
- }
- return V.parse = function(F) {
- return F ? new V(F) : V.None;
- }, V.prototype.init = function(F) {
- var B;
- if (typeof F == "object" && typeof F.stops < "u")
- this.stops = F.stops.map(function(f) {
- return new V(f[1]);
- });
- else if (typeof F == "string") {
- if (this.input = F = V.names[F.toLowerCase()] || F, F.charAt(0) === "#") {
- var j = F.length, w = parseInt(F.substr(1), 16);
- j === 7 ? B = [(w & 16711680) >> 16, (w & 65280) >> 8, w & 255, 1] : j === 4 && (B = [(w & 3840) >> 4 | (w & 3840) >> 8, (w & 240) >> 4 | w & 240, (w & 15) << 4 | w & 15, 1]);
- }
- if (!B)
- for (w = V.parsers.length; w-- && !B; ) {
- var x = V.parsers[w];
- (j = x.regex.exec(F)) && (B = x.parse(j));
- }
- }
- B && (this.rgba = B);
- }, V.prototype.get = function(F) {
- var B = this.input, j = this.rgba;
- if (typeof B == "object" && typeof this.stops < "u") {
- var w = U(B);
- return w.stops = [].slice.call(w.stops), this.stops.forEach(function(x, f) {
- w.stops[f] = [w.stops[f][0], x.get(F)];
- }), w;
- }
- return j && _(j[0]) ? F === "rgb" || !F && j[3] === 1 ? "rgb(" + j[0] + "," + j[1] + "," + j[2] + ")" : F === "a" ? "" + j[3] : "rgba(" + j.join(",") + ")" : B;
- }, V.prototype.brighten = function(F) {
- var B = this.rgba;
- if (this.stops)
- this.stops.forEach(function(w) {
- w.brighten(F);
- });
- else if (_(F) && F !== 0)
- for (var j = 0; 3 > j; j++)
- B[j] += G(255 * F), 0 > B[j] && (B[j] = 0), 255 < B[j] && (B[j] = 255);
- return this;
- }, V.prototype.setOpacity = function(F) {
- return this.rgba[3] = F, this;
- }, V.prototype.tweenTo = function(F, B) {
- var j = this.rgba, w = F.rgba;
- return !_(j[0]) || !_(w[0]) ? F.input || "none" : (F = w[3] !== 1 || j[3] !== 1, (F ? "rgba(" : "rgb(") + Math.round(w[0] + (j[0] - w[0]) * (1 - B)) + "," + Math.round(w[1] + (j[1] - w[1]) * (1 - B)) + "," + Math.round(w[2] + (j[2] - w[2]) * (1 - B)) + (F ? "," + (w[3] + (j[3] - w[3]) * (1 - B)) : "") + ")");
- }, V.names = { white: "#ffffff", black: "#000000" }, V.parsers = [{
- regex: /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,
- parse: function(F) {
- return [G(F[1]), G(F[2]), G(F[3]), parseFloat(F[4], 10)];
- }
- }, { regex: /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/, parse: function(F) {
- return [G(F[1]), G(F[2]), G(F[3]), 1];
- } }], V.None = new V(""), V;
- }(), N;
- }), C(o, "Core/Color/Palettes.js", [], function() {
- return { colors: "#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" ") };
- }), C(o, "Core/Time.js", [o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N) {
- var _ = y.win, U = N.defined, G = N.error, V = N.extend, F = N.isObject, B = N.merge, j = N.objectEach, w = N.pad, x = N.pick, f = N.splat, l = N.timeUnits, T = y.isSafari && _.Intl && _.Intl.DateTimeFormat.prototype.formatRange, O = y.isSafari && _.Intl && !_.Intl.DateTimeFormat.prototype.formatRange;
- return N = function() {
- function R(k) {
- this.options = {}, this.variableTimezone = this.useUTC = !1, this.Date = _.Date, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.update(k);
- }
- return R.prototype.get = function(k, b) {
- if (this.variableTimezone || this.timezoneOffset) {
- var S = b.getTime(), v = S - this.getTimezoneOffset(b);
- return b.setTime(v), k = b["getUTC" + k](), b.setTime(S), k;
- }
- return this.useUTC ? b["getUTC" + k]() : b["get" + k]();
- }, R.prototype.set = function(k, b, S) {
- if (this.variableTimezone || this.timezoneOffset) {
- if (k === "Milliseconds" || k === "Seconds" || k === "Minutes" && this.getTimezoneOffset(b) % 36e5 === 0)
- return b["setUTC" + k](S);
- var v = this.getTimezoneOffset(b);
- return v = b.getTime() - v, b.setTime(v), b["setUTC" + k](S), k = this.getTimezoneOffset(b), v = b.getTime() + k, b.setTime(v);
- }
- return this.useUTC || T && k === "FullYear" ? b["setUTC" + k](S) : b["set" + k](S);
- }, R.prototype.update = function(k) {
- var b = x(k && k.useUTC, !0);
- this.options = k = B(!0, this.options || {}, k), this.Date = k.Date || _.Date || Date, this.timezoneOffset = (this.useUTC = b) && k.timezoneOffset, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.variableTimezone = b && !(!k.getTimezoneOffset && !k.timezone);
- }, R.prototype.makeTime = function(k, b, S, v, h, c) {
- if (this.useUTC) {
- var u = this.Date.UTC.apply(0, arguments), i = this.getTimezoneOffset(u);
- u += i;
- var p = this.getTimezoneOffset(u);
- i !== p ? u += p - i : i - 36e5 !== this.getTimezoneOffset(u - 36e5) || O || (u -= 36e5);
- } else
- u = new this.Date(k, b, x(S, 1), x(v, 0), x(h, 0), x(c, 0)).getTime();
- return u;
- }, R.prototype.timezoneOffsetFunction = function() {
- var k = this, b = this.options, S = b.getTimezoneOffset, v = b.moment || _.moment;
- if (!this.useUTC)
- return function(h) {
- return 6e4 * new Date(h.toString()).getTimezoneOffset();
- };
- if (b.timezone) {
- if (v)
- return function(h) {
- return 6e4 * -v.tz(h, b.timezone).utcOffset();
- };
- G(25);
- }
- return this.useUTC && S ? function(h) {
- return 6e4 * S(h.valueOf());
- } : function() {
- return 6e4 * (k.timezoneOffset || 0);
- };
- }, R.prototype.dateFormat = function(k, b, S) {
- if (!U(b) || isNaN(b))
- return y.defaultOptions.lang && y.defaultOptions.lang.invalidDate || "";
- k = x(k, "%Y-%m-%d %H:%M:%S");
- var v = this, h = new this.Date(b), c = this.get("Hours", h), u = this.get("Day", h), i = this.get("Date", h), p = this.get("Month", h), a = this.get("FullYear", h), t = y.defaultOptions.lang, s = t && t.weekdays, n = t && t.shortWeekdays;
- return h = V({ a: n ? n[u] : s[u].substr(0, 3), A: s[u], d: w(i), e: w(i, 2, " "), w: u, b: t.shortMonths[p], B: t.months[p], m: w(p + 1), o: p + 1, y: a.toString().substr(2, 2), Y: a, H: w(c), k: c, I: w(c % 12 || 12), l: c % 12 || 12, M: w(this.get("Minutes", h)), p: 12 > c ? "AM" : "PM", P: 12 > c ? "am" : "pm", S: w(h.getSeconds()), L: w(Math.floor(b % 1e3), 3) }, y.dateFormats), j(h, function(P, D) {
- for (; k.indexOf("%" + D) !== -1; )
- k = k.replace("%" + D, typeof P == "function" ? P.call(v, b) : P);
- }), S ? k.substr(0, 1).toUpperCase() + k.substr(1) : k;
- }, R.prototype.resolveDTLFormat = function(k) {
- return F(k, !0) ? k : (k = f(k), { main: k[0], from: k[1], to: k[2] });
- }, R.prototype.getTimeTicks = function(k, b, S, v) {
- var h = this, c = [], u = {}, i = new h.Date(b), p = k.unitRange, a = k.count || 1, t;
- if (v = x(v, 1), U(b)) {
- if (h.set(
- "Milliseconds",
- i,
- p >= l.second ? 0 : a * Math.floor(h.get("Milliseconds", i) / a)
- ), p >= l.second && h.set("Seconds", i, p >= l.minute ? 0 : a * Math.floor(h.get("Seconds", i) / a)), p >= l.minute && h.set("Minutes", i, p >= l.hour ? 0 : a * Math.floor(h.get("Minutes", i) / a)), p >= l.hour && h.set("Hours", i, p >= l.day ? 0 : a * Math.floor(h.get("Hours", i) / a)), p >= l.day && h.set("Date", i, p >= l.month ? 1 : Math.max(1, a * Math.floor(h.get("Date", i) / a))), p >= l.month) {
- h.set("Month", i, p >= l.year ? 0 : a * Math.floor(h.get("Month", i) / a));
- var s = h.get("FullYear", i);
- }
- p >= l.year && h.set(
- "FullYear",
- i,
- s - s % a
- ), p === l.week && (s = h.get("Day", i), h.set("Date", i, h.get("Date", i) - s + v + (s < v ? -7 : 0))), s = h.get("FullYear", i), v = h.get("Month", i);
- var n = h.get("Date", i), P = h.get("Hours", i);
- for (b = i.getTime(), !h.variableTimezone && h.useUTC || !U(S) || (t = S - b > 4 * l.month || h.getTimezoneOffset(b) !== h.getTimezoneOffset(S)), b = i.getTime(), i = 1; b < S; )
- c.push(b), b = p === l.year ? h.makeTime(s + i * a, 0) : p === l.month ? h.makeTime(s, v + i * a) : !t || p !== l.day && p !== l.week ? t && p === l.hour && 1 < a ? h.makeTime(s, v, n, P + i * a) : b + p * a : h.makeTime(s, v, n + i * a * (p === l.day ? 1 : 7)), i++;
- c.push(b), p <= l.hour && 1e4 > c.length && c.forEach(function(D) {
- D % 18e5 === 0 && h.dateFormat("%H%M%S%L", D) === "000000000" && (u[D] = "day");
- });
- }
- return c.info = V(k, { higherRanks: u, totalRange: p * a }), c;
- }, R.prototype.getDateFormat = function(k, b, S, v) {
- var h = this.dateFormat("%m-%d %H:%M:%S.%L", b), c = { millisecond: 15, second: 12, minute: 9, hour: 6, day: 3 }, u = "millisecond";
- for (i in l) {
- if (k === l.week && +this.dateFormat("%w", b) === S && h.substr(6) === "00:00:00.000") {
- var i = "week";
- break;
- }
- if (l[i] > k) {
- i = u;
- break;
- }
- if (c[i] && h.substr(c[i]) !== "01-01 00:00:00.000".substr(c[i]))
- break;
- i !== "week" && (u = i);
- }
- if (i)
- var p = this.resolveDTLFormat(v[i]).main;
- return p;
- }, R;
- }(), N;
- }), C(o, "Core/DefaultOptions.js", [o["Core/Chart/ChartDefaults.js"], o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Color/Palettes.js"], o["Core/Time.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V) {
- N = N.parse;
- var F = V.merge, B = {
- colors: U.colors,
- symbols: ["circle", "diamond", "square", "triangle", "triangle-down"],
- lang: {
- loading: "Loading...",
- months: "January February March April May June July August September October November December".split(" "),
- shortMonths: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),
- weekdays: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
- decimalPoint: ".",
- numericSymbols: "kMGTPE".split(""),
- resetZoom: "Reset zoom",
- resetZoomTitle: "Reset zoom level 1:1",
- thousandsSep: " "
- },
- global: {},
- time: { Date: void 0, getTimezoneOffset: void 0, timezone: void 0, timezoneOffset: 0, useUTC: !0 },
- chart: y,
- title: { text: "Chart title", align: "center", margin: 15, widthAdjust: -44 },
- subtitle: { text: "", align: "center", widthAdjust: -44 },
- caption: { margin: 15, text: "", align: "left", verticalAlign: "bottom" },
- plotOptions: {},
- labels: { style: { position: "absolute", color: "#333333" } },
- legend: {
- enabled: !0,
- align: "center",
- alignColumns: !0,
- className: "highcharts-no-tooltip",
- layout: "horizontal",
- labelFormatter: function() {
- return this.name;
- },
- borderColor: "#999999",
- borderRadius: 0,
- navigation: { activeColor: "#003399", inactiveColor: "#cccccc" },
- itemStyle: { color: "#333333", cursor: "pointer", fontSize: "12px", fontWeight: "bold", textOverflow: "ellipsis" },
- itemHoverStyle: { color: "#000000" },
- itemHiddenStyle: { color: "#cccccc" },
- shadow: !1,
- itemCheckboxStyle: { position: "absolute", width: "13px", height: "13px" },
- squareSymbol: !0,
- symbolPadding: 5,
- verticalAlign: "bottom",
- x: 0,
- y: 0,
- title: { style: { fontWeight: "bold" } }
- },
- loading: { labelStyle: { fontWeight: "bold", position: "relative", top: "45%" }, style: { position: "absolute", backgroundColor: "#ffffff", opacity: 0.5, textAlign: "center" } },
- tooltip: {
- enabled: !0,
- animation: _.svg,
- borderRadius: 3,
- dateTimeLabelFormats: {
- millisecond: "%A, %b %e, %H:%M:%S.%L",
- second: "%A, %b %e, %H:%M:%S",
- minute: "%A, %b %e, %H:%M",
- hour: "%A, %b %e, %H:%M",
- day: "%A, %b %e, %Y",
- week: "Week from %A, %b %e, %Y",
- month: "%B %Y",
- year: "%Y"
- },
- footerFormat: "",
- headerShape: "callout",
- hideDelay: 500,
- padding: 8,
- shape: "callout",
- shared: !1,
- snap: _.isTouchDevice ? 25 : 10,
- headerFormat: '<span style="font-size: 10px">{point.key}</span><br/>',
- pointFormat: '<span style="color:{point.color}">●</span> {series.name}: <b>{point.y}</b><br/>',
- backgroundColor: N("#f7f7f7").setOpacity(0.85).get(),
- borderWidth: 1,
- shadow: !0,
- stickOnContact: !1,
- style: { color: "#333333", cursor: "default", fontSize: "12px", whiteSpace: "nowrap" },
- useHTML: !1
- },
- credits: { enabled: !0, href: "https://www.highcharts.com?credits", position: { align: "right", x: -10, verticalAlign: "bottom", y: -5 }, style: { cursor: "pointer", color: "#999999", fontSize: "9px" }, text: "Highcharts.com" }
- };
- B.chart.styledMode = !1;
- var j = new G(F(B.global, B.time));
- return y = { defaultOptions: B, defaultTime: j, getOptions: function() {
- return B;
- }, setOptions: function(w) {
- return F(!0, B, w), (w.time || w.global) && (_.time ? _.time.update(F(
- B.global,
- B.time,
- w.global,
- w.time
- )) : _.time = j), B;
- } }, y;
- }), C(o, "Core/Animation/Fx.js", [o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N, _) {
- var U = y.parse, G = N.win, V = _.isNumber, F = _.objectEach;
- return function() {
- function B(j, w, x) {
- this.pos = NaN, this.options = w, this.elem = j, this.prop = x;
- }
- return B.prototype.dSetter = function() {
- var j = this.paths, w = j && j[0];
- j = j && j[1];
- var x = this.now || 0, f = [];
- if (x !== 1 && w && j)
- if (w.length === j.length && 1 > x)
- for (var l = 0; l < j.length; l++) {
- for (var T = w[l], O = j[l], R = [], k = 0; k < O.length; k++) {
- var b = T[k], S = O[k];
- V(b) && V(S) && (O[0] !== "A" || k !== 4 && k !== 5) ? R[k] = b + x * (S - b) : R[k] = S;
- }
- f.push(R);
- }
- else
- f = j;
- else
- f = this.toD || [];
- this.elem.attr("d", f, void 0, !0);
- }, B.prototype.update = function() {
- var j = this.elem, w = this.prop, x = this.now, f = this.options.step;
- this[w + "Setter"] ? this[w + "Setter"]() : j.attr ? j.element && j.attr(w, x, null, !0) : j.style[w] = x + this.unit, f && f.call(j, x, this);
- }, B.prototype.run = function(j, w, x) {
- var f = this, l = f.options, T = function(k) {
- return T.stopped ? !1 : f.step(k);
- }, O = G.requestAnimationFrame || function(k) {
- setTimeout(
- k,
- 13
- );
- }, R = function() {
- for (var k = 0; k < B.timers.length; k++)
- B.timers[k]() || B.timers.splice(k--, 1);
- B.timers.length && O(R);
- };
- j !== w || this.elem["forceAnimate:" + this.prop] ? (this.startTime = +/* @__PURE__ */ new Date(), this.start = j, this.end = w, this.unit = x, this.now = this.start, this.pos = 0, T.elem = this.elem, T.prop = this.prop, T() && B.timers.push(T) === 1 && O(R)) : (delete l.curAnim[this.prop], l.complete && Object.keys(l.curAnim).length === 0 && l.complete.call(this.elem));
- }, B.prototype.step = function(j) {
- var w = +/* @__PURE__ */ new Date(), x = this.options, f = this.elem, l = x.complete, T = x.duration, O = x.curAnim;
- if (f.attr && !f.element)
- j = !1;
- else if (j || w >= T + this.startTime) {
- this.now = this.end, this.pos = 1, this.update();
- var R = O[this.prop] = !0;
- F(O, function(k) {
- k !== !0 && (R = !1);
- }), R && l && l.call(f), j = !1;
- } else
- this.pos = x.easing((w - this.startTime) / T), this.now = this.start + (this.end - this.start) * this.pos, this.update(), j = !0;
- return j;
- }, B.prototype.initPath = function(j, w, x) {
- function f(h, c) {
- for (; h.length < v; ) {
- var u = h[0], i = c[v - h.length];
- i && u[0] === "M" && (h[0] = i[0] === "C" ? ["C", u[1], u[2], u[1], u[2], u[1], u[2]] : [
- "L",
- u[1],
- u[2]
- ]), h.unshift(u), R && (u = h.pop(), h.push(h[h.length - 1], u));
- }
- }
- function l(h, c) {
- for (; h.length < v; )
- if (c = h[Math.floor(h.length / k) - 1].slice(), c[0] === "C" && (c[1] = c[5], c[2] = c[6]), R) {
- var u = h[Math.floor(h.length / k)].slice();
- h.splice(h.length / 2, 0, c, u);
- } else
- h.push(c);
- }
- var T = j.startX, O = j.endX;
- x = x.slice();
- var R = j.isArea, k = R ? 2 : 1;
- if (w = w && w.slice(), !w)
- return [x, x];
- if (T && O && O.length) {
- for (j = 0; j < T.length; j++)
- if (T[j] === O[0]) {
- var b = j;
- break;
- } else if (T[0] === O[O.length - T.length + j]) {
- b = j;
- var S = !0;
- break;
- } else if (T[T.length - 1] === O[O.length - T.length + j]) {
- b = T.length - j;
- break;
- }
- typeof b > "u" && (w = []);
- }
- if (w.length && V(b)) {
- var v = x.length + b * k;
- S ? (f(w, x), l(x, w)) : (f(x, w), l(w, x));
- }
- return [w, x];
- }, B.prototype.fillSetter = function() {
- B.prototype.strokeSetter.apply(this, arguments);
- }, B.prototype.strokeSetter = function() {
- this.elem.attr(this.prop, U(this.start).tweenTo(U(this.end), this.pos), void 0, !0);
- }, B.timers = [], B;
- }();
- }), C(o, "Core/Animation/AnimationUtilities.js", [o["Core/Animation/Fx.js"], o["Core/Utilities.js"]], function(y, N) {
- function _(l) {
- return j(l) ? w({ duration: 500, defer: 0 }, l) : { duration: l ? 500 : 0, defer: 0 };
- }
- function U(l, T) {
- for (var O = y.timers.length; O--; )
- y.timers[O].elem !== l || T && T !== y.timers[O].prop || (y.timers[O].stopped = !0);
- }
- var G = N.defined, V = N.getStyle, F = N.isArray, B = N.isNumber, j = N.isObject, w = N.merge, x = N.objectEach, f = N.pick;
- return { animate: function(l, T, O) {
- var R, k = "", b, S;
- if (!j(O)) {
- var v = arguments;
- O = { duration: v[2], easing: v[3], complete: v[4] };
- }
- B(O.duration) || (O.duration = 400), O.easing = typeof O.easing == "function" ? O.easing : Math[O.easing] || Math.easeInOutSine, O.curAnim = w(T), x(T, function(h, c) {
- U(l, c), S = new y(l, O, c), b = void 0, c === "d" && F(T.d) ? (S.paths = S.initPath(l, l.pathArray, T.d), S.toD = T.d, R = 0, b = 1) : l.attr ? R = l.attr(c) : (R = parseFloat(V(l, c)) || 0, c !== "opacity" && (k = "px")), b || (b = h), typeof b == "string" && b.match("px") && (b = b.replace(/px/g, "")), S.run(R, b, k);
- });
- }, animObject: _, getDeferredAnimation: function(l, T, O) {
- var R = _(T), k = 0, b = 0;
- return (O ? [O] : l.series).forEach(function(S) {
- S = _(S.options.animation), k = T && G(T.defer) ? R.defer : Math.max(k, S.duration + S.defer), b = Math.min(R.duration, S.duration);
- }), l.renderer.forExport && (k = 0), { defer: Math.max(0, k - b), duration: Math.min(k, b) };
- }, setAnimation: function(l, T) {
- T.renderer.globalAnimation = f(l, T.options.chart.animation, !0);
- }, stop: U };
- }), C(o, "Core/Renderer/HTML/AST.js", [o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N) {
- var _ = y.SVG_NS, U = N.attr, G = N.createElement, V = N.error, F = N.isFunction, B = N.isString, j = N.objectEach, w = N.splat, x = (N = y.win.trustedTypes) && F(N.createPolicy) && N.createPolicy("highcharts", { createHTML: function(T) {
- return T;
- } }), f = x ? x.createHTML("") : "";
- try {
- var l = !!new DOMParser().parseFromString(f, "text/html");
- } catch {
- l = !1;
- }
- return F = function() {
- function T(O) {
- this.nodes = typeof O == "string" ? this.parseMarkup(O) : O;
- }
- return T.filterUserAttributes = function(O) {
- return j(O, function(R, k) {
- var b = !0;
- T.allowedAttributes.indexOf(k) === -1 && (b = !1), ["background", "dynsrc", "href", "lowsrc", "src"].indexOf(k) !== -1 && (b = B(R) && T.allowedReferences.some(function(S) {
- return R.indexOf(S) === 0;
- })), b || (V("Highcharts warning: Invalid attribute '" + k + "' in config"), delete O[k]);
- }), O;
- }, T.setElementHTML = function(O, R) {
- O.innerHTML = T.emptyHTML, R && new T(R).addToDOM(O);
- }, T.prototype.addToDOM = function(O) {
- function R(k, b) {
- var S;
- return w(k).forEach(function(v) {
- var h = v.tagName, c = v.textContent ? y.doc.createTextNode(v.textContent) : void 0;
- if (h)
- if (h === "#text")
- var u = c;
- else if (T.allowedTags.indexOf(h) !== -1) {
- h = y.doc.createElementNS(h === "svg" ? _ : b.namespaceURI || _, h);
- var i = v.attributes || {};
- j(v, function(p, a) {
- a !== "tagName" && a !== "attributes" && a !== "children" && a !== "textContent" && (i[a] = p);
- }), U(h, T.filterUserAttributes(i)), c && h.appendChild(c), R(v.children || [], h), u = h;
- } else
- V("Highcharts warning: Invalid tagName " + h + " in config");
- u && b.appendChild(u), S = u;
- }), S;
- }
- return R(this.nodes, O);
- }, T.prototype.parseMarkup = function(O) {
- var R = [];
- if (O = O.trim(), l)
- O = new DOMParser().parseFromString(x ? x.createHTML(O) : O, "text/html");
- else {
- var k = G("div");
- k.innerHTML = O, O = { body: k };
- }
- var b = function(S, v) {
- var h = S.nodeName.toLowerCase(), c = { tagName: h };
- if (h === "#text" && (c.textContent = S.textContent || ""), h = S.attributes) {
- var u = {};
- [].forEach.call(h, function(p) {
- u[p.name] = p.value;
- }), c.attributes = u;
- }
- if (S.childNodes.length) {
- var i = [];
- [].forEach.call(S.childNodes, function(p) {
- b(p, i);
- }), i.length && (c.children = i);
- }
- v.push(c);
- };
- return [].forEach.call(O.body.childNodes, function(S) {
- return b(S, R);
- }), R;
- }, T.allowedAttributes = "aria-controls aria-describedby aria-expanded aria-haspopup aria-hidden aria-label aria-labelledby aria-live aria-pressed aria-readonly aria-roledescription aria-selected class clip-path color colspan cx cy d dx dy disabled fill height href id in markerHeight markerWidth offset opacity orient padding paddingLeft paddingRight patternUnits r refX refY role scope slope src startOffset stdDeviation stroke stroke-linecap stroke-width style tableValues result rowspan summary target tabindex text-align textAnchor textLength title type valign width x x1 x2 y y1 y2 zIndex".split(" "), T.allowedReferences = "https:// http:// mailto: / ../ ./ #".split(" "), T.allowedTags = "a abbr b br button caption circle clipPath code dd defs div dl dt em feComponentTransfer feFuncA feFuncB feFuncG feFuncR feGaussianBlur feOffset feMerge feMergeNode filter h1 h2 h3 h4 h5 h6 hr i img li linearGradient marker ol p path pattern pre rect small span stop strong style sub sup svg table text thead tbody tspan td th tr u ul #text".split(" "), T.emptyHTML = f, T;
- }(), F;
- }), C(
- o,
- "Core/FormatUtilities.js",
- [o["Core/DefaultOptions.js"], o["Core/Utilities.js"]],
- function(y, N) {
- function _(w, x, f, l) {
- w = +w || 0, x = +x;
- var T = U.lang, O = (w.toString().split(".")[1] || "").split("e")[0].length, R = w.toString().split("e"), k = x;
- if (x === -1)
- x = Math.min(O, 20);
- else if (!F(x))
- x = 2;
- else if (x && R[1] && 0 > R[1]) {
- var b = x + +R[1];
- 0 <= b ? (R[0] = (+R[0]).toExponential(b).split("e")[0], x = b) : (R[0] = R[0].split(".")[0] || 0, w = 20 > x ? (R[0] * Math.pow(10, R[1])).toFixed(x) : 0, R[1] = 0);
- }
- b = (Math.abs(R[1] ? R[0] : w) + Math.pow(10, -Math.max(x, O) - 1)).toFixed(x), O = String(j(b));
- var S = 3 < O.length ? O.length % 3 : 0;
- return f = B(f, T.decimalPoint), l = B(l, T.thousandsSep), w = (0 > w ? "-" : "") + (S ? O.substr(0, S) + l : ""), w = 0 > +R[1] && !k ? "0" : w + O.substr(S).replace(/(\d{3})(?=\d)/g, "$1" + l), x && (w += f + b.slice(-x)), R[1] && +w != 0 && (w += "e" + R[1]), w;
- }
- var U = y.defaultOptions, G = y.defaultTime, V = N.getNestedProperty, F = N.isNumber, B = N.pick, j = N.pInt;
- return { dateFormat: function(w, x, f) {
- return G.dateFormat(w, x, f);
- }, format: function(w, x, f) {
- var l = "{", T = !1, O = /f$/, R = /\.([0-9])/, k = U.lang, b = f && f.time || G;
- f = f && f.numberFormatter || _;
- for (var S = []; w; ) {
- var v = w.indexOf(l);
- if (v === -1)
- break;
- var h = w.slice(0, v);
- if (T) {
- if (h = h.split(":"), l = V(h.shift() || "", x), h.length && typeof l == "number")
- if (h = h.join(":"), O.test(h)) {
- var c = parseInt((h.match(R) || ["", "-1"])[1], 10);
- l !== null && (l = f(l, c, k.decimalPoint, -1 < h.indexOf(",") ? k.thousandsSep : ""));
- } else
- l = b.dateFormat(h, l);
- S.push(l);
- } else
- S.push(h);
- w = w.slice(v + 1), l = (T = !T) ? "}" : "{";
- }
- return S.push(w), S.join("");
- }, numberFormat: _ };
- }
- ), C(o, "Core/Renderer/RendererUtilities.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.clamp, _ = y.pick, U = y.stableSort, G;
- return function(V) {
- function F(B, j, w) {
- var x = B, f = x.reducedLen || j, l = function(S, v) {
- return (v.rank || 0) - (S.rank || 0);
- }, T = function(S, v) {
- return S.target - v.target;
- }, O, R = !0, k = [], b = 0;
- for (O = B.length; O--; )
- b += B[O].size;
- if (b > f) {
- for (U(B, l), b = O = 0; b <= f; )
- b += B[O].size, O++;
- k = B.splice(O - 1, B.length);
- }
- for (U(B, T), B = B.map(function(S) {
- return { size: S.size, targets: [S.target], align: _(S.align, 0.5) };
- }); R; ) {
- for (O = B.length; O--; )
- f = B[O], l = (Math.min.apply(0, f.targets) + Math.max.apply(0, f.targets)) / 2, f.pos = N(
- l - f.size * f.align,
- 0,
- j - f.size
- );
- for (O = B.length, R = !1; O--; )
- 0 < O && B[O - 1].pos + B[O - 1].size > B[O].pos && (B[O - 1].size += B[O].size, B[O - 1].targets = B[O - 1].targets.concat(B[O].targets), B[O - 1].align = 0.5, B[O - 1].pos + B[O - 1].size > j && (B[O - 1].pos = j - B[O - 1].size), B.splice(O, 1), R = !0);
- }
- return x.push.apply(x, k), O = 0, B.some(function(S) {
- var v = 0;
- return (S.targets || []).some(function() {
- return x[O].pos = S.pos + v, typeof w < "u" && Math.abs(x[O].pos - x[O].target) > w ? (x.slice(0, O + 1).forEach(function(h) {
- return delete h.pos;
- }), x.reducedLen = (x.reducedLen || j) - 0.1 * j, x.reducedLen > 0.1 * j && F(x, j, w), !0) : (v += x[O].size, O++, !1);
- });
- }), U(x, T), x;
- }
- V.distribute = F;
- }(G || (G = {})), G;
- }), C(o, "Core/Renderer/SVG/SVGElement.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Renderer/HTML/AST.js"], o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N, _, U, G) {
- var V = y.animate, F = y.animObject, B = y.stop, j = U.deg2rad, w = U.doc, x = U.noop, f = U.svg, l = U.SVG_NS, T = U.win, O = G.addEvent, R = G.attr, k = G.createElement, b = G.css, S = G.defined, v = G.erase, h = G.extend, c = G.fireEvent, u = G.isArray, i = G.isFunction, p = G.isNumber, a = G.isString, t = G.merge, s = G.objectEach, n = G.pick, P = G.pInt, D = G.syncTimeout, I = G.uniqueKey;
- return y = function() {
- function W() {
- this.element = void 0, this.onEvents = {}, this.opacity = 1, this.renderer = void 0, this.SVG_NS = l, this.symbolCustomAttribs = "x y width height r start end innerR anchorX anchorY rounded".split(" ");
- }
- return W.prototype._defaultGetter = function(E) {
- return E = n(this[E + "Value"], this[E], this.element ? this.element.getAttribute(E) : null, 0), /^[\-0-9\.]+$/.test(E) && (E = parseFloat(E)), E;
- }, W.prototype._defaultSetter = function(E, X, g) {
- g.setAttribute(X, E);
- }, W.prototype.add = function(E) {
- var X = this.renderer, g = this.element;
- if (E && (this.parentGroup = E), this.parentInverted = E && E.inverted, typeof this.textStr < "u" && this.element.nodeName === "text" && X.buildText(this), this.added = !0, !E || E.handleZ || this.zIndex)
- var m = this.zIndexSetter();
- return m || (E ? E.element : X.box).appendChild(g), this.onAdd && this.onAdd(), this;
- }, W.prototype.addClass = function(E, X) {
- var g = X ? "" : this.attr("class") || "";
- return E = (E || "").split(/ /g).reduce(function(m, L) {
- return g.indexOf(L) === -1 && m.push(L), m;
- }, g ? [g] : []).join(" "), E !== g && this.attr("class", E), this;
- }, W.prototype.afterSetters = function() {
- this.doTransform && (this.updateTransform(), this.doTransform = !1);
- }, W.prototype.align = function(E, X, g) {
- var m = {}, L = this.renderer, z = L.alignedObjects, $, Q, A;
- E ? (this.alignOptions = E, this.alignByTranslate = X, (!g || a(g)) && (this.alignTo = $ = g || "renderer", v(z, this), z.push(this), g = void 0)) : (E = this.alignOptions, X = this.alignByTranslate, $ = this.alignTo), g = n(g, L[$], $ === "scrollablePlotBox" ? L.plotBox : void 0, L), $ = E.align;
- var H = E.verticalAlign;
- return L = (g.x || 0) + (E.x || 0), z = (g.y || 0) + (E.y || 0), $ === "right" ? Q = 1 : $ === "center" && (Q = 2), Q && (L += (g.width - (E.width || 0)) / Q), m[X ? "translateX" : "x"] = Math.round(L), H === "bottom" ? A = 1 : H === "middle" && (A = 2), A && (z += (g.height - (E.height || 0)) / A), m[X ? "translateY" : "y"] = Math.round(z), this[this.placed ? "animate" : "attr"](m), this.placed = !0, this.alignAttr = m, this;
- }, W.prototype.alignSetter = function(E) {
- var X = { left: "start", center: "middle", right: "end" };
- X[E] && (this.alignValue = E, this.element.setAttribute(
- "text-anchor",
- X[E]
- ));
- }, W.prototype.animate = function(E, X, g) {
- var m = this, L = F(n(X, this.renderer.globalAnimation, !0));
- return X = L.defer, n(w.hidden, w.msHidden, w.webkitHidden, !1) && (L.duration = 0), L.duration !== 0 ? (g && (L.complete = g), D(function() {
- m.element && V(m, E, L);
- }, X)) : (this.attr(E, void 0, g), s(E, function(z, $) {
- L.step && L.step.call(this, z, { prop: $, pos: 1, elem: this });
- }, this)), this;
- }, W.prototype.applyTextOutline = function(E) {
- var X = this.element;
- E.indexOf("contrast") !== -1 && (E = E.replace(/contrast/g, this.renderer.getContrast(X.style.fill)));
- var g = E.split(" ");
- if (E = g[g.length - 1], (g = g[0]) && g !== "none" && U.svg) {
- this.fakeTS = !0, this.ySetter = this.xSetter, g = g.replace(/(^[\d\.]+)(.*?)$/g, function(z, $, Q) {
- return 2 * Number($) + Q;
- }), this.removeTextOutline();
- var m = w.createElementNS(l, "tspan");
- R(m, { class: "highcharts-text-outline", fill: E, stroke: E, "stroke-width": g, "stroke-linejoin": "round" }), [].forEach.call(X.childNodes, function(z) {
- var $ = z.cloneNode(!0);
- $.removeAttribute && ["fill", "stroke", "stroke-width", "stroke"].forEach(function(Q) {
- return $.removeAttribute(Q);
- }), m.appendChild($);
- });
- var L = w.createElementNS(l, "tspan");
- L.textContent = "", ["x", "y"].forEach(function(z) {
- var $ = X.getAttribute(z);
- $ && L.setAttribute(z, $);
- }), m.appendChild(L), X.insertBefore(m, X.firstChild);
- }
- }, W.prototype.attr = function(E, X, g, m) {
- var L = this.element, z = this.symbolCustomAttribs, $, Q = this, A, H;
- if (typeof E == "string" && typeof X < "u") {
- var Y = E;
- E = {}, E[Y] = X;
- }
- return typeof E == "string" ? Q = (this[E + "Getter"] || this._defaultGetter).call(this, E, L) : (s(E, function(Z, q) {
- A = !1, m || B(this, q), this.symbolName && z.indexOf(q) !== -1 && ($ || (this.symbolAttr(E), $ = !0), A = !0), !this.rotation || q !== "x" && q !== "y" || (this.doTransform = !0), A || (H = this[q + "Setter"] || this._defaultSetter, H.call(this, Z, q, L), !this.styledMode && this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(q) && this.updateShadows(q, Z, H));
- }, this), this.afterSetters()), g && g.call(this), Q;
- }, W.prototype.clip = function(E) {
- return this.attr("clip-path", E ? "url(" + this.renderer.url + "#" + E.id + ")" : "none");
- }, W.prototype.crisp = function(E, X) {
- X = X || E.strokeWidth || 0;
- var g = Math.round(X) % 2 / 2;
- return E.x = Math.floor(E.x || this.x || 0) + g, E.y = Math.floor(E.y || this.y || 0) + g, E.width = Math.floor((E.width || this.width || 0) - 2 * g), E.height = Math.floor((E.height || this.height || 0) - 2 * g), S(E.strokeWidth) && (E.strokeWidth = X), E;
- }, W.prototype.complexColor = function(E, X, g) {
- var m = this.renderer, L, z, $, Q, A, H, Y, Z, q, it, et = [], nt;
- c(this.renderer, "complexColor", { args: arguments }, function() {
- if (E.radialGradient ? z = "radialGradient" : E.linearGradient && (z = "linearGradient"), z) {
- if ($ = E[z], A = m.gradients, H = E.stops, q = g.radialReference, u($) && (E[z] = $ = { x1: $[0], y1: $[1], x2: $[2], y2: $[3], gradientUnits: "userSpaceOnUse" }), z === "radialGradient" && q && !S($.gradientUnits) && (Q = $, $ = t($, m.getRadialAttr(q, Q), { gradientUnits: "userSpaceOnUse" })), s($, function(ct, gt) {
- gt !== "id" && et.push(gt, ct);
- }), s(H, function(ct) {
- et.push(ct);
- }), et = et.join(","), A[et])
- it = A[et].attr("id");
- else {
- $.id = it = I();
- var rt = A[et] = m.createElement(z).attr($).add(m.defs);
- rt.radAttr = Q, rt.stops = [], H.forEach(function(ct) {
- ct[1].indexOf("rgba") === 0 ? (L = _.parse(ct[1]), Y = L.get("rgb"), Z = L.get("a")) : (Y = ct[1], Z = 1), ct = m.createElement("stop").attr({
- offset: ct[0],
- "stop-color": Y,
- "stop-opacity": Z
- }).add(rt), rt.stops.push(ct);
- });
- }
- nt = "url(" + m.url + "#" + it + ")", g.setAttribute(X, nt), g.gradient = et, E.toString = function() {
- return nt;
- };
- }
- });
- }, W.prototype.css = function(E) {
- var X = this.styles, g = {}, m = this.element, L = ["textOutline", "textOverflow", "width"], z = "", $ = !X;
- if (E && E.color && (E.fill = E.color), X && s(E, function(H, Y) {
- X && X[Y] !== H && (g[Y] = H, $ = !0);
- }), $) {
- if (X && (E = h(X, g)), E) {
- if (E.width === null || E.width === "auto")
- delete this.textWidth;
- else if (m.nodeName.toLowerCase() === "text" && E.width)
- var Q = this.textWidth = P(E.width);
- }
- if (this.styles = E, Q && !f && this.renderer.forExport && delete E.width, m.namespaceURI === this.SVG_NS) {
- var A = function(H, Y) {
- return "-" + Y.toLowerCase();
- };
- s(E, function(H, Y) {
- L.indexOf(Y) === -1 && (z += Y.replace(/([A-Z])/g, A) + ":" + H + ";");
- }), z && R(m, "style", z);
- } else
- b(m, E);
- this.added && (this.element.nodeName === "text" && this.renderer.buildText(this), E && E.textOutline && this.applyTextOutline(E.textOutline));
- }
- return this;
- }, W.prototype.dashstyleSetter = function(E) {
- var X = this["stroke-width"];
- if (X === "inherit" && (X = 1), E = E && E.toLowerCase()) {
- var g = E.replace("shortdashdotdot", "3,1,1,1,1,1,").replace("shortdashdot", "3,1,1,1").replace("shortdot", "1,1,").replace("shortdash", "3,1,").replace("longdash", "8,3,").replace(/dot/g, "1,3,").replace("dash", "4,3,").replace(/,$/, "").split(",");
- for (E = g.length; E--; )
- g[E] = "" + P(g[E]) * n(X, NaN);
- E = g.join(",").replace(/NaN/g, "none"), this.element.setAttribute("stroke-dasharray", E);
- }
- }, W.prototype.destroy = function() {
- var E = this, X = E.element || {}, g = E.renderer, m = X.ownerSVGElement, L = g.isSVG && X.nodeName === "SPAN" && E.parentGroup || void 0;
- if (X.onclick = X.onmouseout = X.onmouseover = X.onmousemove = X.point = null, B(E), E.clipPath && m) {
- var z = E.clipPath;
- [].forEach.call(m.querySelectorAll("[clip-path],[CLIP-PATH]"), function($) {
- -1 < $.getAttribute("clip-path").indexOf(z.element.id) && $.removeAttribute("clip-path");
- }), E.clipPath = z.destroy();
- }
- if (E.stops) {
- for (m = 0; m < E.stops.length; m++)
- E.stops[m].destroy();
- E.stops.length = 0, E.stops = void 0;
- }
- for (E.safeRemoveChild(X), g.styledMode || E.destroyShadows(); L && L.div && L.div.childNodes.length === 0; )
- X = L.parentGroup, E.safeRemoveChild(L.div), delete L.div, L = X;
- E.alignTo && v(g.alignedObjects, E), s(E, function($, Q) {
- E[Q] && E[Q].parentGroup === E && E[Q].destroy && E[Q].destroy(), delete E[Q];
- });
- }, W.prototype.destroyShadows = function() {
- (this.shadows || []).forEach(function(E) {
- this.safeRemoveChild(E);
- }, this), this.shadows = void 0;
- }, W.prototype.destroyTextPath = function(E, X) {
- var g = E.getElementsByTagName("text")[0];
- if (g) {
- if (g.removeAttribute("dx"), g.removeAttribute("dy"), X.element.setAttribute("id", ""), this.textPathWrapper && g.getElementsByTagName("textPath").length) {
- for (E = this.textPathWrapper.element.childNodes; E.length; )
- g.appendChild(E[0]);
- g.removeChild(this.textPathWrapper.element);
- }
- } else
- (E.getAttribute("dx") || E.getAttribute("dy")) && (E.removeAttribute("dx"), E.removeAttribute("dy"));
- this.textPathWrapper && (this.textPathWrapper = this.textPathWrapper.destroy());
- }, W.prototype.dSetter = function(E, X, g) {
- u(E) && (typeof E[0] == "string" && (E = this.renderer.pathToSegments(E)), this.pathArray = E, E = E.reduce(function(m, L, z) {
- return L && L.join ? (z ? m + " " : "") + L.join(" ") : (L || "").toString();
- }, "")), /(NaN| {2}|^$)/.test(E) && (E = "M 0 0"), this[X] !== E && (g.setAttribute(X, E), this[X] = E);
- }, W.prototype.fadeOut = function(E) {
- var X = this;
- X.animate({ opacity: 0 }, { duration: n(E, 150), complete: function() {
- X.attr({ y: -9999 }).hide();
- } });
- }, W.prototype.fillSetter = function(E, X, g) {
- typeof E == "string" ? g.setAttribute(X, E) : E && this.complexColor(E, X, g);
- }, W.prototype.getBBox = function(E, X) {
- var g = this.renderer, m = this.element, L = this.styles, z = this.textStr, $ = g.cache, Q = g.cacheKeys, A = m.namespaceURI === this.SVG_NS;
- X = n(X, this.rotation, 0);
- var H = g.styledMode ? m && W.prototype.getStyle.call(m, "font-size") : L && L.fontSize, Y;
- if (S(z)) {
- var Z = z.toString();
- Z.indexOf("<") === -1 && (Z = Z.replace(/[0-9]/g, "0")), Z += ["", X, H, this.textWidth, L && L.textOverflow, L && L.fontWeight].join();
- }
- if (Z && !E && (Y = $[Z]), !Y) {
- if (A || g.forExport) {
- try {
- var q = this.fakeTS && function(it) {
- var et = m.querySelector(".highcharts-text-outline");
- et && b(et, { display: it });
- };
- i(q) && q("none"), Y = m.getBBox ? h({}, m.getBBox()) : { width: m.offsetWidth, height: m.offsetHeight }, i(q) && q("");
- } catch {
- }
- (!Y || 0 > Y.width) && (Y = {
- width: 0,
- height: 0
- });
- } else
- Y = this.htmlGetBBox();
- if (g.isSVG && (E = Y.width, g = Y.height, A && (Y.height = g = { "11px,17": 14, "13px,20": 16 }[(H || "") + "," + Math.round(g)] || g), X && (A = X * j, Y.width = Math.abs(g * Math.sin(A)) + Math.abs(E * Math.cos(A)), Y.height = Math.abs(g * Math.cos(A)) + Math.abs(E * Math.sin(A)))), Z && (z === "" || 0 < Y.height)) {
- for (; 250 < Q.length; )
- delete $[Q.shift()];
- $[Z] || Q.push(Z), $[Z] = Y;
- }
- }
- return Y;
- }, W.prototype.getStyle = function(E) {
- return T.getComputedStyle(this.element || this, "").getPropertyValue(E);
- }, W.prototype.hasClass = function(E) {
- return ("" + this.attr("class")).split(" ").indexOf(E) !== -1;
- }, W.prototype.hide = function(E) {
- return E ? this.attr({ y: -9999 }) : this.attr({ visibility: "hidden" }), this;
- }, W.prototype.htmlGetBBox = function() {
- return { height: 0, width: 0, x: 0, y: 0 };
- }, W.prototype.init = function(E, X) {
- this.element = X === "span" ? k(X) : w.createElementNS(this.SVG_NS, X), this.renderer = E, c(this, "afterInit");
- }, W.prototype.invert = function(E) {
- return this.inverted = E, this.updateTransform(), this;
- }, W.prototype.on = function(E, X) {
- var g = this.onEvents;
- return g[E] && g[E](), g[E] = O(
- this.element,
- E,
- X
- ), this;
- }, W.prototype.opacitySetter = function(E, X, g) {
- this.opacity = E = Number(Number(E).toFixed(3)), g.setAttribute(X, E);
- }, W.prototype.removeClass = function(E) {
- return this.attr("class", ("" + this.attr("class")).replace(a(E) ? new RegExp("(^| )" + E + "( |$)") : E, " ").replace(/ +/g, " ").trim());
- }, W.prototype.removeTextOutline = function() {
- var E = this.element.querySelector("tspan.highcharts-text-outline");
- E && this.safeRemoveChild(E);
- }, W.prototype.safeRemoveChild = function(E) {
- var X = E.parentNode;
- X && X.removeChild(E);
- }, W.prototype.setRadialReference = function(E) {
- var X = this.element.gradient && this.renderer.gradients[this.element.gradient];
- return this.element.radialReference = E, X && X.radAttr && X.animate(this.renderer.getRadialAttr(E, X.radAttr)), this;
- }, W.prototype.setTextPath = function(E, X) {
- var g = this.element, m = this.text ? this.text.element : g, L = { textAnchor: "text-anchor" }, z = !1, $ = this.textPathWrapper, Q = !$;
- X = t(!0, { enabled: !0, attributes: { dy: -5, startOffset: "50%", textAnchor: "middle" } }, X);
- var A = N.filterUserAttributes(X.attributes);
- if (E && X && X.enabled) {
- $ && $.element.parentNode === null ? (Q = !0, $ = $.destroy()) : $ && this.removeTextOutline.call($.parentGroup), this.options && this.options.padding && (A.dx = -this.options.padding), $ || (this.textPathWrapper = $ = this.renderer.createElement("textPath"), z = !0);
- var H = $.element;
- if ((X = E.element.getAttribute("id")) || E.element.setAttribute("id", X = I()), Q)
- for (m.setAttribute("y", 0), p(A.dx) && m.setAttribute("x", -A.dx), E = [].slice.call(m.childNodes), Q = 0; Q < E.length; Q++) {
- var Y = E[Q];
- Y.nodeType !== T.Node.TEXT_NODE && Y.nodeName !== "tspan" || H.appendChild(Y);
- }
- z && $ && $.add({ element: m }), H.setAttributeNS("http://www.w3.org/1999/xlink", "href", this.renderer.url + "#" + X), S(A.dy) && (H.parentNode.setAttribute("dy", A.dy), delete A.dy), S(A.dx) && (H.parentNode.setAttribute("dx", A.dx), delete A.dx), s(A, function(Z, q) {
- H.setAttribute(L[q] || q, Z);
- }), g.removeAttribute("transform"), this.removeTextOutline.call($), this.text && !this.renderer.styledMode && this.attr({ fill: "none", "stroke-width": 0 }), this.applyTextOutline = this.updateTransform = x;
- } else
- $ && (delete this.updateTransform, delete this.applyTextOutline, this.destroyTextPath(g, E), this.updateTransform(), this.options && this.options.rotation && this.applyTextOutline(this.options.style.textOutline));
- return this;
- }, W.prototype.shadow = function(E, X, g) {
- var m = [], L = this.element, z = this.oldShadowOptions, $ = { color: "#000000", offsetX: this.parentInverted ? -1 : 1, offsetY: this.parentInverted ? -1 : 1, opacity: 0.15, width: 3 }, Q = !1, A;
- if (E === !0 ? A = $ : typeof E == "object" && (A = h($, E)), A && (A && z && s(A, function(it, et) {
- it !== z[et] && (Q = !0);
- }), Q && this.destroyShadows(), this.oldShadowOptions = A), !A)
- this.destroyShadows();
- else if (!this.shadows) {
- var H = A.opacity / A.width, Y = this.parentInverted ? "translate(" + A.offsetY + ", " + A.offsetX + ")" : "translate(" + A.offsetX + ", " + A.offsetY + ")";
- for ($ = 1; $ <= A.width; $++) {
- var Z = L.cloneNode(!1), q = 2 * A.width + 1 - 2 * $;
- R(Z, { stroke: E.color || "#000000", "stroke-opacity": H * $, "stroke-width": q, transform: Y, fill: "none" }), Z.setAttribute("class", (Z.getAttribute("class") || "") + " highcharts-shadow"), g && (R(Z, "height", Math.max(R(Z, "height") - q, 0)), Z.cutHeight = q), X ? X.element.appendChild(Z) : L.parentNode && L.parentNode.insertBefore(Z, L), m.push(Z);
- }
- this.shadows = m;
- }
- return this;
- }, W.prototype.show = function(E) {
- return this.attr({ visibility: E ? "inherit" : "visible" });
- }, W.prototype.strokeSetter = function(E, X, g) {
- this[X] = E, this.stroke && this["stroke-width"] ? (W.prototype.fillSetter.call(this, this.stroke, "stroke", g), g.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0) : X === "stroke-width" && E === 0 && this.hasStroke ? (g.removeAttribute("stroke"), this.hasStroke = !1) : this.renderer.styledMode && this["stroke-width"] && (g.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0);
- }, W.prototype.strokeWidth = function() {
- if (!this.renderer.styledMode)
- return this["stroke-width"] || 0;
- var E = this.getStyle("stroke-width"), X = 0;
- if (E.indexOf("px") === E.length - 2)
- X = P(E);
- else if (E !== "") {
- var g = w.createElementNS(l, "rect");
- R(g, { width: E, "stroke-width": 0 }), this.element.parentNode.appendChild(g), X = g.getBBox().width, g.parentNode.removeChild(g);
- }
- return X;
- }, W.prototype.symbolAttr = function(E) {
- var X = this;
- "x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(g) {
- X[g] = n(E[g], X[g]);
- }), X.attr({ d: X.renderer.symbols[X.symbolName](X.x, X.y, X.width, X.height, X) });
- }, W.prototype.textSetter = function(E) {
- E !== this.textStr && (delete this.textPxLength, this.textStr = E, this.added && this.renderer.buildText(this));
- }, W.prototype.titleSetter = function(E) {
- var X = this.element, g = X.getElementsByTagName("title")[0] || w.createElementNS(this.SVG_NS, "title");
- X.insertBefore ? X.insertBefore(g, X.firstChild) : X.appendChild(g), g.textContent = String(n(E, "")).replace(/<[^>]*>/g, "").replace(/</g, "<").replace(
- />/g,
- ">"
- );
- }, W.prototype.toFront = function() {
- var E = this.element;
- return E.parentNode.appendChild(E), this;
- }, W.prototype.translate = function(E, X) {
- return this.attr({ translateX: E, translateY: X });
- }, W.prototype.updateShadows = function(E, X, g) {
- var m = this.shadows;
- if (m)
- for (var L = m.length; L--; )
- g.call(m[L], E === "height" ? Math.max(X - (m[L].cutHeight || 0), 0) : E === "d" ? this.d : X, E, m[L]);
- }, W.prototype.updateTransform = function() {
- var E = this.scaleX, X = this.scaleY, g = this.inverted, m = this.rotation, L = this.matrix, z = this.element, $ = this.translateX || 0, Q = this.translateY || 0;
- g && ($ += this.width, Q += this.height), $ = ["translate(" + $ + "," + Q + ")"], S(L) && $.push("matrix(" + L.join(",") + ")"), g ? $.push("rotate(90) scale(-1,1)") : m && $.push("rotate(" + m + " " + n(this.rotationOriginX, z.getAttribute("x"), 0) + " " + n(this.rotationOriginY, z.getAttribute("y") || 0) + ")"), (S(E) || S(X)) && $.push("scale(" + n(E, 1) + " " + n(X, 1) + ")"), $.length && z.setAttribute("transform", $.join(" "));
- }, W.prototype.visibilitySetter = function(E, X, g) {
- E === "inherit" ? g.removeAttribute(X) : this[X] !== E && g.setAttribute(
- X,
- E
- ), this[X] = E;
- }, W.prototype.xGetter = function(E) {
- return this.element.nodeName === "circle" && (E === "x" ? E = "cx" : E === "y" && (E = "cy")), this._defaultGetter(E);
- }, W.prototype.zIndexSetter = function(E, X) {
- var g = this.renderer, m = this.parentGroup, L = (m || g).element || g.box, z = this.element;
- g = L === g.box;
- var $ = !1, Q = this.added, A;
- if (S(E) ? (z.setAttribute("data-z-index", E), E = +E, this[X] === E && (Q = !1)) : S(this[X]) && z.removeAttribute("data-z-index"), this[X] = E, Q) {
- for ((E = this.zIndex) && m && (m.handleZ = !0), X = L.childNodes, A = X.length - 1; 0 <= A && !$; A--) {
- m = X[A], Q = m.getAttribute("data-z-index");
- var H = !S(Q);
- m !== z && (0 > E && H && !g && !A ? (L.insertBefore(z, X[A]), $ = !0) : (P(Q) <= E || H && (!S(E) || 0 <= E)) && (L.insertBefore(z, X[A + 1] || null), $ = !0));
- }
- $ || (L.insertBefore(z, X[g ? 3 : 0] || null), $ = !0);
- }
- return $;
- }, W;
- }(), y.prototype["stroke-widthSetter"] = y.prototype.strokeSetter, y.prototype.yGetter = y.prototype.xGetter, y.prototype.matrixSetter = y.prototype.rotationOriginXSetter = y.prototype.rotationOriginYSetter = y.prototype.rotationSetter = y.prototype.scaleXSetter = y.prototype.scaleYSetter = y.prototype.translateXSetter = y.prototype.translateYSetter = y.prototype.verticalAlignSetter = function(W, E) {
- this[E] = W, this.doTransform = !0;
- }, y;
- }), C(o, "Core/Renderer/RendererRegistry.js", [o["Core/Globals.js"]], function(y) {
- var N;
- return function(_) {
- _.rendererTypes = {};
- var U;
- _.getRendererType = function(G) {
- return G === void 0 && (G = U), _.rendererTypes[G] || _.rendererTypes[U];
- }, _.registerRendererType = function(G, V, F) {
- _.rendererTypes[G] = V, (!U || F) && (U = G, y.Renderer = V);
- };
- }(N || (N = {})), N;
- }), C(
- o,
- "Core/Renderer/SVG/SVGLabel.js",
- [o["Core/Renderer/SVG/SVGElement.js"], o["Core/Utilities.js"]],
- function(y, N) {
- var _ = this && this.__extends || function() {
- var w = function(x, f) {
- return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(l, T) {
- l.__proto__ = T;
- } || function(l, T) {
- for (var O in T)
- T.hasOwnProperty(O) && (l[O] = T[O]);
- }, w(x, f);
- };
- return function(x, f) {
- function l() {
- this.constructor = x;
- }
- w(x, f), x.prototype = f === null ? Object.create(f) : (l.prototype = f.prototype, new l());
- };
- }(), U = N.defined, G = N.extend, V = N.isNumber, F = N.merge, B = N.pick, j = N.removeEvent;
- return function(w) {
- function x(f, l, T, O, R, k, b, S, v, h) {
- var c = w.call(this) || this;
- c.paddingLeftSetter = c.paddingSetter, c.paddingRightSetter = c.paddingSetter, c.init(f, "g"), c.textStr = l, c.x = T, c.y = O, c.anchorX = k, c.anchorY = b, c.baseline = v, c.className = h, c.addClass(h === "button" ? "highcharts-no-tooltip" : "highcharts-label"), h && c.addClass("highcharts-" + h), c.text = f.text(void 0, 0, 0, S).attr({ zIndex: 1 });
- var u;
- return typeof R == "string" && ((u = /^url\((.*?)\)$/.test(R)) || c.renderer.symbols[R]) && (c.symbolKey = R), c.bBox = x.emptyBBox, c.padding = 3, c.baselineOffset = 0, c.needsBox = f.styledMode || u, c.deferredAttr = {}, c.alignFactor = 0, c;
- }
- return _(x, w), x.prototype.alignSetter = function(f) {
- f = { left: 0, center: 0.5, right: 1 }[f], f !== this.alignFactor && (this.alignFactor = f, this.bBox && V(this.xSetting) && this.attr({ x: this.xSetting }));
- }, x.prototype.anchorXSetter = function(f, l) {
- this.anchorX = f, this.boxAttr(l, Math.round(f) - this.getCrispAdjust() - this.xSetting);
- }, x.prototype.anchorYSetter = function(f, l) {
- this.anchorY = f, this.boxAttr(l, f - this.ySetting);
- }, x.prototype.boxAttr = function(f, l) {
- this.box ? this.box.attr(f, l) : this.deferredAttr[f] = l;
- }, x.prototype.css = function(f) {
- if (f) {
- var l = {};
- f = F(f), x.textProps.forEach(function(O) {
- typeof f[O] < "u" && (l[O] = f[O], delete f[O]);
- }), this.text.css(l);
- var T = "width" in l;
- "fontSize" in l || "fontWeight" in l ? this.updateTextPadding() : T && this.updateBoxSize();
- }
- return y.prototype.css.call(this, f);
- }, x.prototype.destroy = function() {
- j(this.element, "mouseenter"), j(this.element, "mouseleave"), this.text && this.text.destroy(), this.box && (this.box = this.box.destroy()), y.prototype.destroy.call(this);
- }, x.prototype.fillSetter = function(f, l) {
- f && (this.needsBox = !0), this.fill = f, this.boxAttr(l, f);
- }, x.prototype.getBBox = function() {
- this.textStr && this.bBox.width === 0 && this.bBox.height === 0 && this.updateBoxSize();
- var f = this.padding, l = B(this.paddingLeft, f);
- return { width: this.width, height: this.height, x: this.bBox.x - l, y: this.bBox.y - f };
- }, x.prototype.getCrispAdjust = function() {
- return this.renderer.styledMode && this.box ? this.box.strokeWidth() % 2 / 2 : (this["stroke-width"] ? parseInt(
- this["stroke-width"],
- 10
- ) : 0) % 2 / 2;
- }, x.prototype.heightSetter = function(f) {
- this.heightSetting = f;
- }, x.prototype.onAdd = function() {
- var f = this.textStr;
- this.text.add(this), this.attr({ text: U(f) ? f : "", x: this.x, y: this.y }), this.box && U(this.anchorX) && this.attr({ anchorX: this.anchorX, anchorY: this.anchorY });
- }, x.prototype.paddingSetter = function(f, l) {
- V(f) ? f !== this[l] && (this[l] = f, this.updateTextPadding()) : this[l] = void 0;
- }, x.prototype.rSetter = function(f, l) {
- this.boxAttr(l, f);
- }, x.prototype.shadow = function(f) {
- return f && !this.renderer.styledMode && (this.updateBoxSize(), this.box && this.box.shadow(f)), this;
- }, x.prototype.strokeSetter = function(f, l) {
- this.stroke = f, this.boxAttr(l, f);
- }, x.prototype["stroke-widthSetter"] = function(f, l) {
- f && (this.needsBox = !0), this["stroke-width"] = f, this.boxAttr(l, f);
- }, x.prototype["text-alignSetter"] = function(f) {
- this.textAlign = f;
- }, x.prototype.textSetter = function(f) {
- typeof f < "u" && this.text.attr({ text: f }), this.updateTextPadding();
- }, x.prototype.updateBoxSize = function() {
- var f = this.text.element.style, l = {}, T = this.padding, O = this.bBox = V(this.widthSetting) && V(this.heightSetting) && !this.textAlign || !U(this.text.textStr) ? x.emptyBBox : this.text.getBBox();
- this.width = this.getPaddedWidth(), this.height = (this.heightSetting || O.height || 0) + 2 * T, f = this.renderer.fontMetrics(f && f.fontSize, this.text), this.baselineOffset = T + Math.min((this.text.firstLineMetrics || f).b, O.height || 1 / 0), this.heightSetting && (this.baselineOffset += (this.heightSetting - f.h) / 2), this.needsBox && (this.box || (T = this.box = this.symbolKey ? this.renderer.symbol(this.symbolKey) : this.renderer.rect(), T.addClass((this.className === "button" ? "" : "highcharts-label-box") + (this.className ? " highcharts-" + this.className + "-box" : "")), T.add(this)), T = this.getCrispAdjust(), l.x = T, l.y = (this.baseline ? -this.baselineOffset : 0) + T, l.width = Math.round(this.width), l.height = Math.round(this.height), this.box.attr(G(l, this.deferredAttr)), this.deferredAttr = {});
- }, x.prototype.updateTextPadding = function() {
- var f = this.text;
- this.updateBoxSize();
- var l = this.baseline ? 0 : this.baselineOffset, T = B(this.paddingLeft, this.padding);
- U(this.widthSetting) && this.bBox && (this.textAlign === "center" || this.textAlign === "right") && (T += { center: 0.5, right: 1 }[this.textAlign] * (this.widthSetting - this.bBox.width)), (T !== f.x || l !== f.y) && (f.attr("x", T), f.hasBoxWidthChanged && (this.bBox = f.getBBox(!0)), typeof l < "u" && f.attr("y", l)), f.x = T, f.y = l;
- }, x.prototype.widthSetter = function(f) {
- this.widthSetting = V(f) ? f : void 0;
- }, x.prototype.getPaddedWidth = function() {
- var f = this.padding, l = B(this.paddingLeft, f);
- return f = B(this.paddingRight, f), (this.widthSetting || this.bBox.width || 0) + l + f;
- }, x.prototype.xSetter = function(f) {
- this.x = f, this.alignFactor && (f -= this.alignFactor * this.getPaddedWidth(), this["forceAnimate:x"] = !0), this.xSetting = Math.round(f), this.attr("translateX", this.xSetting);
- }, x.prototype.ySetter = function(f) {
- this.ySetting = this.y = Math.round(f), this.attr("translateY", this.ySetting);
- }, x.emptyBBox = { width: 0, height: 0, x: 0, y: 0 }, x.textProps = "color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" "), x;
- }(y);
- }
- ), C(
- o,
- "Core/Renderer/SVG/Symbols.js",
- [o["Core/Utilities.js"]],
- function(y) {
- function N(B, j, w, x, f) {
- var l = [];
- if (f) {
- var T = f.start || 0, O = F(f.r, w);
- w = F(f.r, x || w);
- var R = (f.end || 0) - 1e-3;
- x = f.innerR;
- var k = F(f.open, 1e-3 > Math.abs((f.end || 0) - T - 2 * Math.PI)), b = Math.cos(T), S = Math.sin(T), v = Math.cos(R), h = Math.sin(R);
- T = F(f.longArc, 1e-3 > R - T - Math.PI ? 0 : 1), l.push(["M", B + O * b, j + w * S], ["A", O, w, 0, T, F(f.clockwise, 1), B + O * v, j + w * h]), G(x) && l.push(k ? ["M", B + x * v, j + x * h] : ["L", B + x * v, j + x * h], ["A", x, x, 0, T, G(f.clockwise) ? 1 - f.clockwise : 0, B + x * b, j + x * S]), k || l.push(["Z"]);
- }
- return l;
- }
- function _(B, j, w, x, f) {
- return f && f.r ? U(B, j, w, x, f) : [["M", B, j], ["L", B + w, j], ["L", B + w, j + x], ["L", B, j + x], ["Z"]];
- }
- function U(B, j, w, x, f) {
- return f = f && f.r || 0, [["M", B + f, j], ["L", B + w - f, j], ["C", B + w, j, B + w, j, B + w, j + f], ["L", B + w, j + x - f], ["C", B + w, j + x, B + w, j + x, B + w - f, j + x], ["L", B + f, j + x], ["C", B, j + x, B, j + x, B, j + x - f], ["L", B, j + f], ["C", B, j, B, j, B + f, j]];
- }
- var G = y.defined, V = y.isNumber, F = y.pick;
- return { arc: N, callout: function(B, j, w, x, f) {
- var l = Math.min(f && f.r || 0, w, x), T = l + 6, O = f && f.anchorX;
- f = f && f.anchorY || 0;
- var R = U(B, j, w, x, { r: l });
- return V(O) && (B + O >= w ? f > j + T && f < j + x - T ? R.splice(3, 1, ["L", B + w, f - 6], ["L", B + w + 6, f], ["L", B + w, f + 6], ["L", B + w, j + x - l]) : R.splice(3, 1, ["L", B + w, x / 2], ["L", O, f], ["L", B + w, x / 2], ["L", B + w, j + x - l]) : 0 >= B + O ? f > j + T && f < j + x - T ? R.splice(7, 1, ["L", B, f + 6], ["L", B - 6, f], ["L", B, f - 6], ["L", B, j + l]) : R.splice(7, 1, ["L", B, x / 2], ["L", O, f], ["L", B, x / 2], ["L", B, j + l]) : f && f > x && O > B + T && O < B + w - T ? R.splice(5, 1, ["L", O + 6, j + x], ["L", O, j + x + 6], ["L", O - 6, j + x], ["L", B + l, j + x]) : f && 0 > f && O > B + T && O < B + w - T && R.splice(1, 1, ["L", O - 6, j], ["L", O, j - 6], ["L", O + 6, j], ["L", w - l, j])), R;
- }, circle: function(B, j, w, x) {
- return N(B + w / 2, j + x / 2, w / 2, x / 2, { start: 0.5 * Math.PI, end: 2.5 * Math.PI, open: !1 });
- }, diamond: function(B, j, w, x) {
- return [["M", B + w / 2, j], ["L", B + w, j + x / 2], ["L", B + w / 2, j + x], ["L", B, j + x / 2], ["Z"]];
- }, rect: _, roundedRect: U, square: _, triangle: function(B, j, w, x) {
- return [["M", B + w / 2, j], ["L", B + w, j + x], ["L", B, j + x], ["Z"]];
- }, "triangle-down": function(B, j, w, x) {
- return [["M", B, j], ["L", B + w, j], ["L", B + w / 2, j + x], ["Z"]];
- } };
- }
- ), C(o, "Core/Renderer/SVG/TextBuilder.js", [o["Core/Renderer/HTML/AST.js"], o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N, _) {
- var U = N.doc, G = N.SVG_NS, V = N.win, F = _.attr, B = _.isString, j = _.objectEach, w = _.pick;
- return function() {
- function x(f) {
- var l = f.styles;
- this.renderer = f.renderer, this.svgElement = f, this.width = f.textWidth, this.textLineHeight = l && l.lineHeight, this.textOutline = l && l.textOutline, this.ellipsis = !(!l || l.textOverflow !== "ellipsis"), this.noWrap = !(!l || l.whiteSpace !== "nowrap"), this.fontSize = l && l.fontSize;
- }
- return x.prototype.buildSVG = function() {
- var f = this.svgElement, l = f.element, T = f.renderer, O = w(f.textStr, "").toString(), R = O.indexOf("<") !== -1, k = l.childNodes;
- T = this.width && !f.added && T.box;
- var b = /<br.*?>/g, S = [O, this.ellipsis, this.noWrap, this.textLineHeight, this.textOutline, this.fontSize, this.width].join();
- if (S !== f.textCache) {
- for (f.textCache = S, delete f.actualWidth, S = k.length; S--; )
- l.removeChild(k[S]);
- R || this.ellipsis || this.width || O.indexOf(" ") !== -1 && (!this.noWrap || b.test(O)) ? O !== "" && (T && T.appendChild(l), O = new y(O), this.modifyTree(O.nodes), O.addToDOM(f.element), this.modifyDOM(), this.ellipsis && (l.textContent || "").indexOf("…") !== -1 && f.attr(
- "title",
- this.unescapeEntities(f.textStr || "", ["<", ">"])
- ), T && T.removeChild(l)) : l.appendChild(U.createTextNode(this.unescapeEntities(O))), B(this.textOutline) && f.applyTextOutline && f.applyTextOutline(this.textOutline);
- }
- }, x.prototype.modifyDOM = function() {
- var f = this, l = this.svgElement, T = F(l.element, "x");
- l.firstLineMetrics = void 0;
- for (var O; (O = l.element.firstChild) && /^[\s\u200B]*$/.test(O.textContent || " "); )
- l.element.removeChild(O);
- [].forEach.call(l.element.querySelectorAll("tspan.highcharts-br"), function(S, v) {
- S.nextSibling && S.previousSibling && (v === 0 && S.previousSibling.nodeType === 1 && (l.firstLineMetrics = l.renderer.fontMetrics(void 0, S.previousSibling)), F(S, { dy: f.getLineHeight(S.nextSibling), x: T }));
- });
- var R = this.width || 0;
- if (R) {
- var k = function(S, v) {
- var h = S.textContent || "", c = h.replace(/([^\^])-/g, "$1- ").split(" "), u = !f.noWrap && (1 < c.length || 1 < l.element.childNodes.length), i = f.getLineHeight(v), p = 0, a = l.actualWidth;
- if (f.ellipsis)
- h && f.truncate(S, h, void 0, 0, Math.max(0, R - parseInt(f.fontSize || 12, 10)), function(t, s) {
- return t.substring(
- 0,
- s
- ) + "…";
- });
- else if (u) {
- for (h = [], u = []; v.firstChild && v.firstChild !== S; )
- u.push(v.firstChild), v.removeChild(v.firstChild);
- for (; c.length; )
- c.length && !f.noWrap && 0 < p && (h.push(S.textContent || ""), S.textContent = c.join(" ").replace(/- /g, "-")), f.truncate(S, void 0, c, p === 0 && a || 0, R, function(t, s) {
- return c.slice(0, s).join(" ").replace(/- /g, "-");
- }), a = l.actualWidth, p++;
- u.forEach(function(t) {
- v.insertBefore(t, S);
- }), h.forEach(function(t) {
- v.insertBefore(U.createTextNode(t), S), t = U.createElementNS(G, "tspan"), t.textContent = "", F(t, { dy: i, x: T }), v.insertBefore(t, S);
- });
- }
- }, b = function(S) {
- [].slice.call(S.childNodes).forEach(function(v) {
- v.nodeType === V.Node.TEXT_NODE ? k(v, S) : (v.className.baseVal.indexOf("highcharts-br") !== -1 && (l.actualWidth = 0), b(v));
- });
- };
- b(l.element);
- }
- }, x.prototype.getLineHeight = function(f) {
- var l;
- return f = f.nodeType === V.Node.TEXT_NODE ? f.parentElement : f, this.renderer.styledMode || (l = f && /(px|em)$/.test(f.style.fontSize) ? f.style.fontSize : this.fontSize || this.renderer.style.fontSize || 12), this.textLineHeight ? parseInt(
- this.textLineHeight.toString(),
- 10
- ) : this.renderer.fontMetrics(l, f || this.svgElement.element).h;
- }, x.prototype.modifyTree = function(f) {
- var l = this, T = function(O, R) {
- var k = O.attributes;
- k = k === void 0 ? {} : k;
- var b = O.children, S = O.tagName, v = l.renderer.styledMode;
- S === "b" || S === "strong" ? v ? k.class = "highcharts-strong" : k.style = "font-weight:bold;" + (k.style || "") : (S === "i" || S === "em") && (v ? k.class = "highcharts-emphasized" : k.style = "font-style:italic;" + (k.style || "")), B(k.style) && (k.style = k.style.replace(/(;| |^)color([ :])/, "$1fill$2")), S === "br" ? (k.class = "highcharts-br", O.textContent = "", (R = f[R + 1]) && R.textContent && (R.textContent = R.textContent.replace(/^ +/gm, ""))) : S === "a" && b && b.some(function(h) {
- return h.tagName === "#text";
- }) && (O.children = [{ children: b, tagName: "tspan" }]), S !== "#text" && S !== "a" && (O.tagName = "tspan"), O.attributes = k, b && b.filter(function(h) {
- return h.tagName !== "#text";
- }).forEach(T);
- };
- f.forEach(T);
- }, x.prototype.truncate = function(f, l, T, O, R, k) {
- var b = this.svgElement, S = b.renderer, v = b.rotation, h = [], c = T ? 1 : 0, u = (l || T || "").length, i = u, p, a = function(s, n) {
- n = n || s;
- var P = f.parentNode;
- if (P && typeof h[n] > "u")
- if (P.getSubStringLength)
- try {
- h[n] = O + P.getSubStringLength(0, T ? n + 1 : n);
- } catch {
- }
- else
- S.getSpanWidth && (f.textContent = k(l || T, s), h[n] = O + S.getSpanWidth(b, f));
- return h[n];
- };
- b.rotation = 0;
- var t = a(f.textContent.length);
- if (O + t > R) {
- for (; c <= u; )
- i = Math.ceil((c + u) / 2), T && (p = k(T, i)), t = a(i, p && p.length - 1), c === u ? c = u + 1 : t > R ? u = i - 1 : c = i;
- u === 0 ? f.textContent = "" : l && u === l.length - 1 || (f.textContent = p || k(l || T, i));
- }
- T && T.splice(0, i), b.actualWidth = t, b.rotation = v;
- }, x.prototype.unescapeEntities = function(f, l) {
- return j(this.renderer.escapes, function(T, O) {
- l && l.indexOf(T) !== -1 || (f = f.toString().replace(new RegExp(T, "g"), O));
- }), f;
- }, x;
- }();
- }), C(o, "Core/Renderer/SVG/SVGRenderer.js", [o["Core/Renderer/HTML/AST.js"], o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Renderer/RendererRegistry.js"], o["Core/Renderer/SVG/SVGElement.js"], o["Core/Renderer/SVG/SVGLabel.js"], o["Core/Renderer/SVG/Symbols.js"], o["Core/Renderer/SVG/TextBuilder.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V, F, B, j) {
- var w = _.charts, x = _.deg2rad, f = _.doc, l = _.isFirefox, T = _.isMS, O = _.isWebKit, R = _.noop, k = _.SVG_NS, b = _.symbolSizes, S = _.win, v = j.addEvent, h = j.attr, c = j.createElement, u = j.css, i = j.defined, p = j.destroyObjectProperties, a = j.extend, t = j.isArray, s = j.isNumber, n = j.isObject, P = j.isString, D = j.merge, I = j.pick, W = j.pInt, E = j.uniqueKey, X;
- return _ = function() {
- function g(m, L, z, $, Q, A, H) {
- this.width = this.url = this.style = this.isSVG = this.imgCount = this.height = this.gradients = this.globalAnimation = this.defs = this.chartIndex = this.cacheKeys = this.cache = this.boxWrapper = this.box = this.alignedObjects = void 0, this.init(m, L, z, $, Q, A, H);
- }
- return g.prototype.init = function(m, L, z, $, Q, A, H) {
- var Y = this.createElement("svg").attr({ version: "1.1", class: "highcharts-root" }), Z = Y.element;
- H || Y.css(this.getStyle($)), m.appendChild(Z), h(m, "dir", "ltr"), m.innerHTML.indexOf("xmlns") === -1 && h(Z, "xmlns", this.SVG_NS), this.isSVG = !0, this.box = Z, this.boxWrapper = Y, this.alignedObjects = [], this.url = this.getReferenceURL(), this.createElement("desc").add().element.appendChild(f.createTextNode("Created with Highcharts 9.3.3")), this.defs = this.createElement("defs").add(), this.allowHTML = A, this.forExport = Q, this.styledMode = H, this.gradients = {}, this.cache = {}, this.cacheKeys = [], this.imgCount = 0, this.setSize(L, z, !1);
- var q;
- l && m.getBoundingClientRect && (L = function() {
- u(m, { left: 0, top: 0 }), q = m.getBoundingClientRect(), u(m, { left: Math.ceil(q.left) - q.left + "px", top: Math.ceil(q.top) - q.top + "px" });
- }, L(), this.unSubPixelFix = v(S, "resize", L));
- }, g.prototype.definition = function(m) {
- return new y([m]).addToDOM(this.defs.element);
- }, g.prototype.getReferenceURL = function() {
- if ((l || O) && f.getElementsByTagName("base").length) {
- if (!i(X)) {
- var m = E();
- m = new y([{ tagName: "svg", attributes: { width: 8, height: 8 }, children: [{ tagName: "defs", children: [{ tagName: "clipPath", attributes: { id: m }, children: [{ tagName: "rect", attributes: { width: 4, height: 4 } }] }] }, { tagName: "rect", attributes: { id: "hitme", width: 8, height: 8, "clip-path": "url(#" + m + ")", fill: "rgba(0,0,0,0.001)" } }] }]).addToDOM(f.body), u(m, { position: "fixed", top: 0, left: 0, zIndex: 9e5 });
- var L = f.elementFromPoint(6, 6);
- X = (L && L.id) === "hitme", f.body.removeChild(m);
- }
- if (X)
- return S.location.href.split("#")[0].replace(/<[^>]*>/g, "").replace(/([\('\)])/g, "\\$1").replace(/ /g, "%20");
- }
- return "";
- }, g.prototype.getStyle = function(m) {
- return this.style = a({ fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif', fontSize: "12px" }, m);
- }, g.prototype.setStyle = function(m) {
- this.boxWrapper.css(this.getStyle(m));
- }, g.prototype.isHidden = function() {
- return !this.boxWrapper.getBBox().width;
- }, g.prototype.destroy = function() {
- var m = this.defs;
- return this.box = null, this.boxWrapper = this.boxWrapper.destroy(), p(this.gradients || {}), this.gradients = null, m && (this.defs = m.destroy()), this.unSubPixelFix && this.unSubPixelFix(), this.alignedObjects = null;
- }, g.prototype.createElement = function(m) {
- var L = new this.Element();
- return L.init(this, m), L;
- }, g.prototype.getRadialAttr = function(m, L) {
- return { cx: m[0] - m[2] / 2 + (L.cx || 0) * m[2], cy: m[1] - m[2] / 2 + (L.cy || 0) * m[2], r: (L.r || 0) * m[2] };
- }, g.prototype.buildText = function(m) {
- new B(m).buildSVG();
- }, g.prototype.getContrast = function(m) {
- return m = N.parse(m).rgba, m[0] *= 1, m[1] *= 1.2, m[2] *= 0.5, 459 < m[0] + m[1] + m[2] ? "#000000" : "#FFFFFF";
- }, g.prototype.button = function(m, L, z, $, Q, A, H, Y, Z, q) {
- var it = this.label(m, L, z, Z, void 0, void 0, q, void 0, "button"), et = this.styledMode, nt = 0, rt = Q ? D(Q) : {};
- if (m = rt && rt.style || {}, rt = y.filterUserAttributes(rt), it.attr(D({ padding: 8, r: 2 }, rt)), !et) {
- rt = D({ fill: "#f7f7f7", stroke: "#cccccc", "stroke-width": 1, style: { color: "#333333", cursor: "pointer", fontWeight: "normal" } }, { style: m }, rt);
- var ct = rt.style;
- delete rt.style, A = D(rt, { fill: "#e6e6e6" }, y.filterUserAttributes(A || {}));
- var gt = A.style;
- delete A.style, H = D(rt, { fill: "#e6ebf5", style: { color: "#000000", fontWeight: "bold" } }, y.filterUserAttributes(H || {}));
- var dt = H.style;
- delete H.style, Y = D(rt, { style: { color: "#cccccc" } }, y.filterUserAttributes(Y || {}));
- var ht = Y.style;
- delete Y.style;
- }
- return v(it.element, T ? "mouseover" : "mouseenter", function() {
- nt !== 3 && it.setState(1);
- }), v(it.element, T ? "mouseout" : "mouseleave", function() {
- nt !== 3 && it.setState(nt);
- }), it.setState = function(at) {
- at !== 1 && (it.state = nt = at), it.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-" + ["normal", "hover", "pressed", "disabled"][at || 0]), et || it.attr([rt, A, H, Y][at || 0]).css([ct, gt, dt, ht][at || 0]);
- }, et || it.attr(rt).css(a({ cursor: "default" }, ct)), it.on("touchstart", function(at) {
- return at.stopPropagation();
- }).on("click", function(at) {
- nt !== 3 && $.call(it, at);
- });
- }, g.prototype.crispLine = function(m, L, z) {
- z === void 0 && (z = "round");
- var $ = m[0], Q = m[1];
- return i($[1]) && $[1] === Q[1] && ($[1] = Q[1] = Math[z]($[1]) - L % 2 / 2), i($[2]) && $[2] === Q[2] && ($[2] = Q[2] = Math[z]($[2]) + L % 2 / 2), m;
- }, g.prototype.path = function(m) {
- var L = this.styledMode ? {} : { fill: "none" };
- return t(m) ? L.d = m : n(m) && a(L, m), this.createElement("path").attr(L);
- }, g.prototype.circle = function(m, L, z) {
- return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, r: z }, L = this.createElement("circle"), L.xSetter = L.ySetter = function($, Q, A) {
- A.setAttribute("c" + Q, $);
- }, L.attr(m);
- }, g.prototype.arc = function(m, L, z, $, Q, A) {
- return n(m) ? ($ = m, L = $.y, z = $.r, m = $.x) : $ = { innerR: $, start: Q, end: A }, m = this.symbol("arc", m, L, z, z, $), m.r = z, m;
- }, g.prototype.rect = function(m, L, z, $, Q, A) {
- Q = n(m) ? m.r : Q;
- var H = this.createElement("rect");
- return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, width: Math.max(z, 0), height: Math.max($, 0) }, this.styledMode || (typeof A < "u" && (m["stroke-width"] = A, m = H.crisp(m)), m.fill = "none"), Q && (m.r = Q), H.rSetter = function(Y, Z, q) {
- H.r = Y, h(q, { rx: Y, ry: Y });
- }, H.rGetter = function() {
- return H.r || 0;
- }, H.attr(m);
- }, g.prototype.setSize = function(m, L, z) {
- this.width = m, this.height = L, this.boxWrapper.animate({ width: m, height: L }, { step: function() {
- this.attr({ viewBox: "0 0 " + this.attr("width") + " " + this.attr("height") });
- }, duration: I(
- z,
- !0
- ) ? void 0 : 0 }), this.alignElements();
- }, g.prototype.g = function(m) {
- var L = this.createElement("g");
- return m ? L.attr({ class: "highcharts-" + m }) : L;
- }, g.prototype.image = function(m, L, z, $, Q, A) {
- var H = { preserveAspectRatio: "none" }, Y = function(q, it) {
- q.setAttributeNS ? q.setAttributeNS("http://www.w3.org/1999/xlink", "href", it) : q.setAttribute("hc-svg-href", it);
- };
- s(L) && (H.x = L), s(z) && (H.y = z), s($) && (H.width = $), s(Q) && (H.height = Q);
- var Z = this.createElement("image").attr(H);
- return L = function(q) {
- Y(Z.element, m), A.call(Z, q);
- }, A ? (Y(
- Z.element,
- "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
- ), z = new S.Image(), v(z, "load", L), z.src = m, z.complete && L({})) : Y(Z.element, m), Z;
- }, g.prototype.symbol = function(m, L, z, $, Q, A) {
- var H = this, Y = /^url\((.*?)\)$/, Z = Y.test(m), q = !Z && (this.symbols[m] ? m : "circle"), it = q && this.symbols[q], et;
- if (it) {
- typeof L == "number" && (et = it.call(this.symbols, Math.round(L || 0), Math.round(z || 0), $ || 0, Q || 0, A));
- var nt = this.path(et);
- H.styledMode || nt.attr("fill", "none"), a(nt, { symbolName: q || void 0, x: L, y: z, width: $, height: Q }), A && a(nt, A);
- } else if (Z) {
- var rt = m.match(Y)[1], ct = nt = this.image(rt);
- ct.imgwidth = I(b[rt] && b[rt].width, A && A.width), ct.imgheight = I(b[rt] && b[rt].height, A && A.height);
- var gt = function(dt) {
- return dt.attr({ width: dt.width, height: dt.height });
- };
- ["width", "height"].forEach(function(dt) {
- ct[dt + "Setter"] = function(ht, at) {
- var J = this["img" + at];
- this[at] = ht, i(J) && (A && A.backgroundSize === "within" && this.width && this.height && (J = Math.round(J * Math.min(this.width / this.imgwidth, this.height / this.imgheight))), this.element && this.element.setAttribute(at, J), this.alignByTranslate || (ht = ((this[at] || 0) - J) / 2, this.attr(at === "width" ? { translateX: ht } : { translateY: ht })));
- };
- }), i(L) && ct.attr({ x: L, y: z }), ct.isImg = !0, i(ct.imgwidth) && i(ct.imgheight) ? gt(ct) : (ct.attr({ width: 0, height: 0 }), c("img", { onload: function() {
- var dt = w[H.chartIndex];
- this.width === 0 && (u(this, { position: "absolute", top: "-999em" }), f.body.appendChild(this)), b[rt] = { width: this.width, height: this.height }, ct.imgwidth = this.width, ct.imgheight = this.height, ct.element && gt(ct), this.parentNode && this.parentNode.removeChild(this), H.imgCount--, !H.imgCount && dt && !dt.hasLoaded && dt.onload();
- }, src: rt }), this.imgCount++);
- }
- return nt;
- }, g.prototype.clipRect = function(m, L, z, $) {
- var Q = E() + "-", A = this.createElement("clipPath").attr({ id: Q }).add(this.defs);
- return m = this.rect(m, L, z, $, 0).add(A), m.id = Q, m.clipPath = A, m.count = 0, m;
- }, g.prototype.text = function(m, L, z, $) {
- var Q = {};
- return $ && (this.allowHTML || !this.forExport) ? this.html(m, L, z) : (Q.x = Math.round(L || 0), z && (Q.y = Math.round(z)), i(m) && (Q.text = m), m = this.createElement("text").attr(Q), (!$ || this.forExport && !this.allowHTML) && (m.xSetter = function(A, H, Y) {
- for (var Z = Y.getElementsByTagName("tspan"), q = Y.getAttribute(H), it = 0, et; it < Z.length; it++)
- et = Z[it], et.getAttribute(H) === q && et.setAttribute(H, A);
- Y.setAttribute(H, A);
- }), m);
- }, g.prototype.fontMetrics = function(m, L) {
- return m = !this.styledMode && /px/.test(m) || !S.getComputedStyle ? m || L && L.style && L.style.fontSize || this.style && this.style.fontSize : L && G.prototype.getStyle.call(L, "font-size"), m = /px/.test(m) ? W(m) : 12, L = 24 > m ? m + 3 : Math.round(1.2 * m), { h: L, b: Math.round(0.8 * L), f: m };
- }, g.prototype.rotCorr = function(m, L, z) {
- var $ = m;
- return L && z && ($ = Math.max($ * Math.cos(L * x), 4)), { x: -m / 3 * Math.sin(L * x), y: $ };
- }, g.prototype.pathToSegments = function(m) {
- for (var L = [], z = [], $ = { A: 8, C: 7, H: 2, L: 3, M: 3, Q: 5, S: 5, T: 3, V: 2 }, Q = 0; Q < m.length; Q++)
- P(z[0]) && s(m[Q]) && z.length === $[z[0].toUpperCase()] && m.splice(Q, 0, z[0].replace("M", "L").replace("m", "l")), typeof m[Q] == "string" && (z.length && L.push(z.slice(0)), z.length = 0), z.push(m[Q]);
- return L.push(z.slice(0)), L;
- }, g.prototype.label = function(m, L, z, $, Q, A, H, Y, Z) {
- return new V(this, m, L, z, $, Q, A, H, Y, Z);
- }, g.prototype.alignElements = function() {
- this.alignedObjects.forEach(function(m) {
- return m.align();
- });
- }, g;
- }(), a(_.prototype, { Element: G, SVG_NS: k, escapes: { "&": "&", "<": "<", ">": ">", "'": "'", '"': """ }, symbols: F, draw: R }), U.registerRendererType("svg", _, !0), _;
- }), C(o, "Core/Renderer/HTML/HTMLElement.js", [o["Core/Globals.js"], o["Core/Renderer/SVG/SVGElement.js"], o["Core/Utilities.js"]], function(y, N, _) {
- var U = this && this.__extends || function() {
- var T = function(O, R) {
- return T = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(k, b) {
- k.__proto__ = b;
- } || function(k, b) {
- for (var S in b)
- b.hasOwnProperty(S) && (k[S] = b[S]);
- }, T(O, R);
- };
- return function(O, R) {
- function k() {
- this.constructor = O;
- }
- T(O, R), O.prototype = R === null ? Object.create(R) : (k.prototype = R.prototype, new k());
- };
- }(), G = y.isFirefox, V = y.isMS, F = y.isWebKit, B = y.win, j = _.css, w = _.defined, x = _.extend, f = _.pick, l = _.pInt;
- return function(T) {
- function O() {
- return T !== null && T.apply(this, arguments) || this;
- }
- return U(O, T), O.compose = function(R) {
- if (O.composedClasses.indexOf(R) === -1) {
- O.composedClasses.push(R);
- var k = O.prototype, b = R.prototype;
- b.getSpanCorrection = k.getSpanCorrection, b.htmlCss = k.htmlCss, b.htmlGetBBox = k.htmlGetBBox, b.htmlUpdateTransform = k.htmlUpdateTransform, b.setSpanRotation = k.setSpanRotation;
- }
- return R;
- }, O.prototype.getSpanCorrection = function(R, k, b) {
- this.xCorr = -R * b, this.yCorr = -k;
- }, O.prototype.htmlCss = function(R) {
- var k = this.element.tagName === "SPAN" && R && "width" in R, b = f(k && R.width, void 0);
- if (k) {
- delete R.width, this.textWidth = b;
- var S = !0;
- }
- return R && R.textOverflow === "ellipsis" && (R.whiteSpace = "nowrap", R.overflow = "hidden"), this.styles = x(this.styles, R), j(this.element, R), S && this.htmlUpdateTransform(), this;
- }, O.prototype.htmlGetBBox = function() {
- var R = this.element;
- return { x: R.offsetLeft, y: R.offsetTop, width: R.offsetWidth, height: R.offsetHeight };
- }, O.prototype.htmlUpdateTransform = function() {
- if (this.added) {
- var R = this.renderer, k = this.element, b = this.translateX || 0, S = this.translateY || 0, v = this.x || 0, h = this.y || 0, c = this.textAlign || "left", u = { left: 0, center: 0.5, right: 1 }[c], i = this.styles;
- if (i = i && i.whiteSpace, j(k, { marginLeft: b, marginTop: S }), !R.styledMode && this.shadows && this.shadows.forEach(function(P) {
- j(P, { marginLeft: b + 1, marginTop: S + 1 });
- }), this.inverted && [].forEach.call(k.childNodes, function(P) {
- R.invertChild(P, k);
- }), k.tagName === "SPAN") {
- var p = this.rotation, a = this.textWidth && l(this.textWidth), t = [p, c, k.innerHTML, this.textWidth, this.textAlign].join(), s = void 0;
- if (s = !1, a !== this.oldTextWidth) {
- if (this.textPxLength)
- var n = this.textPxLength;
- else
- j(k, { width: "", whiteSpace: i || "nowrap" }), n = k.offsetWidth;
- (a > this.oldTextWidth || n > a) && (/[ \-]/.test(k.textContent || k.innerText) || k.style.textOverflow === "ellipsis") && (j(k, { width: n > a || p ? a + "px" : "auto", display: "block", whiteSpace: i || "normal" }), this.oldTextWidth = a, s = !0);
- }
- this.hasBoxWidthChanged = s, t !== this.cTT && (s = R.fontMetrics(k.style.fontSize, k).b, !w(p) || p === (this.oldRotation || 0) && c === this.oldAlign || this.setSpanRotation(p, u, s), this.getSpanCorrection(!w(p) && this.textPxLength || k.offsetWidth, s, u, p, c)), j(k, { left: v + (this.xCorr || 0) + "px", top: h + (this.yCorr || 0) + "px" }), this.cTT = t, this.oldRotation = p, this.oldAlign = c;
- }
- } else
- this.alignOnAdd = !0;
- }, O.prototype.setSpanRotation = function(R, k, b) {
- var S = {}, v = V && !/Edge/.test(B.navigator.userAgent) ? "-ms-transform" : F ? "-webkit-transform" : G ? "MozTransform" : B.opera ? "-o-transform" : void 0;
- v && (S[v] = S.transform = "rotate(" + R + "deg)", S[v + (G ? "Origin" : "-origin")] = S.transformOrigin = 100 * k + "% " + b + "px", j(this.element, S));
- }, O.composedClasses = [], O;
- }(N);
- }), C(
- o,
- "Core/Renderer/HTML/HTMLRenderer.js",
- [o["Core/Renderer/HTML/AST.js"], o["Core/Renderer/SVG/SVGElement.js"], o["Core/Renderer/SVG/SVGRenderer.js"], o["Core/Utilities.js"]],
- function(y, N, _, U) {
- var G = this && this.__extends || function() {
- var w = function(x, f) {
- return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(l, T) {
- l.__proto__ = T;
- } || function(l, T) {
- for (var O in T)
- T.hasOwnProperty(O) && (l[O] = T[O]);
- }, w(x, f);
- };
- return function(x, f) {
- function l() {
- this.constructor = x;
- }
- w(x, f), x.prototype = f === null ? Object.create(f) : (l.prototype = f.prototype, new l());
- };
- }(), V = U.attr, F = U.createElement, B = U.extend, j = U.pick;
- return function(w) {
- function x() {
- return w !== null && w.apply(this, arguments) || this;
- }
- return G(x, w), x.compose = function(f) {
- return x.composedClasses.indexOf(f) === -1 && (x.composedClasses.push(f), f.prototype.html = x.prototype.html), f;
- }, x.prototype.html = function(f, l, T) {
- var O = this.createElement("span"), R = O.element, k = O.renderer, b = k.isSVG, S = function(v, h) {
- ["opacity", "visibility"].forEach(function(c) {
- v[c + "Setter"] = function(u, i, p) {
- var a = v.div ? v.div.style : h;
- N.prototype[c + "Setter"].call(this, u, i, p), a && (a[i] = u);
- };
- }), v.addedSetters = !0;
- };
- return O.textSetter = function(v) {
- v !== this.textStr && (delete this.bBox, delete this.oldTextWidth, y.setElementHTML(this.element, j(v, "")), this.textStr = v, O.doTransform = !0);
- }, b && S(O, O.element.style), O.xSetter = O.ySetter = O.alignSetter = O.rotationSetter = function(v, h) {
- h === "align" ? O.alignValue = O.textAlign = v : O[h] = v, O.doTransform = !0;
- }, O.afterSetters = function() {
- this.doTransform && (this.htmlUpdateTransform(), this.doTransform = !1);
- }, O.attr({ text: f, x: Math.round(l), y: Math.round(T) }).css({ position: "absolute" }), k.styledMode || O.css({ fontFamily: this.style.fontFamily, fontSize: this.style.fontSize }), R.style.whiteSpace = "nowrap", O.css = O.htmlCss, b && (O.add = function(v) {
- var h = k.box.parentNode, c = [];
- if (this.parentGroup = v) {
- var u = v.div;
- if (!u) {
- for (; v; )
- c.push(v), v = v.parentGroup;
- c.reverse().forEach(function(i) {
- function p(n, P) {
- i[P] = n, P === "translateX" ? s.left = n + "px" : s.top = n + "px", i.doTransform = !0;
- }
- var a = V(i.element, "class"), t = i.styles || {};
- u = i.div = i.div || F("div", a ? { className: a } : void 0, {
- position: "absolute",
- left: (i.translateX || 0) + "px",
- top: (i.translateY || 0) + "px",
- display: i.display,
- opacity: i.opacity,
- cursor: t.cursor,
- pointerEvents: t.pointerEvents,
- visibility: i.visibility
- }, u || h);
- var s = u.style;
- B(i, { classSetter: function(n) {
- return function(P) {
- this.element.setAttribute("class", P), n.className = P;
- };
- }(u), on: function() {
- return c[0].div && O.on.apply({ element: c[0].div, onEvents: i.onEvents }, arguments), i;
- }, translateXSetter: p, translateYSetter: p }), i.addedSetters || S(i);
- });
- }
- } else
- u = h;
- return u.appendChild(R), O.added = !0, O.alignOnAdd && O.htmlUpdateTransform(), O;
- }), O;
- }, x.composedClasses = [], x;
- }(_);
- }
- ), C(o, "Core/Axis/AxisDefaults.js", [], function() {
- var y;
- return function(N) {
- N.defaultXAxisOptions = { alignTicks: !0, allowDecimals: void 0, panningEnabled: !0, zIndex: 2, zoomEnabled: !0, dateTimeLabelFormats: { millisecond: { main: "%H:%M:%S.%L", range: !1 }, second: { main: "%H:%M:%S", range: !1 }, minute: { main: "%H:%M", range: !1 }, hour: { main: "%H:%M", range: !1 }, day: { main: "%e. %b" }, week: { main: "%e. %b" }, month: { main: "%b '%y" }, year: { main: "%Y" } }, endOnTick: !1, gridLineDashStyle: "Solid", gridZIndex: 1, labels: {
- autoRotation: void 0,
- autoRotationLimit: 80,
- distance: void 0,
- enabled: !0,
- indentation: 10,
- overflow: "justify",
- padding: 5,
- reserveSpace: void 0,
- rotation: void 0,
- staggerLines: 0,
- step: 0,
- useHTML: !1,
- x: 0,
- zIndex: 7,
- style: { color: "#666666", cursor: "default", fontSize: "11px" }
- }, maxPadding: 0.01, minorGridLineDashStyle: "Solid", minorTickLength: 2, minorTickPosition: "outside", minPadding: 0.01, offset: void 0, opposite: !1, reversed: void 0, reversedStacks: !1, showEmpty: !0, showFirstLabel: !0, showLastLabel: !0, startOfWeek: 1, startOnTick: !1, tickLength: 10, tickPixelInterval: 100, tickmarkPlacement: "between", tickPosition: "outside", title: {
- align: "middle",
- rotation: 0,
- useHTML: !1,
- x: 0,
- y: 0,
- style: { color: "#666666" }
- }, type: "linear", uniqueNames: !0, visible: !0, minorGridLineColor: "#f2f2f2", minorGridLineWidth: 1, minorTickColor: "#999999", lineColor: "#ccd6eb", lineWidth: 1, gridLineColor: "#e6e6e6", gridLineWidth: void 0, tickColor: "#ccd6eb" }, N.defaultYAxisOptions = { reversedStacks: !0, endOnTick: !0, maxPadding: 0.05, minPadding: 0.05, tickPixelInterval: 72, showLastLabel: !0, labels: { x: -8 }, startOnTick: !0, title: { rotation: 270, text: "Values" }, stackLabels: {
- animation: {},
- allowOverlap: !1,
- enabled: !1,
- crop: !0,
- overflow: "justify",
- formatter: function() {
- var _ = this.axis.chart.numberFormatter;
- return _(this.total, -1);
- },
- style: { color: "#000000", fontSize: "11px", fontWeight: "bold", textOutline: "1px contrast" }
- }, gridLineWidth: 1, lineWidth: 0 }, N.defaultLeftAxisOptions = { labels: { x: -15 }, title: { rotation: 270 } }, N.defaultRightAxisOptions = { labels: { x: 15 }, title: { rotation: 90 } }, N.defaultBottomAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } }, N.defaultTopAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } };
- }(y || (y = {})), y;
- }), C(o, "Core/Foundation.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.addEvent, _ = y.isFunction, U = y.objectEach, G = y.removeEvent, V;
- return function(F) {
- F.registerEventOptions = function(B, j) {
- B.eventOptions = B.eventOptions || {}, U(j.events, function(w, x) {
- B.eventOptions[x] !== w && (B.eventOptions[x] && (G(B, x, B.eventOptions[x]), delete B.eventOptions[x]), _(w) && (B.eventOptions[x] = w, N(B, x, w)));
- });
- };
- }(V || (V = {})), V;
- }), C(
- o,
- "Core/Axis/Tick.js",
- [o["Core/FormatUtilities.js"], o["Core/Globals.js"], o["Core/Utilities.js"]],
- function(y, N, _) {
- var U = N.deg2rad, G = _.clamp, V = _.correctFloat, F = _.defined, B = _.destroyObjectProperties, j = _.extend, w = _.fireEvent, x = _.isNumber, f = _.merge, l = _.objectEach, T = _.pick;
- return N = function() {
- function O(R, k, b, S, v) {
- this.isNewLabel = this.isNew = !0, this.axis = R, this.pos = k, this.type = b || "", this.parameters = v || {}, this.tickmarkOffset = this.parameters.tickmarkOffset, this.options = this.parameters.options, w(this, "init"), b || S || this.addLabel();
- }
- return O.prototype.addLabel = function() {
- var R = this, k = R.axis, b = k.options, S = k.chart, v = k.categories, h = k.logarithmic, c = k.names, u = R.pos, i = T(R.options && R.options.labels, b.labels), p = k.tickPositions, a = u === p[0], t = u === p[p.length - 1], s = (!i.step || i.step === 1) && k.tickInterval === 1;
- p = p.info;
- var n = R.label, P;
- if (v = this.parameters.category || (v ? T(v[u], c[u], u) : u), h && x(v) && (v = V(h.lin2log(v))), k.dateTime)
- if (p)
- var D = S.time.resolveDTLFormat(b.dateTimeLabelFormats[!b.grid && p.higherRanks[u] || p.unitName]), I = D.main;
- else
- x(v) && (I = k.dateTime.getXDateFormat(v, b.dateTimeLabelFormats || {}));
- R.isFirst = a, R.isLast = t;
- var W = {
- axis: k,
- chart: S,
- dateTimeLabelFormat: I,
- isFirst: a,
- isLast: t,
- pos: u,
- tick: R,
- tickPositionInfo: p,
- value: v
- };
- w(this, "labelFormat", W);
- var E = function(g) {
- return i.formatter ? i.formatter.call(g, g) : i.format ? (g.text = k.defaultLabelFormatter.call(g), y.format(i.format, g, S)) : k.defaultLabelFormatter.call(g, g);
- };
- b = E.call(W, W);
- var X = D && D.list;
- R.shortenLabel = X ? function() {
- for (P = 0; P < X.length; P++)
- if (j(W, { dateTimeLabelFormat: X[P] }), n.attr({ text: E.call(W, W) }), n.getBBox().width < k.getSlotWidth(R) - 2 * i.padding)
- return;
- n.attr({ text: "" });
- } : void 0, s && k._addedPlotLB && R.moveLabel(b, i), F(n) || R.movedLabel ? n && n.textStr !== b && !s && (!n.textWidth || i.style.width || n.styles.width || n.css({ width: null }), n.attr({ text: b }), n.textPxLength = n.getBBox().width) : (R.label = n = R.createLabel({ x: 0, y: 0 }, b, i), R.rotation = 0);
- }, O.prototype.createLabel = function(R, k, b) {
- var S = this.axis, v = S.chart;
- return (R = F(k) && b.enabled ? v.renderer.text(k, R.x, R.y, b.useHTML).add(S.labelGroup) : null) && (v.styledMode || R.css(f(b.style)), R.textPxLength = R.getBBox().width), R;
- }, O.prototype.destroy = function() {
- B(
- this,
- this.axis
- );
- }, O.prototype.getPosition = function(R, k, b, S) {
- var v = this.axis, h = v.chart, c = S && h.oldChartHeight || h.chartHeight;
- return R = { x: R ? V(v.translate(k + b, null, null, S) + v.transB) : v.left + v.offset + (v.opposite ? (S && h.oldChartWidth || h.chartWidth) - v.right - v.left : 0), y: R ? c - v.bottom + v.offset - (v.opposite ? v.height : 0) : V(c - v.translate(k + b, null, null, S) - v.transB) }, R.y = G(R.y, -1e5, 1e5), w(this, "afterGetPosition", { pos: R }), R;
- }, O.prototype.getLabelPosition = function(R, k, b, S, v, h, c, u) {
- var i = this.axis, p = i.transA, a = i.isLinked && i.linkedParent ? i.linkedParent.reversed : i.reversed, t = i.staggerLines, s = i.tickRotCorr || { x: 0, y: 0 }, n = S || i.reserveSpaceDefault ? 0 : -i.labelOffset * (i.labelAlign === "center" ? 0.5 : 1), P = {}, D = v.y;
- return F(D) || (D = i.side === 0 ? b.rotation ? -8 : -b.getBBox().height : i.side === 2 ? s.y + 8 : Math.cos(b.rotation * U) * (s.y - b.getBBox(!1, 0).height / 2)), R = R + v.x + n + s.x - (h && S ? h * p * (a ? -1 : 1) : 0), k = k + D - (h && !S ? h * p * (a ? 1 : -1) : 0), t && (b = c / (u || 1) % t, i.opposite && (b = t - b - 1), k += i.labelOffset / t * b), P.x = R, P.y = Math.round(k), w(this, "afterGetLabelPosition", { pos: P, tickmarkOffset: h, index: c }), P;
- }, O.prototype.getLabelSize = function() {
- return this.label ? this.label.getBBox()[this.axis.horiz ? "height" : "width"] : 0;
- }, O.prototype.getMarkPath = function(R, k, b, S, v, h) {
- return h.crispLine([["M", R, k], ["L", R + (v ? 0 : -b), k + (v ? b : 0)]], S);
- }, O.prototype.handleOverflow = function(R) {
- var k = this.axis, b = k.options.labels, S = R.x, v = k.chart.chartWidth, h = k.chart.spacing, c = T(k.labelLeft, Math.min(k.pos, h[3]));
- h = T(k.labelRight, Math.max(k.isRadial ? 0 : k.pos + k.len, v - h[1]));
- var u = this.label, i = this.rotation, p = { left: 0, center: 0.5, right: 1 }[k.labelAlign || u.attr("align")], a = u.getBBox().width, t = k.getSlotWidth(this), s = {}, n = t, P = 1, D;
- i || b.overflow !== "justify" ? 0 > i && S - p * a < c ? D = Math.round(S / Math.cos(i * U) - c) : 0 < i && S + p * a > h && (D = Math.round((v - S) / Math.cos(i * U))) : (v = S + (1 - p) * a, S - p * a < c ? n = R.x + n * (1 - p) - c : v > h && (n = h - R.x + n * p, P = -1), n = Math.min(t, n), n < t && k.labelAlign === "center" && (R.x += P * (t - n - p * (t - Math.min(a, n)))), (a > n || k.autoRotation && (u.styles || {}).width) && (D = n)), D && (this.shortenLabel ? this.shortenLabel() : (s.width = Math.floor(D) + "px", (b.style || {}).textOverflow || (s.textOverflow = "ellipsis"), u.css(s)));
- }, O.prototype.moveLabel = function(R, k) {
- var b = this, S = b.label, v = b.axis, h = v.reversed, c = !1;
- if (S && S.textStr === R ? (b.movedLabel = S, c = !0, delete b.label) : l(v.ticks, function(i) {
- c || i.isNew || i === b || !i.label || i.label.textStr !== R || (b.movedLabel = i.label, c = !0, i.labelPos = b.movedLabel.xy, delete i.label);
- }), !c && (b.labelPos || S)) {
- var u = b.labelPos || S.xy;
- S = v.horiz ? h ? 0 : v.width + v.left : u.x, v = v.horiz ? u.y : h ? v.width + v.left : 0, b.movedLabel = b.createLabel({ x: S, y: v }, R, k), b.movedLabel && b.movedLabel.attr({ opacity: 0 });
- }
- }, O.prototype.render = function(R, k, b) {
- var S = this.axis, v = S.horiz, h = this.pos, c = T(this.tickmarkOffset, S.tickmarkOffset);
- h = this.getPosition(v, h, c, k), c = h.x;
- var u = h.y;
- S = v && c === S.pos + S.len || !v && u === S.pos ? -1 : 1, v = T(b, this.label && this.label.newOpacity, 1), b = T(b, 1), this.isActive = !0, this.renderGridLine(k, b, S), this.renderMark(h, b, S), this.renderLabel(h, k, v, R), this.isNew = !1, w(this, "afterRender");
- }, O.prototype.renderGridLine = function(R, k, b) {
- var S = this.axis, v = S.options, h = {}, c = this.pos, u = this.type, i = T(
- this.tickmarkOffset,
- S.tickmarkOffset
- ), p = S.chart.renderer, a = this.gridLine, t = v.gridLineWidth, s = v.gridLineColor, n = v.gridLineDashStyle;
- this.type === "minor" && (t = v.minorGridLineWidth, s = v.minorGridLineColor, n = v.minorGridLineDashStyle), a || (S.chart.styledMode || (h.stroke = s, h["stroke-width"] = t || 0, h.dashstyle = n), u || (h.zIndex = 1), R && (k = 0), this.gridLine = a = p.path().attr(h).addClass("highcharts-" + (u ? u + "-" : "") + "grid-line").add(S.gridGroup)), a && (b = S.getPlotLinePath({ value: c + i, lineWidth: a.strokeWidth() * b, force: "pass", old: R })) && a[R || this.isNew ? "attr" : "animate"]({ d: b, opacity: k });
- }, O.prototype.renderMark = function(R, k, b) {
- var S = this.axis, v = S.options, h = S.chart.renderer, c = this.type, u = S.tickSize(c ? c + "Tick" : "tick"), i = R.x;
- R = R.y;
- var p = T(v[c !== "minor" ? "tickWidth" : "minorTickWidth"], !c && S.isXAxis ? 1 : 0);
- v = v[c !== "minor" ? "tickColor" : "minorTickColor"];
- var a = this.mark, t = !a;
- u && (S.opposite && (u[0] = -u[0]), a || (this.mark = a = h.path().addClass("highcharts-" + (c ? c + "-" : "") + "tick").add(S.axisGroup), S.chart.styledMode || a.attr({ stroke: v, "stroke-width": p })), a[t ? "attr" : "animate"]({ d: this.getMarkPath(
- i,
- R,
- u[0],
- a.strokeWidth() * b,
- S.horiz,
- h
- ), opacity: k }));
- }, O.prototype.renderLabel = function(R, k, b, S) {
- var v = this.axis, h = v.horiz, c = v.options, u = this.label, i = c.labels, p = i.step;
- v = T(this.tickmarkOffset, v.tickmarkOffset);
- var a = R.x;
- R = R.y;
- var t = !0;
- u && x(a) && (u.xy = R = this.getLabelPosition(a, R, u, h, i, v, S, p), this.isFirst && !this.isLast && !c.showFirstLabel || this.isLast && !this.isFirst && !c.showLastLabel ? t = !1 : !h || i.step || i.rotation || k || b === 0 || this.handleOverflow(R), p && S % p && (t = !1), t && x(R.y) ? (R.opacity = b, u[this.isNewLabel ? "attr" : "animate"](R), this.isNewLabel = !1) : (u.attr("y", -9999), this.isNewLabel = !0));
- }, O.prototype.replaceMovedLabel = function() {
- var R = this.label, k = this.axis, b = k.reversed;
- if (R && !this.isNew) {
- var S = k.horiz ? b ? k.left : k.width + k.left : R.xy.x;
- b = k.horiz ? R.xy.y : b ? k.width + k.top : k.top, R.animate({ x: S, y: b, opacity: 0 }, void 0, R.destroy), delete this.label;
- }
- k.isDirty = !0, this.label = this.movedLabel, delete this.movedLabel;
- }, O;
- }(), N;
- }
- ), C(o, "Core/Axis/Axis.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/Axis/AxisDefaults.js"],
- o["Core/Color/Color.js"],
- o["Core/DefaultOptions.js"],
- o["Core/Foundation.js"],
- o["Core/Globals.js"],
- o["Core/Axis/Tick.js"],
- o["Core/Utilities.js"]
- ], function(y, N, _, U, G, V, F, B) {
- var j = y.animObject, w = U.defaultOptions, x = G.registerEventOptions, f = V.deg2rad, l = B.arrayMax, T = B.arrayMin, O = B.clamp, R = B.correctFloat, k = B.defined, b = B.destroyObjectProperties, S = B.erase, v = B.error, h = B.extend, c = B.fireEvent, u = B.getMagnitude, i = B.isArray, p = B.isNumber, a = B.isString, t = B.merge, s = B.normalizeTickInterval, n = B.objectEach, P = B.pick, D = B.relativeLength, I = B.removeEvent, W = B.splat, E = B.syncTimeout;
- return y = function() {
- function X(g, m) {
- this.zoomEnabled = this.width = this.visible = this.userOptions = this.translationSlope = this.transB = this.transA = this.top = this.ticks = this.tickRotCorr = this.tickPositions = this.tickmarkOffset = this.tickInterval = this.tickAmount = this.side = this.series = this.right = this.positiveValuesOnly = this.pos = this.pointRangePadding = this.pointRange = this.plotLinesAndBandsGroups = this.plotLinesAndBands = this.paddedTicks = this.overlap = this.options = this.offset = this.names = this.minPixelPadding = this.minorTicks = this.minorTickInterval = this.min = this.maxLabelLength = this.max = this.len = this.left = this.labelFormatter = this.labelEdge = this.isLinked = this.height = this.hasVisibleSeries = this.hasNames = this.eventOptions = this.coll = this.closestPointRange = this.chart = this.categories = this.bottom = this.alternateBands = void 0, this.init(g, m);
- }
- return X.prototype.init = function(g, m) {
- var L = m.isX;
- this.chart = g, this.horiz = g.inverted && !this.isZAxis ? !L : L, this.isXAxis = L, this.coll = this.coll || (L ? "xAxis" : "yAxis"), c(this, "init", { userOptions: m }), this.opposite = P(m.opposite, this.opposite), this.side = P(m.side, this.side, this.horiz ? this.opposite ? 0 : 2 : this.opposite ? 1 : 3), this.setOptions(m);
- var z = this.options, $ = z.labels, Q = z.type;
- this.userOptions = m, this.minPixelPadding = 0, this.reversed = P(z.reversed, this.reversed), this.visible = z.visible, this.zoomEnabled = z.zoomEnabled, this.hasNames = Q === "category" || z.categories === !0, this.categories = z.categories || this.hasNames, this.names || (this.names = [], this.names.keys = {}), this.plotLinesAndBandsGroups = {}, this.positiveValuesOnly = !!this.logarithmic, this.isLinked = k(z.linkedTo), this.ticks = {}, this.labelEdge = [], this.minorTicks = {}, this.plotLinesAndBands = [], this.alternateBands = {}, this.len = 0, this.minRange = this.userMinRange = z.minRange || z.maxZoom, this.range = z.range, this.offset = z.offset || 0, this.min = this.max = null, m = P(z.crosshair, W(g.options.tooltip.crosshairs)[L ? 0 : 1]), this.crosshair = m === !0 ? {} : m, g.axes.indexOf(this) === -1 && (L ? g.axes.splice(g.xAxis.length, 0, this) : g.axes.push(this), g[this.coll].push(this)), this.series = this.series || [], g.inverted && !this.isZAxis && L && typeof this.reversed > "u" && (this.reversed = !0), this.labelRotation = p($.rotation) ? $.rotation : void 0, x(this, z), c(this, "afterInit");
- }, X.prototype.setOptions = function(g) {
- this.options = t(N.defaultXAxisOptions, this.coll === "yAxis" && N.defaultYAxisOptions, [N.defaultTopAxisOptions, N.defaultRightAxisOptions, N.defaultBottomAxisOptions, N.defaultLeftAxisOptions][this.side], t(w[this.coll], g)), c(this, "afterSetOptions", { userOptions: g });
- }, X.prototype.defaultLabelFormatter = function(g) {
- var m = this.axis;
- g = this.chart.numberFormatter;
- var L = p(this.value) ? this.value : NaN, z = m.chart.time, $ = this.dateTimeLabelFormat, Q = w.lang, A = Q.numericSymbols;
- Q = Q.numericSymbolMagnitude || 1e3;
- var H = m.logarithmic ? Math.abs(L) : m.tickInterval, Y = A && A.length;
- if (m.categories)
- var Z = "" + this.value;
- else if ($)
- Z = z.dateFormat($, L);
- else if (Y && 1e3 <= H)
- for (; Y-- && typeof Z > "u"; )
- m = Math.pow(Q, Y + 1), H >= m && 10 * L % m === 0 && A[Y] !== null && L !== 0 && (Z = g(L / m, -1) + A[Y]);
- return typeof Z > "u" && (Z = 1e4 <= Math.abs(L) ? g(L, -1) : g(L, -1, void 0, "")), Z;
- }, X.prototype.getSeriesExtremes = function() {
- var g = this, m = g.chart, L;
- c(this, "getSeriesExtremes", null, function() {
- g.hasVisibleSeries = !1, g.dataMin = g.dataMax = g.threshold = null, g.softThreshold = !g.isXAxis, g.stacking && g.stacking.buildStacks(), g.series.forEach(function(z) {
- if (z.visible || !m.options.chart.ignoreHiddenSeries) {
- var $ = z.options, Q = $.threshold;
- if (g.hasVisibleSeries = !0, g.positiveValuesOnly && 0 >= Q && (Q = null), g.isXAxis) {
- if ($ = z.xData, $.length) {
- $ = g.logarithmic ? $.filter(g.validatePositiveValue) : $, L = z.getXExtremes($);
- var A = L.min, H = L.max;
- p(A) || A instanceof Date || ($ = $.filter(p), L = z.getXExtremes($), A = L.min, H = L.max), $.length && (g.dataMin = Math.min(P(g.dataMin, A), A), g.dataMax = Math.max(P(g.dataMax, H), H));
- }
- } else
- z = z.applyExtremes(), p(z.dataMin) && (A = z.dataMin, g.dataMin = Math.min(P(g.dataMin, A), A)), p(z.dataMax) && (H = z.dataMax, g.dataMax = Math.max(P(g.dataMax, H), H)), k(Q) && (g.threshold = Q), (!$.softThreshold || g.positiveValuesOnly) && (g.softThreshold = !1);
- }
- });
- }), c(this, "afterGetSeriesExtremes");
- }, X.prototype.translate = function(g, m, L, z, $, Q) {
- var A = this.linkedParent || this, H = z && A.old ? A.old.min : A.min, Y = A.minPixelPadding;
- $ = (A.isOrdinal || A.brokenAxis && A.brokenAxis.hasBreaks || A.logarithmic && $) && A.lin2val;
- var Z = 1, q = 0;
- return z = z && A.old ? A.old.transA : A.transA, z || (z = A.transA), L && (Z *= -1, q = A.len), A.reversed && (Z *= -1, q -= Z * (A.sector || A.len)), m ? (g = (g * Z + q - Y) / z + H, $ && (g = A.lin2val(g))) : ($ && (g = A.val2lin(g)), g = p(H) ? Z * (g - H) * z + q + Z * Y + (p(Q) ? z * Q : 0) : void 0), g;
- }, X.prototype.toPixels = function(g, m) {
- return this.translate(
- g,
- !1,
- !this.horiz,
- null,
- !0
- ) + (m ? 0 : this.pos);
- }, X.prototype.toValue = function(g, m) {
- return this.translate(g - (m ? 0 : this.pos), !0, !this.horiz, null, !0);
- }, X.prototype.getPlotLinePath = function(g) {
- function m(at, J, tt) {
- return (nt !== "pass" && at < J || at > tt) && (nt ? at = O(at, J, tt) : ht = !0), at;
- }
- var L = this, z = L.chart, $ = L.left, Q = L.top, A = g.old, H = g.value, Y = g.lineWidth, Z = A && z.oldChartHeight || z.chartHeight, q = A && z.oldChartWidth || z.chartWidth, it = L.transB, et = g.translatedValue, nt = g.force, rt, ct, gt, dt, ht;
- return g = {
- value: H,
- lineWidth: Y,
- old: A,
- force: nt,
- acrossPanes: g.acrossPanes,
- translatedValue: et
- }, c(this, "getPlotLinePath", g, function(at) {
- et = P(et, L.translate(H, null, null, A)), et = O(et, -1e5, 1e5), rt = gt = Math.round(et + it), ct = dt = Math.round(Z - et - it), p(et) ? L.horiz ? (ct = Q, dt = Z - L.bottom, rt = gt = m(rt, $, $ + L.width)) : (rt = $, gt = q - L.right, ct = dt = m(ct, Q, Q + L.height)) : (ht = !0, nt = !1), at.path = ht && !nt ? null : z.renderer.crispLine([["M", rt, ct], ["L", gt, dt]], Y || 1);
- }), g.path;
- }, X.prototype.getLinearTickPositions = function(g, m, L) {
- var z = R(Math.floor(m / g) * g);
- L = R(Math.ceil(L / g) * g);
- var $ = [], Q;
- if (R(z + g) === z && (Q = 20), this.single)
- return [m];
- for (m = z; m <= L && ($.push(m), m = R(m + g, Q), m !== A); )
- var A = m;
- return $;
- }, X.prototype.getMinorTickInterval = function() {
- var g = this.options;
- return g.minorTicks === !0 ? P(g.minorTickInterval, "auto") : g.minorTicks === !1 ? null : g.minorTickInterval;
- }, X.prototype.getMinorTickPositions = function() {
- var g = this.options, m = this.tickPositions, L = this.minorTickInterval, z = this.pointRangePadding || 0, $ = this.min - z;
- z = this.max + z;
- var Q = z - $, A = [];
- if (Q && Q / L < this.len / 3) {
- var H = this.logarithmic;
- if (H)
- this.paddedTicks.forEach(function(Y, Z, q) {
- Z && A.push.apply(
- A,
- H.getLogTickPositions(L, q[Z - 1], q[Z], !0)
- );
- });
- else if (this.dateTime && this.getMinorTickInterval() === "auto")
- A = A.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(L), $, z, g.startOfWeek));
- else
- for (g = $ + (m[0] - $) % L; g <= z && g !== A[0]; g += L)
- A.push(g);
- }
- return A.length !== 0 && this.trimTicks(A), A;
- }, X.prototype.adjustForMinRange = function() {
- var g = this.options, m = this.logarithmic, L = this.min, z = this.max, $ = 0, Q, A, H, Y;
- if (this.isXAxis && typeof this.minRange > "u" && !m && (k(g.min) || k(g.max) || k(g.floor) || k(g.ceiling) ? this.minRange = null : (this.series.forEach(function(et) {
- if (H = et.xData, Y = et.xIncrement ? 1 : H.length - 1, 1 < H.length)
- for (Q = Y; 0 < Q; Q--)
- A = H[Q] - H[Q - 1], (!$ || A < $) && ($ = A);
- }), this.minRange = Math.min(5 * $, this.dataMax - this.dataMin))), z - L < this.minRange) {
- var Z = this.dataMax - this.dataMin >= this.minRange, q = this.minRange, it = (q - z + L) / 2;
- it = [L - it, P(g.min, L - it)], Z && (it[2] = this.logarithmic ? this.logarithmic.log2lin(this.dataMin) : this.dataMin), L = l(it), z = [L + q, P(g.max, L + q)], Z && (z[2] = m ? m.log2lin(this.dataMax) : this.dataMax), z = T(z), z - L < q && (it[0] = z - q, it[1] = P(g.min, z - q), L = l(it));
- }
- this.min = L, this.max = z;
- }, X.prototype.getClosest = function() {
- var g;
- return this.categories ? g = 1 : this.series.forEach(function(m) {
- var L = m.closestPointRange, z = m.visible || !m.chart.options.chart.ignoreHiddenSeries;
- !m.noSharedTooltip && k(L) && z && (g = k(g) ? Math.min(g, L) : L);
- }), g;
- }, X.prototype.nameToX = function(g) {
- var m = i(this.categories), L = m ? this.categories : this.names, z = g.options.x;
- if (g.series.requireSorting = !1, k(z) || (z = this.options.uniqueNames ? m ? L.indexOf(g.name) : P(L.keys[g.name], -1) : g.series.autoIncrement()), z === -1) {
- if (!m)
- var $ = L.length;
- } else
- $ = z;
- return typeof $ < "u" && (this.names[$] = g.name, this.names.keys[g.name] = $), $;
- }, X.prototype.updateNames = function() {
- var g = this, m = this.names;
- 0 < m.length && (Object.keys(m.keys).forEach(function(L) {
- delete m.keys[L];
- }), m.length = 0, this.minRange = this.userMinRange, (this.series || []).forEach(function(L) {
- L.xIncrement = null, (!L.points || L.isDirtyData) && (g.max = Math.max(g.max, L.xData.length - 1), L.processData(), L.generatePoints()), L.data.forEach(function(z, $) {
- if (z && z.options && typeof z.name < "u") {
- var Q = g.nameToX(z);
- typeof Q < "u" && Q !== z.x && (z.x = Q, L.xData[$] = Q);
- }
- });
- }));
- }, X.prototype.setAxisTranslation = function() {
- var g = this, m = g.max - g.min, L = g.linkedParent, z = !!g.categories, $ = g.isXAxis, Q = g.axisPointRange || 0, A = 0, H = 0, Y = g.transA;
- if ($ || z || Q) {
- var Z = g.getClosest();
- L ? (A = L.minPointOffset, H = L.pointRangePadding) : g.series.forEach(function(q) {
- var it = z ? 1 : $ ? P(q.options.pointRange, Z, 0) : g.axisPointRange || 0, et = q.options.pointPlacement;
- Q = Math.max(Q, it), (!g.single || z) && (q = q.is("xrange") ? !$ : $, A = Math.max(A, q && a(et) ? 0 : it / 2), H = Math.max(H, q && et === "on" ? 0 : it));
- }), L = g.ordinal && g.ordinal.slope && Z ? g.ordinal.slope / Z : 1, g.minPointOffset = A *= L, g.pointRangePadding = H *= L, g.pointRange = Math.min(Q, g.single && z ? 1 : m), $ && (g.closestPointRange = Z);
- }
- g.translationSlope = g.transA = Y = g.staticScale || g.len / (m + H || 1), g.transB = g.horiz ? g.left : g.bottom, g.minPixelPadding = Y * A, c(this, "afterSetAxisTranslation");
- }, X.prototype.minFromRange = function() {
- return this.max - this.range;
- }, X.prototype.setTickInterval = function(g) {
- var m = this.chart, L = this.logarithmic, z = this.options, $ = this.isXAxis, Q = this.isLinked, A = z.tickPixelInterval, H = this.categories, Y = this.softThreshold, Z = z.maxPadding, q = z.minPadding, it = p(z.tickInterval) && 0 <= z.tickInterval ? z.tickInterval : void 0, et = p(this.threshold) ? this.threshold : null;
- this.dateTime || H || Q || this.getTickAmount();
- var nt = P(this.userMin, z.min), rt = P(this.userMax, z.max);
- if (Q) {
- this.linkedParent = m[this.coll][z.linkedTo];
- var ct = this.linkedParent.getExtremes();
- this.min = P(ct.min, ct.dataMin), this.max = P(ct.max, ct.dataMax), z.type !== this.linkedParent.options.type && v(11, 1, m);
- } else {
- if (Y && k(et)) {
- if (this.dataMin >= et)
- ct = et, q = 0;
- else if (this.dataMax <= et) {
- var gt = et;
- Z = 0;
- }
- }
- this.min = P(nt, ct, this.dataMin), this.max = P(rt, gt, this.dataMax);
- }
- if (L && (this.positiveValuesOnly && !g && 0 >= Math.min(this.min, P(this.dataMin, this.min)) && v(10, 1, m), this.min = R(L.log2lin(this.min), 16), this.max = R(L.log2lin(this.max), 16)), this.range && k(this.max) && (this.userMin = this.min = nt = Math.max(this.dataMin, this.minFromRange()), this.userMax = rt = this.max, this.range = null), c(this, "foundExtremes"), this.beforePadding && this.beforePadding(), this.adjustForMinRange(), !(H || this.axisPointRange || this.stacking && this.stacking.usePercentage || Q) && k(this.min) && k(this.max) && (m = this.max - this.min) && (!k(nt) && q && (this.min -= m * q), !k(rt) && Z && (this.max += m * Z)), p(this.userMin) || (p(z.softMin) && z.softMin < this.min && (this.min = nt = z.softMin), p(z.floor) && (this.min = Math.max(this.min, z.floor))), p(this.userMax) || (p(z.softMax) && z.softMax > this.max && (this.max = rt = z.softMax), p(z.ceiling) && (this.max = Math.min(this.max, z.ceiling))), Y && k(this.dataMin) && (et = et || 0, !k(nt) && this.min < et && this.dataMin >= et ? this.min = this.options.minRange ? Math.min(et, this.max - this.minRange) : et : !k(rt) && this.max > et && this.dataMax <= et && (this.max = this.options.minRange ? Math.max(et, this.min + this.minRange) : et)), p(this.min) && p(this.max) && !this.chart.polar && this.min > this.max && (k(this.options.min) ? this.max = this.min : k(this.options.max) && (this.min = this.max)), this.tickInterval = this.min === this.max || typeof this.min > "u" || typeof this.max > "u" ? 1 : Q && this.linkedParent && !it && A === this.linkedParent.options.tickPixelInterval ? it = this.linkedParent.tickInterval : P(it, this.tickAmount ? (this.max - this.min) / Math.max(this.tickAmount - 1, 1) : void 0, H ? 1 : (this.max - this.min) * A / Math.max(this.len, A)), $ && !g) {
- var dt = this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max);
- this.series.forEach(function(ht) {
- ht.forceCrop = ht.forceCropping && ht.forceCropping(), ht.processData(dt);
- }), c(this, "postProcessData", { hasExtemesChanged: dt });
- }
- this.setAxisTranslation(), c(this, "initialAxisTranslation"), this.pointRange && !it && (this.tickInterval = Math.max(this.pointRange, this.tickInterval)), g = P(z.minTickInterval, this.dateTime && !this.series.some(function(ht) {
- return ht.noSharedTooltip;
- }) ? this.closestPointRange : 0), !it && this.tickInterval < g && (this.tickInterval = g), this.dateTime || this.logarithmic || it || (this.tickInterval = s(this.tickInterval, void 0, u(this.tickInterval), P(z.allowDecimals, 0.5 > this.tickInterval || this.tickAmount !== void 0), !!this.tickAmount)), this.tickAmount || (this.tickInterval = this.unsquish()), this.setTickPositions();
- }, X.prototype.setTickPositions = function() {
- var g = this.options, m = g.tickPositions, L = this.getMinorTickInterval(), z = this.hasVerticalPanning(), $ = this.coll === "colorAxis", Q = ($ || !z) && g.startOnTick;
- z = ($ || !z) && g.endOnTick, $ = g.tickPositioner, this.tickmarkOffset = this.categories && g.tickmarkPlacement === "between" && this.tickInterval === 1 ? 0.5 : 0, this.minorTickInterval = L === "auto" && this.tickInterval ? this.tickInterval / 5 : L, this.single = this.min === this.max && k(this.min) && !this.tickAmount && (parseInt(this.min, 10) === this.min || g.allowDecimals !== !1), this.tickPositions = L = m && m.slice(), !L && (this.ordinal && this.ordinal.positions || !((this.max - this.min) / this.tickInterval > Math.max(2 * this.len, 200)) ? L = this.dateTime ? this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval, g.units), this.min, this.max, g.startOfWeek, this.ordinal && this.ordinal.positions, this.closestPointRange, !0) : this.logarithmic ? this.logarithmic.getLogTickPositions(this.tickInterval, this.min, this.max) : this.getLinearTickPositions(
- this.tickInterval,
- this.min,
- this.max
- ) : (L = [this.min, this.max], v(19, !1, this.chart)), L.length > this.len && (L = [L[0], L.pop()], L[0] === L[1] && (L.length = 1)), this.tickPositions = L, $ && ($ = $.apply(this, [this.min, this.max]))) && (this.tickPositions = L = $), this.paddedTicks = L.slice(0), this.trimTicks(L, Q, z), this.isLinked || (this.single && 2 > L.length && !this.categories && !this.series.some(function(A) {
- return A.is("heatmap") && A.options.pointPlacement === "between";
- }) && (this.min -= 0.5, this.max += 0.5), m || $ || this.adjustTickAmount()), c(this, "afterSetTickPositions");
- }, X.prototype.trimTicks = function(g, m, L) {
- var z = g[0], $ = g[g.length - 1], Q = !this.isOrdinal && this.minPointOffset || 0;
- if (c(this, "trimTicks"), !this.isLinked) {
- if (m && z !== -1 / 0)
- this.min = z;
- else
- for (; this.min - Q > g[0]; )
- g.shift();
- if (L)
- this.max = $;
- else
- for (; this.max + Q < g[g.length - 1]; )
- g.pop();
- g.length === 0 && k(z) && !this.options.tickPositions && g.push(($ + z) / 2);
- }
- }, X.prototype.alignToOthers = function() {
- var g = {}, m = this.options, L;
- return this.chart.options.chart.alignTicks !== !1 && m.alignTicks && m.startOnTick !== !1 && m.endOnTick !== !1 && !this.logarithmic && this.chart[this.coll].forEach(function(z) {
- var $ = z.options;
- $ = [z.horiz ? $.left : $.top, $.width, $.height, $.pane].join(), z.series.length && (g[$] ? L = !0 : g[$] = 1);
- }), L;
- }, X.prototype.getTickAmount = function() {
- var g = this.options, m = g.tickPixelInterval, L = g.tickAmount;
- !k(g.tickInterval) && !L && this.len < m && !this.isRadial && !this.logarithmic && g.startOnTick && g.endOnTick && (L = 2), !L && this.alignToOthers() && (L = Math.ceil(this.len / m) + 1), 4 > L && (this.finalTickAmt = L, L = 5), this.tickAmount = L;
- }, X.prototype.adjustTickAmount = function() {
- var g = this.options, m = this.tickInterval, L = this.tickPositions, z = this.tickAmount, $ = this.finalTickAmt, Q = L && L.length, A = P(this.threshold, this.softThreshold ? 0 : null);
- if (this.hasData() && p(this.min) && p(this.max)) {
- if (Q < z) {
- for (; L.length < z; )
- L.length % 2 || this.min === A ? L.push(R(L[L.length - 1] + m)) : L.unshift(R(L[0] - m));
- this.transA *= (Q - 1) / (z - 1), this.min = g.startOnTick ? L[0] : Math.min(this.min, L[0]), this.max = g.endOnTick ? L[L.length - 1] : Math.max(this.max, L[L.length - 1]);
- } else
- Q > z && (this.tickInterval *= 2, this.setTickPositions());
- if (k($)) {
- for (m = g = L.length; m--; )
- ($ === 3 && m % 2 === 1 || 2 >= $ && 0 < m && m < g - 1) && L.splice(m, 1);
- this.finalTickAmt = void 0;
- }
- }
- }, X.prototype.setScale = function() {
- var g = !1, m = !1;
- this.series.forEach(function(z) {
- g = g || z.isDirtyData || z.isDirty, m = m || z.xAxis && z.xAxis.isDirty || !1;
- }), this.setAxisSize();
- var L = this.len !== (this.old && this.old.len);
- L || g || m || this.isLinked || this.forceRedraw || this.userMin !== (this.old && this.old.userMin) || this.userMax !== (this.old && this.old.userMax) || this.alignToOthers() ? (this.stacking && this.stacking.resetStacks(), this.forceRedraw = !1, this.getSeriesExtremes(), this.setTickInterval(), this.isDirty || (this.isDirty = L || this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max))) : this.stacking && this.stacking.cleanStacks(), g && this.panningState && (this.panningState.isDirty = !0), c(this, "afterSetScale");
- }, X.prototype.setExtremes = function(g, m, L, z, $) {
- var Q = this, A = Q.chart;
- L = P(L, !0), Q.series.forEach(function(H) {
- delete H.kdTree;
- }), $ = h($, { min: g, max: m }), c(Q, "setExtremes", $, function() {
- Q.userMin = g, Q.userMax = m, Q.eventArgs = $, L && A.redraw(z);
- });
- }, X.prototype.zoom = function(g, m) {
- var L = this, z = this.dataMin, $ = this.dataMax, Q = this.options, A = Math.min(z, P(Q.min, z)), H = Math.max($, P(Q.max, $));
- return g = { newMin: g, newMax: m }, c(this, "zoom", g, function(Y) {
- var Z = Y.newMin, q = Y.newMax;
- (Z !== L.min || q !== L.max) && (L.allowZoomOutside || (k(z) && (Z < A && (Z = A), Z > H && (Z = H)), k($) && (q < A && (q = A), q > H && (q = H))), L.displayBtn = typeof Z < "u" || typeof q < "u", L.setExtremes(Z, q, !1, void 0, { trigger: "zoom" })), Y.zoomed = !0;
- }), g.zoomed;
- }, X.prototype.setAxisSize = function() {
- var g = this.chart, m = this.options, L = m.offsets || [0, 0, 0, 0], z = this.horiz, $ = this.width = Math.round(D(P(m.width, g.plotWidth - L[3] + L[1]), g.plotWidth)), Q = this.height = Math.round(D(P(m.height, g.plotHeight - L[0] + L[2]), g.plotHeight)), A = this.top = Math.round(D(P(m.top, g.plotTop + L[0]), g.plotHeight, g.plotTop));
- m = this.left = Math.round(D(P(m.left, g.plotLeft + L[3]), g.plotWidth, g.plotLeft)), this.bottom = g.chartHeight - Q - A, this.right = g.chartWidth - $ - m, this.len = Math.max(z ? $ : Q, 0), this.pos = z ? m : A;
- }, X.prototype.getExtremes = function() {
- var g = this.logarithmic;
- return { min: g ? R(g.lin2log(this.min)) : this.min, max: g ? R(g.lin2log(this.max)) : this.max, dataMin: this.dataMin, dataMax: this.dataMax, userMin: this.userMin, userMax: this.userMax };
- }, X.prototype.getThreshold = function(g) {
- var m = this.logarithmic, L = m ? m.lin2log(this.min) : this.min;
- return m = m ? m.lin2log(this.max) : this.max, g === null || g === -1 / 0 ? g = L : g === 1 / 0 ? g = m : L > g ? g = L : m < g && (g = m), this.translate(g, 0, 1, 0, 1);
- }, X.prototype.autoLabelAlign = function(g) {
- var m = (P(g, 0) - 90 * this.side + 720) % 360;
- return g = { align: "center" }, c(
- this,
- "autoLabelAlign",
- g,
- function(L) {
- 15 < m && 165 > m ? L.align = "right" : 195 < m && 345 > m && (L.align = "left");
- }
- ), g.align;
- }, X.prototype.tickSize = function(g) {
- var m = this.options, L = P(m[g === "tick" ? "tickWidth" : "minorTickWidth"], g === "tick" && this.isXAxis && !this.categories ? 1 : 0), z = m[g === "tick" ? "tickLength" : "minorTickLength"];
- if (L && z) {
- m[g + "Position"] === "inside" && (z = -z);
- var $ = [z, L];
- }
- return g = { tickSize: $ }, c(this, "afterTickSize", g), g.tickSize;
- }, X.prototype.labelMetrics = function() {
- var g = this.tickPositions && this.tickPositions[0] || 0;
- return this.chart.renderer.fontMetrics(
- this.options.labels.style.fontSize,
- this.ticks[g] && this.ticks[g].label
- );
- }, X.prototype.unsquish = function() {
- var g = this.options.labels, m = this.horiz, L = this.tickInterval, z = this.len / (((this.categories ? 1 : 0) + this.max - this.min) / L), $ = g.rotation, Q = this.labelMetrics(), A = Math.max(this.max - this.min, 0), H = function(nt) {
- var rt = nt / (z || 1);
- return rt = 1 < rt ? Math.ceil(rt) : 1, rt * L > A && nt !== 1 / 0 && z !== 1 / 0 && A && (rt = Math.ceil(A / L)), R(rt * L);
- }, Y = L, Z, q, it = Number.MAX_VALUE;
- if (m) {
- if (!g.staggerLines && !g.step)
- if (p($))
- var et = [$];
- else
- z < g.autoRotationLimit && (et = g.autoRotation);
- et && et.forEach(function(nt) {
- if (nt === $ || nt && -90 <= nt && 90 >= nt) {
- q = H(Math.abs(Q.h / Math.sin(f * nt)));
- var rt = q + Math.abs(nt / 360);
- rt < it && (it = rt, Z = nt, Y = q);
- }
- });
- } else
- g.step || (Y = H(Q.h));
- return this.autoRotation = et, this.labelRotation = P(Z, p($) ? $ : 0), Y;
- }, X.prototype.getSlotWidth = function(g) {
- var m = this.chart, L = this.horiz, z = this.options.labels, $ = Math.max(this.tickPositions.length - (this.categories ? 0 : 1), 1), Q = m.margin[3];
- if (g && p(g.slotWidth))
- return g.slotWidth;
- if (L && 2 > z.step)
- return z.rotation ? 0 : (this.staggerLines || 1) * this.len / $;
- if (!L) {
- if (g = z.style.width, g !== void 0)
- return parseInt(String(g), 10);
- if (Q)
- return Q - m.spacing[3];
- }
- return 0.33 * m.chartWidth;
- }, X.prototype.renderUnsquish = function() {
- var g = this.chart, m = g.renderer, L = this.tickPositions, z = this.ticks, $ = this.options.labels, Q = $.style, A = this.horiz, H = this.getSlotWidth(), Y = Math.max(1, Math.round(H - 2 * $.padding)), Z = {}, q = this.labelMetrics(), it = Q.textOverflow, et = 0;
- if (a($.rotation) || (Z.rotation = $.rotation || 0), L.forEach(function(gt) {
- gt = z[gt], gt.movedLabel && gt.replaceMovedLabel(), gt && gt.label && gt.label.textPxLength > et && (et = gt.label.textPxLength);
- }), this.maxLabelLength = et, this.autoRotation)
- et > Y && et > q.h ? Z.rotation = this.labelRotation : this.labelRotation = 0;
- else if (H) {
- var nt = Y;
- if (!it) {
- var rt = "clip";
- for (Y = L.length; !A && Y--; ) {
- var ct = L[Y];
- (ct = z[ct].label) && (ct.styles && ct.styles.textOverflow === "ellipsis" ? ct.css({ textOverflow: "clip" }) : ct.textPxLength > H && ct.css({ width: H + "px" }), ct.getBBox().height > this.len / L.length - (q.h - q.f) && (ct.specificTextOverflow = "ellipsis"));
- }
- }
- }
- Z.rotation && (nt = et > 0.5 * g.chartHeight ? 0.33 * g.chartHeight : et, it || (rt = "ellipsis")), (this.labelAlign = $.align || this.autoLabelAlign(this.labelRotation)) && (Z.align = this.labelAlign), L.forEach(function(gt) {
- var dt = (gt = z[gt]) && gt.label, ht = Q.width, at = {};
- dt && (dt.attr(Z), gt.shortenLabel ? gt.shortenLabel() : nt && !ht && Q.whiteSpace !== "nowrap" && (nt < dt.textPxLength || dt.element.tagName === "SPAN") ? (at.width = nt + "px", it || (at.textOverflow = dt.specificTextOverflow || rt), dt.css(at)) : dt.styles && dt.styles.width && !at.width && !ht && dt.css({ width: null }), delete dt.specificTextOverflow, gt.rotation = Z.rotation);
- }, this), this.tickRotCorr = m.rotCorr(q.b, this.labelRotation || 0, this.side !== 0);
- }, X.prototype.hasData = function() {
- return this.series.some(function(g) {
- return g.hasData();
- }) || this.options.showEmpty && k(this.min) && k(this.max);
- }, X.prototype.addTitle = function(g) {
- var m = this.chart.renderer, L = this.horiz, z = this.opposite, $ = this.options.title, Q = this.chart.styledMode, A;
- this.axisTitle || ((A = $.textAlign) || (A = (L ? { low: "left", middle: "center", high: "right" } : { low: z ? "right" : "left", middle: "center", high: z ? "left" : "right" })[$.align]), this.axisTitle = m.text($.text || "", 0, 0, $.useHTML).attr({ zIndex: 7, rotation: $.rotation, align: A }).addClass("highcharts-axis-title"), Q || this.axisTitle.css(t($.style)), this.axisTitle.add(this.axisGroup), this.axisTitle.isNew = !0), Q || $.style.width || this.isRadial || this.axisTitle.css({ width: this.len + "px" }), this.axisTitle[g ? "show" : "hide"](g);
- }, X.prototype.generateTick = function(g) {
- var m = this.ticks;
- m[g] ? m[g].addLabel() : m[g] = new F(this, g);
- }, X.prototype.getOffset = function() {
- var g = this, m = this, L = m.chart, z = m.horiz, $ = m.options, Q = m.side, A = m.ticks, H = m.tickPositions, Y = m.coll, Z = m.axisParent, q = L.renderer, it = L.inverted && !m.isZAxis ? [1, 0, 3, 2][Q] : Q, et = m.hasData(), nt = $.title, rt = $.labels, ct = L.axisOffset;
- L = L.clipOffset;
- var gt = [
- -1,
- 1,
- 1,
- -1
- ][Q], dt = $.className, ht, at = 0, J = 0, tt = 0;
- if (m.showAxis = ht = et || $.showEmpty, m.staggerLines = m.horiz && rt.staggerLines || void 0, !m.axisGroup) {
- var ot = function(pt, yt, vt) {
- return q.g(pt).attr({ zIndex: vt }).addClass("highcharts-" + Y.toLowerCase() + yt + " " + (g.isRadial ? "highcharts-radial-axis" + yt + " " : "") + (dt || "")).add(Z);
- };
- m.gridGroup = ot("grid", "-grid", $.gridZIndex), m.axisGroup = ot("axis", "", $.zIndex), m.labelGroup = ot("axis-labels", "-labels", rt.zIndex);
- }
- if (et || m.isLinked ? (H.forEach(function(pt) {
- m.generateTick(pt);
- }), m.renderUnsquish(), m.reserveSpaceDefault = Q === 0 || Q === 2 || { 1: "left", 3: "right" }[Q] === m.labelAlign, P(rt.reserveSpace, m.labelAlign === "center" ? !0 : null, m.reserveSpaceDefault) && H.forEach(function(pt) {
- tt = Math.max(A[pt].getLabelSize(), tt);
- }), m.staggerLines && (tt *= m.staggerLines), m.labelOffset = tt * (m.opposite ? -1 : 1)) : n(A, function(pt, yt) {
- pt.destroy(), delete A[yt];
- }), nt && nt.text && nt.enabled !== !1 && (m.addTitle(ht), ht && nt.reserveSpace !== !1)) {
- m.titleOffset = at = m.axisTitle.getBBox()[z ? "height" : "width"];
- var lt = nt.offset;
- J = k(lt) ? 0 : P(nt.margin, z ? 5 : 10);
- }
- m.renderLine(), m.offset = gt * P($.offset, ct[Q] ? ct[Q] + ($.margin || 0) : 0), m.tickRotCorr = m.tickRotCorr || { x: 0, y: 0 }, nt = Q === 0 ? -m.labelMetrics().h : Q === 2 ? m.tickRotCorr.y : 0, et = Math.abs(tt) + J, tt && (et = et - nt + gt * (z ? P(rt.y, m.tickRotCorr.y + 8 * gt) : rt.x)), m.axisTitleMargin = P(lt, et), m.getMaxLabelDimensions && (m.maxLabelDimensions = m.getMaxLabelDimensions(A, H)), Y !== "colorAxis" && (z = this.tickSize("tick"), ct[Q] = Math.max(ct[Q], (m.axisTitleMargin || 0) + at + gt * m.offset, et, H && H.length && z ? z[0] + gt * m.offset : 0), $ = !m.axisLine || $.offset ? 0 : 2 * Math.floor(m.axisLine.strokeWidth() / 2), L[it] = Math.max(L[it], $)), c(this, "afterGetOffset");
- }, X.prototype.getLinePath = function(g) {
- var m = this.chart, L = this.opposite, z = this.offset, $ = this.horiz, Q = this.left + (L ? this.width : 0) + z;
- return z = m.chartHeight - this.bottom - (L ? this.height : 0) + z, L && (g *= -1), m.renderer.crispLine([["M", $ ? this.left : Q, $ ? z : this.top], ["L", $ ? m.chartWidth - this.right : Q, $ ? z : m.chartHeight - this.bottom]], g);
- }, X.prototype.renderLine = function() {
- this.axisLine || (this.axisLine = this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup), this.chart.styledMode || this.axisLine.attr({ stroke: this.options.lineColor, "stroke-width": this.options.lineWidth, zIndex: 7 }));
- }, X.prototype.getTitlePosition = function() {
- var g = this.horiz, m = this.left, L = this.top, z = this.len, $ = this.options.title, Q = g ? m : L, A = this.opposite, H = this.offset, Y = $.x, Z = $.y, q = this.axisTitle, it = this.chart.renderer.fontMetrics($.style.fontSize, q);
- return q = Math.max(q.getBBox(null, 0).height - it.h - 1, 0), z = { low: Q + (g ? 0 : z), middle: Q + z / 2, high: Q + (g ? z : 0) }[$.align], m = (g ? L + this.height : m) + (g ? 1 : -1) * (A ? -1 : 1) * this.axisTitleMargin + [-q, q, it.f, -q][this.side], g = { x: g ? z + Y : m + (A ? this.width : 0) + H + Y, y: g ? m + Z - (A ? this.height : 0) + H : z + Z }, c(this, "afterGetTitlePosition", { titlePosition: g }), g;
- }, X.prototype.renderMinorTick = function(g, m) {
- var L = this.minorTicks;
- L[g] || (L[g] = new F(this, g, "minor")), m && L[g].isNew && L[g].render(null, !0), L[g].render(null, !1, 1);
- }, X.prototype.renderTick = function(g, m, L) {
- var z = this.ticks;
- (!this.isLinked || g >= this.min && g <= this.max || this.grid && this.grid.isColumn) && (z[g] || (z[g] = new F(this, g)), L && z[g].isNew && z[g].render(
- m,
- !0,
- -1
- ), z[g].render(m));
- }, X.prototype.render = function() {
- var g = this, m = g.chart, L = g.logarithmic, z = g.options, $ = g.isLinked, Q = g.tickPositions, A = g.axisTitle, H = g.ticks, Y = g.minorTicks, Z = g.alternateBands, q = z.stackLabels, it = z.alternateGridColor, et = g.tickmarkOffset, nt = g.axisLine, rt = g.showAxis, ct = j(m.renderer.globalAnimation), gt, dt;
- if (g.labelEdge.length = 0, g.overlap = !1, [H, Y, Z].forEach(function(at) {
- n(at, function(J) {
- J.isActive = !1;
- });
- }), g.hasData() || $) {
- var ht = g.chart.hasRendered && g.old && p(g.old.min);
- g.minorTickInterval && !g.categories && g.getMinorTickPositions().forEach(function(at) {
- g.renderMinorTick(at, ht);
- }), Q.length && (Q.forEach(function(at, J) {
- g.renderTick(at, J, ht);
- }), et && (g.min === 0 || g.single) && (H[-1] || (H[-1] = new F(g, -1, null, !0)), H[-1].render(-1))), it && Q.forEach(function(at, J) {
- dt = typeof Q[J + 1] < "u" ? Q[J + 1] + et : g.max - et, J % 2 === 0 && at < g.max && dt <= g.max + (m.polar ? -et : et) && (Z[at] || (Z[at] = new V.PlotLineOrBand(g)), gt = at + et, Z[at].options = { from: L ? L.lin2log(gt) : gt, to: L ? L.lin2log(dt) : dt, color: it, className: "highcharts-alternate-grid" }, Z[at].render(), Z[at].isActive = !0);
- }), g._addedPlotLB || (g._addedPlotLB = !0, (z.plotLines || []).concat(z.plotBands || []).forEach(function(at) {
- g.addPlotBandOrLine(at);
- }));
- }
- [H, Y, Z].forEach(function(at) {
- var J = [], tt = ct.duration;
- n(at, function(ot, lt) {
- ot.isActive || (ot.render(lt, !1, 0), ot.isActive = !1, J.push(lt));
- }), E(function() {
- for (var ot = J.length; ot--; )
- at[J[ot]] && !at[J[ot]].isActive && (at[J[ot]].destroy(), delete at[J[ot]]);
- }, at !== Z && m.hasRendered && tt ? tt : 0);
- }), nt && (nt[nt.isPlaced ? "animate" : "attr"]({ d: this.getLinePath(nt.strokeWidth()) }), nt.isPlaced = !0, nt[rt ? "show" : "hide"](rt)), A && rt && (z = g.getTitlePosition(), p(z.y) ? (A[A.isNew ? "attr" : "animate"](z), A.isNew = !1) : (A.attr("y", -9999), A.isNew = !0)), q && q.enabled && g.stacking && g.stacking.renderStackTotals(), g.old = { len: g.len, max: g.max, min: g.min, transA: g.transA, userMax: g.userMax, userMin: g.userMin }, g.isDirty = !1, c(this, "afterRender");
- }, X.prototype.redraw = function() {
- this.visible && (this.render(), this.plotLinesAndBands.forEach(function(g) {
- g.render();
- })), this.series.forEach(function(g) {
- g.isDirty = !0;
- });
- }, X.prototype.getKeepProps = function() {
- return this.keepProps || X.keepProps;
- }, X.prototype.destroy = function(g) {
- var m = this, L = m.plotLinesAndBands, z = this.eventOptions;
- if (c(this, "destroy", { keepEvents: g }), g || I(m), [m.ticks, m.minorTicks, m.alternateBands].forEach(function(Q) {
- b(Q);
- }), L)
- for (g = L.length; g--; )
- L[g].destroy();
- "axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach(function(Q) {
- m[Q] && (m[Q] = m[Q].destroy());
- });
- for (var $ in m.plotLinesAndBandsGroups)
- m.plotLinesAndBandsGroups[$] = m.plotLinesAndBandsGroups[$].destroy();
- n(m, function(Q, A) {
- m.getKeepProps().indexOf(A) === -1 && delete m[A];
- }), this.eventOptions = z;
- }, X.prototype.drawCrosshair = function(g, m) {
- var L = this.crosshair, z = P(L && L.snap, !0), $ = this.chart, Q, A = this.cross;
- if (c(this, "drawCrosshair", { e: g, point: m }), g || (g = this.cross && this.cross.e), L && (k(m) || !z) !== !1) {
- if (z ? k(m) && (Q = P(this.coll !== "colorAxis" ? m.crosshairPos : null, this.isXAxis ? m.plotX : this.len - m.plotY)) : Q = g && (this.horiz ? g.chartX - this.pos : this.len - g.chartY + this.pos), k(Q)) {
- var H = { value: m && (this.isXAxis ? m.x : P(m.stackY, m.y)), translatedValue: Q };
- $.polar && h(H, { isCrosshair: !0, chartX: g && g.chartX, chartY: g && g.chartY, point: m }), H = this.getPlotLinePath(H) || null;
- }
- if (!k(H)) {
- this.hideCrosshair();
- return;
- }
- z = this.categories && !this.isRadial, A || (this.cross = A = $.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-" + (z ? "category " : "thin ") + (L.className || "")).attr({ zIndex: P(L.zIndex, 2) }).add(), $.styledMode || (A.attr({ stroke: L.color || (z ? _.parse("#ccd6eb").setOpacity(0.25).get() : "#cccccc"), "stroke-width": P(L.width, 1) }).css({ "pointer-events": "none" }), L.dashStyle && A.attr({ dashstyle: L.dashStyle }))), A.show().attr({ d: H }), z && !L.width && A.attr({ "stroke-width": this.transA }), this.cross.e = g;
- } else
- this.hideCrosshair();
- c(this, "afterDrawCrosshair", { e: g, point: m });
- }, X.prototype.hideCrosshair = function() {
- this.cross && this.cross.hide(), c(this, "afterHideCrosshair");
- }, X.prototype.hasVerticalPanning = function() {
- var g = this.chart.options.chart.panning;
- return !!(g && g.enabled && /y/.test(g.type));
- }, X.prototype.validatePositiveValue = function(g) {
- return p(g) && 0 < g;
- }, X.prototype.update = function(g, m) {
- var L = this.chart;
- g = t(this.userOptions, g), this.destroy(!0), this.init(L, g), L.isDirtyBox = !0, P(m, !0) && L.redraw();
- }, X.prototype.remove = function(g) {
- for (var m = this.chart, L = this.coll, z = this.series, $ = z.length; $--; )
- z[$] && z[$].remove(!1);
- S(m.axes, this), S(m[L], this), m[L].forEach(function(Q, A) {
- Q.options.index = Q.userOptions.index = A;
- }), this.destroy(), m.isDirtyBox = !0, P(g, !0) && m.redraw();
- }, X.prototype.setTitle = function(g, m) {
- this.update({ title: g }, m);
- }, X.prototype.setCategories = function(g, m) {
- this.update(
- { categories: g },
- m
- );
- }, X.defaultOptions = N.defaultXAxisOptions, X.keepProps = "extKey hcEvents names series userMax userMin".split(" "), X;
- }(), y;
- }), C(o, "Core/Axis/DateTimeAxis.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.addEvent, _ = y.getMagnitude, U = y.normalizeTickInterval, G = y.timeUnits, V;
- return function(F) {
- function B() {
- return this.chart.time.getTimeTicks.apply(this.chart.time, arguments);
- }
- function j(f) {
- f.userOptions.type !== "datetime" ? this.dateTime = void 0 : this.dateTime || (this.dateTime = new x(this));
- }
- var w = [];
- F.compose = function(f) {
- return w.indexOf(f) === -1 && (w.push(f), f.keepProps.push("dateTime"), f.prototype.getTimeTicks = B, N(f, "init", j)), f;
- };
- var x = function() {
- function f(l) {
- this.axis = l;
- }
- return f.prototype.normalizeTimeTickInterval = function(l, T) {
- var O = T || [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2]], ["week", [1, 2]], ["month", [1, 2, 3, 4, 6]], ["year", null]];
- T = O[O.length - 1];
- var R = G[T[0]], k = T[1], b;
- for (b = 0; b < O.length && (T = O[b], R = G[T[0]], k = T[1], !(O[b + 1] && l <= (R * k[k.length - 1] + G[O[b + 1][0]]) / 2)); b++)
- ;
- return R === G.year && l < 5 * R && (k = [1, 2, 5]), l = U(l / R, k, T[0] === "year" ? Math.max(_(l / R), 1) : 1), { unitRange: R, count: l, unitName: T[0] };
- }, f.prototype.getXDateFormat = function(l, T) {
- var O = this.axis;
- return O.closestPointRange ? O.chart.time.getDateFormat(O.closestPointRange, l, O.options.startOfWeek, T) || T.year : T.day;
- }, f;
- }();
- F.Additions = x;
- }(V || (V = {})), V;
- }), C(o, "Core/Axis/LogarithmicAxis.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.addEvent, _ = y.getMagnitude, U = y.normalizeTickInterval, G = y.pick, V;
- return function(F) {
- function B(f) {
- var l = this.logarithmic;
- f.userOptions.type !== "logarithmic" ? this.logarithmic = void 0 : l || (this.logarithmic = new x(this));
- }
- function j() {
- var f = this.logarithmic;
- f && (this.lin2val = function(l) {
- return f.lin2log(l);
- }, this.val2lin = function(l) {
- return f.log2lin(l);
- });
- }
- var w = [];
- F.compose = function(f) {
- return w.indexOf(f) === -1 && (w.push(f), f.keepProps.push("logarithmic"), N(f, "init", B), N(f, "afterInit", j)), f;
- };
- var x = function() {
- function f(l) {
- this.axis = l;
- }
- return f.prototype.getLogTickPositions = function(l, T, O, R) {
- var k = this.axis, b = k.len, S = k.options, v = [];
- if (R || (this.minorAutoInterval = void 0), 0.5 <= l)
- l = Math.round(l), v = k.getLinearTickPositions(l, T, O);
- else if (0.08 <= l) {
- var h = Math.floor(T), c, u = S = void 0;
- for (b = 0.3 < l ? [1, 2, 4] : 0.15 < l ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; h < O + 1 && !u; h++) {
- var i = b.length;
- for (c = 0; c < i && !u; c++) {
- var p = this.log2lin(this.lin2log(h) * b[c]);
- p > T && (!R || S <= O) && typeof S < "u" && v.push(S), S > O && (u = !0), S = p;
- }
- }
- } else
- T = this.lin2log(T), O = this.lin2log(O), l = R ? k.getMinorTickInterval() : S.tickInterval, l = G(l === "auto" ? null : l, this.minorAutoInterval, S.tickPixelInterval / (R ? 5 : 1) * (O - T) / ((R ? b / k.tickPositions.length : b) || 1)), l = U(l, void 0, _(l)), v = k.getLinearTickPositions(l, T, O).map(this.log2lin), R || (this.minorAutoInterval = l / 5);
- return R || (k.tickInterval = l), v;
- }, f.prototype.lin2log = function(l) {
- return Math.pow(10, l);
- }, f.prototype.log2lin = function(l) {
- return Math.log(l) / Math.LN10;
- }, f;
- }();
- F.Additions = x;
- }(V || (V = {})), V;
- }), C(o, "Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.erase, _ = y.extend, U = y.isNumber, G;
- return function(V) {
- var F = [], B;
- V.compose = function(w, x) {
- return B || (B = w), F.indexOf(x) === -1 && (F.push(x), _(x.prototype, j.prototype)), x;
- };
- var j = function() {
- function w() {
- }
- return w.prototype.getPlotBandPath = function(x, f, l) {
- l === void 0 && (l = this.options);
- var T = this.getPlotLinePath({ value: f, force: !0, acrossPanes: l.acrossPanes }), O = [], R = this.horiz;
- if (f = !U(this.min) || !U(this.max) || x < this.min && f < this.min || x > this.max && f > this.max, x = this.getPlotLinePath({ value: x, force: !0, acrossPanes: l.acrossPanes }), l = 1, x && T) {
- if (f) {
- var k = x.toString() === T.toString();
- l = 0;
- }
- for (f = 0; f < x.length; f += 2) {
- var b = x[f], S = x[f + 1], v = T[f], h = T[f + 1];
- b[0] !== "M" && b[0] !== "L" || S[0] !== "M" && S[0] !== "L" || v[0] !== "M" && v[0] !== "L" || h[0] !== "M" && h[0] !== "L" || (R && v[1] === b[1] ? (v[1] += l, h[1] += l) : R || v[2] !== b[2] || (v[2] += l, h[2] += l), O.push(["M", b[1], b[2]], ["L", S[1], S[2]], ["L", h[1], h[2]], ["L", v[1], v[2]], ["Z"])), O.isFlat = k;
- }
- }
- return O;
- }, w.prototype.addPlotBand = function(x) {
- return this.addPlotBandOrLine(x, "plotBands");
- }, w.prototype.addPlotLine = function(x) {
- return this.addPlotBandOrLine(
- x,
- "plotLines"
- );
- }, w.prototype.addPlotBandOrLine = function(x, f) {
- var l = this, T = this.userOptions, O = new B(this, x);
- if (this.visible && (O = O.render()), O) {
- if (this._addedPlotLB || (this._addedPlotLB = !0, (T.plotLines || []).concat(T.plotBands || []).forEach(function(k) {
- l.addPlotBandOrLine(k);
- })), f) {
- var R = T[f] || [];
- R.push(x), T[f] = R;
- }
- this.plotLinesAndBands.push(O);
- }
- return O;
- }, w.prototype.removePlotBandOrLine = function(x) {
- var f = this.plotLinesAndBands, l = this.options, T = this.userOptions;
- if (f) {
- for (var O = f.length; O--; )
- f[O].id === x && f[O].destroy();
- [l.plotLines || [], T.plotLines || [], l.plotBands || [], T.plotBands || []].forEach(function(R) {
- for (O = R.length; O--; )
- (R[O] || {}).id === x && N(R, R[O]);
- });
- }
- }, w.prototype.removePlotBand = function(x) {
- this.removePlotBandOrLine(x);
- }, w.prototype.removePlotLine = function(x) {
- this.removePlotBandOrLine(x);
- }, w;
- }();
- }(G || (G = {})), G;
- }), C(o, "Core/Axis/PlotLineOrBand/PlotLineOrBand.js", [o["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"], o["Core/Utilities.js"]], function(y, N) {
- var _ = N.arrayMax, U = N.arrayMin, G = N.defined, V = N.destroyObjectProperties, F = N.erase, B = N.fireEvent, j = N.merge, w = N.objectEach, x = N.pick;
- return N = function() {
- function f(l, T) {
- this.axis = l, T && (this.options = T, this.id = T.id);
- }
- return f.compose = function(l) {
- return y.compose(f, l);
- }, f.prototype.render = function() {
- B(this, "render");
- var l = this, T = l.axis, O = T.horiz, R = T.logarithmic, k = l.options, b = k.color, S = x(k.zIndex, 0), v = k.events, h = {}, c = T.chart.renderer, u = k.label, i = l.label, p = k.to, a = k.from, t = k.value, s = l.svgElem, n = [], P = G(a) && G(p);
- n = G(t);
- var D = !s, I = { class: "highcharts-plot-" + (P ? "band " : "line ") + (k.className || "") }, W = P ? "bands" : "lines";
- if (R && (a = R.log2lin(a), p = R.log2lin(p), t = R.log2lin(t)), T.chart.styledMode || (n ? (I.stroke = b || "#999999", I["stroke-width"] = x(k.width, 1), k.dashStyle && (I.dashstyle = k.dashStyle)) : P && (I.fill = b || "#e6ebf5", k.borderWidth && (I.stroke = k.borderColor, I["stroke-width"] = k.borderWidth))), h.zIndex = S, W += "-" + S, (R = T.plotLinesAndBandsGroups[W]) || (T.plotLinesAndBandsGroups[W] = R = c.g("plot-" + W).attr(h).add()), D && (l.svgElem = s = c.path().attr(I).add(R)), n)
- n = T.getPlotLinePath({
- value: t,
- lineWidth: s.strokeWidth(),
- acrossPanes: k.acrossPanes
- });
- else if (P)
- n = T.getPlotBandPath(a, p, k);
- else
- return;
- return !l.eventsAdded && v && (w(v, function(E, X) {
- s.on(X, function(g) {
- v[X].apply(l, [g]);
- });
- }), l.eventsAdded = !0), (D || !s.d) && n && n.length ? s.attr({ d: n }) : s && (n ? (s.show(!0), s.animate({ d: n })) : s.d && (s.hide(), i && (l.label = i = i.destroy()))), u && (G(u.text) || G(u.formatter)) && n && n.length && 0 < T.width && 0 < T.height && !n.isFlat ? (u = j({ align: O && P && "center", x: O ? !P && 4 : 10, verticalAlign: !O && P && "middle", y: O ? P ? 16 : 10 : P ? 6 : -4, rotation: O && !P && 90 }, u), this.renderLabel(
- u,
- n,
- P,
- S
- )) : i && i.hide(), l;
- }, f.prototype.renderLabel = function(l, T, O, R) {
- var k = this.axis, b = k.chart.renderer, S = this.label;
- S || (this.label = S = b.text(this.getLabelText(l), 0, 0, l.useHTML).attr({ align: l.textAlign || l.align, rotation: l.rotation, class: "highcharts-plot-" + (O ? "band" : "line") + "-label " + (l.className || ""), zIndex: R }).add(), k.chart.styledMode || S.css(j({ textOverflow: "ellipsis" }, l.style))), R = T.xBounds || [T[0][1], T[1][1], O ? T[2][1] : T[0][1]], T = T.yBounds || [T[0][2], T[1][2], O ? T[2][2] : T[0][2]], O = U(R), b = U(T), S.align(
- l,
- !1,
- { x: O, y: b, width: _(R) - O, height: _(T) - b }
- ), S.alignValue && S.alignValue !== "left" || S.css({ width: (S.rotation === 90 ? k.height - (S.alignAttr.y - k.top) : k.width - (S.alignAttr.x - k.left)) + "px" }), S.show(!0);
- }, f.prototype.getLabelText = function(l) {
- return G(l.formatter) ? l.formatter.call(this) : l.text;
- }, f.prototype.destroy = function() {
- F(this.axis.plotLinesAndBands, this), delete this.axis, V(this);
- }, f;
- }(), N;
- }), C(o, "Core/Tooltip.js", [
- o["Core/FormatUtilities.js"],
- o["Core/Globals.js"],
- o["Core/Renderer/RendererUtilities.js"],
- o["Core/Renderer/RendererRegistry.js"],
- o["Core/Utilities.js"]
- ], function(y, N, _, U, G) {
- var V = y.format, F = N.doc, B = _.distribute, j = G.addEvent, w = G.clamp, x = G.css, f = G.defined, l = G.discardElement, T = G.extend, O = G.fireEvent, R = G.isArray, k = G.isNumber, b = G.isString, S = G.merge, v = G.pick, h = G.splat, c = G.syncTimeout;
- return y = function() {
- function u(i, p) {
- this.allowShared = !0, this.container = void 0, this.crosshairs = [], this.distance = 0, this.isHidden = !0, this.isSticky = !1, this.now = {}, this.options = {}, this.outside = !1, this.chart = i, this.init(i, p);
- }
- return u.prototype.applyFilter = function() {
- var i = this.chart;
- i.renderer.definition({ tagName: "filter", attributes: { id: "drop-shadow-" + i.index, opacity: 0.5 }, children: [{ tagName: "feGaussianBlur", attributes: { in: "SourceAlpha", stdDeviation: 1 } }, { tagName: "feOffset", attributes: { dx: 1, dy: 1 } }, { tagName: "feComponentTransfer", children: [{ tagName: "feFuncA", attributes: { type: "linear", slope: 0.3 } }] }, { tagName: "feMerge", children: [{ tagName: "feMergeNode" }, { tagName: "feMergeNode", attributes: { in: "SourceGraphic" } }] }] });
- }, u.prototype.bodyFormatter = function(i) {
- return i.map(function(p) {
- var a = p.series.tooltipOptions;
- return (a[(p.point.formatPrefix || "point") + "Formatter"] || p.point.tooltipFormatter).call(p.point, a[(p.point.formatPrefix || "point") + "Format"] || "");
- });
- }, u.prototype.cleanSplit = function(i) {
- this.chart.series.forEach(function(p) {
- var a = p && p.tt;
- a && (!a.isActive || i ? p.tt = a.destroy() : a.isActive = !1);
- });
- }, u.prototype.defaultFormatter = function(i) {
- var p = this.points || h(this), a = [i.tooltipFooterHeaderFormatter(p[0])];
- return a = a.concat(i.bodyFormatter(p)), a.push(i.tooltipFooterHeaderFormatter(
- p[0],
- !0
- )), a;
- }, u.prototype.destroy = function() {
- this.label && (this.label = this.label.destroy()), this.split && this.tt && (this.cleanSplit(!0), this.tt = this.tt.destroy()), this.renderer && (this.renderer = this.renderer.destroy(), l(this.container)), G.clearTimeout(this.hideTimer), G.clearTimeout(this.tooltipTimeout);
- }, u.prototype.getAnchor = function(i, p) {
- var a = this.chart, t = a.pointer, s = a.inverted, n = a.plotTop, P = a.plotLeft, D, I, W = 0, E = 0;
- return i = h(i), this.followPointer && p ? (typeof p.chartX > "u" && (p = t.normalize(p)), t = [p.chartX - P, p.chartY - n]) : i[0].tooltipPos ? t = i[0].tooltipPos : (i.forEach(function(X) {
- D = X.series.yAxis, I = X.series.xAxis, W += X.plotX || 0, E += X.plotLow ? (X.plotLow + (X.plotHigh || 0)) / 2 : X.plotY || 0, I && D && (s ? (W += n + a.plotHeight - I.len - I.pos, E += P + a.plotWidth - D.len - D.pos) : (W += I.pos - P, E += D.pos - n));
- }), W /= i.length, E /= i.length, t = [s ? a.plotWidth - E : W, s ? a.plotHeight - W : E], this.shared && 1 < i.length && p && (s ? t[0] = p.chartX - P : t[1] = p.chartY - n)), t.map(Math.round);
- }, u.prototype.getLabel = function() {
- var i = this, p = this.chart.styledMode, a = this.options, t = this.split && this.allowShared, s = "tooltip" + (f(a.className) ? " " + a.className : ""), n = a.style.pointerEvents || (!this.followPointer && a.stickOnContact ? "auto" : "none"), P = function() {
- i.inContact = !0;
- }, D = function(z) {
- var $ = i.chart.hoverSeries;
- i.inContact = i.shouldStickOnContact() && i.chart.pointer.inClass(z.relatedTarget, "highcharts-tooltip"), !i.inContact && $ && $.onMouseOut && $.onMouseOut();
- }, I, W = this.chart.renderer;
- if (i.label) {
- var E = !i.label.hasClass("highcharts-label");
- (t && !E || !t && E) && i.destroy();
- }
- if (!this.label) {
- if (this.outside) {
- E = this.chart.options.chart.style;
- var X = U.getRendererType();
- this.container = I = N.doc.createElement("div"), I.className = "highcharts-tooltip-container", x(I, { position: "absolute", top: "1px", pointerEvents: n, zIndex: Math.max(this.options.style.zIndex || 0, (E && E.zIndex || 0) + 3) }), j(I, "mouseenter", P), j(I, "mouseleave", D), N.doc.body.appendChild(I), this.renderer = W = new X(I, 0, 0, E, void 0, void 0, W.styledMode);
- }
- if (t ? this.label = W.g(s) : (this.label = W.label("", 0, 0, a.shape, void 0, void 0, a.useHTML, void 0, s).attr({ padding: a.padding, r: a.borderRadius }), p || this.label.attr({ fill: a.backgroundColor, "stroke-width": a.borderWidth }).css(a.style).css({ pointerEvents: n }).shadow(a.shadow)), p && a.shadow && (this.applyFilter(), this.label.attr({ filter: "url(#drop-shadow-" + this.chart.index + ")" })), i.outside && !i.split) {
- var g = this.label, m = g.xSetter, L = g.ySetter;
- g.xSetter = function(z) {
- m.call(g, i.distance), I.style.left = z + "px";
- }, g.ySetter = function(z) {
- L.call(g, i.distance), I.style.top = z + "px";
- };
- }
- this.label.on("mouseenter", P).on("mouseleave", D).attr({ zIndex: 8 }).add();
- }
- return this.label;
- }, u.prototype.getPosition = function(i, p, a) {
- var t = this.chart, s = this.distance, n = {}, P = t.inverted && a.h || 0, D = this.outside, I = D ? F.documentElement.clientWidth - 2 * s : t.chartWidth, W = D ? Math.max(F.body.scrollHeight, F.documentElement.scrollHeight, F.body.offsetHeight, F.documentElement.offsetHeight, F.documentElement.clientHeight) : t.chartHeight, E = t.pointer.getChartPosition(), X = function(Y) {
- var Z = Y === "x";
- return [Y, Z ? I : W, Z ? i : p].concat(D ? [Z ? i * E.scaleX : p * E.scaleY, Z ? E.left - s + (a.plotX + t.plotLeft) * E.scaleX : E.top - s + (a.plotY + t.plotTop) * E.scaleY, 0, Z ? I : W] : [Z ? i : p, Z ? a.plotX + t.plotLeft : a.plotY + t.plotTop, Z ? t.plotLeft : t.plotTop, Z ? t.plotLeft + t.plotWidth : t.plotTop + t.plotHeight]);
- }, g = X("y"), m = X("x"), L;
- X = !!a.negative, !t.polar && t.hoverSeries && t.hoverSeries.yAxis && t.hoverSeries.yAxis.reversed && (X = !X);
- var z = !this.followPointer && v(a.ttBelow, !t.inverted === X), $ = function(Y, Z, q, it, et, nt, rt) {
- var ct = D ? Y === "y" ? s * E.scaleY : s * E.scaleX : s, gt = (q - it) / 2, dt = it < et - s, ht = et + s + it < Z, at = et - ct - q + gt;
- if (et = et + ct - gt, z && ht)
- n[Y] = et;
- else if (!z && dt)
- n[Y] = at;
- else if (dt)
- n[Y] = Math.min(rt - it, 0 > at - P ? at : at - P);
- else if (ht)
- n[Y] = Math.max(nt, et + P + q > Z ? et : et + P);
- else
- return !1;
- }, Q = function(Y, Z, q, it, et) {
- var nt;
- return et < s || et > Z - s ? nt = !1 : n[Y] = et < q / 2 ? 1 : et > Z - it / 2 ? Z - it - 2 : et - q / 2, nt;
- }, A = function(Y) {
- var Z = g;
- g = m, m = Z, L = Y;
- }, H = function() {
- $.apply(0, g) !== !1 ? Q.apply(0, m) !== !1 || L || (A(!0), H()) : L ? n.x = n.y = 0 : (A(!0), H());
- };
- return (t.inverted || 1 < this.len) && A(), H(), n;
- }, u.prototype.hide = function(i) {
- var p = this;
- G.clearTimeout(this.hideTimer), i = v(i, this.options.hideDelay), this.isHidden || (this.hideTimer = c(function() {
- p.getLabel().fadeOut(i && void 0), p.isHidden = !0;
- }, i));
- }, u.prototype.init = function(i, p) {
- this.chart = i, this.options = p, this.crosshairs = [], this.now = { x: 0, y: 0 }, this.isHidden = !0, this.split = p.split && !i.inverted && !i.polar, this.shared = p.shared || this.split, this.outside = v(p.outside, !(!i.scrollablePixelsX && !i.scrollablePixelsY));
- }, u.prototype.shouldStickOnContact = function() {
- return !(this.followPointer || !this.options.stickOnContact);
- }, u.prototype.isStickyOnContact = function() {
- return !(!this.shouldStickOnContact() || !this.inContact);
- }, u.prototype.move = function(i, p, a, t) {
- var s = this, n = s.now, P = s.options.animation !== !1 && !s.isHidden && (1 < Math.abs(i - n.x) || 1 < Math.abs(p - n.y)), D = s.followPointer || 1 < s.len;
- T(n, { x: P ? (2 * n.x + i) / 3 : i, y: P ? (n.y + p) / 2 : p, anchorX: D ? void 0 : P ? (2 * n.anchorX + a) / 3 : a, anchorY: D ? void 0 : P ? (n.anchorY + t) / 2 : t }), s.getLabel().attr(n), s.drawTracker(), P && (G.clearTimeout(this.tooltipTimeout), this.tooltipTimeout = setTimeout(function() {
- s && s.move(i, p, a, t);
- }, 32));
- }, u.prototype.refresh = function(i, p) {
- var a = this.chart, t = this.options, s = h(i), n = s[0], P = [], D = t.formatter || this.defaultFormatter, I = this.shared, W = a.styledMode, E = {};
- if (t.enabled) {
- G.clearTimeout(this.hideTimer), this.allowShared = !(!R(i) && i.series && i.series.noSharedTooltip), this.followPointer = !this.split && n.series.tooltipOptions.followPointer, i = this.getAnchor(i, p);
- var X = i[0], g = i[1];
- if (I && this.allowShared ? (a.pointer.applyInactiveState(s), s.forEach(function(z) {
- z.setState("hover"), P.push(z.getLabelConfig());
- }), E = { x: n.category, y: n.y }, E.points = P) : E = n.getLabelConfig(), this.len = P.length, D = D.call(E, this), I = n.series, this.distance = v(
- I.tooltipOptions.distance,
- 16
- ), D === !1)
- this.hide();
- else {
- if (this.split && this.allowShared)
- this.renderSplit(D, s);
- else {
- var m = X, L = g;
- if (p && a.pointer.isDirectTouch && (m = p.chartX - a.plotLeft, L = p.chartY - a.plotTop), a.polar || I.options.clip === !1 || s.some(function(z) {
- return z.series.shouldShowTooltip(m, L);
- }))
- p = this.getLabel(), t.style.width && !W || p.css({ width: this.chart.spacingBox.width + "px" }), p.attr({ text: D && D.join ? D.join("") : D }), p.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-" + v(n.colorIndex, I.colorIndex)), W || p.attr({ stroke: t.borderColor || n.color || I.color || "#666666" }), this.updatePosition({ plotX: X, plotY: g, negative: n.negative, ttBelow: n.ttBelow, h: i[2] || 0 });
- else {
- this.hide();
- return;
- }
- }
- this.isHidden && this.label && this.label.attr({ opacity: 1 }).show(), this.isHidden = !1;
- }
- O(this, "refresh");
- }
- }, u.prototype.renderSplit = function(i, p) {
- function a(ht, at, J, tt, ot) {
- return ot === void 0 && (ot = !0), J ? (at = it ? 0 : ct, ht = w(ht - tt / 2, Y.left, Y.right - tt - (t.outside ? et : 0))) : (at -= nt, ht = ot ? ht - tt - Q : ht + Q, ht = w(ht, ot ? ht : Y.left, Y.right)), { x: ht, y: at };
- }
- var t = this, s = t.chart, n = t.chart, P = n.chartWidth, D = n.chartHeight, I = n.plotHeight, W = n.plotLeft, E = n.plotTop, X = n.pointer, g = n.scrollablePixelsY;
- g = g === void 0 ? 0 : g;
- var m = n.scrollablePixelsX, L = n.scrollingContainer;
- L = L === void 0 ? { scrollLeft: 0, scrollTop: 0 } : L;
- var z = L.scrollLeft;
- L = L.scrollTop;
- var $ = n.styledMode, Q = t.distance, A = t.options, H = t.options.positioner, Y = t.outside && typeof m != "number" ? F.documentElement.getBoundingClientRect() : { left: z, right: z + P, top: L, bottom: L + D }, Z = t.getLabel(), q = this.renderer || s.renderer, it = !(!s.xAxis[0] || !s.xAxis[0].opposite);
- s = X.getChartPosition();
- var et = s.left;
- s = s.top;
- var nt = E + L, rt = 0, ct = I - g;
- b(i) && (i = [!1, i]), i = i.slice(0, p.length + 1).reduce(function(ht, at, J) {
- if (at !== !1 && at !== "") {
- J = p[J - 1] || { isHeader: !0, plotX: p[0].plotX, plotY: I, series: {} };
- var tt = J.isHeader, ot = tt ? t : J.series;
- at = at.toString();
- var lt = ot.tt, pt = J.isHeader, yt = J.series, vt = "highcharts-color-" + v(J.colorIndex, yt.colorIndex, "none");
- if (lt || (lt = { padding: A.padding, r: A.borderRadius }, $ || (lt.fill = A.backgroundColor, lt["stroke-width"] = A.borderWidth), lt = q.label("", 0, 0, A[pt ? "headerShape" : "shape"], void 0, void 0, A.useHTML).addClass((pt ? "highcharts-tooltip-header " : "") + "highcharts-tooltip-box " + vt).attr(lt).add(Z)), lt.isActive = !0, lt.attr({ text: at }), $ || lt.css(A.style).shadow(A.shadow).attr({ stroke: A.borderColor || J.color || yt.color || "#333333" }), ot = ot.tt = lt, pt = ot.getBBox(), at = pt.width + ot.strokeWidth(), tt && (rt = pt.height, ct += rt, it && (nt -= rt)), yt = J.plotX, yt = yt === void 0 ? 0 : yt, vt = J.plotY, vt = vt === void 0 ? 0 : vt, lt = J.series, J.isHeader) {
- yt = W + yt;
- var Ct = E + I / 2;
- } else {
- var Pt = lt.xAxis, At = lt.yAxis;
- yt = Pt.pos + w(yt, -Q, Pt.len + Q), lt.shouldShowTooltip(0, At.pos - E + vt, { ignoreX: !0 }) && (Ct = At.pos + vt);
- }
- yt = w(
- yt,
- Y.left - Q,
- Y.right + Q
- ), typeof Ct == "number" ? (pt = pt.height + 1, vt = H ? H.call(t, at, pt, J) : a(yt, Ct, tt, at), ht.push({ align: H ? 0 : void 0, anchorX: yt, anchorY: Ct, boxWidth: at, point: J, rank: v(vt.rank, tt ? 1 : 0), size: pt, target: vt.y, tt: ot, x: vt.x })) : ot.isActive = !1;
- }
- return ht;
- }, []), !H && i.some(function(ht) {
- var at = (t.outside ? et : 0) + ht.anchorX;
- return at < Y.left && at + ht.boxWidth < Y.right ? !0 : at < et - Y.left + ht.boxWidth && Y.right - at > at;
- }) && (i = i.map(function(ht) {
- var at = a(ht.anchorX, ht.anchorY, ht.point.isHeader, ht.boxWidth, !1);
- return T(ht, { target: at.y, x: at.x });
- })), t.cleanSplit(), B(i, ct);
- var gt = et, dt = et;
- i.forEach(function(ht) {
- var at = ht.x, J = ht.boxWidth;
- ht = ht.isHeader, ht || (t.outside && et + at < gt && (gt = et + at), !ht && t.outside && gt + J > dt && (dt = et + at));
- }), i.forEach(function(ht) {
- var at = ht.x, J = ht.anchorX, tt = ht.pos, ot = ht.point.isHeader;
- if (tt = { visibility: typeof tt > "u" ? "hidden" : "inherit", x: at, y: tt + nt, anchorX: J, anchorY: ht.anchorY }, t.outside && at < J) {
- var lt = et - gt;
- 0 < lt && (ot || (tt.x = at + lt, tt.anchorX = J + lt), ot && (tt.x = (dt - gt) / 2, tt.anchorX = J + lt));
- }
- ht.tt.attr(tt);
- }), i = t.container, g = t.renderer, t.outside && i && g && (n = Z.getBBox(), g.setSize(n.width + n.x, n.height + n.y, !1), i.style.left = gt + "px", i.style.top = s + "px");
- }, u.prototype.drawTracker = function() {
- if (this.followPointer || !this.options.stickOnContact)
- this.tracker && this.tracker.destroy();
- else {
- var i = this.chart, p = this.label, a = this.shared ? i.hoverPoints : i.hoverPoint;
- if (p && a) {
- var t = { x: 0, y: 0, width: 0, height: 0 };
- a = this.getAnchor(a);
- var s = p.getBBox();
- a[0] += i.plotLeft - p.translateX, a[1] += i.plotTop - p.translateY, t.x = Math.min(0, a[0]), t.y = Math.min(0, a[1]), t.width = 0 > a[0] ? Math.max(Math.abs(a[0]), s.width - a[0]) : Math.max(
- Math.abs(a[0]),
- s.width
- ), t.height = 0 > a[1] ? Math.max(Math.abs(a[1]), s.height - Math.abs(a[1])) : Math.max(Math.abs(a[1]), s.height), this.tracker ? this.tracker.attr(t) : (this.tracker = p.renderer.rect(t).addClass("highcharts-tracker").add(p), i.styledMode || this.tracker.attr({ fill: "rgba(0,0,0,0)" }));
- }
- }
- }, u.prototype.styledModeFormat = function(i) {
- return i.replace('style="font-size: 10px"', 'class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g, 'class="highcharts-color-{$1.colorIndex}"');
- }, u.prototype.tooltipFooterHeaderFormatter = function(i, p) {
- var a = i.series, t = a.tooltipOptions, s = a.xAxis, n = s && s.dateTime;
- s = { isFooter: p, labelConfig: i };
- var P = t.xDateFormat, D = t[p ? "footerFormat" : "headerFormat"];
- return O(this, "headerFormatter", s, function(I) {
- n && !P && k(i.key) && (P = n.getXDateFormat(i.key, t.dateTimeLabelFormats)), n && P && (i.point && i.point.tooltipDateKeys || ["key"]).forEach(function(W) {
- D = D.replace("{point." + W + "}", "{point." + W + ":" + P + "}");
- }), a.chart.styledMode && (D = this.styledModeFormat(D)), I.text = V(D, { point: i, series: a }, this.chart);
- }), s.text;
- }, u.prototype.update = function(i) {
- this.destroy(), S(!0, this.chart.options.tooltip.userOptions, i), this.init(this.chart, S(!0, this.options, i));
- }, u.prototype.updatePosition = function(i) {
- var p = this.chart, a = this.options, t = p.pointer, s = this.getLabel();
- t = t.getChartPosition();
- var n = (a.positioner || this.getPosition).call(this, s.width, s.height, i), P = i.plotX + p.plotLeft;
- i = i.plotY + p.plotTop, this.outside && (a = a.borderWidth + 2 * this.distance, this.renderer.setSize(s.width + a, s.height + a, !1), (t.scaleX !== 1 || t.scaleY !== 1) && (x(this.container, { transform: "scale(" + t.scaleX + ", " + t.scaleY + ")" }), P *= t.scaleX, i *= t.scaleY), P += t.left - n.x, i += t.top - n.y), this.move(Math.round(n.x), Math.round(n.y || 0), P, i);
- }, u;
- }(), y;
- }), C(o, "Core/Series/Point.js", [o["Core/Renderer/HTML/AST.js"], o["Core/Animation/AnimationUtilities.js"], o["Core/DefaultOptions.js"], o["Core/FormatUtilities.js"], o["Core/Utilities.js"]], function(y, N, _, U, G) {
- var V = N.animObject, F = _.defaultOptions, B = U.format, j = G.addEvent, w = G.defined, x = G.erase, f = G.extend, l = G.fireEvent, T = G.getNestedProperty, O = G.isArray, R = G.isFunction, k = G.isNumber, b = G.isObject, S = G.merge, v = G.objectEach, h = G.pick, c = G.syncTimeout, u = G.removeEvent, i = G.uniqueKey;
- return N = function() {
- function p() {
- this.colorIndex = this.category = void 0, this.formatPrefix = "point", this.id = void 0, this.isNull = !1, this.percentage = this.options = this.name = void 0, this.selected = !1, this.total = this.series = void 0, this.visible = !0, this.x = void 0;
- }
- return p.prototype.animateBeforeDestroy = function() {
- var a = this, t = { x: a.startXPos, opacity: 0 }, s = a.getGraphicalProps();
- s.singular.forEach(function(n) {
- a[n] = a[n].animate(n === "dataLabel" ? { x: a[n].startXPos, y: a[n].startYPos, opacity: 0 } : t);
- }), s.plural.forEach(function(n) {
- a[n].forEach(function(P) {
- P.element && P.animate(f({ x: a.startXPos }, P.startYPos ? { x: P.startXPos, y: P.startYPos } : {}));
- });
- });
- }, p.prototype.applyOptions = function(a, t) {
- var s = this.series, n = s.options.pointValKey || s.pointValKey;
- return a = p.prototype.optionsToObject.call(this, a), f(this, a), this.options = this.options ? f(this.options, a) : a, a.group && delete this.group, a.dataLabels && delete this.dataLabels, n && (this.y = p.prototype.getNestedProperty.call(
- this,
- n
- )), this.formatPrefix = (this.isNull = h(this.isValid && !this.isValid(), this.x === null || !k(this.y))) ? "null" : "point", this.selected && (this.state = "select"), "name" in this && typeof t > "u" && s.xAxis && s.xAxis.hasNames && (this.x = s.xAxis.nameToX(this)), typeof this.x > "u" && s ? this.x = typeof t > "u" ? s.autoIncrement() : t : k(a.x) && s.options.relativeXValue && (this.x = s.autoIncrement(a.x)), this;
- }, p.prototype.destroy = function() {
- function a() {
- (t.graphic || t.dataLabel || t.dataLabels) && (u(t), t.destroyElements());
- for (I in t)
- t[I] = null;
- }
- var t = this, s = t.series, n = s.chart;
- s = s.options.dataSorting;
- var P = n.hoverPoints, D = V(t.series.chart.renderer.globalAnimation), I;
- t.legendItem && n.legend.destroyItem(t), P && (t.setState(), x(P, t), P.length || (n.hoverPoints = null)), t === n.hoverPoint && t.onMouseOut(), s && s.enabled ? (this.animateBeforeDestroy(), c(a, D.duration)) : a(), n.pointCount--;
- }, p.prototype.destroyElements = function(a) {
- var t = this;
- a = t.getGraphicalProps(a), a.singular.forEach(function(s) {
- t[s] = t[s].destroy();
- }), a.plural.forEach(function(s) {
- t[s].forEach(function(n) {
- n.element && n.destroy();
- }), delete t[s];
- });
- }, p.prototype.firePointEvent = function(a, t, s) {
- var n = this, P = this.series.options;
- (P.point.events[a] || n.options && n.options.events && n.options.events[a]) && n.importEvents(), a === "click" && P.allowPointSelect && (s = function(D) {
- n.select && n.select(null, D.ctrlKey || D.metaKey || D.shiftKey);
- }), l(n, a, t, s);
- }, p.prototype.getClassName = function() {
- return "highcharts-point" + (this.selected ? " highcharts-point-select" : "") + (this.negative ? " highcharts-negative" : "") + (this.isNull ? " highcharts-null-point" : "") + (typeof this.colorIndex < "u" ? " highcharts-color-" + this.colorIndex : "") + (this.options.className ? " " + this.options.className : "") + (this.zone && this.zone.className ? " " + this.zone.className.replace("highcharts-negative", "") : "");
- }, p.prototype.getGraphicalProps = function(a) {
- var t = this, s = [], n = { singular: [], plural: [] }, P;
- for (a = a || { graphic: 1, dataLabel: 1 }, a.graphic && s.push("graphic", "upperGraphic", "shadowGroup"), a.dataLabel && s.push("dataLabel", "dataLabelUpper", "connector"), P = s.length; P--; ) {
- var D = s[P];
- t[D] && n.singular.push(D);
- }
- return ["dataLabel", "connector"].forEach(function(I) {
- var W = I + "s";
- a[I] && t[W] && n.plural.push(W);
- }), n;
- }, p.prototype.getLabelConfig = function() {
- return { x: this.category, y: this.y, color: this.color, colorIndex: this.colorIndex, key: this.name || this.category, series: this.series, point: this, percentage: this.percentage, total: this.total || this.stackTotal };
- }, p.prototype.getNestedProperty = function(a) {
- if (a)
- return a.indexOf("custom.") === 0 ? T(a, this.options) : this[a];
- }, p.prototype.getZone = function() {
- var a = this.series, t = a.zones;
- a = a.zoneAxis || "y";
- var s, n = 0;
- for (s = t[n]; this[a] >= s.value; )
- s = t[++n];
- return this.nonZonedColor || (this.nonZonedColor = this.color), this.color = s && s.color && !this.options.color ? s.color : this.nonZonedColor, s;
- }, p.prototype.hasNewShapeType = function() {
- return (this.graphic && (this.graphic.symbolName || this.graphic.element.nodeName)) !== this.shapeType;
- }, p.prototype.init = function(a, t, s) {
- return this.series = a, this.applyOptions(t, s), this.id = w(this.id) ? this.id : i(), this.resolveColor(), a.chart.pointCount++, l(this, "afterInit"), this;
- }, p.prototype.optionsToObject = function(a) {
- var t = this.series, s = t.options.keys, n = s || t.pointArrayMap || ["y"], P = n.length, D = {}, I = 0, W = 0;
- if (k(a) || a === null)
- D[n[0]] = a;
- else if (O(a))
- for (!s && a.length > P && (t = typeof a[0], t === "string" ? D.name = a[0] : t === "number" && (D.x = a[0]), I++); W < P; )
- s && typeof a[I] > "u" || (0 < n[W].indexOf(".") ? p.prototype.setNestedProperty(D, a[I], n[W]) : D[n[W]] = a[I]), I++, W++;
- else
- typeof a == "object" && (D = a, a.dataLabels && (t._hasPointLabels = !0), a.marker && (t._hasPointMarkers = !0));
- return D;
- }, p.prototype.resolveColor = function() {
- var a = this.series, t = a.chart.styledMode, s = a.chart.options.chart.colorCount;
- if (delete this.nonZonedColor, a.options.colorByPoint) {
- if (!t) {
- s = a.options.colors || a.chart.options.colors;
- var n = s[a.colorCounter];
- s = s.length;
- }
- t = a.colorCounter, a.colorCounter++, a.colorCounter === s && (a.colorCounter = 0);
- } else
- t || (n = a.color), t = a.colorIndex;
- this.colorIndex = h(this.options.colorIndex, t), this.color = h(this.options.color, n);
- }, p.prototype.setNestedProperty = function(a, t, s) {
- return s.split(".").reduce(function(n, P, D, I) {
- return n[P] = I.length - 1 === D ? t : b(n[P], !0) ? n[P] : {}, n[P];
- }, a), a;
- }, p.prototype.tooltipFormatter = function(a) {
- var t = this.series, s = t.tooltipOptions, n = h(s.valueDecimals, ""), P = s.valuePrefix || "", D = s.valueSuffix || "";
- return t.chart.styledMode && (a = t.chart.tooltip.styledModeFormat(a)), (t.pointArrayMap || ["y"]).forEach(function(I) {
- I = "{point." + I, (P || D) && (a = a.replace(RegExp(I + "}", "g"), P + I + "}" + D)), a = a.replace(RegExp(I + "}", "g"), I + ":,." + n + "f}");
- }), B(a, { point: this, series: this.series }, t.chart);
- }, p.prototype.update = function(a, t, s, n) {
- function P() {
- D.applyOptions(a);
- var m = W && D.hasDummyGraphic;
- m = D.y === null ? !m : m, W && m && (D.graphic = W.destroy(), delete D.hasDummyGraphic), b(a, !0) && (W && W.element && a && a.marker && typeof a.marker.symbol < "u" && (D.graphic = W.destroy()), a && a.dataLabels && D.dataLabel && (D.dataLabel = D.dataLabel.destroy()), D.connector && (D.connector = D.connector.destroy())), g = D.index, I.updateParallelArrays(D, g), X.data[g] = b(X.data[g], !0) || b(a, !0) ? D.options : h(a, X.data[g]), I.isDirty = I.isDirtyData = !0, !I.fixedBox && I.hasCartesianSeries && (E.isDirtyBox = !0), X.legendType === "point" && (E.isDirtyLegend = !0), t && E.redraw(s);
- }
- var D = this, I = D.series, W = D.graphic, E = I.chart, X = I.options, g;
- t = h(t, !0), n === !1 ? P() : D.firePointEvent("update", { options: a }, P);
- }, p.prototype.remove = function(a, t) {
- this.series.removePoint(this.series.data.indexOf(this), a, t);
- }, p.prototype.select = function(a, t) {
- var s = this, n = s.series, P = n.chart;
- this.selectedStaging = a = h(a, !s.selected), s.firePointEvent(a ? "select" : "unselect", { accumulate: t }, function() {
- s.selected = s.options.selected = a, n.options.data[n.data.indexOf(s)] = s.options, s.setState(a && "select"), t || P.getSelectedPoints().forEach(function(D) {
- var I = D.series;
- D.selected && D !== s && (D.selected = D.options.selected = !1, I.options.data[I.data.indexOf(D)] = D.options, D.setState(P.hoverPoints && I.options.inactiveOtherPoints ? "inactive" : ""), D.firePointEvent("unselect"));
- });
- }), delete this.selectedStaging;
- }, p.prototype.onMouseOver = function(a) {
- var t = this.series.chart, s = t.pointer;
- a = a ? s.normalize(a) : s.getChartCoordinatesFromPoint(this, t.inverted), s.runPointActions(
- a,
- this
- );
- }, p.prototype.onMouseOut = function() {
- var a = this.series.chart;
- this.firePointEvent("mouseOut"), this.series.options.inactiveOtherPoints || (a.hoverPoints || []).forEach(function(t) {
- t.setState();
- }), a.hoverPoints = a.hoverPoint = null;
- }, p.prototype.importEvents = function() {
- if (!this.hasImportedEvents) {
- var a = this, t = S(a.series.options.point, a.options).events;
- a.events = t, v(t, function(s, n) {
- R(s) && j(a, n, s);
- }), this.hasImportedEvents = !0;
- }
- }, p.prototype.setState = function(a, t) {
- var s = this.series, n = this.state, P = s.options.states[a || "normal"] || {}, D = F.plotOptions[s.type].marker && s.options.marker, I = D && D.enabled === !1, W = D && D.states && D.states[a || "normal"] || {}, E = W.enabled === !1, X = this.marker || {}, g = s.chart, m = D && s.markerAttribs, L = s.halo, z, $ = s.stateMarkerGraphic;
- if (a = a || "", !(a === this.state && !t || this.selected && a !== "select" || P.enabled === !1 || a && (E || I && W.enabled === !1) || a && X.states && X.states[a] && X.states[a].enabled === !1)) {
- if (this.state = a, m && (z = s.markerAttribs(this, a)), this.graphic && !this.hasDummyGraphic) {
- if (n && this.graphic.removeClass("highcharts-point-" + n), a && this.graphic.addClass("highcharts-point-" + a), !g.styledMode) {
- var Q = s.pointAttribs(this, a), A = h(g.options.chart.animation, P.animation);
- s.options.inactiveOtherPoints && k(Q.opacity) && ((this.dataLabels || []).forEach(function(H) {
- H && H.animate({ opacity: Q.opacity }, A);
- }), this.connector && this.connector.animate({ opacity: Q.opacity }, A)), this.graphic.animate(Q, A);
- }
- z && this.graphic.animate(z, h(g.options.chart.animation, W.animation, D.animation)), $ && $.hide();
- } else
- a && W && (n = X.symbol || s.symbol, $ && $.currentSymbol !== n && ($ = $.destroy()), z && ($ ? $[t ? "animate" : "attr"]({ x: z.x, y: z.y }) : n && (s.stateMarkerGraphic = $ = g.renderer.symbol(n, z.x, z.y, z.width, z.height).add(s.markerGroup), $.currentSymbol = n)), !g.styledMode && $ && this.state !== "inactive" && $.attr(s.pointAttribs(this, a))), $ && ($[a && this.isInside ? "show" : "hide"](), $.element.point = this, $.addClass(this.getClassName(), !0));
- P = P.halo, z = ($ = this.graphic || $) && $.visibility || "inherit", P && P.size && $ && z !== "hidden" && !this.isCluster ? (L || (s.halo = L = g.renderer.path().add($.parentGroup)), L.show()[t ? "animate" : "attr"]({ d: this.haloPath(P.size) }), L.attr({ class: "highcharts-halo highcharts-color-" + h(this.colorIndex, s.colorIndex) + (this.className ? " " + this.className : ""), visibility: z, zIndex: -1 }), L.point = this, g.styledMode || L.attr(f({ fill: this.color || s.color, "fill-opacity": P.opacity }, y.filterUserAttributes(P.attributes || {})))) : L && L.point && L.point.haloPath && L.animate({ d: L.point.haloPath(0) }, null, L.hide), l(this, "afterSetState", { state: a });
- }
- }, p.prototype.haloPath = function(a) {
- return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX) - a, this.plotY - a, 2 * a, 2 * a);
- }, p;
- }(), N;
- }), C(o, "Core/Pointer.js", [o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Tooltip.js"], o["Core/Utilities.js"]], function(y, N, _, U) {
- var G = y.parse, V = N.charts, F = N.noop, B = U.addEvent, j = U.attr, w = U.css, x = U.defined, f = U.extend, l = U.find, T = U.fireEvent, O = U.isNumber, R = U.isObject, k = U.objectEach, b = U.offset, S = U.pick, v = U.splat;
- return y = function() {
- function h(c, u) {
- this.lastValidTouch = {}, this.pinchDown = [], this.runChartClick = !1, this.eventsToUnbind = [], this.chart = c, this.hasDragged = !1, this.options = u, this.init(c, u);
- }
- return h.prototype.applyInactiveState = function(c) {
- var u = [], i;
- (c || []).forEach(function(p) {
- i = p.series, u.push(i), i.linkedParent && u.push(i.linkedParent), i.linkedSeries && (u = u.concat(i.linkedSeries)), i.navigatorSeries && u.push(i.navigatorSeries);
- }), this.chart.series.forEach(function(p) {
- u.indexOf(p) === -1 ? p.setState("inactive", !0) : p.options.inactiveOtherPoints && p.setAllPointsToState("inactive");
- });
- }, h.prototype.destroy = function() {
- var c = this;
- this.eventsToUnbind.forEach(function(u) {
- return u();
- }), this.eventsToUnbind = [], N.chartCount || (h.unbindDocumentMouseUp && (h.unbindDocumentMouseUp = h.unbindDocumentMouseUp()), h.unbindDocumentTouchEnd && (h.unbindDocumentTouchEnd = h.unbindDocumentTouchEnd())), clearInterval(c.tooltipTimeout), k(c, function(u, i) {
- c[i] = void 0;
- });
- }, h.prototype.drag = function(c) {
- var u = this.chart, i = u.options.chart, p = this.zoomHor, a = this.zoomVert, t = u.plotLeft, s = u.plotTop, n = u.plotWidth, P = u.plotHeight, D = this.mouseDownX || 0, I = this.mouseDownY || 0, W = R(i.panning) ? i.panning && i.panning.enabled : i.panning, E = i.panKey && c[i.panKey + "Key"], X = c.chartX, g = c.chartY, m = this.selectionMarker;
- if ((!m || !m.touch) && (X < t ? X = t : X > t + n && (X = t + n), g < s ? g = s : g > s + P && (g = s + P), this.hasDragged = Math.sqrt(Math.pow(D - X, 2) + Math.pow(I - g, 2)), 10 < this.hasDragged)) {
- var L = u.isInsidePlot(D - t, I - s, { visiblePlotOnly: !0 });
- !u.hasCartesianSeries && !u.mapView || !this.zoomX && !this.zoomY || !L || E || m || (this.selectionMarker = m = u.renderer.rect(t, s, p ? 1 : n, a ? 1 : P, 0).attr({ class: "highcharts-selection-marker", zIndex: 7 }).add(), u.styledMode || m.attr({ fill: i.selectionMarkerFill || G("#335cad").setOpacity(0.25).get() })), m && p && (p = X - D, m.attr({ width: Math.abs(p), x: (0 < p ? 0 : p) + D })), m && a && (p = g - I, m.attr({ height: Math.abs(p), y: (0 < p ? 0 : p) + I })), L && !m && W && u.pan(c, i.panning);
- }
- }, h.prototype.dragStart = function(c) {
- var u = this.chart;
- u.mouseIsDown = c.type, u.cancelClick = !1, u.mouseDownX = this.mouseDownX = c.chartX, u.mouseDownY = this.mouseDownY = c.chartY;
- }, h.prototype.drop = function(c) {
- var u = this, i = this.chart, p = this.hasPinched;
- if (this.selectionMarker) {
- var a = this.selectionMarker, t = a.attr ? a.attr("x") : a.x, s = a.attr ? a.attr("y") : a.y, n = a.attr ? a.attr("width") : a.width, P = a.attr ? a.attr("height") : a.height, D = { originalEvent: c, xAxis: [], yAxis: [], x: t, y: s, width: n, height: P }, I = !!i.mapView;
- (this.hasDragged || p) && (i.axes.forEach(function(W) {
- if (W.zoomEnabled && x(W.min) && (p || u[{ xAxis: "zoomX", yAxis: "zoomY" }[W.coll]]) && O(t) && O(s)) {
- var E = W.horiz, X = c.type === "touchend" ? W.minPixelPadding : 0, g = W.toValue((E ? t : s) + X);
- E = W.toValue((E ? t + n : s + P) - X), D[W.coll].push({ axis: W, min: Math.min(g, E), max: Math.max(g, E) }), I = !0;
- }
- }), I && T(i, "selection", D, function(W) {
- i.zoom(f(
- W,
- p ? { animation: !1 } : null
- ));
- })), O(i.index) && (this.selectionMarker = this.selectionMarker.destroy()), p && this.scaleGroups();
- }
- i && O(i.index) && (w(i.container, { cursor: i._cursor }), i.cancelClick = 10 < this.hasDragged, i.mouseIsDown = this.hasDragged = this.hasPinched = !1, this.pinchDown = []);
- }, h.prototype.findNearestKDPoint = function(c, u, i) {
- var p = this.chart, a = p.hoverPoint;
- if (p = p.tooltip, a && p && p.isStickyOnContact())
- return a;
- var t;
- return c.forEach(function(s) {
- var n = !(s.noSharedTooltip && u) && 0 > s.options.findNearestPointBy.indexOf("y");
- if (s = s.searchPoint(i, n), (n = R(s, !0) && s.series) && !(n = !R(t, !0))) {
- n = t.distX - s.distX;
- var P = t.dist - s.dist, D = (s.series.group && s.series.group.zIndex) - (t.series.group && t.series.group.zIndex);
- n = 0 < (n !== 0 && u ? n : P !== 0 ? P : D !== 0 ? D : t.series.index > s.series.index ? -1 : 1);
- }
- n && (t = s);
- }), t;
- }, h.prototype.getChartCoordinatesFromPoint = function(c, u) {
- var i = c.series, p = i.xAxis;
- i = i.yAxis;
- var a = c.shapeArgs;
- if (p && i) {
- var t = S(c.clientX, c.plotX), s = c.plotY || 0;
- return c.isNode && a && O(a.x) && O(a.y) && (t = a.x, s = a.y), u ? { chartX: i.len + i.pos - s, chartY: p.len + p.pos - t } : { chartX: t + p.pos, chartY: s + i.pos };
- }
- if (a && a.x && a.y)
- return { chartX: a.x, chartY: a.y };
- }, h.prototype.getChartPosition = function() {
- if (this.chartPosition)
- return this.chartPosition;
- var c = this.chart.container, u = b(c);
- this.chartPosition = { left: u.left, top: u.top, scaleX: 1, scaleY: 1 };
- var i = c.offsetWidth;
- return c = c.offsetHeight, 2 < i && 2 < c && (this.chartPosition.scaleX = u.width / i, this.chartPosition.scaleY = u.height / c), this.chartPosition;
- }, h.prototype.getCoordinates = function(c) {
- var u = { xAxis: [], yAxis: [] };
- return this.chart.axes.forEach(function(i) {
- u[i.isXAxis ? "xAxis" : "yAxis"].push({ axis: i, value: i.toValue(c[i.horiz ? "chartX" : "chartY"]) });
- }), u;
- }, h.prototype.getHoverData = function(c, u, i, p, a, t) {
- var s = [];
- p = !(!p || !c);
- var n = { chartX: t ? t.chartX : void 0, chartY: t ? t.chartY : void 0, shared: a };
- T(this, "beforeGetHoverData", n);
- var P = u && !u.stickyTracking ? [u] : i.filter(function(I) {
- return n.filter ? n.filter(I) : I.visible && !(!a && I.directTouch) && S(I.options.enableMouseTracking, !0) && I.stickyTracking;
- }), D = p || !t ? c : this.findNearestKDPoint(P, a, t);
- return u = D && D.series, D && (a && !u.noSharedTooltip ? (P = i.filter(function(I) {
- return n.filter ? n.filter(I) : I.visible && !(!a && I.directTouch) && S(I.options.enableMouseTracking, !0) && !I.noSharedTooltip;
- }), P.forEach(function(I) {
- var W = l(I.points, function(E) {
- return E.x === D.x && !E.isNull;
- });
- R(W) && (I.chart.isBoosting && (W = I.getPoint(W)), s.push(W));
- })) : s.push(D)), n = { hoverPoint: D }, T(this, "afterGetHoverData", n), { hoverPoint: n.hoverPoint, hoverSeries: u, hoverPoints: s };
- }, h.prototype.getPointFromEvent = function(c) {
- c = c.target;
- for (var u; c && !u; )
- u = c.point, c = c.parentNode;
- return u;
- }, h.prototype.onTrackerMouseOut = function(c) {
- c = c.relatedTarget || c.toElement;
- var u = this.chart.hoverSeries;
- this.isDirectTouch = !1, !u || !c || u.stickyTracking || this.inClass(c, "highcharts-tooltip") || this.inClass(c, "highcharts-series-" + u.index) && this.inClass(c, "highcharts-tracker") || u.onMouseOut();
- }, h.prototype.inClass = function(c, u) {
- for (var i; c; ) {
- if (i = j(c, "class")) {
- if (i.indexOf(u) !== -1)
- return !0;
- if (i.indexOf("highcharts-container") !== -1)
- return !1;
- }
- c = c.parentNode;
- }
- }, h.prototype.init = function(c, u) {
- this.options = u, this.chart = c, this.runChartClick = !(!u.chart.events || !u.chart.events.click), this.pinchDown = [], this.lastValidTouch = {}, _ && (c.tooltip = new _(c, u.tooltip), this.followTouchMove = S(u.tooltip.followTouchMove, !0)), this.setDOMEvents();
- }, h.prototype.normalize = function(c, u) {
- var i = c.touches, p = i ? i.length ? i.item(0) : S(i.changedTouches, c.changedTouches)[0] : c;
- return u || (u = this.getChartPosition()), i = p.pageX - u.left, p = p.pageY - u.top, i /= u.scaleX, p /= u.scaleY, f(c, { chartX: Math.round(i), chartY: Math.round(p) });
- }, h.prototype.onContainerClick = function(c) {
- var u = this.chart, i = u.hoverPoint;
- c = this.normalize(c);
- var p = u.plotLeft, a = u.plotTop;
- u.cancelClick || (i && this.inClass(c.target, "highcharts-tracker") ? (T(i.series, "click", f(c, { point: i })), u.hoverPoint && i.firePointEvent("click", c)) : (f(c, this.getCoordinates(c)), u.isInsidePlot(c.chartX - p, c.chartY - a, { visiblePlotOnly: !0 }) && T(u, "click", c)));
- }, h.prototype.onContainerMouseDown = function(c) {
- var u = ((c.buttons || c.button) & 1) === 1;
- c = this.normalize(c), N.isFirefox && c.button !== 0 && this.onContainerMouseMove(c), (typeof c.button > "u" || u) && (this.zoomOption(c), u && c.preventDefault && c.preventDefault(), this.dragStart(c));
- }, h.prototype.onContainerMouseLeave = function(c) {
- var u = V[S(h.hoverChartIndex, -1)], i = this.chart.tooltip;
- i && i.shouldStickOnContact() && this.inClass(c.relatedTarget, "highcharts-tooltip-container") || (c = this.normalize(c), u && (c.relatedTarget || c.toElement) && (u.pointer.reset(), u.pointer.chartPosition = void 0), i && !i.isHidden && this.reset());
- }, h.prototype.onContainerMouseEnter = function(c) {
- delete this.chartPosition;
- }, h.prototype.onContainerMouseMove = function(c) {
- var u = this.chart;
- c = this.normalize(c), this.setHoverChartIndex(), c.preventDefault || (c.returnValue = !1), (u.mouseIsDown === "mousedown" || this.touchSelect(c)) && this.drag(c), u.openMenu || !this.inClass(c.target, "highcharts-tracker") && !u.isInsidePlot(c.chartX - u.plotLeft, c.chartY - u.plotTop, { visiblePlotOnly: !0 }) || (this.inClass(c.target, "highcharts-no-tooltip") ? this.reset(!1, 0) : this.runPointActions(c));
- }, h.prototype.onDocumentTouchEnd = function(c) {
- var u = V[S(
- h.hoverChartIndex,
- -1
- )];
- u && u.pointer.drop(c);
- }, h.prototype.onContainerTouchMove = function(c) {
- this.touchSelect(c) ? this.onContainerMouseMove(c) : this.touch(c);
- }, h.prototype.onContainerTouchStart = function(c) {
- this.touchSelect(c) ? this.onContainerMouseDown(c) : (this.zoomOption(c), this.touch(c, !0));
- }, h.prototype.onDocumentMouseMove = function(c) {
- var u = this.chart, i = this.chartPosition;
- c = this.normalize(c, i);
- var p = u.tooltip;
- !i || p && p.isStickyOnContact() || u.isInsidePlot(c.chartX - u.plotLeft, c.chartY - u.plotTop, { visiblePlotOnly: !0 }) || this.inClass(c.target, "highcharts-tracker") || this.reset();
- }, h.prototype.onDocumentMouseUp = function(c) {
- var u = V[S(h.hoverChartIndex, -1)];
- u && u.pointer.drop(c);
- }, h.prototype.pinch = function(c) {
- var u = this, i = u.chart, p = u.pinchDown, a = c.touches || [], t = a.length, s = u.lastValidTouch, n = u.hasZoom, P = {}, D = t === 1 && (u.inClass(c.target, "highcharts-tracker") && i.runTrackerClick || u.runChartClick), I = {}, W = u.selectionMarker;
- 1 < t ? u.initiated = !0 : t === 1 && this.followTouchMove && (u.initiated = !1), n && u.initiated && !D && c.cancelable !== !1 && c.preventDefault(), [].map.call(a, function(E) {
- return u.normalize(E);
- }), c.type === "touchstart" ? ([].forEach.call(a, function(E, X) {
- p[X] = { chartX: E.chartX, chartY: E.chartY };
- }), s.x = [p[0].chartX, p[1] && p[1].chartX], s.y = [p[0].chartY, p[1] && p[1].chartY], i.axes.forEach(function(E) {
- if (E.zoomEnabled) {
- var X = i.bounds[E.horiz ? "h" : "v"], g = E.minPixelPadding, m = E.toPixels(Math.min(S(E.options.min, E.dataMin), E.dataMin)), L = E.toPixels(Math.max(S(E.options.max, E.dataMax), E.dataMax)), z = Math.max(m, L);
- X.min = Math.min(E.pos, Math.min(
- m,
- L
- ) - g), X.max = Math.max(E.pos + E.len, z + g);
- }
- }), u.res = !0) : u.followTouchMove && t === 1 ? this.runPointActions(u.normalize(c)) : p.length && (T(i, "touchpan", { originalEvent: c }, function() {
- W || (u.selectionMarker = W = f({ destroy: F, touch: !0 }, i.plotBox)), u.pinchTranslate(p, a, P, W, I, s), u.hasPinched = n, u.scaleGroups(P, I);
- }), u.res && (u.res = !1, this.reset(!1, 0)));
- }, h.prototype.pinchTranslate = function(c, u, i, p, a, t) {
- this.zoomHor && this.pinchTranslateDirection(!0, c, u, i, p, a, t), this.zoomVert && this.pinchTranslateDirection(!1, c, u, i, p, a, t);
- }, h.prototype.pinchTranslateDirection = function(c, u, i, p, a, t, s, n) {
- var P = this.chart, D = c ? "x" : "y", I = c ? "X" : "Y", W = "chart" + I, E = c ? "width" : "height", X = P["plot" + (c ? "Left" : "Top")], g = P.inverted, m = P.bounds[c ? "h" : "v"], L = u.length === 1, z = u[0][W], $ = !L && u[1][W];
- u = function() {
- typeof Z == "number" && 20 < Math.abs(z - $) && (H = n || Math.abs(Y - Z) / Math.abs(z - $)), A = (X - Y) / H + z, Q = P["plot" + (c ? "Width" : "Height")] / H;
- };
- var Q, A, H = n || 1, Y = i[0][W], Z = !L && i[1][W];
- if (u(), i = A, i < m.min) {
- i = m.min;
- var q = !0;
- } else
- i + Q > m.max && (i = m.max - Q, q = !0);
- q ? (Y -= 0.8 * (Y - s[D][0]), typeof Z == "number" && (Z -= 0.8 * (Z - s[D][1])), u()) : s[D] = [Y, Z], g || (t[D] = A - X, t[E] = Q), t = g ? 1 / H : H, a[E] = Q, a[D] = i, p[g ? c ? "scaleY" : "scaleX" : "scale" + I] = H, p["translate" + I] = t * X + (Y - t * z);
- }, h.prototype.reset = function(c, u) {
- var i = this.chart, p = i.hoverSeries, a = i.hoverPoint, t = i.hoverPoints, s = i.tooltip, n = s && s.shared ? t : a;
- c && n && v(n).forEach(function(P) {
- P.series.isCartesian && typeof P.plotX > "u" && (c = !1);
- }), c ? s && n && v(n).length && (s.refresh(n), s.shared && t ? t.forEach(function(P) {
- P.setState(P.state, !0), P.series.isCartesian && (P.series.xAxis.crosshair && P.series.xAxis.drawCrosshair(
- null,
- P
- ), P.series.yAxis.crosshair && P.series.yAxis.drawCrosshair(null, P));
- }) : a && (a.setState(a.state, !0), i.axes.forEach(function(P) {
- P.crosshair && a.series[P.coll] === P && P.drawCrosshair(null, a);
- }))) : (a && a.onMouseOut(), t && t.forEach(function(P) {
- P.setState();
- }), p && p.onMouseOut(), s && s.hide(u), this.unDocMouseMove && (this.unDocMouseMove = this.unDocMouseMove()), i.axes.forEach(function(P) {
- P.hideCrosshair();
- }), this.hoverX = i.hoverPoints = i.hoverPoint = null);
- }, h.prototype.runPointActions = function(c, u) {
- var i = this.chart, p = i.tooltip && i.tooltip.options.enabled ? i.tooltip : void 0, a = p ? p.shared : !1, t = u || i.hoverPoint, s = t && t.series || i.hoverSeries;
- u = this.getHoverData(t, s, i.series, (!c || c.type !== "touchmove") && (!!u || s && s.directTouch && this.isDirectTouch), a, c), t = u.hoverPoint, s = u.hoverSeries;
- var n = u.hoverPoints;
- if (u = s && s.tooltipOptions.followPointer && !s.tooltipOptions.split, a = a && s && !s.noSharedTooltip, t && (t !== i.hoverPoint || p && p.isHidden)) {
- if ((i.hoverPoints || []).forEach(function(P) {
- n.indexOf(P) === -1 && P.setState();
- }), i.hoverSeries !== s && s.onMouseOver(), this.applyInactiveState(n), (n || []).forEach(function(P) {
- P.setState("hover");
- }), i.hoverPoint && i.hoverPoint.firePointEvent("mouseOut"), !t.series)
- return;
- i.hoverPoints = n, i.hoverPoint = t, t.firePointEvent("mouseOver"), p && p.refresh(a ? n : t, c);
- } else
- u && p && !p.isHidden && (t = p.getAnchor([{}], c), i.isInsidePlot(t[0], t[1], { visiblePlotOnly: !0 }) && p.updatePosition({ plotX: t[0], plotY: t[1] }));
- this.unDocMouseMove || (this.unDocMouseMove = B(i.container.ownerDocument, "mousemove", function(P) {
- var D = V[h.hoverChartIndex];
- D && D.pointer.onDocumentMouseMove(P);
- }), this.eventsToUnbind.push(this.unDocMouseMove)), i.axes.forEach(function(P) {
- var D = S((P.crosshair || {}).snap, !0), I;
- D && ((I = i.hoverPoint) && I.series[P.coll] === P || (I = l(n, function(W) {
- return W.series[P.coll] === P;
- }))), I || !D ? P.drawCrosshair(c, I) : P.hideCrosshair();
- });
- }, h.prototype.scaleGroups = function(c, u) {
- var i = this.chart;
- i.series.forEach(function(p) {
- var a = c || p.getPlotBox();
- p.group && (p.xAxis && p.xAxis.zoomEnabled || i.mapView) && (p.group.attr(a), p.markerGroup && (p.markerGroup.attr(a), p.markerGroup.clip(u ? i.clipRect : null)), p.dataLabelsGroup && p.dataLabelsGroup.attr(a));
- }), i.clipRect.attr(u || i.clipBox);
- }, h.prototype.setDOMEvents = function() {
- var c = this, u = this.chart.container, i = u.ownerDocument;
- u.onmousedown = this.onContainerMouseDown.bind(this), u.onmousemove = this.onContainerMouseMove.bind(this), u.onclick = this.onContainerClick.bind(this), this.eventsToUnbind.push(B(u, "mouseenter", this.onContainerMouseEnter.bind(this))), this.eventsToUnbind.push(B(u, "mouseleave", this.onContainerMouseLeave.bind(this))), h.unbindDocumentMouseUp || (h.unbindDocumentMouseUp = B(i, "mouseup", this.onDocumentMouseUp.bind(this)));
- for (var p = this.chart.renderTo.parentElement; p && p.tagName !== "BODY"; )
- this.eventsToUnbind.push(B(p, "scroll", function() {
- delete c.chartPosition;
- })), p = p.parentElement;
- N.hasTouch && (this.eventsToUnbind.push(B(u, "touchstart", this.onContainerTouchStart.bind(this), { passive: !1 })), this.eventsToUnbind.push(B(u, "touchmove", this.onContainerTouchMove.bind(this), { passive: !1 })), h.unbindDocumentTouchEnd || (h.unbindDocumentTouchEnd = B(i, "touchend", this.onDocumentTouchEnd.bind(this), { passive: !1 })));
- }, h.prototype.setHoverChartIndex = function() {
- var c = this.chart, u = N.charts[S(h.hoverChartIndex, -1)];
- u && u !== c && u.pointer.onContainerMouseLeave({ relatedTarget: !0 }), u && u.mouseIsDown || (h.hoverChartIndex = c.index);
- }, h.prototype.touch = function(c, u) {
- var i = this.chart;
- if (this.setHoverChartIndex(), c.touches.length === 1)
- if (c = this.normalize(c), i.isInsidePlot(c.chartX - i.plotLeft, c.chartY - i.plotTop, { visiblePlotOnly: !0 }) && !i.openMenu) {
- if (u && this.runPointActions(c), c.type === "touchmove") {
- u = this.pinchDown;
- var p = u[0] ? 4 <= Math.sqrt(Math.pow(u[0].chartX - c.chartX, 2) + Math.pow(u[0].chartY - c.chartY, 2)) : !1;
- }
- S(p, !0) && this.pinch(c);
- } else
- u && this.reset();
- else
- c.touches.length === 2 && this.pinch(c);
- }, h.prototype.touchSelect = function(c) {
- return !(!this.chart.options.chart.zoomBySingleTouch || !c.touches || c.touches.length !== 1);
- }, h.prototype.zoomOption = function(c) {
- var u = this.chart, i = u.options.chart;
- u = u.inverted;
- var p = i.zoomType || "";
- /touch/.test(c.type) && (p = S(i.pinchType, p)), this.zoomX = c = /x/.test(p), this.zoomY = i = /y/.test(p), this.zoomHor = c && !u || i && u, this.zoomVert = i && !u || c && u, this.hasZoom = c || i;
- }, h;
- }(), y;
- }), C(o, "Core/MSPointer.js", [o["Core/Globals.js"], o["Core/Pointer.js"], o["Core/Utilities.js"]], function(y, N, _) {
- function U() {
- var k = [];
- return k.item = function(b) {
- return this[b];
- }, l(O, function(b) {
- k.push({ pageX: b.pageX, pageY: b.pageY, target: b.target });
- }), k;
- }
- function G(k, b, S, v) {
- var h = F[N.hoverChartIndex || NaN];
- k.pointerType !== "touch" && k.pointerType !== k.MSPOINTER_TYPE_TOUCH || !h || (h = h.pointer, v(k), h[b]({ type: S, target: k.currentTarget, preventDefault: j, touches: U() }));
- }
- var V = this && this.__extends || function() {
- var k = function(b, S) {
- return k = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, h) {
- v.__proto__ = h;
- } || function(v, h) {
- for (var c in h)
- h.hasOwnProperty(c) && (v[c] = h[c]);
- }, k(b, S);
- };
- return function(b, S) {
- function v() {
- this.constructor = b;
- }
- k(b, S), b.prototype = S === null ? Object.create(S) : (v.prototype = S.prototype, new v());
- };
- }(), F = y.charts, B = y.doc, j = y.noop, w = y.win, x = _.addEvent, f = _.css, l = _.objectEach, T = _.removeEvent, O = {}, R = !!w.PointerEvent;
- return function(k) {
- function b() {
- return k !== null && k.apply(this, arguments) || this;
- }
- return V(b, k), b.isRequired = function() {
- return !(y.hasTouch || !w.PointerEvent && !w.MSPointerEvent);
- }, b.prototype.batchMSEvents = function(S) {
- S(this.chart.container, R ? "pointerdown" : "MSPointerDown", this.onContainerPointerDown), S(this.chart.container, R ? "pointermove" : "MSPointerMove", this.onContainerPointerMove), S(B, R ? "pointerup" : "MSPointerUp", this.onDocumentPointerUp);
- }, b.prototype.destroy = function() {
- this.batchMSEvents(T), k.prototype.destroy.call(this);
- }, b.prototype.init = function(S, v) {
- k.prototype.init.call(this, S, v), this.hasZoom && f(S.container, { "-ms-touch-action": "none", "touch-action": "none" });
- }, b.prototype.onContainerPointerDown = function(S) {
- G(S, "onContainerTouchStart", "touchstart", function(v) {
- O[v.pointerId] = { pageX: v.pageX, pageY: v.pageY, target: v.currentTarget };
- });
- }, b.prototype.onContainerPointerMove = function(S) {
- G(S, "onContainerTouchMove", "touchmove", function(v) {
- O[v.pointerId] = {
- pageX: v.pageX,
- pageY: v.pageY
- }, O[v.pointerId].target || (O[v.pointerId].target = v.currentTarget);
- });
- }, b.prototype.onDocumentPointerUp = function(S) {
- G(S, "onDocumentTouchEnd", "touchend", function(v) {
- delete O[v.pointerId];
- });
- }, b.prototype.setDOMEvents = function() {
- k.prototype.setDOMEvents.call(this), (this.hasZoom || this.followTouchMove) && this.batchMSEvents(x);
- }, b;
- }(N);
- }), C(o, "Core/Legend/Legend.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/FormatUtilities.js"],
- o["Core/Globals.js"],
- o["Core/Series/Point.js"],
- o["Core/Renderer/RendererUtilities.js"],
- o["Core/Utilities.js"]
- ], function(y, N, _, U, G, V) {
- var F = y.animObject, B = y.setAnimation, j = N.format;
- y = _.isFirefox;
- var w = _.marginNames;
- _ = _.win;
- var x = G.distribute, f = V.addEvent, l = V.createElement, T = V.css, O = V.defined, R = V.discardElement, k = V.find, b = V.fireEvent, S = V.isNumber, v = V.merge, h = V.pick, c = V.relativeLength, u = V.stableSort, i = V.syncTimeout;
- return G = V.wrap, V = function() {
- function p(a, t) {
- this.allItems = [], this.contentGroup = this.box = void 0, this.display = !1, this.group = void 0, this.offsetWidth = this.maxLegendWidth = this.maxItemWidth = this.legendWidth = this.legendHeight = this.lastLineHeight = this.lastItemY = this.itemY = this.itemX = this.itemMarginTop = this.itemMarginBottom = this.itemHeight = this.initialItemY = 0, this.options = {}, this.padding = 0, this.pages = [], this.proximate = !1, this.scrollGroup = void 0, this.widthOption = this.totalItemWidth = this.titleHeight = this.symbolWidth = this.symbolHeight = 0, this.chart = a, this.init(a, t);
- }
- return p.prototype.init = function(a, t) {
- this.chart = a, this.setOptions(t), t.enabled && (this.render(), f(this.chart, "endResize", function() {
- this.legend.positionCheckboxes();
- }), this.proximate ? this.unchartrender = f(this.chart, "render", function() {
- this.legend.proximatePositions(), this.legend.positionItems();
- }) : this.unchartrender && this.unchartrender());
- }, p.prototype.setOptions = function(a) {
- var t = h(a.padding, 8);
- this.options = a, this.chart.styledMode || (this.itemStyle = a.itemStyle, this.itemHiddenStyle = v(this.itemStyle, a.itemHiddenStyle)), this.itemMarginTop = a.itemMarginTop || 0, this.itemMarginBottom = a.itemMarginBottom || 0, this.padding = t, this.initialItemY = t - 5, this.symbolWidth = h(
- a.symbolWidth,
- 16
- ), this.pages = [], this.proximate = a.layout === "proximate" && !this.chart.inverted, this.baseline = void 0;
- }, p.prototype.update = function(a, t) {
- var s = this.chart;
- this.setOptions(v(!0, this.options, a)), this.destroy(), s.isDirtyLegend = s.isDirtyBox = !0, h(t, !0) && s.redraw(), b(this, "afterUpdate");
- }, p.prototype.colorizeItem = function(a, t) {
- if (a.legendGroup[t ? "removeClass" : "addClass"]("highcharts-legend-item-hidden"), !this.chart.styledMode) {
- var s = this.options, n = a.legendItem, P = a.legendLine, D = a.legendSymbol, I = this.itemHiddenStyle.color;
- s = t ? s.itemStyle.color : I;
- var W = t && a.color || I, E = a.options && a.options.marker, X = { fill: W };
- n && n.css({ fill: s, color: s }), P && P.attr({ stroke: W }), D && (E && D.isMarker && (X = a.pointAttribs(), t || (X.stroke = X.fill = I)), D.attr(X));
- }
- b(this, "afterColorizeItem", { item: a, visible: t });
- }, p.prototype.positionItems = function() {
- this.allItems.forEach(this.positionItem, this), this.chart.isResizing || this.positionCheckboxes();
- }, p.prototype.positionItem = function(a) {
- var t = this, s = this.options, n = s.symbolPadding, P = !s.rtl, D = a._legendItemPos;
- s = D[0], D = D[1];
- var I = a.checkbox, W = a.legendGroup;
- W && W.element && (n = { translateX: P ? s : this.legendWidth - s - 2 * n - 4, translateY: D }, P = function() {
- b(t, "afterPositionItem", { item: a });
- }, O(W.translateY) ? W.animate(n, void 0, P) : (W.attr(n), P())), I && (I.x = s, I.y = D);
- }, p.prototype.destroyItem = function(a) {
- var t = a.checkbox;
- ["legendItem", "legendLine", "legendSymbol", "legendGroup"].forEach(function(s) {
- a[s] && (a[s] = a[s].destroy());
- }), t && R(a.checkbox);
- }, p.prototype.destroy = function() {
- function a(t) {
- this[t] && (this[t] = this[t].destroy());
- }
- this.getAllItems().forEach(function(t) {
- [
- "legendItem",
- "legendGroup"
- ].forEach(a, t);
- }), "clipRect up down pager nav box title group".split(" ").forEach(a, this), this.display = null;
- }, p.prototype.positionCheckboxes = function() {
- var a = this.group && this.group.alignAttr, t = this.clipHeight || this.legendHeight, s = this.titleHeight;
- if (a) {
- var n = a.translateY;
- this.allItems.forEach(function(P) {
- var D = P.checkbox;
- if (D) {
- var I = n + s + D.y + (this.scrollOffset || 0) + 3;
- T(D, { left: a.translateX + P.checkboxOffset + D.x - 20 + "px", top: I + "px", display: this.proximate || I > n - 6 && I < n + t - 6 ? "" : "none" });
- }
- }, this);
- }
- }, p.prototype.renderTitle = function() {
- var a = this.options, t = this.padding, s = a.title, n = 0;
- s.text && (this.title || (this.title = this.chart.renderer.label(s.text, t - 3, t - 4, null, null, null, a.useHTML, null, "legend-title").attr({ zIndex: 1 }), this.chart.styledMode || this.title.css(s.style), this.title.add(this.group)), s.width || this.title.css({ width: this.maxLegendWidth + "px" }), a = this.title.getBBox(), n = a.height, this.offsetWidth = a.width, this.contentGroup.attr({ translateY: n })), this.titleHeight = n;
- }, p.prototype.setText = function(a) {
- var t = this.options;
- a.legendItem.attr({ text: t.labelFormat ? j(t.labelFormat, a, this.chart) : t.labelFormatter.call(a) });
- }, p.prototype.renderItem = function(a) {
- var t = this.chart, s = t.renderer, n = this.options, P = this.symbolWidth, D = n.symbolPadding || 0, I = this.itemStyle, W = this.itemHiddenStyle, E = n.layout === "horizontal" ? h(n.itemDistance, 20) : 0, X = !n.rtl, g = !a.series, m = !g && a.series.drawLegendSymbol ? a.series : a, L = m.options, z = this.createCheckboxForItem && L && L.showCheckbox, $ = n.useHTML, Q = a.options.className, A = a.legendItem;
- L = P + D + E + (z ? 20 : 0), A || (a.legendGroup = s.g("legend-item").addClass("highcharts-" + m.type + "-series highcharts-color-" + a.colorIndex + (Q ? " " + Q : "") + (g ? " highcharts-series-" + a.index : "")).attr({ zIndex: 1 }).add(this.scrollGroup), a.legendItem = A = s.text("", X ? P + D : -D, this.baseline || 0, $), t.styledMode || A.css(v(a.visible ? I : W)), A.attr({ align: X ? "left" : "right", zIndex: 2 }).add(a.legendGroup), this.baseline || (this.fontMetrics = s.fontMetrics(t.styledMode ? 12 : I.fontSize, A), this.baseline = this.fontMetrics.f + 3 + this.itemMarginTop, A.attr("y", this.baseline), this.symbolHeight = n.symbolHeight || this.fontMetrics.f, n.squareSymbol && (this.symbolWidth = h(n.symbolWidth, Math.max(this.symbolHeight, 16)), L = this.symbolWidth + D + E + (z ? 20 : 0), X && A.attr("x", this.symbolWidth + D))), m.drawLegendSymbol(this, a), this.setItemEvents && this.setItemEvents(a, A, $)), z && !a.checkbox && this.createCheckboxForItem && this.createCheckboxForItem(a), this.colorizeItem(a, a.visible), !t.styledMode && I.width || A.css({ width: (n.itemWidth || this.widthOption || t.spacingBox.width) - L + "px" }), this.setText(a), t = A.getBBox(), s = this.fontMetrics && this.fontMetrics.h || 0, a.itemWidth = a.checkboxOffset = n.itemWidth || a.legendItemWidth || t.width + L, this.maxItemWidth = Math.max(this.maxItemWidth, a.itemWidth), this.totalItemWidth += a.itemWidth, this.itemHeight = a.itemHeight = Math.round(a.legendItemHeight || (t.height > 1.5 * s ? t.height : s));
- }, p.prototype.layoutItem = function(a) {
- var t = this.options, s = this.padding, n = t.layout === "horizontal", P = a.itemHeight, D = this.itemMarginBottom, I = this.itemMarginTop, W = n ? h(t.itemDistance, 20) : 0, E = this.maxLegendWidth;
- t = t.alignColumns && this.totalItemWidth > E ? this.maxItemWidth : a.itemWidth, n && this.itemX - s + t > E && (this.itemX = s, this.lastLineHeight && (this.itemY += I + this.lastLineHeight + D), this.lastLineHeight = 0), this.lastItemY = I + this.itemY + D, this.lastLineHeight = Math.max(P, this.lastLineHeight), a._legendItemPos = [this.itemX, this.itemY], n ? this.itemX += t : (this.itemY += I + P + D, this.lastLineHeight = P), this.offsetWidth = this.widthOption || Math.max((n ? this.itemX - s - (a.checkbox ? 0 : W) : t) + s, this.offsetWidth);
- }, p.prototype.getAllItems = function() {
- var a = [];
- return this.chart.series.forEach(function(t) {
- var s = t && t.options;
- t && h(s.showInLegend, O(s.linkedTo) ? !1 : void 0, !0) && (a = a.concat(t.legendItems || (s.legendType === "point" ? t.data : t)));
- }), b(this, "afterGetAllItems", { allItems: a }), a;
- }, p.prototype.getAlignment = function() {
- var a = this.options;
- return this.proximate ? a.align.charAt(0) + "tv" : a.floating ? "" : a.align.charAt(0) + a.verticalAlign.charAt(0) + a.layout.charAt(0);
- }, p.prototype.adjustMargins = function(a, t) {
- var s = this.chart, n = this.options, P = this.getAlignment();
- P && [/(lth|ct|rth)/, /(rtv|rm|rbv)/, /(rbh|cb|lbh)/, /(lbv|lm|ltv)/].forEach(function(D, I) {
- D.test(P) && !O(a[I]) && (s[w[I]] = Math.max(s[w[I]], s.legend[(I + 1) % 2 ? "legendHeight" : "legendWidth"] + [1, -1, -1, 1][I] * n[I % 2 ? "x" : "y"] + h(n.margin, 12) + t[I] + (s.titleOffset[I] || 0)));
- });
- }, p.prototype.proximatePositions = function() {
- var a = this.chart, t = [], s = this.options.align === "left";
- this.allItems.forEach(function(n) {
- var P, D = s;
- if (n.yAxis) {
- n.xAxis.options.reversed && (D = !D), n.points && (P = k(D ? n.points : n.points.slice(0).reverse(), function(W) {
- return S(W.plotY);
- })), D = this.itemMarginTop + n.legendItem.getBBox().height + this.itemMarginBottom;
- var I = n.yAxis.top - a.plotTop;
- n.visible ? (P = P ? P.plotY : n.yAxis.height, P += I - 0.3 * D) : P = I + n.yAxis.height, t.push({ target: P, size: D, item: n });
- }
- }, this), x(t, a.plotHeight).forEach(function(n) {
- n.item._legendItemPos && (n.item._legendItemPos[1] = a.plotTop - a.spacing[0] + n.pos);
- });
- }, p.prototype.render = function() {
- var a = this.chart, t = a.renderer, s = this.options, n = this.padding, P = this.getAllItems(), D = this.group, I = this.box;
- this.itemX = n, this.itemY = this.initialItemY, this.lastItemY = this.offsetWidth = 0, this.widthOption = c(s.width, a.spacingBox.width - n);
- var W = a.spacingBox.width - 2 * n - s.x;
- -1 < ["rm", "lm"].indexOf(this.getAlignment().substring(0, 2)) && (W /= 2), this.maxLegendWidth = this.widthOption || W, D || (this.group = D = t.g("legend").addClass(s.className || "").attr({ zIndex: 7 }).add(), this.contentGroup = t.g().attr({ zIndex: 1 }).add(D), this.scrollGroup = t.g().add(this.contentGroup)), this.renderTitle(), u(P, function(X, g) {
- return (X.options && X.options.legendIndex || 0) - (g.options && g.options.legendIndex || 0);
- }), s.reversed && P.reverse(), this.allItems = P, this.display = W = !!P.length, this.itemHeight = this.totalItemWidth = this.maxItemWidth = this.lastLineHeight = 0, P.forEach(this.renderItem, this), P.forEach(this.layoutItem, this), P = (this.widthOption || this.offsetWidth) + n;
- var E = this.lastItemY + this.lastLineHeight + this.titleHeight;
- E = this.handleOverflow(E), E += n, I || (this.box = I = t.rect().addClass("highcharts-legend-box").attr({ r: s.borderRadius }).add(D), I.isNew = !0), a.styledMode || I.attr({ stroke: s.borderColor, "stroke-width": s.borderWidth || 0, fill: s.backgroundColor || "none" }).shadow(s.shadow), 0 < P && 0 < E && (I[I.isNew ? "attr" : "animate"](I.crisp.call({}, { x: 0, y: 0, width: P, height: E }, I.strokeWidth())), I.isNew = !1), I[W ? "show" : "hide"](), a.styledMode && D.getStyle("display") === "none" && (P = E = 0), this.legendWidth = P, this.legendHeight = E, W && this.align(), this.proximate || this.positionItems(), b(this, "afterRender");
- }, p.prototype.align = function(a) {
- a === void 0 && (a = this.chart.spacingBox);
- var t = this.chart, s = this.options, n = a.y;
- /(lth|ct|rth)/.test(this.getAlignment()) && 0 < t.titleOffset[0] ? n += t.titleOffset[0] : /(lbh|cb|rbh)/.test(this.getAlignment()) && 0 < t.titleOffset[2] && (n -= t.titleOffset[2]), n !== a.y && (a = v(a, { y: n })), this.group.align(v(s, { width: this.legendWidth, height: this.legendHeight, verticalAlign: this.proximate ? "top" : s.verticalAlign }), !0, a);
- }, p.prototype.handleOverflow = function(a) {
- var t = this, s = this.chart, n = s.renderer, P = this.options, D = P.y, I = P.verticalAlign === "top", W = this.padding, E = P.maxHeight, X = P.navigation, g = h(X.animation, !0), m = X.arrowSize || 12, L = this.pages, z = this.allItems, $ = function(q) {
- typeof q == "number" ? Z.attr({ height: q }) : Z && (t.clipRect = Z.destroy(), t.contentGroup.clip()), t.contentGroup.div && (t.contentGroup.div.style.clip = q ? "rect(" + W + "px,9999px," + (W + q) + "px,0)" : "auto");
- }, Q = function(q) {
- return t[q] = n.circle(0, 0, 1.3 * m).translate(m / 2, m / 2).add(Y), s.styledMode || t[q].attr("fill", "rgba(0,0,0,0.0001)"), t[q];
- }, A, H;
- D = s.spacingBox.height + (I ? -D : D) - W;
- var Y = this.nav, Z = this.clipRect;
- return P.layout !== "horizontal" || P.verticalAlign === "middle" || P.floating || (D /= 2), E && (D = Math.min(D, E)), L.length = 0, a && 0 < D && a > D && X.enabled !== !1 ? (this.clipHeight = A = Math.max(D - 20 - this.titleHeight - W, 0), this.currentPage = h(this.currentPage, 1), this.fullHeight = a, z.forEach(function(q, it) {
- var et = q._legendItemPos[1], nt = Math.round(q.legendItem.getBBox().height), rt = L.length;
- (!rt || et - L[rt - 1] > A && (H || et) !== L[rt - 1]) && (L.push(H || et), rt++), q.pageIx = rt - 1, H && (z[it - 1].pageIx = rt - 1), it === z.length - 1 && et + nt - L[rt - 1] > A && nt <= A && (L.push(et), q.pageIx = rt), et !== H && (H = et);
- }), Z || (Z = t.clipRect = n.clipRect(0, W, 9999, 0), t.contentGroup.clip(Z)), $(A), Y || (this.nav = Y = n.g().attr({ zIndex: 1 }).add(this.group), this.up = n.symbol("triangle", 0, 0, m, m).add(Y), Q("upTracker").on(
- "click",
- function() {
- t.scroll(-1, g);
- }
- ), this.pager = n.text("", 15, 10).addClass("highcharts-legend-navigation"), s.styledMode || this.pager.css(X.style), this.pager.add(Y), this.down = n.symbol("triangle-down", 0, 0, m, m).add(Y), Q("downTracker").on("click", function() {
- t.scroll(1, g);
- })), t.scroll(0), a = D) : Y && ($(), this.nav = Y.destroy(), this.scrollGroup.attr({ translateY: 1 }), this.clipHeight = 0), a;
- }, p.prototype.scroll = function(a, t) {
- var s = this, n = this.chart, P = this.pages, D = P.length, I = this.clipHeight, W = this.options.navigation, E = this.pager, X = this.padding, g = this.currentPage + a;
- g > D && (g = D), 0 < g && (typeof t < "u" && B(t, n), this.nav.attr({ translateX: X, translateY: I + this.padding + 7 + this.titleHeight, visibility: "visible" }), [this.up, this.upTracker].forEach(function(m) {
- m.attr({ class: g === 1 ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
- }), E.attr({ text: g + "/" + D }), [this.down, this.downTracker].forEach(
- function(m) {
- m.attr({ x: 18 + this.pager.getBBox().width, class: g === D ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
- },
- this
- ), n.styledMode || (this.up.attr({ fill: g === 1 ? W.inactiveColor : W.activeColor }), this.upTracker.css({ cursor: g === 1 ? "default" : "pointer" }), this.down.attr({ fill: g === D ? W.inactiveColor : W.activeColor }), this.downTracker.css({ cursor: g === D ? "default" : "pointer" })), this.scrollOffset = -P[g - 1] + this.initialItemY, this.scrollGroup.animate({ translateY: this.scrollOffset }), this.currentPage = g, this.positionCheckboxes(), a = F(h(t, n.renderer.globalAnimation, !0)), i(function() {
- b(s, "afterScroll", { currentPage: g });
- }, a.duration));
- }, p.prototype.setItemEvents = function(a, t, s) {
- var n = this, P = n.chart.renderer.boxWrapper, D = a instanceof U, I = "highcharts-legend-" + (D ? "point" : "series") + "-active", W = n.chart.styledMode, E = function(X) {
- n.allItems.forEach(function(g) {
- a !== g && [g].concat(g.linkedSeries || []).forEach(function(m) {
- m.setState(X, !D);
- });
- });
- };
- (s ? [t, a.legendSymbol] : [a.legendGroup]).forEach(function(X) {
- X && X.on("mouseover", function() {
- a.visible && E("inactive"), a.setState("hover"), a.visible && P.addClass(I), W || t.css(n.options.itemHoverStyle);
- }).on("mouseout", function() {
- n.chart.styledMode || t.css(v(a.visible ? n.itemStyle : n.itemHiddenStyle)), E(""), P.removeClass(I), a.setState();
- }).on("click", function(g) {
- var m = function() {
- a.setVisible && a.setVisible(), E(a.visible ? "inactive" : "");
- };
- P.removeClass(I), g = { browserEvent: g }, a.firePointEvent ? a.firePointEvent("legendItemClick", g, m) : b(a, "legendItemClick", g, m);
- });
- });
- }, p.prototype.createCheckboxForItem = function(a) {
- a.checkbox = l(
- "input",
- { type: "checkbox", className: "highcharts-legend-checkbox", checked: a.selected, defaultChecked: a.selected },
- this.options.itemCheckboxStyle,
- this.chart.container
- ), f(a.checkbox, "click", function(t) {
- b(a.series || a, "checkboxClick", { checked: t.target.checked, item: a }, function() {
- a.select();
- });
- });
- }, p;
- }(), (/Trident\/7\.0/.test(_.navigator && _.navigator.userAgent) || y) && G(V.prototype, "positionItem", function(p, a) {
- var t = this, s = function() {
- a._legendItemPos && p.call(t, a);
- };
- s(), t.bubbleLegend || setTimeout(s);
- }), V;
- }), C(
- o,
- "Core/Series/SeriesRegistry.js",
- [o["Core/Globals.js"], o["Core/DefaultOptions.js"], o["Core/Series/Point.js"], o["Core/Utilities.js"]],
- function(y, N, _, U) {
- var G = N.defaultOptions, V = U.error, F = U.extendClass, B = U.merge, j;
- return function(w) {
- function x(f, l) {
- var T = G.plotOptions || {}, O = l.defaultOptions;
- l.prototype.pointClass || (l.prototype.pointClass = _), l.prototype.type = f, O && (T[f] = O), w.seriesTypes[f] = l;
- }
- w.seriesTypes = y.seriesTypes, w.getSeries = function(f, l) {
- l === void 0 && (l = {});
- var T = f.options.chart;
- T = l.type || T.type || T.defaultSeriesType || "";
- var O = w.seriesTypes[T];
- return w || V(17, !0, f, { missingModuleFor: T }), T = new O(), typeof T.init == "function" && T.init(f, l), T;
- }, w.registerSeriesType = x, w.seriesType = function(f, l, T, O, R) {
- var k = G.plotOptions || {};
- return l = l || "", k[f] = B(k[l], T), x(f, F(w.seriesTypes[l] || function() {
- }, O)), w.seriesTypes[f].prototype.type = f, R && (w.seriesTypes[f].prototype.pointClass = F(_, R)), w.seriesTypes[f];
- };
- }(j || (j = {})), j;
- }
- ), C(o, "Core/Chart/Chart.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/Axis/Axis.js"],
- o["Core/FormatUtilities.js"],
- o["Core/Foundation.js"],
- o["Core/Globals.js"],
- o["Core/Legend/Legend.js"],
- o["Core/MSPointer.js"],
- o["Core/DefaultOptions.js"],
- o["Core/Pointer.js"],
- o["Core/Renderer/RendererRegistry.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Renderer/SVG/SVGRenderer.js"],
- o["Core/Time.js"],
- o["Core/Utilities.js"],
- o["Core/Renderer/HTML/AST.js"]
- ], function(y, N, _, U, G, V, F, B, j, w, x, f, l, T, O) {
- var R = y.animate, k = y.animObject, b = y.setAnimation, S = _.numberFormat, v = U.registerEventOptions, h = G.charts, c = G.doc, u = G.marginNames, i = G.svg, p = G.win, a = B.defaultOptions, t = B.defaultTime, s = x.seriesTypes, n = T.addEvent, P = T.attr, D = T.cleanRecursively, I = T.createElement, W = T.css, E = T.defined, X = T.discardElement, g = T.erase, m = T.error, L = T.extend, z = T.find, $ = T.fireEvent, Q = T.getStyle, A = T.isArray, H = T.isNumber, Y = T.isObject, Z = T.isString, q = T.merge, it = T.objectEach, et = T.pick, nt = T.pInt, rt = T.relativeLength, ct = T.removeEvent, gt = T.splat, dt = T.syncTimeout, ht = T.uniqueKey;
- return y = function() {
- function at(J, tt, ot) {
- this.series = this.renderTo = this.renderer = this.pointer = this.pointCount = this.plotWidth = this.plotTop = this.plotLeft = this.plotHeight = this.plotBox = this.options = this.numberFormatter = this.margin = this.legend = this.labelCollectors = this.isResizing = this.index = this.eventOptions = this.container = this.colorCounter = this.clipBox = this.chartWidth = this.chartHeight = this.bounds = this.axisOffset = this.axes = void 0, this.sharedClips = {}, this.yAxis = this.xAxis = this.userOptions = this.titleOffset = this.time = this.symbolCounter = this.spacingBox = this.spacing = void 0, this.getArgs(J, tt, ot);
- }
- return at.chart = function(J, tt, ot) {
- return new at(J, tt, ot);
- }, at.prototype.getArgs = function(J, tt, ot) {
- Z(J) || J.nodeName ? (this.renderTo = J, this.init(tt, ot)) : this.init(J, tt);
- }, at.prototype.init = function(J, tt) {
- var ot = J.plotOptions || {};
- $(this, "init", { args: arguments }, function() {
- var lt = q(a, J), pt = lt.chart;
- it(lt.plotOptions, function(yt, vt) {
- Y(yt) && (yt.tooltip = ot[vt] && q(ot[vt].tooltip) || void 0);
- }), lt.tooltip.userOptions = J.chart && J.chart.forExport && J.tooltip.userOptions || J.tooltip, this.userOptions = J, this.margin = [], this.spacing = [], this.bounds = { h: {}, v: {} }, this.labelCollectors = [], this.callback = tt, this.isResizing = 0, this.options = lt, this.axes = [], this.series = [], this.time = J.time && Object.keys(J.time).length ? new l(J.time) : G.time, this.numberFormatter = pt.numberFormatter || S, this.styledMode = pt.styledMode, this.hasCartesianSeries = pt.showAxes, this.index = h.length, h.push(this), G.chartCount++, v(this, pt), this.xAxis = [], this.yAxis = [], this.pointCount = this.colorCounter = this.symbolCounter = 0, $(this, "afterInit"), this.firstRender();
- });
- }, at.prototype.initSeries = function(J) {
- var tt = this.options.chart;
- tt = J.type || tt.type || tt.defaultSeriesType;
- var ot = s[tt];
- return ot || m(17, !0, this, { missingModuleFor: tt }), tt = new ot(), typeof tt.init == "function" && tt.init(this, J), tt;
- }, at.prototype.setSeriesData = function() {
- this.getSeriesOrderByLinks().forEach(function(J) {
- J.points || J.data || !J.enabledDataSorting || J.setData(J.options.data, !1);
- });
- }, at.prototype.getSeriesOrderByLinks = function() {
- return this.series.concat().sort(function(J, tt) {
- return J.linkedSeries.length || tt.linkedSeries.length ? tt.linkedSeries.length - J.linkedSeries.length : 0;
- });
- }, at.prototype.orderSeries = function(J) {
- var tt = this.series;
- J = J || 0;
- for (var ot = tt.length; J < ot; ++J)
- tt[J] && (tt[J].index = J, tt[J].name = tt[J].getName());
- }, at.prototype.isInsidePlot = function(J, tt, ot) {
- ot === void 0 && (ot = {});
- var lt = this.inverted, pt = this.plotBox, yt = this.plotLeft, vt = this.plotTop, Ct = this.scrollablePlotBox, Pt = 0, At = 0;
- ot.visiblePlotOnly && this.scrollingContainer && (At = this.scrollingContainer, Pt = At.scrollLeft, At = At.scrollTop);
- var St = ot.series;
- if (pt = ot.visiblePlotOnly && Ct || pt, Ct = ot.inverted ? tt : J, tt = ot.inverted ? J : tt, J = { x: Ct, y: tt, isInsidePlot: !0 }, !ot.ignoreX) {
- var Dt = St && (lt ? St.yAxis : St.xAxis) || { pos: yt, len: 1 / 0 };
- Ct = ot.paneCoordinates ? Dt.pos + Ct : yt + Ct, Ct >= Math.max(Pt + yt, Dt.pos) && Ct <= Math.min(Pt + yt + pt.width, Dt.pos + Dt.len) || (J.isInsidePlot = !1);
- }
- return !ot.ignoreY && J.isInsidePlot && (lt = St && (lt ? St.xAxis : St.yAxis) || { pos: vt, len: 1 / 0 }, ot = ot.paneCoordinates ? lt.pos + tt : vt + tt, ot >= Math.max(At + vt, lt.pos) && ot <= Math.min(At + vt + pt.height, lt.pos + lt.len) || (J.isInsidePlot = !1)), $(this, "afterIsInsidePlot", J), J.isInsidePlot;
- }, at.prototype.redraw = function(J) {
- $(this, "beforeRedraw");
- var tt = this.hasCartesianSeries ? this.axes : this.colorAxis || [], ot = this.series, lt = this.pointer, pt = this.legend, yt = this.userOptions.legend, vt = this.renderer, Ct = vt.isHidden(), Pt = [], At = this.isDirtyBox, St = this.isDirtyLegend;
- for (this.setResponsive && this.setResponsive(!1), b(this.hasRendered ? J : !1, this), Ct && this.temporaryDisplay(), this.layOutTitles(), J = ot.length; J--; ) {
- var Dt = ot[J];
- if (Dt.options.stacking || Dt.options.centerInCategory) {
- var _t = !0;
- if (Dt.isDirty) {
- var Nt = !0;
- break;
- }
- }
- }
- if (Nt)
- for (J = ot.length; J--; )
- Dt = ot[J], Dt.options.stacking && (Dt.isDirty = !0);
- ot.forEach(function(Ot) {
- Ot.isDirty && (Ot.options.legendType === "point" ? (typeof Ot.updateTotals == "function" && Ot.updateTotals(), St = !0) : yt && (yt.labelFormatter || yt.labelFormat) && (St = !0)), Ot.isDirtyData && $(Ot, "updatedData");
- }), St && pt && pt.options.enabled && (pt.render(), this.isDirtyLegend = !1), _t && this.getStacks(), tt.forEach(function(Ot) {
- Ot.updateNames(), Ot.setScale();
- }), this.getMargins(), tt.forEach(function(Ot) {
- Ot.isDirty && (At = !0);
- }), tt.forEach(function(Ot) {
- var Kt = Ot.min + "," + Ot.max;
- Ot.extKey !== Kt && (Ot.extKey = Kt, Pt.push(function() {
- $(Ot, "afterSetExtremes", L(Ot.eventArgs, Ot.getExtremes())), delete Ot.eventArgs;
- })), (At || _t) && Ot.redraw();
- }), At && this.drawChartBox(), $(this, "predraw"), ot.forEach(function(Ot) {
- (At || Ot.isDirty) && Ot.visible && Ot.redraw(), Ot.isDirtyData = !1;
- }), lt && lt.reset(!0), vt.draw(), $(this, "redraw"), $(this, "render"), Ct && this.temporaryDisplay(!0), Pt.forEach(function(Ot) {
- Ot.call();
- });
- }, at.prototype.get = function(J) {
- function tt(yt) {
- return yt.id === J || yt.options && yt.options.id === J;
- }
- for (var ot = this.series, lt = z(this.axes, tt) || z(this.series, tt), pt = 0; !lt && pt < ot.length; pt++)
- lt = z(ot[pt].points || [], tt);
- return lt;
- }, at.prototype.getAxes = function() {
- var J = this, tt = this.options, ot = tt.xAxis = gt(tt.xAxis || {});
- tt = tt.yAxis = gt(tt.yAxis || {}), $(this, "getAxes"), ot.forEach(function(lt, pt) {
- lt.index = pt, lt.isX = !0;
- }), tt.forEach(function(lt, pt) {
- lt.index = pt;
- }), ot.concat(tt).forEach(function(lt) {
- new N(J, lt);
- }), $(this, "afterGetAxes");
- }, at.prototype.getSelectedPoints = function() {
- return this.series.reduce(function(J, tt) {
- return tt.getPointsCollection().forEach(function(ot) {
- et(ot.selectedStaging, ot.selected) && J.push(ot);
- }), J;
- }, []);
- }, at.prototype.getSelectedSeries = function() {
- return this.series.filter(function(J) {
- return J.selected;
- });
- }, at.prototype.setTitle = function(J, tt, ot) {
- this.applyDescription("title", J), this.applyDescription("subtitle", tt), this.applyDescription(
- "caption",
- void 0
- ), this.layOutTitles(ot);
- }, at.prototype.applyDescription = function(J, tt) {
- var ot = this, lt = J === "title" ? { color: "#333333", fontSize: this.options.isStock ? "16px" : "18px" } : { color: "#666666" };
- lt = this.options[J] = q(!this.styledMode && { style: lt }, this.options[J], tt);
- var pt = this[J];
- pt && tt && (this[J] = pt = pt.destroy()), lt && !pt && (pt = this.renderer.text(lt.text, 0, 0, lt.useHTML).attr({ align: lt.align, class: "highcharts-" + J, zIndex: lt.zIndex || 4 }).add(), pt.update = function(yt) {
- ot[{ title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }[J]](yt);
- }, this.styledMode || pt.css(lt.style), this[J] = pt);
- }, at.prototype.layOutTitles = function(J) {
- var tt = [0, 0, 0], ot = this.renderer, lt = this.spacingBox;
- ["title", "subtitle", "caption"].forEach(function(yt) {
- var vt = this[yt], Ct = this.options[yt], Pt = Ct.verticalAlign || "top";
- yt = yt === "title" ? Pt === "top" ? -3 : 0 : Pt === "top" ? tt[0] + 2 : 0;
- var At;
- if (vt) {
- this.styledMode || (At = Ct.style && Ct.style.fontSize), At = ot.fontMetrics(At, vt).b, vt.css({ width: (Ct.width || lt.width + (Ct.widthAdjust || 0)) + "px" });
- var St = Math.round(vt.getBBox(Ct.useHTML).height);
- vt.align(L({ y: Pt === "bottom" ? At : yt + At, height: St }, Ct), !1, "spacingBox"), Ct.floating || (Pt === "top" ? tt[0] = Math.ceil(tt[0] + St) : Pt === "bottom" && (tt[2] = Math.ceil(tt[2] + St)));
- }
- }, this), tt[0] && (this.options.title.verticalAlign || "top") === "top" && (tt[0] += this.options.title.margin), tt[2] && this.options.caption.verticalAlign === "bottom" && (tt[2] += this.options.caption.margin);
- var pt = !this.titleOffset || this.titleOffset.join(",") !== tt.join(",");
- this.titleOffset = tt, $(this, "afterLayOutTitles"), !this.isDirtyBox && pt && (this.isDirtyBox = this.isDirtyLegend = pt, this.hasRendered && et(J, !0) && this.isDirtyBox && this.redraw());
- }, at.prototype.getChartSize = function() {
- var J = this.options.chart, tt = J.width;
- J = J.height;
- var ot = this.renderTo;
- E(tt) || (this.containerWidth = Q(ot, "width")), E(J) || (this.containerHeight = Q(ot, "height")), this.chartWidth = Math.max(0, tt || this.containerWidth || 600), this.chartHeight = Math.max(0, rt(J, this.chartWidth) || (1 < this.containerHeight ? this.containerHeight : 400));
- }, at.prototype.temporaryDisplay = function(J) {
- var tt = this.renderTo;
- if (J)
- for (; tt && tt.style; )
- tt.hcOrigStyle && (W(tt, tt.hcOrigStyle), delete tt.hcOrigStyle), tt.hcOrigDetached && (c.body.removeChild(tt), tt.hcOrigDetached = !1), tt = tt.parentNode;
- else
- for (; tt && tt.style && (c.body.contains(tt) || tt.parentNode || (tt.hcOrigDetached = !0, c.body.appendChild(tt)), (Q(tt, "display", !1) === "none" || tt.hcOricDetached) && (tt.hcOrigStyle = { display: tt.style.display, height: tt.style.height, overflow: tt.style.overflow }, J = { display: "block", overflow: "hidden" }, tt !== this.renderTo && (J.height = 0), W(tt, J), tt.offsetWidth || tt.style.setProperty("display", "block", "important")), tt = tt.parentNode, tt !== c.body); )
- ;
- }, at.prototype.setClassName = function(J) {
- this.container.className = "highcharts-container " + (J || "");
- }, at.prototype.getContainer = function() {
- var J = this.options, tt = J.chart, ot = ht(), lt, pt = this.renderTo;
- pt || (this.renderTo = pt = tt.renderTo), Z(pt) && (this.renderTo = pt = c.getElementById(pt)), pt || m(13, !0, this);
- var yt = nt(P(pt, "data-highcharts-chart"));
- H(yt) && h[yt] && h[yt].hasRendered && h[yt].destroy(), P(pt, "data-highcharts-chart", this.index), pt.innerHTML = O.emptyHTML, tt.skipClone || pt.offsetWidth || this.temporaryDisplay(), this.getChartSize(), yt = this.chartWidth;
- var vt = this.chartHeight;
- if (W(pt, { overflow: "hidden" }), this.styledMode || (lt = L({ position: "relative", overflow: "hidden", width: yt + "px", height: vt + "px", textAlign: "left", lineHeight: "normal", zIndex: 0, "-webkit-tap-highlight-color": "rgba(0,0,0,0)", userSelect: "none", "touch-action": "manipulation", outline: "none" }, tt.style || {})), this.container = ot = I("div", { id: ot }, lt, pt), this._cursor = ot.style.cursor, this.renderer = new (tt.renderer || !i ? w.getRendererType(tt.renderer) : f)(ot, yt, vt, void 0, tt.forExport, J.exporting && J.exporting.allowHTML, this.styledMode), b(
- void 0,
- this
- ), this.setClassName(tt.className), this.styledMode)
- for (var Ct in J.defs)
- this.renderer.definition(J.defs[Ct]);
- else
- this.renderer.setStyle(tt.style);
- this.renderer.chartIndex = this.index, $(this, "afterGetContainer");
- }, at.prototype.getMargins = function(J) {
- var tt = this.spacing, ot = this.margin, lt = this.titleOffset;
- this.resetMargins(), lt[0] && !E(ot[0]) && (this.plotTop = Math.max(this.plotTop, lt[0] + tt[0])), lt[2] && !E(ot[2]) && (this.marginBottom = Math.max(this.marginBottom, lt[2] + tt[2])), this.legend && this.legend.display && this.legend.adjustMargins(
- ot,
- tt
- ), $(this, "getMargins"), J || this.getAxisMargins();
- }, at.prototype.getAxisMargins = function() {
- var J = this, tt = J.axisOffset = [0, 0, 0, 0], ot = J.colorAxis, lt = J.margin, pt = function(yt) {
- yt.forEach(function(vt) {
- vt.visible && vt.getOffset();
- });
- };
- J.hasCartesianSeries ? pt(J.axes) : ot && ot.length && pt(ot), u.forEach(function(yt, vt) {
- E(lt[vt]) || (J[yt] += tt[vt]);
- }), J.setChartSize();
- }, at.prototype.reflow = function(J) {
- var tt = this, ot = tt.options.chart, lt = tt.renderTo, pt = E(ot.width) && E(ot.height), yt = ot.width || Q(lt, "width");
- ot = ot.height || Q(lt, "height"), lt = J ? J.target : p, delete tt.pointer.chartPosition, !pt && !tt.isPrinting && yt && ot && (lt === p || lt === c) && ((yt !== tt.containerWidth || ot !== tt.containerHeight) && (T.clearTimeout(tt.reflowTimeout), tt.reflowTimeout = dt(function() {
- tt.container && tt.setSize(void 0, void 0, !1);
- }, J ? 100 : 0)), tt.containerWidth = yt, tt.containerHeight = ot);
- }, at.prototype.setReflow = function(J) {
- var tt = this;
- J === !1 || this.unbindReflow ? J === !1 && this.unbindReflow && (this.unbindReflow = this.unbindReflow()) : (this.unbindReflow = n(p, "resize", function(ot) {
- tt.options && tt.reflow(ot);
- }), n(this, "destroy", this.unbindReflow));
- }, at.prototype.setSize = function(J, tt, ot) {
- var lt = this, pt = lt.renderer;
- lt.isResizing += 1, b(ot, lt), ot = pt.globalAnimation, lt.oldChartHeight = lt.chartHeight, lt.oldChartWidth = lt.chartWidth, typeof J < "u" && (lt.options.chart.width = J), typeof tt < "u" && (lt.options.chart.height = tt), lt.getChartSize(), lt.styledMode || (ot ? R : W)(lt.container, { width: lt.chartWidth + "px", height: lt.chartHeight + "px" }, ot), lt.setChartSize(!0), pt.setSize(lt.chartWidth, lt.chartHeight, ot), lt.axes.forEach(function(yt) {
- yt.isDirty = !0, yt.setScale();
- }), lt.isDirtyLegend = !0, lt.isDirtyBox = !0, lt.layOutTitles(), lt.getMargins(), lt.redraw(ot), lt.oldChartHeight = null, $(lt, "resize"), dt(function() {
- lt && $(lt, "endResize", null, function() {
- --lt.isResizing;
- });
- }, k(ot).duration);
- }, at.prototype.setChartSize = function(J) {
- var tt = this.inverted, ot = this.renderer, lt = this.chartWidth, pt = this.chartHeight, yt = this.options.chart, vt = this.spacing, Ct = this.clipOffset, Pt, At, St, Dt;
- this.plotLeft = Pt = Math.round(this.plotLeft), this.plotTop = At = Math.round(this.plotTop), this.plotWidth = St = Math.max(0, Math.round(lt - Pt - this.marginRight)), this.plotHeight = Dt = Math.max(0, Math.round(pt - At - this.marginBottom)), this.plotSizeX = tt ? Dt : St, this.plotSizeY = tt ? St : Dt, this.plotBorderWidth = yt.plotBorderWidth || 0, this.spacingBox = ot.spacingBox = { x: vt[3], y: vt[0], width: lt - vt[3] - vt[1], height: pt - vt[0] - vt[2] }, this.plotBox = ot.plotBox = { x: Pt, y: At, width: St, height: Dt }, tt = 2 * Math.floor(this.plotBorderWidth / 2), lt = Math.ceil(Math.max(tt, Ct[3]) / 2), pt = Math.ceil(Math.max(tt, Ct[0]) / 2), this.clipBox = { x: lt, y: pt, width: Math.floor(this.plotSizeX - Math.max(tt, Ct[1]) / 2 - lt), height: Math.max(0, Math.floor(this.plotSizeY - Math.max(tt, Ct[2]) / 2 - pt)) }, J || (this.axes.forEach(function(_t) {
- _t.setAxisSize(), _t.setAxisTranslation();
- }), ot.alignElements()), $(this, "afterSetChartSize", { skipAxes: J });
- }, at.prototype.resetMargins = function() {
- $(this, "resetMargins");
- var J = this, tt = J.options.chart;
- ["margin", "spacing"].forEach(function(ot) {
- var lt = tt[ot], pt = Y(lt) ? lt : [lt, lt, lt, lt];
- ["Top", "Right", "Bottom", "Left"].forEach(function(yt, vt) {
- J[ot][vt] = et(tt[ot + yt], pt[vt]);
- });
- }), u.forEach(function(ot, lt) {
- J[ot] = et(J.margin[lt], J.spacing[lt]);
- }), J.axisOffset = [0, 0, 0, 0], J.clipOffset = [0, 0, 0, 0];
- }, at.prototype.drawChartBox = function() {
- var J = this.options.chart, tt = this.renderer, ot = this.chartWidth, lt = this.chartHeight, pt = this.styledMode, yt = this.plotBGImage, vt = J.backgroundColor, Ct = J.plotBackgroundColor, Pt = J.plotBackgroundImage, At = this.plotLeft, St = this.plotTop, Dt = this.plotWidth, _t = this.plotHeight, Nt = this.plotBox, Ot = this.clipRect, Kt = this.clipBox, Gt = this.chartBackground, Wt = this.plotBackground, Jt = this.plotBorder, be, Yt = "animate";
- if (Gt || (this.chartBackground = Gt = tt.rect().addClass("highcharts-background").add(), Yt = "attr"), pt)
- var Vt = be = Gt.strokeWidth();
- else
- Vt = J.borderWidth || 0, be = Vt + (J.shadow ? 8 : 0), vt = { fill: vt || "none" }, (Vt || Gt["stroke-width"]) && (vt.stroke = J.borderColor, vt["stroke-width"] = Vt), Gt.attr(vt).shadow(J.shadow);
- Gt[Yt]({ x: be / 2, y: be / 2, width: ot - be - Vt % 2, height: lt - be - Vt % 2, r: J.borderRadius }), Yt = "animate", Wt || (Yt = "attr", this.plotBackground = Wt = tt.rect().addClass("highcharts-plot-background").add()), Wt[Yt](Nt), pt || (Wt.attr({ fill: Ct || "none" }).shadow(J.plotShadow), Pt && (yt ? (Pt !== yt.attr("href") && yt.attr("href", Pt), yt.animate(Nt)) : this.plotBGImage = tt.image(Pt, At, St, Dt, _t).add())), Ot ? Ot.animate({ width: Kt.width, height: Kt.height }) : this.clipRect = tt.clipRect(Kt), Yt = "animate", Jt || (Yt = "attr", this.plotBorder = Jt = tt.rect().addClass("highcharts-plot-border").attr({ zIndex: 1 }).add()), pt || Jt.attr({ stroke: J.plotBorderColor, "stroke-width": J.plotBorderWidth || 0, fill: "none" }), Jt[Yt](Jt.crisp({ x: At, y: St, width: Dt, height: _t }, -Jt.strokeWidth())), this.isDirtyBox = !1, $(this, "afterDrawChartBox");
- }, at.prototype.propFromSeries = function() {
- var J = this, tt = J.options.chart, ot = J.options.series, lt, pt, yt;
- ["inverted", "angular", "polar"].forEach(function(vt) {
- for (pt = s[tt.type || tt.defaultSeriesType], yt = tt[vt] || pt && pt.prototype[vt], lt = ot && ot.length; !yt && lt--; )
- (pt = s[ot[lt].type]) && pt.prototype[vt] && (yt = !0);
- J[vt] = yt;
- });
- }, at.prototype.linkSeries = function() {
- var J = this, tt = J.series;
- tt.forEach(function(ot) {
- ot.linkedSeries.length = 0;
- }), tt.forEach(function(ot) {
- var lt = ot.options.linkedTo;
- Z(lt) && (lt = lt === ":previous" ? J.series[ot.index - 1] : J.get(lt)) && lt.linkedParent !== ot && (lt.linkedSeries.push(ot), ot.linkedParent = lt, lt.enabledDataSorting && ot.setDataSortingOptions(), ot.visible = et(ot.options.visible, lt.options.visible, ot.visible));
- }), $(this, "afterLinkSeries");
- }, at.prototype.renderSeries = function() {
- this.series.forEach(function(J) {
- J.translate(), J.render();
- });
- }, at.prototype.renderLabels = function() {
- var J = this, tt = J.options.labels;
- tt.items && tt.items.forEach(function(ot) {
- var lt = L(tt.style, ot.style), pt = nt(lt.left) + J.plotLeft, yt = nt(lt.top) + J.plotTop + 12;
- delete lt.left, delete lt.top, J.renderer.text(ot.html, pt, yt).attr({ zIndex: 2 }).css(lt).add();
- });
- }, at.prototype.render = function() {
- var J = this.axes, tt = this.colorAxis, ot = this.renderer, lt = this.options, pt = function(At) {
- At.forEach(function(St) {
- St.visible && St.render();
- });
- }, yt = 0;
- this.setTitle(), this.legend = new V(this, lt.legend), this.getStacks && this.getStacks(), this.getMargins(!0), this.setChartSize(), lt = this.plotWidth, J.some(function(At) {
- if (At.horiz && At.visible && At.options.labels.enabled && At.series.length)
- return yt = 21, !0;
- });
- var vt = this.plotHeight = Math.max(this.plotHeight - yt, 0);
- J.forEach(function(At) {
- At.setScale();
- }), this.getAxisMargins();
- var Ct = 1.1 < lt / this.plotWidth, Pt = 1.05 < vt / this.plotHeight;
- (Ct || Pt) && (J.forEach(function(At) {
- (At.horiz && Ct || !At.horiz && Pt) && At.setTickInterval(!0);
- }), this.getMargins()), this.drawChartBox(), this.hasCartesianSeries ? pt(J) : tt && tt.length && pt(tt), this.seriesGroup || (this.seriesGroup = ot.g("series-group").attr({ zIndex: 3 }).add()), this.renderSeries(), this.renderLabels(), this.addCredits(), this.setResponsive && this.setResponsive(), this.hasRendered = !0;
- }, at.prototype.addCredits = function(J) {
- var tt = this, ot = q(!0, this.options.credits, J);
- ot.enabled && !this.credits && (this.credits = this.renderer.text(ot.text + (this.mapCredits || ""), 0, 0).addClass("highcharts-credits").on("click", function() {
- ot.href && (p.location.href = ot.href);
- }).attr({ align: ot.position.align, zIndex: 8 }), tt.styledMode || this.credits.css(ot.style), this.credits.add().align(ot.position), this.credits.update = function(lt) {
- tt.credits = tt.credits.destroy(), tt.addCredits(lt);
- });
- }, at.prototype.destroy = function() {
- var J = this, tt = J.axes, ot = J.series, lt = J.container, pt = lt && lt.parentNode, yt;
- for ($(J, "destroy"), J.renderer.forExport ? g(h, J) : h[J.index] = void 0, G.chartCount--, J.renderTo.removeAttribute("data-highcharts-chart"), ct(J), yt = tt.length; yt--; )
- tt[yt] = tt[yt].destroy();
- for (this.scroller && this.scroller.destroy && this.scroller.destroy(), yt = ot.length; yt--; )
- ot[yt] = ot[yt].destroy();
- "title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach(function(vt) {
- var Ct = J[vt];
- Ct && Ct.destroy && (J[vt] = Ct.destroy());
- }), lt && (lt.innerHTML = O.emptyHTML, ct(lt), pt && X(lt)), it(J, function(vt, Ct) {
- delete J[Ct];
- });
- }, at.prototype.firstRender = function() {
- var J = this, tt = J.options;
- (!J.isReadyToRender || J.isReadyToRender()) && (J.getContainer(), J.resetMargins(), J.setChartSize(), J.propFromSeries(), J.getAxes(), (A(tt.series) ? tt.series : []).forEach(function(ot) {
- J.initSeries(ot);
- }), J.linkSeries(), J.setSeriesData(), $(J, "beforeRender"), j && (F.isRequired() ? J.pointer = new F(J, tt) : J.pointer = new j(J, tt)), J.render(), J.pointer.getChartPosition(), !J.renderer.imgCount && !J.hasLoaded && J.onload(), J.temporaryDisplay(!0));
- }, at.prototype.onload = function() {
- this.callbacks.concat([this.callback]).forEach(function(J) {
- J && typeof this.index < "u" && J.apply(this, [this]);
- }, this), $(this, "load"), $(this, "render"), E(this.index) && this.setReflow(this.options.chart.reflow), this.hasLoaded = !0;
- }, at.prototype.addSeries = function(J, tt, ot) {
- var lt = this, pt;
- return J && (tt = et(tt, !0), $(lt, "addSeries", { options: J }, function() {
- pt = lt.initSeries(J), lt.isDirtyLegend = !0, lt.linkSeries(), pt.enabledDataSorting && pt.setData(J.data, !1), $(lt, "afterAddSeries", { series: pt }), tt && lt.redraw(ot);
- })), pt;
- }, at.prototype.addAxis = function(J, tt, ot, lt) {
- return this.createAxis(tt ? "xAxis" : "yAxis", { axis: J, redraw: ot, animation: lt });
- }, at.prototype.addColorAxis = function(J, tt, ot) {
- return this.createAxis(
- "colorAxis",
- { axis: J, redraw: tt, animation: ot }
- );
- }, at.prototype.createAxis = function(J, tt) {
- return J = new N(this, q(tt.axis, { index: this[J].length, isX: J === "xAxis" })), et(tt.redraw, !0) && this.redraw(tt.animation), J;
- }, at.prototype.showLoading = function(J) {
- var tt = this, ot = tt.options, lt = ot.loading, pt = function() {
- yt && W(yt, { left: tt.plotLeft + "px", top: tt.plotTop + "px", width: tt.plotWidth + "px", height: tt.plotHeight + "px" });
- }, yt = tt.loadingDiv, vt = tt.loadingSpan;
- yt || (tt.loadingDiv = yt = I("div", { className: "highcharts-loading highcharts-loading-hidden" }, null, tt.container)), vt || (tt.loadingSpan = vt = I("span", { className: "highcharts-loading-inner" }, null, yt), n(tt, "redraw", pt)), yt.className = "highcharts-loading", O.setElementHTML(vt, et(J, ot.lang.loading, "")), tt.styledMode || (W(yt, L(lt.style, { zIndex: 10 })), W(vt, lt.labelStyle), tt.loadingShown || (W(yt, { opacity: 0, display: "" }), R(yt, { opacity: lt.style.opacity || 0.5 }, { duration: lt.showDuration || 0 }))), tt.loadingShown = !0, pt();
- }, at.prototype.hideLoading = function() {
- var J = this.options, tt = this.loadingDiv;
- tt && (tt.className = "highcharts-loading highcharts-loading-hidden", this.styledMode || R(tt, { opacity: 0 }, { duration: J.loading.hideDuration || 100, complete: function() {
- W(tt, { display: "none" });
- } })), this.loadingShown = !1;
- }, at.prototype.update = function(J, tt, ot, lt) {
- var pt = this, yt = { credits: "addCredits", title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }, vt = J.isResponsiveOptions, Ct = [], Pt, At;
- $(pt, "update", { options: J }), vt || pt.setResponsive(!1, !0), J = D(J, pt.options), pt.userOptions = q(pt.userOptions, J);
- var St = J.chart;
- if (St) {
- if (q(!0, pt.options.chart, St), "className" in St && pt.setClassName(St.className), "reflow" in St && pt.setReflow(St.reflow), "inverted" in St || "polar" in St || "type" in St) {
- pt.propFromSeries();
- var Dt = !0;
- }
- "alignTicks" in St && (Dt = !0), "events" in St && v(this, St), it(St, function(_t, Nt) {
- pt.propsRequireUpdateSeries.indexOf("chart." + Nt) !== -1 && (Pt = !0), pt.propsRequireDirtyBox.indexOf(Nt) !== -1 && (pt.isDirtyBox = !0), pt.propsRequireReflow.indexOf(Nt) !== -1 && (vt ? pt.isDirtyBox = !0 : At = !0);
- }), !pt.styledMode && St.style && pt.renderer.setStyle(pt.options.chart.style || {});
- }
- !pt.styledMode && J.colors && (this.options.colors = J.colors), J.time && (this.time === t && (this.time = new l(J.time)), q(
- !0,
- pt.options.time,
- J.time
- )), it(J, function(_t, Nt) {
- pt[Nt] && typeof pt[Nt].update == "function" ? pt[Nt].update(_t, !1) : typeof pt[yt[Nt]] == "function" ? pt[yt[Nt]](_t) : Nt !== "colors" && pt.collectionsWithUpdate.indexOf(Nt) === -1 && q(!0, pt.options[Nt], J[Nt]), Nt !== "chart" && pt.propsRequireUpdateSeries.indexOf(Nt) !== -1 && (Pt = !0);
- }), this.collectionsWithUpdate.forEach(function(_t) {
- if (J[_t]) {
- var Nt = [];
- pt[_t].forEach(function(Ot, Kt) {
- Ot.options.isInternal || Nt.push(et(Ot.options.index, Kt));
- }), gt(J[_t]).forEach(function(Ot, Kt) {
- var Gt = E(Ot.id), Wt;
- Gt && (Wt = pt.get(Ot.id)), !Wt && pt[_t] && (Wt = pt[_t][Nt ? Nt[Kt] : Kt]) && Gt && E(Wt.options.id) && (Wt = void 0), Wt && Wt.coll === _t && (Wt.update(Ot, !1), ot && (Wt.touched = !0)), !Wt && ot && pt.collectionsWithInit[_t] && (pt.collectionsWithInit[_t][0].apply(pt, [Ot].concat(pt.collectionsWithInit[_t][1] || []).concat([!1])).touched = !0);
- }), ot && pt[_t].forEach(function(Ot) {
- Ot.touched || Ot.options.isInternal ? delete Ot.touched : Ct.push(Ot);
- });
- }
- }), Ct.forEach(function(_t) {
- _t.chart && _t.remove && _t.remove(!1);
- }), Dt && pt.axes.forEach(function(_t) {
- _t.update({}, !1);
- }), Pt && pt.getSeriesOrderByLinks().forEach(function(_t) {
- _t.chart && _t.update({}, !1);
- }, this), Dt = St && St.width, St = St && (Z(St.height) ? rt(St.height, Dt || pt.chartWidth) : St.height), At || H(Dt) && Dt !== pt.chartWidth || H(St) && St !== pt.chartHeight ? pt.setSize(Dt, St, lt) : et(tt, !0) && pt.redraw(lt), $(pt, "afterUpdate", { options: J, redraw: tt, animation: lt });
- }, at.prototype.setSubtitle = function(J, tt) {
- this.applyDescription("subtitle", J), this.layOutTitles(tt);
- }, at.prototype.setCaption = function(J, tt) {
- this.applyDescription("caption", J), this.layOutTitles(tt);
- }, at.prototype.showResetZoom = function() {
- function J() {
- tt.zoomOut();
- }
- var tt = this, ot = a.lang, lt = tt.options.chart.resetZoomButton, pt = lt.theme, yt = pt.states, vt = lt.relativeTo === "chart" || lt.relativeTo === "spacingBox" ? null : "scrollablePlotBox";
- $(this, "beforeShowResetZoom", null, function() {
- tt.resetZoomButton = tt.renderer.button(ot.resetZoom, null, null, J, pt, yt && yt.hover).attr({ align: lt.position.align, title: ot.resetZoomTitle }).addClass("highcharts-reset-zoom").add().align(lt.position, !1, vt);
- }), $(this, "afterShowResetZoom");
- }, at.prototype.zoomOut = function() {
- $(this, "selection", { resetSelection: !0 }, this.zoom);
- }, at.prototype.zoom = function(J) {
- var tt = this, ot = tt.pointer, lt = tt.inverted ? ot.mouseDownX : ot.mouseDownY, pt = !1, yt;
- !J || J.resetSelection ? (tt.axes.forEach(function(Ct) {
- yt = Ct.zoom();
- }), ot.initiated = !1) : J.xAxis.concat(J.yAxis).forEach(function(Ct) {
- var Pt = Ct.axis, At = tt.inverted ? Pt.left : Pt.top, St = tt.inverted ? At + Pt.width : At + Pt.height, Dt = Pt.isXAxis, _t = !1;
- (!Dt && lt >= At && lt <= St || Dt || !E(lt)) && (_t = !0), ot[Dt ? "zoomX" : "zoomY"] && _t && (yt = Pt.zoom(Ct.min, Ct.max), Pt.displayBtn && (pt = !0));
- });
- var vt = tt.resetZoomButton;
- pt && !vt ? tt.showResetZoom() : !pt && Y(vt) && (tt.resetZoomButton = vt.destroy()), yt && tt.redraw(et(
- tt.options.chart.animation,
- J && J.animation,
- 100 > tt.pointCount
- ));
- }, at.prototype.pan = function(J, tt) {
- var ot = this, lt = ot.hoverPoints;
- tt = typeof tt == "object" ? tt : { enabled: tt, type: "x" };
- var pt = ot.options.chart, yt = ot.options.mapNavigation && ot.options.mapNavigation.enabled;
- pt && pt.panning && (pt.panning = tt);
- var vt = tt.type, Ct;
- $(this, "pan", { originalEvent: J }, function() {
- lt && lt.forEach(function(St) {
- St.setState();
- });
- var Pt = ot.xAxis;
- vt === "xy" ? Pt = Pt.concat(ot.yAxis) : vt === "y" && (Pt = ot.yAxis);
- var At = {};
- Pt.forEach(function(St) {
- if (St.options.panningEnabled && !St.options.isInternal) {
- var Dt = St.horiz, _t = J[Dt ? "chartX" : "chartY"];
- Dt = Dt ? "mouseDownX" : "mouseDownY";
- var Nt = ot[Dt], Ot = St.minPointOffset || 0, Kt = St.reversed && !ot.inverted || !St.reversed && ot.inverted ? -1 : 1, Gt = St.getExtremes(), Wt = St.toValue(Nt - _t, !0) + Ot * Kt, Jt = St.toValue(Nt + St.len - _t, !0) - (Ot * Kt || St.isXAxis && St.pointRangePadding || 0), be = Jt < Wt;
- Kt = St.hasVerticalPanning(), Nt = be ? Jt : Wt, Wt = be ? Wt : Jt;
- var Yt = St.panningState;
- !Kt || St.isXAxis || Yt && !Yt.isDirty || St.series.forEach(function(Vt) {
- var Me = Vt.getProcessedData(!0);
- Me = Vt.getExtremes(Me.yData, !0), Yt || (Yt = { startMin: Number.MAX_VALUE, startMax: -Number.MAX_VALUE }), H(Me.dataMin) && H(Me.dataMax) && (Yt.startMin = Math.min(et(Vt.options.threshold, 1 / 0), Me.dataMin, Yt.startMin), Yt.startMax = Math.max(et(Vt.options.threshold, -1 / 0), Me.dataMax, Yt.startMax));
- }), Kt = Math.min(et(Yt && Yt.startMin, Gt.dataMin), Ot ? Gt.min : St.toValue(St.toPixels(Gt.min) - St.minPixelPadding)), Jt = Math.max(et(Yt && Yt.startMax, Gt.dataMax), Ot ? Gt.max : St.toValue(St.toPixels(Gt.max) + St.minPixelPadding)), St.panningState = Yt, St.isOrdinal || (Ot = Kt - Nt, 0 < Ot && (Wt += Ot, Nt = Kt), Ot = Wt - Jt, 0 < Ot && (Wt = Jt, Nt -= Ot), St.series.length && Nt !== Gt.min && Wt !== Gt.max && Nt >= Kt && Wt <= Jt && (St.setExtremes(
- Nt,
- Wt,
- !1,
- !1,
- { trigger: "pan" }
- ), ot.resetZoomButton || yt || Nt === Kt || Wt === Jt || !vt.match("y") || (ot.showResetZoom(), St.displayBtn = !1), Ct = !0), At[Dt] = _t);
- }
- }), it(At, function(St, Dt) {
- ot[Dt] = St;
- }), Ct && ot.redraw(!1), W(ot.container, { cursor: "move" });
- });
- }, at;
- }(), L(y.prototype, {
- callbacks: [],
- collectionsWithInit: { xAxis: [y.prototype.addAxis, [!0]], yAxis: [y.prototype.addAxis, [!1]], series: [y.prototype.addSeries] },
- collectionsWithUpdate: ["xAxis", "yAxis", "series"],
- propsRequireDirtyBox: "backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),
- propsRequireReflow: "margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),
- propsRequireUpdateSeries: "chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" ")
- }), y;
- }), C(o, "Core/Legend/LegendSymbol.js", [o["Core/Utilities.js"]], function(y) {
- var N = y.merge, _ = y.pick, U;
- return function(G) {
- G.drawLineMarker = function(V) {
- var F = this.options, B = V.symbolWidth, j = V.symbolHeight, w = j / 2, x = this.chart.renderer, f = this.legendGroup;
- V = V.baseline - Math.round(0.3 * V.fontMetrics.b);
- var l = {}, T = F.marker;
- this.chart.styledMode || (l = { "stroke-width": F.lineWidth || 0 }, F.dashStyle && (l.dashstyle = F.dashStyle)), this.legendLine = x.path([["M", 0, V], ["L", B, V]]).addClass("highcharts-graph").attr(l).add(f), T && T.enabled !== !1 && B && (F = Math.min(_(T.radius, w), w), this.symbol.indexOf("url") === 0 && (T = N(T, { width: j, height: j }), F = 0), this.legendSymbol = B = x.symbol(this.symbol, B / 2 - F, V - F, 2 * F, 2 * F, T).addClass("highcharts-point").add(f), B.isMarker = !0);
- }, G.drawRectangle = function(V, F) {
- var B = V.symbolHeight, j = V.options.squareSymbol;
- F.legendSymbol = this.chart.renderer.rect(j ? (V.symbolWidth - B) / 2 : 0, V.baseline - B + 1, j ? B : V.symbolWidth, B, _(V.options.symbolRadius, B / 2)).addClass("highcharts-point").attr({ zIndex: 3 }).add(F.legendGroup);
- };
- }(U || (U = {})), U;
- }), C(o, "Core/Series/SeriesDefaults.js", [], function() {
- return { lineWidth: 2, allowPointSelect: !1, crisp: !0, showCheckbox: !1, animation: { duration: 1e3 }, events: {}, marker: { enabledThreshold: 2, lineColor: "#ffffff", lineWidth: 0, radius: 4, states: {
- normal: { animation: !0 },
- hover: { animation: { duration: 50 }, enabled: !0, radiusPlus: 2, lineWidthPlus: 1 },
- select: { fillColor: "#cccccc", lineColor: "#000000", lineWidth: 2 }
- } }, point: { events: {} }, dataLabels: { animation: {}, align: "center", defer: !0, formatter: function() {
- var y = this.series.chart.numberFormatter;
- return typeof this.y != "number" ? "" : y(this.y, -1);
- }, padding: 5, style: { fontSize: "11px", fontWeight: "bold", color: "contrast", textOutline: "1px contrast" }, verticalAlign: "bottom", x: 0, y: 0 }, cropThreshold: 300, opacity: 1, pointRange: 0, softThreshold: !0, states: {
- normal: { animation: !0 },
- hover: { animation: { duration: 50 }, lineWidthPlus: 1, marker: {}, halo: { size: 10, opacity: 0.25 } },
- select: { animation: { duration: 0 } },
- inactive: { animation: { duration: 50 }, opacity: 0.2 }
- }, stickyTracking: !0, turboThreshold: 1e3, findNearestPointBy: "x" };
- }), C(o, "Core/Series/Series.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/DefaultOptions.js"],
- o["Core/Foundation.js"],
- o["Core/Globals.js"],
- o["Core/Legend/LegendSymbol.js"],
- o["Core/Series/Point.js"],
- o["Core/Series/SeriesDefaults.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Renderer/SVG/SVGElement.js"],
- o["Core/Utilities.js"]
- ], function(y, N, _, U, G, V, F, B, j, w) {
- var x = y.animObject, f = y.setAnimation, l = N.defaultOptions, T = _.registerEventOptions, O = U.hasTouch, R = U.svg, k = U.win, b = B.seriesTypes, S = w.addEvent, v = w.arrayMax, h = w.arrayMin, c = w.clamp, u = w.cleanRecursively, i = w.correctFloat, p = w.defined, a = w.erase, t = w.error, s = w.extend, n = w.find, P = w.fireEvent, D = w.getNestedProperty, I = w.isArray, W = w.isNumber, E = w.isString, X = w.merge, g = w.objectEach, m = w.pick, L = w.removeEvent, z = w.splat, $ = w.syncTimeout;
- return y = function() {
- function Q() {
- this.zones = this.yAxis = this.xAxis = this.userOptions = this.tooltipOptions = this.processedYData = this.processedXData = this.points = this.options = this.linkedSeries = this.index = this.eventsToUnbind = this.eventOptions = this.data = this.chart = this._i = void 0;
- }
- return Q.prototype.init = function(A, H) {
- P(this, "init", { options: H });
- var Y = this, Z = A.series;
- this.eventsToUnbind = [], Y.chart = A, Y.options = Y.setOptions(H), H = Y.options, Y.linkedSeries = [], Y.bindAxes(), s(Y, { name: H.name, state: "", visible: H.visible !== !1, selected: H.selected === !0 }), T(this, H);
- var q = H.events;
- (q && q.click || H.point && H.point.events && H.point.events.click || H.allowPointSelect) && (A.runTrackerClick = !0), Y.getColor(), Y.getSymbol(), Y.parallelArrays.forEach(function(et) {
- Y[et + "Data"] || (Y[et + "Data"] = []);
- }), Y.isCartesian && (A.hasCartesianSeries = !0);
- var it;
- Z.length && (it = Z[Z.length - 1]), Y._i = m(it && it._i, -1) + 1, Y.opacity = Y.options.opacity, A.orderSeries(this.insert(Z)), H.dataSorting && H.dataSorting.enabled ? Y.setDataSortingOptions() : Y.points || Y.data || Y.setData(H.data, !1), P(this, "afterInit");
- }, Q.prototype.is = function(A) {
- return b[A] && this instanceof b[A];
- }, Q.prototype.insert = function(A) {
- var H = this.options.index, Y;
- if (W(H)) {
- for (Y = A.length; Y--; )
- if (H >= m(A[Y].options.index, A[Y]._i)) {
- A.splice(Y + 1, 0, this);
- break;
- }
- Y === -1 && A.unshift(this), Y += 1;
- } else
- A.push(this);
- return m(Y, A.length - 1);
- }, Q.prototype.bindAxes = function() {
- var A = this, H = A.options, Y = A.chart, Z;
- P(this, "bindAxes", null, function() {
- (A.axisTypes || []).forEach(function(q) {
- var it = 0;
- Y[q].forEach(function(et) {
- Z = et.options, (H[q] === it && !Z.isInternal || typeof H[q] < "u" && H[q] === Z.id || typeof H[q] > "u" && Z.index === 0) && (A.insert(et.series), A[q] = et, et.isDirty = !0), Z.isInternal || it++;
- }), A[q] || A.optionalAxis === q || t(18, !0, Y);
- });
- }), P(this, "afterBindAxes");
- }, Q.prototype.updateParallelArrays = function(A, H) {
- var Y = A.series, Z = arguments, q = W(H) ? function(it) {
- var et = it === "y" && Y.toYData ? Y.toYData(A) : A[it];
- Y[it + "Data"][H] = et;
- } : function(it) {
- Array.prototype[H].apply(Y[it + "Data"], Array.prototype.slice.call(Z, 2));
- };
- Y.parallelArrays.forEach(q);
- }, Q.prototype.hasData = function() {
- return this.visible && typeof this.dataMax < "u" && typeof this.dataMin < "u" || this.visible && this.yData && 0 < this.yData.length;
- }, Q.prototype.autoIncrement = function(A) {
- var H = this.options, Y = H.pointIntervalUnit, Z = H.relativeXValue, q = this.chart.time, it = this.xIncrement, et;
- return it = m(it, H.pointStart, 0), this.pointInterval = et = m(this.pointInterval, H.pointInterval, 1), Z && W(A) && (et *= A), Y && (H = new q.Date(it), Y === "day" ? q.set("Date", H, q.get("Date", H) + et) : Y === "month" ? q.set("Month", H, q.get("Month", H) + et) : Y === "year" && q.set("FullYear", H, q.get("FullYear", H) + et), et = H.getTime() - it), Z && W(A) ? it + et : (this.xIncrement = it + et, it);
- }, Q.prototype.setDataSortingOptions = function() {
- var A = this.options;
- s(this, { requireSorting: !1, sorted: !1, enabledDataSorting: !0, allowDG: !1 }), p(A.pointRange) || (A.pointRange = 1);
- }, Q.prototype.setOptions = function(A) {
- var H = this.chart, Y = H.options, Z = Y.plotOptions, q = H.userOptions || {};
- A = X(A), H = H.styledMode;
- var it = { plotOptions: Z, userOptions: A };
- P(this, "setOptions", it);
- var et = it.plotOptions[this.type], nt = q.plotOptions || {};
- return this.userOptions = it.userOptions, q = X(et, Z.series, q.plotOptions && q.plotOptions[this.type], A), this.tooltipOptions = X(l.tooltip, l.plotOptions.series && l.plotOptions.series.tooltip, l.plotOptions[this.type].tooltip, Y.tooltip.userOptions, Z.series && Z.series.tooltip, Z[this.type].tooltip, A.tooltip), this.stickyTracking = m(A.stickyTracking, nt[this.type] && nt[this.type].stickyTracking, nt.series && nt.series.stickyTracking, this.tooltipOptions.shared && !this.noSharedTooltip ? !0 : q.stickyTracking), et.marker === null && delete q.marker, this.zoneAxis = q.zoneAxis, Z = this.zones = (q.zones || []).slice(), !q.negativeColor && !q.negativeFillColor || q.zones || (Y = { value: q[this.zoneAxis + "Threshold"] || q.threshold || 0, className: "highcharts-negative" }, H || (Y.color = q.negativeColor, Y.fillColor = q.negativeFillColor), Z.push(Y)), Z.length && p(Z[Z.length - 1].value) && Z.push(H ? {} : { color: this.color, fillColor: this.fillColor }), P(this, "afterSetOptions", { options: q }), q;
- }, Q.prototype.getName = function() {
- return m(this.options.name, "Series " + (this.index + 1));
- }, Q.prototype.getCyclic = function(A, H, Y) {
- var Z = this.chart, q = this.userOptions, it = A + "Index", et = A + "Counter", nt = Y ? Y.length : m(Z.options.chart[A + "Count"], Z[A + "Count"]);
- if (!H) {
- var rt = m(q[it], q["_" + it]);
- p(rt) || (Z.series.length || (Z[et] = 0), q["_" + it] = rt = Z[et] % nt, Z[et] += 1), Y && (H = Y[rt]);
- }
- typeof rt < "u" && (this[it] = rt), this[A] = H;
- }, Q.prototype.getColor = function() {
- this.chart.styledMode ? this.getCyclic("color") : this.options.colorByPoint ? this.color = "#cccccc" : this.getCyclic("color", this.options.color || l.plotOptions[this.type].color, this.chart.options.colors);
- }, Q.prototype.getPointsCollection = function() {
- return (this.hasGroupedData ? this.points : this.data) || [];
- }, Q.prototype.getSymbol = function() {
- this.getCyclic("symbol", this.options.marker.symbol, this.chart.options.symbols);
- }, Q.prototype.findPointIndex = function(A, H) {
- var Y = A.id, Z = A.x, q = this.points, it = this.options.dataSorting, et, nt;
- if (Y)
- it = this.chart.get(Y), it instanceof V && (et = it);
- else if ((this.linkedParent || this.enabledDataSorting || this.options.relativeXValue) && (et = function(ct) {
- return !ct.touched && ct.index === A.index;
- }, it && it.matchByName ? et = function(ct) {
- return !ct.touched && ct.name === A.name;
- } : this.options.relativeXValue && (et = function(ct) {
- return !ct.touched && ct.options.x === A.x;
- }), et = n(q, et), !et))
- return;
- if (et) {
- var rt = et && et.index;
- typeof rt < "u" && (nt = !0);
- }
- return typeof rt > "u" && W(Z) && (rt = this.xData.indexOf(Z, H)), rt !== -1 && typeof rt < "u" && this.cropped && (rt = rt >= this.cropStart ? rt - this.cropStart : rt), !nt && W(rt) && q[rt] && q[rt].touched && (rt = void 0), rt;
- }, Q.prototype.updateData = function(A, H) {
- var Y = this.options, Z = Y.dataSorting, q = this.points, it = [], et = this.requireSorting, nt = A.length === q.length, rt, ct, gt, dt = !0;
- if (this.xIncrement = null, A.forEach(function(ht, at) {
- var J = p(ht) && this.pointClass.prototype.optionsToObject.call({ series: this }, ht) || {}, tt = J.x;
- J.id || W(tt) ? (J = this.findPointIndex(J, gt), J === -1 || typeof J > "u" ? it.push(ht) : q[J] && ht !== Y.data[J] ? (q[J].update(ht, !1, null, !1), q[J].touched = !0, et && (gt = J + 1)) : q[J] && (q[J].touched = !0), (!nt || at !== J || Z && Z.enabled || this.hasDerivedData) && (rt = !0)) : it.push(ht);
- }, this), rt)
- for (A = q.length; A--; )
- (ct = q[A]) && !ct.touched && ct.remove && ct.remove(!1, H);
- else
- !nt || Z && Z.enabled ? dt = !1 : (A.forEach(function(ht, at) {
- ht !== q[at].y && q[at].update && q[at].update(
- ht,
- !1,
- null,
- !1
- );
- }), it.length = 0);
- return q.forEach(function(ht) {
- ht && (ht.touched = !1);
- }), dt ? (it.forEach(function(ht) {
- this.addPoint(ht, !1, null, null, !1);
- }, this), this.xIncrement === null && this.xData && this.xData.length && (this.xIncrement = v(this.xData), this.autoIncrement()), !0) : !1;
- }, Q.prototype.setData = function(A, H, Y, Z) {
- var q = this, it = q.points, et = it && it.length || 0, nt = q.options, rt = q.chart, ct = nt.dataSorting, gt = q.xAxis, dt = nt.turboThreshold, ht = this.xData, at = this.yData, J = q.pointArrayMap;
- J = J && J.length;
- var tt = nt.keys, ot, lt = 0, pt = 1, yt = null;
- A = A || [];
- var vt = A.length;
- if (H = m(H, !0), ct && ct.enabled && (A = this.sortData(A)), Z !== !1 && vt && et && !q.cropped && !q.hasGroupedData && q.visible && !q.isSeriesBoosting && (ot = this.updateData(A, Y)), !ot) {
- if (q.xIncrement = null, q.colorCounter = 0, this.parallelArrays.forEach(function(Ct) {
- q[Ct + "Data"].length = 0;
- }), dt && vt > dt)
- if (yt = q.getFirstValidPoint(A), W(yt))
- for (Y = 0; Y < vt; Y++)
- ht[Y] = this.autoIncrement(), at[Y] = A[Y];
- else if (I(yt))
- if (J)
- if (yt.length === J)
- for (Y = 0; Y < vt; Y++)
- ht[Y] = this.autoIncrement(), at[Y] = A[Y];
- else
- for (Y = 0; Y < vt; Y++)
- Z = A[Y], ht[Y] = Z[0], at[Y] = Z.slice(
- 1,
- J + 1
- );
- else if (tt && (lt = tt.indexOf("x"), pt = tt.indexOf("y"), lt = 0 <= lt ? lt : 0, pt = 0 <= pt ? pt : 1), yt.length === 1 && (pt = 0), lt === pt)
- for (Y = 0; Y < vt; Y++)
- ht[Y] = this.autoIncrement(), at[Y] = A[Y][pt];
- else
- for (Y = 0; Y < vt; Y++)
- Z = A[Y], ht[Y] = Z[lt], at[Y] = Z[pt];
- else
- t(12, !1, rt);
- else
- for (Y = 0; Y < vt; Y++)
- typeof A[Y] < "u" && (Z = { series: q }, q.pointClass.prototype.applyOptions.apply(Z, [A[Y]]), q.updateParallelArrays(Z, Y));
- for (at && E(at[0]) && t(14, !0, rt), q.data = [], q.options.data = q.userOptions.data = A, Y = et; Y--; )
- it[Y] && it[Y].destroy && it[Y].destroy();
- gt && (gt.minRange = gt.userMinRange), q.isDirty = rt.isDirtyBox = !0, q.isDirtyData = !!it, Y = !1;
- }
- nt.legendType === "point" && (this.processData(), this.generatePoints()), H && rt.redraw(Y);
- }, Q.prototype.sortData = function(A) {
- var H = this, Y = H.options.dataSorting.sortKey || "y", Z = function(q, it) {
- return p(it) && q.pointClass.prototype.optionsToObject.call({ series: q }, it) || {};
- };
- return A.forEach(function(q, it) {
- A[it] = Z(H, q), A[it].index = it;
- }, this), A.concat().sort(function(q, it) {
- return q = D(Y, q), it = D(Y, it), it < q ? -1 : it > q ? 1 : 0;
- }).forEach(function(q, it) {
- q.x = it;
- }, this), H.linkedSeries && H.linkedSeries.forEach(function(q) {
- var it = q.options, et = it.data;
- it.dataSorting && it.dataSorting.enabled || !et || (et.forEach(function(nt, rt) {
- et[rt] = Z(q, nt), A[rt] && (et[rt].x = A[rt].x, et[rt].index = rt);
- }), q.setData(et, !1));
- }), A;
- }, Q.prototype.getProcessedData = function(A) {
- var H = this.xAxis, Y = this.options, Z = Y.cropThreshold, q = A || this.getExtremesFromAll || Y.getExtremesFromAll, it = this.isCartesian;
- A = H && H.val2lin, Y = !(!H || !H.logarithmic);
- var et = 0, nt = this.xData, rt = this.yData, ct = this.requireSorting, gt = !1, dt = nt.length;
- if (H) {
- gt = H.getExtremes();
- var ht = gt.min, at = gt.max;
- gt = H.categories && !H.names.length;
- }
- if (it && this.sorted && !q && (!Z || dt > Z || this.forceCrop)) {
- if (nt[dt - 1] < ht || nt[0] > at)
- nt = [], rt = [];
- else if (this.yData && (nt[0] < ht || nt[dt - 1] > at)) {
- var J = this.cropData(this.xData, this.yData, ht, at);
- nt = J.xData, rt = J.yData, et = J.start, J = !0;
- }
- }
- for (Z = nt.length || 1; --Z; )
- if (H = Y ? A(nt[Z]) - A(nt[Z - 1]) : nt[Z] - nt[Z - 1], 0 < H && (typeof tt > "u" || H < tt))
- var tt = H;
- else
- 0 > H && ct && !gt && (t(15, !1, this.chart), ct = !1);
- return { xData: nt, yData: rt, cropped: J, cropStart: et, closestPointRange: tt };
- }, Q.prototype.processData = function(A) {
- var H = this.xAxis;
- if (this.isCartesian && !this.isDirty && !H.isDirty && !this.yAxis.isDirty && !A)
- return !1;
- A = this.getProcessedData(), this.cropped = A.cropped, this.cropStart = A.cropStart, this.processedXData = A.xData, this.processedYData = A.yData, this.closestPointRange = this.basePointRange = A.closestPointRange, P(this, "afterProcessData");
- }, Q.prototype.cropData = function(A, H, Y, Z, q) {
- var it = A.length, et, nt = 0, rt = it;
- for (q = m(q, this.cropShoulder), et = 0; et < it; et++)
- if (A[et] >= Y) {
- nt = Math.max(0, et - q);
- break;
- }
- for (Y = et; Y < it; Y++)
- if (A[Y] > Z) {
- rt = Y + q;
- break;
- }
- return { xData: A.slice(nt, rt), yData: H.slice(
- nt,
- rt
- ), start: nt, end: rt };
- }, Q.prototype.generatePoints = function() {
- var A = this.options, H = A.data, Y = this.processedXData, Z = this.processedYData, q = this.pointClass, it = Y.length, et = this.cropStart || 0, nt = this.hasGroupedData, rt = A.keys, ct = [];
- A = A.dataGrouping && A.dataGrouping.groupAll ? et : 0;
- var gt, dt, ht = this.data;
- if (!ht && !nt) {
- var at = [];
- at.length = H.length, ht = this.data = at;
- }
- for (rt && nt && (this.options.keys = !1), dt = 0; dt < it; dt++) {
- if (at = et + dt, nt) {
- var J = new q().init(this, [Y[dt]].concat(z(Z[dt])));
- J.dataGroup = this.groupMap[A + dt], J.dataGroup.options && (J.options = J.dataGroup.options, s(J, J.dataGroup.options), delete J.dataLabels);
- } else
- (J = ht[at]) || typeof H[at] > "u" || (ht[at] = J = new q().init(this, H[at], Y[dt]));
- J && (J.index = nt ? A + dt : at, ct[dt] = J);
- }
- if (this.options.keys = rt, ht && (it !== (gt = ht.length) || nt))
- for (dt = 0; dt < gt; dt++)
- dt !== et || nt || (dt += it), ht[dt] && (ht[dt].destroyElements(), ht[dt].plotX = void 0);
- this.data = ht, this.points = ct, P(this, "afterGeneratePoints");
- }, Q.prototype.getXExtremes = function(A) {
- return { min: h(A), max: v(A) };
- }, Q.prototype.getExtremes = function(A, H) {
- var Y = this.xAxis, Z = this.yAxis, q = this.processedXData || this.xData, it = [], et = this.requireSorting ? this.cropShoulder : 0;
- Z = Z ? Z.positiveValuesOnly : !1;
- var nt, rt = 0, ct = 0, gt = 0;
- A = A || this.stackedYData || this.processedYData || [];
- var dt = A.length;
- if (Y) {
- var ht = Y.getExtremes();
- rt = ht.min, ct = ht.max;
- }
- for (nt = 0; nt < dt; nt++) {
- var at = q[nt];
- ht = A[nt];
- var J = (W(ht) || I(ht)) && (ht.length || 0 < ht || !Z);
- if (at = H || this.getExtremesFromAll || this.options.getExtremesFromAll || this.cropped || !Y || (q[nt + et] || at) >= rt && (q[nt - et] || at) <= ct, J && at)
- if (J = ht.length)
- for (; J--; )
- W(ht[J]) && (it[gt++] = ht[J]);
- else
- it[gt++] = ht;
- }
- return A = { activeYData: it, dataMin: h(it), dataMax: v(it) }, P(this, "afterGetExtremes", { dataExtremes: A }), A;
- }, Q.prototype.applyExtremes = function() {
- var A = this.getExtremes();
- return this.dataMin = A.dataMin, this.dataMax = A.dataMax, A;
- }, Q.prototype.getFirstValidPoint = function(A) {
- for (var H = A.length, Y = 0, Z = null; Z === null && Y < H; )
- Z = A[Y], Y++;
- return Z;
- }, Q.prototype.translate = function() {
- this.processedXData || this.processData(), this.generatePoints();
- var A = this.options, H = A.stacking, Y = this.xAxis, Z = Y.categories, q = this.enabledDataSorting, it = this.yAxis, et = this.points, nt = et.length, rt = this.pointPlacementToXValue(), ct = !!rt, gt = A.threshold, dt = A.startFromThreshold ? gt : 0, ht = this.zoneAxis || "y", at, J, tt = Number.MAX_VALUE;
- for (at = 0; at < nt; at++) {
- var ot = et[at], lt = ot.x, pt = void 0, yt = void 0, vt = ot.y, Ct = ot.low, Pt = H && it.stacking && it.stacking.stacks[(this.negStacks && vt < (dt ? 0 : gt) ? "-" : "") + this.stackKey];
- if ((it.positiveValuesOnly && !it.validatePositiveValue(vt) || Y.positiveValuesOnly && !Y.validatePositiveValue(lt)) && (ot.isNull = !0), ot.plotX = J = i(c(Y.translate(lt, 0, 0, 0, 1, rt, this.type === "flags"), -1e5, 1e5)), H && this.visible && Pt && Pt[lt]) {
- var At = this.getStackIndicator(
- At,
- lt,
- this.index
- );
- ot.isNull || (pt = Pt[lt], yt = pt.points[At.key]);
- }
- if (I(yt) && (Ct = yt[0], vt = yt[1], Ct === dt && At.key === Pt[lt].base && (Ct = m(W(gt) && gt, it.min)), it.positiveValuesOnly && 0 >= Ct && (Ct = null), ot.total = ot.stackTotal = pt.total, ot.percentage = pt.total && ot.y / pt.total * 100, ot.stackY = vt, this.irregularWidths || pt.setOffset(this.pointXOffset || 0, this.barW || 0)), ot.yBottom = p(Ct) ? c(it.translate(Ct, 0, 1, 0, 1), -1e5, 1e5) : null, this.dataModify && (vt = this.dataModify.modifyValue(vt, at)), ot.plotY = void 0, W(vt) && (pt = it.translate(vt, !1, !0, !1, !0), typeof pt < "u" && (ot.plotY = c(
- pt,
- -1e5,
- 1e5
- ))), ot.isInside = this.isPointInside(ot), ot.clientX = ct ? i(Y.translate(lt, 0, 0, 0, 1, rt)) : J, ot.negative = ot[ht] < (A[ht + "Threshold"] || gt || 0), ot.category = Z && typeof Z[ot.x] < "u" ? Z[ot.x] : ot.x, !ot.isNull && ot.visible !== !1) {
- typeof St < "u" && (tt = Math.min(tt, Math.abs(J - St)));
- var St = J;
- }
- ot.zone = this.zones.length ? ot.getZone() : void 0, !ot.graphic && this.group && q && (ot.isNew = !0);
- }
- this.closestPointRangePx = tt, P(this, "afterTranslate");
- }, Q.prototype.getValidPoints = function(A, H, Y) {
- var Z = this.chart;
- return (A || this.points || []).filter(function(q) {
- return H && !Z.isInsidePlot(q.plotX, q.plotY, { inverted: Z.inverted }) ? !1 : q.visible !== !1 && (Y || !q.isNull);
- });
- }, Q.prototype.getClipBox = function() {
- var A = this.chart, H = this.xAxis, Y = this.yAxis, Z = X(A.clipBox);
- return H && H.len !== A.plotSizeX && (Z.width = H.len), Y && Y.len !== A.plotSizeY && (Z.height = Y.len), Z;
- }, Q.prototype.getSharedClipKey = function() {
- return this.sharedClipKey = (this.options.xAxis || 0) + "," + (this.options.yAxis || 0);
- }, Q.prototype.setClip = function() {
- var A = this.chart, H = this.group, Y = this.markerGroup, Z = A.sharedClips;
- A = A.renderer;
- var q = this.getClipBox(), it = this.getSharedClipKey(), et = Z[it];
- et ? et.animate(q) : Z[it] = et = A.clipRect(q), H && H.clip(this.options.clip === !1 ? void 0 : et), Y && Y.clip();
- }, Q.prototype.animate = function(A) {
- var H = this.chart, Y = this.group, Z = this.markerGroup, q = H.inverted, it = x(this.options.animation), et = [this.getSharedClipKey(), it.duration, it.easing, it.defer].join(), nt = H.sharedClips[et], rt = H.sharedClips[et + "m"];
- if (A && Y)
- it = this.getClipBox(), nt ? nt.attr("height", it.height) : (it.width = 0, q && (it.x = H.plotHeight), nt = H.renderer.clipRect(it), H.sharedClips[et] = nt, rt = H.renderer.clipRect({ x: q ? (H.plotSizeX || 0) + 99 : -99, y: q ? -H.plotLeft : -H.plotTop, width: 99, height: q ? H.chartWidth : H.chartHeight }), H.sharedClips[et + "m"] = rt), Y.clip(nt), Z && Z.clip(rt);
- else if (nt && !nt.hasClass("highcharts-animating")) {
- H = this.getClipBox();
- var ct = it.step;
- Z && Z.element.childNodes.length && (it.step = function(gt, dt) {
- ct && ct.apply(dt, arguments), rt && rt.element && rt.attr(dt.prop, dt.prop === "width" ? gt + 99 : gt);
- }), nt.addClass("highcharts-animating").animate(H, it);
- }
- }, Q.prototype.afterAnimate = function() {
- var A = this;
- this.setClip(), g(
- this.chart.sharedClips,
- function(H, Y, Z) {
- H && !A.chart.container.querySelector('[clip-path="url(#' + H.id + ')"]') && (H.destroy(), delete Z[Y]);
- }
- ), this.finishedAnimating = !0, P(this, "afterAnimate");
- }, Q.prototype.drawPoints = function() {
- var A = this.points, H = this.chart, Y = this.options.marker, Z = this[this.specialGroup] || this.markerGroup, q = this.xAxis, it = m(Y.enabled, !q || q.isRadial ? !0 : null, this.closestPointRangePx >= Y.enabledThreshold * Y.radius), et, nt;
- if (Y.enabled !== !1 || this._hasPointMarkers)
- for (et = 0; et < A.length; et++) {
- var rt = A[et], ct = (nt = rt.graphic) ? "animate" : "attr", gt = rt.marker || {}, dt = !!rt.marker;
- if ((it && typeof gt.enabled > "u" || gt.enabled) && !rt.isNull && rt.visible !== !1) {
- var ht = m(gt.symbol, this.symbol, "rect"), at = this.markerAttribs(rt, rt.selected && "select");
- this.enabledDataSorting && (rt.startXPos = q.reversed ? -(at.width || 0) : q.width);
- var J = rt.isInside !== !1;
- nt ? nt[J ? "show" : "hide"](J).animate(at) : J && (0 < (at.width || 0) || rt.hasImage) && (rt.graphic = nt = H.renderer.symbol(ht, at.x, at.y, at.width, at.height, dt ? gt : Y).add(Z), this.enabledDataSorting && H.hasRendered && (nt.attr({ x: rt.startXPos }), ct = "animate")), nt && ct === "animate" && nt[J ? "show" : "hide"](J).animate(at), nt && !H.styledMode && nt[ct](this.pointAttribs(rt, rt.selected && "select")), nt && nt.addClass(rt.getClassName(), !0);
- } else
- nt && (rt.graphic = nt.destroy());
- }
- }, Q.prototype.markerAttribs = function(A, H) {
- var Y = this.options, Z = Y.marker, q = A.marker || {}, it = q.symbol || Z.symbol, et = m(q.radius, Z.radius);
- return H && (Z = Z.states[H], H = q.states && q.states[H], et = m(H && H.radius, Z && Z.radius, et + (Z && Z.radiusPlus || 0))), A.hasImage = it && it.indexOf("url") === 0, A.hasImage && (et = 0), A = { x: Y.crisp ? Math.floor(A.plotX - et) : A.plotX - et, y: A.plotY - et }, et && (A.width = A.height = 2 * et), A;
- }, Q.prototype.pointAttribs = function(A, H) {
- var Y = this.options.marker, Z = A && A.options, q = Z && Z.marker || {}, it = Z && Z.color, et = A && A.color, nt = A && A.zone && A.zone.color, rt = this.color;
- return A = m(q.lineWidth, Y.lineWidth), Z = 1, rt = it || nt || et || rt, it = q.fillColor || Y.fillColor || rt, et = q.lineColor || Y.lineColor || rt, H = H || "normal", Y = Y.states[H] || {}, H = q.states && q.states[H] || {}, A = m(H.lineWidth, Y.lineWidth, A + m(H.lineWidthPlus, Y.lineWidthPlus, 0)), it = H.fillColor || Y.fillColor || it, et = H.lineColor || Y.lineColor || et, Z = m(H.opacity, Y.opacity, Z), { stroke: et, "stroke-width": A, fill: it, opacity: Z };
- }, Q.prototype.destroy = function(A) {
- var H = this, Y = H.chart, Z = /AppleWebKit\/533/.test(k.navigator.userAgent), q = H.data || [], it, et, nt, rt;
- for (P(H, "destroy"), this.removeEvents(A), (H.axisTypes || []).forEach(function(ct) {
- (rt = H[ct]) && rt.series && (a(rt.series, H), rt.isDirty = rt.forceRedraw = !0);
- }), H.legendItem && H.chart.legend.destroyItem(H), et = q.length; et--; )
- (nt = q[et]) && nt.destroy && nt.destroy();
- H.clips && H.clips.forEach(function(ct) {
- return ct.destroy();
- }), w.clearTimeout(H.animationTimeout), g(H, function(ct, gt) {
- ct instanceof j && !ct.survive && (it = Z && gt === "group" ? "hide" : "destroy", ct[it]());
- }), Y.hoverSeries === H && (Y.hoverSeries = void 0), a(Y.series, H), Y.orderSeries(), g(H, function(ct, gt) {
- A && gt === "hcEvents" || delete H[gt];
- });
- }, Q.prototype.applyZones = function() {
- var A = this, H = this.chart, Y = H.renderer, Z = this.zones, q = this.clips || [], it = this.graph, et = this.area, nt = Math.max(H.chartWidth, H.chartHeight), rt = this[(this.zoneAxis || "y") + "Axis"], ct = H.inverted, gt, dt, ht, at, J, tt, ot, lt, pt = !1;
- if (Z.length && (it || et) && rt && typeof rt.min < "u") {
- var yt = rt.reversed, vt = rt.horiz;
- it && !this.showLine && it.hide(), et && et.hide();
- var Ct = rt.getExtremes();
- Z.forEach(function(Pt, At) {
- gt = yt ? vt ? H.plotWidth : 0 : vt ? 0 : rt.toPixels(Ct.min) || 0, gt = c(m(dt, gt), 0, nt), dt = c(Math.round(rt.toPixels(m(Pt.value, Ct.max), !0) || 0), 0, nt), pt && (gt = dt = rt.toPixels(Ct.max)), at = Math.abs(gt - dt), J = Math.min(gt, dt), tt = Math.max(gt, dt), rt.isXAxis ? (ht = { x: ct ? tt : J, y: 0, width: at, height: nt }, vt || (ht.x = H.plotHeight - ht.x)) : (ht = { x: 0, y: ct ? tt : J, width: nt, height: at }, vt && (ht.y = H.plotWidth - ht.y)), ct && Y.isVML && (ht = rt.isXAxis ? {
- x: 0,
- y: yt ? J : tt,
- height: ht.width,
- width: H.chartWidth
- } : { x: ht.y - H.plotLeft - H.spacingBox.x, y: 0, width: ht.height, height: H.chartHeight }), q[At] ? q[At].animate(ht) : q[At] = Y.clipRect(ht), ot = A["zone-area-" + At], lt = A["zone-graph-" + At], it && lt && lt.clip(q[At]), et && ot && ot.clip(q[At]), pt = Pt.value > Ct.max, A.resetZones && dt === 0 && (dt = void 0);
- }), this.clips = q;
- } else
- A.visible && (it && it.show(!0), et && et.show(!0));
- }, Q.prototype.invertGroups = function(A) {
- function H() {
- ["group", "markerGroup"].forEach(function(q) {
- Y[q] && (Z.renderer.isVML && Y[q].attr({ width: Y.yAxis.len, height: Y.xAxis.len }), Y[q].width = Y.yAxis.len, Y[q].height = Y.xAxis.len, Y[q].invert(Y.isRadialSeries ? !1 : A));
- });
- }
- var Y = this, Z = Y.chart;
- Y.xAxis && (Y.eventsToUnbind.push(S(Z, "resize", H)), H(), Y.invertGroups = H);
- }, Q.prototype.plotGroup = function(A, H, Y, Z, q) {
- var it = this[A], et = !it;
- return Y = { visibility: Y, zIndex: Z || 0.1 }, typeof this.opacity > "u" || this.chart.styledMode || this.state === "inactive" || (Y.opacity = this.opacity), et && (this[A] = it = this.chart.renderer.g().add(q)), it.addClass("highcharts-" + H + " highcharts-series-" + this.index + " highcharts-" + this.type + "-series " + (p(this.colorIndex) ? "highcharts-color-" + this.colorIndex + " " : "") + (this.options.className || "") + (it.hasClass("highcharts-tracker") ? " highcharts-tracker" : ""), !0), it.attr(Y)[et ? "attr" : "animate"](this.getPlotBox()), it;
- }, Q.prototype.getPlotBox = function() {
- var A = this.chart, H = this.xAxis, Y = this.yAxis;
- return A.inverted && (H = Y, Y = this.xAxis), { translateX: H ? H.left : A.plotLeft, translateY: Y ? Y.top : A.plotTop, scaleX: 1, scaleY: 1 };
- }, Q.prototype.removeEvents = function(A) {
- A || L(this), this.eventsToUnbind.length && (this.eventsToUnbind.forEach(function(H) {
- H();
- }), this.eventsToUnbind.length = 0);
- }, Q.prototype.render = function() {
- var A = this, H = A.chart, Y = A.options, Z = x(Y.animation), q = A.visible ? "inherit" : "hidden", it = Y.zIndex, et = A.hasRendered, nt = H.seriesGroup, rt = H.inverted;
- H = !A.finishedAnimating && H.renderer.isSVG ? Z.duration : 0, P(this, "render");
- var ct = A.plotGroup("group", "series", q, it, nt);
- A.markerGroup = A.plotGroup("markerGroup", "markers", q, it, nt), Y.clip !== !1 && A.setClip(), A.animate && H && A.animate(!0), ct.inverted = m(A.invertible, A.isCartesian) ? rt : !1, A.drawGraph && (A.drawGraph(), A.applyZones()), A.visible && A.drawPoints(), A.drawDataLabels && A.drawDataLabels(), A.redrawPoints && A.redrawPoints(), A.drawTracker && A.options.enableMouseTracking !== !1 && A.drawTracker(), A.invertGroups(rt), A.animate && H && A.animate(), et || (H && Z.defer && (H += Z.defer), A.animationTimeout = $(function() {
- A.afterAnimate();
- }, H || 0)), A.isDirty = !1, A.hasRendered = !0, P(A, "afterRender");
- }, Q.prototype.redraw = function() {
- var A = this.chart, H = this.isDirty || this.isDirtyData, Y = this.group, Z = this.xAxis, q = this.yAxis;
- Y && (A.inverted && Y.attr({
- width: A.plotWidth,
- height: A.plotHeight
- }), Y.animate({ translateX: m(Z && Z.left, A.plotLeft), translateY: m(q && q.top, A.plotTop) })), this.translate(), this.render(), H && delete this.kdTree;
- }, Q.prototype.searchPoint = function(A, H) {
- var Y = this.xAxis, Z = this.yAxis, q = this.chart.inverted;
- return this.searchKDTree({ clientX: q ? Y.len - A.chartY + Y.pos : A.chartX - Y.pos, plotY: q ? Z.len - A.chartX + Z.pos : A.chartY - Z.pos }, H, A);
- }, Q.prototype.buildKDTree = function(A) {
- function H(q, it, et) {
- var nt = q && q.length;
- if (nt) {
- var rt = Y.kdAxisArray[it % et];
- return q.sort(function(ct, gt) {
- return ct[rt] - gt[rt];
- }), nt = Math.floor(nt / 2), { point: q[nt], left: H(q.slice(0, nt), it + 1, et), right: H(q.slice(nt + 1), it + 1, et) };
- }
- }
- this.buildingKdTree = !0;
- var Y = this, Z = -1 < Y.options.findNearestPointBy.indexOf("y") ? 2 : 1;
- delete Y.kdTree, $(function() {
- Y.kdTree = H(Y.getValidPoints(null, !Y.directTouch), Z, Z), Y.buildingKdTree = !1;
- }, Y.options.kdNow || A && A.type === "touchstart" ? 0 : 1);
- }, Q.prototype.searchKDTree = function(A, H, Y) {
- function Z(rt, ct, gt, dt) {
- var ht = ct.point, at = q.kdAxisArray[gt % dt], J = ht, tt = p(rt[it]) && p(ht[it]) ? Math.pow(rt[it] - ht[it], 2) : null, ot = p(rt[et]) && p(ht[et]) ? Math.pow(rt[et] - ht[et], 2) : null;
- return ot = (tt || 0) + (ot || 0), ht.dist = p(ot) ? Math.sqrt(ot) : Number.MAX_VALUE, ht.distX = p(tt) ? Math.sqrt(tt) : Number.MAX_VALUE, at = rt[at] - ht[at], ot = 0 > at ? "left" : "right", tt = 0 > at ? "right" : "left", ct[ot] && (ot = Z(rt, ct[ot], gt + 1, dt), J = ot[nt] < J[nt] ? ot : ht), ct[tt] && Math.sqrt(at * at) < J[nt] && (rt = Z(rt, ct[tt], gt + 1, dt), J = rt[nt] < J[nt] ? rt : J), J;
- }
- var q = this, it = this.kdAxisArray[0], et = this.kdAxisArray[1], nt = H ? "distX" : "dist";
- if (H = -1 < q.options.findNearestPointBy.indexOf("y") ? 2 : 1, this.kdTree || this.buildingKdTree || this.buildKDTree(Y), this.kdTree)
- return Z(
- A,
- this.kdTree,
- H,
- H
- );
- }, Q.prototype.pointPlacementToXValue = function() {
- var A = this.options, H = A.pointRange, Y = this.xAxis;
- return A = A.pointPlacement, A === "between" && (A = Y.reversed ? -0.5 : 0.5), W(A) ? A * (H || Y.pointRange) : 0;
- }, Q.prototype.isPointInside = function(A) {
- var H = this.chart, Y = this.xAxis, Z = this.yAxis;
- return typeof A.plotY < "u" && typeof A.plotX < "u" && 0 <= A.plotY && A.plotY <= (Z ? Z.len : H.plotHeight) && 0 <= A.plotX && A.plotX <= (Y ? Y.len : H.plotWidth);
- }, Q.prototype.drawTracker = function() {
- var A = this, H = A.options, Y = H.trackByArea, Z = [].concat(Y ? A.areaPath : A.graphPath), q = A.chart, it = q.pointer, et = q.renderer, nt = q.options.tooltip.snap, rt = A.tracker, ct = function(dt) {
- q.hoverSeries !== A && A.onMouseOver();
- }, gt = "rgba(192,192,192," + (R ? 1e-4 : 2e-3) + ")";
- rt ? rt.attr({ d: Z }) : A.graph && (A.tracker = et.path(Z).attr({ visibility: A.visible ? "visible" : "hidden", zIndex: 2 }).addClass(Y ? "highcharts-tracker-area" : "highcharts-tracker-line").add(A.group), q.styledMode || A.tracker.attr({ "stroke-linecap": "round", "stroke-linejoin": "round", stroke: gt, fill: Y ? gt : "none", "stroke-width": A.graph.strokeWidth() + (Y ? 0 : 2 * nt) }), [A.tracker, A.markerGroup, A.dataLabelsGroup].forEach(function(dt) {
- dt && (dt.addClass("highcharts-tracker").on("mouseover", ct).on("mouseout", function(ht) {
- it.onTrackerMouseOut(ht);
- }), H.cursor && !q.styledMode && dt.css({ cursor: H.cursor }), O) && dt.on("touchstart", ct);
- })), P(this, "afterDrawTracker");
- }, Q.prototype.addPoint = function(A, H, Y, Z, q) {
- var it = this.options, et = this.data, nt = this.chart, rt = this.xAxis;
- rt = rt && rt.hasNames && rt.names;
- var ct = it.data, gt = this.xData, dt;
- H = m(H, !0);
- var ht = { series: this };
- this.pointClass.prototype.applyOptions.apply(
- ht,
- [A]
- );
- var at = ht.x, J = gt.length;
- if (this.requireSorting && at < gt[J - 1])
- for (dt = !0; J && gt[J - 1] > at; )
- J--;
- this.updateParallelArrays(ht, "splice", J, 0, 0), this.updateParallelArrays(ht, J), rt && ht.name && (rt[at] = ht.name), ct.splice(J, 0, A), dt && (this.data.splice(J, 0, null), this.processData()), it.legendType === "point" && this.generatePoints(), Y && (et[0] && et[0].remove ? et[0].remove(!1) : (et.shift(), this.updateParallelArrays(ht, "shift"), ct.shift())), q !== !1 && P(this, "addPoint", { point: ht }), this.isDirtyData = this.isDirty = !0, H && nt.redraw(Z);
- }, Q.prototype.removePoint = function(A, H, Y) {
- var Z = this, q = Z.data, it = q[A], et = Z.points, nt = Z.chart, rt = function() {
- et && et.length === q.length && et.splice(A, 1), q.splice(A, 1), Z.options.data.splice(A, 1), Z.updateParallelArrays(it || { series: Z }, "splice", A, 1), it && it.destroy(), Z.isDirty = !0, Z.isDirtyData = !0, H && nt.redraw();
- };
- f(Y, nt), H = m(H, !0), it ? it.firePointEvent("remove", null, rt) : rt();
- }, Q.prototype.remove = function(A, H, Y, Z) {
- function q() {
- it.destroy(Z), et.isDirtyLegend = et.isDirtyBox = !0, et.linkSeries(), m(A, !0) && et.redraw(H);
- }
- var it = this, et = it.chart;
- Y !== !1 ? P(
- it,
- "remove",
- null,
- q
- ) : q();
- }, Q.prototype.update = function(A, H) {
- A = u(A, this.userOptions), P(this, "update", { options: A });
- var Y = this, Z = Y.chart, q = Y.userOptions, it = Y.initialType || Y.type, et = Z.options.plotOptions, nt = b[it].prototype, rt = Y.finishedAnimating && { animation: !1 }, ct = {}, gt, dt = ["eventOptions", "navigatorSeries", "baseSeries"], ht = A.type || q.type || Z.options.chart.type, at = !(this.hasDerivedData || ht && ht !== this.type || typeof A.pointStart < "u" || typeof A.pointInterval < "u" || typeof A.relativeXValue < "u" || Y.hasOptionChanged("dataGrouping") || Y.hasOptionChanged("pointStart") || Y.hasOptionChanged("pointInterval") || Y.hasOptionChanged("pointIntervalUnit") || Y.hasOptionChanged("keys"));
- if (ht = ht || it, at && (dt.push("data", "isDirtyData", "points", "processedXData", "processedYData", "xIncrement", "cropped", "_hasPointMarkers", "_hasPointLabels", "clips", "nodes", "layout", "mapMap", "mapData", "minY", "maxY", "minX", "maxX"), A.visible !== !1 && dt.push("area", "graph"), Y.parallelArrays.forEach(function(tt) {
- dt.push(tt + "Data");
- }), A.data && (A.dataSorting && s(Y.options.dataSorting, A.dataSorting), this.setData(A.data, !1))), A = X(q, rt, { index: typeof q.index > "u" ? Y.index : q.index, pointStart: m(et && et.series && et.series.pointStart, q.pointStart, Y.xData[0]) }, !at && { data: Y.options.data }, A), at && A.data && (A.data = Y.options.data), dt = ["group", "markerGroup", "dataLabelsGroup", "transformGroup"].concat(dt), dt.forEach(function(tt) {
- dt[tt] = Y[tt], delete Y[tt];
- }), et = !1, b[ht]) {
- if (et = ht !== Y.type, Y.remove(!1, !1, !1, !0), et)
- if (Object.setPrototypeOf)
- Object.setPrototypeOf(Y, b[ht].prototype);
- else {
- rt = Object.hasOwnProperty.call(Y, "hcEvents") && Y.hcEvents;
- for (gt in nt)
- Y[gt] = void 0;
- s(Y, b[ht].prototype), rt ? Y.hcEvents = rt : delete Y.hcEvents;
- }
- } else
- t(17, !0, Z, { missingModuleFor: ht });
- if (dt.forEach(function(tt) {
- Y[tt] = dt[tt];
- }), Y.init(Z, A), at && this.points) {
- var J = Y.options;
- J.visible === !1 ? (ct.graphic = 1, ct.dataLabel = 1) : Y._hasPointLabels || (A = J.marker, nt = J.dataLabels, !A || A.enabled !== !1 && (q.marker && q.marker.symbol) === A.symbol || (ct.graphic = 1), nt && nt.enabled === !1 && (ct.dataLabel = 1)), this.points.forEach(function(tt) {
- tt && tt.series && (tt.resolveColor(), Object.keys(ct).length && tt.destroyElements(ct), J.showInLegend === !1 && tt.legendItem && Z.legend.destroyItem(tt));
- }, this);
- }
- Y.initialType = it, Z.linkSeries(), et && Y.linkedSeries.length && (Y.isDirtyData = !0), P(this, "afterUpdate"), m(H, !0) && Z.redraw(at ? void 0 : !1);
- }, Q.prototype.setName = function(A) {
- this.name = this.options.name = this.userOptions.name = A, this.chart.isDirtyLegend = !0;
- }, Q.prototype.hasOptionChanged = function(A) {
- var H = this.options[A], Y = this.chart.options.plotOptions, Z = this.userOptions[A];
- return Z ? H !== Z : H !== m(
- Y && Y[this.type] && Y[this.type][A],
- Y && Y.series && Y.series[A],
- H
- );
- }, Q.prototype.onMouseOver = function() {
- var A = this.chart, H = A.hoverSeries;
- A.pointer.setHoverChartIndex(), H && H !== this && H.onMouseOut(), this.options.events.mouseOver && P(this, "mouseOver"), this.setState("hover"), A.hoverSeries = this;
- }, Q.prototype.onMouseOut = function() {
- var A = this.options, H = this.chart, Y = H.tooltip, Z = H.hoverPoint;
- H.hoverSeries = null, Z && Z.onMouseOut(), this && A.events.mouseOut && P(this, "mouseOut"), !Y || this.stickyTracking || Y.shared && !this.noSharedTooltip || Y.hide(), H.series.forEach(function(q) {
- q.setState(
- "",
- !0
- );
- });
- }, Q.prototype.setState = function(A, H) {
- var Y = this, Z = Y.options, q = Y.graph, it = Z.inactiveOtherPoints, et = Z.states, nt = m(et[A || "normal"] && et[A || "normal"].animation, Y.chart.options.chart.animation), rt = Z.lineWidth, ct = 0, gt = Z.opacity;
- if (A = A || "", Y.state !== A && ([Y.group, Y.markerGroup, Y.dataLabelsGroup].forEach(function(dt) {
- dt && (Y.state && dt.removeClass("highcharts-series-" + Y.state), A && dt.addClass("highcharts-series-" + A));
- }), Y.state = A, !Y.chart.styledMode)) {
- if (et[A] && et[A].enabled === !1)
- return;
- if (A && (rt = et[A].lineWidth || rt + (et[A].lineWidthPlus || 0), gt = m(et[A].opacity, gt)), q && !q.dashstyle)
- for (Z = { "stroke-width": rt }, q.animate(Z, nt); Y["zone-graph-" + ct]; )
- Y["zone-graph-" + ct].animate(Z, nt), ct += 1;
- it || [Y.group, Y.markerGroup, Y.dataLabelsGroup, Y.labelBySeries].forEach(function(dt) {
- dt && dt.animate({ opacity: gt }, nt);
- });
- }
- H && it && Y.points && Y.setAllPointsToState(A || void 0);
- }, Q.prototype.setAllPointsToState = function(A) {
- this.points.forEach(function(H) {
- H.setState && H.setState(A);
- });
- }, Q.prototype.setVisible = function(A, H) {
- var Y = this, Z = Y.chart, q = Y.legendItem, it = Z.options.chart.ignoreHiddenSeries, et = Y.visible, nt = (Y.visible = A = Y.options.visible = Y.userOptions.visible = typeof A > "u" ? !et : A) ? "show" : "hide";
- ["group", "dataLabelsGroup", "markerGroup", "tracker", "tt"].forEach(function(rt) {
- Y[rt] && Y[rt][nt]();
- }), (Z.hoverSeries === Y || (Z.hoverPoint && Z.hoverPoint.series) === Y) && Y.onMouseOut(), q && Z.legend.colorizeItem(Y, A), Y.isDirty = !0, Y.options.stacking && Z.series.forEach(function(rt) {
- rt.options.stacking && rt.visible && (rt.isDirty = !0);
- }), Y.linkedSeries.forEach(function(rt) {
- rt.setVisible(A, !1);
- }), it && (Z.isDirtyBox = !0), P(Y, nt), H !== !1 && Z.redraw();
- }, Q.prototype.show = function() {
- this.setVisible(!0);
- }, Q.prototype.hide = function() {
- this.setVisible(!1);
- }, Q.prototype.select = function(A) {
- this.selected = A = this.options.selected = typeof A > "u" ? !this.selected : A, this.checkbox && (this.checkbox.checked = A), P(this, A ? "select" : "unselect");
- }, Q.prototype.shouldShowTooltip = function(A, H, Y) {
- return Y === void 0 && (Y = {}), Y.series = this, Y.visiblePlotOnly = !0, this.chart.isInsidePlot(A, H, Y);
- }, Q.defaultOptions = F, Q;
- }(), s(y.prototype, { axisTypes: [
- "xAxis",
- "yAxis"
- ], coll: "series", colorCounter: 0, cropShoulder: 1, directTouch: !1, drawLegendSymbol: G.drawLineMarker, isCartesian: !0, kdAxisArray: ["clientX", "plotY"], parallelArrays: ["x", "y"], pointClass: V, requireSorting: !0, sorted: !0 }), B.series = y, y;
- }), C(o, "Extensions/ScrollablePlotArea.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Axis/Axis.js"], o["Core/Chart/Chart.js"], o["Core/Series/Series.js"], o["Core/Renderer/RendererRegistry.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V) {
- var F = y.stop, B = V.addEvent, j = V.createElement, w = V.merge, x = V.pick;
- B(_, "afterSetChartSize", function(f) {
- var l = this.options.chart.scrollablePlotArea, T = l && l.minWidth;
- if (l = l && l.minHeight, !this.renderer.forExport) {
- if (T) {
- if (this.scrollablePixelsX = T = Math.max(0, T - this.chartWidth)) {
- this.scrollablePlotBox = this.renderer.scrollablePlotBox = w(this.plotBox), this.plotBox.width = this.plotWidth += T, this.inverted ? this.clipBox.height += T : this.clipBox.width += T;
- var O = { 1: { name: "right", value: T } };
- }
- } else
- l && (this.scrollablePixelsY = T = Math.max(
- 0,
- l - this.chartHeight
- )) && (this.scrollablePlotBox = this.renderer.scrollablePlotBox = w(this.plotBox), this.plotBox.height = this.plotHeight += T, this.inverted ? this.clipBox.width += T : this.clipBox.height += T, O = { 2: { name: "bottom", value: T } });
- O && !f.skipAxes && this.axes.forEach(function(R) {
- O[R.side] ? R.getPlotLinePath = function() {
- var k = O[R.side].name, b = this[k];
- this[k] = b - O[R.side].value;
- var S = N.prototype.getPlotLinePath.apply(this, arguments);
- return this[k] = b, S;
- } : (R.setAxisSize(), R.setAxisTranslation());
- });
- }
- }), B(_, "render", function() {
- this.scrollablePixelsX || this.scrollablePixelsY ? (this.setUpScrolling && this.setUpScrolling(), this.applyFixed()) : this.fixedDiv && this.applyFixed();
- }), _.prototype.setUpScrolling = function() {
- var f = this, l = { WebkitOverflowScrolling: "touch", overflowX: "hidden", overflowY: "hidden" };
- this.scrollablePixelsX && (l.overflowX = "auto"), this.scrollablePixelsY && (l.overflowY = "auto"), this.scrollingParent = j("div", { className: "highcharts-scrolling-parent" }, { position: "relative" }, this.renderTo), this.scrollingContainer = j(
- "div",
- { className: "highcharts-scrolling" },
- l,
- this.scrollingParent
- ), B(this.scrollingContainer, "scroll", function() {
- f.pointer && delete f.pointer.chartPosition;
- }), this.innerContainer = j("div", { className: "highcharts-inner-container" }, null, this.scrollingContainer), this.innerContainer.appendChild(this.container), this.setUpScrolling = null;
- }, _.prototype.moveFixedElements = function() {
- var f = this.container, l = this.fixedRenderer, T = ".highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-drillup-button .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" "), O;
- this.scrollablePixelsX && !this.inverted ? O = ".highcharts-yaxis" : this.scrollablePixelsX && this.inverted || this.scrollablePixelsY && !this.inverted ? O = ".highcharts-xaxis" : this.scrollablePixelsY && this.inverted && (O = ".highcharts-yaxis"), O && T.push(O + ":not(.highcharts-radial-axis)", O + "-labels:not(.highcharts-radial-axis-labels)"), T.forEach(function(R) {
- [].forEach.call(f.querySelectorAll(R), function(k) {
- (k.namespaceURI === l.SVG_NS ? l.box : l.box.parentNode).appendChild(k), k.style.pointerEvents = "auto";
- });
- });
- }, _.prototype.applyFixed = function() {
- var f = !this.fixedDiv, l = this.options.chart, T = l.scrollablePlotArea, O = G.getRendererType();
- f ? (this.fixedDiv = j("div", { className: "highcharts-fixed" }, { position: "absolute", overflow: "hidden", pointerEvents: "none", zIndex: (l.style && l.style.zIndex || 0) + 2, top: 0 }, null, !0), this.scrollingContainer && this.scrollingContainer.parentNode.insertBefore(this.fixedDiv, this.scrollingContainer), this.renderTo.style.overflow = "visible", this.fixedRenderer = l = new O(
- this.fixedDiv,
- this.chartWidth,
- this.chartHeight,
- this.options.chart.style
- ), this.scrollableMask = l.path().attr({ fill: this.options.chart.backgroundColor || "#fff", "fill-opacity": x(T.opacity, 0.85), zIndex: -1 }).addClass("highcharts-scrollable-mask").add(), B(this, "afterShowResetZoom", this.moveFixedElements), B(this, "afterDrilldown", this.moveFixedElements), B(this, "afterLayOutTitles", this.moveFixedElements)) : this.fixedRenderer.setSize(this.chartWidth, this.chartHeight), (this.scrollableDirty || f) && (this.scrollableDirty = !1, this.moveFixedElements()), l = this.chartWidth + (this.scrollablePixelsX || 0), O = this.chartHeight + (this.scrollablePixelsY || 0), F(this.container), this.container.style.width = l + "px", this.container.style.height = O + "px", this.renderer.boxWrapper.attr({ width: l, height: O, viewBox: [0, 0, l, O].join(" ") }), this.chartBackground.attr({ width: l, height: O }), this.scrollingContainer.style.height = this.chartHeight + "px", f && (T.scrollPositionX && (this.scrollingContainer.scrollLeft = this.scrollablePixelsX * T.scrollPositionX), T.scrollPositionY && (this.scrollingContainer.scrollTop = this.scrollablePixelsY * T.scrollPositionY)), O = this.axisOffset, f = this.plotTop - O[0] - 1, T = this.plotLeft - O[3] - 1, l = this.plotTop + this.plotHeight + O[2] + 1, O = this.plotLeft + this.plotWidth + O[1] + 1;
- var R = this.plotLeft + this.plotWidth - (this.scrollablePixelsX || 0), k = this.plotTop + this.plotHeight - (this.scrollablePixelsY || 0);
- f = this.scrollablePixelsX ? [["M", 0, f], ["L", this.plotLeft - 1, f], ["L", this.plotLeft - 1, l], ["L", 0, l], ["Z"], ["M", R, f], ["L", this.chartWidth, f], ["L", this.chartWidth, l], ["L", R, l], ["Z"]] : this.scrollablePixelsY ? [["M", T, 0], ["L", T, this.plotTop - 1], ["L", O, this.plotTop - 1], ["L", O, 0], ["Z"], ["M", T, k], ["L", T, this.chartHeight], ["L", O, this.chartHeight], ["L", O, k], ["Z"]] : [["M", 0, 0]], this.redrawTrigger !== "adjustHeight" && this.scrollableMask.attr({ d: f });
- }, B(N, "afterInit", function() {
- this.chart.scrollableDirty = !0;
- }), B(U, "show", function() {
- this.chart.scrollableDirty = !0;
- });
- }), C(o, "Core/Axis/StackingAxis.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Axis/Axis.js"], o["Core/Utilities.js"]], function(y, N, _) {
- var U = y.getDeferredAnimation, G = _.addEvent, V = _.destroyObjectProperties, F = _.fireEvent, B = _.isNumber, j = _.objectEach, w;
- return function(x) {
- function f() {
- var R = this.stacking;
- if (R) {
- var k = R.stacks;
- j(k, function(b, S) {
- V(b), k[S] = null;
- }), R && R.stackTotalGroup && R.stackTotalGroup.destroy();
- }
- }
- function l() {
- this.stacking || (this.stacking = new O(this));
- }
- var T = [];
- x.compose = function(R) {
- return T.indexOf(R) === -1 && (T.push(R), G(R, "init", l), G(R, "destroy", f)), R;
- };
- var O = function() {
- function R(k) {
- this.oldStacks = {}, this.stacks = {}, this.stacksTouched = 0, this.axis = k;
- }
- return R.prototype.buildStacks = function() {
- var k = this.axis, b = k.series, S = k.options.reversedStacks, v = b.length, h;
- if (!k.isXAxis) {
- for (this.usePercentage = !1, h = v; h--; ) {
- var c = b[S ? h : v - h - 1];
- c.setStackedPoints(), c.setGroupedPoints();
- }
- for (h = 0; h < v; h++)
- b[h].modifyStacks();
- F(k, "afterBuildStacks");
- }
- }, R.prototype.cleanStacks = function() {
- if (!this.axis.isXAxis) {
- if (this.oldStacks)
- var k = this.stacks = this.oldStacks;
- j(k, function(b) {
- j(b, function(S) {
- S.cumulative = S.total;
- });
- });
- }
- }, R.prototype.resetStacks = function() {
- var k = this, b = k.stacks;
- k.axis.isXAxis || j(b, function(S) {
- j(
- S,
- function(v, h) {
- B(v.touched) && v.touched < k.stacksTouched ? (v.destroy(), delete S[h]) : (v.total = null, v.cumulative = null);
- }
- );
- });
- }, R.prototype.renderStackTotals = function() {
- var k = this.axis, b = k.chart, S = b.renderer, v = this.stacks;
- k = U(b, k.options.stackLabels && k.options.stackLabels.animation || !1);
- var h = this.stackTotalGroup = this.stackTotalGroup || S.g("stack-labels").attr({ visibility: "visible", zIndex: 6, opacity: 0 }).add();
- h.translate(b.plotLeft, b.plotTop), j(v, function(c) {
- j(c, function(u) {
- u.render(h);
- });
- }), h.animate(
- { opacity: 1 },
- k
- );
- }, R;
- }();
- x.Additions = O;
- }(w || (w = {})), w;
- }), C(o, "Extensions/Stacking.js", [o["Core/Axis/Axis.js"], o["Core/Chart/Chart.js"], o["Core/FormatUtilities.js"], o["Core/Globals.js"], o["Core/Series/Series.js"], o["Core/Axis/StackingAxis.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V, F) {
- var B = _.format, j = F.correctFloat, w = F.defined, x = F.destroyObjectProperties, f = F.isArray, l = F.isNumber, T = F.objectEach, O = F.pick, R = function() {
- function k(b, S, v, h, c) {
- var u = b.chart.inverted;
- this.axis = b, this.isNegative = v, this.options = S = S || {}, this.x = h, this.total = null, this.points = {}, this.hasValidPoints = !1, this.stack = c, this.rightCliff = this.leftCliff = 0, this.alignOptions = { align: S.align || (u ? v ? "left" : "right" : "center"), verticalAlign: S.verticalAlign || (u ? "middle" : v ? "bottom" : "top"), y: S.y, x: S.x }, this.textAlign = S.textAlign || (u ? v ? "right" : "left" : "center");
- }
- return k.prototype.destroy = function() {
- x(this, this.axis);
- }, k.prototype.render = function(b) {
- var S = this.axis.chart, v = this.options, h = v.format;
- h = h ? B(h, this, S) : v.formatter.call(this), this.label ? this.label.attr({
- text: h,
- visibility: "hidden"
- }) : (this.label = S.renderer.label(h, null, null, v.shape, null, null, v.useHTML, !1, "stack-labels"), h = { r: v.borderRadius || 0, text: h, rotation: v.rotation, padding: O(v.padding, 5), visibility: "hidden" }, S.styledMode || (h.fill = v.backgroundColor, h.stroke = v.borderColor, h["stroke-width"] = v.borderWidth, this.label.css(v.style)), this.label.attr(h), this.label.added || this.label.add(b)), this.label.labelrank = S.plotSizeY;
- }, k.prototype.setOffset = function(b, S, v, h, c) {
- var u = this.axis, i = u.chart;
- h = u.translate(u.stacking.usePercentage ? 100 : h || this.total, 0, 0, 0, 1), v = u.translate(v || 0), v = w(h) && Math.abs(h - v), b = O(c, i.xAxis[0].translate(this.x)) + b, u = w(h) && this.getStackBox(i, this, b, h, S, v, u), S = this.label, v = this.isNegative, b = O(this.options.overflow, "justify") === "justify";
- var p = this.textAlign;
- S && u && (c = S.getBBox(), h = S.padding, p = p === "left" ? i.inverted ? -h : h : p === "right" ? c.width : i.inverted && p === "center" ? c.width / 2 : i.inverted ? v ? c.width + h : -h : c.width / 2, v = i.inverted ? c.height / 2 : v ? -h : c.height, this.alignOptions.x = O(this.options.x, 0), this.alignOptions.y = O(this.options.y, 0), u.x -= p, u.y -= v, S.align(this.alignOptions, null, u), i.isInsidePlot(S.alignAttr.x + p - this.alignOptions.x, S.alignAttr.y + v - this.alignOptions.y) ? S.show() : (S.alignAttr.y = -9999, b = !1), b && G.prototype.justifyDataLabel.call(this.axis, S, this.alignOptions, S.alignAttr, c, u), S.attr({ x: S.alignAttr.x, y: S.alignAttr.y }), O(!b && this.options.crop, !0) && ((i = l(S.x) && l(S.y) && i.isInsidePlot(S.x - h + S.width, S.y) && i.isInsidePlot(S.x + h, S.y)) || S.hide()));
- }, k.prototype.getStackBox = function(b, S, v, h, c, u, i) {
- var p = S.axis.reversed, a = b.inverted, t = i.height + i.pos - (a ? b.plotLeft : b.plotTop);
- return S = S.isNegative && !p || !S.isNegative && p, { x: a ? S ? h - i.right : h - u + i.pos - b.plotLeft : v + b.xAxis[0].transB - b.plotLeft, y: a ? i.height - v - c : S ? t - h - u : t - h, width: a ? u : c, height: a ? c : u };
- }, k;
- }();
- return N.prototype.getStacks = function() {
- var k = this, b = k.inverted;
- k.yAxis.forEach(function(S) {
- S.stacking && S.stacking.stacks && S.hasVisibleSeries && (S.stacking.oldStacks = S.stacking.stacks);
- }), k.series.forEach(function(S) {
- var v = S.xAxis && S.xAxis.options || {};
- !S.options.stacking || S.visible !== !0 && k.options.chart.ignoreHiddenSeries !== !1 || (S.stackKey = [S.type, O(S.options.stack, ""), b ? v.top : v.left, b ? v.height : v.width].join());
- });
- }, V.compose(y), G.prototype.setGroupedPoints = function() {
- var k = this.yAxis.stacking;
- this.options.centerInCategory && (this.is("column") || this.is("columnrange")) && !this.options.stacking && 1 < this.chart.series.length ? G.prototype.setStackedPoints.call(this, "group") : k && T(k.stacks, function(b, S) {
- S.slice(-5) === "group" && (T(b, function(v) {
- return v.destroy();
- }), delete k.stacks[S]);
- });
- }, G.prototype.setStackedPoints = function(k) {
- var b = k || this.options.stacking;
- if (b && (this.visible === !0 || this.chart.options.chart.ignoreHiddenSeries === !1)) {
- var S = this.processedXData, v = this.processedYData, h = [], c = v.length, u = this.options, i = u.threshold, p = O(u.startFromThreshold && i, 0);
- u = u.stack, k = k ? this.type + "," + b : this.stackKey;
- var a = "-" + k, t = this.negStacks, s = this.yAxis, n = s.stacking.stacks, P = s.stacking.oldStacks, D, I;
- for (s.stacking.stacksTouched += 1, I = 0; I < c; I++) {
- var W = S[I], E = v[I], X = this.getStackIndicator(
- X,
- W,
- this.index
- ), g = X.key, m = (D = t && E < (p ? 0 : i)) ? a : k;
- n[m] || (n[m] = {}), n[m][W] || (P[m] && P[m][W] ? (n[m][W] = P[m][W], n[m][W].total = null) : n[m][W] = new R(s, s.options.stackLabels, D, W, u)), m = n[m][W], E !== null ? (m.points[g] = m.points[this.index] = [O(m.cumulative, p)], w(m.cumulative) || (m.base = g), m.touched = s.stacking.stacksTouched, 0 < X.index && this.singleStacks === !1 && (m.points[g][0] = m.points[this.index + "," + W + ",0"][0])) : m.points[g] = m.points[this.index] = null, b === "percent" ? (D = D ? k : a, t && n[D] && n[D][W] ? (D = n[D][W], m.total = D.total = Math.max(D.total, m.total) + Math.abs(E) || 0) : m.total = j(m.total + (Math.abs(E) || 0))) : b === "group" ? (f(E) && (E = E[0]), E !== null && (m.total = (m.total || 0) + 1)) : m.total = j(m.total + (E || 0)), m.cumulative = b === "group" ? (m.total || 1) - 1 : O(m.cumulative, p) + (E || 0), E !== null && (m.points[g].push(m.cumulative), h[I] = m.cumulative, m.hasValidPoints = !0);
- }
- b === "percent" && (s.stacking.usePercentage = !0), b !== "group" && (this.stackedYData = h), s.stacking.oldStacks = {};
- }
- }, G.prototype.modifyStacks = function() {
- var k = this, b = k.stackKey, S = k.yAxis.stacking.stacks, v = k.processedXData, h, c = k.options.stacking;
- k[c + "Stacker"] && [b, "-" + b].forEach(function(u) {
- for (var i = v.length, p, a; i--; )
- p = v[i], h = k.getStackIndicator(h, p, k.index, u), (a = (p = S[u] && S[u][p]) && p.points[h.key]) && k[c + "Stacker"](a, p, i);
- });
- }, G.prototype.percentStacker = function(k, b, S) {
- b = b.total ? 100 / b.total : 0, k[0] = j(k[0] * b), k[1] = j(k[1] * b), this.stackedYData[S] = k[1];
- }, G.prototype.getStackIndicator = function(k, b, S, v) {
- return !w(k) || k.x !== b || v && k.key !== v ? k = { x: b, index: 0, key: v } : k.index++, k.key = [S, b, k.index].join(), k;
- }, U.StackItem = R, U.StackItem;
- }), C(o, "Series/Line/LineSeries.js", [o["Core/Series/Series.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, _) {
- var U = this && this.__extends || function() {
- var F = function(B, j) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, x) {
- w.__proto__ = x;
- } || function(w, x) {
- for (var f in x)
- x.hasOwnProperty(f) && (w[f] = x[f]);
- }, F(B, j);
- };
- return function(B, j) {
- function w() {
- this.constructor = B;
- }
- F(B, j), B.prototype = j === null ? Object.create(j) : (w.prototype = j.prototype, new w());
- };
- }(), G = _.defined, V = _.merge;
- return _ = function(F) {
- function B() {
- var j = F !== null && F.apply(this, arguments) || this;
- return j.data = void 0, j.options = void 0, j.points = void 0, j;
- }
- return U(B, F), B.prototype.drawGraph = function() {
- var j = this, w = this.options, x = (this.gappedPath || this.getGraphPath).call(this), f = this.chart.styledMode, l = [["graph", "highcharts-graph"]];
- f || l[0].push(w.lineColor || this.color || "#cccccc", w.dashStyle), l = j.getZonesGraphs(l), l.forEach(function(T, O) {
- var R = T[0], k = j[R], b = k ? "animate" : "attr";
- k ? (k.endX = j.preventGraphAnimation ? null : x.xMap, k.animate({ d: x })) : x.length && (j[R] = k = j.chart.renderer.path(x).addClass(T[1]).attr({ zIndex: 1 }).add(j.group)), k && !f && (R = { stroke: T[2], "stroke-width": w.lineWidth, fill: j.fillGraph && j.color || "none" }, T[3] ? R.dashstyle = T[3] : w.linecap !== "square" && (R["stroke-linecap"] = R["stroke-linejoin"] = "round"), k[b](R).shadow(2 > O && w.shadow)), k && (k.startX = x.xMap, k.isArea = x.isArea);
- });
- }, B.prototype.getGraphPath = function(j, w, x) {
- var f = this, l = f.options, T = [], O = [], R, k = l.step;
- j = j || f.points;
- var b = j.reversed;
- return b && j.reverse(), (k = { right: 1, center: 2 }[k] || k && 3) && b && (k = 4 - k), j = this.getValidPoints(j, !1, !(l.connectNulls && !w && !x)), j.forEach(function(S, v) {
- var h = S.plotX, c = S.plotY, u = j[v - 1];
- (S.leftCliff || u && u.rightCliff) && !x && (R = !0), S.isNull && !G(w) && 0 < v ? R = !l.connectNulls : S.isNull && !w ? R = !0 : (v === 0 || R ? v = [["M", S.plotX, S.plotY]] : f.getPointSpline ? v = [f.getPointSpline(j, S, v)] : k ? (v = k === 1 ? [["L", u.plotX, c]] : k === 2 ? [["L", (u.plotX + h) / 2, u.plotY], ["L", (u.plotX + h) / 2, c]] : [["L", h, u.plotY]], v.push(["L", h, c])) : v = [["L", h, c]], O.push(S.x), k && (O.push(S.x), k === 2 && O.push(S.x)), T.push.apply(T, v), R = !1);
- }), T.xMap = O, f.graphPath = T;
- }, B.prototype.getZonesGraphs = function(j) {
- return this.zones.forEach(function(w, x) {
- x = ["zone-graph-" + x, "highcharts-graph highcharts-zone-graph-" + x + " " + (w.className || "")], this.chart.styledMode || x.push(w.color || this.color, w.dashStyle || this.options.dashStyle), j.push(x);
- }, this), j;
- }, B.defaultOptions = V(y.defaultOptions, {}), B;
- }(y), N.registerSeriesType("line", _), _;
- }), C(o, "Series/Area/AreaSeries.js", [
- o["Core/Color/Color.js"],
- o["Core/Legend/LegendSymbol.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Utilities.js"]
- ], function(y, N, _, U) {
- var G = this && this.__extends || function() {
- var x = function(f, l) {
- return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(T, O) {
- T.__proto__ = O;
- } || function(T, O) {
- for (var R in O)
- O.hasOwnProperty(R) && (T[R] = O[R]);
- }, x(f, l);
- };
- return function(f, l) {
- function T() {
- this.constructor = f;
- }
- x(f, l), f.prototype = l === null ? Object.create(l) : (T.prototype = l.prototype, new T());
- };
- }(), V = y.parse, F = _.seriesTypes.line;
- y = U.extend;
- var B = U.merge, j = U.objectEach, w = U.pick;
- return U = function(x) {
- function f() {
- var l = x !== null && x.apply(this, arguments) || this;
- return l.data = void 0, l.options = void 0, l.points = void 0, l;
- }
- return G(f, x), f.prototype.drawGraph = function() {
- this.areaPath = [], x.prototype.drawGraph.apply(this);
- var l = this, T = this.areaPath, O = this.options, R = [["area", "highcharts-area", this.color, O.fillColor]];
- this.zones.forEach(function(k, b) {
- R.push(["zone-area-" + b, "highcharts-area highcharts-zone-area-" + b + " " + k.className, k.color || l.color, k.fillColor || O.fillColor]);
- }), R.forEach(function(k) {
- var b = k[0], S = l[b], v = S ? "animate" : "attr", h = {};
- S ? (S.endX = l.preventGraphAnimation ? null : T.xMap, S.animate({ d: T })) : (h.zIndex = 0, S = l[b] = l.chart.renderer.path(T).addClass(k[1]).add(l.group), S.isArea = !0), l.chart.styledMode || (h.fill = w(k[3], V(k[2]).setOpacity(w(O.fillOpacity, 0.75)).get())), S[v](h), S.startX = T.xMap, S.shiftUnit = O.step ? 2 : 1;
- });
- }, f.prototype.getGraphPath = function(l) {
- var T = F.prototype.getGraphPath, O = this.options, R = O.stacking, k = this.yAxis, b, S = [], v = [], h = this.index, c = k.stacking.stacks[this.stackKey], u = O.threshold, i = Math.round(k.getThreshold(O.threshold));
- O = w(O.connectNulls, R === "percent");
- var p = function(n, P, D) {
- var I = l[n];
- n = R && c[I.x].points[h];
- var W = I[D + "Null"] || 0;
- if (D = I[D + "Cliff"] || 0, I = !0, D || W) {
- var E = (W ? n[0] : n[1]) + D, X = n[0] + D;
- I = !!W;
- } else
- !R && l[P] && l[P].isNull && (E = X = u);
- typeof E < "u" && (v.push({ plotX: t, plotY: E === null ? i : k.getThreshold(E), isNull: I, isCliff: !0 }), S.push({ plotX: t, plotY: X === null ? i : k.getThreshold(X), doCurve: !1 }));
- };
- for (l = l || this.points, R && (l = this.getStackPoints(l)), b = 0; b < l.length; b++) {
- R || (l[b].leftCliff = l[b].rightCliff = l[b].leftNull = l[b].rightNull = void 0);
- var a = l[b].isNull, t = w(l[b].rectPlotX, l[b].plotX), s = R ? w(l[b].yBottom, i) : i;
- (!a || O) && (O || p(b, b - 1, "left"), a && !R && O || (v.push(l[b]), S.push({ x: b, plotX: t, plotY: s })), O || p(b, b + 1, "right"));
- }
- return b = T.call(this, v, !0, !0), S.reversed = !0, a = T.call(this, S, !0, !0), (s = a[0]) && s[0] === "M" && (a[0] = ["L", s[1], s[2]]), a = b.concat(a), a.length && a.push(["Z"]), T = T.call(this, v, !1, O), a.xMap = b.xMap, this.areaPath = a, T;
- }, f.prototype.getStackPoints = function(l) {
- var T = this, O = [], R = [], k = this.xAxis, b = this.yAxis, S = b.stacking.stacks[this.stackKey], v = {}, h = b.series, c = h.length, u = b.options.reversedStacks ? 1 : -1, i = h.indexOf(T);
- if (l = l || this.points, this.options.stacking) {
- for (var p = 0; p < l.length; p++)
- l[p].leftNull = l[p].rightNull = void 0, v[l[p].x] = l[p];
- j(S, function(t, s) {
- t.total !== null && R.push(s);
- }), R.sort(function(t, s) {
- return t - s;
- });
- var a = h.map(function(t) {
- return t.visible;
- });
- R.forEach(function(t, s) {
- var n = 0, P, D;
- if (v[t] && !v[t].isNull)
- O.push(v[t]), [-1, 1].forEach(function(W) {
- var E = W === 1 ? "rightNull" : "leftNull", X = 0, g = S[R[s + W]];
- if (g)
- for (var m = i; 0 <= m && m < c; ) {
- var L = h[m].index;
- P = g.points[L], P || (L === T.index ? v[t][E] = !0 : a[m] && (D = S[t].points[L]) && (X -= D[1] - D[0])), m += u;
- }
- v[t][W === 1 ? "rightCliff" : "leftCliff"] = X;
- });
- else {
- for (var I = i; 0 <= I && I < c; ) {
- if (P = S[t].points[h[I].index]) {
- n = P[1];
- break;
- }
- I += u;
- }
- n = w(n, 0), n = b.translate(n, 0, 1, 0, 1), O.push({ isNull: !0, plotX: k.translate(t, 0, 0, 0, 1), x: t, plotY: n, yBottom: n });
- }
- });
- }
- return O;
- }, f.defaultOptions = B(F.defaultOptions, { threshold: 0 }), f;
- }(F), y(U.prototype, {
- singleStacks: !1,
- drawLegendSymbol: N.drawRectangle
- }), _.registerSeriesType("area", U), U;
- }), C(o, "Series/Spline/SplineSeries.js", [o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N) {
- var _ = this && this.__extends || function() {
- var F = function(B, j) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, x) {
- w.__proto__ = x;
- } || function(w, x) {
- for (var f in x)
- x.hasOwnProperty(f) && (w[f] = x[f]);
- }, F(B, j);
- };
- return function(B, j) {
- function w() {
- this.constructor = B;
- }
- F(B, j), B.prototype = j === null ? Object.create(j) : (w.prototype = j.prototype, new w());
- };
- }(), U = y.seriesTypes.line, G = N.merge, V = N.pick;
- return N = function(F) {
- function B() {
- var j = F !== null && F.apply(this, arguments) || this;
- return j.data = void 0, j.options = void 0, j.points = void 0, j;
- }
- return _(B, F), B.prototype.getPointSpline = function(j, w, x) {
- var f = w.plotX || 0, l = w.plotY || 0, T = j[x - 1];
- if (x = j[x + 1], T && !T.isNull && T.doCurve !== !1 && !w.isCliff && x && !x.isNull && x.doCurve !== !1 && !w.isCliff) {
- j = T.plotY || 0;
- var O = x.plotX || 0;
- x = x.plotY || 0;
- var R = 0, k = (1.5 * f + (T.plotX || 0)) / 2.5, b = (1.5 * l + j) / 2.5;
- O = (1.5 * f + O) / 2.5;
- var S = (1.5 * l + x) / 2.5;
- O !== k && (R = (S - b) * (O - f) / (O - k) + l - S), b += R, S += R, b > j && b > l ? (b = Math.max(j, l), S = 2 * l - b) : b < j && b < l && (b = Math.min(j, l), S = 2 * l - b), S > x && S > l ? (S = Math.max(x, l), b = 2 * l - S) : S < x && S < l && (S = Math.min(x, l), b = 2 * l - S), w.rightContX = O, w.rightContY = S;
- }
- return w = ["C", V(T.rightContX, T.plotX, 0), V(T.rightContY, T.plotY, 0), V(k, f, 0), V(b, l, 0), f, l], T.rightContX = T.rightContY = void 0, w;
- }, B.defaultOptions = G(U.defaultOptions), B;
- }(U), y.registerSeriesType("spline", N), N;
- }), C(
- o,
- "Series/AreaSpline/AreaSplineSeries.js",
- [o["Series/Area/AreaSeries.js"], o["Series/Spline/SplineSeries.js"], o["Core/Legend/LegendSymbol.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]],
- function(y, N, _, U, G) {
- var V = this && this.__extends || function() {
- var w = function(x, f) {
- return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(l, T) {
- l.__proto__ = T;
- } || function(l, T) {
- for (var O in T)
- T.hasOwnProperty(O) && (l[O] = T[O]);
- }, w(x, f);
- };
- return function(x, f) {
- function l() {
- this.constructor = x;
- }
- w(x, f), x.prototype = f === null ? Object.create(f) : (l.prototype = f.prototype, new l());
- };
- }(), F = y.prototype, B = G.extend, j = G.merge;
- return G = function(w) {
- function x() {
- var f = w !== null && w.apply(this, arguments) || this;
- return f.data = void 0, f.points = void 0, f.options = void 0, f;
- }
- return V(x, w), x.defaultOptions = j(N.defaultOptions, y.defaultOptions), x;
- }(N), B(G.prototype, { getGraphPath: F.getGraphPath, getStackPoints: F.getStackPoints, drawGraph: F.drawGraph, drawLegendSymbol: _.drawRectangle }), U.registerSeriesType("areaspline", G), G;
- }
- ), C(o, "Series/Column/ColumnSeries.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/Color/Color.js"],
- o["Core/Globals.js"],
- o["Core/Legend/LegendSymbol.js"],
- o["Core/Series/Series.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Utilities.js"]
- ], function(y, N, _, U, G, V, F) {
- var B = this && this.__extends || function() {
- var c = function(u, i) {
- return c = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(p, a) {
- p.__proto__ = a;
- } || function(p, a) {
- for (var t in a)
- a.hasOwnProperty(t) && (p[t] = a[t]);
- }, c(u, i);
- };
- return function(u, i) {
- function p() {
- this.constructor = u;
- }
- c(u, i), u.prototype = i === null ? Object.create(i) : (p.prototype = i.prototype, new p());
- };
- }(), j = y.animObject, w = N.parse, x = _.hasTouch;
- y = _.noop;
- var f = F.clamp, l = F.css, T = F.defined, O = F.extend, R = F.fireEvent, k = F.isArray, b = F.isNumber, S = F.merge, v = F.pick, h = F.objectEach;
- return F = function(c) {
- function u() {
- var i = c !== null && c.apply(this, arguments) || this;
- return i.borderWidth = void 0, i.data = void 0, i.group = void 0, i.options = void 0, i.points = void 0, i;
- }
- return B(u, c), u.prototype.animate = function(i) {
- var p = this, a = this.yAxis, t = p.options, s = this.chart.inverted, n = {}, P = s ? "translateX" : "translateY";
- if (i)
- n.scaleY = 1e-3, i = f(a.toPixels(t.threshold), a.pos, a.pos + a.len), s ? n.translateX = i - a.len : n.translateY = i, p.clipBox && p.setClip(), p.group.attr(n);
- else {
- var D = Number(p.group.attr(P));
- p.group.animate({ scaleY: 1 }, O(j(p.options.animation), { step: function(I, W) {
- p.group && (n[P] = D + W.pos * (a.pos - D), p.group.attr(n));
- } }));
- }
- }, u.prototype.init = function(i, p) {
- c.prototype.init.apply(this, arguments);
- var a = this;
- i = a.chart, i.hasRendered && i.series.forEach(function(t) {
- t.type === a.type && (t.isDirty = !0);
- });
- }, u.prototype.getColumnMetrics = function() {
- var i = this, p = i.options, a = i.xAxis, t = i.yAxis, s = a.options.reversedStacks;
- s = a.reversed && !s || !a.reversed && s;
- var n = {}, P, D = 0;
- p.grouping === !1 ? D = 1 : i.chart.series.forEach(function(X) {
- var g = X.yAxis, m = X.options;
- if (X.type === i.type && (X.visible || !i.chart.options.chart.ignoreHiddenSeries) && t.len === g.len && t.pos === g.pos) {
- if (m.stacking && m.stacking !== "group") {
- P = X.stackKey, typeof n[P] > "u" && (n[P] = D++);
- var L = n[P];
- } else
- m.grouping !== !1 && (L = D++);
- X.columnIndex = L;
- }
- });
- var I = Math.min(Math.abs(a.transA) * (a.ordinal && a.ordinal.slope || p.pointRange || a.closestPointRange || a.tickInterval || 1), a.len), W = I * p.groupPadding, E = (I - 2 * W) / (D || 1);
- return p = Math.min(p.maxPointWidth || a.len, v(p.pointWidth, E * (1 - 2 * p.pointPadding))), i.columnMetrics = { width: p, offset: (E - p) / 2 + (W + ((i.columnIndex || 0) + (s ? 1 : 0)) * E - I / 2) * (s ? -1 : 1), paddedWidth: E, columnCount: D }, i.columnMetrics;
- }, u.prototype.crispCol = function(i, p, a, t) {
- var s = this.chart, n = this.borderWidth, P = -(n % 2 ? 0.5 : 0);
- return n = n % 2 ? 0.5 : 1, s.inverted && s.renderer.isVML && (n += 1), this.options.crisp && (a = Math.round(i + a) + P, i = Math.round(i) + P, a -= i), t = Math.round(p + t) + n, P = 0.5 >= Math.abs(p) && 0.5 < t, p = Math.round(p) + n, t -= p, P && t && (--p, t += 1), { x: i, y: p, width: a, height: t };
- }, u.prototype.adjustForMissingColumns = function(i, p, a, t) {
- var s = this, n = this.options.stacking;
- if (!a.isNull && 1 < t.columnCount) {
- var P = 0, D = 0;
- h(this.yAxis.stacking && this.yAxis.stacking.stacks, function(I) {
- if (typeof a.x == "number" && (I = I[a.x.toString()])) {
- var W = I.points[s.index], E = I.total;
- n ? (W && (P = D), I.hasValidPoints && D++) : k(W) && (P = W[1], D = E || 0);
- }
- }), i = (a.plotX || 0) + ((D - 1) * t.paddedWidth + p) / 2 - p - P * t.paddedWidth;
- }
- return i;
- }, u.prototype.translate = function() {
- var i = this, p = i.chart, a = i.options, t = i.dense = 2 > i.closestPointRange * i.xAxis.transA;
- t = i.borderWidth = v(a.borderWidth, t ? 0 : 1);
- var s = i.xAxis, n = i.yAxis, P = a.threshold, D = i.translatedThreshold = n.getThreshold(P), I = v(a.minPointLength, 5), W = i.getColumnMetrics(), E = W.width, X = i.pointXOffset = W.offset, g = i.dataMin, m = i.dataMax, L = i.barW = Math.max(E, 1 + 2 * t);
- p.inverted && (D -= 0.5), a.pointPadding && (L = Math.ceil(L)), G.prototype.translate.apply(i), i.points.forEach(function(z) {
- var $ = v(z.yBottom, D), Q = 999 + Math.abs($), A = z.plotX || 0;
- Q = f(z.plotY, -Q, n.len + Q);
- var H = Math.min(Q, $), Y = Math.max(Q, $) - H, Z = E, q = A + X, it = L;
- I && Math.abs(Y) < I && (Y = I, A = !n.reversed && !z.negative || n.reversed && z.negative, b(P) && b(m) && z.y === P && m <= P && (n.min || 0) < P && (g !== m || (n.max || 0) <= P) && (A = !A), H = Math.abs(H - D) > I ? $ - I : D - (A ? I : 0)), T(z.options.pointWidth) && (Z = it = Math.ceil(z.options.pointWidth), q -= Math.round((Z - E) / 2)), a.centerInCategory && (q = i.adjustForMissingColumns(q, Z, z, W)), z.barX = q, z.pointWidth = Z, z.tooltipPos = p.inverted ? [f(n.len + n.pos - p.plotLeft - Q, n.pos - p.plotLeft, n.len + n.pos - p.plotLeft), s.len + s.pos - p.plotTop - q - it / 2, Y] : [s.left - p.plotLeft + q + it / 2, f(Q + n.pos - p.plotTop, n.pos - p.plotTop, n.len + n.pos - p.plotTop), Y], z.shapeType = i.pointClass.prototype.shapeType || "rect", z.shapeArgs = i.crispCol.apply(i, z.isNull ? [q, D, it, 0] : [q, H, it, Y]);
- });
- }, u.prototype.drawGraph = function() {
- this.group[this.dense ? "addClass" : "removeClass"]("highcharts-dense-data");
- }, u.prototype.pointAttribs = function(i, p) {
- var a = this.options, t = this.pointAttrToOptions || {}, s = t.stroke || "borderColor", n = t["stroke-width"] || "borderWidth", P = i && i.color || this.color, D = i && i[s] || a[s] || P;
- t = i && i.options.dashStyle || a.dashStyle;
- var I = i && i[n] || a[n] || this[n] || 0, W = v(i && i.opacity, a.opacity, 1);
- if (i && this.zones.length) {
- var E = i.getZone();
- P = i.options.color || E && (E.color || i.nonZonedColor) || this.color, E && (D = E.borderColor || D, t = E.dashStyle || t, I = E.borderWidth || I);
- }
- return p && i && (i = S(a.states[p], i.options.states && i.options.states[p] || {}), p = i.brightness, P = i.color || typeof p < "u" && w(P).brighten(i.brightness).get() || P, D = i[s] || D, I = i[n] || I, t = i.dashStyle || t, W = v(i.opacity, W)), s = { fill: P, stroke: D, "stroke-width": I, opacity: W }, t && (s.dashstyle = t), s;
- }, u.prototype.drawPoints = function() {
- var i = this, p = this.chart, a = i.options, t = p.renderer, s = a.animationLimit || 250, n;
- i.points.forEach(function(P) {
- var D = P.graphic, I = !!D, W = D && p.pointCount < s ? "animate" : "attr";
- b(P.plotY) && P.y !== null ? (n = P.shapeArgs, D && P.hasNewShapeType() && (D = D.destroy()), i.enabledDataSorting && (P.startXPos = i.xAxis.reversed ? -(n && n.width || 0) : i.xAxis.width), D || (P.graphic = D = t[P.shapeType](n).add(P.group || i.group)) && i.enabledDataSorting && p.hasRendered && p.pointCount < s && (D.attr({ x: P.startXPos }), I = !0, W = "animate"), D && I && D[W](S(n)), a.borderRadius && D[W]({ r: a.borderRadius }), p.styledMode || D[W](i.pointAttribs(P, P.selected && "select")).shadow(P.allowShadow !== !1 && a.shadow, null, a.stacking && !a.borderRadius), D && (D.addClass(P.getClassName(), !0), D.attr({ visibility: P.visible ? "inherit" : "hidden" }))) : D && (P.graphic = D.destroy());
- });
- }, u.prototype.drawTracker = function() {
- var i = this, p = i.chart, a = p.pointer, t = function(n) {
- var P = a.getPointFromEvent(n);
- typeof P < "u" && (a.isDirectTouch = !0, P.onMouseOver(n));
- }, s;
- i.points.forEach(function(n) {
- s = k(n.dataLabels) ? n.dataLabels : n.dataLabel ? [n.dataLabel] : [], n.graphic && (n.graphic.element.point = n), s.forEach(function(P) {
- P.div ? P.div.point = n : P.element.point = n;
- });
- }), i._hasTracking || (i.trackerGroups.forEach(function(n) {
- i[n] && (i[n].addClass("highcharts-tracker").on("mouseover", t).on("mouseout", function(P) {
- a.onTrackerMouseOut(P);
- }), x && i[n].on(
- "touchstart",
- t
- ), !p.styledMode && i.options.cursor && i[n].css(l).css({ cursor: i.options.cursor }));
- }), i._hasTracking = !0), R(this, "afterDrawTracker");
- }, u.prototype.remove = function() {
- var i = this, p = i.chart;
- p.hasRendered && p.series.forEach(function(a) {
- a.type === i.type && (a.isDirty = !0);
- }), G.prototype.remove.apply(i, arguments);
- }, u.defaultOptions = S(G.defaultOptions, { borderRadius: 0, centerInCategory: !1, groupPadding: 0.2, marker: null, pointPadding: 0.1, minPointLength: 0, cropThreshold: 50, pointRange: null, states: {
- hover: { halo: !1, brightness: 0.1 },
- select: { color: "#cccccc", borderColor: "#000000" }
- }, dataLabels: { align: void 0, verticalAlign: void 0, y: void 0 }, startFromThreshold: !0, stickyTracking: !1, tooltip: { distance: 6 }, threshold: 0, borderColor: "#ffffff" }), u;
- }(G), O(F.prototype, { cropShoulder: 0, directTouch: !0, drawLegendSymbol: U.drawRectangle, getSymbol: y, negStacks: !0, trackerGroups: ["group", "dataLabelsGroup"] }), V.registerSeriesType("column", F), F;
- }), C(o, "Core/Series/DataLabel.js", [
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/FormatUtilities.js"],
- o["Core/Utilities.js"]
- ], function(y, N, _) {
- var U = y.getDeferredAnimation, G = N.format, V = _.defined, F = _.extend, B = _.fireEvent, j = _.isArray, w = _.merge, x = _.objectEach, f = _.pick, l = _.splat, T;
- return function(O) {
- function R(u, i, p, a, t) {
- var s = this, n = this.chart, P = this.isCartesian && n.inverted, D = this.enabledDataSorting, I = f(u.dlBox && u.dlBox.centerX, u.plotX, -9999), W = f(u.plotY, -9999), E = i.getBBox(), X = p.rotation, g = p.align, m = n.isInsidePlot(I, Math.round(W), { inverted: P, paneCoordinates: !0, series: s }), L = function(A) {
- D && s.xAxis && !z && s.setDataLabelStartPos(
- u,
- i,
- t,
- m,
- A
- );
- }, z = f(p.overflow, D ? "none" : "justify") === "justify", $ = this.visible && u.visible !== !1 && (u.series.forceDL || D && !z || m || f(p.inside, !!this.options.stacking) && a && n.isInsidePlot(I, P ? a.x + 1 : a.y + a.height - 1, { inverted: P, paneCoordinates: !0, series: s }));
- if ($) {
- var Q = n.renderer.fontMetrics(n.styledMode ? void 0 : p.style.fontSize, i).b;
- a = F({ x: P ? this.yAxis.len - W : I, y: Math.round(P ? this.xAxis.len - I : W), width: 0, height: 0 }, a), F(p, { width: E.width, height: E.height }), X ? (z = !1, I = n.renderer.rotCorr(Q, X), I = { x: a.x + (p.x || 0) + a.width / 2 + I.x, y: a.y + (p.y || 0) + { top: 0, middle: 0.5, bottom: 1 }[p.verticalAlign] * a.height }, L(I), i[t ? "attr" : "animate"](I).attr({ align: g }), L = (X + 720) % 360, L = 180 < L && 360 > L, g === "left" ? I.y -= L ? E.height : 0 : g === "center" ? (I.x -= E.width / 2, I.y -= E.height / 2) : g === "right" && (I.x -= E.width, I.y -= L ? 0 : E.height), i.placed = !0, i.alignAttr = I) : (L(a), i.align(p, void 0, a), I = i.alignAttr), z && 0 <= a.height ? this.justifyDataLabel(i, p, I, E, a, t) : f(p.crop, !0) && ($ = n.isInsidePlot(I.x, I.y, { paneCoordinates: !0, series: s }) && n.isInsidePlot(I.x + E.width, I.y + E.height, {
- paneCoordinates: !0,
- series: s
- })), p.shape && !X && i[t ? "attr" : "animate"]({ anchorX: P ? n.plotWidth - u.plotY : u.plotX, anchorY: P ? n.plotHeight - u.plotX : u.plotY });
- }
- t && D && (i.placed = !1), $ || D && !z || (i.hide(!0), i.placed = !1);
- }
- function k(u, i) {
- var p = i.filter;
- return p ? (i = p.operator, u = u[p.property], p = p.value, i === ">" && u > p || i === "<" && u < p || i === ">=" && u >= p || i === "<=" && u <= p || i === "==" && u == p || i === "===" && u === p) : !0;
- }
- function b() {
- var u = this, i = u.chart, p = u.options, a = u.points, t = u.hasRendered || 0, s = i.renderer, n = p.dataLabels, P, D = n.animation;
- if (D = n.defer ? U(
- i,
- D,
- u
- ) : { defer: 0, duration: 0 }, n = v(v(i.options.plotOptions && i.options.plotOptions.series && i.options.plotOptions.series.dataLabels, i.options.plotOptions && i.options.plotOptions[u.type] && i.options.plotOptions[u.type].dataLabels), n), B(this, "drawDataLabels"), j(n) || n.enabled || u._hasPointLabels) {
- var I = u.plotGroup("dataLabelsGroup", "data-labels", t ? "inherit" : "hidden", n.zIndex || 6);
- I.attr({ opacity: +t }), !t && (t = u.dataLabelsGroup) && (u.visible && I.show(!0), t[p.animation ? "animate" : "attr"]({ opacity: 1 }, D)), a.forEach(function(W) {
- P = l(v(n, W.dlOptions || W.options && W.options.dataLabels)), P.forEach(function(E, X) {
- var g = E.enabled && (!W.isNull || W.dataLabelOnNull) && k(W, E), m = W.connectors ? W.connectors[X] : W.connector, L = W.dataLabels ? W.dataLabels[X] : W.dataLabel, z = f(E.distance, W.labelDistance), $ = !L;
- if (g) {
- var Q = W.getLabelConfig(), A = f(E[W.formatPrefix + "Format"], E.format);
- Q = V(A) ? G(A, Q, i) : (E[W.formatPrefix + "Formatter"] || E.formatter).call(Q, E), A = E.style;
- var H = E.rotation;
- i.styledMode || (A.color = f(E.color, A.color, u.color, "#000000"), A.color === "contrast" ? (W.contrastColor = s.getContrast(W.color || u.color), A.color = !V(z) && E.inside || 0 > z || p.stacking ? W.contrastColor : "#000000") : delete W.contrastColor, p.cursor && (A.cursor = p.cursor));
- var Y = { r: E.borderRadius || 0, rotation: H, padding: E.padding, zIndex: 1 };
- i.styledMode || (Y.fill = E.backgroundColor, Y.stroke = E.borderColor, Y["stroke-width"] = E.borderWidth), x(Y, function(Z, q) {
- typeof Z > "u" && delete Y[q];
- });
- }
- !L || g && V(Q) && !!L.div == !!E.useHTML || (W.dataLabel = L = W.dataLabel && W.dataLabel.destroy(), W.dataLabels && (W.dataLabels.length === 1 ? delete W.dataLabels : delete W.dataLabels[X]), X || delete W.dataLabel, m && (W.connector = W.connector.destroy(), W.connectors && (W.connectors.length === 1 ? delete W.connectors : delete W.connectors[X]))), g && V(Q) && (L ? Y.text = Q : (W.dataLabels = W.dataLabels || [], L = W.dataLabels[X] = H ? s.text(Q, 0, -9999, E.useHTML).addClass("highcharts-data-label") : s.label(Q, 0, -9999, E.shape, null, null, E.useHTML, null, "data-label"), X || (W.dataLabel = L), L.addClass(" highcharts-data-label-color-" + W.colorIndex + " " + (E.className || "") + (E.useHTML ? " highcharts-tracker" : ""))), L.options = E, L.attr(Y), i.styledMode || L.css(A).shadow(E.shadow), L.added || L.add(I), E.textPath && !E.useHTML && (L.setTextPath(W.getDataLabelPath && W.getDataLabelPath(L) || W.graphic, E.textPath), W.dataLabelPath && !E.textPath.enabled && (W.dataLabelPath = W.dataLabelPath.destroy())), u.alignDataLabel(W, L, E, null, $));
- });
- });
- }
- B(this, "afterDrawDataLabels");
- }
- function S(u, i, p, a, t, s) {
- var n = this.chart, P = i.align, D = i.verticalAlign, I = u.box ? 0 : u.padding || 0, W = i.x;
- W = W === void 0 ? 0 : W;
- var E = i.y;
- E = E === void 0 ? 0 : E;
- var X = (p.x || 0) + I;
- if (0 > X) {
- P === "right" && 0 <= W ? (i.align = "left", i.inside = !0) : W -= X;
- var g = !0;
- }
- return X = (p.x || 0) + a.width - I, X > n.plotWidth && (P === "left" && 0 >= W ? (i.align = "right", i.inside = !0) : W += n.plotWidth - X, g = !0), X = p.y + I, 0 > X && (D === "bottom" && 0 <= E ? (i.verticalAlign = "top", i.inside = !0) : E -= X, g = !0), X = (p.y || 0) + a.height - I, X > n.plotHeight && (D === "top" && 0 >= E ? (i.verticalAlign = "bottom", i.inside = !0) : E += n.plotHeight - X, g = !0), g && (i.x = W, i.y = E, u.placed = !s, u.align(i, void 0, t)), g;
- }
- function v(u, i) {
- var p = [], a;
- if (j(u) && !j(i))
- p = u.map(function(t) {
- return w(t, i);
- });
- else if (j(i) && !j(u))
- p = i.map(function(t) {
- return w(u, t);
- });
- else if (j(u) || j(i))
- for (a = Math.max(u.length, i.length); a--; )
- p[a] = w(u[a], i[a]);
- else
- p = w(u, i);
- return p;
- }
- function h(u, i, p, a, t) {
- var s = this.chart, n = s.inverted, P = this.xAxis, D = P.reversed, I = n ? i.height / 2 : i.width / 2;
- u = (u = u.pointWidth) ? u / 2 : 0, i.startXPos = n ? t.x : D ? -I - u : P.width - I + u, i.startYPos = n ? D ? this.yAxis.height - I + u : -I - u : t.y, a ? i.visibility === "hidden" && (i.show(), i.attr({ opacity: 0 }).animate({ opacity: 1 })) : i.attr({ opacity: 1 }).animate(
- { opacity: 0 },
- void 0,
- i.hide
- ), s.hasRendered && (p && i.attr({ x: i.startXPos, y: i.startYPos }), i.placed = !0);
- }
- var c = [];
- O.compose = function(u) {
- if (c.indexOf(u) === -1) {
- var i = u.prototype;
- c.push(u), i.alignDataLabel = R, i.drawDataLabels = b, i.justifyDataLabel = S, i.setDataLabelStartPos = h;
- }
- };
- }(T || (T = {})), T;
- }), C(o, "Series/Column/ColumnDataLabel.js", [o["Core/Series/DataLabel.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, _) {
- var U = N.series, G = _.merge, V = _.pick, F;
- return function(B) {
- function j(x, f, l, T, O) {
- var R = this.chart.inverted, k = x.series, b = (k.xAxis ? k.xAxis.len : this.chart.plotSizeX) || 0;
- k = (k.yAxis ? k.yAxis.len : this.chart.plotSizeY) || 0;
- var S = x.dlBox || x.shapeArgs, v = V(x.below, x.plotY > V(this.translatedThreshold, k)), h = V(l.inside, !!this.options.stacking);
- S && (T = G(S), 0 > T.y && (T.height += T.y, T.y = 0), S = T.y + T.height - k, 0 < S && S < T.height && (T.height -= S), R && (T = { x: k - T.y - T.height, y: b - T.x - T.width, width: T.height, height: T.width }), h || (R ? (T.x += v ? 0 : T.width, T.width = 0) : (T.y += v ? T.height : 0, T.height = 0))), l.align = V(l.align, !R || h ? "center" : v ? "right" : "left"), l.verticalAlign = V(l.verticalAlign, R || h ? "middle" : v ? "top" : "bottom"), U.prototype.alignDataLabel.call(this, x, f, l, T, O), l.inside && x.contrastColor && f.css({ color: x.contrastColor });
- }
- var w = [];
- B.compose = function(x) {
- y.compose(U), w.indexOf(x) === -1 && (w.push(x), x.prototype.alignDataLabel = j);
- };
- }(F || (F = {})), F;
- }), C(o, "Series/Bar/BarSeries.js", [o["Series/Column/ColumnSeries.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, _) {
- var U = this && this.__extends || function() {
- var F = function(B, j) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, x) {
- w.__proto__ = x;
- } || function(w, x) {
- for (var f in x)
- x.hasOwnProperty(f) && (w[f] = x[f]);
- }, F(B, j);
- };
- return function(B, j) {
- function w() {
- this.constructor = B;
- }
- F(B, j), B.prototype = j === null ? Object.create(j) : (w.prototype = j.prototype, new w());
- };
- }(), G = _.extend, V = _.merge;
- return _ = function(F) {
- function B() {
- var j = F !== null && F.apply(this, arguments) || this;
- return j.data = void 0, j.options = void 0, j.points = void 0, j;
- }
- return U(B, F), B.defaultOptions = V(
- y.defaultOptions,
- {}
- ), B;
- }(y), G(_.prototype, { inverted: !0 }), N.registerSeriesType("bar", _), _;
- }), C(o, "Series/Scatter/ScatterSeries.js", [o["Series/Column/ColumnSeries.js"], o["Series/Line/LineSeries.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, _, U) {
- var G = this && this.__extends || function() {
- var j = function(w, x) {
- return j = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(f, l) {
- f.__proto__ = l;
- } || function(f, l) {
- for (var T in l)
- l.hasOwnProperty(T) && (f[T] = l[T]);
- }, j(w, x);
- };
- return function(w, x) {
- function f() {
- this.constructor = w;
- }
- j(w, x), w.prototype = x === null ? Object.create(x) : (f.prototype = x.prototype, new f());
- };
- }(), V = U.addEvent, F = U.extend, B = U.merge;
- return U = function(j) {
- function w() {
- var x = j !== null && j.apply(this, arguments) || this;
- return x.data = void 0, x.options = void 0, x.points = void 0, x;
- }
- return G(w, j), w.prototype.applyJitter = function() {
- var x = this, f = this.options.jitter, l = this.points.length;
- f && this.points.forEach(function(T, O) {
- ["x", "y"].forEach(function(R, k) {
- var b = "plot" + R.toUpperCase();
- if (f[R] && !T.isNull) {
- var S = x[R + "Axis"], v = f[R] * S.transA;
- if (S && !S.isLog) {
- var h = Math.max(0, T[b] - v);
- S = Math.min(S.len, T[b] + v), k = 1e4 * Math.sin(O + k * l), T[b] = h + (S - h) * (k - Math.floor(k)), R === "x" && (T.clientX = T.plotX);
- }
- }
- });
- });
- }, w.prototype.drawGraph = function() {
- this.options.lineWidth ? j.prototype.drawGraph.call(this) : this.graph && (this.graph = this.graph.destroy());
- }, w.defaultOptions = B(N.defaultOptions, { lineWidth: 0, findNearestPointBy: "xy", jitter: { x: 0, y: 0 }, marker: { enabled: !0 }, tooltip: {
- headerFormat: '<span style="color:{point.color}">●</span> <span style="font-size: 10px"> {series.name}</span><br/>',
- pointFormat: "x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"
- } }), w;
- }(N), F(U.prototype, { drawTracker: y.prototype.drawTracker, sorted: !1, requireSorting: !1, noSharedTooltip: !0, trackerGroups: ["group", "markerGroup", "dataLabelsGroup"], takeOrdinalPosition: !1 }), V(U, "afterTranslate", function() {
- this.applyJitter();
- }), _.registerSeriesType("scatter", U), U;
- }), C(o, "Series/CenteredUtilities.js", [o["Core/Globals.js"], o["Core/Series/Series.js"], o["Core/Utilities.js"]], function(y, N, _) {
- var U = y.deg2rad, G = _.isNumber, V = _.pick, F = _.relativeLength, B;
- return function(j) {
- j.getCenter = function() {
- var w = this.options, x = this.chart, f = 2 * (w.slicedOffset || 0), l = x.plotWidth - 2 * f, T = x.plotHeight - 2 * f, O = w.center, R = Math.min(l, T), k = w.size, b = w.innerSize || 0;
- for (typeof k == "string" && (k = parseFloat(k)), typeof b == "string" && (b = parseFloat(b)), w = [V(O[0], "50%"), V(O[1], "50%"), V(k && 0 > k ? void 0 : w.size, "100%"), V(b && 0 > b ? void 0 : w.innerSize || 0, "0%")], !x.angular || this instanceof N || (w[3] = 0), O = 0; 4 > O; ++O)
- k = w[O], x = 2 > O || O === 2 && /%$/.test(k), w[O] = F(k, [l, T, R, w[2]][O]) + (x ? f : 0);
- return w[3] > w[2] && (w[3] = w[2]), w;
- }, j.getStartAndEndRadians = function(w, x) {
- return w = G(w) ? w : 0, x = G(x) && x > w && 360 > x - w ? x : w + 360, { start: U * (w + -90), end: U * (x + -90) };
- };
- }(B || (B = {})), B;
- }), C(o, "Series/Pie/PiePoint.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Series/Point.js"], o["Core/Utilities.js"]], function(y, N, _) {
- var U = this && this.__extends || function() {
- var x = function(f, l) {
- return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(T, O) {
- T.__proto__ = O;
- } || function(T, O) {
- for (var R in O)
- O.hasOwnProperty(R) && (T[R] = O[R]);
- }, x(f, l);
- };
- return function(f, l) {
- function T() {
- this.constructor = f;
- }
- x(f, l), f.prototype = l === null ? Object.create(l) : (T.prototype = l.prototype, new T());
- };
- }(), G = y.setAnimation, V = _.addEvent, F = _.defined;
- y = _.extend;
- var B = _.isNumber, j = _.pick, w = _.relativeLength;
- return N = function(x) {
- function f() {
- var l = x !== null && x.apply(this, arguments) || this;
- return l.labelDistance = void 0, l.options = void 0, l.series = void 0, l;
- }
- return U(f, x), f.prototype.getConnectorPath = function() {
- var l = this.labelPosition, T = this.series.options.dataLabels, O = this.connectorShapes, R = T.connectorShape;
- return O[R] && (R = O[R]), R.call(this, { x: l.final.x, y: l.final.y, alignment: l.alignment }, l.connectorPosition, T);
- }, f.prototype.getTranslate = function() {
- return this.sliced ? this.slicedTranslation : { translateX: 0, translateY: 0 };
- }, f.prototype.haloPath = function(l) {
- var T = this.shapeArgs;
- return this.sliced || !this.visible ? [] : this.series.chart.renderer.symbols.arc(T.x, T.y, T.r + l, T.r + l, { innerR: T.r - 1, start: T.start, end: T.end });
- }, f.prototype.init = function() {
- var l = this;
- x.prototype.init.apply(
- this,
- arguments
- ), this.name = j(this.name, "Slice");
- var T = function(O) {
- l.slice(O.type === "select");
- };
- return V(this, "select", T), V(this, "unselect", T), this;
- }, f.prototype.isValid = function() {
- return B(this.y) && 0 <= this.y;
- }, f.prototype.setVisible = function(l, T) {
- var O = this, R = this.series, k = R.chart, b = R.options.ignoreHiddenPoint;
- T = j(T, b), l !== this.visible && (this.visible = this.options.visible = l = typeof l > "u" ? !this.visible : l, R.options.data[R.data.indexOf(this)] = this.options, ["graphic", "dataLabel", "connector", "shadowGroup"].forEach(function(S) {
- O[S] && O[S][l ? "show" : "hide"](l);
- }), this.legendItem && k.legend.colorizeItem(this, l), l || this.state !== "hover" || this.setState(""), b && (R.isDirty = !0), T && k.redraw());
- }, f.prototype.slice = function(l, T, O) {
- var R = this.series;
- G(O, R.chart), j(T, !0), this.sliced = this.options.sliced = F(l) ? l : !this.sliced, R.options.data[R.data.indexOf(this)] = this.options, this.graphic && this.graphic.animate(this.getTranslate()), this.shadowGroup && this.shadowGroup.animate(this.getTranslate());
- }, f;
- }(N), y(N.prototype, { connectorShapes: { fixedOffset: function(x, f, l) {
- var T = f.breakAt;
- return f = f.touchingSliceAt, [["M", x.x, x.y], l.softConnector ? ["C", x.x + (x.alignment === "left" ? -5 : 5), x.y, 2 * T.x - f.x, 2 * T.y - f.y, T.x, T.y] : ["L", T.x, T.y], ["L", f.x, f.y]];
- }, straight: function(x, f) {
- return f = f.touchingSliceAt, [["M", x.x, x.y], ["L", f.x, f.y]];
- }, crookedLine: function(x, f, l) {
- f = f.touchingSliceAt;
- var T = this.series, O = T.center[0], R = T.chart.plotWidth, k = T.chart.plotLeft;
- T = x.alignment;
- var b = this.shapeArgs.r;
- return l = w(l.crookDistance, 1), R = T === "left" ? O + b + (R + k - O - b) * (1 - l) : k + (O - b) * l, l = ["L", R, x.y], O = !0, (T === "left" ? R > x.x || R < f.x : R < x.x || R > f.x) && (O = !1), x = [["M", x.x, x.y]], O && x.push(l), x.push(["L", f.x, f.y]), x;
- } } }), N;
- }), C(o, "Series/Pie/PieSeries.js", [o["Series/CenteredUtilities.js"], o["Series/Column/ColumnSeries.js"], o["Core/Globals.js"], o["Core/Legend/LegendSymbol.js"], o["Series/Pie/PiePoint.js"], o["Core/Series/Series.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Renderer/SVG/Symbols.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V, F, B, j) {
- var w = this && this.__extends || function() {
- var b = function(S, v) {
- return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(h, c) {
- h.__proto__ = c;
- } || function(h, c) {
- for (var u in c)
- c.hasOwnProperty(u) && (h[u] = c[u]);
- }, b(S, v);
- };
- return function(S, v) {
- function h() {
- this.constructor = S;
- }
- b(S, v), S.prototype = v === null ? Object.create(v) : (h.prototype = v.prototype, new h());
- };
- }(), x = y.getStartAndEndRadians;
- _ = _.noop;
- var f = j.clamp, l = j.extend, T = j.fireEvent, O = j.merge, R = j.pick, k = j.relativeLength;
- return j = function(b) {
- function S() {
- var v = b !== null && b.apply(this, arguments) || this;
- return v.center = void 0, v.data = void 0, v.maxLabelDistance = void 0, v.options = void 0, v.points = void 0, v;
- }
- return w(S, b), S.prototype.animate = function(v) {
- var h = this, c = h.points, u = h.startAngleRad;
- v || c.forEach(function(i) {
- var p = i.graphic, a = i.shapeArgs;
- p && a && (p.attr({ r: R(i.startR, h.center && h.center[3] / 2), start: u, end: u }), p.animate({ r: a.r, start: a.start, end: a.end }, h.options.animation));
- });
- }, S.prototype.drawEmpty = function() {
- var v = this.startAngleRad, h = this.endAngleRad, c = this.options;
- if (this.total === 0 && this.center) {
- var u = this.center[0], i = this.center[1];
- this.graph || (this.graph = this.chart.renderer.arc(u, i, this.center[1] / 2, 0, v, h).addClass("highcharts-empty-series").add(this.group)), this.graph.attr({ d: B.arc(u, i, this.center[2] / 2, 0, { start: v, end: h, innerR: this.center[3] / 2 }) }), this.chart.styledMode || this.graph.attr({ "stroke-width": c.borderWidth, fill: c.fillColor || "none", stroke: c.color || "#cccccc" });
- } else
- this.graph && (this.graph = this.graph.destroy());
- }, S.prototype.drawPoints = function() {
- var v = this.chart.renderer;
- this.points.forEach(function(h) {
- h.graphic && h.hasNewShapeType() && (h.graphic = h.graphic.destroy()), h.graphic || (h.graphic = v[h.shapeType](h.shapeArgs).add(h.series.group), h.delayedRendering = !0);
- });
- }, S.prototype.generatePoints = function() {
- b.prototype.generatePoints.call(this), this.updateTotals();
- }, S.prototype.getX = function(v, h, c) {
- var u = this.center, i = this.radii ? this.radii[c.index] || 0 : u[2] / 2;
- return v = Math.asin(f((v - u[1]) / (i + c.labelDistance), -1, 1)), u[0] + (h ? -1 : 1) * Math.cos(v) * (i + c.labelDistance) + (0 < c.labelDistance ? (h ? -1 : 1) * this.options.dataLabels.padding : 0);
- }, S.prototype.hasData = function() {
- return !!this.processedXData.length;
- }, S.prototype.redrawPoints = function() {
- var v = this, h = v.chart, c = h.renderer, u = v.options.shadow, i, p, a, t;
- this.drawEmpty(), !u || v.shadowGroup || h.styledMode || (v.shadowGroup = c.g("shadow").attr({ zIndex: -1 }).add(v.group)), v.points.forEach(function(s) {
- var n = {};
- if (p = s.graphic, !s.isNull && p) {
- var P = void 0;
- t = s.shapeArgs, i = s.getTranslate(), h.styledMode || (P = s.shadowGroup, u && !P && (P = s.shadowGroup = c.g("shadow").add(v.shadowGroup)), P && P.attr(i), a = v.pointAttribs(s, s.selected && "select")), s.delayedRendering ? (p.setRadialReference(v.center).attr(t).attr(i), h.styledMode || p.attr(a).attr({ "stroke-linejoin": "round" }).shadow(u, P), s.delayedRendering = !1) : (p.setRadialReference(v.center), h.styledMode || O(!0, n, a), O(!0, n, t, i), p.animate(n)), p.attr({ visibility: s.visible ? "inherit" : "hidden" }), p.addClass(s.getClassName(), !0);
- } else
- p && (s.graphic = p.destroy());
- });
- }, S.prototype.sortByAngle = function(v, h) {
- v.sort(function(c, u) {
- return typeof c.angle < "u" && (u.angle - c.angle) * h;
- });
- }, S.prototype.translate = function(v) {
- this.generatePoints();
- var h = this.options, c = h.slicedOffset, u = c + (h.borderWidth || 0), i = x(h.startAngle, h.endAngle), p = this.startAngleRad = i.start;
- i = (this.endAngleRad = i.end) - p;
- var a = this.points, t = h.dataLabels.distance;
- h = h.ignoreHiddenPoint;
- var s = a.length, n, P = 0;
- for (v || (this.center = v = this.getCenter()), n = 0; n < s; n++) {
- var D = a[n], I = p + P * i;
- !D.isValid() || h && !D.visible || (P += D.percentage / 100);
- var W = p + P * i, E = { x: v[0], y: v[1], r: v[2] / 2, innerR: v[3] / 2, start: Math.round(1e3 * I) / 1e3, end: Math.round(1e3 * W) / 1e3 };
- D.shapeType = "arc", D.shapeArgs = E, D.labelDistance = R(D.options.dataLabels && D.options.dataLabels.distance, t), D.labelDistance = k(D.labelDistance, E.r), this.maxLabelDistance = Math.max(this.maxLabelDistance || 0, D.labelDistance), W = (W + I) / 2, W > 1.5 * Math.PI ? W -= 2 * Math.PI : W < -Math.PI / 2 && (W += 2 * Math.PI), D.slicedTranslation = { translateX: Math.round(Math.cos(W) * c), translateY: Math.round(Math.sin(W) * c) }, E = Math.cos(W) * v[2] / 2;
- var X = Math.sin(W) * v[2] / 2;
- D.tooltipPos = [v[0] + 0.7 * E, v[1] + 0.7 * X], D.half = W < -Math.PI / 2 || W > Math.PI / 2 ? 1 : 0, D.angle = W, I = Math.min(u, D.labelDistance / 5), D.labelPosition = { natural: { x: v[0] + E + Math.cos(W) * D.labelDistance, y: v[1] + X + Math.sin(W) * D.labelDistance }, final: {}, alignment: 0 > D.labelDistance ? "center" : D.half ? "right" : "left", connectorPosition: { breakAt: { x: v[0] + E + Math.cos(W) * I, y: v[1] + X + Math.sin(W) * I }, touchingSliceAt: { x: v[0] + E, y: v[1] + X } } };
- }
- T(this, "afterTranslate");
- }, S.prototype.updateTotals = function() {
- var v = this.points, h = v.length, c = this.options.ignoreHiddenPoint, u, i = 0;
- for (u = 0; u < h; u++) {
- var p = v[u];
- !p.isValid() || c && !p.visible || (i += p.y);
- }
- for (this.total = i, u = 0; u < h; u++)
- p = v[u], p.percentage = 0 < i && (p.visible || !c) ? p.y / i * 100 : 0, p.total = i;
- }, S.defaultOptions = O(V.defaultOptions, {
- center: [null, null],
- clip: !1,
- colorByPoint: !0,
- dataLabels: { allowOverlap: !0, connectorPadding: 5, connectorShape: "fixedOffset", crookDistance: "70%", distance: 30, enabled: !0, formatter: function() {
- return this.point.isNull ? void 0 : this.point.name;
- }, softConnector: !0, x: 0 },
- fillColor: void 0,
- ignoreHiddenPoint: !0,
- inactiveOtherPoints: !0,
- legendType: "point",
- marker: null,
- size: null,
- showInLegend: !1,
- slicedOffset: 10,
- stickyTracking: !1,
- tooltip: { followPointer: !0 },
- borderColor: "#ffffff",
- borderWidth: 1,
- lineWidth: void 0,
- states: { hover: { brightness: 0.1 } }
- }), S;
- }(V), l(j.prototype, { axisTypes: [], directTouch: !0, drawGraph: void 0, drawLegendSymbol: U.drawRectangle, drawTracker: N.prototype.drawTracker, getCenter: y.getCenter, getSymbol: _, isCartesian: !1, noSharedTooltip: !0, pointAttribs: N.prototype.pointAttribs, pointClass: G, requireSorting: !1, searchPoint: _, trackerGroups: ["group", "dataLabelsGroup"] }), F.registerSeriesType("pie", j), j;
- }), C(o, "Series/Pie/PieDataLabel.js", [
- o["Core/Series/DataLabel.js"],
- o["Core/Globals.js"],
- o["Core/Renderer/RendererUtilities.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Core/Utilities.js"]
- ], function(y, N, _, U, G) {
- var V = N.noop, F = _.distribute, B = U.series, j = G.arrayMax, w = G.clamp, x = G.defined, f = G.merge, l = G.pick, T = G.relativeLength, O;
- return function(R) {
- function k() {
- var c = this, u = c.data, i = c.chart, p = c.options.dataLabels || {}, a = p.connectorPadding, t = i.plotWidth, s = i.plotHeight, n = i.plotLeft, P = Math.round(i.chartWidth / 3), D = c.center, I = D[2] / 2, W = D[1], E = [[], []], X = [0, 0, 0, 0], g = c.dataLabelPositioners, m, L, z, $, Q, A, H, Y, Z, q, it, et;
- c.visible && (p.enabled || c._hasPointLabels) && (u.forEach(function(nt) {
- nt.dataLabel && nt.visible && nt.dataLabel.shortened && (nt.dataLabel.attr({ width: "auto" }).css({ width: "auto", textOverflow: "clip" }), nt.dataLabel.shortened = !1);
- }), B.prototype.drawDataLabels.apply(c), u.forEach(function(nt) {
- nt.dataLabel && (nt.visible ? (E[nt.half].push(nt), nt.dataLabel._pos = null, !x(p.style.width) && !x(nt.options.dataLabels && nt.options.dataLabels.style && nt.options.dataLabels.style.width) && nt.dataLabel.getBBox().width > P && (nt.dataLabel.css({ width: Math.round(0.7 * P) + "px" }), nt.dataLabel.shortened = !0)) : (nt.dataLabel = nt.dataLabel.destroy(), nt.dataLabels && nt.dataLabels.length === 1 && delete nt.dataLabels));
- }), E.forEach(function(nt, rt) {
- var ct = nt.length, gt = [], dt;
- if (ct) {
- if (c.sortByAngle(nt, rt - 0.5), 0 < c.maxLabelDistance) {
- var ht = Math.max(0, W - I - c.maxLabelDistance), at = Math.min(W + I + c.maxLabelDistance, i.plotHeight);
- nt.forEach(function(J) {
- 0 < J.labelDistance && J.dataLabel && (J.top = Math.max(0, W - I - J.labelDistance), J.bottom = Math.min(W + I + J.labelDistance, i.plotHeight), dt = J.dataLabel.getBBox().height || 21, J.distributeBox = { target: J.labelPosition.natural.y - J.top + dt / 2, size: dt, rank: J.y }, gt.push(J.distributeBox));
- }), ht = at + dt - ht, F(gt, ht, ht / 5);
- }
- for (it = 0; it < ct; it++) {
- if (m = nt[it], A = m.labelPosition, $ = m.dataLabel, q = m.visible === !1 ? "hidden" : "inherit", Z = ht = A.natural.y, gt && x(m.distributeBox) && (typeof m.distributeBox.pos > "u" ? q = "hidden" : (H = m.distributeBox.size, Z = g.radialDistributionY(m))), delete m.positionIndex, p.justify)
- Y = g.justify(m, I, D);
- else
- switch (p.alignTo) {
- case "connectors":
- Y = g.alignToConnectors(nt, rt, t, n);
- break;
- case "plotEdges":
- Y = g.alignToPlotEdges($, rt, t, n);
- break;
- default:
- Y = g.radialDistributionX(c, m, Z, ht);
- }
- $._attr = { visibility: q, align: A.alignment }, et = m.options.dataLabels || {}, $._pos = { x: Y + l(et.x, p.x) + ({ left: a, right: -a }[A.alignment] || 0), y: Z + l(et.y, p.y) - 10 }, A.final.x = Y, A.final.y = Z, l(p.crop, !0) && (Q = $.getBBox().width, ht = null, Y - Q < a && rt === 1 ? (ht = Math.round(Q - Y + a), X[3] = Math.max(ht, X[3])) : Y + Q > t - a && rt === 0 && (ht = Math.round(Y + Q - t + a), X[1] = Math.max(ht, X[1])), 0 > Z - H / 2 ? X[0] = Math.max(Math.round(-Z + H / 2), X[0]) : Z + H / 2 > s && (X[2] = Math.max(Math.round(Z + H / 2 - s), X[2])), $.sideOverflow = ht);
- }
- }
- }), j(X) === 0 || this.verifyDataLabelOverflow(X)) && (this.placeDataLabels(), this.points.forEach(function(nt) {
- if (et = f(p, nt.options.dataLabels), L = l(et.connectorWidth, 1)) {
- var rt;
- z = nt.connector, ($ = nt.dataLabel) && $._pos && nt.visible && 0 < nt.labelDistance ? (q = $._attr.visibility, (rt = !z) && (nt.connector = z = i.renderer.path().addClass("highcharts-data-label-connector highcharts-color-" + nt.colorIndex + (nt.className ? " " + nt.className : "")).add(c.dataLabelsGroup), i.styledMode || z.attr({ "stroke-width": L, stroke: et.connectorColor || nt.color || "#666666" })), z[rt ? "attr" : "animate"]({ d: nt.getConnectorPath() }), z.attr("visibility", q)) : z && (nt.connector = z.destroy());
- }
- }));
- }
- function b() {
- this.points.forEach(function(c) {
- var u = c.dataLabel, i;
- u && c.visible && ((i = u._pos) ? (u.sideOverflow && (u._attr.width = Math.max(u.getBBox().width - u.sideOverflow, 0), u.css({ width: u._attr.width + "px", textOverflow: (this.options.dataLabels.style || {}).textOverflow || "ellipsis" }), u.shortened = !0), u.attr(u._attr), u[u.moved ? "animate" : "attr"](i), u.moved = !0) : u && u.attr({ y: -9999 })), delete c.distributeBox;
- }, this);
- }
- function S(c) {
- var u = this.center, i = this.options, p = i.center, a = i.minSize || 80, t = i.size !== null;
- if (!t) {
- if (p[0] !== null)
- var s = Math.max(u[2] - Math.max(c[1], c[3]), a);
- else
- s = Math.max(u[2] - c[1] - c[3], a), u[0] += (c[3] - c[1]) / 2;
- p[1] !== null ? s = w(s, a, u[2] - Math.max(c[0], c[2])) : (s = w(s, a, u[2] - c[0] - c[2]), u[1] += (c[0] - c[2]) / 2), s < u[2] ? (u[2] = s, u[3] = Math.min(T(i.innerSize || 0, s), s), this.translate(u), this.drawDataLabels && this.drawDataLabels()) : t = !0;
- }
- return t;
- }
- var v = [], h = { radialDistributionY: function(c) {
- return c.top + c.distributeBox.pos;
- }, radialDistributionX: function(c, u, i, p) {
- return c.getX(i < u.top + 2 || i > u.bottom - 2 ? p : i, u.half, u);
- }, justify: function(c, u, i) {
- return i[0] + (c.half ? -1 : 1) * (u + c.labelDistance);
- }, alignToPlotEdges: function(c, u, i, p) {
- return c = c.getBBox().width, u ? c + p : i - c - p;
- }, alignToConnectors: function(c, u, i, p) {
- var a = 0, t;
- return c.forEach(function(s) {
- t = s.dataLabel.getBBox().width, t > a && (a = t);
- }), u ? a + p : i - a - p;
- } };
- R.compose = function(c) {
- y.compose(B), v.indexOf(c) === -1 && (v.push(c), c = c.prototype, c.dataLabelPositioners = h, c.alignDataLabel = V, c.drawDataLabels = k, c.placeDataLabels = b, c.verifyDataLabelOverflow = S);
- };
- }(O || (O = {})), O;
- }), C(o, "Extensions/OverlappingDataLabels.js", [o["Core/Chart/Chart.js"], o["Core/Utilities.js"]], function(y, N) {
- function _(w, x) {
- var f = !1;
- if (w) {
- var l = w.newOpacity;
- w.oldOpacity !== l && (w.alignAttr && w.placed ? (w[l ? "removeClass" : "addClass"]("highcharts-data-label-hidden"), f = !0, w.alignAttr.opacity = l, w[w.isOld ? "animate" : "attr"](w.alignAttr, null, function() {
- x.styledMode || w.css({ pointerEvents: l ? "auto" : "none" });
- }), G(x, "afterHideOverlappingLabel")) : w.attr({ opacity: l })), w.isOld = !0;
- }
- return f;
- }
- var U = N.addEvent, G = N.fireEvent, V = N.isArray, F = N.isNumber, B = N.objectEach, j = N.pick;
- U(y, "render", function() {
- var w = this, x = [];
- (this.labelCollectors || []).forEach(function(f) {
- x = x.concat(f());
- }), (this.yAxis || []).forEach(function(f) {
- f.stacking && f.options.stackLabels && !f.options.stackLabels.allowOverlap && B(f.stacking.stacks, function(l) {
- B(l, function(T) {
- T.label && T.label.visibility !== "hidden" && x.push(T.label);
- });
- });
- }), (this.series || []).forEach(function(f) {
- var l = f.options.dataLabels;
- f.visible && (l.enabled !== !1 || f._hasPointLabels) && (l = function(T) {
- return T.forEach(function(O) {
- O.visible && (V(O.dataLabels) ? O.dataLabels : O.dataLabel ? [O.dataLabel] : []).forEach(function(R) {
- var k = R.options;
- R.labelrank = j(k.labelrank, O.labelrank, O.shapeArgs && O.shapeArgs.height), k.allowOverlap ? (R.oldOpacity = R.opacity, R.newOpacity = 1, _(R, w)) : x.push(R);
- });
- });
- }, l(f.nodes || []), l(f.points));
- }), this.hideOverlappingLabels(x);
- }), y.prototype.hideOverlappingLabels = function(w) {
- var x = this, f = w.length, l = x.renderer, T, O, R, k = !1, b = function(h) {
- var c, u = h.box ? 0 : h.padding || 0, i = c = 0, p;
- if (h && (!h.alignAttr || h.placed)) {
- var a = h.alignAttr || { x: h.attr("x"), y: h.attr("y") }, t = h.parentGroup;
- h.width || (c = h.getBBox(), h.width = c.width, h.height = c.height, c = l.fontMetrics(null, h.element).h);
- var s = h.width - 2 * u;
- return (p = { left: "0", center: "0.5", right: "1" }[h.alignValue]) ? i = +p * s : F(h.x) && Math.round(h.x) !== h.translateX && (i = h.x - h.translateX), { x: a.x + (t.translateX || 0) + u - (i || 0), y: a.y + (t.translateY || 0) + u - c, width: h.width - 2 * u, height: h.height - 2 * u };
- }
- };
- for (O = 0; O < f; O++)
- (T = w[O]) && (T.oldOpacity = T.opacity, T.newOpacity = 1, T.absoluteBox = b(T));
- for (w.sort(function(h, c) {
- return (c.labelrank || 0) - (h.labelrank || 0);
- }), O = 0; O < f; O++) {
- var S = (b = w[O]) && b.absoluteBox;
- for (T = O + 1; T < f; ++T) {
- var v = (R = w[T]) && R.absoluteBox;
- !S || !v || b === R || b.newOpacity === 0 || R.newOpacity === 0 || v.x >= S.x + S.width || v.x + v.width <= S.x || v.y >= S.y + S.height || v.y + v.height <= S.y || ((b.labelrank < R.labelrank ? b : R).newOpacity = 0);
- }
- }
- w.forEach(function(h) {
- _(h, x) && (k = !0);
- }), k && G(x, "afterHideAllOverlappingLabels");
- };
- }), C(
- o,
- "Core/Responsive.js",
- [o["Core/Utilities.js"]],
- function(y) {
- var N = y.extend, _ = y.find, U = y.isArray, G = y.isObject, V = y.merge, F = y.objectEach, B = y.pick, j = y.splat, w = y.uniqueKey, x;
- return function(f) {
- var l = [];
- f.compose = function(O) {
- return l.indexOf(O) === -1 && (l.push(O), N(O.prototype, T.prototype)), O;
- };
- var T = function() {
- function O() {
- }
- return O.prototype.currentOptions = function(R) {
- function k(v, h, c, u) {
- var i;
- F(v, function(p, a) {
- if (!u && -1 < b.collectionsWithUpdate.indexOf(a) && h[a])
- for (p = j(p), c[a] = [], i = 0; i < Math.max(p.length, h[a].length); i++)
- h[a][i] && (p[i] === void 0 ? c[a][i] = h[a][i] : (c[a][i] = {}, k(p[i], h[a][i], c[a][i], u + 1)));
- else
- G(p) ? (c[a] = U(p) ? [] : {}, k(p, h[a] || {}, c[a], u + 1)) : c[a] = typeof h[a] > "u" ? null : h[a];
- });
- }
- var b = this, S = {};
- return k(R, this.options, S, 0), S;
- }, O.prototype.matchResponsiveRule = function(R, k) {
- var b = R.condition;
- (b.callback || function() {
- return this.chartWidth <= B(b.maxWidth, Number.MAX_VALUE) && this.chartHeight <= B(b.maxHeight, Number.MAX_VALUE) && this.chartWidth >= B(b.minWidth, 0) && this.chartHeight >= B(b.minHeight, 0);
- }).call(this) && k.push(R._id);
- }, O.prototype.setResponsive = function(R, k) {
- var b = this, S = this.options.responsive, v = this.currentResponsive, h = [];
- !k && S && S.rules && S.rules.forEach(function(c) {
- typeof c._id > "u" && (c._id = w()), b.matchResponsiveRule(c, h);
- }, this), k = V.apply(void 0, h.map(function(c) {
- return _((S || {}).rules || [], function(u) {
- return u._id === c;
- });
- }).map(function(c) {
- return c && c.chartOptions;
- })), k.isResponsiveOptions = !0, h = h.toString() || void 0, h !== (v && v.ruleIds) && (v && this.update(v.undoOptions, R, !0), h ? (v = this.currentOptions(k), v.isResponsiveOptions = !0, this.currentResponsive = { ruleIds: h, mergedOptions: k, undoOptions: v }, this.update(k, R, !0)) : this.currentResponsive = void 0);
- }, O;
- }();
- }(x || (x = {})), x;
- }
- ), C(o, "masters/highcharts.src.js", [
- o["Core/Globals.js"],
- o["Core/Utilities.js"],
- o["Core/DefaultOptions.js"],
- o["Core/Animation/Fx.js"],
- o["Core/Animation/AnimationUtilities.js"],
- o["Core/Renderer/HTML/AST.js"],
- o["Core/FormatUtilities.js"],
- o["Core/Renderer/RendererUtilities.js"],
- o["Core/Renderer/SVG/SVGElement.js"],
- o["Core/Renderer/SVG/SVGRenderer.js"],
- o["Core/Renderer/HTML/HTMLElement.js"],
- o["Core/Renderer/HTML/HTMLRenderer.js"],
- o["Core/Axis/Axis.js"],
- o["Core/Axis/DateTimeAxis.js"],
- o["Core/Axis/LogarithmicAxis.js"],
- o["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],
- o["Core/Axis/Tick.js"],
- o["Core/Tooltip.js"],
- o["Core/Series/Point.js"],
- o["Core/Pointer.js"],
- o["Core/MSPointer.js"],
- o["Core/Legend/Legend.js"],
- o["Core/Chart/Chart.js"],
- o["Core/Series/Series.js"],
- o["Core/Series/SeriesRegistry.js"],
- o["Series/Column/ColumnSeries.js"],
- o["Series/Column/ColumnDataLabel.js"],
- o["Series/Pie/PieSeries.js"],
- o["Series/Pie/PieDataLabel.js"],
- o["Core/Series/DataLabel.js"],
- o["Core/Responsive.js"],
- o["Core/Color/Color.js"],
- o["Core/Time.js"]
- ], function(y, N, _, U, G, V, F, B, j, w, x, f, l, T, O, R, k, b, S, v, h, c, u, i, p, a, t, s, n, P, D, I, W) {
- return y.animate = G.animate, y.animObject = G.animObject, y.getDeferredAnimation = G.getDeferredAnimation, y.setAnimation = G.setAnimation, y.stop = G.stop, y.timers = U.timers, y.AST = V, y.Axis = l, y.Chart = u, y.chart = u.chart, y.Fx = U, y.Legend = c, y.PlotLineOrBand = R, y.Point = S, y.Pointer = h.isRequired() ? h : v, y.Series = i, y.SVGElement = j, y.SVGRenderer = w, y.Tick = k, y.Time = W, y.Tooltip = b, y.Color = I, y.color = I.parse, f.compose(w), x.compose(j), y.defaultOptions = _.defaultOptions, y.getOptions = _.getOptions, y.time = _.defaultTime, y.setOptions = _.setOptions, y.dateFormat = F.dateFormat, y.format = F.format, y.numberFormat = F.numberFormat, y.addEvent = N.addEvent, y.arrayMax = N.arrayMax, y.arrayMin = N.arrayMin, y.attr = N.attr, y.clearTimeout = N.clearTimeout, y.correctFloat = N.correctFloat, y.createElement = N.createElement, y.css = N.css, y.defined = N.defined, y.destroyObjectProperties = N.destroyObjectProperties, y.discardElement = N.discardElement, y.distribute = B.distribute, y.erase = N.erase, y.error = N.error, y.extend = N.extend, y.extendClass = N.extendClass, y.find = N.find, y.fireEvent = N.fireEvent, y.getMagnitude = N.getMagnitude, y.getStyle = N.getStyle, y.inArray = N.inArray, y.isArray = N.isArray, y.isClass = N.isClass, y.isDOMElement = N.isDOMElement, y.isFunction = N.isFunction, y.isNumber = N.isNumber, y.isObject = N.isObject, y.isString = N.isString, y.keys = N.keys, y.merge = N.merge, y.normalizeTickInterval = N.normalizeTickInterval, y.objectEach = N.objectEach, y.offset = N.offset, y.pad = N.pad, y.pick = N.pick, y.pInt = N.pInt, y.relativeLength = N.relativeLength, y.removeEvent = N.removeEvent, y.seriesType = p.seriesType, y.splat = N.splat, y.stableSort = N.stableSort, y.syncTimeout = N.syncTimeout, y.timeUnits = N.timeUnits, y.uniqueKey = N.uniqueKey, y.useSerialIds = N.useSerialIds, y.wrap = N.wrap, t.compose(a), P.compose(i), T.compose(l), O.compose(l), n.compose(s), R.compose(l), D.compose(u), y;
- }), o["masters/highcharts.src.js"]._modules = o, o["masters/highcharts.src.js"];
- });
- })(iu);
- var V0 = iu.exports;
- const ts = /* @__PURE__ */ Mn(V0);
- var ru = { exports: {} };
- (function(r) {
- (function(d) {
- r.exports ? (d.default = d, r.exports = d) : d(typeof Highcharts < "u" ? Highcharts : void 0);
- })(function(d) {
- function C(o, y, N, _) {
- o.hasOwnProperty(y) || (o[y] = _.apply(null, N));
- }
- d = d ? d._modules : {}, C(d, "Extensions/Pane.js", [
- d["Core/Chart/Chart.js"],
- d["Series/CenteredUtilities.js"],
- d["Core/Globals.js"],
- d["Core/Pointer.js"],
- d["Core/Utilities.js"]
- ], function(o, y, N, _, U) {
- function G(x, f, l) {
- return Math.sqrt(Math.pow(x - l[0], 2) + Math.pow(f - l[1], 2)) <= l[2] / 2;
- }
- var V = U.addEvent, F = U.extend, B = U.merge, j = U.pick, w = U.splat;
- return o.prototype.collectionsWithUpdate.push("pane"), U = function() {
- function x(f, l) {
- this.options = this.chart = this.center = this.background = void 0, this.coll = "pane", this.defaultOptions = { center: ["50%", "50%"], size: "85%", innerSize: "0%", startAngle: 0 }, this.defaultBackgroundOptions = { shape: "circle", borderWidth: 1, borderColor: "#cccccc", backgroundColor: { linearGradient: {
- x1: 0,
- y1: 0,
- x2: 0,
- y2: 1
- }, stops: [[0, "#ffffff"], [1, "#e6e6e6"]] }, from: -Number.MAX_VALUE, innerRadius: 0, to: Number.MAX_VALUE, outerRadius: "105%" }, this.init(f, l);
- }
- return x.prototype.init = function(f, l) {
- this.chart = l, this.background = [], l.pane.push(this), this.setOptions(f);
- }, x.prototype.setOptions = function(f) {
- this.options = B(this.defaultOptions, this.chart.angular ? { background: {} } : void 0, f);
- }, x.prototype.render = function() {
- var f = this.options, l = this.options.background, T = this.chart.renderer;
- if (this.group || (this.group = T.g("pane-group").attr({ zIndex: f.zIndex || 0 }).add()), this.updateCenter(), l)
- for (l = w(l), f = Math.max(l.length, this.background.length || 0), T = 0; T < f; T++)
- l[T] && this.axis ? this.renderBackground(B(this.defaultBackgroundOptions, l[T]), T) : this.background[T] && (this.background[T] = this.background[T].destroy(), this.background.splice(T, 1));
- }, x.prototype.renderBackground = function(f, l) {
- var T = "animate", O = { class: "highcharts-pane " + (f.className || "") };
- this.chart.styledMode || F(O, { fill: f.backgroundColor, stroke: f.borderColor, "stroke-width": f.borderWidth }), this.background[l] || (this.background[l] = this.chart.renderer.path().add(this.group), T = "attr"), this.background[l][T]({ d: this.axis.getPlotBandPath(f.from, f.to, f) }).attr(O);
- }, x.prototype.updateCenter = function(f) {
- this.center = (f || this.axis || {}).center = y.getCenter.call(this);
- }, x.prototype.update = function(f, l) {
- B(!0, this.options, f), this.setOptions(this.options), this.render(), this.chart.axes.forEach(function(T) {
- T.pane === this && (T.pane = null, T.update({}, l));
- }, this);
- }, x;
- }(), o.prototype.getHoverPane = function(x) {
- var f = this, l;
- return x && f.pane.forEach(function(T) {
- var O = x.chartX - f.plotLeft, R = x.chartY - f.plotTop;
- G(f.inverted ? R : O, f.inverted ? O : R, T.center) && (l = T);
- }), l;
- }, V(o, "afterIsInsidePlot", function(x) {
- this.polar && (x.isInsidePlot = this.pane.some(function(f) {
- return G(x.x, x.y, f.center);
- }));
- }), V(_, "beforeGetHoverData", function(x) {
- var f = this.chart;
- f.polar ? (f.hoverPane = f.getHoverPane(x), x.filter = function(l) {
- return l.visible && !(!x.shared && l.directTouch) && j(l.options.enableMouseTracking, !0) && (!f.hoverPane || l.xAxis.pane === f.hoverPane);
- }) : f.hoverPane = void 0;
- }), V(
- _,
- "afterGetHoverData",
- function(x) {
- var f = this.chart;
- x.hoverPoint && x.hoverPoint.plotX && x.hoverPoint.plotY && f.hoverPane && !G(x.hoverPoint.plotX, x.hoverPoint.plotY, f.hoverPane.center) && (x.hoverPoint = void 0);
- }
- ), N.Pane = U, N.Pane;
- }), C(d, "Core/Axis/RadialAxis.js", [d["Core/Axis/AxisDefaults.js"], d["Core/DefaultOptions.js"], d["Core/Globals.js"], d["Core/Utilities.js"]], function(o, y, N, _) {
- var U = y.defaultOptions, G = N.noop, V = _.addEvent, F = _.correctFloat, B = _.defined, j = _.extend, w = _.fireEvent, x = _.merge, f = _.pick, l = _.relativeLength, T = _.wrap, O;
- return function(R) {
- function k() {
- this.autoConnect = this.isCircular && typeof f(this.userMax, this.options.max) > "u" && F(this.endAngleRad - this.startAngleRad) === F(2 * Math.PI), !this.isCircular && this.chart.inverted && this.max++, this.autoConnect && (this.max += this.categories && 1 || this.pointRange || this.closestPointRange || 0);
- }
- function b() {
- var Z = this;
- return function() {
- if (Z.isRadial && Z.tickPositions && Z.options.labels && Z.options.labels.allowOverlap !== !0)
- return Z.tickPositions.map(function(q) {
- return Z.ticks[q] && Z.ticks[q].label;
- }).filter(function(q) {
- return !!q;
- });
- };
- }
- function S() {
- return G;
- }
- function v(Z, q, it) {
- var et = this.pane.center, nt = Z.value;
- if (this.isCircular) {
- if (B(nt))
- Z.point && (rt = Z.point.shapeArgs || {}, rt.start && (nt = this.chart.inverted ? this.translate(Z.point.rectPlotY, !0) : Z.point.x));
- else {
- var rt = Z.chartX || 0, ct = Z.chartY || 0;
- nt = this.translate(Math.atan2(ct - it, rt - q) - this.startAngleRad, !0);
- }
- Z = this.getPosition(nt), rt = Z.x, ct = Z.y;
- } else
- B(nt) || (rt = Z.chartX, ct = Z.chartY), B(rt) && B(ct) && (it = et[1] + this.chart.plotTop, nt = this.translate(Math.min(Math.sqrt(Math.pow(rt - q, 2) + Math.pow(ct - it, 2)), et[2] / 2) - et[3] / 2, !0));
- return [nt, rt || 0, ct || 0];
- }
- function h(Z, q, it) {
- Z = this.pane.center;
- var et = this.chart, nt = this.left || 0, rt = this.top || 0, ct = f(q, Z[2] / 2 - this.offset);
- return typeof it > "u" && (it = this.horiz ? 0 : this.center && -this.center[3] / 2), it && (ct += it), this.isCircular || typeof q < "u" ? (q = this.chart.renderer.symbols.arc(nt + Z[0], rt + Z[1], ct, ct, { start: this.startAngleRad, end: this.endAngleRad, open: !0, innerR: 0 }), q.xBounds = [nt + Z[0]], q.yBounds = [rt + Z[1] - ct]) : (q = this.postTranslate(this.angleRad, ct), q = [["M", this.center[0] + et.plotLeft, this.center[1] + et.plotTop], ["L", q.x, q.y]]), q;
- }
- function c() {
- this.constructor.prototype.getOffset.call(this), this.chart.axisOffset[this.side] = 0;
- }
- function u(Z, q, it) {
- var et = this.chart, nt = function(yt) {
- if (typeof yt == "string") {
- var vt = parseInt(yt, 10);
- return J.test(yt) && (vt = vt * gt / 100), vt;
- }
- return yt;
- }, rt = this.center, ct = this.startAngleRad, gt = rt[2] / 2, dt = Math.min(this.offset, 0), ht = this.left || 0, at = this.top || 0, J = /%$/, tt = this.isCircular, ot = f(nt(it.outerRadius), gt), lt = nt(it.innerRadius);
- if (nt = f(nt(it.thickness), 10), this.options.gridLineInterpolation === "polygon")
- dt = this.getPlotLinePath({ value: Z }).concat(this.getPlotLinePath({ value: q, reverse: !0 }));
- else {
- if (Z = Math.max(Z, this.min), q = Math.min(q, this.max), Z = this.translate(Z), q = this.translate(q), tt || (ot = Z || 0, lt = q || 0), it.shape !== "circle" && tt)
- it = ct + (Z || 0), ct += q || 0;
- else {
- it = -Math.PI / 2, ct = 1.5 * Math.PI;
- var pt = !0;
- }
- ot -= dt, dt = et.renderer.symbols.arc(ht + rt[0], at + rt[1], ot, ot, { start: Math.min(it, ct), end: Math.max(it, ct), innerR: f(lt, ot - (nt - dt)), open: pt }), tt && (tt = (ct + it) / 2, ht = ht + rt[0] + rt[2] / 2 * Math.cos(tt), dt.xBounds = tt > -Math.PI / 2 && tt < Math.PI / 2 ? [ht, et.plotWidth] : [0, ht], dt.yBounds = [at + rt[1] + rt[2] / 2 * Math.sin(tt)], dt.yBounds[0] += tt > -Math.PI && 0 > tt || tt > Math.PI ? -10 : 10);
- }
- return dt;
- }
- function i(Z) {
- var q = this, it = this.pane.center, et = this.chart, nt = et.inverted, rt = Z.reverse, ct = this.pane.options.background ? this.pane.options.background[0] || this.pane.options.background : {}, gt = ct.innerRadius || "0%", dt = ct.outerRadius || "100%", ht = it[0] + et.plotLeft, at = it[1] + et.plotTop, J = this.height, tt = Z.isCrosshair;
- ct = it[3] / 2;
- var ot = Z.value, lt, pt = this.getPosition(ot), yt = pt.x;
- if (pt = pt.y, tt && (pt = this.getCrosshairPosition(Z, ht, at), ot = pt[0], yt = pt[1], pt = pt[2]), this.isCircular)
- ot = Math.sqrt(Math.pow(yt - ht, 2) + Math.pow(pt - at, 2)), rt = typeof gt == "string" ? l(gt, 1) : gt / ot, et = typeof dt == "string" ? l(dt, 1) : dt / ot, it && ct && (ct /= ot, rt < ct && (rt = ct), et < ct && (et = ct)), it = [["M", ht + rt * (yt - ht), at - rt * (at - pt)], ["L", yt - (1 - et) * (yt - ht), pt + (1 - et) * (at - pt)]];
- else if ((ot = this.translate(ot)) && (0 > ot || ot > J) && (ot = 0), this.options.gridLineInterpolation === "circle")
- it = this.getLinePath(0, ot, ct);
- else if (it = [], et[nt ? "yAxis" : "xAxis"].forEach(function(vt) {
- vt.pane === q.pane && (lt = vt);
- }), lt)
- for (ht = lt.tickPositions, lt.autoConnect && (ht = ht.concat([ht[0]])), rt && (ht = ht.slice().reverse()), ot && (ot += ct), at = 0; at < ht.length; at++)
- ct = lt.getPosition(ht[at], ot), it.push(at ? ["L", ct.x, ct.y] : ["M", ct.x, ct.y]);
- return it;
- }
- function p(Z, q) {
- return Z = this.translate(Z), this.postTranslate(this.isCircular ? Z : this.angleRad, f(this.isCircular ? q : 0 > Z ? 0 : Z, this.center[2] / 2) - this.offset);
- }
- function a() {
- var Z = this.center, q = this.chart, it = this.options.title;
- return { x: q.plotLeft + Z[0] + (it.x || 0), y: q.plotTop + Z[1] - { high: 0.5, middle: 0.25, low: 0 }[it.align] * Z[2] + (it.y || 0) };
- }
- function t(Z) {
- Z.beforeSetTickPositions = k, Z.createLabelCollector = b, Z.getCrosshairPosition = v, Z.getLinePath = h, Z.getOffset = c, Z.getPlotBandPath = u, Z.getPlotLinePath = i, Z.getPosition = p, Z.getTitlePosition = a, Z.postTranslate = X, Z.setAxisSize = m, Z.setAxisTranslation = L, Z.setOptions = z;
- }
- function s() {
- var Z = this.chart, q = this.options, it = this.pane, et = it && it.options;
- Z.angular && this.isXAxis || !it || !Z.angular && !Z.polar || (this.angleRad = (q.angle || 0) * Math.PI / 180, this.startAngleRad = (et.startAngle - 90) * Math.PI / 180, this.endAngleRad = (f(et.endAngle, et.startAngle + 360) - 90) * Math.PI / 180, this.offset = q.offset || 0);
- }
- function n(Z) {
- this.isRadial && (Z.align = void 0, Z.preventDefault());
- }
- function P() {
- if (this.chart && this.chart.labelCollectors) {
- var Z = this.labelCollector ? this.chart.labelCollectors.indexOf(this.labelCollector) : -1;
- 0 <= Z && this.chart.labelCollectors.splice(Z, 1);
- }
- }
- function D(Z) {
- var q = this.chart, it = q.inverted, et = q.angular, nt = q.polar, rt = this.isXAxis, ct = this.coll, gt = et && rt, dt = q.options;
- Z = Z.userOptions.pane || 0, Z = this.pane = q.pane && q.pane[Z];
- var ht;
- ct === "colorAxis" ? this.isRadial = !1 : (et ? (gt ? (this.isHidden = !0, this.createLabelCollector = S, this.getOffset = G, this.render = this.redraw = g, this.setTitle = this.setCategories = this.setScale = G) : t(this), (ht = !rt) && (this.defaultPolarOptions = H)) : nt && (t(this), this.defaultPolarOptions = (ht = this.horiz) ? A : x(ct === "xAxis" ? o.defaultXAxisOptions : o.defaultYAxisOptions, Y), it && ct === "yAxis" && (this.defaultPolarOptions.stackLabels = o.defaultYAxisOptions.stackLabels, this.defaultPolarOptions.reversedStacks = !0)), et || nt ? (this.isRadial = !0, dt.chart.zoomType = null, this.labelCollector || (this.labelCollector = this.createLabelCollector()), this.labelCollector && q.labelCollectors.push(this.labelCollector)) : this.isRadial = !1, Z && ht && (Z.axis = this), this.isCircular = ht);
- }
- function I() {
- this.isRadial && this.beforeSetTickPositions();
- }
- function W(Z) {
- var q = this.label;
- if (q) {
- var it = this.axis, et = q.getBBox(), nt = it.options.labels, rt = (it.translate(this.pos) + it.startAngleRad + Math.PI / 2) / Math.PI * 180 % 360, ct = Math.round(rt), gt = B(nt.y) ? 0 : 0.3 * -et.height, dt = nt.y, ht = 20, at = nt.align, J = "end", tt = 0 > ct ? ct + 360 : ct, ot = tt, lt = 0, pt = 0;
- if (it.isRadial) {
- var yt = it.getPosition(this.pos, it.center[2] / 2 + l(f(nt.distance, -25), it.center[2] / 2, -it.center[2] / 2));
- nt.rotation === "auto" ? q.attr({ rotation: rt }) : B(dt) || (dt = it.chart.renderer.fontMetrics(q.styles && q.styles.fontSize).b - et.height / 2), B(at) || (it.isCircular ? (et.width > it.len * it.tickInterval / (it.max - it.min) && (ht = 0), at = rt > ht && rt < 180 - ht ? "left" : rt > 180 + ht && rt < 360 - ht ? "right" : "center") : at = "center", q.attr({ align: at })), at === "auto" && it.tickPositions.length === 2 && it.isCircular && (90 < tt && 180 > tt ? tt = 180 - tt : 270 < tt && 360 >= tt && (tt = 540 - tt), 180 < ot && 360 >= ot && (ot = 360 - ot), (it.pane.options.startAngle === ct || it.pane.options.startAngle === ct + 360 || it.pane.options.startAngle === ct - 360) && (J = "start"), at = -90 <= ct && 90 >= ct || -360 <= ct && -270 >= ct || 270 <= ct && 360 >= ct ? J === "start" ? "right" : "left" : J === "start" ? "left" : "right", 70 < ot && 110 > ot && (at = "center"), 15 > tt || 180 <= tt && 195 > tt ? lt = 0.3 * et.height : 15 <= tt && 35 >= tt ? lt = J === "start" ? 0 : 0.75 * et.height : 195 <= tt && 215 >= tt ? lt = J === "start" ? 0.75 * et.height : 0 : 35 < tt && 90 >= tt ? lt = J === "start" ? 0.25 * -et.height : et.height : 215 < tt && 270 >= tt && (lt = J === "start" ? et.height : 0.25 * -et.height), 15 > ot ? pt = J === "start" ? 0.15 * -et.height : 0.15 * et.height : 165 < ot && 180 >= ot && (pt = J === "start" ? 0.15 * et.height : 0.15 * -et.height), q.attr({ align: at }), q.translate(
- pt,
- lt + gt
- )), Z.pos.x = yt.x + (nt.x || 0), Z.pos.y = yt.y + (dt || 0);
- }
- }
- }
- function E(Z) {
- this.axis.getPosition && j(Z.pos, this.axis.getPosition(this.pos));
- }
- function X(Z, q) {
- var it = this.chart, et = this.center;
- return Z = this.startAngleRad + Z, { x: it.plotLeft + et[0] + Math.cos(Z) * q, y: it.plotTop + et[1] + Math.sin(Z) * q };
- }
- function g() {
- this.isDirty = !1;
- }
- function m() {
- if (this.constructor.prototype.setAxisSize.call(this), this.isRadial) {
- this.pane.updateCenter(this);
- var Z = this.center = this.pane.center.slice();
- if (this.isCircular)
- this.sector = this.endAngleRad - this.startAngleRad;
- else {
- var q = this.postTranslate(this.angleRad, Z[3] / 2);
- Z[0] = q.x - this.chart.plotLeft, Z[1] = q.y - this.chart.plotTop;
- }
- this.len = this.width = this.height = (Z[2] - Z[3]) * f(this.sector, 1) / 2;
- }
- }
- function L() {
- this.constructor.prototype.setAxisTranslation.call(this), this.center && (this.transA = this.isCircular ? (this.endAngleRad - this.startAngleRad) / (this.max - this.min || 1) : (this.center[2] - this.center[3]) / 2 / (this.max - this.min || 1), this.minPixelPadding = this.isXAxis ? this.transA * this.minPointOffset : 0);
- }
- function z(Z) {
- Z = this.options = x(this.constructor.defaultOptions, this.defaultPolarOptions, U[this.coll], Z), Z.plotBands || (Z.plotBands = []), w(this, "afterSetOptions");
- }
- function $(Z, q, it, et, nt, rt, ct) {
- var gt = this.axis;
- return gt.isRadial ? (Z = gt.getPosition(this.pos, gt.center[2] / 2 + et), q = ["M", q, it, "L", Z.x, Z.y]) : q = Z.call(this, q, it, et, nt, rt, ct), q;
- }
- var Q = [], A = { gridLineWidth: 1, labels: { align: void 0, distance: 15, x: 0, y: void 0, style: { textOverflow: "none" } }, maxPadding: 0, minPadding: 0, showLastLabel: !1, tickLength: 0 }, H = {
- labels: { align: "center", x: 0, y: void 0 },
- minorGridLineWidth: 0,
- minorTickInterval: "auto",
- minorTickLength: 10,
- minorTickPosition: "inside",
- minorTickWidth: 1,
- tickLength: 10,
- tickPosition: "inside",
- tickWidth: 2,
- title: { rotation: 0 },
- zIndex: 2
- }, Y = { gridLineInterpolation: "circle", gridLineWidth: 1, labels: { align: "right", x: -3, y: -2 }, showLastLabel: !1, title: { x: 4, text: null, rotation: 90 } };
- R.compose = function(Z, q) {
- return Q.indexOf(Z) === -1 && (Q.push(Z), V(Z, "afterInit", s), V(Z, "autoLabelAlign", n), V(Z, "destroy", P), V(Z, "init", D), V(Z, "initialAxisTranslation", I)), Q.indexOf(q) === -1 && (Q.push(q), V(
- q,
- "afterGetLabelPosition",
- W
- ), V(q, "afterGetPosition", E), T(q.prototype, "getMarkPath", $)), Z;
- };
- }(O || (O = {})), O;
- }), C(d, "Series/AreaRange/AreaRangePoint.js", [d["Series/Area/AreaSeries.js"], d["Core/Series/Point.js"], d["Core/Utilities.js"]], function(o, y, N) {
- var _ = this && this.__extends || function() {
- var F = function(B, j) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, x) {
- w.__proto__ = x;
- } || function(w, x) {
- for (var f in x)
- x.hasOwnProperty(f) && (w[f] = x[f]);
- }, F(B, j);
- };
- return function(B, j) {
- function w() {
- this.constructor = B;
- }
- F(B, j), B.prototype = j === null ? Object.create(j) : (w.prototype = j.prototype, new w());
- };
- }(), U = y.prototype, G = N.defined, V = N.isNumber;
- return function(F) {
- function B() {
- var j = F !== null && F.apply(this, arguments) || this;
- return j.high = void 0, j.low = void 0, j.options = void 0, j.plotHigh = void 0, j.plotLow = void 0, j.plotHighX = void 0, j.plotLowX = void 0, j.plotX = void 0, j.series = void 0, j;
- }
- return _(B, F), B.prototype.setState = function() {
- var j = this.state, w = this.series, x = w.chart.polar;
- G(this.plotHigh) || (this.plotHigh = w.yAxis.toPixels(
- this.high,
- !0
- )), G(this.plotLow) || (this.plotLow = this.plotY = w.yAxis.toPixels(this.low, !0)), w.stateMarkerGraphic && (w.lowerStateMarkerGraphic = w.stateMarkerGraphic, w.stateMarkerGraphic = w.upperStateMarkerGraphic), this.graphic = this.upperGraphic, this.plotY = this.plotHigh, x && (this.plotX = this.plotHighX), U.setState.apply(this, arguments), this.state = j, this.plotY = this.plotLow, this.graphic = this.lowerGraphic, x && (this.plotX = this.plotLowX), w.stateMarkerGraphic && (w.upperStateMarkerGraphic = w.stateMarkerGraphic, w.stateMarkerGraphic = w.lowerStateMarkerGraphic, w.lowerStateMarkerGraphic = void 0), U.setState.apply(this, arguments);
- }, B.prototype.haloPath = function() {
- var j = this.series.chart.polar, w = [];
- return this.plotY = this.plotLow, j && (this.plotX = this.plotLowX), this.isInside && (w = U.haloPath.apply(this, arguments)), this.plotY = this.plotHigh, j && (this.plotX = this.plotHighX), this.isTopInside && (w = w.concat(U.haloPath.apply(this, arguments))), w;
- }, B.prototype.isValid = function() {
- return V(this.low) && V(this.high);
- }, B;
- }(o.prototype.pointClass);
- }), C(
- d,
- "Series/AreaRange/AreaRangeSeries.js",
- [d["Series/AreaRange/AreaRangePoint.js"], d["Series/Area/AreaSeries.js"], d["Series/Column/ColumnSeries.js"], d["Core/Globals.js"], d["Core/Series/Series.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]],
- function(o, y, N, _, U, G, V) {
- var F = this && this.__extends || function() {
- var R = function(k, b) {
- return R = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, v) {
- S.__proto__ = v;
- } || function(S, v) {
- for (var h in v)
- v.hasOwnProperty(h) && (S[h] = v[h]);
- }, R(k, b);
- };
- return function(k, b) {
- function S() {
- this.constructor = k;
- }
- R(k, b), k.prototype = b === null ? Object.create(b) : (S.prototype = b.prototype, new S());
- };
- }(), B = y.prototype, j = N.prototype;
- N = _.noop;
- var w = U.prototype, x = V.defined, f = V.extend, l = V.isArray, T = V.pick, O = V.merge;
- return U = function(R) {
- function k() {
- var b = R !== null && R.apply(this, arguments) || this;
- return b.data = void 0, b.options = void 0, b.points = void 0, b.lowerStateMarkerGraphic = void 0, b.xAxis = void 0, b;
- }
- return F(k, R), k.prototype.toYData = function(b) {
- return [b.low, b.high];
- }, k.prototype.highToXY = function(b) {
- var S = this.chart, v = this.xAxis.postTranslate(b.rectPlotX || 0, this.yAxis.len - b.plotHigh);
- b.plotHighX = v.x - S.plotLeft, b.plotHigh = v.y - S.plotTop, b.plotLowX = b.plotX;
- }, k.prototype.translate = function() {
- var b = this, S = b.yAxis;
- B.translate.apply(b), b.points.forEach(function(v) {
- var h = v.high, c = v.plotY;
- v.isNull ? v.plotY = null : (v.plotLow = c, v.plotHigh = S.translate(b.dataModify ? b.dataModify.modifyValue(h) : h, 0, 1, 0, 1), b.dataModify && (v.yBottom = v.plotHigh));
- }), this.chart.polar && this.points.forEach(function(v) {
- b.highToXY(v), v.tooltipPos = [(v.plotHighX + v.plotLowX) / 2, (v.plotHigh + v.plotLow) / 2];
- });
- }, k.prototype.getGraphPath = function(b) {
- var S = [], v = [], h, c = B.getGraphPath, u = this.options, i = this.chart.polar, p = i && u.connectEnds !== !1, a = u.connectNulls, t = u.step;
- for (b = b || this.points, h = b.length; h--; ) {
- var s = b[h], n = i ? { plotX: s.rectPlotX, plotY: s.yBottom, doCurve: !1 } : { plotX: s.plotX, plotY: s.plotY, doCurve: !1 };
- s.isNull || p || a || b[h + 1] && !b[h + 1].isNull || v.push(n);
- var P = { polarPlotY: s.polarPlotY, rectPlotX: s.rectPlotX, yBottom: s.yBottom, plotX: T(
- s.plotHighX,
- s.plotX
- ), plotY: s.plotHigh, isNull: s.isNull };
- v.push(P), S.push(P), s.isNull || p || a || b[h - 1] && !b[h - 1].isNull || v.push(n);
- }
- return b = c.call(this, b), t && (t === !0 && (t = "left"), u.step = { left: "right", center: "center", right: "left" }[t]), S = c.call(this, S), v = c.call(this, v), u.step = t, u = [].concat(b, S), !this.chart.polar && v[0] && v[0][0] === "M" && (v[0] = ["L", v[0][1], v[0][2]]), this.graphPath = u, this.areaPath = b.concat(v), u.isArea = !0, u.xMap = b.xMap, this.areaPath.xMap = b.xMap, u;
- }, k.prototype.drawDataLabels = function() {
- var b = this.points, S = b.length, v, h = [], c = this.options.dataLabels, u, i = this.chart.inverted;
- if (c) {
- if (l(c))
- var p = c[0] || { enabled: !1 }, a = c[1] || { enabled: !1 };
- else
- p = f({}, c), p.x = c.xHigh, p.y = c.yHigh, a = f({}, c), a.x = c.xLow, a.y = c.yLow;
- if (p.enabled || this._hasPointLabels) {
- for (v = S; v--; )
- if (u = b[v]) {
- var t = p.inside ? u.plotHigh < u.plotLow : u.plotHigh > u.plotLow;
- u.y = u.high, u._plotY = u.plotY, u.plotY = u.plotHigh, h[v] = u.dataLabel, u.dataLabel = u.dataLabelUpper, u.below = t, i ? p.align || (p.align = t ? "right" : "left") : p.verticalAlign || (p.verticalAlign = t ? "top" : "bottom");
- }
- for (this.options.dataLabels = p, w.drawDataLabels && w.drawDataLabels.apply(this, arguments), v = S; v--; )
- (u = b[v]) && (u.dataLabelUpper = u.dataLabel, u.dataLabel = h[v], delete u.dataLabels, u.y = u.low, u.plotY = u._plotY);
- }
- if (a.enabled || this._hasPointLabels) {
- for (v = S; v--; )
- (u = b[v]) && (t = a.inside ? u.plotHigh < u.plotLow : u.plotHigh > u.plotLow, u.below = !t, i ? a.align || (a.align = t ? "left" : "right") : a.verticalAlign || (a.verticalAlign = t ? "bottom" : "top"));
- this.options.dataLabels = a, w.drawDataLabels && w.drawDataLabels.apply(this, arguments);
- }
- if (p.enabled)
- for (v = S; v--; )
- (u = b[v]) && (u.dataLabels = [u.dataLabelUpper, u.dataLabel].filter(function(s) {
- return !!s;
- }));
- this.options.dataLabels = c;
- }
- }, k.prototype.alignDataLabel = function() {
- j.alignDataLabel.apply(this, arguments);
- }, k.prototype.drawPoints = function() {
- var b = this.points.length, S;
- for (w.drawPoints.apply(this, arguments), S = 0; S < b; ) {
- var v = this.points[S];
- v.origProps = { plotY: v.plotY, plotX: v.plotX, isInside: v.isInside, negative: v.negative, zone: v.zone, y: v.y }, v.lowerGraphic = v.graphic, v.graphic = v.upperGraphic, v.plotY = v.plotHigh, x(v.plotHighX) && (v.plotX = v.plotHighX), v.y = T(v.high, v.origProps.y), v.negative = v.y < (this.options.threshold || 0), this.zones.length && (v.zone = v.getZone()), this.chart.polar || (v.isInside = v.isTopInside = typeof v.plotY < "u" && 0 <= v.plotY && v.plotY <= this.yAxis.len && 0 <= v.plotX && v.plotX <= this.xAxis.len), S++;
- }
- for (w.drawPoints.apply(this, arguments), S = 0; S < b; )
- v = this.points[S], v.upperGraphic = v.graphic, v.graphic = v.lowerGraphic, v.origProps && (f(v, v.origProps), delete v.origProps), S++;
- }, k.defaultOptions = O(y.defaultOptions, {
- lineWidth: 1,
- threshold: null,
- tooltip: { pointFormat: '<span style="color:{series.color}">●</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>' },
- trackByArea: !0,
- dataLabels: { align: void 0, verticalAlign: void 0, xLow: 0, xHigh: 0, yLow: 0, yHigh: 0 }
- }), k;
- }(y), f(U.prototype, { pointArrayMap: ["low", "high"], pointValKey: "low", deferTranslatePolar: !0, pointClass: o, setStackedPoints: N }), G.registerSeriesType("arearange", U), U;
- }
- ), C(d, "Series/AreaSplineRange/AreaSplineRangeSeries.js", [
- d["Series/AreaRange/AreaRangeSeries.js"],
- d["Core/Series/SeriesRegistry.js"],
- d["Core/Utilities.js"]
- ], function(o, y, N) {
- var _ = this && this.__extends || function() {
- var F = function(B, j) {
- return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, x) {
- w.__proto__ = x;
- } || function(w, x) {
- for (var f in x)
- x.hasOwnProperty(f) && (w[f] = x[f]);
- }, F(B, j);
- };
- return function(B, j) {
- function w() {
- this.constructor = B;
- }
- F(B, j), B.prototype = j === null ? Object.create(j) : (w.prototype = j.prototype, new w());
- };
- }(), U = y.seriesTypes.spline, G = N.merge;
- N = N.extend;
- var V = function(F) {
- function B() {
- var j = F !== null && F.apply(this, arguments) || this;
- return j.options = void 0, j.data = void 0, j.points = void 0, j;
- }
- return _(B, F), B.defaultOptions = G(o.defaultOptions), B;
- }(o);
- return N(V.prototype, { getPointSpline: U.prototype.getPointSpline }), y.registerSeriesType("areasplinerange", V), V;
- }), C(d, "Series/BoxPlot/BoxPlotSeries.js", [d["Series/Column/ColumnSeries.js"], d["Core/Globals.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(o, y, N, _) {
- var U = this && this.__extends || function() {
- var B = function(j, w) {
- return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, f) {
- x.__proto__ = f;
- } || function(x, f) {
- for (var l in f)
- f.hasOwnProperty(l) && (x[l] = f[l]);
- }, B(j, w);
- };
- return function(j, w) {
- function x() {
- this.constructor = j;
- }
- B(j, w), j.prototype = w === null ? Object.create(w) : (x.prototype = w.prototype, new x());
- };
- }();
- y = y.noop;
- var G = _.extend, V = _.merge, F = _.pick;
- return _ = function(B) {
- function j() {
- var w = B !== null && B.apply(this, arguments) || this;
- return w.data = void 0, w.options = void 0, w.points = void 0, w;
- }
- return U(j, B), j.prototype.pointAttribs = function() {
- return {};
- }, j.prototype.translate = function() {
- var w = this.yAxis, x = this.pointArrayMap;
- B.prototype.translate.apply(this), this.points.forEach(function(f) {
- x.forEach(function(l) {
- f[l] !== null && (f[l + "Plot"] = w.translate(f[l], 0, 1, 0, 1));
- }), f.plotHigh = f.highPlot;
- });
- }, j.prototype.drawPoints = function() {
- var w = this, x = w.options, f = w.chart, l = f.renderer, T, O, R, k, b, S, v = 0, h, c, u, i, p = w.doQuartiles !== !1, a, t = w.options.whiskerLength;
- w.points.forEach(function(s) {
- var n = s.graphic, P = n ? "animate" : "attr", D = s.shapeArgs, I = {}, W = {}, E = {}, X = {}, g = s.color || w.color;
- typeof s.plotY < "u" && (h = Math.round(D.width), c = Math.floor(D.x), u = c + h, i = Math.round(h / 2), T = Math.floor(p ? s.q1Plot : s.lowPlot), O = Math.floor(p ? s.q3Plot : s.lowPlot), R = Math.floor(s.highPlot), k = Math.floor(s.lowPlot), n || (s.graphic = n = l.g("point").add(w.group), s.stem = l.path().addClass("highcharts-boxplot-stem").add(n), t && (s.whiskers = l.path().addClass("highcharts-boxplot-whisker").add(n)), p && (s.box = l.path(void 0).addClass("highcharts-boxplot-box").add(n)), s.medianShape = l.path(void 0).addClass("highcharts-boxplot-median").add(n)), f.styledMode || (W.stroke = s.stemColor || x.stemColor || g, W["stroke-width"] = F(s.stemWidth, x.stemWidth, x.lineWidth), W.dashstyle = s.stemDashStyle || x.stemDashStyle || x.dashStyle, s.stem.attr(W), t && (E.stroke = s.whiskerColor || x.whiskerColor || g, E["stroke-width"] = F(s.whiskerWidth, x.whiskerWidth, x.lineWidth), E.dashstyle = s.whiskerDashStyle || x.whiskerDashStyle || x.dashStyle, s.whiskers.attr(E)), p && (I.fill = s.fillColor || x.fillColor || g, I.stroke = x.lineColor || g, I["stroke-width"] = x.lineWidth || 0, I.dashstyle = s.boxDashStyle || x.boxDashStyle || x.dashStyle, s.box.attr(I)), X.stroke = s.medianColor || x.medianColor || g, X["stroke-width"] = F(s.medianWidth, x.medianWidth, x.lineWidth), X.dashstyle = s.medianDashStyle || x.medianDashStyle || x.dashStyle, s.medianShape.attr(X)), S = s.stem.strokeWidth() % 2 / 2, v = c + i + S, n = [["M", v, O], ["L", v, R], ["M", v, T], ["L", v, k]], s.stem[P]({ d: n }), p && (S = s.box.strokeWidth() % 2 / 2, T = Math.floor(T) + S, O = Math.floor(O) + S, c += S, u += S, n = [["M", c, O], ["L", c, T], ["L", u, T], ["L", u, O], ["L", c, O], ["Z"]], s.box[P]({ d: n })), t && (S = s.whiskers.strokeWidth() % 2 / 2, R += S, k += S, a = /%$/.test(t) ? i * parseFloat(t) / 100 : t / 2, n = [["M", v - a, R], ["L", v + a, R], ["M", v - a, k], ["L", v + a, k]], s.whiskers[P]({ d: n })), b = Math.round(s.medianPlot), S = s.medianShape.strokeWidth() % 2 / 2, b += S, n = [["M", c, b], ["L", u, b]], s.medianShape[P]({ d: n }));
- });
- }, j.prototype.toYData = function(w) {
- return [w.low, w.q1, w.median, w.q3, w.high];
- }, j.defaultOptions = V(o.defaultOptions, {
- threshold: null,
- tooltip: { pointFormat: '<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>Maximum: {point.high}<br/>Upper quartile: {point.q3}<br/>Median: {point.median}<br/>Lower quartile: {point.q1}<br/>Minimum: {point.low}<br/>' },
- whiskerLength: "50%",
- fillColor: "#ffffff",
- lineWidth: 1,
- medianWidth: 2,
- whiskerWidth: 2
- }), j;
- }(o), G(_.prototype, { pointArrayMap: ["low", "q1", "median", "q3", "high"], pointValKey: "high", drawDataLabels: y, setStackedPoints: y }), N.registerSeriesType("boxplot", _), _;
- }), C(d, "Series/Bubble/BubbleLegendDefaults.js", [], function() {
- return { borderColor: void 0, borderWidth: 2, className: void 0, color: void 0, connectorClassName: void 0, connectorColor: void 0, connectorDistance: 60, connectorWidth: 1, enabled: !1, labels: {
- className: void 0,
- allowOverlap: !1,
- format: "",
- formatter: void 0,
- align: "right",
- style: { fontSize: "10px", color: "#000000" },
- x: 0,
- y: 0
- }, maxSize: 60, minSize: 10, legendIndex: 0, ranges: { value: void 0, borderColor: void 0, color: void 0, connectorColor: void 0 }, sizeBy: "area", sizeByAbsoluteValue: !1, zIndex: 1, zThreshold: 0 };
- }), C(d, "Series/Bubble/BubbleLegendItem.js", [d["Core/Color/Color.js"], d["Core/FormatUtilities.js"], d["Core/Globals.js"], d["Core/Utilities.js"]], function(o, y, N, _) {
- var U = o.parse, G = N.noop, V = _.arrayMax, F = _.arrayMin, B = _.isNumber, j = _.merge, w = _.pick, x = _.stableSort;
- return function() {
- function f(l, T) {
- this.options = this.symbols = this.visible = this.selected = this.ranges = this.movementX = this.maxLabel = this.legendSymbol = this.legendItemWidth = this.legendItemHeight = this.legendItem = this.legendGroup = this.legend = this.fontMetrics = this.chart = void 0, this.setState = G, this.init(l, T);
- }
- return f.prototype.init = function(l, T) {
- this.options = l, this.visible = !0, this.chart = T.chart, this.legend = T;
- }, f.prototype.addToLegend = function(l) {
- l.splice(
- this.options.legendIndex,
- 0,
- this
- );
- }, f.prototype.drawLegendSymbol = function(l) {
- var T = this.chart, O = this.options, R = w(l.options.itemDistance, 20), k = O.ranges, b = O.connectorDistance;
- this.fontMetrics = T.renderer.fontMetrics(O.labels.style.fontSize), k && k.length && B(k[0].value) ? (x(k, function(S, v) {
- return v.value - S.value;
- }), this.ranges = k, this.setOptions(), this.render(), l = this.getMaxLabelSize(), k = this.ranges[0].radius, T = 2 * k, b = b - k + l.width, b = 0 < b ? b : 0, this.maxLabel = l, this.movementX = O.labels.align === "left" ? b : 0, this.legendItemWidth = T + b + R, this.legendItemHeight = T + this.fontMetrics.h / 2) : l.options.bubbleLegend.autoRanges = !0;
- }, f.prototype.setOptions = function() {
- var l = this.ranges, T = this.options, O = this.chart.series[T.seriesIndex], R = this.legend.baseline, k = { zIndex: T.zIndex, "stroke-width": T.borderWidth }, b = { zIndex: T.zIndex, "stroke-width": T.connectorWidth }, S = { align: this.legend.options.rtl || T.labels.align === "left" ? "right" : "left", zIndex: T.zIndex }, v = O.options.marker.fillOpacity, h = this.chart.styledMode;
- l.forEach(function(c, u) {
- h || (k.stroke = w(c.borderColor, T.borderColor, O.color), k.fill = w(c.color, T.color, v !== 1 ? U(O.color).setOpacity(v).get("rgba") : O.color), b.stroke = w(c.connectorColor, T.connectorColor, O.color)), l[u].radius = this.getRangeRadius(c.value), l[u] = j(l[u], { center: l[0].radius - l[u].radius + R }), h || j(!0, l[u], { bubbleAttribs: j(k), connectorAttribs: j(b), labelAttribs: S });
- }, this);
- }, f.prototype.getRangeRadius = function(l) {
- var T = this.options;
- return this.chart.series[this.options.seriesIndex].getRadius.call(
- this,
- T.ranges[T.ranges.length - 1].value,
- T.ranges[0].value,
- T.minSize,
- T.maxSize,
- l
- );
- }, f.prototype.render = function() {
- var l = this.chart.renderer, T = this.options.zThreshold;
- this.symbols || (this.symbols = { connectors: [], bubbleItems: [], labels: [] }), this.legendSymbol = l.g("bubble-legend"), this.legendItem = l.g("bubble-legend-item"), this.legendSymbol.translateX = 0, this.legendSymbol.translateY = 0, this.ranges.forEach(function(O) {
- O.value >= T && this.renderRange(O);
- }, this), this.legendSymbol.add(this.legendItem), this.legendItem.add(this.legendGroup), this.hideOverlappingLabels();
- }, f.prototype.renderRange = function(l) {
- var T = this.options, O = T.labels, R = this.chart, k = R.series[T.seriesIndex], b = R.renderer, S = this.symbols;
- R = S.labels;
- var v = l.center, h = Math.abs(l.radius), c = T.connectorDistance || 0, u = O.align, i = T.connectorWidth, p = this.ranges[0].radius || 0, a = v - h - T.borderWidth / 2 + i / 2, t = this.fontMetrics;
- t = t.f / 2 - (t.h - t.f) / 2;
- var s = b.styledMode;
- c = this.legend.options.rtl || u === "left" ? -c : c, u === "center" && (c = 0, T.connectorDistance = 0, l.labelAttribs.align = "center"), u = a + T.labels.y;
- var n = p + c + T.labels.x;
- S.bubbleItems.push(b.circle(
- p,
- v + ((a % 1 ? 1 : 0.5) - (i % 2 ? 0 : 0.5)),
- h
- ).attr(s ? {} : l.bubbleAttribs).addClass((s ? "highcharts-color-" + k.colorIndex + " " : "") + "highcharts-bubble-legend-symbol " + (T.className || "")).add(this.legendSymbol)), S.connectors.push(b.path(b.crispLine([["M", p, a], ["L", p + c, a]], T.connectorWidth)).attr(s ? {} : l.connectorAttribs).addClass((s ? "highcharts-color-" + this.options.seriesIndex + " " : "") + "highcharts-bubble-legend-connectors " + (T.connectorClassName || "")).add(this.legendSymbol)), l = b.text(this.formatLabel(l), n, u + t).attr(s ? {} : l.labelAttribs).css(s ? {} : O.style).addClass("highcharts-bubble-legend-labels " + (T.labels.className || "")).add(this.legendSymbol), R.push(l), l.placed = !0, l.alignAttr = { x: n, y: u + t };
- }, f.prototype.getMaxLabelSize = function() {
- var l, T;
- return this.symbols.labels.forEach(function(O) {
- T = O.getBBox(!0), l = l ? T.width > l.width ? T : l : T;
- }), l || {};
- }, f.prototype.formatLabel = function(l) {
- var T = this.options, O = T.labels.formatter;
- T = T.labels.format;
- var R = this.chart.numberFormatter;
- return T ? y.format(T, l) : O ? O.call(l) : R(l.value, 1);
- }, f.prototype.hideOverlappingLabels = function() {
- var l = this.chart, T = this.symbols;
- !this.options.labels.allowOverlap && T && (l.hideOverlappingLabels(T.labels), T.labels.forEach(function(O, R) {
- O.newOpacity ? O.newOpacity !== O.oldOpacity && T.connectors[R].show() : T.connectors[R].hide();
- }));
- }, f.prototype.getRanges = function() {
- var l = this.legend.bubbleLegend, T = l.options.ranges, O, R = Number.MAX_VALUE, k = -Number.MAX_VALUE;
- l.chart.series.forEach(function(S) {
- S.isBubble && !S.ignoreSeries && (O = S.zData.filter(B), O.length && (R = w(S.options.zMin, Math.min(R, Math.max(
- F(O),
- S.options.displayNegative === !1 ? S.options.zThreshold : -Number.MAX_VALUE
- ))), k = w(S.options.zMax, Math.max(k, V(O)))));
- });
- var b = R === k ? [{ value: k }] : [{ value: R }, { value: (R + k) / 2 }, { value: k, autoRanges: !0 }];
- return T.length && T[0].radius && b.reverse(), b.forEach(function(S, v) {
- T && T[v] && (b[v] = j(T[v], S));
- }), b;
- }, f.prototype.predictBubbleSizes = function() {
- var l = this.chart, T = this.fontMetrics, O = l.legend.options, R = O.floating, k = (O = O.layout === "horizontal") ? l.legend.lastLineHeight : 0, b = l.plotSizeX, S = l.plotSizeY, v = l.series[this.options.seriesIndex], h = v.getPxExtremes();
- l = Math.ceil(h.minPxSize), h = Math.ceil(h.maxPxSize);
- var c = Math.min(S, b);
- return v = v.options.maxSize, R || !/%$/.test(v) ? T = h : (v = parseFloat(v), T = (c + k - T.h / 2) * v / 100 / (v / 100 + 1), (O && S - T >= b || !O && b - T >= S) && (T = h)), [l, Math.ceil(T)];
- }, f.prototype.updateRanges = function(l, T) {
- var O = this.legend.options.bubbleLegend;
- O.minSize = l, O.maxSize = T, O.ranges = this.getRanges();
- }, f.prototype.correctSizes = function() {
- var l = this.legend, T = this.chart.series[this.options.seriesIndex].getPxExtremes();
- 1 < Math.abs(Math.ceil(T.maxPxSize) - this.options.maxSize) && (this.updateRanges(this.options.minSize, T.maxPxSize), l.render());
- }, f;
- }();
- }), C(d, "Series/Bubble/BubbleLegendComposition.js", [d["Series/Bubble/BubbleLegendDefaults.js"], d["Series/Bubble/BubbleLegendItem.js"], d["Core/DefaultOptions.js"], d["Core/Utilities.js"]], function(o, y, N, _) {
- var U = N.setOptions, G = _.addEvent, V = _.objectEach, F = _.wrap, B;
- return function(j) {
- function w(k, b, S) {
- var v = this.legend, h = 0 <= x(this);
- if (v && v.options.enabled && v.bubbleLegend && v.options.bubbleLegend.autoRanges && h) {
- var c = v.bubbleLegend.options;
- h = v.bubbleLegend.predictBubbleSizes(), v.bubbleLegend.updateRanges(h[0], h[1]), c.placed || (v.group.placed = !1, v.allItems.forEach(function(u) {
- u.legendGroup.translateY = null;
- })), v.render(), this.getMargins(), this.axes.forEach(function(u) {
- u.visible && u.render(), c.placed || (u.setScale(), u.updateNames(), V(u.ticks, function(i) {
- i.isNew = !0, i.isNewLabel = !0;
- }));
- }), c.placed = !0, this.getMargins(), k.call(this, b, S), v.bubbleLegend.correctSizes(), O(v, f(v));
- } else
- k.call(this, b, S), v && v.options.enabled && v.bubbleLegend && (v.render(), O(v, f(v)));
- }
- function x(k) {
- k = k.series;
- for (var b = 0; b < k.length; ) {
- if (k[b] && k[b].isBubble && k[b].visible && k[b].zData.length)
- return b;
- b++;
- }
- return -1;
- }
- function f(k) {
- k = k.allItems;
- var b = [], S = k.length, v, h = 0;
- for (v = 0; v < S; v++)
- if (k[v].legendItemHeight && (k[v].itemHeight = k[v].legendItemHeight), k[v] === k[S - 1] || k[v + 1] && k[v]._legendItemPos[1] !== k[v + 1]._legendItemPos[1]) {
- b.push({ height: 0 });
- var c = b[b.length - 1];
- for (h; h <= v; h++)
- k[h].itemHeight > c.height && (c.height = k[h].itemHeight);
- c.step = v;
- }
- return b;
- }
- function l(k) {
- var b = this.bubbleLegend, S = this.options, v = S.bubbleLegend, h = x(this.chart);
- b && b.ranges && b.ranges.length && (v.ranges.length && (v.autoRanges = !!v.ranges[0].autoRanges), this.destroyItem(b)), 0 <= h && S.enabled && v.enabled && (v.seriesIndex = h, this.bubbleLegend = new y(v, this), this.bubbleLegend.addToLegend(k.allItems));
- }
- function T() {
- var k = this.chart, b = this.visible, S = this.chart.legend;
- S && S.bubbleLegend && (this.visible = !b, this.ignoreSeries = b, k = 0 <= x(k), S.bubbleLegend.visible !== k && (S.update({ bubbleLegend: { enabled: k } }), S.bubbleLegend.visible = k), this.visible = b);
- }
- function O(k, b) {
- var S = k.options.rtl, v, h, c, u = 0;
- k.allItems.forEach(function(i, p) {
- v = i.legendGroup.translateX, h = i._legendItemPos[1], ((c = i.movementX) || S && i.ranges) && (c = S ? v - i.options.maxSize / 2 : v + c, i.legendGroup.attr({ translateX: c })), p > b[u].step && u++, i.legendGroup.attr({ translateY: Math.round(h + b[u].height / 2) }), i._legendItemPos[1] = h + b[u].height / 2;
- });
- }
- var R = [];
- j.compose = function(k, b, S) {
- R.indexOf(k) === -1 && (R.push(k), U({ legend: { bubbleLegend: o } }), F(k.prototype, "drawChartBox", w)), R.indexOf(b) === -1 && (R.push(b), G(b, "afterGetAllItems", l)), R.indexOf(S) === -1 && (R.push(S), G(S, "legendItemClick", T));
- };
- }(B || (B = {})), B;
- }), C(d, "Series/Bubble/BubblePoint.js", [d["Core/Series/Point.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(o, y, N) {
- var _ = this && this.__extends || function() {
- var U = function(G, V) {
- return U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(F, B) {
- F.__proto__ = B;
- } || function(F, B) {
- for (var j in B)
- B.hasOwnProperty(j) && (F[j] = B[j]);
- }, U(G, V);
- };
- return function(G, V) {
- function F() {
- this.constructor = G;
- }
- U(G, V), G.prototype = V === null ? Object.create(V) : (F.prototype = V.prototype, new F());
- };
- }();
- return N = N.extend, y = function(U) {
- function G() {
- var V = U !== null && U.apply(this, arguments) || this;
- return V.options = void 0, V.series = void 0, V;
- }
- return _(G, U), G.prototype.haloPath = function(V) {
- return o.prototype.haloPath.call(this, V === 0 ? 0 : (this.marker && this.marker.radius || 0) + V);
- }, G;
- }(y.seriesTypes.scatter.prototype.pointClass), N(y.prototype, { ttBelow: !1 }), y;
- }), C(d, "Series/Bubble/BubbleSeries.js", [
- d["Core/Axis/Axis.js"],
- d["Series/Bubble/BubbleLegendComposition.js"],
- d["Series/Bubble/BubblePoint.js"],
- d["Core/Color/Color.js"],
- d["Core/Globals.js"],
- d["Core/Series/Series.js"],
- d["Core/Series/SeriesRegistry.js"],
- d["Core/Utilities.js"]
- ], function(o, y, N, _, U, G, V, F) {
- var B = this && this.__extends || function() {
- var S = function(v, h) {
- return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(c, u) {
- c.__proto__ = u;
- } || function(c, u) {
- for (var i in u)
- u.hasOwnProperty(i) && (c[i] = u[i]);
- }, S(v, h);
- };
- return function(v, h) {
- function c() {
- this.constructor = v;
- }
- S(v, h), v.prototype = h === null ? Object.create(h) : (c.prototype = h.prototype, new c());
- };
- }(), j = _.parse;
- _ = U.noop;
- var w = V.seriesTypes;
- U = w.column;
- var x = w.scatter;
- w = F.addEvent;
- var f = F.arrayMax, l = F.arrayMin, T = F.clamp, O = F.extend, R = F.isNumber, k = F.merge, b = F.pick;
- return F = function(S) {
- function v() {
- var h = S !== null && S.apply(this, arguments) || this;
- return h.data = void 0, h.maxPxSize = void 0, h.minPxSize = void 0, h.options = void 0, h.points = void 0, h.radii = void 0, h.yData = void 0, h.zData = void 0, h;
- }
- return B(v, S), v.prototype.animate = function(h) {
- !h && this.points.length < this.options.animationLimit && this.points.forEach(function(c) {
- var u = c.graphic;
- u && u.width && (this.hasRendered || u.attr({ x: c.plotX, y: c.plotY, width: 1, height: 1 }), u.animate(this.markerAttribs(c), this.options.animation));
- }, this);
- }, v.prototype.getRadii = function() {
- var h = this, c = this.zData, u = this.yData, i = [], p = this.chart.bubbleZExtremes, a = this.getPxExtremes(), t = a.minPxSize, s = a.maxPxSize;
- if (!p) {
- var n = Number.MAX_VALUE, P = -Number.MAX_VALUE, D;
- this.chart.series.forEach(function(E) {
- E.bubblePadding && (E.visible || !h.chart.options.chart.ignoreHiddenSeries) && (E = E.getZExtremes()) && (n = Math.min(n || E.zMin, E.zMin), P = Math.max(P || E.zMax, E.zMax), D = !0);
- }), D ? (p = { zMin: n, zMax: P }, this.chart.bubbleZExtremes = p) : p = { zMin: 0, zMax: 0 };
- }
- var I = 0;
- for (a = c.length; I < a; I++) {
- var W = c[I];
- i.push(this.getRadius(p.zMin, p.zMax, t, s, W, u[I]));
- }
- this.radii = i;
- }, v.prototype.getRadius = function(h, c, u, i, p, a) {
- var t = this.options, s = t.sizeBy !== "width", n = t.zThreshold, P = c - h, D = 0.5;
- if (a === null || p === null)
- return null;
- if (R(p)) {
- if (t.sizeByAbsoluteValue && (p = Math.abs(p - n), P = Math.max(c - n, Math.abs(h - n)), h = 0), p < h)
- return u / 2 - 1;
- 0 < P && (D = (p - h) / P);
- }
- return s && 0 <= D && (D = Math.sqrt(D)), Math.ceil(u + D * (i - u)) / 2;
- }, v.prototype.hasData = function() {
- return !!this.processedXData.length;
- }, v.prototype.pointAttribs = function(h, c) {
- var u = this.options.marker.fillOpacity;
- return h = G.prototype.pointAttribs.call(this, h, c), u !== 1 && (h.fill = j(h.fill).setOpacity(u).get("rgba")), h;
- }, v.prototype.translate = function() {
- S.prototype.translate.call(this), this.getRadii(), this.translateBubble();
- }, v.prototype.translateBubble = function() {
- for (var h = this.data, c = this.radii, u = this.getPxExtremes().minPxSize, i = h.length; i--; ) {
- var p = h[i], a = c ? c[i] : 0;
- R(a) && a >= u / 2 ? (p.marker = O(p.marker, { radius: a, width: 2 * a, height: 2 * a }), p.dlBox = { x: p.plotX - a, y: p.plotY - a, width: 2 * a, height: 2 * a }) : p.shapeArgs = p.plotY = p.dlBox = void 0;
- }
- }, v.prototype.getPxExtremes = function() {
- var h = Math.min(this.chart.plotWidth, this.chart.plotHeight), c = function(i) {
- if (typeof i == "string") {
- var p = /%$/.test(i);
- i = parseInt(i, 10);
- }
- return p ? h * i / 100 : i;
- }, u = c(b(this.options.minSize, 8));
- return c = Math.max(c(b(this.options.maxSize, "20%")), u), {
- minPxSize: u,
- maxPxSize: c
- };
- }, v.prototype.getZExtremes = function() {
- var h = this.options, c = (this.zData || []).filter(R);
- if (c.length) {
- var u = b(h.zMin, T(l(c), h.displayNegative === !1 ? h.zThreshold || 0 : -Number.MAX_VALUE, Number.MAX_VALUE));
- if (h = b(h.zMax, f(c)), R(u) && R(h))
- return { zMin: u, zMax: h };
- }
- }, v.compose = y.compose, v.defaultOptions = k(x.defaultOptions, { dataLabels: { formatter: function() {
- var h = this.series.chart.numberFormatter, c = this.point.z;
- return R(c) ? h(c, -1) : "";
- }, inside: !0, verticalAlign: "middle" }, animationLimit: 250, marker: {
- lineColor: null,
- lineWidth: 1,
- fillOpacity: 0.5,
- radius: null,
- states: { hover: { radiusPlus: 0 } },
- symbol: "circle"
- }, minSize: 8, maxSize: "20%", softThreshold: !1, states: { hover: { halo: { size: 5 } } }, tooltip: { pointFormat: "({point.x}, {point.y}), Size: {point.z}" }, turboThreshold: 0, zThreshold: 0, zoneAxis: "z" }), v;
- }(x), O(F.prototype, {
- alignDataLabel: U.prototype.alignDataLabel,
- applyZones: _,
- bubblePadding: !0,
- buildKDTree: _,
- directTouch: !0,
- isBubble: !0,
- pointArrayMap: ["y", "z"],
- pointClass: N,
- parallelArrays: ["x", "y", "z"],
- trackerGroups: ["group", "dataLabelsGroup"],
- specialGroup: "group",
- zoneAxis: "z"
- }), w(F, "updatedData", function(S) {
- delete S.target.chart.bubbleZExtremes;
- }), o.prototype.beforePadding = function() {
- var S = this, v = this.len, h = this.chart, c = 0, u = v, i = this.isXAxis, p = i ? "xData" : "yData", a = this.min, t = this.max - a, s = v / t, n;
- this.series.forEach(function(P) {
- if (P.bubblePadding && (P.visible || !h.options.chart.ignoreHiddenSeries)) {
- n = S.allowZoomOutside = !0;
- var D = P[p];
- if (i && P.getRadii(0, 0, P), 0 < t) {
- for (var I = D.length; I--; )
- if (R(D[I]) && S.dataMin <= D[I] && D[I] <= S.max) {
- var W = P.radii && P.radii[I] || 0;
- c = Math.min((D[I] - a) * s - W, c), u = Math.max((D[I] - a) * s + W, u);
- }
- }
- }
- }), n && 0 < t && !this.logarithmic && (u -= v, s *= (v + Math.max(0, c) - Math.min(u, v)) / v, [["min", "userMin", c], ["max", "userMax", u]].forEach(function(P) {
- typeof b(S.options[P[0]], S[P[1]]) > "u" && (S[P[0]] += P[2] / s);
- }));
- }, V.registerSeriesType("bubble", F), F;
- }), C(d, "Series/ColumnRange/ColumnRangePoint.js", [d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(o, y) {
- var N = this && this.__extends || function() {
- var V = function(F, B) {
- return V = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(j, w) {
- j.__proto__ = w;
- } || function(j, w) {
- for (var x in w)
- w.hasOwnProperty(x) && (j[x] = w[x]);
- }, V(F, B);
- };
- return function(F, B) {
- function j() {
- this.constructor = F;
- }
- V(F, B), F.prototype = B === null ? Object.create(B) : (j.prototype = B.prototype, new j());
- };
- }(), _ = o.seriesTypes;
- o = _.column.prototype.pointClass;
- var U = y.extend, G = y.isNumber;
- return y = function(V) {
- function F() {
- var B = V !== null && V.apply(this, arguments) || this;
- return B.series = void 0, B.options = void 0, B.barX = void 0, B.pointWidth = void 0, B.shapeType = void 0, B;
- }
- return N(F, V), F.prototype.isValid = function() {
- return G(this.low);
- }, F;
- }(_.arearange.prototype.pointClass), U(y.prototype, { setState: o.prototype.setState }), y;
- }), C(d, "Series/ColumnRange/ColumnRangeSeries.js", [d["Series/ColumnRange/ColumnRangePoint.js"], d["Core/Globals.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(o, y, N, _) {
- var U = this && this.__extends || function() {
- var T = function(O, R) {
- return T = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(k, b) {
- k.__proto__ = b;
- } || function(k, b) {
- for (var S in b)
- b.hasOwnProperty(S) && (k[S] = b[S]);
- }, T(O, R);
- };
- return function(O, R) {
- function k() {
- this.constructor = O;
- }
- T(O, R), O.prototype = R === null ? Object.create(R) : (k.prototype = R.prototype, new k());
- };
- }();
- y = y.noop;
- var G = N.seriesTypes, V = G.arearange, F = G.column, B = F.prototype, j = V.prototype, w = _.clamp, x = _.merge, f = _.pick;
- _ = _.extend;
- var l = { pointRange: null, marker: null, states: { hover: { halo: !1 } } };
- return G = function(T) {
- function O() {
- var R = T !== null && T.apply(this, arguments) || this;
- return R.data = void 0, R.points = void 0, R.options = void 0, R;
- }
- return U(O, T), O.prototype.setOptions = function() {
- return x(!0, arguments[0], { stacking: void 0 }), j.setOptions.apply(this, arguments);
- }, O.prototype.translate = function() {
- var R = this, k = R.yAxis, b = R.xAxis, S = b.startAngleRad, v, h = R.chart, c = R.xAxis.isRadial, u = Math.max(h.chartWidth, h.chartHeight) + 999, i;
- B.translate.apply(R), R.points.forEach(function(p) {
- var a = p.shapeArgs || {}, t = R.options.minPointLength;
- p.plotHigh = i = w(k.translate(p.high, 0, 1, 0, 1), -u, u), p.plotLow = w(p.plotY, -u, u);
- var s = i, n = f(
- p.rectPlotY,
- p.plotY
- ) - i;
- Math.abs(n) < t ? (t -= n, n += t, s -= t / 2) : 0 > n && (n *= -1, s -= n), c ? (v = p.barX + S, p.shapeType = "arc", p.shapeArgs = R.polarArc(s + n, s, v, v + p.pointWidth)) : (a.height = n, a.y = s, t = a.x, t = t === void 0 ? 0 : t, a = a.width, a = a === void 0 ? 0 : a, p.tooltipPos = h.inverted ? [k.len + k.pos - h.plotLeft - s - n / 2, b.len + b.pos - h.plotTop - t - a / 2, n] : [b.left - h.plotLeft + t + a / 2, k.pos - h.plotTop + s + n / 2, n]);
- });
- }, O.prototype.crispCol = function() {
- return B.crispCol.apply(this, arguments);
- }, O.prototype.drawPoints = function() {
- return B.drawPoints.apply(this, arguments);
- }, O.prototype.drawTracker = function() {
- return B.drawTracker.apply(this, arguments);
- }, O.prototype.getColumnMetrics = function() {
- return B.getColumnMetrics.apply(this, arguments);
- }, O.prototype.pointAttribs = function() {
- return B.pointAttribs.apply(this, arguments);
- }, O.prototype.adjustForMissingColumns = function() {
- return B.adjustForMissingColumns.apply(this, arguments);
- }, O.prototype.animate = function() {
- return B.animate.apply(this, arguments);
- }, O.prototype.translate3dPoints = function() {
- return B.translate3dPoints.apply(this, arguments);
- }, O.prototype.translate3dShapes = function() {
- return B.translate3dShapes.apply(this, arguments);
- }, O.defaultOptions = x(F.defaultOptions, V.defaultOptions, l), O;
- }(V), _(G.prototype, { directTouch: !0, trackerGroups: ["group", "dataLabelsGroup"], drawGraph: y, getSymbol: y, polarArc: function() {
- return B.polarArc.apply(this, arguments);
- }, pointClass: o }), N.registerSeriesType("columnrange", G), G;
- }), C(d, "Series/ColumnPyramid/ColumnPyramidSeries.js", [d["Series/Column/ColumnSeries.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(o, y, N) {
- var _ = this && this.__extends || function() {
- var B = function(j, w) {
- return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, f) {
- x.__proto__ = f;
- } || function(x, f) {
- for (var l in f)
- f.hasOwnProperty(l) && (x[l] = f[l]);
- }, B(j, w);
- };
- return function(j, w) {
- function x() {
- this.constructor = j;
- }
- B(j, w), j.prototype = w === null ? Object.create(w) : (x.prototype = w.prototype, new x());
- };
- }(), U = o.prototype, G = N.clamp, V = N.merge, F = N.pick;
- return N = function(B) {
- function j() {
- var w = B !== null && B.apply(this, arguments) || this;
- return w.data = void 0, w.options = void 0, w.points = void 0, w;
- }
- return _(j, B), j.prototype.translate = function() {
- var w = this, x = w.chart, f = w.options, l = w.dense = 2 > w.closestPointRange * w.xAxis.transA;
- l = w.borderWidth = F(f.borderWidth, l ? 0 : 1);
- var T = w.yAxis, O = f.threshold, R = w.translatedThreshold = T.getThreshold(O), k = F(f.minPointLength, 5), b = w.getColumnMetrics(), S = b.width, v = w.barW = Math.max(S, 1 + 2 * l), h = w.pointXOffset = b.offset;
- x.inverted && (R -= 0.5), f.pointPadding && (v = Math.ceil(v)), U.translate.apply(w), w.points.forEach(function(c) {
- var u = F(c.yBottom, R), i = 999 + Math.abs(u), p = G(c.plotY, -i, T.len + i);
- i = c.plotX + h;
- var a = v / 2, t = Math.min(p, u);
- u = Math.max(p, u) - t;
- var s;
- c.barX = i, c.pointWidth = S, c.tooltipPos = x.inverted ? [T.len + T.pos - x.plotLeft - p, w.xAxis.len - i - a, u] : [i + a, p + T.pos - x.plotTop, u], p = O + (c.total || c.y), f.stacking === "percent" && (p = O + (0 > c.y) ? -100 : 100), p = T.toPixels(p, !0);
- var n = (s = x.plotHeight - p - (x.plotHeight - R)) ? a * (t - p) / s : 0, P = s ? a * (t + u - p) / s : 0;
- s = i - n + a, n = i + n + a;
- var D = i + P + a;
- P = i - P + a;
- var I = t - k, W = t + u;
- 0 > c.y && (I = t, W = t + u + k), x.inverted && (D = T.width - t, s = p - (T.width - R), n = a * (p - D) / s, P = a * (p - (D - u)) / s, s = i + a + n, n = s - 2 * n, D = i - P + a, P = i + P + a, I = t, W = t + u - k, 0 > c.y && (W = t + u + k)), c.shapeType = "path", c.shapeArgs = { x: s, y: I, width: n - s, height: u, d: [["M", s, I], ["L", n, I], ["L", D, W], ["L", P, W], ["Z"]] };
- });
- }, j.defaultOptions = V(o.defaultOptions, {}), j;
- }(o), y.registerSeriesType("columnpyramid", N), N;
- }), C(d, "Series/ErrorBar/ErrorBarSeries.js", [d["Series/BoxPlot/BoxPlotSeries.js"], d["Series/Column/ColumnSeries.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(o, y, N, _) {
- var U = this && this.__extends || function() {
- var B = function(j, w) {
- return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, f) {
- x.__proto__ = f;
- } || function(x, f) {
- for (var l in f)
- f.hasOwnProperty(l) && (x[l] = f[l]);
- }, B(j, w);
- };
- return function(j, w) {
- function x() {
- this.constructor = j;
- }
- B(j, w), j.prototype = w === null ? Object.create(w) : (x.prototype = w.prototype, new x());
- };
- }(), G = N.seriesTypes.arearange, V = _.merge;
- _ = _.extend;
- var F = function(B) {
- function j() {
- var w = B !== null && B.apply(this, arguments) || this;
- return w.data = void 0, w.options = void 0, w.points = void 0, w;
- }
- return U(j, B), j.prototype.getColumnMetrics = function() {
- return this.linkedParent && this.linkedParent.columnMetrics || y.prototype.getColumnMetrics.call(this);
- }, j.prototype.drawDataLabels = function() {
- var w = this.pointValKey;
- G && (G.prototype.drawDataLabels.call(this), this.data.forEach(function(x) {
- x.y = x[w];
- }));
- }, j.prototype.toYData = function(w) {
- return [w.low, w.high];
- }, j.defaultOptions = V(o.defaultOptions, {
- color: "#000000",
- grouping: !1,
- linkedTo: ":previous",
- tooltip: { pointFormat: '<span style="color:{point.color}">●</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>' },
- whiskerWidth: null
- }), j;
- }(o);
- return _(F.prototype, { pointArrayMap: ["low", "high"], pointValKey: "high", doQuartiles: !1 }), N.registerSeriesType("errorbar", F), F;
- }), C(d, "Series/Gauge/GaugePoint.js", [d["Core/Series/SeriesRegistry.js"]], function(o) {
- var y = this && this.__extends || function() {
- var N = function(_, U) {
- return N = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(G, V) {
- G.__proto__ = V;
- } || function(G, V) {
- for (var F in V)
- V.hasOwnProperty(F) && (G[F] = V[F]);
- }, N(_, U);
- };
- return function(_, U) {
- function G() {
- this.constructor = _;
- }
- N(_, U), _.prototype = U === null ? Object.create(U) : (G.prototype = U.prototype, new G());
- };
- }();
- return function(N) {
- function _() {
- var U = N !== null && N.apply(this, arguments) || this;
- return U.options = void 0, U.series = void 0, U.shapeArgs = void 0, U;
- }
- return y(_, N), _.prototype.setState = function(U) {
- this.state = U;
- }, _;
- }(o.series.prototype.pointClass);
- }), C(d, "Series/Gauge/GaugeSeries.js", [d["Series/Gauge/GaugePoint.js"], d["Core/Globals.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(o, y, N, _) {
- var U = this && this.__extends || function() {
- var l = function(T, O) {
- return l = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(R, k) {
- R.__proto__ = k;
- } || function(R, k) {
- for (var b in k)
- k.hasOwnProperty(b) && (R[b] = k[b]);
- }, l(T, O);
- };
- return function(T, O) {
- function R() {
- this.constructor = T;
- }
- l(T, O), T.prototype = O === null ? Object.create(O) : (R.prototype = O.prototype, new R());
- };
- }();
- y = y.noop;
- var G = N.series, V = N.seriesTypes.column, F = _.clamp, B = _.isNumber, j = _.extend, w = _.merge, x = _.pick, f = _.pInt;
- return _ = function(l) {
- function T() {
- var O = l !== null && l.apply(this, arguments) || this;
- return O.data = void 0, O.points = void 0, O.options = void 0, O.yAxis = void 0, O;
- }
- return U(T, l), T.prototype.translate = function() {
- var O = this.yAxis, R = this.options, k = O.center;
- this.generatePoints(), this.points.forEach(function(b) {
- var S = w(R.dial, b.dial), v = f(x(S.radius, "80%")) * k[2] / 200, h = f(x(S.baseLength, "70%")) * v / 100, c = f(x(S.rearLength, "10%")) * v / 100, u = S.baseWidth || 3, i = S.topWidth || 1, p = R.overshoot, a = O.startAngleRad + O.translate(b.y, null, null, null, !0);
- (B(p) || R.wrap === !1) && (p = B(p) ? p / 180 * Math.PI : 0, a = F(
- a,
- O.startAngleRad - p,
- O.endAngleRad + p
- )), a = 180 * a / Math.PI, b.shapeType = "path", b.shapeArgs = { d: S.path || [["M", -c, -u / 2], ["L", h, -u / 2], ["L", v, -i / 2], ["L", v, i / 2], ["L", h, u / 2], ["L", -c, u / 2], ["Z"]], translateX: k[0], translateY: k[1], rotation: a }, b.plotX = k[0], b.plotY = k[1];
- });
- }, T.prototype.drawPoints = function() {
- var O = this, R = O.chart, k = O.yAxis.center, b = O.pivot, S = O.options, v = S.pivot, h = R.renderer;
- O.points.forEach(function(c) {
- var u = c.graphic, i = c.shapeArgs, p = i.d, a = w(S.dial, c.dial);
- u ? (u.animate(i), i.d = p) : c.graphic = h[c.shapeType](i).attr({
- rotation: i.rotation,
- zIndex: 1
- }).addClass("highcharts-dial").add(O.group), R.styledMode || c.graphic[u ? "animate" : "attr"]({ stroke: a.borderColor || "none", "stroke-width": a.borderWidth || 0, fill: a.backgroundColor || "#000000" });
- }), b ? b.animate({ translateX: k[0], translateY: k[1] }) : (O.pivot = h.circle(0, 0, x(v.radius, 5)).attr({ zIndex: 2 }).addClass("highcharts-pivot").translate(k[0], k[1]).add(O.group), R.styledMode || O.pivot.attr({ "stroke-width": v.borderWidth || 0, stroke: v.borderColor || "#cccccc", fill: v.backgroundColor || "#000000" }));
- }, T.prototype.animate = function(O) {
- var R = this;
- O || R.points.forEach(function(k) {
- var b = k.graphic;
- b && (b.attr({ rotation: 180 * R.yAxis.startAngleRad / Math.PI }), b.animate({ rotation: k.shapeArgs.rotation }, R.options.animation));
- });
- }, T.prototype.render = function() {
- this.group = this.plotGroup("group", "series", this.visible ? "visible" : "hidden", this.options.zIndex, this.chart.seriesGroup), G.prototype.render.call(this), this.group.clip(this.chart.clipRect);
- }, T.prototype.setData = function(O, R) {
- G.prototype.setData.call(this, O, !1), this.processData(), this.generatePoints(), x(R, !0) && this.chart.redraw();
- }, T.prototype.hasData = function() {
- return !!this.points.length;
- }, T.defaultOptions = w(G.defaultOptions, { dataLabels: { borderColor: "#cccccc", borderRadius: 3, borderWidth: 1, crop: !1, defer: !1, enabled: !0, verticalAlign: "top", y: 15, zIndex: 2 }, dial: {}, pivot: {}, tooltip: { headerFormat: "" }, showInLegend: !1 }), T;
- }(G), j(_.prototype, { angular: !0, directTouch: !0, drawGraph: y, drawTracker: V.prototype.drawTracker, fixedBox: !0, forceDL: !0, noSharedTooltip: !0, pointClass: o, trackerGroups: [
- "group",
- "dataLabelsGroup"
- ] }), N.registerSeriesType("gauge", _), _;
- }), C(d, "Series/PackedBubble/PackedBubblePoint.js", [d["Core/Chart/Chart.js"], d["Core/Series/Point.js"], d["Core/Series/SeriesRegistry.js"]], function(o, y, N) {
- var _ = this && this.__extends || function() {
- var U = function(G, V) {
- return U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(F, B) {
- F.__proto__ = B;
- } || function(F, B) {
- for (var j in B)
- B.hasOwnProperty(j) && (F[j] = B[j]);
- }, U(G, V);
- };
- return function(G, V) {
- function F() {
- this.constructor = G;
- }
- U(G, V), G.prototype = V === null ? Object.create(V) : (F.prototype = V.prototype, new F());
- };
- }();
- return function(U) {
- function G() {
- var V = U !== null && U.apply(this, arguments) || this;
- return V.degree = NaN, V.mass = NaN, V.radius = NaN, V.options = void 0, V.series = void 0, V.value = null, V;
- }
- return _(G, U), G.prototype.destroy = function() {
- return this.series.layout && this.series.layout.removeElementFromCollection(this, this.series.layout.nodes), y.prototype.destroy.apply(this, arguments);
- }, G.prototype.firePointEvent = function() {
- var V = this.series.options;
- if (this.isParentNode && V.parentNode) {
- var F = V.allowPointSelect;
- V.allowPointSelect = V.parentNode.allowPointSelect, y.prototype.firePointEvent.apply(this, arguments), V.allowPointSelect = F;
- } else
- y.prototype.firePointEvent.apply(this, arguments);
- }, G.prototype.select = function() {
- var V = this.series.chart;
- this.isParentNode ? (V.getSelectedPoints = V.getSelectedParentNodes, y.prototype.select.apply(this, arguments), V.getSelectedPoints = o.prototype.getSelectedPoints) : y.prototype.select.apply(this, arguments);
- }, G;
- }(N.seriesTypes.bubble.prototype.pointClass);
- }), C(d, "Series/Networkgraph/DraggableNodes.js", [d["Core/Chart/Chart.js"], d["Core/Globals.js"], d["Core/Utilities.js"]], function(o, y, N) {
- var _ = N.addEvent;
- y.dragNodesMixin = { onMouseDown: function(U, G) {
- G = this.chart.pointer.normalize(G), U.fixedPosition = { chartX: G.chartX, chartY: G.chartY, plotX: U.plotX, plotY: U.plotY }, U.inDragMode = !0;
- }, onMouseMove: function(U, G) {
- if (U.fixedPosition && U.inDragMode) {
- var V = this.chart, F = V.pointer.normalize(G);
- G = U.fixedPosition.chartX - F.chartX, F = U.fixedPosition.chartY - F.chartY;
- var B = void 0, j = void 0, w = V.graphLayoutsLookup;
- (5 < Math.abs(G) || 5 < Math.abs(F)) && (B = U.fixedPosition.plotX - G, j = U.fixedPosition.plotY - F, V.isInsidePlot(B, j) && (U.plotX = B, U.plotY = j, U.hasDragged = !0, this.redrawHalo(U), w.forEach(function(x) {
- x.restartSimulation();
- })));
- }
- }, onMouseUp: function(U, G) {
- U.fixedPosition && (U.hasDragged && (this.layout.enableSimulation ? this.layout.start() : this.chart.redraw()), U.inDragMode = U.hasDragged = !1, this.options.fixedDraggable || delete U.fixedPosition);
- }, redrawHalo: function(U) {
- U && this.halo && this.halo.attr({ d: U.haloPath(this.options.states.hover.halo.size) });
- } }, _(o, "load", function() {
- var U = this, G, V, F;
- U.container && (G = _(U.container, "mousedown", function(B) {
- var j = U.hoverPoint;
- j && j.series && j.series.hasDraggableNodes && j.series.options.draggable && (j.series.onMouseDown(j, B), V = _(U.container, "mousemove", function(w) {
- return j && j.series && j.series.onMouseMove(j, w);
- }), F = _(U.container.ownerDocument, "mouseup", function(w) {
- return V(), F(), j && j.series && j.series.onMouseUp(j, w);
- }));
- })), _(U, "destroy", function() {
- G();
- });
- });
- }), C(
- d,
- "Series/Networkgraph/Integrations.js",
- [d["Core/Globals.js"]],
- function(o) {
- o.networkgraphIntegrations = { verlet: { attractiveForceFunction: function(y, N) {
- return (N - y) / y;
- }, repulsiveForceFunction: function(y, N) {
- return (N - y) / y * (N > y ? 1 : 0);
- }, barycenter: function() {
- var y = this.options.gravitationalConstant, N = this.barycenter.xFactor, _ = this.barycenter.yFactor;
- N = (N - (this.box.left + this.box.width) / 2) * y, _ = (_ - (this.box.top + this.box.height) / 2) * y, this.nodes.forEach(function(U) {
- U.fixedPosition || (U.plotX -= N / U.mass / U.degree, U.plotY -= _ / U.mass / U.degree);
- });
- }, repulsive: function(y, N, _) {
- N = N * this.diffTemperature / y.mass / y.degree, y.fixedPosition || (y.plotX += _.x * N, y.plotY += _.y * N);
- }, attractive: function(y, N, _) {
- var U = y.getMass(), G = -_.x * N * this.diffTemperature;
- N = -_.y * N * this.diffTemperature, y.fromNode.fixedPosition || (y.fromNode.plotX -= G * U.fromNode / y.fromNode.degree, y.fromNode.plotY -= N * U.fromNode / y.fromNode.degree), y.toNode.fixedPosition || (y.toNode.plotX += G * U.toNode / y.toNode.degree, y.toNode.plotY += N * U.toNode / y.toNode.degree);
- }, integrate: function(y, N) {
- var _ = -y.options.friction, U = y.options.maxSpeed, G = (N.plotX + N.dispX - N.prevX) * _;
- _ *= N.plotY + N.dispY - N.prevY;
- var V = Math.abs, F = V(G) / (G || 1);
- V = V(_) / (_ || 1), G = F * Math.min(U, Math.abs(G)), _ = V * Math.min(U, Math.abs(_)), N.prevX = N.plotX + N.dispX, N.prevY = N.plotY + N.dispY, N.plotX += G, N.plotY += _, N.temperature = y.vectorLength({ x: G, y: _ });
- }, getK: function(y) {
- return Math.pow(y.box.width * y.box.height / y.nodes.length, 0.5);
- } }, euler: { attractiveForceFunction: function(y, N) {
- return y * y / N;
- }, repulsiveForceFunction: function(y, N) {
- return N * N / y;
- }, barycenter: function() {
- var y = this.options.gravitationalConstant, N = this.barycenter.xFactor, _ = this.barycenter.yFactor;
- this.nodes.forEach(function(U) {
- if (!U.fixedPosition) {
- var G = U.getDegree();
- G *= 1 + G / 2, U.dispX += (N - U.plotX) * y * G / U.degree, U.dispY += (_ - U.plotY) * y * G / U.degree;
- }
- });
- }, repulsive: function(y, N, _, U) {
- y.dispX += _.x / U * N / y.degree, y.dispY += _.y / U * N / y.degree;
- }, attractive: function(y, N, _, U) {
- var G = y.getMass(), V = _.x / U * N;
- N *= _.y / U, y.fromNode.fixedPosition || (y.fromNode.dispX -= V * G.fromNode / y.fromNode.degree, y.fromNode.dispY -= N * G.fromNode / y.fromNode.degree), y.toNode.fixedPosition || (y.toNode.dispX += V * G.toNode / y.toNode.degree, y.toNode.dispY += N * G.toNode / y.toNode.degree);
- }, integrate: function(y, N) {
- N.dispX += N.dispX * y.options.friction, N.dispY += N.dispY * y.options.friction;
- var _ = N.temperature = y.vectorLength({ x: N.dispX, y: N.dispY });
- _ !== 0 && (N.plotX += N.dispX / _ * Math.min(Math.abs(N.dispX), y.temperature), N.plotY += N.dispY / _ * Math.min(Math.abs(N.dispY), y.temperature));
- }, getK: function(y) {
- return Math.pow(y.box.width * y.box.height / y.nodes.length, 0.3);
- } } };
- }
- ), C(
- d,
- "Series/Networkgraph/QuadTree.js",
- [d["Core/Globals.js"], d["Core/Utilities.js"]],
- function(o, y) {
- y = y.extend;
- var N = o.QuadTreeNode = function(_) {
- this.box = _, this.boxSize = Math.min(_.width, _.height), this.nodes = [], this.body = this.isInternal = !1, this.isEmpty = !0;
- };
- y(N.prototype, { insert: function(_, U) {
- this.isInternal ? this.nodes[this.getBoxPosition(_)].insert(_, U - 1) : (this.isEmpty = !1, this.body ? U ? (this.isInternal = !0, this.divideBox(), this.body !== !0 && (this.nodes[this.getBoxPosition(this.body)].insert(this.body, U - 1), this.body = !0), this.nodes[this.getBoxPosition(_)].insert(_, U - 1)) : (U = new N({
- top: _.plotX,
- left: _.plotY,
- width: 0.1,
- height: 0.1
- }), U.body = _, U.isInternal = !1, this.nodes.push(U)) : (this.isInternal = !1, this.body = _));
- }, updateMassAndCenter: function() {
- var _ = 0, U = 0, G = 0;
- this.isInternal ? (this.nodes.forEach(function(V) {
- V.isEmpty || (_ += V.mass, U += V.plotX * V.mass, G += V.plotY * V.mass);
- }), U /= _, G /= _) : this.body && (_ = this.body.mass, U = this.body.plotX, G = this.body.plotY), this.mass = _, this.plotX = U, this.plotY = G;
- }, divideBox: function() {
- var _ = this.box.width / 2, U = this.box.height / 2;
- this.nodes[0] = new N({
- left: this.box.left,
- top: this.box.top,
- width: _,
- height: U
- }), this.nodes[1] = new N({ left: this.box.left + _, top: this.box.top, width: _, height: U }), this.nodes[2] = new N({ left: this.box.left + _, top: this.box.top + U, width: _, height: U }), this.nodes[3] = new N({ left: this.box.left, top: this.box.top + U, width: _, height: U });
- }, getBoxPosition: function(_) {
- var U = _.plotY < this.box.top + this.box.height / 2;
- return _.plotX < this.box.left + this.box.width / 2 ? U ? 0 : 3 : U ? 1 : 2;
- } }), o = o.QuadTree = function(_, U, G, V) {
- this.box = { left: _, top: U, width: G, height: V }, this.maxDepth = 25, this.root = new N(
- this.box,
- "0"
- ), this.root.isInternal = !0, this.root.isRoot = !0, this.root.divideBox();
- }, y(o.prototype, { insertNodes: function(_) {
- _.forEach(function(U) {
- this.root.insert(U, this.maxDepth);
- }, this);
- }, visitNodeRecursive: function(_, U, G) {
- var V;
- _ || (_ = this.root), _ === this.root && U && (V = U(_)), V !== !1 && (_.nodes.forEach(function(F) {
- if (F.isInternal) {
- if (U && (V = U(F)), V === !1)
- return;
- this.visitNodeRecursive(F, U, G);
- } else
- F.body && U && U(F.body);
- G && G(F);
- }, this), _ === this.root && G && G(_));
- }, calculateMassAndCenter: function() {
- this.visitNodeRecursive(
- null,
- null,
- function(_) {
- _.updateMassAndCenter();
- }
- );
- } });
- }
- ), C(d, "Series/Networkgraph/Layouts.js", [d["Core/Chart/Chart.js"], d["Core/Animation/AnimationUtilities.js"], d["Core/Globals.js"], d["Core/Utilities.js"]], function(o, y, N, _) {
- var U = y.setAnimation;
- y = _.addEvent;
- var G = _.clamp, V = _.defined, F = _.extend, B = _.isFunction, j = _.pick;
- N.layouts = { "reingold-fruchterman": function() {
- } }, F(N.layouts["reingold-fruchterman"].prototype, {
- init: function(w) {
- this.options = w, this.nodes = [], this.links = [], this.series = [], this.box = {
- x: 0,
- y: 0,
- width: 0,
- height: 0
- }, this.setInitialRendering(!0), this.integration = N.networkgraphIntegrations[w.integration], this.enableSimulation = w.enableSimulation, this.attractiveForce = j(w.attractiveForce, this.integration.attractiveForceFunction), this.repulsiveForce = j(w.repulsiveForce, this.integration.repulsiveForceFunction), this.approximation = w.approximation;
- },
- updateSimulation: function(w) {
- this.enableSimulation = j(w, this.options.enableSimulation);
- },
- start: function() {
- var w = this.series, x = this.options;
- this.currentStep = 0, this.forces = w[0] && w[0].forces || [], this.chart = w[0] && w[0].chart, this.initialRendering && (this.initPositions(), w.forEach(function(f) {
- f.finishedAnimating = !0, f.render();
- })), this.setK(), this.resetSimulation(x), this.enableSimulation && this.step();
- },
- step: function() {
- var w = this, x = this.series;
- w.currentStep++, w.approximation === "barnes-hut" && (w.createQuadTree(), w.quadTree.calculateMassAndCenter()), w.forces.forEach(function(f) {
- w[f + "Forces"](w.temperature);
- }), w.applyLimits(w.temperature), w.temperature = w.coolDown(
- w.startTemperature,
- w.diffTemperature,
- w.currentStep
- ), w.prevSystemTemperature = w.systemTemperature, w.systemTemperature = w.getSystemTemperature(), w.enableSimulation && (x.forEach(function(f) {
- f.chart && f.render();
- }), w.maxIterations-- && isFinite(w.temperature) && !w.isStable() ? (w.simulation && N.win.cancelAnimationFrame(w.simulation), w.simulation = N.win.requestAnimationFrame(function() {
- w.step();
- })) : w.simulation = !1);
- },
- stop: function() {
- this.simulation && N.win.cancelAnimationFrame(this.simulation);
- },
- setArea: function(w, x, f, l) {
- this.box = {
- left: w,
- top: x,
- width: f,
- height: l
- };
- },
- setK: function() {
- this.k = this.options.linkLength || this.integration.getK(this);
- },
- addElementsToCollection: function(w, x) {
- w.forEach(function(f) {
- x.indexOf(f) === -1 && x.push(f);
- });
- },
- removeElementFromCollection: function(w, x) {
- w = x.indexOf(w), w !== -1 && x.splice(w, 1);
- },
- clear: function() {
- this.nodes.length = 0, this.links.length = 0, this.series.length = 0, this.resetSimulation();
- },
- resetSimulation: function() {
- this.forcedStop = !1, this.systemTemperature = 0, this.setMaxIterations(), this.setTemperature(), this.setDiffTemperature();
- },
- restartSimulation: function() {
- this.simulation ? this.resetSimulation() : (this.setInitialRendering(!1), this.enableSimulation ? this.start() : this.setMaxIterations(1), this.chart && this.chart.redraw(), this.setInitialRendering(!0));
- },
- setMaxIterations: function(w) {
- this.maxIterations = j(w, this.options.maxIterations);
- },
- setTemperature: function() {
- this.temperature = this.startTemperature = Math.sqrt(this.nodes.length);
- },
- setDiffTemperature: function() {
- this.diffTemperature = this.startTemperature / (this.options.maxIterations + 1);
- },
- setInitialRendering: function(w) {
- this.initialRendering = w;
- },
- createQuadTree: function() {
- this.quadTree = new N.QuadTree(this.box.left, this.box.top, this.box.width, this.box.height), this.quadTree.insertNodes(this.nodes);
- },
- initPositions: function() {
- var w = this.options.initialPositions;
- B(w) ? (w.call(this), this.nodes.forEach(function(x) {
- V(x.prevX) || (x.prevX = x.plotX), V(x.prevY) || (x.prevY = x.plotY), x.dispX = 0, x.dispY = 0;
- })) : w === "circle" ? this.setCircularPositions() : this.setRandomPositions();
- },
- setCircularPositions: function() {
- function w(b) {
- b.linksFrom.forEach(function(S) {
- R[S.toNode.id] || (R[S.toNode.id] = !0, O.push(S.toNode), w(S.toNode));
- });
- }
- var x = this.box, f = this.nodes, l = 2 * Math.PI / (f.length + 1), T = f.filter(function(b) {
- return b.linksTo.length === 0;
- }), O = [], R = {}, k = this.options.initialPositionRadius;
- T.forEach(function(b) {
- O.push(b), w(b);
- }), O.length ? f.forEach(function(b) {
- O.indexOf(b) === -1 && O.push(b);
- }) : O = f, O.forEach(function(b, S) {
- b.plotX = b.prevX = j(b.plotX, x.width / 2 + k * Math.cos(S * l)), b.plotY = b.prevY = j(b.plotY, x.height / 2 + k * Math.sin(S * l)), b.dispX = 0, b.dispY = 0;
- });
- },
- setRandomPositions: function() {
- function w(T) {
- return T = T * T / Math.PI, T -= Math.floor(T);
- }
- var x = this.box, f = this.nodes, l = f.length + 1;
- f.forEach(function(T, O) {
- T.plotX = T.prevX = j(T.plotX, x.width * w(O)), T.plotY = T.prevY = j(T.plotY, x.height * w(l + O)), T.dispX = 0, T.dispY = 0;
- });
- },
- force: function(w) {
- this.integration[w].apply(this, Array.prototype.slice.call(arguments, 1));
- },
- barycenterForces: function() {
- this.getBarycenter(), this.force("barycenter");
- },
- getBarycenter: function() {
- var w = 0, x = 0, f = 0;
- return this.nodes.forEach(function(l) {
- x += l.plotX * l.mass, f += l.plotY * l.mass, w += l.mass;
- }), this.barycenter = { x, y: f, xFactor: x / w, yFactor: f / w };
- },
- barnesHutApproximation: function(w, x) {
- var f = this.getDistXY(w, x), l = this.vectorLength(f);
- if (w !== x && l !== 0)
- if (x.isInternal)
- if (x.boxSize / l < this.options.theta && l !== 0) {
- var T = this.repulsiveForce(l, this.k);
- this.force("repulsive", w, T * x.mass, f, l);
- var O = !1;
- } else
- O = !0;
- else
- T = this.repulsiveForce(l, this.k), this.force("repulsive", w, T * x.mass, f, l);
- return O;
- },
- repulsiveForces: function() {
- var w = this;
- w.approximation === "barnes-hut" ? w.nodes.forEach(function(x) {
- w.quadTree.visitNodeRecursive(
- null,
- function(f) {
- return w.barnesHutApproximation(x, f);
- }
- );
- }) : w.nodes.forEach(function(x) {
- w.nodes.forEach(function(f) {
- if (x !== f && !x.fixedPosition) {
- var l = w.getDistXY(x, f), T = w.vectorLength(l);
- if (T !== 0) {
- var O = w.repulsiveForce(T, w.k);
- w.force("repulsive", x, O * f.mass, l, T);
- }
- }
- });
- });
- },
- attractiveForces: function() {
- var w = this, x, f, l;
- w.links.forEach(function(T) {
- T.fromNode && T.toNode && (x = w.getDistXY(T.fromNode, T.toNode), f = w.vectorLength(x), f !== 0 && (l = w.attractiveForce(f, w.k), w.force("attractive", T, l, x, f)));
- });
- },
- applyLimits: function() {
- var w = this;
- w.nodes.forEach(function(x) {
- x.fixedPosition || (w.integration.integrate(w, x), w.applyLimitBox(x, w.box), x.dispX = 0, x.dispY = 0);
- });
- },
- applyLimitBox: function(w, x) {
- var f = w.radius;
- w.plotX = G(w.plotX, x.left + f, x.width - f), w.plotY = G(w.plotY, x.top + f, x.height - f);
- },
- coolDown: function(w, x, f) {
- return w - x * f;
- },
- isStable: function() {
- return 1e-5 > Math.abs(this.systemTemperature - this.prevSystemTemperature) || 0 >= this.temperature;
- },
- getSystemTemperature: function() {
- return this.nodes.reduce(function(w, x) {
- return w + x.temperature;
- }, 0);
- },
- vectorLength: function(w) {
- return Math.sqrt(w.x * w.x + w.y * w.y);
- },
- getDistR: function(w, x) {
- return w = this.getDistXY(w, x), this.vectorLength(w);
- },
- getDistXY: function(w, x) {
- var f = w.plotX - x.plotX;
- return w = w.plotY - x.plotY, { x: f, y: w, absX: Math.abs(f), absY: Math.abs(w) };
- }
- }), y(o, "predraw", function() {
- this.graphLayoutsLookup && this.graphLayoutsLookup.forEach(function(w) {
- w.stop();
- });
- }), y(o, "render", function() {
- function w(l) {
- l.maxIterations-- && isFinite(l.temperature) && !l.isStable() && !l.enableSimulation && (l.beforeStep && l.beforeStep(), l.step(), f = !1, x = !0);
- }
- var x = !1;
- if (this.graphLayoutsLookup) {
- for (U(!1, this), this.graphLayoutsLookup.forEach(function(l) {
- l.start();
- }); !f; ) {
- var f = !0;
- this.graphLayoutsLookup.forEach(w);
- }
- x && this.series.forEach(function(l) {
- l && l.layout && l.render();
- });
- }
- }), y(o, "beforePrint", function() {
- this.graphLayoutsLookup && (this.graphLayoutsLookup.forEach(function(w) {
- w.updateSimulation(!1);
- }), this.redraw());
- }), y(o, "afterPrint", function() {
- this.graphLayoutsLookup && this.graphLayoutsLookup.forEach(function(w) {
- w.updateSimulation();
- }), this.redraw();
- });
- }), C(d, "Series/PackedBubble/PackedBubbleComposition.js", [d["Core/Chart/Chart.js"], d["Core/Globals.js"], d["Core/Utilities.js"]], function(o, y, N) {
- var _ = y.layouts["reingold-fruchterman"], U = N.addEvent, G = N.extendClass, V = N.pick;
- o.prototype.getSelectedParentNodes = function() {
- var F = [];
- return this.series.forEach(function(B) {
- B.parentNode && B.parentNode.selected && F.push(B.parentNode);
- }), F;
- }, y.networkgraphIntegrations.packedbubble = { repulsiveForceFunction: function(F, B, j, w) {
- return Math.min(F, (j.marker.radius + w.marker.radius) / 2);
- }, barycenter: function() {
- var F = this, B = F.options.gravitationalConstant, j = F.box, w = F.nodes, x, f;
- w.forEach(function(l) {
- F.options.splitSeries && !l.isParentNode ? (x = l.series.parentNode.plotX, f = l.series.parentNode.plotY) : (x = j.width / 2, f = j.height / 2), l.fixedPosition || (l.plotX -= (l.plotX - x) * B / (l.mass * Math.sqrt(w.length)), l.plotY -= (l.plotY - f) * B / (l.mass * Math.sqrt(w.length)));
- });
- }, repulsive: function(F, B, j, w) {
- var x = B * this.diffTemperature / F.mass / F.degree;
- B = j.x * x, j = j.y * x, F.fixedPosition || (F.plotX += B, F.plotY += j), w.fixedPosition || (w.plotX -= B, w.plotY -= j);
- }, integrate: y.networkgraphIntegrations.verlet.integrate, getK: y.noop }, y.layouts.packedbubble = G(_, { beforeStep: function() {
- this.options.marker && this.series.forEach(function(F) {
- F && F.calculateParentRadius();
- });
- }, isStable: function() {
- var F = Math.abs(this.prevSystemTemperature - this.systemTemperature);
- return 1 > Math.abs(10 * this.systemTemperature / Math.sqrt(this.nodes.length)) && 1e-5 > F || 0 >= this.temperature;
- }, setCircularPositions: function() {
- var F = this, B = F.box, j = F.nodes, w = 2 * Math.PI / (j.length + 1), x, f, l = F.options.initialPositionRadius;
- j.forEach(function(T, O) {
- F.options.splitSeries && !T.isParentNode ? (x = T.series.parentNode.plotX, f = T.series.parentNode.plotY) : (x = B.width / 2, f = B.height / 2), T.plotX = T.prevX = V(T.plotX, x + l * Math.cos(T.index || O * w)), T.plotY = T.prevY = V(T.plotY, f + l * Math.sin(T.index || O * w)), T.dispX = 0, T.dispY = 0;
- });
- }, repulsiveForces: function() {
- var F = this, B, j, w, x = F.options.bubblePadding;
- F.nodes.forEach(function(f) {
- f.degree = f.mass, f.neighbours = 0, F.nodes.forEach(function(l) {
- B = 0, f === l || f.fixedPosition || !F.options.seriesInteraction && f.series !== l.series || (w = F.getDistXY(f, l), j = F.vectorLength(w) - (f.marker.radius + l.marker.radius + x), 0 > j && (f.degree += 0.01, f.neighbours++, B = F.repulsiveForce(-j / Math.sqrt(f.neighbours), F.k, f, l)), F.force("repulsive", f, B * l.mass, w, l, j));
- });
- });
- }, applyLimitBox: function(F) {
- if (this.options.splitSeries && !F.isParentNode && this.options.parentNodeLimit) {
- var B = this.getDistXY(F, F.series.parentNode), j = F.series.parentNodeRadius - F.marker.radius - this.vectorLength(B);
- 0 > j && j > -2 * F.marker.radius && (F.plotX -= 0.01 * B.x, F.plotY -= 0.01 * B.y);
- }
- _.prototype.applyLimitBox.apply(this, arguments);
- } }), U(o, "beforeRedraw", function() {
- this.allDataPoints && delete this.allDataPoints;
- });
- }), C(d, "Series/PackedBubble/PackedBubbleSeries.js", [d["Core/Color/Color.js"], d["Core/Globals.js"], d["Series/PackedBubble/PackedBubblePoint.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(o, y, N, _, U) {
- var G = this && this.__extends || function() {
- var S = function(v, h) {
- return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(c, u) {
- c.__proto__ = u;
- } || function(c, u) {
- for (var i in u)
- u.hasOwnProperty(i) && (c[i] = u[i]);
- }, S(v, h);
- };
- return function(v, h) {
- function c() {
- this.constructor = v;
- }
- S(v, h), v.prototype = h === null ? Object.create(h) : (c.prototype = h.prototype, new c());
- };
- }(), V = o.parse, F = _.series, B = _.seriesTypes.bubble, j = U.addEvent, w = U.clamp, x = U.defined, f = U.extend, l = U.fireEvent, T = U.isArray, O = U.isNumber, R = U.merge, k = U.pick, b = y.dragNodesMixin;
- return o = function(S) {
- function v() {
- var h = S !== null && S.apply(this, arguments) || this;
- return h.chart = void 0, h.data = void 0, h.layout = void 0, h.options = void 0, h.points = void 0, h.xData = void 0, h;
- }
- return G(v, S), v.prototype.accumulateAllPoints = function(h) {
- var c = h.chart, u = [], i, p;
- for (i = 0; i < c.series.length; i++)
- if (h = c.series[i], h.is("packedbubble") && h.visible || !c.options.chart.ignoreHiddenSeries)
- for (p = 0; p < h.yData.length; p++)
- u.push([null, null, h.yData[p], h.index, p, { id: p, marker: { radius: 0 } }]);
- return u;
- }, v.prototype.addLayout = function() {
- var h = this.options.layoutAlgorithm, c = this.chart.graphLayoutsStorage, u = this.chart.graphLayoutsLookup, i = this.chart.options.chart;
- c || (this.chart.graphLayoutsStorage = c = {}, this.chart.graphLayoutsLookup = u = []);
- var p = c[h.type];
- p || (h.enableSimulation = x(i.forExport) ? !i.forExport : h.enableSimulation, c[h.type] = p = new y.layouts[h.type](), p.init(h), u.splice(p.index, 0, p)), this.layout = p, this.points.forEach(function(a) {
- a.mass = 2, a.degree = 1, a.collisionNmb = 1;
- }), p.setArea(0, 0, this.chart.plotWidth, this.chart.plotHeight), p.addElementsToCollection([this], p.series), p.addElementsToCollection(this.points, p.nodes);
- }, v.prototype.addSeriesLayout = function() {
- var h = this.options.layoutAlgorithm, c = this.chart.graphLayoutsStorage, u = this.chart.graphLayoutsLookup, i = R(h, h.parentNodeOptions, { enableSimulation: this.layout.options.enableSimulation }), p = c[h.type + "-series"];
- p || (c[h.type + "-series"] = p = new y.layouts[h.type](), p.init(i), u.splice(p.index, 0, p)), this.parentNodeLayout = p, this.createParentNodes();
- }, v.prototype.calculateParentRadius = function() {
- var h = this.seriesBox();
- this.parentNodeRadius = w(Math.sqrt(2 * this.parentNodeMass / Math.PI) + 20, 20, h ? Math.max(Math.sqrt(Math.pow(
- h.width,
- 2
- ) + Math.pow(h.height, 2)) / 2 + 20, 20) : Math.sqrt(2 * this.parentNodeMass / Math.PI) + 20), this.parentNode && (this.parentNode.marker.radius = this.parentNode.radius = this.parentNodeRadius);
- }, v.prototype.calculateZExtremes = function() {
- var h = this.options.zMin, c = this.options.zMax, u = 1 / 0, i = -1 / 0;
- return h && c ? [h, c] : (this.chart.series.forEach(function(p) {
- p.yData.forEach(function(a) {
- x(a) && (a > i && (i = a), a < u && (u = a));
- });
- }), h = k(h, u), c = k(c, i), [h, c]);
- }, v.prototype.checkOverlap = function(h, c) {
- var u = h[0] - c[0], i = h[1] - c[1];
- return -1e-3 > Math.sqrt(u * u + i * i) - Math.abs(h[2] + c[2]);
- }, v.prototype.createParentNodes = function() {
- var h = this, c = h.chart, u = h.parentNodeLayout, i, p = h.parentNode, a = h.pointClass, t = h.layout.options, s = { radius: h.parentNodeRadius, lineColor: h.color, fillColor: V(h.color).brighten(0.4).get() };
- t.parentNodeOptions && (s = R(t.parentNodeOptions.marker || {}, s)), h.parentNodeMass = 0, h.points.forEach(function(n) {
- h.parentNodeMass += Math.PI * Math.pow(n.marker.radius, 2);
- }), h.calculateParentRadius(), u.nodes.forEach(function(n) {
- n.seriesIndex === h.index && (i = !0);
- }), u.setArea(0, 0, c.plotWidth, c.plotHeight), i || (p || (p = new a().init(this, { mass: h.parentNodeRadius / 2, marker: s, dataLabels: { inside: !1 }, states: { normal: { marker: s }, hover: { marker: s } }, dataLabelOnNull: !0, degree: h.parentNodeRadius, isParentNode: !0, seriesIndex: h.index })), h.parentNode && (p.plotX = h.parentNode.plotX, p.plotY = h.parentNode.plotY), h.parentNode = p, u.addElementsToCollection([h], u.series), u.addElementsToCollection([p], u.nodes));
- }, v.prototype.deferLayout = function() {
- var h = this.options.layoutAlgorithm;
- this.visible && (this.addLayout(), h.splitSeries && this.addSeriesLayout());
- }, v.prototype.destroy = function() {
- this.chart.graphLayoutsLookup && this.chart.graphLayoutsLookup.forEach(function(h) {
- h.removeElementFromCollection(this, h.series);
- }, this), this.parentNode && this.parentNodeLayout && (this.parentNodeLayout.removeElementFromCollection(this.parentNode, this.parentNodeLayout.nodes), this.parentNode.dataLabel && (this.parentNode.dataLabel = this.parentNode.dataLabel.destroy())), F.prototype.destroy.apply(this, arguments);
- }, v.prototype.drawDataLabels = function() {
- var h = this.options.dataLabels.textPath, c = this.points;
- F.prototype.drawDataLabels.apply(this, arguments), this.parentNode && (this.parentNode.formatPrefix = "parentNode", this.points = [this.parentNode], this.options.dataLabels.textPath = this.options.dataLabels.parentNodeTextPath, F.prototype.drawDataLabels.apply(this, arguments), this.points = c, this.options.dataLabels.textPath = h);
- }, v.prototype.drawGraph = function() {
- if (this.layout && this.layout.options.splitSeries) {
- var h = this.chart, c = this.layout.options.parentNodeOptions.marker, u = { fill: c.fillColor || V(this.color).brighten(0.4).get(), opacity: c.fillOpacity, stroke: c.lineColor || this.color, "stroke-width": k(c.lineWidth, this.options.lineWidth) };
- this.parentNodesGroup || (this.parentNodesGroup = this.plotGroup("parentNodesGroup", "parentNode", this.visible ? "inherit" : "hidden", 0.1, h.seriesGroup), this.group.attr({ zIndex: 2 })), this.calculateParentRadius(), c = R({
- x: this.parentNode.plotX - this.parentNodeRadius,
- y: this.parentNode.plotY - this.parentNodeRadius,
- width: 2 * this.parentNodeRadius,
- height: 2 * this.parentNodeRadius
- }, u), this.parentNode.graphic || (this.graph = this.parentNode.graphic = h.renderer.symbol(u.symbol).add(this.parentNodesGroup)), this.parentNode.graphic.attr(c);
- }
- }, v.prototype.drawTracker = function() {
- var h = this.parentNode;
- if (S.prototype.drawTracker.call(this), h) {
- var c = T(h.dataLabels) ? h.dataLabels : h.dataLabel ? [h.dataLabel] : [];
- h.graphic && (h.graphic.element.point = h), c.forEach(function(u) {
- u.div ? u.div.point = h : u.element.point = h;
- });
- }
- }, v.prototype.getPointRadius = function() {
- var h = this, c = h.chart, u = h.options, i = u.useSimulation, p = Math.min(c.plotWidth, c.plotHeight), a = {}, t = [], s = c.allDataPoints, n, P, D, I;
- ["minSize", "maxSize"].forEach(function(E) {
- var X = parseInt(u[E], 10), g = /%$/.test(u[E]);
- a[E] = g ? p * X / 100 : X * Math.sqrt(s.length);
- }), c.minRadius = n = a.minSize / Math.sqrt(s.length), c.maxRadius = P = a.maxSize / Math.sqrt(s.length);
- var W = i ? h.calculateZExtremes() : [n, P];
- (s || []).forEach(function(E, X) {
- D = i ? w(E[2], W[0], W[1]) : E[2], I = h.getRadius(W[0], W[1], n, P, D), I === 0 && (I = null), s[X][2] = I, t.push(I);
- }), h.radii = t;
- }, v.prototype.init = function() {
- return F.prototype.init.apply(this, arguments), this.eventsToUnbind.push(j(this, "updatedData", function() {
- this.chart.series.forEach(function(h) {
- h.type === this.type && (h.isDirty = !0);
- }, this);
- })), this;
- }, v.prototype.onMouseUp = function(h) {
- if (h.fixedPosition && !h.removed) {
- var c, u, i = this.layout, p = this.parentNodeLayout;
- p && i.options.dragBetweenSeries && p.nodes.forEach(function(a) {
- h && h.marker && a !== h.series.parentNode && (c = i.getDistXY(h, a), u = i.vectorLength(c) - a.marker.radius - h.marker.radius, 0 > u && (a.series.addPoint(R(h.options, { plotX: h.plotX, plotY: h.plotY }), !1), i.removeElementFromCollection(h, i.nodes), h.remove()));
- }), b.onMouseUp.apply(this, arguments);
- }
- }, v.prototype.placeBubbles = function(h) {
- var c = this.checkOverlap, u = this.positionBubble, i = [], p = 1, a = 0, t = 0, s = [], n;
- if (h = h.sort(function(P, D) {
- return D[2] - P[2];
- }), h.length) {
- if (i.push([[0, 0, h[0][2], h[0][3], h[0][4]]]), 1 < h.length)
- for (i.push([[0, 0 - h[1][2] - h[0][2], h[1][2], h[1][3], h[1][4]]]), n = 2; n < h.length; n++)
- h[n][2] = h[n][2] || 1, s = u(i[p][a], i[p - 1][t], h[n]), c(s, i[p][0]) ? (i.push([]), t = 0, i[p + 1].push(u(i[p][a], i[p][0], h[n])), p++, a = 0) : 1 < p && i[p - 1][t + 1] && c(s, i[p - 1][t + 1]) ? (t++, i[p].push(u(i[p][a], i[p - 1][t], h[n])), a++) : (a++, i[p].push(s));
- this.chart.stages = i, this.chart.rawPositions = [].concat.apply([], i), this.resizeRadius(), s = this.chart.rawPositions;
- }
- return s;
- }, v.prototype.pointAttribs = function(h, c) {
- var u = this.options, i = u.marker;
- return h && h.isParentNode && u.layoutAlgorithm && u.layoutAlgorithm.parentNodeOptions && (i = u.layoutAlgorithm.parentNodeOptions.marker), u = i.fillOpacity, h = F.prototype.pointAttribs.call(this, h, c), u !== 1 && (h["fill-opacity"] = u), h;
- }, v.prototype.positionBubble = function(h, c, u) {
- var i = Math.sqrt, p = Math.asin, a = Math.acos, t = Math.pow, s = Math.abs;
- return i = i(t(h[0] - c[0], 2) + t(h[1] - c[1], 2)), a = a((t(i, 2) + t(u[2] + c[2], 2) - t(u[2] + h[2], 2)) / (2 * (u[2] + c[2]) * i)), p = p(s(h[0] - c[0]) / i), h = (0 > h[1] - c[1] ? 0 : Math.PI) + a + p * (0 > (h[0] - c[0]) * (h[1] - c[1]) ? 1 : -1), [c[0] + (c[2] + u[2]) * Math.sin(h), c[1] - (c[2] + u[2]) * Math.cos(h), u[2], u[3], u[4]];
- }, v.prototype.render = function() {
- var h = [];
- F.prototype.render.apply(this, arguments), this.options.dataLabels.allowOverlap || (this.data.forEach(function(c) {
- T(c.dataLabels) && c.dataLabels.forEach(function(u) {
- h.push(u);
- });
- }), this.options.useSimulation && this.chart.hideOverlappingLabels(h));
- }, v.prototype.resizeRadius = function() {
- var h = this.chart, c = h.rawPositions, u = Math.min, i = Math.max, p = h.plotLeft, a = h.plotTop, t = h.plotHeight, s = h.plotWidth, n, P, D, I = n = Number.POSITIVE_INFINITY, W = P = Number.NEGATIVE_INFINITY;
- for (D = 0; D < c.length; D++) {
- var E = c[D][2];
- I = u(
- I,
- c[D][0] - E
- ), W = i(W, c[D][0] + E), n = u(n, c[D][1] - E), P = i(P, c[D][1] + E);
- }
- if (D = [W - I, P - n], u = u.apply([], [(s - p) / D[0], (t - a) / D[1]]), 1e-10 < Math.abs(u - 1)) {
- for (D = 0; D < c.length; D++)
- c[D][2] *= u;
- this.placeBubbles(c);
- } else
- h.diffY = t / 2 + a - n - (P - n) / 2, h.diffX = s / 2 + p - I - (W - I) / 2;
- }, v.prototype.seriesBox = function() {
- var h = this.chart, c = Math.max, u = Math.min, i, p = [h.plotLeft, h.plotLeft + h.plotWidth, h.plotTop, h.plotTop + h.plotHeight];
- return this.data.forEach(function(a) {
- x(a.plotX) && x(a.plotY) && a.marker.radius && (i = a.marker.radius, p[0] = u(p[0], a.plotX - i), p[1] = c(p[1], a.plotX + i), p[2] = u(p[2], a.plotY - i), p[3] = c(p[3], a.plotY + i));
- }), O(p.width / p.height) ? p : null;
- }, v.prototype.setVisible = function() {
- var h = this;
- F.prototype.setVisible.apply(h, arguments), h.parentNodeLayout && h.graph ? h.visible ? (h.graph.show(), h.parentNode.dataLabel && h.parentNode.dataLabel.show()) : (h.graph.hide(), h.parentNodeLayout.removeElementFromCollection(h.parentNode, h.parentNodeLayout.nodes), h.parentNode.dataLabel && h.parentNode.dataLabel.hide()) : h.layout && (h.visible ? h.layout.addElementsToCollection(
- h.points,
- h.layout.nodes
- ) : h.points.forEach(function(c) {
- h.layout.removeElementFromCollection(c, h.layout.nodes);
- }));
- }, v.prototype.translate = function() {
- var h = this.chart, c = this.data, u = this.index, i, p = this.options.useSimulation;
- if (this.processedXData = this.xData, this.generatePoints(), x(h.allDataPoints) || (h.allDataPoints = this.accumulateAllPoints(this), this.getPointRadius()), p)
- var a = h.allDataPoints;
- else
- a = this.placeBubbles(h.allDataPoints), this.options.draggable = !1;
- for (i = 0; i < a.length; i++)
- if (a[i][3] === u) {
- var t = c[a[i][4]], s = k(a[i][2], void 0);
- p || (t.plotX = a[i][0] - h.plotLeft + h.diffX, t.plotY = a[i][1] - h.plotTop + h.diffY), O(s) && (t.marker = f(t.marker, { radius: s, width: 2 * s, height: 2 * s }), t.radius = s);
- }
- p && this.deferLayout(), l(this, "afterTranslate");
- }, v.defaultOptions = R(B.defaultOptions, { minSize: "10%", maxSize: "50%", sizeBy: "area", zoneAxis: "y", crisp: !1, tooltip: { pointFormat: "Value: {point.value}" }, draggable: !0, useSimulation: !0, parentNode: { allowPointSelect: !1 }, dataLabels: { formatter: function() {
- var h = this.series.chart.numberFormatter, c = this.point.value;
- return O(c) ? h(c, -1) : "";
- }, parentNodeFormatter: function() {
- return this.name;
- }, parentNodeTextPath: { enabled: !0 }, padding: 0, style: { transition: "opacity 2000ms" } }, layoutAlgorithm: { initialPositions: "circle", initialPositionRadius: 20, bubblePadding: 5, parentNodeLimit: !1, seriesInteraction: !0, dragBetweenSeries: !1, parentNodeOptions: { maxIterations: 400, gravitationalConstant: 0.03, maxSpeed: 50, initialPositionRadius: 100, seriesInteraction: !0, marker: {
- fillColor: null,
- fillOpacity: 1,
- lineWidth: null,
- lineColor: null,
- symbol: "circle"
- } }, enableSimulation: !0, type: "packedbubble", integration: "packedbubble", maxIterations: 1e3, splitSeries: !1, maxSpeed: 5, gravitationalConstant: 0.01, friction: -0.981 } }), v;
- }(B), f(o.prototype, {
- alignDataLabel: F.prototype.alignDataLabel,
- axisTypes: [],
- directTouch: !0,
- forces: ["barycenter", "repulsive"],
- hasDraggableNodes: !0,
- isCartesian: !1,
- noSharedTooltip: !0,
- onMouseDown: b.onMouseDown,
- onMouseMove: b.onMouseMove,
- pointArrayMap: ["value"],
- pointClass: N,
- pointValKey: "value",
- redrawHalo: b.redrawHalo,
- requireSorting: !1,
- searchPoint: y.noop,
- trackerGroups: ["group", "dataLabelsGroup", "parentNodesGroup"]
- }), _.registerSeriesType("packedbubble", o), o;
- }), C(d, "Series/Polygon/PolygonSeries.js", [d["Core/Globals.js"], d["Core/Legend/LegendSymbol.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(o, y, N, _) {
- var U = this && this.__extends || function() {
- var x = function(f, l) {
- return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(T, O) {
- T.__proto__ = O;
- } || function(T, O) {
- for (var R in O)
- O.hasOwnProperty(R) && (T[R] = O[R]);
- }, x(f, l);
- };
- return function(f, l) {
- function T() {
- this.constructor = f;
- }
- x(f, l), f.prototype = l === null ? Object.create(l) : (T.prototype = l.prototype, new T());
- };
- }();
- o = o.noop;
- var G = N.series, V = N.seriesTypes, F = V.area, B = V.line, j = V.scatter;
- V = _.extend;
- var w = _.merge;
- return _ = function(x) {
- function f() {
- var l = x !== null && x.apply(this, arguments) || this;
- return l.data = void 0, l.options = void 0, l.points = void 0, l;
- }
- return U(f, x), f.prototype.getGraphPath = function() {
- for (var l = B.prototype.getGraphPath.call(this), T = l.length + 1; T--; )
- (T === l.length || l[T][0] === "M") && 0 < T && l.splice(T, 0, ["Z"]);
- return this.areaPath = l;
- }, f.prototype.drawGraph = function() {
- this.options.fillColor = this.color, F.prototype.drawGraph.call(this);
- }, f.defaultOptions = w(j.defaultOptions, { marker: { enabled: !1, states: { hover: { enabled: !1 } } }, stickyTracking: !1, tooltip: { followPointer: !0, pointFormat: "" }, trackByArea: !0 }), f;
- }(j), V(_.prototype, { type: "polygon", drawLegendSymbol: y.drawRectangle, drawTracker: G.prototype.drawTracker, setStackedPoints: o }), N.registerSeriesType("polygon", _), _;
- }), C(d, "Core/Axis/WaterfallAxis.js", [d["Extensions/Stacking.js"], d["Core/Utilities.js"]], function(o, y) {
- var N = y.addEvent, _ = y.objectEach, U;
- return function(G) {
- function V() {
- var x = this.waterfall.stacks;
- x && (x.changed = !1, delete x.alreadyChanged);
- }
- function F() {
- var x = this.options.stackLabels;
- x && x.enabled && this.waterfall.stacks && this.waterfall.renderStackTotals();
- }
- function B() {
- for (var x = this.axes, f = this.series, l = f.length; l--; )
- f[l].options.stacking && (x.forEach(function(T) {
- T.isXAxis || (T.waterfall.stacks.changed = !0);
- }), l = 0);
- }
- function j() {
- this.waterfall || (this.waterfall = new w(this));
- }
- var w = function() {
- function x(f) {
- this.axis = f, this.stacks = { changed: !1 };
- }
- return x.prototype.renderStackTotals = function() {
- var f = this.axis, l = f.waterfall.stacks, T = f.stacking && f.stacking.stackTotalGroup, O = new o(f, f.options.stackLabels, !1, 0, void 0);
- this.dummyStackItem = O, _(l, function(R) {
- _(R, function(k) {
- O.total = k.stackTotal, k.label && (O.label = k.label), o.prototype.render.call(O, T), k.label = O.label, delete O.label;
- });
- }), O.total = null;
- }, x;
- }();
- G.Composition = w, G.compose = function(x, f) {
- N(x, "init", j), N(x, "afterBuildStacks", V), N(x, "afterRender", F), N(f, "beforeRedraw", B);
- };
- }(U || (U = {})), U;
- }), C(d, "Series/Waterfall/WaterfallPoint.js", [d["Series/Column/ColumnSeries.js"], d["Core/Series/Point.js"], d["Core/Utilities.js"]], function(o, y, N) {
- var _ = this && this.__extends || function() {
- var G = function(V, F) {
- return G = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(B, j) {
- B.__proto__ = j;
- } || function(B, j) {
- for (var w in j)
- j.hasOwnProperty(w) && (B[w] = j[w]);
- }, G(V, F);
- };
- return function(V, F) {
- function B() {
- this.constructor = V;
- }
- G(V, F), V.prototype = F === null ? Object.create(F) : (B.prototype = F.prototype, new B());
- };
- }(), U = N.isNumber;
- return function(G) {
- function V() {
- var F = G !== null && G.apply(this, arguments) || this;
- return F.options = void 0, F.series = void 0, F;
- }
- return _(V, G), V.prototype.getClassName = function() {
- var F = y.prototype.getClassName.call(this);
- return this.isSum ? F += " highcharts-sum" : this.isIntermediateSum && (F += " highcharts-intermediate-sum"), F;
- }, V.prototype.isValid = function() {
- return U(this.y) || this.isSum || !!this.isIntermediateSum;
- }, V;
- }(o.prototype.pointClass);
- }), C(d, "Series/Waterfall/WaterfallSeries.js", [d["Core/Axis/Axis.js"], d["Core/Chart/Chart.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"], d["Core/Axis/WaterfallAxis.js"], d["Series/Waterfall/WaterfallPoint.js"]], function(o, y, N, _, U, G) {
- var V = this && this.__extends || function() {
- var k = function(b, S) {
- return k = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, h) {
- v.__proto__ = h;
- } || function(v, h) {
- for (var c in h)
- h.hasOwnProperty(c) && (v[c] = h[c]);
- }, k(b, S);
- };
- return function(b, S) {
- function v() {
- this.constructor = b;
- }
- k(b, S), b.prototype = S === null ? Object.create(S) : (v.prototype = S.prototype, new v());
- };
- }(), F = N.seriesTypes, B = F.column, j = F.line, w = _.arrayMax, x = _.arrayMin, f = _.correctFloat;
- F = _.extend;
- var l = _.isNumber, T = _.merge, O = _.objectEach, R = _.pick;
- return _ = function(k) {
- function b() {
- var S = k !== null && k.apply(this, arguments) || this;
- return S.chart = void 0, S.data = void 0, S.options = void 0, S.points = void 0, S.stackedYNeg = void 0, S.stackedYPos = void 0, S.stackKey = void 0, S.xData = void 0, S.yAxis = void 0, S.yData = void 0, S;
- }
- return V(b, k), b.prototype.generatePoints = function() {
- var S;
- B.prototype.generatePoints.apply(this);
- var v = 0;
- for (S = this.points.length; v < S; v++) {
- var h = this.points[v], c = this.processedYData[v];
- (h.isIntermediateSum || h.isSum) && (h.y = f(c));
- }
- }, b.prototype.translate = function() {
- var S = this.options, v = this.yAxis, h = R(S.minPointLength, 5), c = h / 2, u = S.threshold || 0, i = u, p = u;
- S = S.stacking;
- var a = v.waterfall.stacks[this.stackKey];
- B.prototype.translate.apply(this);
- for (var t = this.points, s = 0; s < t.length; s++) {
- var n = t[s], P = this.processedYData[s], D = n.shapeArgs;
- if (D && l(P)) {
- var I = [0, P], W = n.y;
- if (S) {
- if (a) {
- if (I = a[s], S === "overlap") {
- var E = I.stackState[I.stateIndex--];
- E = 0 <= W ? E : E - W, Object.hasOwnProperty.call(I, "absolutePos") && delete I.absolutePos, Object.hasOwnProperty.call(I, "absoluteNeg") && delete I.absoluteNeg;
- } else
- 0 <= W ? (E = I.threshold + I.posTotal, I.posTotal -= W) : (E = I.threshold + I.negTotal, I.negTotal -= W, E -= W), !I.posTotal && Object.hasOwnProperty.call(I, "absolutePos") && (I.posTotal = I.absolutePos, delete I.absolutePos), !I.negTotal && Object.hasOwnProperty.call(I, "absoluteNeg") && (I.negTotal = I.absoluteNeg, delete I.absoluteNeg);
- n.isSum || (I.connectorThreshold = I.threshold + I.stackTotal), v.reversed ? (P = 0 <= W ? E - W : E + W, W = E) : (P = E, W = E - W), n.below = P <= u, D.y = v.translate(P, !1, !0, !1, !0) || 0, D.height = Math.abs(D.y - (v.translate(W, !1, !0, !1, !0) || 0)), (W = v.waterfall.dummyStackItem) && (W.x = s, W.label = a[s].label, W.setOffset(this.pointXOffset || 0, this.barW || 0, this.stackedYNeg[s], this.stackedYPos[s]));
- }
- } else
- E = Math.max(i, i + W) + I[0], D.y = v.translate(
- E,
- !1,
- !0,
- !1,
- !0
- ) || 0, n.isSum ? (D.y = v.translate(I[1], !1, !0, !1, !0) || 0, D.height = Math.min(v.translate(I[0], !1, !0, !1, !0) || 0, v.len) - D.y, n.below = I[1] <= u) : n.isIntermediateSum ? (0 <= W ? (P = I[1] + p, W = p) : (P = p, W = I[1] + p), v.reversed && (P ^= W, W ^= P, P ^= W), D.y = v.translate(P, !1, !0, !1, !0) || 0, D.height = Math.abs(D.y - Math.min(v.translate(W, !1, !0, !1, !0) || 0, v.len)), p += I[1], n.below = P <= u) : (D.height = 0 < P ? (v.translate(i, !1, !0, !1, !0) || 0) - D.y : (v.translate(i, !1, !0, !1, !0) || 0) - (v.translate(i - P, !1, !0, !1, !0) || 0), i += P, n.below = i < u), 0 > D.height && (D.y += D.height, D.height *= -1);
- n.plotY = D.y = Math.round(D.y || 0) - this.borderWidth % 2 / 2, D.height = Math.max(Math.round(D.height || 0), 1e-3), n.yBottom = D.y + D.height, D.height <= h && !n.isNull ? (D.height = h, D.y -= c, n.plotY = D.y, n.minPointLengthOffset = 0 > n.y ? -c : c) : (n.isNull && (D.width = 0), n.minPointLengthOffset = 0), W = n.plotY + (n.negative ? D.height : 0), n.below && (n.plotY += D.height), n.tooltipPos && (this.chart.inverted ? n.tooltipPos[0] = v.len - W : n.tooltipPos[1] = W);
- }
- }
- }, b.prototype.processData = function(S) {
- var v = this.options, h = this.yData, c = v.data, u = h.length, i = v.threshold || 0, p, a, t, s, n;
- for (n = a = p = t = s = 0; n < u; n++) {
- var P = h[n], D = c && c[n] ? c[n] : {};
- P === "sum" || D.isSum ? h[n] = f(a) : P === "intermediateSum" || D.isIntermediateSum ? (h[n] = f(p), p = 0) : (a += P, p += P), t = Math.min(a, t), s = Math.max(a, s);
- }
- k.prototype.processData.call(this, S), v.stacking || (this.dataMin = t + i, this.dataMax = s);
- }, b.prototype.toYData = function(S) {
- return S.isSum ? "sum" : S.isIntermediateSum ? "intermediateSum" : S.y;
- }, b.prototype.updateParallelArrays = function(S, v) {
- k.prototype.updateParallelArrays.call(this, S, v), (this.yData[0] === "sum" || this.yData[0] === "intermediateSum") && (this.yData[0] = null);
- }, b.prototype.pointAttribs = function(S, v) {
- var h = this.options.upColor;
- return h && !S.options.color && (S.color = 0 < S.y ? h : null), S = B.prototype.pointAttribs.call(this, S, v), delete S.dashstyle, S;
- }, b.prototype.getGraphPath = function() {
- return [["M", 0, 0]];
- }, b.prototype.getCrispPath = function() {
- var S = this.data, v = this.yAxis, h = S.length, c = Math.round(this.graph.strokeWidth()) % 2 / 2, u = Math.round(this.borderWidth) % 2 / 2, i = this.xAxis.reversed, p = this.yAxis.reversed, a = this.options.stacking, t = [], s;
- for (s = 1; s < h; s++) {
- var n = S[s].shapeArgs, P = S[s - 1], D = S[s - 1].shapeArgs, I = v.waterfall.stacks[this.stackKey], W = 0 < P.y ? -D.height : 0;
- I && D && n && (I = I[s - 1], a ? (I = I.connectorThreshold, W = Math.round(v.translate(I, 0, 1, 0, 1) + (p ? W : 0)) - c) : W = D.y + P.minPointLengthOffset + u - c, t.push(["M", (D.x || 0) + (i ? 0 : D.width || 0), W], ["L", (n.x || 0) + (i && n.width || 0), W])), D && t.length && (!a && 0 > P.y && !p || 0 < P.y && p) && ((P = t[t.length - 2]) && typeof P[2] == "number" && (P[2] += D.height || 0), (P = t[t.length - 1]) && typeof P[2] == "number" && (P[2] += D.height || 0));
- }
- return t;
- }, b.prototype.drawGraph = function() {
- j.prototype.drawGraph.call(this), this.graph.attr({ d: this.getCrispPath() });
- }, b.prototype.setStackedPoints = function() {
- function S($, Q, A, H) {
- if (z)
- for (A; A < z; A++)
- X.stackState[A] += H;
- else
- X.stackState[0] = $, z = X.stackState.length;
- X.stackState.push(X.stackState[z - 1] + Q);
- }
- var v = this.options, h = this.yAxis.waterfall.stacks, c = v.threshold, u = c || 0, i = u, p = this.stackKey, a = this.xData, t = a.length, s, n, P;
- this.yAxis.stacking.usePercentage = !1;
- var D = n = P = u;
- if (this.visible || !this.chart.options.chart.ignoreHiddenSeries) {
- var I = h.changed;
- (s = h.alreadyChanged) && 0 > s.indexOf(p) && (I = !0), h[p] || (h[p] = {}), s = h[p];
- for (var W = 0; W < t; W++) {
- var E = a[W];
- (!s[E] || I) && (s[E] = { negTotal: 0, posTotal: 0, stackTotal: 0, threshold: 0, stateIndex: 0, stackState: [], label: I && s[E] ? s[E].label : void 0 });
- var X = s[E], g = this.yData[W];
- 0 <= g ? X.posTotal += g : X.negTotal += g;
- var m = v.data[W];
- E = X.absolutePos = X.posTotal;
- var L = X.absoluteNeg = X.negTotal;
- X.stackTotal = E + L;
- var z = X.stackState.length;
- m && m.isIntermediateSum ? (S(P, n, 0, P), P = n, n = c, u ^= i, i ^= u, u ^= i) : m && m.isSum ? (S(c, D, z), u = c) : (S(u, g, 0, D), m && (D += g, n += g)), X.stateIndex++, X.threshold = u, u += X.stackTotal;
- }
- h.changed = !1, h.alreadyChanged || (h.alreadyChanged = []), h.alreadyChanged.push(p);
- }
- }, b.prototype.getExtremes = function() {
- var S = this.options.stacking;
- if (S) {
- var v = this.yAxis;
- v = v.waterfall.stacks;
- var h = this.stackedYNeg = [], c = this.stackedYPos = [];
- return S === "overlap" ? O(v[this.stackKey], function(u) {
- h.push(x(u.stackState)), c.push(w(u.stackState));
- }) : O(v[this.stackKey], function(u) {
- h.push(u.negTotal + u.threshold), c.push(u.posTotal + u.threshold);
- }), { dataMin: x(h), dataMax: w(c) };
- }
- return { dataMin: this.dataMin, dataMax: this.dataMax };
- }, b.defaultOptions = T(B.defaultOptions, { dataLabels: { inside: !0 }, lineWidth: 1, lineColor: "#333333", dashStyle: "Dot", borderColor: "#333333", states: { hover: { lineWidthPlus: 0 } } }), b;
- }(B), F(_.prototype, { getZonesGraphs: j.prototype.getZonesGraphs, pointValKey: "y", showLine: !0, pointClass: G }), N.registerSeriesType("waterfall", _), U.compose(o, y), _;
- }), C(d, "Extensions/Polar.js", [
- d["Core/Animation/AnimationUtilities.js"],
- d["Core/Chart/Chart.js"],
- d["Core/Globals.js"],
- d["Extensions/Pane.js"],
- d["Core/Pointer.js"],
- d["Core/Series/Series.js"],
- d["Core/Series/SeriesRegistry.js"],
- d["Core/Renderer/SVG/SVGRenderer.js"],
- d["Core/Utilities.js"]
- ], function(o, y, N, _, U, G, V, F, B) {
- var j = o.animObject;
- V = V.seriesTypes;
- var w = B.addEvent, x = B.defined, f = B.find, l = B.isNumber, T = B.pick, O = B.splat, R = B.uniqueKey;
- o = B.wrap;
- var k = G.prototype;
- U = U.prototype, k.searchPointByAngle = function(v) {
- var h = this.chart, c = this.xAxis.pane.center;
- return this.searchKDTree({ clientX: 180 + -180 / Math.PI * Math.atan2(v.chartX - c[0] - h.plotLeft, v.chartY - c[1] - h.plotTop) });
- }, k.getConnectors = function(v, h, c, u) {
- var i = u ? 1 : 0, p = 0 <= h && h <= v.length - 1 ? h : 0 > h ? v.length - 1 + h : 0;
- h = 0 > p - 1 ? v.length - (1 + i) : p - 1, i = p + 1 > v.length - 1 ? i : p + 1;
- var a = v[h];
- i = v[i];
- var t = a.plotX;
- a = a.plotY;
- var s = i.plotX, n = i.plotY;
- i = v[p].plotX, p = v[p].plotY, t = (1.5 * i + t) / 2.5, a = (1.5 * p + a) / 2.5, s = (1.5 * i + s) / 2.5;
- var P = (1.5 * p + n) / 2.5;
- n = Math.sqrt(Math.pow(t - i, 2) + Math.pow(a - p, 2));
- var D = Math.sqrt(Math.pow(s - i, 2) + Math.pow(P - p, 2));
- return t = Math.atan2(a - p, t - i), P = Math.PI / 2 + (t + Math.atan2(P - p, s - i)) / 2, Math.abs(t - P) > Math.PI / 2 && (P -= Math.PI), t = i + Math.cos(P) * n, a = p + Math.sin(P) * n, s = i + Math.cos(Math.PI + P) * D, P = p + Math.sin(Math.PI + P) * D, i = { rightContX: s, rightContY: P, leftContX: t, leftContY: a, plotX: i, plotY: p }, c && (i.prevPointCont = this.getConnectors(v, h, !1, u)), i;
- }, k.toXY = function(v) {
- var h = this.chart, c = this.xAxis, u = this.yAxis, i = v.plotX, p = v.plotY, a = v.series, t = h.inverted, s = v.y, n = t ? i : u.len - p;
- t && a && !a.isRadialBar && (v.plotY = p = typeof s == "number" && u.translate(s) || 0), v.rectPlotX = i, v.rectPlotY = p, u.center && (n += u.center[3] / 2), l(p) && (u = t ? u.postTranslate(p, n) : c.postTranslate(i, n), v.plotX = v.polarPlotX = u.x - h.plotLeft, v.plotY = v.polarPlotY = u.y - h.plotTop), this.kdByAngle ? (h = (i / Math.PI * 180 + c.pane.options.startAngle) % 360, 0 > h && (h += 360), v.clientX = h) : v.clientX = v.plotX;
- }, V.spline && (o(V.spline.prototype, "getPointSpline", function(v, h, c, u) {
- return this.chart.polar ? u ? (v = this.getConnectors(h, u, !0, this.connectEnds), h = v.prevPointCont && v.prevPointCont.rightContX, c = v.prevPointCont && v.prevPointCont.rightContY, v = ["C", l(h) ? h : v.plotX, l(c) ? c : v.plotY, l(v.leftContX) ? v.leftContX : v.plotX, l(v.leftContY) ? v.leftContY : v.plotY, v.plotX, v.plotY]) : v = ["M", c.plotX, c.plotY] : v = v.call(this, h, c, u), v;
- }), V.areasplinerange && (V.areasplinerange.prototype.getPointSpline = V.spline.prototype.getPointSpline)), w(G, "afterTranslate", function() {
- var v = this.chart;
- if (v.polar && this.xAxis) {
- if ((this.kdByAngle = v.tooltip && v.tooltip.shared) ? this.searchPoint = this.searchPointByAngle : this.options.findNearestPointBy = "xy", !this.preventPostTranslate)
- for (var h = this.points, c = h.length; c--; )
- this.toXY(h[c]), !v.hasParallelCoordinates && !this.yAxis.reversed && h[c].y < this.yAxis.min && (h[c].isNull = !0);
- this.hasClipCircleSetter || (this.hasClipCircleSetter = !!this.eventsToUnbind.push(w(this, "afterRender", function() {
- if (v.polar) {
- var u = this.yAxis.pane.center;
- this.clipCircle ? this.clipCircle.animate({ x: u[0], y: u[1], r: u[2] / 2, innerR: u[3] / 2 }) : this.clipCircle = v.renderer.clipCircle(u[0], u[1], u[2] / 2, u[3] / 2), this.group.clip(this.clipCircle), this.setClip = N.noop;
- }
- })));
- }
- }, { order: 2 }), o(
- V.line.prototype,
- "getGraphPath",
- function(v, h) {
- var c = this, u;
- if (this.chart.polar) {
- for (h = h || this.points, u = 0; u < h.length; u++)
- if (!h[u].isNull) {
- var i = u;
- break;
- }
- if (this.options.connectEnds !== !1 && typeof i < "u") {
- this.connectEnds = !0, h.splice(h.length, 0, h[i]);
- var p = !0;
- }
- h.forEach(function(a) {
- typeof a.polarPlotY > "u" && c.toXY(a);
- });
- }
- return u = v.apply(this, [].slice.call(arguments, 1)), p && h.pop(), u;
- }
- );
- var b = function(v, h) {
- var c = this, u = this.chart, i = this.options.animation, p = this.group, a = this.markerGroup, t = this.xAxis && this.xAxis.center, s = u.plotLeft, n = u.plotTop, P, D, I, W;
- if (u.polar) {
- if (c.isRadialBar)
- h || (c.startAngleRad = T(c.translatedThreshold, c.xAxis.startAngleRad), N.seriesTypes.pie.prototype.animate.call(c, h));
- else if (u.renderer.isSVG)
- if (i = j(i), c.is("column")) {
- if (!h) {
- var E = t[3] / 2;
- c.points.forEach(function(X) {
- P = X.graphic, I = (D = X.shapeArgs) && D.r, W = D && D.innerR, P && D && (P.attr({ r: E, innerR: E }), P.animate({ r: I, innerR: W }, c.options.animation));
- });
- }
- } else
- h ? (v = { translateX: t[0] + s, translateY: t[1] + n, scaleX: 1e-3, scaleY: 1e-3 }, p.attr(v), a && a.attr(v)) : (v = { translateX: s, translateY: n, scaleX: 1, scaleY: 1 }, p.animate(v, i), a && a.animate(v, i));
- } else
- v.call(this, h);
- };
- if (o(k, "animate", b), V.column) {
- var S = V.arearange.prototype;
- V = V.column.prototype, V.polarArc = function(v, h, c, u) {
- var i = this.xAxis.center, p = this.yAxis.len, a = i[3] / 2;
- return h = p - h + a, v = p - T(v, p) + a, this.yAxis.reversed && (0 > h && (h = a), 0 > v && (v = a)), { x: i[0], y: i[1], r: h, innerR: v, start: c, end: u };
- }, o(V, "animate", b), o(V, "translate", function(v) {
- var h = this.options, c = h.stacking, u = this.chart, i = this.xAxis, p = this.yAxis, a = p.reversed, t = p.center, s = i.startAngleRad, n = i.endAngleRad - s;
- if (this.preventPostTranslate = !0, v.call(this), i.isRadial) {
- v = this.points, i = v.length;
- var P = p.translate(p.min), D = p.translate(p.max);
- if (h = h.threshold || 0, u.inverted && l(h)) {
- var I = p.translate(h);
- x(I) && (0 > I ? I = 0 : I > n && (I = n), this.translatedThreshold = I + s);
- }
- for (; i--; ) {
- h = v[i];
- var W = h.barX, E = h.x, X = h.y;
- if (h.shapeType = "arc", u.inverted) {
- if (h.plotY = p.translate(X), c && p.stacking) {
- if (X = p.stacking.stacks[(0 > X ? "-" : "") + this.stackKey], this.visible && X && X[E] && !h.isNull) {
- var g = X[E].points[this.getStackIndicator(void 0, E, this.index).key], m = p.translate(g[0]);
- g = p.translate(g[1]), x(m) && (m = B.clamp(m, 0, n));
- }
- } else
- m = I, g = h.plotY;
- m > g && (g = [m, m = g][0]), a ? g > P ? g = P : m < D ? m = D : (m > P || g < D) && (m = g = n) : m < P ? m = P : g > D ? g = D : (g < P || m > D) && (m = g = 0), p.min > p.max && (m = g = a ? n : 0), m += s, g += s, t && (h.barX = W += t[3] / 2), E = Math.max(W, 0), X = Math.max(W + h.pointWidth, 0), h.shapeArgs = { x: t && t[0], y: t && t[1], r: X, innerR: E, start: m, end: g }, h.opacity = m === g ? 0 : void 0, h.plotY = (x(this.translatedThreshold) && (m < this.translatedThreshold ? m : g)) - s;
- } else
- m = W + s, h.shapeArgs = this.polarArc(h.yBottom, h.plotY, m, m + h.pointWidth);
- this.toXY(h), u.inverted ? (W = p.postTranslate(h.rectPlotY, W + h.pointWidth / 2), h.tooltipPos = [W.x - u.plotLeft, W.y - u.plotTop]) : h.tooltipPos = [h.plotX, h.plotY], t && (h.ttBelow = h.plotY > t[1]);
- }
- }
- }), V.findAlignments = function(v, h) {
- return h.align === null && (h.align = 20 < v && 160 > v ? "left" : 200 < v && 340 > v ? "right" : "center"), h.verticalAlign === null && (h.verticalAlign = 45 > v || 315 < v ? "bottom" : 135 < v && 225 > v ? "top" : "middle"), h;
- }, S && (S.findAlignments = V.findAlignments), o(V, "alignDataLabel", function(v, h, c, u, i, p) {
- var a = this.chart, t = T(u.inside, !!this.options.stacking);
- a.polar ? (v = h.rectPlotX / Math.PI * 180, a.inverted ? (this.forceDL = a.isInsidePlot(h.plotX, Math.round(h.plotY)), t && h.shapeArgs ? (i = h.shapeArgs, i = this.yAxis.postTranslate(((i.start || 0) + (i.end || 0)) / 2 - this.xAxis.startAngleRad, h.barX + h.pointWidth / 2), i = { x: i.x - a.plotLeft, y: i.y - a.plotTop }) : h.tooltipPos && (i = { x: h.tooltipPos[0], y: h.tooltipPos[1] }), u.align = T(u.align, "center"), u.verticalAlign = T(
- u.verticalAlign,
- "middle"
- )) : this.findAlignments && (u = this.findAlignments(v, u)), k.alignDataLabel.call(this, h, c, u, i, p), this.isRadialBar && h.shapeArgs && h.shapeArgs.start === h.shapeArgs.end && c.hide(!0)) : v.call(this, h, c, u, i, p);
- });
- }
- o(U, "getCoordinates", function(v, h) {
- var c = this.chart, u = { xAxis: [], yAxis: [] };
- return c.polar ? c.axes.forEach(function(i) {
- var p = i.isXAxis, a = i.center;
- if (i.coll !== "colorAxis") {
- var t = h.chartX - a[0] - c.plotLeft;
- a = h.chartY - a[1] - c.plotTop, u[p ? "xAxis" : "yAxis"].push({ axis: i, value: i.translate(p ? Math.PI - Math.atan2(t, a) : Math.sqrt(Math.pow(
- t,
- 2
- ) + Math.pow(a, 2)), !0) });
- }
- }) : u = v.call(this, h), u;
- }), F.prototype.clipCircle = function(v, h, c, u) {
- var i = R(), p = this.createElement("clipPath").attr({ id: i }).add(this.defs);
- return v = u ? this.arc(v, h, c, u, 0, 2 * Math.PI).add(p) : this.circle(v, h, c).add(p), v.id = i, v.clipPath = p, v;
- }, w(y, "getAxes", function() {
- this.pane || (this.pane = []), this.options.pane = O(this.options.pane), this.options.pane.forEach(function(v) {
- new _(v, this);
- }, this);
- }), w(y, "afterDrawChartBox", function() {
- this.pane.forEach(function(v) {
- v.render();
- });
- }), w(
- G,
- "afterInit",
- function() {
- var v = this.chart;
- v.inverted && v.polar && (this.isRadialSeries = !0, this.is("column") && (this.isRadialBar = !0));
- }
- ), o(y.prototype, "get", function(v, h) {
- return f(this.pane || [], function(c) {
- return c.options.id === h;
- }) || v.call(this, h);
- });
- }), C(d, "masters/highcharts-more.src.js", [d["Core/Globals.js"], d["Core/Axis/RadialAxis.js"], d["Series/Bubble/BubbleSeries.js"]], function(o, y, N) {
- y.compose(o.Axis, o.Tick), N.compose(o.Chart, o.Legend, o.Series);
- });
- });
- })(ru);
- var $0 = ru.exports;
- const Z0 = /* @__PURE__ */ Mn($0);
- var nu = { exports: {} };
- (function(r) {
- (function(d) {
- r.exports ? (d.default = d, r.exports = d) : d(typeof Highcharts < "u" ? Highcharts : void 0);
- })(function(d) {
- function C(o, y, N, _) {
- o.hasOwnProperty(y) || (o[y] = _.apply(null, N));
- }
- d = d ? d._modules : {}, C(
- d,
- "Extensions/FullScreen.js",
- [d["Core/Chart/Chart.js"], d["Core/Globals.js"], d["Core/Renderer/HTML/AST.js"], d["Core/Utilities.js"]],
- function(o, y, N, _) {
- var U = _.addEvent;
- return _ = function() {
- function G(V) {
- this.chart = V, this.isOpen = !1, V = V.renderTo, this.browserProps || (typeof V.requestFullscreen == "function" ? this.browserProps = { fullscreenChange: "fullscreenchange", requestFullscreen: "requestFullscreen", exitFullscreen: "exitFullscreen" } : V.mozRequestFullScreen ? this.browserProps = { fullscreenChange: "mozfullscreenchange", requestFullscreen: "mozRequestFullScreen", exitFullscreen: "mozCancelFullScreen" } : V.webkitRequestFullScreen ? this.browserProps = {
- fullscreenChange: "webkitfullscreenchange",
- requestFullscreen: "webkitRequestFullScreen",
- exitFullscreen: "webkitExitFullscreen"
- } : V.msRequestFullscreen && (this.browserProps = { fullscreenChange: "MSFullscreenChange", requestFullscreen: "msRequestFullscreen", exitFullscreen: "msExitFullscreen" }));
- }
- return G.prototype.close = function() {
- var V = this.chart, F = V.options.chart;
- this.isOpen && this.browserProps && V.container.ownerDocument instanceof Document && V.container.ownerDocument[this.browserProps.exitFullscreen](), this.unbindFullscreenEvent && (this.unbindFullscreenEvent = this.unbindFullscreenEvent()), V.setSize(this.origWidth, this.origHeight, !1), this.origHeight = this.origWidth = void 0, F.width = this.origWidthOption, F.height = this.origHeightOption, this.origHeightOption = this.origWidthOption = void 0, this.isOpen = !1, this.setButtonText();
- }, G.prototype.open = function() {
- var V = this, F = V.chart, B = F.options.chart;
- if (B && (V.origWidthOption = B.width, V.origHeightOption = B.height), V.origWidth = F.chartWidth, V.origHeight = F.chartHeight, V.browserProps) {
- var j = U(
- F.container.ownerDocument,
- V.browserProps.fullscreenChange,
- function() {
- V.isOpen ? (V.isOpen = !1, V.close()) : (F.setSize(null, null, !1), V.isOpen = !0, V.setButtonText());
- }
- ), w = U(F, "destroy", j);
- V.unbindFullscreenEvent = function() {
- j(), w();
- }, (B = F.renderTo[V.browserProps.requestFullscreen]()) && B.catch(function() {
- alert("Full screen is not supported inside a frame.");
- });
- }
- }, G.prototype.setButtonText = function() {
- var V = this.chart, F = V.exportDivElements, B = V.options.exporting, j = B && B.buttons && B.buttons.contextButton.menuItems;
- V = V.options.lang, B && B.menuItemDefinitions && V && V.exitFullscreen && V.viewFullscreen && j && F && (F = F[j.indexOf("viewFullscreen")]) && N.setElementHTML(F, this.isOpen ? V.exitFullscreen : B.menuItemDefinitions.viewFullscreen.text || V.viewFullscreen);
- }, G.prototype.toggle = function() {
- this.isOpen ? this.close() : this.open();
- }, G;
- }(), y.Fullscreen = _, U(o, "beforeRender", function() {
- this.fullscreen = new y.Fullscreen(this);
- }), y.Fullscreen;
- }
- ), C(d, "Core/Chart/ChartNavigationComposition.js", [], function() {
- var o;
- return function(y) {
- y.compose = function(_) {
- return _.navigation || (_.navigation = new N(_)), _;
- };
- var N = function() {
- function _(U) {
- this.updates = [], this.chart = U;
- }
- return _.prototype.addUpdate = function(U) {
- this.chart.navigation.updates.push(U);
- }, _.prototype.update = function(U, G) {
- var V = this;
- this.updates.forEach(function(F) {
- F.call(V.chart, U, G);
- });
- }, _;
- }();
- y.Additions = N;
- }(o || (o = {})), o;
- }), C(d, "Extensions/Exporting/ExportingDefaults.js", [d["Core/Globals.js"]], function(o) {
- return { exporting: { type: "image/png", url: "https://export.highcharts.com/", printMaxWidth: 780, scale: 2, buttons: { contextButton: {
- className: "highcharts-contextbutton",
- menuClassName: "highcharts-contextmenu",
- symbol: "menu",
- titleKey: "contextButtonTitle",
- menuItems: "viewFullscreen printChart separator downloadPNG downloadJPEG downloadPDF downloadSVG".split(" ")
- } }, menuItemDefinitions: { viewFullscreen: { textKey: "viewFullscreen", onclick: function() {
- this.fullscreen.toggle();
- } }, printChart: { textKey: "printChart", onclick: function() {
- this.print();
- } }, separator: { separator: !0 }, downloadPNG: { textKey: "downloadPNG", onclick: function() {
- this.exportChart();
- } }, downloadJPEG: {
- textKey: "downloadJPEG",
- onclick: function() {
- this.exportChart({ type: "image/jpeg" });
- }
- }, downloadPDF: { textKey: "downloadPDF", onclick: function() {
- this.exportChart({ type: "application/pdf" });
- } }, downloadSVG: { textKey: "downloadSVG", onclick: function() {
- this.exportChart({ type: "image/svg+xml" });
- } } } }, lang: {
- viewFullscreen: "View in full screen",
- exitFullscreen: "Exit from full screen",
- printChart: "Print chart",
- downloadPNG: "Download PNG image",
- downloadJPEG: "Download JPEG image",
- downloadPDF: "Download PDF document",
- downloadSVG: "Download SVG vector image",
- contextButtonTitle: "Chart context menu"
- }, navigation: { buttonOptions: { symbolSize: 14, symbolX: 12.5, symbolY: 10.5, align: "right", buttonSpacing: 3, height: 22, verticalAlign: "top", width: 24, symbolFill: "#666666", symbolStroke: "#666666", symbolStrokeWidth: 3, theme: { padding: 5 } }, menuStyle: { border: "1px solid #999999", background: "#ffffff", padding: "5px 0" }, menuItemStyle: { padding: "0.5em 1em", color: "#333333", background: "none", fontSize: o.isTouchDevice ? "14px" : "11px", transition: "background 250ms, color 250ms" }, menuItemHoverStyle: {
- background: "#335cad",
- color: "#ffffff"
- } } };
- }), C(d, "Extensions/Exporting/ExportingSymbols.js", [], function() {
- var o;
- return function(y) {
- function N(G, V, F, B) {
- return [["M", G, V + 2.5], ["L", G + F, V + 2.5], ["M", G, V + B / 2 + 0.5], ["L", G + F, V + B / 2 + 0.5], ["M", G, V + B - 1.5], ["L", G + F, V + B - 1.5]];
- }
- function _(G, V, F, B) {
- return G = B / 3 - 2, B = [], B = B.concat(this.circle(F - G, V, G, G), this.circle(F - G, V + G + 4, G, G), this.circle(F - G, V + 2 * (G + 4), G, G));
- }
- var U = [];
- y.compose = function(G) {
- U.indexOf(G) === -1 && (U.push(G), G = G.prototype.symbols, G.menu = N, G.menuball = _.bind(G));
- };
- }(o || (o = {})), o;
- }), C(d, "Core/HttpUtilities.js", [d["Core/Globals.js"], d["Core/Utilities.js"]], function(o, y) {
- var N = o.doc, _ = y.createElement, U = y.discardElement, G = y.merge, V = y.objectEach, F = { ajax: function(B) {
- var j = G(!0, { url: !1, type: "get", dataType: "json", success: !1, error: !1, data: !1, headers: {} }, B);
- B = { json: "application/json", xml: "application/xml", text: "text/plain", octet: "application/octet-stream" };
- var w = new XMLHttpRequest();
- if (!j.url)
- return !1;
- w.open(j.type.toUpperCase(), j.url, !0), j.headers["Content-Type"] || w.setRequestHeader(
- "Content-Type",
- B[j.dataType] || B.text
- ), V(j.headers, function(x, f) {
- w.setRequestHeader(f, x);
- }), w.onreadystatechange = function() {
- if (w.readyState === 4) {
- if (w.status === 200) {
- var x = w.responseText;
- if (j.dataType === "json")
- try {
- x = JSON.parse(x);
- } catch (f) {
- j.error && j.error(w, f);
- return;
- }
- return j.success && j.success(x);
- }
- j.error && j.error(w, w.responseText);
- }
- };
- try {
- j.data = JSON.stringify(j.data);
- } catch {
- }
- w.send(j.data || !0);
- }, getJSON: function(B, j) {
- F.ajax({ url: B, success: j, dataType: "json", headers: { "Content-Type": "text/plain" } });
- }, post: function(B, j, w) {
- var x = _("form", G({ method: "post", action: B, enctype: "multipart/form-data" }, w), { display: "none" }, N.body);
- V(j, function(f, l) {
- _("input", { type: "hidden", name: l, value: f }, null, x);
- }), x.submit(), U(x);
- } };
- return F;
- }), C(d, "Extensions/Exporting/Exporting.js", [
- d["Core/Renderer/HTML/AST.js"],
- d["Core/Chart/Chart.js"],
- d["Core/Chart/ChartNavigationComposition.js"],
- d["Core/DefaultOptions.js"],
- d["Extensions/Exporting/ExportingDefaults.js"],
- d["Extensions/Exporting/ExportingSymbols.js"],
- d["Core/Globals.js"],
- d["Core/HttpUtilities.js"],
- d["Core/Utilities.js"]
- ], function(o, y, N, _, U, G, V, F, B) {
- y = _.defaultOptions;
- var j = V.doc, w = V.win, x = B.addEvent, f = B.css, l = B.createElement, T = B.discardElement, O = B.extend, R = B.find, k = B.fireEvent, b = B.isObject, S = B.merge, v = B.objectEach, h = B.pick, c = B.removeEvent, u = B.uniqueKey, i;
- return function(p) {
- function a(nt) {
- var rt = this, ct = rt.renderer, gt = S(rt.options.navigation.buttonOptions, nt), dt = gt.onclick, ht = gt.menuItems, at = gt.symbolSize || 12;
- if (rt.btnCount || (rt.btnCount = 0), rt.exportDivElements || (rt.exportDivElements = [], rt.exportSVGElements = []), gt.enabled !== !1 && gt.theme) {
- var J = gt.theme, tt = J.states, ot = tt && tt.hover;
- tt = tt && tt.select;
- var lt;
- rt.styledMode || (J.fill = h(J.fill, "#ffffff"), J.stroke = h(J.stroke, "none")), delete J.states, dt ? lt = function(vt) {
- vt && vt.stopPropagation(), dt.call(rt, vt);
- } : ht && (lt = function(vt) {
- vt && vt.stopPropagation(), rt.contextMenu(pt.menuClassName, ht, pt.translateX, pt.translateY, pt.width, pt.height, pt), pt.setState(2);
- }), gt.text && gt.symbol ? J.paddingLeft = h(J.paddingLeft, 30) : gt.text || O(J, { width: gt.width, height: gt.height, padding: 0 }), rt.styledMode || (J["stroke-linecap"] = "round", J.fill = h(J.fill, "#ffffff"), J.stroke = h(J.stroke, "none"));
- var pt = ct.button(gt.text, 0, 0, lt, J, ot, tt).addClass(nt.className).attr({ title: h(rt.options.lang[gt._titleKey || gt.titleKey], "") });
- if (pt.menuClassName = nt.menuClassName || "highcharts-menu-" + rt.btnCount++, gt.symbol) {
- var yt = ct.symbol(gt.symbol, gt.symbolX - at / 2, gt.symbolY - at / 2, at, at, { width: at, height: at }).addClass("highcharts-button-symbol").attr({ zIndex: 1 }).add(pt);
- rt.styledMode || yt.attr({ stroke: gt.symbolStroke, fill: gt.symbolFill, "stroke-width": gt.symbolStrokeWidth || 1 });
- }
- pt.add(rt.exportingGroup).align(O(
- gt,
- { width: pt.width, x: h(gt.x, rt.buttonOffset) }
- ), !0, "spacingBox"), rt.buttonOffset += (pt.width + gt.buttonSpacing) * (gt.align === "right" ? -1 : 1), rt.exportSVGElements.push(pt, yt);
- }
- }
- function t() {
- if (this.printReverseInfo) {
- var nt = this.printReverseInfo, rt = nt.childNodes, ct = nt.origDisplay;
- nt = nt.resetParams, this.moveContainers(this.renderTo), [].forEach.call(rt, function(gt, dt) {
- gt.nodeType === 1 && (gt.style.display = ct[dt] || "");
- }), this.isPrinting = !1, nt && this.setSize.apply(this, nt), delete this.printReverseInfo, et = void 0, k(this, "afterPrint");
- }
- }
- function s() {
- var nt = j.body, rt = this.options.exporting.printMaxWidth, ct = { childNodes: nt.childNodes, origDisplay: [], resetParams: void 0 };
- this.isPrinting = !0, this.pointer.reset(null, 0), k(this, "beforePrint"), rt && this.chartWidth > rt && (ct.resetParams = [this.options.chart.width, void 0, !1], this.setSize(rt, void 0, !1)), [].forEach.call(ct.childNodes, function(gt, dt) {
- gt.nodeType === 1 && (ct.origDisplay[dt] = gt.style.display, gt.style.display = "none");
- }), this.moveContainers(nt), this.printReverseInfo = ct;
- }
- function n(nt) {
- nt.renderExporting(), x(nt, "redraw", nt.renderExporting), x(nt, "destroy", nt.destroyExport);
- }
- function P(nt, rt, ct, gt, dt, ht, at) {
- var J = this, tt = J.options.navigation, ot = J.chartWidth, lt = J.chartHeight, pt = "cache-" + nt, yt = Math.max(dt, ht), vt = J[pt];
- if (!vt) {
- J.exportContextMenu = J[pt] = vt = l("div", { className: nt }, { position: "absolute", zIndex: 1e3, padding: yt + "px", pointerEvents: "auto" }, J.fixedDiv || J.container);
- var Ct = l("ul", { className: "highcharts-menu" }, { listStyle: "none", margin: 0, padding: 0 }, vt);
- J.styledMode || f(Ct, O(
- { MozBoxShadow: "3px 3px 10px #888", WebkitBoxShadow: "3px 3px 10px #888", boxShadow: "3px 3px 10px #888" },
- tt.menuStyle
- )), vt.hideMenu = function() {
- f(vt, { display: "none" }), at && at.setState(0), J.openMenu = !1, f(J.renderTo, { overflow: "hidden" }), f(J.container, { overflow: "hidden" }), B.clearTimeout(vt.hideTimer), k(J, "exportMenuHidden");
- }, J.exportEvents.push(x(vt, "mouseleave", function() {
- vt.hideTimer = w.setTimeout(vt.hideMenu, 500);
- }), x(vt, "mouseenter", function() {
- B.clearTimeout(vt.hideTimer);
- }), x(j, "mouseup", function(Pt) {
- J.pointer.inClass(Pt.target, nt) || vt.hideMenu();
- }), x(vt, "click", function() {
- J.openMenu && vt.hideMenu();
- })), rt.forEach(function(Pt) {
- if (typeof Pt == "string" && (Pt = J.options.exporting.menuItemDefinitions[Pt]), b(Pt, !0)) {
- var At = void 0;
- Pt.separator ? At = l("hr", void 0, void 0, Ct) : (Pt.textKey === "viewData" && J.isDataTableVisible && (Pt.textKey = "hideData"), At = l("li", { className: "highcharts-menu-item", onclick: function(St) {
- St && St.stopPropagation(), vt.hideMenu(), Pt.onclick && Pt.onclick.apply(J, arguments);
- } }, void 0, Ct), o.setElementHTML(At, Pt.text || J.options.lang[Pt.textKey]), J.styledMode || (At.onmouseover = function() {
- f(this, tt.menuItemHoverStyle);
- }, At.onmouseout = function() {
- f(this, tt.menuItemStyle);
- }, f(At, O({ cursor: "pointer" }, tt.menuItemStyle)))), J.exportDivElements.push(At);
- }
- }), J.exportDivElements.push(Ct, vt), J.exportMenuWidth = vt.offsetWidth, J.exportMenuHeight = vt.offsetHeight;
- }
- rt = { display: "block" }, ct + J.exportMenuWidth > ot ? rt.right = ot - ct - dt - yt + "px" : rt.left = ct - yt + "px", gt + ht + J.exportMenuHeight > lt && at.alignOptions.verticalAlign !== "top" ? rt.bottom = lt - gt - yt + "px" : rt.top = gt + ht - yt + "px", f(vt, rt), f(J.renderTo, { overflow: "" }), f(J.container, { overflow: "" }), J.openMenu = !0, k(J, "exportMenuShown");
- }
- function D(nt) {
- var rt = nt ? nt.target : this, ct = rt.exportSVGElements, gt = rt.exportDivElements;
- nt = rt.exportEvents;
- var dt;
- ct && (ct.forEach(function(ht, at) {
- ht && (ht.onclick = ht.ontouchstart = null, dt = "cache-" + ht.menuClassName, rt[dt] && delete rt[dt], ct[at] = ht.destroy());
- }), ct.length = 0), rt.exportingGroup && (rt.exportingGroup.destroy(), delete rt.exportingGroup), gt && (gt.forEach(function(ht, at) {
- ht && (B.clearTimeout(ht.hideTimer), c(ht, "mouseleave"), gt[at] = ht.onmouseout = ht.onmouseover = ht.ontouchstart = ht.onclick = null, T(ht));
- }), gt.length = 0), nt && (nt.forEach(function(ht) {
- ht();
- }), nt.length = 0);
- }
- function I(nt, rt) {
- rt = this.getSVGForExport(nt, rt), nt = S(this.options.exporting, nt), F.post(nt.url, { filename: nt.filename ? nt.filename.replace(/\//g, "-") : this.getFilename(), type: nt.type, width: nt.width || 0, scale: nt.scale, svg: rt }, nt.formAttributes);
- }
- function W() {
- return this.styledMode && this.inlineStyles(), this.container.innerHTML;
- }
- function E() {
- var nt = this.userOptions.title && this.userOptions.title.text, rt = this.options.exporting.filename;
- return rt ? rt.replace(/\//g, "-") : (typeof nt == "string" && (rt = nt.toLowerCase().replace(/<\/?[^>]+(>|$)/g, "").replace(/[\s_]+/g, "-").replace(
- /[^a-z0-9\-]/g,
- ""
- ).replace(/^[\-]+/g, "").replace(/[\-]+/g, "-").substr(0, 24).replace(/[\-]+$/g, "")), (!rt || 5 > rt.length) && (rt = "chart"), rt);
- }
- function X(nt) {
- var rt, ct = S(this.options, nt);
- ct.plotOptions = S(this.userOptions.plotOptions, nt && nt.plotOptions), ct.time = S(this.userOptions.time, nt && nt.time);
- var gt = l("div", null, { position: "absolute", top: "-9999em", width: this.chartWidth + "px", height: this.chartHeight + "px" }, j.body), dt = this.renderTo.style.width, ht = this.renderTo.style.height;
- dt = ct.exporting.sourceWidth || ct.chart.width || /px$/.test(dt) && parseInt(dt, 10) || (ct.isGantt ? 800 : 600), ht = ct.exporting.sourceHeight || ct.chart.height || /px$/.test(ht) && parseInt(ht, 10) || 400, O(ct.chart, { animation: !1, renderTo: gt, forExport: !0, renderer: "SVGRenderer", width: dt, height: ht }), ct.exporting.enabled = !1, delete ct.data, ct.series = [], this.series.forEach(function(tt) {
- rt = S(tt.userOptions, { animation: !1, enableMouseTracking: !1, showCheckbox: !1, visible: tt.visible }), rt.isInternal || ct.series.push(rt);
- });
- var at = {};
- this.axes.forEach(function(tt) {
- tt.userOptions.internalKey || (tt.userOptions.internalKey = u()), tt.options.isInternal || (at[tt.coll] || (at[tt.coll] = !0, ct[tt.coll] = []), ct[tt.coll].push(S(tt.userOptions, { visible: tt.visible })));
- });
- var J = new this.constructor(ct, this.callback);
- return nt && ["xAxis", "yAxis", "series"].forEach(function(tt) {
- var ot = {};
- nt[tt] && (ot[tt] = nt[tt], J.update(ot));
- }), this.axes.forEach(function(tt) {
- var ot = R(J.axes, function(yt) {
- return yt.options.internalKey === tt.userOptions.internalKey;
- }), lt = tt.getExtremes(), pt = lt.userMin;
- lt = lt.userMax, ot && (typeof pt < "u" && pt !== ot.min || typeof lt < "u" && lt !== ot.max) && ot.setExtremes(
- pt,
- lt,
- !0,
- !1
- );
- }), ht = J.getChartHTML(), k(this, "getSVG", { chartCopy: J }), ht = this.sanitizeSVG(ht, ct), ct = null, J.destroy(), T(gt), ht;
- }
- function g(nt, rt) {
- var ct = this.options.exporting;
- return this.getSVG(S({ chart: { borderRadius: 0 } }, ct.chartOptions, rt, { exporting: { sourceWidth: nt && nt.sourceWidth || ct.sourceWidth, sourceHeight: nt && nt.sourceHeight || ct.sourceHeight } }));
- }
- function m(nt) {
- return nt.replace(/([A-Z])/g, function(rt, ct) {
- return "-" + ct.toLowerCase();
- });
- }
- function L() {
- function nt(J) {
- function tt(St, Dt) {
- if (lt = pt = !1, ct.length) {
- for (yt = ct.length; yt-- && !pt; )
- pt = ct[yt].test(Dt);
- lt = !pt;
- }
- for (Dt === "transform" && St === "none" && (lt = !0), yt = rt.length; yt-- && !lt; )
- lt = rt[yt].test(Dt) || typeof St == "function";
- lt || Ct[Dt] === St && J.nodeName !== "svg" || gt[J.nodeName][Dt] === St || (q && q.indexOf(Dt) === -1 ? ot += m(Dt) + ":" + St + ";" : St && J.setAttribute(m(Dt), St));
- }
- var ot = "", lt, pt, yt;
- if (J.nodeType === 1 && it.indexOf(J.nodeName) === -1) {
- var vt = w.getComputedStyle(J, null), Ct = J.nodeName === "svg" ? {} : w.getComputedStyle(J.parentNode, null);
- if (!gt[J.nodeName]) {
- dt = at.getElementsByTagName("svg")[0];
- var Pt = at.createElementNS(J.namespaceURI, J.nodeName);
- dt.appendChild(Pt), gt[J.nodeName] = S(w.getComputedStyle(Pt, null)), J.nodeName === "text" && delete gt.text.fill, dt.removeChild(Pt);
- }
- if (V.isFirefox || V.isMS)
- for (var At in vt)
- tt(vt[At], At);
- else
- v(vt, tt);
- ot && (vt = J.getAttribute("style"), J.setAttribute("style", (vt ? vt + ";" : "") + ot)), J.nodeName === "svg" && J.setAttribute("stroke-width", "1px"), J.nodeName !== "text" && [].forEach.call(J.children || J.childNodes, nt);
- }
- }
- var rt = Z, ct = p.inlineWhitelist, gt = {}, dt, ht = j.createElement("iframe");
- f(ht, { width: "1px", height: "1px", visibility: "hidden" }), j.body.appendChild(ht);
- var at = ht.contentWindow.document;
- at.open(), at.write('<svg xmlns="http://www.w3.org/2000/svg"></svg>'), at.close(), nt(this.container.querySelector("svg")), dt.parentNode.removeChild(dt), ht.parentNode.removeChild(ht);
- }
- function z(nt) {
- (this.fixedDiv ? [this.fixedDiv, this.scrollingContainer] : [this.container]).forEach(function(rt) {
- nt.appendChild(rt);
- });
- }
- function $() {
- var nt = this;
- nt.exporting = { update: function(rt, ct) {
- nt.isDirtyExporting = !0, S(!0, nt.options.exporting, rt), h(ct, !0) && nt.redraw();
- } }, N.compose(nt).navigation.addUpdate(function(rt, ct) {
- nt.isDirtyExporting = !0, S(!0, nt.options.navigation, rt), h(ct, !0) && nt.redraw();
- });
- }
- function Q() {
- var nt = this;
- nt.isPrinting || (et = nt, V.isSafari || nt.beforePrint(), setTimeout(function() {
- w.focus(), w.print(), V.isSafari || setTimeout(function() {
- nt.afterPrint();
- }, 1e3);
- }, 1));
- }
- function A() {
- var nt = this, rt = nt.options.exporting, ct = rt.buttons, gt = nt.isDirtyExporting || !nt.exportSVGElements;
- nt.buttonOffset = 0, nt.isDirtyExporting && nt.destroyExport(), gt && rt.enabled !== !1 && (nt.exportEvents = [], nt.exportingGroup = nt.exportingGroup || nt.renderer.g("exporting-group").attr({ zIndex: 3 }).add(), v(ct, function(dt) {
- nt.addButton(dt);
- }), nt.isDirtyExporting = !1);
- }
- function H(nt, rt) {
- var ct = nt.indexOf("</svg>") + 6, gt = nt.substr(ct);
- return nt = nt.substr(0, ct), rt && rt.exporting && rt.exporting.allowHTML && gt && (gt = '<foreignObject x="0" y="0" width="' + rt.chart.width + '" height="' + rt.chart.height + '"><body xmlns="http://www.w3.org/1999/xhtml">' + gt.replace(/(<(?:img|br).*?(?=>))>/g, "$1 />") + "</body></foreignObject>", nt = nt.replace("</svg>", gt + "</svg>")), nt = nt.replace(/zIndex="[^"]+"/g, "").replace(/symbolName="[^"]+"/g, "").replace(
- /jQuery[0-9]+="[^"]+"/g,
- ""
- ).replace(/url\(("|")(.*?)("|");?\)/g, "url($2)").replace(/url\([^#]+#/g, "url(#").replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ (|NS[0-9]+:)href=/g, " xlink:href=").replace(/\n/, " ").replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g, '$1="rgb($2)" $1-opacity="$3"').replace(/ /g, " ").replace(/­/g, ""), this.ieSanitizeSVG && (nt = this.ieSanitizeSVG(nt)), nt;
- }
- var Y = [], Z = [
- /-/,
- /^(clipPath|cssText|d|height|width)$/,
- /^font$/,
- /[lL]ogical(Width|Height)$/,
- /perspective/,
- /TapHighlightColor/,
- /^transition/,
- /^length$/
- ], q = "fill stroke strokeLinecap strokeLinejoin strokeWidth textAnchor x y".split(" ");
- p.inlineWhitelist = [];
- var it = ["clipPath", "defs", "desc"], et;
- p.compose = function(nt, rt) {
- G.compose(rt), Y.indexOf(nt) === -1 && (Y.push(nt), rt = nt.prototype, rt.afterPrint = t, rt.exportChart = I, rt.inlineStyles = L, rt.print = Q, rt.sanitizeSVG = H, rt.getChartHTML = W, rt.getSVG = X, rt.getSVGForExport = g, rt.getFilename = E, rt.moveContainers = z, rt.beforePrint = s, rt.contextMenu = P, rt.addButton = a, rt.destroyExport = D, rt.renderExporting = A, rt.callbacks.push(n), x(nt, "init", $), V.isSafari && V.win.matchMedia("print").addListener(function(ct) {
- et && (ct.matches ? et.beforePrint() : et.afterPrint());
- }));
- };
- }(i || (i = {})), y.exporting = S(U.exporting, y.exporting), y.lang = S(U.lang, y.lang), y.navigation = S(U.navigation, y.navigation), i;
- }), C(d, "masters/modules/exporting.src.js", [d["Core/Globals.js"], d["Extensions/Exporting/Exporting.js"], d["Core/HttpUtilities.js"]], function(o, y, N) {
- o.HttpUtilities = N, o.ajax = N.ajax, o.getJSON = N.getJSON, o.post = N.post, y.compose(o.Chart, o.Renderer);
- });
- });
- })(nu);
- var K0 = nu.exports;
- const J0 = /* @__PURE__ */ Mn(K0);
- var su = { exports: {} };
- (function(r) {
- (function(d) {
- r.exports ? (d.default = d, r.exports = d) : d(typeof Highcharts < "u" ? Highcharts : void 0);
- })(function(d) {
- function C(o, y, N, _) {
- o.hasOwnProperty(y) || (o[y] = _.apply(null, N));
- }
- d = d ? d._modules : {}, C(d, "Extensions/Boost/Boostables.js", [], function() {
- return "area arearange column columnrange bar line scatter heatmap bubble treemap".split(" ");
- }), C(d, "Extensions/Boost/BoostableMap.js", [d["Extensions/Boost/Boostables.js"]], function(o) {
- var y = {};
- return o.forEach(function(N) {
- y[N] = 1;
- }), y;
- }), C(d, "Extensions/Boost/WGLShader.js", [d["Core/Utilities.js"]], function(o) {
- var y = o.clamp, N = o.error, _ = o.pick;
- return function(U) {
- function G() {
- v.length && N("[highcharts boost] shader error - " + v.join(`
- `));
- }
- function V(c, u) {
- var i = U.createShader(u === "vertex" ? U.VERTEX_SHADER : U.FRAGMENT_SHADER);
- return U.shaderSource(i, c), U.compileShader(i), U.getShaderParameter(i, U.COMPILE_STATUS) ? i : (v.push("when compiling " + u + ` shader:
- ` + U.getShaderInfoLog(i)), !1);
- }
- function F() {
- function c(p) {
- return U.getUniformLocation(w, p);
- }
- var u = V(
- `#version 100
- #define LN10 2.302585092994046
- precision highp float;
- attribute vec4 aVertexPosition;
- attribute vec4 aColor;
- varying highp vec2 position;
- varying highp vec4 vColor;
- uniform mat4 uPMatrix;
- uniform float pSize;
- uniform float translatedThreshold;
- uniform bool hasThreshold;
- uniform bool skipTranslation;
- uniform float xAxisTrans;
- uniform float xAxisMin;
- uniform float xAxisMinPad;
- uniform float xAxisPointRange;
- uniform float xAxisLen;
- uniform bool xAxisPostTranslate;
- uniform float xAxisOrdinalSlope;
- uniform float xAxisOrdinalOffset;
- uniform float xAxisPos;
- uniform bool xAxisCVSCoord;
- uniform bool xAxisIsLog;
- uniform bool xAxisReversed;
- uniform float yAxisTrans;
- uniform float yAxisMin;
- uniform float yAxisMinPad;
- uniform float yAxisPointRange;
- uniform float yAxisLen;
- uniform bool yAxisPostTranslate;
- uniform float yAxisOrdinalSlope;
- uniform float yAxisOrdinalOffset;
- uniform float yAxisPos;
- uniform bool yAxisCVSCoord;
- uniform bool yAxisIsLog;
- uniform bool yAxisReversed;
- uniform bool isBubble;
- uniform bool bubbleSizeByArea;
- uniform float bubbleZMin;
- uniform float bubbleZMax;
- uniform float bubbleZThreshold;
- uniform float bubbleMinSize;
- uniform float bubbleMaxSize;
- uniform bool bubbleSizeAbs;
- uniform bool isInverted;
- float bubbleRadius(){
- float value = aVertexPosition.w;
- float zMax = bubbleZMax;
- float zMin = bubbleZMin;
- float radius = 0.0;
- float pos = 0.0;
- float zRange = zMax - zMin;
- if (bubbleSizeAbs){
- value = value - bubbleZThreshold;
- zMax = max(zMax - bubbleZThreshold, zMin - bubbleZThreshold);
- zMin = 0.0;
- }
- if (value < zMin){
- radius = bubbleZMin / 2.0 - 1.0;
- } else {
- pos = zRange > 0.0 ? (value - zMin) / zRange : 0.5;
- if (bubbleSizeByArea && pos > 0.0){
- pos = sqrt(pos);
- }
- radius = ceil(bubbleMinSize + pos * (bubbleMaxSize - bubbleMinSize)) / 2.0;
- }
- return radius * 2.0;
- }
- float translate(float val,
- float pointPlacement,
- float localA,
- float localMin,
- float minPixelPadding,
- float pointRange,
- float len,
- bool cvsCoord,
- bool isLog,
- bool reversed
- ){
- float sign = 1.0;
- float cvsOffset = 0.0;
- if (cvsCoord) {
- sign *= -1.0;
- cvsOffset = len;
- }
- if (isLog) {
- val = log(val) / LN10;
- }
- if (reversed) {
- sign *= -1.0;
- cvsOffset -= sign * len;
- }
- return sign * (val - localMin) * localA + cvsOffset +
- (sign * minPixelPadding);
- }
- float xToPixels(float value) {
- if (skipTranslation){
- return value;// + xAxisPos;
- }
- return translate(value, 0.0, xAxisTrans, xAxisMin, xAxisMinPad, xAxisPointRange, xAxisLen, xAxisCVSCoord, xAxisIsLog, xAxisReversed);// + xAxisPos;
- }
- float yToPixels(float value, float checkTreshold) {
- float v;
- if (skipTranslation){
- v = value;// + yAxisPos;
- } else {
- v = translate(value, 0.0, yAxisTrans, yAxisMin, yAxisMinPad, yAxisPointRange, yAxisLen, yAxisCVSCoord, yAxisIsLog, yAxisReversed);// + yAxisPos;
- if (v > yAxisLen) {
- v = yAxisLen;
- }
- }
- if (checkTreshold > 0.0 && hasThreshold) {
- v = min(v, translatedThreshold);
- }
- return v;
- }
- void main(void) {
- if (isBubble){
- gl_PointSize = bubbleRadius();
- } else {
- gl_PointSize = pSize;
- }
- vColor = aColor;
- if (skipTranslation && isInverted) {
- gl_Position = uPMatrix * vec4(aVertexPosition.y + yAxisPos, aVertexPosition.x + xAxisPos, 0.0, 1.0);
- } else if (isInverted) {
- gl_Position = uPMatrix * vec4(yToPixels(aVertexPosition.y, aVertexPosition.z) + yAxisPos, xToPixels(aVertexPosition.x) + xAxisPos, 0.0, 1.0);
- } else {
- gl_Position = uPMatrix * vec4(xToPixels(aVertexPosition.x) + xAxisPos, yToPixels(aVertexPosition.y, aVertexPosition.z) + yAxisPos, 0.0, 1.0);
- }
- }`,
- "vertex"
- ), i = V(`precision highp float;
- uniform vec4 fillColor;
- varying highp vec2 position;
- varying highp vec4 vColor;
- uniform sampler2D uSampler;
- uniform bool isCircle;
- uniform bool hasColor;
- void main(void) {
- vec4 col = fillColor;
- vec4 tcol = texture2D(uSampler, gl_PointCoord.st);
- if (hasColor) {
- col = vColor;
- }
- if (isCircle) {
- col *= tcol;
- if (tcol.r < 0.0) {
- discard;
- } else {
- gl_FragColor = col;
- }
- } else {
- gl_FragColor = col;
- }
- }`, "fragment");
- return !u || !i ? (w = !1, G(), !1) : (w = U.createProgram(), U.attachShader(w, u), U.attachShader(w, i), U.linkProgram(w), U.getProgramParameter(w, U.LINK_STATUS) ? (U.useProgram(w), U.bindAttribLocation(w, 0, "aVertexPosition"), x = c("uPMatrix"), f = c("pSize"), l = c("fillColor"), T = c("isBubble"), O = c("bubbleSizeAbs"), R = c("bubbleSizeByArea"), h = c("uSampler"), k = c("skipTranslation"), b = c("isCircle"), S = c("isInverted"), !0) : (v.push(U.getProgramInfoLog(w)), G(), w = !1));
- }
- function B(c, u) {
- U && w && (c = j[c] = j[c] || U.getUniformLocation(w, c), U.uniform1f(c, u));
- }
- var j = {}, w, x, f, l, T, O, R, k, b, S, v = [], h;
- return U && !F() ? !1 : { psUniform: function() {
- return f;
- }, pUniform: function() {
- return x;
- }, fillColorUniform: function() {
- return l;
- }, setBubbleUniforms: function(c, u, i) {
- var p = c.options, a = Number.MAX_VALUE, t = -Number.MAX_VALUE;
- if (U && w && c.is("bubble")) {
- var s = c.getPxExtremes();
- a = _(p.zMin, y(u, p.displayNegative === !1 ? p.zThreshold : -Number.MAX_VALUE, a)), t = _(p.zMax, Math.max(t, i)), U.uniform1i(T, 1), U.uniform1i(b, 1), U.uniform1i(R, c.options.sizeBy !== "width"), U.uniform1i(O, c.options.sizeByAbsoluteValue), B("bubbleZMin", a), B("bubbleZMax", t), B("bubbleZThreshold", c.options.zThreshold), B("bubbleMinSize", s.minPxSize), B("bubbleMaxSize", s.maxPxSize);
- }
- }, bind: function() {
- U && w && U.useProgram(w);
- }, program: function() {
- return w;
- }, create: F, setUniform: B, setPMatrix: function(c) {
- U && w && U.uniformMatrix4fv(x, !1, c);
- }, setColor: function(c) {
- U && w && U.uniform4f(l, c[0] / 255, c[1] / 255, c[2] / 255, c[3]);
- }, setPointSize: function(c) {
- U && w && U.uniform1f(f, c);
- }, setSkipTranslation: function(c) {
- U && w && U.uniform1i(k, c === !0 ? 1 : 0);
- }, setTexture: function(c) {
- U && w && U.uniform1i(h, c);
- }, setDrawAsCircle: function(c) {
- U && w && U.uniform1i(b, c ? 1 : 0);
- }, reset: function() {
- U && w && (U.uniform1i(T, 0), U.uniform1i(b, 0));
- }, setInverted: function(c) {
- U && w && U.uniform1i(S, c);
- }, destroy: function() {
- U && w && (U.deleteProgram(w), w = !1);
- } };
- };
- }), C(d, "Extensions/Boost/WGLVBuffer.js", [], function() {
- return function(o, y, N) {
- function _() {
- U && (o.deleteBuffer(U), G = U = !1), B = 0, V = N || 2, j = [];
- }
- var U = !1, G = !1, V = N || 2, F = !1, B = 0, j;
- return {
- destroy: _,
- bind: function() {
- if (!U)
- return !1;
- o.vertexAttribPointer(G, V, o.FLOAT, !1, 0, 0);
- },
- data: j,
- build: function(w, x, f) {
- var l;
- return j = w || [], j && j.length !== 0 || F ? (V = f || V, U && o.deleteBuffer(U), F || (l = new Float32Array(j)), U = o.createBuffer(), o.bindBuffer(o.ARRAY_BUFFER, U), o.bufferData(o.ARRAY_BUFFER, F || l, o.STATIC_DRAW), G = o.getAttribLocation(y.program(), x), o.enableVertexAttribArray(G), !0) : (_(), !1);
- },
- render: function(w, x, f) {
- var l = F ? F.length : j.length;
- return !U || !l || ((!w || w > l || 0 > w) && (w = 0), (!x || x > l) && (x = l), w >= x) ? !1 : (o.drawArrays(o[(f || "points").toUpperCase()], w / V, (x - w) / V), !0);
- },
- allocate: function(w) {
- B = -1, F = new Float32Array(4 * w);
- },
- push: function(w, x, f, l) {
- F && (F[++B] = w, F[++B] = x, F[++B] = f, F[++B] = l);
- }
- };
- };
- }), C(d, "Extensions/Boost/WGLRenderer.js", [d["Core/Color/Color.js"], d["Extensions/Boost/WGLShader.js"], d["Extensions/Boost/WGLVBuffer.js"], d["Core/Globals.js"], d["Core/Utilities.js"]], function(o, y, N, _, U) {
- var G = o.parse, V = _.doc, F = U.isNumber, B = U.isObject, j = U.merge, w = U.objectEach, x = U.pick;
- return function(f) {
- function l(m) {
- if (m.isSeriesBoosting) {
- var L = !!m.options.stacking, z = m.xData || m.options.xData || m.processedXData;
- return L = (L ? m.data : z || m.options.data).length, m.type === "treemap" ? L *= 12 : m.type === "heatmap" ? L *= 6 : E[m.type] && (L *= 2), L;
- }
- return 0;
- }
- function T() {
- p.clear(p.COLOR_BUFFER_BIT | p.DEPTH_BUFFER_BIT);
- }
- function O(m, L) {
- function z($t) {
- $t && (L.colorData.push($t[0]), L.colorData.push($t[1]), L.colorData.push($t[2]), L.colorData.push($t[3]));
- }
- function $($t, de, ge, Re, De) {
- z(De), g.usePreallocated ? (u.push($t, de, ge ? 1 : 0, Re || 1), i += 4) : (s.push($t), s.push(de), s.push(ge ? 1 : 0), s.push(Re || 1));
- }
- function Q() {
- L.segments.length && (L.segments[L.segments.length - 1].to = s.length || i);
- }
- function A() {
- L.segments.length && L.segments[L.segments.length - 1].from === (s.length || i) || (Q(), L.segments.push({ from: s.length || i }));
- }
- function H($t, de, ge, Re, De) {
- z(De), $($t + ge, de), z(De), $($t, de), z(De), $($t, de + Re), z(De), $($t, de + Re), z(De), $($t + ge, de + Re), z(De), $($t + ge, de);
- }
- function Y($t, de) {
- g.useGPUTranslations || (L.skipTranslation = !0, $t.x = lt.toPixels($t.x, !0), $t.y = ot.toPixels($t.y, !0)), de ? s = [$t.x, $t.y, 0, 2].concat(s) : $($t.x, $t.y, 0, 2);
- }
- var Z = m.pointArrayMap && m.pointArrayMap.join(",") === "low,high", q = m.chart, it = m.options, et = !!it.stacking, nt = it.data, rt = m.xAxis.getExtremes(), ct = rt.min, gt = rt.max;
- rt = m.yAxis.getExtremes();
- var dt = rt.min, ht = rt.max, at = m.xData || it.xData || m.processedXData, J = m.yData || it.yData || m.processedYData, tt = m.zData || it.zData || m.processedZData, ot = m.yAxis, lt = m.xAxis, pt = m.chart.plotWidth, yt = !at || at.length === 0, vt = it.connectNulls;
- rt = m.points || !1;
- var Ct = !1, Pt = !1, At, St, Dt = et ? m.data : at || nt, _t = { x: Number.MAX_VALUE, y: 0 }, Nt = { x: -Number.MAX_VALUE, y: 0 }, Ot = 0, Kt = !1, Gt, Wt, Jt, be, Yt = -1, Vt = !1, Me = !1, Or, us = typeof q.index > "u", En = !1, On = !1, $e = !1, Ln = E[m.type], _n = !1, Jr = !0, ds = !0, Go = it.zoneAxis || "y", Lr = it.zones || !1, Xi = !1, fs = it.threshold, Dn = !1;
- if (!(it.boostData && 0 < it.boostData.length)) {
- if (it.gapSize && (Dn = it.gapUnit !== "value" ? it.gapSize * m.closestPointRange : it.gapSize), Lr) {
- var _r = [];
- Lr.forEach(function($t, de) {
- if ($t.color) {
- var ge = G($t.color).rgba;
- ge[0] /= 255, ge[1] /= 255, ge[2] /= 255, _r[de] = ge, Xi || typeof $t.value < "u" || (Xi = ge);
- }
- }), Xi || (at = m.pointAttribs && m.pointAttribs().fill || m.color, Xi = G(at).rgba, Xi[0] /= 255, Xi[1] /= 255, Xi[2] /= 255);
- }
- if (q.inverted && (pt = m.chart.plotHeight), m.closestPointRangePx = Number.MAX_VALUE, A(), rt && 0 < rt.length)
- L.skipTranslation = !0, L.drawMode = "triangles", rt[0].node && rt[0].node.levelDynamic && rt.sort(function($t, de) {
- if ($t.node) {
- if ($t.node.levelDynamic > de.node.levelDynamic)
- return 1;
- if ($t.node.levelDynamic < de.node.levelDynamic)
- return -1;
- }
- return 0;
- }), rt.forEach(function($t) {
- var de = $t.plotY;
- if (typeof de < "u" && !isNaN(de) && $t.y !== null && $t.shapeArgs) {
- var ge = $t.shapeArgs;
- de = ge.x, de = de === void 0 ? 0 : de;
- var Re = ge.y;
- Re = Re === void 0 ? 0 : Re;
- var De = ge.width;
- De = De === void 0 ? 0 : De, ge = ge.height, ge = ge === void 0 ? 0 : ge;
- var qr = q.styledMode ? $t.series.colorAttribs($t) : qr = $t.series.pointAttribs($t);
- $t = qr["stroke-width"] || 0, $e = G(qr.fill).rgba, $e[0] /= 255, $e[1] /= 255, $e[2] /= 255, m.type === "treemap" && ($t = $t || 1, St = G(qr.stroke).rgba, St[0] /= 255, St[1] /= 255, St[2] /= 255, H(de, Re, De, ge, St), $t /= 2), m.type === "heatmap" && q.inverted && (de = lt.len - de, Re = ot.len - Re, De = -De, ge = -ge), H(de + $t, Re + $t, De - 2 * $t, ge - 2 * $t, $e);
- }
- });
- else {
- for (rt = function() {
- if (Jt = Dt[++Yt], typeof Jt > "u")
- return "continue";
- if (us)
- return "break";
- var $t = nt && nt[Yt];
- if (!yt && B($t, !0) && $t.color && ($e = G($t.color).rgba, $e[0] /= 255, $e[1] /= 255, $e[2] /= 255), yt ? (Gt = Jt[0], Wt = Jt[1], Dt[Yt + 1] && (Me = Dt[Yt + 1][0]), Dt[Yt - 1] && (Vt = Dt[Yt - 1][0]), 3 <= Jt.length && (be = Jt[2], Jt[2] > L.zMax && (L.zMax = Jt[2]), Jt[2] < L.zMin && (L.zMin = Jt[2]))) : (Gt = Jt, Wt = J[Yt], Dt[Yt + 1] && (Me = Dt[Yt + 1]), Dt[Yt - 1] && (Vt = Dt[Yt - 1]), tt && tt.length && (be = tt[Yt], tt[Yt] > L.zMax && (L.zMax = tt[Yt]), tt[Yt] < L.zMin && (L.zMin = tt[Yt]))), !vt && (Gt === null || Wt === null))
- return A(), "continue";
- if (Me && Me >= ct && Me <= gt && (En = !0), Vt && Vt >= ct && Vt <= gt && (On = !0), Z ? (yt && (Wt = Jt.slice(1, 3)), Or = Wt[0], Wt = Wt[1]) : et && (Gt = Jt.x, Wt = Jt.stackY, Or = Wt - Jt.y), dt !== null && typeof dt < "u" && ht !== null && typeof ht < "u" && (Jr = Wt >= dt && Wt <= ht), Gt > gt && Nt.x < gt && (Nt.x = Gt, Nt.y = Wt), Gt < ct && _t.x > ct && (_t.x = Gt, _t.y = Wt), Wt === null && vt)
- return "continue";
- if (Wt === null || !Jr && !En && !On)
- return A(), "continue";
- if ((Me >= ct || Gt >= ct) && (Vt <= gt || Gt <= gt) && (_n = !0), !_n && !En && !On)
- return "continue";
- if (Dn && Gt - Vt > Dn && A(), Lr) {
- var de;
- Lr.some(function(ge, Re) {
- var De = Lr[Re - 1];
- return Go === "x" ? typeof ge.value < "u" && Gt <= ge.value ? (_r[Re] && (!De || Gt >= De.value) && (de = _r[Re]), !0) : !1 : typeof ge.value < "u" && Wt <= ge.value ? (_r[Re] && (!De || Wt >= De.value) && (de = _r[Re]), !0) : !1;
- }), $e = de || Xi || $e;
- }
- if (!g.useGPUTranslations && (L.skipTranslation = !0, Gt = lt.toPixels(Gt, !0), Wt = ot.toPixels(Wt, !0), Gt > pt && L.drawMode === "points"))
- return "continue";
- if (L.hasMarkers && _n && Ct !== !1 && (m.closestPointRangePx = Math.min(m.closestPointRangePx, Math.abs(Gt - Ct))), !g.useGPUTranslations && !g.usePreallocated && Ct && 1 > Math.abs(Gt - Ct) && Pt && 1 > Math.abs(Wt - Pt))
- return g.debug.showSkipSummary && ++Ot, "continue";
- Ln && (At = Or, (Or === !1 || typeof Or > "u") && (At = 0 > Wt ? Wt : 0), Z || et || (At = Math.max(fs === null ? dt : fs, dt)), g.useGPUTranslations || (At = ot.toPixels(At, !0)), $(Gt, At, 0, 0, $e)), it.step && !ds && $(Gt, Pt, 0, 2, $e), $(Gt, Wt, 0, m.type === "bubble" ? be || 1 : 2, $e), Ct = Gt, Pt = Wt, Kt = !0, ds = !1;
- }; Yt < Dt.length - 1 && rt() !== "break"; )
- ;
- g.debug.showSkipSummary && console.log("skipped points:", Ot), Kt || vt === !1 || m.drawMode !== "line_strip" || (_t.x < Number.MAX_VALUE && Y(_t, !0), Nt.x > -Number.MAX_VALUE && Y(Nt));
- }
- Q();
- }
- }
- function R() {
- I = [], P.data = s = [], n = [], u && u.destroy();
- }
- function k(m) {
- c && (c.setUniform("xAxisTrans", m.transA), c.setUniform("xAxisMin", m.min), c.setUniform("xAxisMinPad", m.minPixelPadding), c.setUniform("xAxisPointRange", m.pointRange), c.setUniform("xAxisLen", m.len), c.setUniform(
- "xAxisPos",
- m.pos
- ), c.setUniform("xAxisCVSCoord", !m.horiz), c.setUniform("xAxisIsLog", !!m.logarithmic), c.setUniform("xAxisReversed", !!m.reversed));
- }
- function b(m) {
- c && (c.setUniform("yAxisTrans", m.transA), c.setUniform("yAxisMin", m.min), c.setUniform("yAxisMinPad", m.minPixelPadding), c.setUniform("yAxisPointRange", m.pointRange), c.setUniform("yAxisLen", m.len), c.setUniform("yAxisPos", m.pos), c.setUniform("yAxisCVSCoord", !m.horiz), c.setUniform("yAxisIsLog", !!m.logarithmic), c.setUniform("yAxisReversed", !!m.reversed));
- }
- function S(m, L) {
- c.setUniform("hasThreshold", m), c.setUniform("translatedThreshold", L);
- }
- function v(m) {
- if (m)
- a = m.chartWidth || 800, t = m.chartHeight || 400;
- else
- return !1;
- if (!(p && a && t && c))
- return !1;
- g.debug.timeRendering && console.time("gl rendering"), p.canvas.width = a, p.canvas.height = t, c.bind(), p.viewport(0, 0, a, t), c.setPMatrix([2 / a, 0, 0, 0, 0, -(2 / t), 0, 0, 0, 0, -2, 0, -1, 1, -1, 1]), 1 < g.lineWidth && !_.isMS && p.lineWidth(g.lineWidth), u.build(P.data, "aVertexPosition", 4), u.bind(), c.setInverted(m.inverted), I.forEach(function(L, z) {
- var $ = L.series.options, Q = $.marker, A = typeof $.lineWidth < "u" ? $.lineWidth : 1, H = $.threshold, Y = F(H), Z = L.series.yAxis.getThreshold(H);
- if (H = x($.marker ? $.marker.enabled : null, L.series.xAxis.isRadial ? !0 : null, L.series.closestPointRangePx > 2 * (($.marker ? $.marker.radius : 10) || 10)), Q = W[Q && Q.symbol || L.series.symbol] || W.circle, L.segments.length !== 0 && L.segments[0].from !== L.segments[0].to) {
- if (Q.isReady && (p.bindTexture(p.TEXTURE_2D, Q.handle), c.setTexture(Q.handle)), m.styledMode ? Q = L.series.markerGroup && L.series.markerGroup.getStyle("fill") : (Q = L.drawMode === "points" && L.series.pointAttribs && L.series.pointAttribs().fill || L.series.color, $.colorByPoint && (Q = L.series.chart.options.colors[z])), L.series.fillOpacity && $.fillOpacity && (Q = new o(Q).setOpacity(x($.fillOpacity, 1)).get()), Q = G(Q).rgba, g.useAlpha || (Q[3] = 1), L.drawMode === "lines" && g.useAlpha && 1 > Q[3] && (Q[3] /= 10), $.boostBlending === "add" ? (p.blendFunc(p.SRC_ALPHA, p.ONE), p.blendEquation(p.FUNC_ADD)) : $.boostBlending === "mult" || $.boostBlending === "multiply" ? p.blendFunc(p.DST_COLOR, p.ZERO) : $.boostBlending === "darken" ? (p.blendFunc(p.ONE, p.ONE), p.blendEquation(p.FUNC_MIN)) : p.blendFuncSeparate(p.SRC_ALPHA, p.ONE_MINUS_SRC_ALPHA, p.ONE, p.ONE_MINUS_SRC_ALPHA), c.reset(), 0 < L.colorData.length ? (c.setUniform("hasColor", 1), z = N(p, c), z.build(L.colorData, "aColor", 4), z.bind()) : p.disableVertexAttribArray(p.getAttribLocation(c.program(), "aColor")), c.setColor(Q), k(L.series.xAxis), b(L.series.yAxis), S(Y, Z), L.drawMode === "points" && ($.marker && F($.marker.radius) ? c.setPointSize(2 * $.marker.radius) : c.setPointSize(1)), c.setSkipTranslation(L.skipTranslation), L.series.type === "bubble" && c.setBubbleUniforms(L.series, L.zMin, L.zMax), c.setDrawAsCircle(X[L.series.type] || !1), 0 < A || L.drawMode !== "line_strip")
- for (A = 0; A < L.segments.length; A++)
- u.render(L.segments[A].from, L.segments[A].to, L.drawMode);
- if (L.hasMarkers && H)
- for ($.marker && F($.marker.radius) ? c.setPointSize(2 * $.marker.radius) : c.setPointSize(10), c.setDrawAsCircle(!0), A = 0; A < L.segments.length; A++)
- u.render(L.segments[A].from, L.segments[A].to, "POINTS");
- }
- }), g.debug.timeRendering && console.timeEnd("gl rendering"), f && f(), R();
- }
- function h(m) {
- if (T(), m.renderer.forExport)
- return v(m);
- D ? v(m) : setTimeout(function() {
- h(m);
- }, 1);
- }
- var c = !1, u = !1, i = 0, p = !1, a = 0, t = 0, s = !1, n = !1, P = {}, D = !1, I = [], W = {}, E = { column: !0, columnrange: !0, bar: !0, area: !0, arearange: !0 }, X = { scatter: !0, bubble: !0 }, g = { pointSize: 1, lineWidth: 1, fillColor: "#AA00AA", useAlpha: !0, usePreallocated: !1, useGPUTranslations: !1, debug: { timeRendering: !1, timeSeriesProcessing: !1, timeSetup: !1, timeBufferCopy: !1, timeKDTree: !1, showSkipSummary: !1 } };
- return P = { allocateBufferForSingleSeries: function(m) {
- var L = 0;
- g.usePreallocated && (m.isSeriesBoosting && (L = l(m)), u.allocate(L));
- }, pushSeries: function(m) {
- 0 < I.length && I[I.length - 1].hasMarkers && (I[I.length - 1].markerTo = n.length), g.debug.timeSeriesProcessing && console.time("building " + m.type + " series");
- var L = { segments: [], markerFrom: n.length, colorData: [], series: m, zMin: Number.MAX_VALUE, zMax: -Number.MAX_VALUE, hasMarkers: m.options.marker ? m.options.marker.enabled !== !1 : !1, showMarkers: !0, drawMode: {
- area: "lines",
- arearange: "lines",
- areaspline: "line_strip",
- column: "lines",
- columnrange: "lines",
- bar: "lines",
- line: "line_strip",
- scatter: "points",
- heatmap: "triangles",
- treemap: "triangles",
- bubble: "points"
- }[m.type] || "line_strip" };
- m.index >= I.length ? I.push(L) : I[m.index] = L, O(m, L), g.debug.timeSeriesProcessing && console.timeEnd("building " + m.type + " series");
- }, setSize: function(m, L) {
- a === m && t === L || !c || (a = m, t = L, c.bind(), c.setPMatrix([2 / a, 0, 0, 0, 0, -(2 / t), 0, 0, 0, 0, -2, 0, -1, 1, -1, 1]));
- }, inited: function() {
- return D;
- }, setThreshold: S, init: function(m, L) {
- function z(A, H) {
- var Y = { isReady: !1, texture: V.createElement("canvas"), handle: p.createTexture() }, Z = Y.texture.getContext("2d");
- W[A] = Y, Y.texture.width = 512, Y.texture.height = 512, Z.mozImageSmoothingEnabled = !1, Z.webkitImageSmoothingEnabled = !1, Z.msImageSmoothingEnabled = !1, Z.imageSmoothingEnabled = !1, Z.strokeStyle = "rgba(255, 255, 255, 0)", Z.fillStyle = "#FFF", H(Z);
- try {
- p.activeTexture(p.TEXTURE0), p.bindTexture(p.TEXTURE_2D, Y.handle), p.texImage2D(p.TEXTURE_2D, 0, p.RGBA, p.RGBA, p.UNSIGNED_BYTE, Y.texture), p.texParameteri(p.TEXTURE_2D, p.TEXTURE_WRAP_S, p.CLAMP_TO_EDGE), p.texParameteri(
- p.TEXTURE_2D,
- p.TEXTURE_WRAP_T,
- p.CLAMP_TO_EDGE
- ), p.texParameteri(p.TEXTURE_2D, p.TEXTURE_MAG_FILTER, p.LINEAR), p.texParameteri(p.TEXTURE_2D, p.TEXTURE_MIN_FILTER, p.LINEAR), p.bindTexture(p.TEXTURE_2D, null), Y.isReady = !0;
- } catch {
- }
- }
- var $ = 0, Q = ["webgl", "experimental-webgl", "moz-webgl", "webkit-3d"];
- if (D = !1, !m)
- return !1;
- for (g.debug.timeSetup && console.time("gl setup"); $ < Q.length && !(p = m.getContext(Q[$], {})); $++)
- ;
- if (p)
- L || R();
- else
- return !1;
- return p.enable(p.BLEND), p.blendFunc(p.SRC_ALPHA, p.ONE_MINUS_SRC_ALPHA), p.disable(p.DEPTH_TEST), p.depthFunc(p.LESS), c = y(p), c ? (u = N(p, c), z("circle", function(A) {
- A.beginPath(), A.arc(256, 256, 256, 0, 2 * Math.PI), A.stroke(), A.fill();
- }), z("square", function(A) {
- A.fillRect(0, 0, 512, 512);
- }), z("diamond", function(A) {
- A.beginPath(), A.moveTo(256, 0), A.lineTo(512, 256), A.lineTo(256, 512), A.lineTo(0, 256), A.lineTo(256, 0), A.fill();
- }), z("triangle", function(A) {
- A.beginPath(), A.moveTo(0, 512), A.lineTo(256, 0), A.lineTo(512, 512), A.lineTo(0, 512), A.fill();
- }), z("triangle-down", function(A) {
- A.beginPath(), A.moveTo(0, 0), A.lineTo(256, 512), A.lineTo(
- 512,
- 0
- ), A.lineTo(0, 0), A.fill();
- }), D = !0, g.debug.timeSetup && console.timeEnd("gl setup"), !0) : !1;
- }, render: h, settings: g, valid: function() {
- return p !== !1;
- }, clear: T, flush: R, setXAxis: k, setYAxis: b, data: s, gl: function() {
- return p;
- }, allocateBuffer: function(m) {
- var L = 0;
- g.usePreallocated && (m.series.forEach(function(z) {
- z.isSeriesBoosting && (L += l(z));
- }), u.allocate(L));
- }, destroy: function() {
- R(), u.destroy(), c.destroy(), p && (w(W, function(m) {
- m.handle && p.deleteTexture(m.handle);
- }), p.canvas.width = 1, p.canvas.height = 1);
- }, setOptions: function(m) {
- j(
- !0,
- g,
- m
- );
- } };
- };
- }), C(d, "Extensions/Boost/BoostAttach.js", [d["Core/Chart/Chart.js"], d["Extensions/Boost/WGLRenderer.js"], d["Core/Globals.js"], d["Core/Utilities.js"]], function(o, y, N, _) {
- var U = N.doc, G = _.error, V;
- return function(F, B) {
- var j = F.chartWidth, w = F.chartHeight, x = F, f = F.seriesGroup || B.group, l = U.implementation.hasFeature("www.http://w3.org/TR/SVG11/feature#Extensibility", "1.1");
- return x = F.isChartSeriesBoosting() ? F : B, l = !1, V || (V = U.createElement("canvas")), x.renderTarget || (x.canvas = V, F.renderer.forExport || !l ? (x.renderTarget = F.renderer.image("", 0, 0, j, w).addClass("highcharts-boost-canvas").add(f), x.boostClear = function() {
- x.renderTarget.attr({ href: "" });
- }, x.boostCopy = function() {
- x.boostResizeTarget(), x.renderTarget.attr({ href: x.canvas.toDataURL("image/png") });
- }) : (x.renderTargetFo = F.renderer.createElement("foreignObject").add(f), x.renderTarget = U.createElement("canvas"), x.renderTargetCtx = x.renderTarget.getContext("2d"), x.renderTargetFo.element.appendChild(x.renderTarget), x.boostClear = function() {
- x.renderTarget.width = x.canvas.width, x.renderTarget.height = x.canvas.height;
- }, x.boostCopy = function() {
- x.renderTarget.width = x.canvas.width, x.renderTarget.height = x.canvas.height, x.renderTargetCtx.drawImage(x.canvas, 0, 0);
- }), x.boostResizeTarget = function() {
- j = F.chartWidth, w = F.chartHeight, (x.renderTargetFo || x.renderTarget).attr({ x: 0, y: 0, width: j, height: w }).css({ pointerEvents: "none", mixedBlendMode: "normal", opacity: 1 }), x instanceof o && x.markerGroup.translate(F.plotLeft, F.plotTop);
- }, x.boostClipRect = F.renderer.clipRect(), (x.renderTargetFo || x.renderTarget).clip(x.boostClipRect), x instanceof o && (x.markerGroup = x.renderer.g().add(f), x.markerGroup.translate(B.xAxis.pos, B.yAxis.pos))), x.canvas.width = j, x.canvas.height = w, x.boostClipRect.attr(F.getBoostClipRect(x)), x.boostResizeTarget(), x.boostClear(), x.ogl || (x.ogl = y(function() {
- x.ogl.settings.debug.timeBufferCopy && console.time("buffer copy"), x.boostCopy(), x.ogl.settings.debug.timeBufferCopy && console.timeEnd("buffer copy");
- }), x.ogl.init(x.canvas) || G("[highcharts boost] - unable to init WebGL renderer"), x.ogl.setOptions(F.options.boost || {}), x instanceof o && x.ogl.allocateBuffer(F)), x.ogl.setSize(j, w), x.ogl;
- };
- }), C(d, "Extensions/Boost/BoostUtils.js", [d["Core/Globals.js"], d["Extensions/Boost/BoostableMap.js"], d["Extensions/Boost/BoostAttach.js"], d["Core/Utilities.js"]], function(o, y, N, _) {
- function U() {
- for (var f = [], l = 0; l < arguments.length; l++)
- f[l] = arguments[l];
- var T = -Number.MAX_VALUE;
- return f.forEach(function(O) {
- if (typeof O < "u" && O !== null && typeof O.length < "u" && 0 < O.length)
- return T = O.length, !0;
- }), T;
- }
- function G(f, l, T) {
- f && l.renderTarget && l.canvas && !(T || l.chart).isChartSeriesBoosting() && f.render(T || l.chart);
- }
- function V(f, l) {
- f && l.renderTarget && l.canvas && !l.chart.isChartSeriesBoosting() && f.allocateBufferForSingleSeries(l);
- }
- function F(f, l, T, O, R, k) {
- R = R || 0, O = O || 3e3;
- for (var b = R + O, S = !0; S && R < b && R < f.length; )
- S = l(f[R], R), ++R;
- S && (R < f.length ? k ? F(f, l, T, O, R, k) : j.requestAnimationFrame ? j.requestAnimationFrame(function() {
- F(f, l, T, O, R);
- }) : setTimeout(function() {
- F(f, l, T, O, R);
- }) : T && T());
- }
- function B() {
- var f = 0, l, T = [
- "webgl",
- "experimental-webgl",
- "moz-webgl",
- "webkit-3d"
- ], O = !1;
- if (typeof j.WebGLRenderingContext < "u")
- for (l = w.createElement("canvas"); f < T.length; f++)
- try {
- if (O = l.getContext(T[f]), typeof O < "u" && O !== null)
- return !0;
- } catch {
- }
- return !1;
- }
- var j = o.win, w = o.doc, x = _.pick;
- return _ = { patientMax: U, boostEnabled: function(f) {
- return x(f && f.options && f.options.boost && f.options.boost.enabled, !0);
- }, shouldForceChartSeriesBoosting: function(f) {
- var l = 0, T = 0, O = x(f.options.boost && f.options.boost.allowForce, !0);
- if (typeof f.boostForceChartBoost < "u")
- return f.boostForceChartBoost;
- if (1 < f.series.length)
- for (var R = 0; R < f.series.length; R++) {
- var k = f.series[R];
- k.options.boostThreshold !== 0 && k.visible !== !1 && k.type !== "heatmap" && (y[k.type] && ++T, U(k.processedXData, k.options.data, k.points) >= (k.options.boostThreshold || Number.MAX_VALUE) && ++l);
- }
- return f.boostForceChartBoost = O && (T === f.series.length && 0 < l || 5 < l), f.boostForceChartBoost;
- }, renderIfNotSeriesBoosting: G, allocateIfNotSeriesBoosting: V, eachAsync: F, hasWebGLSupport: B, pointDrawHandler: function(f) {
- var l = !0;
- if (this.chart.options && this.chart.options.boost && (l = typeof this.chart.options.boost.enabled > "u" ? !0 : this.chart.options.boost.enabled), !l || !this.isSeriesBoosting)
- return f.call(this);
- this.chart.isBoosting = !0, (f = N(this.chart, this)) && (V(f, this), f.pushSeries(this)), G(f, this);
- } }, o.hasWebGLSupport = B, _;
- }), C(
- d,
- "Extensions/Boost/BoostInit.js",
- [d["Core/Chart/Chart.js"], d["Core/Globals.js"], d["Core/Series/Series.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"], d["Extensions/Boost/BoostUtils.js"], d["Extensions/Boost/BoostAttach.js"]],
- function(o, y, N, _, U, G, V) {
- var F = y.noop, B = _.seriesTypes, j = U.addEvent, w = U.extend, x = U.fireEvent, f = U.wrap, l = G.eachAsync, T = G.pointDrawHandler, O = G.allocateIfNotSeriesBoosting, R = G.renderIfNotSeriesBoosting, k = G.shouldForceChartSeriesBoosting, b;
- return function() {
- w(N.prototype, { renderCanvas: function() {
- function S(dt, ht) {
- var at = !1, J = typeof i.index > "u", tt = !0;
- if (typeof dt > "u")
- return !0;
- if (!J) {
- if (H)
- var ot = dt[0], lt = dt[1];
- else
- ot = dt, lt = s[ht];
- z ? (H && (lt = dt.slice(1, 3)), at = lt[0], lt = lt[1]) : $ && (ot = dt.x, lt = dt.stackY, at = lt - dt.y), A || (tt = lt >= I && lt <= W), lt !== null && ot >= P && ot <= D && tt && (dt = p.toPixels(ot, !0), g ? ((typeof q > "u" || dt === X) && (z || (at = lt), (typeof it > "u" || lt > Z) && (Z = lt, it = ht), (typeof q > "u" || at < Y) && (Y = at, q = ht)), dt !== X && (typeof q < "u" && (lt = a.toPixels(Z, !0), L = a.toPixels(Y, !0), rt(dt, lt, it), L !== lt && rt(dt, L, q)), q = it = void 0, X = dt)) : (lt = Math.ceil(a.toPixels(lt, !0)), rt(dt, lt, ht)));
- }
- return !J;
- }
- function v() {
- x(h, "renderedCanvas"), delete h.buildKDTree, h.buildKDTree(), ct.debug.timeKDTree && console.timeEnd("kd tree building");
- }
- var h = this, c = h.options || {}, u = !1, i = h.chart, p = this.xAxis, a = this.yAxis, t = c.xData || h.processedXData, s = c.yData || h.processedYData, n = c.data;
- u = p.getExtremes();
- var P = u.min, D = u.max;
- u = a.getExtremes();
- var I = u.min, W = u.max, E = {}, X, g = !!h.sampling, m = c.enableMouseTracking !== !1, L = a.getThreshold(c.threshold), z = h.pointArrayMap && h.pointArrayMap.join(",") === "low,high", $ = !!c.stacking, Q = h.cropStart || 0, A = h.requireSorting, H = !t, Y, Z, q, it, et = c.findNearestPointBy === "x", nt = this.xData || this.options.xData || this.processedXData || !1, rt = function(dt, ht, at) {
- dt = Math.ceil(dt), b = et ? dt : dt + "," + ht, m && !E[b] && (E[b] = !0, i.inverted && (dt = p.len - dt, ht = a.len - ht), gt.push({ x: nt ? nt[Q + at] : !1, clientX: dt, plotX: dt, plotY: ht, i: Q + at }));
- };
- u = V(i, h), i.isBoosting = !0;
- var ct = u.settings;
- if (this.visible) {
- (this.points || this.graph) && this.destroyGraphics(), i.isChartSeriesBoosting() ? (this.markerGroup && this.markerGroup !== i.markerGroup && this.markerGroup.destroy(), this.markerGroup = i.markerGroup, this.renderTarget && (this.renderTarget = this.renderTarget.destroy())) : (this.markerGroup === i.markerGroup && (this.markerGroup = void 0), this.markerGroup = h.plotGroup("markerGroup", "markers", !0, 1, i.seriesGroup));
- var gt = this.points = [];
- h.buildKDTree = F, u && (O(u, this), u.pushSeries(h), R(u, this, i)), i.renderer.forExport || (ct.debug.timeKDTree && console.time("kd tree building"), l($ ? h.data : t || n, S, v));
- }
- } }), ["heatmap", "treemap"].forEach(function(S) {
- B[S] && f(B[S].prototype, "drawPoints", T);
- }), B.bubble && (delete B.bubble.prototype.buildKDTree, f(B.bubble.prototype, "markerAttribs", function(S) {
- return this.isSeriesBoosting ? !1 : S.apply(this, [].slice.call(arguments, 1));
- })), B.scatter.prototype.fill = !0, w(B.area.prototype, { fill: !0, fillOpacity: !0, sampling: !0 }), w(B.column.prototype, { fill: !0, sampling: !0 }), o.prototype.propsRequireUpdateSeries.push("boost"), o.prototype.callbacks.push(function(S) {
- j(S, "predraw", function() {
- S.boostForceChartBoost = void 0, S.boostForceChartBoost = k(S), S.isBoosting = !1, !S.isChartSeriesBoosting() && S.didBoost && (S.didBoost = !1), S.boostClear && S.boostClear(), S.canvas && S.ogl && S.isChartSeriesBoosting() && (S.didBoost = !0, S.ogl.allocateBuffer(S)), S.markerGroup && S.xAxis && 0 < S.xAxis.length && S.yAxis && 0 < S.yAxis.length && S.markerGroup.translate(S.xAxis[0].pos, S.yAxis[0].pos);
- }), j(S, "render", function() {
- S.ogl && S.isChartSeriesBoosting() && S.ogl.render(S);
- });
- var v = -1, h = -1;
- j(S.pointer, "afterGetHoverData", function() {
- var c = S.hoverSeries;
- if (S.markerGroup && c) {
- var u = S.inverted ? c.yAxis : c.xAxis;
- c = S.inverted ? c.xAxis : c.yAxis, (u && u.pos !== v || c && c.pos !== h) && (S.markerGroup.translate(u.pos, c.pos), v = u.pos, h = c.pos);
- }
- });
- });
- };
- }
- ), C(
- d,
- "Extensions/BoostCanvas.js",
- [d["Core/Chart/Chart.js"], d["Core/Color/Color.js"], d["Core/Globals.js"], d["Core/Series/Series.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]],
- function(o, y, N, _, U, G) {
- var V = y.parse, F = N.doc, B = N.noop, j = U.seriesTypes, w = G.addEvent, x = G.extend, f = G.fireEvent, l = G.isNumber, T = G.merge, O = G.pick, R = G.wrap, k;
- return function() {
- N.seriesTypes.heatmap && R(N.seriesTypes.heatmap.prototype, "drawPoints", function() {
- var b = this.chart, S = this.getContext(), v = this.chart.inverted, h = this.xAxis, c = this.yAxis;
- S ? (this.points.forEach(function(u) {
- var i = u.plotY;
- if (typeof i < "u" && !isNaN(i) && u.y !== null && S) {
- var p = u.shapeArgs || {};
- i = p.x, i = i === void 0 ? 0 : i;
- var a = p.y;
- a = a === void 0 ? 0 : a;
- var t = p.width;
- t = t === void 0 ? 0 : t, p = p.height, p = p === void 0 ? 0 : p, u = b.styledMode ? u.series.colorAttribs(u) : u.series.pointAttribs(u), S.fillStyle = u.fill, v ? S.fillRect(c.len - a + h.left, h.len - i + c.top, -p, -t) : S.fillRect(i + h.left, a + c.top, t, p);
- }
- }), this.canvasToSVG()) : this.chart.showLoading("Your browser doesn't support HTML5 canvas, <br>please use a modern browser");
- }), x(_.prototype, { getContext: function() {
- var b = this.chart, S = b.chartWidth, v = b.chartHeight, h = b.seriesGroup || this.group, c = this, u = function(p, a, t, s, n, P, D) {
- p.call(this, t, a, s, n, P, D);
- };
- b.isChartSeriesBoosting() && (c = b, h = b.seriesGroup);
- var i = c.ctx;
- return c.canvas || (c.canvas = F.createElement("canvas"), c.renderTarget = b.renderer.image("", 0, 0, S, v).addClass("highcharts-boost-canvas").add(h), c.ctx = i = c.canvas.getContext("2d"), b.inverted && ["moveTo", "lineTo", "rect", "arc"].forEach(function(p) {
- R(i, p, u);
- }), c.boostCopy = function() {
- c.renderTarget.attr({ href: c.canvas.toDataURL("image/png") });
- }, c.boostClear = function() {
- i.clearRect(0, 0, c.canvas.width, c.canvas.height), c === this && c.renderTarget.attr({ href: "" });
- }, c.boostClipRect = b.renderer.clipRect(), c.renderTarget.clip(c.boostClipRect)), c.canvas.width !== S && (c.canvas.width = S), c.canvas.height !== v && (c.canvas.height = v), c.renderTarget.attr({ x: 0, y: 0, width: S, height: v, style: "pointer-events: none", href: "" }), c.boostClipRect.attr(b.getBoostClipRect(c)), i;
- }, canvasToSVG: function() {
- this.chart.isChartSeriesBoosting() ? this.boostClear && this.boostClear() : (this.boostCopy || this.chart.boostCopy) && (this.boostCopy || this.chart.boostCopy)();
- }, cvsLineTo: function(b, S, v) {
- b.lineTo(S, v);
- }, renderCanvas: function() {
- var b = this, S = b.options, v = b.chart, h = this.xAxis, c = this.yAxis, u = (v.options.boost || {}).timeRendering || !1, i = 0, p = b.processedXData, a = b.processedYData, t = S.data, s = h.getExtremes(), n = s.min, P = s.max;
- s = c.getExtremes();
- var D = s.min, I = s.max, W = {}, E, X = !!b.sampling, g = S.marker && S.marker.radius, m = this.cvsDrawPoint, L = S.lineWidth ? this.cvsLineTo : void 0, z = g && 1 >= g ? this.cvsMarkerSquare : this.cvsMarkerCircle, $ = this.cvsStrokeBatch || 1e3, Q = S.enableMouseTracking !== !1, A;
- s = S.threshold;
- var H = c.getThreshold(s), Y = l(s), Z = H, q = this.fill, it = b.pointArrayMap && b.pointArrayMap.join(",") === "low,high", et = !!S.stacking, nt = b.cropStart || 0;
- s = v.options.loading;
- var rt = b.requireSorting, ct, gt = S.connectNulls, dt = !p, ht, at, J, tt, ot, lt = et ? b.data : p || t, pt = b.fillOpacity ? y.parse(b.color).setOpacity(O(S.fillOpacity, 0.75)).get() : b.color, yt = function() {
- q ? (Dt.fillStyle = pt, Dt.fill()) : (Dt.strokeStyle = b.color, Dt.lineWidth = S.lineWidth, Dt.stroke());
- }, vt = function(_t, Nt, Ot, Kt) {
- i === 0 && (Dt.beginPath(), L && (Dt.lineJoin = "round")), v.scroller && b.options.className === "highcharts-navigator-series" ? (Nt += v.scroller.top, Ot && (Ot += v.scroller.top)) : Nt += v.plotTop, _t += v.plotLeft, ct ? Dt.moveTo(_t, Nt) : m ? m(Dt, _t, Nt, Ot, A) : L ? L(Dt, _t, Nt) : z && z.call(b, Dt, _t, Nt, g, Kt), i += 1, i === $ && (yt(), i = 0), A = { clientX: _t, plotY: Nt, yBottom: Ot };
- }, Ct = S.findNearestPointBy === "x", Pt = this.xData || this.options.xData || this.processedXData || !1, At = function(_t, Nt, Ot) {
- ot = Ct ? _t : _t + "," + Nt, Q && !W[ot] && (W[ot] = !0, v.inverted && (_t = h.len - _t, Nt = c.len - Nt), St.push({ x: Pt ? Pt[nt + Ot] : !1, clientX: _t, plotX: _t, plotY: Nt, i: nt + Ot }));
- };
- this.renderTarget && this.renderTarget.attr({ href: "" }), (this.points || this.graph) && this.destroyGraphics(), b.plotGroup("group", "series", b.visible ? "visible" : "hidden", S.zIndex, v.seriesGroup), b.markerGroup = b.group, w(b, "destroy", function() {
- b.markerGroup = null;
- });
- var St = this.points = [], Dt = this.getContext();
- b.buildKDTree = B, this.boostClear && this.boostClear(), this.visible && (99999 < t.length && (v.options.loading = T(s, { labelStyle: {
- backgroundColor: V("#ffffff").setOpacity(0.75).get(),
- padding: "1em",
- borderRadius: "0.5em"
- }, style: { backgroundColor: "none", opacity: 1 } }), G.clearTimeout(k), v.showLoading("Drawing..."), v.options.loading = s), u && console.time("canvas rendering"), N.eachAsync(lt, function(_t, Nt) {
- var Ot = !1, Kt = !1, Gt = !1, Wt = !1, Jt = typeof v.index > "u", be = !0;
- if (!Jt) {
- if (dt) {
- var Yt = _t[0], Vt = _t[1];
- lt[Nt + 1] && (Gt = lt[Nt + 1][0]), lt[Nt - 1] && (Wt = lt[Nt - 1][0]);
- } else
- Yt = _t, Vt = a[Nt], lt[Nt + 1] && (Gt = lt[Nt + 1]), lt[Nt - 1] && (Wt = lt[Nt - 1]);
- if (Gt && Gt >= n && Gt <= P && (Ot = !0), Wt && Wt >= n && Wt <= P && (Kt = !0), it) {
- dt && (Vt = _t.slice(1, 3));
- var Me = Vt[0];
- Vt = Vt[1];
- } else
- et && (Yt = _t.x, Vt = _t.stackY, Me = Vt - _t.y);
- _t = Vt === null, rt || (be = Vt >= D && Vt <= I), !_t && (Yt >= n && Yt <= P && be || Ot || Kt) && (Yt = Math.round(h.toPixels(Yt, !0)), X ? ((typeof J > "u" || Yt === E) && (it || (Me = Vt), (typeof tt > "u" || Vt > at) && (at = Vt, tt = Nt), (typeof J > "u" || Me < ht) && (ht = Me, J = Nt)), Yt !== E && (typeof J < "u" && (Vt = c.toPixels(at, !0), H = c.toPixels(ht, !0), vt(Yt, Y ? Math.min(Vt, Z) : Vt, Y ? Math.max(H, Z) : H, Nt), At(Yt, Vt, tt), H !== Vt && At(Yt, H, J)), J = tt = void 0, E = Yt)) : (Vt = Math.round(c.toPixels(Vt, !0)), vt(Yt, Vt, H, Nt), At(Yt, Vt, Nt))), ct = _t && !gt, Nt % 5e4 === 0 && (b.boostCopy || b.chart.boostCopy) && (b.boostCopy || b.chart.boostCopy)();
- }
- return !Jt;
- }, function() {
- var _t = v.loadingDiv, Nt = v.loadingShown;
- yt(), b.canvasToSVG(), u && console.timeEnd("canvas rendering"), f(b, "renderedCanvas"), Nt && (x(_t.style, { transition: "opacity 250ms", opacity: 0 }), v.loadingShown = !1, k = setTimeout(function() {
- _t.parentNode && _t.parentNode.removeChild(_t), v.loadingDiv = v.loadingSpan = null;
- }, 250)), delete b.buildKDTree, b.buildKDTree();
- }, v.renderer.forExport ? Number.MAX_VALUE : void 0));
- } }), j.scatter.prototype.cvsMarkerCircle = function(b, S, v, h) {
- b.moveTo(S, v), b.arc(S, v, h, 0, 2 * Math.PI, !1);
- }, j.scatter.prototype.cvsMarkerSquare = function(b, S, v, h) {
- b.rect(S - h, v - h, 2 * h, 2 * h);
- }, j.scatter.prototype.fill = !0, j.bubble && (j.bubble.prototype.cvsMarkerCircle = function(b, S, v, h, c) {
- b.moveTo(S, v), b.arc(S, v, this.radii && this.radii[c], 0, 2 * Math.PI, !1);
- }, j.bubble.prototype.cvsStrokeBatch = 1), x(j.area.prototype, {
- cvsDrawPoint: function(b, S, v, h, c) {
- c && S !== c.clientX && (b.moveTo(c.clientX, c.yBottom), b.lineTo(c.clientX, c.plotY), b.lineTo(S, v), b.lineTo(S, h));
- },
- fill: !0,
- fillOpacity: !0,
- sampling: !0
- }), x(j.column.prototype, { cvsDrawPoint: function(b, S, v, h) {
- b.rect(S - 1, v, 1, h - v);
- }, fill: !0, sampling: !0 }), o.prototype.callbacks.push(function(b) {
- w(b, "predraw", function() {
- b.renderTarget && b.renderTarget.attr({ href: "" }), b.canvas && b.canvas.getContext("2d").clearRect(0, 0, b.canvas.width, b.canvas.height);
- }), w(b, "render", function() {
- b.boostCopy && b.boostCopy();
- });
- });
- };
- }
- ), C(d, "Extensions/Boost/BoostOverrides.js", [
- d["Core/Chart/Chart.js"],
- d["Core/DefaultOptions.js"],
- d["Core/Series/Point.js"],
- d["Core/Series/Series.js"],
- d["Core/Series/SeriesRegistry.js"],
- d["Core/Utilities.js"],
- d["Extensions/Boost/BoostUtils.js"],
- d["Extensions/Boost/Boostables.js"],
- d["Extensions/Boost/BoostableMap.js"]
- ], function(o, y, N, _, U, G, V, F, B) {
- y = y.getOptions;
- var j = U.seriesTypes;
- U = G.addEvent;
- var w = G.error, x = G.isArray, f = G.isNumber, l = G.pick, T = G.wrap, O = V.boostEnabled, R = V.shouldForceChartSeriesBoosting, k = y().plotOptions;
- o.prototype.isChartSeriesBoosting = function() {
- return l(this.options.boost && this.options.boost.seriesThreshold, 50) <= this.series.length || R(this);
- }, o.prototype.getBoostClipRect = function(b) {
- var S = { x: this.plotLeft, y: this.plotTop, width: this.plotWidth, height: this.plotHeight };
- return b === this && (b = this.inverted ? this.xAxis : this.yAxis, 1 >= b.length ? (S.y = Math.min(b[0].pos, S.y), S.height = b[0].pos - this.plotTop + b[0].len) : S.height = this.plotHeight), S;
- }, _.prototype.getPoint = function(b) {
- var S = b, v = this.xData || this.options.xData || this.processedXData || !1;
- return !b || b instanceof this.pointClass || (S = new this.pointClass().init(this, this.options.data[b.i], v ? v[b.i] : void 0), S.category = l(this.xAxis.categories ? this.xAxis.categories[S.x] : S.x, S.x), S.dist = b.dist, S.distX = b.distX, S.plotX = b.plotX, S.plotY = b.plotY, S.index = b.i, S.isInside = this.isPointInside(b)), S;
- }, T(_.prototype, "searchPoint", function(b) {
- return this.getPoint(b.apply(this, [].slice.call(arguments, 1)));
- }), T(N.prototype, "haloPath", function(b) {
- var S = this.series, v = this.plotX, h = this.plotY, c = S.chart.inverted;
- S.isSeriesBoosting && c && (this.plotX = S.yAxis.len - h, this.plotY = S.xAxis.len - v);
- var u = b.apply(this, Array.prototype.slice.call(
- arguments,
- 1
- ));
- return S.isSeriesBoosting && c && (this.plotX = v, this.plotY = h), u;
- }), T(_.prototype, "markerAttribs", function(b, S) {
- var v = S.plotX, h = S.plotY, c = this.chart.inverted;
- this.isSeriesBoosting && c && (S.plotX = this.yAxis.len - h, S.plotY = this.xAxis.len - v);
- var u = b.apply(this, Array.prototype.slice.call(arguments, 1));
- return this.isSeriesBoosting && c && (S.plotX = v, S.plotY = h), u;
- }), U(_, "destroy", function() {
- var b = this, S = b.chart;
- S.markerGroup === b.markerGroup && (b.markerGroup = null), S.hoverPoints && (S.hoverPoints = S.hoverPoints.filter(function(v) {
- return v.series === b;
- })), S.hoverPoint && S.hoverPoint.series === b && (S.hoverPoint = null);
- }), T(_.prototype, "getExtremes", function(b) {
- return this.isSeriesBoosting && this.hasExtremes && this.hasExtremes() ? {} : b.apply(this, Array.prototype.slice.call(arguments, 1));
- }), ["translate", "generatePoints", "drawTracker", "drawPoints", "render"].forEach(function(b) {
- function S(v) {
- var h = this.options.stacking && (b === "translate" || b === "generatePoints");
- !this.isSeriesBoosting || h || !O(this.chart) || this.type === "heatmap" || this.type === "treemap" || !B[this.type] || this.options.boostThreshold === 0 ? v.call(this) : this[b + "Canvas"] && this[b + "Canvas"]();
- }
- T(_.prototype, b, S), b === "translate" && "column bar arearange columnrange heatmap treemap".split(" ").forEach(function(v) {
- j[v] && T(j[v].prototype, b, S);
- });
- }), T(_.prototype, "processData", function(b) {
- function S(c) {
- return v.forceCrop ? !1 : v.chart.isChartSeriesBoosting() || (c ? c.length : 0) >= (v.options.boostThreshold || Number.MAX_VALUE);
- }
- var v = this, h = this.options.data;
- O(this.chart) && B[this.type] ? (S(h) && this.type !== "heatmap" && this.type !== "treemap" && !this.options.stacking && this.hasExtremes && this.hasExtremes(!0) || (b.apply(this, Array.prototype.slice.call(arguments, 1)), h = this.processedXData), (this.isSeriesBoosting = S(h)) ? (h = void 0, this.options.data && this.options.data.length && (h = this.getFirstValidPoint(this.options.data), f(h) || x(h) || w(12, !1, this.chart)), this.enterBoost()) : this.exitBoost && this.exitBoost()) : b.apply(this, Array.prototype.slice.call(arguments, 1));
- }), U(_, "hide", function() {
- this.canvas && this.renderTarget && (this.ogl && this.ogl.clear(), this.boostClear());
- }), _.prototype.enterBoost = function() {
- this.alteredByBoost = [], ["allowDG", "directTouch", "stickyTracking"].forEach(function(b) {
- this.alteredByBoost.push({ prop: b, val: this[b], own: Object.hasOwnProperty.call(this, b) });
- }, this), this.directTouch = this.allowDG = !1, this.finishedAnimating = this.stickyTracking = !0, this.labelBySeries && (this.labelBySeries = this.labelBySeries.destroy());
- }, _.prototype.exitBoost = function() {
- (this.alteredByBoost || []).forEach(
- function(b) {
- b.own ? this[b.prop] = b.val : delete this[b.prop];
- },
- this
- ), this.boostClear && this.boostClear();
- }, _.prototype.hasExtremes = function(b) {
- var S = this.options, v = this.xAxis && this.xAxis.options, h = this.yAxis && this.yAxis.options, c = this.colorAxis && this.colorAxis.options;
- return S.data.length > (S.boostThreshold || Number.MAX_VALUE) && f(h.min) && f(h.max) && (!b || f(v.min) && f(v.max)) && (!c || f(c.min) && f(c.max));
- }, _.prototype.destroyGraphics = function() {
- var b = this, S = this, v = this.points, h, c;
- if (v)
- for (c = 0; c < v.length; c += 1)
- (h = v[c]) && h.destroyElements && h.destroyElements();
- [
- "graph",
- "area",
- "tracker"
- ].forEach(function(u) {
- S[u] && (S[u] = S[u].destroy());
- }), this.getZonesGraphs && this.getZonesGraphs([["graph", "highcharts-graph"]]).forEach(function(u) {
- var i = b[u[0]];
- i && (b[u[0]] = i.destroy());
- });
- }, F.forEach(function(b) {
- k[b] && (k[b].boostThreshold = 5e3, k[b].boostData = [], j[b].prototype.fillOpacity = !0);
- });
- }), C(d, "Extensions/Boost/NamedColors.js", [d["Core/Color/Color.js"]], function(o) {
- var y = {
- aliceblue: "#f0f8ff",
- antiquewhite: "#faebd7",
- aqua: "#00ffff",
- aquamarine: "#7fffd4",
- azure: "#f0ffff",
- beige: "#f5f5dc",
- bisque: "#ffe4c4",
- black: "#000000",
- blanchedalmond: "#ffebcd",
- blue: "#0000ff",
- blueviolet: "#8a2be2",
- brown: "#a52a2a",
- burlywood: "#deb887",
- cadetblue: "#5f9ea0",
- chartreuse: "#7fff00",
- chocolate: "#d2691e",
- coral: "#ff7f50",
- cornflowerblue: "#6495ed",
- cornsilk: "#fff8dc",
- crimson: "#dc143c",
- cyan: "#00ffff",
- darkblue: "#00008b",
- darkcyan: "#008b8b",
- darkgoldenrod: "#b8860b",
- darkgray: "#a9a9a9",
- darkgreen: "#006400",
- darkkhaki: "#bdb76b",
- darkmagenta: "#8b008b",
- darkolivegreen: "#556b2f",
- darkorange: "#ff8c00",
- darkorchid: "#9932cc",
- darkred: "#8b0000",
- darksalmon: "#e9967a",
- darkseagreen: "#8fbc8f",
- darkslateblue: "#483d8b",
- darkslategray: "#2f4f4f",
- darkturquoise: "#00ced1",
- darkviolet: "#9400d3",
- deeppink: "#ff1493",
- deepskyblue: "#00bfff",
- dimgray: "#696969",
- dodgerblue: "#1e90ff",
- feldspar: "#d19275",
- firebrick: "#b22222",
- floralwhite: "#fffaf0",
- forestgreen: "#228b22",
- fuchsia: "#ff00ff",
- gainsboro: "#dcdcdc",
- ghostwhite: "#f8f8ff",
- gold: "#ffd700",
- goldenrod: "#daa520",
- gray: "#808080",
- green: "#008000",
- greenyellow: "#adff2f",
- honeydew: "#f0fff0",
- hotpink: "#ff69b4",
- indianred: "#cd5c5c",
- indigo: "#4b0082",
- ivory: "#fffff0",
- khaki: "#f0e68c",
- lavender: "#e6e6fa",
- lavenderblush: "#fff0f5",
- lawngreen: "#7cfc00",
- lemonchiffon: "#fffacd",
- lightblue: "#add8e6",
- lightcoral: "#f08080",
- lightcyan: "#e0ffff",
- lightgoldenrodyellow: "#fafad2",
- lightgrey: "#d3d3d3",
- lightgreen: "#90ee90",
- lightpink: "#ffb6c1",
- lightsalmon: "#ffa07a",
- lightseagreen: "#20b2aa",
- lightskyblue: "#87cefa",
- lightslateblue: "#8470ff",
- lightslategray: "#778899",
- lightsteelblue: "#b0c4de",
- lightyellow: "#ffffe0",
- lime: "#00ff00",
- limegreen: "#32cd32",
- linen: "#faf0e6",
- magenta: "#ff00ff",
- maroon: "#800000",
- mediumaquamarine: "#66cdaa",
- mediumblue: "#0000cd",
- mediumorchid: "#ba55d3",
- mediumpurple: "#9370d8",
- mediumseagreen: "#3cb371",
- mediumslateblue: "#7b68ee",
- mediumspringgreen: "#00fa9a",
- mediumturquoise: "#48d1cc",
- mediumvioletred: "#c71585",
- midnightblue: "#191970",
- mintcream: "#f5fffa",
- mistyrose: "#ffe4e1",
- moccasin: "#ffe4b5",
- navajowhite: "#ffdead",
- navy: "#000080",
- oldlace: "#fdf5e6",
- olive: "#808000",
- olivedrab: "#6b8e23",
- orange: "#ffa500",
- orangered: "#ff4500",
- orchid: "#da70d6",
- palegoldenrod: "#eee8aa",
- palegreen: "#98fb98",
- paleturquoise: "#afeeee",
- palevioletred: "#d87093",
- papayawhip: "#ffefd5",
- peachpuff: "#ffdab9",
- peru: "#cd853f",
- pink: "#ffc0cb",
- plum: "#dda0dd",
- powderblue: "#b0e0e6",
- purple: "#800080",
- red: "#ff0000",
- rosybrown: "#bc8f8f",
- royalblue: "#4169e1",
- saddlebrown: "#8b4513",
- salmon: "#fa8072",
- sandybrown: "#f4a460",
- seagreen: "#2e8b57",
- seashell: "#fff5ee",
- sienna: "#a0522d",
- silver: "#c0c0c0",
- skyblue: "#87ceeb",
- slateblue: "#6a5acd",
- slategray: "#708090",
- snow: "#fffafa",
- springgreen: "#00ff7f",
- steelblue: "#4682b4",
- tan: "#d2b48c",
- teal: "#008080",
- thistle: "#d8bfd8",
- tomato: "#ff6347",
- turquoise: "#40e0d0",
- violet: "#ee82ee",
- violetred: "#d02090",
- wheat: "#f5deb3",
- white: "#ffffff",
- whitesmoke: "#f5f5f5",
- yellow: "#ffff00",
- yellowgreen: "#9acd32"
- };
- return o.names = y;
- }), C(d, "Extensions/Boost/Boost.js", [d["Extensions/Boost/BoostUtils.js"], d["Extensions/Boost/BoostInit.js"], d["Extensions/BoostCanvas.js"], d["Core/Utilities.js"]], function(o, y, N, _) {
- _ = _.error, o = o.hasWebGLSupport, o() ? y() : typeof N < "u" ? N() : _(26);
- }), C(d, "masters/modules/boost.src.js", [], function() {
- });
- });
- })(su);
- var q0 = su.exports;
- const Q0 = /* @__PURE__ */ Mn(q0), t1 = (r) => {
- let d = window.location.protocol;
- /^http(s)?:&/.test(d) || (d = "http:");
- let C = {
- lang: {
- // Highcharts
- contextButtonTitle: "图表导出菜单",
- decimalPoint: ".",
- downloadJPEG: "下载 JPEG 图片",
- downloadPDF: "下载 PDF 文件",
- downloadPNG: "下载 PNG 文件",
- downloadSVG: "下载 SVG 文件",
- downloadXLS: "下载 XLS 文件",
- drillUpText: "◁ 返回 {series.name}",
- exitFullscreen: "退出全屏",
- exportData: {
- categoryDatetimeHeader: "时间",
- categoryHeader: "类别"
- },
- openInCloud: "在 Highcharts Cloud 中打开",
- invalidDate: "无效的时间",
- loading: "加载中...",
- months: [
- "一月",
- "二月",
- "三月",
- "四月",
- "五月",
- "六月",
- "七月",
- "八月",
- "九月",
- "十月",
- "十一月",
- "十二月"
- ],
- navigation: {
- popup: {
- addButton: "新增",
- arrowLine: "直线",
- arrowRay: "射线",
- arrowSegment: "线段",
- background: "背景",
- backgroundColor: "背景颜色",
- backgroundColors: "背景颜色",
- borderColor: "边框颜色",
- borderRadius: "圆角",
- borderWidth: "边框大小",
- circle: "圆",
- color: "颜色",
- connector: "连接",
- crooked3: "Crooked 3 line",
- crooked5: "Crooked 5 line",
- crosshairX: "竖直准星线",
- crosshairY: "水平准星线",
- editButton: "编辑",
- elliott3: "Elliott 3 line",
- elliott5: "Elliott 5 line",
- fibonacci: "斐波纳契",
- fill: "填充颜色",
- flags: "标志",
- fontSize: "字体大小",
- format: "文本",
- height: "高度",
- horizontalLine: "水平线",
- infinityLine: "无限线",
- innerBackground: "内背景",
- label: "文字标签",
- labelOptions: "文字标签配置",
- labels: "文字标签",
- line: "线",
- lines: "线条",
- measure: "Measure",
- measureX: "Measure X",
- measureXY: "Measure XY",
- measureY: "Measure Y",
- name: "名字",
- outerBackground: "外背景",
- padding: "内间距",
- parallelChannel: "并行通道",
- pitchfork: "杈子",
- ray: "射线",
- rectangle: "矩形",
- removeButton: "删除",
- saveButton: "保存",
- segment: "段落",
- series: "数据列",
- shapeOptions: "图形配置",
- shapes: "图形",
- simpleShapes: "简单图形",
- stroke: "线条颜色",
- strokeWidth: "线条粗细",
- style: "样式",
- title: "标题",
- tunnel: "通道",
- typeOptions: "详情",
- verticalArrow: "竖直箭头",
- verticalCounter: "竖直计数器",
- verticalLabel: "竖直标签",
- verticalLine: "竖直线",
- volume: "成交量"
- }
- },
- noData: "暂无数据",
- numericSymbols: null,
- printChart: "打印图表",
- resetZoom: "重置缩放比例",
- resetZoomTitle: "重置为原始大小",
- shortMonths: [
- "一月",
- "二月",
- "三月",
- "四月",
- "五月",
- "六月",
- "七月",
- "八月",
- "九月",
- "十月",
- "十一月",
- "十二月"
- ],
- thousandsSep: ",",
- viewData: "查看数据表格",
- viewFullscreen: "全屏查看",
- weekdays: [
- "星期天",
- "星期一",
- "星期二",
- "星期三",
- "星期四",
- "星期五",
- "星期六"
- ],
- viewData: "查看数据表格",
- // Highstock
- rangeSelectorFrom: "开始时间",
- rangeSelectorTo: "结束时间",
- rangeSelectorZoom: "范围",
- // Highmaps
- zoomIn: "缩小",
- zoomOut: "放大"
- },
- global: {
- // 不使用 UTC时间
- useUTC: !1,
- timezoneOffset: -8 * 60,
- canvasToolsURL: d + "//cdn.hcharts.cn/highcharts/modules/canvas-tools.js",
- VMLRadialGradientURL: d + +"//cdn.hcharts.cn/highcharts/gfx/vml-radial-gradient.png"
- },
- exporting: {
- url: d + "//export.highcharts.com.cn"
- },
- credits: {
- text: "Highcharts.com.cn",
- href: "https://www.highcharts.com.cn"
- },
- /**
- * Highstock
- */
- rangeSelector: {
- inputDateFormat: "%Y-%m-%d",
- buttons: [
- {
- type: "month",
- count: 1,
- text: "月"
- },
- {
- type: "month",
- count: 3,
- text: "季度"
- },
- {
- type: "month",
- count: 6,
- text: "半年"
- },
- {
- type: "ytd",
- text: "YTD"
- },
- {
- type: "year",
- count: 1,
- text: "年"
- },
- {
- type: "all",
- text: "所有"
- }
- ]
- },
- plotOptions: {
- series: {
- dataGrouping: {
- dateTimeLabelFormats: {
- /* millisecond: [
- '%Y-%m-%d %H:%M:%S.%L',
- '%Y-%m-%d %H:%M:%S.%L',
- ' ~ %H:%M:%S.%L',
- ],
- second: ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S', ' ~ %H:%M:%S'],
- minute: ['%Y-%m-%d %H:%M', '%Y-%m-%d %H:%M', ' ~ %H:%M'],
- hour: ['%Y-%m-%d %H:%M', '%Y-%m-%d %H:%M', ' ~ %H:%M'], */
- day: ["%Y/%m/%d", "%Y/%m/%d", " ~ %Y/%m/%d"],
- week: ["%Y/%m/%d", "%Y/%m/%d", " ~ %Y/%m/%d"],
- month: ["%Y/%m", "%Y/%m", " ~ %Y/%m"],
- year: ["%Y", "%Y", " ~ %Y"]
- }
- }
- }
- }
- };
- r.setOptions(C);
- };
- //! moment.js
- //! version : 2.30.1
- //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
- //! license : MIT
- //! momentjs.com
- var ou;
- function Xt() {
- return ou.apply(null, arguments);
- }
- function e1(r) {
- ou = r;
- }
- function ji(r) {
- return r instanceof Array || Object.prototype.toString.call(r) === "[object Array]";
- }
- function $r(r) {
- return r != null && Object.prototype.toString.call(r) === "[object Object]";
- }
- function me(r, d) {
- return Object.prototype.hasOwnProperty.call(r, d);
- }
- function Tl(r) {
- if (Object.getOwnPropertyNames)
- return Object.getOwnPropertyNames(r).length === 0;
- var d;
- for (d in r)
- if (me(r, d))
- return !1;
- return !0;
- }
- function ai(r) {
- return r === void 0;
- }
- function ur(r) {
- return typeof r == "number" || Object.prototype.toString.call(r) === "[object Number]";
- }
- function as(r) {
- return r instanceof Date || Object.prototype.toString.call(r) === "[object Date]";
- }
- function au(r, d) {
- var C = [], o, y = r.length;
- for (o = 0; o < y; ++o)
- C.push(d(r[o], o));
- return C;
- }
- function Tr(r, d) {
- for (var C in d)
- me(d, C) && (r[C] = d[C]);
- return me(d, "toString") && (r.toString = d.toString), me(d, "valueOf") && (r.valueOf = d.valueOf), r;
- }
- function $i(r, d, C, o) {
- return Ou(r, d, C, o, !0).utc();
- }
- function i1() {
- return {
- empty: !1,
- unusedTokens: [],
- unusedInput: [],
- overflow: -2,
- charsLeftOver: 0,
- nullInput: !1,
- invalidEra: null,
- invalidMonth: null,
- invalidFormat: !1,
- userInvalidated: !1,
- iso: !1,
- parsedDateParts: [],
- era: null,
- meridiem: null,
- rfc2822: !1,
- weekdayMismatch: !1
- };
- }
- function oe(r) {
- return r._pf == null && (r._pf = i1()), r._pf;
- }
- var dl;
- Array.prototype.some ? dl = Array.prototype.some : dl = function(r) {
- var d = Object(this), C = d.length >>> 0, o;
- for (o = 0; o < C; o++)
- if (o in d && r.call(this, d[o], o, d))
- return !0;
- return !1;
- };
- function Pl(r) {
- var d = null, C = !1, o = r._d && !isNaN(r._d.getTime());
- if (o && (d = oe(r), C = dl.call(d.parsedDateParts, function(y) {
- return y != null;
- }), o = d.overflow < 0 && !d.empty && !d.invalidEra && !d.invalidMonth && !d.invalidWeekday && !d.weekdayMismatch && !d.nullInput && !d.invalidFormat && !d.userInvalidated && (!d.meridiem || d.meridiem && C), r._strict && (o = o && d.charsLeftOver === 0 && d.unusedTokens.length === 0 && d.bigHour === void 0)), Object.isFrozen == null || !Object.isFrozen(r))
- r._isValid = o;
- else
- return o;
- return r._isValid;
- }
- function Ao(r) {
- var d = $i(NaN);
- return r != null ? Tr(oe(d), r) : oe(d).userInvalidated = !0, d;
- }
- var Lp = Xt.momentProperties = [], il = !1;
- function El(r, d) {
- var C, o, y, N = Lp.length;
- if (ai(d._isAMomentObject) || (r._isAMomentObject = d._isAMomentObject), ai(d._i) || (r._i = d._i), ai(d._f) || (r._f = d._f), ai(d._l) || (r._l = d._l), ai(d._strict) || (r._strict = d._strict), ai(d._tzm) || (r._tzm = d._tzm), ai(d._isUTC) || (r._isUTC = d._isUTC), ai(d._offset) || (r._offset = d._offset), ai(d._pf) || (r._pf = oe(d)), ai(d._locale) || (r._locale = d._locale), N > 0)
- for (C = 0; C < N; C++)
- o = Lp[C], y = d[o], ai(y) || (r[o] = y);
- return r;
- }
- function ls(r) {
- El(this, r), this._d = new Date(r._d != null ? r._d.getTime() : NaN), this.isValid() || (this._d = /* @__PURE__ */ new Date(NaN)), il === !1 && (il = !0, Xt.updateOffset(this), il = !1);
- }
- function Wi(r) {
- return r instanceof ls || r != null && r._isAMomentObject != null;
- }
- function lu(r) {
- Xt.suppressDeprecationWarnings === !1 && typeof console < "u" && console.warn && console.warn("Deprecation warning: " + r);
- }
- function Pi(r, d) {
- var C = !0;
- return Tr(function() {
- if (Xt.deprecationHandler != null && Xt.deprecationHandler(null, r), C) {
- var o = [], y, N, _, U = arguments.length;
- for (N = 0; N < U; N++) {
- if (y = "", typeof arguments[N] == "object") {
- y += `
- [` + N + "] ";
- for (_ in arguments[0])
- me(arguments[0], _) && (y += _ + ": " + arguments[0][_] + ", ");
- y = y.slice(0, -2);
- } else
- y = arguments[N];
- o.push(y);
- }
- lu(
- r + `
- Arguments: ` + Array.prototype.slice.call(o).join("") + `
- ` + new Error().stack
- ), C = !1;
- }
- return d.apply(this, arguments);
- }, d);
- }
- var _p = {};
- function hu(r, d) {
- Xt.deprecationHandler != null && Xt.deprecationHandler(r, d), _p[r] || (lu(d), _p[r] = !0);
- }
- Xt.suppressDeprecationWarnings = !1;
- Xt.deprecationHandler = null;
- function Zi(r) {
- return typeof Function < "u" && r instanceof Function || Object.prototype.toString.call(r) === "[object Function]";
- }
- function r1(r) {
- var d, C;
- for (C in r)
- me(r, C) && (d = r[C], Zi(d) ? this[C] = d : this["_" + C] = d);
- this._config = r, this._dayOfMonthOrdinalParseLenient = new RegExp(
- (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source
- );
- }
- function fl(r, d) {
- var C = Tr({}, r), o;
- for (o in d)
- me(d, o) && ($r(r[o]) && $r(d[o]) ? (C[o] = {}, Tr(C[o], r[o]), Tr(C[o], d[o])) : d[o] != null ? C[o] = d[o] : delete C[o]);
- for (o in r)
- me(r, o) && !me(d, o) && $r(r[o]) && (C[o] = Tr({}, C[o]));
- return C;
- }
- function Ol(r) {
- r != null && this.set(r);
- }
- var gl;
- Object.keys ? gl = Object.keys : gl = function(r) {
- var d, C = [];
- for (d in r)
- me(r, d) && C.push(d);
- return C;
- };
- var n1 = {
- sameDay: "[Today at] LT",
- nextDay: "[Tomorrow at] LT",
- nextWeek: "dddd [at] LT",
- lastDay: "[Yesterday at] LT",
- lastWeek: "[Last] dddd [at] LT",
- sameElse: "L"
- };
- function s1(r, d, C) {
- var o = this._calendar[r] || this._calendar.sameElse;
- return Zi(o) ? o.call(d, C) : o;
- }
- function Vi(r, d, C) {
- var o = "" + Math.abs(r), y = d - o.length, N = r >= 0;
- return (N ? C ? "+" : "" : "-") + Math.pow(10, Math.max(0, y)).toString().substr(1) + o;
- }
- var Ll = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, ro = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, rl = {}, vn = {};
- function Zt(r, d, C, o) {
- var y = o;
- typeof o == "string" && (y = function() {
- return this[o]();
- }), r && (vn[r] = y), d && (vn[d[0]] = function() {
- return Vi(y.apply(this, arguments), d[1], d[2]);
- }), C && (vn[C] = function() {
- return this.localeData().ordinal(
- y.apply(this, arguments),
- r
- );
- });
- }
- function o1(r) {
- return r.match(/\[[\s\S]/) ? r.replace(/^\[|\]$/g, "") : r.replace(/\\/g, "");
- }
- function a1(r) {
- var d = r.match(Ll), C, o;
- for (C = 0, o = d.length; C < o; C++)
- vn[d[C]] ? d[C] = vn[d[C]] : d[C] = o1(d[C]);
- return function(y) {
- var N = "", _;
- for (_ = 0; _ < o; _++)
- N += Zi(d[_]) ? d[_].call(y, r) : d[_];
- return N;
- };
- }
- function oo(r, d) {
- return r.isValid() ? (d = cu(d, r.localeData()), rl[d] = rl[d] || a1(d), rl[d](r)) : r.localeData().invalidDate();
- }
- function cu(r, d) {
- var C = 5;
- function o(y) {
- return d.longDateFormat(y) || y;
- }
- for (ro.lastIndex = 0; C >= 0 && ro.test(r); )
- r = r.replace(
- ro,
- o
- ), ro.lastIndex = 0, C -= 1;
- return r;
- }
- var l1 = {
- LTS: "h:mm:ss A",
- LT: "h:mm A",
- L: "MM/DD/YYYY",
- LL: "MMMM D, YYYY",
- LLL: "MMMM D, YYYY h:mm A",
- LLLL: "dddd, MMMM D, YYYY h:mm A"
- };
- function h1(r) {
- var d = this._longDateFormat[r], C = this._longDateFormat[r.toUpperCase()];
- return d || !C ? d : (this._longDateFormat[r] = C.match(Ll).map(function(o) {
- return o === "MMMM" || o === "MM" || o === "DD" || o === "dddd" ? o.slice(1) : o;
- }).join(""), this._longDateFormat[r]);
- }
- var c1 = "Invalid date";
- function p1() {
- return this._invalidDate;
- }
- var u1 = "%d", d1 = /\d{1,2}/;
- function f1(r) {
- return this._ordinal.replace("%d", r);
- }
- var g1 = {
- future: "in %s",
- past: "%s ago",
- s: "a few seconds",
- ss: "%d seconds",
- m: "a minute",
- mm: "%d minutes",
- h: "an hour",
- hh: "%d hours",
- d: "a day",
- dd: "%d days",
- w: "a week",
- ww: "%d weeks",
- M: "a month",
- MM: "%d months",
- y: "a year",
- yy: "%d years"
- };
- function m1(r, d, C, o) {
- var y = this._relativeTime[C];
- return Zi(y) ? y(r, d, C, o) : y.replace(/%d/i, r);
- }
- function y1(r, d) {
- var C = this._relativeTime[r > 0 ? "future" : "past"];
- return Zi(C) ? C(d) : C.replace(/%s/i, d);
- }
- var Dp = {
- D: "date",
- dates: "date",
- date: "date",
- d: "day",
- days: "day",
- day: "day",
- e: "weekday",
- weekdays: "weekday",
- weekday: "weekday",
- E: "isoWeekday",
- isoweekdays: "isoWeekday",
- isoweekday: "isoWeekday",
- DDD: "dayOfYear",
- dayofyears: "dayOfYear",
- dayofyear: "dayOfYear",
- h: "hour",
- hours: "hour",
- hour: "hour",
- ms: "millisecond",
- milliseconds: "millisecond",
- millisecond: "millisecond",
- m: "minute",
- minutes: "minute",
- minute: "minute",
- M: "month",
- months: "month",
- month: "month",
- Q: "quarter",
- quarters: "quarter",
- quarter: "quarter",
- s: "second",
- seconds: "second",
- second: "second",
- gg: "weekYear",
- weekyears: "weekYear",
- weekyear: "weekYear",
- GG: "isoWeekYear",
- isoweekyears: "isoWeekYear",
- isoweekyear: "isoWeekYear",
- w: "week",
- weeks: "week",
- week: "week",
- W: "isoWeek",
- isoweeks: "isoWeek",
- isoweek: "isoWeek",
- y: "year",
- years: "year",
- year: "year"
- };
- function Ei(r) {
- return typeof r == "string" ? Dp[r] || Dp[r.toLowerCase()] : void 0;
- }
- function _l(r) {
- var d = {}, C, o;
- for (o in r)
- me(r, o) && (C = Ei(o), C && (d[C] = r[o]));
- return d;
- }
- var v1 = {
- date: 9,
- day: 11,
- weekday: 11,
- isoWeekday: 11,
- dayOfYear: 4,
- hour: 13,
- millisecond: 16,
- minute: 14,
- month: 8,
- quarter: 7,
- second: 15,
- weekYear: 1,
- isoWeekYear: 1,
- week: 5,
- isoWeek: 5,
- year: 1
- };
- function x1(r) {
- var d = [], C;
- for (C in r)
- me(r, C) && d.push({ unit: C, priority: v1[C] });
- return d.sort(function(o, y) {
- return o.priority - y.priority;
- }), d;
- }
- var pu = /\d/, mi = /\d\d/, uu = /\d{3}/, Dl = /\d{4}/, To = /[+-]?\d{6}/, Pe = /\d\d?/, du = /\d\d\d\d?/, fu = /\d\d\d\d\d\d?/, Po = /\d{1,3}/, Il = /\d{1,4}/, Eo = /[+-]?\d{1,6}/, Cn = /\d+/, Oo = /[+-]?\d+/, b1 = /Z|[+-]\d\d:?\d\d/gi, Lo = /Z|[+-]\d\d(?::?\d\d)?/gi, S1 = /[+-]?\d+(\.\d{1,3})?/, hs = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, kn = /^[1-9]\d?/, Rl = /^([1-9]\d|\d)/, mo;
- mo = {};
- function Ft(r, d, C) {
- mo[r] = Zi(d) ? d : function(o, y) {
- return o && C ? C : d;
- };
- }
- function w1(r, d) {
- return me(mo, r) ? mo[r](d._strict, d._locale) : new RegExp(M1(r));
- }
- function M1(r) {
- return cr(
- r.replace("\\", "").replace(
- /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
- function(d, C, o, y, N) {
- return C || o || y || N;
- }
- )
- );
- }
- function cr(r) {
- return r.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
- }
- function ki(r) {
- return r < 0 ? Math.ceil(r) || 0 : Math.floor(r);
- }
- function pe(r) {
- var d = +r, C = 0;
- return d !== 0 && isFinite(d) && (C = ki(d)), C;
- }
- var ml = {};
- function we(r, d) {
- var C, o = d, y;
- for (typeof r == "string" && (r = [r]), ur(d) && (o = function(N, _) {
- _[d] = pe(N);
- }), y = r.length, C = 0; C < y; C++)
- ml[r[C]] = o;
- }
- function cs(r, d) {
- we(r, function(C, o, y, N) {
- y._w = y._w || {}, d(C, y._w, y, N);
- });
- }
- function C1(r, d, C) {
- d != null && me(ml, r) && ml[r](d, C._a, C, r);
- }
- function _o(r) {
- return r % 4 === 0 && r % 100 !== 0 || r % 400 === 0;
- }
- var Qe = 0, lr = 1, Ui = 2, Ge = 3, Ri = 4, hr = 5, Hr = 6, k1 = 7, A1 = 8;
- Zt("Y", 0, 0, function() {
- var r = this.year();
- return r <= 9999 ? Vi(r, 4) : "+" + r;
- });
- Zt(0, ["YY", 2], 0, function() {
- return this.year() % 100;
- });
- Zt(0, ["YYYY", 4], 0, "year");
- Zt(0, ["YYYYY", 5], 0, "year");
- Zt(0, ["YYYYYY", 6, !0], 0, "year");
- Ft("Y", Oo);
- Ft("YY", Pe, mi);
- Ft("YYYY", Il, Dl);
- Ft("YYYYY", Eo, To);
- Ft("YYYYYY", Eo, To);
- we(["YYYYY", "YYYYYY"], Qe);
- we("YYYY", function(r, d) {
- d[Qe] = r.length === 2 ? Xt.parseTwoDigitYear(r) : pe(r);
- });
- we("YY", function(r, d) {
- d[Qe] = Xt.parseTwoDigitYear(r);
- });
- we("Y", function(r, d) {
- d[Qe] = parseInt(r, 10);
- });
- function Qn(r) {
- return _o(r) ? 366 : 365;
- }
- Xt.parseTwoDigitYear = function(r) {
- return pe(r) + (pe(r) > 68 ? 1900 : 2e3);
- };
- var gu = An("FullYear", !0);
- function T1() {
- return _o(this.year());
- }
- function An(r, d) {
- return function(C) {
- return C != null ? (mu(this, r, C), Xt.updateOffset(this, d), this) : es(this, r);
- };
- }
- function es(r, d) {
- if (!r.isValid())
- return NaN;
- var C = r._d, o = r._isUTC;
- switch (d) {
- case "Milliseconds":
- return o ? C.getUTCMilliseconds() : C.getMilliseconds();
- case "Seconds":
- return o ? C.getUTCSeconds() : C.getSeconds();
- case "Minutes":
- return o ? C.getUTCMinutes() : C.getMinutes();
- case "Hours":
- return o ? C.getUTCHours() : C.getHours();
- case "Date":
- return o ? C.getUTCDate() : C.getDate();
- case "Day":
- return o ? C.getUTCDay() : C.getDay();
- case "Month":
- return o ? C.getUTCMonth() : C.getMonth();
- case "FullYear":
- return o ? C.getUTCFullYear() : C.getFullYear();
- default:
- return NaN;
- }
- }
- function mu(r, d, C) {
- var o, y, N, _, U;
- if (!(!r.isValid() || isNaN(C))) {
- switch (o = r._d, y = r._isUTC, d) {
- case "Milliseconds":
- return void (y ? o.setUTCMilliseconds(C) : o.setMilliseconds(C));
- case "Seconds":
- return void (y ? o.setUTCSeconds(C) : o.setSeconds(C));
- case "Minutes":
- return void (y ? o.setUTCMinutes(C) : o.setMinutes(C));
- case "Hours":
- return void (y ? o.setUTCHours(C) : o.setHours(C));
- case "Date":
- return void (y ? o.setUTCDate(C) : o.setDate(C));
- case "FullYear":
- break;
- default:
- return;
- }
- N = C, _ = r.month(), U = r.date(), U = U === 29 && _ === 1 && !_o(N) ? 28 : U, y ? o.setUTCFullYear(N, _, U) : o.setFullYear(N, _, U);
- }
- }
- function P1(r) {
- return r = Ei(r), Zi(this[r]) ? this[r]() : this;
- }
- function E1(r, d) {
- if (typeof r == "object") {
- r = _l(r);
- var C = x1(r), o, y = C.length;
- for (o = 0; o < y; o++)
- this[C[o].unit](r[C[o].unit]);
- } else if (r = Ei(r), Zi(this[r]))
- return this[r](d);
- return this;
- }
- function O1(r, d) {
- return (r % d + d) % d;
- }
- var We;
- Array.prototype.indexOf ? We = Array.prototype.indexOf : We = function(r) {
- var d;
- for (d = 0; d < this.length; ++d)
- if (this[d] === r)
- return d;
- return -1;
- };
- function Nl(r, d) {
- if (isNaN(r) || isNaN(d))
- return NaN;
- var C = O1(d, 12);
- return r += (d - C) / 12, C === 1 ? _o(r) ? 29 : 28 : 31 - C % 7 % 2;
- }
- Zt("M", ["MM", 2], "Mo", function() {
- return this.month() + 1;
- });
- Zt("MMM", 0, 0, function(r) {
- return this.localeData().monthsShort(this, r);
- });
- Zt("MMMM", 0, 0, function(r) {
- return this.localeData().months(this, r);
- });
- Ft("M", Pe, kn);
- Ft("MM", Pe, mi);
- Ft("MMM", function(r, d) {
- return d.monthsShortRegex(r);
- });
- Ft("MMMM", function(r, d) {
- return d.monthsRegex(r);
- });
- we(["M", "MM"], function(r, d) {
- d[lr] = pe(r) - 1;
- });
- we(["MMM", "MMMM"], function(r, d, C, o) {
- var y = C._locale.monthsParse(r, o, C._strict);
- y != null ? d[lr] = y : oe(C).invalidMonth = r;
- });
- var L1 = "January_February_March_April_May_June_July_August_September_October_November_December".split(
- "_"
- ), yu = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), vu = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, _1 = hs, D1 = hs;
- function I1(r, d) {
- return r ? ji(this._months) ? this._months[r.month()] : this._months[(this._months.isFormat || vu).test(d) ? "format" : "standalone"][r.month()] : ji(this._months) ? this._months : this._months.standalone;
- }
- function R1(r, d) {
- return r ? ji(this._monthsShort) ? this._monthsShort[r.month()] : this._monthsShort[vu.test(d) ? "format" : "standalone"][r.month()] : ji(this._monthsShort) ? this._monthsShort : this._monthsShort.standalone;
- }
- function N1(r, d, C) {
- var o, y, N, _ = r.toLocaleLowerCase();
- if (!this._monthsParse)
- for (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], o = 0; o < 12; ++o)
- N = $i([2e3, o]), this._shortMonthsParse[o] = this.monthsShort(
- N,
- ""
- ).toLocaleLowerCase(), this._longMonthsParse[o] = this.months(N, "").toLocaleLowerCase();
- return C ? d === "MMM" ? (y = We.call(this._shortMonthsParse, _), y !== -1 ? y : null) : (y = We.call(this._longMonthsParse, _), y !== -1 ? y : null) : d === "MMM" ? (y = We.call(this._shortMonthsParse, _), y !== -1 ? y : (y = We.call(this._longMonthsParse, _), y !== -1 ? y : null)) : (y = We.call(this._longMonthsParse, _), y !== -1 ? y : (y = We.call(this._shortMonthsParse, _), y !== -1 ? y : null));
- }
- function B1(r, d, C) {
- var o, y, N;
- if (this._monthsParseExact)
- return N1.call(this, r, d, C);
- for (this._monthsParse || (this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = []), o = 0; o < 12; o++) {
- if (y = $i([2e3, o]), C && !this._longMonthsParse[o] && (this._longMonthsParse[o] = new RegExp(
- "^" + this.months(y, "").replace(".", "") + "$",
- "i"
- ), this._shortMonthsParse[o] = new RegExp(
- "^" + this.monthsShort(y, "").replace(".", "") + "$",
- "i"
- )), !C && !this._monthsParse[o] && (N = "^" + this.months(y, "") + "|^" + this.monthsShort(y, ""), this._monthsParse[o] = new RegExp(N.replace(".", ""), "i")), C && d === "MMMM" && this._longMonthsParse[o].test(r))
- return o;
- if (C && d === "MMM" && this._shortMonthsParse[o].test(r))
- return o;
- if (!C && this._monthsParse[o].test(r))
- return o;
- }
- }
- function xu(r, d) {
- if (!r.isValid())
- return r;
- if (typeof d == "string") {
- if (/^\d+$/.test(d))
- d = pe(d);
- else if (d = r.localeData().monthsParse(d), !ur(d))
- return r;
- }
- var C = d, o = r.date();
- return o = o < 29 ? o : Math.min(o, Nl(r.year(), C)), r._isUTC ? r._d.setUTCMonth(C, o) : r._d.setMonth(C, o), r;
- }
- function bu(r) {
- return r != null ? (xu(this, r), Xt.updateOffset(this, !0), this) : es(this, "Month");
- }
- function j1() {
- return Nl(this.year(), this.month());
- }
- function W1(r) {
- return this._monthsParseExact ? (me(this, "_monthsRegex") || Su.call(this), r ? this._monthsShortStrictRegex : this._monthsShortRegex) : (me(this, "_monthsShortRegex") || (this._monthsShortRegex = _1), this._monthsShortStrictRegex && r ? this._monthsShortStrictRegex : this._monthsShortRegex);
- }
- function Y1(r) {
- return this._monthsParseExact ? (me(this, "_monthsRegex") || Su.call(this), r ? this._monthsStrictRegex : this._monthsRegex) : (me(this, "_monthsRegex") || (this._monthsRegex = D1), this._monthsStrictRegex && r ? this._monthsStrictRegex : this._monthsRegex);
- }
- function Su() {
- function r(G, V) {
- return V.length - G.length;
- }
- var d = [], C = [], o = [], y, N, _, U;
- for (y = 0; y < 12; y++)
- N = $i([2e3, y]), _ = cr(this.monthsShort(N, "")), U = cr(this.months(N, "")), d.push(_), C.push(U), o.push(U), o.push(_);
- d.sort(r), C.sort(r), o.sort(r), this._monthsRegex = new RegExp("^(" + o.join("|") + ")", "i"), this._monthsShortRegex = this._monthsRegex, this._monthsStrictRegex = new RegExp(
- "^(" + C.join("|") + ")",
- "i"
- ), this._monthsShortStrictRegex = new RegExp(
- "^(" + d.join("|") + ")",
- "i"
- );
- }
- function z1(r, d, C, o, y, N, _) {
- var U;
- return r < 100 && r >= 0 ? (U = new Date(r + 400, d, C, o, y, N, _), isFinite(U.getFullYear()) && U.setFullYear(r)) : U = new Date(r, d, C, o, y, N, _), U;
- }
- function is(r) {
- var d, C;
- return r < 100 && r >= 0 ? (C = Array.prototype.slice.call(arguments), C[0] = r + 400, d = new Date(Date.UTC.apply(null, C)), isFinite(d.getUTCFullYear()) && d.setUTCFullYear(r)) : d = new Date(Date.UTC.apply(null, arguments)), d;
- }
- function yo(r, d, C) {
- var o = 7 + d - C, y = (7 + is(r, 0, o).getUTCDay() - d) % 7;
- return -y + o - 1;
- }
- function wu(r, d, C, o, y) {
- var N = (7 + C - o) % 7, _ = yo(r, o, y), U = 1 + 7 * (d - 1) + N + _, G, V;
- return U <= 0 ? (G = r - 1, V = Qn(G) + U) : U > Qn(r) ? (G = r + 1, V = U - Qn(r)) : (G = r, V = U), {
- year: G,
- dayOfYear: V
- };
- }
- function rs(r, d, C) {
- var o = yo(r.year(), d, C), y = Math.floor((r.dayOfYear() - o - 1) / 7) + 1, N, _;
- return y < 1 ? (_ = r.year() - 1, N = y + pr(_, d, C)) : y > pr(r.year(), d, C) ? (N = y - pr(r.year(), d, C), _ = r.year() + 1) : (_ = r.year(), N = y), {
- week: N,
- year: _
- };
- }
- function pr(r, d, C) {
- var o = yo(r, d, C), y = yo(r + 1, d, C);
- return (Qn(r) - o + y) / 7;
- }
- Zt("w", ["ww", 2], "wo", "week");
- Zt("W", ["WW", 2], "Wo", "isoWeek");
- Ft("w", Pe, kn);
- Ft("ww", Pe, mi);
- Ft("W", Pe, kn);
- Ft("WW", Pe, mi);
- cs(
- ["w", "ww", "W", "WW"],
- function(r, d, C, o) {
- d[o.substr(0, 1)] = pe(r);
- }
- );
- function X1(r) {
- return rs(r, this._week.dow, this._week.doy).week;
- }
- var G1 = {
- dow: 0,
- // Sunday is the first day of the week.
- doy: 6
- // The week that contains Jan 6th is the first week of the year.
- };
- function H1() {
- return this._week.dow;
- }
- function F1() {
- return this._week.doy;
- }
- function U1(r) {
- var d = this.localeData().week(this);
- return r == null ? d : this.add((r - d) * 7, "d");
- }
- function V1(r) {
- var d = rs(this, 1, 4).week;
- return r == null ? d : this.add((r - d) * 7, "d");
- }
- Zt("d", 0, "do", "day");
- Zt("dd", 0, 0, function(r) {
- return this.localeData().weekdaysMin(this, r);
- });
- Zt("ddd", 0, 0, function(r) {
- return this.localeData().weekdaysShort(this, r);
- });
- Zt("dddd", 0, 0, function(r) {
- return this.localeData().weekdays(this, r);
- });
- Zt("e", 0, 0, "weekday");
- Zt("E", 0, 0, "isoWeekday");
- Ft("d", Pe);
- Ft("e", Pe);
- Ft("E", Pe);
- Ft("dd", function(r, d) {
- return d.weekdaysMinRegex(r);
- });
- Ft("ddd", function(r, d) {
- return d.weekdaysShortRegex(r);
- });
- Ft("dddd", function(r, d) {
- return d.weekdaysRegex(r);
- });
- cs(["dd", "ddd", "dddd"], function(r, d, C, o) {
- var y = C._locale.weekdaysParse(r, o, C._strict);
- y != null ? d.d = y : oe(C).invalidWeekday = r;
- });
- cs(["d", "e", "E"], function(r, d, C, o) {
- d[o] = pe(r);
- });
- function $1(r, d) {
- return typeof r != "string" ? r : isNaN(r) ? (r = d.weekdaysParse(r), typeof r == "number" ? r : null) : parseInt(r, 10);
- }
- function Z1(r, d) {
- return typeof r == "string" ? d.weekdaysParse(r) % 7 || 7 : isNaN(r) ? null : r;
- }
- function Bl(r, d) {
- return r.slice(d, 7).concat(r.slice(0, d));
- }
- var K1 = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), Mu = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), J1 = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), q1 = hs, Q1 = hs, tb = hs;
- function eb(r, d) {
- var C = ji(this._weekdays) ? this._weekdays : this._weekdays[r && r !== !0 && this._weekdays.isFormat.test(d) ? "format" : "standalone"];
- return r === !0 ? Bl(C, this._week.dow) : r ? C[r.day()] : C;
- }
- function ib(r) {
- return r === !0 ? Bl(this._weekdaysShort, this._week.dow) : r ? this._weekdaysShort[r.day()] : this._weekdaysShort;
- }
- function rb(r) {
- return r === !0 ? Bl(this._weekdaysMin, this._week.dow) : r ? this._weekdaysMin[r.day()] : this._weekdaysMin;
- }
- function nb(r, d, C) {
- var o, y, N, _ = r.toLocaleLowerCase();
- if (!this._weekdaysParse)
- for (this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], o = 0; o < 7; ++o)
- N = $i([2e3, 1]).day(o), this._minWeekdaysParse[o] = this.weekdaysMin(
- N,
- ""
- ).toLocaleLowerCase(), this._shortWeekdaysParse[o] = this.weekdaysShort(
- N,
- ""
- ).toLocaleLowerCase(), this._weekdaysParse[o] = this.weekdays(N, "").toLocaleLowerCase();
- return C ? d === "dddd" ? (y = We.call(this._weekdaysParse, _), y !== -1 ? y : null) : d === "ddd" ? (y = We.call(this._shortWeekdaysParse, _), y !== -1 ? y : null) : (y = We.call(this._minWeekdaysParse, _), y !== -1 ? y : null) : d === "dddd" ? (y = We.call(this._weekdaysParse, _), y !== -1 || (y = We.call(this._shortWeekdaysParse, _), y !== -1) ? y : (y = We.call(this._minWeekdaysParse, _), y !== -1 ? y : null)) : d === "ddd" ? (y = We.call(this._shortWeekdaysParse, _), y !== -1 || (y = We.call(this._weekdaysParse, _), y !== -1) ? y : (y = We.call(this._minWeekdaysParse, _), y !== -1 ? y : null)) : (y = We.call(this._minWeekdaysParse, _), y !== -1 || (y = We.call(this._weekdaysParse, _), y !== -1) ? y : (y = We.call(this._shortWeekdaysParse, _), y !== -1 ? y : null));
- }
- function sb(r, d, C) {
- var o, y, N;
- if (this._weekdaysParseExact)
- return nb.call(this, r, d, C);
- for (this._weekdaysParse || (this._weekdaysParse = [], this._minWeekdaysParse = [], this._shortWeekdaysParse = [], this._fullWeekdaysParse = []), o = 0; o < 7; o++) {
- if (y = $i([2e3, 1]).day(o), C && !this._fullWeekdaysParse[o] && (this._fullWeekdaysParse[o] = new RegExp(
- "^" + this.weekdays(y, "").replace(".", "\\.?") + "$",
- "i"
- ), this._shortWeekdaysParse[o] = new RegExp(
- "^" + this.weekdaysShort(y, "").replace(".", "\\.?") + "$",
- "i"
- ), this._minWeekdaysParse[o] = new RegExp(
- "^" + this.weekdaysMin(y, "").replace(".", "\\.?") + "$",
- "i"
- )), this._weekdaysParse[o] || (N = "^" + this.weekdays(y, "") + "|^" + this.weekdaysShort(y, "") + "|^" + this.weekdaysMin(y, ""), this._weekdaysParse[o] = new RegExp(N.replace(".", ""), "i")), C && d === "dddd" && this._fullWeekdaysParse[o].test(r))
- return o;
- if (C && d === "ddd" && this._shortWeekdaysParse[o].test(r))
- return o;
- if (C && d === "dd" && this._minWeekdaysParse[o].test(r))
- return o;
- if (!C && this._weekdaysParse[o].test(r))
- return o;
- }
- }
- function ob(r) {
- if (!this.isValid())
- return r != null ? this : NaN;
- var d = es(this, "Day");
- return r != null ? (r = $1(r, this.localeData()), this.add(r - d, "d")) : d;
- }
- function ab(r) {
- if (!this.isValid())
- return r != null ? this : NaN;
- var d = (this.day() + 7 - this.localeData()._week.dow) % 7;
- return r == null ? d : this.add(r - d, "d");
- }
- function lb(r) {
- if (!this.isValid())
- return r != null ? this : NaN;
- if (r != null) {
- var d = Z1(r, this.localeData());
- return this.day(this.day() % 7 ? d : d - 7);
- } else
- return this.day() || 7;
- }
- function hb(r) {
- return this._weekdaysParseExact ? (me(this, "_weekdaysRegex") || jl.call(this), r ? this._weekdaysStrictRegex : this._weekdaysRegex) : (me(this, "_weekdaysRegex") || (this._weekdaysRegex = q1), this._weekdaysStrictRegex && r ? this._weekdaysStrictRegex : this._weekdaysRegex);
- }
- function cb(r) {
- return this._weekdaysParseExact ? (me(this, "_weekdaysRegex") || jl.call(this), r ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex) : (me(this, "_weekdaysShortRegex") || (this._weekdaysShortRegex = Q1), this._weekdaysShortStrictRegex && r ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex);
- }
- function pb(r) {
- return this._weekdaysParseExact ? (me(this, "_weekdaysRegex") || jl.call(this), r ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex) : (me(this, "_weekdaysMinRegex") || (this._weekdaysMinRegex = tb), this._weekdaysMinStrictRegex && r ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex);
- }
- function jl() {
- function r(F, B) {
- return B.length - F.length;
- }
- var d = [], C = [], o = [], y = [], N, _, U, G, V;
- for (N = 0; N < 7; N++)
- _ = $i([2e3, 1]).day(N), U = cr(this.weekdaysMin(_, "")), G = cr(this.weekdaysShort(_, "")), V = cr(this.weekdays(_, "")), d.push(U), C.push(G), o.push(V), y.push(U), y.push(G), y.push(V);
- d.sort(r), C.sort(r), o.sort(r), y.sort(r), this._weekdaysRegex = new RegExp("^(" + y.join("|") + ")", "i"), this._weekdaysShortRegex = this._weekdaysRegex, this._weekdaysMinRegex = this._weekdaysRegex, this._weekdaysStrictRegex = new RegExp(
- "^(" + o.join("|") + ")",
- "i"
- ), this._weekdaysShortStrictRegex = new RegExp(
- "^(" + C.join("|") + ")",
- "i"
- ), this._weekdaysMinStrictRegex = new RegExp(
- "^(" + d.join("|") + ")",
- "i"
- );
- }
- function Wl() {
- return this.hours() % 12 || 12;
- }
- function ub() {
- return this.hours() || 24;
- }
- Zt("H", ["HH", 2], 0, "hour");
- Zt("h", ["hh", 2], 0, Wl);
- Zt("k", ["kk", 2], 0, ub);
- Zt("hmm", 0, 0, function() {
- return "" + Wl.apply(this) + Vi(this.minutes(), 2);
- });
- Zt("hmmss", 0, 0, function() {
- return "" + Wl.apply(this) + Vi(this.minutes(), 2) + Vi(this.seconds(), 2);
- });
- Zt("Hmm", 0, 0, function() {
- return "" + this.hours() + Vi(this.minutes(), 2);
- });
- Zt("Hmmss", 0, 0, function() {
- return "" + this.hours() + Vi(this.minutes(), 2) + Vi(this.seconds(), 2);
- });
- function Cu(r, d) {
- Zt(r, 0, 0, function() {
- return this.localeData().meridiem(
- this.hours(),
- this.minutes(),
- d
- );
- });
- }
- Cu("a", !0);
- Cu("A", !1);
- function ku(r, d) {
- return d._meridiemParse;
- }
- Ft("a", ku);
- Ft("A", ku);
- Ft("H", Pe, Rl);
- Ft("h", Pe, kn);
- Ft("k", Pe, kn);
- Ft("HH", Pe, mi);
- Ft("hh", Pe, mi);
- Ft("kk", Pe, mi);
- Ft("hmm", du);
- Ft("hmmss", fu);
- Ft("Hmm", du);
- Ft("Hmmss", fu);
- we(["H", "HH"], Ge);
- we(["k", "kk"], function(r, d, C) {
- var o = pe(r);
- d[Ge] = o === 24 ? 0 : o;
- });
- we(["a", "A"], function(r, d, C) {
- C._isPm = C._locale.isPM(r), C._meridiem = r;
- });
- we(["h", "hh"], function(r, d, C) {
- d[Ge] = pe(r), oe(C).bigHour = !0;
- });
- we("hmm", function(r, d, C) {
- var o = r.length - 2;
- d[Ge] = pe(r.substr(0, o)), d[Ri] = pe(r.substr(o)), oe(C).bigHour = !0;
- });
- we("hmmss", function(r, d, C) {
- var o = r.length - 4, y = r.length - 2;
- d[Ge] = pe(r.substr(0, o)), d[Ri] = pe(r.substr(o, 2)), d[hr] = pe(r.substr(y)), oe(C).bigHour = !0;
- });
- we("Hmm", function(r, d, C) {
- var o = r.length - 2;
- d[Ge] = pe(r.substr(0, o)), d[Ri] = pe(r.substr(o));
- });
- we("Hmmss", function(r, d, C) {
- var o = r.length - 4, y = r.length - 2;
- d[Ge] = pe(r.substr(0, o)), d[Ri] = pe(r.substr(o, 2)), d[hr] = pe(r.substr(y));
- });
- function db(r) {
- return (r + "").toLowerCase().charAt(0) === "p";
- }
- var fb = /[ap]\.?m?\.?/i, gb = An("Hours", !0);
- function mb(r, d, C) {
- return r > 11 ? C ? "pm" : "PM" : C ? "am" : "AM";
- }
- var Au = {
- calendar: n1,
- longDateFormat: l1,
- invalidDate: c1,
- ordinal: u1,
- dayOfMonthOrdinalParse: d1,
- relativeTime: g1,
- months: L1,
- monthsShort: yu,
- week: G1,
- weekdays: K1,
- weekdaysMin: J1,
- weekdaysShort: Mu,
- meridiemParse: fb
- }, Oe = {}, Zn = {}, ns;
- function yb(r, d) {
- var C, o = Math.min(r.length, d.length);
- for (C = 0; C < o; C += 1)
- if (r[C] !== d[C])
- return C;
- return o;
- }
- function Ip(r) {
- return r && r.toLowerCase().replace("_", "-");
- }
- function vb(r) {
- for (var d = 0, C, o, y, N; d < r.length; ) {
- for (N = Ip(r[d]).split("-"), C = N.length, o = Ip(r[d + 1]), o = o ? o.split("-") : null; C > 0; ) {
- if (y = Do(N.slice(0, C).join("-")), y)
- return y;
- if (o && o.length >= C && yb(N, o) >= C - 1)
- break;
- C--;
- }
- d++;
- }
- return ns;
- }
- function xb(r) {
- return !!(r && r.match("^[^/\\\\]*$"));
- }
- function Do(r) {
- var d = null, C;
- if (Oe[r] === void 0 && typeof module < "u" && module && module.exports && xb(r))
- try {
- d = ns._abbr, C = require, C("./locale/" + r), Er(d);
- } catch {
- Oe[r] = null;
- }
- return Oe[r];
- }
- function Er(r, d) {
- var C;
- return r && (ai(d) ? C = fr(r) : C = Yl(r, d), C ? ns = C : typeof console < "u" && console.warn && console.warn(
- "Locale " + r + " not found. Did you forget to load it?"
- )), ns._abbr;
- }
- function Yl(r, d) {
- if (d !== null) {
- var C, o = Au;
- if (d.abbr = r, Oe[r] != null)
- hu(
- "defineLocaleOverride",
- "use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."
- ), o = Oe[r]._config;
- else if (d.parentLocale != null)
- if (Oe[d.parentLocale] != null)
- o = Oe[d.parentLocale]._config;
- else if (C = Do(d.parentLocale), C != null)
- o = C._config;
- else
- return Zn[d.parentLocale] || (Zn[d.parentLocale] = []), Zn[d.parentLocale].push({
- name: r,
- config: d
- }), null;
- return Oe[r] = new Ol(fl(o, d)), Zn[r] && Zn[r].forEach(function(y) {
- Yl(y.name, y.config);
- }), Er(r), Oe[r];
- } else
- return delete Oe[r], null;
- }
- function bb(r, d) {
- if (d != null) {
- var C, o, y = Au;
- Oe[r] != null && Oe[r].parentLocale != null ? Oe[r].set(fl(Oe[r]._config, d)) : (o = Do(r), o != null && (y = o._config), d = fl(y, d), o == null && (d.abbr = r), C = new Ol(d), C.parentLocale = Oe[r], Oe[r] = C), Er(r);
- } else
- Oe[r] != null && (Oe[r].parentLocale != null ? (Oe[r] = Oe[r].parentLocale, r === Er() && Er(r)) : Oe[r] != null && delete Oe[r]);
- return Oe[r];
- }
- function fr(r) {
- var d;
- if (r && r._locale && r._locale._abbr && (r = r._locale._abbr), !r)
- return ns;
- if (!ji(r)) {
- if (d = Do(r), d)
- return d;
- r = [r];
- }
- return vb(r);
- }
- function Sb() {
- return gl(Oe);
- }
- function zl(r) {
- var d, C = r._a;
- return C && oe(r).overflow === -2 && (d = C[lr] < 0 || C[lr] > 11 ? lr : C[Ui] < 1 || C[Ui] > Nl(C[Qe], C[lr]) ? Ui : C[Ge] < 0 || C[Ge] > 24 || C[Ge] === 24 && (C[Ri] !== 0 || C[hr] !== 0 || C[Hr] !== 0) ? Ge : C[Ri] < 0 || C[Ri] > 59 ? Ri : C[hr] < 0 || C[hr] > 59 ? hr : C[Hr] < 0 || C[Hr] > 999 ? Hr : -1, oe(r)._overflowDayOfYear && (d < Qe || d > Ui) && (d = Ui), oe(r)._overflowWeeks && d === -1 && (d = k1), oe(r)._overflowWeekday && d === -1 && (d = A1), oe(r).overflow = d), r;
- }
- var wb = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, Mb = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, Cb = /Z|[+-]\d\d(?::?\d\d)?/, no = [
- ["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/],
- ["YYYY-MM-DD", /\d{4}-\d\d-\d\d/],
- ["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/],
- ["GGGG-[W]WW", /\d{4}-W\d\d/, !1],
- ["YYYY-DDD", /\d{4}-\d{3}/],
- ["YYYY-MM", /\d{4}-\d\d/, !1],
- ["YYYYYYMMDD", /[+-]\d{10}/],
- ["YYYYMMDD", /\d{8}/],
- ["GGGG[W]WWE", /\d{4}W\d{3}/],
- ["GGGG[W]WW", /\d{4}W\d{2}/, !1],
- ["YYYYDDD", /\d{7}/],
- ["YYYYMM", /\d{6}/, !1],
- ["YYYY", /\d{4}/, !1]
- ], nl = [
- ["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/],
- ["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/],
- ["HH:mm:ss", /\d\d:\d\d:\d\d/],
- ["HH:mm", /\d\d:\d\d/],
- ["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/],
- ["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/],
- ["HHmmss", /\d\d\d\d\d\d/],
- ["HHmm", /\d\d\d\d/],
- ["HH", /\d\d/]
- ], kb = /^\/?Date\((-?\d+)/i, Ab = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, Tb = {
- UT: 0,
- GMT: 0,
- EDT: -4 * 60,
- EST: -5 * 60,
- CDT: -5 * 60,
- CST: -6 * 60,
- MDT: -6 * 60,
- MST: -7 * 60,
- PDT: -7 * 60,
- PST: -8 * 60
- };
- function Tu(r) {
- var d, C, o = r._i, y = wb.exec(o) || Mb.exec(o), N, _, U, G, V = no.length, F = nl.length;
- if (y) {
- for (oe(r).iso = !0, d = 0, C = V; d < C; d++)
- if (no[d][1].exec(y[1])) {
- _ = no[d][0], N = no[d][2] !== !1;
- break;
- }
- if (_ == null) {
- r._isValid = !1;
- return;
- }
- if (y[3]) {
- for (d = 0, C = F; d < C; d++)
- if (nl[d][1].exec(y[3])) {
- U = (y[2] || " ") + nl[d][0];
- break;
- }
- if (U == null) {
- r._isValid = !1;
- return;
- }
- }
- if (!N && U != null) {
- r._isValid = !1;
- return;
- }
- if (y[4])
- if (Cb.exec(y[4]))
- G = "Z";
- else {
- r._isValid = !1;
- return;
- }
- r._f = _ + (U || "") + (G || ""), Gl(r);
- } else
- r._isValid = !1;
- }
- function Pb(r, d, C, o, y, N) {
- var _ = [
- Eb(r),
- yu.indexOf(d),
- parseInt(C, 10),
- parseInt(o, 10),
- parseInt(y, 10)
- ];
- return N && _.push(parseInt(N, 10)), _;
- }
- function Eb(r) {
- var d = parseInt(r, 10);
- return d <= 49 ? 2e3 + d : d <= 999 ? 1900 + d : d;
- }
- function Ob(r) {
- return r.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "");
- }
- function Lb(r, d, C) {
- if (r) {
- var o = Mu.indexOf(r), y = new Date(
- d[0],
- d[1],
- d[2]
- ).getDay();
- if (o !== y)
- return oe(C).weekdayMismatch = !0, C._isValid = !1, !1;
- }
- return !0;
- }
- function _b(r, d, C) {
- if (r)
- return Tb[r];
- if (d)
- return 0;
- var o = parseInt(C, 10), y = o % 100, N = (o - y) / 100;
- return N * 60 + y;
- }
- function Pu(r) {
- var d = Ab.exec(Ob(r._i)), C;
- if (d) {
- if (C = Pb(
- d[4],
- d[3],
- d[2],
- d[5],
- d[6],
- d[7]
- ), !Lb(d[1], C, r))
- return;
- r._a = C, r._tzm = _b(d[8], d[9], d[10]), r._d = is.apply(null, r._a), r._d.setUTCMinutes(r._d.getUTCMinutes() - r._tzm), oe(r).rfc2822 = !0;
- } else
- r._isValid = !1;
- }
- function Db(r) {
- var d = kb.exec(r._i);
- if (d !== null) {
- r._d = /* @__PURE__ */ new Date(+d[1]);
- return;
- }
- if (Tu(r), r._isValid === !1)
- delete r._isValid;
- else
- return;
- if (Pu(r), r._isValid === !1)
- delete r._isValid;
- else
- return;
- r._strict ? r._isValid = !1 : Xt.createFromInputFallback(r);
- }
- Xt.createFromInputFallback = Pi(
- "value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",
- function(r) {
- r._d = /* @__PURE__ */ new Date(r._i + (r._useUTC ? " UTC" : ""));
- }
- );
- function gn(r, d, C) {
- return r ?? d ?? C;
- }
- function Ib(r) {
- var d = new Date(Xt.now());
- return r._useUTC ? [
- d.getUTCFullYear(),
- d.getUTCMonth(),
- d.getUTCDate()
- ] : [d.getFullYear(), d.getMonth(), d.getDate()];
- }
- function Xl(r) {
- var d, C, o = [], y, N, _;
- if (!r._d) {
- for (y = Ib(r), r._w && r._a[Ui] == null && r._a[lr] == null && Rb(r), r._dayOfYear != null && (_ = gn(r._a[Qe], y[Qe]), (r._dayOfYear > Qn(_) || r._dayOfYear === 0) && (oe(r)._overflowDayOfYear = !0), C = is(_, 0, r._dayOfYear), r._a[lr] = C.getUTCMonth(), r._a[Ui] = C.getUTCDate()), d = 0; d < 3 && r._a[d] == null; ++d)
- r._a[d] = o[d] = y[d];
- for (; d < 7; d++)
- r._a[d] = o[d] = r._a[d] == null ? d === 2 ? 1 : 0 : r._a[d];
- r._a[Ge] === 24 && r._a[Ri] === 0 && r._a[hr] === 0 && r._a[Hr] === 0 && (r._nextDay = !0, r._a[Ge] = 0), r._d = (r._useUTC ? is : z1).apply(
- null,
- o
- ), N = r._useUTC ? r._d.getUTCDay() : r._d.getDay(), r._tzm != null && r._d.setUTCMinutes(r._d.getUTCMinutes() - r._tzm), r._nextDay && (r._a[Ge] = 24), r._w && typeof r._w.d < "u" && r._w.d !== N && (oe(r).weekdayMismatch = !0);
- }
- }
- function Rb(r) {
- var d, C, o, y, N, _, U, G, V;
- d = r._w, d.GG != null || d.W != null || d.E != null ? (N = 1, _ = 4, C = gn(
- d.GG,
- r._a[Qe],
- rs(Te(), 1, 4).year
- ), o = gn(d.W, 1), y = gn(d.E, 1), (y < 1 || y > 7) && (G = !0)) : (N = r._locale._week.dow, _ = r._locale._week.doy, V = rs(Te(), N, _), C = gn(d.gg, r._a[Qe], V.year), o = gn(d.w, V.week), d.d != null ? (y = d.d, (y < 0 || y > 6) && (G = !0)) : d.e != null ? (y = d.e + N, (d.e < 0 || d.e > 6) && (G = !0)) : y = N), o < 1 || o > pr(C, N, _) ? oe(r)._overflowWeeks = !0 : G != null ? oe(r)._overflowWeekday = !0 : (U = wu(C, o, y, N, _), r._a[Qe] = U.year, r._dayOfYear = U.dayOfYear);
- }
- Xt.ISO_8601 = function() {
- };
- Xt.RFC_2822 = function() {
- };
- function Gl(r) {
- if (r._f === Xt.ISO_8601) {
- Tu(r);
- return;
- }
- if (r._f === Xt.RFC_2822) {
- Pu(r);
- return;
- }
- r._a = [], oe(r).empty = !0;
- var d = "" + r._i, C, o, y, N, _, U = d.length, G = 0, V, F;
- for (y = cu(r._f, r._locale).match(Ll) || [], F = y.length, C = 0; C < F; C++)
- N = y[C], o = (d.match(w1(N, r)) || [])[0], o && (_ = d.substr(0, d.indexOf(o)), _.length > 0 && oe(r).unusedInput.push(_), d = d.slice(
- d.indexOf(o) + o.length
- ), G += o.length), vn[N] ? (o ? oe(r).empty = !1 : oe(r).unusedTokens.push(N), C1(N, o, r)) : r._strict && !o && oe(r).unusedTokens.push(N);
- oe(r).charsLeftOver = U - G, d.length > 0 && oe(r).unusedInput.push(d), r._a[Ge] <= 12 && oe(r).bigHour === !0 && r._a[Ge] > 0 && (oe(r).bigHour = void 0), oe(r).parsedDateParts = r._a.slice(0), oe(r).meridiem = r._meridiem, r._a[Ge] = Nb(
- r._locale,
- r._a[Ge],
- r._meridiem
- ), V = oe(r).era, V !== null && (r._a[Qe] = r._locale.erasConvertYear(V, r._a[Qe])), Xl(r), zl(r);
- }
- function Nb(r, d, C) {
- var o;
- return C == null ? d : r.meridiemHour != null ? r.meridiemHour(d, C) : (r.isPM != null && (o = r.isPM(C), o && d < 12 && (d += 12), !o && d === 12 && (d = 0)), d);
- }
- function Bb(r) {
- var d, C, o, y, N, _, U = !1, G = r._f.length;
- if (G === 0) {
- oe(r).invalidFormat = !0, r._d = /* @__PURE__ */ new Date(NaN);
- return;
- }
- for (y = 0; y < G; y++)
- N = 0, _ = !1, d = El({}, r), r._useUTC != null && (d._useUTC = r._useUTC), d._f = r._f[y], Gl(d), Pl(d) && (_ = !0), N += oe(d).charsLeftOver, N += oe(d).unusedTokens.length * 10, oe(d).score = N, U ? N < o && (o = N, C = d) : (o == null || N < o || _) && (o = N, C = d, _ && (U = !0));
- Tr(r, C || d);
- }
- function jb(r) {
- if (!r._d) {
- var d = _l(r._i), C = d.day === void 0 ? d.date : d.day;
- r._a = au(
- [d.year, d.month, C, d.hour, d.minute, d.second, d.millisecond],
- function(o) {
- return o && parseInt(o, 10);
- }
- ), Xl(r);
- }
- }
- function Wb(r) {
- var d = new ls(zl(Eu(r)));
- return d._nextDay && (d.add(1, "d"), d._nextDay = void 0), d;
- }
- function Eu(r) {
- var d = r._i, C = r._f;
- return r._locale = r._locale || fr(r._l), d === null || C === void 0 && d === "" ? Ao({ nullInput: !0 }) : (typeof d == "string" && (r._i = d = r._locale.preparse(d)), Wi(d) ? new ls(zl(d)) : (as(d) ? r._d = d : ji(C) ? Bb(r) : C ? Gl(r) : Yb(r), Pl(r) || (r._d = null), r));
- }
- function Yb(r) {
- var d = r._i;
- ai(d) ? r._d = new Date(Xt.now()) : as(d) ? r._d = new Date(d.valueOf()) : typeof d == "string" ? Db(r) : ji(d) ? (r._a = au(d.slice(0), function(C) {
- return parseInt(C, 10);
- }), Xl(r)) : $r(d) ? jb(r) : ur(d) ? r._d = new Date(d) : Xt.createFromInputFallback(r);
- }
- function Ou(r, d, C, o, y) {
- var N = {};
- return (d === !0 || d === !1) && (o = d, d = void 0), (C === !0 || C === !1) && (o = C, C = void 0), ($r(r) && Tl(r) || ji(r) && r.length === 0) && (r = void 0), N._isAMomentObject = !0, N._useUTC = N._isUTC = y, N._l = C, N._i = r, N._f = d, N._strict = o, Wb(N);
- }
- function Te(r, d, C, o) {
- return Ou(r, d, C, o, !1);
- }
- var zb = Pi(
- "moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",
- function() {
- var r = Te.apply(null, arguments);
- return this.isValid() && r.isValid() ? r < this ? this : r : Ao();
- }
- ), Xb = Pi(
- "moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",
- function() {
- var r = Te.apply(null, arguments);
- return this.isValid() && r.isValid() ? r > this ? this : r : Ao();
- }
- );
- function Lu(r, d) {
- var C, o;
- if (d.length === 1 && ji(d[0]) && (d = d[0]), !d.length)
- return Te();
- for (C = d[0], o = 1; o < d.length; ++o)
- (!d[o].isValid() || d[o][r](C)) && (C = d[o]);
- return C;
- }
- function Gb() {
- var r = [].slice.call(arguments, 0);
- return Lu("isBefore", r);
- }
- function Hb() {
- var r = [].slice.call(arguments, 0);
- return Lu("isAfter", r);
- }
- var Fb = function() {
- return Date.now ? Date.now() : +/* @__PURE__ */ new Date();
- }, Kn = [
- "year",
- "quarter",
- "month",
- "week",
- "day",
- "hour",
- "minute",
- "second",
- "millisecond"
- ];
- function Ub(r) {
- var d, C = !1, o, y = Kn.length;
- for (d in r)
- if (me(r, d) && !(We.call(Kn, d) !== -1 && (r[d] == null || !isNaN(r[d]))))
- return !1;
- for (o = 0; o < y; ++o)
- if (r[Kn[o]]) {
- if (C)
- return !1;
- parseFloat(r[Kn[o]]) !== pe(r[Kn[o]]) && (C = !0);
- }
- return !0;
- }
- function Vb() {
- return this._isValid;
- }
- function $b() {
- return Yi(NaN);
- }
- function Io(r) {
- var d = _l(r), C = d.year || 0, o = d.quarter || 0, y = d.month || 0, N = d.week || d.isoWeek || 0, _ = d.day || 0, U = d.hour || 0, G = d.minute || 0, V = d.second || 0, F = d.millisecond || 0;
- this._isValid = Ub(d), this._milliseconds = +F + V * 1e3 + // 1000
- G * 6e4 + // 1000 * 60
- U * 1e3 * 60 * 60, this._days = +_ + N * 7, this._months = +y + o * 3 + C * 12, this._data = {}, this._locale = fr(), this._bubble();
- }
- function ao(r) {
- return r instanceof Io;
- }
- function yl(r) {
- return r < 0 ? Math.round(-1 * r) * -1 : Math.round(r);
- }
- function Zb(r, d, C) {
- var o = Math.min(r.length, d.length), y = Math.abs(r.length - d.length), N = 0, _;
- for (_ = 0; _ < o; _++)
- (C && r[_] !== d[_] || !C && pe(r[_]) !== pe(d[_])) && N++;
- return N + y;
- }
- function _u(r, d) {
- Zt(r, 0, 0, function() {
- var C = this.utcOffset(), o = "+";
- return C < 0 && (C = -C, o = "-"), o + Vi(~~(C / 60), 2) + d + Vi(~~C % 60, 2);
- });
- }
- _u("Z", ":");
- _u("ZZ", "");
- Ft("Z", Lo);
- Ft("ZZ", Lo);
- we(["Z", "ZZ"], function(r, d, C) {
- C._useUTC = !0, C._tzm = Hl(Lo, r);
- });
- var Kb = /([\+\-]|\d\d)/gi;
- function Hl(r, d) {
- var C = (d || "").match(r), o, y, N;
- return C === null ? null : (o = C[C.length - 1] || [], y = (o + "").match(Kb) || ["-", 0, 0], N = +(y[1] * 60) + pe(y[2]), N === 0 ? 0 : y[0] === "+" ? N : -N);
- }
- function Fl(r, d) {
- var C, o;
- return d._isUTC ? (C = d.clone(), o = (Wi(r) || as(r) ? r.valueOf() : Te(r).valueOf()) - C.valueOf(), C._d.setTime(C._d.valueOf() + o), Xt.updateOffset(C, !1), C) : Te(r).local();
- }
- function vl(r) {
- return -Math.round(r._d.getTimezoneOffset());
- }
- Xt.updateOffset = function() {
- };
- function Jb(r, d, C) {
- var o = this._offset || 0, y;
- if (!this.isValid())
- return r != null ? this : NaN;
- if (r != null) {
- if (typeof r == "string") {
- if (r = Hl(Lo, r), r === null)
- return this;
- } else
- Math.abs(r) < 16 && !C && (r = r * 60);
- return !this._isUTC && d && (y = vl(this)), this._offset = r, this._isUTC = !0, y != null && this.add(y, "m"), o !== r && (!d || this._changeInProgress ? Ru(
- this,
- Yi(r - o, "m"),
- 1,
- !1
- ) : this._changeInProgress || (this._changeInProgress = !0, Xt.updateOffset(this, !0), this._changeInProgress = null)), this;
- } else
- return this._isUTC ? o : vl(this);
- }
- function qb(r, d) {
- return r != null ? (typeof r != "string" && (r = -r), this.utcOffset(r, d), this) : -this.utcOffset();
- }
- function Qb(r) {
- return this.utcOffset(0, r);
- }
- function tS(r) {
- return this._isUTC && (this.utcOffset(0, r), this._isUTC = !1, r && this.subtract(vl(this), "m")), this;
- }
- function eS() {
- if (this._tzm != null)
- this.utcOffset(this._tzm, !1, !0);
- else if (typeof this._i == "string") {
- var r = Hl(b1, this._i);
- r != null ? this.utcOffset(r) : this.utcOffset(0, !0);
- }
- return this;
- }
- function iS(r) {
- return this.isValid() ? (r = r ? Te(r).utcOffset() : 0, (this.utcOffset() - r) % 60 === 0) : !1;
- }
- function rS() {
- return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();
- }
- function nS() {
- if (!ai(this._isDSTShifted))
- return this._isDSTShifted;
- var r = {}, d;
- return El(r, this), r = Eu(r), r._a ? (d = r._isUTC ? $i(r._a) : Te(r._a), this._isDSTShifted = this.isValid() && Zb(r._a, d.toArray()) > 0) : this._isDSTShifted = !1, this._isDSTShifted;
- }
- function sS() {
- return this.isValid() ? !this._isUTC : !1;
- }
- function oS() {
- return this.isValid() ? this._isUTC : !1;
- }
- function Du() {
- return this.isValid() ? this._isUTC && this._offset === 0 : !1;
- }
- var aS = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, lS = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
- function Yi(r, d) {
- var C = r, o = null, y, N, _;
- return ao(r) ? C = {
- ms: r._milliseconds,
- d: r._days,
- M: r._months
- } : ur(r) || !isNaN(+r) ? (C = {}, d ? C[d] = +r : C.milliseconds = +r) : (o = aS.exec(r)) ? (y = o[1] === "-" ? -1 : 1, C = {
- y: 0,
- d: pe(o[Ui]) * y,
- h: pe(o[Ge]) * y,
- m: pe(o[Ri]) * y,
- s: pe(o[hr]) * y,
- ms: pe(yl(o[Hr] * 1e3)) * y
- // the millisecond decimal point is included in the match
- }) : (o = lS.exec(r)) ? (y = o[1] === "-" ? -1 : 1, C = {
- y: Xr(o[2], y),
- M: Xr(o[3], y),
- w: Xr(o[4], y),
- d: Xr(o[5], y),
- h: Xr(o[6], y),
- m: Xr(o[7], y),
- s: Xr(o[8], y)
- }) : C == null ? C = {} : typeof C == "object" && ("from" in C || "to" in C) && (_ = hS(
- Te(C.from),
- Te(C.to)
- ), C = {}, C.ms = _.milliseconds, C.M = _.months), N = new Io(C), ao(r) && me(r, "_locale") && (N._locale = r._locale), ao(r) && me(r, "_isValid") && (N._isValid = r._isValid), N;
- }
- Yi.fn = Io.prototype;
- Yi.invalid = $b;
- function Xr(r, d) {
- var C = r && parseFloat(r.replace(",", "."));
- return (isNaN(C) ? 0 : C) * d;
- }
- function Rp(r, d) {
- var C = {};
- return C.months = d.month() - r.month() + (d.year() - r.year()) * 12, r.clone().add(C.months, "M").isAfter(d) && --C.months, C.milliseconds = +d - +r.clone().add(C.months, "M"), C;
- }
- function hS(r, d) {
- var C;
- return r.isValid() && d.isValid() ? (d = Fl(d, r), r.isBefore(d) ? C = Rp(r, d) : (C = Rp(d, r), C.milliseconds = -C.milliseconds, C.months = -C.months), C) : { milliseconds: 0, months: 0 };
- }
- function Iu(r, d) {
- return function(C, o) {
- var y, N;
- return o !== null && !isNaN(+o) && (hu(
- d,
- "moment()." + d + "(period, number) is deprecated. Please use moment()." + d + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."
- ), N = C, C = o, o = N), y = Yi(C, o), Ru(this, y, r), this;
- };
- }
- function Ru(r, d, C, o) {
- var y = d._milliseconds, N = yl(d._days), _ = yl(d._months);
- r.isValid() && (o = o ?? !0, _ && xu(r, es(r, "Month") + _ * C), N && mu(r, "Date", es(r, "Date") + N * C), y && r._d.setTime(r._d.valueOf() + y * C), o && Xt.updateOffset(r, N || _));
- }
- var cS = Iu(1, "add"), pS = Iu(-1, "subtract");
- function Nu(r) {
- return typeof r == "string" || r instanceof String;
- }
- function uS(r) {
- return Wi(r) || as(r) || Nu(r) || ur(r) || fS(r) || dS(r) || r === null || r === void 0;
- }
- function dS(r) {
- var d = $r(r) && !Tl(r), C = !1, o = [
- "years",
- "year",
- "y",
- "months",
- "month",
- "M",
- "days",
- "day",
- "d",
- "dates",
- "date",
- "D",
- "hours",
- "hour",
- "h",
- "minutes",
- "minute",
- "m",
- "seconds",
- "second",
- "s",
- "milliseconds",
- "millisecond",
- "ms"
- ], y, N, _ = o.length;
- for (y = 0; y < _; y += 1)
- N = o[y], C = C || me(r, N);
- return d && C;
- }
- function fS(r) {
- var d = ji(r), C = !1;
- return d && (C = r.filter(function(o) {
- return !ur(o) && Nu(r);
- }).length === 0), d && C;
- }
- function gS(r) {
- var d = $r(r) && !Tl(r), C = !1, o = [
- "sameDay",
- "nextDay",
- "lastDay",
- "nextWeek",
- "lastWeek",
- "sameElse"
- ], y, N;
- for (y = 0; y < o.length; y += 1)
- N = o[y], C = C || me(r, N);
- return d && C;
- }
- function mS(r, d) {
- var C = r.diff(d, "days", !0);
- return C < -6 ? "sameElse" : C < -1 ? "lastWeek" : C < 0 ? "lastDay" : C < 1 ? "sameDay" : C < 2 ? "nextDay" : C < 7 ? "nextWeek" : "sameElse";
- }
- function yS(r, d) {
- arguments.length === 1 && (arguments[0] ? uS(arguments[0]) ? (r = arguments[0], d = void 0) : gS(arguments[0]) && (d = arguments[0], r = void 0) : (r = void 0, d = void 0));
- var C = r || Te(), o = Fl(C, this).startOf("day"), y = Xt.calendarFormat(this, o) || "sameElse", N = d && (Zi(d[y]) ? d[y].call(this, C) : d[y]);
- return this.format(
- N || this.localeData().calendar(y, this, Te(C))
- );
- }
- function vS() {
- return new ls(this);
- }
- function xS(r, d) {
- var C = Wi(r) ? r : Te(r);
- return this.isValid() && C.isValid() ? (d = Ei(d) || "millisecond", d === "millisecond" ? this.valueOf() > C.valueOf() : C.valueOf() < this.clone().startOf(d).valueOf()) : !1;
- }
- function bS(r, d) {
- var C = Wi(r) ? r : Te(r);
- return this.isValid() && C.isValid() ? (d = Ei(d) || "millisecond", d === "millisecond" ? this.valueOf() < C.valueOf() : this.clone().endOf(d).valueOf() < C.valueOf()) : !1;
- }
- function SS(r, d, C, o) {
- var y = Wi(r) ? r : Te(r), N = Wi(d) ? d : Te(d);
- return this.isValid() && y.isValid() && N.isValid() ? (o = o || "()", (o[0] === "(" ? this.isAfter(y, C) : !this.isBefore(y, C)) && (o[1] === ")" ? this.isBefore(N, C) : !this.isAfter(N, C))) : !1;
- }
- function wS(r, d) {
- var C = Wi(r) ? r : Te(r), o;
- return this.isValid() && C.isValid() ? (d = Ei(d) || "millisecond", d === "millisecond" ? this.valueOf() === C.valueOf() : (o = C.valueOf(), this.clone().startOf(d).valueOf() <= o && o <= this.clone().endOf(d).valueOf())) : !1;
- }
- function MS(r, d) {
- return this.isSame(r, d) || this.isAfter(r, d);
- }
- function CS(r, d) {
- return this.isSame(r, d) || this.isBefore(r, d);
- }
- function kS(r, d, C) {
- var o, y, N;
- if (!this.isValid())
- return NaN;
- if (o = Fl(r, this), !o.isValid())
- return NaN;
- switch (y = (o.utcOffset() - this.utcOffset()) * 6e4, d = Ei(d), d) {
- case "year":
- N = lo(this, o) / 12;
- break;
- case "month":
- N = lo(this, o);
- break;
- case "quarter":
- N = lo(this, o) / 3;
- break;
- case "second":
- N = (this - o) / 1e3;
- break;
- case "minute":
- N = (this - o) / 6e4;
- break;
- case "hour":
- N = (this - o) / 36e5;
- break;
- case "day":
- N = (this - o - y) / 864e5;
- break;
- case "week":
- N = (this - o - y) / 6048e5;
- break;
- default:
- N = this - o;
- }
- return C ? N : ki(N);
- }
- function lo(r, d) {
- if (r.date() < d.date())
- return -lo(d, r);
- var C = (d.year() - r.year()) * 12 + (d.month() - r.month()), o = r.clone().add(C, "months"), y, N;
- return d - o < 0 ? (y = r.clone().add(C - 1, "months"), N = (d - o) / (o - y)) : (y = r.clone().add(C + 1, "months"), N = (d - o) / (y - o)), -(C + N) || 0;
- }
- Xt.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ";
- Xt.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]";
- function AS() {
- return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
- }
- function TS(r) {
- if (!this.isValid())
- return null;
- var d = r !== !0, C = d ? this.clone().utc() : this;
- return C.year() < 0 || C.year() > 9999 ? oo(
- C,
- d ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"
- ) : Zi(Date.prototype.toISOString) ? d ? this.toDate().toISOString() : new Date(this.valueOf() + this.utcOffset() * 60 * 1e3).toISOString().replace("Z", oo(C, "Z")) : oo(
- C,
- d ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYY-MM-DD[T]HH:mm:ss.SSSZ"
- );
- }
- function PS() {
- if (!this.isValid())
- return "moment.invalid(/* " + this._i + " */)";
- var r = "moment", d = "", C, o, y, N;
- return this.isLocal() || (r = this.utcOffset() === 0 ? "moment.utc" : "moment.parseZone", d = "Z"), C = "[" + r + '("]', o = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY", y = "-MM-DD[T]HH:mm:ss.SSS", N = d + '[")]', this.format(C + o + y + N);
- }
- function ES(r) {
- r || (r = this.isUtc() ? Xt.defaultFormatUtc : Xt.defaultFormat);
- var d = oo(this, r);
- return this.localeData().postformat(d);
- }
- function OS(r, d) {
- return this.isValid() && (Wi(r) && r.isValid() || Te(r).isValid()) ? Yi({ to: this, from: r }).locale(this.locale()).humanize(!d) : this.localeData().invalidDate();
- }
- function LS(r) {
- return this.from(Te(), r);
- }
- function _S(r, d) {
- return this.isValid() && (Wi(r) && r.isValid() || Te(r).isValid()) ? Yi({ from: this, to: r }).locale(this.locale()).humanize(!d) : this.localeData().invalidDate();
- }
- function DS(r) {
- return this.to(Te(), r);
- }
- function Bu(r) {
- var d;
- return r === void 0 ? this._locale._abbr : (d = fr(r), d != null && (this._locale = d), this);
- }
- var ju = Pi(
- "moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",
- function(r) {
- return r === void 0 ? this.localeData() : this.locale(r);
- }
- );
- function Wu() {
- return this._locale;
- }
- var vo = 1e3, xn = 60 * vo, xo = 60 * xn, Yu = (365 * 400 + 97) * 24 * xo;
- function bn(r, d) {
- return (r % d + d) % d;
- }
- function zu(r, d, C) {
- return r < 100 && r >= 0 ? new Date(r + 400, d, C) - Yu : new Date(r, d, C).valueOf();
- }
- function Xu(r, d, C) {
- return r < 100 && r >= 0 ? Date.UTC(r + 400, d, C) - Yu : Date.UTC(r, d, C);
- }
- function IS(r) {
- var d, C;
- if (r = Ei(r), r === void 0 || r === "millisecond" || !this.isValid())
- return this;
- switch (C = this._isUTC ? Xu : zu, r) {
- case "year":
- d = C(this.year(), 0, 1);
- break;
- case "quarter":
- d = C(
- this.year(),
- this.month() - this.month() % 3,
- 1
- );
- break;
- case "month":
- d = C(this.year(), this.month(), 1);
- break;
- case "week":
- d = C(
- this.year(),
- this.month(),
- this.date() - this.weekday()
- );
- break;
- case "isoWeek":
- d = C(
- this.year(),
- this.month(),
- this.date() - (this.isoWeekday() - 1)
- );
- break;
- case "day":
- case "date":
- d = C(this.year(), this.month(), this.date());
- break;
- case "hour":
- d = this._d.valueOf(), d -= bn(
- d + (this._isUTC ? 0 : this.utcOffset() * xn),
- xo
- );
- break;
- case "minute":
- d = this._d.valueOf(), d -= bn(d, xn);
- break;
- case "second":
- d = this._d.valueOf(), d -= bn(d, vo);
- break;
- }
- return this._d.setTime(d), Xt.updateOffset(this, !0), this;
- }
- function RS(r) {
- var d, C;
- if (r = Ei(r), r === void 0 || r === "millisecond" || !this.isValid())
- return this;
- switch (C = this._isUTC ? Xu : zu, r) {
- case "year":
- d = C(this.year() + 1, 0, 1) - 1;
- break;
- case "quarter":
- d = C(
- this.year(),
- this.month() - this.month() % 3 + 3,
- 1
- ) - 1;
- break;
- case "month":
- d = C(this.year(), this.month() + 1, 1) - 1;
- break;
- case "week":
- d = C(
- this.year(),
- this.month(),
- this.date() - this.weekday() + 7
- ) - 1;
- break;
- case "isoWeek":
- d = C(
- this.year(),
- this.month(),
- this.date() - (this.isoWeekday() - 1) + 7
- ) - 1;
- break;
- case "day":
- case "date":
- d = C(this.year(), this.month(), this.date() + 1) - 1;
- break;
- case "hour":
- d = this._d.valueOf(), d += xo - bn(
- d + (this._isUTC ? 0 : this.utcOffset() * xn),
- xo
- ) - 1;
- break;
- case "minute":
- d = this._d.valueOf(), d += xn - bn(d, xn) - 1;
- break;
- case "second":
- d = this._d.valueOf(), d += vo - bn(d, vo) - 1;
- break;
- }
- return this._d.setTime(d), Xt.updateOffset(this, !0), this;
- }
- function NS() {
- return this._d.valueOf() - (this._offset || 0) * 6e4;
- }
- function BS() {
- return Math.floor(this.valueOf() / 1e3);
- }
- function jS() {
- return new Date(this.valueOf());
- }
- function WS() {
- var r = this;
- return [
- r.year(),
- r.month(),
- r.date(),
- r.hour(),
- r.minute(),
- r.second(),
- r.millisecond()
- ];
- }
- function YS() {
- var r = this;
- return {
- years: r.year(),
- months: r.month(),
- date: r.date(),
- hours: r.hours(),
- minutes: r.minutes(),
- seconds: r.seconds(),
- milliseconds: r.milliseconds()
- };
- }
- function zS() {
- return this.isValid() ? this.toISOString() : null;
- }
- function XS() {
- return Pl(this);
- }
- function GS() {
- return Tr({}, oe(this));
- }
- function HS() {
- return oe(this).overflow;
- }
- function FS() {
- return {
- input: this._i,
- format: this._f,
- locale: this._locale,
- isUTC: this._isUTC,
- strict: this._strict
- };
- }
- Zt("N", 0, 0, "eraAbbr");
- Zt("NN", 0, 0, "eraAbbr");
- Zt("NNN", 0, 0, "eraAbbr");
- Zt("NNNN", 0, 0, "eraName");
- Zt("NNNNN", 0, 0, "eraNarrow");
- Zt("y", ["y", 1], "yo", "eraYear");
- Zt("y", ["yy", 2], 0, "eraYear");
- Zt("y", ["yyy", 3], 0, "eraYear");
- Zt("y", ["yyyy", 4], 0, "eraYear");
- Ft("N", Ul);
- Ft("NN", Ul);
- Ft("NNN", Ul);
- Ft("NNNN", iw);
- Ft("NNNNN", rw);
- we(
- ["N", "NN", "NNN", "NNNN", "NNNNN"],
- function(r, d, C, o) {
- var y = C._locale.erasParse(r, o, C._strict);
- y ? oe(C).era = y : oe(C).invalidEra = r;
- }
- );
- Ft("y", Cn);
- Ft("yy", Cn);
- Ft("yyy", Cn);
- Ft("yyyy", Cn);
- Ft("yo", nw);
- we(["y", "yy", "yyy", "yyyy"], Qe);
- we(["yo"], function(r, d, C, o) {
- var y;
- C._locale._eraYearOrdinalRegex && (y = r.match(C._locale._eraYearOrdinalRegex)), C._locale.eraYearOrdinalParse ? d[Qe] = C._locale.eraYearOrdinalParse(r, y) : d[Qe] = parseInt(r, 10);
- });
- function US(r, d) {
- var C, o, y, N = this._eras || fr("en")._eras;
- for (C = 0, o = N.length; C < o; ++C) {
- switch (typeof N[C].since) {
- case "string":
- y = Xt(N[C].since).startOf("day"), N[C].since = y.valueOf();
- break;
- }
- switch (typeof N[C].until) {
- case "undefined":
- N[C].until = 1 / 0;
- break;
- case "string":
- y = Xt(N[C].until).startOf("day").valueOf(), N[C].until = y.valueOf();
- break;
- }
- }
- return N;
- }
- function VS(r, d, C) {
- var o, y, N = this.eras(), _, U, G;
- for (r = r.toUpperCase(), o = 0, y = N.length; o < y; ++o)
- if (_ = N[o].name.toUpperCase(), U = N[o].abbr.toUpperCase(), G = N[o].narrow.toUpperCase(), C)
- switch (d) {
- case "N":
- case "NN":
- case "NNN":
- if (U === r)
- return N[o];
- break;
- case "NNNN":
- if (_ === r)
- return N[o];
- break;
- case "NNNNN":
- if (G === r)
- return N[o];
- break;
- }
- else if ([_, U, G].indexOf(r) >= 0)
- return N[o];
- }
- function $S(r, d) {
- var C = r.since <= r.until ? 1 : -1;
- return d === void 0 ? Xt(r.since).year() : Xt(r.since).year() + (d - r.offset) * C;
- }
- function ZS() {
- var r, d, C, o = this.localeData().eras();
- for (r = 0, d = o.length; r < d; ++r)
- if (C = this.clone().startOf("day").valueOf(), o[r].since <= C && C <= o[r].until || o[r].until <= C && C <= o[r].since)
- return o[r].name;
- return "";
- }
- function KS() {
- var r, d, C, o = this.localeData().eras();
- for (r = 0, d = o.length; r < d; ++r)
- if (C = this.clone().startOf("day").valueOf(), o[r].since <= C && C <= o[r].until || o[r].until <= C && C <= o[r].since)
- return o[r].narrow;
- return "";
- }
- function JS() {
- var r, d, C, o = this.localeData().eras();
- for (r = 0, d = o.length; r < d; ++r)
- if (C = this.clone().startOf("day").valueOf(), o[r].since <= C && C <= o[r].until || o[r].until <= C && C <= o[r].since)
- return o[r].abbr;
- return "";
- }
- function qS() {
- var r, d, C, o, y = this.localeData().eras();
- for (r = 0, d = y.length; r < d; ++r)
- if (C = y[r].since <= y[r].until ? 1 : -1, o = this.clone().startOf("day").valueOf(), y[r].since <= o && o <= y[r].until || y[r].until <= o && o <= y[r].since)
- return (this.year() - Xt(y[r].since).year()) * C + y[r].offset;
- return this.year();
- }
- function QS(r) {
- return me(this, "_erasNameRegex") || Vl.call(this), r ? this._erasNameRegex : this._erasRegex;
- }
- function tw(r) {
- return me(this, "_erasAbbrRegex") || Vl.call(this), r ? this._erasAbbrRegex : this._erasRegex;
- }
- function ew(r) {
- return me(this, "_erasNarrowRegex") || Vl.call(this), r ? this._erasNarrowRegex : this._erasRegex;
- }
- function Ul(r, d) {
- return d.erasAbbrRegex(r);
- }
- function iw(r, d) {
- return d.erasNameRegex(r);
- }
- function rw(r, d) {
- return d.erasNarrowRegex(r);
- }
- function nw(r, d) {
- return d._eraYearOrdinalRegex || Cn;
- }
- function Vl() {
- var r = [], d = [], C = [], o = [], y, N, _, U, G, V = this.eras();
- for (y = 0, N = V.length; y < N; ++y)
- _ = cr(V[y].name), U = cr(V[y].abbr), G = cr(V[y].narrow), d.push(_), r.push(U), C.push(G), o.push(_), o.push(U), o.push(G);
- this._erasRegex = new RegExp("^(" + o.join("|") + ")", "i"), this._erasNameRegex = new RegExp("^(" + d.join("|") + ")", "i"), this._erasAbbrRegex = new RegExp("^(" + r.join("|") + ")", "i"), this._erasNarrowRegex = new RegExp(
- "^(" + C.join("|") + ")",
- "i"
- );
- }
- Zt(0, ["gg", 2], 0, function() {
- return this.weekYear() % 100;
- });
- Zt(0, ["GG", 2], 0, function() {
- return this.isoWeekYear() % 100;
- });
- function Ro(r, d) {
- Zt(0, [r, r.length], 0, d);
- }
- Ro("gggg", "weekYear");
- Ro("ggggg", "weekYear");
- Ro("GGGG", "isoWeekYear");
- Ro("GGGGG", "isoWeekYear");
- Ft("G", Oo);
- Ft("g", Oo);
- Ft("GG", Pe, mi);
- Ft("gg", Pe, mi);
- Ft("GGGG", Il, Dl);
- Ft("gggg", Il, Dl);
- Ft("GGGGG", Eo, To);
- Ft("ggggg", Eo, To);
- cs(
- ["gggg", "ggggg", "GGGG", "GGGGG"],
- function(r, d, C, o) {
- d[o.substr(0, 2)] = pe(r);
- }
- );
- cs(["gg", "GG"], function(r, d, C, o) {
- d[o] = Xt.parseTwoDigitYear(r);
- });
- function sw(r) {
- return Gu.call(
- this,
- r,
- this.week(),
- this.weekday() + this.localeData()._week.dow,
- this.localeData()._week.dow,
- this.localeData()._week.doy
- );
- }
- function ow(r) {
- return Gu.call(
- this,
- r,
- this.isoWeek(),
- this.isoWeekday(),
- 1,
- 4
- );
- }
- function aw() {
- return pr(this.year(), 1, 4);
- }
- function lw() {
- return pr(this.isoWeekYear(), 1, 4);
- }
- function hw() {
- var r = this.localeData()._week;
- return pr(this.year(), r.dow, r.doy);
- }
- function cw() {
- var r = this.localeData()._week;
- return pr(this.weekYear(), r.dow, r.doy);
- }
- function Gu(r, d, C, o, y) {
- var N;
- return r == null ? rs(this, o, y).year : (N = pr(r, o, y), d > N && (d = N), pw.call(this, r, d, C, o, y));
- }
- function pw(r, d, C, o, y) {
- var N = wu(r, d, C, o, y), _ = is(N.year, 0, N.dayOfYear);
- return this.year(_.getUTCFullYear()), this.month(_.getUTCMonth()), this.date(_.getUTCDate()), this;
- }
- Zt("Q", 0, "Qo", "quarter");
- Ft("Q", pu);
- we("Q", function(r, d) {
- d[lr] = (pe(r) - 1) * 3;
- });
- function uw(r) {
- return r == null ? Math.ceil((this.month() + 1) / 3) : this.month((r - 1) * 3 + this.month() % 3);
- }
- Zt("D", ["DD", 2], "Do", "date");
- Ft("D", Pe, kn);
- Ft("DD", Pe, mi);
- Ft("Do", function(r, d) {
- return r ? d._dayOfMonthOrdinalParse || d._ordinalParse : d._dayOfMonthOrdinalParseLenient;
- });
- we(["D", "DD"], Ui);
- we("Do", function(r, d) {
- d[Ui] = pe(r.match(Pe)[0]);
- });
- var Hu = An("Date", !0);
- Zt("DDD", ["DDDD", 3], "DDDo", "dayOfYear");
- Ft("DDD", Po);
- Ft("DDDD", uu);
- we(["DDD", "DDDD"], function(r, d, C) {
- C._dayOfYear = pe(r);
- });
- function dw(r) {
- var d = Math.round(
- (this.clone().startOf("day") - this.clone().startOf("year")) / 864e5
- ) + 1;
- return r == null ? d : this.add(r - d, "d");
- }
- Zt("m", ["mm", 2], 0, "minute");
- Ft("m", Pe, Rl);
- Ft("mm", Pe, mi);
- we(["m", "mm"], Ri);
- var fw = An("Minutes", !1);
- Zt("s", ["ss", 2], 0, "second");
- Ft("s", Pe, Rl);
- Ft("ss", Pe, mi);
- we(["s", "ss"], hr);
- var gw = An("Seconds", !1);
- Zt("S", 0, 0, function() {
- return ~~(this.millisecond() / 100);
- });
- Zt(0, ["SS", 2], 0, function() {
- return ~~(this.millisecond() / 10);
- });
- Zt(0, ["SSS", 3], 0, "millisecond");
- Zt(0, ["SSSS", 4], 0, function() {
- return this.millisecond() * 10;
- });
- Zt(0, ["SSSSS", 5], 0, function() {
- return this.millisecond() * 100;
- });
- Zt(0, ["SSSSSS", 6], 0, function() {
- return this.millisecond() * 1e3;
- });
- Zt(0, ["SSSSSSS", 7], 0, function() {
- return this.millisecond() * 1e4;
- });
- Zt(0, ["SSSSSSSS", 8], 0, function() {
- return this.millisecond() * 1e5;
- });
- Zt(0, ["SSSSSSSSS", 9], 0, function() {
- return this.millisecond() * 1e6;
- });
- Ft("S", Po, pu);
- Ft("SS", Po, mi);
- Ft("SSS", Po, uu);
- var Pr, Fu;
- for (Pr = "SSSS"; Pr.length <= 9; Pr += "S")
- Ft(Pr, Cn);
- function mw(r, d) {
- d[Hr] = pe(("0." + r) * 1e3);
- }
- for (Pr = "S"; Pr.length <= 9; Pr += "S")
- we(Pr, mw);
- Fu = An("Milliseconds", !1);
- Zt("z", 0, 0, "zoneAbbr");
- Zt("zz", 0, 0, "zoneName");
- function yw() {
- return this._isUTC ? "UTC" : "";
- }
- function vw() {
- return this._isUTC ? "Coordinated Universal Time" : "";
- }
- var jt = ls.prototype;
- jt.add = cS;
- jt.calendar = yS;
- jt.clone = vS;
- jt.diff = kS;
- jt.endOf = RS;
- jt.format = ES;
- jt.from = OS;
- jt.fromNow = LS;
- jt.to = _S;
- jt.toNow = DS;
- jt.get = P1;
- jt.invalidAt = HS;
- jt.isAfter = xS;
- jt.isBefore = bS;
- jt.isBetween = SS;
- jt.isSame = wS;
- jt.isSameOrAfter = MS;
- jt.isSameOrBefore = CS;
- jt.isValid = XS;
- jt.lang = ju;
- jt.locale = Bu;
- jt.localeData = Wu;
- jt.max = Xb;
- jt.min = zb;
- jt.parsingFlags = GS;
- jt.set = E1;
- jt.startOf = IS;
- jt.subtract = pS;
- jt.toArray = WS;
- jt.toObject = YS;
- jt.toDate = jS;
- jt.toISOString = TS;
- jt.inspect = PS;
- typeof Symbol < "u" && Symbol.for != null && (jt[Symbol.for("nodejs.util.inspect.custom")] = function() {
- return "Moment<" + this.format() + ">";
- });
- jt.toJSON = zS;
- jt.toString = AS;
- jt.unix = BS;
- jt.valueOf = NS;
- jt.creationData = FS;
- jt.eraName = ZS;
- jt.eraNarrow = KS;
- jt.eraAbbr = JS;
- jt.eraYear = qS;
- jt.year = gu;
- jt.isLeapYear = T1;
- jt.weekYear = sw;
- jt.isoWeekYear = ow;
- jt.quarter = jt.quarters = uw;
- jt.month = bu;
- jt.daysInMonth = j1;
- jt.week = jt.weeks = U1;
- jt.isoWeek = jt.isoWeeks = V1;
- jt.weeksInYear = hw;
- jt.weeksInWeekYear = cw;
- jt.isoWeeksInYear = aw;
- jt.isoWeeksInISOWeekYear = lw;
- jt.date = Hu;
- jt.day = jt.days = ob;
- jt.weekday = ab;
- jt.isoWeekday = lb;
- jt.dayOfYear = dw;
- jt.hour = jt.hours = gb;
- jt.minute = jt.minutes = fw;
- jt.second = jt.seconds = gw;
- jt.millisecond = jt.milliseconds = Fu;
- jt.utcOffset = Jb;
- jt.utc = Qb;
- jt.local = tS;
- jt.parseZone = eS;
- jt.hasAlignedHourOffset = iS;
- jt.isDST = rS;
- jt.isLocal = sS;
- jt.isUtcOffset = oS;
- jt.isUtc = Du;
- jt.isUTC = Du;
- jt.zoneAbbr = yw;
- jt.zoneName = vw;
- jt.dates = Pi(
- "dates accessor is deprecated. Use date instead.",
- Hu
- );
- jt.months = Pi(
- "months accessor is deprecated. Use month instead",
- bu
- );
- jt.years = Pi(
- "years accessor is deprecated. Use year instead",
- gu
- );
- jt.zone = Pi(
- "moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",
- qb
- );
- jt.isDSTShifted = Pi(
- "isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",
- nS
- );
- function xw(r) {
- return Te(r * 1e3);
- }
- function bw() {
- return Te.apply(null, arguments).parseZone();
- }
- function Uu(r) {
- return r;
- }
- var ye = Ol.prototype;
- ye.calendar = s1;
- ye.longDateFormat = h1;
- ye.invalidDate = p1;
- ye.ordinal = f1;
- ye.preparse = Uu;
- ye.postformat = Uu;
- ye.relativeTime = m1;
- ye.pastFuture = y1;
- ye.set = r1;
- ye.eras = US;
- ye.erasParse = VS;
- ye.erasConvertYear = $S;
- ye.erasAbbrRegex = tw;
- ye.erasNameRegex = QS;
- ye.erasNarrowRegex = ew;
- ye.months = I1;
- ye.monthsShort = R1;
- ye.monthsParse = B1;
- ye.monthsRegex = Y1;
- ye.monthsShortRegex = W1;
- ye.week = X1;
- ye.firstDayOfYear = F1;
- ye.firstDayOfWeek = H1;
- ye.weekdays = eb;
- ye.weekdaysMin = rb;
- ye.weekdaysShort = ib;
- ye.weekdaysParse = sb;
- ye.weekdaysRegex = hb;
- ye.weekdaysShortRegex = cb;
- ye.weekdaysMinRegex = pb;
- ye.isPM = db;
- ye.meridiem = mb;
- function bo(r, d, C, o) {
- var y = fr(), N = $i().set(o, d);
- return y[C](N, r);
- }
- function Vu(r, d, C) {
- if (ur(r) && (d = r, r = void 0), r = r || "", d != null)
- return bo(r, d, C, "month");
- var o, y = [];
- for (o = 0; o < 12; o++)
- y[o] = bo(r, o, C, "month");
- return y;
- }
- function $l(r, d, C, o) {
- typeof r == "boolean" ? (ur(d) && (C = d, d = void 0), d = d || "") : (d = r, C = d, r = !1, ur(d) && (C = d, d = void 0), d = d || "");
- var y = fr(), N = r ? y._week.dow : 0, _, U = [];
- if (C != null)
- return bo(d, (C + N) % 7, o, "day");
- for (_ = 0; _ < 7; _++)
- U[_] = bo(d, (_ + N) % 7, o, "day");
- return U;
- }
- function Sw(r, d) {
- return Vu(r, d, "months");
- }
- function ww(r, d) {
- return Vu(r, d, "monthsShort");
- }
- function Mw(r, d, C) {
- return $l(r, d, C, "weekdays");
- }
- function Cw(r, d, C) {
- return $l(r, d, C, "weekdaysShort");
- }
- function kw(r, d, C) {
- return $l(r, d, C, "weekdaysMin");
- }
- Er("en", {
- eras: [
- {
- since: "0001-01-01",
- until: 1 / 0,
- offset: 1,
- name: "Anno Domini",
- narrow: "AD",
- abbr: "AD"
- },
- {
- since: "0000-12-31",
- until: -1 / 0,
- offset: 1,
- name: "Before Christ",
- narrow: "BC",
- abbr: "BC"
- }
- ],
- dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
- ordinal: function(r) {
- var d = r % 10, C = pe(r % 100 / 10) === 1 ? "th" : d === 1 ? "st" : d === 2 ? "nd" : d === 3 ? "rd" : "th";
- return r + C;
- }
- });
- Xt.lang = Pi(
- "moment.lang is deprecated. Use moment.locale instead.",
- Er
- );
- Xt.langData = Pi(
- "moment.langData is deprecated. Use moment.localeData instead.",
- fr
- );
- var sr = Math.abs;
- function Aw() {
- var r = this._data;
- return this._milliseconds = sr(this._milliseconds), this._days = sr(this._days), this._months = sr(this._months), r.milliseconds = sr(r.milliseconds), r.seconds = sr(r.seconds), r.minutes = sr(r.minutes), r.hours = sr(r.hours), r.months = sr(r.months), r.years = sr(r.years), this;
- }
- function $u(r, d, C, o) {
- var y = Yi(d, C);
- return r._milliseconds += o * y._milliseconds, r._days += o * y._days, r._months += o * y._months, r._bubble();
- }
- function Tw(r, d) {
- return $u(this, r, d, 1);
- }
- function Pw(r, d) {
- return $u(this, r, d, -1);
- }
- function Np(r) {
- return r < 0 ? Math.floor(r) : Math.ceil(r);
- }
- function Ew() {
- var r = this._milliseconds, d = this._days, C = this._months, o = this._data, y, N, _, U, G;
- return r >= 0 && d >= 0 && C >= 0 || r <= 0 && d <= 0 && C <= 0 || (r += Np(xl(C) + d) * 864e5, d = 0, C = 0), o.milliseconds = r % 1e3, y = ki(r / 1e3), o.seconds = y % 60, N = ki(y / 60), o.minutes = N % 60, _ = ki(N / 60), o.hours = _ % 24, d += ki(_ / 24), G = ki(Zu(d)), C += G, d -= Np(xl(G)), U = ki(C / 12), C %= 12, o.days = d, o.months = C, o.years = U, this;
- }
- function Zu(r) {
- return r * 4800 / 146097;
- }
- function xl(r) {
- return r * 146097 / 4800;
- }
- function Ow(r) {
- if (!this.isValid())
- return NaN;
- var d, C, o = this._milliseconds;
- if (r = Ei(r), r === "month" || r === "quarter" || r === "year")
- switch (d = this._days + o / 864e5, C = this._months + Zu(d), r) {
- case "month":
- return C;
- case "quarter":
- return C / 3;
- case "year":
- return C / 12;
- }
- else
- switch (d = this._days + Math.round(xl(this._months)), r) {
- case "week":
- return d / 7 + o / 6048e5;
- case "day":
- return d + o / 864e5;
- case "hour":
- return d * 24 + o / 36e5;
- case "minute":
- return d * 1440 + o / 6e4;
- case "second":
- return d * 86400 + o / 1e3;
- case "millisecond":
- return Math.floor(d * 864e5) + o;
- default:
- throw new Error("Unknown unit " + r);
- }
- }
- function gr(r) {
- return function() {
- return this.as(r);
- };
- }
- var Ku = gr("ms"), Lw = gr("s"), _w = gr("m"), Dw = gr("h"), Iw = gr("d"), Rw = gr("w"), Nw = gr("M"), Bw = gr("Q"), jw = gr("y"), Ww = Ku;
- function Yw() {
- return Yi(this);
- }
- function zw(r) {
- return r = Ei(r), this.isValid() ? this[r + "s"]() : NaN;
- }
- function Kr(r) {
- return function() {
- return this.isValid() ? this._data[r] : NaN;
- };
- }
- var Xw = Kr("milliseconds"), Gw = Kr("seconds"), Hw = Kr("minutes"), Fw = Kr("hours"), Uw = Kr("days"), Vw = Kr("months"), $w = Kr("years");
- function Zw() {
- return ki(this.days() / 7);
- }
- var or = Math.round, mn = {
- ss: 44,
- // a few seconds to seconds
- s: 45,
- // seconds to minute
- m: 45,
- // minutes to hour
- h: 22,
- // hours to day
- d: 26,
- // days to month/week
- w: null,
- // weeks to month
- M: 11
- // months to year
- };
- function Kw(r, d, C, o, y) {
- return y.relativeTime(d || 1, !!C, r, o);
- }
- function Jw(r, d, C, o) {
- var y = Yi(r).abs(), N = or(y.as("s")), _ = or(y.as("m")), U = or(y.as("h")), G = or(y.as("d")), V = or(y.as("M")), F = or(y.as("w")), B = or(y.as("y")), j = N <= C.ss && ["s", N] || N < C.s && ["ss", N] || _ <= 1 && ["m"] || _ < C.m && ["mm", _] || U <= 1 && ["h"] || U < C.h && ["hh", U] || G <= 1 && ["d"] || G < C.d && ["dd", G];
- return C.w != null && (j = j || F <= 1 && ["w"] || F < C.w && ["ww", F]), j = j || V <= 1 && ["M"] || V < C.M && ["MM", V] || B <= 1 && ["y"] || ["yy", B], j[2] = d, j[3] = +r > 0, j[4] = o, Kw.apply(null, j);
- }
- function qw(r) {
- return r === void 0 ? or : typeof r == "function" ? (or = r, !0) : !1;
- }
- function Qw(r, d) {
- return mn[r] === void 0 ? !1 : d === void 0 ? mn[r] : (mn[r] = d, r === "s" && (mn.ss = d - 1), !0);
- }
- function tM(r, d) {
- if (!this.isValid())
- return this.localeData().invalidDate();
- var C = !1, o = mn, y, N;
- return typeof r == "object" && (d = r, r = !1), typeof r == "boolean" && (C = r), typeof d == "object" && (o = Object.assign({}, mn, d), d.s != null && d.ss == null && (o.ss = d.s - 1)), y = this.localeData(), N = Jw(this, !C, o, y), C && (N = y.pastFuture(+this, N)), y.postformat(N);
- }
- var sl = Math.abs;
- function fn(r) {
- return (r > 0) - (r < 0) || +r;
- }
- function No() {
- if (!this.isValid())
- return this.localeData().invalidDate();
- var r = sl(this._milliseconds) / 1e3, d = sl(this._days), C = sl(this._months), o, y, N, _, U = this.asSeconds(), G, V, F, B;
- return U ? (o = ki(r / 60), y = ki(o / 60), r %= 60, o %= 60, N = ki(C / 12), C %= 12, _ = r ? r.toFixed(3).replace(/\.?0+$/, "") : "", G = U < 0 ? "-" : "", V = fn(this._months) !== fn(U) ? "-" : "", F = fn(this._days) !== fn(U) ? "-" : "", B = fn(this._milliseconds) !== fn(U) ? "-" : "", G + "P" + (N ? V + N + "Y" : "") + (C ? V + C + "M" : "") + (d ? F + d + "D" : "") + (y || o || r ? "T" : "") + (y ? B + y + "H" : "") + (o ? B + o + "M" : "") + (r ? B + _ + "S" : "")) : "P0D";
- }
- var fe = Io.prototype;
- fe.isValid = Vb;
- fe.abs = Aw;
- fe.add = Tw;
- fe.subtract = Pw;
- fe.as = Ow;
- fe.asMilliseconds = Ku;
- fe.asSeconds = Lw;
- fe.asMinutes = _w;
- fe.asHours = Dw;
- fe.asDays = Iw;
- fe.asWeeks = Rw;
- fe.asMonths = Nw;
- fe.asQuarters = Bw;
- fe.asYears = jw;
- fe.valueOf = Ww;
- fe._bubble = Ew;
- fe.clone = Yw;
- fe.get = zw;
- fe.milliseconds = Xw;
- fe.seconds = Gw;
- fe.minutes = Hw;
- fe.hours = Fw;
- fe.days = Uw;
- fe.weeks = Zw;
- fe.months = Vw;
- fe.years = $w;
- fe.humanize = tM;
- fe.toISOString = No;
- fe.toString = No;
- fe.toJSON = No;
- fe.locale = Bu;
- fe.localeData = Wu;
- fe.toIsoString = Pi(
- "toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",
- No
- );
- fe.lang = ju;
- Zt("X", 0, 0, "unix");
- Zt("x", 0, 0, "valueOf");
- Ft("x", Oo);
- Ft("X", S1);
- we("X", function(r, d, C) {
- C._d = new Date(parseFloat(r) * 1e3);
- });
- we("x", function(r, d, C) {
- C._d = new Date(pe(r));
- });
- //! moment.js
- Xt.version = "2.30.1";
- e1(Te);
- Xt.fn = jt;
- Xt.min = Gb;
- Xt.max = Hb;
- Xt.now = Fb;
- Xt.utc = $i;
- Xt.unix = xw;
- Xt.months = Sw;
- Xt.isDate = as;
- Xt.locale = Er;
- Xt.invalid = Ao;
- Xt.duration = Yi;
- Xt.isMoment = Wi;
- Xt.weekdays = Mw;
- Xt.parseZone = bw;
- Xt.localeData = fr;
- Xt.isDuration = ao;
- Xt.monthsShort = ww;
- Xt.weekdaysMin = kw;
- Xt.defineLocale = Yl;
- Xt.updateLocale = bb;
- Xt.locales = Sb;
- Xt.weekdaysShort = Cw;
- Xt.normalizeUnits = Ei;
- Xt.relativeTimeRounding = qw;
- Xt.relativeTimeThreshold = Qw;
- Xt.calendarFormat = mS;
- Xt.prototype = jt;
- Xt.HTML5_FMT = {
- DATETIME_LOCAL: "YYYY-MM-DDTHH:mm",
- // <input type="datetime-local" />
- DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss",
- // <input type="datetime-local" step="1" />
- DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS",
- // <input type="datetime-local" step="0.001" />
- DATE: "YYYY-MM-DD",
- // <input type="date" />
- TIME: "HH:mm",
- // <input type="time" />
- TIME_SECONDS: "HH:mm:ss",
- // <input type="time" step="1" />
- TIME_MS: "HH:mm:ss.SSS",
- // <input type="time" step="0.001" />
- WEEK: "GGGG-[W]WW",
- // <input type="week" />
- MONTH: "YYYY-MM"
- // <input type="month" />
- };
- var So = { exports: {} };
- /**
- * @license
- * Lodash <https://lodash.com/>
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
- * Released under MIT license <https://lodash.com/license>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
- So.exports;
- (function(r, d) {
- (function() {
- var C, o = "4.17.21", y = 200, N = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", _ = "Expected a function", U = "Invalid `variable` option passed into `_.template`", G = "__lodash_hash_undefined__", V = 500, F = "__lodash_placeholder__", B = 1, j = 2, w = 4, x = 1, f = 2, l = 1, T = 2, O = 4, R = 8, k = 16, b = 32, S = 64, v = 128, h = 256, c = 512, u = 30, i = "...", p = 800, a = 16, t = 1, s = 2, n = 3, P = 1 / 0, D = 9007199254740991, I = 17976931348623157e292, W = 0 / 0, E = 4294967295, X = E - 1, g = E >>> 1, m = [
- ["ary", v],
- ["bind", l],
- ["bindKey", T],
- ["curry", R],
- ["curryRight", k],
- ["flip", c],
- ["partial", b],
- ["partialRight", S],
- ["rearg", h]
- ], L = "[object Arguments]", z = "[object Array]", $ = "[object AsyncFunction]", Q = "[object Boolean]", A = "[object Date]", H = "[object DOMException]", Y = "[object Error]", Z = "[object Function]", q = "[object GeneratorFunction]", it = "[object Map]", et = "[object Number]", nt = "[object Null]", rt = "[object Object]", ct = "[object Promise]", gt = "[object Proxy]", dt = "[object RegExp]", ht = "[object Set]", at = "[object String]", J = "[object Symbol]", tt = "[object Undefined]", ot = "[object WeakMap]", lt = "[object WeakSet]", pt = "[object ArrayBuffer]", yt = "[object DataView]", vt = "[object Float32Array]", Ct = "[object Float64Array]", Pt = "[object Int8Array]", At = "[object Int16Array]", St = "[object Int32Array]", Dt = "[object Uint8Array]", _t = "[object Uint8ClampedArray]", Nt = "[object Uint16Array]", Ot = "[object Uint32Array]", Kt = /\b__p \+= '';/g, Gt = /\b(__p \+=) '' \+/g, Wt = /(__e\(.*?\)|\b__t\)) \+\n'';/g, Jt = /&(?:amp|lt|gt|quot|#39);/g, be = /[&<>"']/g, Yt = RegExp(Jt.source), Vt = RegExp(be.source), Me = /<%-([\s\S]+?)%>/g, Or = /<%([\s\S]+?)%>/g, us = /<%=([\s\S]+?)%>/g, En = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, On = /^\w*$/, $e = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Ln = /[\\^$.*+?()[\]{}|]/g, _n = RegExp(Ln.source), Jr = /^\s+/, ds = /\s/, Go = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, Lr = /\{\n\/\* \[wrapped with (.+)\] \*/, Xi = /,? & /, fs = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, Dn = /[()=,{}\[\]\/\s]/, _r = /\\(\\)?/g, $t = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g, de = /\w*$/, ge = /^[-+]0x[0-9a-f]+$/i, Re = /^0b[01]+$/i, De = /^\[object .+?Constructor\]$/, qr = /^0o[0-7]+$/i, Od = /^(?:0|[1-9]\d*)$/, Ld = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, gs = /($^)/, _d = /['\n\r\u2028\u2029\\]/g, ms = "\\ud800-\\udfff", Dd = "\\u0300-\\u036f", Id = "\\ufe20-\\ufe2f", Rd = "\\u20d0-\\u20ff", sh = Dd + Id + Rd, oh = "\\u2700-\\u27bf", ah = "a-z\\xdf-\\xf6\\xf8-\\xff", Nd = "\\xac\\xb1\\xd7\\xf7", Bd = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", jd = "\\u2000-\\u206f", Wd = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", lh = "A-Z\\xc0-\\xd6\\xd8-\\xde", hh = "\\ufe0e\\ufe0f", ch = Nd + Bd + jd + Wd, Ho = "['’]", Yd = "[" + ms + "]", ph = "[" + ch + "]", ys = "[" + sh + "]", uh = "\\d+", zd = "[" + oh + "]", dh = "[" + ah + "]", fh = "[^" + ms + ch + uh + oh + ah + lh + "]", Fo = "\\ud83c[\\udffb-\\udfff]", Xd = "(?:" + ys + "|" + Fo + ")", gh = "[^" + ms + "]", Uo = "(?:\\ud83c[\\udde6-\\uddff]){2}", Vo = "[\\ud800-\\udbff][\\udc00-\\udfff]", Qr = "[" + lh + "]", mh = "\\u200d", yh = "(?:" + dh + "|" + fh + ")", Gd = "(?:" + Qr + "|" + fh + ")", vh = "(?:" + Ho + "(?:d|ll|m|re|s|t|ve))?", xh = "(?:" + Ho + "(?:D|LL|M|RE|S|T|VE))?", bh = Xd + "?", Sh = "[" + hh + "]?", Hd = "(?:" + mh + "(?:" + [gh, Uo, Vo].join("|") + ")" + Sh + bh + ")*", Fd = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Ud = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", wh = Sh + bh + Hd, Vd = "(?:" + [zd, Uo, Vo].join("|") + ")" + wh, $d = "(?:" + [gh + ys + "?", ys, Uo, Vo, Yd].join("|") + ")", Zd = RegExp(Ho, "g"), Kd = RegExp(ys, "g"), $o = RegExp(Fo + "(?=" + Fo + ")|" + $d + wh, "g"), Jd = RegExp([
- Qr + "?" + dh + "+" + vh + "(?=" + [ph, Qr, "$"].join("|") + ")",
- Gd + "+" + xh + "(?=" + [ph, Qr + yh, "$"].join("|") + ")",
- Qr + "?" + yh + "+" + vh,
- Qr + "+" + xh,
- Ud,
- Fd,
- uh,
- Vd
- ].join("|"), "g"), qd = RegExp("[" + mh + ms + sh + hh + "]"), Qd = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, tf = [
- "Array",
- "Buffer",
- "DataView",
- "Date",
- "Error",
- "Float32Array",
- "Float64Array",
- "Function",
- "Int8Array",
- "Int16Array",
- "Int32Array",
- "Map",
- "Math",
- "Object",
- "Promise",
- "RegExp",
- "Set",
- "String",
- "Symbol",
- "TypeError",
- "Uint8Array",
- "Uint8ClampedArray",
- "Uint16Array",
- "Uint32Array",
- "WeakMap",
- "_",
- "clearTimeout",
- "isFinite",
- "parseInt",
- "setTimeout"
- ], ef = -1, Ae = {};
- Ae[vt] = Ae[Ct] = Ae[Pt] = Ae[At] = Ae[St] = Ae[Dt] = Ae[_t] = Ae[Nt] = Ae[Ot] = !0, Ae[L] = Ae[z] = Ae[pt] = Ae[Q] = Ae[yt] = Ae[A] = Ae[Y] = Ae[Z] = Ae[it] = Ae[et] = Ae[rt] = Ae[dt] = Ae[ht] = Ae[at] = Ae[ot] = !1;
- var ke = {};
- ke[L] = ke[z] = ke[pt] = ke[yt] = ke[Q] = ke[A] = ke[vt] = ke[Ct] = ke[Pt] = ke[At] = ke[St] = ke[it] = ke[et] = ke[rt] = ke[dt] = ke[ht] = ke[at] = ke[J] = ke[Dt] = ke[_t] = ke[Nt] = ke[Ot] = !0, ke[Y] = ke[Z] = ke[ot] = !1;
- var rf = {
- // Latin-1 Supplement block.
- À: "A",
- Á: "A",
- Â: "A",
- Ã: "A",
- Ä: "A",
- Å: "A",
- à: "a",
- á: "a",
- â: "a",
- ã: "a",
- ä: "a",
- å: "a",
- Ç: "C",
- ç: "c",
- Ð: "D",
- ð: "d",
- È: "E",
- É: "E",
- Ê: "E",
- Ë: "E",
- è: "e",
- é: "e",
- ê: "e",
- ë: "e",
- Ì: "I",
- Í: "I",
- Î: "I",
- Ï: "I",
- ì: "i",
- í: "i",
- î: "i",
- ï: "i",
- Ñ: "N",
- ñ: "n",
- Ò: "O",
- Ó: "O",
- Ô: "O",
- Õ: "O",
- Ö: "O",
- Ø: "O",
- ò: "o",
- ó: "o",
- ô: "o",
- õ: "o",
- ö: "o",
- ø: "o",
- Ù: "U",
- Ú: "U",
- Û: "U",
- Ü: "U",
- ù: "u",
- ú: "u",
- û: "u",
- ü: "u",
- Ý: "Y",
- ý: "y",
- ÿ: "y",
- Æ: "Ae",
- æ: "ae",
- Þ: "Th",
- þ: "th",
- ß: "ss",
- // Latin Extended-A block.
- Ā: "A",
- Ă: "A",
- Ą: "A",
- ā: "a",
- ă: "a",
- ą: "a",
- Ć: "C",
- Ĉ: "C",
- Ċ: "C",
- Č: "C",
- ć: "c",
- ĉ: "c",
- ċ: "c",
- č: "c",
- Ď: "D",
- Đ: "D",
- ď: "d",
- đ: "d",
- Ē: "E",
- Ĕ: "E",
- Ė: "E",
- Ę: "E",
- Ě: "E",
- ē: "e",
- ĕ: "e",
- ė: "e",
- ę: "e",
- ě: "e",
- Ĝ: "G",
- Ğ: "G",
- Ġ: "G",
- Ģ: "G",
- ĝ: "g",
- ğ: "g",
- ġ: "g",
- ģ: "g",
- Ĥ: "H",
- Ħ: "H",
- ĥ: "h",
- ħ: "h",
- Ĩ: "I",
- Ī: "I",
- Ĭ: "I",
- Į: "I",
- İ: "I",
- ĩ: "i",
- ī: "i",
- ĭ: "i",
- į: "i",
- ı: "i",
- Ĵ: "J",
- ĵ: "j",
- Ķ: "K",
- ķ: "k",
- ĸ: "k",
- Ĺ: "L",
- Ļ: "L",
- Ľ: "L",
- Ŀ: "L",
- Ł: "L",
- ĺ: "l",
- ļ: "l",
- ľ: "l",
- ŀ: "l",
- ł: "l",
- Ń: "N",
- Ņ: "N",
- Ň: "N",
- Ŋ: "N",
- ń: "n",
- ņ: "n",
- ň: "n",
- ŋ: "n",
- Ō: "O",
- Ŏ: "O",
- Ő: "O",
- ō: "o",
- ŏ: "o",
- ő: "o",
- Ŕ: "R",
- Ŗ: "R",
- Ř: "R",
- ŕ: "r",
- ŗ: "r",
- ř: "r",
- Ś: "S",
- Ŝ: "S",
- Ş: "S",
- Š: "S",
- ś: "s",
- ŝ: "s",
- ş: "s",
- š: "s",
- Ţ: "T",
- Ť: "T",
- Ŧ: "T",
- ţ: "t",
- ť: "t",
- ŧ: "t",
- Ũ: "U",
- Ū: "U",
- Ŭ: "U",
- Ů: "U",
- Ű: "U",
- Ų: "U",
- ũ: "u",
- ū: "u",
- ŭ: "u",
- ů: "u",
- ű: "u",
- ų: "u",
- Ŵ: "W",
- ŵ: "w",
- Ŷ: "Y",
- ŷ: "y",
- Ÿ: "Y",
- Ź: "Z",
- Ż: "Z",
- Ž: "Z",
- ź: "z",
- ż: "z",
- ž: "z",
- IJ: "IJ",
- ij: "ij",
- Œ: "Oe",
- œ: "oe",
- ʼn: "'n",
- ſ: "s"
- }, nf = {
- "&": "&",
- "<": "<",
- ">": ">",
- '"': """,
- "'": "'"
- }, sf = {
- "&": "&",
- "<": "<",
- ">": ">",
- """: '"',
- "'": "'"
- }, of = {
- "\\": "\\",
- "'": "'",
- "\n": "n",
- "\r": "r",
- "\u2028": "u2028",
- "\u2029": "u2029"
- }, af = parseFloat, lf = parseInt, Mh = typeof Gr == "object" && Gr && Gr.Object === Object && Gr, hf = typeof self == "object" && self && self.Object === Object && self, Ue = Mh || hf || Function("return this")(), Zo = d && !d.nodeType && d, Dr = Zo && !0 && r && !r.nodeType && r, Ch = Dr && Dr.exports === Zo, Ko = Ch && Mh.process, yi = function() {
- try {
- var wt = Dr && Dr.require && Dr.require("util").types;
- return wt || Ko && Ko.binding && Ko.binding("util");
- } catch {
- }
- }(), kh = yi && yi.isArrayBuffer, Ah = yi && yi.isDate, Th = yi && yi.isMap, Ph = yi && yi.isRegExp, Eh = yi && yi.isSet, Oh = yi && yi.isTypedArray;
- function hi(wt, Lt, Tt) {
- switch (Tt.length) {
- case 0:
- return wt.call(Lt);
- case 1:
- return wt.call(Lt, Tt[0]);
- case 2:
- return wt.call(Lt, Tt[0], Tt[1]);
- case 3:
- return wt.call(Lt, Tt[0], Tt[1], Tt[2]);
- }
- return wt.apply(Lt, Tt);
- }
- function cf(wt, Lt, Tt, Ht) {
- for (var ee = -1, ve = wt == null ? 0 : wt.length; ++ee < ve; ) {
- var ze = wt[ee];
- Lt(Ht, ze, Tt(ze), wt);
- }
- return Ht;
- }
- function vi(wt, Lt) {
- for (var Tt = -1, Ht = wt == null ? 0 : wt.length; ++Tt < Ht && Lt(wt[Tt], Tt, wt) !== !1; )
- ;
- return wt;
- }
- function pf(wt, Lt) {
- for (var Tt = wt == null ? 0 : wt.length; Tt-- && Lt(wt[Tt], Tt, wt) !== !1; )
- ;
- return wt;
- }
- function Lh(wt, Lt) {
- for (var Tt = -1, Ht = wt == null ? 0 : wt.length; ++Tt < Ht; )
- if (!Lt(wt[Tt], Tt, wt))
- return !1;
- return !0;
- }
- function mr(wt, Lt) {
- for (var Tt = -1, Ht = wt == null ? 0 : wt.length, ee = 0, ve = []; ++Tt < Ht; ) {
- var ze = wt[Tt];
- Lt(ze, Tt, wt) && (ve[ee++] = ze);
- }
- return ve;
- }
- function vs(wt, Lt) {
- var Tt = wt == null ? 0 : wt.length;
- return !!Tt && tn(wt, Lt, 0) > -1;
- }
- function Jo(wt, Lt, Tt) {
- for (var Ht = -1, ee = wt == null ? 0 : wt.length; ++Ht < ee; )
- if (Tt(Lt, wt[Ht]))
- return !0;
- return !1;
- }
- function Ee(wt, Lt) {
- for (var Tt = -1, Ht = wt == null ? 0 : wt.length, ee = Array(Ht); ++Tt < Ht; )
- ee[Tt] = Lt(wt[Tt], Tt, wt);
- return ee;
- }
- function yr(wt, Lt) {
- for (var Tt = -1, Ht = Lt.length, ee = wt.length; ++Tt < Ht; )
- wt[ee + Tt] = Lt[Tt];
- return wt;
- }
- function qo(wt, Lt, Tt, Ht) {
- var ee = -1, ve = wt == null ? 0 : wt.length;
- for (Ht && ve && (Tt = wt[++ee]); ++ee < ve; )
- Tt = Lt(Tt, wt[ee], ee, wt);
- return Tt;
- }
- function uf(wt, Lt, Tt, Ht) {
- var ee = wt == null ? 0 : wt.length;
- for (Ht && ee && (Tt = wt[--ee]); ee--; )
- Tt = Lt(Tt, wt[ee], ee, wt);
- return Tt;
- }
- function Qo(wt, Lt) {
- for (var Tt = -1, Ht = wt == null ? 0 : wt.length; ++Tt < Ht; )
- if (Lt(wt[Tt], Tt, wt))
- return !0;
- return !1;
- }
- var df = ta("length");
- function ff(wt) {
- return wt.split("");
- }
- function gf(wt) {
- return wt.match(fs) || [];
- }
- function _h(wt, Lt, Tt) {
- var Ht;
- return Tt(wt, function(ee, ve, ze) {
- if (Lt(ee, ve, ze))
- return Ht = ve, !1;
- }), Ht;
- }
- function xs(wt, Lt, Tt, Ht) {
- for (var ee = wt.length, ve = Tt + (Ht ? 1 : -1); Ht ? ve-- : ++ve < ee; )
- if (Lt(wt[ve], ve, wt))
- return ve;
- return -1;
- }
- function tn(wt, Lt, Tt) {
- return Lt === Lt ? Tf(wt, Lt, Tt) : xs(wt, Dh, Tt);
- }
- function mf(wt, Lt, Tt, Ht) {
- for (var ee = Tt - 1, ve = wt.length; ++ee < ve; )
- if (Ht(wt[ee], Lt))
- return ee;
- return -1;
- }
- function Dh(wt) {
- return wt !== wt;
- }
- function Ih(wt, Lt) {
- var Tt = wt == null ? 0 : wt.length;
- return Tt ? ia(wt, Lt) / Tt : W;
- }
- function ta(wt) {
- return function(Lt) {
- return Lt == null ? C : Lt[wt];
- };
- }
- function ea(wt) {
- return function(Lt) {
- return wt == null ? C : wt[Lt];
- };
- }
- function Rh(wt, Lt, Tt, Ht, ee) {
- return ee(wt, function(ve, ze, Ce) {
- Tt = Ht ? (Ht = !1, ve) : Lt(Tt, ve, ze, Ce);
- }), Tt;
- }
- function yf(wt, Lt) {
- var Tt = wt.length;
- for (wt.sort(Lt); Tt--; )
- wt[Tt] = wt[Tt].value;
- return wt;
- }
- function ia(wt, Lt) {
- for (var Tt, Ht = -1, ee = wt.length; ++Ht < ee; ) {
- var ve = Lt(wt[Ht]);
- ve !== C && (Tt = Tt === C ? ve : Tt + ve);
- }
- return Tt;
- }
- function ra(wt, Lt) {
- for (var Tt = -1, Ht = Array(wt); ++Tt < wt; )
- Ht[Tt] = Lt(Tt);
- return Ht;
- }
- function vf(wt, Lt) {
- return Ee(Lt, function(Tt) {
- return [Tt, wt[Tt]];
- });
- }
- function Nh(wt) {
- return wt && wt.slice(0, Yh(wt) + 1).replace(Jr, "");
- }
- function ci(wt) {
- return function(Lt) {
- return wt(Lt);
- };
- }
- function na(wt, Lt) {
- return Ee(Lt, function(Tt) {
- return wt[Tt];
- });
- }
- function In(wt, Lt) {
- return wt.has(Lt);
- }
- function Bh(wt, Lt) {
- for (var Tt = -1, Ht = wt.length; ++Tt < Ht && tn(Lt, wt[Tt], 0) > -1; )
- ;
- return Tt;
- }
- function jh(wt, Lt) {
- for (var Tt = wt.length; Tt-- && tn(Lt, wt[Tt], 0) > -1; )
- ;
- return Tt;
- }
- function xf(wt, Lt) {
- for (var Tt = wt.length, Ht = 0; Tt--; )
- wt[Tt] === Lt && ++Ht;
- return Ht;
- }
- var bf = ea(rf), Sf = ea(nf);
- function wf(wt) {
- return "\\" + of[wt];
- }
- function Mf(wt, Lt) {
- return wt == null ? C : wt[Lt];
- }
- function en(wt) {
- return qd.test(wt);
- }
- function Cf(wt) {
- return Qd.test(wt);
- }
- function kf(wt) {
- for (var Lt, Tt = []; !(Lt = wt.next()).done; )
- Tt.push(Lt.value);
- return Tt;
- }
- function sa(wt) {
- var Lt = -1, Tt = Array(wt.size);
- return wt.forEach(function(Ht, ee) {
- Tt[++Lt] = [ee, Ht];
- }), Tt;
- }
- function Wh(wt, Lt) {
- return function(Tt) {
- return wt(Lt(Tt));
- };
- }
- function vr(wt, Lt) {
- for (var Tt = -1, Ht = wt.length, ee = 0, ve = []; ++Tt < Ht; ) {
- var ze = wt[Tt];
- (ze === Lt || ze === F) && (wt[Tt] = F, ve[ee++] = Tt);
- }
- return ve;
- }
- function bs(wt) {
- var Lt = -1, Tt = Array(wt.size);
- return wt.forEach(function(Ht) {
- Tt[++Lt] = Ht;
- }), Tt;
- }
- function Af(wt) {
- var Lt = -1, Tt = Array(wt.size);
- return wt.forEach(function(Ht) {
- Tt[++Lt] = [Ht, Ht];
- }), Tt;
- }
- function Tf(wt, Lt, Tt) {
- for (var Ht = Tt - 1, ee = wt.length; ++Ht < ee; )
- if (wt[Ht] === Lt)
- return Ht;
- return -1;
- }
- function Pf(wt, Lt, Tt) {
- for (var Ht = Tt + 1; Ht--; )
- if (wt[Ht] === Lt)
- return Ht;
- return Ht;
- }
- function rn(wt) {
- return en(wt) ? Of(wt) : df(wt);
- }
- function Oi(wt) {
- return en(wt) ? Lf(wt) : ff(wt);
- }
- function Yh(wt) {
- for (var Lt = wt.length; Lt-- && ds.test(wt.charAt(Lt)); )
- ;
- return Lt;
- }
- var Ef = ea(sf);
- function Of(wt) {
- for (var Lt = $o.lastIndex = 0; $o.test(wt); )
- ++Lt;
- return Lt;
- }
- function Lf(wt) {
- return wt.match($o) || [];
- }
- function _f(wt) {
- return wt.match(Jd) || [];
- }
- var Df = function wt(Lt) {
- Lt = Lt == null ? Ue : nn.defaults(Ue.Object(), Lt, nn.pick(Ue, tf));
- var Tt = Lt.Array, Ht = Lt.Date, ee = Lt.Error, ve = Lt.Function, ze = Lt.Math, Ce = Lt.Object, oa = Lt.RegExp, If = Lt.String, xi = Lt.TypeError, Ss = Tt.prototype, Rf = ve.prototype, sn = Ce.prototype, ws = Lt["__core-js_shared__"], Ms = Rf.toString, Se = sn.hasOwnProperty, Nf = 0, zh = function() {
- var e = /[^.]+$/.exec(ws && ws.keys && ws.keys.IE_PROTO || "");
- return e ? "Symbol(src)_1." + e : "";
- }(), Cs = sn.toString, Bf = Ms.call(Ce), jf = Ue._, Wf = oa(
- "^" + Ms.call(Se).replace(Ln, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
- ), ks = Ch ? Lt.Buffer : C, xr = Lt.Symbol, As = Lt.Uint8Array, Xh = ks ? ks.allocUnsafe : C, Ts = Wh(Ce.getPrototypeOf, Ce), Gh = Ce.create, Hh = sn.propertyIsEnumerable, Ps = Ss.splice, Fh = xr ? xr.isConcatSpreadable : C, Rn = xr ? xr.iterator : C, Ir = xr ? xr.toStringTag : C, Es = function() {
- try {
- var e = Wr(Ce, "defineProperty");
- return e({}, "", {}), e;
- } catch {
- }
- }(), Yf = Lt.clearTimeout !== Ue.clearTimeout && Lt.clearTimeout, zf = Ht && Ht.now !== Ue.Date.now && Ht.now, Xf = Lt.setTimeout !== Ue.setTimeout && Lt.setTimeout, Os = ze.ceil, Ls = ze.floor, aa = Ce.getOwnPropertySymbols, Gf = ks ? ks.isBuffer : C, Uh = Lt.isFinite, Hf = Ss.join, Ff = Wh(Ce.keys, Ce), Xe = ze.max, Ze = ze.min, Uf = Ht.now, Vf = Lt.parseInt, Vh = ze.random, $f = Ss.reverse, la = Wr(Lt, "DataView"), Nn = Wr(Lt, "Map"), ha = Wr(Lt, "Promise"), on = Wr(Lt, "Set"), Bn = Wr(Lt, "WeakMap"), jn = Wr(Ce, "create"), _s = Bn && new Bn(), an = {}, Zf = Yr(la), Kf = Yr(Nn), Jf = Yr(ha), qf = Yr(on), Qf = Yr(Bn), Ds = xr ? xr.prototype : C, Wn = Ds ? Ds.valueOf : C, $h = Ds ? Ds.toString : C;
- function ft(e) {
- if (Ne(e) && !ie(e) && !(e instanceof ce)) {
- if (e instanceof bi)
- return e;
- if (Se.call(e, "__wrapped__"))
- return Zc(e);
- }
- return new bi(e);
- }
- var ln = function() {
- function e() {
- }
- return function(M) {
- if (!Ie(M))
- return {};
- if (Gh)
- return Gh(M);
- e.prototype = M;
- var K = new e();
- return e.prototype = C, K;
- };
- }();
- function Is() {
- }
- function bi(e, M) {
- this.__wrapped__ = e, this.__actions__ = [], this.__chain__ = !!M, this.__index__ = 0, this.__values__ = C;
- }
- ft.templateSettings = {
- /**
- * Used to detect `data` property values to be HTML-escaped.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- escape: Me,
- /**
- * Used to detect code to be evaluated.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- evaluate: Or,
- /**
- * Used to detect `data` property values to inject.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- interpolate: us,
- /**
- * Used to reference the data object in the template text.
- *
- * @memberOf _.templateSettings
- * @type {string}
- */
- variable: "",
- /**
- * Used to import variables into the compiled template.
- *
- * @memberOf _.templateSettings
- * @type {Object}
- */
- imports: {
- /**
- * A reference to the `lodash` function.
- *
- * @memberOf _.templateSettings.imports
- * @type {Function}
- */
- _: ft
- }
- }, ft.prototype = Is.prototype, ft.prototype.constructor = ft, bi.prototype = ln(Is.prototype), bi.prototype.constructor = bi;
- function ce(e) {
- this.__wrapped__ = e, this.__actions__ = [], this.__dir__ = 1, this.__filtered__ = !1, this.__iteratees__ = [], this.__takeCount__ = E, this.__views__ = [];
- }
- function tg() {
- var e = new ce(this.__wrapped__);
- return e.__actions__ = ri(this.__actions__), e.__dir__ = this.__dir__, e.__filtered__ = this.__filtered__, e.__iteratees__ = ri(this.__iteratees__), e.__takeCount__ = this.__takeCount__, e.__views__ = ri(this.__views__), e;
- }
- function eg() {
- if (this.__filtered__) {
- var e = new ce(this);
- e.__dir__ = -1, e.__filtered__ = !0;
- } else
- e = this.clone(), e.__dir__ *= -1;
- return e;
- }
- function ig() {
- var e = this.__wrapped__.value(), M = this.__dir__, K = ie(e), st = M < 0, ut = K ? e.length : 0, mt = fm(0, ut, this.__views__), xt = mt.start, bt = mt.end, Mt = bt - xt, It = st ? bt : xt - 1, Rt = this.__iteratees__, Bt = Rt.length, zt = 0, Ut = Ze(Mt, this.__takeCount__);
- if (!K || !st && ut == Mt && Ut == Mt)
- return vc(e, this.__actions__);
- var Qt = [];
- t:
- for (; Mt-- && zt < Ut; ) {
- It += M;
- for (var ae = -1, te = e[It]; ++ae < Bt; ) {
- var he = Rt[ae], ue = he.iteratee, di = he.type, ii = ue(te);
- if (di == s)
- te = ii;
- else if (!ii) {
- if (di == t)
- continue t;
- break t;
- }
- }
- Qt[zt++] = te;
- }
- return Qt;
- }
- ce.prototype = ln(Is.prototype), ce.prototype.constructor = ce;
- function Rr(e) {
- var M = -1, K = e == null ? 0 : e.length;
- for (this.clear(); ++M < K; ) {
- var st = e[M];
- this.set(st[0], st[1]);
- }
- }
- function rg() {
- this.__data__ = jn ? jn(null) : {}, this.size = 0;
- }
- function ng(e) {
- var M = this.has(e) && delete this.__data__[e];
- return this.size -= M ? 1 : 0, M;
- }
- function sg(e) {
- var M = this.__data__;
- if (jn) {
- var K = M[e];
- return K === G ? C : K;
- }
- return Se.call(M, e) ? M[e] : C;
- }
- function og(e) {
- var M = this.__data__;
- return jn ? M[e] !== C : Se.call(M, e);
- }
- function ag(e, M) {
- var K = this.__data__;
- return this.size += this.has(e) ? 0 : 1, K[e] = jn && M === C ? G : M, this;
- }
- Rr.prototype.clear = rg, Rr.prototype.delete = ng, Rr.prototype.get = sg, Rr.prototype.has = og, Rr.prototype.set = ag;
- function Ki(e) {
- var M = -1, K = e == null ? 0 : e.length;
- for (this.clear(); ++M < K; ) {
- var st = e[M];
- this.set(st[0], st[1]);
- }
- }
- function lg() {
- this.__data__ = [], this.size = 0;
- }
- function hg(e) {
- var M = this.__data__, K = Rs(M, e);
- if (K < 0)
- return !1;
- var st = M.length - 1;
- return K == st ? M.pop() : Ps.call(M, K, 1), --this.size, !0;
- }
- function cg(e) {
- var M = this.__data__, K = Rs(M, e);
- return K < 0 ? C : M[K][1];
- }
- function pg(e) {
- return Rs(this.__data__, e) > -1;
- }
- function ug(e, M) {
- var K = this.__data__, st = Rs(K, e);
- return st < 0 ? (++this.size, K.push([e, M])) : K[st][1] = M, this;
- }
- Ki.prototype.clear = lg, Ki.prototype.delete = hg, Ki.prototype.get = cg, Ki.prototype.has = pg, Ki.prototype.set = ug;
- function Ji(e) {
- var M = -1, K = e == null ? 0 : e.length;
- for (this.clear(); ++M < K; ) {
- var st = e[M];
- this.set(st[0], st[1]);
- }
- }
- function dg() {
- this.size = 0, this.__data__ = {
- hash: new Rr(),
- map: new (Nn || Ki)(),
- string: new Rr()
- };
- }
- function fg(e) {
- var M = Vs(this, e).delete(e);
- return this.size -= M ? 1 : 0, M;
- }
- function gg(e) {
- return Vs(this, e).get(e);
- }
- function mg(e) {
- return Vs(this, e).has(e);
- }
- function yg(e, M) {
- var K = Vs(this, e), st = K.size;
- return K.set(e, M), this.size += K.size == st ? 0 : 1, this;
- }
- Ji.prototype.clear = dg, Ji.prototype.delete = fg, Ji.prototype.get = gg, Ji.prototype.has = mg, Ji.prototype.set = yg;
- function Nr(e) {
- var M = -1, K = e == null ? 0 : e.length;
- for (this.__data__ = new Ji(); ++M < K; )
- this.add(e[M]);
- }
- function vg(e) {
- return this.__data__.set(e, G), this;
- }
- function xg(e) {
- return this.__data__.has(e);
- }
- Nr.prototype.add = Nr.prototype.push = vg, Nr.prototype.has = xg;
- function Li(e) {
- var M = this.__data__ = new Ki(e);
- this.size = M.size;
- }
- function bg() {
- this.__data__ = new Ki(), this.size = 0;
- }
- function Sg(e) {
- var M = this.__data__, K = M.delete(e);
- return this.size = M.size, K;
- }
- function wg(e) {
- return this.__data__.get(e);
- }
- function Mg(e) {
- return this.__data__.has(e);
- }
- function Cg(e, M) {
- var K = this.__data__;
- if (K instanceof Ki) {
- var st = K.__data__;
- if (!Nn || st.length < y - 1)
- return st.push([e, M]), this.size = ++K.size, this;
- K = this.__data__ = new Ji(st);
- }
- return K.set(e, M), this.size = K.size, this;
- }
- Li.prototype.clear = bg, Li.prototype.delete = Sg, Li.prototype.get = wg, Li.prototype.has = Mg, Li.prototype.set = Cg;
- function Zh(e, M) {
- var K = ie(e), st = !K && zr(e), ut = !K && !st && Cr(e), mt = !K && !st && !ut && un(e), xt = K || st || ut || mt, bt = xt ? ra(e.length, If) : [], Mt = bt.length;
- for (var It in e)
- (M || Se.call(e, It)) && !(xt && // Safari 9 has enumerable `arguments.length` in strict mode.
- (It == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
- ut && (It == "offset" || It == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
- mt && (It == "buffer" || It == "byteLength" || It == "byteOffset") || // Skip index properties.
- er(It, Mt))) && bt.push(It);
- return bt;
- }
- function Kh(e) {
- var M = e.length;
- return M ? e[ba(0, M - 1)] : C;
- }
- function kg(e, M) {
- return $s(ri(e), Br(M, 0, e.length));
- }
- function Ag(e) {
- return $s(ri(e));
- }
- function ca(e, M, K) {
- (K !== C && !_i(e[M], K) || K === C && !(M in e)) && qi(e, M, K);
- }
- function Yn(e, M, K) {
- var st = e[M];
- (!(Se.call(e, M) && _i(st, K)) || K === C && !(M in e)) && qi(e, M, K);
- }
- function Rs(e, M) {
- for (var K = e.length; K--; )
- if (_i(e[K][0], M))
- return K;
- return -1;
- }
- function Tg(e, M, K, st) {
- return br(e, function(ut, mt, xt) {
- M(st, ut, K(ut), xt);
- }), st;
- }
- function Jh(e, M) {
- return e && Hi(M, He(M), e);
- }
- function Pg(e, M) {
- return e && Hi(M, si(M), e);
- }
- function qi(e, M, K) {
- M == "__proto__" && Es ? Es(e, M, {
- configurable: !0,
- enumerable: !0,
- value: K,
- writable: !0
- }) : e[M] = K;
- }
- function pa(e, M) {
- for (var K = -1, st = M.length, ut = Tt(st), mt = e == null; ++K < st; )
- ut[K] = mt ? C : Fa(e, M[K]);
- return ut;
- }
- function Br(e, M, K) {
- return e === e && (K !== C && (e = e <= K ? e : K), M !== C && (e = e >= M ? e : M)), e;
- }
- function Si(e, M, K, st, ut, mt) {
- var xt, bt = M & B, Mt = M & j, It = M & w;
- if (K && (xt = ut ? K(e, st, ut, mt) : K(e)), xt !== C)
- return xt;
- if (!Ie(e))
- return e;
- var Rt = ie(e);
- if (Rt) {
- if (xt = mm(e), !bt)
- return ri(e, xt);
- } else {
- var Bt = Ke(e), zt = Bt == Z || Bt == q;
- if (Cr(e))
- return Sc(e, bt);
- if (Bt == rt || Bt == L || zt && !ut) {
- if (xt = Mt || zt ? {} : Yc(e), !bt)
- return Mt ? sm(e, Pg(xt, e)) : nm(e, Jh(xt, e));
- } else {
- if (!ke[Bt])
- return ut ? e : {};
- xt = ym(e, Bt, bt);
- }
- }
- mt || (mt = new Li());
- var Ut = mt.get(e);
- if (Ut)
- return Ut;
- mt.set(e, xt), gp(e) ? e.forEach(function(te) {
- xt.add(Si(te, M, K, te, e, mt));
- }) : dp(e) && e.forEach(function(te, he) {
- xt.set(he, Si(te, M, K, he, e, mt));
- });
- var Qt = It ? Mt ? La : Oa : Mt ? si : He, ae = Rt ? C : Qt(e);
- return vi(ae || e, function(te, he) {
- ae && (he = te, te = e[he]), Yn(xt, he, Si(te, M, K, he, e, mt));
- }), xt;
- }
- function Eg(e) {
- var M = He(e);
- return function(K) {
- return qh(K, e, M);
- };
- }
- function qh(e, M, K) {
- var st = K.length;
- if (e == null)
- return !st;
- for (e = Ce(e); st--; ) {
- var ut = K[st], mt = M[ut], xt = e[ut];
- if (xt === C && !(ut in e) || !mt(xt))
- return !1;
- }
- return !0;
- }
- function Qh(e, M, K) {
- if (typeof e != "function")
- throw new xi(_);
- return Vn(function() {
- e.apply(C, K);
- }, M);
- }
- function zn(e, M, K, st) {
- var ut = -1, mt = vs, xt = !0, bt = e.length, Mt = [], It = M.length;
- if (!bt)
- return Mt;
- K && (M = Ee(M, ci(K))), st ? (mt = Jo, xt = !1) : M.length >= y && (mt = In, xt = !1, M = new Nr(M));
- t:
- for (; ++ut < bt; ) {
- var Rt = e[ut], Bt = K == null ? Rt : K(Rt);
- if (Rt = st || Rt !== 0 ? Rt : 0, xt && Bt === Bt) {
- for (var zt = It; zt--; )
- if (M[zt] === Bt)
- continue t;
- Mt.push(Rt);
- } else
- mt(M, Bt, st) || Mt.push(Rt);
- }
- return Mt;
- }
- var br = Ac(Gi), tc = Ac(da, !0);
- function Og(e, M) {
- var K = !0;
- return br(e, function(st, ut, mt) {
- return K = !!M(st, ut, mt), K;
- }), K;
- }
- function Ns(e, M, K) {
- for (var st = -1, ut = e.length; ++st < ut; ) {
- var mt = e[st], xt = M(mt);
- if (xt != null && (bt === C ? xt === xt && !ui(xt) : K(xt, bt)))
- var bt = xt, Mt = mt;
- }
- return Mt;
- }
- function Lg(e, M, K, st) {
- var ut = e.length;
- for (K = se(K), K < 0 && (K = -K > ut ? 0 : ut + K), st = st === C || st > ut ? ut : se(st), st < 0 && (st += ut), st = K > st ? 0 : yp(st); K < st; )
- e[K++] = M;
- return e;
- }
- function ec(e, M) {
- var K = [];
- return br(e, function(st, ut, mt) {
- M(st, ut, mt) && K.push(st);
- }), K;
- }
- function Ve(e, M, K, st, ut) {
- var mt = -1, xt = e.length;
- for (K || (K = xm), ut || (ut = []); ++mt < xt; ) {
- var bt = e[mt];
- M > 0 && K(bt) ? M > 1 ? Ve(bt, M - 1, K, st, ut) : yr(ut, bt) : st || (ut[ut.length] = bt);
- }
- return ut;
- }
- var ua = Tc(), ic = Tc(!0);
- function Gi(e, M) {
- return e && ua(e, M, He);
- }
- function da(e, M) {
- return e && ic(e, M, He);
- }
- function Bs(e, M) {
- return mr(M, function(K) {
- return ir(e[K]);
- });
- }
- function jr(e, M) {
- M = wr(M, e);
- for (var K = 0, st = M.length; e != null && K < st; )
- e = e[Fi(M[K++])];
- return K && K == st ? e : C;
- }
- function rc(e, M, K) {
- var st = M(e);
- return ie(e) ? st : yr(st, K(e));
- }
- function ti(e) {
- return e == null ? e === C ? tt : nt : Ir && Ir in Ce(e) ? dm(e) : Am(e);
- }
- function fa(e, M) {
- return e > M;
- }
- function _g(e, M) {
- return e != null && Se.call(e, M);
- }
- function Dg(e, M) {
- return e != null && M in Ce(e);
- }
- function Ig(e, M, K) {
- return e >= Ze(M, K) && e < Xe(M, K);
- }
- function ga(e, M, K) {
- for (var st = K ? Jo : vs, ut = e[0].length, mt = e.length, xt = mt, bt = Tt(mt), Mt = 1 / 0, It = []; xt--; ) {
- var Rt = e[xt];
- xt && M && (Rt = Ee(Rt, ci(M))), Mt = Ze(Rt.length, Mt), bt[xt] = !K && (M || ut >= 120 && Rt.length >= 120) ? new Nr(xt && Rt) : C;
- }
- Rt = e[0];
- var Bt = -1, zt = bt[0];
- t:
- for (; ++Bt < ut && It.length < Mt; ) {
- var Ut = Rt[Bt], Qt = M ? M(Ut) : Ut;
- if (Ut = K || Ut !== 0 ? Ut : 0, !(zt ? In(zt, Qt) : st(It, Qt, K))) {
- for (xt = mt; --xt; ) {
- var ae = bt[xt];
- if (!(ae ? In(ae, Qt) : st(e[xt], Qt, K)))
- continue t;
- }
- zt && zt.push(Qt), It.push(Ut);
- }
- }
- return It;
- }
- function Rg(e, M, K, st) {
- return Gi(e, function(ut, mt, xt) {
- M(st, K(ut), mt, xt);
- }), st;
- }
- function Xn(e, M, K) {
- M = wr(M, e), e = Hc(e, M);
- var st = e == null ? e : e[Fi(Mi(M))];
- return st == null ? C : hi(st, e, K);
- }
- function nc(e) {
- return Ne(e) && ti(e) == L;
- }
- function Ng(e) {
- return Ne(e) && ti(e) == pt;
- }
- function Bg(e) {
- return Ne(e) && ti(e) == A;
- }
- function Gn(e, M, K, st, ut) {
- return e === M ? !0 : e == null || M == null || !Ne(e) && !Ne(M) ? e !== e && M !== M : jg(e, M, K, st, Gn, ut);
- }
- function jg(e, M, K, st, ut, mt) {
- var xt = ie(e), bt = ie(M), Mt = xt ? z : Ke(e), It = bt ? z : Ke(M);
- Mt = Mt == L ? rt : Mt, It = It == L ? rt : It;
- var Rt = Mt == rt, Bt = It == rt, zt = Mt == It;
- if (zt && Cr(e)) {
- if (!Cr(M))
- return !1;
- xt = !0, Rt = !1;
- }
- if (zt && !Rt)
- return mt || (mt = new Li()), xt || un(e) ? Bc(e, M, K, st, ut, mt) : pm(e, M, Mt, K, st, ut, mt);
- if (!(K & x)) {
- var Ut = Rt && Se.call(e, "__wrapped__"), Qt = Bt && Se.call(M, "__wrapped__");
- if (Ut || Qt) {
- var ae = Ut ? e.value() : e, te = Qt ? M.value() : M;
- return mt || (mt = new Li()), ut(ae, te, K, st, mt);
- }
- }
- return zt ? (mt || (mt = new Li()), um(e, M, K, st, ut, mt)) : !1;
- }
- function Wg(e) {
- return Ne(e) && Ke(e) == it;
- }
- function ma(e, M, K, st) {
- var ut = K.length, mt = ut, xt = !st;
- if (e == null)
- return !mt;
- for (e = Ce(e); ut--; ) {
- var bt = K[ut];
- if (xt && bt[2] ? bt[1] !== e[bt[0]] : !(bt[0] in e))
- return !1;
- }
- for (; ++ut < mt; ) {
- bt = K[ut];
- var Mt = bt[0], It = e[Mt], Rt = bt[1];
- if (xt && bt[2]) {
- if (It === C && !(Mt in e))
- return !1;
- } else {
- var Bt = new Li();
- if (st)
- var zt = st(It, Rt, Mt, e, M, Bt);
- if (!(zt === C ? Gn(Rt, It, x | f, st, Bt) : zt))
- return !1;
- }
- }
- return !0;
- }
- function sc(e) {
- if (!Ie(e) || Sm(e))
- return !1;
- var M = ir(e) ? Wf : De;
- return M.test(Yr(e));
- }
- function Yg(e) {
- return Ne(e) && ti(e) == dt;
- }
- function zg(e) {
- return Ne(e) && Ke(e) == ht;
- }
- function Xg(e) {
- return Ne(e) && to(e.length) && !!Ae[ti(e)];
- }
- function oc(e) {
- return typeof e == "function" ? e : e == null ? oi : typeof e == "object" ? ie(e) ? hc(e[0], e[1]) : lc(e) : Pp(e);
- }
- function ya(e) {
- if (!Un(e))
- return Ff(e);
- var M = [];
- for (var K in Ce(e))
- Se.call(e, K) && K != "constructor" && M.push(K);
- return M;
- }
- function Gg(e) {
- if (!Ie(e))
- return km(e);
- var M = Un(e), K = [];
- for (var st in e)
- st == "constructor" && (M || !Se.call(e, st)) || K.push(st);
- return K;
- }
- function va(e, M) {
- return e < M;
- }
- function ac(e, M) {
- var K = -1, st = ni(e) ? Tt(e.length) : [];
- return br(e, function(ut, mt, xt) {
- st[++K] = M(ut, mt, xt);
- }), st;
- }
- function lc(e) {
- var M = Da(e);
- return M.length == 1 && M[0][2] ? Xc(M[0][0], M[0][1]) : function(K) {
- return K === e || ma(K, e, M);
- };
- }
- function hc(e, M) {
- return Ra(e) && zc(M) ? Xc(Fi(e), M) : function(K) {
- var st = Fa(K, e);
- return st === C && st === M ? Ua(K, e) : Gn(M, st, x | f);
- };
- }
- function js(e, M, K, st, ut) {
- e !== M && ua(M, function(mt, xt) {
- if (ut || (ut = new Li()), Ie(mt))
- Hg(e, M, xt, K, js, st, ut);
- else {
- var bt = st ? st(Ba(e, xt), mt, xt + "", e, M, ut) : C;
- bt === C && (bt = mt), ca(e, xt, bt);
- }
- }, si);
- }
- function Hg(e, M, K, st, ut, mt, xt) {
- var bt = Ba(e, K), Mt = Ba(M, K), It = xt.get(Mt);
- if (It) {
- ca(e, K, It);
- return;
- }
- var Rt = mt ? mt(bt, Mt, K + "", e, M, xt) : C, Bt = Rt === C;
- if (Bt) {
- var zt = ie(Mt), Ut = !zt && Cr(Mt), Qt = !zt && !Ut && un(Mt);
- Rt = Mt, zt || Ut || Qt ? ie(bt) ? Rt = bt : Be(bt) ? Rt = ri(bt) : Ut ? (Bt = !1, Rt = Sc(Mt, !0)) : Qt ? (Bt = !1, Rt = wc(Mt, !0)) : Rt = [] : $n(Mt) || zr(Mt) ? (Rt = bt, zr(bt) ? Rt = vp(bt) : (!Ie(bt) || ir(bt)) && (Rt = Yc(Mt))) : Bt = !1;
- }
- Bt && (xt.set(Mt, Rt), ut(Rt, Mt, st, mt, xt), xt.delete(Mt)), ca(e, K, Rt);
- }
- function cc(e, M) {
- var K = e.length;
- if (K)
- return M += M < 0 ? K : 0, er(M, K) ? e[M] : C;
- }
- function pc(e, M, K) {
- M.length ? M = Ee(M, function(mt) {
- return ie(mt) ? function(xt) {
- return jr(xt, mt.length === 1 ? mt[0] : mt);
- } : mt;
- }) : M = [oi];
- var st = -1;
- M = Ee(M, ci(qt()));
- var ut = ac(e, function(mt, xt, bt) {
- var Mt = Ee(M, function(It) {
- return It(mt);
- });
- return { criteria: Mt, index: ++st, value: mt };
- });
- return yf(ut, function(mt, xt) {
- return rm(mt, xt, K);
- });
- }
- function Fg(e, M) {
- return uc(e, M, function(K, st) {
- return Ua(e, st);
- });
- }
- function uc(e, M, K) {
- for (var st = -1, ut = M.length, mt = {}; ++st < ut; ) {
- var xt = M[st], bt = jr(e, xt);
- K(bt, xt) && Hn(mt, wr(xt, e), bt);
- }
- return mt;
- }
- function Ug(e) {
- return function(M) {
- return jr(M, e);
- };
- }
- function xa(e, M, K, st) {
- var ut = st ? mf : tn, mt = -1, xt = M.length, bt = e;
- for (e === M && (M = ri(M)), K && (bt = Ee(e, ci(K))); ++mt < xt; )
- for (var Mt = 0, It = M[mt], Rt = K ? K(It) : It; (Mt = ut(bt, Rt, Mt, st)) > -1; )
- bt !== e && Ps.call(bt, Mt, 1), Ps.call(e, Mt, 1);
- return e;
- }
- function dc(e, M) {
- for (var K = e ? M.length : 0, st = K - 1; K--; ) {
- var ut = M[K];
- if (K == st || ut !== mt) {
- var mt = ut;
- er(ut) ? Ps.call(e, ut, 1) : Ma(e, ut);
- }
- }
- return e;
- }
- function ba(e, M) {
- return e + Ls(Vh() * (M - e + 1));
- }
- function Vg(e, M, K, st) {
- for (var ut = -1, mt = Xe(Os((M - e) / (K || 1)), 0), xt = Tt(mt); mt--; )
- xt[st ? mt : ++ut] = e, e += K;
- return xt;
- }
- function Sa(e, M) {
- var K = "";
- if (!e || M < 1 || M > D)
- return K;
- do
- M % 2 && (K += e), M = Ls(M / 2), M && (e += e);
- while (M);
- return K;
- }
- function le(e, M) {
- return ja(Gc(e, M, oi), e + "");
- }
- function $g(e) {
- return Kh(dn(e));
- }
- function Zg(e, M) {
- var K = dn(e);
- return $s(K, Br(M, 0, K.length));
- }
- function Hn(e, M, K, st) {
- if (!Ie(e))
- return e;
- M = wr(M, e);
- for (var ut = -1, mt = M.length, xt = mt - 1, bt = e; bt != null && ++ut < mt; ) {
- var Mt = Fi(M[ut]), It = K;
- if (Mt === "__proto__" || Mt === "constructor" || Mt === "prototype")
- return e;
- if (ut != xt) {
- var Rt = bt[Mt];
- It = st ? st(Rt, Mt, bt) : C, It === C && (It = Ie(Rt) ? Rt : er(M[ut + 1]) ? [] : {});
- }
- Yn(bt, Mt, It), bt = bt[Mt];
- }
- return e;
- }
- var fc = _s ? function(e, M) {
- return _s.set(e, M), e;
- } : oi, Kg = Es ? function(e, M) {
- return Es(e, "toString", {
- configurable: !0,
- enumerable: !1,
- value: $a(M),
- writable: !0
- });
- } : oi;
- function Jg(e) {
- return $s(dn(e));
- }
- function wi(e, M, K) {
- var st = -1, ut = e.length;
- M < 0 && (M = -M > ut ? 0 : ut + M), K = K > ut ? ut : K, K < 0 && (K += ut), ut = M > K ? 0 : K - M >>> 0, M >>>= 0;
- for (var mt = Tt(ut); ++st < ut; )
- mt[st] = e[st + M];
- return mt;
- }
- function qg(e, M) {
- var K;
- return br(e, function(st, ut, mt) {
- return K = M(st, ut, mt), !K;
- }), !!K;
- }
- function Ws(e, M, K) {
- var st = 0, ut = e == null ? st : e.length;
- if (typeof M == "number" && M === M && ut <= g) {
- for (; st < ut; ) {
- var mt = st + ut >>> 1, xt = e[mt];
- xt !== null && !ui(xt) && (K ? xt <= M : xt < M) ? st = mt + 1 : ut = mt;
- }
- return ut;
- }
- return wa(e, M, oi, K);
- }
- function wa(e, M, K, st) {
- var ut = 0, mt = e == null ? 0 : e.length;
- if (mt === 0)
- return 0;
- M = K(M);
- for (var xt = M !== M, bt = M === null, Mt = ui(M), It = M === C; ut < mt; ) {
- var Rt = Ls((ut + mt) / 2), Bt = K(e[Rt]), zt = Bt !== C, Ut = Bt === null, Qt = Bt === Bt, ae = ui(Bt);
- if (xt)
- var te = st || Qt;
- else
- It ? te = Qt && (st || zt) : bt ? te = Qt && zt && (st || !Ut) : Mt ? te = Qt && zt && !Ut && (st || !ae) : Ut || ae ? te = !1 : te = st ? Bt <= M : Bt < M;
- te ? ut = Rt + 1 : mt = Rt;
- }
- return Ze(mt, X);
- }
- function gc(e, M) {
- for (var K = -1, st = e.length, ut = 0, mt = []; ++K < st; ) {
- var xt = e[K], bt = M ? M(xt) : xt;
- if (!K || !_i(bt, Mt)) {
- var Mt = bt;
- mt[ut++] = xt === 0 ? 0 : xt;
- }
- }
- return mt;
- }
- function mc(e) {
- return typeof e == "number" ? e : ui(e) ? W : +e;
- }
- function pi(e) {
- if (typeof e == "string")
- return e;
- if (ie(e))
- return Ee(e, pi) + "";
- if (ui(e))
- return $h ? $h.call(e) : "";
- var M = e + "";
- return M == "0" && 1 / e == -P ? "-0" : M;
- }
- function Sr(e, M, K) {
- var st = -1, ut = vs, mt = e.length, xt = !0, bt = [], Mt = bt;
- if (K)
- xt = !1, ut = Jo;
- else if (mt >= y) {
- var It = M ? null : hm(e);
- if (It)
- return bs(It);
- xt = !1, ut = In, Mt = new Nr();
- } else
- Mt = M ? [] : bt;
- t:
- for (; ++st < mt; ) {
- var Rt = e[st], Bt = M ? M(Rt) : Rt;
- if (Rt = K || Rt !== 0 ? Rt : 0, xt && Bt === Bt) {
- for (var zt = Mt.length; zt--; )
- if (Mt[zt] === Bt)
- continue t;
- M && Mt.push(Bt), bt.push(Rt);
- } else
- ut(Mt, Bt, K) || (Mt !== bt && Mt.push(Bt), bt.push(Rt));
- }
- return bt;
- }
- function Ma(e, M) {
- return M = wr(M, e), e = Hc(e, M), e == null || delete e[Fi(Mi(M))];
- }
- function yc(e, M, K, st) {
- return Hn(e, M, K(jr(e, M)), st);
- }
- function Ys(e, M, K, st) {
- for (var ut = e.length, mt = st ? ut : -1; (st ? mt-- : ++mt < ut) && M(e[mt], mt, e); )
- ;
- return K ? wi(e, st ? 0 : mt, st ? mt + 1 : ut) : wi(e, st ? mt + 1 : 0, st ? ut : mt);
- }
- function vc(e, M) {
- var K = e;
- return K instanceof ce && (K = K.value()), qo(M, function(st, ut) {
- return ut.func.apply(ut.thisArg, yr([st], ut.args));
- }, K);
- }
- function Ca(e, M, K) {
- var st = e.length;
- if (st < 2)
- return st ? Sr(e[0]) : [];
- for (var ut = -1, mt = Tt(st); ++ut < st; )
- for (var xt = e[ut], bt = -1; ++bt < st; )
- bt != ut && (mt[ut] = zn(mt[ut] || xt, e[bt], M, K));
- return Sr(Ve(mt, 1), M, K);
- }
- function xc(e, M, K) {
- for (var st = -1, ut = e.length, mt = M.length, xt = {}; ++st < ut; ) {
- var bt = st < mt ? M[st] : C;
- K(xt, e[st], bt);
- }
- return xt;
- }
- function ka(e) {
- return Be(e) ? e : [];
- }
- function Aa(e) {
- return typeof e == "function" ? e : oi;
- }
- function wr(e, M) {
- return ie(e) ? e : Ra(e, M) ? [e] : $c(xe(e));
- }
- var Qg = le;
- function Mr(e, M, K) {
- var st = e.length;
- return K = K === C ? st : K, !M && K >= st ? e : wi(e, M, K);
- }
- var bc = Yf || function(e) {
- return Ue.clearTimeout(e);
- };
- function Sc(e, M) {
- if (M)
- return e.slice();
- var K = e.length, st = Xh ? Xh(K) : new e.constructor(K);
- return e.copy(st), st;
- }
- function Ta(e) {
- var M = new e.constructor(e.byteLength);
- return new As(M).set(new As(e)), M;
- }
- function tm(e, M) {
- var K = M ? Ta(e.buffer) : e.buffer;
- return new e.constructor(K, e.byteOffset, e.byteLength);
- }
- function em(e) {
- var M = new e.constructor(e.source, de.exec(e));
- return M.lastIndex = e.lastIndex, M;
- }
- function im(e) {
- return Wn ? Ce(Wn.call(e)) : {};
- }
- function wc(e, M) {
- var K = M ? Ta(e.buffer) : e.buffer;
- return new e.constructor(K, e.byteOffset, e.length);
- }
- function Mc(e, M) {
- if (e !== M) {
- var K = e !== C, st = e === null, ut = e === e, mt = ui(e), xt = M !== C, bt = M === null, Mt = M === M, It = ui(M);
- if (!bt && !It && !mt && e > M || mt && xt && Mt && !bt && !It || st && xt && Mt || !K && Mt || !ut)
- return 1;
- if (!st && !mt && !It && e < M || It && K && ut && !st && !mt || bt && K && ut || !xt && ut || !Mt)
- return -1;
- }
- return 0;
- }
- function rm(e, M, K) {
- for (var st = -1, ut = e.criteria, mt = M.criteria, xt = ut.length, bt = K.length; ++st < xt; ) {
- var Mt = Mc(ut[st], mt[st]);
- if (Mt) {
- if (st >= bt)
- return Mt;
- var It = K[st];
- return Mt * (It == "desc" ? -1 : 1);
- }
- }
- return e.index - M.index;
- }
- function Cc(e, M, K, st) {
- for (var ut = -1, mt = e.length, xt = K.length, bt = -1, Mt = M.length, It = Xe(mt - xt, 0), Rt = Tt(Mt + It), Bt = !st; ++bt < Mt; )
- Rt[bt] = M[bt];
- for (; ++ut < xt; )
- (Bt || ut < mt) && (Rt[K[ut]] = e[ut]);
- for (; It--; )
- Rt[bt++] = e[ut++];
- return Rt;
- }
- function kc(e, M, K, st) {
- for (var ut = -1, mt = e.length, xt = -1, bt = K.length, Mt = -1, It = M.length, Rt = Xe(mt - bt, 0), Bt = Tt(Rt + It), zt = !st; ++ut < Rt; )
- Bt[ut] = e[ut];
- for (var Ut = ut; ++Mt < It; )
- Bt[Ut + Mt] = M[Mt];
- for (; ++xt < bt; )
- (zt || ut < mt) && (Bt[Ut + K[xt]] = e[ut++]);
- return Bt;
- }
- function ri(e, M) {
- var K = -1, st = e.length;
- for (M || (M = Tt(st)); ++K < st; )
- M[K] = e[K];
- return M;
- }
- function Hi(e, M, K, st) {
- var ut = !K;
- K || (K = {});
- for (var mt = -1, xt = M.length; ++mt < xt; ) {
- var bt = M[mt], Mt = st ? st(K[bt], e[bt], bt, K, e) : C;
- Mt === C && (Mt = e[bt]), ut ? qi(K, bt, Mt) : Yn(K, bt, Mt);
- }
- return K;
- }
- function nm(e, M) {
- return Hi(e, Ia(e), M);
- }
- function sm(e, M) {
- return Hi(e, jc(e), M);
- }
- function zs(e, M) {
- return function(K, st) {
- var ut = ie(K) ? cf : Tg, mt = M ? M() : {};
- return ut(K, e, qt(st, 2), mt);
- };
- }
- function hn(e) {
- return le(function(M, K) {
- var st = -1, ut = K.length, mt = ut > 1 ? K[ut - 1] : C, xt = ut > 2 ? K[2] : C;
- for (mt = e.length > 3 && typeof mt == "function" ? (ut--, mt) : C, xt && ei(K[0], K[1], xt) && (mt = ut < 3 ? C : mt, ut = 1), M = Ce(M); ++st < ut; ) {
- var bt = K[st];
- bt && e(M, bt, st, mt);
- }
- return M;
- });
- }
- function Ac(e, M) {
- return function(K, st) {
- if (K == null)
- return K;
- if (!ni(K))
- return e(K, st);
- for (var ut = K.length, mt = M ? ut : -1, xt = Ce(K); (M ? mt-- : ++mt < ut) && st(xt[mt], mt, xt) !== !1; )
- ;
- return K;
- };
- }
- function Tc(e) {
- return function(M, K, st) {
- for (var ut = -1, mt = Ce(M), xt = st(M), bt = xt.length; bt--; ) {
- var Mt = xt[e ? bt : ++ut];
- if (K(mt[Mt], Mt, mt) === !1)
- break;
- }
- return M;
- };
- }
- function om(e, M, K) {
- var st = M & l, ut = Fn(e);
- function mt() {
- var xt = this && this !== Ue && this instanceof mt ? ut : e;
- return xt.apply(st ? K : this, arguments);
- }
- return mt;
- }
- function Pc(e) {
- return function(M) {
- M = xe(M);
- var K = en(M) ? Oi(M) : C, st = K ? K[0] : M.charAt(0), ut = K ? Mr(K, 1).join("") : M.slice(1);
- return st[e]() + ut;
- };
- }
- function cn(e) {
- return function(M) {
- return qo(Ap(kp(M).replace(Zd, "")), e, "");
- };
- }
- function Fn(e) {
- return function() {
- var M = arguments;
- switch (M.length) {
- case 0:
- return new e();
- case 1:
- return new e(M[0]);
- case 2:
- return new e(M[0], M[1]);
- case 3:
- return new e(M[0], M[1], M[2]);
- case 4:
- return new e(M[0], M[1], M[2], M[3]);
- case 5:
- return new e(M[0], M[1], M[2], M[3], M[4]);
- case 6:
- return new e(M[0], M[1], M[2], M[3], M[4], M[5]);
- case 7:
- return new e(M[0], M[1], M[2], M[3], M[4], M[5], M[6]);
- }
- var K = ln(e.prototype), st = e.apply(K, M);
- return Ie(st) ? st : K;
- };
- }
- function am(e, M, K) {
- var st = Fn(e);
- function ut() {
- for (var mt = arguments.length, xt = Tt(mt), bt = mt, Mt = pn(ut); bt--; )
- xt[bt] = arguments[bt];
- var It = mt < 3 && xt[0] !== Mt && xt[mt - 1] !== Mt ? [] : vr(xt, Mt);
- if (mt -= It.length, mt < K)
- return Dc(
- e,
- M,
- Xs,
- ut.placeholder,
- C,
- xt,
- It,
- C,
- C,
- K - mt
- );
- var Rt = this && this !== Ue && this instanceof ut ? st : e;
- return hi(Rt, this, xt);
- }
- return ut;
- }
- function Ec(e) {
- return function(M, K, st) {
- var ut = Ce(M);
- if (!ni(M)) {
- var mt = qt(K, 3);
- M = He(M), K = function(bt) {
- return mt(ut[bt], bt, ut);
- };
- }
- var xt = e(M, K, st);
- return xt > -1 ? ut[mt ? M[xt] : xt] : C;
- };
- }
- function Oc(e) {
- return tr(function(M) {
- var K = M.length, st = K, ut = bi.prototype.thru;
- for (e && M.reverse(); st--; ) {
- var mt = M[st];
- if (typeof mt != "function")
- throw new xi(_);
- if (ut && !xt && Us(mt) == "wrapper")
- var xt = new bi([], !0);
- }
- for (st = xt ? st : K; ++st < K; ) {
- mt = M[st];
- var bt = Us(mt), Mt = bt == "wrapper" ? _a(mt) : C;
- Mt && Na(Mt[0]) && Mt[1] == (v | R | b | h) && !Mt[4].length && Mt[9] == 1 ? xt = xt[Us(Mt[0])].apply(xt, Mt[3]) : xt = mt.length == 1 && Na(mt) ? xt[bt]() : xt.thru(mt);
- }
- return function() {
- var It = arguments, Rt = It[0];
- if (xt && It.length == 1 && ie(Rt))
- return xt.plant(Rt).value();
- for (var Bt = 0, zt = K ? M[Bt].apply(this, It) : Rt; ++Bt < K; )
- zt = M[Bt].call(this, zt);
- return zt;
- };
- });
- }
- function Xs(e, M, K, st, ut, mt, xt, bt, Mt, It) {
- var Rt = M & v, Bt = M & l, zt = M & T, Ut = M & (R | k), Qt = M & c, ae = zt ? C : Fn(e);
- function te() {
- for (var he = arguments.length, ue = Tt(he), di = he; di--; )
- ue[di] = arguments[di];
- if (Ut)
- var ii = pn(te), fi = xf(ue, ii);
- if (st && (ue = Cc(ue, st, ut, Ut)), mt && (ue = kc(ue, mt, xt, Ut)), he -= fi, Ut && he < It) {
- var je = vr(ue, ii);
- return Dc(
- e,
- M,
- Xs,
- te.placeholder,
- K,
- ue,
- je,
- bt,
- Mt,
- It - he
- );
- }
- var Di = Bt ? K : this, nr = zt ? Di[e] : e;
- return he = ue.length, bt ? ue = Tm(ue, bt) : Qt && he > 1 && ue.reverse(), Rt && Mt < he && (ue.length = Mt), this && this !== Ue && this instanceof te && (nr = ae || Fn(nr)), nr.apply(Di, ue);
- }
- return te;
- }
- function Lc(e, M) {
- return function(K, st) {
- return Rg(K, e, M(st), {});
- };
- }
- function Gs(e, M) {
- return function(K, st) {
- var ut;
- if (K === C && st === C)
- return M;
- if (K !== C && (ut = K), st !== C) {
- if (ut === C)
- return st;
- typeof K == "string" || typeof st == "string" ? (K = pi(K), st = pi(st)) : (K = mc(K), st = mc(st)), ut = e(K, st);
- }
- return ut;
- };
- }
- function Pa(e) {
- return tr(function(M) {
- return M = Ee(M, ci(qt())), le(function(K) {
- var st = this;
- return e(M, function(ut) {
- return hi(ut, st, K);
- });
- });
- });
- }
- function Hs(e, M) {
- M = M === C ? " " : pi(M);
- var K = M.length;
- if (K < 2)
- return K ? Sa(M, e) : M;
- var st = Sa(M, Os(e / rn(M)));
- return en(M) ? Mr(Oi(st), 0, e).join("") : st.slice(0, e);
- }
- function lm(e, M, K, st) {
- var ut = M & l, mt = Fn(e);
- function xt() {
- for (var bt = -1, Mt = arguments.length, It = -1, Rt = st.length, Bt = Tt(Rt + Mt), zt = this && this !== Ue && this instanceof xt ? mt : e; ++It < Rt; )
- Bt[It] = st[It];
- for (; Mt--; )
- Bt[It++] = arguments[++bt];
- return hi(zt, ut ? K : this, Bt);
- }
- return xt;
- }
- function _c(e) {
- return function(M, K, st) {
- return st && typeof st != "number" && ei(M, K, st) && (K = st = C), M = rr(M), K === C ? (K = M, M = 0) : K = rr(K), st = st === C ? M < K ? 1 : -1 : rr(st), Vg(M, K, st, e);
- };
- }
- function Fs(e) {
- return function(M, K) {
- return typeof M == "string" && typeof K == "string" || (M = Ci(M), K = Ci(K)), e(M, K);
- };
- }
- function Dc(e, M, K, st, ut, mt, xt, bt, Mt, It) {
- var Rt = M & R, Bt = Rt ? xt : C, zt = Rt ? C : xt, Ut = Rt ? mt : C, Qt = Rt ? C : mt;
- M |= Rt ? b : S, M &= ~(Rt ? S : b), M & O || (M &= ~(l | T));
- var ae = [
- e,
- M,
- ut,
- Ut,
- Bt,
- Qt,
- zt,
- bt,
- Mt,
- It
- ], te = K.apply(C, ae);
- return Na(e) && Fc(te, ae), te.placeholder = st, Uc(te, e, M);
- }
- function Ea(e) {
- var M = ze[e];
- return function(K, st) {
- if (K = Ci(K), st = st == null ? 0 : Ze(se(st), 292), st && Uh(K)) {
- var ut = (xe(K) + "e").split("e"), mt = M(ut[0] + "e" + (+ut[1] + st));
- return ut = (xe(mt) + "e").split("e"), +(ut[0] + "e" + (+ut[1] - st));
- }
- return M(K);
- };
- }
- var hm = on && 1 / bs(new on([, -0]))[1] == P ? function(e) {
- return new on(e);
- } : Ja;
- function Ic(e) {
- return function(M) {
- var K = Ke(M);
- return K == it ? sa(M) : K == ht ? Af(M) : vf(M, e(M));
- };
- }
- function Qi(e, M, K, st, ut, mt, xt, bt) {
- var Mt = M & T;
- if (!Mt && typeof e != "function")
- throw new xi(_);
- var It = st ? st.length : 0;
- if (It || (M &= ~(b | S), st = ut = C), xt = xt === C ? xt : Xe(se(xt), 0), bt = bt === C ? bt : se(bt), It -= ut ? ut.length : 0, M & S) {
- var Rt = st, Bt = ut;
- st = ut = C;
- }
- var zt = Mt ? C : _a(e), Ut = [
- e,
- M,
- K,
- st,
- ut,
- Rt,
- Bt,
- mt,
- xt,
- bt
- ];
- if (zt && Cm(Ut, zt), e = Ut[0], M = Ut[1], K = Ut[2], st = Ut[3], ut = Ut[4], bt = Ut[9] = Ut[9] === C ? Mt ? 0 : e.length : Xe(Ut[9] - It, 0), !bt && M & (R | k) && (M &= ~(R | k)), !M || M == l)
- var Qt = om(e, M, K);
- else
- M == R || M == k ? Qt = am(e, M, bt) : (M == b || M == (l | b)) && !ut.length ? Qt = lm(e, M, K, st) : Qt = Xs.apply(C, Ut);
- var ae = zt ? fc : Fc;
- return Uc(ae(Qt, Ut), e, M);
- }
- function Rc(e, M, K, st) {
- return e === C || _i(e, sn[K]) && !Se.call(st, K) ? M : e;
- }
- function Nc(e, M, K, st, ut, mt) {
- return Ie(e) && Ie(M) && (mt.set(M, e), js(e, M, C, Nc, mt), mt.delete(M)), e;
- }
- function cm(e) {
- return $n(e) ? C : e;
- }
- function Bc(e, M, K, st, ut, mt) {
- var xt = K & x, bt = e.length, Mt = M.length;
- if (bt != Mt && !(xt && Mt > bt))
- return !1;
- var It = mt.get(e), Rt = mt.get(M);
- if (It && Rt)
- return It == M && Rt == e;
- var Bt = -1, zt = !0, Ut = K & f ? new Nr() : C;
- for (mt.set(e, M), mt.set(M, e); ++Bt < bt; ) {
- var Qt = e[Bt], ae = M[Bt];
- if (st)
- var te = xt ? st(ae, Qt, Bt, M, e, mt) : st(Qt, ae, Bt, e, M, mt);
- if (te !== C) {
- if (te)
- continue;
- zt = !1;
- break;
- }
- if (Ut) {
- if (!Qo(M, function(he, ue) {
- if (!In(Ut, ue) && (Qt === he || ut(Qt, he, K, st, mt)))
- return Ut.push(ue);
- })) {
- zt = !1;
- break;
- }
- } else if (!(Qt === ae || ut(Qt, ae, K, st, mt))) {
- zt = !1;
- break;
- }
- }
- return mt.delete(e), mt.delete(M), zt;
- }
- function pm(e, M, K, st, ut, mt, xt) {
- switch (K) {
- case yt:
- if (e.byteLength != M.byteLength || e.byteOffset != M.byteOffset)
- return !1;
- e = e.buffer, M = M.buffer;
- case pt:
- return !(e.byteLength != M.byteLength || !mt(new As(e), new As(M)));
- case Q:
- case A:
- case et:
- return _i(+e, +M);
- case Y:
- return e.name == M.name && e.message == M.message;
- case dt:
- case at:
- return e == M + "";
- case it:
- var bt = sa;
- case ht:
- var Mt = st & x;
- if (bt || (bt = bs), e.size != M.size && !Mt)
- return !1;
- var It = xt.get(e);
- if (It)
- return It == M;
- st |= f, xt.set(e, M);
- var Rt = Bc(bt(e), bt(M), st, ut, mt, xt);
- return xt.delete(e), Rt;
- case J:
- if (Wn)
- return Wn.call(e) == Wn.call(M);
- }
- return !1;
- }
- function um(e, M, K, st, ut, mt) {
- var xt = K & x, bt = Oa(e), Mt = bt.length, It = Oa(M), Rt = It.length;
- if (Mt != Rt && !xt)
- return !1;
- for (var Bt = Mt; Bt--; ) {
- var zt = bt[Bt];
- if (!(xt ? zt in M : Se.call(M, zt)))
- return !1;
- }
- var Ut = mt.get(e), Qt = mt.get(M);
- if (Ut && Qt)
- return Ut == M && Qt == e;
- var ae = !0;
- mt.set(e, M), mt.set(M, e);
- for (var te = xt; ++Bt < Mt; ) {
- zt = bt[Bt];
- var he = e[zt], ue = M[zt];
- if (st)
- var di = xt ? st(ue, he, zt, M, e, mt) : st(he, ue, zt, e, M, mt);
- if (!(di === C ? he === ue || ut(he, ue, K, st, mt) : di)) {
- ae = !1;
- break;
- }
- te || (te = zt == "constructor");
- }
- if (ae && !te) {
- var ii = e.constructor, fi = M.constructor;
- ii != fi && "constructor" in e && "constructor" in M && !(typeof ii == "function" && ii instanceof ii && typeof fi == "function" && fi instanceof fi) && (ae = !1);
- }
- return mt.delete(e), mt.delete(M), ae;
- }
- function tr(e) {
- return ja(Gc(e, C, qc), e + "");
- }
- function Oa(e) {
- return rc(e, He, Ia);
- }
- function La(e) {
- return rc(e, si, jc);
- }
- var _a = _s ? function(e) {
- return _s.get(e);
- } : Ja;
- function Us(e) {
- for (var M = e.name + "", K = an[M], st = Se.call(an, M) ? K.length : 0; st--; ) {
- var ut = K[st], mt = ut.func;
- if (mt == null || mt == e)
- return ut.name;
- }
- return M;
- }
- function pn(e) {
- var M = Se.call(ft, "placeholder") ? ft : e;
- return M.placeholder;
- }
- function qt() {
- var e = ft.iteratee || Za;
- return e = e === Za ? oc : e, arguments.length ? e(arguments[0], arguments[1]) : e;
- }
- function Vs(e, M) {
- var K = e.__data__;
- return bm(M) ? K[typeof M == "string" ? "string" : "hash"] : K.map;
- }
- function Da(e) {
- for (var M = He(e), K = M.length; K--; ) {
- var st = M[K], ut = e[st];
- M[K] = [st, ut, zc(ut)];
- }
- return M;
- }
- function Wr(e, M) {
- var K = Mf(e, M);
- return sc(K) ? K : C;
- }
- function dm(e) {
- var M = Se.call(e, Ir), K = e[Ir];
- try {
- e[Ir] = C;
- var st = !0;
- } catch {
- }
- var ut = Cs.call(e);
- return st && (M ? e[Ir] = K : delete e[Ir]), ut;
- }
- var Ia = aa ? function(e) {
- return e == null ? [] : (e = Ce(e), mr(aa(e), function(M) {
- return Hh.call(e, M);
- }));
- } : qa, jc = aa ? function(e) {
- for (var M = []; e; )
- yr(M, Ia(e)), e = Ts(e);
- return M;
- } : qa, Ke = ti;
- (la && Ke(new la(new ArrayBuffer(1))) != yt || Nn && Ke(new Nn()) != it || ha && Ke(ha.resolve()) != ct || on && Ke(new on()) != ht || Bn && Ke(new Bn()) != ot) && (Ke = function(e) {
- var M = ti(e), K = M == rt ? e.constructor : C, st = K ? Yr(K) : "";
- if (st)
- switch (st) {
- case Zf:
- return yt;
- case Kf:
- return it;
- case Jf:
- return ct;
- case qf:
- return ht;
- case Qf:
- return ot;
- }
- return M;
- });
- function fm(e, M, K) {
- for (var st = -1, ut = K.length; ++st < ut; ) {
- var mt = K[st], xt = mt.size;
- switch (mt.type) {
- case "drop":
- e += xt;
- break;
- case "dropRight":
- M -= xt;
- break;
- case "take":
- M = Ze(M, e + xt);
- break;
- case "takeRight":
- e = Xe(e, M - xt);
- break;
- }
- }
- return { start: e, end: M };
- }
- function gm(e) {
- var M = e.match(Lr);
- return M ? M[1].split(Xi) : [];
- }
- function Wc(e, M, K) {
- M = wr(M, e);
- for (var st = -1, ut = M.length, mt = !1; ++st < ut; ) {
- var xt = Fi(M[st]);
- if (!(mt = e != null && K(e, xt)))
- break;
- e = e[xt];
- }
- return mt || ++st != ut ? mt : (ut = e == null ? 0 : e.length, !!ut && to(ut) && er(xt, ut) && (ie(e) || zr(e)));
- }
- function mm(e) {
- var M = e.length, K = new e.constructor(M);
- return M && typeof e[0] == "string" && Se.call(e, "index") && (K.index = e.index, K.input = e.input), K;
- }
- function Yc(e) {
- return typeof e.constructor == "function" && !Un(e) ? ln(Ts(e)) : {};
- }
- function ym(e, M, K) {
- var st = e.constructor;
- switch (M) {
- case pt:
- return Ta(e);
- case Q:
- case A:
- return new st(+e);
- case yt:
- return tm(e, K);
- case vt:
- case Ct:
- case Pt:
- case At:
- case St:
- case Dt:
- case _t:
- case Nt:
- case Ot:
- return wc(e, K);
- case it:
- return new st();
- case et:
- case at:
- return new st(e);
- case dt:
- return em(e);
- case ht:
- return new st();
- case J:
- return im(e);
- }
- }
- function vm(e, M) {
- var K = M.length;
- if (!K)
- return e;
- var st = K - 1;
- return M[st] = (K > 1 ? "& " : "") + M[st], M = M.join(K > 2 ? ", " : " "), e.replace(Go, `{
- /* [wrapped with ` + M + `] */
- `);
- }
- function xm(e) {
- return ie(e) || zr(e) || !!(Fh && e && e[Fh]);
- }
- function er(e, M) {
- var K = typeof e;
- return M = M ?? D, !!M && (K == "number" || K != "symbol" && Od.test(e)) && e > -1 && e % 1 == 0 && e < M;
- }
- function ei(e, M, K) {
- if (!Ie(K))
- return !1;
- var st = typeof M;
- return (st == "number" ? ni(K) && er(M, K.length) : st == "string" && M in K) ? _i(K[M], e) : !1;
- }
- function Ra(e, M) {
- if (ie(e))
- return !1;
- var K = typeof e;
- return K == "number" || K == "symbol" || K == "boolean" || e == null || ui(e) ? !0 : On.test(e) || !En.test(e) || M != null && e in Ce(M);
- }
- function bm(e) {
- var M = typeof e;
- return M == "string" || M == "number" || M == "symbol" || M == "boolean" ? e !== "__proto__" : e === null;
- }
- function Na(e) {
- var M = Us(e), K = ft[M];
- if (typeof K != "function" || !(M in ce.prototype))
- return !1;
- if (e === K)
- return !0;
- var st = _a(K);
- return !!st && e === st[0];
- }
- function Sm(e) {
- return !!zh && zh in e;
- }
- var wm = ws ? ir : Qa;
- function Un(e) {
- var M = e && e.constructor, K = typeof M == "function" && M.prototype || sn;
- return e === K;
- }
- function zc(e) {
- return e === e && !Ie(e);
- }
- function Xc(e, M) {
- return function(K) {
- return K == null ? !1 : K[e] === M && (M !== C || e in Ce(K));
- };
- }
- function Mm(e) {
- var M = qs(e, function(st) {
- return K.size === V && K.clear(), st;
- }), K = M.cache;
- return M;
- }
- function Cm(e, M) {
- var K = e[1], st = M[1], ut = K | st, mt = ut < (l | T | v), xt = st == v && K == R || st == v && K == h && e[7].length <= M[8] || st == (v | h) && M[7].length <= M[8] && K == R;
- if (!(mt || xt))
- return e;
- st & l && (e[2] = M[2], ut |= K & l ? 0 : O);
- var bt = M[3];
- if (bt) {
- var Mt = e[3];
- e[3] = Mt ? Cc(Mt, bt, M[4]) : bt, e[4] = Mt ? vr(e[3], F) : M[4];
- }
- return bt = M[5], bt && (Mt = e[5], e[5] = Mt ? kc(Mt, bt, M[6]) : bt, e[6] = Mt ? vr(e[5], F) : M[6]), bt = M[7], bt && (e[7] = bt), st & v && (e[8] = e[8] == null ? M[8] : Ze(e[8], M[8])), e[9] == null && (e[9] = M[9]), e[0] = M[0], e[1] = ut, e;
- }
- function km(e) {
- var M = [];
- if (e != null)
- for (var K in Ce(e))
- M.push(K);
- return M;
- }
- function Am(e) {
- return Cs.call(e);
- }
- function Gc(e, M, K) {
- return M = Xe(M === C ? e.length - 1 : M, 0), function() {
- for (var st = arguments, ut = -1, mt = Xe(st.length - M, 0), xt = Tt(mt); ++ut < mt; )
- xt[ut] = st[M + ut];
- ut = -1;
- for (var bt = Tt(M + 1); ++ut < M; )
- bt[ut] = st[ut];
- return bt[M] = K(xt), hi(e, this, bt);
- };
- }
- function Hc(e, M) {
- return M.length < 2 ? e : jr(e, wi(M, 0, -1));
- }
- function Tm(e, M) {
- for (var K = e.length, st = Ze(M.length, K), ut = ri(e); st--; ) {
- var mt = M[st];
- e[st] = er(mt, K) ? ut[mt] : C;
- }
- return e;
- }
- function Ba(e, M) {
- if (!(M === "constructor" && typeof e[M] == "function") && M != "__proto__")
- return e[M];
- }
- var Fc = Vc(fc), Vn = Xf || function(e, M) {
- return Ue.setTimeout(e, M);
- }, ja = Vc(Kg);
- function Uc(e, M, K) {
- var st = M + "";
- return ja(e, vm(st, Pm(gm(st), K)));
- }
- function Vc(e) {
- var M = 0, K = 0;
- return function() {
- var st = Uf(), ut = a - (st - K);
- if (K = st, ut > 0) {
- if (++M >= p)
- return arguments[0];
- } else
- M = 0;
- return e.apply(C, arguments);
- };
- }
- function $s(e, M) {
- var K = -1, st = e.length, ut = st - 1;
- for (M = M === C ? st : M; ++K < M; ) {
- var mt = ba(K, ut), xt = e[mt];
- e[mt] = e[K], e[K] = xt;
- }
- return e.length = M, e;
- }
- var $c = Mm(function(e) {
- var M = [];
- return e.charCodeAt(0) === 46 && M.push(""), e.replace($e, function(K, st, ut, mt) {
- M.push(ut ? mt.replace(_r, "$1") : st || K);
- }), M;
- });
- function Fi(e) {
- if (typeof e == "string" || ui(e))
- return e;
- var M = e + "";
- return M == "0" && 1 / e == -P ? "-0" : M;
- }
- function Yr(e) {
- if (e != null) {
- try {
- return Ms.call(e);
- } catch {
- }
- try {
- return e + "";
- } catch {
- }
- }
- return "";
- }
- function Pm(e, M) {
- return vi(m, function(K) {
- var st = "_." + K[0];
- M & K[1] && !vs(e, st) && e.push(st);
- }), e.sort();
- }
- function Zc(e) {
- if (e instanceof ce)
- return e.clone();
- var M = new bi(e.__wrapped__, e.__chain__);
- return M.__actions__ = ri(e.__actions__), M.__index__ = e.__index__, M.__values__ = e.__values__, M;
- }
- function Em(e, M, K) {
- (K ? ei(e, M, K) : M === C) ? M = 1 : M = Xe(se(M), 0);
- var st = e == null ? 0 : e.length;
- if (!st || M < 1)
- return [];
- for (var ut = 0, mt = 0, xt = Tt(Os(st / M)); ut < st; )
- xt[mt++] = wi(e, ut, ut += M);
- return xt;
- }
- function Om(e) {
- for (var M = -1, K = e == null ? 0 : e.length, st = 0, ut = []; ++M < K; ) {
- var mt = e[M];
- mt && (ut[st++] = mt);
- }
- return ut;
- }
- function Lm() {
- var e = arguments.length;
- if (!e)
- return [];
- for (var M = Tt(e - 1), K = arguments[0], st = e; st--; )
- M[st - 1] = arguments[st];
- return yr(ie(K) ? ri(K) : [K], Ve(M, 1));
- }
- var _m = le(function(e, M) {
- return Be(e) ? zn(e, Ve(M, 1, Be, !0)) : [];
- }), Dm = le(function(e, M) {
- var K = Mi(M);
- return Be(K) && (K = C), Be(e) ? zn(e, Ve(M, 1, Be, !0), qt(K, 2)) : [];
- }), Im = le(function(e, M) {
- var K = Mi(M);
- return Be(K) && (K = C), Be(e) ? zn(e, Ve(M, 1, Be, !0), C, K) : [];
- });
- function Rm(e, M, K) {
- var st = e == null ? 0 : e.length;
- return st ? (M = K || M === C ? 1 : se(M), wi(e, M < 0 ? 0 : M, st)) : [];
- }
- function Nm(e, M, K) {
- var st = e == null ? 0 : e.length;
- return st ? (M = K || M === C ? 1 : se(M), M = st - M, wi(e, 0, M < 0 ? 0 : M)) : [];
- }
- function Bm(e, M) {
- return e && e.length ? Ys(e, qt(M, 3), !0, !0) : [];
- }
- function jm(e, M) {
- return e && e.length ? Ys(e, qt(M, 3), !0) : [];
- }
- function Wm(e, M, K, st) {
- var ut = e == null ? 0 : e.length;
- return ut ? (K && typeof K != "number" && ei(e, M, K) && (K = 0, st = ut), Lg(e, M, K, st)) : [];
- }
- function Kc(e, M, K) {
- var st = e == null ? 0 : e.length;
- if (!st)
- return -1;
- var ut = K == null ? 0 : se(K);
- return ut < 0 && (ut = Xe(st + ut, 0)), xs(e, qt(M, 3), ut);
- }
- function Jc(e, M, K) {
- var st = e == null ? 0 : e.length;
- if (!st)
- return -1;
- var ut = st - 1;
- return K !== C && (ut = se(K), ut = K < 0 ? Xe(st + ut, 0) : Ze(ut, st - 1)), xs(e, qt(M, 3), ut, !0);
- }
- function qc(e) {
- var M = e == null ? 0 : e.length;
- return M ? Ve(e, 1) : [];
- }
- function Ym(e) {
- var M = e == null ? 0 : e.length;
- return M ? Ve(e, P) : [];
- }
- function zm(e, M) {
- var K = e == null ? 0 : e.length;
- return K ? (M = M === C ? 1 : se(M), Ve(e, M)) : [];
- }
- function Xm(e) {
- for (var M = -1, K = e == null ? 0 : e.length, st = {}; ++M < K; ) {
- var ut = e[M];
- st[ut[0]] = ut[1];
- }
- return st;
- }
- function Qc(e) {
- return e && e.length ? e[0] : C;
- }
- function Gm(e, M, K) {
- var st = e == null ? 0 : e.length;
- if (!st)
- return -1;
- var ut = K == null ? 0 : se(K);
- return ut < 0 && (ut = Xe(st + ut, 0)), tn(e, M, ut);
- }
- function Hm(e) {
- var M = e == null ? 0 : e.length;
- return M ? wi(e, 0, -1) : [];
- }
- var Fm = le(function(e) {
- var M = Ee(e, ka);
- return M.length && M[0] === e[0] ? ga(M) : [];
- }), Um = le(function(e) {
- var M = Mi(e), K = Ee(e, ka);
- return M === Mi(K) ? M = C : K.pop(), K.length && K[0] === e[0] ? ga(K, qt(M, 2)) : [];
- }), Vm = le(function(e) {
- var M = Mi(e), K = Ee(e, ka);
- return M = typeof M == "function" ? M : C, M && K.pop(), K.length && K[0] === e[0] ? ga(K, C, M) : [];
- });
- function $m(e, M) {
- return e == null ? "" : Hf.call(e, M);
- }
- function Mi(e) {
- var M = e == null ? 0 : e.length;
- return M ? e[M - 1] : C;
- }
- function Zm(e, M, K) {
- var st = e == null ? 0 : e.length;
- if (!st)
- return -1;
- var ut = st;
- return K !== C && (ut = se(K), ut = ut < 0 ? Xe(st + ut, 0) : Ze(ut, st - 1)), M === M ? Pf(e, M, ut) : xs(e, Dh, ut, !0);
- }
- function Km(e, M) {
- return e && e.length ? cc(e, se(M)) : C;
- }
- var Jm = le(tp);
- function tp(e, M) {
- return e && e.length && M && M.length ? xa(e, M) : e;
- }
- function qm(e, M, K) {
- return e && e.length && M && M.length ? xa(e, M, qt(K, 2)) : e;
- }
- function Qm(e, M, K) {
- return e && e.length && M && M.length ? xa(e, M, C, K) : e;
- }
- var ty = tr(function(e, M) {
- var K = e == null ? 0 : e.length, st = pa(e, M);
- return dc(e, Ee(M, function(ut) {
- return er(ut, K) ? +ut : ut;
- }).sort(Mc)), st;
- });
- function ey(e, M) {
- var K = [];
- if (!(e && e.length))
- return K;
- var st = -1, ut = [], mt = e.length;
- for (M = qt(M, 3); ++st < mt; ) {
- var xt = e[st];
- M(xt, st, e) && (K.push(xt), ut.push(st));
- }
- return dc(e, ut), K;
- }
- function Wa(e) {
- return e == null ? e : $f.call(e);
- }
- function iy(e, M, K) {
- var st = e == null ? 0 : e.length;
- return st ? (K && typeof K != "number" && ei(e, M, K) ? (M = 0, K = st) : (M = M == null ? 0 : se(M), K = K === C ? st : se(K)), wi(e, M, K)) : [];
- }
- function ry(e, M) {
- return Ws(e, M);
- }
- function ny(e, M, K) {
- return wa(e, M, qt(K, 2));
- }
- function sy(e, M) {
- var K = e == null ? 0 : e.length;
- if (K) {
- var st = Ws(e, M);
- if (st < K && _i(e[st], M))
- return st;
- }
- return -1;
- }
- function oy(e, M) {
- return Ws(e, M, !0);
- }
- function ay(e, M, K) {
- return wa(e, M, qt(K, 2), !0);
- }
- function ly(e, M) {
- var K = e == null ? 0 : e.length;
- if (K) {
- var st = Ws(e, M, !0) - 1;
- if (_i(e[st], M))
- return st;
- }
- return -1;
- }
- function hy(e) {
- return e && e.length ? gc(e) : [];
- }
- function cy(e, M) {
- return e && e.length ? gc(e, qt(M, 2)) : [];
- }
- function py(e) {
- var M = e == null ? 0 : e.length;
- return M ? wi(e, 1, M) : [];
- }
- function uy(e, M, K) {
- return e && e.length ? (M = K || M === C ? 1 : se(M), wi(e, 0, M < 0 ? 0 : M)) : [];
- }
- function dy(e, M, K) {
- var st = e == null ? 0 : e.length;
- return st ? (M = K || M === C ? 1 : se(M), M = st - M, wi(e, M < 0 ? 0 : M, st)) : [];
- }
- function fy(e, M) {
- return e && e.length ? Ys(e, qt(M, 3), !1, !0) : [];
- }
- function gy(e, M) {
- return e && e.length ? Ys(e, qt(M, 3)) : [];
- }
- var my = le(function(e) {
- return Sr(Ve(e, 1, Be, !0));
- }), yy = le(function(e) {
- var M = Mi(e);
- return Be(M) && (M = C), Sr(Ve(e, 1, Be, !0), qt(M, 2));
- }), vy = le(function(e) {
- var M = Mi(e);
- return M = typeof M == "function" ? M : C, Sr(Ve(e, 1, Be, !0), C, M);
- });
- function xy(e) {
- return e && e.length ? Sr(e) : [];
- }
- function by(e, M) {
- return e && e.length ? Sr(e, qt(M, 2)) : [];
- }
- function Sy(e, M) {
- return M = typeof M == "function" ? M : C, e && e.length ? Sr(e, C, M) : [];
- }
- function Ya(e) {
- if (!(e && e.length))
- return [];
- var M = 0;
- return e = mr(e, function(K) {
- if (Be(K))
- return M = Xe(K.length, M), !0;
- }), ra(M, function(K) {
- return Ee(e, ta(K));
- });
- }
- function ep(e, M) {
- if (!(e && e.length))
- return [];
- var K = Ya(e);
- return M == null ? K : Ee(K, function(st) {
- return hi(M, C, st);
- });
- }
- var wy = le(function(e, M) {
- return Be(e) ? zn(e, M) : [];
- }), My = le(function(e) {
- return Ca(mr(e, Be));
- }), Cy = le(function(e) {
- var M = Mi(e);
- return Be(M) && (M = C), Ca(mr(e, Be), qt(M, 2));
- }), ky = le(function(e) {
- var M = Mi(e);
- return M = typeof M == "function" ? M : C, Ca(mr(e, Be), C, M);
- }), Ay = le(Ya);
- function Ty(e, M) {
- return xc(e || [], M || [], Yn);
- }
- function Py(e, M) {
- return xc(e || [], M || [], Hn);
- }
- var Ey = le(function(e) {
- var M = e.length, K = M > 1 ? e[M - 1] : C;
- return K = typeof K == "function" ? (e.pop(), K) : C, ep(e, K);
- });
- function ip(e) {
- var M = ft(e);
- return M.__chain__ = !0, M;
- }
- function Oy(e, M) {
- return M(e), e;
- }
- function Zs(e, M) {
- return M(e);
- }
- var Ly = tr(function(e) {
- var M = e.length, K = M ? e[0] : 0, st = this.__wrapped__, ut = function(mt) {
- return pa(mt, e);
- };
- return M > 1 || this.__actions__.length || !(st instanceof ce) || !er(K) ? this.thru(ut) : (st = st.slice(K, +K + (M ? 1 : 0)), st.__actions__.push({
- func: Zs,
- args: [ut],
- thisArg: C
- }), new bi(st, this.__chain__).thru(function(mt) {
- return M && !mt.length && mt.push(C), mt;
- }));
- });
- function _y() {
- return ip(this);
- }
- function Dy() {
- return new bi(this.value(), this.__chain__);
- }
- function Iy() {
- this.__values__ === C && (this.__values__ = mp(this.value()));
- var e = this.__index__ >= this.__values__.length, M = e ? C : this.__values__[this.__index__++];
- return { done: e, value: M };
- }
- function Ry() {
- return this;
- }
- function Ny(e) {
- for (var M, K = this; K instanceof Is; ) {
- var st = Zc(K);
- st.__index__ = 0, st.__values__ = C, M ? ut.__wrapped__ = st : M = st;
- var ut = st;
- K = K.__wrapped__;
- }
- return ut.__wrapped__ = e, M;
- }
- function By() {
- var e = this.__wrapped__;
- if (e instanceof ce) {
- var M = e;
- return this.__actions__.length && (M = new ce(this)), M = M.reverse(), M.__actions__.push({
- func: Zs,
- args: [Wa],
- thisArg: C
- }), new bi(M, this.__chain__);
- }
- return this.thru(Wa);
- }
- function jy() {
- return vc(this.__wrapped__, this.__actions__);
- }
- var Wy = zs(function(e, M, K) {
- Se.call(e, K) ? ++e[K] : qi(e, K, 1);
- });
- function Yy(e, M, K) {
- var st = ie(e) ? Lh : Og;
- return K && ei(e, M, K) && (M = C), st(e, qt(M, 3));
- }
- function zy(e, M) {
- var K = ie(e) ? mr : ec;
- return K(e, qt(M, 3));
- }
- var Xy = Ec(Kc), Gy = Ec(Jc);
- function Hy(e, M) {
- return Ve(Ks(e, M), 1);
- }
- function Fy(e, M) {
- return Ve(Ks(e, M), P);
- }
- function Uy(e, M, K) {
- return K = K === C ? 1 : se(K), Ve(Ks(e, M), K);
- }
- function rp(e, M) {
- var K = ie(e) ? vi : br;
- return K(e, qt(M, 3));
- }
- function np(e, M) {
- var K = ie(e) ? pf : tc;
- return K(e, qt(M, 3));
- }
- var Vy = zs(function(e, M, K) {
- Se.call(e, K) ? e[K].push(M) : qi(e, K, [M]);
- });
- function $y(e, M, K, st) {
- e = ni(e) ? e : dn(e), K = K && !st ? se(K) : 0;
- var ut = e.length;
- return K < 0 && (K = Xe(ut + K, 0)), eo(e) ? K <= ut && e.indexOf(M, K) > -1 : !!ut && tn(e, M, K) > -1;
- }
- var Zy = le(function(e, M, K) {
- var st = -1, ut = typeof M == "function", mt = ni(e) ? Tt(e.length) : [];
- return br(e, function(xt) {
- mt[++st] = ut ? hi(M, xt, K) : Xn(xt, M, K);
- }), mt;
- }), Ky = zs(function(e, M, K) {
- qi(e, K, M);
- });
- function Ks(e, M) {
- var K = ie(e) ? Ee : ac;
- return K(e, qt(M, 3));
- }
- function Jy(e, M, K, st) {
- return e == null ? [] : (ie(M) || (M = M == null ? [] : [M]), K = st ? C : K, ie(K) || (K = K == null ? [] : [K]), pc(e, M, K));
- }
- var qy = zs(function(e, M, K) {
- e[K ? 0 : 1].push(M);
- }, function() {
- return [[], []];
- });
- function Qy(e, M, K) {
- var st = ie(e) ? qo : Rh, ut = arguments.length < 3;
- return st(e, qt(M, 4), K, ut, br);
- }
- function tv(e, M, K) {
- var st = ie(e) ? uf : Rh, ut = arguments.length < 3;
- return st(e, qt(M, 4), K, ut, tc);
- }
- function ev(e, M) {
- var K = ie(e) ? mr : ec;
- return K(e, Qs(qt(M, 3)));
- }
- function iv(e) {
- var M = ie(e) ? Kh : $g;
- return M(e);
- }
- function rv(e, M, K) {
- (K ? ei(e, M, K) : M === C) ? M = 1 : M = se(M);
- var st = ie(e) ? kg : Zg;
- return st(e, M);
- }
- function nv(e) {
- var M = ie(e) ? Ag : Jg;
- return M(e);
- }
- function sv(e) {
- if (e == null)
- return 0;
- if (ni(e))
- return eo(e) ? rn(e) : e.length;
- var M = Ke(e);
- return M == it || M == ht ? e.size : ya(e).length;
- }
- function ov(e, M, K) {
- var st = ie(e) ? Qo : qg;
- return K && ei(e, M, K) && (M = C), st(e, qt(M, 3));
- }
- var av = le(function(e, M) {
- if (e == null)
- return [];
- var K = M.length;
- return K > 1 && ei(e, M[0], M[1]) ? M = [] : K > 2 && ei(M[0], M[1], M[2]) && (M = [M[0]]), pc(e, Ve(M, 1), []);
- }), Js = zf || function() {
- return Ue.Date.now();
- };
- function lv(e, M) {
- if (typeof M != "function")
- throw new xi(_);
- return e = se(e), function() {
- if (--e < 1)
- return M.apply(this, arguments);
- };
- }
- function sp(e, M, K) {
- return M = K ? C : M, M = e && M == null ? e.length : M, Qi(e, v, C, C, C, C, M);
- }
- function op(e, M) {
- var K;
- if (typeof M != "function")
- throw new xi(_);
- return e = se(e), function() {
- return --e > 0 && (K = M.apply(this, arguments)), e <= 1 && (M = C), K;
- };
- }
- var za = le(function(e, M, K) {
- var st = l;
- if (K.length) {
- var ut = vr(K, pn(za));
- st |= b;
- }
- return Qi(e, st, M, K, ut);
- }), ap = le(function(e, M, K) {
- var st = l | T;
- if (K.length) {
- var ut = vr(K, pn(ap));
- st |= b;
- }
- return Qi(M, st, e, K, ut);
- });
- function lp(e, M, K) {
- M = K ? C : M;
- var st = Qi(e, R, C, C, C, C, C, M);
- return st.placeholder = lp.placeholder, st;
- }
- function hp(e, M, K) {
- M = K ? C : M;
- var st = Qi(e, k, C, C, C, C, C, M);
- return st.placeholder = hp.placeholder, st;
- }
- function cp(e, M, K) {
- var st, ut, mt, xt, bt, Mt, It = 0, Rt = !1, Bt = !1, zt = !0;
- if (typeof e != "function")
- throw new xi(_);
- M = Ci(M) || 0, Ie(K) && (Rt = !!K.leading, Bt = "maxWait" in K, mt = Bt ? Xe(Ci(K.maxWait) || 0, M) : mt, zt = "trailing" in K ? !!K.trailing : zt);
- function Ut(je) {
- var Di = st, nr = ut;
- return st = ut = C, It = je, xt = e.apply(nr, Di), xt;
- }
- function Qt(je) {
- return It = je, bt = Vn(he, M), Rt ? Ut(je) : xt;
- }
- function ae(je) {
- var Di = je - Mt, nr = je - It, Ep = M - Di;
- return Bt ? Ze(Ep, mt - nr) : Ep;
- }
- function te(je) {
- var Di = je - Mt, nr = je - It;
- return Mt === C || Di >= M || Di < 0 || Bt && nr >= mt;
- }
- function he() {
- var je = Js();
- if (te(je))
- return ue(je);
- bt = Vn(he, ae(je));
- }
- function ue(je) {
- return bt = C, zt && st ? Ut(je) : (st = ut = C, xt);
- }
- function di() {
- bt !== C && bc(bt), It = 0, st = Mt = ut = bt = C;
- }
- function ii() {
- return bt === C ? xt : ue(Js());
- }
- function fi() {
- var je = Js(), Di = te(je);
- if (st = arguments, ut = this, Mt = je, Di) {
- if (bt === C)
- return Qt(Mt);
- if (Bt)
- return bc(bt), bt = Vn(he, M), Ut(Mt);
- }
- return bt === C && (bt = Vn(he, M)), xt;
- }
- return fi.cancel = di, fi.flush = ii, fi;
- }
- var hv = le(function(e, M) {
- return Qh(e, 1, M);
- }), cv = le(function(e, M, K) {
- return Qh(e, Ci(M) || 0, K);
- });
- function pv(e) {
- return Qi(e, c);
- }
- function qs(e, M) {
- if (typeof e != "function" || M != null && typeof M != "function")
- throw new xi(_);
- var K = function() {
- var st = arguments, ut = M ? M.apply(this, st) : st[0], mt = K.cache;
- if (mt.has(ut))
- return mt.get(ut);
- var xt = e.apply(this, st);
- return K.cache = mt.set(ut, xt) || mt, xt;
- };
- return K.cache = new (qs.Cache || Ji)(), K;
- }
- qs.Cache = Ji;
- function Qs(e) {
- if (typeof e != "function")
- throw new xi(_);
- return function() {
- var M = arguments;
- switch (M.length) {
- case 0:
- return !e.call(this);
- case 1:
- return !e.call(this, M[0]);
- case 2:
- return !e.call(this, M[0], M[1]);
- case 3:
- return !e.call(this, M[0], M[1], M[2]);
- }
- return !e.apply(this, M);
- };
- }
- function uv(e) {
- return op(2, e);
- }
- var dv = Qg(function(e, M) {
- M = M.length == 1 && ie(M[0]) ? Ee(M[0], ci(qt())) : Ee(Ve(M, 1), ci(qt()));
- var K = M.length;
- return le(function(st) {
- for (var ut = -1, mt = Ze(st.length, K); ++ut < mt; )
- st[ut] = M[ut].call(this, st[ut]);
- return hi(e, this, st);
- });
- }), Xa = le(function(e, M) {
- var K = vr(M, pn(Xa));
- return Qi(e, b, C, M, K);
- }), pp = le(function(e, M) {
- var K = vr(M, pn(pp));
- return Qi(e, S, C, M, K);
- }), fv = tr(function(e, M) {
- return Qi(e, h, C, C, C, M);
- });
- function gv(e, M) {
- if (typeof e != "function")
- throw new xi(_);
- return M = M === C ? M : se(M), le(e, M);
- }
- function mv(e, M) {
- if (typeof e != "function")
- throw new xi(_);
- return M = M == null ? 0 : Xe(se(M), 0), le(function(K) {
- var st = K[M], ut = Mr(K, 0, M);
- return st && yr(ut, st), hi(e, this, ut);
- });
- }
- function yv(e, M, K) {
- var st = !0, ut = !0;
- if (typeof e != "function")
- throw new xi(_);
- return Ie(K) && (st = "leading" in K ? !!K.leading : st, ut = "trailing" in K ? !!K.trailing : ut), cp(e, M, {
- leading: st,
- maxWait: M,
- trailing: ut
- });
- }
- function vv(e) {
- return sp(e, 1);
- }
- function xv(e, M) {
- return Xa(Aa(M), e);
- }
- function bv() {
- if (!arguments.length)
- return [];
- var e = arguments[0];
- return ie(e) ? e : [e];
- }
- function Sv(e) {
- return Si(e, w);
- }
- function wv(e, M) {
- return M = typeof M == "function" ? M : C, Si(e, w, M);
- }
- function Mv(e) {
- return Si(e, B | w);
- }
- function Cv(e, M) {
- return M = typeof M == "function" ? M : C, Si(e, B | w, M);
- }
- function kv(e, M) {
- return M == null || qh(e, M, He(M));
- }
- function _i(e, M) {
- return e === M || e !== e && M !== M;
- }
- var Av = Fs(fa), Tv = Fs(function(e, M) {
- return e >= M;
- }), zr = nc(function() {
- return arguments;
- }()) ? nc : function(e) {
- return Ne(e) && Se.call(e, "callee") && !Hh.call(e, "callee");
- }, ie = Tt.isArray, Pv = kh ? ci(kh) : Ng;
- function ni(e) {
- return e != null && to(e.length) && !ir(e);
- }
- function Be(e) {
- return Ne(e) && ni(e);
- }
- function Ev(e) {
- return e === !0 || e === !1 || Ne(e) && ti(e) == Q;
- }
- var Cr = Gf || Qa, Ov = Ah ? ci(Ah) : Bg;
- function Lv(e) {
- return Ne(e) && e.nodeType === 1 && !$n(e);
- }
- function _v(e) {
- if (e == null)
- return !0;
- if (ni(e) && (ie(e) || typeof e == "string" || typeof e.splice == "function" || Cr(e) || un(e) || zr(e)))
- return !e.length;
- var M = Ke(e);
- if (M == it || M == ht)
- return !e.size;
- if (Un(e))
- return !ya(e).length;
- for (var K in e)
- if (Se.call(e, K))
- return !1;
- return !0;
- }
- function Dv(e, M) {
- return Gn(e, M);
- }
- function Iv(e, M, K) {
- K = typeof K == "function" ? K : C;
- var st = K ? K(e, M) : C;
- return st === C ? Gn(e, M, C, K) : !!st;
- }
- function Ga(e) {
- if (!Ne(e))
- return !1;
- var M = ti(e);
- return M == Y || M == H || typeof e.message == "string" && typeof e.name == "string" && !$n(e);
- }
- function Rv(e) {
- return typeof e == "number" && Uh(e);
- }
- function ir(e) {
- if (!Ie(e))
- return !1;
- var M = ti(e);
- return M == Z || M == q || M == $ || M == gt;
- }
- function up(e) {
- return typeof e == "number" && e == se(e);
- }
- function to(e) {
- return typeof e == "number" && e > -1 && e % 1 == 0 && e <= D;
- }
- function Ie(e) {
- var M = typeof e;
- return e != null && (M == "object" || M == "function");
- }
- function Ne(e) {
- return e != null && typeof e == "object";
- }
- var dp = Th ? ci(Th) : Wg;
- function Nv(e, M) {
- return e === M || ma(e, M, Da(M));
- }
- function Bv(e, M, K) {
- return K = typeof K == "function" ? K : C, ma(e, M, Da(M), K);
- }
- function jv(e) {
- return fp(e) && e != +e;
- }
- function Wv(e) {
- if (wm(e))
- throw new ee(N);
- return sc(e);
- }
- function Yv(e) {
- return e === null;
- }
- function zv(e) {
- return e == null;
- }
- function fp(e) {
- return typeof e == "number" || Ne(e) && ti(e) == et;
- }
- function $n(e) {
- if (!Ne(e) || ti(e) != rt)
- return !1;
- var M = Ts(e);
- if (M === null)
- return !0;
- var K = Se.call(M, "constructor") && M.constructor;
- return typeof K == "function" && K instanceof K && Ms.call(K) == Bf;
- }
- var Ha = Ph ? ci(Ph) : Yg;
- function Xv(e) {
- return up(e) && e >= -D && e <= D;
- }
- var gp = Eh ? ci(Eh) : zg;
- function eo(e) {
- return typeof e == "string" || !ie(e) && Ne(e) && ti(e) == at;
- }
- function ui(e) {
- return typeof e == "symbol" || Ne(e) && ti(e) == J;
- }
- var un = Oh ? ci(Oh) : Xg;
- function Gv(e) {
- return e === C;
- }
- function Hv(e) {
- return Ne(e) && Ke(e) == ot;
- }
- function Fv(e) {
- return Ne(e) && ti(e) == lt;
- }
- var Uv = Fs(va), Vv = Fs(function(e, M) {
- return e <= M;
- });
- function mp(e) {
- if (!e)
- return [];
- if (ni(e))
- return eo(e) ? Oi(e) : ri(e);
- if (Rn && e[Rn])
- return kf(e[Rn]());
- var M = Ke(e), K = M == it ? sa : M == ht ? bs : dn;
- return K(e);
- }
- function rr(e) {
- if (!e)
- return e === 0 ? e : 0;
- if (e = Ci(e), e === P || e === -P) {
- var M = e < 0 ? -1 : 1;
- return M * I;
- }
- return e === e ? e : 0;
- }
- function se(e) {
- var M = rr(e), K = M % 1;
- return M === M ? K ? M - K : M : 0;
- }
- function yp(e) {
- return e ? Br(se(e), 0, E) : 0;
- }
- function Ci(e) {
- if (typeof e == "number")
- return e;
- if (ui(e))
- return W;
- if (Ie(e)) {
- var M = typeof e.valueOf == "function" ? e.valueOf() : e;
- e = Ie(M) ? M + "" : M;
- }
- if (typeof e != "string")
- return e === 0 ? e : +e;
- e = Nh(e);
- var K = Re.test(e);
- return K || qr.test(e) ? lf(e.slice(2), K ? 2 : 8) : ge.test(e) ? W : +e;
- }
- function vp(e) {
- return Hi(e, si(e));
- }
- function $v(e) {
- return e ? Br(se(e), -D, D) : e === 0 ? e : 0;
- }
- function xe(e) {
- return e == null ? "" : pi(e);
- }
- var Zv = hn(function(e, M) {
- if (Un(M) || ni(M)) {
- Hi(M, He(M), e);
- return;
- }
- for (var K in M)
- Se.call(M, K) && Yn(e, K, M[K]);
- }), xp = hn(function(e, M) {
- Hi(M, si(M), e);
- }), io = hn(function(e, M, K, st) {
- Hi(M, si(M), e, st);
- }), Kv = hn(function(e, M, K, st) {
- Hi(M, He(M), e, st);
- }), Jv = tr(pa);
- function qv(e, M) {
- var K = ln(e);
- return M == null ? K : Jh(K, M);
- }
- var Qv = le(function(e, M) {
- e = Ce(e);
- var K = -1, st = M.length, ut = st > 2 ? M[2] : C;
- for (ut && ei(M[0], M[1], ut) && (st = 1); ++K < st; )
- for (var mt = M[K], xt = si(mt), bt = -1, Mt = xt.length; ++bt < Mt; ) {
- var It = xt[bt], Rt = e[It];
- (Rt === C || _i(Rt, sn[It]) && !Se.call(e, It)) && (e[It] = mt[It]);
- }
- return e;
- }), tx = le(function(e) {
- return e.push(C, Nc), hi(bp, C, e);
- });
- function ex(e, M) {
- return _h(e, qt(M, 3), Gi);
- }
- function ix(e, M) {
- return _h(e, qt(M, 3), da);
- }
- function rx(e, M) {
- return e == null ? e : ua(e, qt(M, 3), si);
- }
- function nx(e, M) {
- return e == null ? e : ic(e, qt(M, 3), si);
- }
- function sx(e, M) {
- return e && Gi(e, qt(M, 3));
- }
- function ox(e, M) {
- return e && da(e, qt(M, 3));
- }
- function ax(e) {
- return e == null ? [] : Bs(e, He(e));
- }
- function lx(e) {
- return e == null ? [] : Bs(e, si(e));
- }
- function Fa(e, M, K) {
- var st = e == null ? C : jr(e, M);
- return st === C ? K : st;
- }
- function hx(e, M) {
- return e != null && Wc(e, M, _g);
- }
- function Ua(e, M) {
- return e != null && Wc(e, M, Dg);
- }
- var cx = Lc(function(e, M, K) {
- M != null && typeof M.toString != "function" && (M = Cs.call(M)), e[M] = K;
- }, $a(oi)), px = Lc(function(e, M, K) {
- M != null && typeof M.toString != "function" && (M = Cs.call(M)), Se.call(e, M) ? e[M].push(K) : e[M] = [K];
- }, qt), ux = le(Xn);
- function He(e) {
- return ni(e) ? Zh(e) : ya(e);
- }
- function si(e) {
- return ni(e) ? Zh(e, !0) : Gg(e);
- }
- function dx(e, M) {
- var K = {};
- return M = qt(M, 3), Gi(e, function(st, ut, mt) {
- qi(K, M(st, ut, mt), st);
- }), K;
- }
- function fx(e, M) {
- var K = {};
- return M = qt(M, 3), Gi(e, function(st, ut, mt) {
- qi(K, ut, M(st, ut, mt));
- }), K;
- }
- var gx = hn(function(e, M, K) {
- js(e, M, K);
- }), bp = hn(function(e, M, K, st) {
- js(e, M, K, st);
- }), mx = tr(function(e, M) {
- var K = {};
- if (e == null)
- return K;
- var st = !1;
- M = Ee(M, function(mt) {
- return mt = wr(mt, e), st || (st = mt.length > 1), mt;
- }), Hi(e, La(e), K), st && (K = Si(K, B | j | w, cm));
- for (var ut = M.length; ut--; )
- Ma(K, M[ut]);
- return K;
- });
- function yx(e, M) {
- return Sp(e, Qs(qt(M)));
- }
- var vx = tr(function(e, M) {
- return e == null ? {} : Fg(e, M);
- });
- function Sp(e, M) {
- if (e == null)
- return {};
- var K = Ee(La(e), function(st) {
- return [st];
- });
- return M = qt(M), uc(e, K, function(st, ut) {
- return M(st, ut[0]);
- });
- }
- function xx(e, M, K) {
- M = wr(M, e);
- var st = -1, ut = M.length;
- for (ut || (ut = 1, e = C); ++st < ut; ) {
- var mt = e == null ? C : e[Fi(M[st])];
- mt === C && (st = ut, mt = K), e = ir(mt) ? mt.call(e) : mt;
- }
- return e;
- }
- function bx(e, M, K) {
- return e == null ? e : Hn(e, M, K);
- }
- function Sx(e, M, K, st) {
- return st = typeof st == "function" ? st : C, e == null ? e : Hn(e, M, K, st);
- }
- var wp = Ic(He), Mp = Ic(si);
- function wx(e, M, K) {
- var st = ie(e), ut = st || Cr(e) || un(e);
- if (M = qt(M, 4), K == null) {
- var mt = e && e.constructor;
- ut ? K = st ? new mt() : [] : Ie(e) ? K = ir(mt) ? ln(Ts(e)) : {} : K = {};
- }
- return (ut ? vi : Gi)(e, function(xt, bt, Mt) {
- return M(K, xt, bt, Mt);
- }), K;
- }
- function Mx(e, M) {
- return e == null ? !0 : Ma(e, M);
- }
- function Cx(e, M, K) {
- return e == null ? e : yc(e, M, Aa(K));
- }
- function kx(e, M, K, st) {
- return st = typeof st == "function" ? st : C, e == null ? e : yc(e, M, Aa(K), st);
- }
- function dn(e) {
- return e == null ? [] : na(e, He(e));
- }
- function Ax(e) {
- return e == null ? [] : na(e, si(e));
- }
- function Tx(e, M, K) {
- return K === C && (K = M, M = C), K !== C && (K = Ci(K), K = K === K ? K : 0), M !== C && (M = Ci(M), M = M === M ? M : 0), Br(Ci(e), M, K);
- }
- function Px(e, M, K) {
- return M = rr(M), K === C ? (K = M, M = 0) : K = rr(K), e = Ci(e), Ig(e, M, K);
- }
- function Ex(e, M, K) {
- if (K && typeof K != "boolean" && ei(e, M, K) && (M = K = C), K === C && (typeof M == "boolean" ? (K = M, M = C) : typeof e == "boolean" && (K = e, e = C)), e === C && M === C ? (e = 0, M = 1) : (e = rr(e), M === C ? (M = e, e = 0) : M = rr(M)), e > M) {
- var st = e;
- e = M, M = st;
- }
- if (K || e % 1 || M % 1) {
- var ut = Vh();
- return Ze(e + ut * (M - e + af("1e-" + ((ut + "").length - 1))), M);
- }
- return ba(e, M);
- }
- var Ox = cn(function(e, M, K) {
- return M = M.toLowerCase(), e + (K ? Cp(M) : M);
- });
- function Cp(e) {
- return Va(xe(e).toLowerCase());
- }
- function kp(e) {
- return e = xe(e), e && e.replace(Ld, bf).replace(Kd, "");
- }
- function Lx(e, M, K) {
- e = xe(e), M = pi(M);
- var st = e.length;
- K = K === C ? st : Br(se(K), 0, st);
- var ut = K;
- return K -= M.length, K >= 0 && e.slice(K, ut) == M;
- }
- function _x(e) {
- return e = xe(e), e && Vt.test(e) ? e.replace(be, Sf) : e;
- }
- function Dx(e) {
- return e = xe(e), e && _n.test(e) ? e.replace(Ln, "\\$&") : e;
- }
- var Ix = cn(function(e, M, K) {
- return e + (K ? "-" : "") + M.toLowerCase();
- }), Rx = cn(function(e, M, K) {
- return e + (K ? " " : "") + M.toLowerCase();
- }), Nx = Pc("toLowerCase");
- function Bx(e, M, K) {
- e = xe(e), M = se(M);
- var st = M ? rn(e) : 0;
- if (!M || st >= M)
- return e;
- var ut = (M - st) / 2;
- return Hs(Ls(ut), K) + e + Hs(Os(ut), K);
- }
- function jx(e, M, K) {
- e = xe(e), M = se(M);
- var st = M ? rn(e) : 0;
- return M && st < M ? e + Hs(M - st, K) : e;
- }
- function Wx(e, M, K) {
- e = xe(e), M = se(M);
- var st = M ? rn(e) : 0;
- return M && st < M ? Hs(M - st, K) + e : e;
- }
- function Yx(e, M, K) {
- return K || M == null ? M = 0 : M && (M = +M), Vf(xe(e).replace(Jr, ""), M || 0);
- }
- function zx(e, M, K) {
- return (K ? ei(e, M, K) : M === C) ? M = 1 : M = se(M), Sa(xe(e), M);
- }
- function Xx() {
- var e = arguments, M = xe(e[0]);
- return e.length < 3 ? M : M.replace(e[1], e[2]);
- }
- var Gx = cn(function(e, M, K) {
- return e + (K ? "_" : "") + M.toLowerCase();
- });
- function Hx(e, M, K) {
- return K && typeof K != "number" && ei(e, M, K) && (M = K = C), K = K === C ? E : K >>> 0, K ? (e = xe(e), e && (typeof M == "string" || M != null && !Ha(M)) && (M = pi(M), !M && en(e)) ? Mr(Oi(e), 0, K) : e.split(M, K)) : [];
- }
- var Fx = cn(function(e, M, K) {
- return e + (K ? " " : "") + Va(M);
- });
- function Ux(e, M, K) {
- return e = xe(e), K = K == null ? 0 : Br(se(K), 0, e.length), M = pi(M), e.slice(K, K + M.length) == M;
- }
- function Vx(e, M, K) {
- var st = ft.templateSettings;
- K && ei(e, M, K) && (M = C), e = xe(e), M = io({}, M, st, Rc);
- var ut = io({}, M.imports, st.imports, Rc), mt = He(ut), xt = na(ut, mt), bt, Mt, It = 0, Rt = M.interpolate || gs, Bt = "__p += '", zt = oa(
- (M.escape || gs).source + "|" + Rt.source + "|" + (Rt === us ? $t : gs).source + "|" + (M.evaluate || gs).source + "|$",
- "g"
- ), Ut = "//# sourceURL=" + (Se.call(M, "sourceURL") ? (M.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++ef + "]") + `
- `;
- e.replace(zt, function(te, he, ue, di, ii, fi) {
- return ue || (ue = di), Bt += e.slice(It, fi).replace(_d, wf), he && (bt = !0, Bt += `' +
- __e(` + he + `) +
- '`), ii && (Mt = !0, Bt += `';
- ` + ii + `;
- __p += '`), ue && (Bt += `' +
- ((__t = (` + ue + `)) == null ? '' : __t) +
- '`), It = fi + te.length, te;
- }), Bt += `';
- `;
- var Qt = Se.call(M, "variable") && M.variable;
- if (!Qt)
- Bt = `with (obj) {
- ` + Bt + `
- }
- `;
- else if (Dn.test(Qt))
- throw new ee(U);
- Bt = (Mt ? Bt.replace(Kt, "") : Bt).replace(Gt, "$1").replace(Wt, "$1;"), Bt = "function(" + (Qt || "obj") + `) {
- ` + (Qt ? "" : `obj || (obj = {});
- `) + "var __t, __p = ''" + (bt ? ", __e = _.escape" : "") + (Mt ? `, __j = Array.prototype.join;
- function print() { __p += __j.call(arguments, '') }
- ` : `;
- `) + Bt + `return __p
- }`;
- var ae = Tp(function() {
- return ve(mt, Ut + "return " + Bt).apply(C, xt);
- });
- if (ae.source = Bt, Ga(ae))
- throw ae;
- return ae;
- }
- function $x(e) {
- return xe(e).toLowerCase();
- }
- function Zx(e) {
- return xe(e).toUpperCase();
- }
- function Kx(e, M, K) {
- if (e = xe(e), e && (K || M === C))
- return Nh(e);
- if (!e || !(M = pi(M)))
- return e;
- var st = Oi(e), ut = Oi(M), mt = Bh(st, ut), xt = jh(st, ut) + 1;
- return Mr(st, mt, xt).join("");
- }
- function Jx(e, M, K) {
- if (e = xe(e), e && (K || M === C))
- return e.slice(0, Yh(e) + 1);
- if (!e || !(M = pi(M)))
- return e;
- var st = Oi(e), ut = jh(st, Oi(M)) + 1;
- return Mr(st, 0, ut).join("");
- }
- function qx(e, M, K) {
- if (e = xe(e), e && (K || M === C))
- return e.replace(Jr, "");
- if (!e || !(M = pi(M)))
- return e;
- var st = Oi(e), ut = Bh(st, Oi(M));
- return Mr(st, ut).join("");
- }
- function Qx(e, M) {
- var K = u, st = i;
- if (Ie(M)) {
- var ut = "separator" in M ? M.separator : ut;
- K = "length" in M ? se(M.length) : K, st = "omission" in M ? pi(M.omission) : st;
- }
- e = xe(e);
- var mt = e.length;
- if (en(e)) {
- var xt = Oi(e);
- mt = xt.length;
- }
- if (K >= mt)
- return e;
- var bt = K - rn(st);
- if (bt < 1)
- return st;
- var Mt = xt ? Mr(xt, 0, bt).join("") : e.slice(0, bt);
- if (ut === C)
- return Mt + st;
- if (xt && (bt += Mt.length - bt), Ha(ut)) {
- if (e.slice(bt).search(ut)) {
- var It, Rt = Mt;
- for (ut.global || (ut = oa(ut.source, xe(de.exec(ut)) + "g")), ut.lastIndex = 0; It = ut.exec(Rt); )
- var Bt = It.index;
- Mt = Mt.slice(0, Bt === C ? bt : Bt);
- }
- } else if (e.indexOf(pi(ut), bt) != bt) {
- var zt = Mt.lastIndexOf(ut);
- zt > -1 && (Mt = Mt.slice(0, zt));
- }
- return Mt + st;
- }
- function t0(e) {
- return e = xe(e), e && Yt.test(e) ? e.replace(Jt, Ef) : e;
- }
- var e0 = cn(function(e, M, K) {
- return e + (K ? " " : "") + M.toUpperCase();
- }), Va = Pc("toUpperCase");
- function Ap(e, M, K) {
- return e = xe(e), M = K ? C : M, M === C ? Cf(e) ? _f(e) : gf(e) : e.match(M) || [];
- }
- var Tp = le(function(e, M) {
- try {
- return hi(e, C, M);
- } catch (K) {
- return Ga(K) ? K : new ee(K);
- }
- }), i0 = tr(function(e, M) {
- return vi(M, function(K) {
- K = Fi(K), qi(e, K, za(e[K], e));
- }), e;
- });
- function r0(e) {
- var M = e == null ? 0 : e.length, K = qt();
- return e = M ? Ee(e, function(st) {
- if (typeof st[1] != "function")
- throw new xi(_);
- return [K(st[0]), st[1]];
- }) : [], le(function(st) {
- for (var ut = -1; ++ut < M; ) {
- var mt = e[ut];
- if (hi(mt[0], this, st))
- return hi(mt[1], this, st);
- }
- });
- }
- function n0(e) {
- return Eg(Si(e, B));
- }
- function $a(e) {
- return function() {
- return e;
- };
- }
- function s0(e, M) {
- return e == null || e !== e ? M : e;
- }
- var o0 = Oc(), a0 = Oc(!0);
- function oi(e) {
- return e;
- }
- function Za(e) {
- return oc(typeof e == "function" ? e : Si(e, B));
- }
- function l0(e) {
- return lc(Si(e, B));
- }
- function h0(e, M) {
- return hc(e, Si(M, B));
- }
- var c0 = le(function(e, M) {
- return function(K) {
- return Xn(K, e, M);
- };
- }), p0 = le(function(e, M) {
- return function(K) {
- return Xn(e, K, M);
- };
- });
- function Ka(e, M, K) {
- var st = He(M), ut = Bs(M, st);
- K == null && !(Ie(M) && (ut.length || !st.length)) && (K = M, M = e, e = this, ut = Bs(M, He(M)));
- var mt = !(Ie(K) && "chain" in K) || !!K.chain, xt = ir(e);
- return vi(ut, function(bt) {
- var Mt = M[bt];
- e[bt] = Mt, xt && (e.prototype[bt] = function() {
- var It = this.__chain__;
- if (mt || It) {
- var Rt = e(this.__wrapped__), Bt = Rt.__actions__ = ri(this.__actions__);
- return Bt.push({ func: Mt, args: arguments, thisArg: e }), Rt.__chain__ = It, Rt;
- }
- return Mt.apply(e, yr([this.value()], arguments));
- });
- }), e;
- }
- function u0() {
- return Ue._ === this && (Ue._ = jf), this;
- }
- function Ja() {
- }
- function d0(e) {
- return e = se(e), le(function(M) {
- return cc(M, e);
- });
- }
- var f0 = Pa(Ee), g0 = Pa(Lh), m0 = Pa(Qo);
- function Pp(e) {
- return Ra(e) ? ta(Fi(e)) : Ug(e);
- }
- function y0(e) {
- return function(M) {
- return e == null ? C : jr(e, M);
- };
- }
- var v0 = _c(), x0 = _c(!0);
- function qa() {
- return [];
- }
- function Qa() {
- return !1;
- }
- function b0() {
- return {};
- }
- function S0() {
- return "";
- }
- function w0() {
- return !0;
- }
- function M0(e, M) {
- if (e = se(e), e < 1 || e > D)
- return [];
- var K = E, st = Ze(e, E);
- M = qt(M), e -= E;
- for (var ut = ra(st, M); ++K < e; )
- M(K);
- return ut;
- }
- function C0(e) {
- return ie(e) ? Ee(e, Fi) : ui(e) ? [e] : ri($c(xe(e)));
- }
- function k0(e) {
- var M = ++Nf;
- return xe(e) + M;
- }
- var A0 = Gs(function(e, M) {
- return e + M;
- }, 0), T0 = Ea("ceil"), P0 = Gs(function(e, M) {
- return e / M;
- }, 1), E0 = Ea("floor");
- function O0(e) {
- return e && e.length ? Ns(e, oi, fa) : C;
- }
- function L0(e, M) {
- return e && e.length ? Ns(e, qt(M, 2), fa) : C;
- }
- function _0(e) {
- return Ih(e, oi);
- }
- function D0(e, M) {
- return Ih(e, qt(M, 2));
- }
- function I0(e) {
- return e && e.length ? Ns(e, oi, va) : C;
- }
- function R0(e, M) {
- return e && e.length ? Ns(e, qt(M, 2), va) : C;
- }
- var N0 = Gs(function(e, M) {
- return e * M;
- }, 1), B0 = Ea("round"), j0 = Gs(function(e, M) {
- return e - M;
- }, 0);
- function W0(e) {
- return e && e.length ? ia(e, oi) : 0;
- }
- function Y0(e, M) {
- return e && e.length ? ia(e, qt(M, 2)) : 0;
- }
- return ft.after = lv, ft.ary = sp, ft.assign = Zv, ft.assignIn = xp, ft.assignInWith = io, ft.assignWith = Kv, ft.at = Jv, ft.before = op, ft.bind = za, ft.bindAll = i0, ft.bindKey = ap, ft.castArray = bv, ft.chain = ip, ft.chunk = Em, ft.compact = Om, ft.concat = Lm, ft.cond = r0, ft.conforms = n0, ft.constant = $a, ft.countBy = Wy, ft.create = qv, ft.curry = lp, ft.curryRight = hp, ft.debounce = cp, ft.defaults = Qv, ft.defaultsDeep = tx, ft.defer = hv, ft.delay = cv, ft.difference = _m, ft.differenceBy = Dm, ft.differenceWith = Im, ft.drop = Rm, ft.dropRight = Nm, ft.dropRightWhile = Bm, ft.dropWhile = jm, ft.fill = Wm, ft.filter = zy, ft.flatMap = Hy, ft.flatMapDeep = Fy, ft.flatMapDepth = Uy, ft.flatten = qc, ft.flattenDeep = Ym, ft.flattenDepth = zm, ft.flip = pv, ft.flow = o0, ft.flowRight = a0, ft.fromPairs = Xm, ft.functions = ax, ft.functionsIn = lx, ft.groupBy = Vy, ft.initial = Hm, ft.intersection = Fm, ft.intersectionBy = Um, ft.intersectionWith = Vm, ft.invert = cx, ft.invertBy = px, ft.invokeMap = Zy, ft.iteratee = Za, ft.keyBy = Ky, ft.keys = He, ft.keysIn = si, ft.map = Ks, ft.mapKeys = dx, ft.mapValues = fx, ft.matches = l0, ft.matchesProperty = h0, ft.memoize = qs, ft.merge = gx, ft.mergeWith = bp, ft.method = c0, ft.methodOf = p0, ft.mixin = Ka, ft.negate = Qs, ft.nthArg = d0, ft.omit = mx, ft.omitBy = yx, ft.once = uv, ft.orderBy = Jy, ft.over = f0, ft.overArgs = dv, ft.overEvery = g0, ft.overSome = m0, ft.partial = Xa, ft.partialRight = pp, ft.partition = qy, ft.pick = vx, ft.pickBy = Sp, ft.property = Pp, ft.propertyOf = y0, ft.pull = Jm, ft.pullAll = tp, ft.pullAllBy = qm, ft.pullAllWith = Qm, ft.pullAt = ty, ft.range = v0, ft.rangeRight = x0, ft.rearg = fv, ft.reject = ev, ft.remove = ey, ft.rest = gv, ft.reverse = Wa, ft.sampleSize = rv, ft.set = bx, ft.setWith = Sx, ft.shuffle = nv, ft.slice = iy, ft.sortBy = av, ft.sortedUniq = hy, ft.sortedUniqBy = cy, ft.split = Hx, ft.spread = mv, ft.tail = py, ft.take = uy, ft.takeRight = dy, ft.takeRightWhile = fy, ft.takeWhile = gy, ft.tap = Oy, ft.throttle = yv, ft.thru = Zs, ft.toArray = mp, ft.toPairs = wp, ft.toPairsIn = Mp, ft.toPath = C0, ft.toPlainObject = vp, ft.transform = wx, ft.unary = vv, ft.union = my, ft.unionBy = yy, ft.unionWith = vy, ft.uniq = xy, ft.uniqBy = by, ft.uniqWith = Sy, ft.unset = Mx, ft.unzip = Ya, ft.unzipWith = ep, ft.update = Cx, ft.updateWith = kx, ft.values = dn, ft.valuesIn = Ax, ft.without = wy, ft.words = Ap, ft.wrap = xv, ft.xor = My, ft.xorBy = Cy, ft.xorWith = ky, ft.zip = Ay, ft.zipObject = Ty, ft.zipObjectDeep = Py, ft.zipWith = Ey, ft.entries = wp, ft.entriesIn = Mp, ft.extend = xp, ft.extendWith = io, Ka(ft, ft), ft.add = A0, ft.attempt = Tp, ft.camelCase = Ox, ft.capitalize = Cp, ft.ceil = T0, ft.clamp = Tx, ft.clone = Sv, ft.cloneDeep = Mv, ft.cloneDeepWith = Cv, ft.cloneWith = wv, ft.conformsTo = kv, ft.deburr = kp, ft.defaultTo = s0, ft.divide = P0, ft.endsWith = Lx, ft.eq = _i, ft.escape = _x, ft.escapeRegExp = Dx, ft.every = Yy, ft.find = Xy, ft.findIndex = Kc, ft.findKey = ex, ft.findLast = Gy, ft.findLastIndex = Jc, ft.findLastKey = ix, ft.floor = E0, ft.forEach = rp, ft.forEachRight = np, ft.forIn = rx, ft.forInRight = nx, ft.forOwn = sx, ft.forOwnRight = ox, ft.get = Fa, ft.gt = Av, ft.gte = Tv, ft.has = hx, ft.hasIn = Ua, ft.head = Qc, ft.identity = oi, ft.includes = $y, ft.indexOf = Gm, ft.inRange = Px, ft.invoke = ux, ft.isArguments = zr, ft.isArray = ie, ft.isArrayBuffer = Pv, ft.isArrayLike = ni, ft.isArrayLikeObject = Be, ft.isBoolean = Ev, ft.isBuffer = Cr, ft.isDate = Ov, ft.isElement = Lv, ft.isEmpty = _v, ft.isEqual = Dv, ft.isEqualWith = Iv, ft.isError = Ga, ft.isFinite = Rv, ft.isFunction = ir, ft.isInteger = up, ft.isLength = to, ft.isMap = dp, ft.isMatch = Nv, ft.isMatchWith = Bv, ft.isNaN = jv, ft.isNative = Wv, ft.isNil = zv, ft.isNull = Yv, ft.isNumber = fp, ft.isObject = Ie, ft.isObjectLike = Ne, ft.isPlainObject = $n, ft.isRegExp = Ha, ft.isSafeInteger = Xv, ft.isSet = gp, ft.isString = eo, ft.isSymbol = ui, ft.isTypedArray = un, ft.isUndefined = Gv, ft.isWeakMap = Hv, ft.isWeakSet = Fv, ft.join = $m, ft.kebabCase = Ix, ft.last = Mi, ft.lastIndexOf = Zm, ft.lowerCase = Rx, ft.lowerFirst = Nx, ft.lt = Uv, ft.lte = Vv, ft.max = O0, ft.maxBy = L0, ft.mean = _0, ft.meanBy = D0, ft.min = I0, ft.minBy = R0, ft.stubArray = qa, ft.stubFalse = Qa, ft.stubObject = b0, ft.stubString = S0, ft.stubTrue = w0, ft.multiply = N0, ft.nth = Km, ft.noConflict = u0, ft.noop = Ja, ft.now = Js, ft.pad = Bx, ft.padEnd = jx, ft.padStart = Wx, ft.parseInt = Yx, ft.random = Ex, ft.reduce = Qy, ft.reduceRight = tv, ft.repeat = zx, ft.replace = Xx, ft.result = xx, ft.round = B0, ft.runInContext = wt, ft.sample = iv, ft.size = sv, ft.snakeCase = Gx, ft.some = ov, ft.sortedIndex = ry, ft.sortedIndexBy = ny, ft.sortedIndexOf = sy, ft.sortedLastIndex = oy, ft.sortedLastIndexBy = ay, ft.sortedLastIndexOf = ly, ft.startCase = Fx, ft.startsWith = Ux, ft.subtract = j0, ft.sum = W0, ft.sumBy = Y0, ft.template = Vx, ft.times = M0, ft.toFinite = rr, ft.toInteger = se, ft.toLength = yp, ft.toLower = $x, ft.toNumber = Ci, ft.toSafeInteger = $v, ft.toString = xe, ft.toUpper = Zx, ft.trim = Kx, ft.trimEnd = Jx, ft.trimStart = qx, ft.truncate = Qx, ft.unescape = t0, ft.uniqueId = k0, ft.upperCase = e0, ft.upperFirst = Va, ft.each = rp, ft.eachRight = np, ft.first = Qc, Ka(ft, function() {
- var e = {};
- return Gi(ft, function(M, K) {
- Se.call(ft.prototype, K) || (e[K] = M);
- }), e;
- }(), { chain: !1 }), ft.VERSION = o, vi(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(e) {
- ft[e].placeholder = ft;
- }), vi(["drop", "take"], function(e, M) {
- ce.prototype[e] = function(K) {
- K = K === C ? 1 : Xe(se(K), 0);
- var st = this.__filtered__ && !M ? new ce(this) : this.clone();
- return st.__filtered__ ? st.__takeCount__ = Ze(K, st.__takeCount__) : st.__views__.push({
- size: Ze(K, E),
- type: e + (st.__dir__ < 0 ? "Right" : "")
- }), st;
- }, ce.prototype[e + "Right"] = function(K) {
- return this.reverse()[e](K).reverse();
- };
- }), vi(["filter", "map", "takeWhile"], function(e, M) {
- var K = M + 1, st = K == t || K == n;
- ce.prototype[e] = function(ut) {
- var mt = this.clone();
- return mt.__iteratees__.push({
- iteratee: qt(ut, 3),
- type: K
- }), mt.__filtered__ = mt.__filtered__ || st, mt;
- };
- }), vi(["head", "last"], function(e, M) {
- var K = "take" + (M ? "Right" : "");
- ce.prototype[e] = function() {
- return this[K](1).value()[0];
- };
- }), vi(["initial", "tail"], function(e, M) {
- var K = "drop" + (M ? "" : "Right");
- ce.prototype[e] = function() {
- return this.__filtered__ ? new ce(this) : this[K](1);
- };
- }), ce.prototype.compact = function() {
- return this.filter(oi);
- }, ce.prototype.find = function(e) {
- return this.filter(e).head();
- }, ce.prototype.findLast = function(e) {
- return this.reverse().find(e);
- }, ce.prototype.invokeMap = le(function(e, M) {
- return typeof e == "function" ? new ce(this) : this.map(function(K) {
- return Xn(K, e, M);
- });
- }), ce.prototype.reject = function(e) {
- return this.filter(Qs(qt(e)));
- }, ce.prototype.slice = function(e, M) {
- e = se(e);
- var K = this;
- return K.__filtered__ && (e > 0 || M < 0) ? new ce(K) : (e < 0 ? K = K.takeRight(-e) : e && (K = K.drop(e)), M !== C && (M = se(M), K = M < 0 ? K.dropRight(-M) : K.take(M - e)), K);
- }, ce.prototype.takeRightWhile = function(e) {
- return this.reverse().takeWhile(e).reverse();
- }, ce.prototype.toArray = function() {
- return this.take(E);
- }, Gi(ce.prototype, function(e, M) {
- var K = /^(?:filter|find|map|reject)|While$/.test(M), st = /^(?:head|last)$/.test(M), ut = ft[st ? "take" + (M == "last" ? "Right" : "") : M], mt = st || /^find/.test(M);
- ut && (ft.prototype[M] = function() {
- var xt = this.__wrapped__, bt = st ? [1] : arguments, Mt = xt instanceof ce, It = bt[0], Rt = Mt || ie(xt), Bt = function(he) {
- var ue = ut.apply(ft, yr([he], bt));
- return st && zt ? ue[0] : ue;
- };
- Rt && K && typeof It == "function" && It.length != 1 && (Mt = Rt = !1);
- var zt = this.__chain__, Ut = !!this.__actions__.length, Qt = mt && !zt, ae = Mt && !Ut;
- if (!mt && Rt) {
- xt = ae ? xt : new ce(this);
- var te = e.apply(xt, bt);
- return te.__actions__.push({ func: Zs, args: [Bt], thisArg: C }), new bi(te, zt);
- }
- return Qt && ae ? e.apply(this, bt) : (te = this.thru(Bt), Qt ? st ? te.value()[0] : te.value() : te);
- });
- }), vi(["pop", "push", "shift", "sort", "splice", "unshift"], function(e) {
- var M = Ss[e], K = /^(?:push|sort|unshift)$/.test(e) ? "tap" : "thru", st = /^(?:pop|shift)$/.test(e);
- ft.prototype[e] = function() {
- var ut = arguments;
- if (st && !this.__chain__) {
- var mt = this.value();
- return M.apply(ie(mt) ? mt : [], ut);
- }
- return this[K](function(xt) {
- return M.apply(ie(xt) ? xt : [], ut);
- });
- };
- }), Gi(ce.prototype, function(e, M) {
- var K = ft[M];
- if (K) {
- var st = K.name + "";
- Se.call(an, st) || (an[st] = []), an[st].push({ name: M, func: K });
- }
- }), an[Xs(C, T).name] = [{
- name: "wrapper",
- func: C
- }], ce.prototype.clone = tg, ce.prototype.reverse = eg, ce.prototype.value = ig, ft.prototype.at = Ly, ft.prototype.chain = _y, ft.prototype.commit = Dy, ft.prototype.next = Iy, ft.prototype.plant = Ny, ft.prototype.reverse = By, ft.prototype.toJSON = ft.prototype.valueOf = ft.prototype.value = jy, ft.prototype.first = ft.prototype.head, Rn && (ft.prototype[Rn] = Ry), ft;
- }, nn = Df();
- Dr ? ((Dr.exports = nn)._ = nn, Zo._ = nn) : Ue._ = nn;
- }).call(Gr);
- })(So, So.exports);
- var eM = So.exports;
- const ss = /* @__PURE__ */ Mn(eM);
- t1(Vr);
- J0(Vr);
- Z0(Vr);
- Q0(Vr);
- let ho = null, _e = Le(null), Fe = Le("zh"), ol = Le(""), re = Le(null);
- const kt = z0({
- //极值数据
- leftIndex: -1,
- //左侧上下限对应下标
- rightIndex: -1,
- //右侧上下限对应下标
- rightTwoIndex: -1,
- //右2上下限对应下标
- hasLeftAxis: !1,
- hasRightAxis: !1,
- hasRightTwoAxis: !1,
- hasXAxis: !1,
- leftMin: 0,
- leftMax: 0,
- rightMin: 0,
- rightMax: 0,
- rightTwoMin: 0,
- rightTwoMax: 0,
- xMin: 0,
- xMax: 0
- });
- let li = !1, Ju = Le(!1);
- const Zl = Le(document.body.clientWidth < 1200 ? "phone" : "pc");
- function iM() {
- return {
- options: re,
- axisLimitState: kt,
- chartRender: rM,
- setLimitData: CM,
- isUseSelfLimit: Ju
- };
- }
- function rM({ data: r, renderId: d, lang: C = "zh", changeLangIsCheck: o, showChartTitle: y = !0, shouldUseSelfLimit: N = !1 }) {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1, kt.hasLeftAxis = !1, kt.hasRightAxis = !1, kt.hasRightTwoAxis = !1, kt.hasXAxis = !1, Ju.value || (kt.leftMin = 0, kt.leftMax = 0, kt.rightMin = 0, kt.rightMax = 0, kt.rightTwoMin = 0, kt.rightTwoMax = 0, kt.xMin = 0, kt.xMax = 0);
- let _ = {};
- Fe.value = C, ol.value = d, _e.value = r, li = N, [1, 11, 12].includes(r.ChartInfo.Source) ? _ = {
- 1: Bp,
- 2: pM,
- 3: ll,
- 4: ll,
- 5: uM,
- 6: ll,
- 7: gM,
- 10: bM,
- 11: wM,
- 14: hM
- }[r.ChartInfo.ChartType](r) : [2, 5].includes(r.ChartInfo.Source) ? _ = vM(r) : [3].includes(r.ChartInfo.Source) ? _ = xM(r) : [4, 6, 7, 8].includes(r.ChartInfo.Source) ? _ = Bp(r) : [9].includes(r.ChartInfo.Source) ? _ = cM(r) : r.ChartInfo.Source === 10 && (kt.hasLeftAxis = !0, kt.leftMin = r.ChartInfo.LeftMin ? Number(r.ChartInfo.LeftMin) : Number(r.DataResp.YMinValue), kt.leftMax = r.ChartInfo.LeftMax ? Number(r.ChartInfo.LeftMax) : Number(r.DataResp.YMaxValue), kt.hasXAxis = !0, kt.xMin = r.ChartInfo.XMin ? Number(r.ChartInfo.XMin) : Number(r.DataResp.XMinValue), kt.xMax = r.ChartInfo.XMax ? Number(r.ChartInfo.XMax) : Number(r.DataResp.XMaxValue), _ = SM(r));
- let U = nM();
- return re.value = { ...go, ...U, ..._ }, lM(y), aM(o), Vr.setOptions({ global: { useUTC: r.ChartInfo.ChartType == 2 } }), (_.series ? _.series.some((V) => V.chartType === "linear") : !1) ? ho = Vr.chart(ol.value, re.value) : ho = Vr.stockChart(ol.value, re.value), ho;
- }
- function nM() {
- if (!_e.value.ChartInfo.ChartThemeStyle)
- return {};
- let r = JSON.parse(_e.value.ChartInfo.ChartThemeStyle);
- return {
- legend: {
- ...go.legend,
- ...r.legendOptions
- },
- chart: {
- ...go.chart,
- ...r.drawOption
- },
- colors: r.colorsOptions
- };
- }
- function Ai(r, d) {
- const { MarkersLines: C, ChartType: o } = _e.value.ChartInfo, { EdbInfoList: y } = _e.value;
- return C ? JSON.parse(C).filter((G) => G.isShow && G.axis === r).map((G) => {
- let V = r === 3 && d === "datetime", F;
- if (V) {
- let B = o === 2 ? new Date(y[0].DataList[1].DataList[0].DataTimestamp).getFullYear() : "";
- F = o === 2 ? (/* @__PURE__ */ new Date(`${B}-${G.value}`)).getTime() : new Date(G.value).getTime();
- } else
- F = Number(G.value);
- return {
- value: F,
- dashStyle: G.dashStyle,
- width: Number(G.lineWidth),
- color: G.color,
- label: {
- text: G.text || "",
- verticalAlign: G.textPosition,
- style: {
- color: G.textColor,
- fontSize: G.textFontSize
- }
- }
- };
- }) : [];
- }
- function Ti(r, d) {
- const { MarkersAreas: C, ChartType: o } = _e.value.ChartInfo, { EdbInfoList: y } = _e.value;
- return C ? JSON.parse(C).filter((G) => G.isShow && G.axis === r).map((G) => {
- let V = r === 3 && d === "datetime", F, B;
- if (V) {
- let w = o === 2 ? new Date(y[0].DataList[1].DataList[0].DataTimestamp).getFullYear() : "";
- F = o === 2 ? (/* @__PURE__ */ new Date(`${w}-${G.fromValue}`)).getTime() : new Date(G.fromValue).getTime(), B = o === 2 ? (/* @__PURE__ */ new Date(`${w}-${G.toValue}`)).getTime() : new Date(G.toValue).getTime();
- } else
- F = Number(G.fromValue), B = Number(G.toValue);
- let j = {
- top: 12,
- middle: 0,
- bottom: -10
- };
- return {
- from: F,
- to: B,
- color: G.color,
- label: {
- text: G.text || "",
- verticalAlign: G.textPosition,
- y: j[G.textPosition],
- style: {
- color: G.textColor,
- fontSize: G.textFontSize
- }
- }
- };
- }) : [];
- }
- function qu({ LatestDate: r, PredictChartColor: d }) {
- return {
- zoneAxis: "x",
- zones: [{
- value: new Date(r).getTime() + 1
- }, {
- dashStyle: "ShortDot",
- color: d
- }]
- };
- }
- function sM(r) {
- return r ? {
- zoneAxis: "x",
- zones: [{
- value: new Date(r).getTime() + 1
- }, {
- dashStyle: "ShortDot"
- }]
- } : {};
- }
- function Qu(r, d, C) {
- let o = Xt(d).diff(Xt(r), "years", !0);
- return !!([5, 6].includes(C) && o <= 1);
- }
- function al(r, d) {
- const { IsAxis: C, IsOrder: o, EdbInfoType: y, LeadValue: N, LeadUnit: _ } = r, U = d == "zh" ? {
- 0: "右轴",
- 2: "右2轴"
- } : {
- 0: "RHS",
- 2: "2-RHS"
- }, G = d == "zh" ? {
- 1: "逆序"
- } : {
- 1: "REV"
- }, V = d == "zh" ? {
- 0: "领先"
- } : {
- 0: "Lead"
- }, F = d === "zh" ? _ : F0[_];
- let B = U[C] || "", j = G[Number(o)] ? `${B ? "," : ""}${G[Number(o)]}` : "", w = V[y] ? `${B || j ? "," : ""}${V[y]}${N}${F}` : "";
- return B || j || w ? `(${B}${j}${w})` : "";
- }
- function wo(r, d, C = "zh") {
- let o = "";
- const y = r.EdbNameEn ? `${r.EdbNameEn}${al(r, "en")}` : "", N = d.length > 1 ? `${r.EdbAliasName || r.EdbName}(${r.SourceName})${al(r, "zh")}` : `${r.EdbAliasName || r.EdbName}${al(r, "zh")}`;
- if (o = C == "zh" ? N : y || N, o.length > 20) {
- let _ = [];
- for (let U = 0; U < o.length / 20; U++)
- _.push(o.slice(U * 20, U * 20 + 20));
- o = _.join("<br>");
- }
- return o;
- }
- function Kl(r) {
- let d = r.filter((y) => y.IsAxis === 1), C = r.filter((y) => !y.IsAxis), o = r.filter((y) => y.IsAxis === 2);
- return [d, C, o].flat(1 / 0);
- }
- function oM() {
- let r = !0;
- return _e.value.ChartInfo.ChartNameEn || (r = !1), _e.value.EdbInfoList.forEach((d) => {
- d.EdbNameEn || (r = !1), _e.value.ChartInfo.ChartType !== 10 && d.Unit && !d.UnitEn && (r = !1);
- }), r;
- }
- function aM(r) {
- if (r && !oM())
- return;
- const { ChartType: d, Source: C } = _e.value.ChartInfo;
- C == 1 && (d == 5 ? (re.value.yAxis.title.text = Fe.value == "zh" ? re.value.yAxis.title.textZh : re.value.yAxis.title.textEn, re.value.xAxis.title.text = Fe.value == "zh" ? re.value.xAxis.title.textZh : re.value.xAxis.title.textEn, re.value.series.forEach((o) => {
- o.name = Fe.value == "zh" ? o.nameZh : o.nameEn;
- }), re.value.tooltip.formatter = Fe.value == "zh" ? re.value.tooltip.formatterZh : re.value.tooltip.formatterEn) : (re.value.yAxis.forEach((o) => {
- o.title.text = Fe.value == "zh" ? o.title.textZh : o.title.textEn;
- }), d != 2 && re.value.series.forEach((o) => {
- o.name = Fe.value == "zh" ? o.nameZh : o.nameEn != "无英文名称" ? o.nameEn : `<span style="color:#999">${o.nameEn}</span>`;
- }), d === 10 && (re.value.xAxis.title.text = Fe.value == "zh" ? re.value.xAxis.title.textZh : re.value.xAxis.title.textEn, re.value.tooltip.formatter = Fe.value == "zh" ? re.value.tooltip.formatterCh : re.value.tooltip.formatterEn, re.value.series.forEach((o) => {
- o.linkedTo || o.data.forEach((y) => {
- y.dataLabels.format = Fe.value == "zh" ? y.dataLabels.formatZh : y.dataLabels.formatEn || "无英文标签", y.dataLabels.color = Fe.value === "en" && !y.dataLabels.formatEn ? "#999" : "#333";
- });
- })), [7, 11].includes(d) && (re.value.xAxis.categories = _e.value.XEdbIdValue.map((o) => Fe.value == "zh" ? _e.value.EdbInfoList.find((y) => y.EdbInfoId === o).EdbAliasName || _e.value.EdbInfoList.find((y) => y.EdbInfoId === o).EdbName : _e.value.EdbInfoList.find((y) => y.EdbInfoId === o).EdbNameEn)))), [2, 3, 4].includes(C) && (re.value.yAxis.forEach((o) => {
- o.title.text = Fe.value == "zh" ? o.title.textZh : o.title.textEn || o.title.textZh;
- }), re.value.series.forEach((o) => {
- o.name = Fe.value == "en" && o.nameEn || o.nameZh;
- }), re.value.tooltip.formatter = Fe.value == "en" ? re.value.tooltip.formatterEn : re.value.tooltip.formatterZh, C == 2 && (re.value.xAxis.categories = Fr.value.filter((o) => o.IsHide === 0).map((o) => Fe.value == "en" ? o.NameEn : o.Name)), [3].includes(C) && (re.value.xAxis.title.text = Fe.value == "en" && re.value.xAxis.title.textEn || re.value.xAxis.title.textZh));
- }
- function lM(r) {
- if (r) {
- const d = _e.value.ChartInfo;
- re.value.title.textZh = d.ChartName, re.value.title.textEn = d.ChartNameEn, re.value.title.text = Fe.value == "zh" ? re.value.title.textZh : re.value.title.textEn || re.value.title.textZh;
- } else
- re.value.title.text = "";
- }
- function hM(r) {
- const d = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null, { XDataList: C, UnitList: o, SeriesList: y, IsHeap: N } = r.DataResp;
- kt.leftIndex = y.findIndex((B) => B.IsAxis === 1), kt.rightIndex = y.findIndex((B) => !B.IsAxis), kt.rightTwoIndex = y.findIndex((B) => B.IsAxis === 2), kt.leftIndex != -1 && (kt.hasLeftAxis = !0), kt.rightIndex != -1 && (kt.hasRightAxis = !0), kt.rightTwoIndex != -1 && (kt.hasRightTwoAxis = !0);
- const _ = {
- categories: C.map((B) => this.currentLang == "en" ? B.NameEn : B.Name),
- tickWidth: 1,
- labels: {
- style: {
- ...d && d.xAxisOptions.style
- }
- },
- plotBands: Ti(3),
- plotLines: Ai(3)
- };
- let U = [], G = [];
- const V = y.some((B) => B.IsAxis === 2) ? Kl(y) : ss.cloneDeep(y);
- return V.forEach((B, j) => {
- const w = V.findIndex(
- (v) => v.IsAxis === B.IsAxis
- ), x = {
- 1: ["LeftName", "LeftNameEn"],
- 0: ["RightName", "RightNameEn"],
- 2: ["RightTwoName", "RightTwoNameEn"]
- };
- let f = 0, l = 0;
- const T = {
- 0: ["rightMin", "rightMax"],
- 1: ["leftMin", "leftMax"],
- 2: ["rightTwoMin", "rightTwoMax"]
- };
- T[B.IsAxis] && (f = kt[`${T[B.IsAxis][0]}`] || 0, l = kt[`${T[B.IsAxis][1]}`] || 0);
- let O = {
- ...dr,
- title: {
- text: o[x[B.IsAxis][0]],
- textCh: o[x[B.IsAxis][0]],
- // 中文
- // 中文不存在,无论英文有无都显示空
- textEn: o[x[B.IsAxis][0]] ? o[x[B.IsAxis][1]] : "",
- // 英文
- style: {
- ...d && d.yAxisOptions.style
- },
- align: "high",
- rotation: 0,
- y: -12,
- // x: (item.IsAxis===0 && this.rightTwoIndex>-1) ? -chartData[this.rightTwoIndex].Unit.length*12 : 0,
- textAlign: B.IsAxis === 1 ? "left" : "right",
- reserveSpace: !1
- },
- labels: {
- formatter: function(v) {
- return v.value;
- },
- align: "center",
- x: [0, 2].includes(B.IsAxis) ? 5 : -5,
- style: {
- ...d && d.yAxisOptions.style
- }
- },
- opposite: [0, 2].includes(B.IsAxis),
- min: Number(f),
- max: Number(l),
- tickWidth: 1,
- visible: w === j,
- plotBands: Ti(B.IsAxis),
- plotLines: Ai(B.IsAxis)
- }, R = j;
- N == 1 && (R = 0);
- let k = B.DataList || [];
- k.forEach((v, h) => {
- B.NoDataEdbIndex.includes(h) && (k[h] = null);
- });
- const b = d ? j % d.lineOptionList.length : j;
- let S = {
- data: k,
- type: B.ChartStyle || "",
- dashStyle: d && d.lineOptionList[b].dashStyle || "Solid",
- chartType: "linear",
- yAxis: R,
- name: B.SeriesName,
- nameZh: B.SeriesName,
- nameEn: B.SeriesNameEn,
- unitName: o[x[B.IsAxis][0]],
- unitNameCh: o[x[B.IsAxis][0]],
- unitNameEn: o[x[B.IsAxis][0]] ? o[x[B.IsAxis][1]] : "",
- color: B.ChartColor,
- lineWidth: Number(B.ChartWidth) || d && d.lineOptionList[b].lineWidth,
- borderWidth: 1,
- borderColor: B.ChartColor,
- marker: {
- //展示数据点
- enabled: !!(B.ChartStyle != "column" && B.IsPoint),
- radius: d && d.lineOptionList[b].radius || 5
- },
- dataLabels: {
- //展示数值
- enabled: !!B.IsNumber,
- align: B.ChartStyle == "column" ? "center" : void 0,
- y: B.ChartStyle == "column" ? -20 : 0,
- inside: B.ChartStyle == "column" ? !1 : void 0,
- crop: B.ChartStyle != "column"
- },
- stacking: N == 1 ? "normal" : void 0,
- zIndex: ["line", "spline"].includes(B.ChartStyle) ? 1 : 0
- //防止组合图曲线被遮住
- };
- U.push(O), G.push(S);
- }), {
- title: {
- text: ""
- },
- tooltip: {
- formatter: function() {
- let B = `<b>${this.points[0].x}</b>`;
- return this.points.forEach((j) => {
- const w = G.find((x) => x.name === j.series.name);
- B = B + `<br><span style="color:${j.color}">●</span>${w.name}:${j.y} ${w.unitNameCh}`;
- }), B;
- },
- formatterCh: function() {
- let B = `<b>${this.points[0].x}</b>`;
- return this.points.forEach((j) => {
- const w = G.find((x) => x.name === j.series.name);
- B = B + `<br><span style="color:${j.color}">●</span>${w.nameCh}:${j.y} ${w.unitNameCh}`;
- }), B;
- },
- formatterEn: function() {
- let B = `<b>${this.points[0].x}</b>`;
- return this.points.forEach((j) => {
- const w = G.find((x) => x.name === j.series.name);
- B = B + `<br><span style="color:${j.color}">●</span>${w.nameEn}:${j.y} ${w.unitNameEn}`;
- }), B;
- },
- shared: !0
- },
- series: G,
- yAxis: U,
- xAxis: _
- };
- }
- function cM(r) {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const d = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null, { DataList: C, LeftMaxValue: o, LeftMinValue: y, RightMaxValue: N, RightMinValue: _ } = r.DataResp, U = {
- ...wn,
- tickWidth: 1,
- labels: {
- style: {
- ...d && d.xAxisOptions.style
- }
- }
- };
- let G = [], V = [];
- return C.forEach((B, j) => {
- let w = {
- ...dr,
- title: {
- text: B.Unit,
- textCh: B.Unit,
- // 中文
- textEn: B.UnitEn || B.Unit,
- align: "high",
- rotation: 0,
- y: -15,
- reserveSpace: !1,
- style: {
- ...d && d.yAxisOptions.style
- }
- },
- labels: {
- style: {
- ...d && d.yAxisOptions.style
- }
- },
- opposite: B.IsAxis !== 1,
- min: Number(j === 0 ? y : _),
- max: Number(j === 0 ? o : N),
- tickWidth: 1
- };
- const x = d ? j % d.lineOptionList.length : j;
- let f = {
- data: B.Value.map((l) => [l.X, l.Y]),
- dashStyle: d && d.lineOptionList[x].dashStyle || "Solid",
- type: d && d.lineOptionList[x].lineType || "spline",
- yAxis: j,
- name: B.Name,
- nameZh: B.Name,
- nameEn: B.NameEn || B.Name,
- color: B.Color,
- lineWidth: d && d.lineOptionList[x].lineWidth || 3,
- chartType: "linear",
- zIndex: 1
- };
- V.push(f), G.push(w);
- }), {
- title: {
- text: ""
- },
- tooltip: {
- formatter: function() {
- let B = C[0].Value.map((f) => f.X), j = B[1] - B[0], x = `<b>${`[${this.x},${this.x + j}]`}</b>`;
- return this.points.forEach((f) => {
- x += `<br><span style="color:${f.color}">●</span>${f.series.name}: ${f.y}%<br>`;
- }), x;
- },
- shared: !0
- },
- series: V,
- yAxis: G,
- xAxis: U
- };
- }
- function Bp(r) {
- const d = r.ChartInfo.Source === 1, C = [4, 6, 7, 8].includes(r.ChartInfo.Source) ? [r.DataResp] : r.EdbInfoList;
- let o = [], y = [], N = {}, _ = C.findIndex((f) => f.IsAxis === 1), U = C.findIndex((f) => !f.IsAxis), G = C.findIndex((f) => f.IsAxis === 2);
- kt.leftIndex = _, kt.rightIndex = U, kt.rightTwoIndex = G;
- const V = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null;
- let F = [], B = C.some((f) => f.IsAxis === 2) ? Kl(C) : C;
- B.forEach((f, l) => {
- let T = B.findIndex((t) => t.IsAxis === f.IsAxis), O = f.EdbName, R = B.filter(
- (t) => O === t.EdbName
- ), k = wo(f, R, "zh"), b = wo(f, R, "en"), S = f.EdbInfoCategoryType === 1 ? qu(f) : {};
- const v = V ? l % V.lineOptionList.length : l;
- let h = {
- data: [],
- dataGrouping: {
- enabled: !1
- },
- type: V && V.lineOptionList[v].lineType || "spline",
- dashStyle: V && V.lineOptionList[v].dashStyle || "Solid",
- yAxis: l,
- name: k,
- nameZh: k,
- nameEn: b,
- color: f.ChartColor,
- lineWidth: Number(f.ChartWidth) || V && V.lineOptionList[v].lineWidth || 1,
- visible: !0,
- LatestDate: f.LatestDate,
- LatestValue: f.LatestValue,
- marker: V && V.lineOptionList[v].dataMark && V.lineOptionList[v].dataMark != "none" ? {
- enabled: !0,
- symbol: V.lineOptionList[v].markType || "circle",
- fillColor: V.lineOptionList[v].markColor,
- radius: V.lineOptionList[v].markSize
- } : {},
- ...S
- };
- f.DataList = f.DataList || [];
- for (let t of f.DataList)
- h.data.push([t.DataTimestamp, t.Value]);
- o.push(h), f.IsAxis, console.log("useSelfLimit", li);
- let c = 0, u = 0;
- if ((!li || !d) && (c = f.MinData, u = f.MaxData), li && d) {
- const t = {
- 0: ["rightMin", "rightMax"],
- 1: ["leftMin", "leftMax"],
- 2: ["rightTwoMin", "rightTwoMax"]
- };
- t[f.IsAxis] && (c = kt[`${t[f.IsAxis][0]}`] || 0, u = kt[`${t[f.IsAxis][1]}`] || 0);
- }
- const i = r.ChartInfo.Source === 12 ? f.ConvertUnit : f.ConvertUnit || f.Unit, p = r.ChartInfo.Source === 12 ? f.ConvertEnUnit : f.ConvertEnUnit || f.UnitEn || f.ConvertUnit || f.Unit;
- let a = {
- ...dr,
- IsAxis: f.IsAxis,
- labels: {
- formatter: function(t) {
- return T !== l ? "" : t.value;
- },
- align: "center",
- x: [0, 2].includes(f.IsAxis) ? 5 : -5,
- style: {
- ...V && V.yAxisOptions.style
- }
- },
- tickWidth: T !== l ? 0 : 1,
- title: {
- text: T !== l ? "" : `${i}`,
- textZh: i,
- //中文单位
- textEn: i ? p : "",
- //英文单位,但如果无中文单位则不显示
- align: "high",
- rotation: 0,
- y: -15,
- x: f.IsAxis === 0 && G > -1 ? -B[G].Unit.length * 12 : 0,
- textAlign: f.IsAxis === 1 ? "left" : "right",
- reserveSpace: !1,
- style: {
- ...V && V.yAxisOptions.style
- }
- },
- opposite: [0, 2].includes(f.IsAxis),
- reversed: f.IsOrder,
- min: Number(c),
- max: Number(u),
- visible: T === l,
- chartEdbInfo: f,
- //指标数据用于在保存时读取指标数据
- plotBands: Ti(f.IsAxis),
- plotLines: Ai(f.IsAxis)
- };
- y.push(a), f.DataList.length > 0 && (F.push(f.DataList[0].DataTimestamp), F.push(f.DataList[f.DataList.length - 1].DataTimestamp));
- });
- let j = Math.min.apply(null, F), w = Math.max.apply(null, F);
- const x = Qu(j, w, r.ChartInfo.DateType);
- return N = {
- ...tu,
- labels: {
- formatter: function(f) {
- return x ? ts.dateFormat("%m/%d", f.value) : ts.dateFormat("%y/%m", f.value);
- },
- style: {
- ...V && V.xAxisOptions.style
- }
- },
- tickInterval: Zl.value === "phone" ? (w - j) / 6 / (24 * 3600 * 1e3) > 30 ? (w - j) / 6 : 24 * 3600 * 1e3 * 30 : void 0,
- plotBands: Ti(3, "datetime"),
- plotLines: Ai(3, "datetime")
- }, y.forEach((f) => {
- f.IsAxis === 1 ? (kt.hasLeftAxis = !0, (!li || !d) && (kt.leftMin = C[_].MinData, kt.leftMax = C[_].MaxData, f.min = C[_].MinData, f.max = C[_].MaxData)) : f.IsAxis === 2 ? (kt.hasRightTwoAxis = !0, (!li || !d) && (kt.rightTwoMin = C[G].MinData, kt.rightTwoMax = C[G].MaxData, f.min = C[G].MinData, f.max = C[G].MaxData)) : (kt.hasRightAxis = !0, (!li || !d) && (kt.rightMin = C[U].MinData, kt.rightMax = C[U].MaxData, f.min = C[U].MinData, f.max = C[U].MaxData));
- }), {
- series: o,
- xAxis: [N],
- yAxis: y,
- rangeSelector: { enabled: !1 }
- };
- }
- function pM(r) {
- var b;
- kt.leftIndex = 0;
- const { RightAxis: d = {} } = r.DataResp || {};
- kt.rightIndex = d.IsShow ? 1 : -1, kt.rightTwoIndex = -1;
- const C = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null;
- let o = {};
- const y = r.EdbInfoList[0], N = r.ChartInfo.Calendar || "公历", _ = C && C.colorsOptions.reverse();
- let U = [], G = [];
- const V = N === "农历" ? y.DataList.filter((S, v) => v > 0) : y.DataList;
- C && (C.lineOptionList = C.lineOptionList.reverse().slice(-V.length));
- let F = 0;
- V.forEach((S, v) => {
- let h = y.EdbInfoCategoryType === 1 ? sM(S.CuttingDataTimestamp) : {};
- const c = C ? v % C.lineOptionList.length : v;
- let u = {
- data: [],
- dataGrouping: {
- enabled: !1
- },
- type: C && C.lineOptionList[c].lineType || y.ChartStyle,
- dashStyle: C && C.lineOptionList[c].dashStyle || "Solid",
- yAxis: 0,
- name: S.ChartLegend,
- lineWidth: C && C.lineOptionList[c].lineWidth || 1,
- // color:colorsArr.slice(-chartDataHandle.length)[lineIndex], //与PC端的配置不同步,导致两边 十条之后的线条颜色不对应
- visible: !0,
- marker: C && C.lineOptionList[c].dataMark && C.lineOptionList[c].dataMark != "none" ? {
- enabled: !0,
- symbol: C.lineOptionList[c].markType || "circle",
- fillColor: C.lineOptionList[c].markColor,
- radius: C.lineOptionList[c].markSize
- } : {},
- ...h
- };
- if (S.DataList = S.DataList || [], (S.DataList || []).length > 0) {
- let p = S.DataList[S.DataList.length - 1].DataTimestamp - S.DataList[0].DataTimestamp;
- F = Math.max(F, p);
- }
- for (let p of S.DataList)
- u.data.push([p.DataTimestamp, p.Value]);
- U.push(u);
- }), o.colors = _.slice(-V.length);
- const { MaxMinLimits: B = {}, SamePeriodAverage: j = {}, SamePeriodStandardDeviation: w = {} } = r.DataResp || {};
- if (B.IsShow && B.List && B.List.length) {
- let S = {
- type: "arearange",
- //上下限是一个范围
- data: [],
- name: B.Legend || "同期上下限",
- color: B.Color || "#075EEE",
- fillOpacity: so(B.Color || "") > 0.75 ? 0.75 : so(B.Color || "")
- //透明度最高0.75
- };
- B.List.forEach((v) => {
- S.data.push([v.DataTimestamp, v.MinValue, v.MaxValue]);
- }), U.push(S);
- }
- if (j.IsShow && j.List) {
- let S = {
- type: "line",
- data: [],
- lineWidth: j.LineWidth,
- dashStyle: j.LineType,
- name: j.Legend || "同期均值",
- color: j.Color || "#075EEE"
- };
- j.List.forEach((v) => {
- S.data.push([v.DataTimestamp, v.Value]);
- }), U.push(S);
- }
- if (w.IsShow && w.List) {
- let S = {
- type: "arearange",
- //标准差也是一个范围
- data: [],
- name: w.Legend || "同期标准差",
- color: w.Color || "#075EEE",
- fillOpacity: so(w.Color || "") > 0.75 ? 0.75 : so(w.Color || "")
- };
- w.List.forEach((v) => {
- S.data.push([v.DataTimestamp, v.MinValue, v.MaxValue]);
- }), U.push(S);
- }
- if (d.IsShow) {
- let v = {
- ...d.Style === "column" ? {
- //柱形
- type: "column",
- color: d.ChartColor
- } : {
- //标记点
- type: "spline",
- lineWidth: d.LineWidth,
- dashStyle: d.LineStyle,
- color: d.IsConnected ? d.LineColor : "rgba(255, 255, 255, 0)",
- //没有连线颜色设置为透明
- marker: {
- enabled: !0,
- symbol: d.Shape,
- fillColor: d.ChartColor,
- radius: d.Size
- }
- },
- name: d.Legend || "",
- data: [],
- yAxis: 1
- };
- ((d.IndicatorType === 1 ? d.EdbInfoList[0].DataList : (b = r.EdbInfoList[1]) == null ? void 0 : b.DataList) || []).forEach((c) => {
- v.data.push([c.DataTimestamp, c.Value]);
- }), U.push(v);
- }
- let x = 0, f = 0, l = 0, T = 0;
- li ? (x = kt.leftMin || 0, f = kt.leftMax || 0, kt.rightIndex !== -1 && (l = kt.rightMin || 0, T = kt.rightMax || 0)) : (x = y.MinData, f = y.MaxData);
- const O = y.ConvertUnit || y.Unit, R = y.ConvertEnUnit || y.UnitEn || y.ConvertUnit || y.Unit;
- if (G = [{
- IsAxis: y.IsAxis,
- labels: {
- align: "center",
- y: 5,
- style: {
- ...C && C.yAxisOptions.style
- }
- },
- title: {
- text: `${O}`,
- textZh: O,
- // 中文
- // 中文不存在,无论英文有无都显示空
- textEn: O ? R || "英文单位" : "",
- // 英文
- align: "high",
- rotation: 0,
- y: -5,
- x: 0,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...C && C.yAxisOptions.style
- }
- },
- max: Number(f),
- min: Number(x),
- plotBands: Ti(1),
- plotLines: Ai(1),
- lineWidth: 1,
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- offset: 0,
- opposite: !1,
- reversed: !1,
- visible: !0,
- gridLineWidth: 0,
- tickWidth: 1,
- tickLength: 5,
- tickPosition: "inside",
- endOnTick: !1,
- startOnTick: !1,
- showLastLabel: !0,
- //显示最后刻度值
- tickPixelInterval: 50
- // chartEdbInfo:item//指标数据
- }], d.IsShow) {
- const S = (d.IndicatorType === 1 ? d.EdbInfoList[0] : r.EdbInfoList[1]) || { Unit: "" };
- d.IndicatorType === 1 ? S.Unit = d.NumFormat === 1 ? "%" : "" : S.Unit = r.EdbInfoList[1] && (r.EdbInfoList[1].ConvertUnit || r.EdbInfoList[1].Unit) || "", G.push({
- ...H0.yAxis,
- opposite: !0,
- //右轴
- labels: {
- align: "center",
- y: 5,
- style: {
- ...C && C.yAxisOptions.style
- }
- },
- title: {
- text: S.Unit || "",
- style: {
- ...C && C.yAxisOptions.style
- },
- align: "high",
- rotation: 0,
- y: -5,
- x: 0,
- textAlign: "right",
- reserveSpace: !1
- },
- max: Number(T),
- min: Number(l)
- });
- }
- o.series = U, o.yAxis = G, kt.hasLeftAxis = !0, li || (kt.leftMin = Number(y.MinData), kt.leftMax = Number(y.MaxData));
- let k = {
- tickPosition: "inside",
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- tickLength: 5,
- type: "datetime",
- ordinal: !1,
- dateTimeLabelFormats: {
- day: "%y/%m",
- week: "%y/%m",
- month: "%y/%m",
- year: "%y/%m"
- },
- labels: {
- formatter: (S) => ts.dateFormat("%m/%d", S.value),
- style: {
- ...C && C.xAxisOptions.style
- }
- },
- tickInterval: Zl.value === "phone" ? F / 6 : void 0,
- //季节图
- plotBands: Ti(3, "datetime"),
- plotLines: Ai(3, "datetime")
- };
- return o.xAxis = [k], o.tooltip = {
- split: !1,
- shared: !0,
- dateTimeLabelFormats: {
- // 时间格式化字符
- day: "%m/%d",
- week: "%m/%d",
- month: "%m/%d",
- year: "%m/%d"
- },
- xDateFormat: "%m/%d"
- }, {
- ...o
- // title: {
- // enabled: true,
- // text:e.ChartInfo.ChartName
- // },
- // legend:{
- // enabled:true,
- // verticalAlign: 'top',
- // y:-10,
- // x:(10 * data.Unit.length)/2
- // }
- };
- }
- function ll(r) {
- const d = r.EdbInfoList;
- let o = {
- 3: "areaspline",
- 4: "column",
- 6: ""
- }[r.ChartInfo.ChartType];
- const y = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null;
- let N = [], _ = [], U = {}, G, V, F, B = [], j = d.some((l) => l.IsAxis === 2) ? Kl(d) : d;
- j.forEach((l, T) => {
- let O = j.findIndex((n) => n.IsAxis === l.IsAxis), R = T;
- [3, 4].includes(r.ChartInfo.ChartType) ? R = 0 : r.ChartInfo.ChartType === 6 && ["areaspline", "column"].includes(l.ChartStyle) && (R = j.findIndex((n) => n.ChartStyle === l.ChartStyle)), l.IsAxis = R === T ? l.IsAxis : j[R].IsAxis, l.IsOrder = R === T ? l.IsOrder : j[R].IsOrder, G = [3, 4].includes(r.ChartInfo.ChartType) ? j[R].IsAxis ? R : -1 : d.findIndex((n) => n.IsAxis === 1), V = [3, 4].includes(r.ChartInfo.ChartType) ? j[R].IsAxis ? -1 : R : d.findIndex((n) => !n.IsAxis), F = [3, 4].includes(r.ChartInfo.ChartType) ? -1 : d.findIndex((n) => n.IsAxis === 2), kt.leftIndex = G, kt.rightIndex = V, kt.rightTwoIndex = F;
- let k = l.EdbName, b = j.filter(
- (n) => k === n.EdbName
- ), S = wo(l, b, "zh"), v = wo(l, b, "en"), h = l.EdbInfoCategoryType === 1 ? qu(l) : {};
- const c = y ? T % y.lineOptionList.length : T;
- let u = {
- data: [],
- dataGrouping: {
- enabled: !1
- },
- type: o || l.ChartStyle,
- yAxis: R,
- name: S,
- nameZh: S,
- nameEn: v,
- color: l.ChartColor,
- lineWidth: Number(l.ChartWidth) || y && y.lineOptionList[c].lineWidth || 1,
- fillColor: r.ChartInfo.ChartType === 3 || r.ChartInfo.ChartType === 6 && l.ChartStyle === "areaspline" ? l.ChartColor : void 0,
- visible: !0,
- LatestDate: l.LatestDate,
- LatestValue: l.LatestValue,
- ...h,
- stacking: r.ChartInfo.ChartType == 6 && !r.DataResp.IsHeap ? void 0 : "normal"
- };
- l.DataList = l.DataList || [];
- for (let n of l.DataList)
- u.data.push([n.DataTimestamp, n.Value]);
- N.push(u);
- let i = 0, p = 0;
- if (!li)
- i = j[O].MinData, p = j[O].MaxData;
- else {
- const n = {
- 0: ["rightMin", "rightMax"],
- 1: ["leftMin", "leftMax"],
- 2: ["rightTwoMin", "rightTwoMax"]
- };
- n[l.IsAxis] && (i = kt[`${n[l.IsAxis][0]}`] || 0, p = kt[`${n[l.IsAxis][1]}`] || 0);
- }
- l.IsAxis;
- const a = l.ConvertUnit || l.Unit, t = l.ConvertEnUnit || l.UnitEn || l.ConvertUnit || l.Unit;
- let s = {
- ...dr,
- IsAxis: l.IsAxis,
- labels: {
- formatter: function(n) {
- return O !== T ? "" : n.value;
- },
- align: "center",
- x: [0, 2].includes(l.IsAxis) ? 5 : -5,
- style: {
- ...y && y.yAxisOptions.style
- }
- },
- title: {
- // text: sameSideIndex !== index ? '' : `${item.Unit}`,
- text: a,
- textZh: a,
- // 中文
- // 中文不存在,无论英文有无都显示空
- textEn: a ? t || "英文单位" : "",
- // 英文
- align: "high",
- rotation: 0,
- y: -15,
- x: l.IsAxis === 0 && F > -1 ? -j[F].Unit.length * 12 : 0,
- textAlign: l.IsAxis === 1 ? "left" : "right",
- reserveSpace: !1,
- style: {
- ...y && y.yAxisOptions.style
- }
- },
- opposite: [0, 2].includes(l.IsAxis),
- reversed: l.IsOrder,
- min: Number(i),
- max: Number(p),
- tickWidth: O !== T ? 0 : 1,
- visible: R === T && O === T,
- plotBands: Ti(l.IsAxis),
- plotLines: Ai(l.IsAxis),
- chartEdbInfo: l
- //指标数据用于在保存时读取指标数据
- };
- _.push(s), l.DataList.length > 0 && (B.push(l.DataList[0].DataTimestamp), B.push(l.DataList[l.DataList.length - 1].DataTimestamp));
- });
- let w = Math.min.apply(null, B), x = Math.max.apply(null, B);
- const f = Qu(w, x, r.ChartInfo.DateType);
- return U = {
- ...tu,
- labels: {
- formatter: function(l) {
- return f ? ts.dateFormat("%m/%d", l.value) : ts.dateFormat("%y/%m", l.value);
- },
- style: {
- ...y && y.xAxisOptions.style
- }
- },
- tickInterval: Zl.value === "phone" ? (x - w) / 6 / (24 * 3600 * 1e3) > 30 ? (x - w) / 6 : 24 * 3600 * 1e3 * 30 : void 0,
- plotBands: Ti(3, "datetime"),
- plotLines: Ai(3, "datetime")
- }, _.forEach((l) => {
- l.IsAxis === 1 ? (kt.hasLeftAxis = !0, li || (kt.leftMin = d[G].MinData, kt.leftMax = d[G].MaxData, l.min = d[G].MinData, l.max = d[G].MaxData)) : l.IsAxis === 2 ? (kt.hasRightTwoAxis = !0, li || (kt.rightTwoMin = d[F].MinData, kt.rightTwoMax = d[F].MaxData, l.min = d[F].MinData, l.max = d[F].MaxData)) : (kt.hasRightAxis = !0, li || (kt.rightMin = d[V].MinData, kt.rightMax = d[V].MaxData, l.min = d[V].MinData, l.max = d[V].MaxData));
- }), {
- series: N,
- xAxis: U,
- yAxis: _,
- rangeSelector: { enabled: !1 }
- };
- }
- function uM(r) {
- kt.leftIndex = 1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const d = r.EdbInfoList, { ChartInfo: C } = r, o = C.ChartThemeStyle ? JSON.parse(C.ChartThemeStyle) : null;
- kt.hasLeftAxis = !0;
- const y = [];
- let N = {}, _ = ss.cloneDeep(d)[0].DataList || [], U = ss.cloneDeep(d)[1].DataList || [];
- _.forEach((R) => {
- U.forEach((k) => {
- if (R.DataTimestamp === k.DataTimestamp) {
- let b = R.Value + "_" + k.Value;
- N[b] ? N[b].push(Xt(R.DataTimestamp).format("YYYY/MM/DD")) : N[b] = [Xt(R.DataTimestamp).format("YYYY/MM/DD")], y.push({
- x: R.Value,
- y: k.Value
- });
- }
- });
- }), y.sort((R, k) => R - k);
- let G = {
- formatter: function() {
- return `<strong>${N[this.x + "_" + this.y].length > 4 ? N[this.x + "_" + this.y].slice(0, 4).join() + "..." : N[this.x + "_" + this.y].join()}</strong><br>
- ${d[0].EdbName}: <span style="font-weight: 600"> ${this.x}</span><br>
- ${d[1].EdbName}: <span style="font-weight: 600"> ${this.y}</span>
- `;
- },
- // 中文
- formatterCh: function() {
- return `<strong>${N[this.x + "_" + this.y].length > 4 ? N[this.x + "_" + this.y].slice(0, 4).join() + "..." : N[this.x + "_" + this.y].join()}</strong><br>
- ${d[0].EdbName}: <span style="font-weight: 600"> ${this.x}</span><br>
- ${d[1].EdbName}: <span style="font-weight: 600"> ${this.y}</span>
- `;
- },
- // 英文
- formatterEn: function() {
- let R = `${d[0].EdbNameEn}`, k = `${d[1].EdbNameEn}`;
- return `<strong>${N[this.x + "_" + this.y].length > 4 ? N[this.x + "_" + this.y].slice(0, 4).join() + "..." : N[this.x + "_" + this.y].join()}</strong><br>
- ${R}: <span style="font-weight: 600"> ${this.x}</span><br>
- ${k}: <span style="font-weight: 600"> ${this.y}</span>
- `;
- }
- };
- const { IsOrder: V, ChartColor: F } = d[0];
- let B = 0, j = 0;
- li ? (B = kt.leftMin || 0, j = kt.leftMax || 0) : (B = r.ChartInfo.LeftMin || 0, j = r.ChartInfo.LeftMax || 0), console.log("check limit", B, j);
- const w = d[1].ConvertUnit || d[1].Unit, x = d[1].ConvertEnUnit || d[1].UnitEn || d[1].ConvertUnit || d[1].Unit;
- let f = {
- title: {
- text: `${w}`,
- textZh: w,
- textEn: w ? x : "",
- align: "high",
- rotation: 0,
- y: -15,
- x: 0,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...o && o.yAxisOptions.style
- }
- },
- labels: {
- formatter: function(R) {
- return R.value;
- },
- align: "center",
- style: {
- ...o && o.yAxisOptions.style
- }
- },
- opposite: !1,
- reversed: V,
- min: Number(B),
- max: Number(j),
- tickWidth: 1,
- tickLength: 5,
- lineWidth: 1,
- lineColor: "#bfbfbf",
- tickColor: "#bfbfbf",
- offset: 0,
- visible: !0,
- gridLineWidth: 0,
- tickPosition: "inside",
- endOnTick: !1,
- startOnTick: !1,
- showLastLabel: !0,
- tickPixelInterval: 50,
- plotBands: Ti(1),
- plotLines: Ai(1)
- }, l = {
- data: [],
- type: "scatter",
- name: `${C.ChartName}${V ? "(逆序)" : ""}`,
- nameZh: `${C.ChartName}${V ? "(逆序)" : ""}`,
- nameEn: C.ChartNameEn ? `${C.ChartNameEn}${V ? "(reverse)" : ""}` : "",
- color: F,
- visible: !0,
- chartType: "linear",
- marker: {
- radius: o && o.lineOptionList[0].radius || 5
- }
- };
- y.forEach((R) => {
- l.data.push([R.x, R.y]);
- });
- const T = d[0].ConvertUnit || d[0].Unit, O = d[0].ConvertEnUnit || d[0].UnitEn || d[0].ConvertUnit || d[0].Unit;
- return {
- title: {
- text: ""
- },
- series: [l],
- yAxis: f,
- xAxis: {
- ...wn,
- title: {
- text: `${T}`,
- textZh: T,
- textEn: T ? O : "",
- align: "high",
- rotation: 0,
- x: 0,
- offset: 20,
- style: {
- ...o && o.xAxisOptions.style
- }
- },
- labels: {
- style: {
- ...o && o.xAxisOptions.style
- }
- }
- },
- tooltip: G
- };
- }
- const td = Le([]), ed = Le([]), dM = Le([]);
- function fM(r) {
- var F, B, j;
- let d = [];
- const C = ss.cloneDeep(td.value), o = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null;
- let y = {
- ...wn,
- categories: ed.value,
- tickWidth: 1,
- labels: {
- style: {
- ...o && o.xAxisOptions.style
- }
- }
- };
- const { leftMin: N, leftMax: _ } = kt, U = (F = r.ChartInfo) == null ? void 0 : F.Unit, G = ((B = r.ChartInfo) == null ? void 0 : B.UnitEn) || ((j = r.ChartInfo) == null ? void 0 : j.Unit);
- let V = {
- ...dr,
- title: {
- text: U,
- textZh: U,
- textEn: G,
- align: "high",
- rotation: 0,
- y: -12,
- x: 0,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...o && o.yAxisOptions.style
- }
- },
- labels: {
- formatter: function(w) {
- return w.value;
- },
- align: "center",
- style: {
- ...o && o.yAxisOptions.style
- }
- },
- min: Number(N),
- max: Number(_),
- opposite: !1,
- tickWidth: 1,
- plotBands: Ti(1),
- plotLines: Ai(1)
- };
- return C.forEach((w) => {
- let x = {
- data: w.Value,
- type: "column",
- yAxis: 0,
- name: w.Name || w.Date,
- nameZh: w.Name || w.Date,
- nameEn: w.Date,
- color: w.Color,
- chartType: "linear",
- visible: !0
- };
- d.push(x);
- }), {
- title: {
- text: ""
- },
- plotOptions: {
- column: {
- stacking: null
- }
- },
- series: d,
- yAxis: [V],
- xAxis: y
- };
- }
- function gM(r) {
- const { XEdbIdValue: d, YDataList: C, EdbInfoList: o, ChartInfo: y } = r;
- let N = d.map((_) => o.find((U) => U.EdbInfoId === _).EdbAliasName);
- return kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1, td.value = C, ed.value = N, dM.value = o, kt.hasLeftAxis = !0, kt.leftMin = Number(y.LeftMin), kt.leftMax = Number(y.LeftMax), fM(r);
- }
- const id = Le([]), Fr = Le([]), Ii = Le([]), mM = (r, d) => {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const C = _e.value.ChartInfo.ChartThemeStyle ? JSON.parse(_e.value.ChartInfo.ChartThemeStyle) : null;
- let o = [];
- const y = ss.cloneDeep(id.value);
- console.log(y);
- let N = {
- ...wn,
- categories: Fr.value.filter((G) => G.IsHide === 0).map((G) => G.Name),
- tickWidth: 1,
- labels: {
- style: {
- ...C && C.xAxisOptions.style
- }
- }
- }, _ = {
- ...dr,
- title: {
- text: Ii.value[0].Unit,
- textZh: Ii.value[0].Unit,
- textEn: Ii.value[0].Unit ? Ii.value[0].UnitEn || "英文单位" : "",
- align: "high",
- rotation: 0,
- y: -15,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...C && C.yAxisOptions.style
- }
- },
- labels: {
- formatter: function(G) {
- return G.value;
- },
- align: "center",
- style: {
- ...C && C.yAxisOptions.style
- }
- },
- min: Number(r),
- max: Number(d),
- opposite: !1,
- tickWidth: 1
- };
- return y.forEach((G, V) => {
- let F = yM(G);
- const B = C ? V % C.lineOptionList.length : V;
- let j = {
- data: F,
- type: C && C.lineOptionList[B].lineType || "spline",
- dashStyle: C && C.lineOptionList[B].dashStyle || "Solid",
- yAxis: 0,
- name: G.Name,
- nameZh: G.Name,
- nameEn: G.NameEn,
- color: G.Color,
- chartType: "linear",
- lineWidth: C && C.lineOptionList[B].lineWidth || 3,
- visible: !0,
- marker: {
- enabled: !1
- }
- };
- o.push(j);
- }), {
- title: {
- text: ""
- },
- series: o,
- yAxis: [_],
- xAxis: N,
- tooltip: {
- formatter: function() {
- const G = this;
- let V = "";
- return G.points.forEach((F) => {
- let B = y.find((x) => x.Name === F.series.name), j = Fr.value.findIndex((x) => x.Name === G.x);
- const w = B.XEdbInfoIdList[j];
- if (w) {
- const x = Ii.value.some((l) => l.EdbInfoId === w);
- let f = _e.value.ChartInfo.Source === 5 ? x ? B.NameList[j] : `${_e.value.DataResp.ProfitName}(${B.NameList[j]})` : Ii.value.find((l) => l.EdbInfoId === B.XEdbInfoIdList[j]).EdbName;
- V += `<b>${f}</b>`, B.NoDataEdbList.includes(B.XEdbInfoIdList[j]) ? V += `<br><span style="color:${F.color}">●</span>${B.Date}: 无<br>` : V += `<br><span style="color:${F.color}">●</span>${B.Date}: ${F.y}<br>`;
- }
- }), V || "无合约";
- },
- formatterCh: function() {
- const G = this;
- let V = "";
- return G.points.forEach((F) => {
- let B = y.find((x) => x.Name === F.series.name), j = Fr.value.findIndex((x) => x.Name === G.x);
- const w = B.XEdbInfoIdList[j];
- if (w) {
- const x = Ii.value.some((l) => l.EdbInfoId === w);
- let f = _e.value.ChartInfo.Source === 5 ? x ? B.NameList[j] : `${_e.value.DataResp.ProfitName}(${B.NameList[j]})` : Ii.value.find((l) => l.EdbInfoId === B.XEdbInfoIdList[j]).EdbName;
- V += `<b>${f}</b>`, B.NoDataEdbList.includes(B.XEdbInfoIdList[j]) ? V += `<br><span style="color:${F.color}">●</span>${B.Date}: 无<br>` : V += `<br><span style="color:${F.color}">●</span>${B.Date}: ${F.y}<br>`;
- }
- }), V || "无合约";
- },
- formatterEn: function() {
- const G = this;
- let V = "";
- return G.points.forEach((F) => {
- let B = y.find((x) => x.NameEn === F.series.name), j = Fr.value.findIndex((x) => x.NameEn === G.x);
- const w = B.XEdbInfoIdList[j];
- if (w) {
- const x = Ii.value.some((l) => l.EdbInfoId === w);
- let f = _e.value.ChartInfo.Source === 5 ? x ? B.NameList[j] : `${_e.value.DataResp.ProfitNameEn}(${B.NameList[j]})` : Ii.value.find((l) => l.EdbInfoId === B.XEdbInfoIdList[j]).EdbNameEn;
- V += `<b>${f}</b>`, B.NoDataEdbList.includes(B.XEdbInfoIdList[j]) ? V += `<br><span style="color:${F.color}">●</span>${B.Date}: 无<br>` : V += `<br><span style="color:${F.color}">●</span>${B.Date}: ${F.y}<br>`;
- }
- }), V || "无合约";
- },
- shared: !0
- }
- };
- };
- function yM(r) {
- let d = r.XEdbInfoIdList.filter((_) => !r.NoDataEdbList.includes(_)), C = r.XEdbInfoIdList.findIndex((_) => _ === d[0]), o = r.XEdbInfoIdList.findIndex((_) => _ === d[d.length - 1]), y = r.Value.map((_, U) => U < C || U > o ? null : _), N = [];
- return Fr.value.forEach((_, U) => {
- _.IsHide !== 1 && N.push(y[U]);
- }), N;
- }
- function vM(r) {
- const { XDataList: d, YDataList: C, EdbInfoList: o, ChartInfo: y, DataResp: N } = r;
- return Ii.value = o, id.value = y.Source === 5 ? N.YDataList : C, Fr.value = y.Source === 5 ? N.XDataList : d, kt.hasLeftAxis = !0, kt.leftMin = Number(y.LeftMin), kt.leftMax = Number(y.LeftMax), mM(y.LeftMin, y.LeftMax);
- }
- function xM(r) {
- const d = r.ChartInfo.ChartThemeStyle ? JSON.parse(r.ChartInfo.ChartThemeStyle) : null;
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- let C = {
- categories: r.ChartInfo.Source === 3 ? r.XEdbIdValue : r.DataResp.XDateTimeValue,
- tickWidth: 1,
- title: {
- text: r.ChartInfo.Source === 3 ? `期数(${r.CorrelationChartInfo.LeadUnit})` : null,
- textZh: r.ChartInfo.Source === 3 ? `期数(${r.CorrelationChartInfo.LeadUnit})` : null,
- textEn: r.ChartInfo.Source === 3 ? `stage(${Op[r.CorrelationChartInfo.LeadUnit]})` : null,
- align: "high",
- rotation: 0,
- x: 0,
- y: 10,
- offset: 20,
- style: {
- ...d && d.xAxisOptions.style
- }
- },
- labels: {
- style: {
- ...d && d.xAxisOptions.style
- }
- },
- tickInterval: 1,
- offset: 0,
- tickmarkPlacement: "on"
- }, o = {
- ...dr,
- title: {
- text: "相关性系数",
- textZh: "相关性系数",
- textEn: "Correlation coefficient",
- align: "high",
- rotation: 0,
- y: -15,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ...d && d.yAxisOptions.style
- }
- },
- labels: {
- formatter: function(V) {
- return V.value;
- },
- align: "center",
- style: {
- ...d && d.yAxisOptions.style
- }
- },
- opposite: !1,
- tickWidth: 1
- }, y = [];
- r.YDataList.forEach((V, F) => {
- const B = d ? F % d.lineOptionList.length : F;
- let j = {
- data: V.Value,
- type: d && d.lineOptionList[B].lineType || "spline",
- dashStyle: d && d.lineOptionList[B].dashStyle || "Solid",
- yAxis: 0,
- name: V.Name || r.ChartInfo.ChartName,
- nameZh: V.Name || r.ChartInfo.ChartName,
- nameEn: V.NameEn || r.ChartInfo.ChartNameEn,
- color: V.Color,
- chartType: "linear",
- lineWidth: d && d.lineOptionList[B].lineWidth || 3,
- visible: !0,
- marker: {
- enabled: !1
- }
- };
- y.push(j);
- });
- const { LeadValue: N, LeadUnit: _ } = r.CorrelationChartInfo, { Source: U } = r.ChartInfo;
- let G = {
- formatter: function() {
- return `<p>相关性系数:${this.y.toFixed(4)}</p><br><p>领先${U === 3 ? this.x + "期" : N + _}</p>`;
- },
- formatterCh: function() {
- return `<p>相关性系数:${this.y.toFixed(4)}</p><br><p>领先${U === 3 ? this.x + "期" : N + _}</p>`;
- },
- formatterEn: function() {
- return `<p>Correlation coefficient:${this.y.toFixed(4)}</p><br><p>lead${U === 3 ? this.x + "stage" : N + Op[_]}</p>`;
- }
- };
- return fo(() => {
- re.value = {
- isRelevanceChart: r.ChartInfo.Source === 3,
- title: {
- text: ""
- },
- series: y,
- yAxis: [o],
- xAxis: C,
- tooltip: G
- }, ho.update(re.value, !0);
- }), {
- isRelevanceChart: !0,
- title: {
- text: ""
- },
- series: y,
- yAxis: [o],
- xAxis: C,
- tooltip: G
- };
- }
- function bM({ DataResp: r, ChartInfo: d }) {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const C = d.ChartThemeStyle ? JSON.parse(d.ChartThemeStyle) : null, { DataList: o, XName: y, XNameEn: N, XUnitName: _, XUnitNameEn: U, YName: G, YNameEn: V, YUnitName: F, YUnitNameEn: B } = r, j = Number(r.YMinValue), w = Number(r.YMaxValue), x = Number(r.XMinValue), f = Number(r.XMaxValue);
- kt.hasLeftAxis = !0, kt.hasXAxis = !0, kt.leftMin = j, kt.leftMax = w, kt.xMin = x, kt.xMax = f;
- let l = {
- ...dr,
- title: {
- text: G,
- textZh: G,
- // 中文
- textEn: V || "",
- style: {
- ...C && C.yAxisOptions.style
- },
- align: "middle"
- },
- labels: {
- style: {
- ...C && C.yAxisOptions.style
- }
- },
- opposite: !1,
- reversed: !1,
- min: Number(j),
- max: Number(w),
- tickWidth: 1,
- plotBands: Ti(1),
- plotLines: Ai(1)
- }, T = {
- ...wn,
- title: {
- text: y,
- textZh: y,
- // 中文
- textEn: N || "",
- style: {
- ...C && C.xAxisOptions.style
- },
- align: "middle"
- },
- labels: {
- style: {
- ...C && C.xAxisOptions.style
- }
- },
- min: Number(x),
- max: Number(f),
- plotBands: Ti(3),
- plotLines: Ai(3)
- }, O = [];
- return o.forEach((k, b) => {
- const S = C ? b % C.lineOptionList.length : b;
- let v = {
- data: [],
- type: "scatter",
- name: k.Name,
- nameZh: k.Name,
- nameEn: k.NameEn,
- color: k.Color,
- lineWidth: 0,
- chartType: "linear",
- zIndex: 1,
- visible: !0,
- marker: {
- radius: C && C.lineOptionList[S].radius || 5
- }
- };
- if (k.EdbInfoList.forEach((h) => {
- v.data.push({
- x: h.XValue,
- y: h.YValue,
- dataLabels: {
- enabled: h.IsShow,
- allowOverlap: !0,
- align: "left",
- format: h.Name,
- formatZh: h.Name,
- formatEn: h.NameEn
- }
- });
- }), O.push(v), k.ShowTrendLine) {
- let c = {
- data: k.TrendLimitData.map((u, i) => i === k.TrendLimitData.length - 1 ? {
- x: u.X,
- y: u.Y,
- dataLabels: {
- enabled: k.ShowRSquare || k.ShowFitEquation,
- align: "left",
- color: k.Color,
- x: 20,
- y: 30,
- zIndex: 9,
- allowOverlap: !0,
- formatter: function() {
- let p = "";
- return k.ShowRSquare && k.ShowFitEquation ? p = `<span>${k.TrendLine}</span><br><span>R²=${k.RSquare}</span>` : k.ShowRSquare && !k.ShowFitEquation ? p = `<span>R²=${k.RSquare}</span>` : k.ShowFitEquation && !k.ShowRSquare && (p = `<span>${k.TrendLine}</span>`), p;
- }
- }
- } : {
- x: u.X,
- y: u.Y
- }),
- type: "spline",
- linkedTo: ":previous",
- color: k.Color,
- lineWidth: 1,
- chartType: "linear",
- enableMouseTracking: !1,
- dashStyle: "Dash",
- zIndex: 2,
- visible: !0,
- marker: {
- enabled: !1
- }
- };
- O.push(c);
- }
- }), {
- title: {
- text: ""
- },
- series: O,
- yAxis: [l],
- xAxis: T,
- tooltip: {
- formatter: function() {
- let b = o.find((v) => v.Name === this.series.name).EdbInfoList.find((v) => v.XValue === this.x && v.YValue === this.y), S = `<b>${b.Name}</b>`;
- return S += `<br><span style="color:${this.color}">●</span>${b.XName}: ${this.x} ${b.XDate}<br>`, S += `<span style="color:${this.color}">●</span>${b.YName}: ${this.y} (${b.YDate})`, S;
- },
- formatterCh: function() {
- let b = o.find((v) => v.Name === this.series.name).EdbInfoList.find((v) => v.XValue === this.x && v.YValue === this.y), S = `<b>${b.Name}</b>`;
- return S += `<br><span style="color:${this.color}">●</span>${b.XName}: ${this.x} ${b.XDate}<br>`, S += `<span style="color:${this.color}">●</span>${b.YName}: ${this.y} (${b.YDate})`, S;
- },
- formatterEn: function() {
- let b = o.find((v) => v.NameEn === this.series.name).EdbInfoList.find((v) => v.XValue === this.x && v.YValue === this.y), S = `<b>${b.NameEn}</b>`;
- return S += `<br><span style="color:${this.color}">●</span>${b.XNameEn}: ${this.x} ${b.XDate}<br>`, S += `<span style="color:${this.color}">●</span>${b.YNameEn}: ${this.y} ${b.YDate}`, S;
- }
- }
- };
- }
- function SM({ DataResp: r, EdbInfoList: d, ChartInfo: C }) {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const o = C.ChartThemeStyle ? JSON.parse(C.ChartThemeStyle) : null, { DataList: y, XName: N, YName: _, XNameEn: U, YNameEn: G, XMaxValue: V, XMinValue: F, YMaxValue: B, YMinValue: j } = r, { leftMin: w, leftMax: x, xMin: f, xMax: l } = kt;
- let T = {
- ...dr,
- title: {
- text: _,
- textCh: _,
- // 中文
- textEn: G || _,
- align: "middle",
- style: {
- ...o && o.xAxisOptions.style
- }
- },
- labels: {
- style: {
- ...o && o.xAxisOptions.style
- }
- },
- opposite: !1,
- reversed: !1,
- min: Number(w),
- max: Number(x),
- tickWidth: 1
- }, O = {
- ...wn,
- title: {
- text: N,
- textCh: N,
- // 中文
- textEn: U || N,
- align: "middle",
- style: {
- ...o && o.xAxisOptions.style
- }
- },
- labels: {
- style: {
- ...o && o.xAxisOptions.style
- }
- },
- min: Number(f),
- max: Number(l)
- }, R = [];
- const k = {
- //标签对应文字
- 1: "最新",
- 3: "Fix"
- };
- return y.forEach((S) => {
- let v = {
- data: [],
- type: "scatter",
- name: S.Name,
- nameZh: S.Name,
- nameEn: S.NameEn || S.Name,
- color: S.Color,
- lineWidth: 0,
- chartType: "linear",
- zIndex: 1
- };
- S.CoordinatePointData.forEach((h) => {
- v.data.push({
- x: h.X,
- y: h.Y,
- dataLabels: {
- enabled: h.ShowTips === 1,
- allowOverlap: !0,
- align: "left",
- format: k[h.DateType] || `-${h.DaysAgo}D`
- }
- });
- }), R.push(v);
- }), {
- title: {
- text: ""
- },
- series: R,
- yAxis: [T],
- xAxis: O,
- tooltip: {
- formatter: function() {
- let v = y.find((i) => i.Name === this.series.name).CoordinatePointData.find((i) => i.X === this.x && i.Y === this.y), h = d.find((i) => i.EdbInfoId === v.XEdbInfoId), c = d.find((i) => i.EdbInfoId === v.YEdbInfoId), u = `<b>${this.series.name}</b>`;
- return u += `<br><span style="color:${this.color}">●</span>${h.EdbName}: ${this.x} ${v.XDate}<br>`, u += `<span style="color:${this.color}">●</span>${c.EdbName}: ${this.y} ${v.YDate}`, u;
- },
- formatterCh: function() {
- let v = y.find((i) => i.Name === this.series.name).CoordinatePointData.find((i) => i.X === this.x && i.Y === this.y), h = d.find((i) => i.EdbInfoId === v.XEdbInfoId), c = d.find((i) => i.EdbInfoId === v.YEdbInfoId), u = `<b>${this.series.name}</b>`;
- return u += `<br><span style="color:${this.color}">●</span>${h.EdbName}: ${this.x} ${v.XDate}<br>`, u += `<span style="color:${this.color}">●</span>${c.EdbName}: ${this.y} ${v.YDate}`, u;
- },
- formatterEn: function() {
- let v = y.find((i) => i.NameEn === this.series.name).CoordinatePointData.find((i) => i.X === this.x && i.Y === this.y), h = d.find((i) => i.EdbInfoId === v.XEdbInfoId), c = d.find((i) => i.EdbInfoId === v.YEdbInfoId), u = `<b>${this.series.name}</b>`;
- return u += `<br><span style="color:${this.color}">●</span>${h.EdbNameEn}: ${this.x} ${v.XDate}<br>`, u += `<span style="color:${this.color}">●</span>${c.EdbNameEn}: ${this.y} ${v.YDate}`, u;
- }
- }
- };
- }
- function wM({ DataResp: r, EdbInfoList: d, ChartInfo: C }) {
- kt.leftIndex = -1, kt.rightIndex = -1, kt.rightTwoIndex = -1;
- const { YDataList: o, XEdbIdValue: y } = r;
- let N = d.filter((F) => y.includes(F.EdbInfoId));
- kt.hasLeftAxis = !0, kt.leftMin = Number(C.LeftMin), kt.leftMax = Number(C.LeftMax);
- const _ = C.ChartThemeStyle ? JSON.parse(C.ChartThemeStyle) : null;
- let U = {
- lineWidth: 0,
- tickLength: 0,
- tickmarkPlacement: "on",
- categories: N.map((F) => F.EdbAliasName || F.EdbName),
- labels: {
- allowOverlap: !0,
- autoRotationLimit: 40,
- style: {
- ..._ && _.xAxisOptions.style
- }
- }
- }, G = [{
- gridLineInterpolation: "polygon",
- gridLineWidth: 1,
- lineWidth: 0,
- endOnTick: !1,
- startOnTick: !1,
- showLastLabel: !0,
- // tickAmount:4,
- title: {
- text: C.Unit,
- textCh: C.Unit,
- textEn: C.UnitEn,
- align: "high",
- rotation: 0,
- y: 5,
- x: 10,
- textAlign: "left",
- reserveSpace: !1,
- style: {
- ..._ && _.yAxisOptions.style
- }
- },
- labels: {
- allowOverlap: !0,
- style: {
- ..._ && _.yAxisOptions.style
- }
- },
- min: Number(C.LeftMin),
- max: Number(C.LeftMax)
- }], V = [];
- return o.forEach((F, B) => {
- const j = _ ? B % _.lineOptionList.length : B;
- let w = {
- name: F.Name || F.Date,
- nameZh: F.Name || F.Date,
- nameEn: F.Date,
- data: F.Value,
- pointPlacement: "on",
- type: _ && _.lineOptionList[j].lineType || "line",
- dashStyle: _ && _.lineOptionList[j].dashStyle || "Solid",
- yAxis: 0,
- color: F.Color,
- lineWidth: _ && _.lineOptionList[j].lineWidth || 1,
- chartType: "linear"
- };
- V.push(w);
- }), {
- chart: {
- ...go.chart,
- ..._ == null ? void 0 : _.drawOption,
- spacing: [2, 10, 2, 10],
- polar: !0
- },
- title: {
- text: ""
- },
- pane: {
- size: "85%"
- },
- series: V,
- yAxis: G,
- xAxis: U
- };
- }
- function so(r = "rgba(51, 51, 51, 1)") {
- const d = r.match(/(\d(\.\d+)?)+/g) || ["", "", "", 1];
- return parseFloat(d[3] || 1);
- }
- function MM(r = [], d, C = {}) {
- if (d.ChartType === 5) {
- r[1] && (kt.leftMin = r[1].MinData, kt.leftMax = r[1].MaxData);
- return;
- }
- const o = r.filter((_) => _.IsAxis === 1).map((_) => [Number(_.MinData), Number(_.MaxData)]), y = r.filter((_) => !_.IsAxis).map((_) => [Number(_.MinData), Number(_.MaxData)]), N = r.filter((_) => _.IsAxis === 2).map((_) => [Number(_.MinData), Number(_.MaxData)]);
- if (o.length) {
- const {
- Max: _,
- Min: U
- } = Sn(o.flat());
- kt.leftMin = U, kt.leftMax = _;
- }
- if (y.length) {
- const {
- Max: _,
- Min: U
- } = Sn(y.flat());
- kt.rightMin = U, kt.rightMax = _;
- }
- if (N.length) {
- const {
- Max: _,
- Min: U
- } = Sn(N.flat());
- kt.rightTwoMin = U, kt.rightTwoMax = _;
- }
- d.ChartType === 2 && C.RightAxis && C.RightAxis.IsAdd && C.RightAxis.IsShow && (C.RightAxis.IndicatorType === 1 ? (kt.rightMin = C.RightAxis.EdbInfoList[0].MinData || 0, kt.rightMax = C.RightAxis.EdbInfoList[0].MaxData || 0) : (kt.rightMin = r[1].MinData || 0, kt.rightMax = r[1].MaxData || 0));
- }
- function Sn(r) {
- return {
- Max: Math.max(...r),
- Min: Math.min(...r)
- };
- }
- function CM({ EdbInfoList: r, ChartInfo: d, DataResp: C }) {
- const {
- //左右轴极值字段
- LeftMin: o = 0,
- LeftMax: y = 0,
- RightMin: N = 0,
- RightMax: _ = 0,
- Right2Min: U = 0,
- Right2Max: G = 0,
- MinMaxSave: V
- } = d;
- V ? (kt.leftMin = Number(o), kt.leftMax = Number(y), kt.rightMin = Number(N), kt.rightMax = Number(_), kt.rightTwoMin = Number(U), kt.rightTwoMax = Number(G), kM(r, d), console.log("check", kt.leftMin, kt.leftMax)) : MM(r, d, C || {});
- }
- function kM(r = [], d) {
- if (d.ChartType === 5) {
- r[1] && Number(kt.leftMin) === 0 && Number(kt.leftMax) === 0 && (kt.leftMin = r[1].MinData, kt.leftMax = r[1].MaxData);
- return;
- }
- if (Number(kt.leftMin) === 0 && Number(kt.leftMax) === 0) {
- const C = r.filter((o) => o.IsAxis === 1).map((o) => [Number(o.MinData), Number(o.MaxData)]);
- if (C.length) {
- const { Max: o, Min: y } = Sn(C.flat());
- kt.leftMin = y, kt.leftMax = o;
- }
- }
- if (Number(kt.rightMin) === 0 && Number(kt.rightMax) === 0) {
- const C = r.filter((o) => !o.IsAxis).map((o) => [Number(o.MinData), Number(o.MaxData)]);
- if (C.length) {
- const { Max: o, Min: y } = Sn(C.flat());
- kt.rightMin = y, kt.rightMax = o;
- }
- }
- if (Number(kt.rightTwoMin) === 0 && Number(kt.rightTwoMax) === 0) {
- const C = r.filter((o) => o.IsAxis === 2).map((o) => [Number(o.MinData), Number(o.MaxData)]);
- if (C.length) {
- const { Max: o, Min: y } = Sn(C.flat());
- kt.rightTwoMin = y, kt.rightTwoMax = o;
- }
- }
- }
- function rd(r, d) {
- return function() {
- return r.apply(d, arguments);
- };
- }
- const { toString: AM } = Object.prototype, { getPrototypeOf: Jl } = Object, Bo = ((r) => (d) => {
- const C = AM.call(d);
- return r[C] || (r[C] = C.slice(8, -1).toLowerCase());
- })(/* @__PURE__ */ Object.create(null)), zi = (r) => (r = r.toLowerCase(), (d) => Bo(d) === r), jo = (r) => (d) => typeof d === r, { isArray: Tn } = Array, os = jo("undefined");
- function TM(r) {
- return r !== null && !os(r) && r.constructor !== null && !os(r.constructor) && gi(r.constructor.isBuffer) && r.constructor.isBuffer(r);
- }
- const nd = zi("ArrayBuffer");
- function PM(r) {
- let d;
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? d = ArrayBuffer.isView(r) : d = r && r.buffer && nd(r.buffer), d;
- }
- const EM = jo("string"), gi = jo("function"), sd = jo("number"), Wo = (r) => r !== null && typeof r == "object", OM = (r) => r === !0 || r === !1, co = (r) => {
- if (Bo(r) !== "object")
- return !1;
- const d = Jl(r);
- return (d === null || d === Object.prototype || Object.getPrototypeOf(d) === null) && !(Symbol.toStringTag in r) && !(Symbol.iterator in r);
- }, LM = zi("Date"), _M = zi("File"), DM = zi("Blob"), IM = zi("FileList"), RM = (r) => Wo(r) && gi(r.pipe), NM = (r) => {
- let d;
- return r && (typeof FormData == "function" && r instanceof FormData || gi(r.append) && ((d = Bo(r)) === "formdata" || // detect form-data instance
- d === "object" && gi(r.toString) && r.toString() === "[object FormData]"));
- }, BM = zi("URLSearchParams"), [jM, WM, YM, zM] = ["ReadableStream", "Request", "Response", "Headers"].map(zi), XM = (r) => r.trim ? r.trim() : r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
- function ps(r, d, { allOwnKeys: C = !1 } = {}) {
- if (r === null || typeof r > "u")
- return;
- let o, y;
- if (typeof r != "object" && (r = [r]), Tn(r))
- for (o = 0, y = r.length; o < y; o++)
- d.call(null, r[o], o, r);
- else {
- const N = C ? Object.getOwnPropertyNames(r) : Object.keys(r), _ = N.length;
- let U;
- for (o = 0; o < _; o++)
- U = N[o], d.call(null, r[U], U, r);
- }
- }
- function od(r, d) {
- d = d.toLowerCase();
- const C = Object.keys(r);
- let o = C.length, y;
- for (; o-- > 0; )
- if (y = C[o], d === y.toLowerCase())
- return y;
- return null;
- }
- const Ur = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), ad = (r) => !os(r) && r !== Ur;
- function bl() {
- const { caseless: r } = ad(this) && this || {}, d = {}, C = (o, y) => {
- const N = r && od(d, y) || y;
- co(d[N]) && co(o) ? d[N] = bl(d[N], o) : co(o) ? d[N] = bl({}, o) : Tn(o) ? d[N] = o.slice() : d[N] = o;
- };
- for (let o = 0, y = arguments.length; o < y; o++)
- arguments[o] && ps(arguments[o], C);
- return d;
- }
- const GM = (r, d, C, { allOwnKeys: o } = {}) => (ps(d, (y, N) => {
- C && gi(y) ? r[N] = rd(y, C) : r[N] = y;
- }, { allOwnKeys: o }), r), HM = (r) => (r.charCodeAt(0) === 65279 && (r = r.slice(1)), r), FM = (r, d, C, o) => {
- r.prototype = Object.create(d.prototype, o), r.prototype.constructor = r, Object.defineProperty(r, "super", {
- value: d.prototype
- }), C && Object.assign(r.prototype, C);
- }, UM = (r, d, C, o) => {
- let y, N, _;
- const U = {};
- if (d = d || {}, r == null)
- return d;
- do {
- for (y = Object.getOwnPropertyNames(r), N = y.length; N-- > 0; )
- _ = y[N], (!o || o(_, r, d)) && !U[_] && (d[_] = r[_], U[_] = !0);
- r = C !== !1 && Jl(r);
- } while (r && (!C || C(r, d)) && r !== Object.prototype);
- return d;
- }, VM = (r, d, C) => {
- r = String(r), (C === void 0 || C > r.length) && (C = r.length), C -= d.length;
- const o = r.indexOf(d, C);
- return o !== -1 && o === C;
- }, $M = (r) => {
- if (!r)
- return null;
- if (Tn(r))
- return r;
- let d = r.length;
- if (!sd(d))
- return null;
- const C = new Array(d);
- for (; d-- > 0; )
- C[d] = r[d];
- return C;
- }, ZM = ((r) => (d) => r && d instanceof r)(typeof Uint8Array < "u" && Jl(Uint8Array)), KM = (r, d) => {
- const o = (r && r[Symbol.iterator]).call(r);
- let y;
- for (; (y = o.next()) && !y.done; ) {
- const N = y.value;
- d.call(r, N[0], N[1]);
- }
- }, JM = (r, d) => {
- let C;
- const o = [];
- for (; (C = r.exec(d)) !== null; )
- o.push(C);
- return o;
- }, qM = zi("HTMLFormElement"), QM = (r) => r.toLowerCase().replace(
- /[-_\s]([a-z\d])(\w*)/g,
- function(C, o, y) {
- return o.toUpperCase() + y;
- }
- ), jp = (({ hasOwnProperty: r }) => (d, C) => r.call(d, C))(Object.prototype), tC = zi("RegExp"), ld = (r, d) => {
- const C = Object.getOwnPropertyDescriptors(r), o = {};
- ps(C, (y, N) => {
- let _;
- (_ = d(y, N, r)) !== !1 && (o[N] = _ || y);
- }), Object.defineProperties(r, o);
- }, eC = (r) => {
- ld(r, (d, C) => {
- if (gi(r) && ["arguments", "caller", "callee"].indexOf(C) !== -1)
- return !1;
- const o = r[C];
- if (gi(o)) {
- if (d.enumerable = !1, "writable" in d) {
- d.writable = !1;
- return;
- }
- d.set || (d.set = () => {
- throw Error("Can not rewrite read-only method '" + C + "'");
- });
- }
- });
- }, iC = (r, d) => {
- const C = {}, o = (y) => {
- y.forEach((N) => {
- C[N] = !0;
- });
- };
- return Tn(r) ? o(r) : o(String(r).split(d)), C;
- }, rC = () => {
- }, nC = (r, d) => r != null && Number.isFinite(r = +r) ? r : d, hl = "abcdefghijklmnopqrstuvwxyz", Wp = "0123456789", hd = {
- DIGIT: Wp,
- ALPHA: hl,
- ALPHA_DIGIT: hl + hl.toUpperCase() + Wp
- }, sC = (r = 16, d = hd.ALPHA_DIGIT) => {
- let C = "";
- const { length: o } = d;
- for (; r--; )
- C += d[Math.random() * o | 0];
- return C;
- };
- function oC(r) {
- return !!(r && gi(r.append) && r[Symbol.toStringTag] === "FormData" && r[Symbol.iterator]);
- }
- const aC = (r) => {
- const d = new Array(10), C = (o, y) => {
- if (Wo(o)) {
- if (d.indexOf(o) >= 0)
- return;
- if (!("toJSON" in o)) {
- d[y] = o;
- const N = Tn(o) ? [] : {};
- return ps(o, (_, U) => {
- const G = C(_, y + 1);
- !os(G) && (N[U] = G);
- }), d[y] = void 0, N;
- }
- }
- return o;
- };
- return C(r, 0);
- }, lC = zi("AsyncFunction"), hC = (r) => r && (Wo(r) || gi(r)) && gi(r.then) && gi(r.catch), cd = ((r, d) => r ? setImmediate : d ? ((C, o) => (Ur.addEventListener("message", ({ source: y, data: N }) => {
- y === Ur && N === C && o.length && o.shift()();
- }, !1), (y) => {
- o.push(y), Ur.postMessage(C, "*");
- }))(`axios@${Math.random()}`, []) : (C) => setTimeout(C))(
- typeof setImmediate == "function",
- gi(Ur.postMessage)
- ), cC = typeof queueMicrotask < "u" ? queueMicrotask.bind(Ur) : typeof process < "u" && process.nextTick || cd, Et = {
- isArray: Tn,
- isArrayBuffer: nd,
- isBuffer: TM,
- isFormData: NM,
- isArrayBufferView: PM,
- isString: EM,
- isNumber: sd,
- isBoolean: OM,
- isObject: Wo,
- isPlainObject: co,
- isReadableStream: jM,
- isRequest: WM,
- isResponse: YM,
- isHeaders: zM,
- isUndefined: os,
- isDate: LM,
- isFile: _M,
- isBlob: DM,
- isRegExp: tC,
- isFunction: gi,
- isStream: RM,
- isURLSearchParams: BM,
- isTypedArray: ZM,
- isFileList: IM,
- forEach: ps,
- merge: bl,
- extend: GM,
- trim: XM,
- stripBOM: HM,
- inherits: FM,
- toFlatObject: UM,
- kindOf: Bo,
- kindOfTest: zi,
- endsWith: VM,
- toArray: $M,
- forEachEntry: KM,
- matchAll: JM,
- isHTMLForm: qM,
- hasOwnProperty: jp,
- hasOwnProp: jp,
- // an alias to avoid ESLint no-prototype-builtins detection
- reduceDescriptors: ld,
- freezeMethods: eC,
- toObjectSet: iC,
- toCamelCase: QM,
- noop: rC,
- toFiniteNumber: nC,
- findKey: od,
- global: Ur,
- isContextDefined: ad,
- ALPHABET: hd,
- generateString: sC,
- isSpecCompliantForm: oC,
- toJSONObject: aC,
- isAsyncFn: lC,
- isThenable: hC,
- setImmediate: cd,
- asap: cC
- };
- function ne(r, d, C, o, y) {
- Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = r, this.name = "AxiosError", d && (this.code = d), C && (this.config = C), o && (this.request = o), y && (this.response = y);
- }
- Et.inherits(ne, Error, {
- toJSON: function() {
- return {
- // Standard
- message: this.message,
- name: this.name,
- // Microsoft
- description: this.description,
- number: this.number,
- // Mozilla
- fileName: this.fileName,
- lineNumber: this.lineNumber,
- columnNumber: this.columnNumber,
- stack: this.stack,
- // Axios
- config: Et.toJSONObject(this.config),
- code: this.code,
- status: this.response && this.response.status ? this.response.status : null
- };
- }
- });
- const pd = ne.prototype, ud = {};
- [
- "ERR_BAD_OPTION_VALUE",
- "ERR_BAD_OPTION",
- "ECONNABORTED",
- "ETIMEDOUT",
- "ERR_NETWORK",
- "ERR_FR_TOO_MANY_REDIRECTS",
- "ERR_DEPRECATED",
- "ERR_BAD_RESPONSE",
- "ERR_BAD_REQUEST",
- "ERR_CANCELED",
- "ERR_NOT_SUPPORT",
- "ERR_INVALID_URL"
- // eslint-disable-next-line func-names
- ].forEach((r) => {
- ud[r] = { value: r };
- });
- Object.defineProperties(ne, ud);
- Object.defineProperty(pd, "isAxiosError", { value: !0 });
- ne.from = (r, d, C, o, y, N) => {
- const _ = Object.create(pd);
- return Et.toFlatObject(r, _, function(G) {
- return G !== Error.prototype;
- }, (U) => U !== "isAxiosError"), ne.call(_, r.message, d, C, o, y), _.cause = r, _.name = r.name, N && Object.assign(_, N), _;
- };
- const pC = null;
- function Sl(r) {
- return Et.isPlainObject(r) || Et.isArray(r);
- }
- function dd(r) {
- return Et.endsWith(r, "[]") ? r.slice(0, -2) : r;
- }
- function Yp(r, d, C) {
- return r ? r.concat(d).map(function(y, N) {
- return y = dd(y), !C && N ? "[" + y + "]" : y;
- }).join(C ? "." : "") : d;
- }
- function uC(r) {
- return Et.isArray(r) && !r.some(Sl);
- }
- const dC = Et.toFlatObject(Et, {}, null, function(d) {
- return /^is[A-Z]/.test(d);
- });
- function Yo(r, d, C) {
- if (!Et.isObject(r))
- throw new TypeError("target must be an object");
- d = d || new FormData(), C = Et.toFlatObject(C, {
- metaTokens: !0,
- dots: !1,
- indexes: !1
- }, !1, function(f, l) {
- return !Et.isUndefined(l[f]);
- });
- const o = C.metaTokens, y = C.visitor || F, N = C.dots, _ = C.indexes, G = (C.Blob || typeof Blob < "u" && Blob) && Et.isSpecCompliantForm(d);
- if (!Et.isFunction(y))
- throw new TypeError("visitor must be a function");
- function V(x) {
- if (x === null)
- return "";
- if (Et.isDate(x))
- return x.toISOString();
- if (!G && Et.isBlob(x))
- throw new ne("Blob is not supported. Use a Buffer instead.");
- return Et.isArrayBuffer(x) || Et.isTypedArray(x) ? G && typeof Blob == "function" ? new Blob([x]) : Buffer.from(x) : x;
- }
- function F(x, f, l) {
- let T = x;
- if (x && !l && typeof x == "object") {
- if (Et.endsWith(f, "{}"))
- f = o ? f : f.slice(0, -2), x = JSON.stringify(x);
- else if (Et.isArray(x) && uC(x) || (Et.isFileList(x) || Et.endsWith(f, "[]")) && (T = Et.toArray(x)))
- return f = dd(f), T.forEach(function(R, k) {
- !(Et.isUndefined(R) || R === null) && d.append(
- // eslint-disable-next-line no-nested-ternary
- _ === !0 ? Yp([f], k, N) : _ === null ? f : f + "[]",
- V(R)
- );
- }), !1;
- }
- return Sl(x) ? !0 : (d.append(Yp(l, f, N), V(x)), !1);
- }
- const B = [], j = Object.assign(dC, {
- defaultVisitor: F,
- convertValue: V,
- isVisitable: Sl
- });
- function w(x, f) {
- if (!Et.isUndefined(x)) {
- if (B.indexOf(x) !== -1)
- throw Error("Circular reference detected in " + f.join("."));
- B.push(x), Et.forEach(x, function(T, O) {
- (!(Et.isUndefined(T) || T === null) && y.call(
- d,
- T,
- Et.isString(O) ? O.trim() : O,
- f,
- j
- )) === !0 && w(T, f ? f.concat(O) : [O]);
- }), B.pop();
- }
- }
- if (!Et.isObject(r))
- throw new TypeError("data must be an object");
- return w(r), d;
- }
- function zp(r) {
- const d = {
- "!": "%21",
- "'": "%27",
- "(": "%28",
- ")": "%29",
- "~": "%7E",
- "%20": "+",
- "%00": "\0"
- };
- return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g, function(o) {
- return d[o];
- });
- }
- function ql(r, d) {
- this._pairs = [], r && Yo(r, this, d);
- }
- const fd = ql.prototype;
- fd.append = function(d, C) {
- this._pairs.push([d, C]);
- };
- fd.toString = function(d) {
- const C = d ? function(o) {
- return d.call(this, o, zp);
- } : zp;
- return this._pairs.map(function(y) {
- return C(y[0]) + "=" + C(y[1]);
- }, "").join("&");
- };
- function fC(r) {
- return encodeURIComponent(r).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
- }
- function gd(r, d, C) {
- if (!d)
- return r;
- const o = C && C.encode || fC, y = C && C.serialize;
- let N;
- if (y ? N = y(d, C) : N = Et.isURLSearchParams(d) ? d.toString() : new ql(d, C).toString(o), N) {
- const _ = r.indexOf("#");
- _ !== -1 && (r = r.slice(0, _)), r += (r.indexOf("?") === -1 ? "?" : "&") + N;
- }
- return r;
- }
- class gC {
- constructor() {
- this.handlers = [];
- }
- /**
- * Add a new interceptor to the stack
- *
- * @param {Function} fulfilled The function to handle `then` for a `Promise`
- * @param {Function} rejected The function to handle `reject` for a `Promise`
- *
- * @return {Number} An ID used to remove interceptor later
- */
- use(d, C, o) {
- return this.handlers.push({
- fulfilled: d,
- rejected: C,
- synchronous: o ? o.synchronous : !1,
- runWhen: o ? o.runWhen : null
- }), this.handlers.length - 1;
- }
- /**
- * Remove an interceptor from the stack
- *
- * @param {Number} id The ID that was returned by `use`
- *
- * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
- */
- eject(d) {
- this.handlers[d] && (this.handlers[d] = null);
- }
- /**
- * Clear all interceptors from the stack
- *
- * @returns {void}
- */
- clear() {
- this.handlers && (this.handlers = []);
- }
- /**
- * Iterate over all the registered interceptors
- *
- * This method is particularly useful for skipping over any
- * interceptors that may have become `null` calling `eject`.
- *
- * @param {Function} fn The function to call for each interceptor
- *
- * @returns {void}
- */
- forEach(d) {
- Et.forEach(this.handlers, function(o) {
- o !== null && d(o);
- });
- }
- }
- const Xp = gC, md = {
- silentJSONParsing: !0,
- forcedJSONParsing: !0,
- clarifyTimeoutError: !1
- }, mC = typeof URLSearchParams < "u" ? URLSearchParams : ql, yC = typeof FormData < "u" ? FormData : null, vC = typeof Blob < "u" ? Blob : null, xC = {
- isBrowser: !0,
- classes: {
- URLSearchParams: mC,
- FormData: yC,
- Blob: vC
- },
- protocols: ["http", "https", "file", "blob", "url", "data"]
- }, Ql = typeof window < "u" && typeof document < "u", bC = ((r) => Ql && ["ReactNative", "NativeScript", "NS"].indexOf(r) < 0)(typeof navigator < "u" && navigator.product), SC = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), wC = Ql && window.location.href || "http://localhost", MC = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
- __proto__: null,
- hasBrowserEnv: Ql,
- hasStandardBrowserEnv: bC,
- hasStandardBrowserWebWorkerEnv: SC,
- origin: wC
- }, Symbol.toStringTag, { value: "Module" })), Ni = {
- ...MC,
- ...xC
- };
- function CC(r, d) {
- return Yo(r, new Ni.classes.URLSearchParams(), Object.assign({
- visitor: function(C, o, y, N) {
- return Ni.isNode && Et.isBuffer(C) ? (this.append(o, C.toString("base64")), !1) : N.defaultVisitor.apply(this, arguments);
- }
- }, d));
- }
- function kC(r) {
- return Et.matchAll(/\w+|\[(\w*)]/g, r).map((d) => d[0] === "[]" ? "" : d[1] || d[0]);
- }
- function AC(r) {
- const d = {}, C = Object.keys(r);
- let o;
- const y = C.length;
- let N;
- for (o = 0; o < y; o++)
- N = C[o], d[N] = r[N];
- return d;
- }
- function yd(r) {
- function d(C, o, y, N) {
- let _ = C[N++];
- if (_ === "__proto__")
- return !0;
- const U = Number.isFinite(+_), G = N >= C.length;
- return _ = !_ && Et.isArray(y) ? y.length : _, G ? (Et.hasOwnProp(y, _) ? y[_] = [y[_], o] : y[_] = o, !U) : ((!y[_] || !Et.isObject(y[_])) && (y[_] = []), d(C, o, y[_], N) && Et.isArray(y[_]) && (y[_] = AC(y[_])), !U);
- }
- if (Et.isFormData(r) && Et.isFunction(r.entries)) {
- const C = {};
- return Et.forEachEntry(r, (o, y) => {
- d(kC(o), y, C, 0);
- }), C;
- }
- return null;
- }
- function TC(r, d, C) {
- if (Et.isString(r))
- try {
- return (d || JSON.parse)(r), Et.trim(r);
- } catch (o) {
- if (o.name !== "SyntaxError")
- throw o;
- }
- return (C || JSON.stringify)(r);
- }
- const th = {
- transitional: md,
- adapter: ["xhr", "http", "fetch"],
- transformRequest: [function(d, C) {
- const o = C.getContentType() || "", y = o.indexOf("application/json") > -1, N = Et.isObject(d);
- if (N && Et.isHTMLForm(d) && (d = new FormData(d)), Et.isFormData(d))
- return y ? JSON.stringify(yd(d)) : d;
- if (Et.isArrayBuffer(d) || Et.isBuffer(d) || Et.isStream(d) || Et.isFile(d) || Et.isBlob(d) || Et.isReadableStream(d))
- return d;
- if (Et.isArrayBufferView(d))
- return d.buffer;
- if (Et.isURLSearchParams(d))
- return C.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), d.toString();
- let U;
- if (N) {
- if (o.indexOf("application/x-www-form-urlencoded") > -1)
- return CC(d, this.formSerializer).toString();
- if ((U = Et.isFileList(d)) || o.indexOf("multipart/form-data") > -1) {
- const G = this.env && this.env.FormData;
- return Yo(
- U ? { "files[]": d } : d,
- G && new G(),
- this.formSerializer
- );
- }
- }
- return N || y ? (C.setContentType("application/json", !1), TC(d)) : d;
- }],
- transformResponse: [function(d) {
- const C = this.transitional || th.transitional, o = C && C.forcedJSONParsing, y = this.responseType === "json";
- if (Et.isResponse(d) || Et.isReadableStream(d))
- return d;
- if (d && Et.isString(d) && (o && !this.responseType || y)) {
- const _ = !(C && C.silentJSONParsing) && y;
- try {
- return JSON.parse(d);
- } catch (U) {
- if (_)
- throw U.name === "SyntaxError" ? ne.from(U, ne.ERR_BAD_RESPONSE, this, null, this.response) : U;
- }
- }
- return d;
- }],
- /**
- * A timeout in milliseconds to abort a request. If set to 0 (default) a
- * timeout is not created.
- */
- timeout: 0,
- xsrfCookieName: "XSRF-TOKEN",
- xsrfHeaderName: "X-XSRF-TOKEN",
- maxContentLength: -1,
- maxBodyLength: -1,
- env: {
- FormData: Ni.classes.FormData,
- Blob: Ni.classes.Blob
- },
- validateStatus: function(d) {
- return d >= 200 && d < 300;
- },
- headers: {
- common: {
- Accept: "application/json, text/plain, */*",
- "Content-Type": void 0
- }
- }
- };
- Et.forEach(["delete", "get", "head", "post", "put", "patch"], (r) => {
- th.headers[r] = {};
- });
- const eh = th, PC = Et.toObjectSet([
- "age",
- "authorization",
- "content-length",
- "content-type",
- "etag",
- "expires",
- "from",
- "host",
- "if-modified-since",
- "if-unmodified-since",
- "last-modified",
- "location",
- "max-forwards",
- "proxy-authorization",
- "referer",
- "retry-after",
- "user-agent"
- ]), EC = (r) => {
- const d = {};
- let C, o, y;
- return r && r.split(`
- `).forEach(function(_) {
- y = _.indexOf(":"), C = _.substring(0, y).trim().toLowerCase(), o = _.substring(y + 1).trim(), !(!C || d[C] && PC[C]) && (C === "set-cookie" ? d[C] ? d[C].push(o) : d[C] = [o] : d[C] = d[C] ? d[C] + ", " + o : o);
- }), d;
- }, Gp = Symbol("internals");
- function Jn(r) {
- return r && String(r).trim().toLowerCase();
- }
- function po(r) {
- return r === !1 || r == null ? r : Et.isArray(r) ? r.map(po) : String(r);
- }
- function OC(r) {
- const d = /* @__PURE__ */ Object.create(null), C = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
- let o;
- for (; o = C.exec(r); )
- d[o[1]] = o[2];
- return d;
- }
- const LC = (r) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());
- function cl(r, d, C, o, y) {
- if (Et.isFunction(o))
- return o.call(this, d, C);
- if (y && (d = C), !!Et.isString(d)) {
- if (Et.isString(o))
- return d.indexOf(o) !== -1;
- if (Et.isRegExp(o))
- return o.test(d);
- }
- }
- function _C(r) {
- return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (d, C, o) => C.toUpperCase() + o);
- }
- function DC(r, d) {
- const C = Et.toCamelCase(" " + d);
- ["get", "set", "has"].forEach((o) => {
- Object.defineProperty(r, o + C, {
- value: function(y, N, _) {
- return this[o].call(this, d, y, N, _);
- },
- configurable: !0
- });
- });
- }
- class zo {
- constructor(d) {
- d && this.set(d);
- }
- set(d, C, o) {
- const y = this;
- function N(U, G, V) {
- const F = Jn(G);
- if (!F)
- throw new Error("header name must be a non-empty string");
- const B = Et.findKey(y, F);
- (!B || y[B] === void 0 || V === !0 || V === void 0 && y[B] !== !1) && (y[B || G] = po(U));
- }
- const _ = (U, G) => Et.forEach(U, (V, F) => N(V, F, G));
- if (Et.isPlainObject(d) || d instanceof this.constructor)
- _(d, C);
- else if (Et.isString(d) && (d = d.trim()) && !LC(d))
- _(EC(d), C);
- else if (Et.isHeaders(d))
- for (const [U, G] of d.entries())
- N(G, U, o);
- else
- d != null && N(C, d, o);
- return this;
- }
- get(d, C) {
- if (d = Jn(d), d) {
- const o = Et.findKey(this, d);
- if (o) {
- const y = this[o];
- if (!C)
- return y;
- if (C === !0)
- return OC(y);
- if (Et.isFunction(C))
- return C.call(this, y, o);
- if (Et.isRegExp(C))
- return C.exec(y);
- throw new TypeError("parser must be boolean|regexp|function");
- }
- }
- }
- has(d, C) {
- if (d = Jn(d), d) {
- const o = Et.findKey(this, d);
- return !!(o && this[o] !== void 0 && (!C || cl(this, this[o], o, C)));
- }
- return !1;
- }
- delete(d, C) {
- const o = this;
- let y = !1;
- function N(_) {
- if (_ = Jn(_), _) {
- const U = Et.findKey(o, _);
- U && (!C || cl(o, o[U], U, C)) && (delete o[U], y = !0);
- }
- }
- return Et.isArray(d) ? d.forEach(N) : N(d), y;
- }
- clear(d) {
- const C = Object.keys(this);
- let o = C.length, y = !1;
- for (; o--; ) {
- const N = C[o];
- (!d || cl(this, this[N], N, d, !0)) && (delete this[N], y = !0);
- }
- return y;
- }
- normalize(d) {
- const C = this, o = {};
- return Et.forEach(this, (y, N) => {
- const _ = Et.findKey(o, N);
- if (_) {
- C[_] = po(y), delete C[N];
- return;
- }
- const U = d ? _C(N) : String(N).trim();
- U !== N && delete C[N], C[U] = po(y), o[U] = !0;
- }), this;
- }
- concat(...d) {
- return this.constructor.concat(this, ...d);
- }
- toJSON(d) {
- const C = /* @__PURE__ */ Object.create(null);
- return Et.forEach(this, (o, y) => {
- o != null && o !== !1 && (C[y] = d && Et.isArray(o) ? o.join(", ") : o);
- }), C;
- }
- [Symbol.iterator]() {
- return Object.entries(this.toJSON())[Symbol.iterator]();
- }
- toString() {
- return Object.entries(this.toJSON()).map(([d, C]) => d + ": " + C).join(`
- `);
- }
- get [Symbol.toStringTag]() {
- return "AxiosHeaders";
- }
- static from(d) {
- return d instanceof this ? d : new this(d);
- }
- static concat(d, ...C) {
- const o = new this(d);
- return C.forEach((y) => o.set(y)), o;
- }
- static accessor(d) {
- const o = (this[Gp] = this[Gp] = {
- accessors: {}
- }).accessors, y = this.prototype;
- function N(_) {
- const U = Jn(_);
- o[U] || (DC(y, _), o[U] = !0);
- }
- return Et.isArray(d) ? d.forEach(N) : N(d), this;
- }
- }
- zo.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
- Et.reduceDescriptors(zo.prototype, ({ value: r }, d) => {
- let C = d[0].toUpperCase() + d.slice(1);
- return {
- get: () => r,
- set(o) {
- this[C] = o;
- }
- };
- });
- Et.freezeMethods(zo);
- const Bi = zo;
- function pl(r, d) {
- const C = this || eh, o = d || C, y = Bi.from(o.headers);
- let N = o.data;
- return Et.forEach(r, function(U) {
- N = U.call(C, N, y.normalize(), d ? d.status : void 0);
- }), y.normalize(), N;
- }
- function vd(r) {
- return !!(r && r.__CANCEL__);
- }
- function Pn(r, d, C) {
- ne.call(this, r ?? "canceled", ne.ERR_CANCELED, d, C), this.name = "CanceledError";
- }
- Et.inherits(Pn, ne, {
- __CANCEL__: !0
- });
- function xd(r, d, C) {
- const o = C.config.validateStatus;
- !C.status || !o || o(C.status) ? r(C) : d(new ne(
- "Request failed with status code " + C.status,
- [ne.ERR_BAD_REQUEST, ne.ERR_BAD_RESPONSE][Math.floor(C.status / 100) - 4],
- C.config,
- C.request,
- C
- ));
- }
- function IC(r) {
- const d = /^([-+\w]{1,25})(:?\/\/|:)/.exec(r);
- return d && d[1] || "";
- }
- function RC(r, d) {
- r = r || 10;
- const C = new Array(r), o = new Array(r);
- let y = 0, N = 0, _;
- return d = d !== void 0 ? d : 1e3, function(G) {
- const V = Date.now(), F = o[N];
- _ || (_ = V), C[y] = G, o[y] = V;
- let B = N, j = 0;
- for (; B !== y; )
- j += C[B++], B = B % r;
- if (y = (y + 1) % r, y === N && (N = (N + 1) % r), V - _ < d)
- return;
- const w = F && V - F;
- return w ? Math.round(j * 1e3 / w) : void 0;
- };
- }
- function NC(r, d) {
- let C = 0, o = 1e3 / d, y, N;
- const _ = (V, F = Date.now()) => {
- C = F, y = null, N && (clearTimeout(N), N = null), r.apply(null, V);
- };
- return [(...V) => {
- const F = Date.now(), B = F - C;
- B >= o ? _(V, F) : (y = V, N || (N = setTimeout(() => {
- N = null, _(y);
- }, o - B)));
- }, () => y && _(y)];
- }
- const Mo = (r, d, C = 3) => {
- let o = 0;
- const y = RC(50, 250);
- return NC((N) => {
- const _ = N.loaded, U = N.lengthComputable ? N.total : void 0, G = _ - o, V = y(G), F = _ <= U;
- o = _;
- const B = {
- loaded: _,
- total: U,
- progress: U ? _ / U : void 0,
- bytes: G,
- rate: V || void 0,
- estimated: V && U && F ? (U - _) / V : void 0,
- event: N,
- lengthComputable: U != null,
- [d ? "download" : "upload"]: !0
- };
- r(B);
- }, C);
- }, Hp = (r, d) => {
- const C = r != null;
- return [(o) => d[0]({
- lengthComputable: C,
- total: r,
- loaded: o
- }), d[1]];
- }, Fp = (r) => (...d) => Et.asap(() => r(...d)), BC = Ni.hasStandardBrowserEnv ? (
- // Standard browser envs have full support of the APIs needed to test
- // whether the request URL is of the same origin as current location.
- function() {
- const d = /(msie|trident)/i.test(navigator.userAgent), C = document.createElement("a");
- let o;
- function y(N) {
- let _ = N;
- return d && (C.setAttribute("href", _), _ = C.href), C.setAttribute("href", _), {
- href: C.href,
- protocol: C.protocol ? C.protocol.replace(/:$/, "") : "",
- host: C.host,
- search: C.search ? C.search.replace(/^\?/, "") : "",
- hash: C.hash ? C.hash.replace(/^#/, "") : "",
- hostname: C.hostname,
- port: C.port,
- pathname: C.pathname.charAt(0) === "/" ? C.pathname : "/" + C.pathname
- };
- }
- return o = y(window.location.href), function(_) {
- const U = Et.isString(_) ? y(_) : _;
- return U.protocol === o.protocol && U.host === o.host;
- };
- }()
- ) : (
- // Non standard browser envs (web workers, react-native) lack needed support.
- function() {
- return function() {
- return !0;
- };
- }()
- ), jC = Ni.hasStandardBrowserEnv ? (
- // Standard browser envs support document.cookie
- {
- write(r, d, C, o, y, N) {
- const _ = [r + "=" + encodeURIComponent(d)];
- Et.isNumber(C) && _.push("expires=" + new Date(C).toGMTString()), Et.isString(o) && _.push("path=" + o), Et.isString(y) && _.push("domain=" + y), N === !0 && _.push("secure"), document.cookie = _.join("; ");
- },
- read(r) {
- const d = document.cookie.match(new RegExp("(^|;\\s*)(" + r + ")=([^;]*)"));
- return d ? decodeURIComponent(d[3]) : null;
- },
- remove(r) {
- this.write(r, "", Date.now() - 864e5);
- }
- }
- ) : (
- // Non-standard browser env (web workers, react-native) lack needed support.
- {
- write() {
- },
- read() {
- return null;
- },
- remove() {
- }
- }
- );
- function WC(r) {
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(r);
- }
- function YC(r, d) {
- return d ? r.replace(/\/?\/$/, "") + "/" + d.replace(/^\/+/, "") : r;
- }
- function bd(r, d) {
- return r && !WC(d) ? YC(r, d) : d;
- }
- const Up = (r) => r instanceof Bi ? { ...r } : r;
- function Zr(r, d) {
- d = d || {};
- const C = {};
- function o(V, F, B) {
- return Et.isPlainObject(V) && Et.isPlainObject(F) ? Et.merge.call({ caseless: B }, V, F) : Et.isPlainObject(F) ? Et.merge({}, F) : Et.isArray(F) ? F.slice() : F;
- }
- function y(V, F, B) {
- if (Et.isUndefined(F)) {
- if (!Et.isUndefined(V))
- return o(void 0, V, B);
- } else
- return o(V, F, B);
- }
- function N(V, F) {
- if (!Et.isUndefined(F))
- return o(void 0, F);
- }
- function _(V, F) {
- if (Et.isUndefined(F)) {
- if (!Et.isUndefined(V))
- return o(void 0, V);
- } else
- return o(void 0, F);
- }
- function U(V, F, B) {
- if (B in d)
- return o(V, F);
- if (B in r)
- return o(void 0, V);
- }
- const G = {
- url: N,
- method: N,
- data: N,
- baseURL: _,
- transformRequest: _,
- transformResponse: _,
- paramsSerializer: _,
- timeout: _,
- timeoutMessage: _,
- withCredentials: _,
- withXSRFToken: _,
- adapter: _,
- responseType: _,
- xsrfCookieName: _,
- xsrfHeaderName: _,
- onUploadProgress: _,
- onDownloadProgress: _,
- decompress: _,
- maxContentLength: _,
- maxBodyLength: _,
- beforeRedirect: _,
- transport: _,
- httpAgent: _,
- httpsAgent: _,
- cancelToken: _,
- socketPath: _,
- responseEncoding: _,
- validateStatus: U,
- headers: (V, F) => y(Up(V), Up(F), !0)
- };
- return Et.forEach(Object.keys(Object.assign({}, r, d)), function(F) {
- const B = G[F] || y, j = B(r[F], d[F], F);
- Et.isUndefined(j) && B !== U || (C[F] = j);
- }), C;
- }
- const Sd = (r) => {
- const d = Zr({}, r);
- let { data: C, withXSRFToken: o, xsrfHeaderName: y, xsrfCookieName: N, headers: _, auth: U } = d;
- d.headers = _ = Bi.from(_), d.url = gd(bd(d.baseURL, d.url), r.params, r.paramsSerializer), U && _.set(
- "Authorization",
- "Basic " + btoa((U.username || "") + ":" + (U.password ? unescape(encodeURIComponent(U.password)) : ""))
- );
- let G;
- if (Et.isFormData(C)) {
- if (Ni.hasStandardBrowserEnv || Ni.hasStandardBrowserWebWorkerEnv)
- _.setContentType(void 0);
- else if ((G = _.getContentType()) !== !1) {
- const [V, ...F] = G ? G.split(";").map((B) => B.trim()).filter(Boolean) : [];
- _.setContentType([V || "multipart/form-data", ...F].join("; "));
- }
- }
- if (Ni.hasStandardBrowserEnv && (o && Et.isFunction(o) && (o = o(d)), o || o !== !1 && BC(d.url))) {
- const V = y && N && jC.read(N);
- V && _.set(y, V);
- }
- return d;
- }, zC = typeof XMLHttpRequest < "u", XC = zC && function(r) {
- return new Promise(function(C, o) {
- const y = Sd(r);
- let N = y.data;
- const _ = Bi.from(y.headers).normalize();
- let { responseType: U, onUploadProgress: G, onDownloadProgress: V } = y, F, B, j, w, x;
- function f() {
- w && w(), x && x(), y.cancelToken && y.cancelToken.unsubscribe(F), y.signal && y.signal.removeEventListener("abort", F);
- }
- let l = new XMLHttpRequest();
- l.open(y.method.toUpperCase(), y.url, !0), l.timeout = y.timeout;
- function T() {
- if (!l)
- return;
- const R = Bi.from(
- "getAllResponseHeaders" in l && l.getAllResponseHeaders()
- ), b = {
- data: !U || U === "text" || U === "json" ? l.responseText : l.response,
- status: l.status,
- statusText: l.statusText,
- headers: R,
- config: r,
- request: l
- };
- xd(function(v) {
- C(v), f();
- }, function(v) {
- o(v), f();
- }, b), l = null;
- }
- "onloadend" in l ? l.onloadend = T : l.onreadystatechange = function() {
- !l || l.readyState !== 4 || l.status === 0 && !(l.responseURL && l.responseURL.indexOf("file:") === 0) || setTimeout(T);
- }, l.onabort = function() {
- l && (o(new ne("Request aborted", ne.ECONNABORTED, r, l)), l = null);
- }, l.onerror = function() {
- o(new ne("Network Error", ne.ERR_NETWORK, r, l)), l = null;
- }, l.ontimeout = function() {
- let k = y.timeout ? "timeout of " + y.timeout + "ms exceeded" : "timeout exceeded";
- const b = y.transitional || md;
- y.timeoutErrorMessage && (k = y.timeoutErrorMessage), o(new ne(
- k,
- b.clarifyTimeoutError ? ne.ETIMEDOUT : ne.ECONNABORTED,
- r,
- l
- )), l = null;
- }, N === void 0 && _.setContentType(null), "setRequestHeader" in l && Et.forEach(_.toJSON(), function(k, b) {
- l.setRequestHeader(b, k);
- }), Et.isUndefined(y.withCredentials) || (l.withCredentials = !!y.withCredentials), U && U !== "json" && (l.responseType = y.responseType), V && ([j, x] = Mo(V, !0), l.addEventListener("progress", j)), G && l.upload && ([B, w] = Mo(G), l.upload.addEventListener("progress", B), l.upload.addEventListener("loadend", w)), (y.cancelToken || y.signal) && (F = (R) => {
- l && (o(!R || R.type ? new Pn(null, r, l) : R), l.abort(), l = null);
- }, y.cancelToken && y.cancelToken.subscribe(F), y.signal && (y.signal.aborted ? F() : y.signal.addEventListener("abort", F)));
- const O = IC(y.url);
- if (O && Ni.protocols.indexOf(O) === -1) {
- o(new ne("Unsupported protocol " + O + ":", ne.ERR_BAD_REQUEST, r));
- return;
- }
- l.send(N || null);
- });
- }, GC = (r, d) => {
- let C = new AbortController(), o;
- const y = function(G) {
- if (!o) {
- o = !0, _();
- const V = G instanceof Error ? G : this.reason;
- C.abort(V instanceof ne ? V : new Pn(V instanceof Error ? V.message : V));
- }
- };
- let N = d && setTimeout(() => {
- y(new ne(`timeout ${d} of ms exceeded`, ne.ETIMEDOUT));
- }, d);
- const _ = () => {
- r && (N && clearTimeout(N), N = null, r.forEach((G) => {
- G && (G.removeEventListener ? G.removeEventListener("abort", y) : G.unsubscribe(y));
- }), r = null);
- };
- r.forEach((G) => G && G.addEventListener && G.addEventListener("abort", y));
- const { signal: U } = C;
- return U.unsubscribe = _, [U, () => {
- N && clearTimeout(N), N = null;
- }];
- }, HC = GC, FC = function* (r, d) {
- let C = r.byteLength;
- if (!d || C < d) {
- yield r;
- return;
- }
- let o = 0, y;
- for (; o < C; )
- y = o + d, yield r.slice(o, y), o = y;
- }, UC = async function* (r, d, C) {
- for await (const o of r)
- yield* FC(ArrayBuffer.isView(o) ? o : await C(String(o)), d);
- }, Vp = (r, d, C, o, y) => {
- const N = UC(r, d, y);
- let _ = 0, U, G = (V) => {
- U || (U = !0, o && o(V));
- };
- return new ReadableStream({
- async pull(V) {
- try {
- const { done: F, value: B } = await N.next();
- if (F) {
- G(), V.close();
- return;
- }
- let j = B.byteLength;
- if (C) {
- let w = _ += j;
- C(w);
- }
- V.enqueue(new Uint8Array(B));
- } catch (F) {
- throw G(F), F;
- }
- },
- cancel(V) {
- return G(V), N.return();
- }
- }, {
- highWaterMark: 2
- });
- }, Xo = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", wd = Xo && typeof ReadableStream == "function", wl = Xo && (typeof TextEncoder == "function" ? ((r) => (d) => r.encode(d))(new TextEncoder()) : async (r) => new Uint8Array(await new Response(r).arrayBuffer())), Md = (r, ...d) => {
- try {
- return !!r(...d);
- } catch {
- return !1;
- }
- }, VC = wd && Md(() => {
- let r = !1;
- const d = new Request(Ni.origin, {
- body: new ReadableStream(),
- method: "POST",
- get duplex() {
- return r = !0, "half";
- }
- }).headers.has("Content-Type");
- return r && !d;
- }), $p = 64 * 1024, Ml = wd && Md(() => Et.isReadableStream(new Response("").body)), Co = {
- stream: Ml && ((r) => r.body)
- };
- Xo && ((r) => {
- ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
- !Co[d] && (Co[d] = Et.isFunction(r[d]) ? (C) => C[d]() : (C, o) => {
- throw new ne(`Response type '${d}' is not supported`, ne.ERR_NOT_SUPPORT, o);
- });
- });
- })(new Response());
- const $C = async (r) => {
- if (r == null)
- return 0;
- if (Et.isBlob(r))
- return r.size;
- if (Et.isSpecCompliantForm(r))
- return (await new Request(r).arrayBuffer()).byteLength;
- if (Et.isArrayBufferView(r) || Et.isArrayBuffer(r))
- return r.byteLength;
- if (Et.isURLSearchParams(r) && (r = r + ""), Et.isString(r))
- return (await wl(r)).byteLength;
- }, ZC = async (r, d) => {
- const C = Et.toFiniteNumber(r.getContentLength());
- return C ?? $C(d);
- }, KC = Xo && (async (r) => {
- let {
- url: d,
- method: C,
- data: o,
- signal: y,
- cancelToken: N,
- timeout: _,
- onDownloadProgress: U,
- onUploadProgress: G,
- responseType: V,
- headers: F,
- withCredentials: B = "same-origin",
- fetchOptions: j
- } = Sd(r);
- V = V ? (V + "").toLowerCase() : "text";
- let [w, x] = y || N || _ ? HC([y, N], _) : [], f, l;
- const T = () => {
- !f && setTimeout(() => {
- w && w.unsubscribe();
- }), f = !0;
- };
- let O;
- try {
- if (G && VC && C !== "get" && C !== "head" && (O = await ZC(F, o)) !== 0) {
- let S = new Request(d, {
- method: "POST",
- body: o,
- duplex: "half"
- }), v;
- if (Et.isFormData(o) && (v = S.headers.get("content-type")) && F.setContentType(v), S.body) {
- const [h, c] = Hp(
- O,
- Mo(Fp(G))
- );
- o = Vp(S.body, $p, h, c, wl);
- }
- }
- Et.isString(B) || (B = B ? "include" : "omit"), l = new Request(d, {
- ...j,
- signal: w,
- method: C.toUpperCase(),
- headers: F.normalize().toJSON(),
- body: o,
- duplex: "half",
- credentials: B
- });
- let R = await fetch(l);
- const k = Ml && (V === "stream" || V === "response");
- if (Ml && (U || k)) {
- const S = {};
- ["status", "statusText", "headers"].forEach((u) => {
- S[u] = R[u];
- });
- const v = Et.toFiniteNumber(R.headers.get("content-length")), [h, c] = U && Hp(
- v,
- Mo(Fp(U), !0)
- ) || [];
- R = new Response(
- Vp(R.body, $p, h, () => {
- c && c(), k && T();
- }, wl),
- S
- );
- }
- V = V || "text";
- let b = await Co[Et.findKey(Co, V) || "text"](R, r);
- return !k && T(), x && x(), await new Promise((S, v) => {
- xd(S, v, {
- data: b,
- headers: Bi.from(R.headers),
- status: R.status,
- statusText: R.statusText,
- config: r,
- request: l
- });
- });
- } catch (R) {
- throw T(), R && R.name === "TypeError" && /fetch/i.test(R.message) ? Object.assign(
- new ne("Network Error", ne.ERR_NETWORK, r, l),
- {
- cause: R.cause || R
- }
- ) : ne.from(R, R && R.code, r, l);
- }
- }), Cl = {
- http: pC,
- xhr: XC,
- fetch: KC
- };
- Et.forEach(Cl, (r, d) => {
- if (r) {
- try {
- Object.defineProperty(r, "name", { value: d });
- } catch {
- }
- Object.defineProperty(r, "adapterName", { value: d });
- }
- });
- const Zp = (r) => `- ${r}`, JC = (r) => Et.isFunction(r) || r === null || r === !1, Cd = {
- getAdapter: (r) => {
- r = Et.isArray(r) ? r : [r];
- const { length: d } = r;
- let C, o;
- const y = {};
- for (let N = 0; N < d; N++) {
- C = r[N];
- let _;
- if (o = C, !JC(C) && (o = Cl[(_ = String(C)).toLowerCase()], o === void 0))
- throw new ne(`Unknown adapter '${_}'`);
- if (o)
- break;
- y[_ || "#" + N] = o;
- }
- if (!o) {
- const N = Object.entries(y).map(
- ([U, G]) => `adapter ${U} ` + (G === !1 ? "is not supported by the environment" : "is not available in the build")
- );
- let _ = d ? N.length > 1 ? `since :
- ` + N.map(Zp).join(`
- `) : " " + Zp(N[0]) : "as no adapter specified";
- throw new ne(
- "There is no suitable adapter to dispatch the request " + _,
- "ERR_NOT_SUPPORT"
- );
- }
- return o;
- },
- adapters: Cl
- };
- function ul(r) {
- if (r.cancelToken && r.cancelToken.throwIfRequested(), r.signal && r.signal.aborted)
- throw new Pn(null, r);
- }
- function Kp(r) {
- return ul(r), r.headers = Bi.from(r.headers), r.data = pl.call(
- r,
- r.transformRequest
- ), ["post", "put", "patch"].indexOf(r.method) !== -1 && r.headers.setContentType("application/x-www-form-urlencoded", !1), Cd.getAdapter(r.adapter || eh.adapter)(r).then(function(o) {
- return ul(r), o.data = pl.call(
- r,
- r.transformResponse,
- o
- ), o.headers = Bi.from(o.headers), o;
- }, function(o) {
- return vd(o) || (ul(r), o && o.response && (o.response.data = pl.call(
- r,
- r.transformResponse,
- o.response
- ), o.response.headers = Bi.from(o.response.headers))), Promise.reject(o);
- });
- }
- const kd = "1.7.3", ih = {};
- ["object", "boolean", "number", "function", "string", "symbol"].forEach((r, d) => {
- ih[r] = function(o) {
- return typeof o === r || "a" + (d < 1 ? "n " : " ") + r;
- };
- });
- const Jp = {};
- ih.transitional = function(d, C, o) {
- function y(N, _) {
- return "[Axios v" + kd + "] Transitional option '" + N + "'" + _ + (o ? ". " + o : "");
- }
- return (N, _, U) => {
- if (d === !1)
- throw new ne(
- y(_, " has been removed" + (C ? " in " + C : "")),
- ne.ERR_DEPRECATED
- );
- return C && !Jp[_] && (Jp[_] = !0, console.warn(
- y(
- _,
- " has been deprecated since v" + C + " and will be removed in the near future"
- )
- )), d ? d(N, _, U) : !0;
- };
- };
- function qC(r, d, C) {
- if (typeof r != "object")
- throw new ne("options must be an object", ne.ERR_BAD_OPTION_VALUE);
- const o = Object.keys(r);
- let y = o.length;
- for (; y-- > 0; ) {
- const N = o[y], _ = d[N];
- if (_) {
- const U = r[N], G = U === void 0 || _(U, N, r);
- if (G !== !0)
- throw new ne("option " + N + " must be " + G, ne.ERR_BAD_OPTION_VALUE);
- continue;
- }
- if (C !== !0)
- throw new ne("Unknown option " + N, ne.ERR_BAD_OPTION);
- }
- }
- const kl = {
- assertOptions: qC,
- validators: ih
- }, kr = kl.validators;
- class ko {
- constructor(d) {
- this.defaults = d, this.interceptors = {
- request: new Xp(),
- response: new Xp()
- };
- }
- /**
- * Dispatch a request
- *
- * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
- * @param {?Object} config
- *
- * @returns {Promise} The Promise to be fulfilled
- */
- async request(d, C) {
- try {
- return await this._request(d, C);
- } catch (o) {
- if (o instanceof Error) {
- let y;
- Error.captureStackTrace ? Error.captureStackTrace(y = {}) : y = new Error();
- const N = y.stack ? y.stack.replace(/^.+\n/, "") : "";
- try {
- o.stack ? N && !String(o.stack).endsWith(N.replace(/^.+\n.+\n/, "")) && (o.stack += `
- ` + N) : o.stack = N;
- } catch {
- }
- }
- throw o;
- }
- }
- _request(d, C) {
- typeof d == "string" ? (C = C || {}, C.url = d) : C = d || {}, C = Zr(this.defaults, C);
- const { transitional: o, paramsSerializer: y, headers: N } = C;
- o !== void 0 && kl.assertOptions(o, {
- silentJSONParsing: kr.transitional(kr.boolean),
- forcedJSONParsing: kr.transitional(kr.boolean),
- clarifyTimeoutError: kr.transitional(kr.boolean)
- }, !1), y != null && (Et.isFunction(y) ? C.paramsSerializer = {
- serialize: y
- } : kl.assertOptions(y, {
- encode: kr.function,
- serialize: kr.function
- }, !0)), C.method = (C.method || this.defaults.method || "get").toLowerCase();
- let _ = N && Et.merge(
- N.common,
- N[C.method]
- );
- N && Et.forEach(
- ["delete", "get", "head", "post", "put", "patch", "common"],
- (x) => {
- delete N[x];
- }
- ), C.headers = Bi.concat(_, N);
- const U = [];
- let G = !0;
- this.interceptors.request.forEach(function(f) {
- typeof f.runWhen == "function" && f.runWhen(C) === !1 || (G = G && f.synchronous, U.unshift(f.fulfilled, f.rejected));
- });
- const V = [];
- this.interceptors.response.forEach(function(f) {
- V.push(f.fulfilled, f.rejected);
- });
- let F, B = 0, j;
- if (!G) {
- const x = [Kp.bind(this), void 0];
- for (x.unshift.apply(x, U), x.push.apply(x, V), j = x.length, F = Promise.resolve(C); B < j; )
- F = F.then(x[B++], x[B++]);
- return F;
- }
- j = U.length;
- let w = C;
- for (B = 0; B < j; ) {
- const x = U[B++], f = U[B++];
- try {
- w = x(w);
- } catch (l) {
- f.call(this, l);
- break;
- }
- }
- try {
- F = Kp.call(this, w);
- } catch (x) {
- return Promise.reject(x);
- }
- for (B = 0, j = V.length; B < j; )
- F = F.then(V[B++], V[B++]);
- return F;
- }
- getUri(d) {
- d = Zr(this.defaults, d);
- const C = bd(d.baseURL, d.url);
- return gd(C, d.params, d.paramsSerializer);
- }
- }
- Et.forEach(["delete", "get", "head", "options"], function(d) {
- ko.prototype[d] = function(C, o) {
- return this.request(Zr(o || {}, {
- method: d,
- url: C,
- data: (o || {}).data
- }));
- };
- });
- Et.forEach(["post", "put", "patch"], function(d) {
- function C(o) {
- return function(N, _, U) {
- return this.request(Zr(U || {}, {
- method: d,
- headers: o ? {
- "Content-Type": "multipart/form-data"
- } : {},
- url: N,
- data: _
- }));
- };
- }
- ko.prototype[d] = C(), ko.prototype[d + "Form"] = C(!0);
- });
- const uo = ko;
- class rh {
- constructor(d) {
- if (typeof d != "function")
- throw new TypeError("executor must be a function.");
- let C;
- this.promise = new Promise(function(N) {
- C = N;
- });
- const o = this;
- this.promise.then((y) => {
- if (!o._listeners)
- return;
- let N = o._listeners.length;
- for (; N-- > 0; )
- o._listeners[N](y);
- o._listeners = null;
- }), this.promise.then = (y) => {
- let N;
- const _ = new Promise((U) => {
- o.subscribe(U), N = U;
- }).then(y);
- return _.cancel = function() {
- o.unsubscribe(N);
- }, _;
- }, d(function(N, _, U) {
- o.reason || (o.reason = new Pn(N, _, U), C(o.reason));
- });
- }
- /**
- * Throws a `CanceledError` if cancellation has been requested.
- */
- throwIfRequested() {
- if (this.reason)
- throw this.reason;
- }
- /**
- * Subscribe to the cancel signal
- */
- subscribe(d) {
- if (this.reason) {
- d(this.reason);
- return;
- }
- this._listeners ? this._listeners.push(d) : this._listeners = [d];
- }
- /**
- * Unsubscribe from the cancel signal
- */
- unsubscribe(d) {
- if (!this._listeners)
- return;
- const C = this._listeners.indexOf(d);
- C !== -1 && this._listeners.splice(C, 1);
- }
- /**
- * Returns an object that contains a new `CancelToken` and a function that, when called,
- * cancels the `CancelToken`.
- */
- static source() {
- let d;
- return {
- token: new rh(function(y) {
- d = y;
- }),
- cancel: d
- };
- }
- }
- const QC = rh;
- function tk(r) {
- return function(C) {
- return r.apply(null, C);
- };
- }
- function ek(r) {
- return Et.isObject(r) && r.isAxiosError === !0;
- }
- const Al = {
- Continue: 100,
- SwitchingProtocols: 101,
- Processing: 102,
- EarlyHints: 103,
- Ok: 200,
- Created: 201,
- Accepted: 202,
- NonAuthoritativeInformation: 203,
- NoContent: 204,
- ResetContent: 205,
- PartialContent: 206,
- MultiStatus: 207,
- AlreadyReported: 208,
- ImUsed: 226,
- MultipleChoices: 300,
- MovedPermanently: 301,
- Found: 302,
- SeeOther: 303,
- NotModified: 304,
- UseProxy: 305,
- Unused: 306,
- TemporaryRedirect: 307,
- PermanentRedirect: 308,
- BadRequest: 400,
- Unauthorized: 401,
- PaymentRequired: 402,
- Forbidden: 403,
- NotFound: 404,
- MethodNotAllowed: 405,
- NotAcceptable: 406,
- ProxyAuthenticationRequired: 407,
- RequestTimeout: 408,
- Conflict: 409,
- Gone: 410,
- LengthRequired: 411,
- PreconditionFailed: 412,
- PayloadTooLarge: 413,
- UriTooLong: 414,
- UnsupportedMediaType: 415,
- RangeNotSatisfiable: 416,
- ExpectationFailed: 417,
- ImATeapot: 418,
- MisdirectedRequest: 421,
- UnprocessableEntity: 422,
- Locked: 423,
- FailedDependency: 424,
- TooEarly: 425,
- UpgradeRequired: 426,
- PreconditionRequired: 428,
- TooManyRequests: 429,
- RequestHeaderFieldsTooLarge: 431,
- UnavailableForLegalReasons: 451,
- InternalServerError: 500,
- NotImplemented: 501,
- BadGateway: 502,
- ServiceUnavailable: 503,
- GatewayTimeout: 504,
- HttpVersionNotSupported: 505,
- VariantAlsoNegotiates: 506,
- InsufficientStorage: 507,
- LoopDetected: 508,
- NotExtended: 510,
- NetworkAuthenticationRequired: 511
- };
- Object.entries(Al).forEach(([r, d]) => {
- Al[d] = r;
- });
- const ik = Al;
- function Ad(r) {
- const d = new uo(r), C = rd(uo.prototype.request, d);
- return Et.extend(C, uo.prototype, d, { allOwnKeys: !0 }), Et.extend(C, d, null, { allOwnKeys: !0 }), C.create = function(y) {
- return Ad(Zr(r, y));
- }, C;
- }
- const Ye = Ad(eh);
- Ye.Axios = uo;
- Ye.CanceledError = Pn;
- Ye.CancelToken = QC;
- Ye.isCancel = vd;
- Ye.VERSION = kd;
- Ye.toFormData = Yo;
- Ye.AxiosError = ne;
- Ye.Cancel = Ye.CanceledError;
- Ye.all = function(d) {
- return Promise.all(d);
- };
- Ye.spread = tk;
- Ye.isAxiosError = ek;
- Ye.mergeConfig = Zr;
- Ye.AxiosHeaders = Bi;
- Ye.formToJSON = (r) => yd(Et.isHTMLForm(r) ? new FormData(r) : r);
- Ye.getAdapter = Cd.getAdapter;
- Ye.HttpStatusCode = ik;
- Ye.default = Ye;
- const rk = Ye;
- let nk = {
- baseURL: "/api",
- timeout: 10 * 60 * 1e3
- };
- const nh = rk.create(nk);
- nh.interceptors.request.use(
- function(r) {
- return r;
- },
- function(r) {
- return console.error(r), Promise.reject(r);
- }
- );
- nh.interceptors.response.use(
- function(r) {
- let d = r.data;
- return r.status !== 200 && console.error("网络异常"), d || console.error("服务器开了个小差"), d.Ret === 408 && console.error(d.Msg), d.Ret === 403 && console.error(d.Msg || "网络异常"), d;
- },
- function(r) {
- return console.error(r), Promise.reject(r);
- }
- );
- const Td = (r, d) => nh.post(r, d), sk = (r) => Td("/chart/detail", r), ok = (r) => Td("/excel/detail", r);
- function Pd(r) {
- if (r.indexOf("?") === -1)
- return {};
- const C = r.split("?")[1].split("&"), o = {};
- return C.forEach((y) => {
- const [N, _] = y.split("=");
- o[N] = decodeURIComponent(_);
- }), o;
- }
- const ak = `@charset "UTF-8";div[data-v-f415cce0]{box-sizing:border-box}.hz-chart-wrap[data-v-f415cce0]{font:initial;page-break-inside:avoid;max-width:1200PX;height:100%;overflow:hidden;position:relative;margin:0 auto;border:1PX solid rgba(0,0,0,.125)!important;background:#fff;border-radius:5PX;display:flex;flex-direction:column;font-family:PingFangSC-Regular,微软雅黑,宋体!important}.hz-chart-wrap .hz-chart-head[data-v-f415cce0]{box-sizing:border-box;background-color:#f2f2f2;border-bottom:1px solid rgba(0,0,0,.125);cursor:pointer;min-height:40PX;display:flex;align-items:center;padding:2PX 10PX}.hz-chart-wrap .hz-chart-head .chart-title[data-v-f415cce0]{width:100%}.hz-chart-wrap .chart-wrapper[data-v-f415cce0]{position:relative;display:flex;height:100%;width:100%}.hz-chart-wrap .chart-wrapper .hz-chart-content[data-v-f415cce0]{width:100%;flex:1}.hz-chart-wrap .chart-wrapper .mark[data-v-f415cce0]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background-image:none;background-position:center center;background-repeat:no-repeat;background-size:contain;pointer-events:none;width:80%;height:80%}.hz-chart-wrap .notfound[data-v-f415cce0]{flex:1;overflow:hidden;padding:10PX;color:#777;text-align:center}.hz-chart-wrap .chart-bottom-info[data-v-f415cce0]{padding-right:10PX;padding-bottom:0;padding-left:25PX;display:flex}.hz-chart-wrap .chart-bottom-info .chart-instruction[data-v-f415cce0]{max-width:80%;flex:1;text-align:right;margin-left:auto}.hz-chart-wrap .hz-chart-footer[data-v-f415cce0]{padding-left:25PX;padding-right:10PX;padding-bottom:10PX;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:1px}.hz-chart-wrap .text_oneLine[data-v-f415cce0]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
- `, Ed = (r, d) => {
- const C = r.__vccOpts || r;
- for (const [o, y] of d)
- C[o] = y;
- return C;
- }, lk = { class: "hz-chart-head" }, hk = {
- key: 0,
- class: "chart-wrapper"
- }, ck = ["id"], pk = {
- key: 1,
- class: "notfound"
- }, uk = {
- key: 2,
- class: "chart-bottom-info bootom-source"
- }, dk = ["textContent"], fk = {
- __name: "EtaChart.ce",
- props: {
- src: "",
- width: "",
- height: "",
- style: ""
- },
- setup(r) {
- const { chartRender: d, setLimitData: C, isUseSelfLimit: o } = iM(), y = r, N = Pd(y.src), _ = Le(null), U = Le(""), G = Le(null), V = Le(null), F = Le(!1), B = Le(null), j = Le(null), w = Le(null);
- async function x() {
- if (!N.code) {
- F.value = !1;
- return;
- }
- try {
- const l = await sk({
- UniqueCode: N.code
- });
- if (l.Ret !== 200)
- return;
- G.value = l.Data.ChartInfo, V.value = l.Data.ChartInfo.Source === 1 ? l.Data.EdbInfoList : [l.Data.EdbInfoList[0]], U.value = `hz-chart_${N.code}_${(/* @__PURE__ */ new Date()).getTime()}`, f(), F.value = !0, l.Data.ChartInfo.Source === 1 && ![7, 10, 11].includes(l.Data.ChartInfo.ChartType) ? (o.value = !0, C(l.Data)) : o.value = !1, fo(() => {
- d({
- data: l.Data,
- renderId: _.value,
- lang: N.language,
- changeLangIsCheck: !1,
- showChartTitle: !1,
- shouldUseSelfLimit: !0
- }), l.Data.WaterMark && (B.value.style.backgroundImage = `url(${l.Data.WaterMark})`);
- }), fo(() => {
- var T;
- w.value && (w.value.style.maxWidth = ((T = j.value) == null ? void 0 : T.clientWidth) + "px");
- });
- } catch {
- F.value = !1;
- }
- }
- const f = () => {
- N.language = N.fromPage || N.lang || "zh";
- };
- return x(), (l, T) => {
- var O, R, k, b;
- return Je(), qe("div", {
- class: "hz-chart-wrap",
- ref_key: "chartContainer",
- ref: j,
- style: Ar([y.style + ";height:" + y.height + "px", { margin: "0 0 10px 0" }])
- }, [
- ar("header", lk, [
- G.value ? (Je(), qe("span", {
- key: 0,
- class: "chart-title",
- style: Ar(G.value.ChartThemeStyle ? `
- text-align:${JSON.parse(G.value.ChartThemeStyle).titleOptions.align};
- font-size:${JSON.parse(G.value.ChartThemeStyle).titleOptions.style.fontSize}px;
- color:${JSON.parse(G.value.ChartThemeStyle).titleOptions.style.color}
- ` : "")
- }, yn(X0(N).language === "en" ? G.value.ChartNameEn : G.value.ChartName), 5)) : qn("", !0)
- ]),
- F.value ? (Je(), qe("div", hk, [
- ar("div", {
- id: U.value,
- ref_key: "chartContentEl",
- ref: _,
- class: "hz-chart-content"
- }, null, 8, ck),
- ar("div", {
- class: "mark",
- ref_key: "markDom",
- ref: B
- }, null, 512)
- ])) : (Je(), qe("div", pk, " 哎吆,你的图飞了,赶快去找管理员救命吧~ ")),
- (O = G.value) != null && O.Instructions && JSON.parse((R = G.value) == null ? void 0 : R.Instructions).isShow ? (Je(), qe("div", uk, [
- ar("div", {
- class: "chart-instruction text_oneLine",
- textContent: yn(JSON.parse(G.value.Instructions).text),
- style: Ar(`
- color: ${JSON.parse(G.value.Instructions).color};
- font-size: ${JSON.parse(G.value.Instructions).fontSize}px
- `)
- }, null, 12, dk)
- ])) : qn("", !0),
- (k = G.value) != null && k.SourcesFrom && ((b = JSON.parse(G.value.SourcesFrom)) != null && b.isShow) ? (Je(), qe("div", {
- key: 3,
- class: "hz-chart-footer",
- ref_key: "chartFooter",
- ref: w,
- style: Ar(`
- color: ${JSON.parse(G.value.SourcesFrom).color};
- font-size: ${JSON.parse(G.value.SourcesFrom).fontSize}px;
- `)
- }, [
- qp(" source:"),
- ar("em", null, yn(JSON.parse(G.value.SourcesFrom).text), 1)
- ], 4)) : qn("", !0)
- ], 4);
- };
- }
- }, gk = /* @__PURE__ */ Ed(fk, [["styles", [ak]], ["__scopeId", "data-v-f415cce0"]]), mk = `@charset "UTF-8";.sheet-show-wrapper[data-v-98ab6c2e]{max-width:1200PX;overflow:hidden;position:relative;margin:0 auto;background:#fff;font-family:PingFangSC-Regular,微软雅黑,宋体!important}.sheet-show-wrapper .title[data-v-98ab6c2e]{font-size:17PX;font-weight:400;padding:0 10PX;margin:0 0 8PX}.sheet-show-wrapper .table-wrapper[data-v-98ab6c2e]{max-width:calc(100vw - 20PX);margin:0 auto;overflow:auto}.sheet-show-wrapper .table-wrapper table[data-v-98ab6c2e]{width:100%;font-size:14PX;color:#333;table-layout:auto}.sheet-show-wrapper .table-wrapper table td[data-v-98ab6c2e],.sheet-show-wrapper .table-wrapper table th[data-v-98ab6c2e]{width:auto;height:auto;padding:.4em 0;word-break:break-all;word-wrap:break-word;line-height:1.2em;border:1PX solid #dcdfe6;text-align:center;background-color:#fff;border-left:none;border-top:none}.sheet-show-wrapper .table-wrapper table td[data-v-98ab6c2e]:first-child,.sheet-show-wrapper .table-wrapper table th[data-v-98ab6c2e]:first-child{border-left:1PX solid #dcdfe6}.sheet-show-wrapper .table-wrapper table .data-cell[data-v-98ab6c2e]{color:#333}.sheet-show-wrapper .table-wrapper table .data-cell.one-bg[data-v-98ab6c2e]{background-color:#efeef1}.sheet-show-wrapper .table-wrapper table .data-cell.two-bg[data-v-98ab6c2e]{background-color:#fff}.sheet-show-wrapper .table-wrapper table .thead-sticky[data-v-98ab6c2e]{position:sticky;top:0}.sheet-show-wrapper .table-wrapper table .head-column[data-v-98ab6c2e]{background-color:#505b78;color:#fff}.sheet-show-wrapper .table-wrapper table .split-word span[data-v-98ab6c2e]{display:inline}.sheet-show-wrapper .sheet-source[data-v-98ab6c2e]{margin-top:5PX;min-width:150PX;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
- `, yk = { class: "table-wrapper" }, vk = ["colspan", "rowspan"], xk = {
- key: 0,
- class: "split-word"
- }, bk = { key: 1 }, Sk = {
- __name: "EtaTable.ce",
- props: {
- src: "",
- width: "",
- height: "",
- style: ""
- },
- setup(r) {
- const C = Pd(r.src), o = Le({}), y = Le(!1), N = Le(null), _ = Le(null), U = (V) => JSON.stringify({
- isShow: !0,
- text: V,
- color: "#606266",
- fontSize: 9
- });
- async function G() {
- const V = await ok({ UniqueCode: C.code, FromScene: Number(C.fromScene || "") });
- V.Ret === 200 && (o.value = V.Data, o.value.SourcesFrom || (o.value.SourcesFrom = V.Data.ExcelSource ? U(V.Data.ExcelSource || "") : ""), y.value = !0, fo(() => {
- var F;
- console.log(N.value.clientWidth), _.value && (_.value.style.maxWidth = ((F = N.value) == null ? void 0 : F.clientWidth) + "px");
- }));
- }
- return G(), (V, F) => {
- var B, j;
- return y.value ? (Je(), qe("div", {
- key: 0,
- class: "sheet-show-wrapper",
- ref_key: "sheetRef",
- ref: N
- }, [
- ar("div", yk, [
- ar("table", {
- cellpadding: "0",
- cellspacing: "0",
- style: Ar(`font-size: ${((B = o.value.Config) == null ? void 0 : B.FontSize) || 12}PX`)
- }, [
- ar("tbody", null, [
- (Je(!0), qe(tl, null, el((j = o.value.TableInfo) == null ? void 0 : j.TableDataList, (w, x) => (Je(), qe("tr", { key: x }, [
- (Je(!0), qe(tl, null, el(w, (f, l) => (Je(), qe("td", {
- class: G0(["data-cell", {
- "one-bg": (x + 1) % 2 && x > 0,
- "tow-bg": (x + 1) % 2 !== 0 && x > 0,
- "head-column": x === 0
- }]),
- key: l,
- colspan: f.mc.cs || 1,
- rowspan: f.mc.rs || 1,
- style: Ar(`
- color: ${f.fc};
- font-weight: ${f.bl ? "bold" : "normal"};
- font-style: ${f.it ? "italic" : "normal"};
- background: ${f.bg};
- `)
- }, [
- f.ct.s ? (Je(), qe("div", xk, [
- (Je(!0), qe(tl, null, el(f.ct.s, (T, O) => (Je(), qe("span", {
- key: `${x}_${l}_${O}`,
- style: Ar(`
- color: ${T.fc};
- font-weight: ${T.bl ? "bold" : "normal"};
- font-style: ${T.it ? "italic" : "normal"};
- `)
- }, yn(T.v), 5))), 128))
- ])) : (Je(), qe("div", bk, yn(f.m), 1))
- ], 14, vk))), 128))
- ]))), 128))
- ])
- ], 4)
- ]),
- o.value.SourcesFrom && JSON.parse(o.value.SourcesFrom).isShow ? (Je(), qe("div", {
- key: 0,
- class: "sheet-source",
- ref_key: "sheetFooter",
- ref: _,
- style: Ar(`
- color: ${JSON.parse(o.value.SourcesFrom).color};
- font-size: ${JSON.parse(o.value.SourcesFrom).fontSize}px;
- `)
- }, [
- qp(" source:"),
- ar("em", null, yn(JSON.parse(o.value.SourcesFrom).text), 1)
- ], 4)) : qn("", !0)
- ], 512)) : qn("", !0);
- };
- }
- }, wk = /* @__PURE__ */ Ed(Sk, [["styles", [mk]], ["__scopeId", "data-v-98ab6c2e"]]), Mk = Qp(gk), Ck = Qp(wk);
- function Ak() {
- customElements.define("eta-chart", Mk), customElements.define("eta-table", Ck);
- }
- export {
- Ak as registerEtaComp
- };
|