ngx-bootstrap-chronos.umd.js 339 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
  3. typeof define === 'function' && define.amd ? define('ngx-bootstrap/chronos', ['exports'], factory) :
  4. (global = global || self, factory((global['ngx-bootstrap'] = global['ngx-bootstrap'] || {}, global['ngx-bootstrap'].chronos = {})));
  5. }(this, function (exports) { 'use strict';
  6. /**
  7. * @fileoverview added by tsickle
  8. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  9. */
  10. /**
  11. * @param {?} n
  12. * @param {?} x
  13. * @return {?}
  14. */
  15. function mod(n, x) {
  16. return (n % x + x) % x;
  17. }
  18. /**
  19. * @param {?} num
  20. * @return {?}
  21. */
  22. function absFloor(num) {
  23. return num < 0 ? Math.ceil(num) || 0 : Math.floor(num);
  24. }
  25. /**
  26. * @fileoverview added by tsickle
  27. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  28. */
  29. /**
  30. * @param {?} str
  31. * @return {?}
  32. */
  33. function isString(str) {
  34. return typeof str === 'string';
  35. }
  36. /**
  37. * @param {?} value
  38. * @return {?}
  39. */
  40. function isDate(value) {
  41. return value instanceof Date || Object.prototype.toString.call(value) === '[object Date]';
  42. }
  43. /**
  44. * @param {?} date
  45. * @return {?}
  46. */
  47. function isDateValid(date) {
  48. return date && date.getTime && !isNaN(date.getTime());
  49. }
  50. /**
  51. * @param {?} fn
  52. * @return {?}
  53. */
  54. function isFunction(fn) {
  55. return (fn instanceof Function ||
  56. Object.prototype.toString.call(fn) === '[object Function]');
  57. }
  58. /**
  59. * @param {?=} value
  60. * @return {?}
  61. */
  62. function isNumber(value) {
  63. return typeof value === 'number' || Object.prototype.toString.call(value) === '[object Number]';
  64. }
  65. /**
  66. * @template T
  67. * @param {?=} input
  68. * @return {?}
  69. */
  70. function isArray(input) {
  71. return (input instanceof Array ||
  72. Object.prototype.toString.call(input) === '[object Array]');
  73. }
  74. /**
  75. * @template T
  76. * @param {?} a
  77. * @param {?} b
  78. * @return {?}
  79. */
  80. function hasOwnProp(a /*object*/, b) {
  81. return Object.prototype.hasOwnProperty.call(a, b);
  82. }
  83. /**
  84. * @template T
  85. * @param {?} input
  86. * @return {?}
  87. */
  88. function isObject(input /*object*/) {
  89. // IE8 will treat undefined and null as object if it wasn't for
  90. // input != null
  91. return (input != null && Object.prototype.toString.call(input) === '[object Object]');
  92. }
  93. /**
  94. * @param {?} obj
  95. * @return {?}
  96. */
  97. function isObjectEmpty(obj) {
  98. if (Object.getOwnPropertyNames) {
  99. return (Object.getOwnPropertyNames(obj).length === 0);
  100. }
  101. /** @type {?} */
  102. var k;
  103. for (k in obj) {
  104. if (obj.hasOwnProperty(k)) {
  105. return false;
  106. }
  107. }
  108. return true;
  109. }
  110. /**
  111. * @param {?} input
  112. * @return {?}
  113. */
  114. function isUndefined(input) {
  115. return input === void 0;
  116. }
  117. /**
  118. * @template T
  119. * @param {?} argumentForCoercion
  120. * @return {?}
  121. */
  122. function toInt(argumentForCoercion) {
  123. /** @type {?} */
  124. var coercedNumber = +argumentForCoercion;
  125. /** @type {?} */
  126. var value = 0;
  127. if (coercedNumber !== 0 && isFinite(coercedNumber)) {
  128. value = absFloor(coercedNumber);
  129. }
  130. return value;
  131. }
  132. /**
  133. * @fileoverview added by tsickle
  134. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  135. */
  136. /** @type {?} */
  137. var aliases = {};
  138. /** @type {?} */
  139. var _mapUnits = {
  140. date: 'day',
  141. hour: 'hours',
  142. minute: 'minutes',
  143. second: 'seconds',
  144. millisecond: 'milliseconds'
  145. };
  146. /**
  147. * @param {?} unit
  148. * @param {?} shorthand
  149. * @return {?}
  150. */
  151. function addUnitAlias(unit, shorthand) {
  152. /** @type {?} */
  153. var lowerCase = unit.toLowerCase();
  154. /** @type {?} */
  155. var _unit = unit;
  156. if (lowerCase in _mapUnits) {
  157. _unit = _mapUnits[lowerCase];
  158. }
  159. aliases[lowerCase] = aliases[lowerCase + "s"] = aliases[shorthand] = _unit;
  160. }
  161. /**
  162. * @param {?} units
  163. * @return {?}
  164. */
  165. function normalizeUnits(units) {
  166. return isString(units) ? aliases[units] || aliases[units.toLowerCase()] : undefined;
  167. }
  168. /**
  169. * @param {?} inputObject
  170. * @return {?}
  171. */
  172. function normalizeObjectUnits(inputObject) {
  173. /** @type {?} */
  174. var normalizedInput = {};
  175. /** @type {?} */
  176. var normalizedProp;
  177. /** @type {?} */
  178. var prop;
  179. for (prop in inputObject) {
  180. if (hasOwnProp(inputObject, prop)) {
  181. normalizedProp = normalizeUnits(prop);
  182. if (normalizedProp) {
  183. normalizedInput[normalizedProp] = inputObject[prop];
  184. }
  185. }
  186. }
  187. return (/** @type {?} */ (normalizedInput));
  188. }
  189. /**
  190. * @fileoverview added by tsickle
  191. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  192. */
  193. // place in new Date([array])
  194. /** @type {?} */
  195. var YEAR = 0;
  196. /** @type {?} */
  197. var MONTH = 1;
  198. /** @type {?} */
  199. var DATE = 2;
  200. /** @type {?} */
  201. var HOUR = 3;
  202. /** @type {?} */
  203. var MINUTE = 4;
  204. /** @type {?} */
  205. var SECOND = 5;
  206. /** @type {?} */
  207. var MILLISECOND = 6;
  208. /** @type {?} */
  209. var WEEK = 7;
  210. /** @type {?} */
  211. var WEEKDAY = 8;
  212. /**
  213. * @fileoverview added by tsickle
  214. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  215. */
  216. /**
  217. * @param {?} num
  218. * @param {?} targetLength
  219. * @param {?=} forceSign
  220. * @return {?}
  221. */
  222. function zeroFill(num, targetLength, forceSign) {
  223. /** @type {?} */
  224. var absNumber = "" + Math.abs(num);
  225. /** @type {?} */
  226. var zerosToFill = targetLength - absNumber.length;
  227. /** @type {?} */
  228. var sign = num >= 0;
  229. /** @type {?} */
  230. var _sign = sign ? (forceSign ? '+' : '') : '-';
  231. // todo: this is crazy slow
  232. /** @type {?} */
  233. var _zeros = Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1);
  234. return (_sign + _zeros + absNumber);
  235. }
  236. /**
  237. * @fileoverview added by tsickle
  238. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  239. */
  240. /** @type {?} */
  241. var formatFunctions = {};
  242. /** @type {?} */
  243. var formatTokenFunctions = {};
  244. // tslint:disable-next-line
  245. /** @type {?} */
  246. var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;
  247. // token: 'M'
  248. // padded: ['MM', 2]
  249. // ordinal: 'Mo'
  250. // callback: function () { this.month() + 1 }
  251. /**
  252. * @param {?} token
  253. * @param {?} padded
  254. * @param {?} ordinal
  255. * @param {?} callback
  256. * @return {?}
  257. */
  258. function addFormatToken(token, padded, ordinal, callback) {
  259. if (token) {
  260. formatTokenFunctions[token] = callback;
  261. }
  262. if (padded) {
  263. formatTokenFunctions[padded[0]] = (/**
  264. * @return {?}
  265. */
  266. function () {
  267. return zeroFill(callback.apply(null, arguments), padded[1], padded[2]);
  268. });
  269. }
  270. if (ordinal) {
  271. formatTokenFunctions[ordinal] = (/**
  272. * @param {?} date
  273. * @param {?} opts
  274. * @return {?}
  275. */
  276. function (date, opts) {
  277. return opts.locale.ordinal(callback.apply(null, arguments), token);
  278. });
  279. }
  280. }
  281. /**
  282. * @param {?} format
  283. * @return {?}
  284. */
  285. function makeFormatFunction(format) {
  286. /** @type {?} */
  287. var array = format.match(formattingTokens);
  288. /** @type {?} */
  289. var length = array.length;
  290. /** @type {?} */
  291. var formatArr = new Array(length);
  292. for (var i = 0; i < length; i++) {
  293. formatArr[i] = formatTokenFunctions[array[i]]
  294. ? formatTokenFunctions[array[i]]
  295. : removeFormattingTokens(array[i]);
  296. }
  297. return (/**
  298. * @param {?} date
  299. * @param {?} locale
  300. * @param {?} isUTC
  301. * @param {?=} offset
  302. * @return {?}
  303. */
  304. function (date, locale, isUTC, offset) {
  305. if (offset === void 0) { offset = 0; }
  306. /** @type {?} */
  307. var output = '';
  308. for (var j = 0; j < length; j++) {
  309. output += isFunction(formatArr[j])
  310. ? ((/** @type {?} */ (formatArr[j]))).call(null, date, { format: format, locale: locale, isUTC: isUTC, offset: offset })
  311. : formatArr[j];
  312. }
  313. return output;
  314. });
  315. }
  316. /**
  317. * @param {?} input
  318. * @return {?}
  319. */
  320. function removeFormattingTokens(input) {
  321. if (input.match(/\[[\s\S]/)) {
  322. return input.replace(/^\[|\]$/g, '');
  323. }
  324. return input.replace(/\\/g, '');
  325. }
  326. /**
  327. * @fileoverview added by tsickle
  328. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  329. */
  330. /**
  331. * @param {?=} y
  332. * @param {?=} m
  333. * @param {?=} d
  334. * @return {?}
  335. */
  336. function createUTCDate(y, m, d) {
  337. /** @type {?} */
  338. var date = new Date(Date.UTC.apply(null, arguments));
  339. // the Date.UTC function remaps years 0-99 to 1900-1999
  340. if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
  341. date.setUTCFullYear(y);
  342. }
  343. return date;
  344. }
  345. /**
  346. * @param {?=} y
  347. * @param {?=} m
  348. * @param {?=} d
  349. * @param {?=} h
  350. * @param {?=} M
  351. * @param {?=} s
  352. * @param {?=} ms
  353. * @return {?}
  354. */
  355. function createDate(y, m, d, h, M, s, ms) {
  356. if (m === void 0) { m = 0; }
  357. if (d === void 0) { d = 1; }
  358. if (h === void 0) { h = 0; }
  359. if (M === void 0) { M = 0; }
  360. if (s === void 0) { s = 0; }
  361. if (ms === void 0) { ms = 0; }
  362. /** @type {?} */
  363. var date = new Date(y, m, d, h, M, s, ms);
  364. // the date constructor remaps years 0-99 to 1900-1999
  365. if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
  366. date.setFullYear(y);
  367. }
  368. return date;
  369. }
  370. /**
  371. * @fileoverview added by tsickle
  372. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  373. */
  374. /**
  375. * @param {?} date
  376. * @param {?=} isUTC
  377. * @return {?}
  378. */
  379. function getHours(date, isUTC) {
  380. if (isUTC === void 0) { isUTC = false; }
  381. return isUTC ? date.getUTCHours() : date.getHours();
  382. }
  383. /**
  384. * @param {?} date
  385. * @param {?=} isUTC
  386. * @return {?}
  387. */
  388. function getMinutes(date, isUTC) {
  389. if (isUTC === void 0) { isUTC = false; }
  390. return isUTC ? date.getUTCMinutes() : date.getMinutes();
  391. }
  392. /**
  393. * @param {?} date
  394. * @param {?=} isUTC
  395. * @return {?}
  396. */
  397. function getSeconds(date, isUTC) {
  398. if (isUTC === void 0) { isUTC = false; }
  399. return isUTC ? date.getUTCSeconds() : date.getSeconds();
  400. }
  401. /**
  402. * @param {?} date
  403. * @param {?=} isUTC
  404. * @return {?}
  405. */
  406. function getMilliseconds(date, isUTC) {
  407. if (isUTC === void 0) { isUTC = false; }
  408. return isUTC ? date.getUTCMilliseconds() : date.getMilliseconds();
  409. }
  410. /**
  411. * @param {?} date
  412. * @return {?}
  413. */
  414. function getTime(date) {
  415. return date.getTime();
  416. }
  417. /**
  418. * @param {?} date
  419. * @param {?=} isUTC
  420. * @return {?}
  421. */
  422. function getDay(date, isUTC) {
  423. if (isUTC === void 0) { isUTC = false; }
  424. return isUTC ? date.getUTCDay() : date.getDay();
  425. }
  426. /**
  427. * @param {?} date
  428. * @param {?=} isUTC
  429. * @return {?}
  430. */
  431. function getDate(date, isUTC) {
  432. if (isUTC === void 0) { isUTC = false; }
  433. return isUTC ? date.getUTCDate() : date.getDate();
  434. }
  435. /**
  436. * @param {?} date
  437. * @param {?=} isUTC
  438. * @return {?}
  439. */
  440. function getMonth(date, isUTC) {
  441. if (isUTC === void 0) { isUTC = false; }
  442. return isUTC ? date.getUTCMonth() : date.getMonth();
  443. }
  444. /**
  445. * @param {?} date
  446. * @param {?=} isUTC
  447. * @return {?}
  448. */
  449. function getFullYear(date, isUTC) {
  450. if (isUTC === void 0) { isUTC = false; }
  451. return isUTC ? date.getUTCFullYear() : date.getFullYear();
  452. }
  453. /**
  454. * @param {?} date
  455. * @return {?}
  456. */
  457. function unix(date) {
  458. return Math.floor(date.valueOf() / 1000);
  459. }
  460. /**
  461. * @param {?} date
  462. * @return {?}
  463. */
  464. function getFirstDayOfMonth(date) {
  465. return createDate(date.getFullYear(), date.getMonth(), 1, date.getHours(), date.getMinutes(), date.getSeconds());
  466. }
  467. /**
  468. * @param {?} date
  469. * @param {?} firstDayOfWeek
  470. * @return {?}
  471. */
  472. function isFirstDayOfWeek(date, firstDayOfWeek) {
  473. return date.getDay() === firstDayOfWeek;
  474. }
  475. /**
  476. * @param {?} date1
  477. * @param {?} date2
  478. * @return {?}
  479. */
  480. function isSameMonth(date1, date2) {
  481. if (!date1 || !date2) {
  482. return false;
  483. }
  484. return isSameYear(date1, date2) && getMonth(date1) === getMonth(date2);
  485. }
  486. /**
  487. * @param {?} date1
  488. * @param {?} date2
  489. * @return {?}
  490. */
  491. function isSameYear(date1, date2) {
  492. if (!date1 || !date2) {
  493. return false;
  494. }
  495. return getFullYear(date1) === getFullYear(date2);
  496. }
  497. /**
  498. * @param {?} date1
  499. * @param {?} date2
  500. * @return {?}
  501. */
  502. function isSameDay(date1, date2) {
  503. if (!date1 || !date2) {
  504. return false;
  505. }
  506. return (isSameYear(date1, date2) &&
  507. isSameMonth(date1, date2) &&
  508. getDate(date1) === getDate(date2));
  509. }
  510. /**
  511. * @fileoverview added by tsickle
  512. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  513. */
  514. /** @type {?} */
  515. var match1 = /\d/;
  516. // 0 - 9
  517. /** @type {?} */
  518. var match2 = /\d\d/;
  519. // 00 - 99
  520. /** @type {?} */
  521. var match3 = /\d{3}/;
  522. // 000 - 999
  523. /** @type {?} */
  524. var match4 = /\d{4}/;
  525. // 0000 - 9999
  526. /** @type {?} */
  527. var match6 = /[+-]?\d{6}/;
  528. // -999999 - 999999
  529. /** @type {?} */
  530. var match1to2 = /\d\d?/;
  531. // 0 - 99
  532. /** @type {?} */
  533. var match3to4 = /\d\d\d\d?/;
  534. // 999 - 9999
  535. /** @type {?} */
  536. var match5to6 = /\d\d\d\d\d\d?/;
  537. // 99999 - 999999
  538. /** @type {?} */
  539. var match1to3 = /\d{1,3}/;
  540. // 0 - 999
  541. /** @type {?} */
  542. var match1to4 = /\d{1,4}/;
  543. // 0 - 9999
  544. /** @type {?} */
  545. var match1to6 = /[+-]?\d{1,6}/;
  546. // -999999 - 999999
  547. /** @type {?} */
  548. var matchUnsigned = /\d+/;
  549. // 0 - inf
  550. /** @type {?} */
  551. var matchSigned = /[+-]?\d+/;
  552. // +00:00 -00:00 +0000 -0000 or Z
  553. /** @type {?} */
  554. var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi;
  555. // +00 -00 +00:00 -00:00 +0000 -0000 or Z
  556. /** @type {?} */
  557. var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/;
  558. // 123456789 123456789.123
  559. // any word (or two) characters or numbers including two/three word month in arabic.
  560. // includes scottish gaelic two word and hyphenated months
  561. // tslint:disable-next-line
  562. /** @type {?} */
  563. var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;
  564. /** @type {?} */
  565. var regexes = {};
  566. /**
  567. * @param {?} token
  568. * @param {?} regex
  569. * @param {?=} strictRegex
  570. * @return {?}
  571. */
  572. function addRegexToken(token, regex, strictRegex) {
  573. if (isFunction(regex)) {
  574. regexes[token] = regex;
  575. return;
  576. }
  577. regexes[token] = (/**
  578. * @param {?} isStrict
  579. * @param {?} locale
  580. * @return {?}
  581. */
  582. function (isStrict, locale) {
  583. return (isStrict && strictRegex) ? strictRegex : regex;
  584. });
  585. }
  586. /**
  587. * @param {?} token
  588. * @param {?} locale
  589. * @return {?}
  590. */
  591. function getParseRegexForToken(token, locale) {
  592. /** @type {?} */
  593. var _strict = false;
  594. if (!hasOwnProp(regexes, token)) {
  595. return new RegExp(unescapeFormat(token));
  596. }
  597. return regexes[token](_strict, locale);
  598. }
  599. // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
  600. /**
  601. * @param {?} str
  602. * @return {?}
  603. */
  604. function unescapeFormat(str) {
  605. // tslint:disable-next-line
  606. return regexEscape(str
  607. .replace('\\', '')
  608. .replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, (/**
  609. * @param {?} matched
  610. * @param {?} p1
  611. * @param {?} p2
  612. * @param {?} p3
  613. * @param {?} p4
  614. * @return {?}
  615. */
  616. function (matched, p1, p2, p3, p4) { return p1 || p2 || p3 || p4; })));
  617. }
  618. /**
  619. * @param {?} str
  620. * @return {?}
  621. */
  622. function regexEscape(str) {
  623. return str.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
  624. }
  625. /**
  626. * @fileoverview added by tsickle
  627. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  628. */
  629. /** @type {?} */
  630. var tokens = {};
  631. /**
  632. * @param {?} token
  633. * @param {?} callback
  634. * @return {?}
  635. */
  636. function addParseToken(token, callback) {
  637. /** @type {?} */
  638. var _token = isString(token) ? [token] : token;
  639. /** @type {?} */
  640. var func = callback;
  641. if (isNumber(callback)) {
  642. func = (/**
  643. * @param {?} input
  644. * @param {?} array
  645. * @param {?} config
  646. * @return {?}
  647. */
  648. function (input, array, config) {
  649. array[callback] = toInt(input);
  650. return config;
  651. });
  652. }
  653. if (isArray(_token) && isFunction(func)) {
  654. /** @type {?} */
  655. var i = void 0;
  656. for (i = 0; i < _token.length; i++) {
  657. tokens[_token[i]] = func;
  658. }
  659. }
  660. }
  661. /**
  662. * @param {?} token
  663. * @param {?} callback
  664. * @return {?}
  665. */
  666. function addWeekParseToken(token, callback) {
  667. addParseToken(token, (/**
  668. * @param {?} input
  669. * @param {?} array
  670. * @param {?} config
  671. * @param {?} _token
  672. * @return {?}
  673. */
  674. function (input, array, config, _token) {
  675. config._w = config._w || {};
  676. return callback(input, config._w, config, _token);
  677. }));
  678. }
  679. /**
  680. * @param {?} token
  681. * @param {?} input
  682. * @param {?} config
  683. * @return {?}
  684. */
  685. function addTimeToArrayFromToken(token, input, config) {
  686. if (input != null && hasOwnProp(tokens, token)) {
  687. tokens[token](input, config._a, config, token);
  688. }
  689. return config;
  690. }
  691. /**
  692. * @fileoverview added by tsickle
  693. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  694. */
  695. /**
  696. * @return {?}
  697. */
  698. function initDayOfMonth() {
  699. // FORMATTING
  700. addFormatToken('D', ['DD', 2, false], 'Do', (/**
  701. * @param {?} date
  702. * @param {?} opts
  703. * @return {?}
  704. */
  705. function (date, opts) {
  706. return getDate(date, opts.isUTC)
  707. .toString(10);
  708. }));
  709. // ALIASES
  710. addUnitAlias('date', 'D');
  711. // PARSING
  712. addRegexToken('D', match1to2);
  713. addRegexToken('DD', match1to2, match2);
  714. addRegexToken('Do', (/**
  715. * @param {?} isStrict
  716. * @param {?} locale
  717. * @return {?}
  718. */
  719. function (isStrict, locale) {
  720. return locale._dayOfMonthOrdinalParse || locale._ordinalParse;
  721. }));
  722. addParseToken(['D', 'DD'], DATE);
  723. addParseToken('Do', (/**
  724. * @param {?} input
  725. * @param {?} array
  726. * @param {?} config
  727. * @return {?}
  728. */
  729. function (input, array, config) {
  730. array[DATE] = toInt(input.match(match1to2)[0]);
  731. return config;
  732. }));
  733. }
  734. /**
  735. * @fileoverview added by tsickle
  736. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  737. */
  738. /**
  739. * @return {?}
  740. */
  741. function defaultParsingFlags() {
  742. // We need to deep clone this object.
  743. return {
  744. empty: false,
  745. unusedTokens: [],
  746. unusedInput: [],
  747. overflow: -2,
  748. charsLeftOver: 0,
  749. nullInput: false,
  750. invalidMonth: null,
  751. invalidFormat: false,
  752. userInvalidated: false,
  753. iso: false,
  754. parsedDateParts: [],
  755. meridiem: null,
  756. rfc2822: false,
  757. weekdayMismatch: false
  758. };
  759. }
  760. /**
  761. * @param {?} config
  762. * @return {?}
  763. */
  764. function getParsingFlags(config) {
  765. if (config._pf == null) {
  766. config._pf = defaultParsingFlags();
  767. }
  768. return config._pf;
  769. }
  770. /**
  771. * @fileoverview added by tsickle
  772. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  773. */
  774. // FORMATTING
  775. /**
  776. * @param {?} date
  777. * @param {?} opts
  778. * @return {?}
  779. */
  780. function getYear(date, opts) {
  781. return getFullYear(date, opts.isUTC).toString();
  782. }
  783. /**
  784. * @return {?}
  785. */
  786. function initYear() {
  787. addFormatToken('Y', null, null, (/**
  788. * @param {?} date
  789. * @param {?} opts
  790. * @return {?}
  791. */
  792. function (date, opts) {
  793. /** @type {?} */
  794. var y = getFullYear(date, opts.isUTC);
  795. return y <= 9999 ? y.toString(10) : "+" + y;
  796. }));
  797. addFormatToken(null, ['YY', 2, false], null, (/**
  798. * @param {?} date
  799. * @param {?} opts
  800. * @return {?}
  801. */
  802. function (date, opts) {
  803. return (getFullYear(date, opts.isUTC) % 100).toString(10);
  804. }));
  805. addFormatToken(null, ['YYYY', 4, false], null, getYear);
  806. addFormatToken(null, ['YYYYY', 5, false], null, getYear);
  807. addFormatToken(null, ['YYYYYY', 6, true], null, getYear);
  808. // ALIASES
  809. addUnitAlias('year', 'y');
  810. // PARSING
  811. addRegexToken('Y', matchSigned);
  812. addRegexToken('YY', match1to2, match2);
  813. addRegexToken('YYYY', match1to4, match4);
  814. addRegexToken('YYYYY', match1to6, match6);
  815. addRegexToken('YYYYYY', match1to6, match6);
  816. addParseToken(['YYYYY', 'YYYYYY'], YEAR);
  817. addParseToken('YYYY', (/**
  818. * @param {?} input
  819. * @param {?} array
  820. * @param {?} config
  821. * @return {?}
  822. */
  823. function (input, array, config) {
  824. array[YEAR] = input.length === 2 ? parseTwoDigitYear(input) : toInt(input);
  825. return config;
  826. }));
  827. addParseToken('YY', (/**
  828. * @param {?} input
  829. * @param {?} array
  830. * @param {?} config
  831. * @return {?}
  832. */
  833. function (input, array, config) {
  834. array[YEAR] = parseTwoDigitYear(input);
  835. return config;
  836. }));
  837. addParseToken('Y', (/**
  838. * @param {?} input
  839. * @param {?} array
  840. * @param {?} config
  841. * @return {?}
  842. */
  843. function (input, array, config) {
  844. array[YEAR] = parseInt(input, 10);
  845. return config;
  846. }));
  847. }
  848. /**
  849. * @param {?} input
  850. * @return {?}
  851. */
  852. function parseTwoDigitYear(input) {
  853. return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
  854. }
  855. /**
  856. * @param {?} year
  857. * @return {?}
  858. */
  859. function daysInYear(year) {
  860. return isLeapYear(year) ? 366 : 365;
  861. }
  862. /**
  863. * @param {?} year
  864. * @return {?}
  865. */
  866. function isLeapYear(year) {
  867. return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
  868. }
  869. /**
  870. * @fileoverview added by tsickle
  871. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  872. */
  873. // todo: this is duplicate, source in date-getters.ts
  874. /**
  875. * @param {?} year
  876. * @param {?} month
  877. * @return {?}
  878. */
  879. function daysInMonth(year, month) {
  880. if (isNaN(year) || isNaN(month)) {
  881. return NaN;
  882. }
  883. /** @type {?} */
  884. var modMonth = mod(month, 12);
  885. /** @type {?} */
  886. var _year = year + (month - modMonth) / 12;
  887. return modMonth === 1
  888. ? isLeapYear(_year) ? 29 : 28
  889. : (31 - modMonth % 7 % 2);
  890. }
  891. /**
  892. * @return {?}
  893. */
  894. function initMonth() {
  895. // FORMATTING
  896. addFormatToken('M', ['MM', 2, false], 'Mo', (/**
  897. * @param {?} date
  898. * @param {?} opts
  899. * @return {?}
  900. */
  901. function (date, opts) {
  902. return (getMonth(date, opts.isUTC) + 1).toString(10);
  903. }));
  904. addFormatToken('MMM', null, null, (/**
  905. * @param {?} date
  906. * @param {?} opts
  907. * @return {?}
  908. */
  909. function (date, opts) {
  910. return opts.locale.monthsShort(date, opts.format, opts.isUTC);
  911. }));
  912. addFormatToken('MMMM', null, null, (/**
  913. * @param {?} date
  914. * @param {?} opts
  915. * @return {?}
  916. */
  917. function (date, opts) {
  918. return opts.locale.months(date, opts.format, opts.isUTC);
  919. }));
  920. // ALIASES
  921. addUnitAlias('month', 'M');
  922. // PARSING
  923. addRegexToken('M', match1to2);
  924. addRegexToken('MM', match1to2, match2);
  925. addRegexToken('MMM', (/**
  926. * @param {?} isStrict
  927. * @param {?} locale
  928. * @return {?}
  929. */
  930. function (isStrict, locale) {
  931. return locale.monthsShortRegex(isStrict);
  932. }));
  933. addRegexToken('MMMM', (/**
  934. * @param {?} isStrict
  935. * @param {?} locale
  936. * @return {?}
  937. */
  938. function (isStrict, locale) {
  939. return locale.monthsRegex(isStrict);
  940. }));
  941. addParseToken(['M', 'MM'], (/**
  942. * @param {?} input
  943. * @param {?} array
  944. * @param {?} config
  945. * @return {?}
  946. */
  947. function (input, array, config) {
  948. array[MONTH] = toInt(input) - 1;
  949. return config;
  950. }));
  951. addParseToken(['MMM', 'MMMM'], (/**
  952. * @param {?} input
  953. * @param {?} array
  954. * @param {?} config
  955. * @param {?} token
  956. * @return {?}
  957. */
  958. function (input, array, config, token) {
  959. /** @type {?} */
  960. var month = config._locale.monthsParse(input, token, config._strict);
  961. // if we didn't find a month name, mark the date as invalid.
  962. if (month != null) {
  963. array[MONTH] = month;
  964. }
  965. else {
  966. getParsingFlags(config).invalidMonth = !!input;
  967. }
  968. return config;
  969. }));
  970. }
  971. /**
  972. * @fileoverview added by tsickle
  973. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  974. */
  975. /** @type {?} */
  976. var defaultTimeUnit = {
  977. year: 0,
  978. month: 0,
  979. day: 0,
  980. hour: 0,
  981. minute: 0,
  982. seconds: 0
  983. };
  984. /**
  985. * @param {?} date
  986. * @param {?} unit
  987. * @return {?}
  988. */
  989. function shiftDate(date, unit) {
  990. /** @type {?} */
  991. var _unit = Object.assign({}, defaultTimeUnit, unit);
  992. /** @type {?} */
  993. var year = date.getFullYear() + (_unit.year || 0);
  994. /** @type {?} */
  995. var month = date.getMonth() + (_unit.month || 0);
  996. /** @type {?} */
  997. var day = date.getDate() + (_unit.day || 0);
  998. if (_unit.month && !_unit.day) {
  999. day = Math.min(day, daysInMonth(year, month));
  1000. }
  1001. return createDate(year, month, day, date.getHours() + (_unit.hour || 0), date.getMinutes() + (_unit.minute || 0), date.getSeconds() + (_unit.seconds || 0));
  1002. }
  1003. /**
  1004. * @param {?} date
  1005. * @param {?} unit
  1006. * @return {?}
  1007. */
  1008. function setFullDate(date, unit) {
  1009. return createDate(getNum(date.getFullYear(), unit.year), getNum(date.getMonth(), unit.month), 1, // day, to avoid issue with wrong months selection at the end of current month (#5371)
  1010. getNum(date.getHours(), unit.hour), getNum(date.getMinutes(), unit.minute), getNum(date.getSeconds(), unit.seconds), getNum(date.getMilliseconds(), unit.milliseconds));
  1011. }
  1012. /**
  1013. * @param {?} def
  1014. * @param {?=} num
  1015. * @return {?}
  1016. */
  1017. function getNum(def, num) {
  1018. return isNumber(num) ? num : def;
  1019. }
  1020. /**
  1021. * @param {?} date
  1022. * @param {?} value
  1023. * @param {?=} isUTC
  1024. * @return {?}
  1025. */
  1026. function setMonth(date, value, isUTC) {
  1027. /** @type {?} */
  1028. var dayOfMonth = Math.min(getDate(date), daysInMonth(getFullYear(date), value));
  1029. isUTC ? date.setUTCMonth(value, dayOfMonth) : date.setMonth(value, dayOfMonth);
  1030. return date;
  1031. }
  1032. /**
  1033. * @param {?} date
  1034. * @param {?} value
  1035. * @param {?=} isUTC
  1036. * @return {?}
  1037. */
  1038. function setHours(date, value, isUTC) {
  1039. isUTC ? date.setUTCHours(value) : date.setHours(value);
  1040. return date;
  1041. }
  1042. /**
  1043. * @param {?} date
  1044. * @param {?} value
  1045. * @param {?=} isUTC
  1046. * @return {?}
  1047. */
  1048. function setMinutes(date, value, isUTC) {
  1049. isUTC ? date.setUTCMinutes(value) : date.setMinutes(value);
  1050. return date;
  1051. }
  1052. /**
  1053. * @param {?} date
  1054. * @param {?} value
  1055. * @param {?=} isUTC
  1056. * @return {?}
  1057. */
  1058. function setSeconds(date, value, isUTC) {
  1059. isUTC ? date.setUTCSeconds(value) : date.setSeconds(value);
  1060. return date;
  1061. }
  1062. /**
  1063. * @param {?} date
  1064. * @param {?} value
  1065. * @param {?=} isUTC
  1066. * @return {?}
  1067. */
  1068. function setMilliseconds(date, value, isUTC) {
  1069. isUTC ? date.setUTCMilliseconds(value) : date.setMilliseconds(value);
  1070. return date;
  1071. }
  1072. /**
  1073. * @param {?} date
  1074. * @param {?} value
  1075. * @param {?=} isUTC
  1076. * @return {?}
  1077. */
  1078. function setDate(date, value, isUTC) {
  1079. isUTC ? date.setUTCDate(value) : date.setDate(value);
  1080. return date;
  1081. }
  1082. /**
  1083. * @param {?} date
  1084. * @param {?} value
  1085. * @return {?}
  1086. */
  1087. function setTime(date, value) {
  1088. date.setTime(value);
  1089. return date;
  1090. }
  1091. /**
  1092. * @fileoverview added by tsickle
  1093. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  1094. */
  1095. // fastest way to clone date
  1096. // https://jsperf.com/clone-date-object2
  1097. /**
  1098. * @param {?} date
  1099. * @return {?}
  1100. */
  1101. function cloneDate(date) {
  1102. return new Date(date.getTime());
  1103. }
  1104. /**
  1105. * @fileoverview added by tsickle
  1106. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  1107. */
  1108. /**
  1109. * @param {?} date
  1110. * @param {?} unit
  1111. * @param {?=} isUTC
  1112. * @return {?}
  1113. */
  1114. function startOf(date, unit, isUTC) {
  1115. /** @type {?} */
  1116. var _date = cloneDate(date);
  1117. // the following switch intentionally omits break keywords
  1118. // to utilize falling through the cases.
  1119. switch (unit) {
  1120. case 'year':
  1121. setMonth(_date, 0, isUTC);
  1122. /* falls through */
  1123. case 'quarter':
  1124. case 'month':
  1125. setDate(_date, 1, isUTC);
  1126. /* falls through */
  1127. case 'week':
  1128. case 'isoWeek':
  1129. case 'day':
  1130. case 'date':
  1131. setHours(_date, 0, isUTC);
  1132. /* falls through */
  1133. case 'hours':
  1134. setMinutes(_date, 0, isUTC);
  1135. /* falls through */
  1136. case 'minutes':
  1137. setSeconds(_date, 0, isUTC);
  1138. /* falls through */
  1139. case 'seconds':
  1140. setMilliseconds(_date, 0, isUTC);
  1141. }
  1142. // weeks are a special case
  1143. if (unit === 'week') {
  1144. setLocaleDayOfWeek(_date, 0, { isUTC: isUTC });
  1145. }
  1146. if (unit === 'isoWeek') {
  1147. setISODayOfWeek(_date, 1);
  1148. }
  1149. // quarters are also special
  1150. if (unit === 'quarter') {
  1151. setMonth(_date, Math.floor(getMonth(_date, isUTC) / 3) * 3, isUTC);
  1152. }
  1153. return _date;
  1154. }
  1155. /**
  1156. * @param {?} date
  1157. * @param {?} unit
  1158. * @param {?=} isUTC
  1159. * @return {?}
  1160. */
  1161. function endOf(date, unit, isUTC) {
  1162. /** @type {?} */
  1163. var _unit = unit;
  1164. // 'date' is an alias for 'day', so it should be considered as such.
  1165. if (_unit === 'date') {
  1166. _unit = 'day';
  1167. }
  1168. /** @type {?} */
  1169. var start = startOf(date, _unit, isUTC);
  1170. /** @type {?} */
  1171. var _step = add(start, 1, _unit === 'isoWeek' ? 'week' : _unit, isUTC);
  1172. /** @type {?} */
  1173. var res = subtract(_step, 1, 'milliseconds', isUTC);
  1174. return res;
  1175. }
  1176. /**
  1177. * @fileoverview added by tsickle
  1178. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  1179. */
  1180. /**
  1181. * @return {?}
  1182. */
  1183. function initDayOfYear() {
  1184. // FORMATTING
  1185. addFormatToken('DDD', ['DDDD', 3, false], 'DDDo', (/**
  1186. * @param {?} date
  1187. * @return {?}
  1188. */
  1189. function (date) {
  1190. return getDayOfYear(date)
  1191. .toString(10);
  1192. }));
  1193. // ALIASES
  1194. addUnitAlias('dayOfYear', 'DDD');
  1195. addRegexToken('DDD', match1to3);
  1196. addRegexToken('DDDD', match3);
  1197. addParseToken(['DDD', 'DDDD'], (/**
  1198. * @param {?} input
  1199. * @param {?} array
  1200. * @param {?} config
  1201. * @return {?}
  1202. */
  1203. function (input, array, config) {
  1204. config._dayOfYear = toInt(input);
  1205. return config;
  1206. }));
  1207. }
  1208. /**
  1209. * @param {?} date
  1210. * @param {?=} isUTC
  1211. * @return {?}
  1212. */
  1213. function getDayOfYear(date, isUTC) {
  1214. /** @type {?} */
  1215. var date1 = +startOf(date, 'day', isUTC);
  1216. /** @type {?} */
  1217. var date2 = +startOf(date, 'year', isUTC);
  1218. /** @type {?} */
  1219. var someDate = date1 - date2;
  1220. /** @type {?} */
  1221. var oneDay = 1000 * 60 * 60 * 24;
  1222. return Math.round(someDate / oneDay) + 1;
  1223. }
  1224. /**
  1225. * @fileoverview added by tsickle
  1226. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  1227. */
  1228. /**
  1229. * @param {?} year
  1230. * @param {?} dow
  1231. * @param {?} doy
  1232. * @return {?}
  1233. */
  1234. function firstWeekOffset(year, dow, doy) {
  1235. // first-week day -- which january is always in the first week (4 for iso, 1 for other)
  1236. /** @type {?} */
  1237. var fwd = dow - doy + 7;
  1238. // first-week day local weekday -- which local weekday is fwd
  1239. /** @type {?} */
  1240. var fwdlw = (createUTCDate(year, 0, fwd).getUTCDay() - dow + 7) % 7;
  1241. return -fwdlw + fwd - 1;
  1242. }
  1243. // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
  1244. /**
  1245. * @param {?} year
  1246. * @param {?} week
  1247. * @param {?} weekday
  1248. * @param {?} dow
  1249. * @param {?} doy
  1250. * @return {?}
  1251. */
  1252. function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
  1253. /** @type {?} */
  1254. var localWeekday = (7 + weekday - dow) % 7;
  1255. /** @type {?} */
  1256. var weekOffset = firstWeekOffset(year, dow, doy);
  1257. /** @type {?} */
  1258. var dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset;
  1259. /** @type {?} */
  1260. var resYear;
  1261. /** @type {?} */
  1262. var resDayOfYear;
  1263. if (dayOfYear <= 0) {
  1264. resYear = year - 1;
  1265. resDayOfYear = daysInYear(resYear) + dayOfYear;
  1266. }
  1267. else if (dayOfYear > daysInYear(year)) {
  1268. resYear = year + 1;
  1269. resDayOfYear = dayOfYear - daysInYear(year);
  1270. }
  1271. else {
  1272. resYear = year;
  1273. resDayOfYear = dayOfYear;
  1274. }
  1275. return {
  1276. year: resYear,
  1277. dayOfYear: resDayOfYear
  1278. };
  1279. }
  1280. /**
  1281. * @param {?} date
  1282. * @param {?} dow
  1283. * @param {?} doy
  1284. * @param {?=} isUTC
  1285. * @return {?}
  1286. */
  1287. function weekOfYear(date, dow, doy, isUTC) {
  1288. /** @type {?} */
  1289. var weekOffset = firstWeekOffset(getFullYear(date, isUTC), dow, doy);
  1290. /** @type {?} */
  1291. var week = Math.floor((getDayOfYear(date, isUTC) - weekOffset - 1) / 7) + 1;
  1292. /** @type {?} */
  1293. var resWeek;
  1294. /** @type {?} */
  1295. var resYear;
  1296. if (week < 1) {
  1297. resYear = getFullYear(date, isUTC) - 1;
  1298. resWeek = week + weeksInYear(resYear, dow, doy);
  1299. }
  1300. else if (week > weeksInYear(getFullYear(date, isUTC), dow, doy)) {
  1301. resWeek = week - weeksInYear(getFullYear(date, isUTC), dow, doy);
  1302. resYear = getFullYear(date, isUTC) + 1;
  1303. }
  1304. else {
  1305. resYear = getFullYear(date, isUTC);
  1306. resWeek = week;
  1307. }
  1308. return {
  1309. week: resWeek,
  1310. year: resYear
  1311. };
  1312. }
  1313. /**
  1314. * @param {?} year
  1315. * @param {?} dow
  1316. * @param {?} doy
  1317. * @return {?}
  1318. */
  1319. function weeksInYear(year, dow, doy) {
  1320. /** @type {?} */
  1321. var weekOffset = firstWeekOffset(year, dow, doy);
  1322. /** @type {?} */
  1323. var weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
  1324. return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
  1325. }
  1326. /**
  1327. * @fileoverview added by tsickle
  1328. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  1329. */
  1330. /** @type {?} */
  1331. var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;
  1332. /** @type {?} */
  1333. var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
  1334. /** @type {?} */
  1335. var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
  1336. /** @type {?} */
  1337. var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
  1338. /** @type {?} */
  1339. var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');
  1340. /** @type {?} */
  1341. var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');
  1342. /** @type {?} */
  1343. var defaultLongDateFormat = {
  1344. LTS: 'h:mm:ss A',
  1345. LT: 'h:mm A',
  1346. L: 'MM/DD/YYYY',
  1347. LL: 'MMMM D, YYYY',
  1348. LLL: 'MMMM D, YYYY h:mm A',
  1349. LLLL: 'dddd, MMMM D, YYYY h:mm A'
  1350. };
  1351. /** @type {?} */
  1352. var defaultOrdinal = '%d';
  1353. /** @type {?} */
  1354. var defaultDayOfMonthOrdinalParse = /\d{1,2}/;
  1355. /** @type {?} */
  1356. var defaultMonthsShortRegex = matchWord;
  1357. /** @type {?} */
  1358. var defaultMonthsRegex = matchWord;
  1359. var Locale = /** @class */ (function () {
  1360. function Locale(config) {
  1361. if (!!config) {
  1362. this.set(config);
  1363. }
  1364. }
  1365. /**
  1366. * @param {?} config
  1367. * @return {?}
  1368. */
  1369. Locale.prototype.set = /**
  1370. * @param {?} config
  1371. * @return {?}
  1372. */
  1373. function (config) {
  1374. /** @type {?} */
  1375. var confKey;
  1376. for (confKey in config) {
  1377. if (!config.hasOwnProperty(confKey)) {
  1378. continue;
  1379. }
  1380. /** @type {?} */
  1381. var prop = config[(/** @type {?} */ (confKey))];
  1382. /** @type {?} */
  1383. var key = (/** @type {?} */ ((isFunction(prop) ? confKey : "_" + confKey)));
  1384. this[key] = (/** @type {?} */ (prop));
  1385. }
  1386. this._config = config;
  1387. };
  1388. /**
  1389. * @param {?} key
  1390. * @param {?} date
  1391. * @param {?} now
  1392. * @return {?}
  1393. */
  1394. Locale.prototype.calendar = /**
  1395. * @param {?} key
  1396. * @param {?} date
  1397. * @param {?} now
  1398. * @return {?}
  1399. */
  1400. function (key, date, now) {
  1401. /** @type {?} */
  1402. var output = this._calendar[key] || this._calendar.sameElse;
  1403. return isFunction(output) ? output.call(null, date, now) : output;
  1404. };
  1405. /**
  1406. * @param {?} key
  1407. * @return {?}
  1408. */
  1409. Locale.prototype.longDateFormat = /**
  1410. * @param {?} key
  1411. * @return {?}
  1412. */
  1413. function (key) {
  1414. /** @type {?} */
  1415. var format = this._longDateFormat[key];
  1416. /** @type {?} */
  1417. var formatUpper = this._longDateFormat[key.toUpperCase()];
  1418. if (format || !formatUpper) {
  1419. return format;
  1420. }
  1421. this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, (/**
  1422. * @param {?} val
  1423. * @return {?}
  1424. */
  1425. function (val) {
  1426. return val.slice(1);
  1427. }));
  1428. return this._longDateFormat[key];
  1429. };
  1430. Object.defineProperty(Locale.prototype, "invalidDate", {
  1431. get: /**
  1432. * @return {?}
  1433. */
  1434. function () {
  1435. return this._invalidDate;
  1436. },
  1437. set: /**
  1438. * @param {?} val
  1439. * @return {?}
  1440. */
  1441. function (val) {
  1442. this._invalidDate = val;
  1443. },
  1444. enumerable: true,
  1445. configurable: true
  1446. });
  1447. /**
  1448. * @param {?} num
  1449. * @param {?=} token
  1450. * @return {?}
  1451. */
  1452. Locale.prototype.ordinal = /**
  1453. * @param {?} num
  1454. * @param {?=} token
  1455. * @return {?}
  1456. */
  1457. function (num, token) {
  1458. return this._ordinal.replace('%d', num.toString(10));
  1459. };
  1460. /**
  1461. * @param {?} str
  1462. * @return {?}
  1463. */
  1464. Locale.prototype.preparse = /**
  1465. * @param {?} str
  1466. * @return {?}
  1467. */
  1468. function (str) {
  1469. return str;
  1470. };
  1471. /**
  1472. * @param {?} str
  1473. * @return {?}
  1474. */
  1475. Locale.prototype.postformat = /**
  1476. * @param {?} str
  1477. * @return {?}
  1478. */
  1479. function (str) {
  1480. return str;
  1481. };
  1482. /**
  1483. * @param {?} num
  1484. * @param {?} withoutSuffix
  1485. * @param {?} str
  1486. * @param {?} isFuture
  1487. * @return {?}
  1488. */
  1489. Locale.prototype.relativeTime = /**
  1490. * @param {?} num
  1491. * @param {?} withoutSuffix
  1492. * @param {?} str
  1493. * @param {?} isFuture
  1494. * @return {?}
  1495. */
  1496. function (num, withoutSuffix, str, isFuture) {
  1497. /** @type {?} */
  1498. var output = this._relativeTime[str];
  1499. return (isFunction(output)) ?
  1500. output(num, withoutSuffix, str, isFuture) :
  1501. output.replace(/%d/i, num.toString(10));
  1502. };
  1503. /**
  1504. * @param {?} diff
  1505. * @param {?} output
  1506. * @return {?}
  1507. */
  1508. Locale.prototype.pastFuture = /**
  1509. * @param {?} diff
  1510. * @param {?} output
  1511. * @return {?}
  1512. */
  1513. function (diff, output) {
  1514. /** @type {?} */
  1515. var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
  1516. return isFunction(format) ? format(output) : format.replace(/%s/i, output);
  1517. };
  1518. /**
  1519. * @param {?=} date
  1520. * @param {?=} format
  1521. * @param {?=} isUTC
  1522. * @return {?}
  1523. */
  1524. Locale.prototype.months = /**
  1525. * @param {?=} date
  1526. * @param {?=} format
  1527. * @param {?=} isUTC
  1528. * @return {?}
  1529. */
  1530. function (date, format, isUTC) {
  1531. if (isUTC === void 0) { isUTC = false; }
  1532. if (!date) {
  1533. return isArray(this._months)
  1534. ? this._months
  1535. : this._months.standalone;
  1536. }
  1537. if (isArray(this._months)) {
  1538. return this._months[getMonth(date, isUTC)];
  1539. }
  1540. /** @type {?} */
  1541. var key = (this._months.isFormat || MONTHS_IN_FORMAT).test(format)
  1542. ? 'format'
  1543. : 'standalone';
  1544. return this._months[key][getMonth(date, isUTC)];
  1545. };
  1546. /**
  1547. * @param {?=} date
  1548. * @param {?=} format
  1549. * @param {?=} isUTC
  1550. * @return {?}
  1551. */
  1552. Locale.prototype.monthsShort = /**
  1553. * @param {?=} date
  1554. * @param {?=} format
  1555. * @param {?=} isUTC
  1556. * @return {?}
  1557. */
  1558. function (date, format, isUTC) {
  1559. if (isUTC === void 0) { isUTC = false; }
  1560. if (!date) {
  1561. return isArray(this._monthsShort)
  1562. ? this._monthsShort
  1563. : this._monthsShort.standalone;
  1564. }
  1565. if (isArray(this._monthsShort)) {
  1566. return this._monthsShort[getMonth(date, isUTC)];
  1567. }
  1568. /** @type {?} */
  1569. var key = MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone';
  1570. return this._monthsShort[key][getMonth(date, isUTC)];
  1571. };
  1572. /**
  1573. * @param {?} monthName
  1574. * @param {?=} format
  1575. * @param {?=} strict
  1576. * @return {?}
  1577. */
  1578. Locale.prototype.monthsParse = /**
  1579. * @param {?} monthName
  1580. * @param {?=} format
  1581. * @param {?=} strict
  1582. * @return {?}
  1583. */
  1584. function (monthName, format, strict) {
  1585. /** @type {?} */
  1586. var date;
  1587. /** @type {?} */
  1588. var regex;
  1589. if (this._monthsParseExact) {
  1590. return this.handleMonthStrictParse(monthName, format, strict);
  1591. }
  1592. if (!this._monthsParse) {
  1593. this._monthsParse = [];
  1594. this._longMonthsParse = [];
  1595. this._shortMonthsParse = [];
  1596. }
  1597. // TODO: add sorting
  1598. // Sorting makes sure if one month (or abbr) is a prefix of another
  1599. // see sorting in computeMonthsParse
  1600. /** @type {?} */
  1601. var i;
  1602. for (i = 0; i < 12; i++) {
  1603. // make the regex if we don't have it already
  1604. date = new Date(Date.UTC(2000, i));
  1605. if (strict && !this._longMonthsParse[i]) {
  1606. /** @type {?} */
  1607. var _months = this.months(date, '', true).replace('.', '');
  1608. /** @type {?} */
  1609. var _shortMonths = this.monthsShort(date, '', true).replace('.', '');
  1610. this._longMonthsParse[i] = new RegExp("^" + _months + "$", 'i');
  1611. this._shortMonthsParse[i] = new RegExp("^" + _shortMonths + "$", 'i');
  1612. }
  1613. if (!strict && !this._monthsParse[i]) {
  1614. regex = "^" + this.months(date, '', true) + "|^" + this.monthsShort(date, '', true);
  1615. this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
  1616. }
  1617. // test the regex
  1618. if (strict && format === 'MMMM' && ((/** @type {?} */ (this._longMonthsParse[i]))).test(monthName)) {
  1619. return i;
  1620. }
  1621. if (strict && format === 'MMM' && ((/** @type {?} */ (this._shortMonthsParse[i]))).test(monthName)) {
  1622. return i;
  1623. }
  1624. if (!strict && this._monthsParse[i].test(monthName)) {
  1625. return i;
  1626. }
  1627. }
  1628. };
  1629. /**
  1630. * @param {?} isStrict
  1631. * @return {?}
  1632. */
  1633. Locale.prototype.monthsRegex = /**
  1634. * @param {?} isStrict
  1635. * @return {?}
  1636. */
  1637. function (isStrict) {
  1638. if (this._monthsParseExact) {
  1639. if (!hasOwnProp(this, '_monthsRegex')) {
  1640. this.computeMonthsParse();
  1641. }
  1642. if (isStrict) {
  1643. return this._monthsStrictRegex;
  1644. }
  1645. return this._monthsRegex;
  1646. }
  1647. if (!hasOwnProp(this, '_monthsRegex')) {
  1648. this._monthsRegex = defaultMonthsRegex;
  1649. }
  1650. return this._monthsStrictRegex && isStrict ?
  1651. this._monthsStrictRegex : this._monthsRegex;
  1652. };
  1653. /**
  1654. * @param {?} isStrict
  1655. * @return {?}
  1656. */
  1657. Locale.prototype.monthsShortRegex = /**
  1658. * @param {?} isStrict
  1659. * @return {?}
  1660. */
  1661. function (isStrict) {
  1662. if (this._monthsParseExact) {
  1663. if (!hasOwnProp(this, '_monthsRegex')) {
  1664. this.computeMonthsParse();
  1665. }
  1666. if (isStrict) {
  1667. return this._monthsShortStrictRegex;
  1668. }
  1669. return this._monthsShortRegex;
  1670. }
  1671. if (!hasOwnProp(this, '_monthsShortRegex')) {
  1672. this._monthsShortRegex = defaultMonthsShortRegex;
  1673. }
  1674. return this._monthsShortStrictRegex && isStrict ?
  1675. this._monthsShortStrictRegex : this._monthsShortRegex;
  1676. };
  1677. /** Week */
  1678. /**
  1679. * Week
  1680. * @param {?} date
  1681. * @param {?=} isUTC
  1682. * @return {?}
  1683. */
  1684. Locale.prototype.week = /**
  1685. * Week
  1686. * @param {?} date
  1687. * @param {?=} isUTC
  1688. * @return {?}
  1689. */
  1690. function (date, isUTC) {
  1691. return weekOfYear(date, this._week.dow, this._week.doy, isUTC).week;
  1692. };
  1693. /**
  1694. * @return {?}
  1695. */
  1696. Locale.prototype.firstDayOfWeek = /**
  1697. * @return {?}
  1698. */
  1699. function () {
  1700. return this._week.dow;
  1701. };
  1702. /**
  1703. * @return {?}
  1704. */
  1705. Locale.prototype.firstDayOfYear = /**
  1706. * @return {?}
  1707. */
  1708. function () {
  1709. return this._week.doy;
  1710. };
  1711. /**
  1712. * @param {?=} date
  1713. * @param {?=} format
  1714. * @param {?=} isUTC
  1715. * @return {?}
  1716. */
  1717. Locale.prototype.weekdays = /**
  1718. * @param {?=} date
  1719. * @param {?=} format
  1720. * @param {?=} isUTC
  1721. * @return {?}
  1722. */
  1723. function (date, format, isUTC) {
  1724. if (!date) {
  1725. return isArray(this._weekdays)
  1726. ? this._weekdays
  1727. : this._weekdays.standalone;
  1728. }
  1729. if (isArray(this._weekdays)) {
  1730. return this._weekdays[getDay(date, isUTC)];
  1731. }
  1732. /** @type {?} */
  1733. var _key = this._weekdays.isFormat.test(format)
  1734. ? 'format'
  1735. : 'standalone';
  1736. return this._weekdays[_key][getDay(date, isUTC)];
  1737. };
  1738. /**
  1739. * @param {?=} date
  1740. * @param {?=} format
  1741. * @param {?=} isUTC
  1742. * @return {?}
  1743. */
  1744. Locale.prototype.weekdaysMin = /**
  1745. * @param {?=} date
  1746. * @param {?=} format
  1747. * @param {?=} isUTC
  1748. * @return {?}
  1749. */
  1750. function (date, format, isUTC) {
  1751. return date ? this._weekdaysMin[getDay(date, isUTC)] : this._weekdaysMin;
  1752. };
  1753. /**
  1754. * @param {?=} date
  1755. * @param {?=} format
  1756. * @param {?=} isUTC
  1757. * @return {?}
  1758. */
  1759. Locale.prototype.weekdaysShort = /**
  1760. * @param {?=} date
  1761. * @param {?=} format
  1762. * @param {?=} isUTC
  1763. * @return {?}
  1764. */
  1765. function (date, format, isUTC) {
  1766. return date ? this._weekdaysShort[getDay(date, isUTC)] : this._weekdaysShort;
  1767. };
  1768. // proto.weekdaysParse = localeWeekdaysParse;
  1769. // proto.weekdaysParse = localeWeekdaysParse;
  1770. /**
  1771. * @param {?=} weekdayName
  1772. * @param {?=} format
  1773. * @param {?=} strict
  1774. * @return {?}
  1775. */
  1776. Locale.prototype.weekdaysParse =
  1777. // proto.weekdaysParse = localeWeekdaysParse;
  1778. /**
  1779. * @param {?=} weekdayName
  1780. * @param {?=} format
  1781. * @param {?=} strict
  1782. * @return {?}
  1783. */
  1784. function (weekdayName, format, strict) {
  1785. /** @type {?} */
  1786. var i;
  1787. /** @type {?} */
  1788. var regex;
  1789. if (this._weekdaysParseExact) {
  1790. return this.handleWeekStrictParse(weekdayName, format, strict);
  1791. }
  1792. if (!this._weekdaysParse) {
  1793. this._weekdaysParse = [];
  1794. this._minWeekdaysParse = [];
  1795. this._shortWeekdaysParse = [];
  1796. this._fullWeekdaysParse = [];
  1797. }
  1798. for (i = 0; i < 7; i++) {
  1799. // make the regex if we don't have it already
  1800. // fix: here is the issue
  1801. /** @type {?} */
  1802. var date = setDayOfWeek(new Date(Date.UTC(2000, 1)), i, null, true);
  1803. if (strict && !this._fullWeekdaysParse[i]) {
  1804. this._fullWeekdaysParse[i] = new RegExp("^" + this.weekdays(date, '', true).replace('.', '\.?') + "$", 'i');
  1805. this._shortWeekdaysParse[i] = new RegExp("^" + this.weekdaysShort(date, '', true).replace('.', '\.?') + "$", 'i');
  1806. this._minWeekdaysParse[i] = new RegExp("^" + this.weekdaysMin(date, '', true).replace('.', '\.?') + "$", 'i');
  1807. }
  1808. if (!this._weekdaysParse[i]) {
  1809. regex = "^" + this.weekdays(date, '', true) + "|^" + this.weekdaysShort(date, '', true) + "|^" + this.weekdaysMin(date, '', true);
  1810. this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
  1811. }
  1812. if (!isArray(this._fullWeekdaysParse)
  1813. || !isArray(this._shortWeekdaysParse)
  1814. || !isArray(this._minWeekdaysParse)
  1815. || !isArray(this._weekdaysParse)) {
  1816. return;
  1817. }
  1818. // test the regex
  1819. if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {
  1820. return i;
  1821. }
  1822. else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {
  1823. return i;
  1824. }
  1825. else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {
  1826. return i;
  1827. }
  1828. else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
  1829. return i;
  1830. }
  1831. }
  1832. };
  1833. // proto.weekdaysRegex = weekdaysRegex;
  1834. // proto.weekdaysRegex = weekdaysRegex;
  1835. /**
  1836. * @param {?} isStrict
  1837. * @return {?}
  1838. */
  1839. Locale.prototype.weekdaysRegex =
  1840. // proto.weekdaysRegex = weekdaysRegex;
  1841. /**
  1842. * @param {?} isStrict
  1843. * @return {?}
  1844. */
  1845. function (isStrict) {
  1846. if (this._weekdaysParseExact) {
  1847. if (!hasOwnProp(this, '_weekdaysRegex')) {
  1848. this.computeWeekdaysParse();
  1849. }
  1850. if (isStrict) {
  1851. return this._weekdaysStrictRegex;
  1852. }
  1853. else {
  1854. return this._weekdaysRegex;
  1855. }
  1856. }
  1857. else {
  1858. if (!hasOwnProp(this, '_weekdaysRegex')) {
  1859. this._weekdaysRegex = matchWord;
  1860. }
  1861. return this._weekdaysStrictRegex && isStrict ?
  1862. this._weekdaysStrictRegex : this._weekdaysRegex;
  1863. }
  1864. };
  1865. // proto.weekdaysShortRegex = weekdaysShortRegex;
  1866. // proto.weekdaysMinRegex = weekdaysMinRegex;
  1867. // proto.weekdaysShortRegex = weekdaysShortRegex;
  1868. // proto.weekdaysMinRegex = weekdaysMinRegex;
  1869. /**
  1870. * @param {?=} isStrict
  1871. * @return {?}
  1872. */
  1873. Locale.prototype.weekdaysShortRegex =
  1874. // proto.weekdaysShortRegex = weekdaysShortRegex;
  1875. // proto.weekdaysMinRegex = weekdaysMinRegex;
  1876. /**
  1877. * @param {?=} isStrict
  1878. * @return {?}
  1879. */
  1880. function (isStrict) {
  1881. if (this._weekdaysParseExact) {
  1882. if (!hasOwnProp(this, '_weekdaysRegex')) {
  1883. this.computeWeekdaysParse();
  1884. }
  1885. if (isStrict) {
  1886. return this._weekdaysShortStrictRegex;
  1887. }
  1888. else {
  1889. return this._weekdaysShortRegex;
  1890. }
  1891. }
  1892. else {
  1893. if (!hasOwnProp(this, '_weekdaysShortRegex')) {
  1894. this._weekdaysShortRegex = matchWord;
  1895. }
  1896. return this._weekdaysShortStrictRegex && isStrict ?
  1897. this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
  1898. }
  1899. };
  1900. /**
  1901. * @param {?=} isStrict
  1902. * @return {?}
  1903. */
  1904. Locale.prototype.weekdaysMinRegex = /**
  1905. * @param {?=} isStrict
  1906. * @return {?}
  1907. */
  1908. function (isStrict) {
  1909. if (this._weekdaysParseExact) {
  1910. if (!hasOwnProp(this, '_weekdaysRegex')) {
  1911. this.computeWeekdaysParse();
  1912. }
  1913. if (isStrict) {
  1914. return this._weekdaysMinStrictRegex;
  1915. }
  1916. else {
  1917. return this._weekdaysMinRegex;
  1918. }
  1919. }
  1920. else {
  1921. if (!hasOwnProp(this, '_weekdaysMinRegex')) {
  1922. this._weekdaysMinRegex = matchWord;
  1923. }
  1924. return this._weekdaysMinStrictRegex && isStrict ?
  1925. this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
  1926. }
  1927. };
  1928. /**
  1929. * @param {?} input
  1930. * @return {?}
  1931. */
  1932. Locale.prototype.isPM = /**
  1933. * @param {?} input
  1934. * @return {?}
  1935. */
  1936. function (input) {
  1937. // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
  1938. // Using charAt should be more compatible.
  1939. return input.toLowerCase().charAt(0) === 'p';
  1940. };
  1941. /**
  1942. * @param {?} hours
  1943. * @param {?} minutes
  1944. * @param {?} isLower
  1945. * @return {?}
  1946. */
  1947. Locale.prototype.meridiem = /**
  1948. * @param {?} hours
  1949. * @param {?} minutes
  1950. * @param {?} isLower
  1951. * @return {?}
  1952. */
  1953. function (hours, minutes, isLower) {
  1954. if (hours > 11) {
  1955. return isLower ? 'pm' : 'PM';
  1956. }
  1957. return isLower ? 'am' : 'AM';
  1958. };
  1959. /**
  1960. * @param {?} key
  1961. * @return {?}
  1962. */
  1963. Locale.prototype.formatLongDate = /**
  1964. * @param {?} key
  1965. * @return {?}
  1966. */
  1967. function (key) {
  1968. this._longDateFormat = this._longDateFormat ? this._longDateFormat : defaultLongDateFormat;
  1969. /** @type {?} */
  1970. var format = this._longDateFormat[key];
  1971. /** @type {?} */
  1972. var formatUpper = this._longDateFormat[key.toUpperCase()];
  1973. if (format || !formatUpper) {
  1974. return format;
  1975. }
  1976. this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, (/**
  1977. * @param {?} val
  1978. * @return {?}
  1979. */
  1980. function (val) {
  1981. return val.slice(1);
  1982. }));
  1983. return this._longDateFormat[key];
  1984. };
  1985. /**
  1986. * @private
  1987. * @param {?} monthName
  1988. * @param {?} format
  1989. * @param {?=} strict
  1990. * @return {?}
  1991. */
  1992. Locale.prototype.handleMonthStrictParse = /**
  1993. * @private
  1994. * @param {?} monthName
  1995. * @param {?} format
  1996. * @param {?=} strict
  1997. * @return {?}
  1998. */
  1999. function (monthName, format, strict) {
  2000. /** @type {?} */
  2001. var llc = monthName.toLocaleLowerCase();
  2002. /** @type {?} */
  2003. var i;
  2004. /** @type {?} */
  2005. var ii;
  2006. /** @type {?} */
  2007. var mom;
  2008. if (!this._monthsParse) {
  2009. // this is not used
  2010. this._monthsParse = [];
  2011. this._longMonthsParse = [];
  2012. this._shortMonthsParse = [];
  2013. for (i = 0; i < 12; ++i) {
  2014. mom = new Date(2000, i);
  2015. this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();
  2016. this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
  2017. }
  2018. }
  2019. if (strict) {
  2020. if (format === 'MMM') {
  2021. ii = ((/** @type {?} */ (this._shortMonthsParse))).indexOf(llc);
  2022. return ii !== -1 ? ii : null;
  2023. }
  2024. ii = ((/** @type {?} */ (this._longMonthsParse))).indexOf(llc);
  2025. return ii !== -1 ? ii : null;
  2026. }
  2027. if (format === 'MMM') {
  2028. ii = ((/** @type {?} */ (this._shortMonthsParse))).indexOf(llc);
  2029. if (ii !== -1) {
  2030. return ii;
  2031. }
  2032. ii = ((/** @type {?} */ (this._longMonthsParse))).indexOf(llc);
  2033. return ii !== -1 ? ii : null;
  2034. }
  2035. ii = ((/** @type {?} */ (this._longMonthsParse))).indexOf(llc);
  2036. if (ii !== -1) {
  2037. return ii;
  2038. }
  2039. ii = ((/** @type {?} */ (this._shortMonthsParse))).indexOf(llc);
  2040. return ii !== -1 ? ii : null;
  2041. };
  2042. /**
  2043. * @private
  2044. * @param {?} weekdayName
  2045. * @param {?} format
  2046. * @param {?} strict
  2047. * @return {?}
  2048. */
  2049. Locale.prototype.handleWeekStrictParse = /**
  2050. * @private
  2051. * @param {?} weekdayName
  2052. * @param {?} format
  2053. * @param {?} strict
  2054. * @return {?}
  2055. */
  2056. function (weekdayName, format, strict) {
  2057. /** @type {?} */
  2058. var ii;
  2059. /** @type {?} */
  2060. var llc = weekdayName.toLocaleLowerCase();
  2061. if (!this._weekdaysParse) {
  2062. this._weekdaysParse = [];
  2063. this._shortWeekdaysParse = [];
  2064. this._minWeekdaysParse = [];
  2065. /** @type {?} */
  2066. var i = void 0;
  2067. for (i = 0; i < 7; ++i) {
  2068. /** @type {?} */
  2069. var date = setDayOfWeek(new Date(Date.UTC(2000, 1)), i, null, true);
  2070. this._minWeekdaysParse[i] = this.weekdaysMin(date).toLocaleLowerCase();
  2071. this._shortWeekdaysParse[i] = this.weekdaysShort(date).toLocaleLowerCase();
  2072. this._weekdaysParse[i] = this.weekdays(date, '').toLocaleLowerCase();
  2073. }
  2074. }
  2075. if (!isArray(this._weekdaysParse)
  2076. || !isArray(this._shortWeekdaysParse)
  2077. || !isArray(this._minWeekdaysParse)) {
  2078. return;
  2079. }
  2080. if (strict) {
  2081. if (format === 'dddd') {
  2082. ii = this._weekdaysParse.indexOf(llc);
  2083. return ii !== -1 ? ii : null;
  2084. }
  2085. else if (format === 'ddd') {
  2086. ii = this._shortWeekdaysParse.indexOf(llc);
  2087. return ii !== -1 ? ii : null;
  2088. }
  2089. else {
  2090. ii = this._minWeekdaysParse.indexOf(llc);
  2091. return ii !== -1 ? ii : null;
  2092. }
  2093. }
  2094. else {
  2095. if (format === 'dddd') {
  2096. ii = this._weekdaysParse.indexOf(llc);
  2097. if (ii !== -1) {
  2098. return ii;
  2099. }
  2100. ii = this._shortWeekdaysParse.indexOf(llc);
  2101. if (ii !== -1) {
  2102. return ii;
  2103. }
  2104. ii = this._minWeekdaysParse.indexOf(llc);
  2105. return ii !== -1 ? ii : null;
  2106. }
  2107. else if (format === 'ddd') {
  2108. ii = this._shortWeekdaysParse.indexOf(llc);
  2109. if (ii !== -1) {
  2110. return ii;
  2111. }
  2112. ii = this._weekdaysParse.indexOf(llc);
  2113. if (ii !== -1) {
  2114. return ii;
  2115. }
  2116. ii = this._minWeekdaysParse.indexOf(llc);
  2117. return ii !== -1 ? ii : null;
  2118. }
  2119. else {
  2120. ii = this._minWeekdaysParse.indexOf(llc);
  2121. if (ii !== -1) {
  2122. return ii;
  2123. }
  2124. ii = this._weekdaysParse.indexOf(llc);
  2125. if (ii !== -1) {
  2126. return ii;
  2127. }
  2128. ii = this._shortWeekdaysParse.indexOf(llc);
  2129. return ii !== -1 ? ii : null;
  2130. }
  2131. }
  2132. };
  2133. /**
  2134. * @private
  2135. * @return {?}
  2136. */
  2137. Locale.prototype.computeMonthsParse = /**
  2138. * @private
  2139. * @return {?}
  2140. */
  2141. function () {
  2142. /** @type {?} */
  2143. var shortPieces = [];
  2144. /** @type {?} */
  2145. var longPieces = [];
  2146. /** @type {?} */
  2147. var mixedPieces = [];
  2148. /** @type {?} */
  2149. var date;
  2150. /** @type {?} */
  2151. var i;
  2152. for (i = 0; i < 12; i++) {
  2153. // make the regex if we don't have it already
  2154. date = new Date(2000, i);
  2155. shortPieces.push(this.monthsShort(date, ''));
  2156. longPieces.push(this.months(date, ''));
  2157. mixedPieces.push(this.months(date, ''));
  2158. mixedPieces.push(this.monthsShort(date, ''));
  2159. }
  2160. // Sorting makes sure if one month (or abbr) is a prefix of another it
  2161. // will match the longer piece.
  2162. shortPieces.sort(cmpLenRev);
  2163. longPieces.sort(cmpLenRev);
  2164. mixedPieces.sort(cmpLenRev);
  2165. for (i = 0; i < 12; i++) {
  2166. shortPieces[i] = regexEscape(shortPieces[i]);
  2167. longPieces[i] = regexEscape(longPieces[i]);
  2168. }
  2169. for (i = 0; i < 24; i++) {
  2170. mixedPieces[i] = regexEscape(mixedPieces[i]);
  2171. }
  2172. this._monthsRegex = new RegExp("^(" + mixedPieces.join('|') + ")", 'i');
  2173. this._monthsShortRegex = this._monthsRegex;
  2174. this._monthsStrictRegex = new RegExp("^(" + longPieces.join('|') + ")", 'i');
  2175. this._monthsShortStrictRegex = new RegExp("^(" + shortPieces.join('|') + ")", 'i');
  2176. };
  2177. /**
  2178. * @private
  2179. * @return {?}
  2180. */
  2181. Locale.prototype.computeWeekdaysParse = /**
  2182. * @private
  2183. * @return {?}
  2184. */
  2185. function () {
  2186. /** @type {?} */
  2187. var minPieces = [];
  2188. /** @type {?} */
  2189. var shortPieces = [];
  2190. /** @type {?} */
  2191. var longPieces = [];
  2192. /** @type {?} */
  2193. var mixedPieces = [];
  2194. /** @type {?} */
  2195. var i;
  2196. for (i = 0; i < 7; i++) {
  2197. // make the regex if we don't have it already
  2198. // let mom = createUTC([2000, 1]).day(i);
  2199. /** @type {?} */
  2200. var date = setDayOfWeek(new Date(Date.UTC(2000, 1)), i, null, true);
  2201. /** @type {?} */
  2202. var minp = this.weekdaysMin(date);
  2203. /** @type {?} */
  2204. var shortp = this.weekdaysShort(date);
  2205. /** @type {?} */
  2206. var longp = this.weekdays(date);
  2207. minPieces.push(minp);
  2208. shortPieces.push(shortp);
  2209. longPieces.push(longp);
  2210. mixedPieces.push(minp);
  2211. mixedPieces.push(shortp);
  2212. mixedPieces.push(longp);
  2213. }
  2214. // Sorting makes sure if one weekday (or abbr) is a prefix of another it
  2215. // will match the longer piece.
  2216. minPieces.sort(cmpLenRev);
  2217. shortPieces.sort(cmpLenRev);
  2218. longPieces.sort(cmpLenRev);
  2219. mixedPieces.sort(cmpLenRev);
  2220. for (i = 0; i < 7; i++) {
  2221. shortPieces[i] = regexEscape(shortPieces[i]);
  2222. longPieces[i] = regexEscape(longPieces[i]);
  2223. mixedPieces[i] = regexEscape(mixedPieces[i]);
  2224. }
  2225. this._weekdaysRegex = new RegExp("^(" + mixedPieces.join('|') + ")", 'i');
  2226. this._weekdaysShortRegex = this._weekdaysRegex;
  2227. this._weekdaysMinRegex = this._weekdaysRegex;
  2228. this._weekdaysStrictRegex = new RegExp("^(" + longPieces.join('|') + ")", 'i');
  2229. this._weekdaysShortStrictRegex = new RegExp("^(" + shortPieces.join('|') + ")", 'i');
  2230. this._weekdaysMinStrictRegex = new RegExp("^(" + minPieces.join('|') + ")", 'i');
  2231. };
  2232. return Locale;
  2233. }());
  2234. /**
  2235. * @param {?} a
  2236. * @param {?} b
  2237. * @return {?}
  2238. */
  2239. function cmpLenRev(a, b) {
  2240. return b.length - a.length;
  2241. }
  2242. /**
  2243. * @fileoverview added by tsickle
  2244. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2245. */
  2246. /** @type {?} */
  2247. var defaultCalendar = {
  2248. sameDay: '[Today at] LT',
  2249. nextDay: '[Tomorrow at] LT',
  2250. nextWeek: 'dddd [at] LT',
  2251. lastDay: '[Yesterday at] LT',
  2252. lastWeek: '[Last] dddd [at] LT',
  2253. sameElse: 'L'
  2254. };
  2255. /**
  2256. * @fileoverview added by tsickle
  2257. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2258. */
  2259. /** @type {?} */
  2260. var defaultInvalidDate = 'Invalid date';
  2261. /** @type {?} */
  2262. var defaultLocaleWeek = {
  2263. dow: 0,
  2264. // Sunday is the first day of the week.
  2265. doy: 6 // The week that contains Jan 1st is the first week of the year.
  2266. };
  2267. /** @type {?} */
  2268. var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;
  2269. /** @type {?} */
  2270. var defaultRelativeTime = {
  2271. future: 'in %s',
  2272. past: '%s ago',
  2273. s: 'a few seconds',
  2274. ss: '%d seconds',
  2275. m: 'a minute',
  2276. mm: '%d minutes',
  2277. h: 'an hour',
  2278. hh: '%d hours',
  2279. d: 'a day',
  2280. dd: '%d days',
  2281. M: 'a month',
  2282. MM: '%d months',
  2283. y: 'a year',
  2284. yy: '%d years'
  2285. };
  2286. /** @type {?} */
  2287. var baseConfig = {
  2288. calendar: defaultCalendar,
  2289. longDateFormat: defaultLongDateFormat,
  2290. invalidDate: defaultInvalidDate,
  2291. ordinal: defaultOrdinal,
  2292. dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
  2293. relativeTime: defaultRelativeTime,
  2294. months: defaultLocaleMonths,
  2295. monthsShort: defaultLocaleMonthsShort,
  2296. week: defaultLocaleWeek,
  2297. weekdays: defaultLocaleWeekdays,
  2298. weekdaysMin: defaultLocaleWeekdaysMin,
  2299. weekdaysShort: defaultLocaleWeekdaysShort,
  2300. meridiemParse: defaultLocaleMeridiemParse
  2301. };
  2302. /**
  2303. * @fileoverview added by tsickle
  2304. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2305. */
  2306. /**
  2307. * @template T
  2308. * @param {?} array1
  2309. * @param {?} array2
  2310. * @param {?} dontConvert
  2311. * @return {?}
  2312. */
  2313. function compareArrays(array1, array2, dontConvert) {
  2314. /** @type {?} */
  2315. var len = Math.min(array1.length, array2.length);
  2316. /** @type {?} */
  2317. var lengthDiff = Math.abs(array1.length - array2.length);
  2318. /** @type {?} */
  2319. var diffs = 0;
  2320. /** @type {?} */
  2321. var i;
  2322. for (i = 0; i < len; i++) {
  2323. if ((dontConvert && array1[i] !== array2[i])
  2324. || (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
  2325. diffs++;
  2326. }
  2327. }
  2328. return diffs + lengthDiff;
  2329. }
  2330. /**
  2331. * @fileoverview added by tsickle
  2332. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2333. */
  2334. // FORMATTING
  2335. /**
  2336. * @return {?}
  2337. */
  2338. function initWeek() {
  2339. addFormatToken('w', ['ww', 2, false], 'wo', (/**
  2340. * @param {?} date
  2341. * @param {?} opts
  2342. * @return {?}
  2343. */
  2344. function (date, opts) {
  2345. return getWeek(date, opts.locale)
  2346. .toString(10);
  2347. }));
  2348. addFormatToken('W', ['WW', 2, false], 'Wo', (/**
  2349. * @param {?} date
  2350. * @return {?}
  2351. */
  2352. function (date) {
  2353. return getISOWeek(date)
  2354. .toString(10);
  2355. }));
  2356. // ALIASES
  2357. addUnitAlias('week', 'w');
  2358. addUnitAlias('isoWeek', 'W');
  2359. // PARSING
  2360. addRegexToken('w', match1to2);
  2361. addRegexToken('ww', match1to2, match2);
  2362. addRegexToken('W', match1to2);
  2363. addRegexToken('WW', match1to2, match2);
  2364. addWeekParseToken(['w', 'ww', 'W', 'WW'], (/**
  2365. * @param {?} input
  2366. * @param {?} week
  2367. * @param {?} config
  2368. * @param {?} token
  2369. * @return {?}
  2370. */
  2371. function (input, week, config, token) {
  2372. week[token.substr(0, 1)] = toInt(input);
  2373. return config;
  2374. }));
  2375. // export function getSetWeek (input) {
  2376. // var week = this.localeData().week(this);
  2377. // return input == null ? week : this.add((input - week) * 7, 'd');
  2378. // }
  2379. }
  2380. /**
  2381. * @param {?} date
  2382. * @param {?=} locale
  2383. * @param {?=} isUTC
  2384. * @return {?}
  2385. */
  2386. function getWeek(date, locale, isUTC) {
  2387. if (locale === void 0) { locale = getLocale(); }
  2388. return locale.week(date, isUTC);
  2389. }
  2390. /**
  2391. * @param {?} date
  2392. * @param {?=} isUTC
  2393. * @return {?}
  2394. */
  2395. function getISOWeek(date, isUTC) {
  2396. return weekOfYear(date, 1, 4, isUTC).week;
  2397. }
  2398. /**
  2399. * @fileoverview added by tsickle
  2400. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2401. */
  2402. // FORMATTING
  2403. /**
  2404. * @return {?}
  2405. */
  2406. function initWeekYear() {
  2407. addFormatToken(null, ['gg', 2, false], null, (/**
  2408. * @param {?} date
  2409. * @param {?} opts
  2410. * @return {?}
  2411. */
  2412. function (date, opts) {
  2413. // return this.weekYear() % 100;
  2414. return (getWeekYear(date, opts.locale) % 100).toString();
  2415. }));
  2416. addFormatToken(null, ['GG', 2, false], null, (/**
  2417. * @param {?} date
  2418. * @return {?}
  2419. */
  2420. function (date) {
  2421. // return this.isoWeekYear() % 100;
  2422. return (getISOWeekYear(date) % 100).toString();
  2423. }));
  2424. addWeekYearFormatToken('gggg', _getWeekYearFormatCb);
  2425. addWeekYearFormatToken('ggggg', _getWeekYearFormatCb);
  2426. addWeekYearFormatToken('GGGG', _getISOWeekYearFormatCb);
  2427. addWeekYearFormatToken('GGGGG', _getISOWeekYearFormatCb);
  2428. // ALIASES
  2429. addUnitAlias('weekYear', 'gg');
  2430. addUnitAlias('isoWeekYear', 'GG');
  2431. // PARSING
  2432. addRegexToken('G', matchSigned);
  2433. addRegexToken('g', matchSigned);
  2434. addRegexToken('GG', match1to2, match2);
  2435. addRegexToken('gg', match1to2, match2);
  2436. addRegexToken('GGGG', match1to4, match4);
  2437. addRegexToken('gggg', match1to4, match4);
  2438. addRegexToken('GGGGG', match1to6, match6);
  2439. addRegexToken('ggggg', match1to6, match6);
  2440. addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], (/**
  2441. * @param {?} input
  2442. * @param {?} week
  2443. * @param {?} config
  2444. * @param {?} token
  2445. * @return {?}
  2446. */
  2447. function (input, week, config, token) {
  2448. week[token.substr(0, 2)] = toInt(input);
  2449. return config;
  2450. }));
  2451. addWeekParseToken(['gg', 'GG'], (/**
  2452. * @param {?} input
  2453. * @param {?} week
  2454. * @param {?} config
  2455. * @param {?} token
  2456. * @return {?}
  2457. */
  2458. function (input, week, config, token) {
  2459. week[token] = parseTwoDigitYear(input);
  2460. return config;
  2461. }));
  2462. }
  2463. /**
  2464. * @param {?} token
  2465. * @param {?} getter
  2466. * @return {?}
  2467. */
  2468. function addWeekYearFormatToken(token, getter) {
  2469. addFormatToken(null, [token, token.length, false], null, getter);
  2470. }
  2471. /**
  2472. * @param {?} date
  2473. * @param {?} opts
  2474. * @return {?}
  2475. */
  2476. function _getWeekYearFormatCb(date, opts) {
  2477. return getWeekYear(date, opts.locale).toString();
  2478. }
  2479. /**
  2480. * @param {?} date
  2481. * @return {?}
  2482. */
  2483. function _getISOWeekYearFormatCb(date) {
  2484. return getISOWeekYear(date).toString();
  2485. }
  2486. /**
  2487. * @param {?} date
  2488. * @param {?=} locale
  2489. * @param {?=} isUTC
  2490. * @return {?}
  2491. */
  2492. function getWeekYear(date, locale, isUTC) {
  2493. if (locale === void 0) { locale = getLocale(); }
  2494. return weekOfYear(date, locale.firstDayOfWeek(), locale.firstDayOfYear(), isUTC).year;
  2495. }
  2496. /**
  2497. * @param {?} date
  2498. * @param {?=} isUTC
  2499. * @return {?}
  2500. */
  2501. function getISOWeekYear(date, isUTC) {
  2502. return weekOfYear(date, 1, 4, isUTC).year;
  2503. }
  2504. /**
  2505. * @fileoverview added by tsickle
  2506. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2507. */
  2508. // todo: add support for timezones
  2509. /**
  2510. * @return {?}
  2511. */
  2512. function initTimezone() {
  2513. // FORMATTING
  2514. addFormatToken('z', null, null, (/**
  2515. * @param {?} date
  2516. * @param {?} opts
  2517. * @return {?}
  2518. */
  2519. function (date, opts) {
  2520. return opts.isUTC ? 'UTC' : '';
  2521. }));
  2522. addFormatToken('zz', null, null, (/**
  2523. * @param {?} date
  2524. * @param {?} opts
  2525. * @return {?}
  2526. */
  2527. function (date, opts) {
  2528. return opts.isUTC ? 'Coordinated Universal Time' : '';
  2529. }));
  2530. }
  2531. /**
  2532. * @fileoverview added by tsickle
  2533. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2534. */
  2535. /**
  2536. * @return {?}
  2537. */
  2538. function initTimestamp() {
  2539. // FORMATTING
  2540. addFormatToken('X', null, null, (/**
  2541. * @param {?} date
  2542. * @return {?}
  2543. */
  2544. function (date) {
  2545. return unix(date)
  2546. .toString(10);
  2547. }));
  2548. addFormatToken('x', null, null, (/**
  2549. * @param {?} date
  2550. * @return {?}
  2551. */
  2552. function (date) {
  2553. return date.valueOf()
  2554. .toString(10);
  2555. }));
  2556. // PARSING
  2557. addRegexToken('x', matchSigned);
  2558. addRegexToken('X', matchTimestamp);
  2559. addParseToken('X', (/**
  2560. * @param {?} input
  2561. * @param {?} array
  2562. * @param {?} config
  2563. * @return {?}
  2564. */
  2565. function (input, array, config) {
  2566. config._d = new Date(parseFloat(input) * 1000);
  2567. return config;
  2568. }));
  2569. addParseToken('x', (/**
  2570. * @param {?} input
  2571. * @param {?} array
  2572. * @param {?} config
  2573. * @return {?}
  2574. */
  2575. function (input, array, config) {
  2576. config._d = new Date(toInt(input));
  2577. return config;
  2578. }));
  2579. }
  2580. /**
  2581. * @fileoverview added by tsickle
  2582. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2583. */
  2584. /**
  2585. * @return {?}
  2586. */
  2587. function initSecond() {
  2588. // FORMATTING
  2589. addFormatToken('s', ['ss', 2, false], null, (/**
  2590. * @param {?} date
  2591. * @param {?} opts
  2592. * @return {?}
  2593. */
  2594. function (date, opts) {
  2595. return getSeconds(date, opts.isUTC)
  2596. .toString(10);
  2597. }));
  2598. // ALIASES
  2599. addUnitAlias('second', 's');
  2600. // PARSING
  2601. addRegexToken('s', match1to2);
  2602. addRegexToken('ss', match1to2, match2);
  2603. addParseToken(['s', 'ss'], SECOND);
  2604. }
  2605. /**
  2606. * @fileoverview added by tsickle
  2607. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2608. */
  2609. /**
  2610. * @return {?}
  2611. */
  2612. function initQuarter() {
  2613. // FORMATTING
  2614. addFormatToken('Q', null, 'Qo', (/**
  2615. * @param {?} date
  2616. * @param {?} opts
  2617. * @return {?}
  2618. */
  2619. function (date, opts) {
  2620. return getQuarter(date, opts.isUTC)
  2621. .toString(10);
  2622. }));
  2623. // ALIASES
  2624. addUnitAlias('quarter', 'Q');
  2625. // PARSING
  2626. addRegexToken('Q', match1);
  2627. addParseToken('Q', (/**
  2628. * @param {?} input
  2629. * @param {?} array
  2630. * @param {?} config
  2631. * @return {?}
  2632. */
  2633. function (input, array, config) {
  2634. array[MONTH] = (toInt(input) - 1) * 3;
  2635. return config;
  2636. }));
  2637. }
  2638. // MOMENTS
  2639. /**
  2640. * @param {?} date
  2641. * @param {?=} isUTC
  2642. * @return {?}
  2643. */
  2644. function getQuarter(date, isUTC) {
  2645. if (isUTC === void 0) { isUTC = false; }
  2646. return Math.ceil((getMonth(date, isUTC) + 1) / 3);
  2647. }
  2648. /**
  2649. * @fileoverview added by tsickle
  2650. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2651. */
  2652. /**
  2653. * @param {?} token
  2654. * @param {?} separator
  2655. * @return {?}
  2656. */
  2657. function addOffsetFormatToken(token, separator) {
  2658. addFormatToken(token, null, null, (/**
  2659. * @param {?} date
  2660. * @param {?} config
  2661. * @return {?}
  2662. */
  2663. function (date, config) {
  2664. /** @type {?} */
  2665. var offset = getUTCOffset(date, { _isUTC: config.isUTC, _offset: config.offset });
  2666. /** @type {?} */
  2667. var sign = '+';
  2668. if (offset < 0) {
  2669. offset = -offset;
  2670. sign = '-';
  2671. }
  2672. return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);
  2673. }));
  2674. }
  2675. /**
  2676. * @return {?}
  2677. */
  2678. function initOffset() {
  2679. addOffsetFormatToken('Z', ':');
  2680. addOffsetFormatToken('ZZ', '');
  2681. // PARSING
  2682. addRegexToken('Z', matchShortOffset);
  2683. addRegexToken('ZZ', matchShortOffset);
  2684. addParseToken(['Z', 'ZZ'], (/**
  2685. * @param {?} input
  2686. * @param {?} array
  2687. * @param {?} config
  2688. * @return {?}
  2689. */
  2690. function (input, array, config) {
  2691. config._useUTC = true;
  2692. config._tzm = offsetFromString(matchShortOffset, input);
  2693. return config;
  2694. }));
  2695. }
  2696. // HELPERS
  2697. // timezone chunker
  2698. // '+10:00' > ['10', '00']
  2699. // '-1530' > ['-15', '30']
  2700. /** @type {?} */
  2701. var chunkOffset = /([\+\-]|\d\d)/gi;
  2702. /**
  2703. * @param {?} matcher
  2704. * @param {?} str
  2705. * @return {?}
  2706. */
  2707. function offsetFromString(matcher, str) {
  2708. /** @type {?} */
  2709. var matches = (str || '').match(matcher);
  2710. if (matches === null) {
  2711. return null;
  2712. }
  2713. /** @type {?} */
  2714. var chunk = matches[matches.length - 1];
  2715. /** @type {?} */
  2716. var parts = chunk.match(chunkOffset) || ['-', '0', '0'];
  2717. /** @type {?} */
  2718. var minutes = parseInt(parts[1], 10) * 60 + toInt(parts[2]);
  2719. /** @type {?} */
  2720. var _min = parts[0] === '+' ? minutes : -minutes;
  2721. return minutes === 0 ? 0 : _min;
  2722. }
  2723. // Return a moment from input, that is local/utc/zone equivalent to model.
  2724. /**
  2725. * @param {?} input
  2726. * @param {?} date
  2727. * @param {?=} config
  2728. * @return {?}
  2729. */
  2730. function cloneWithOffset(input, date, config) {
  2731. if (config === void 0) { config = {}; }
  2732. if (!config._isUTC) {
  2733. return input;
  2734. }
  2735. /** @type {?} */
  2736. var res = cloneDate(date);
  2737. // todo: input._d - res._d + ((res._offset || 0) - (input._offset || 0))*60000
  2738. /** @type {?} */
  2739. var offsetDiff = (config._offset || 0) * 60000;
  2740. /** @type {?} */
  2741. var diff = input.valueOf() - res.valueOf() + offsetDiff;
  2742. // Use low-level api, because this fn is low-level api.
  2743. res.setTime(res.valueOf() + diff);
  2744. // todo: add timezone handling
  2745. // hooks.updateOffset(res, false);
  2746. return res;
  2747. }
  2748. /**
  2749. * @param {?} date
  2750. * @return {?}
  2751. */
  2752. function getDateOffset(date) {
  2753. // On Firefox.24 Date#getTimezoneOffset returns a floating point.
  2754. // https://github.com/moment/moment/pull/1871
  2755. return -Math.round(date.getTimezoneOffset() / 15) * 15;
  2756. }
  2757. // HOOKS
  2758. // This function will be called whenever a moment is mutated.
  2759. // It is intended to keep the offset in sync with the timezone.
  2760. // todo: it's from moment timezones
  2761. // hooks.updateOffset = function () {
  2762. // };
  2763. // MOMENTS
  2764. // keepLocalTime = true means only change the timezone, without
  2765. // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
  2766. // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
  2767. // +0200, so we adjust the time as needed, to be valid.
  2768. //
  2769. // Keeping the time actually adds/subtracts (one hour)
  2770. // from the actual represented time. That is why we call updateOffset
  2771. // a second time. In case it wants us to change the offset again
  2772. // _changeInProgress == true case, then we have to adjust, because
  2773. // there is no such time in the given timezone.
  2774. /**
  2775. * @param {?} date
  2776. * @param {?=} config
  2777. * @return {?}
  2778. */
  2779. function getUTCOffset(date, config) {
  2780. if (config === void 0) { config = {}; }
  2781. /** @type {?} */
  2782. var _offset = config._offset || 0;
  2783. return config._isUTC ? _offset : getDateOffset(date);
  2784. }
  2785. /**
  2786. * @fileoverview added by tsickle
  2787. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2788. */
  2789. /**
  2790. * @return {?}
  2791. */
  2792. function initMinute() {
  2793. // FORMATTING
  2794. addFormatToken('m', ['mm', 2, false], null, (/**
  2795. * @param {?} date
  2796. * @param {?} opts
  2797. * @return {?}
  2798. */
  2799. function (date, opts) {
  2800. return getMinutes(date, opts.isUTC)
  2801. .toString(10);
  2802. }));
  2803. // ALIASES
  2804. addUnitAlias('minute', 'm');
  2805. // PARSING
  2806. addRegexToken('m', match1to2);
  2807. addRegexToken('mm', match1to2, match2);
  2808. addParseToken(['m', 'mm'], MINUTE);
  2809. }
  2810. /**
  2811. * @fileoverview added by tsickle
  2812. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2813. */
  2814. /**
  2815. * @return {?}
  2816. */
  2817. function initMillisecond() {
  2818. addFormatToken('S', null, null, (/**
  2819. * @param {?} date
  2820. * @param {?} opts
  2821. * @return {?}
  2822. */
  2823. function (date, opts) {
  2824. return (~~(getMilliseconds(date, opts.isUTC) / 100)).toString(10);
  2825. }));
  2826. addFormatToken(null, ['SS', 2, false], null, (/**
  2827. * @param {?} date
  2828. * @param {?} opts
  2829. * @return {?}
  2830. */
  2831. function (date, opts) {
  2832. return (~~(getMilliseconds(date, opts.isUTC) / 10)).toString(10);
  2833. }));
  2834. addFormatToken(null, ['SSS', 3, false], null, (/**
  2835. * @param {?} date
  2836. * @param {?} opts
  2837. * @return {?}
  2838. */
  2839. function (date, opts) {
  2840. return (getMilliseconds(date, opts.isUTC)).toString(10);
  2841. }));
  2842. addFormatToken(null, ['SSSS', 4, false], null, (/**
  2843. * @param {?} date
  2844. * @param {?} opts
  2845. * @return {?}
  2846. */
  2847. function (date, opts) {
  2848. return (getMilliseconds(date, opts.isUTC) * 10).toString(10);
  2849. }));
  2850. addFormatToken(null, ['SSSSS', 5, false], null, (/**
  2851. * @param {?} date
  2852. * @param {?} opts
  2853. * @return {?}
  2854. */
  2855. function (date, opts) {
  2856. return (getMilliseconds(date, opts.isUTC) * 100).toString(10);
  2857. }));
  2858. addFormatToken(null, ['SSSSSS', 6, false], null, (/**
  2859. * @param {?} date
  2860. * @param {?} opts
  2861. * @return {?}
  2862. */
  2863. function (date, opts) {
  2864. return (getMilliseconds(date, opts.isUTC) * 1000).toString(10);
  2865. }));
  2866. addFormatToken(null, ['SSSSSSS', 7, false], null, (/**
  2867. * @param {?} date
  2868. * @param {?} opts
  2869. * @return {?}
  2870. */
  2871. function (date, opts) {
  2872. return (getMilliseconds(date, opts.isUTC) * 10000).toString(10);
  2873. }));
  2874. addFormatToken(null, ['SSSSSSSS', 8, false], null, (/**
  2875. * @param {?} date
  2876. * @param {?} opts
  2877. * @return {?}
  2878. */
  2879. function (date, opts) {
  2880. return (getMilliseconds(date, opts.isUTC) * 100000).toString(10);
  2881. }));
  2882. addFormatToken(null, ['SSSSSSSSS', 9, false], null, (/**
  2883. * @param {?} date
  2884. * @param {?} opts
  2885. * @return {?}
  2886. */
  2887. function (date, opts) {
  2888. return (getMilliseconds(date, opts.isUTC) * 1000000).toString(10);
  2889. }));
  2890. // ALIASES
  2891. addUnitAlias('millisecond', 'ms');
  2892. // PARSING
  2893. addRegexToken('S', match1to3, match1);
  2894. addRegexToken('SS', match1to3, match2);
  2895. addRegexToken('SSS', match1to3, match3);
  2896. /** @type {?} */
  2897. var token;
  2898. for (token = 'SSSS'; token.length <= 9; token += 'S') {
  2899. addRegexToken(token, matchUnsigned);
  2900. }
  2901. /**
  2902. * @param {?} input
  2903. * @param {?} array
  2904. * @param {?} config
  2905. * @return {?}
  2906. */
  2907. function parseMs(input, array, config) {
  2908. array[MILLISECOND] = toInt(parseFloat("0." + input) * 1000);
  2909. return config;
  2910. }
  2911. for (token = 'S'; token.length <= 9; token += 'S') {
  2912. addParseToken(token, parseMs);
  2913. }
  2914. // MOMENTS
  2915. }
  2916. /**
  2917. * @fileoverview added by tsickle
  2918. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2919. */
  2920. /**
  2921. * @return {?}
  2922. */
  2923. function initHour() {
  2924. // FORMATTING
  2925. // FORMATTING
  2926. /**
  2927. * @param {?} date
  2928. * @param {?} isUTC
  2929. * @return {?}
  2930. */
  2931. function hFormat(date, isUTC) {
  2932. return getHours(date, isUTC) % 12 || 12;
  2933. }
  2934. /**
  2935. * @param {?} date
  2936. * @param {?} isUTC
  2937. * @return {?}
  2938. */
  2939. function kFormat(date, isUTC) {
  2940. return getHours(date, isUTC) || 24;
  2941. }
  2942. addFormatToken('H', ['HH', 2, false], null, (/**
  2943. * @param {?} date
  2944. * @param {?} opts
  2945. * @return {?}
  2946. */
  2947. function (date, opts) {
  2948. return getHours(date, opts.isUTC)
  2949. .toString(10);
  2950. }));
  2951. addFormatToken('h', ['hh', 2, false], null, (/**
  2952. * @param {?} date
  2953. * @param {?} opts
  2954. * @return {?}
  2955. */
  2956. function (date, opts) {
  2957. return hFormat(date, opts.isUTC)
  2958. .toString(10);
  2959. }));
  2960. addFormatToken('k', ['kk', 2, false], null, (/**
  2961. * @param {?} date
  2962. * @param {?} opts
  2963. * @return {?}
  2964. */
  2965. function (date, opts) {
  2966. return kFormat(date, opts.isUTC)
  2967. .toString(10);
  2968. }));
  2969. addFormatToken('hmm', null, null, (/**
  2970. * @param {?} date
  2971. * @param {?} opts
  2972. * @return {?}
  2973. */
  2974. function (date, opts) {
  2975. /** @type {?} */
  2976. var _h = hFormat(date, opts.isUTC);
  2977. /** @type {?} */
  2978. var _mm = zeroFill(getMinutes(date, opts.isUTC), 2);
  2979. return "" + _h + _mm;
  2980. }));
  2981. addFormatToken('hmmss', null, null, (/**
  2982. * @param {?} date
  2983. * @param {?} opts
  2984. * @return {?}
  2985. */
  2986. function (date, opts) {
  2987. /** @type {?} */
  2988. var _h = hFormat(date, opts.isUTC);
  2989. /** @type {?} */
  2990. var _mm = zeroFill(getMinutes(date, opts.isUTC), 2);
  2991. /** @type {?} */
  2992. var _ss = zeroFill(getSeconds(date, opts.isUTC), 2);
  2993. return "" + _h + _mm + _ss;
  2994. }));
  2995. addFormatToken('Hmm', null, null, (/**
  2996. * @param {?} date
  2997. * @param {?} opts
  2998. * @return {?}
  2999. */
  3000. function (date, opts) {
  3001. /** @type {?} */
  3002. var _H = getHours(date, opts.isUTC);
  3003. /** @type {?} */
  3004. var _mm = zeroFill(getMinutes(date, opts.isUTC), 2);
  3005. return "" + _H + _mm;
  3006. }));
  3007. addFormatToken('Hmmss', null, null, (/**
  3008. * @param {?} date
  3009. * @param {?} opts
  3010. * @return {?}
  3011. */
  3012. function (date, opts) {
  3013. /** @type {?} */
  3014. var _H = getHours(date, opts.isUTC);
  3015. /** @type {?} */
  3016. var _mm = zeroFill(getMinutes(date, opts.isUTC), 2);
  3017. /** @type {?} */
  3018. var _ss = zeroFill(getSeconds(date, opts.isUTC), 2);
  3019. return "" + _H + _mm + _ss;
  3020. }));
  3021. /**
  3022. * @param {?} token
  3023. * @param {?} lowercase
  3024. * @return {?}
  3025. */
  3026. function meridiem(token, lowercase) {
  3027. addFormatToken(token, null, null, (/**
  3028. * @param {?} date
  3029. * @param {?} opts
  3030. * @return {?}
  3031. */
  3032. function (date, opts) {
  3033. return opts.locale.meridiem(getHours(date, opts.isUTC), getMinutes(date, opts.isUTC), lowercase);
  3034. }));
  3035. }
  3036. meridiem('a', true);
  3037. meridiem('A', false);
  3038. // ALIASES
  3039. addUnitAlias('hour', 'h');
  3040. // PARSING
  3041. /**
  3042. * @param {?} isStrict
  3043. * @param {?} locale
  3044. * @return {?}
  3045. */
  3046. function matchMeridiem(isStrict, locale) {
  3047. return locale._meridiemParse;
  3048. }
  3049. addRegexToken('a', matchMeridiem);
  3050. addRegexToken('A', matchMeridiem);
  3051. addRegexToken('H', match1to2);
  3052. addRegexToken('h', match1to2);
  3053. addRegexToken('k', match1to2);
  3054. addRegexToken('HH', match1to2, match2);
  3055. addRegexToken('hh', match1to2, match2);
  3056. addRegexToken('kk', match1to2, match2);
  3057. addRegexToken('hmm', match3to4);
  3058. addRegexToken('hmmss', match5to6);
  3059. addRegexToken('Hmm', match3to4);
  3060. addRegexToken('Hmmss', match5to6);
  3061. addParseToken(['H', 'HH'], HOUR);
  3062. addParseToken(['k', 'kk'], (/**
  3063. * @param {?} input
  3064. * @param {?} array
  3065. * @param {?} config
  3066. * @return {?}
  3067. */
  3068. function (input, array, config) {
  3069. /** @type {?} */
  3070. var kInput = toInt(input);
  3071. array[HOUR] = kInput === 24 ? 0 : kInput;
  3072. return config;
  3073. }));
  3074. addParseToken(['a', 'A'], (/**
  3075. * @param {?} input
  3076. * @param {?} array
  3077. * @param {?} config
  3078. * @return {?}
  3079. */
  3080. function (input, array, config) {
  3081. config._isPm = config._locale.isPM(input);
  3082. config._meridiem = input;
  3083. return config;
  3084. }));
  3085. addParseToken(['h', 'hh'], (/**
  3086. * @param {?} input
  3087. * @param {?} array
  3088. * @param {?} config
  3089. * @return {?}
  3090. */
  3091. function (input, array, config) {
  3092. array[HOUR] = toInt(input);
  3093. getParsingFlags(config).bigHour = true;
  3094. return config;
  3095. }));
  3096. addParseToken('hmm', (/**
  3097. * @param {?} input
  3098. * @param {?} array
  3099. * @param {?} config
  3100. * @return {?}
  3101. */
  3102. function (input, array, config) {
  3103. /** @type {?} */
  3104. var pos = input.length - 2;
  3105. array[HOUR] = toInt(input.substr(0, pos));
  3106. array[MINUTE] = toInt(input.substr(pos));
  3107. getParsingFlags(config).bigHour = true;
  3108. return config;
  3109. }));
  3110. addParseToken('hmmss', (/**
  3111. * @param {?} input
  3112. * @param {?} array
  3113. * @param {?} config
  3114. * @return {?}
  3115. */
  3116. function (input, array, config) {
  3117. /** @type {?} */
  3118. var pos1 = input.length - 4;
  3119. /** @type {?} */
  3120. var pos2 = input.length - 2;
  3121. array[HOUR] = toInt(input.substr(0, pos1));
  3122. array[MINUTE] = toInt(input.substr(pos1, 2));
  3123. array[SECOND] = toInt(input.substr(pos2));
  3124. getParsingFlags(config).bigHour = true;
  3125. return config;
  3126. }));
  3127. addParseToken('Hmm', (/**
  3128. * @param {?} input
  3129. * @param {?} array
  3130. * @param {?} config
  3131. * @return {?}
  3132. */
  3133. function (input, array, config) {
  3134. /** @type {?} */
  3135. var pos = input.length - 2;
  3136. array[HOUR] = toInt(input.substr(0, pos));
  3137. array[MINUTE] = toInt(input.substr(pos));
  3138. return config;
  3139. }));
  3140. addParseToken('Hmmss', (/**
  3141. * @param {?} input
  3142. * @param {?} array
  3143. * @param {?} config
  3144. * @return {?}
  3145. */
  3146. function (input, array, config) {
  3147. /** @type {?} */
  3148. var pos1 = input.length - 4;
  3149. /** @type {?} */
  3150. var pos2 = input.length - 2;
  3151. array[HOUR] = toInt(input.substr(0, pos1));
  3152. array[MINUTE] = toInt(input.substr(pos1, 2));
  3153. array[SECOND] = toInt(input.substr(pos2));
  3154. return config;
  3155. }));
  3156. }
  3157. /**
  3158. * @fileoverview added by tsickle
  3159. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  3160. */
  3161. /** @type {?} */
  3162. var locales = {};
  3163. /** @type {?} */
  3164. var localeFamilies = {};
  3165. /** @type {?} */
  3166. var globalLocale;
  3167. /**
  3168. * @param {?} key
  3169. * @return {?}
  3170. */
  3171. function normalizeLocale(key) {
  3172. return key ? key.toLowerCase().replace('_', '-') : key;
  3173. }
  3174. // pick the locale from the array
  3175. // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
  3176. // substring from most specific to least,
  3177. // but move to the next array item if it's a more specific variant than the current root
  3178. /**
  3179. * @param {?} names
  3180. * @return {?}
  3181. */
  3182. function chooseLocale(names) {
  3183. /** @type {?} */
  3184. var next;
  3185. /** @type {?} */
  3186. var locale;
  3187. /** @type {?} */
  3188. var i = 0;
  3189. while (i < names.length) {
  3190. /** @type {?} */
  3191. var split = normalizeLocale(names[i]).split('-');
  3192. /** @type {?} */
  3193. var j = split.length;
  3194. next = normalizeLocale(names[i + 1]);
  3195. next = next ? next.split('-') : null;
  3196. while (j > 0) {
  3197. locale = loadLocale(split.slice(0, j).join('-'));
  3198. if (locale) {
  3199. return locale;
  3200. }
  3201. if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
  3202. // the next array item is better than a shallower substring of this one
  3203. break;
  3204. }
  3205. j--;
  3206. }
  3207. i++;
  3208. }
  3209. return null;
  3210. }
  3211. /**
  3212. * @param {?} parentConfig
  3213. * @param {?} childConfig
  3214. * @return {?}
  3215. */
  3216. function mergeConfigs(parentConfig, childConfig) {
  3217. /** @type {?} */
  3218. var res = Object.assign({}, parentConfig);
  3219. for (var childProp in childConfig) {
  3220. if (!hasOwnProp(childConfig, childProp)) {
  3221. continue;
  3222. }
  3223. if (isObject(parentConfig[childProp]) && isObject(childConfig[childProp])) {
  3224. res[(/** @type {?} */ (childProp))] = {};
  3225. Object.assign(res[childProp], parentConfig[childProp]);
  3226. Object.assign(res[childProp], childConfig[childProp]);
  3227. }
  3228. else if (childConfig[childProp] != null) {
  3229. res[(/** @type {?} */ (childProp))] = childConfig[childProp];
  3230. }
  3231. else {
  3232. delete res[(/** @type {?} */ (childProp))];
  3233. }
  3234. }
  3235. for (var parentProp in parentConfig) {
  3236. if (hasOwnProp(parentConfig, parentProp) &&
  3237. !hasOwnProp(childConfig, parentProp) &&
  3238. isObject(parentConfig[(/** @type {?} */ (parentProp))])) {
  3239. // make sure changes to properties don't modify parent config
  3240. res[(/** @type {?} */ (parentProp))] = Object.assign({}, res[(/** @type {?} */ (parentProp))]);
  3241. }
  3242. }
  3243. return res;
  3244. }
  3245. /**
  3246. * @param {?} name
  3247. * @return {?}
  3248. */
  3249. function loadLocale(name) {
  3250. // no way!
  3251. /* var oldLocale = null;
  3252. // TODO: Find a better way to register and load all the locales in Node
  3253. if (!locales[name] && (typeof module !== 'undefined') &&
  3254. module && module.exports) {
  3255. try {
  3256. oldLocale = globalLocale._abbr;
  3257. var aliasedRequire = require;
  3258. aliasedRequire('./locale/' + name);
  3259. getSetGlobalLocale(oldLocale);
  3260. } catch (e) {}
  3261. }*/
  3262. if (!locales[name]) {
  3263. // tslint:disable-next-line
  3264. console.error("Khronos locale error: please load locale \"" + name + "\" before using it");
  3265. // throw new Error(`Khronos locale error: please load locale "${name}" before using it`);
  3266. }
  3267. return locales[name];
  3268. }
  3269. // This function will load locale and then set the global locale. If
  3270. // no arguments are passed in, it will simply return the current global
  3271. // locale key.
  3272. /**
  3273. * @param {?=} key
  3274. * @param {?=} values
  3275. * @return {?}
  3276. */
  3277. function getSetGlobalLocale(key, values) {
  3278. /** @type {?} */
  3279. var data;
  3280. if (key) {
  3281. if (isUndefined(values)) {
  3282. data = getLocale(key);
  3283. }
  3284. else if (isString(key)) {
  3285. data = defineLocale(key, values);
  3286. }
  3287. if (data) {
  3288. globalLocale = data;
  3289. }
  3290. }
  3291. return globalLocale && globalLocale._abbr;
  3292. }
  3293. /**
  3294. * @param {?} name
  3295. * @param {?=} config
  3296. * @return {?}
  3297. */
  3298. function defineLocale(name, config) {
  3299. if (config === null) {
  3300. // useful for testing
  3301. delete locales[name];
  3302. globalLocale = getLocale('en');
  3303. return null;
  3304. }
  3305. if (!config) {
  3306. return;
  3307. }
  3308. /** @type {?} */
  3309. var parentConfig = baseConfig;
  3310. config.abbr = name;
  3311. if (config.parentLocale != null) {
  3312. if (locales[config.parentLocale] != null) {
  3313. parentConfig = locales[config.parentLocale]._config;
  3314. }
  3315. else {
  3316. if (!localeFamilies[config.parentLocale]) {
  3317. localeFamilies[config.parentLocale] = [];
  3318. }
  3319. localeFamilies[config.parentLocale].push({ name: name, config: config });
  3320. return null;
  3321. }
  3322. }
  3323. locales[name] = new Locale(mergeConfigs(parentConfig, config));
  3324. if (localeFamilies[name]) {
  3325. localeFamilies[name].forEach((/**
  3326. * @param {?} x
  3327. * @return {?}
  3328. */
  3329. function (x) {
  3330. defineLocale(x.name, x.config);
  3331. }));
  3332. }
  3333. // backwards compat for now: also set the locale
  3334. // make sure we set the locale AFTER all child locales have been
  3335. // created, so we won't end up with the child locale set.
  3336. getSetGlobalLocale(name);
  3337. return locales[name];
  3338. }
  3339. /**
  3340. * @param {?} name
  3341. * @param {?=} config
  3342. * @return {?}
  3343. */
  3344. function updateLocale(name, config) {
  3345. /** @type {?} */
  3346. var _config = config;
  3347. if (_config != null) {
  3348. /** @type {?} */
  3349. var parentConfig = baseConfig;
  3350. // MERGE
  3351. /** @type {?} */
  3352. var tmpLocale = loadLocale(name);
  3353. if (tmpLocale != null) {
  3354. parentConfig = tmpLocale._config;
  3355. }
  3356. _config = mergeConfigs(parentConfig, _config);
  3357. /** @type {?} */
  3358. var locale = new Locale(_config);
  3359. locale.parentLocale = locales[name];
  3360. locales[name] = locale;
  3361. // backwards compat for now: also set the locale
  3362. getSetGlobalLocale(name);
  3363. }
  3364. else {
  3365. // pass null for config to unupdate, useful for tests
  3366. if (locales[name] != null) {
  3367. if (locales[name].parentLocale != null) {
  3368. locales[name] = locales[name].parentLocale;
  3369. }
  3370. else if (locales[name] != null) {
  3371. delete locales[name];
  3372. }
  3373. }
  3374. }
  3375. return locales[name];
  3376. }
  3377. // returns locale data
  3378. /**
  3379. * @param {?=} key
  3380. * @return {?}
  3381. */
  3382. function getLocale(key) {
  3383. setDefaultLocale();
  3384. if (!key) {
  3385. return globalLocale;
  3386. }
  3387. // let locale;
  3388. /** @type {?} */
  3389. var _key = isArray(key) ? key : [key];
  3390. return chooseLocale(_key);
  3391. }
  3392. /**
  3393. * @return {?}
  3394. */
  3395. function listLocales() {
  3396. return Object.keys(locales);
  3397. }
  3398. /**
  3399. * @return {?}
  3400. */
  3401. function setDefaultLocale() {
  3402. if (locales["en"]) {
  3403. return undefined;
  3404. }
  3405. getSetGlobalLocale('en', {
  3406. dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
  3407. ordinal: /**
  3408. * @param {?} num
  3409. * @return {?}
  3410. */
  3411. function (num) {
  3412. /** @type {?} */
  3413. var b = num % 10;
  3414. /** @type {?} */
  3415. var output = toInt((num % 100) / 10) === 1
  3416. ? 'th'
  3417. : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';
  3418. return num + output;
  3419. }
  3420. });
  3421. initWeek();
  3422. initWeekYear();
  3423. initYear();
  3424. initTimezone();
  3425. initTimestamp();
  3426. initSecond();
  3427. initQuarter();
  3428. initOffset();
  3429. initMonth();
  3430. initMinute();
  3431. initMillisecond();
  3432. initHour();
  3433. initDayOfYear();
  3434. initDayOfWeek();
  3435. initDayOfMonth();
  3436. }
  3437. /**
  3438. * @fileoverview added by tsickle
  3439. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  3440. */
  3441. /** @type {?} */
  3442. var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hours', 'minutes', 'seconds', 'milliseconds'];
  3443. var ɵ0 = /**
  3444. * @param {?} mem
  3445. * @param {?} order
  3446. * @return {?}
  3447. */
  3448. function (mem, order) {
  3449. mem[order] = true;
  3450. return mem;
  3451. };
  3452. /** @type {?} */
  3453. var orderingHash = ordering.reduce((ɵ0), {});
  3454. /**
  3455. * @param {?} duration
  3456. * @return {?}
  3457. */
  3458. function isDurationValid(duration) {
  3459. /** @type {?} */
  3460. var durationKeys = Object.keys(duration);
  3461. if (durationKeys
  3462. .some((/**
  3463. * @param {?} key
  3464. * @return {?}
  3465. */
  3466. function (key) {
  3467. return (key in orderingHash)
  3468. && duration[key] === null
  3469. || isNaN(duration[key]);
  3470. }))) {
  3471. return false;
  3472. }
  3473. // for (let key in duration) {
  3474. // if (!(indexOf.call(ordering, key) !== -1 && (duration[key] == null || !isNaN(duration[key])))) {
  3475. // return false;
  3476. // }
  3477. // }
  3478. /** @type {?} */
  3479. var unitHasDecimal = false;
  3480. for (var i = 0; i < ordering.length; ++i) {
  3481. if (duration[ordering[i]]) {
  3482. // only allow non-integers for smallest unit
  3483. if (unitHasDecimal) {
  3484. return false;
  3485. }
  3486. if (duration[ordering[i]] !== toInt(duration[ordering[i]])) {
  3487. unitHasDecimal = true;
  3488. }
  3489. }
  3490. }
  3491. return true;
  3492. }
  3493. /**
  3494. * @fileoverview added by tsickle
  3495. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  3496. */
  3497. /**
  3498. * @param {?} number
  3499. * @return {?}
  3500. */
  3501. function absCeil(number) {
  3502. return number < 0 ? Math.floor(number) : Math.ceil(number);
  3503. }
  3504. /**
  3505. * @fileoverview added by tsickle
  3506. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  3507. */
  3508. /**
  3509. * @param {?} dur
  3510. * @return {?}
  3511. */
  3512. function bubble(dur) {
  3513. /** @type {?} */
  3514. var milliseconds = dur._milliseconds;
  3515. /** @type {?} */
  3516. var days = dur._days;
  3517. /** @type {?} */
  3518. var months = dur._months;
  3519. /** @type {?} */
  3520. var data = dur._data;
  3521. // if we have a mix of positive and negative values, bubble down first
  3522. // check: https://github.com/moment/moment/issues/2166
  3523. if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
  3524. (milliseconds <= 0 && days <= 0 && months <= 0))) {
  3525. milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
  3526. days = 0;
  3527. months = 0;
  3528. }
  3529. // The following code bubbles up values, see the tests for
  3530. // examples of what that means.
  3531. data.milliseconds = milliseconds % 1000;
  3532. /** @type {?} */
  3533. var seconds = absFloor(milliseconds / 1000);
  3534. data.seconds = seconds % 60;
  3535. /** @type {?} */
  3536. var minutes = absFloor(seconds / 60);
  3537. data.minutes = minutes % 60;
  3538. /** @type {?} */
  3539. var hours = absFloor(minutes / 60);
  3540. data.hours = hours % 24;
  3541. days += absFloor(hours / 24);
  3542. // convert days to months
  3543. /** @type {?} */
  3544. var monthsFromDays = absFloor(daysToMonths(days));
  3545. months += monthsFromDays;
  3546. days -= absCeil(monthsToDays(monthsFromDays));
  3547. // 12 months -> 1 year
  3548. /** @type {?} */
  3549. var years = absFloor(months / 12);
  3550. months %= 12;
  3551. data.day = days;
  3552. data.month = months;
  3553. data.year = years;
  3554. return dur;
  3555. }
  3556. /**
  3557. * @param {?} day
  3558. * @return {?}
  3559. */
  3560. function daysToMonths(day) {
  3561. // 400 years have 146097 days (taking into account leap year rules)
  3562. // 400 years have 12 months === 4800
  3563. return day * 4800 / 146097;
  3564. }
  3565. /**
  3566. * @param {?} month
  3567. * @return {?}
  3568. */
  3569. function monthsToDays(month) {
  3570. // the reverse of daysToMonths
  3571. return month * 146097 / 4800;
  3572. }
  3573. /**
  3574. * @fileoverview added by tsickle
  3575. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  3576. */
  3577. /** @type {?} */
  3578. var round = Math.round;
  3579. /** @type {?} */
  3580. var thresholds = {
  3581. ss: 44,
  3582. // a few seconds to seconds
  3583. s: 45,
  3584. // seconds to minute
  3585. m: 45,
  3586. // minutes to hour
  3587. h: 22,
  3588. // hours to day
  3589. d: 26,
  3590. // days to month
  3591. M: 11 // months to year
  3592. };
  3593. // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
  3594. /**
  3595. * @param {?} str
  3596. * @param {?} num
  3597. * @param {?} withoutSuffix
  3598. * @param {?} isFuture
  3599. * @param {?} locale
  3600. * @return {?}
  3601. */
  3602. function substituteTimeAgo(str, num, withoutSuffix, isFuture, locale) {
  3603. return locale.relativeTime(num || 1, !!withoutSuffix, str, isFuture);
  3604. }
  3605. /**
  3606. * @param {?} posNegDuration
  3607. * @param {?} withoutSuffix
  3608. * @param {?} locale
  3609. * @return {?}
  3610. */
  3611. function relativeTime(posNegDuration, withoutSuffix, locale) {
  3612. /** @type {?} */
  3613. var duration = createDuration(posNegDuration).abs();
  3614. /** @type {?} */
  3615. var seconds = round(duration.as('s'));
  3616. /** @type {?} */
  3617. var minutes = round(duration.as('m'));
  3618. /** @type {?} */
  3619. var hours = round(duration.as('h'));
  3620. /** @type {?} */
  3621. var days = round(duration.as('d'));
  3622. /** @type {?} */
  3623. var months = round(duration.as('M'));
  3624. /** @type {?} */
  3625. var years = round(duration.as('y'));
  3626. /** @type {?} */
  3627. var a = seconds <= thresholds.ss && ['s', seconds] ||
  3628. seconds < thresholds.s && ['ss', seconds] ||
  3629. minutes <= 1 && ['m'] ||
  3630. minutes < thresholds.m && ['mm', minutes] ||
  3631. hours <= 1 && ['h'] ||
  3632. hours < thresholds.h && ['hh', hours] ||
  3633. days <= 1 && ['d'] ||
  3634. days < thresholds.d && ['dd', days] ||
  3635. months <= 1 && ['M'] ||
  3636. months < thresholds.M && ['MM', months] ||
  3637. years <= 1 && ['y'] || ['yy', years];
  3638. /** @type {?} */
  3639. var b = [a[0], a[1], withoutSuffix, +posNegDuration > 0, locale];
  3640. // a[2] = withoutSuffix;
  3641. // a[3] = +posNegDuration > 0;
  3642. // a[4] = locale;
  3643. return substituteTimeAgo.apply(null, b);
  3644. }
  3645. /**
  3646. * @fileoverview added by tsickle
  3647. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  3648. */
  3649. var Duration = /** @class */ (function () {
  3650. function Duration(duration, config) {
  3651. if (config === void 0) { config = {}; }
  3652. this._data = {};
  3653. this._locale = getLocale();
  3654. this._locale = config && config._locale || getLocale();
  3655. // const normalizedInput = normalizeObjectUnits(duration);
  3656. /** @type {?} */
  3657. var normalizedInput = duration;
  3658. /** @type {?} */
  3659. var years = normalizedInput.year || 0;
  3660. /** @type {?} */
  3661. var quarters = normalizedInput.quarter || 0;
  3662. /** @type {?} */
  3663. var months = normalizedInput.month || 0;
  3664. /** @type {?} */
  3665. var weeks = normalizedInput.week || 0;
  3666. /** @type {?} */
  3667. var days = normalizedInput.day || 0;
  3668. /** @type {?} */
  3669. var hours = normalizedInput.hours || 0;
  3670. /** @type {?} */
  3671. var minutes = normalizedInput.minutes || 0;
  3672. /** @type {?} */
  3673. var seconds = normalizedInput.seconds || 0;
  3674. /** @type {?} */
  3675. var milliseconds = normalizedInput.milliseconds || 0;
  3676. this._isValid = isDurationValid(normalizedInput);
  3677. // representation for dateAddRemove
  3678. this._milliseconds = +milliseconds +
  3679. seconds * 1000 +
  3680. minutes * 60 * 1000 + // 1000 * 60
  3681. hours * 1000 * 60 * 60; // using 1000 * 60 * 60
  3682. // instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
  3683. // Because of dateAddRemove treats 24 hours as different from a
  3684. // day when working around DST, we need to store them separately
  3685. this._days = +days +
  3686. weeks * 7;
  3687. // It is impossible to translate months into days without knowing
  3688. // which months you are are talking about, so we have to store
  3689. // it separately.
  3690. this._months = +months +
  3691. quarters * 3 +
  3692. years * 12;
  3693. // this._data = {};
  3694. // this._locale = getLocale();
  3695. // this._bubble();
  3696. return bubble(this);
  3697. }
  3698. /**
  3699. * @return {?}
  3700. */
  3701. Duration.prototype.isValid = /**
  3702. * @return {?}
  3703. */
  3704. function () {
  3705. return this._isValid;
  3706. };
  3707. /**
  3708. * @param {?=} withSuffix
  3709. * @return {?}
  3710. */
  3711. Duration.prototype.humanize = /**
  3712. * @param {?=} withSuffix
  3713. * @return {?}
  3714. */
  3715. function (withSuffix) {
  3716. // throw new Error(`TODO: implement`);
  3717. if (!this.isValid()) {
  3718. return this.localeData().invalidDate;
  3719. }
  3720. /** @type {?} */
  3721. var locale = this.localeData();
  3722. /** @type {?} */
  3723. var output = relativeTime(this, !withSuffix, locale);
  3724. if (withSuffix) {
  3725. output = locale.pastFuture(+this, output);
  3726. }
  3727. return locale.postformat(output);
  3728. };
  3729. /**
  3730. * @return {?}
  3731. */
  3732. Duration.prototype.localeData = /**
  3733. * @return {?}
  3734. */
  3735. function () {
  3736. return this._locale;
  3737. };
  3738. /**
  3739. * @param {?=} localeKey
  3740. * @return {?}
  3741. */
  3742. Duration.prototype.locale = /**
  3743. * @param {?=} localeKey
  3744. * @return {?}
  3745. */
  3746. function (localeKey) {
  3747. if (!localeKey) {
  3748. return this._locale._abbr;
  3749. }
  3750. this._locale = getLocale(localeKey) || this._locale;
  3751. return this;
  3752. };
  3753. /**
  3754. * @return {?}
  3755. */
  3756. Duration.prototype.abs = /**
  3757. * @return {?}
  3758. */
  3759. function () {
  3760. /** @type {?} */
  3761. var mathAbs = Math.abs;
  3762. /** @type {?} */
  3763. var data = this._data;
  3764. this._milliseconds = mathAbs(this._milliseconds);
  3765. this._days = mathAbs(this._days);
  3766. this._months = mathAbs(this._months);
  3767. data.milliseconds = mathAbs(data.milliseconds);
  3768. data.seconds = mathAbs(data.seconds);
  3769. data.minutes = mathAbs(data.minutes);
  3770. data.hours = mathAbs(data.hours);
  3771. data.month = mathAbs(data.month);
  3772. data.year = mathAbs(data.year);
  3773. return this;
  3774. };
  3775. /**
  3776. * @param {?} _units
  3777. * @return {?}
  3778. */
  3779. Duration.prototype.as = /**
  3780. * @param {?} _units
  3781. * @return {?}
  3782. */
  3783. function (_units) {
  3784. if (!this.isValid()) {
  3785. return NaN;
  3786. }
  3787. /** @type {?} */
  3788. var days;
  3789. /** @type {?} */
  3790. var months;
  3791. /** @type {?} */
  3792. var milliseconds = this._milliseconds;
  3793. /** @type {?} */
  3794. var units = normalizeUnits(_units);
  3795. if (units === 'month' || units === 'year') {
  3796. days = this._days + milliseconds / 864e5;
  3797. months = this._months + daysToMonths(days);
  3798. return units === 'month' ? months : months / 12;
  3799. }
  3800. // handle milliseconds separately because of floating point math errors (issue #1867)
  3801. days = this._days + Math.round(monthsToDays(this._months));
  3802. switch (units) {
  3803. case 'week':
  3804. return days / 7 + milliseconds / 6048e5;
  3805. case 'day':
  3806. return days + milliseconds / 864e5;
  3807. case 'hours':
  3808. return days * 24 + milliseconds / 36e5;
  3809. case 'minutes':
  3810. return days * 1440 + milliseconds / 6e4;
  3811. case 'seconds':
  3812. return days * 86400 + milliseconds / 1000;
  3813. // Math.floor prevents floating point math errors here
  3814. case 'milliseconds':
  3815. return Math.floor(days * 864e5) + milliseconds;
  3816. default:
  3817. throw new Error("Unknown unit " + units);
  3818. }
  3819. };
  3820. /**
  3821. * @return {?}
  3822. */
  3823. Duration.prototype.valueOf = /**
  3824. * @return {?}
  3825. */
  3826. function () {
  3827. if (!this.isValid()) {
  3828. return NaN;
  3829. }
  3830. return (this._milliseconds +
  3831. this._days * 864e5 +
  3832. (this._months % 12) * 2592e6 +
  3833. toInt(this._months / 12) * 31536e6);
  3834. };
  3835. return Duration;
  3836. }());
  3837. /**
  3838. * @param {?} obj
  3839. * @return {?}
  3840. */
  3841. function isDuration(obj) {
  3842. return obj instanceof Duration;
  3843. }
  3844. /**
  3845. * @fileoverview added by tsickle
  3846. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  3847. */
  3848. /**
  3849. * @param {?} config
  3850. * @return {?}
  3851. */
  3852. function isValid(config) {
  3853. if (config._isValid == null) {
  3854. /** @type {?} */
  3855. var flags = getParsingFlags(config);
  3856. /** @type {?} */
  3857. var parsedParts = Array.prototype.some.call(flags.parsedDateParts, (/**
  3858. * @param {?} i
  3859. * @return {?}
  3860. */
  3861. function (i) {
  3862. return i != null;
  3863. }));
  3864. /** @type {?} */
  3865. var isNowValid = !isNaN(config._d && config._d.getTime()) &&
  3866. flags.overflow < 0 &&
  3867. !flags.empty &&
  3868. !flags.invalidMonth &&
  3869. !flags.invalidWeekday &&
  3870. !flags.weekdayMismatch &&
  3871. !flags.nullInput &&
  3872. !flags.invalidFormat &&
  3873. !flags.userInvalidated &&
  3874. (!flags.meridiem || (flags.meridiem && parsedParts));
  3875. if (config._strict) {
  3876. isNowValid = isNowValid &&
  3877. flags.charsLeftOver === 0 &&
  3878. flags.unusedTokens.length === 0 &&
  3879. flags.bigHour === undefined;
  3880. }
  3881. if (Object.isFrozen == null || !Object.isFrozen(config)) {
  3882. config._isValid = isNowValid;
  3883. }
  3884. else {
  3885. return isNowValid;
  3886. }
  3887. }
  3888. return config._isValid;
  3889. }
  3890. /**
  3891. * @param {?} config
  3892. * @param {?=} flags
  3893. * @return {?}
  3894. */
  3895. function createInvalid(config, flags) {
  3896. config._d = new Date(NaN);
  3897. Object.assign(getParsingFlags(config), flags || { userInvalidated: true });
  3898. return config;
  3899. }
  3900. /**
  3901. * @param {?} config
  3902. * @return {?}
  3903. */
  3904. function markInvalid(config) {
  3905. config._isValid = false;
  3906. return config;
  3907. }
  3908. /**
  3909. * @fileoverview added by tsickle
  3910. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  3911. */
  3912. // iso 8601 regex
  3913. // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
  3914. // tslint:disable-next-line
  3915. /** @type {?} */
  3916. var extendedIsoRegex = /^\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)?)?$/;
  3917. // tslint:disable-next-line
  3918. /** @type {?} */
  3919. var basicIsoRegex = /^\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)?)?$/;
  3920. /** @type {?} */
  3921. var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/;
  3922. /** @type {?} */
  3923. var isoDates = [
  3924. ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/, true],
  3925. ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/, true],
  3926. ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/, true],
  3927. ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
  3928. ['YYYY-DDD', /\d{4}-\d{3}/, true],
  3929. ['YYYY-MM', /\d{4}-\d\d/, false],
  3930. ['YYYYYYMMDD', /[+-]\d{10}/, true],
  3931. ['YYYYMMDD', /\d{8}/, true],
  3932. // YYYYMM is NOT allowed by the standard
  3933. ['GGGG[W]WWE', /\d{4}W\d{3}/, true],
  3934. ['GGGG[W]WW', /\d{4}W\d{2}/, false],
  3935. ['YYYYDDD', /\d{7}/, true]
  3936. ];
  3937. // iso time formats and regexes
  3938. /** @type {?} */
  3939. var isoTimes = [
  3940. ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
  3941. ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
  3942. ['HH:mm:ss', /\d\d:\d\d:\d\d/],
  3943. ['HH:mm', /\d\d:\d\d/],
  3944. ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
  3945. ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
  3946. ['HHmmss', /\d\d\d\d\d\d/],
  3947. ['HHmm', /\d\d\d\d/],
  3948. ['HH', /\d\d/]
  3949. ];
  3950. /** @type {?} */
  3951. var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i;
  3952. /** @type {?} */
  3953. var obsOffsets = {
  3954. UT: 0,
  3955. GMT: 0,
  3956. EDT: -4 * 60,
  3957. EST: -5 * 60,
  3958. CDT: -5 * 60,
  3959. CST: -6 * 60,
  3960. MDT: -6 * 60,
  3961. MST: -7 * 60,
  3962. PDT: -7 * 60,
  3963. PST: -8 * 60
  3964. };
  3965. // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
  3966. // tslint:disable-next-line
  3967. /** @type {?} */
  3968. var rfc2822 = /^(?:(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}))$/;
  3969. // date from iso format
  3970. /**
  3971. * @param {?} config
  3972. * @return {?}
  3973. */
  3974. function configFromISO(config) {
  3975. if (!isString(config._i)) {
  3976. return config;
  3977. }
  3978. /** @type {?} */
  3979. var input = config._i;
  3980. /** @type {?} */
  3981. var match = extendedIsoRegex.exec(input) || basicIsoRegex.exec(input);
  3982. /** @type {?} */
  3983. var allowTime;
  3984. /** @type {?} */
  3985. var dateFormat;
  3986. /** @type {?} */
  3987. var timeFormat;
  3988. /** @type {?} */
  3989. var tzFormat;
  3990. if (!match) {
  3991. config._isValid = false;
  3992. return config;
  3993. }
  3994. // getParsingFlags(config).iso = true;
  3995. /** @type {?} */
  3996. var i;
  3997. /** @type {?} */
  3998. var l;
  3999. for (i = 0, l = isoDates.length; i < l; i++) {
  4000. if (isoDates[i][1].exec(match[1])) {
  4001. dateFormat = isoDates[i][0];
  4002. allowTime = isoDates[i][2] !== false;
  4003. break;
  4004. }
  4005. }
  4006. if (dateFormat == null) {
  4007. config._isValid = false;
  4008. return config;
  4009. }
  4010. if (match[3]) {
  4011. for (i = 0, l = isoTimes.length; i < l; i++) {
  4012. if (isoTimes[i][1].exec(match[3])) {
  4013. // match[2] should be 'T' or space
  4014. timeFormat = (match[2] || ' ') + isoTimes[i][0];
  4015. break;
  4016. }
  4017. }
  4018. if (timeFormat == null) {
  4019. config._isValid = false;
  4020. return config;
  4021. }
  4022. }
  4023. if (!allowTime && timeFormat != null) {
  4024. config._isValid = false;
  4025. return config;
  4026. }
  4027. if (match[4]) {
  4028. if (tzRegex.exec(match[4])) {
  4029. tzFormat = 'Z';
  4030. }
  4031. else {
  4032. config._isValid = false;
  4033. return config;
  4034. }
  4035. }
  4036. config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
  4037. return configFromStringAndFormat(config);
  4038. }
  4039. // tslint:disable-next-line
  4040. /**
  4041. * @param {?} yearStr
  4042. * @param {?} monthStr
  4043. * @param {?} dayStr
  4044. * @param {?} hourStr
  4045. * @param {?} minuteStr
  4046. * @param {?} secondStr
  4047. * @return {?}
  4048. */
  4049. function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
  4050. /** @type {?} */
  4051. var result = [
  4052. untruncateYear(yearStr),
  4053. defaultLocaleMonthsShort.indexOf(monthStr),
  4054. parseInt(dayStr, 10),
  4055. parseInt(hourStr, 10),
  4056. parseInt(minuteStr, 10)
  4057. ];
  4058. if (secondStr) {
  4059. result.push(parseInt(secondStr, 10));
  4060. }
  4061. return result;
  4062. }
  4063. /**
  4064. * @param {?} yearStr
  4065. * @return {?}
  4066. */
  4067. function untruncateYear(yearStr) {
  4068. /** @type {?} */
  4069. var year = parseInt(yearStr, 10);
  4070. return year <= 49 ? year + 2000 : year;
  4071. }
  4072. /**
  4073. * @param {?} str
  4074. * @return {?}
  4075. */
  4076. function preprocessRFC2822(str) {
  4077. // Remove comments and folding whitespace and replace multiple-spaces with a single space
  4078. return str
  4079. .replace(/\([^)]*\)|[\n\t]/g, ' ')
  4080. .replace(/(\s\s+)/g, ' ').trim();
  4081. }
  4082. /**
  4083. * @param {?} weekdayStr
  4084. * @param {?} parsedInput
  4085. * @param {?} config
  4086. * @return {?}
  4087. */
  4088. function checkWeekday(weekdayStr, parsedInput, config) {
  4089. if (weekdayStr) {
  4090. // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.
  4091. /** @type {?} */
  4092. var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr);
  4093. /** @type {?} */
  4094. var weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();
  4095. if (weekdayProvided !== weekdayActual) {
  4096. getParsingFlags(config).weekdayMismatch = true;
  4097. config._isValid = false;
  4098. return false;
  4099. }
  4100. }
  4101. return true;
  4102. }
  4103. /**
  4104. * @param {?} obsOffset
  4105. * @param {?} militaryOffset
  4106. * @param {?} numOffset
  4107. * @return {?}
  4108. */
  4109. function calculateOffset(obsOffset, militaryOffset, numOffset) {
  4110. if (obsOffset) {
  4111. return obsOffsets[obsOffset];
  4112. }
  4113. else if (militaryOffset) {
  4114. // the only allowed military tz is Z
  4115. return 0;
  4116. }
  4117. else {
  4118. /** @type {?} */
  4119. var hm = parseInt(numOffset, 10);
  4120. /** @type {?} */
  4121. var m = hm % 100;
  4122. /** @type {?} */
  4123. var h = (hm - m) / 100;
  4124. return h * 60 + m;
  4125. }
  4126. }
  4127. // date and time from ref 2822 format
  4128. /**
  4129. * @param {?} config
  4130. * @return {?}
  4131. */
  4132. function configFromRFC2822(config) {
  4133. if (!isString(config._i)) {
  4134. return config;
  4135. }
  4136. /** @type {?} */
  4137. var match = rfc2822.exec(preprocessRFC2822(config._i));
  4138. if (!match) {
  4139. return markInvalid(config);
  4140. }
  4141. /** @type {?} */
  4142. var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);
  4143. if (!checkWeekday(match[1], parsedArray, config)) {
  4144. return config;
  4145. }
  4146. config._a = parsedArray;
  4147. config._tzm = calculateOffset(match[8], match[9], match[10]);
  4148. config._d = createUTCDate.apply(null, config._a);
  4149. config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
  4150. getParsingFlags(config).rfc2822 = true;
  4151. return config;
  4152. }
  4153. // date from iso format or fallback
  4154. /**
  4155. * @param {?} config
  4156. * @return {?}
  4157. */
  4158. function configFromString(config) {
  4159. if (!isString(config._i)) {
  4160. return config;
  4161. }
  4162. /** @type {?} */
  4163. var matched = aspNetJsonRegex.exec(config._i);
  4164. if (matched !== null) {
  4165. config._d = new Date(+matched[1]);
  4166. return config;
  4167. }
  4168. // todo: update logic processing
  4169. // isISO -> configFromISO
  4170. // isRFC -> configFromRFC
  4171. configFromISO(config);
  4172. if (config._isValid === false) {
  4173. delete config._isValid;
  4174. }
  4175. else {
  4176. return config;
  4177. }
  4178. configFromRFC2822(config);
  4179. if (config._isValid === false) {
  4180. delete config._isValid;
  4181. }
  4182. else {
  4183. return config;
  4184. }
  4185. // Final attempt, use Input Fallback
  4186. // hooks.createFromInputFallback(config);
  4187. return createInvalid(config);
  4188. }
  4189. /**
  4190. * @fileoverview added by tsickle
  4191. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4192. */
  4193. /**
  4194. * @param {?} date
  4195. * @param {?} format
  4196. * @param {?=} locale
  4197. * @param {?=} isUTC
  4198. * @param {?=} offset
  4199. * @return {?}
  4200. */
  4201. function formatDate(date, format, locale, isUTC, offset) {
  4202. if (offset === void 0) { offset = 0; }
  4203. /** @type {?} */
  4204. var _locale = getLocale(locale || 'en');
  4205. if (!_locale) {
  4206. throw new Error("Locale \"" + locale + "\" is not defined, please add it with \"defineLocale(...)\"");
  4207. }
  4208. /** @type {?} */
  4209. var _format = format || (isUTC ? 'YYYY-MM-DDTHH:mm:ss[Z]' : 'YYYY-MM-DDTHH:mm:ssZ');
  4210. /** @type {?} */
  4211. var output = formatMoment(date, _format, _locale, isUTC, offset);
  4212. if (!output) {
  4213. return output;
  4214. }
  4215. return _locale.postformat(output);
  4216. }
  4217. // format date using native date object
  4218. /**
  4219. * @param {?} date
  4220. * @param {?} _format
  4221. * @param {?} locale
  4222. * @param {?=} isUTC
  4223. * @param {?=} offset
  4224. * @return {?}
  4225. */
  4226. function formatMoment(date, _format, locale, isUTC, offset) {
  4227. if (offset === void 0) { offset = 0; }
  4228. if (!isDateValid(date)) {
  4229. return locale.invalidDate;
  4230. }
  4231. /** @type {?} */
  4232. var format = expandFormat(_format, locale);
  4233. formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);
  4234. return formatFunctions[format](date, locale, isUTC, offset);
  4235. }
  4236. /**
  4237. * @param {?} _format
  4238. * @param {?} locale
  4239. * @return {?}
  4240. */
  4241. function expandFormat(_format, locale) {
  4242. /** @type {?} */
  4243. var format = _format;
  4244. /** @type {?} */
  4245. var i = 5;
  4246. /** @type {?} */
  4247. var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;
  4248. /** @type {?} */
  4249. var replaceLongDateFormatTokens = (/**
  4250. * @param {?} input
  4251. * @return {?}
  4252. */
  4253. function (input) {
  4254. return locale.formatLongDate(input) || input;
  4255. });
  4256. localFormattingTokens.lastIndex = 0;
  4257. while (i >= 0 && localFormattingTokens.test(format)) {
  4258. format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
  4259. localFormattingTokens.lastIndex = 0;
  4260. i -= 1;
  4261. }
  4262. return format;
  4263. }
  4264. /**
  4265. * @fileoverview added by tsickle
  4266. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4267. */
  4268. // Pick the first defined of two or three arguments.
  4269. /**
  4270. * @template T
  4271. * @param {?=} a
  4272. * @param {?=} b
  4273. * @param {?=} c
  4274. * @return {?}
  4275. */
  4276. function defaults(a, b, c) {
  4277. if (a != null) {
  4278. return a;
  4279. }
  4280. if (b != null) {
  4281. return b;
  4282. }
  4283. return c;
  4284. }
  4285. /**
  4286. * @fileoverview added by tsickle
  4287. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4288. */
  4289. /**
  4290. * @param {?} config
  4291. * @return {?}
  4292. */
  4293. function currentDateArray(config) {
  4294. /** @type {?} */
  4295. var nowValue = new Date();
  4296. if (config._useUTC) {
  4297. return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];
  4298. }
  4299. return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
  4300. }
  4301. // convert an array to a date.
  4302. // the array should mirror the parameters below
  4303. // note: all values past the year are optional and will default to the lowest possible value.
  4304. // [year, month, day , hour, minute, second, millisecond]
  4305. /**
  4306. * @param {?} config
  4307. * @return {?}
  4308. */
  4309. function configFromArray(config) {
  4310. /** @type {?} */
  4311. var input = [];
  4312. /** @type {?} */
  4313. var i;
  4314. /** @type {?} */
  4315. var date;
  4316. /** @type {?} */
  4317. var currentDate;
  4318. /** @type {?} */
  4319. var expectedWeekday;
  4320. /** @type {?} */
  4321. var yearToUse;
  4322. if (config._d) {
  4323. return config;
  4324. }
  4325. currentDate = currentDateArray(config);
  4326. // compute day of the year from weeks and weekdays
  4327. if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
  4328. dayOfYearFromWeekInfo(config);
  4329. }
  4330. // if the day of the year is set, figure out what it is
  4331. if (config._dayOfYear != null) {
  4332. yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
  4333. if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {
  4334. getParsingFlags(config)._overflowDayOfYear = true;
  4335. }
  4336. date = new Date(Date.UTC(yearToUse, 0, config._dayOfYear));
  4337. config._a[MONTH] = date.getUTCMonth();
  4338. config._a[DATE] = date.getUTCDate();
  4339. }
  4340. // Default to current date.
  4341. // * if no year, month, day of month are given, default to today
  4342. // * if day of month is given, default month and year
  4343. // * if month is given, default only year
  4344. // * if year is given, don't default anything
  4345. for (i = 0; i < 3 && config._a[i] == null; ++i) {
  4346. config._a[i] = input[i] = currentDate[i];
  4347. }
  4348. // Zero out whatever was not defaulted, including time
  4349. for (; i < 7; i++) {
  4350. config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
  4351. }
  4352. // Check for 24:00:00.000
  4353. if (config._a[HOUR] === 24 &&
  4354. config._a[MINUTE] === 0 &&
  4355. config._a[SECOND] === 0 &&
  4356. config._a[MILLISECOND] === 0) {
  4357. config._nextDay = true;
  4358. config._a[HOUR] = 0;
  4359. }
  4360. config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
  4361. expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();
  4362. // Apply timezone offset from input. The actual utcOffset can be changed
  4363. // with parseZone.
  4364. if (config._tzm != null) {
  4365. config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
  4366. }
  4367. if (config._nextDay) {
  4368. config._a[HOUR] = 24;
  4369. }
  4370. // check for mismatching day of week
  4371. if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {
  4372. getParsingFlags(config).weekdayMismatch = true;
  4373. }
  4374. return config;
  4375. }
  4376. /**
  4377. * @param {?} config
  4378. * @return {?}
  4379. */
  4380. function dayOfYearFromWeekInfo(config) {
  4381. /** @type {?} */
  4382. var w;
  4383. /** @type {?} */
  4384. var weekYear;
  4385. /** @type {?} */
  4386. var week;
  4387. /** @type {?} */
  4388. var weekday;
  4389. /** @type {?} */
  4390. var dow;
  4391. /** @type {?} */
  4392. var doy;
  4393. /** @type {?} */
  4394. var temp;
  4395. /** @type {?} */
  4396. var weekdayOverflow;
  4397. w = config._w;
  4398. if (w.GG != null || w.W != null || w.E != null) {
  4399. dow = 1;
  4400. doy = 4;
  4401. // TODO: We need to take the current isoWeekYear, but that depends on
  4402. // how we interpret now (local, utc, fixed offset). So create
  4403. // a now version of current config (take local/utc/offset flags, and
  4404. // create now).
  4405. weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(new Date(), 1, 4).year);
  4406. week = defaults(w.W, 1);
  4407. weekday = defaults(w.E, 1);
  4408. if (weekday < 1 || weekday > 7) {
  4409. weekdayOverflow = true;
  4410. }
  4411. }
  4412. else {
  4413. dow = config._locale._week.dow;
  4414. doy = config._locale._week.doy;
  4415. /** @type {?} */
  4416. var curWeek = weekOfYear(new Date(), dow, doy);
  4417. weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
  4418. // Default to current week.
  4419. week = defaults(w.w, curWeek.week);
  4420. if (w.d != null) {
  4421. // weekday -- low day numbers are considered next week
  4422. weekday = w.d;
  4423. if (weekday < 0 || weekday > 6) {
  4424. weekdayOverflow = true;
  4425. }
  4426. }
  4427. else if (w.e != null) {
  4428. // local weekday -- counting starts from begining of week
  4429. weekday = w.e + dow;
  4430. if (w.e < 0 || w.e > 6) {
  4431. weekdayOverflow = true;
  4432. }
  4433. }
  4434. else {
  4435. // default to begining of week
  4436. weekday = dow;
  4437. }
  4438. }
  4439. if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
  4440. getParsingFlags(config)._overflowWeeks = true;
  4441. }
  4442. else if (weekdayOverflow != null) {
  4443. getParsingFlags(config)._overflowWeekday = true;
  4444. }
  4445. else {
  4446. temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
  4447. config._a[YEAR] = temp.year;
  4448. config._dayOfYear = temp.dayOfYear;
  4449. }
  4450. return config;
  4451. }
  4452. /**
  4453. * @fileoverview added by tsickle
  4454. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4455. */
  4456. /**
  4457. * @param {?} config
  4458. * @return {?}
  4459. */
  4460. function checkOverflow(config) {
  4461. /** @type {?} */
  4462. var overflow;
  4463. /** @type {?} */
  4464. var a = config._a;
  4465. if (a && getParsingFlags(config).overflow === -2) {
  4466. // todo: fix this sh*t
  4467. overflow =
  4468. a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
  4469. a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
  4470. a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
  4471. a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
  4472. a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
  4473. a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
  4474. -1;
  4475. if (getParsingFlags(config)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
  4476. overflow = DATE;
  4477. }
  4478. if (getParsingFlags(config)._overflowWeeks && overflow === -1) {
  4479. overflow = WEEK;
  4480. }
  4481. if (getParsingFlags(config)._overflowWeekday && overflow === -1) {
  4482. overflow = WEEKDAY;
  4483. }
  4484. getParsingFlags(config).overflow = overflow;
  4485. }
  4486. return config;
  4487. }
  4488. /**
  4489. * @fileoverview added by tsickle
  4490. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4491. */
  4492. // constant that refers to the ISO standard
  4493. // hooks.ISO_8601 = function () {};
  4494. /** @type {?} */
  4495. var ISO_8601 = 'ISO_8601';
  4496. // constant that refers to the RFC 2822 form
  4497. // hooks.RFC_2822 = function () {};
  4498. /** @type {?} */
  4499. var RFC_2822 = 'RFC_2822';
  4500. // date from string and format string
  4501. /**
  4502. * @param {?} config
  4503. * @return {?}
  4504. */
  4505. function configFromStringAndFormat(config) {
  4506. // TODO: Move this to another part of the creation flow to prevent circular deps
  4507. if (config._f === ISO_8601) {
  4508. return configFromISO(config);
  4509. }
  4510. if (config._f === RFC_2822) {
  4511. return configFromRFC2822(config);
  4512. }
  4513. config._a = [];
  4514. getParsingFlags(config).empty = true;
  4515. if (isArray(config._f) || (!config._i && config._i !== 0)) {
  4516. return config;
  4517. }
  4518. // This array is used to make a Date, either with `new Date` or `Date.UTC`
  4519. /** @type {?} */
  4520. var input = config._i.toString();
  4521. /** @type {?} */
  4522. var totalParsedInputLength = 0;
  4523. /** @type {?} */
  4524. var inputLength = input.length;
  4525. /** @type {?} */
  4526. var tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
  4527. /** @type {?} */
  4528. var i;
  4529. /** @type {?} */
  4530. var token;
  4531. /** @type {?} */
  4532. var parsedInput;
  4533. /** @type {?} */
  4534. var skipped;
  4535. for (i = 0; i < tokens.length; i++) {
  4536. token = tokens[i];
  4537. parsedInput = (input.match(getParseRegexForToken(token, config._locale)) || [])[0];
  4538. if (parsedInput) {
  4539. skipped = input.substr(0, input.indexOf(parsedInput));
  4540. if (skipped.length > 0) {
  4541. getParsingFlags(config).unusedInput.push(skipped);
  4542. }
  4543. input = input.slice(input.indexOf(parsedInput) + parsedInput.length);
  4544. totalParsedInputLength += parsedInput.length;
  4545. }
  4546. // don't parse if it's not a known token
  4547. if (formatTokenFunctions[token]) {
  4548. if (parsedInput) {
  4549. getParsingFlags(config).empty = false;
  4550. }
  4551. else {
  4552. getParsingFlags(config).unusedTokens.push(token);
  4553. }
  4554. addTimeToArrayFromToken(token, parsedInput, config);
  4555. }
  4556. else if (config._strict && !parsedInput) {
  4557. getParsingFlags(config).unusedTokens.push(token);
  4558. }
  4559. }
  4560. // add remaining unparsed input length to the string
  4561. getParsingFlags(config).charsLeftOver = inputLength - totalParsedInputLength;
  4562. if (input.length > 0) {
  4563. getParsingFlags(config).unusedInput.push(input);
  4564. }
  4565. // clear _12h flag if hour is <= 12
  4566. if (config._a[HOUR] <= 12 &&
  4567. getParsingFlags(config).bigHour === true &&
  4568. config._a[HOUR] > 0) {
  4569. getParsingFlags(config).bigHour = void 0;
  4570. }
  4571. getParsingFlags(config).parsedDateParts = config._a.slice(0);
  4572. getParsingFlags(config).meridiem = config._meridiem;
  4573. // handle meridiem
  4574. config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
  4575. configFromArray(config);
  4576. return checkOverflow(config);
  4577. }
  4578. /**
  4579. * @param {?} locale
  4580. * @param {?} _hour
  4581. * @param {?} meridiem
  4582. * @return {?}
  4583. */
  4584. function meridiemFixWrap(locale, _hour, meridiem) {
  4585. /** @type {?} */
  4586. var hour = _hour;
  4587. if (meridiem == null) {
  4588. // nothing to do
  4589. return hour;
  4590. }
  4591. if (locale.meridiemHour != null) {
  4592. return locale.meridiemHour(hour, meridiem);
  4593. }
  4594. if (locale.isPM == null) {
  4595. // this is not supposed to happen
  4596. return hour;
  4597. }
  4598. // Fallback
  4599. /** @type {?} */
  4600. var isPm = locale.isPM(meridiem);
  4601. if (isPm && hour < 12) {
  4602. hour += 12;
  4603. }
  4604. if (!isPm && hour === 12) {
  4605. hour = 0;
  4606. }
  4607. return hour;
  4608. }
  4609. /**
  4610. * @fileoverview added by tsickle
  4611. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4612. */
  4613. // date from string and array of format strings
  4614. /**
  4615. * @param {?} config
  4616. * @return {?}
  4617. */
  4618. function configFromStringAndArray(config) {
  4619. /** @type {?} */
  4620. var tempConfig;
  4621. /** @type {?} */
  4622. var bestMoment;
  4623. /** @type {?} */
  4624. var scoreToBeat;
  4625. /** @type {?} */
  4626. var currentScore;
  4627. if (!config._f || config._f.length === 0) {
  4628. getParsingFlags(config).invalidFormat = true;
  4629. return createInvalid(config);
  4630. }
  4631. /** @type {?} */
  4632. var i;
  4633. for (i = 0; i < config._f.length; i++) {
  4634. currentScore = 0;
  4635. tempConfig = Object.assign({}, config);
  4636. if (config._useUTC != null) {
  4637. tempConfig._useUTC = config._useUTC;
  4638. }
  4639. tempConfig._f = config._f[i];
  4640. configFromStringAndFormat(tempConfig);
  4641. if (!isValid(tempConfig)) {
  4642. continue;
  4643. }
  4644. // if there is any input that was not parsed add a penalty for that format
  4645. currentScore += getParsingFlags(tempConfig).charsLeftOver;
  4646. // or tokens
  4647. currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
  4648. getParsingFlags(tempConfig).score = currentScore;
  4649. if (scoreToBeat == null || currentScore < scoreToBeat) {
  4650. scoreToBeat = currentScore;
  4651. bestMoment = tempConfig;
  4652. }
  4653. }
  4654. return Object.assign(config, bestMoment || tempConfig);
  4655. }
  4656. /**
  4657. * @fileoverview added by tsickle
  4658. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4659. */
  4660. /**
  4661. * @param {?} config
  4662. * @return {?}
  4663. */
  4664. function configFromObject(config) {
  4665. if (config._d) {
  4666. return config;
  4667. }
  4668. /** @type {?} */
  4669. var input = config._i;
  4670. if (isObject(input)) {
  4671. /** @type {?} */
  4672. var i = normalizeObjectUnits((/** @type {?} */ (input)));
  4673. config._a = [i.year, i.month, i.day, i.hours, i.minutes, i.seconds, i.milliseconds]
  4674. // todo: obsolete -> remove it
  4675. .map((/**
  4676. * @param {?} obj
  4677. * @return {?}
  4678. */
  4679. function (obj) { return isString(obj) ? parseInt(obj, 10) : obj; }));
  4680. }
  4681. return configFromArray(config);
  4682. }
  4683. /**
  4684. * @fileoverview added by tsickle
  4685. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4686. */
  4687. /**
  4688. * @param {?} config
  4689. * @return {?}
  4690. */
  4691. function createFromConfig(config) {
  4692. /** @type {?} */
  4693. var res = checkOverflow(prepareConfig(config));
  4694. // todo: remove, in moment.js it's never called cuz of moment constructor
  4695. res._d = new Date(res._d != null ? res._d.getTime() : NaN);
  4696. if (!isValid(Object.assign({}, res, { _isValid: null }))) {
  4697. res._d = new Date(NaN);
  4698. }
  4699. // todo: update offset
  4700. /*if (res._nextDay) {
  4701. // Adding is smart enough around DST
  4702. res._d = add(res._d, 1, 'day');
  4703. res._nextDay = undefined;
  4704. }*/
  4705. return res;
  4706. }
  4707. /**
  4708. * @param {?} config
  4709. * @return {?}
  4710. */
  4711. function prepareConfig(config) {
  4712. /** @type {?} */
  4713. var input = config._i;
  4714. /** @type {?} */
  4715. var format = config._f;
  4716. config._locale = config._locale || getLocale(config._l);
  4717. if (input === null || (format === undefined && input === '')) {
  4718. return createInvalid(config, { nullInput: true });
  4719. }
  4720. if (isString(input)) {
  4721. config._i = input = config._locale.preparse(input);
  4722. }
  4723. if (isDate(input)) {
  4724. config._d = cloneDate(input);
  4725. return config;
  4726. }
  4727. // todo: add check for recursion
  4728. if (isArray(format)) {
  4729. configFromStringAndArray(config);
  4730. }
  4731. else if (format) {
  4732. configFromStringAndFormat(config);
  4733. }
  4734. else {
  4735. configFromInput(config);
  4736. }
  4737. if (!isValid(config)) {
  4738. config._d = null;
  4739. }
  4740. return config;
  4741. }
  4742. /**
  4743. * @param {?} config
  4744. * @return {?}
  4745. */
  4746. function configFromInput(config) {
  4747. /** @type {?} */
  4748. var input = config._i;
  4749. if (isUndefined(input)) {
  4750. config._d = new Date();
  4751. }
  4752. else if (isDate(input)) {
  4753. config._d = cloneDate(input);
  4754. }
  4755. else if (isString(input)) {
  4756. configFromString(config);
  4757. }
  4758. else if (isArray(input) && input.length) {
  4759. /** @type {?} */
  4760. var _arr = input.slice(0);
  4761. config._a = _arr.map((/**
  4762. * @param {?} obj
  4763. * @return {?}
  4764. */
  4765. function (obj) { return isString(obj) ? parseInt(obj, 10) : obj; }));
  4766. configFromArray(config);
  4767. }
  4768. else if (isObject(input)) {
  4769. configFromObject(config);
  4770. }
  4771. else if (isNumber(input)) {
  4772. // from milliseconds
  4773. config._d = new Date(input);
  4774. }
  4775. else {
  4776. // hooks.createFromInputFallback(config);
  4777. return createInvalid(config);
  4778. }
  4779. return config;
  4780. }
  4781. /**
  4782. * @param {?} input
  4783. * @param {?=} format
  4784. * @param {?=} localeKey
  4785. * @param {?=} strict
  4786. * @param {?=} isUTC
  4787. * @return {?}
  4788. */
  4789. function createLocalOrUTC(input, format, localeKey, strict, isUTC) {
  4790. /** @type {?} */
  4791. var config = {};
  4792. /** @type {?} */
  4793. var _input = input;
  4794. // params switch -> skip; test it well
  4795. // if (localeKey === true || localeKey === false) {
  4796. // strict = localeKey;
  4797. // localeKey = undefined;
  4798. // }
  4799. // todo: fail fast and return not valid date
  4800. if ((isObject(_input) && isObjectEmpty(_input)) || (isArray(_input) && _input.length === 0)) {
  4801. _input = undefined;
  4802. }
  4803. // object construction must be done this way.
  4804. // https://github.com/moment/moment/issues/1423
  4805. // config._isAMomentObject = true;
  4806. config._useUTC = config._isUTC = isUTC;
  4807. config._l = localeKey;
  4808. config._i = _input;
  4809. config._f = format;
  4810. config._strict = strict;
  4811. return createFromConfig(config);
  4812. }
  4813. /**
  4814. * @fileoverview added by tsickle
  4815. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4816. */
  4817. /**
  4818. * @param {?} input
  4819. * @param {?=} format
  4820. * @param {?=} localeKey
  4821. * @param {?=} strict
  4822. * @param {?=} isUTC
  4823. * @return {?}
  4824. */
  4825. function parseDate(input, format, localeKey, strict, isUTC) {
  4826. if (isDate(input)) {
  4827. return input;
  4828. }
  4829. /** @type {?} */
  4830. var config = createLocalOrUTC(input, format, localeKey, strict, isUTC);
  4831. return config._d;
  4832. }
  4833. /**
  4834. * @param {?} date
  4835. * @return {?}
  4836. */
  4837. function utcAsLocal(date) {
  4838. if (!(date instanceof Date)) {
  4839. return null;
  4840. }
  4841. return new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds());
  4842. }
  4843. /**
  4844. * @fileoverview added by tsickle
  4845. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4846. */
  4847. /**
  4848. * @param {?} num
  4849. * @return {?}
  4850. */
  4851. function absRound(num) {
  4852. return num < 0 ? Math.round(num * -1) * -1 : Math.round(num);
  4853. }
  4854. /**
  4855. * @fileoverview added by tsickle
  4856. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4857. */
  4858. /**
  4859. * @param {?} date1
  4860. * @param {?} date2
  4861. * @param {?=} units
  4862. * @return {?}
  4863. */
  4864. function isAfter(date1, date2, units) {
  4865. if (units === void 0) { units = 'milliseconds'; }
  4866. if (!date1 || !date2) {
  4867. return false;
  4868. }
  4869. if (units === 'milliseconds') {
  4870. return date1.valueOf() > date2.valueOf();
  4871. }
  4872. return date2.valueOf() < startOf(date1, units).valueOf();
  4873. }
  4874. /**
  4875. * @param {?} date1
  4876. * @param {?} date2
  4877. * @param {?=} units
  4878. * @return {?}
  4879. */
  4880. function isBefore(date1, date2, units) {
  4881. if (units === void 0) { units = 'milliseconds'; }
  4882. if (!date1 || !date2) {
  4883. return false;
  4884. }
  4885. if (units === 'milliseconds') {
  4886. return date1.valueOf() < date2.valueOf();
  4887. }
  4888. return endOf(date1, units).valueOf() < date2.valueOf();
  4889. }
  4890. /**
  4891. * @param {?} date
  4892. * @param {?} daysDisabled
  4893. * @return {?}
  4894. */
  4895. function isDisabledDay(date, daysDisabled) {
  4896. if (daysDisabled === undefined || !daysDisabled || !daysDisabled.length) {
  4897. return false;
  4898. }
  4899. return daysDisabled.some((/**
  4900. * @param {?} day
  4901. * @return {?}
  4902. */
  4903. function (day) { return day === date.getDay(); }));
  4904. }
  4905. /**
  4906. * @param {?} date1
  4907. * @param {?} date2
  4908. * @param {?=} units
  4909. * @return {?}
  4910. */
  4911. function isSame(date1, date2, units) {
  4912. if (units === void 0) { units = 'milliseconds'; }
  4913. if (!date1 || !date2) {
  4914. return false;
  4915. }
  4916. if (units === 'milliseconds') {
  4917. return date1.valueOf() === date2.valueOf();
  4918. }
  4919. /** @type {?} */
  4920. var inputMs = date2.valueOf();
  4921. return (startOf(date1, units).valueOf() <= inputMs &&
  4922. inputMs <= endOf(date1, units).valueOf());
  4923. }
  4924. /**
  4925. * @fileoverview added by tsickle
  4926. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4927. */
  4928. /** @type {?} */
  4929. var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/;
  4930. // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
  4931. // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
  4932. // and further modified to allow for strings containing both week and day
  4933. // tslint:disable-next-line
  4934. /** @type {?} */
  4935. var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
  4936. /**
  4937. * @param {?=} input
  4938. * @param {?=} key
  4939. * @param {?=} config
  4940. * @return {?}
  4941. */
  4942. function createDuration(input, key, config) {
  4943. if (config === void 0) { config = {}; }
  4944. /** @type {?} */
  4945. var duration = convertDuration(input, key);
  4946. // matching against regexp is expensive, do it on demand
  4947. return new Duration(duration, config);
  4948. }
  4949. /**
  4950. * @param {?} input
  4951. * @param {?} key
  4952. * @return {?}
  4953. */
  4954. function convertDuration(input, key) {
  4955. var _a;
  4956. // checks for null or undefined
  4957. if (input == null) {
  4958. return {};
  4959. }
  4960. if (isDuration(input)) {
  4961. return {
  4962. milliseconds: input._milliseconds,
  4963. day: input._days,
  4964. month: input._months
  4965. };
  4966. }
  4967. if (isNumber(input)) {
  4968. // duration = {};
  4969. return key ? (_a = {}, _a[key] = input, _a) : { milliseconds: input };
  4970. }
  4971. if (isString(input)) {
  4972. /** @type {?} */
  4973. var match = aspNetRegex.exec(input);
  4974. if (match) {
  4975. /** @type {?} */
  4976. var sign = (match[1] === '-') ? -1 : 1;
  4977. return {
  4978. year: 0,
  4979. day: toInt(match[DATE]) * sign,
  4980. hours: toInt(match[HOUR]) * sign,
  4981. minutes: toInt(match[MINUTE]) * sign,
  4982. seconds: toInt(match[SECOND]) * sign,
  4983. // the millisecond decimal point is included in the match
  4984. milliseconds: toInt(absRound(toInt(match[MILLISECOND]) * 1000)) * sign
  4985. };
  4986. }
  4987. match = isoRegex.exec(input);
  4988. if (match) {
  4989. /** @type {?} */
  4990. var sign = (match[1] === '-') ? -1 : (match[1] === '+') ? 1 : 1;
  4991. return {
  4992. year: parseIso(match[2], sign),
  4993. month: parseIso(match[3], sign),
  4994. week: parseIso(match[4], sign),
  4995. day: parseIso(match[5], sign),
  4996. hours: parseIso(match[6], sign),
  4997. minutes: parseIso(match[7], sign),
  4998. seconds: parseIso(match[8], sign)
  4999. };
  5000. }
  5001. }
  5002. if (isObject(input) && ('from' in input || 'to' in input)) {
  5003. /** @type {?} */
  5004. var diffRes = momentsDifference(parseDate(input.from), parseDate(input.to));
  5005. return {
  5006. milliseconds: diffRes.milliseconds,
  5007. month: diffRes.months
  5008. };
  5009. }
  5010. return input;
  5011. }
  5012. // createDuration.fn = Duration.prototype;
  5013. // createDuration.invalid = invalid;
  5014. /**
  5015. * @param {?} inp
  5016. * @param {?} sign
  5017. * @return {?}
  5018. */
  5019. function parseIso(inp, sign) {
  5020. // We'd normally use ~~inp for this, but unfortunately it also
  5021. // converts floats to ints.
  5022. // inp may be undefined, so careful calling replace on it.
  5023. /** @type {?} */
  5024. var res = inp && parseFloat(inp.replace(',', '.'));
  5025. // apply sign while we're at it
  5026. return (isNaN(res) ? 0 : res) * sign;
  5027. }
  5028. /**
  5029. * @param {?} base
  5030. * @param {?} other
  5031. * @return {?}
  5032. */
  5033. function positiveMomentsDifference(base, other) {
  5034. /** @type {?} */
  5035. var res = { milliseconds: 0, months: 0 };
  5036. res.months = getMonth(other) - getMonth(base) +
  5037. (getFullYear(other) - getFullYear(base)) * 12;
  5038. /** @type {?} */
  5039. var _basePlus = add(cloneDate(base), res.months, 'month');
  5040. if (isAfter(_basePlus, other)) {
  5041. --res.months;
  5042. }
  5043. res.milliseconds = +other - +(add(cloneDate(base), res.months, 'month'));
  5044. return res;
  5045. }
  5046. /**
  5047. * @param {?} base
  5048. * @param {?} other
  5049. * @return {?}
  5050. */
  5051. function momentsDifference(base, other) {
  5052. if (!(isDateValid(base) && isDateValid(other))) {
  5053. return { milliseconds: 0, months: 0 };
  5054. }
  5055. /** @type {?} */
  5056. var res;
  5057. /** @type {?} */
  5058. var _other = cloneWithOffset(other, base, { _offset: base.getTimezoneOffset() });
  5059. if (isBefore(base, _other)) {
  5060. res = positiveMomentsDifference(base, _other);
  5061. }
  5062. else {
  5063. res = positiveMomentsDifference(_other, base);
  5064. res.milliseconds = -res.milliseconds;
  5065. res.months = -res.months;
  5066. }
  5067. return res;
  5068. }
  5069. /**
  5070. * @fileoverview added by tsickle
  5071. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  5072. */
  5073. /**
  5074. * @param {?} date
  5075. * @param {?} val
  5076. * @param {?} period
  5077. * @param {?=} isUTC
  5078. * @return {?}
  5079. */
  5080. function add(date, val, period, isUTC) {
  5081. /** @type {?} */
  5082. var dur = createDuration(val, period);
  5083. return addSubtract(date, dur, 1, isUTC);
  5084. }
  5085. /**
  5086. * @param {?} date
  5087. * @param {?} val
  5088. * @param {?} period
  5089. * @param {?=} isUTC
  5090. * @return {?}
  5091. */
  5092. function subtract(date, val, period, isUTC) {
  5093. /** @type {?} */
  5094. var dur = createDuration(val, period);
  5095. return addSubtract(date, dur, -1, isUTC);
  5096. }
  5097. /**
  5098. * @param {?} date
  5099. * @param {?} duration
  5100. * @param {?} isAdding
  5101. * @param {?=} isUTC
  5102. * @return {?}
  5103. */
  5104. function addSubtract(date, duration, isAdding, isUTC) {
  5105. /** @type {?} */
  5106. var milliseconds = duration._milliseconds;
  5107. /** @type {?} */
  5108. var days = absRound(duration._days);
  5109. /** @type {?} */
  5110. var months = absRound(duration._months);
  5111. // todo: add timezones support
  5112. // const _updateOffset = updateOffset == null ? true : updateOffset;
  5113. if (months) {
  5114. setMonth(date, getMonth(date, isUTC) + months * isAdding, isUTC);
  5115. }
  5116. if (days) {
  5117. setDate(date, getDate(date, isUTC) + days * isAdding, isUTC);
  5118. }
  5119. if (milliseconds) {
  5120. setTime(date, getTime(date) + milliseconds * isAdding);
  5121. }
  5122. return cloneDate(date);
  5123. // todo: add timezones support
  5124. // if (_updateOffset) {
  5125. // hooks.updateOffset(date, days || months);
  5126. // }
  5127. }
  5128. /**
  5129. * @fileoverview added by tsickle
  5130. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  5131. */
  5132. /**
  5133. * @return {?}
  5134. */
  5135. function initDayOfWeek() {
  5136. // FORMATTING
  5137. addFormatToken('d', null, 'do', (/**
  5138. * @param {?} date
  5139. * @param {?} opts
  5140. * @return {?}
  5141. */
  5142. function (date, opts) {
  5143. return getDay(date, opts.isUTC)
  5144. .toString(10);
  5145. }));
  5146. addFormatToken('dd', null, null, (/**
  5147. * @param {?} date
  5148. * @param {?} opts
  5149. * @return {?}
  5150. */
  5151. function (date, opts) {
  5152. return opts.locale.weekdaysMin(date, opts.format, opts.isUTC);
  5153. }));
  5154. addFormatToken('ddd', null, null, (/**
  5155. * @param {?} date
  5156. * @param {?} opts
  5157. * @return {?}
  5158. */
  5159. function (date, opts) {
  5160. return opts.locale.weekdaysShort(date, opts.format, opts.isUTC);
  5161. }));
  5162. addFormatToken('dddd', null, null, (/**
  5163. * @param {?} date
  5164. * @param {?} opts
  5165. * @return {?}
  5166. */
  5167. function (date, opts) {
  5168. return opts.locale.weekdays(date, opts.format, opts.isUTC);
  5169. }));
  5170. addFormatToken('e', null, null, (/**
  5171. * @param {?} date
  5172. * @param {?} opts
  5173. * @return {?}
  5174. */
  5175. function (date, opts) {
  5176. return getLocaleDayOfWeek(date, opts.locale, opts.isUTC)
  5177. .toString(10);
  5178. // return getDay(date, opts.isUTC).toString(10);
  5179. }));
  5180. addFormatToken('E', null, null, (/**
  5181. * @param {?} date
  5182. * @param {?} opts
  5183. * @return {?}
  5184. */
  5185. function (date, opts) {
  5186. return getISODayOfWeek(date, opts.isUTC)
  5187. .toString(10);
  5188. }));
  5189. // ALIASES
  5190. addUnitAlias('day', 'd');
  5191. addUnitAlias('weekday', 'e');
  5192. addUnitAlias('isoWeekday', 'E');
  5193. // PARSING
  5194. addRegexToken('d', match1to2);
  5195. addRegexToken('e', match1to2);
  5196. addRegexToken('E', match1to2);
  5197. addRegexToken('dd', (/**
  5198. * @param {?} isStrict
  5199. * @param {?} locale
  5200. * @return {?}
  5201. */
  5202. function (isStrict, locale) {
  5203. return locale.weekdaysMinRegex(isStrict);
  5204. }));
  5205. addRegexToken('ddd', (/**
  5206. * @param {?} isStrict
  5207. * @param {?} locale
  5208. * @return {?}
  5209. */
  5210. function (isStrict, locale) {
  5211. return locale.weekdaysShortRegex(isStrict);
  5212. }));
  5213. addRegexToken('dddd', (/**
  5214. * @param {?} isStrict
  5215. * @param {?} locale
  5216. * @return {?}
  5217. */
  5218. function (isStrict, locale) {
  5219. return locale.weekdaysRegex(isStrict);
  5220. }));
  5221. addWeekParseToken(['dd', 'ddd', 'dddd'], (/**
  5222. * @param {?} input
  5223. * @param {?} week
  5224. * @param {?} config
  5225. * @param {?} token
  5226. * @return {?}
  5227. */
  5228. function (input, week, config, token) {
  5229. /** @type {?} */
  5230. var weekday = config._locale.weekdaysParse(input, token, config._strict);
  5231. // if we didn't get a weekday name, mark the date as invalid
  5232. if (weekday != null) {
  5233. week.d = weekday;
  5234. }
  5235. else {
  5236. getParsingFlags(config).invalidWeekday = !!input;
  5237. }
  5238. return config;
  5239. }));
  5240. addWeekParseToken(['d', 'e', 'E'], (/**
  5241. * @param {?} input
  5242. * @param {?} week
  5243. * @param {?} config
  5244. * @param {?} token
  5245. * @return {?}
  5246. */
  5247. function (input, week, config, token) {
  5248. week[token] = toInt(input);
  5249. return config;
  5250. }));
  5251. }
  5252. // HELPERS
  5253. /**
  5254. * @param {?} input
  5255. * @param {?} locale
  5256. * @return {?}
  5257. */
  5258. function parseWeekday(input, locale) {
  5259. if (!isString(input)) {
  5260. return input;
  5261. }
  5262. /** @type {?} */
  5263. var _num = parseInt(input, 10);
  5264. if (!isNaN(_num)) {
  5265. return _num;
  5266. }
  5267. /** @type {?} */
  5268. var _weekDay = locale.weekdaysParse(input);
  5269. if (isNumber(_weekDay)) {
  5270. return _weekDay;
  5271. }
  5272. return null;
  5273. }
  5274. /**
  5275. * @param {?} input
  5276. * @param {?=} locale
  5277. * @return {?}
  5278. */
  5279. function parseIsoWeekday(input, locale) {
  5280. if (locale === void 0) { locale = getLocale(); }
  5281. if (isString(input)) {
  5282. return locale.weekdaysParse(input) % 7 || 7;
  5283. }
  5284. return isNumber(input) && isNaN(input) ? null : input;
  5285. }
  5286. /**
  5287. * @param {?} date
  5288. * @param {?} input
  5289. * @param {?=} locale
  5290. * @param {?=} isUTC
  5291. * @return {?}
  5292. */
  5293. function setDayOfWeek(date, input, locale, isUTC) {
  5294. if (locale === void 0) { locale = getLocale(); }
  5295. /** @type {?} */
  5296. var day = getDay(date, isUTC);
  5297. /** @type {?} */
  5298. var _input = parseWeekday(input, locale);
  5299. return add(date, _input - day, 'day');
  5300. }
  5301. /**
  5302. * @param {?} date
  5303. * @param {?=} isUTC
  5304. * @return {?}
  5305. */
  5306. function getDayOfWeek(date, isUTC) {
  5307. return getDay(date, isUTC);
  5308. }
  5309. /**
  5310. * ****************************************
  5311. * @param {?} date
  5312. * @param {?=} locale
  5313. * @param {?=} isUTC
  5314. * @return {?}
  5315. */
  5316. // todo: utc
  5317. // getSetLocaleDayOfWeek
  5318. function getLocaleDayOfWeek(date, locale, isUTC) {
  5319. if (locale === void 0) { locale = getLocale(); }
  5320. return (getDay(date, isUTC) + 7 - locale.firstDayOfWeek()) % 7;
  5321. }
  5322. /**
  5323. * @param {?} date
  5324. * @param {?} input
  5325. * @param {?=} opts
  5326. * @return {?}
  5327. */
  5328. function setLocaleDayOfWeek(date, input, opts) {
  5329. if (opts === void 0) { opts = {}; }
  5330. /** @type {?} */
  5331. var weekday = getLocaleDayOfWeek(date, opts.locale, opts.isUTC);
  5332. return add(date, input - weekday, 'day');
  5333. }
  5334. // getSetISODayOfWeek
  5335. /**
  5336. * @param {?} date
  5337. * @param {?=} isUTC
  5338. * @return {?}
  5339. */
  5340. function getISODayOfWeek(date, isUTC) {
  5341. return getDay(date, isUTC) || 7;
  5342. }
  5343. /**
  5344. * @param {?} date
  5345. * @param {?} input
  5346. * @param {?=} opts
  5347. * @return {?}
  5348. */
  5349. function setISODayOfWeek(date, input, opts) {
  5350. // behaves the same as moment#day except
  5351. // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
  5352. // as a setter, sunday should belong to the previous week.
  5353. if (opts === void 0) { opts = {}; }
  5354. // behaves the same as moment#day except
  5355. // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
  5356. // as a setter, sunday should belong to the previous week.
  5357. /** @type {?} */
  5358. var weekday = parseIsoWeekday(input, opts.locale);
  5359. return setDayOfWeek(date, getDayOfWeek(date) % 7 ? weekday : weekday - 7);
  5360. }
  5361. /**
  5362. * @fileoverview added by tsickle
  5363. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  5364. */
  5365. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  5366. //! moment.js locale configuration
  5367. //! locale : Arabic [ar]
  5368. //! author : Abdel Said: https://github.com/abdelsaid
  5369. //! author : Ahmed Elkhatib
  5370. //! author : forabi https://github.com/forabi
  5371. /** @type {?} */
  5372. var symbolMap = {
  5373. 1: '١',
  5374. 2: '٢',
  5375. 3: '٣',
  5376. 4: '٤',
  5377. 5: '٥',
  5378. 6: '٦',
  5379. 7: '٧',
  5380. 8: '٨',
  5381. 9: '٩',
  5382. 0: '٠'
  5383. };
  5384. /** @type {?} */
  5385. var numberMap = {
  5386. '١': '1',
  5387. '٢': '2',
  5388. '٣': '3',
  5389. '٤': '4',
  5390. '٥': '5',
  5391. '٦': '6',
  5392. '٧': '7',
  5393. '٨': '8',
  5394. '٩': '9',
  5395. '٠': '0'
  5396. };
  5397. /** @type {?} */
  5398. var pluralForm = (/**
  5399. * @param {?} num
  5400. * @return {?}
  5401. */
  5402. function (num) {
  5403. return num === 0 ? 0 : num === 1 ? 1 : num === 2 ? 2 : num % 100 >= 3 && num % 100 <= 10 ? 3 : num % 100 >= 11 ? 4 : 5;
  5404. });
  5405. /** @type {?} */
  5406. var plurals = {
  5407. s: ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],
  5408. m: ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],
  5409. h: ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],
  5410. d: ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],
  5411. M: ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],
  5412. y: ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']
  5413. };
  5414. /** @type {?} */
  5415. var pluralize = (/**
  5416. * @param {?} u
  5417. * @return {?}
  5418. */
  5419. function (u) {
  5420. return (/**
  5421. * @param {?} num
  5422. * @param {?} withoutSuffix
  5423. * @return {?}
  5424. */
  5425. function (num, withoutSuffix) {
  5426. /** @type {?} */
  5427. var f = pluralForm(num);
  5428. /** @type {?} */
  5429. var str = plurals[u][pluralForm(num)];
  5430. if (f === 2) {
  5431. str = str[withoutSuffix ? 0 : 1];
  5432. }
  5433. return ((/** @type {?} */ (str))).replace(/%d/i, num.toString());
  5434. });
  5435. });
  5436. /** @type {?} */
  5437. var months = [
  5438. 'يناير',
  5439. 'فبراير',
  5440. 'مارس',
  5441. 'أبريل',
  5442. 'مايو',
  5443. 'يونيو',
  5444. 'يوليو',
  5445. 'أغسطس',
  5446. 'سبتمبر',
  5447. 'أكتوبر',
  5448. 'نوفمبر',
  5449. 'ديسمبر'
  5450. ];
  5451. /** @type {?} */
  5452. var arLocale = {
  5453. abbr: 'ar',
  5454. months: months,
  5455. monthsShort: months,
  5456. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  5457. weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  5458. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  5459. weekdaysParseExact: true,
  5460. longDateFormat: {
  5461. LT: 'HH:mm',
  5462. LTS: 'HH:mm:ss',
  5463. L: 'D/\u200FM/\u200FYYYY',
  5464. LL: 'D MMMM YYYY',
  5465. LLL: 'D MMMM YYYY HH:mm',
  5466. LLLL: 'dddd D MMMM YYYY HH:mm'
  5467. },
  5468. meridiemParse: /ص|م/,
  5469. isPM: /**
  5470. * @param {?} input
  5471. * @return {?}
  5472. */
  5473. function (input) {
  5474. return 'م' === input;
  5475. },
  5476. meridiem: /**
  5477. * @param {?} hour
  5478. * @param {?} minute
  5479. * @param {?} isLower
  5480. * @return {?}
  5481. */
  5482. function (hour, minute, isLower) {
  5483. if (hour < 12) {
  5484. return 'ص';
  5485. }
  5486. else {
  5487. return 'م';
  5488. }
  5489. },
  5490. calendar: {
  5491. sameDay: '[اليوم عند الساعة] LT',
  5492. nextDay: '[غدًا عند الساعة] LT',
  5493. nextWeek: 'dddd [عند الساعة] LT',
  5494. lastDay: '[أمس عند الساعة] LT',
  5495. lastWeek: 'dddd [عند الساعة] LT',
  5496. sameElse: 'L'
  5497. },
  5498. relativeTime: {
  5499. future: 'بعد %s',
  5500. past: 'منذ %s',
  5501. s: pluralize('s'),
  5502. ss: pluralize('s'),
  5503. m: pluralize('m'),
  5504. mm: pluralize('m'),
  5505. h: pluralize('h'),
  5506. hh: pluralize('h'),
  5507. d: pluralize('d'),
  5508. dd: pluralize('d'),
  5509. M: pluralize('M'),
  5510. MM: pluralize('M'),
  5511. y: pluralize('y'),
  5512. yy: pluralize('y')
  5513. },
  5514. preparse: /**
  5515. * @param {?} str
  5516. * @return {?}
  5517. */
  5518. function (str) {
  5519. return str.replace(/[١٢٣٤٥٦٧٨٩٠]/g, (/**
  5520. * @param {?} match
  5521. * @return {?}
  5522. */
  5523. function (match) {
  5524. return numberMap[match];
  5525. })).replace(/،/g, ',');
  5526. },
  5527. postformat: /**
  5528. * @param {?} str
  5529. * @return {?}
  5530. */
  5531. function (str) {
  5532. return str.replace(/\d/g, (/**
  5533. * @param {?} match
  5534. * @return {?}
  5535. */
  5536. function (match) {
  5537. return symbolMap[match];
  5538. })).replace(/,/g, '،');
  5539. },
  5540. week: {
  5541. dow: 6,
  5542. // Saturday is the first day of the week.
  5543. doy: 12 // The week that contains Jan 1st is the first week of the year.
  5544. }
  5545. };
  5546. /**
  5547. * @fileoverview added by tsickle
  5548. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  5549. */
  5550. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  5551. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  5552. // tslint:disable:no-shadowed-variable switch-default prefer-const
  5553. // tslint:disable:one-variable-per-declaration newline-before-return
  5554. //! moment.js locale configuration
  5555. //! locale : Bulgarian [bg]
  5556. //! author : Iskren Ivov Chernev : https://github.com/ichernev
  5557. //! author : Kunal Marwaha : https://github.com/marwahaha
  5558. //! author : Matt Grande : https://github.com/mattgrande
  5559. //! author : Isaac Cambron : https://github.com/icambron
  5560. //! author : Venelin Manchev : https://github.com/vmanchev
  5561. var ɵ0$1 = /**
  5562. * @param {?} d
  5563. * @return {?}
  5564. */
  5565. function (d) {
  5566. switch (d) {
  5567. case 0:
  5568. case 3:
  5569. case 6:
  5570. return '[В изминалата] dddd [в] LT';
  5571. case 1:
  5572. case 2:
  5573. case 4:
  5574. case 5:
  5575. return '[В изминалия] dddd [в] LT';
  5576. }
  5577. };
  5578. /** @type {?} */
  5579. var bgLocale = {
  5580. abbr: 'bg',
  5581. months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'),
  5582. monthsShort: 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
  5583. weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'),
  5584. weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
  5585. weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  5586. longDateFormat: {
  5587. LT: 'H:mm',
  5588. LTS: 'H:mm:ss',
  5589. L: 'D.MM.YYYY',
  5590. LL: 'D MMMM YYYY',
  5591. LLL: 'D MMMM YYYY H:mm',
  5592. LLLL: 'dddd, D MMMM YYYY H:mm'
  5593. },
  5594. calendar: {
  5595. sameDay: '[Днес в] LT',
  5596. nextDay: '[Утре в] LT',
  5597. nextWeek: 'dddd [в] LT',
  5598. lastDay: '[Вчера в] LT',
  5599. lastWeek: (ɵ0$1),
  5600. sameElse: 'L'
  5601. },
  5602. relativeTime: {
  5603. future: 'след %s',
  5604. past: 'преди %s',
  5605. s: 'няколко секунди',
  5606. ss: '%d секунди',
  5607. m: 'минута',
  5608. mm: '%d минути',
  5609. h: 'час',
  5610. hh: '%d часа',
  5611. d: 'ден',
  5612. dd: '%d дни',
  5613. M: 'месец',
  5614. MM: '%d месеца',
  5615. y: 'година',
  5616. yy: '%d години'
  5617. },
  5618. dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
  5619. ordinal: (/**
  5620. * @param {?} _num
  5621. * @return {?}
  5622. */
  5623. function (_num) {
  5624. /** @type {?} */
  5625. var number = Number(_num);
  5626. /** @type {?} */
  5627. var lastDigit = number % 10;
  5628. /** @type {?} */
  5629. var last2Digits = number % 100;
  5630. if (number === 0) {
  5631. return number + '-ев';
  5632. }
  5633. else if (last2Digits === 0) {
  5634. return number + '-ен';
  5635. }
  5636. else if (last2Digits > 10 && last2Digits < 20) {
  5637. return number + '-ти';
  5638. }
  5639. else if (lastDigit === 1) {
  5640. return number + '-ви';
  5641. }
  5642. else if (lastDigit === 2) {
  5643. return number + '-ри';
  5644. }
  5645. else if (lastDigit === 7 || lastDigit === 8) {
  5646. return number + '-ми';
  5647. }
  5648. else {
  5649. return number + '-ти';
  5650. }
  5651. }),
  5652. week: {
  5653. dow: 1,
  5654. // Monday is the first day of the week.
  5655. doy: 7 // The week that contains Jan 1st is the first week of the year.
  5656. }
  5657. };
  5658. /**
  5659. * @fileoverview added by tsickle
  5660. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  5661. */
  5662. //! moment.js locale configuration
  5663. //! locale : Catalan [ca]
  5664. //! author : Xavier Arbat : https://github.com/XavisaurusRex
  5665. /** @type {?} */
  5666. var monthsShortDot = 'gen._feb._mar._abr._mai._jun._jul._ago._set._oct._nov._des.'.split('_');
  5667. /** @type {?} */
  5668. var monthsShort = 'ene_feb_mar_abr_mai_jun_jul_ago_set_oct_nov_des'.split('_');
  5669. /** @type {?} */
  5670. var monthsParse = [/^gen/i, /^feb/i, /^mar/i, /^abr/i, /^mai/i, /^jun/i, /^jul/i, /^ago/i, /^set/i, /^oct/i, /^nov/i, /^des/i];
  5671. /** @type {?} */
  5672. var monthsRegex = /^(gener|febrer|març|abril|maig|juny|juliol|agost|setembre|octubre|novembre|desembre|gen\.?|feb\.?|mar\.?|abr\.?|mai\.?|jun\.?|jul\.?|ago\.?|set\.?|oct\.?|nov\.?|des\.?)/i;
  5673. /** @type {?} */
  5674. var caLocale = {
  5675. abbr: 'ca',
  5676. months: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),
  5677. monthsShort: /**
  5678. * @param {?} date
  5679. * @param {?} format
  5680. * @param {?=} isUTC
  5681. * @return {?}
  5682. */
  5683. function (date, format, isUTC) {
  5684. if (!date) {
  5685. return monthsShortDot;
  5686. }
  5687. if (/-MMM-/.test(format)) {
  5688. return monthsShort[getMonth(date, isUTC)];
  5689. }
  5690. return monthsShortDot[getMonth(date, isUTC)];
  5691. },
  5692. monthsRegex: monthsRegex,
  5693. monthsShortRegex: monthsRegex,
  5694. monthsStrictRegex: /^(gener|febrer|març|abril|maig|juny|juliol|agost|setembre|octubre|novembre|desembre)/i,
  5695. monthsShortStrictRegex: /^(gen\.?|feb\.?|mar\.?|abr\.?|mai\.?|jun\.?|jul\.?|ago\.?|set\.?|oct\.?|nov\.?|des\.?)/i,
  5696. monthsParse: monthsParse,
  5697. longMonthsParse: monthsParse,
  5698. shortMonthsParse: monthsParse,
  5699. weekdays: 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),
  5700. weekdaysShort: 'diu._dil._dim._dix._dij._div._dis.'.split('_'),
  5701. weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
  5702. weekdaysParseExact: true,
  5703. longDateFormat: {
  5704. LT: 'H:mm',
  5705. LTS: 'H:mm:ss',
  5706. L: 'DD/MM/YYYY',
  5707. LL: 'D [de] MMMM [de] YYYY',
  5708. LLL: 'D [de] MMMM [de] YYYY H:mm',
  5709. LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'
  5710. },
  5711. calendar: {
  5712. sameDay: /**
  5713. * @param {?} date
  5714. * @return {?}
  5715. */
  5716. function (date) {
  5717. return '[avui a ' + ('la' + (getHours(date) !== 1) ? 'les' : '') + '] LT';
  5718. },
  5719. nextDay: /**
  5720. * @param {?} date
  5721. * @return {?}
  5722. */
  5723. function (date) {
  5724. return '[dema a ' + ('la' + (getHours(date) !== 1) ? 'les' : '') + '] LT';
  5725. },
  5726. nextWeek: /**
  5727. * @param {?} date
  5728. * @return {?}
  5729. */
  5730. function (date) {
  5731. return 'dddd [a ' + ('la' + (getHours(date) !== 1) ? 'les' : '') + '] LT';
  5732. },
  5733. lastDay: /**
  5734. * @param {?} date
  5735. * @return {?}
  5736. */
  5737. function (date) {
  5738. return '[ahir a ' + ('la' + (getHours(date) !== 1) ? 'les' : '') + '] LT';
  5739. },
  5740. lastWeek: /**
  5741. * @param {?} date
  5742. * @return {?}
  5743. */
  5744. function (date) {
  5745. return '[el] dddd [' + ('passada la ' + (getHours(date) !== 1) ? 'passades les' : '') + '] LT';
  5746. },
  5747. sameElse: 'L'
  5748. },
  5749. relativeTime: {
  5750. future: 'en %s',
  5751. past: 'fa %s',
  5752. s: 'uns segons',
  5753. ss: '%d segons',
  5754. m: 'un minut',
  5755. mm: '%d minuts',
  5756. h: 'una hora',
  5757. hh: '%d hores',
  5758. d: 'un dia',
  5759. dd: '%d dies',
  5760. M: 'un mes',
  5761. MM: '%d mesos',
  5762. y: 'un any',
  5763. yy: '%d anys'
  5764. },
  5765. dayOfMonthOrdinalParse: /\d{1,2}(er|on|er|rt|é)/,
  5766. ordinal: /**
  5767. * @param {?} _num
  5768. * @return {?}
  5769. */
  5770. function (_num) {
  5771. /** @type {?} */
  5772. var num = Number(_num);
  5773. /** @type {?} */
  5774. var output = (num > 4) ? 'é' :
  5775. (num === 1 || num === 3) ? 'r' :
  5776. (num === 2) ? 'n' :
  5777. (num === 4) ? 't' : 'é';
  5778. return num + output;
  5779. },
  5780. week: {
  5781. dow: 1,
  5782. // Monday is the first day of the week.
  5783. doy: 4 // The week that contains Jan 4th is the first week of the year.
  5784. }
  5785. };
  5786. /**
  5787. * @fileoverview added by tsickle
  5788. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  5789. */
  5790. //! moment.js locale configuration
  5791. //! locale : Czech [cs]
  5792. //! author : petrbela : https://github.com/petrbela
  5793. /** @type {?} */
  5794. var months$1 = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_');
  5795. /** @type {?} */
  5796. var monthsShort$1 = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_');
  5797. /**
  5798. * @param {?} num
  5799. * @return {?}
  5800. */
  5801. function plural(num) {
  5802. return (num > 1) && (num < 5) && (~~(num / 10) !== 1);
  5803. }
  5804. /**
  5805. * @param {?} num
  5806. * @param {?} withoutSuffix
  5807. * @param {?} key
  5808. * @param {?} isFuture
  5809. * @return {?}
  5810. */
  5811. function translate(num, withoutSuffix, key, isFuture) {
  5812. /** @type {?} */
  5813. var result = num + ' ';
  5814. switch (key) {
  5815. case 's': // a few seconds / in a few seconds / a few seconds ago
  5816. return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami';
  5817. case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
  5818. if (withoutSuffix || isFuture) {
  5819. return result + (plural(num) ? 'sekundy' : 'sekund');
  5820. }
  5821. else {
  5822. return result + 'sekundami';
  5823. }
  5824. // break;
  5825. case 'm': // a minute / in a minute / a minute ago
  5826. return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou');
  5827. case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
  5828. if (withoutSuffix || isFuture) {
  5829. return result + (plural(num) ? 'minuty' : 'minut');
  5830. }
  5831. else {
  5832. return result + 'minutami';
  5833. }
  5834. // break;
  5835. case 'h': // an hour / in an hour / an hour ago
  5836. return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
  5837. case 'hh': // 9 hours / in 9 hours / 9 hours ago
  5838. if (withoutSuffix || isFuture) {
  5839. return result + (plural(num) ? 'hodiny' : 'hodin');
  5840. }
  5841. else {
  5842. return result + 'hodinami';
  5843. }
  5844. // break;
  5845. case 'd': // a day / in a day / a day ago
  5846. return (withoutSuffix || isFuture) ? 'den' : 'dnem';
  5847. case 'dd': // 9 days / in 9 days / 9 days ago
  5848. if (withoutSuffix || isFuture) {
  5849. return result + (plural(num) ? 'dny' : 'dní');
  5850. }
  5851. else {
  5852. return result + 'dny';
  5853. }
  5854. // break;
  5855. case 'M': // a month / in a month / a month ago
  5856. return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem';
  5857. case 'MM': // 9 months / in 9 months / 9 months ago
  5858. if (withoutSuffix || isFuture) {
  5859. return result + (plural(num) ? 'měsíce' : 'měsíců');
  5860. }
  5861. else {
  5862. return result + 'měsíci';
  5863. }
  5864. // break;
  5865. case 'y': // a year / in a year / a year ago
  5866. return (withoutSuffix || isFuture) ? 'rok' : 'rokem';
  5867. case 'yy': // 9 years / in 9 years / 9 years ago
  5868. if (withoutSuffix || isFuture) {
  5869. return result + (plural(num) ? 'roky' : 'let');
  5870. }
  5871. else {
  5872. return result + 'lety';
  5873. }
  5874. // break;
  5875. }
  5876. }
  5877. var ɵ0$2 = /**
  5878. * @param {?} months
  5879. * @param {?} monthsShort
  5880. * @return {?}
  5881. */
  5882. function (months, monthsShort) {
  5883. /** @type {?} */
  5884. var i;
  5885. /** @type {?} */
  5886. var _monthsParse = [];
  5887. for (i = 0; i < 12; i++) {
  5888. // use custom parser to solve problem with July (červenec)
  5889. _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');
  5890. }
  5891. return _monthsParse;
  5892. }, ɵ1 = /**
  5893. * @param {?} monthsShort
  5894. * @return {?}
  5895. */
  5896. function (monthsShort) {
  5897. /** @type {?} */
  5898. var i;
  5899. /** @type {?} */
  5900. var _shortMonthsParse = [];
  5901. for (i = 0; i < 12; i++) {
  5902. _shortMonthsParse[i] = new RegExp('^' + monthsShort[i] + '$', 'i');
  5903. }
  5904. return _shortMonthsParse;
  5905. }, ɵ2 = /**
  5906. * @param {?} months
  5907. * @return {?}
  5908. */
  5909. function (months) {
  5910. /** @type {?} */
  5911. var i;
  5912. /** @type {?} */
  5913. var _longMonthsParse = [];
  5914. for (i = 0; i < 12; i++) {
  5915. _longMonthsParse[i] = new RegExp('^' + months[i] + '$', 'i');
  5916. }
  5917. return _longMonthsParse;
  5918. };
  5919. /** @type {?} */
  5920. var csLocale = {
  5921. abbr: 'cs',
  5922. months: months$1,
  5923. monthsShort: monthsShort$1,
  5924. monthsParse: ((ɵ0$2)(months$1, monthsShort$1)),
  5925. shortMonthsParse: ((ɵ1)(monthsShort$1)),
  5926. longMonthsParse: ((ɵ2)(months$1)),
  5927. weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
  5928. weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),
  5929. weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),
  5930. longDateFormat: {
  5931. LT: 'H:mm',
  5932. LTS: 'H:mm:ss',
  5933. L: 'DD.MM.YYYY',
  5934. LL: 'D. MMMM YYYY',
  5935. LLL: 'D. MMMM YYYY H:mm',
  5936. LLLL: 'dddd D. MMMM YYYY H:mm',
  5937. l: 'D. M. YYYY'
  5938. },
  5939. calendar: {
  5940. sameDay: '[dnes v] LT',
  5941. nextDay: '[zítra v] LT',
  5942. nextWeek: /**
  5943. * @param {?} date
  5944. * @return {?}
  5945. */
  5946. function (date) {
  5947. switch (getDayOfWeek(date)) {
  5948. case 0:
  5949. return '[v neděli v] LT';
  5950. case 1:
  5951. case 2:
  5952. return '[v] dddd [v] LT';
  5953. case 3:
  5954. return '[ve středu v] LT';
  5955. case 4:
  5956. return '[ve čtvrtek v] LT';
  5957. case 5:
  5958. return '[v pátek v] LT';
  5959. case 6:
  5960. return '[v sobotu v] LT';
  5961. }
  5962. },
  5963. lastDay: '[včera v] LT',
  5964. lastWeek: /**
  5965. * @param {?} date
  5966. * @return {?}
  5967. */
  5968. function (date) {
  5969. switch (getDayOfWeek(date)) {
  5970. case 0:
  5971. return '[minulou neděli v] LT';
  5972. case 1:
  5973. case 2:
  5974. return '[minulé] dddd [v] LT';
  5975. case 3:
  5976. return '[minulou středu v] LT';
  5977. case 4:
  5978. case 5:
  5979. return '[minulý] dddd [v] LT';
  5980. case 6:
  5981. return '[minulou sobotu v] LT';
  5982. }
  5983. },
  5984. sameElse: 'L'
  5985. },
  5986. relativeTime: {
  5987. future: 'za %s',
  5988. past: 'před %s',
  5989. s: translate,
  5990. ss: translate,
  5991. m: translate,
  5992. mm: translate,
  5993. h: translate,
  5994. hh: translate,
  5995. d: translate,
  5996. dd: translate,
  5997. M: translate,
  5998. MM: translate,
  5999. y: translate,
  6000. yy: translate
  6001. },
  6002. dayOfMonthOrdinalParse: /\d{1,2}\./,
  6003. ordinal: '%d.',
  6004. week: {
  6005. dow: 1,
  6006. // Monday is the first day of the week.
  6007. doy: 4 // The week that contains Jan 4th is the first week of the year.
  6008. }
  6009. };
  6010. /**
  6011. * @fileoverview added by tsickle
  6012. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6013. */
  6014. // tslint:disable:comment-format
  6015. //! moment.js locale configuration
  6016. //! locale : Danish (Denmark) [da]
  6017. //! author : Per Hansen : https://github.com/perhp
  6018. /** @type {?} */
  6019. var daLocale = {
  6020. abbr: 'da',
  6021. months: 'Januar_Februar_Marts_April_Maj_Juni_Juli_August_September_Oktober_November_December'.split('_'),
  6022. monthsShort: 'Jan_Feb_Mar_Apr_Maj_Jun_Jul_Aug_Sep_Okt_Nov_Dec'.split('_'),
  6023. weekdays: 'Søndag_Mandag_Tirsdag_Onsdag_Torsdag_Fredag_Lørdag'.split('_'),
  6024. weekdaysShort: 'Søn_Man_Tir_Ons_Tor_Fre_Lør'.split('_'),
  6025. weekdaysMin: 'Sø_Ma_Ti_On_To_Fr_Lø'.split('_'),
  6026. longDateFormat: {
  6027. LT: 'HH:mm',
  6028. LTS: 'HH:mm:ss',
  6029. L: 'DD/MM/YYYY',
  6030. LL: 'D. MMMM YYYY',
  6031. LLL: 'D. MMMM YYYY HH:mm',
  6032. LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm'
  6033. },
  6034. calendar: {
  6035. sameDay: '[i dag kl.] LT',
  6036. nextDay: '[i morgen kl.] LT',
  6037. nextWeek: 'på dddd [kl.] LT',
  6038. lastDay: '[i går kl.] LT',
  6039. lastWeek: '[i] dddd[s kl.] LT',
  6040. sameElse: 'L'
  6041. },
  6042. relativeTime: {
  6043. future: 'om %s',
  6044. past: '%s siden',
  6045. s: 'få sekunder',
  6046. m: 'et minut',
  6047. mm: '%d minutter',
  6048. h: 'en time',
  6049. hh: '%d timer',
  6050. d: 'en dag',
  6051. dd: '%d dage',
  6052. M: 'en måned',
  6053. MM: '%d måneder',
  6054. y: 'et år',
  6055. yy: '%d år'
  6056. },
  6057. dayOfMonthOrdinalParse: /\d{1,2}\./,
  6058. ordinal: '%d.',
  6059. week: {
  6060. dow: 1,
  6061. // Monday is the first day of the week.
  6062. doy: 4 // The week that contains Jan 4th is the first week of the year.
  6063. }
  6064. };
  6065. /**
  6066. * @fileoverview added by tsickle
  6067. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6068. */
  6069. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  6070. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  6071. // tslint:disable:no-shadowed-variable switch-default prefer-const
  6072. // tslint:disable:one-variable-per-declaration newline-before-return
  6073. // tslint:disable:object-literal-key-quotes
  6074. //! moment.js locale configuration
  6075. //! locale : German [de]
  6076. //! author : lluchs : https://github.com/lluchs
  6077. //! author: Menelion Elensúle: https://github.com/Oire
  6078. //! author : Mikolaj Dadela : https://github.com/mik01aj
  6079. /**
  6080. * @param {?} num
  6081. * @param {?} withoutSuffix
  6082. * @param {?} key
  6083. * @param {?} isFuture
  6084. * @return {?}
  6085. */
  6086. function processRelativeTime(num, withoutSuffix, key, isFuture) {
  6087. /** @type {?} */
  6088. var format = {
  6089. 'm': ['eine Minute', 'einer Minute'],
  6090. 'h': ['eine Stunde', 'einer Stunde'],
  6091. 'd': ['ein Tag', 'einem Tag'],
  6092. 'dd': [num + ' Tage', num + ' Tagen'],
  6093. 'M': ['ein Monat', 'einem Monat'],
  6094. 'MM': [num + ' Monate', num + ' Monaten'],
  6095. 'y': ['ein Jahr', 'einem Jahr'],
  6096. 'yy': [num + ' Jahre', num + ' Jahren']
  6097. };
  6098. return withoutSuffix ? format[key][0] : format[key][1];
  6099. }
  6100. /** @type {?} */
  6101. var deLocale = {
  6102. abbr: 'de',
  6103. months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
  6104. monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
  6105. monthsParseExact: true,
  6106. weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
  6107. weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
  6108. weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  6109. weekdaysParseExact: true,
  6110. longDateFormat: {
  6111. LT: 'HH:mm',
  6112. LTS: 'HH:mm:ss',
  6113. L: 'DD.MM.YYYY',
  6114. LL: 'D. MMMM YYYY',
  6115. LLL: 'D. MMMM YYYY HH:mm',
  6116. LLLL: 'dddd, D. MMMM YYYY HH:mm'
  6117. },
  6118. calendar: {
  6119. sameDay: '[heute um] LT [Uhr]',
  6120. sameElse: 'L',
  6121. nextDay: '[morgen um] LT [Uhr]',
  6122. nextWeek: 'dddd [um] LT [Uhr]',
  6123. lastDay: '[gestern um] LT [Uhr]',
  6124. lastWeek: '[letzten] dddd [um] LT [Uhr]'
  6125. },
  6126. relativeTime: {
  6127. future: 'in %s',
  6128. past: 'vor %s',
  6129. s: 'ein paar Sekunden',
  6130. ss: '%d Sekunden',
  6131. m: processRelativeTime,
  6132. mm: '%d Minuten',
  6133. h: processRelativeTime,
  6134. hh: '%d Stunden',
  6135. d: processRelativeTime,
  6136. dd: processRelativeTime,
  6137. M: processRelativeTime,
  6138. MM: processRelativeTime,
  6139. y: processRelativeTime,
  6140. yy: processRelativeTime
  6141. },
  6142. dayOfMonthOrdinalParse: /\d{1,2}\./,
  6143. ordinal: '%d.',
  6144. week: {
  6145. dow: 1,
  6146. // Monday is the first day of the week.
  6147. doy: 4 // The week that contains Jan 4th is the first week of the year.
  6148. }
  6149. };
  6150. /**
  6151. * @fileoverview added by tsickle
  6152. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6153. */
  6154. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  6155. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  6156. // tslint:disable:no-shadowed-variable switch-default prefer-const
  6157. // tslint:disable:one-variable-per-declaration newline-before-return
  6158. //! moment.js locale configuration
  6159. //! locale : English (United Kingdom) [en-gb]
  6160. //! author : Chris Gedrim : https://github.com/chrisgedrim
  6161. /** @type {?} */
  6162. var enGbLocale = {
  6163. abbr: 'en-gb',
  6164. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
  6165. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  6166. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
  6167. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  6168. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  6169. longDateFormat: {
  6170. LT: 'HH:mm',
  6171. LTS: 'HH:mm:ss',
  6172. L: 'DD/MM/YYYY',
  6173. LL: 'D MMMM YYYY',
  6174. LLL: 'D MMMM YYYY HH:mm',
  6175. LLLL: 'dddd, D MMMM YYYY HH:mm'
  6176. },
  6177. calendar: {
  6178. sameDay: '[Today at] LT',
  6179. nextDay: '[Tomorrow at] LT',
  6180. nextWeek: 'dddd [at] LT',
  6181. lastDay: '[Yesterday at] LT',
  6182. lastWeek: '[Last] dddd [at] LT',
  6183. sameElse: 'L'
  6184. },
  6185. relativeTime: {
  6186. future: 'in %s',
  6187. past: '%s ago',
  6188. s: 'a few seconds',
  6189. ss: '%d seconds',
  6190. m: 'a minute',
  6191. mm: '%d minutes',
  6192. h: 'an hour',
  6193. hh: '%d hours',
  6194. d: 'a day',
  6195. dd: '%d days',
  6196. M: 'a month',
  6197. MM: '%d months',
  6198. y: 'a year',
  6199. yy: '%d years'
  6200. },
  6201. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  6202. ordinal: /**
  6203. * @param {?} _num
  6204. * @return {?}
  6205. */
  6206. function (_num) {
  6207. /** @type {?} */
  6208. var num = Number(_num);
  6209. /** @type {?} */
  6210. var b = num % 10;
  6211. /** @type {?} */
  6212. var output = (~~(num % 100 / 10) === 1) ? 'th' :
  6213. (b === 1) ? 'st' :
  6214. (b === 2) ? 'nd' :
  6215. (b === 3) ? 'rd' : 'th';
  6216. return num + output;
  6217. },
  6218. week: {
  6219. dow: 1,
  6220. // Monday is the first day of the week.
  6221. doy: 4 // The week that contains Jan 4th is the first week of the year.
  6222. }
  6223. };
  6224. /**
  6225. * @fileoverview added by tsickle
  6226. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6227. */
  6228. //! moment.js locale configuration
  6229. //! locale : Spanish (Dominican Republic) [es-do]
  6230. /** @type {?} */
  6231. var monthsShortDot$1 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
  6232. /** @type {?} */
  6233. var monthsShort$2 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
  6234. /** @type {?} */
  6235. var monthsParse$1 = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i];
  6236. /** @type {?} */
  6237. var monthsRegex$1 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
  6238. /** @type {?} */
  6239. var esDoLocale = {
  6240. abbr: 'es-do',
  6241. months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
  6242. monthsShort: /**
  6243. * @param {?} date
  6244. * @param {?} format
  6245. * @param {?=} isUTC
  6246. * @return {?}
  6247. */
  6248. function (date, format, isUTC) {
  6249. if (!date) {
  6250. return monthsShortDot$1;
  6251. }
  6252. else if (/-MMM-/.test(format)) {
  6253. return monthsShort$2[getMonth(date, isUTC)];
  6254. }
  6255. else {
  6256. return monthsShortDot$1[getMonth(date, isUTC)];
  6257. }
  6258. },
  6259. monthsRegex: monthsRegex$1,
  6260. monthsShortRegex: monthsRegex$1,
  6261. monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  6262. monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  6263. monthsParse: monthsParse$1,
  6264. longMonthsParse: monthsParse$1,
  6265. shortMonthsParse: monthsParse$1,
  6266. weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  6267. weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  6268. weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  6269. weekdaysParseExact: true,
  6270. longDateFormat: {
  6271. LT: 'h:mm A',
  6272. LTS: 'h:mm:ss A',
  6273. L: 'DD/MM/YYYY',
  6274. LL: 'D [de] MMMM [de] YYYY',
  6275. LLL: 'D [de] MMMM [de] YYYY h:mm A',
  6276. LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A'
  6277. },
  6278. calendar: {
  6279. sameDay: /**
  6280. * @param {?} date
  6281. * @return {?}
  6282. */
  6283. function (date) {
  6284. return '[hoy a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6285. },
  6286. nextDay: /**
  6287. * @param {?} date
  6288. * @return {?}
  6289. */
  6290. function (date) {
  6291. return '[mañana a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6292. },
  6293. nextWeek: /**
  6294. * @param {?} date
  6295. * @return {?}
  6296. */
  6297. function (date) {
  6298. return 'dddd [a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6299. },
  6300. lastDay: /**
  6301. * @param {?} date
  6302. * @return {?}
  6303. */
  6304. function (date) {
  6305. return '[ayer a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6306. },
  6307. lastWeek: /**
  6308. * @param {?} date
  6309. * @return {?}
  6310. */
  6311. function (date) {
  6312. return '[el] dddd [pasado a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6313. },
  6314. sameElse: 'L'
  6315. },
  6316. relativeTime: {
  6317. future: 'en %s',
  6318. past: 'hace %s',
  6319. s: 'unos segundos',
  6320. ss: '%d segundos',
  6321. m: 'un minuto',
  6322. mm: '%d minutos',
  6323. h: 'una hora',
  6324. hh: '%d horas',
  6325. d: 'un día',
  6326. dd: '%d días',
  6327. M: 'un mes',
  6328. MM: '%d meses',
  6329. y: 'un año',
  6330. yy: '%d años'
  6331. },
  6332. dayOfMonthOrdinalParse: /\d{1,2}º/,
  6333. ordinal: '%dº',
  6334. week: {
  6335. dow: 1,
  6336. // Monday is the first day of the week.
  6337. doy: 4 // The week that contains Jan 4th is the first week of the year.
  6338. }
  6339. };
  6340. /**
  6341. * @fileoverview added by tsickle
  6342. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6343. */
  6344. //! moment.js locale configuration
  6345. //! locale : Spanish [es]
  6346. //! author : Julio Napurí : https://github.com/julionc
  6347. /** @type {?} */
  6348. var monthsShortDot$2 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
  6349. /** @type {?} */
  6350. var monthsShort$3 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
  6351. /** @type {?} */
  6352. var monthsParse$2 = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i];
  6353. /** @type {?} */
  6354. var monthsRegex$2 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;
  6355. /** @type {?} */
  6356. var esLocale = {
  6357. abbr: 'es',
  6358. months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
  6359. monthsShort: /**
  6360. * @param {?} date
  6361. * @param {?} format
  6362. * @param {?=} isUTC
  6363. * @return {?}
  6364. */
  6365. function (date, format, isUTC) {
  6366. if (!date) {
  6367. return monthsShortDot$2;
  6368. }
  6369. if (/-MMM-/.test(format)) {
  6370. return monthsShort$3[getMonth(date, isUTC)];
  6371. }
  6372. return monthsShortDot$2[getMonth(date, isUTC)];
  6373. },
  6374. monthsRegex: monthsRegex$2,
  6375. monthsShortRegex: monthsRegex$2,
  6376. monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  6377. monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  6378. monthsParse: monthsParse$2,
  6379. longMonthsParse: monthsParse$2,
  6380. shortMonthsParse: monthsParse$2,
  6381. weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  6382. weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  6383. weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  6384. weekdaysParseExact: true,
  6385. longDateFormat: {
  6386. LT: 'H:mm',
  6387. LTS: 'H:mm:ss',
  6388. L: 'DD/MM/YYYY',
  6389. LL: 'D [de] MMMM [de] YYYY',
  6390. LLL: 'D [de] MMMM [de] YYYY H:mm',
  6391. LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'
  6392. },
  6393. calendar: {
  6394. sameDay: /**
  6395. * @param {?} date
  6396. * @return {?}
  6397. */
  6398. function (date) {
  6399. return '[hoy a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6400. },
  6401. nextDay: /**
  6402. * @param {?} date
  6403. * @return {?}
  6404. */
  6405. function (date) {
  6406. return '[mañana a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6407. },
  6408. nextWeek: /**
  6409. * @param {?} date
  6410. * @return {?}
  6411. */
  6412. function (date) {
  6413. return 'dddd [a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6414. },
  6415. lastDay: /**
  6416. * @param {?} date
  6417. * @return {?}
  6418. */
  6419. function (date) {
  6420. return '[ayer a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6421. },
  6422. lastWeek: /**
  6423. * @param {?} date
  6424. * @return {?}
  6425. */
  6426. function (date) {
  6427. return '[el] dddd [pasado a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6428. },
  6429. sameElse: 'L'
  6430. },
  6431. relativeTime: {
  6432. future: 'en %s',
  6433. past: 'hace %s',
  6434. s: 'unos segundos',
  6435. ss: '%d segundos',
  6436. m: 'un minuto',
  6437. mm: '%d minutos',
  6438. h: 'una hora',
  6439. hh: '%d horas',
  6440. d: 'un día',
  6441. dd: '%d días',
  6442. M: 'un mes',
  6443. MM: '%d meses',
  6444. y: 'un año',
  6445. yy: '%d años'
  6446. },
  6447. dayOfMonthOrdinalParse: /\d{1,2}º/,
  6448. ordinal: '%dº',
  6449. week: {
  6450. dow: 1,
  6451. // Monday is the first day of the week.
  6452. doy: 4 // The week that contains Jan 4th is the first week of the year.
  6453. }
  6454. };
  6455. /**
  6456. * @fileoverview added by tsickle
  6457. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6458. */
  6459. //! moment.js locale configuration
  6460. //! locale : Spanish (United States) [es-us]
  6461. //! author : bustta : https://github.com/bustta
  6462. /** @type {?} */
  6463. var monthsShortDot$3 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
  6464. /** @type {?} */
  6465. var monthsShort$4 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
  6466. /** @type {?} */
  6467. var esUsLocale = {
  6468. abbr: 'es-us',
  6469. months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
  6470. monthsShort: /**
  6471. * @param {?} date
  6472. * @param {?} format
  6473. * @param {?=} isUTC
  6474. * @return {?}
  6475. */
  6476. function (date, format, isUTC) {
  6477. if (!date) {
  6478. return monthsShortDot$3;
  6479. }
  6480. else if (/-MMM-/.test(format)) {
  6481. return monthsShort$4[getMonth(date, isUTC)];
  6482. }
  6483. else {
  6484. return monthsShortDot$3[getMonth(date, isUTC)];
  6485. }
  6486. },
  6487. monthsParseExact: true,
  6488. weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  6489. weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  6490. weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  6491. weekdaysParseExact: true,
  6492. longDateFormat: {
  6493. LT: 'h:mm A',
  6494. LTS: 'h:mm:ss A',
  6495. L: 'MM/DD/YYYY',
  6496. LL: 'MMMM [de] D [de] YYYY',
  6497. LLL: 'MMMM [de] D [de] YYYY h:mm A',
  6498. LLLL: 'dddd, MMMM [de] D [de] YYYY h:mm A'
  6499. },
  6500. calendar: {
  6501. sameDay: /**
  6502. * @param {?} date
  6503. * @return {?}
  6504. */
  6505. function (date) {
  6506. return '[hoy a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6507. },
  6508. nextDay: /**
  6509. * @param {?} date
  6510. * @return {?}
  6511. */
  6512. function (date) {
  6513. return '[mañana a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6514. },
  6515. nextWeek: /**
  6516. * @param {?} date
  6517. * @return {?}
  6518. */
  6519. function (date) {
  6520. return 'dddd [a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6521. },
  6522. lastDay: /**
  6523. * @param {?} date
  6524. * @return {?}
  6525. */
  6526. function (date) {
  6527. return '[ayer a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6528. },
  6529. lastWeek: /**
  6530. * @param {?} date
  6531. * @return {?}
  6532. */
  6533. function (date) {
  6534. return '[el] dddd [pasado a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6535. },
  6536. sameElse: 'L'
  6537. },
  6538. relativeTime: {
  6539. future: 'en %s',
  6540. past: 'hace %s',
  6541. s: 'unos segundos',
  6542. ss: '%d segundos',
  6543. m: 'un minuto',
  6544. mm: '%d minutos',
  6545. h: 'una hora',
  6546. hh: '%d horas',
  6547. d: 'un día',
  6548. dd: '%d días',
  6549. M: 'un mes',
  6550. MM: '%d meses',
  6551. y: 'un año',
  6552. yy: '%d años'
  6553. },
  6554. dayOfMonthOrdinalParse: /\d{1,2}º/,
  6555. ordinal: '%dº',
  6556. week: {
  6557. dow: 0,
  6558. // Sunday is the first day of the week.
  6559. doy: 6 // The week that contains Jan 1st is the first week of the year.
  6560. }
  6561. };
  6562. /**
  6563. * @fileoverview added by tsickle
  6564. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6565. */
  6566. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  6567. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  6568. // tslint:disable:no-shadowed-variable switch-default prefer-const
  6569. // tslint:disable:one-variable-per-declaration newline-before-return
  6570. //! moment.js locale configuration
  6571. //! locale : Estonian [et]
  6572. //! author : Chris Gedrim : https://github.com/a90machado
  6573. /** @type {?} */
  6574. var processRelativeTime$1 = (/**
  6575. * @param {?} num
  6576. * @param {?} withoutSuffix
  6577. * @param {?} key
  6578. * @param {?} isFuture
  6579. * @return {?}
  6580. */
  6581. function (num, withoutSuffix, key, isFuture) {
  6582. /** @type {?} */
  6583. var format = {
  6584. s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
  6585. ss: [num + 'sekundi', num + 'sekundit'],
  6586. m: ['ühe minuti', 'üks minut'],
  6587. mm: [num + ' minuti', num + ' minutit'],
  6588. h: ['ühe tunni', 'tund aega', 'üks tund'],
  6589. hh: [num + ' tunni', num + ' tundi'],
  6590. d: ['ühe päeva', 'üks päev'],
  6591. M: ['kuu aja', 'kuu aega', 'üks kuu'],
  6592. MM: [num + ' kuu', num + ' kuud'],
  6593. y: ['ühe aasta', 'aasta', 'üks aasta'],
  6594. yy: [num + ' aasta', num + ' aastat']
  6595. };
  6596. if (withoutSuffix) {
  6597. return format[key][2] ? format[key][2] : format[key][1];
  6598. }
  6599. return isFuture ? format[key][0] : format[key][1];
  6600. });
  6601. /** @type {?} */
  6602. var etLocale = {
  6603. abbr: 'et',
  6604. months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'),
  6605. monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),
  6606. weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'),
  6607. weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
  6608. weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
  6609. longDateFormat: {
  6610. LT: 'H:mm',
  6611. LTS: 'H:mm:ss',
  6612. L: 'DD.MM.YYYY',
  6613. LL: 'D. MMMM YYYY',
  6614. LLL: 'D. MMMM YYYY H:mm',
  6615. LLLL: 'dddd, D. MMMM YYYY H:mm'
  6616. },
  6617. calendar: {
  6618. sameDay: '[Täna,] LT',
  6619. nextDay: '[Homme,] LT',
  6620. nextWeek: '[Järgmine] dddd LT',
  6621. lastDay: '[Eile,] LT',
  6622. lastWeek: '[Eelmine] dddd LT',
  6623. sameElse: 'L'
  6624. },
  6625. relativeTime: {
  6626. future: '%s pärast',
  6627. past: '%s tagasi',
  6628. s: processRelativeTime$1,
  6629. ss: processRelativeTime$1,
  6630. m: processRelativeTime$1,
  6631. mm: processRelativeTime$1,
  6632. h: processRelativeTime$1,
  6633. hh: processRelativeTime$1,
  6634. d: processRelativeTime$1,
  6635. dd: '%d päeva',
  6636. M: processRelativeTime$1,
  6637. MM: processRelativeTime$1,
  6638. y: processRelativeTime$1,
  6639. yy: processRelativeTime$1
  6640. },
  6641. dayOfMonthOrdinalParse: /\d{1,2}./,
  6642. ordinal: '%d.',
  6643. week: {
  6644. dow: 1,
  6645. // Monday is the first day of the week.
  6646. doy: 4 // The week that contains Jan 4th is the first week of the year.
  6647. }
  6648. };
  6649. /**
  6650. * @fileoverview added by tsickle
  6651. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6652. */
  6653. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  6654. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  6655. // tslint:disable:no-shadowed-variable switch-default prefer-const
  6656. // tslint:disable:one-variable-per-declaration newline-before-return
  6657. //! moment.js locale configuration
  6658. // https://github.com/moment/moment/blob/develop/locale/fi.js
  6659. /** @type {?} */
  6660. var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' ');
  6661. /** @type {?} */
  6662. var numbersFuture = [
  6663. 'nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden',
  6664. numbersPast[7], numbersPast[8], numbersPast[9]
  6665. ];
  6666. /**
  6667. * @param {?} num
  6668. * @param {?} withoutSuffix
  6669. * @param {?} key
  6670. * @param {?} isFuture
  6671. * @return {?}
  6672. */
  6673. function translate$1(num, withoutSuffix, key, isFuture) {
  6674. /** @type {?} */
  6675. var result = '';
  6676. switch (key) {
  6677. case 's':
  6678. return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
  6679. case 'ss':
  6680. return isFuture ? 'sekunnin' : 'sekuntia';
  6681. case 'm':
  6682. return isFuture ? 'minuutin' : 'minuutti';
  6683. case 'mm':
  6684. result = isFuture ? 'minuutin' : 'minuuttia';
  6685. break;
  6686. case 'h':
  6687. return isFuture ? 'tunnin' : 'tunti';
  6688. case 'hh':
  6689. result = isFuture ? 'tunnin' : 'tuntia';
  6690. break;
  6691. case 'd':
  6692. return isFuture ? 'päivän' : 'päivä';
  6693. case 'dd':
  6694. result = isFuture ? 'päivän' : 'päivää';
  6695. break;
  6696. case 'M':
  6697. return isFuture ? 'kuukauden' : 'kuukausi';
  6698. case 'MM':
  6699. result = isFuture ? 'kuukauden' : 'kuukautta';
  6700. break;
  6701. case 'y':
  6702. return isFuture ? 'vuoden' : 'vuosi';
  6703. case 'yy':
  6704. result = isFuture ? 'vuoden' : 'vuotta';
  6705. break;
  6706. }
  6707. result = verbalNumber(num, isFuture) + ' ' + result;
  6708. return result;
  6709. }
  6710. /**
  6711. * @param {?} num
  6712. * @param {?} isFuture
  6713. * @return {?}
  6714. */
  6715. function verbalNumber(num, isFuture) {
  6716. return num < 10 ? (isFuture ? numbersFuture[num] : numbersPast[num]) : num;
  6717. }
  6718. /** @type {?} */
  6719. var fiLocale = {
  6720. abbr: 'fi',
  6721. months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'),
  6722. monthsShort: 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'),
  6723. weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'),
  6724. weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),
  6725. weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),
  6726. longDateFormat: {
  6727. LT: 'HH.mm',
  6728. LTS: 'HH.mm.ss',
  6729. L: 'DD.MM.YYYY',
  6730. LL: 'Do MMMM[ta] YYYY',
  6731. LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',
  6732. LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
  6733. l: 'D.M.YYYY',
  6734. ll: 'Do MMM YYYY',
  6735. lll: 'Do MMM YYYY, [klo] HH.mm',
  6736. llll: 'ddd, Do MMM YYYY, [klo] HH.mm'
  6737. },
  6738. calendar: {
  6739. sameDay: '[tänään] [klo] LT',
  6740. nextDay: '[huomenna] [klo] LT',
  6741. nextWeek: 'dddd [klo] LT',
  6742. lastDay: '[eilen] [klo] LT',
  6743. lastWeek: '[viime] dddd[na] [klo] LT',
  6744. sameElse: 'L'
  6745. },
  6746. relativeTime: {
  6747. future: '%s päästä',
  6748. past: '%s sitten',
  6749. s: translate$1,
  6750. ss: translate$1,
  6751. m: translate$1,
  6752. mm: translate$1,
  6753. h: translate$1,
  6754. hh: translate$1,
  6755. d: translate$1,
  6756. dd: translate$1,
  6757. M: translate$1,
  6758. MM: translate$1,
  6759. y: translate$1,
  6760. yy: translate$1
  6761. },
  6762. dayOfMonthOrdinalParse: /\d{1,2}\./,
  6763. ordinal: '%d.',
  6764. week: {
  6765. dow: 1,
  6766. // Monday is the first day of the week.
  6767. doy: 4 // The week that contains Jan 4th is the first week of the year.
  6768. }
  6769. };
  6770. /**
  6771. * @fileoverview added by tsickle
  6772. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6773. */
  6774. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  6775. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  6776. // tslint:disable:no-shadowed-variable switch-default prefer-const
  6777. // tslint:disable:one-variable-per-declaration newline-before-return
  6778. //! moment.js locale configuration
  6779. //! locale : French [fr]
  6780. //! author : John Fischer : https://github.com/jfroffice
  6781. /** @type {?} */
  6782. var frLocale = {
  6783. abbr: 'fr',
  6784. months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
  6785. monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
  6786. monthsParseExact: true,
  6787. weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
  6788. weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
  6789. weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
  6790. weekdaysParseExact: true,
  6791. longDateFormat: {
  6792. LT: 'HH:mm',
  6793. LTS: 'HH:mm:ss',
  6794. L: 'DD/MM/YYYY',
  6795. LL: 'D MMMM YYYY',
  6796. LLL: 'D MMMM YYYY HH:mm',
  6797. LLLL: 'dddd D MMMM YYYY HH:mm'
  6798. },
  6799. calendar: {
  6800. sameDay: '[Aujourd’hui à] LT',
  6801. nextDay: '[Demain à] LT',
  6802. nextWeek: 'dddd [à] LT',
  6803. lastDay: '[Hier à] LT',
  6804. lastWeek: 'dddd [dernier à] LT',
  6805. sameElse: 'L'
  6806. },
  6807. relativeTime: {
  6808. future: 'dans %s',
  6809. past: 'il y a %s',
  6810. s: 'quelques secondes',
  6811. ss: '%d secondes',
  6812. m: 'une minute',
  6813. mm: '%d minutes',
  6814. h: 'une heure',
  6815. hh: '%d heures',
  6816. d: 'un jour',
  6817. dd: '%d jours',
  6818. M: 'un mois',
  6819. MM: '%d mois',
  6820. y: 'un an',
  6821. yy: '%d ans'
  6822. },
  6823. dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
  6824. ordinal: /**
  6825. * @param {?} _num
  6826. * @param {?} period
  6827. * @return {?}
  6828. */
  6829. function (_num, period) {
  6830. /** @type {?} */
  6831. var num = Number(_num);
  6832. switch (period) {
  6833. // TODO: Return 'e' when day of month > 1. Move this case inside
  6834. // block for masculine words below.
  6835. // See https://github.com/moment/moment/issues/3375
  6836. case 'D':
  6837. return num + (num === 1 ? 'er' : '');
  6838. // Words with masculine grammatical gender: mois, trimestre, jour
  6839. default:
  6840. case 'M':
  6841. case 'Q':
  6842. case 'DDD':
  6843. case 'd':
  6844. return num + (num === 1 ? 'er' : 'e');
  6845. // Words with feminine grammatical gender: semaine
  6846. case 'w':
  6847. case 'W':
  6848. return num + (num === 1 ? 're' : 'e');
  6849. }
  6850. },
  6851. week: {
  6852. dow: 1,
  6853. // Monday is the first day of the week.
  6854. doy: 4 // The week that contains Jan 4th is the first week of the year.
  6855. }
  6856. };
  6857. /**
  6858. * @fileoverview added by tsickle
  6859. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6860. */
  6861. //! moment.js locale configuration
  6862. //! locale : Galician [gl]
  6863. //! author : Darío Beiró : https://github.com/quinobravo
  6864. /** @type {?} */
  6865. var monthsShortDot$4 = 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split('_');
  6866. /** @type {?} */
  6867. var monthsShort$5 = 'xan_feb_mar_abr_mai_xuñ_xul_ago_set_out_nov_dec'.split('_');
  6868. /** @type {?} */
  6869. var monthsParse$3 = [/^xan/i, /^feb/i, /^mar/i, /^abr/i, /^mai/i, /^xuñ/i, /^xul/i, /^ago/i, /^set/i, /^out/i, /^nov/i, /^dec/i];
  6870. /** @type {?} */
  6871. var monthsRegex$3 = /^(xaneiro|febreiro|marzo|abril|maio|xuño|xullo|agosto|setembro|outubro|novembro|decembro|xan\.?|feb\.?|mar\.?|abr\.?|mai\.?|xuñ\.?|xul\.?|ago\.?|set\.?|out\.?|nov\.?|dec\.?)/i;
  6872. /** @type {?} */
  6873. var glLocale = {
  6874. abbr: 'gl',
  6875. months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'),
  6876. monthsShort: /**
  6877. * @param {?} date
  6878. * @param {?} format
  6879. * @param {?=} isUTC
  6880. * @return {?}
  6881. */
  6882. function (date, format, isUTC) {
  6883. if (!date) {
  6884. return monthsShortDot$4;
  6885. }
  6886. if (/-MMM-/.test(format)) {
  6887. return monthsShort$5[getMonth(date, isUTC)];
  6888. }
  6889. return monthsShortDot$4[getMonth(date, isUTC)];
  6890. },
  6891. monthsRegex: monthsRegex$3,
  6892. monthsShortRegex: monthsRegex$3,
  6893. monthsStrictRegex: /^(xaneiro|febreiro|marzo|abril|maio|xuño|xullo|agosto|setembro|outubro|novembro|decembro)/i,
  6894. monthsShortStrictRegex: /^(xan\.?|feb\.?|mar\.?|abr\.?|mai\.?|xuñ\.?|xul\.?|ago\.?|set\.?|out\.?|nov\.?|dec\.?)/i,
  6895. monthsParse: monthsParse$3,
  6896. longMonthsParse: monthsParse$3,
  6897. shortMonthsParse: monthsParse$3,
  6898. weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
  6899. weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
  6900. weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),
  6901. weekdaysParseExact: true,
  6902. longDateFormat: {
  6903. LT: 'H:mm',
  6904. LTS: 'H:mm:ss',
  6905. L: 'DD/MM/YYYY',
  6906. LL: 'D [de] MMMM [de] YYYY',
  6907. LLL: 'D [de] MMMM [de] YYYY H:mm',
  6908. LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'
  6909. },
  6910. calendar: {
  6911. sameDay: /**
  6912. * @param {?} date
  6913. * @return {?}
  6914. */
  6915. function (date) {
  6916. return '[hoxe á' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6917. },
  6918. nextDay: /**
  6919. * @param {?} date
  6920. * @return {?}
  6921. */
  6922. function (date) {
  6923. return '[mañan á' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6924. },
  6925. nextWeek: /**
  6926. * @param {?} date
  6927. * @return {?}
  6928. */
  6929. function (date) {
  6930. return 'dddd [á' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6931. },
  6932. lastDay: /**
  6933. * @param {?} date
  6934. * @return {?}
  6935. */
  6936. function (date) {
  6937. return '[onte á' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6938. },
  6939. lastWeek: /**
  6940. * @param {?} date
  6941. * @return {?}
  6942. */
  6943. function (date) {
  6944. return '[o] dddd [pasado á' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6945. },
  6946. sameElse: 'L'
  6947. },
  6948. relativeTime: {
  6949. future: 'en %s',
  6950. past: 'fai %s',
  6951. s: 'uns segundos',
  6952. ss: '%d segundos',
  6953. m: 'un minuto',
  6954. mm: '%d minutos',
  6955. h: 'unha hora',
  6956. hh: '%d horas',
  6957. d: 'un día',
  6958. dd: '%d días',
  6959. M: 'un mes',
  6960. MM: '%d meses',
  6961. y: 'un ano',
  6962. yy: '%d anos'
  6963. },
  6964. dayOfMonthOrdinalParse: /\d{1,2}º/,
  6965. ordinal: '%dº',
  6966. week: {
  6967. dow: 1,
  6968. // Monday is the first day of the week.
  6969. doy: 4 // The week that contains Jan 4th is the first week of the year.
  6970. }
  6971. };
  6972. /**
  6973. * @fileoverview added by tsickle
  6974. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6975. */
  6976. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  6977. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  6978. // tslint:disable:no-shadowed-variable switch-default prefer-const
  6979. // tslint:disable:one-variable-per-declaration newline-before-return
  6980. //! moment.js locale configuration
  6981. //! locale : Hebrew [he]
  6982. //! author : Tomer Cohen : https://github.com/tomer
  6983. //! author : Moshe Simantov : https://github.com/DevelopmentIL
  6984. //! author : Tal Ater : https://github.com/TalAter
  6985. /** @type {?} */
  6986. var heLocale = {
  6987. abbr: 'he',
  6988. months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'),
  6989. monthsShort: 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),
  6990. weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
  6991. weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
  6992. weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),
  6993. longDateFormat: {
  6994. LT: 'HH:mm',
  6995. LTS: 'HH:mm:ss',
  6996. L: 'DD/MM/YYYY',
  6997. LL: 'D [ב]MMMM YYYY',
  6998. LLL: 'D [ב]MMMM YYYY HH:mm',
  6999. LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',
  7000. l: 'D/M/YYYY',
  7001. ll: 'D MMM YYYY',
  7002. lll: 'D MMM YYYY HH:mm',
  7003. llll: 'ddd, D MMM YYYY HH:mm'
  7004. },
  7005. calendar: {
  7006. sameDay: '[היום ב־]LT',
  7007. nextDay: '[מחר ב־]LT',
  7008. nextWeek: 'dddd [בשעה] LT',
  7009. lastDay: '[אתמול ב־]LT',
  7010. lastWeek: '[ביום] dddd [האחרון בשעה] LT',
  7011. sameElse: 'L'
  7012. },
  7013. relativeTime: {
  7014. future: 'בעוד %s',
  7015. past: 'לפני %s',
  7016. s: 'מספר שניות',
  7017. ss: '%d שניות',
  7018. m: 'דקה',
  7019. mm: '%d דקות',
  7020. h: 'שעה',
  7021. hh: /**
  7022. * @param {?} num
  7023. * @return {?}
  7024. */
  7025. function (num) {
  7026. if (num === 2) {
  7027. return 'שעתיים';
  7028. }
  7029. return num + ' שעות';
  7030. },
  7031. d: 'יום',
  7032. dd: /**
  7033. * @param {?} num
  7034. * @return {?}
  7035. */
  7036. function (num) {
  7037. if (num === 2) {
  7038. return 'יומיים';
  7039. }
  7040. return num + ' ימים';
  7041. },
  7042. M: 'חודש',
  7043. MM: /**
  7044. * @param {?} num
  7045. * @return {?}
  7046. */
  7047. function (num) {
  7048. if (num === 2) {
  7049. return 'חודשיים';
  7050. }
  7051. return num + ' חודשים';
  7052. },
  7053. y: 'שנה',
  7054. yy: /**
  7055. * @param {?} num
  7056. * @return {?}
  7057. */
  7058. function (num) {
  7059. if (num === 2) {
  7060. return 'שנתיים';
  7061. }
  7062. else if (num % 10 === 0 && num !== 10) {
  7063. return num + ' שנה';
  7064. }
  7065. return num + ' שנים';
  7066. }
  7067. },
  7068. meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
  7069. isPM: /**
  7070. * @param {?} input
  7071. * @return {?}
  7072. */
  7073. function (input) {
  7074. return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
  7075. },
  7076. meridiem: /**
  7077. * @param {?} hour
  7078. * @param {?} minute
  7079. * @param {?} isLower
  7080. * @return {?}
  7081. */
  7082. function (hour, minute, isLower) {
  7083. if (hour < 5) {
  7084. return 'לפנות בוקר';
  7085. }
  7086. else if (hour < 10) {
  7087. return 'בבוקר';
  7088. }
  7089. else if (hour < 12) {
  7090. return isLower ? 'לפנה"צ' : 'לפני הצהריים';
  7091. }
  7092. else if (hour < 18) {
  7093. return isLower ? 'אחה"צ' : 'אחרי הצהריים';
  7094. }
  7095. else {
  7096. return 'בערב';
  7097. }
  7098. }
  7099. };
  7100. /**
  7101. * @fileoverview added by tsickle
  7102. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  7103. */
  7104. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  7105. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  7106. // tslint:disable:no-shadowed-variable switch-default prefer-const
  7107. // tslint:disable:one-variable-per-declaration newline-before-return
  7108. // tslint:disable:no-parameter-reassignment prefer-switch
  7109. //! moment.js locale configuration
  7110. //! locale : Hindi [hi]
  7111. //! author : Mayank Singhal : https://github.com/mayanksinghal
  7112. /** @type {?} */
  7113. var symbolMap$1 = {
  7114. 1: '१',
  7115. 2: '२',
  7116. 3: '३',
  7117. 4: '४',
  7118. 5: '५',
  7119. 6: '६',
  7120. 7: '७',
  7121. 8: '८',
  7122. 9: '९',
  7123. 0: '०'
  7124. };
  7125. /** @type {?} */
  7126. var numberMap$1 = {
  7127. '१': '1',
  7128. '२': '2',
  7129. '३': '3',
  7130. '४': '4',
  7131. '५': '5',
  7132. '६': '6',
  7133. '७': '7',
  7134. '८': '8',
  7135. '९': '9',
  7136. '०': '0'
  7137. };
  7138. /** @type {?} */
  7139. var hiLocale = {
  7140. abbr: 'hi',
  7141. months: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'),
  7142. monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
  7143. monthsParseExact: true,
  7144. weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
  7145. weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
  7146. weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
  7147. longDateFormat: {
  7148. LT: 'A h:mm बजे',
  7149. LTS: 'A h:mm:ss बजे',
  7150. L: 'DD/MM/YYYY',
  7151. LL: 'D MMMM YYYY',
  7152. LLL: 'D MMMM YYYY, A h:mm बजे',
  7153. LLLL: 'dddd, D MMMM YYYY, A h:mm बजे'
  7154. },
  7155. calendar: {
  7156. sameDay: '[आज] LT',
  7157. nextDay: '[कल] LT',
  7158. nextWeek: 'dddd, LT',
  7159. lastDay: '[कल] LT',
  7160. lastWeek: '[पिछले] dddd, LT',
  7161. sameElse: 'L'
  7162. },
  7163. relativeTime: {
  7164. future: '%s में',
  7165. past: '%s पहले',
  7166. s: 'कुछ ही क्षण',
  7167. ss: '%d सेकंड',
  7168. m: 'एक मिनट',
  7169. mm: '%d मिनट',
  7170. h: 'एक घंटा',
  7171. hh: '%d घंटे',
  7172. d: 'एक दिन',
  7173. dd: '%d दिन',
  7174. M: 'एक महीने',
  7175. MM: '%d महीने',
  7176. y: 'एक वर्ष',
  7177. yy: '%d वर्ष'
  7178. },
  7179. preparse: /**
  7180. * @param {?} str
  7181. * @return {?}
  7182. */
  7183. function (str) {
  7184. return str.replace(/[१२३४५६७८९०]/g, (/**
  7185. * @param {?} match
  7186. * @return {?}
  7187. */
  7188. function (match) {
  7189. return numberMap$1[match];
  7190. }));
  7191. },
  7192. postformat: /**
  7193. * @param {?} str
  7194. * @return {?}
  7195. */
  7196. function (str) {
  7197. return str.replace(/\d/g, (/**
  7198. * @param {?} match
  7199. * @return {?}
  7200. */
  7201. function (match) {
  7202. return symbolMap$1[match];
  7203. }));
  7204. },
  7205. // Hindi notation for meridiems are quite fuzzy in practice. While there exists
  7206. // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
  7207. meridiemParse: /रात|सुबह|दोपहर|शाम/,
  7208. meridiemHour: /**
  7209. * @param {?} hour
  7210. * @param {?} meridiem
  7211. * @return {?}
  7212. */
  7213. function (hour, meridiem) {
  7214. if (hour === 12) {
  7215. hour = 0;
  7216. }
  7217. if (meridiem === 'रात') {
  7218. return hour < 4 ? hour : hour + 12;
  7219. }
  7220. else if (meridiem === 'सुबह') {
  7221. return hour;
  7222. }
  7223. else if (meridiem === 'दोपहर') {
  7224. return hour >= 10 ? hour : hour + 12;
  7225. }
  7226. else if (meridiem === 'शाम') {
  7227. return hour + 12;
  7228. }
  7229. },
  7230. meridiem: /**
  7231. * @param {?} hour
  7232. * @param {?} minute
  7233. * @param {?} isLower
  7234. * @return {?}
  7235. */
  7236. function (hour, minute, isLower) {
  7237. if (hour < 4) {
  7238. return 'रात';
  7239. }
  7240. else if (hour < 10) {
  7241. return 'सुबह';
  7242. }
  7243. else if (hour < 17) {
  7244. return 'दोपहर';
  7245. }
  7246. else if (hour < 20) {
  7247. return 'शाम';
  7248. }
  7249. else {
  7250. return 'रात';
  7251. }
  7252. },
  7253. week: {
  7254. dow: 0,
  7255. // Sunday is the first day of the week.
  7256. doy: 6 // The week that contains Jan 1st is the first week of the year.
  7257. }
  7258. };
  7259. /**
  7260. * @fileoverview added by tsickle
  7261. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  7262. */
  7263. //! moment.js locale configuration
  7264. //! locale : Hungarian [hu]
  7265. //! author : Adam Brunner : https://github.com/adambrunner
  7266. /** @type {?} */
  7267. var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
  7268. /**
  7269. * @param {?} num
  7270. * @param {?} withoutSuffix
  7271. * @param {?} key
  7272. * @param {?} isFuture
  7273. * @return {?}
  7274. */
  7275. function translate$2(num, withoutSuffix, key, isFuture) {
  7276. switch (key) {
  7277. case 's':
  7278. return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
  7279. case 'ss':
  7280. return num + ((isFuture || withoutSuffix) ? ' másodperc' : ' másodperce');
  7281. case 'm':
  7282. return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
  7283. case 'mm':
  7284. return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
  7285. case 'h':
  7286. return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
  7287. case 'hh':
  7288. return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
  7289. case 'd':
  7290. return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
  7291. case 'dd':
  7292. return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
  7293. case 'M':
  7294. return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
  7295. case 'MM':
  7296. return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
  7297. case 'y':
  7298. return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
  7299. case 'yy':
  7300. return num + (isFuture || withoutSuffix ? ' év' : ' éve');
  7301. }
  7302. return '';
  7303. }
  7304. /**
  7305. * @param {?} date
  7306. * @param {?} isFuture
  7307. * @return {?}
  7308. */
  7309. function week(date, isFuture) {
  7310. return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[getDayOfWeek(date)] + '] LT[-kor]';
  7311. }
  7312. /** @type {?} */
  7313. var huLocale = {
  7314. abbr: 'hu',
  7315. months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'),
  7316. monthsShort: 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'),
  7317. weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
  7318. weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
  7319. weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),
  7320. longDateFormat: {
  7321. LT: 'H:mm',
  7322. LTS: 'H:mm:ss',
  7323. L: 'YYYY.MM.DD.',
  7324. LL: 'YYYY. MMMM D.',
  7325. LLL: 'YYYY. MMMM D. H:mm',
  7326. LLLL: 'YYYY. MMMM D., dddd H:mm'
  7327. },
  7328. meridiemParse: /de|du/i,
  7329. isPM: /**
  7330. * @param {?} input
  7331. * @return {?}
  7332. */
  7333. function (input) {
  7334. return input.charAt(1).toLowerCase() === 'u';
  7335. },
  7336. meridiem: /**
  7337. * @param {?} hours
  7338. * @param {?} minutes
  7339. * @param {?} isLower
  7340. * @return {?}
  7341. */
  7342. function (hours, minutes, isLower) {
  7343. if (hours < 12) {
  7344. return isLower === true ? 'de' : 'DE';
  7345. }
  7346. else {
  7347. return isLower === true ? 'du' : 'DU';
  7348. }
  7349. },
  7350. calendar: {
  7351. sameDay: '[ma] LT[-kor]',
  7352. nextDay: '[holnap] LT[-kor]',
  7353. nextWeek: /**
  7354. * @param {?} date
  7355. * @return {?}
  7356. */
  7357. function (date) {
  7358. return week(date, true);
  7359. },
  7360. lastDay: '[tegnap] LT[-kor]',
  7361. lastWeek: /**
  7362. * @param {?} date
  7363. * @return {?}
  7364. */
  7365. function (date) {
  7366. return week(date, false);
  7367. },
  7368. sameElse: 'L'
  7369. },
  7370. relativeTime: {
  7371. future: '%s múlva',
  7372. past: '%s',
  7373. s: translate$2,
  7374. ss: translate$2,
  7375. m: translate$2,
  7376. mm: translate$2,
  7377. h: translate$2,
  7378. hh: translate$2,
  7379. d: translate$2,
  7380. dd: translate$2,
  7381. M: translate$2,
  7382. MM: translate$2,
  7383. y: translate$2,
  7384. yy: translate$2
  7385. },
  7386. dayOfMonthOrdinalParse: /\d{1,2}\./,
  7387. ordinal: '%d.',
  7388. week: {
  7389. dow: 1,
  7390. // Monday is the first day of the week.
  7391. doy: 4 // The week that contains Jan 4th is the first week of the year.
  7392. }
  7393. };
  7394. /**
  7395. * @fileoverview added by tsickle
  7396. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  7397. */
  7398. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  7399. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  7400. // tslint:disable:no-shadowed-variable switch-default prefer-const
  7401. // tslint:disable:one-variable-per-declaration newline-before-return
  7402. //! moment.js locale configuration
  7403. //! locale : Croatian [hr]
  7404. //! author : Danijel Grmec : https://github.com/cobaltsis
  7405. /** @type {?} */
  7406. var hrLocale = {
  7407. abbr: 'hr',
  7408. months: 'Siječanj_Veljača_Ožujak_Travanj_Svibanj_Lipanj_Srpanj_Kolovoz_Rujan_Listopad_Studeni_Prosinac'.split('_'),
  7409. monthsShort: 'Sij_Velj_Ožu_Tra_Svi_Lip_Srp_Kol_Ruj_Lis_Stu_Pro'.split('_'),
  7410. weekdays: 'Nedjelja_Ponedjeljak_Utorak_Srijeda_Četvrtak_Petak_Subota'.split('_'),
  7411. weekdaysShort: 'Ned_Pon_Uto_Sri_Čet_Pet_Sub'.split('_'),
  7412. weekdaysMin: 'Ne_Po_Ut_Sr_Če_Pe_Su'.split('_'),
  7413. longDateFormat: {
  7414. LT: 'HH:mm',
  7415. LTS: 'HH:mm:ss',
  7416. L: 'DD/MM/YYYY',
  7417. LL: 'D MMMM YYYY',
  7418. LLL: 'D MMMM YYYY HH:mm',
  7419. LLLL: 'dddd, D MMMM YYYY HH:mm'
  7420. },
  7421. calendar: {
  7422. sameDay: '[Danas u] LT',
  7423. nextDay: '[Sutra u] LT',
  7424. nextWeek: 'dddd [u] LT',
  7425. lastDay: '[Jučer u] LT',
  7426. lastWeek: '[Zadnji] dddd [u] LT',
  7427. sameElse: 'L'
  7428. },
  7429. invalidDate: 'Neispravan datum',
  7430. relativeTime: {
  7431. future: 'za %s',
  7432. past: '%s prije',
  7433. s: 'nekoliko sekundi',
  7434. ss: '%d sekundi',
  7435. m: 'minuta',
  7436. mm: '%d minuta',
  7437. h: 'sat',
  7438. hh: '%d sati',
  7439. d: 'dan',
  7440. dd: '%d dana',
  7441. M: 'mjesec',
  7442. MM: '%d mjeseci',
  7443. y: 'godina',
  7444. yy: '%d godina'
  7445. },
  7446. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  7447. ordinal: /**
  7448. * @param {?} _num
  7449. * @return {?}
  7450. */
  7451. function (_num) {
  7452. /** @type {?} */
  7453. var num = Number(_num);
  7454. /** @type {?} */
  7455. var b = num % 10;
  7456. /** @type {?} */
  7457. var output = (~~(num % 100 / 10) === 1) ? '.' :
  7458. (b === 1) ? '.' :
  7459. (b === 2) ? '.' :
  7460. (b === 3) ? '.' : '.';
  7461. return num + output;
  7462. },
  7463. week: {
  7464. dow: 1,
  7465. // Monday is the first day of the week.
  7466. doy: 4 // The week that contains Jan 4th is the first week of the year.
  7467. }
  7468. };
  7469. /**
  7470. * @fileoverview added by tsickle
  7471. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  7472. */
  7473. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  7474. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  7475. // tslint:disable:no-shadowed-variable switch-default prefer-const
  7476. // tslint:disable:one-variable-per-declaration newline-before-return
  7477. // tslint:disable:no-parameter-reassignment prefer-switch
  7478. //! moment.js locale configuration
  7479. //! locale : Indonesia [id]
  7480. //! author : Romy Kusuma : https://github.com/rkusuma
  7481. //! reference: https://github.com/moment/moment/blob/develop/locale/id.js
  7482. /** @type {?} */
  7483. var idLocale = {
  7484. abbr: 'id',
  7485. months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'),
  7486. monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des'.split('_'),
  7487. weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
  7488. weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
  7489. weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
  7490. longDateFormat: {
  7491. LT: 'HH.mm',
  7492. LTS: 'HH.mm.ss',
  7493. L: 'DD/MM/YYYY',
  7494. LL: 'D MMMM YYYY',
  7495. LLL: 'D MMMM YYYY [pukul] HH.mm',
  7496. LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'
  7497. },
  7498. meridiemParse: /pagi|siang|sore|malam/,
  7499. meridiemHour: /**
  7500. * @param {?} hour
  7501. * @param {?} meridiem
  7502. * @return {?}
  7503. */
  7504. function (hour, meridiem) {
  7505. if (hour === 12) {
  7506. hour = 0;
  7507. }
  7508. if (meridiem === 'pagi') {
  7509. return hour;
  7510. }
  7511. else if (meridiem === 'siang') {
  7512. return hour >= 11 ? hour : hour + 12;
  7513. }
  7514. else if (meridiem === 'sore' || meridiem === 'malam') {
  7515. return hour + 12;
  7516. }
  7517. },
  7518. meridiem: /**
  7519. * @param {?} hours
  7520. * @param {?} minutes
  7521. * @param {?} isLower
  7522. * @return {?}
  7523. */
  7524. function (hours, minutes, isLower) {
  7525. if (hours < 11) {
  7526. return 'pagi';
  7527. }
  7528. else if (hours < 15) {
  7529. return 'siang';
  7530. }
  7531. else if (hours < 19) {
  7532. return 'sore';
  7533. }
  7534. else {
  7535. return 'malam';
  7536. }
  7537. },
  7538. calendar: {
  7539. sameDay: '[Hari ini pukul] LT',
  7540. nextDay: '[Besok pukul] LT',
  7541. nextWeek: 'dddd [pukul] LT',
  7542. lastDay: '[Kemarin pukul] LT',
  7543. lastWeek: 'dddd [lalu pukul] LT',
  7544. sameElse: 'L'
  7545. },
  7546. relativeTime: {
  7547. future: 'dalam %s',
  7548. past: '%s yang lalu',
  7549. s: 'beberapa detik',
  7550. ss: '%d detik',
  7551. m: 'semenit',
  7552. mm: '%d menit',
  7553. h: 'sejam',
  7554. hh: '%d jam',
  7555. d: 'sehari',
  7556. dd: '%d hari',
  7557. M: 'sebulan',
  7558. MM: '%d bulan',
  7559. y: 'setahun',
  7560. yy: '%d tahun'
  7561. },
  7562. week: {
  7563. dow: 1,
  7564. // Monday is the first day of the week.
  7565. doy: 7 // The week that contains Jan 1st is the first week of the year.
  7566. }
  7567. };
  7568. /**
  7569. * @fileoverview added by tsickle
  7570. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  7571. */
  7572. //! moment.js locale configuration
  7573. //! locale : Italian [it]
  7574. //! author : Lorenzo : https://github.com/aliem
  7575. //! author: Mattia Larentis: https://github.com/nostalgiaz
  7576. /** @type {?} */
  7577. var itLocale = {
  7578. abbr: 'it',
  7579. months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),
  7580. monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
  7581. weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'),
  7582. weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
  7583. weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
  7584. longDateFormat: {
  7585. LT: 'HH:mm',
  7586. LTS: 'HH:mm:ss',
  7587. L: 'DD/MM/YYYY',
  7588. LL: 'D MMMM YYYY',
  7589. LLL: 'D MMMM YYYY HH:mm',
  7590. LLLL: 'dddd D MMMM YYYY HH:mm'
  7591. },
  7592. calendar: {
  7593. sameDay: '[Oggi alle] LT',
  7594. nextDay: '[Domani alle] LT',
  7595. nextWeek: 'dddd [alle] LT',
  7596. lastDay: '[Ieri alle] LT',
  7597. lastWeek: /**
  7598. * @param {?} date
  7599. * @return {?}
  7600. */
  7601. function (date) {
  7602. switch (getDayOfWeek(date)) {
  7603. case 0:
  7604. return '[la scorsa] dddd [alle] LT';
  7605. default:
  7606. return '[lo scorso] dddd [alle] LT';
  7607. }
  7608. },
  7609. sameElse: 'L'
  7610. },
  7611. relativeTime: {
  7612. future: /**
  7613. * @param {?} num
  7614. * @return {?}
  7615. */
  7616. function (num) {
  7617. return ((/^[0-9].+$/).test(num.toString(10)) ? 'tra' : 'in') + ' ' + num;
  7618. },
  7619. past: '%s fa',
  7620. s: 'alcuni secondi',
  7621. ss: '%d secondi',
  7622. m: 'un minuto',
  7623. mm: '%d minuti',
  7624. h: 'un\'ora',
  7625. hh: '%d ore',
  7626. d: 'un giorno',
  7627. dd: '%d giorni',
  7628. M: 'un mese',
  7629. MM: '%d mesi',
  7630. y: 'un anno',
  7631. yy: '%d anni'
  7632. },
  7633. dayOfMonthOrdinalParse: /\d{1,2}º/,
  7634. ordinal: '%dº',
  7635. week: {
  7636. dow: 1,
  7637. // Monday is the first day of the week.
  7638. doy: 4 // The week that contains Jan 4th is the first week of the year.
  7639. }
  7640. };
  7641. /**
  7642. * @fileoverview added by tsickle
  7643. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  7644. */
  7645. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  7646. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  7647. // tslint:disable:no-shadowed-variable switch-default prefer-const
  7648. // tslint:disable:one-variable-per-declaration newline-before-return
  7649. //! moment.js locale configuration
  7650. //! locale : Japanese [ja]
  7651. //! author : LI Long : https://github.com/baryon
  7652. /** @type {?} */
  7653. var jaLocale = {
  7654. abbr: 'ja',
  7655. months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  7656. monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  7657. weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
  7658. weekdaysShort: '日_月_火_水_木_金_土'.split('_'),
  7659. weekdaysMin: '日_月_火_水_木_金_土'.split('_'),
  7660. longDateFormat: {
  7661. LT: 'HH:mm',
  7662. LTS: 'HH:mm:ss',
  7663. L: 'YYYY/MM/DD',
  7664. LL: 'YYYY年M月D日',
  7665. LLL: 'YYYY年M月D日 HH:mm',
  7666. LLLL: 'YYYY年M月D日 HH:mm dddd',
  7667. l: 'YYYY/MM/DD',
  7668. ll: 'YYYY年M月D日',
  7669. lll: 'YYYY年M月D日 HH:mm',
  7670. llll: 'YYYY年M月D日 HH:mm dddd'
  7671. },
  7672. meridiemParse: /午前|午後/i,
  7673. isPM: /**
  7674. * @param {?} input
  7675. * @return {?}
  7676. */
  7677. function (input) {
  7678. return input === '午後';
  7679. },
  7680. meridiem: /**
  7681. * @param {?} hour
  7682. * @param {?} minute
  7683. * @param {?} isLower
  7684. * @return {?}
  7685. */
  7686. function (hour, minute, isLower) {
  7687. if (hour < 12) {
  7688. return '午前';
  7689. }
  7690. else {
  7691. return '午後';
  7692. }
  7693. },
  7694. calendar: {
  7695. sameDay: '[今日] LT',
  7696. nextDay: '[明日] LT',
  7697. nextWeek: '[来週]dddd LT',
  7698. lastDay: '[昨日] LT',
  7699. lastWeek: '[前週]dddd LT',
  7700. sameElse: 'L'
  7701. },
  7702. dayOfMonthOrdinalParse: /\d{1,2}日/,
  7703. ordinal: /**
  7704. * @param {?} num
  7705. * @param {?} period
  7706. * @return {?}
  7707. */
  7708. function (num, period) {
  7709. switch (period) {
  7710. case 'd':
  7711. case 'D':
  7712. case 'DDD':
  7713. return num + '日';
  7714. default:
  7715. return num.toString(10);
  7716. }
  7717. },
  7718. relativeTime: {
  7719. future: '%s後',
  7720. past: '%s前',
  7721. s: '数秒',
  7722. ss: '%d秒',
  7723. m: '1分',
  7724. mm: '%d分',
  7725. h: '1時間',
  7726. hh: '%d時間',
  7727. d: '1日',
  7728. dd: '%d日',
  7729. M: '1ヶ月',
  7730. MM: '%dヶ月',
  7731. y: '1年',
  7732. yy: '%d年'
  7733. }
  7734. };
  7735. /**
  7736. * @fileoverview added by tsickle
  7737. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  7738. */
  7739. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  7740. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  7741. // tslint:disable:no-shadowed-variable switch-default prefer-const
  7742. // tslint:disable:one-variable-per-declaration newline-before-return
  7743. // tslint:disable:object-literal-shorthand
  7744. //! moment.js locale configuration
  7745. //! locale : Korean [ko]
  7746. //! author : Kyungwook, Park : https://github.com/kyungw00k
  7747. //! author : Jeeeyul Lee <jeeeyul@gmail.com>
  7748. /** @type {?} */
  7749. var koLocale = {
  7750. abbr: 'ko',
  7751. months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
  7752. monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
  7753. weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
  7754. weekdaysShort: '일_월_화_수_목_금_토'.split('_'),
  7755. weekdaysMin: '일_월_화_수_목_금_토'.split('_'),
  7756. longDateFormat: {
  7757. LT: 'A h:mm',
  7758. LTS: 'A h:mm:ss',
  7759. L: 'YYYY.MM.DD',
  7760. LL: 'YYYY년 MMMM D일',
  7761. LLL: 'YYYY년 MMMM D일 A h:mm',
  7762. LLLL: 'YYYY년 MMMM D일 dddd A h:mm',
  7763. l: 'YYYY.MM.DD',
  7764. ll: 'YYYY년 MMMM D일',
  7765. lll: 'YYYY년 MMMM D일 A h:mm',
  7766. llll: 'YYYY년 MMMM D일 dddd A h:mm'
  7767. },
  7768. calendar: {
  7769. sameDay: '오늘 LT',
  7770. nextDay: '내일 LT',
  7771. nextWeek: 'dddd LT',
  7772. lastDay: '어제 LT',
  7773. lastWeek: '지난주 dddd LT',
  7774. sameElse: 'L'
  7775. },
  7776. relativeTime: {
  7777. future: '%s 후',
  7778. past: '%s 전',
  7779. s: '몇 초',
  7780. ss: '%d초',
  7781. m: '1분',
  7782. mm: '%d분',
  7783. h: '한 시간',
  7784. hh: '%d시간',
  7785. d: '하루',
  7786. dd: '%d일',
  7787. M: '한 달',
  7788. MM: '%d달',
  7789. y: '일 년',
  7790. yy: '%d년'
  7791. },
  7792. dayOfMonthOrdinalParse: /\d{1,2}(일|월|주)/,
  7793. ordinal: (/**
  7794. * @param {?} num
  7795. * @param {?} period
  7796. * @return {?}
  7797. */
  7798. function (num, period) {
  7799. switch (period) {
  7800. case 'd':
  7801. case 'D':
  7802. case 'DDD':
  7803. return num + '일';
  7804. case 'M':
  7805. return num + '월';
  7806. case 'w':
  7807. case 'W':
  7808. return num + '주';
  7809. default:
  7810. return num.toString(10);
  7811. }
  7812. }),
  7813. meridiemParse: /오전|오후/,
  7814. isPM: (/**
  7815. * @param {?} token
  7816. * @return {?}
  7817. */
  7818. function (token) {
  7819. return token === '오후';
  7820. }),
  7821. meridiem: (/**
  7822. * @param {?} hour
  7823. * @param {?} minute
  7824. * @param {?} isUpper
  7825. * @return {?}
  7826. */
  7827. function (hour, minute, isUpper) {
  7828. return hour < 12 ? '오전' : '오후';
  7829. })
  7830. };
  7831. /**
  7832. * @fileoverview added by tsickle
  7833. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  7834. */
  7835. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  7836. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  7837. // tslint:disable:no-shadowed-variable switch-default prefer-const
  7838. // tslint:disable:one-variable-per-declaration newline-before-return
  7839. //! moment.js locale configuration
  7840. //! locale : Lithuanian [lt]
  7841. //! author : Stanislavas Guk : https://github.com/ixoster
  7842. /** @type {?} */
  7843. var units = {
  7844. ss: 'sekundė_sekundžių_sekundes',
  7845. m: 'minutė_minutės_minutę',
  7846. mm: 'minutės_minučių_minutes',
  7847. h: 'valanda_valandos_valandą',
  7848. hh: 'valandos_valandų_valandas',
  7849. d: 'diena_dienos_dieną',
  7850. dd: 'dienos_dienų_dienas',
  7851. M: 'mėnuo_mėnesio_mėnesį',
  7852. MM: 'mėnesiai_mėnesių_mėnesius',
  7853. y: 'metai_metų_metus',
  7854. yy: 'metai_metų_metus'
  7855. };
  7856. /**
  7857. * @param {?} num
  7858. * @param {?} withoutSuffix
  7859. * @param {?} key
  7860. * @param {?} isFuture
  7861. * @return {?}
  7862. */
  7863. function translateSeconds(num, withoutSuffix, key, isFuture) {
  7864. if (withoutSuffix) {
  7865. return 'kelios sekundės';
  7866. }
  7867. else {
  7868. return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
  7869. }
  7870. }
  7871. /**
  7872. * @param {?} num
  7873. * @param {?} withoutSuffix
  7874. * @param {?} key
  7875. * @param {?} isFuture
  7876. * @return {?}
  7877. */
  7878. function translateSingular(num, withoutSuffix, key, isFuture) {
  7879. return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]);
  7880. }
  7881. /**
  7882. * @param {?} num
  7883. * @return {?}
  7884. */
  7885. function special(num) {
  7886. return num % 10 === 0 || (num > 10 && num < 20);
  7887. }
  7888. /**
  7889. * @param {?} key
  7890. * @return {?}
  7891. */
  7892. function forms(key) {
  7893. return ((/** @type {?} */ (units)))[key].split('_');
  7894. }
  7895. /**
  7896. * @param {?} num
  7897. * @param {?} withoutSuffix
  7898. * @param {?} key
  7899. * @param {?} isFuture
  7900. * @return {?}
  7901. */
  7902. function translate$3(num, withoutSuffix, key, isFuture) {
  7903. /** @type {?} */
  7904. var result = num + ' ';
  7905. if (num === 1) {
  7906. return result + translateSingular(num, withoutSuffix, key[0], isFuture);
  7907. }
  7908. else if (withoutSuffix) {
  7909. return result + (special(num) ? forms(key)[1] : forms(key)[0]);
  7910. }
  7911. else {
  7912. if (isFuture) {
  7913. return result + forms(key)[1];
  7914. }
  7915. else {
  7916. return result + (special(num) ? forms(key)[1] : forms(key)[2]);
  7917. }
  7918. }
  7919. }
  7920. /** @type {?} */
  7921. var ltLocale = {
  7922. abbr: 'lt',
  7923. months: {
  7924. format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'),
  7925. standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'),
  7926. isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/
  7927. },
  7928. monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
  7929. weekdays: {
  7930. format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'),
  7931. standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'),
  7932. isFormat: /dddd HH:mm/
  7933. },
  7934. weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
  7935. weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),
  7936. weekdaysParseExact: true,
  7937. longDateFormat: {
  7938. LT: 'HH:mm',
  7939. LTS: 'HH:mm:ss',
  7940. L: 'YYYY-MM-DD',
  7941. LL: 'YYYY [m.] MMMM D [d.]',
  7942. LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
  7943. LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
  7944. l: 'YYYY-MM-DD',
  7945. ll: 'YYYY [m.] MMMM D [d.]',
  7946. lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
  7947. llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]'
  7948. },
  7949. calendar: {
  7950. sameDay: '[Šiandien] LT',
  7951. nextDay: '[Rytoj] LT',
  7952. nextWeek: 'dddd LT',
  7953. lastDay: '[Vakar] LT',
  7954. lastWeek: '[Praėjusį] dddd LT',
  7955. sameElse: 'L'
  7956. },
  7957. relativeTime: {
  7958. future: 'po %s',
  7959. past: 'prieš %s',
  7960. s: translateSeconds,
  7961. ss: translate$3,
  7962. m: translateSingular,
  7963. mm: translate$3,
  7964. h: translateSingular,
  7965. hh: translate$3,
  7966. d: translateSingular,
  7967. dd: translate$3,
  7968. M: translateSingular,
  7969. MM: translate$3,
  7970. y: translateSingular,
  7971. yy: translate$3
  7972. },
  7973. dayOfMonthOrdinalParse: /\d{1,2}-oji/,
  7974. ordinal: /**
  7975. * @param {?} num
  7976. * @return {?}
  7977. */
  7978. function (num) {
  7979. return num + '-oji';
  7980. },
  7981. week: {
  7982. dow: 1,
  7983. // Monday is the first day of the week.
  7984. doy: 4 // The week that contains Jan 4th is the first week of the year.
  7985. }
  7986. };
  7987. /**
  7988. * @fileoverview added by tsickle
  7989. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  7990. */
  7991. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  7992. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  7993. // tslint:disable:no-shadowed-variable switch-default prefer-const
  7994. // tslint:disable:one-variable-per-declaration newline-before-return
  7995. //! moment.js locale configuration
  7996. //! locale : Latvian [lv]
  7997. //! author : Matiss Janis Aboltins : https://github.com/matissjanis
  7998. /** @type {?} */
  7999. var lvLocale = {
  8000. abbr: 'lv',
  8001. months: 'Janvāris_Februāris_Marts_Aprīlis_Maijs_Jūnijs_Jūlijs_Augusts_Septembris_Oktobris_Novembris_Decembris'.split('_'),
  8002. monthsShort: 'Jan_Feb_Mar_Apr_Mai_Jūn_Jūl_Aug_Sep_Okt_Nov_Dec'.split('_'),
  8003. weekdays: 'Svētdiena_Pirmdiena_Otrdiena_Trešdiena_Ceturtdiena_Piektdiena_Sestdiena'.split('_'),
  8004. weekdaysShort: 'Svētd_Pirmd_Otrd_Trešd_Ceturtd_Piektd_Sestd'.split('_'),
  8005. weekdaysMin: 'Sv_Pi_Ot_Tr_Ce_Pk_Se'.split('_'),
  8006. longDateFormat: {
  8007. LT: 'HH:mm',
  8008. LTS: 'HH:mm:ss',
  8009. L: 'DD/MM/YYYY',
  8010. LL: 'D MMMM YYYY',
  8011. LLL: 'D MMMM YYYY HH:mm',
  8012. LLLL: 'dddd, D MMMM YYYY HH:mm'
  8013. },
  8014. calendar: {
  8015. sameDay: '[Today at] LT',
  8016. nextDay: '[Tomorrow at] LT',
  8017. nextWeek: 'dddd [at] LT',
  8018. lastDay: '[Yesterday at] LT',
  8019. lastWeek: '[Last] dddd [at] LT',
  8020. sameElse: 'L'
  8021. },
  8022. relativeTime: {
  8023. future: 'pēc %s',
  8024. past: 'pirms %s',
  8025. s: 'dažām sekundēm',
  8026. ss: '%d sekundēm',
  8027. m: 'minūtes',
  8028. mm: '%d minūtēm',
  8029. h: 'stundas',
  8030. hh: '%d stundām',
  8031. d: 'dienas',
  8032. dd: '%d dienām',
  8033. M: 'mēneša',
  8034. MM: '%d mēnešiem',
  8035. y: 'gada',
  8036. yy: '%d gadiem'
  8037. },
  8038. dayOfMonthOrdinalParse: /\d{1,2}\./,
  8039. ordinal: /**
  8040. * @param {?} num
  8041. * @return {?}
  8042. */
  8043. function (num) {
  8044. return num + '.';
  8045. },
  8046. week: {
  8047. dow: 1,
  8048. // Monday is the first day of the week.
  8049. doy: 4 // The week that contains Jan 4th is the first week of the year.
  8050. }
  8051. };
  8052. /**
  8053. * @fileoverview added by tsickle
  8054. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  8055. */
  8056. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  8057. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  8058. // tslint:disable:no-shadowed-variable switch-default prefer-const
  8059. // tslint:disable:one-variable-per-declaration newline-before-return
  8060. // tslint:disable:object-literal-shorthand
  8061. //! moment.js locale configuration
  8062. //! locale : Mongolian [mn]
  8063. //! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7
  8064. /**
  8065. * @param {?} num
  8066. * @param {?} withoutSuffix
  8067. * @param {?} key
  8068. * @param {?} isFuture
  8069. * @return {?}
  8070. */
  8071. function translate$4(num, withoutSuffix, key, isFuture) {
  8072. switch (key) {
  8073. case 's':
  8074. return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';
  8075. case 'ss':
  8076. return num + (withoutSuffix ? ' секунд' : ' секундын');
  8077. case 'm':
  8078. case 'mm':
  8079. return num + (withoutSuffix ? ' минут' : ' минутын');
  8080. case 'h':
  8081. case 'hh':
  8082. return num + (withoutSuffix ? ' цаг' : ' цагийн');
  8083. case 'd':
  8084. case 'dd':
  8085. return num + (withoutSuffix ? ' өдөр' : ' өдрийн');
  8086. case 'M':
  8087. case 'MM':
  8088. return num + (withoutSuffix ? ' сар' : ' сарын');
  8089. case 'y':
  8090. case 'yy':
  8091. return num + (withoutSuffix ? ' жил' : ' жилийн');
  8092. default:
  8093. return num.toString(10);
  8094. }
  8095. }
  8096. /** @type {?} */
  8097. var mnLocale = {
  8098. abbr: 'mn',
  8099. months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split('_'),
  8100. monthsShort: '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split('_'),
  8101. monthsParseExact: true,
  8102. weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),
  8103. weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),
  8104. weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),
  8105. weekdaysParseExact: true,
  8106. longDateFormat: {
  8107. LT: 'HH:mm',
  8108. LTS: 'HH:mm:ss',
  8109. L: 'YYYY-MM-DD',
  8110. LL: 'YYYY оны MMMMын D',
  8111. LLL: 'YYYY оны MMMMын D HH:mm',
  8112. LLLL: 'dddd, YYYY оны MMMMын D HH:mm'
  8113. },
  8114. meridiemParse: /ҮӨ|ҮХ/i,
  8115. isPM: (/**
  8116. * @param {?} input
  8117. * @return {?}
  8118. */
  8119. function (input) {
  8120. return input === 'ҮХ';
  8121. }),
  8122. meridiem: (/**
  8123. * @param {?} hour
  8124. * @param {?} minute
  8125. * @param {?} isLower
  8126. * @return {?}
  8127. */
  8128. function (hour, minute, isLower) {
  8129. if (hour < 12) {
  8130. return 'ҮӨ';
  8131. }
  8132. else {
  8133. return 'ҮХ';
  8134. }
  8135. }),
  8136. calendar: {
  8137. sameDay: '[Өнөөдөр] LT',
  8138. nextDay: '[Маргааш] LT',
  8139. nextWeek: '[Ирэх] dddd LT',
  8140. lastDay: '[Өчигдөр] LT',
  8141. lastWeek: '[Өнгөрсөн] dddd LT',
  8142. sameElse: 'L'
  8143. },
  8144. relativeTime: {
  8145. future: '%s дараа',
  8146. past: '%s өмнө',
  8147. s: translate$4,
  8148. ss: translate$4,
  8149. m: translate$4,
  8150. mm: translate$4,
  8151. h: translate$4,
  8152. hh: translate$4,
  8153. d: translate$4,
  8154. dd: translate$4,
  8155. M: translate$4,
  8156. MM: translate$4,
  8157. y: translate$4,
  8158. yy: translate$4
  8159. },
  8160. dayOfMonthOrdinalParse: /\d{1,2} өдөр/,
  8161. ordinal: (/**
  8162. * @param {?} num
  8163. * @param {?} period
  8164. * @return {?}
  8165. */
  8166. function (num, period) {
  8167. switch (period) {
  8168. case 'd':
  8169. case 'D':
  8170. case 'DDD':
  8171. return num + ' өдөр';
  8172. default:
  8173. return num.toString(10);
  8174. }
  8175. })
  8176. };
  8177. /**
  8178. * @fileoverview added by tsickle
  8179. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  8180. */
  8181. //! moment.js locale configuration
  8182. //! locale : Norwegian Bokmål [nb]
  8183. //! authors : Espen Hovlandsdal : https://github.com/rexxars
  8184. //! Sigurd Gartmann : https://github.com/sigurdga
  8185. /** @type {?} */
  8186. var nbLocale = {
  8187. abbr: 'nb',
  8188. months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
  8189. monthsShort: 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
  8190. monthsParseExact: true,
  8191. weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
  8192. weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
  8193. weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
  8194. weekdaysParseExact: true,
  8195. longDateFormat: {
  8196. LT: 'HH:mm',
  8197. LTS: 'HH:mm:ss',
  8198. L: 'DD.MM.YYYY',
  8199. LL: 'D. MMMM YYYY',
  8200. LLL: 'D. MMMM YYYY [kl.] HH:mm',
  8201. LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm'
  8202. },
  8203. calendar: {
  8204. sameDay: '[i dag kl.] LT',
  8205. nextDay: '[i morgen kl.] LT',
  8206. nextWeek: 'dddd [kl.] LT',
  8207. lastDay: '[i går kl.] LT',
  8208. lastWeek: '[forrige] dddd [kl.] LT',
  8209. sameElse: 'L'
  8210. },
  8211. relativeTime: {
  8212. future: 'om %s',
  8213. past: '%s siden',
  8214. s: 'noen sekunder',
  8215. ss: '%d sekunder',
  8216. m: 'ett minutt',
  8217. mm: '%d minutter',
  8218. h: 'en time',
  8219. hh: '%d timer',
  8220. d: 'en dag',
  8221. dd: '%d dager',
  8222. M: 'en måned',
  8223. MM: '%d måneder',
  8224. y: 'ett år',
  8225. yy: '%d år'
  8226. },
  8227. dayOfMonthOrdinalParse: /\d{1,2}\./,
  8228. ordinal: '%d.',
  8229. week: {
  8230. dow: 1,
  8231. // Monday is the first day of the week.
  8232. doy: 4 // The week that contains Jan 4th is the first week of the year.
  8233. }
  8234. };
  8235. /**
  8236. * @fileoverview added by tsickle
  8237. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  8238. */
  8239. //! moment.js locale configuration
  8240. //! locale : Dutch (Belgium) [nl-be]
  8241. //! author : Joris Röling : https://github.com/jorisroling
  8242. //! author : Jacob Middag : https://github.com/middagj
  8243. /** @type {?} */
  8244. var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');
  8245. /** @type {?} */
  8246. var monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');
  8247. /** @type {?} */
  8248. var monthsParse$4 = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];
  8249. /** @type {?} */
  8250. var monthsRegex$4 = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
  8251. /** @type {?} */
  8252. var nlBeLocale = {
  8253. abbr: 'nl-be',
  8254. months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
  8255. monthsShort: /**
  8256. * @param {?} date
  8257. * @param {?} format
  8258. * @param {?=} isUTC
  8259. * @return {?}
  8260. */
  8261. function (date, format, isUTC) {
  8262. if (!date) {
  8263. return monthsShortWithDots;
  8264. }
  8265. else if (/-MMM-/.test(format)) {
  8266. return monthsShortWithoutDots[getMonth(date, isUTC)];
  8267. }
  8268. else {
  8269. return monthsShortWithDots[getMonth(date, isUTC)];
  8270. }
  8271. },
  8272. monthsRegex: monthsRegex$4,
  8273. monthsShortRegex: monthsRegex$4,
  8274. monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,
  8275. monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
  8276. monthsParse: monthsParse$4,
  8277. longMonthsParse: monthsParse$4,
  8278. shortMonthsParse: monthsParse$4,
  8279. weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
  8280. weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
  8281. weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
  8282. weekdaysParseExact: true,
  8283. longDateFormat: {
  8284. LT: 'HH:mm',
  8285. LTS: 'HH:mm:ss',
  8286. L: 'DD/MM/YYYY',
  8287. LL: 'D MMMM YYYY',
  8288. LLL: 'D MMMM YYYY HH:mm',
  8289. LLLL: 'dddd D MMMM YYYY HH:mm'
  8290. },
  8291. calendar: {
  8292. sameDay: '[vandaag om] LT',
  8293. nextDay: '[morgen om] LT',
  8294. nextWeek: 'dddd [om] LT',
  8295. lastDay: '[gisteren om] LT',
  8296. lastWeek: '[afgelopen] dddd [om] LT',
  8297. sameElse: 'L'
  8298. },
  8299. relativeTime: {
  8300. future: 'over %s',
  8301. past: '%s geleden',
  8302. s: 'een paar seconden',
  8303. ss: '%d seconden',
  8304. m: 'één minuut',
  8305. mm: '%d minuten',
  8306. h: 'één uur',
  8307. hh: '%d uur',
  8308. d: 'één dag',
  8309. dd: '%d dagen',
  8310. M: 'één maand',
  8311. MM: '%d maanden',
  8312. y: 'één jaar',
  8313. yy: '%d jaar'
  8314. },
  8315. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  8316. ordinal: /**
  8317. * @param {?} _num
  8318. * @return {?}
  8319. */
  8320. function (_num) {
  8321. /** @type {?} */
  8322. var num = Number(_num);
  8323. return num + ((num === 1 || num === 8 || num >= 20) ? 'ste' : 'de');
  8324. },
  8325. week: {
  8326. dow: 1,
  8327. // Monday is the first day of the week.
  8328. doy: 4 // The week that contains Jan 4th is the first week of the year.
  8329. }
  8330. };
  8331. /**
  8332. * @fileoverview added by tsickle
  8333. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  8334. */
  8335. //! moment.js locale configuration
  8336. //! locale : Dutch [nl]
  8337. //! author : Joris Röling : https://github.com/jorisroling
  8338. //! author : Jacob Middag : https://github.com/middagj
  8339. /** @type {?} */
  8340. var monthsShortWithDots$1 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');
  8341. /** @type {?} */
  8342. var monthsShortWithoutDots$1 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');
  8343. /** @type {?} */
  8344. var monthsParse$5 = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i];
  8345. /** @type {?} */
  8346. var monthsRegex$5 = /^(januari|februari|maart|april|mei|april|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
  8347. /** @type {?} */
  8348. var nlLocale = {
  8349. abbr: 'nl',
  8350. months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
  8351. monthsShort: /**
  8352. * @param {?} date
  8353. * @param {?} format
  8354. * @param {?=} isUTC
  8355. * @return {?}
  8356. */
  8357. function (date, format, isUTC) {
  8358. if (!date) {
  8359. return monthsShortWithDots$1;
  8360. }
  8361. else if (/-MMM-/.test(format)) {
  8362. return monthsShortWithoutDots$1[getMonth(date, isUTC)];
  8363. }
  8364. else {
  8365. return monthsShortWithDots$1[getMonth(date, isUTC)];
  8366. }
  8367. },
  8368. monthsRegex: monthsRegex$5,
  8369. monthsShortRegex: monthsRegex$5,
  8370. monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,
  8371. monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
  8372. monthsParse: monthsParse$5,
  8373. longMonthsParse: monthsParse$5,
  8374. shortMonthsParse: monthsParse$5,
  8375. weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
  8376. weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
  8377. weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
  8378. weekdaysParseExact: true,
  8379. longDateFormat: {
  8380. LT: 'HH:mm',
  8381. LTS: 'HH:mm:ss',
  8382. L: 'DD-MM-YYYY',
  8383. LL: 'D MMMM YYYY',
  8384. LLL: 'D MMMM YYYY HH:mm',
  8385. LLLL: 'dddd D MMMM YYYY HH:mm'
  8386. },
  8387. calendar: {
  8388. sameDay: '[vandaag om] LT',
  8389. nextDay: '[morgen om] LT',
  8390. nextWeek: 'dddd [om] LT',
  8391. lastDay: '[gisteren om] LT',
  8392. lastWeek: '[afgelopen] dddd [om] LT',
  8393. sameElse: 'L'
  8394. },
  8395. relativeTime: {
  8396. future: 'over %s',
  8397. past: '%s geleden',
  8398. s: 'een paar seconden',
  8399. ss: '%d seconden',
  8400. m: 'één minuut',
  8401. mm: '%d minuten',
  8402. h: 'één uur',
  8403. hh: '%d uur',
  8404. d: 'één dag',
  8405. dd: '%d dagen',
  8406. M: 'één maand',
  8407. MM: '%d maanden',
  8408. y: 'één jaar',
  8409. yy: '%d jaar'
  8410. },
  8411. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  8412. ordinal: /**
  8413. * @param {?} _num
  8414. * @return {?}
  8415. */
  8416. function (_num) {
  8417. /** @type {?} */
  8418. var num = Number(_num);
  8419. return num + ((num === 1 || num === 8 || num >= 20) ? 'ste' : 'de');
  8420. },
  8421. week: {
  8422. dow: 1,
  8423. // Monday is the first day of the week.
  8424. doy: 4 // The week that contains Jan 4th is the first week of the year.
  8425. }
  8426. };
  8427. /**
  8428. * @fileoverview added by tsickle
  8429. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  8430. */
  8431. //! moment.js locale configuration
  8432. //! locale : Polish [pl]
  8433. //! author : Rafal Hirsz : https://github.com/evoL
  8434. /** @type {?} */
  8435. var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_');
  8436. /** @type {?} */
  8437. var monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');
  8438. /**
  8439. * @param {?} num
  8440. * @return {?}
  8441. */
  8442. function plural$1(num) {
  8443. return (num % 10 < 5) && (num % 10 > 1) && ((~~(num / 10) % 10) !== 1);
  8444. }
  8445. /**
  8446. * @param {?} num
  8447. * @param {?} withoutSuffix
  8448. * @param {?} key
  8449. * @return {?}
  8450. */
  8451. function translate$5(num, withoutSuffix, key) {
  8452. /** @type {?} */
  8453. var result = num + ' ';
  8454. switch (key) {
  8455. case 'ss':
  8456. return result + (plural$1(num) ? 'sekundy' : 'sekund');
  8457. case 'm':
  8458. return withoutSuffix ? 'minuta' : 'minutę';
  8459. case 'mm':
  8460. return result + (plural$1(num) ? 'minuty' : 'minut');
  8461. case 'h':
  8462. return withoutSuffix ? 'godzina' : 'godzinę';
  8463. case 'hh':
  8464. return result + (plural$1(num) ? 'godziny' : 'godzin');
  8465. case 'MM':
  8466. return result + (plural$1(num) ? 'miesiące' : 'miesięcy');
  8467. case 'yy':
  8468. return result + (plural$1(num) ? 'lata' : 'lat');
  8469. }
  8470. }
  8471. /** @type {?} */
  8472. var plLocale = {
  8473. abbr: 'pl',
  8474. months: /**
  8475. * @param {?} date
  8476. * @param {?} format
  8477. * @param {?=} isUTC
  8478. * @return {?}
  8479. */
  8480. function (date, format, isUTC) {
  8481. if (!date) {
  8482. return monthsNominative;
  8483. }
  8484. else if (format === '') {
  8485. // Hack: if format empty we know this is used to generate
  8486. // RegExp by moment. Give then back both valid forms of months
  8487. // in RegExp ready format.
  8488. return '(' + monthsSubjective[getMonth(date, isUTC)] + '|' + monthsNominative[getMonth(date, isUTC)] + ')';
  8489. }
  8490. else if (/D MMMM/.test(format)) {
  8491. return monthsSubjective[getMonth(date, isUTC)];
  8492. }
  8493. else {
  8494. return monthsNominative[getMonth(date, isUTC)];
  8495. }
  8496. },
  8497. monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
  8498. weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
  8499. weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
  8500. weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
  8501. longDateFormat: {
  8502. LT: 'HH:mm',
  8503. LTS: 'HH:mm:ss',
  8504. L: 'DD.MM.YYYY',
  8505. LL: 'D MMMM YYYY',
  8506. LLL: 'D MMMM YYYY HH:mm',
  8507. LLLL: 'dddd, D MMMM YYYY HH:mm'
  8508. },
  8509. calendar: {
  8510. sameDay: '[Dziś o] LT',
  8511. nextDay: '[Jutro o] LT',
  8512. nextWeek: /**
  8513. * @param {?} date
  8514. * @return {?}
  8515. */
  8516. function (date) {
  8517. switch (getDayOfWeek(date)) {
  8518. case 0:
  8519. return '[W niedzielę o] LT';
  8520. case 2:
  8521. return '[We wtorek o] LT';
  8522. case 3:
  8523. return '[W środę o] LT';
  8524. case 5:
  8525. return '[W piątek o] LT';
  8526. case 6:
  8527. return '[W sobotę o] LT';
  8528. default:
  8529. return '[W] dddd [o] LT';
  8530. }
  8531. },
  8532. lastDay: '[Wczoraj o] LT',
  8533. lastWeek: /**
  8534. * @param {?} date
  8535. * @return {?}
  8536. */
  8537. function (date) {
  8538. switch (getDayOfWeek(date)) {
  8539. case 0:
  8540. return '[W zeszłą niedzielę o] LT';
  8541. case 3:
  8542. return '[W zeszłą środę o] LT';
  8543. case 4:
  8544. return '[W zeszłą czwartek o] LT';
  8545. case 5:
  8546. return '[W zeszłą piątek o] LT';
  8547. case 6:
  8548. return '[W zeszłą sobotę o] LT';
  8549. default:
  8550. return '[W zeszły] dddd [o] LT';
  8551. }
  8552. },
  8553. sameElse: 'L'
  8554. },
  8555. relativeTime: {
  8556. future: 'za %s',
  8557. past: '%s temu',
  8558. s: 'kilka sekund',
  8559. ss: translate$5,
  8560. m: translate$5,
  8561. mm: translate$5,
  8562. h: translate$5,
  8563. hh: translate$5,
  8564. d: '1 dzień',
  8565. dd: '%d dni',
  8566. M: 'miesiąc',
  8567. MM: translate$5,
  8568. y: 'rok',
  8569. yy: translate$5
  8570. },
  8571. dayOfMonthOrdinalParse: /\d{1,2}\./,
  8572. ordinal: '%d.',
  8573. week: {
  8574. dow: 1,
  8575. // Monday is the first day of the week.
  8576. doy: 4 // The week that contains Jan 4th is the first week of the year.
  8577. }
  8578. };
  8579. /**
  8580. * @fileoverview added by tsickle
  8581. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  8582. */
  8583. //! moment.js locale configuration
  8584. //! locale : Portuguese (Brazil) [pt-br]
  8585. //! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
  8586. /** @type {?} */
  8587. var ptBrLocale = {
  8588. abbr: 'pt-br',
  8589. months: 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),
  8590. monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
  8591. weekdays: 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),
  8592. weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
  8593. weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
  8594. weekdaysParseExact: true,
  8595. longDateFormat: {
  8596. LT: 'HH:mm',
  8597. LTS: 'HH:mm:ss',
  8598. L: 'DD/MM/YYYY',
  8599. LL: 'D [de] MMMM [de] YYYY',
  8600. LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
  8601. LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm'
  8602. },
  8603. calendar: {
  8604. sameDay: '[Hoje às] LT',
  8605. nextDay: '[Amanhã às] LT',
  8606. nextWeek: 'dddd [às] LT',
  8607. lastDay: '[Ontem às] LT',
  8608. lastWeek: /**
  8609. * @param {?} date
  8610. * @return {?}
  8611. */
  8612. function (date) {
  8613. return (getDayOfWeek(date) === 0 || getDayOfWeek(date) === 6) ?
  8614. '[Último] dddd [às] LT' : // Saturday + Sunday
  8615. '[Última] dddd [às] LT'; // Monday - Friday
  8616. },
  8617. sameElse: 'L'
  8618. },
  8619. relativeTime: {
  8620. future: 'em %s',
  8621. past: '%s atrás',
  8622. s: 'poucos segundos',
  8623. ss: '%d segundos',
  8624. m: 'um minuto',
  8625. mm: '%d minutos',
  8626. h: 'uma hora',
  8627. hh: '%d horas',
  8628. d: 'um dia',
  8629. dd: '%d dias',
  8630. M: 'um mês',
  8631. MM: '%d meses',
  8632. y: 'um ano',
  8633. yy: '%d anos'
  8634. },
  8635. dayOfMonthOrdinalParse: /\d{1,2}º/,
  8636. ordinal: '%dº'
  8637. };
  8638. /**
  8639. * @fileoverview added by tsickle
  8640. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  8641. */
  8642. // ! moment.js locale configuration
  8643. // ! locale : Romanian [ro]
  8644. //! author : Vlad Gurdiga : https://github.com/gurdiga
  8645. //! author : Valentin Agachi : https://github.com/avaly
  8646. // ! author : Earle white: https://github.com/5earle
  8647. /**
  8648. * @param {?} num
  8649. * @param {?} withoutSuffix
  8650. * @param {?} key
  8651. * @return {?}
  8652. */
  8653. function relativeTimeWithPlural(num, withoutSuffix, key) {
  8654. /** @type {?} */
  8655. var format = {
  8656. ss: 'secunde',
  8657. mm: 'minute',
  8658. hh: 'ore',
  8659. dd: 'zile',
  8660. MM: 'luni',
  8661. yy: 'ani'
  8662. };
  8663. /** @type {?} */
  8664. var separator = ' ';
  8665. if (num % 100 >= 20 || (num >= 100 && num % 100 === 0)) {
  8666. separator = ' de ';
  8667. }
  8668. return num + separator + format[key];
  8669. }
  8670. /** @type {?} */
  8671. var roLocale = {
  8672. abbr: 'ro',
  8673. months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'),
  8674. monthsShort: 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'),
  8675. monthsParseExact: true,
  8676. weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
  8677. weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
  8678. weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
  8679. longDateFormat: {
  8680. LT: 'H:mm',
  8681. LTS: 'H:mm:ss',
  8682. L: 'DD.MM.YYYY',
  8683. LL: 'D MMMM YYYY',
  8684. LLL: 'D MMMM YYYY H:mm',
  8685. LLLL: 'dddd, D MMMM YYYY H:mm'
  8686. },
  8687. calendar: {
  8688. sameDay: '[azi la] LT',
  8689. nextDay: '[mâine la] LT',
  8690. nextWeek: 'dddd [la] LT',
  8691. lastDay: '[ieri la] LT',
  8692. lastWeek: '[fosta] dddd [la] LT',
  8693. sameElse: 'L'
  8694. },
  8695. relativeTime: {
  8696. future: 'peste %s',
  8697. past: '%s în urmă',
  8698. s: 'câteva secunde',
  8699. ss: relativeTimeWithPlural,
  8700. m: 'un minut',
  8701. mm: relativeTimeWithPlural,
  8702. h: 'o oră',
  8703. hh: relativeTimeWithPlural,
  8704. d: 'o zi',
  8705. dd: relativeTimeWithPlural,
  8706. M: 'o lună',
  8707. MM: relativeTimeWithPlural,
  8708. y: 'un an',
  8709. yy: relativeTimeWithPlural
  8710. },
  8711. week: {
  8712. dow: 1,
  8713. // Monday is the first day of the week.
  8714. doy: 7 // The week that contains Jan 1st is the first week of the year.
  8715. }
  8716. };
  8717. /**
  8718. * @fileoverview added by tsickle
  8719. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  8720. */
  8721. //! moment.js locale configuration
  8722. //! locale : Russian [ru]
  8723. //! author : Viktorminator : https://github.com/Viktorminator
  8724. //! Author : Menelion Elensúle : https://github.com/Oire
  8725. //! author : Коренберг Марк : https://github.com/socketpair
  8726. /**
  8727. * @param {?} word
  8728. * @param {?} num
  8729. * @return {?}
  8730. */
  8731. function plural$2(word, num) {
  8732. /** @type {?} */
  8733. var forms = word.split('_');
  8734. return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
  8735. }
  8736. /**
  8737. * @param {?} num
  8738. * @param {?} withoutSuffix
  8739. * @param {?} key
  8740. * @return {?}
  8741. */
  8742. function relativeTimeWithPlural$1(num, withoutSuffix, key) {
  8743. /** @type {?} */
  8744. var format = {
  8745. ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
  8746. mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
  8747. hh: 'час_часа_часов',
  8748. dd: 'день_дня_дней',
  8749. MM: 'месяц_месяца_месяцев',
  8750. yy: 'год_года_лет'
  8751. };
  8752. if (key === 'm') {
  8753. return withoutSuffix ? 'минута' : 'минуту';
  8754. }
  8755. return num + ' ' + plural$2(format[key], +num);
  8756. }
  8757. /** @type {?} */
  8758. var monthsParse$6 = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i];
  8759. // http://new.gramota.ru/spravka/rules/139-prop : § 103
  8760. // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
  8761. // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
  8762. /** @type {?} */
  8763. var ruLocale = {
  8764. abbr: 'ru',
  8765. months: {
  8766. format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'),
  8767. standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_')
  8768. },
  8769. monthsShort: {
  8770. // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку ?
  8771. format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'),
  8772. standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_')
  8773. },
  8774. weekdays: {
  8775. standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),
  8776. format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'),
  8777. isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/
  8778. },
  8779. weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
  8780. weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
  8781. monthsParse: monthsParse$6,
  8782. longMonthsParse: monthsParse$6,
  8783. shortMonthsParse: monthsParse$6,
  8784. // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
  8785. monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
  8786. // копия предыдущего
  8787. monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
  8788. // полные названия с падежами
  8789. monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
  8790. // Выражение, которое соотвествует только сокращённым формам
  8791. monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
  8792. longDateFormat: {
  8793. LT: 'H:mm',
  8794. LTS: 'H:mm:ss',
  8795. L: 'DD.MM.YYYY',
  8796. LL: 'D MMMM YYYY г.',
  8797. LLL: 'D MMMM YYYY г., H:mm',
  8798. LLLL: 'dddd, D MMMM YYYY г., H:mm'
  8799. },
  8800. calendar: {
  8801. sameDay: '[Сегодня в] LT',
  8802. nextDay: '[Завтра в] LT',
  8803. lastDay: '[Вчера в] LT',
  8804. nextWeek: /**
  8805. * @param {?} date
  8806. * @param {?} now
  8807. * @return {?}
  8808. */
  8809. function (date, now) {
  8810. if (getWeek(now) !== getWeek(date)) {
  8811. switch (getDayOfWeek(date)) {
  8812. case 0:
  8813. return '[В следующее] dddd [в] LT';
  8814. case 1:
  8815. case 2:
  8816. case 4:
  8817. return '[В следующий] dddd [в] LT';
  8818. case 3:
  8819. case 5:
  8820. case 6:
  8821. return '[В следующую] dddd [в] LT';
  8822. }
  8823. }
  8824. else {
  8825. if (getDayOfWeek(date) === 2) {
  8826. return '[Во] dddd [в] LT';
  8827. }
  8828. else {
  8829. return '[В] dddd [в] LT';
  8830. }
  8831. }
  8832. },
  8833. lastWeek: /**
  8834. * @param {?} date
  8835. * @param {?} now
  8836. * @return {?}
  8837. */
  8838. function (date, now) {
  8839. if (getWeek(now) !== getWeek(date)) {
  8840. switch (getDayOfWeek(date)) {
  8841. case 0:
  8842. return '[В прошлое] dddd [в] LT';
  8843. case 1:
  8844. case 2:
  8845. case 4:
  8846. return '[В прошлый] dddd [в] LT';
  8847. case 3:
  8848. case 5:
  8849. case 6:
  8850. return '[В прошлую] dddd [в] LT';
  8851. }
  8852. }
  8853. else {
  8854. if (getDayOfWeek(date) === 2) {
  8855. return '[Во] dddd [в] LT';
  8856. }
  8857. else {
  8858. return '[В] dddd [в] LT';
  8859. }
  8860. }
  8861. },
  8862. sameElse: 'L'
  8863. },
  8864. relativeTime: {
  8865. future: 'через %s',
  8866. past: '%s назад',
  8867. s: 'несколько секунд',
  8868. ss: relativeTimeWithPlural$1,
  8869. m: relativeTimeWithPlural$1,
  8870. mm: relativeTimeWithPlural$1,
  8871. h: 'час',
  8872. hh: relativeTimeWithPlural$1,
  8873. d: 'день',
  8874. dd: relativeTimeWithPlural$1,
  8875. M: 'месяц',
  8876. MM: relativeTimeWithPlural$1,
  8877. y: 'год',
  8878. yy: relativeTimeWithPlural$1
  8879. },
  8880. meridiemParse: /ночи|утра|дня|вечера/i,
  8881. isPM: /**
  8882. * @param {?} input
  8883. * @return {?}
  8884. */
  8885. function (input) {
  8886. return /^(дня|вечера)$/.test(input);
  8887. },
  8888. meridiem: /**
  8889. * @param {?} hour
  8890. * @param {?} minute
  8891. * @param {?} isLower
  8892. * @return {?}
  8893. */
  8894. function (hour, minute, isLower) {
  8895. if (hour < 4) {
  8896. return 'ночи';
  8897. }
  8898. else if (hour < 12) {
  8899. return 'утра';
  8900. }
  8901. else if (hour < 17) {
  8902. return 'дня';
  8903. }
  8904. else {
  8905. return 'вечера';
  8906. }
  8907. },
  8908. dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
  8909. ordinal: /**
  8910. * @param {?} _num
  8911. * @param {?} period
  8912. * @return {?}
  8913. */
  8914. function (_num, period) {
  8915. /** @type {?} */
  8916. var num = Number(_num);
  8917. switch (period) {
  8918. case 'M':
  8919. case 'd':
  8920. case 'DDD':
  8921. return num + '-й';
  8922. case 'D':
  8923. return num + '-го';
  8924. case 'w':
  8925. case 'W':
  8926. return num + '-я';
  8927. default:
  8928. return num.toString(10);
  8929. }
  8930. },
  8931. week: {
  8932. dow: 1,
  8933. // Monday is the first day of the week.
  8934. doy: 4 // The week that contains Jan 4th is the first week of the year.
  8935. }
  8936. };
  8937. /**
  8938. * @fileoverview added by tsickle
  8939. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  8940. */
  8941. //! moment.js locale configuration
  8942. //! locale : Slovak [sk]
  8943. //! author : Jozef Pažin : https://github.com/atiris
  8944. /** @type {?} */
  8945. var months$2 = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_');
  8946. /** @type {?} */
  8947. var monthsShort$6 = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
  8948. /**
  8949. * @param {?} num
  8950. * @return {?}
  8951. */
  8952. function plural$3(num) {
  8953. return (num > 1) && (num < 5) && (~~(num / 10) !== 1);
  8954. }
  8955. /**
  8956. * @param {?} num
  8957. * @param {?} withoutSuffix
  8958. * @param {?} key
  8959. * @param {?} isFuture
  8960. * @return {?}
  8961. */
  8962. function translate$6(num, withoutSuffix, key, isFuture) {
  8963. /** @type {?} */
  8964. var result = num + ' ';
  8965. switch (key) {
  8966. case 's': // a few seconds / in a few seconds / a few seconds ago
  8967. return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';
  8968. case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
  8969. if (withoutSuffix || isFuture) {
  8970. return result + (plural$3(num) ? 'sekundy' : 'sekúnd');
  8971. }
  8972. else {
  8973. return result + 'sekundami';
  8974. }
  8975. // break;
  8976. case 'm': // a minute / in a minute / a minute ago
  8977. return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou');
  8978. case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
  8979. if (withoutSuffix || isFuture) {
  8980. return result + (plural$3(num) ? 'minúty' : 'minút');
  8981. }
  8982. else {
  8983. return result + 'minútami';
  8984. }
  8985. // break;
  8986. case 'h': // an hour / in an hour / an hour ago
  8987. return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
  8988. case 'hh': // 9 hours / in 9 hours / 9 hours ago
  8989. if (withoutSuffix || isFuture) {
  8990. return result + (plural$3(num) ? 'hodiny' : 'hodín');
  8991. }
  8992. else {
  8993. return result + 'hodinami';
  8994. }
  8995. // break;
  8996. case 'd': // a day / in a day / a day ago
  8997. return (withoutSuffix || isFuture) ? 'deň' : 'dňom';
  8998. case 'dd': // 9 days / in 9 days / 9 days ago
  8999. if (withoutSuffix || isFuture) {
  9000. return result + (plural$3(num) ? 'dni' : 'dní');
  9001. }
  9002. else {
  9003. return result + 'dňami';
  9004. }
  9005. // break;
  9006. case 'M': // a month / in a month / a month ago
  9007. return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom';
  9008. case 'MM': // 9 months / in 9 months / 9 months ago
  9009. if (withoutSuffix || isFuture) {
  9010. return result + (plural$3(num) ? 'mesiace' : 'mesiacov');
  9011. }
  9012. else {
  9013. return result + 'mesiacmi';
  9014. }
  9015. // break;
  9016. case 'y': // a year / in a year / a year ago
  9017. return (withoutSuffix || isFuture) ? 'rok' : 'rokom';
  9018. case 'yy': // 9 years / in 9 years / 9 years ago
  9019. if (withoutSuffix || isFuture) {
  9020. return result + (plural$3(num) ? 'roky' : 'rokov');
  9021. }
  9022. else {
  9023. return result + 'rokmi';
  9024. }
  9025. // break;
  9026. }
  9027. }
  9028. /** @type {?} */
  9029. var skLocale = {
  9030. abbr: 'sk',
  9031. months: months$2,
  9032. monthsShort: monthsShort$6,
  9033. weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
  9034. weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),
  9035. weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),
  9036. longDateFormat: {
  9037. LT: 'H:mm',
  9038. LTS: 'H:mm:ss',
  9039. L: 'DD.MM.YYYY',
  9040. LL: 'D. MMMM YYYY',
  9041. LLL: 'D. MMMM YYYY H:mm',
  9042. LLLL: 'dddd D. MMMM YYYY H:mm',
  9043. l: 'D. M. YYYY'
  9044. },
  9045. calendar: {
  9046. sameDay: '[dnes o] LT',
  9047. nextDay: '[zajtra o] LT',
  9048. nextWeek: /**
  9049. * @param {?} date
  9050. * @return {?}
  9051. */
  9052. function (date) {
  9053. switch (getDayOfWeek(date)) {
  9054. case 0:
  9055. return '[v nedeľu o] LT';
  9056. case 1:
  9057. case 2:
  9058. return '[v] dddd [o] LT';
  9059. case 3:
  9060. return '[v stredu o] LT';
  9061. case 4:
  9062. return '[vo štvrtok o] LT';
  9063. case 5:
  9064. return '[v piatok o] LT';
  9065. case 6:
  9066. return '[v sobotu o] LT';
  9067. }
  9068. },
  9069. lastDay: '[včera o] LT',
  9070. lastWeek: /**
  9071. * @param {?} date
  9072. * @return {?}
  9073. */
  9074. function (date) {
  9075. switch (getDayOfWeek(date)) {
  9076. case 0:
  9077. return '[minulú nedeľu o] LT';
  9078. case 1:
  9079. case 2:
  9080. return '[minulý] dddd [o] LT';
  9081. case 3:
  9082. return '[minulú stredu o] LT';
  9083. case 4:
  9084. case 5:
  9085. return '[minulý] dddd [o] LT';
  9086. case 6:
  9087. return '[minulú sobotu o] LT';
  9088. }
  9089. },
  9090. sameElse: 'L'
  9091. },
  9092. relativeTime: {
  9093. future: 'o %s',
  9094. past: 'pred %s',
  9095. s: translate$6,
  9096. ss: translate$6,
  9097. m: translate$6,
  9098. mm: translate$6,
  9099. h: translate$6,
  9100. hh: translate$6,
  9101. d: translate$6,
  9102. dd: translate$6,
  9103. M: translate$6,
  9104. MM: translate$6,
  9105. y: translate$6,
  9106. yy: translate$6
  9107. },
  9108. dayOfMonthOrdinalParse: /\d{1,2}\./,
  9109. ordinal: '%d.',
  9110. week: {
  9111. dow: 1,
  9112. // Monday is the first day of the week.
  9113. doy: 4 // The week that contains Jan 4th is the first week of the year.
  9114. }
  9115. };
  9116. /**
  9117. * @fileoverview added by tsickle
  9118. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  9119. */
  9120. //! moment.js locale configuration
  9121. //! locale : Slovenian [sl]
  9122. //! author : mihan : https://github.com/mihan
  9123. /**
  9124. * @param {?} number
  9125. * @param {?} withoutSuffix
  9126. * @param {?} key
  9127. * @param {?} isFuture
  9128. * @return {?}
  9129. */
  9130. function processRelativeTime$2(number, withoutSuffix, key, isFuture) {
  9131. /** @type {?} */
  9132. var result = number + ' ';
  9133. switch (key) {
  9134. case 's':
  9135. return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';
  9136. case 'ss':
  9137. if (number === 1) {
  9138. result += withoutSuffix ? 'sekundo' : 'sekundi';
  9139. }
  9140. else if (number === 2) {
  9141. result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';
  9142. }
  9143. else if (number < 5) {
  9144. result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';
  9145. }
  9146. else {
  9147. result += withoutSuffix || isFuture ? 'sekund' : 'sekund';
  9148. }
  9149. return result;
  9150. case 'm':
  9151. return withoutSuffix ? 'ena minuta' : 'eno minuto';
  9152. case 'mm':
  9153. if (number === 1) {
  9154. result += withoutSuffix ? 'minuta' : 'minuto';
  9155. }
  9156. else if (number === 2) {
  9157. result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
  9158. }
  9159. else if (number < 5) {
  9160. result += withoutSuffix || isFuture ? 'minute' : 'minutami';
  9161. }
  9162. else {
  9163. result += withoutSuffix || isFuture ? 'minut' : 'minutami';
  9164. }
  9165. return result;
  9166. case 'h':
  9167. return withoutSuffix ? 'ena ura' : 'eno uro';
  9168. case 'hh':
  9169. if (number === 1) {
  9170. result += withoutSuffix ? 'ura' : 'uro';
  9171. }
  9172. else if (number === 2) {
  9173. result += withoutSuffix || isFuture ? 'uri' : 'urama';
  9174. }
  9175. else if (number < 5) {
  9176. result += withoutSuffix || isFuture ? 'ure' : 'urami';
  9177. }
  9178. else {
  9179. result += withoutSuffix || isFuture ? 'ur' : 'urami';
  9180. }
  9181. return result;
  9182. case 'd':
  9183. return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
  9184. case 'dd':
  9185. if (number === 1) {
  9186. result += withoutSuffix || isFuture ? 'dan' : 'dnem';
  9187. }
  9188. else if (number === 2) {
  9189. result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
  9190. }
  9191. else {
  9192. result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
  9193. }
  9194. return result;
  9195. case 'M':
  9196. return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
  9197. case 'MM':
  9198. if (number === 1) {
  9199. result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
  9200. }
  9201. else if (number === 2) {
  9202. result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
  9203. }
  9204. else if (number < 5) {
  9205. result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
  9206. }
  9207. else {
  9208. result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
  9209. }
  9210. return result;
  9211. case 'y':
  9212. return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
  9213. case 'yy':
  9214. if (number === 1) {
  9215. result += withoutSuffix || isFuture ? 'leto' : 'letom';
  9216. }
  9217. else if (number === 2) {
  9218. result += withoutSuffix || isFuture ? 'leti' : 'letoma';
  9219. }
  9220. else if (number < 5) {
  9221. result += withoutSuffix || isFuture ? 'leta' : 'leti';
  9222. }
  9223. else {
  9224. result += withoutSuffix || isFuture ? 'let' : 'leti';
  9225. }
  9226. return result;
  9227. }
  9228. }
  9229. /** @type {?} */
  9230. var slLocale = {
  9231. abbr: 'sl',
  9232. months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'),
  9233. monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'),
  9234. monthsParseExact: true,
  9235. weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
  9236. weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
  9237. weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),
  9238. weekdaysParseExact: true,
  9239. longDateFormat: {
  9240. LT: 'H:mm',
  9241. LTS: 'H:mm:ss',
  9242. L: 'DD.MM.YYYY',
  9243. LL: 'D. MMMM YYYY',
  9244. LLL: 'D. MMMM YYYY H:mm',
  9245. LLLL: 'dddd, D. MMMM YYYY H:mm'
  9246. },
  9247. calendar: {
  9248. sameDay: '[danes ob] LT',
  9249. nextDay: '[jutri ob] LT',
  9250. nextWeek: /**
  9251. * @param {?} date
  9252. * @return {?}
  9253. */
  9254. function (date) {
  9255. switch (getDayOfWeek(date)) {
  9256. case 0:
  9257. return '[v] [nedeljo] [ob] LT';
  9258. case 3:
  9259. return '[v] [sredo] [ob] LT';
  9260. case 6:
  9261. return '[v] [soboto] [ob] LT';
  9262. case 1:
  9263. case 2:
  9264. case 4:
  9265. case 5:
  9266. return '[v] dddd [ob] LT';
  9267. }
  9268. },
  9269. lastDay: '[včeraj ob] LT',
  9270. lastWeek: /**
  9271. * @param {?} date
  9272. * @return {?}
  9273. */
  9274. function (date) {
  9275. switch (getDayOfWeek(date)) {
  9276. case 0:
  9277. return '[prejšnjo] [nedeljo] [ob] LT';
  9278. case 3:
  9279. return '[prejšnjo] [sredo] [ob] LT';
  9280. case 6:
  9281. return '[prejšnjo] [soboto] [ob] LT';
  9282. case 1:
  9283. case 2:
  9284. case 4:
  9285. case 5:
  9286. return '[prejšnji] dddd [ob] LT';
  9287. }
  9288. },
  9289. sameElse: 'L'
  9290. },
  9291. relativeTime: {
  9292. future: 'čez %s',
  9293. past: 'pred %s',
  9294. s: processRelativeTime$2,
  9295. ss: processRelativeTime$2,
  9296. m: processRelativeTime$2,
  9297. mm: processRelativeTime$2,
  9298. h: processRelativeTime$2,
  9299. hh: processRelativeTime$2,
  9300. d: processRelativeTime$2,
  9301. dd: processRelativeTime$2,
  9302. M: processRelativeTime$2,
  9303. MM: processRelativeTime$2,
  9304. y: processRelativeTime$2,
  9305. yy: processRelativeTime$2
  9306. },
  9307. dayOfMonthOrdinalParse: /\d{1,2}\./,
  9308. ordinal: '%d.',
  9309. week: {
  9310. dow: 1,
  9311. // Monday is the first day of the week.
  9312. doy: 7 // The week that contains Jan 1st is the first week of the year.
  9313. }
  9314. };
  9315. /**
  9316. * @fileoverview added by tsickle
  9317. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  9318. */
  9319. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  9320. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  9321. // tslint:disable:no-shadowed-variable switch-default prefer-const
  9322. // tslint:disable:one-variable-per-declaration newline-before-return
  9323. //! moment.js locale configuration
  9324. //! locale : Swedish [sv]
  9325. //! author : Jens Alm : https://github.com/ulmus
  9326. /** @type {?} */
  9327. var svLocale = {
  9328. abbr: 'sv',
  9329. months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'),
  9330. monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
  9331. weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
  9332. weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
  9333. weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
  9334. longDateFormat: {
  9335. LT: 'HH:mm',
  9336. LTS: 'HH:mm:ss',
  9337. L: 'YYYY-MM-DD',
  9338. LL: 'D MMMM YYYY',
  9339. LLL: 'D MMMM YYYY [kl.] HH:mm',
  9340. LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
  9341. lll: 'D MMM YYYY HH:mm',
  9342. llll: 'ddd D MMM YYYY HH:mm'
  9343. },
  9344. calendar: {
  9345. sameDay: '[Idag] LT',
  9346. nextDay: '[Imorgon] LT',
  9347. lastDay: '[Igår] LT',
  9348. nextWeek: '[På] dddd LT',
  9349. lastWeek: '[I] dddd[s] LT',
  9350. sameElse: 'L'
  9351. },
  9352. relativeTime: {
  9353. future: 'om %s',
  9354. past: 'för %s sedan',
  9355. s: 'några sekunder',
  9356. ss: '%d sekunder',
  9357. m: 'en minut',
  9358. mm: '%d minuter',
  9359. h: 'en timme',
  9360. hh: '%d timmar',
  9361. d: 'en dag',
  9362. dd: '%d dagar',
  9363. M: 'en månad',
  9364. MM: '%d månader',
  9365. y: 'ett år',
  9366. yy: '%d år'
  9367. },
  9368. dayOfMonthOrdinalParse: /\d{1,2}(e|a)/,
  9369. ordinal: /**
  9370. * @param {?} _num
  9371. * @return {?}
  9372. */
  9373. function (_num) {
  9374. /** @type {?} */
  9375. var num = Number(_num);
  9376. /** @type {?} */
  9377. var b = num % 10;
  9378. /** @type {?} */
  9379. var output = (~~(num % 100 / 10) === 1) ? 'e' :
  9380. (b === 1) ? 'a' :
  9381. (b === 2) ? 'a' :
  9382. (b === 3) ? 'e' : 'e';
  9383. return num + output;
  9384. },
  9385. week: {
  9386. dow: 1,
  9387. // Monday is the first day of the week.
  9388. doy: 4 // The week that contains Jan 4th is the first week of the year.
  9389. }
  9390. };
  9391. /**
  9392. * @fileoverview added by tsickle
  9393. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  9394. */
  9395. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  9396. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  9397. // tslint:disable:no-shadowed-variable switch-default prefer-const
  9398. // tslint:disable:one-variable-per-declaration newline-before-return
  9399. // moment.js locale configuration
  9400. // locale : Thai [th]
  9401. // author : Watcharapol Sanitwong : https://github.com/tumit
  9402. /** @type {?} */
  9403. var thLocale = {
  9404. abbr: 'th',
  9405. months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'),
  9406. monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'),
  9407. monthsParseExact: true,
  9408. weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
  9409. weekdaysShort: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
  9410. // yes, three characters difference
  9411. weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
  9412. weekdaysParseExact: true,
  9413. longDateFormat: {
  9414. LT: 'H:mm',
  9415. LTS: 'H:mm:ss',
  9416. L: 'DD/MM/YYYY',
  9417. LL: 'D MMMM YYYY',
  9418. LLL: 'D MMMM YYYY เวลา H:mm',
  9419. LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm'
  9420. },
  9421. meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
  9422. isPM: /**
  9423. * @param {?} input
  9424. * @return {?}
  9425. */
  9426. function (input) {
  9427. return input === 'หลังเที่ยง';
  9428. },
  9429. meridiem: /**
  9430. * @param {?} hour
  9431. * @param {?} minute
  9432. * @param {?} isLower
  9433. * @return {?}
  9434. */
  9435. function (hour, minute, isLower) {
  9436. if (hour < 12) {
  9437. return 'ก่อนเที่ยง';
  9438. }
  9439. else {
  9440. return 'หลังเที่ยง';
  9441. }
  9442. },
  9443. calendar: {
  9444. sameDay: '[วันนี้ เวลา] LT',
  9445. nextDay: '[พรุ่งนี้ เวลา] LT',
  9446. nextWeek: 'dddd[หน้า เวลา] LT',
  9447. lastDay: '[เมื่อวานนี้ เวลา] LT',
  9448. lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',
  9449. sameElse: 'L'
  9450. },
  9451. relativeTime: {
  9452. future: 'อีก %s',
  9453. past: '%sที่แล้ว',
  9454. s: 'ไม่กี่วินาที',
  9455. ss: '%d วินาที',
  9456. m: '1 นาที',
  9457. mm: '%d นาที',
  9458. h: '1 ชั่วโมง',
  9459. hh: '%d ชั่วโมง',
  9460. d: '1 วัน',
  9461. dd: '%d วัน',
  9462. M: '1 เดือน',
  9463. MM: '%d เดือน',
  9464. y: '1 ปี',
  9465. yy: '%d ปี'
  9466. }
  9467. };
  9468. /**
  9469. * @fileoverview added by tsickle
  9470. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  9471. */
  9472. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  9473. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  9474. // tslint:disable:no-shadowed-variable switch-default prefer-const
  9475. // tslint:disable:one-variable-per-declaration newline-before-return
  9476. //! moment.js locale configuration
  9477. //! locale : Turkish [tr]
  9478. //! authors : Erhan Gundogan : https://github.com/erhangundogan,
  9479. //! Burak Yiğit Kaya: https://github.com/BYK
  9480. /** @type {?} */
  9481. var suffixes = {
  9482. 1: '\'inci',
  9483. 5: '\'inci',
  9484. 8: '\'inci',
  9485. 70: '\'inci',
  9486. 80: '\'inci',
  9487. 2: '\'nci',
  9488. 7: '\'nci',
  9489. 20: '\'nci',
  9490. 50: '\'nci',
  9491. 3: '\'üncü',
  9492. 4: '\'üncü',
  9493. 100: '\'üncü',
  9494. 6: '\'ncı',
  9495. 9: '\'uncu',
  9496. 10: '\'uncu',
  9497. 30: '\'uncu',
  9498. 60: '\'ıncı',
  9499. 90: '\'ıncı'
  9500. };
  9501. /** @type {?} */
  9502. var trLocale = {
  9503. abbr: 'tr',
  9504. months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),
  9505. monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
  9506. weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),
  9507. weekdaysShort: 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),
  9508. weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
  9509. longDateFormat: {
  9510. LT: 'HH:mm',
  9511. LTS: 'HH:mm:ss',
  9512. L: 'DD.MM.YYYY',
  9513. LL: 'D MMMM YYYY',
  9514. LLL: 'D MMMM YYYY HH:mm',
  9515. LLLL: 'dddd, D MMMM YYYY HH:mm'
  9516. },
  9517. calendar: {
  9518. sameDay: '[bugün saat] LT',
  9519. nextDay: '[yarın saat] LT',
  9520. nextWeek: '[gelecek] dddd [saat] LT',
  9521. lastDay: '[dün] LT',
  9522. lastWeek: '[geçen] dddd [saat] LT',
  9523. sameElse: 'L'
  9524. },
  9525. relativeTime: {
  9526. future: '%s sonra',
  9527. past: '%s önce',
  9528. s: 'birkaç saniye',
  9529. ss: '%d saniye',
  9530. m: 'bir dakika',
  9531. mm: '%d dakika',
  9532. h: 'bir saat',
  9533. hh: '%d saat',
  9534. d: 'bir gün',
  9535. dd: '%d gün',
  9536. M: 'bir ay',
  9537. MM: '%d ay',
  9538. y: 'bir yıl',
  9539. yy: '%d yıl'
  9540. },
  9541. dayOfMonthOrdinalParse: /\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,
  9542. ordinal: /**
  9543. * @param {?} _num
  9544. * @return {?}
  9545. */
  9546. function (_num) {
  9547. /** @type {?} */
  9548. var num = Number(_num);
  9549. if (num === 0) { // special case for zero
  9550. return num + '\'ıncı';
  9551. }
  9552. /** @type {?} */
  9553. var a = num % 10;
  9554. /** @type {?} */
  9555. var b = num % 100 - a;
  9556. /** @type {?} */
  9557. var c = num >= 100 ? 100 : null;
  9558. return num + (suffixes[a] || suffixes[b] || suffixes[c]);
  9559. },
  9560. week: {
  9561. dow: 1,
  9562. // Monday is the first day of the week.
  9563. doy: 7 // The week that contains Jan 1st is the first week of the year.
  9564. }
  9565. };
  9566. /**
  9567. * @fileoverview added by tsickle
  9568. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  9569. */
  9570. //! moment.js locale configuration
  9571. //! locale : Ukrainian [uk]
  9572. //! author : zemlanin : https://github.com/zemlanin
  9573. //! Author : Menelion Elensúle : https://github.com/Oire
  9574. /**
  9575. * @param {?} word
  9576. * @param {?} num
  9577. * @return {?}
  9578. */
  9579. function plural$4(word, num) {
  9580. /** @type {?} */
  9581. var forms = word.split('_');
  9582. return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
  9583. }
  9584. /**
  9585. * @param {?} num
  9586. * @param {?} withoutSuffix
  9587. * @param {?} key
  9588. * @return {?}
  9589. */
  9590. function relativeTimeWithPlural$2(num, withoutSuffix, key) {
  9591. /** @type {?} */
  9592. var format = {
  9593. ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',
  9594. mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
  9595. hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
  9596. dd: 'день_дні_днів',
  9597. MM: 'місяць_місяці_місяців',
  9598. yy: 'рік_роки_років'
  9599. };
  9600. if (key === 'm') {
  9601. return withoutSuffix ? 'хвилина' : 'хвилину';
  9602. }
  9603. if (key === 'h') {
  9604. return withoutSuffix ? 'година' : 'годину';
  9605. }
  9606. return num + ' ' + plural$4(format[key], +num);
  9607. }
  9608. /**
  9609. * @param {?} date
  9610. * @param {?} format
  9611. * @param {?=} isUTC
  9612. * @return {?}
  9613. */
  9614. function weekdaysCaseReplace(date, format, isUTC) {
  9615. /** @type {?} */
  9616. var weekdays = {
  9617. nominative: 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),
  9618. accusative: 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),
  9619. genitive: 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')
  9620. };
  9621. if (!date) {
  9622. return weekdays.nominative;
  9623. }
  9624. /** @type {?} */
  9625. var nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ?
  9626. 'accusative' :
  9627. ((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ?
  9628. 'genitive' :
  9629. 'nominative');
  9630. return weekdays[nounCase][getDayOfWeek(date, isUTC)];
  9631. }
  9632. /**
  9633. * @param {?} str
  9634. * @return {?}
  9635. */
  9636. function processHoursFunction(str) {
  9637. return (/**
  9638. * @param {?} date
  9639. * @return {?}
  9640. */
  9641. function (date) {
  9642. return str + 'о' + (getHours(date) === 11 ? 'б' : '') + '] LT';
  9643. });
  9644. }
  9645. /** @type {?} */
  9646. var ukLocale = {
  9647. abbr: 'uk',
  9648. months: {
  9649. format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'),
  9650. standalone: 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_')
  9651. },
  9652. monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'),
  9653. weekdays: weekdaysCaseReplace,
  9654. weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  9655. weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  9656. longDateFormat: {
  9657. LT: 'HH:mm',
  9658. LTS: 'HH:mm:ss',
  9659. L: 'DD.MM.YYYY',
  9660. LL: 'D MMMM YYYY р.',
  9661. LLL: 'D MMMM YYYY р., HH:mm',
  9662. LLLL: 'dddd, D MMMM YYYY р., HH:mm'
  9663. },
  9664. calendar: {
  9665. sameDay: processHoursFunction('[Сьогодні '),
  9666. nextDay: processHoursFunction('[Завтра '),
  9667. lastDay: processHoursFunction('[Вчора '),
  9668. nextWeek: processHoursFunction('[У] dddd ['),
  9669. lastWeek: /**
  9670. * @param {?} date
  9671. * @return {?}
  9672. */
  9673. function (date) {
  9674. switch (getDayOfWeek(date)) {
  9675. case 0:
  9676. case 3:
  9677. case 5:
  9678. case 6:
  9679. return processHoursFunction('[Минулої] dddd [')(date);
  9680. case 1:
  9681. case 2:
  9682. case 4:
  9683. return processHoursFunction('[Минулого] dddd [')(date);
  9684. }
  9685. },
  9686. sameElse: 'L'
  9687. },
  9688. relativeTime: {
  9689. future: 'за %s',
  9690. past: '%s тому',
  9691. s: 'декілька секунд',
  9692. ss: relativeTimeWithPlural$2,
  9693. m: relativeTimeWithPlural$2,
  9694. mm: relativeTimeWithPlural$2,
  9695. h: 'годину',
  9696. hh: relativeTimeWithPlural$2,
  9697. d: 'день',
  9698. dd: relativeTimeWithPlural$2,
  9699. M: 'місяць',
  9700. MM: relativeTimeWithPlural$2,
  9701. y: 'рік',
  9702. yy: relativeTimeWithPlural$2
  9703. },
  9704. // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
  9705. meridiemParse: /ночі|ранку|дня|вечора/,
  9706. isPM: /**
  9707. * @param {?} input
  9708. * @return {?}
  9709. */
  9710. function (input) {
  9711. return /^(дня|вечора)$/.test(input);
  9712. },
  9713. meridiem: /**
  9714. * @param {?} hour
  9715. * @param {?} minute
  9716. * @param {?} isLower
  9717. * @return {?}
  9718. */
  9719. function (hour, minute, isLower) {
  9720. if (hour < 4) {
  9721. return 'ночі';
  9722. }
  9723. else if (hour < 12) {
  9724. return 'ранку';
  9725. }
  9726. else if (hour < 17) {
  9727. return 'дня';
  9728. }
  9729. else {
  9730. return 'вечора';
  9731. }
  9732. },
  9733. dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
  9734. ordinal: /**
  9735. * @param {?} _num
  9736. * @param {?} period
  9737. * @return {?}
  9738. */
  9739. function (_num, period) {
  9740. /** @type {?} */
  9741. var num = Number(_num);
  9742. switch (period) {
  9743. case 'M':
  9744. case 'd':
  9745. case 'DDD':
  9746. case 'w':
  9747. case 'W':
  9748. return num + '-й';
  9749. case 'D':
  9750. return num + '-го';
  9751. default:
  9752. return num.toString();
  9753. }
  9754. },
  9755. week: {
  9756. dow: 1,
  9757. // Monday is the first day of the week.
  9758. doy: 7 // The week that contains Jan 1st is the first week of the year.
  9759. }
  9760. };
  9761. /**
  9762. * @fileoverview added by tsickle
  9763. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  9764. */
  9765. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  9766. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  9767. // tslint:disable:no-shadowed-variable switch-default prefer-const
  9768. // tslint:disable:one-variable-per-declaration newline-before-return
  9769. //! moment.js locale configuration
  9770. //! locale : Việt Nam [vi]
  9771. //! author : Chris Gedrim : https://github.com/chrisgedrim
  9772. /** @type {?} */
  9773. var viLocale = {
  9774. abbr: 'vi',
  9775. months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'),
  9776. monthsShort: 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'),
  9777. monthsParseExact: true,
  9778. weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'),
  9779. weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
  9780. weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
  9781. weekdaysParseExact: true,
  9782. meridiemParse: /sa|ch/i,
  9783. isPM: /**
  9784. * @param {?} input
  9785. * @return {?}
  9786. */
  9787. function (input) {
  9788. return /^ch$/i.test(input);
  9789. },
  9790. meridiem: /**
  9791. * @param {?} hours
  9792. * @param {?} minutes
  9793. * @param {?} isLower
  9794. * @return {?}
  9795. */
  9796. function (hours, minutes, isLower) {
  9797. if (hours < 12) {
  9798. return isLower ? 'sa' : 'SA';
  9799. }
  9800. else {
  9801. return isLower ? 'ch' : 'CH';
  9802. }
  9803. },
  9804. longDateFormat: {
  9805. LT: 'HH:mm',
  9806. LTS: 'HH:mm:ss',
  9807. L: 'DD/MM/YYYY',
  9808. LL: 'D MMMM [năm] YYYY',
  9809. LLL: 'D MMMM [năm] YYYY HH:mm',
  9810. LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',
  9811. l: 'DD/M/YYYY',
  9812. ll: 'D MMM YYYY',
  9813. lll: 'D MMM YYYY HH:mm',
  9814. llll: 'ddd, D MMM YYYY HH:mm'
  9815. },
  9816. calendar: {
  9817. sameDay: '[Hôm nay lúc] LT',
  9818. nextDay: '[Ngày mai lúc] LT',
  9819. nextWeek: 'dddd [tuần tới lúc] LT',
  9820. lastDay: '[Hôm qua lúc] LT',
  9821. lastWeek: 'dddd [tuần trước lúc] LT',
  9822. sameElse: 'L'
  9823. },
  9824. relativeTime: {
  9825. future: '%s tới',
  9826. past: '%s trước',
  9827. s: 'vài giây',
  9828. ss: '%d giây',
  9829. m: 'một phút',
  9830. mm: '%d phút',
  9831. h: 'một giờ',
  9832. hh: '%d giờ',
  9833. d: 'một ngày',
  9834. dd: '%d ngày',
  9835. M: 'một tháng',
  9836. MM: '%d tháng',
  9837. y: 'một năm',
  9838. yy: '%d năm'
  9839. },
  9840. dayOfMonthOrdinalParse: /\d{1,2}/,
  9841. ordinal: /**
  9842. * @param {?} _num
  9843. * @return {?}
  9844. */
  9845. function (_num) {
  9846. return '' + _num;
  9847. },
  9848. week: {
  9849. dow: 1,
  9850. // Thứ Hai là ngày đầu tuần.
  9851. doy: 4 // Tuần chứa ngày 4 tháng 1 là tuần đầu tiên trong năm.
  9852. }
  9853. };
  9854. /**
  9855. * @fileoverview added by tsickle
  9856. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  9857. */
  9858. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  9859. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  9860. // tslint:disable:no-shadowed-variable switch-default prefer-const
  9861. // tslint:disable:one-variable-per-declaration newline-before-return
  9862. // tslint:disable:no-parameter-reassignment prefer-switch
  9863. //! moment.js locale configuration
  9864. //! locale : Chinese (China) [zh-cn]
  9865. //! author : suupic : https://github.com/suupic
  9866. //! author : Zeno Zeng : https://github.com/zenozeng
  9867. /** @type {?} */
  9868. var zhCnLocale = {
  9869. abbr: 'zh-cn',
  9870. months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
  9871. monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  9872. weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  9873. weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
  9874. weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
  9875. longDateFormat: {
  9876. LT: 'HH:mm',
  9877. LTS: 'HH:mm:ss',
  9878. L: 'YYYY/MM/DD',
  9879. LL: 'YYYY年M月D日',
  9880. LLL: 'YYYY年M月D日Ah点mm分',
  9881. LLLL: 'YYYY年M月D日ddddAh点mm分',
  9882. l: 'YYYY/M/D',
  9883. ll: 'YYYY年M月D日',
  9884. lll: 'YYYY年M月D日 HH:mm',
  9885. llll: 'YYYY年M月D日dddd HH:mm'
  9886. },
  9887. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  9888. meridiemHour: /**
  9889. * @param {?} hour
  9890. * @param {?} meridiem
  9891. * @return {?}
  9892. */
  9893. function (hour, meridiem) {
  9894. if (hour === 12) {
  9895. hour = 0;
  9896. }
  9897. if (meridiem === '凌晨' || meridiem === '早上' ||
  9898. meridiem === '上午') {
  9899. return hour;
  9900. }
  9901. else if (meridiem === '下午' || meridiem === '晚上') {
  9902. return hour + 12;
  9903. }
  9904. else {
  9905. // '中午'
  9906. return hour >= 11 ? hour : hour + 12;
  9907. }
  9908. },
  9909. meridiem: /**
  9910. * @param {?} hour
  9911. * @param {?} minute
  9912. * @param {?} isLower
  9913. * @return {?}
  9914. */
  9915. function (hour, minute, isLower) {
  9916. /** @type {?} */
  9917. var hm = hour * 100 + minute;
  9918. if (hm < 600) {
  9919. return '凌晨';
  9920. }
  9921. else if (hm < 900) {
  9922. return '早上';
  9923. }
  9924. else if (hm < 1130) {
  9925. return '上午';
  9926. }
  9927. else if (hm < 1230) {
  9928. return '中午';
  9929. }
  9930. else if (hm < 1800) {
  9931. return '下午';
  9932. }
  9933. else {
  9934. return '晚上';
  9935. }
  9936. },
  9937. calendar: {
  9938. sameDay: '[今天]LT',
  9939. nextDay: '[明天]LT',
  9940. nextWeek: '[下]ddddLT',
  9941. lastDay: '[昨天]LT',
  9942. lastWeek: '[上]ddddLT',
  9943. sameElse: 'L'
  9944. },
  9945. dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
  9946. ordinal: /**
  9947. * @param {?} _num
  9948. * @param {?} period
  9949. * @return {?}
  9950. */
  9951. function (_num, period) {
  9952. /** @type {?} */
  9953. var num = Number(_num);
  9954. switch (period) {
  9955. case 'd':
  9956. case 'D':
  9957. case 'DDD':
  9958. return num + '日';
  9959. case 'M':
  9960. return num + '月';
  9961. case 'w':
  9962. case 'W':
  9963. return num + '周';
  9964. default:
  9965. return num.toString();
  9966. }
  9967. },
  9968. relativeTime: {
  9969. future: '%s内',
  9970. past: '%s前',
  9971. s: '几秒',
  9972. ss: '%d 秒',
  9973. m: '1 分钟',
  9974. mm: '%d 分钟',
  9975. h: '1 小时',
  9976. hh: '%d 小时',
  9977. d: '1 天',
  9978. dd: '%d 天',
  9979. M: '1 个月',
  9980. MM: '%d 个月',
  9981. y: '1 年',
  9982. yy: '%d 年'
  9983. },
  9984. week: {
  9985. // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
  9986. dow: 1,
  9987. // Monday is the first day of the week.
  9988. doy: 4 // The week that contains Jan 4th is the first week of the year.
  9989. }
  9990. };
  9991. exports.add = add;
  9992. exports.arLocale = arLocale;
  9993. exports.bgLocale = bgLocale;
  9994. exports.caLocale = caLocale;
  9995. exports.csLocale = csLocale;
  9996. exports.daLocale = daLocale;
  9997. exports.deLocale = deLocale;
  9998. exports.defineLocale = defineLocale;
  9999. exports.enGbLocale = enGbLocale;
  10000. exports.endOf = endOf;
  10001. exports.esDoLocale = esDoLocale;
  10002. exports.esLocale = esLocale;
  10003. exports.esUsLocale = esUsLocale;
  10004. exports.etLocale = etLocale;
  10005. exports.fiLocale = fiLocale;
  10006. exports.formatDate = formatDate;
  10007. exports.frLocale = frLocale;
  10008. exports.getDay = getDay;
  10009. exports.getFirstDayOfMonth = getFirstDayOfMonth;
  10010. exports.getFullYear = getFullYear;
  10011. exports.getLocale = getLocale;
  10012. exports.getMonth = getMonth;
  10013. exports.getSetGlobalLocale = getSetGlobalLocale;
  10014. exports.glLocale = glLocale;
  10015. exports.heLocale = heLocale;
  10016. exports.hiLocale = hiLocale;
  10017. exports.hrLocale = hrLocale;
  10018. exports.huLocale = huLocale;
  10019. exports.idLocale = idLocale;
  10020. exports.isAfter = isAfter;
  10021. exports.isArray = isArray;
  10022. exports.isBefore = isBefore;
  10023. exports.isDate = isDate;
  10024. exports.isDateValid = isDateValid;
  10025. exports.isDisabledDay = isDisabledDay;
  10026. exports.isFirstDayOfWeek = isFirstDayOfWeek;
  10027. exports.isSame = isSame;
  10028. exports.isSameDay = isSameDay;
  10029. exports.isSameMonth = isSameMonth;
  10030. exports.isSameYear = isSameYear;
  10031. exports.itLocale = itLocale;
  10032. exports.jaLocale = jaLocale;
  10033. exports.koLocale = koLocale;
  10034. exports.listLocales = listLocales;
  10035. exports.ltLocale = ltLocale;
  10036. exports.lvLocale = lvLocale;
  10037. exports.mnLocale = mnLocale;
  10038. exports.nbLocale = nbLocale;
  10039. exports.nlBeLocale = nlBeLocale;
  10040. exports.nlLocale = nlLocale;
  10041. exports.parseDate = parseDate;
  10042. exports.plLocale = plLocale;
  10043. exports.ptBrLocale = ptBrLocale;
  10044. exports.roLocale = roLocale;
  10045. exports.ruLocale = ruLocale;
  10046. exports.setFullDate = setFullDate;
  10047. exports.shiftDate = shiftDate;
  10048. exports.skLocale = skLocale;
  10049. exports.slLocale = slLocale;
  10050. exports.startOf = startOf;
  10051. exports.subtract = subtract;
  10052. exports.svLocale = svLocale;
  10053. exports.thLocale = thLocale;
  10054. exports.trLocale = trLocale;
  10055. exports.ukLocale = ukLocale;
  10056. exports.updateLocale = updateLocale;
  10057. exports.utcAsLocal = utcAsLocal;
  10058. exports.viLocale = viLocale;
  10059. exports.zhCnLocale = zhCnLocale;
  10060. exports.ɵa = createDate;
  10061. Object.defineProperty(exports, '__esModule', { value: true });
  10062. }));
  10063. //# sourceMappingURL=ngx-bootstrap-chronos.umd.js.map