ngx-bootstrap-chronos.js 297 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082
  1. /**
  2. * @fileoverview added by tsickle
  3. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4. */
  5. /**
  6. * @param {?} n
  7. * @param {?} x
  8. * @return {?}
  9. */
  10. function mod(n, x) {
  11. return (n % x + x) % x;
  12. }
  13. /**
  14. * @param {?} num
  15. * @return {?}
  16. */
  17. function absFloor(num) {
  18. return num < 0 ? Math.ceil(num) || 0 : Math.floor(num);
  19. }
  20. /**
  21. * @fileoverview added by tsickle
  22. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  23. */
  24. /**
  25. * @param {?} str
  26. * @return {?}
  27. */
  28. function isString(str) {
  29. return typeof str === 'string';
  30. }
  31. /**
  32. * @param {?} value
  33. * @return {?}
  34. */
  35. function isDate(value) {
  36. return value instanceof Date || Object.prototype.toString.call(value) === '[object Date]';
  37. }
  38. /**
  39. * @param {?} date
  40. * @return {?}
  41. */
  42. function isDateValid(date) {
  43. return date && date.getTime && !isNaN(date.getTime());
  44. }
  45. /**
  46. * @param {?} fn
  47. * @return {?}
  48. */
  49. function isFunction(fn) {
  50. return (fn instanceof Function ||
  51. Object.prototype.toString.call(fn) === '[object Function]');
  52. }
  53. /**
  54. * @param {?=} value
  55. * @return {?}
  56. */
  57. function isNumber(value) {
  58. return typeof value === 'number' || Object.prototype.toString.call(value) === '[object Number]';
  59. }
  60. /**
  61. * @template T
  62. * @param {?=} input
  63. * @return {?}
  64. */
  65. function isArray(input) {
  66. return (input instanceof Array ||
  67. Object.prototype.toString.call(input) === '[object Array]');
  68. }
  69. /**
  70. * @template T
  71. * @param {?} a
  72. * @param {?} b
  73. * @return {?}
  74. */
  75. function hasOwnProp(a /*object*/, b) {
  76. return Object.prototype.hasOwnProperty.call(a, b);
  77. }
  78. /**
  79. * @template T
  80. * @param {?} input
  81. * @return {?}
  82. */
  83. function isObject(input /*object*/) {
  84. // IE8 will treat undefined and null as object if it wasn't for
  85. // input != null
  86. return (input != null && Object.prototype.toString.call(input) === '[object Object]');
  87. }
  88. /**
  89. * @param {?} obj
  90. * @return {?}
  91. */
  92. function isObjectEmpty(obj) {
  93. if (Object.getOwnPropertyNames) {
  94. return (Object.getOwnPropertyNames(obj).length === 0);
  95. }
  96. /** @type {?} */
  97. var k;
  98. for (k in obj) {
  99. if (obj.hasOwnProperty(k)) {
  100. return false;
  101. }
  102. }
  103. return true;
  104. }
  105. /**
  106. * @param {?} input
  107. * @return {?}
  108. */
  109. function isUndefined(input) {
  110. return input === void 0;
  111. }
  112. /**
  113. * @template T
  114. * @param {?} argumentForCoercion
  115. * @return {?}
  116. */
  117. function toInt(argumentForCoercion) {
  118. /** @type {?} */
  119. var coercedNumber = +argumentForCoercion;
  120. /** @type {?} */
  121. var value = 0;
  122. if (coercedNumber !== 0 && isFinite(coercedNumber)) {
  123. value = absFloor(coercedNumber);
  124. }
  125. return value;
  126. }
  127. /**
  128. * @fileoverview added by tsickle
  129. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  130. */
  131. /** @type {?} */
  132. var aliases = {};
  133. /** @type {?} */
  134. var _mapUnits = {
  135. date: 'day',
  136. hour: 'hours',
  137. minute: 'minutes',
  138. second: 'seconds',
  139. millisecond: 'milliseconds'
  140. };
  141. /**
  142. * @param {?} unit
  143. * @param {?} shorthand
  144. * @return {?}
  145. */
  146. function addUnitAlias(unit, shorthand) {
  147. /** @type {?} */
  148. var lowerCase = unit.toLowerCase();
  149. /** @type {?} */
  150. var _unit = unit;
  151. if (lowerCase in _mapUnits) {
  152. _unit = _mapUnits[lowerCase];
  153. }
  154. aliases[lowerCase] = aliases[lowerCase + "s"] = aliases[shorthand] = _unit;
  155. }
  156. /**
  157. * @param {?} units
  158. * @return {?}
  159. */
  160. function normalizeUnits(units) {
  161. return isString(units) ? aliases[units] || aliases[units.toLowerCase()] : undefined;
  162. }
  163. /**
  164. * @param {?} inputObject
  165. * @return {?}
  166. */
  167. function normalizeObjectUnits(inputObject) {
  168. /** @type {?} */
  169. var normalizedInput = {};
  170. /** @type {?} */
  171. var normalizedProp;
  172. /** @type {?} */
  173. var prop;
  174. for (prop in inputObject) {
  175. if (hasOwnProp(inputObject, prop)) {
  176. normalizedProp = normalizeUnits(prop);
  177. if (normalizedProp) {
  178. normalizedInput[normalizedProp] = inputObject[prop];
  179. }
  180. }
  181. }
  182. return (/** @type {?} */ (normalizedInput));
  183. }
  184. /**
  185. * @fileoverview added by tsickle
  186. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  187. */
  188. // place in new Date([array])
  189. /** @type {?} */
  190. var YEAR = 0;
  191. /** @type {?} */
  192. var MONTH = 1;
  193. /** @type {?} */
  194. var DATE = 2;
  195. /** @type {?} */
  196. var HOUR = 3;
  197. /** @type {?} */
  198. var MINUTE = 4;
  199. /** @type {?} */
  200. var SECOND = 5;
  201. /** @type {?} */
  202. var MILLISECOND = 6;
  203. /** @type {?} */
  204. var WEEK = 7;
  205. /** @type {?} */
  206. var WEEKDAY = 8;
  207. /**
  208. * @fileoverview added by tsickle
  209. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  210. */
  211. /**
  212. * @param {?} num
  213. * @param {?} targetLength
  214. * @param {?=} forceSign
  215. * @return {?}
  216. */
  217. function zeroFill(num, targetLength, forceSign) {
  218. /** @type {?} */
  219. var absNumber = "" + Math.abs(num);
  220. /** @type {?} */
  221. var zerosToFill = targetLength - absNumber.length;
  222. /** @type {?} */
  223. var sign = num >= 0;
  224. /** @type {?} */
  225. var _sign = sign ? (forceSign ? '+' : '') : '-';
  226. // todo: this is crazy slow
  227. /** @type {?} */
  228. var _zeros = Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1);
  229. return (_sign + _zeros + absNumber);
  230. }
  231. /**
  232. * @fileoverview added by tsickle
  233. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  234. */
  235. /** @type {?} */
  236. var formatFunctions = {};
  237. /** @type {?} */
  238. var formatTokenFunctions = {};
  239. // tslint:disable-next-line
  240. /** @type {?} */
  241. 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;
  242. // token: 'M'
  243. // padded: ['MM', 2]
  244. // ordinal: 'Mo'
  245. // callback: function () { this.month() + 1 }
  246. /**
  247. * @param {?} token
  248. * @param {?} padded
  249. * @param {?} ordinal
  250. * @param {?} callback
  251. * @return {?}
  252. */
  253. function addFormatToken(token, padded, ordinal, callback) {
  254. if (token) {
  255. formatTokenFunctions[token] = callback;
  256. }
  257. if (padded) {
  258. formatTokenFunctions[padded[0]] = (/**
  259. * @return {?}
  260. */
  261. function () {
  262. return zeroFill(callback.apply(null, arguments), padded[1], padded[2]);
  263. });
  264. }
  265. if (ordinal) {
  266. formatTokenFunctions[ordinal] = (/**
  267. * @param {?} date
  268. * @param {?} opts
  269. * @return {?}
  270. */
  271. function (date, opts) {
  272. return opts.locale.ordinal(callback.apply(null, arguments), token);
  273. });
  274. }
  275. }
  276. /**
  277. * @param {?} format
  278. * @return {?}
  279. */
  280. function makeFormatFunction(format) {
  281. /** @type {?} */
  282. var array = format.match(formattingTokens);
  283. /** @type {?} */
  284. var length = array.length;
  285. /** @type {?} */
  286. var formatArr = new Array(length);
  287. for (var i = 0; i < length; i++) {
  288. formatArr[i] = formatTokenFunctions[array[i]]
  289. ? formatTokenFunctions[array[i]]
  290. : removeFormattingTokens(array[i]);
  291. }
  292. return (/**
  293. * @param {?} date
  294. * @param {?} locale
  295. * @param {?} isUTC
  296. * @param {?=} offset
  297. * @return {?}
  298. */
  299. function (date, locale, isUTC, offset) {
  300. if (offset === void 0) { offset = 0; }
  301. /** @type {?} */
  302. var output = '';
  303. for (var j = 0; j < length; j++) {
  304. output += isFunction(formatArr[j])
  305. ? ((/** @type {?} */ (formatArr[j]))).call(null, date, { format: format, locale: locale, isUTC: isUTC, offset: offset })
  306. : formatArr[j];
  307. }
  308. return output;
  309. });
  310. }
  311. /**
  312. * @param {?} input
  313. * @return {?}
  314. */
  315. function removeFormattingTokens(input) {
  316. if (input.match(/\[[\s\S]/)) {
  317. return input.replace(/^\[|\]$/g, '');
  318. }
  319. return input.replace(/\\/g, '');
  320. }
  321. /**
  322. * @fileoverview added by tsickle
  323. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  324. */
  325. /**
  326. * @param {?=} y
  327. * @param {?=} m
  328. * @param {?=} d
  329. * @return {?}
  330. */
  331. function createUTCDate(y, m, d) {
  332. /** @type {?} */
  333. var date = new Date(Date.UTC.apply(null, arguments));
  334. // the Date.UTC function remaps years 0-99 to 1900-1999
  335. if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
  336. date.setUTCFullYear(y);
  337. }
  338. return date;
  339. }
  340. /**
  341. * @param {?=} y
  342. * @param {?=} m
  343. * @param {?=} d
  344. * @param {?=} h
  345. * @param {?=} M
  346. * @param {?=} s
  347. * @param {?=} ms
  348. * @return {?}
  349. */
  350. function createDate(y, m, d, h, M, s, ms) {
  351. if (m === void 0) { m = 0; }
  352. if (d === void 0) { d = 1; }
  353. if (h === void 0) { h = 0; }
  354. if (M === void 0) { M = 0; }
  355. if (s === void 0) { s = 0; }
  356. if (ms === void 0) { ms = 0; }
  357. /** @type {?} */
  358. var date = new Date(y, m, d, h, M, s, ms);
  359. // the date constructor remaps years 0-99 to 1900-1999
  360. if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
  361. date.setFullYear(y);
  362. }
  363. return date;
  364. }
  365. /**
  366. * @fileoverview added by tsickle
  367. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  368. */
  369. /**
  370. * @param {?} date
  371. * @param {?=} isUTC
  372. * @return {?}
  373. */
  374. function getHours(date, isUTC) {
  375. if (isUTC === void 0) { isUTC = false; }
  376. return isUTC ? date.getUTCHours() : date.getHours();
  377. }
  378. /**
  379. * @param {?} date
  380. * @param {?=} isUTC
  381. * @return {?}
  382. */
  383. function getMinutes(date, isUTC) {
  384. if (isUTC === void 0) { isUTC = false; }
  385. return isUTC ? date.getUTCMinutes() : date.getMinutes();
  386. }
  387. /**
  388. * @param {?} date
  389. * @param {?=} isUTC
  390. * @return {?}
  391. */
  392. function getSeconds(date, isUTC) {
  393. if (isUTC === void 0) { isUTC = false; }
  394. return isUTC ? date.getUTCSeconds() : date.getSeconds();
  395. }
  396. /**
  397. * @param {?} date
  398. * @param {?=} isUTC
  399. * @return {?}
  400. */
  401. function getMilliseconds(date, isUTC) {
  402. if (isUTC === void 0) { isUTC = false; }
  403. return isUTC ? date.getUTCMilliseconds() : date.getMilliseconds();
  404. }
  405. /**
  406. * @param {?} date
  407. * @return {?}
  408. */
  409. function getTime(date) {
  410. return date.getTime();
  411. }
  412. /**
  413. * @param {?} date
  414. * @param {?=} isUTC
  415. * @return {?}
  416. */
  417. function getDay(date, isUTC) {
  418. if (isUTC === void 0) { isUTC = false; }
  419. return isUTC ? date.getUTCDay() : date.getDay();
  420. }
  421. /**
  422. * @param {?} date
  423. * @param {?=} isUTC
  424. * @return {?}
  425. */
  426. function getDate(date, isUTC) {
  427. if (isUTC === void 0) { isUTC = false; }
  428. return isUTC ? date.getUTCDate() : date.getDate();
  429. }
  430. /**
  431. * @param {?} date
  432. * @param {?=} isUTC
  433. * @return {?}
  434. */
  435. function getMonth(date, isUTC) {
  436. if (isUTC === void 0) { isUTC = false; }
  437. return isUTC ? date.getUTCMonth() : date.getMonth();
  438. }
  439. /**
  440. * @param {?} date
  441. * @param {?=} isUTC
  442. * @return {?}
  443. */
  444. function getFullYear(date, isUTC) {
  445. if (isUTC === void 0) { isUTC = false; }
  446. return isUTC ? date.getUTCFullYear() : date.getFullYear();
  447. }
  448. /**
  449. * @param {?} date
  450. * @return {?}
  451. */
  452. function unix(date) {
  453. return Math.floor(date.valueOf() / 1000);
  454. }
  455. /**
  456. * @param {?} date
  457. * @return {?}
  458. */
  459. function getFirstDayOfMonth(date) {
  460. return createDate(date.getFullYear(), date.getMonth(), 1, date.getHours(), date.getMinutes(), date.getSeconds());
  461. }
  462. /**
  463. * @param {?} date
  464. * @param {?} firstDayOfWeek
  465. * @return {?}
  466. */
  467. function isFirstDayOfWeek(date, firstDayOfWeek) {
  468. return date.getDay() === firstDayOfWeek;
  469. }
  470. /**
  471. * @param {?} date1
  472. * @param {?} date2
  473. * @return {?}
  474. */
  475. function isSameMonth(date1, date2) {
  476. if (!date1 || !date2) {
  477. return false;
  478. }
  479. return isSameYear(date1, date2) && getMonth(date1) === getMonth(date2);
  480. }
  481. /**
  482. * @param {?} date1
  483. * @param {?} date2
  484. * @return {?}
  485. */
  486. function isSameYear(date1, date2) {
  487. if (!date1 || !date2) {
  488. return false;
  489. }
  490. return getFullYear(date1) === getFullYear(date2);
  491. }
  492. /**
  493. * @param {?} date1
  494. * @param {?} date2
  495. * @return {?}
  496. */
  497. function isSameDay(date1, date2) {
  498. if (!date1 || !date2) {
  499. return false;
  500. }
  501. return (isSameYear(date1, date2) &&
  502. isSameMonth(date1, date2) &&
  503. getDate(date1) === getDate(date2));
  504. }
  505. /**
  506. * @fileoverview added by tsickle
  507. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  508. */
  509. /** @type {?} */
  510. var match1 = /\d/;
  511. // 0 - 9
  512. /** @type {?} */
  513. var match2 = /\d\d/;
  514. // 00 - 99
  515. /** @type {?} */
  516. var match3 = /\d{3}/;
  517. // 000 - 999
  518. /** @type {?} */
  519. var match4 = /\d{4}/;
  520. // 0000 - 9999
  521. /** @type {?} */
  522. var match6 = /[+-]?\d{6}/;
  523. // -999999 - 999999
  524. /** @type {?} */
  525. var match1to2 = /\d\d?/;
  526. // 0 - 99
  527. /** @type {?} */
  528. var match3to4 = /\d\d\d\d?/;
  529. // 999 - 9999
  530. /** @type {?} */
  531. var match5to6 = /\d\d\d\d\d\d?/;
  532. // 99999 - 999999
  533. /** @type {?} */
  534. var match1to3 = /\d{1,3}/;
  535. // 0 - 999
  536. /** @type {?} */
  537. var match1to4 = /\d{1,4}/;
  538. // 0 - 9999
  539. /** @type {?} */
  540. var match1to6 = /[+-]?\d{1,6}/;
  541. // -999999 - 999999
  542. /** @type {?} */
  543. var matchUnsigned = /\d+/;
  544. // 0 - inf
  545. /** @type {?} */
  546. var matchSigned = /[+-]?\d+/;
  547. // +00:00 -00:00 +0000 -0000 or Z
  548. /** @type {?} */
  549. var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi;
  550. // +00 -00 +00:00 -00:00 +0000 -0000 or Z
  551. /** @type {?} */
  552. var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/;
  553. // 123456789 123456789.123
  554. // any word (or two) characters or numbers including two/three word month in arabic.
  555. // includes scottish gaelic two word and hyphenated months
  556. // tslint:disable-next-line
  557. /** @type {?} */
  558. 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;
  559. /** @type {?} */
  560. var regexes = {};
  561. /**
  562. * @param {?} token
  563. * @param {?} regex
  564. * @param {?=} strictRegex
  565. * @return {?}
  566. */
  567. function addRegexToken(token, regex, strictRegex) {
  568. if (isFunction(regex)) {
  569. regexes[token] = regex;
  570. return;
  571. }
  572. regexes[token] = (/**
  573. * @param {?} isStrict
  574. * @param {?} locale
  575. * @return {?}
  576. */
  577. function (isStrict, locale) {
  578. return (isStrict && strictRegex) ? strictRegex : regex;
  579. });
  580. }
  581. /**
  582. * @param {?} token
  583. * @param {?} locale
  584. * @return {?}
  585. */
  586. function getParseRegexForToken(token, locale) {
  587. /** @type {?} */
  588. var _strict = false;
  589. if (!hasOwnProp(regexes, token)) {
  590. return new RegExp(unescapeFormat(token));
  591. }
  592. return regexes[token](_strict, locale);
  593. }
  594. // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
  595. /**
  596. * @param {?} str
  597. * @return {?}
  598. */
  599. function unescapeFormat(str) {
  600. // tslint:disable-next-line
  601. return regexEscape(str
  602. .replace('\\', '')
  603. .replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, (/**
  604. * @param {?} matched
  605. * @param {?} p1
  606. * @param {?} p2
  607. * @param {?} p3
  608. * @param {?} p4
  609. * @return {?}
  610. */
  611. function (matched, p1, p2, p3, p4) { return p1 || p2 || p3 || p4; })));
  612. }
  613. /**
  614. * @param {?} str
  615. * @return {?}
  616. */
  617. function regexEscape(str) {
  618. return str.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
  619. }
  620. /**
  621. * @fileoverview added by tsickle
  622. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  623. */
  624. /** @type {?} */
  625. var tokens = {};
  626. /**
  627. * @param {?} token
  628. * @param {?} callback
  629. * @return {?}
  630. */
  631. function addParseToken(token, callback) {
  632. /** @type {?} */
  633. var _token = isString(token) ? [token] : token;
  634. /** @type {?} */
  635. var func = callback;
  636. if (isNumber(callback)) {
  637. func = (/**
  638. * @param {?} input
  639. * @param {?} array
  640. * @param {?} config
  641. * @return {?}
  642. */
  643. function (input, array, config) {
  644. array[callback] = toInt(input);
  645. return config;
  646. });
  647. }
  648. if (isArray(_token) && isFunction(func)) {
  649. /** @type {?} */
  650. var i = void 0;
  651. for (i = 0; i < _token.length; i++) {
  652. tokens[_token[i]] = func;
  653. }
  654. }
  655. }
  656. /**
  657. * @param {?} token
  658. * @param {?} callback
  659. * @return {?}
  660. */
  661. function addWeekParseToken(token, callback) {
  662. addParseToken(token, (/**
  663. * @param {?} input
  664. * @param {?} array
  665. * @param {?} config
  666. * @param {?} _token
  667. * @return {?}
  668. */
  669. function (input, array, config, _token) {
  670. config._w = config._w || {};
  671. return callback(input, config._w, config, _token);
  672. }));
  673. }
  674. /**
  675. * @param {?} token
  676. * @param {?} input
  677. * @param {?} config
  678. * @return {?}
  679. */
  680. function addTimeToArrayFromToken(token, input, config) {
  681. if (input != null && hasOwnProp(tokens, token)) {
  682. tokens[token](input, config._a, config, token);
  683. }
  684. return config;
  685. }
  686. /**
  687. * @fileoverview added by tsickle
  688. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  689. */
  690. /**
  691. * @return {?}
  692. */
  693. function initDayOfMonth() {
  694. // FORMATTING
  695. addFormatToken('D', ['DD', 2, false], 'Do', (/**
  696. * @param {?} date
  697. * @param {?} opts
  698. * @return {?}
  699. */
  700. function (date, opts) {
  701. return getDate(date, opts.isUTC)
  702. .toString(10);
  703. }));
  704. // ALIASES
  705. addUnitAlias('date', 'D');
  706. // PARSING
  707. addRegexToken('D', match1to2);
  708. addRegexToken('DD', match1to2, match2);
  709. addRegexToken('Do', (/**
  710. * @param {?} isStrict
  711. * @param {?} locale
  712. * @return {?}
  713. */
  714. function (isStrict, locale) {
  715. return locale._dayOfMonthOrdinalParse || locale._ordinalParse;
  716. }));
  717. addParseToken(['D', 'DD'], DATE);
  718. addParseToken('Do', (/**
  719. * @param {?} input
  720. * @param {?} array
  721. * @param {?} config
  722. * @return {?}
  723. */
  724. function (input, array, config) {
  725. array[DATE] = toInt(input.match(match1to2)[0]);
  726. return config;
  727. }));
  728. }
  729. /**
  730. * @fileoverview added by tsickle
  731. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  732. */
  733. /**
  734. * @return {?}
  735. */
  736. function defaultParsingFlags() {
  737. // We need to deep clone this object.
  738. return {
  739. empty: false,
  740. unusedTokens: [],
  741. unusedInput: [],
  742. overflow: -2,
  743. charsLeftOver: 0,
  744. nullInput: false,
  745. invalidMonth: null,
  746. invalidFormat: false,
  747. userInvalidated: false,
  748. iso: false,
  749. parsedDateParts: [],
  750. meridiem: null,
  751. rfc2822: false,
  752. weekdayMismatch: false
  753. };
  754. }
  755. /**
  756. * @param {?} config
  757. * @return {?}
  758. */
  759. function getParsingFlags(config) {
  760. if (config._pf == null) {
  761. config._pf = defaultParsingFlags();
  762. }
  763. return config._pf;
  764. }
  765. /**
  766. * @fileoverview added by tsickle
  767. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  768. */
  769. // FORMATTING
  770. /**
  771. * @param {?} date
  772. * @param {?} opts
  773. * @return {?}
  774. */
  775. function getYear(date, opts) {
  776. return getFullYear(date, opts.isUTC).toString();
  777. }
  778. /**
  779. * @return {?}
  780. */
  781. function initYear() {
  782. addFormatToken('Y', null, null, (/**
  783. * @param {?} date
  784. * @param {?} opts
  785. * @return {?}
  786. */
  787. function (date, opts) {
  788. /** @type {?} */
  789. var y = getFullYear(date, opts.isUTC);
  790. return y <= 9999 ? y.toString(10) : "+" + y;
  791. }));
  792. addFormatToken(null, ['YY', 2, false], null, (/**
  793. * @param {?} date
  794. * @param {?} opts
  795. * @return {?}
  796. */
  797. function (date, opts) {
  798. return (getFullYear(date, opts.isUTC) % 100).toString(10);
  799. }));
  800. addFormatToken(null, ['YYYY', 4, false], null, getYear);
  801. addFormatToken(null, ['YYYYY', 5, false], null, getYear);
  802. addFormatToken(null, ['YYYYYY', 6, true], null, getYear);
  803. // ALIASES
  804. addUnitAlias('year', 'y');
  805. // PARSING
  806. addRegexToken('Y', matchSigned);
  807. addRegexToken('YY', match1to2, match2);
  808. addRegexToken('YYYY', match1to4, match4);
  809. addRegexToken('YYYYY', match1to6, match6);
  810. addRegexToken('YYYYYY', match1to6, match6);
  811. addParseToken(['YYYYY', 'YYYYYY'], YEAR);
  812. addParseToken('YYYY', (/**
  813. * @param {?} input
  814. * @param {?} array
  815. * @param {?} config
  816. * @return {?}
  817. */
  818. function (input, array, config) {
  819. array[YEAR] = input.length === 2 ? parseTwoDigitYear(input) : toInt(input);
  820. return config;
  821. }));
  822. addParseToken('YY', (/**
  823. * @param {?} input
  824. * @param {?} array
  825. * @param {?} config
  826. * @return {?}
  827. */
  828. function (input, array, config) {
  829. array[YEAR] = parseTwoDigitYear(input);
  830. return config;
  831. }));
  832. addParseToken('Y', (/**
  833. * @param {?} input
  834. * @param {?} array
  835. * @param {?} config
  836. * @return {?}
  837. */
  838. function (input, array, config) {
  839. array[YEAR] = parseInt(input, 10);
  840. return config;
  841. }));
  842. }
  843. /**
  844. * @param {?} input
  845. * @return {?}
  846. */
  847. function parseTwoDigitYear(input) {
  848. return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
  849. }
  850. /**
  851. * @param {?} year
  852. * @return {?}
  853. */
  854. function daysInYear(year) {
  855. return isLeapYear(year) ? 366 : 365;
  856. }
  857. /**
  858. * @param {?} year
  859. * @return {?}
  860. */
  861. function isLeapYear(year) {
  862. return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
  863. }
  864. /**
  865. * @fileoverview added by tsickle
  866. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  867. */
  868. // todo: this is duplicate, source in date-getters.ts
  869. /**
  870. * @param {?} year
  871. * @param {?} month
  872. * @return {?}
  873. */
  874. function daysInMonth(year, month) {
  875. if (isNaN(year) || isNaN(month)) {
  876. return NaN;
  877. }
  878. /** @type {?} */
  879. var modMonth = mod(month, 12);
  880. /** @type {?} */
  881. var _year = year + (month - modMonth) / 12;
  882. return modMonth === 1
  883. ? isLeapYear(_year) ? 29 : 28
  884. : (31 - modMonth % 7 % 2);
  885. }
  886. /**
  887. * @return {?}
  888. */
  889. function initMonth() {
  890. // FORMATTING
  891. addFormatToken('M', ['MM', 2, false], 'Mo', (/**
  892. * @param {?} date
  893. * @param {?} opts
  894. * @return {?}
  895. */
  896. function (date, opts) {
  897. return (getMonth(date, opts.isUTC) + 1).toString(10);
  898. }));
  899. addFormatToken('MMM', null, null, (/**
  900. * @param {?} date
  901. * @param {?} opts
  902. * @return {?}
  903. */
  904. function (date, opts) {
  905. return opts.locale.monthsShort(date, opts.format, opts.isUTC);
  906. }));
  907. addFormatToken('MMMM', null, null, (/**
  908. * @param {?} date
  909. * @param {?} opts
  910. * @return {?}
  911. */
  912. function (date, opts) {
  913. return opts.locale.months(date, opts.format, opts.isUTC);
  914. }));
  915. // ALIASES
  916. addUnitAlias('month', 'M');
  917. // PARSING
  918. addRegexToken('M', match1to2);
  919. addRegexToken('MM', match1to2, match2);
  920. addRegexToken('MMM', (/**
  921. * @param {?} isStrict
  922. * @param {?} locale
  923. * @return {?}
  924. */
  925. function (isStrict, locale) {
  926. return locale.monthsShortRegex(isStrict);
  927. }));
  928. addRegexToken('MMMM', (/**
  929. * @param {?} isStrict
  930. * @param {?} locale
  931. * @return {?}
  932. */
  933. function (isStrict, locale) {
  934. return locale.monthsRegex(isStrict);
  935. }));
  936. addParseToken(['M', 'MM'], (/**
  937. * @param {?} input
  938. * @param {?} array
  939. * @param {?} config
  940. * @return {?}
  941. */
  942. function (input, array, config) {
  943. array[MONTH] = toInt(input) - 1;
  944. return config;
  945. }));
  946. addParseToken(['MMM', 'MMMM'], (/**
  947. * @param {?} input
  948. * @param {?} array
  949. * @param {?} config
  950. * @param {?} token
  951. * @return {?}
  952. */
  953. function (input, array, config, token) {
  954. /** @type {?} */
  955. var month = config._locale.monthsParse(input, token, config._strict);
  956. // if we didn't find a month name, mark the date as invalid.
  957. if (month != null) {
  958. array[MONTH] = month;
  959. }
  960. else {
  961. getParsingFlags(config).invalidMonth = !!input;
  962. }
  963. return config;
  964. }));
  965. }
  966. /**
  967. * @fileoverview added by tsickle
  968. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  969. */
  970. /** @type {?} */
  971. var defaultTimeUnit = {
  972. year: 0,
  973. month: 0,
  974. day: 0,
  975. hour: 0,
  976. minute: 0,
  977. seconds: 0
  978. };
  979. /**
  980. * @param {?} date
  981. * @param {?} unit
  982. * @return {?}
  983. */
  984. function shiftDate(date, unit) {
  985. /** @type {?} */
  986. var _unit = Object.assign({}, defaultTimeUnit, unit);
  987. /** @type {?} */
  988. var year = date.getFullYear() + (_unit.year || 0);
  989. /** @type {?} */
  990. var month = date.getMonth() + (_unit.month || 0);
  991. /** @type {?} */
  992. var day = date.getDate() + (_unit.day || 0);
  993. if (_unit.month && !_unit.day) {
  994. day = Math.min(day, daysInMonth(year, month));
  995. }
  996. return createDate(year, month, day, date.getHours() + (_unit.hour || 0), date.getMinutes() + (_unit.minute || 0), date.getSeconds() + (_unit.seconds || 0));
  997. }
  998. /**
  999. * @param {?} date
  1000. * @param {?} unit
  1001. * @return {?}
  1002. */
  1003. function setFullDate(date, unit) {
  1004. 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)
  1005. getNum(date.getHours(), unit.hour), getNum(date.getMinutes(), unit.minute), getNum(date.getSeconds(), unit.seconds), getNum(date.getMilliseconds(), unit.milliseconds));
  1006. }
  1007. /**
  1008. * @param {?} def
  1009. * @param {?=} num
  1010. * @return {?}
  1011. */
  1012. function getNum(def, num) {
  1013. return isNumber(num) ? num : def;
  1014. }
  1015. /**
  1016. * @param {?} date
  1017. * @param {?} value
  1018. * @param {?=} isUTC
  1019. * @return {?}
  1020. */
  1021. function setMonth(date, value, isUTC) {
  1022. /** @type {?} */
  1023. var dayOfMonth = Math.min(getDate(date), daysInMonth(getFullYear(date), value));
  1024. isUTC ? date.setUTCMonth(value, dayOfMonth) : date.setMonth(value, dayOfMonth);
  1025. return date;
  1026. }
  1027. /**
  1028. * @param {?} date
  1029. * @param {?} value
  1030. * @param {?=} isUTC
  1031. * @return {?}
  1032. */
  1033. function setHours(date, value, isUTC) {
  1034. isUTC ? date.setUTCHours(value) : date.setHours(value);
  1035. return date;
  1036. }
  1037. /**
  1038. * @param {?} date
  1039. * @param {?} value
  1040. * @param {?=} isUTC
  1041. * @return {?}
  1042. */
  1043. function setMinutes(date, value, isUTC) {
  1044. isUTC ? date.setUTCMinutes(value) : date.setMinutes(value);
  1045. return date;
  1046. }
  1047. /**
  1048. * @param {?} date
  1049. * @param {?} value
  1050. * @param {?=} isUTC
  1051. * @return {?}
  1052. */
  1053. function setSeconds(date, value, isUTC) {
  1054. isUTC ? date.setUTCSeconds(value) : date.setSeconds(value);
  1055. return date;
  1056. }
  1057. /**
  1058. * @param {?} date
  1059. * @param {?} value
  1060. * @param {?=} isUTC
  1061. * @return {?}
  1062. */
  1063. function setMilliseconds(date, value, isUTC) {
  1064. isUTC ? date.setUTCMilliseconds(value) : date.setMilliseconds(value);
  1065. return date;
  1066. }
  1067. /**
  1068. * @param {?} date
  1069. * @param {?} value
  1070. * @param {?=} isUTC
  1071. * @return {?}
  1072. */
  1073. function setDate(date, value, isUTC) {
  1074. isUTC ? date.setUTCDate(value) : date.setDate(value);
  1075. return date;
  1076. }
  1077. /**
  1078. * @param {?} date
  1079. * @param {?} value
  1080. * @return {?}
  1081. */
  1082. function setTime(date, value) {
  1083. date.setTime(value);
  1084. return date;
  1085. }
  1086. /**
  1087. * @fileoverview added by tsickle
  1088. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  1089. */
  1090. // fastest way to clone date
  1091. // https://jsperf.com/clone-date-object2
  1092. /**
  1093. * @param {?} date
  1094. * @return {?}
  1095. */
  1096. function cloneDate(date) {
  1097. return new Date(date.getTime());
  1098. }
  1099. /**
  1100. * @fileoverview added by tsickle
  1101. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  1102. */
  1103. /**
  1104. * @param {?} date
  1105. * @param {?} unit
  1106. * @param {?=} isUTC
  1107. * @return {?}
  1108. */
  1109. function startOf(date, unit, isUTC) {
  1110. /** @type {?} */
  1111. var _date = cloneDate(date);
  1112. // the following switch intentionally omits break keywords
  1113. // to utilize falling through the cases.
  1114. switch (unit) {
  1115. case 'year':
  1116. setMonth(_date, 0, isUTC);
  1117. /* falls through */
  1118. case 'quarter':
  1119. case 'month':
  1120. setDate(_date, 1, isUTC);
  1121. /* falls through */
  1122. case 'week':
  1123. case 'isoWeek':
  1124. case 'day':
  1125. case 'date':
  1126. setHours(_date, 0, isUTC);
  1127. /* falls through */
  1128. case 'hours':
  1129. setMinutes(_date, 0, isUTC);
  1130. /* falls through */
  1131. case 'minutes':
  1132. setSeconds(_date, 0, isUTC);
  1133. /* falls through */
  1134. case 'seconds':
  1135. setMilliseconds(_date, 0, isUTC);
  1136. }
  1137. // weeks are a special case
  1138. if (unit === 'week') {
  1139. setLocaleDayOfWeek(_date, 0, { isUTC: isUTC });
  1140. }
  1141. if (unit === 'isoWeek') {
  1142. setISODayOfWeek(_date, 1);
  1143. }
  1144. // quarters are also special
  1145. if (unit === 'quarter') {
  1146. setMonth(_date, Math.floor(getMonth(_date, isUTC) / 3) * 3, isUTC);
  1147. }
  1148. return _date;
  1149. }
  1150. /**
  1151. * @param {?} date
  1152. * @param {?} unit
  1153. * @param {?=} isUTC
  1154. * @return {?}
  1155. */
  1156. function endOf(date, unit, isUTC) {
  1157. /** @type {?} */
  1158. var _unit = unit;
  1159. // 'date' is an alias for 'day', so it should be considered as such.
  1160. if (_unit === 'date') {
  1161. _unit = 'day';
  1162. }
  1163. /** @type {?} */
  1164. var start = startOf(date, _unit, isUTC);
  1165. /** @type {?} */
  1166. var _step = add(start, 1, _unit === 'isoWeek' ? 'week' : _unit, isUTC);
  1167. /** @type {?} */
  1168. var res = subtract(_step, 1, 'milliseconds', isUTC);
  1169. return res;
  1170. }
  1171. /**
  1172. * @fileoverview added by tsickle
  1173. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  1174. */
  1175. /**
  1176. * @return {?}
  1177. */
  1178. function initDayOfYear() {
  1179. // FORMATTING
  1180. addFormatToken('DDD', ['DDDD', 3, false], 'DDDo', (/**
  1181. * @param {?} date
  1182. * @return {?}
  1183. */
  1184. function (date) {
  1185. return getDayOfYear(date)
  1186. .toString(10);
  1187. }));
  1188. // ALIASES
  1189. addUnitAlias('dayOfYear', 'DDD');
  1190. addRegexToken('DDD', match1to3);
  1191. addRegexToken('DDDD', match3);
  1192. addParseToken(['DDD', 'DDDD'], (/**
  1193. * @param {?} input
  1194. * @param {?} array
  1195. * @param {?} config
  1196. * @return {?}
  1197. */
  1198. function (input, array, config) {
  1199. config._dayOfYear = toInt(input);
  1200. return config;
  1201. }));
  1202. }
  1203. /**
  1204. * @param {?} date
  1205. * @param {?=} isUTC
  1206. * @return {?}
  1207. */
  1208. function getDayOfYear(date, isUTC) {
  1209. /** @type {?} */
  1210. var date1 = +startOf(date, 'day', isUTC);
  1211. /** @type {?} */
  1212. var date2 = +startOf(date, 'year', isUTC);
  1213. /** @type {?} */
  1214. var someDate = date1 - date2;
  1215. /** @type {?} */
  1216. var oneDay = 1000 * 60 * 60 * 24;
  1217. return Math.round(someDate / oneDay) + 1;
  1218. }
  1219. /**
  1220. * @fileoverview added by tsickle
  1221. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  1222. */
  1223. /**
  1224. * @param {?} year
  1225. * @param {?} dow
  1226. * @param {?} doy
  1227. * @return {?}
  1228. */
  1229. function firstWeekOffset(year, dow, doy) {
  1230. // first-week day -- which january is always in the first week (4 for iso, 1 for other)
  1231. /** @type {?} */
  1232. var fwd = dow - doy + 7;
  1233. // first-week day local weekday -- which local weekday is fwd
  1234. /** @type {?} */
  1235. var fwdlw = (createUTCDate(year, 0, fwd).getUTCDay() - dow + 7) % 7;
  1236. return -fwdlw + fwd - 1;
  1237. }
  1238. // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
  1239. /**
  1240. * @param {?} year
  1241. * @param {?} week
  1242. * @param {?} weekday
  1243. * @param {?} dow
  1244. * @param {?} doy
  1245. * @return {?}
  1246. */
  1247. function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
  1248. /** @type {?} */
  1249. var localWeekday = (7 + weekday - dow) % 7;
  1250. /** @type {?} */
  1251. var weekOffset = firstWeekOffset(year, dow, doy);
  1252. /** @type {?} */
  1253. var dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset;
  1254. /** @type {?} */
  1255. var resYear;
  1256. /** @type {?} */
  1257. var resDayOfYear;
  1258. if (dayOfYear <= 0) {
  1259. resYear = year - 1;
  1260. resDayOfYear = daysInYear(resYear) + dayOfYear;
  1261. }
  1262. else if (dayOfYear > daysInYear(year)) {
  1263. resYear = year + 1;
  1264. resDayOfYear = dayOfYear - daysInYear(year);
  1265. }
  1266. else {
  1267. resYear = year;
  1268. resDayOfYear = dayOfYear;
  1269. }
  1270. return {
  1271. year: resYear,
  1272. dayOfYear: resDayOfYear
  1273. };
  1274. }
  1275. /**
  1276. * @param {?} date
  1277. * @param {?} dow
  1278. * @param {?} doy
  1279. * @param {?=} isUTC
  1280. * @return {?}
  1281. */
  1282. function weekOfYear(date, dow, doy, isUTC) {
  1283. /** @type {?} */
  1284. var weekOffset = firstWeekOffset(getFullYear(date, isUTC), dow, doy);
  1285. /** @type {?} */
  1286. var week = Math.floor((getDayOfYear(date, isUTC) - weekOffset - 1) / 7) + 1;
  1287. /** @type {?} */
  1288. var resWeek;
  1289. /** @type {?} */
  1290. var resYear;
  1291. if (week < 1) {
  1292. resYear = getFullYear(date, isUTC) - 1;
  1293. resWeek = week + weeksInYear(resYear, dow, doy);
  1294. }
  1295. else if (week > weeksInYear(getFullYear(date, isUTC), dow, doy)) {
  1296. resWeek = week - weeksInYear(getFullYear(date, isUTC), dow, doy);
  1297. resYear = getFullYear(date, isUTC) + 1;
  1298. }
  1299. else {
  1300. resYear = getFullYear(date, isUTC);
  1301. resWeek = week;
  1302. }
  1303. return {
  1304. week: resWeek,
  1305. year: resYear
  1306. };
  1307. }
  1308. /**
  1309. * @param {?} year
  1310. * @param {?} dow
  1311. * @param {?} doy
  1312. * @return {?}
  1313. */
  1314. function weeksInYear(year, dow, doy) {
  1315. /** @type {?} */
  1316. var weekOffset = firstWeekOffset(year, dow, doy);
  1317. /** @type {?} */
  1318. var weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
  1319. return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
  1320. }
  1321. /**
  1322. * @fileoverview added by tsickle
  1323. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  1324. */
  1325. /** @type {?} */
  1326. var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;
  1327. /** @type {?} */
  1328. var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
  1329. /** @type {?} */
  1330. var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
  1331. /** @type {?} */
  1332. var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
  1333. /** @type {?} */
  1334. var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');
  1335. /** @type {?} */
  1336. var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');
  1337. /** @type {?} */
  1338. var defaultLongDateFormat = {
  1339. LTS: 'h:mm:ss A',
  1340. LT: 'h:mm A',
  1341. L: 'MM/DD/YYYY',
  1342. LL: 'MMMM D, YYYY',
  1343. LLL: 'MMMM D, YYYY h:mm A',
  1344. LLLL: 'dddd, MMMM D, YYYY h:mm A'
  1345. };
  1346. /** @type {?} */
  1347. var defaultOrdinal = '%d';
  1348. /** @type {?} */
  1349. var defaultDayOfMonthOrdinalParse = /\d{1,2}/;
  1350. /** @type {?} */
  1351. var defaultMonthsShortRegex = matchWord;
  1352. /** @type {?} */
  1353. var defaultMonthsRegex = matchWord;
  1354. var Locale = /** @class */ (function () {
  1355. function Locale(config) {
  1356. if (!!config) {
  1357. this.set(config);
  1358. }
  1359. }
  1360. /**
  1361. * @param {?} config
  1362. * @return {?}
  1363. */
  1364. Locale.prototype.set = /**
  1365. * @param {?} config
  1366. * @return {?}
  1367. */
  1368. function (config) {
  1369. /** @type {?} */
  1370. var confKey;
  1371. for (confKey in config) {
  1372. if (!config.hasOwnProperty(confKey)) {
  1373. continue;
  1374. }
  1375. /** @type {?} */
  1376. var prop = config[(/** @type {?} */ (confKey))];
  1377. /** @type {?} */
  1378. var key = (/** @type {?} */ ((isFunction(prop) ? confKey : "_" + confKey)));
  1379. this[key] = (/** @type {?} */ (prop));
  1380. }
  1381. this._config = config;
  1382. };
  1383. /**
  1384. * @param {?} key
  1385. * @param {?} date
  1386. * @param {?} now
  1387. * @return {?}
  1388. */
  1389. Locale.prototype.calendar = /**
  1390. * @param {?} key
  1391. * @param {?} date
  1392. * @param {?} now
  1393. * @return {?}
  1394. */
  1395. function (key, date, now) {
  1396. /** @type {?} */
  1397. var output = this._calendar[key] || this._calendar.sameElse;
  1398. return isFunction(output) ? output.call(null, date, now) : output;
  1399. };
  1400. /**
  1401. * @param {?} key
  1402. * @return {?}
  1403. */
  1404. Locale.prototype.longDateFormat = /**
  1405. * @param {?} key
  1406. * @return {?}
  1407. */
  1408. function (key) {
  1409. /** @type {?} */
  1410. var format = this._longDateFormat[key];
  1411. /** @type {?} */
  1412. var formatUpper = this._longDateFormat[key.toUpperCase()];
  1413. if (format || !formatUpper) {
  1414. return format;
  1415. }
  1416. this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, (/**
  1417. * @param {?} val
  1418. * @return {?}
  1419. */
  1420. function (val) {
  1421. return val.slice(1);
  1422. }));
  1423. return this._longDateFormat[key];
  1424. };
  1425. Object.defineProperty(Locale.prototype, "invalidDate", {
  1426. get: /**
  1427. * @return {?}
  1428. */
  1429. function () {
  1430. return this._invalidDate;
  1431. },
  1432. set: /**
  1433. * @param {?} val
  1434. * @return {?}
  1435. */
  1436. function (val) {
  1437. this._invalidDate = val;
  1438. },
  1439. enumerable: true,
  1440. configurable: true
  1441. });
  1442. /**
  1443. * @param {?} num
  1444. * @param {?=} token
  1445. * @return {?}
  1446. */
  1447. Locale.prototype.ordinal = /**
  1448. * @param {?} num
  1449. * @param {?=} token
  1450. * @return {?}
  1451. */
  1452. function (num, token) {
  1453. return this._ordinal.replace('%d', num.toString(10));
  1454. };
  1455. /**
  1456. * @param {?} str
  1457. * @return {?}
  1458. */
  1459. Locale.prototype.preparse = /**
  1460. * @param {?} str
  1461. * @return {?}
  1462. */
  1463. function (str) {
  1464. return str;
  1465. };
  1466. /**
  1467. * @param {?} str
  1468. * @return {?}
  1469. */
  1470. Locale.prototype.postformat = /**
  1471. * @param {?} str
  1472. * @return {?}
  1473. */
  1474. function (str) {
  1475. return str;
  1476. };
  1477. /**
  1478. * @param {?} num
  1479. * @param {?} withoutSuffix
  1480. * @param {?} str
  1481. * @param {?} isFuture
  1482. * @return {?}
  1483. */
  1484. Locale.prototype.relativeTime = /**
  1485. * @param {?} num
  1486. * @param {?} withoutSuffix
  1487. * @param {?} str
  1488. * @param {?} isFuture
  1489. * @return {?}
  1490. */
  1491. function (num, withoutSuffix, str, isFuture) {
  1492. /** @type {?} */
  1493. var output = this._relativeTime[str];
  1494. return (isFunction(output)) ?
  1495. output(num, withoutSuffix, str, isFuture) :
  1496. output.replace(/%d/i, num.toString(10));
  1497. };
  1498. /**
  1499. * @param {?} diff
  1500. * @param {?} output
  1501. * @return {?}
  1502. */
  1503. Locale.prototype.pastFuture = /**
  1504. * @param {?} diff
  1505. * @param {?} output
  1506. * @return {?}
  1507. */
  1508. function (diff, output) {
  1509. /** @type {?} */
  1510. var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
  1511. return isFunction(format) ? format(output) : format.replace(/%s/i, output);
  1512. };
  1513. /**
  1514. * @param {?=} date
  1515. * @param {?=} format
  1516. * @param {?=} isUTC
  1517. * @return {?}
  1518. */
  1519. Locale.prototype.months = /**
  1520. * @param {?=} date
  1521. * @param {?=} format
  1522. * @param {?=} isUTC
  1523. * @return {?}
  1524. */
  1525. function (date, format, isUTC) {
  1526. if (isUTC === void 0) { isUTC = false; }
  1527. if (!date) {
  1528. return isArray(this._months)
  1529. ? this._months
  1530. : this._months.standalone;
  1531. }
  1532. if (isArray(this._months)) {
  1533. return this._months[getMonth(date, isUTC)];
  1534. }
  1535. /** @type {?} */
  1536. var key = (this._months.isFormat || MONTHS_IN_FORMAT).test(format)
  1537. ? 'format'
  1538. : 'standalone';
  1539. return this._months[key][getMonth(date, isUTC)];
  1540. };
  1541. /**
  1542. * @param {?=} date
  1543. * @param {?=} format
  1544. * @param {?=} isUTC
  1545. * @return {?}
  1546. */
  1547. Locale.prototype.monthsShort = /**
  1548. * @param {?=} date
  1549. * @param {?=} format
  1550. * @param {?=} isUTC
  1551. * @return {?}
  1552. */
  1553. function (date, format, isUTC) {
  1554. if (isUTC === void 0) { isUTC = false; }
  1555. if (!date) {
  1556. return isArray(this._monthsShort)
  1557. ? this._monthsShort
  1558. : this._monthsShort.standalone;
  1559. }
  1560. if (isArray(this._monthsShort)) {
  1561. return this._monthsShort[getMonth(date, isUTC)];
  1562. }
  1563. /** @type {?} */
  1564. var key = MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone';
  1565. return this._monthsShort[key][getMonth(date, isUTC)];
  1566. };
  1567. /**
  1568. * @param {?} monthName
  1569. * @param {?=} format
  1570. * @param {?=} strict
  1571. * @return {?}
  1572. */
  1573. Locale.prototype.monthsParse = /**
  1574. * @param {?} monthName
  1575. * @param {?=} format
  1576. * @param {?=} strict
  1577. * @return {?}
  1578. */
  1579. function (monthName, format, strict) {
  1580. /** @type {?} */
  1581. var date;
  1582. /** @type {?} */
  1583. var regex;
  1584. if (this._monthsParseExact) {
  1585. return this.handleMonthStrictParse(monthName, format, strict);
  1586. }
  1587. if (!this._monthsParse) {
  1588. this._monthsParse = [];
  1589. this._longMonthsParse = [];
  1590. this._shortMonthsParse = [];
  1591. }
  1592. // TODO: add sorting
  1593. // Sorting makes sure if one month (or abbr) is a prefix of another
  1594. // see sorting in computeMonthsParse
  1595. /** @type {?} */
  1596. var i;
  1597. for (i = 0; i < 12; i++) {
  1598. // make the regex if we don't have it already
  1599. date = new Date(Date.UTC(2000, i));
  1600. if (strict && !this._longMonthsParse[i]) {
  1601. /** @type {?} */
  1602. var _months = this.months(date, '', true).replace('.', '');
  1603. /** @type {?} */
  1604. var _shortMonths = this.monthsShort(date, '', true).replace('.', '');
  1605. this._longMonthsParse[i] = new RegExp("^" + _months + "$", 'i');
  1606. this._shortMonthsParse[i] = new RegExp("^" + _shortMonths + "$", 'i');
  1607. }
  1608. if (!strict && !this._monthsParse[i]) {
  1609. regex = "^" + this.months(date, '', true) + "|^" + this.monthsShort(date, '', true);
  1610. this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
  1611. }
  1612. // test the regex
  1613. if (strict && format === 'MMMM' && ((/** @type {?} */ (this._longMonthsParse[i]))).test(monthName)) {
  1614. return i;
  1615. }
  1616. if (strict && format === 'MMM' && ((/** @type {?} */ (this._shortMonthsParse[i]))).test(monthName)) {
  1617. return i;
  1618. }
  1619. if (!strict && this._monthsParse[i].test(monthName)) {
  1620. return i;
  1621. }
  1622. }
  1623. };
  1624. /**
  1625. * @param {?} isStrict
  1626. * @return {?}
  1627. */
  1628. Locale.prototype.monthsRegex = /**
  1629. * @param {?} isStrict
  1630. * @return {?}
  1631. */
  1632. function (isStrict) {
  1633. if (this._monthsParseExact) {
  1634. if (!hasOwnProp(this, '_monthsRegex')) {
  1635. this.computeMonthsParse();
  1636. }
  1637. if (isStrict) {
  1638. return this._monthsStrictRegex;
  1639. }
  1640. return this._monthsRegex;
  1641. }
  1642. if (!hasOwnProp(this, '_monthsRegex')) {
  1643. this._monthsRegex = defaultMonthsRegex;
  1644. }
  1645. return this._monthsStrictRegex && isStrict ?
  1646. this._monthsStrictRegex : this._monthsRegex;
  1647. };
  1648. /**
  1649. * @param {?} isStrict
  1650. * @return {?}
  1651. */
  1652. Locale.prototype.monthsShortRegex = /**
  1653. * @param {?} isStrict
  1654. * @return {?}
  1655. */
  1656. function (isStrict) {
  1657. if (this._monthsParseExact) {
  1658. if (!hasOwnProp(this, '_monthsRegex')) {
  1659. this.computeMonthsParse();
  1660. }
  1661. if (isStrict) {
  1662. return this._monthsShortStrictRegex;
  1663. }
  1664. return this._monthsShortRegex;
  1665. }
  1666. if (!hasOwnProp(this, '_monthsShortRegex')) {
  1667. this._monthsShortRegex = defaultMonthsShortRegex;
  1668. }
  1669. return this._monthsShortStrictRegex && isStrict ?
  1670. this._monthsShortStrictRegex : this._monthsShortRegex;
  1671. };
  1672. /** Week */
  1673. /**
  1674. * Week
  1675. * @param {?} date
  1676. * @param {?=} isUTC
  1677. * @return {?}
  1678. */
  1679. Locale.prototype.week = /**
  1680. * Week
  1681. * @param {?} date
  1682. * @param {?=} isUTC
  1683. * @return {?}
  1684. */
  1685. function (date, isUTC) {
  1686. return weekOfYear(date, this._week.dow, this._week.doy, isUTC).week;
  1687. };
  1688. /**
  1689. * @return {?}
  1690. */
  1691. Locale.prototype.firstDayOfWeek = /**
  1692. * @return {?}
  1693. */
  1694. function () {
  1695. return this._week.dow;
  1696. };
  1697. /**
  1698. * @return {?}
  1699. */
  1700. Locale.prototype.firstDayOfYear = /**
  1701. * @return {?}
  1702. */
  1703. function () {
  1704. return this._week.doy;
  1705. };
  1706. /**
  1707. * @param {?=} date
  1708. * @param {?=} format
  1709. * @param {?=} isUTC
  1710. * @return {?}
  1711. */
  1712. Locale.prototype.weekdays = /**
  1713. * @param {?=} date
  1714. * @param {?=} format
  1715. * @param {?=} isUTC
  1716. * @return {?}
  1717. */
  1718. function (date, format, isUTC) {
  1719. if (!date) {
  1720. return isArray(this._weekdays)
  1721. ? this._weekdays
  1722. : this._weekdays.standalone;
  1723. }
  1724. if (isArray(this._weekdays)) {
  1725. return this._weekdays[getDay(date, isUTC)];
  1726. }
  1727. /** @type {?} */
  1728. var _key = this._weekdays.isFormat.test(format)
  1729. ? 'format'
  1730. : 'standalone';
  1731. return this._weekdays[_key][getDay(date, isUTC)];
  1732. };
  1733. /**
  1734. * @param {?=} date
  1735. * @param {?=} format
  1736. * @param {?=} isUTC
  1737. * @return {?}
  1738. */
  1739. Locale.prototype.weekdaysMin = /**
  1740. * @param {?=} date
  1741. * @param {?=} format
  1742. * @param {?=} isUTC
  1743. * @return {?}
  1744. */
  1745. function (date, format, isUTC) {
  1746. return date ? this._weekdaysMin[getDay(date, isUTC)] : this._weekdaysMin;
  1747. };
  1748. /**
  1749. * @param {?=} date
  1750. * @param {?=} format
  1751. * @param {?=} isUTC
  1752. * @return {?}
  1753. */
  1754. Locale.prototype.weekdaysShort = /**
  1755. * @param {?=} date
  1756. * @param {?=} format
  1757. * @param {?=} isUTC
  1758. * @return {?}
  1759. */
  1760. function (date, format, isUTC) {
  1761. return date ? this._weekdaysShort[getDay(date, isUTC)] : this._weekdaysShort;
  1762. };
  1763. // proto.weekdaysParse = localeWeekdaysParse;
  1764. // proto.weekdaysParse = localeWeekdaysParse;
  1765. /**
  1766. * @param {?=} weekdayName
  1767. * @param {?=} format
  1768. * @param {?=} strict
  1769. * @return {?}
  1770. */
  1771. Locale.prototype.weekdaysParse =
  1772. // proto.weekdaysParse = localeWeekdaysParse;
  1773. /**
  1774. * @param {?=} weekdayName
  1775. * @param {?=} format
  1776. * @param {?=} strict
  1777. * @return {?}
  1778. */
  1779. function (weekdayName, format, strict) {
  1780. /** @type {?} */
  1781. var i;
  1782. /** @type {?} */
  1783. var regex;
  1784. if (this._weekdaysParseExact) {
  1785. return this.handleWeekStrictParse(weekdayName, format, strict);
  1786. }
  1787. if (!this._weekdaysParse) {
  1788. this._weekdaysParse = [];
  1789. this._minWeekdaysParse = [];
  1790. this._shortWeekdaysParse = [];
  1791. this._fullWeekdaysParse = [];
  1792. }
  1793. for (i = 0; i < 7; i++) {
  1794. // make the regex if we don't have it already
  1795. // fix: here is the issue
  1796. /** @type {?} */
  1797. var date = setDayOfWeek(new Date(Date.UTC(2000, 1)), i, null, true);
  1798. if (strict && !this._fullWeekdaysParse[i]) {
  1799. this._fullWeekdaysParse[i] = new RegExp("^" + this.weekdays(date, '', true).replace('.', '\.?') + "$", 'i');
  1800. this._shortWeekdaysParse[i] = new RegExp("^" + this.weekdaysShort(date, '', true).replace('.', '\.?') + "$", 'i');
  1801. this._minWeekdaysParse[i] = new RegExp("^" + this.weekdaysMin(date, '', true).replace('.', '\.?') + "$", 'i');
  1802. }
  1803. if (!this._weekdaysParse[i]) {
  1804. regex = "^" + this.weekdays(date, '', true) + "|^" + this.weekdaysShort(date, '', true) + "|^" + this.weekdaysMin(date, '', true);
  1805. this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
  1806. }
  1807. if (!isArray(this._fullWeekdaysParse)
  1808. || !isArray(this._shortWeekdaysParse)
  1809. || !isArray(this._minWeekdaysParse)
  1810. || !isArray(this._weekdaysParse)) {
  1811. return;
  1812. }
  1813. // test the regex
  1814. if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {
  1815. return i;
  1816. }
  1817. else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {
  1818. return i;
  1819. }
  1820. else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {
  1821. return i;
  1822. }
  1823. else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
  1824. return i;
  1825. }
  1826. }
  1827. };
  1828. // proto.weekdaysRegex = weekdaysRegex;
  1829. // proto.weekdaysRegex = weekdaysRegex;
  1830. /**
  1831. * @param {?} isStrict
  1832. * @return {?}
  1833. */
  1834. Locale.prototype.weekdaysRegex =
  1835. // proto.weekdaysRegex = weekdaysRegex;
  1836. /**
  1837. * @param {?} isStrict
  1838. * @return {?}
  1839. */
  1840. function (isStrict) {
  1841. if (this._weekdaysParseExact) {
  1842. if (!hasOwnProp(this, '_weekdaysRegex')) {
  1843. this.computeWeekdaysParse();
  1844. }
  1845. if (isStrict) {
  1846. return this._weekdaysStrictRegex;
  1847. }
  1848. else {
  1849. return this._weekdaysRegex;
  1850. }
  1851. }
  1852. else {
  1853. if (!hasOwnProp(this, '_weekdaysRegex')) {
  1854. this._weekdaysRegex = matchWord;
  1855. }
  1856. return this._weekdaysStrictRegex && isStrict ?
  1857. this._weekdaysStrictRegex : this._weekdaysRegex;
  1858. }
  1859. };
  1860. // proto.weekdaysShortRegex = weekdaysShortRegex;
  1861. // proto.weekdaysMinRegex = weekdaysMinRegex;
  1862. // proto.weekdaysShortRegex = weekdaysShortRegex;
  1863. // proto.weekdaysMinRegex = weekdaysMinRegex;
  1864. /**
  1865. * @param {?=} isStrict
  1866. * @return {?}
  1867. */
  1868. Locale.prototype.weekdaysShortRegex =
  1869. // proto.weekdaysShortRegex = weekdaysShortRegex;
  1870. // proto.weekdaysMinRegex = weekdaysMinRegex;
  1871. /**
  1872. * @param {?=} isStrict
  1873. * @return {?}
  1874. */
  1875. function (isStrict) {
  1876. if (this._weekdaysParseExact) {
  1877. if (!hasOwnProp(this, '_weekdaysRegex')) {
  1878. this.computeWeekdaysParse();
  1879. }
  1880. if (isStrict) {
  1881. return this._weekdaysShortStrictRegex;
  1882. }
  1883. else {
  1884. return this._weekdaysShortRegex;
  1885. }
  1886. }
  1887. else {
  1888. if (!hasOwnProp(this, '_weekdaysShortRegex')) {
  1889. this._weekdaysShortRegex = matchWord;
  1890. }
  1891. return this._weekdaysShortStrictRegex && isStrict ?
  1892. this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
  1893. }
  1894. };
  1895. /**
  1896. * @param {?=} isStrict
  1897. * @return {?}
  1898. */
  1899. Locale.prototype.weekdaysMinRegex = /**
  1900. * @param {?=} isStrict
  1901. * @return {?}
  1902. */
  1903. function (isStrict) {
  1904. if (this._weekdaysParseExact) {
  1905. if (!hasOwnProp(this, '_weekdaysRegex')) {
  1906. this.computeWeekdaysParse();
  1907. }
  1908. if (isStrict) {
  1909. return this._weekdaysMinStrictRegex;
  1910. }
  1911. else {
  1912. return this._weekdaysMinRegex;
  1913. }
  1914. }
  1915. else {
  1916. if (!hasOwnProp(this, '_weekdaysMinRegex')) {
  1917. this._weekdaysMinRegex = matchWord;
  1918. }
  1919. return this._weekdaysMinStrictRegex && isStrict ?
  1920. this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
  1921. }
  1922. };
  1923. /**
  1924. * @param {?} input
  1925. * @return {?}
  1926. */
  1927. Locale.prototype.isPM = /**
  1928. * @param {?} input
  1929. * @return {?}
  1930. */
  1931. function (input) {
  1932. // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
  1933. // Using charAt should be more compatible.
  1934. return input.toLowerCase().charAt(0) === 'p';
  1935. };
  1936. /**
  1937. * @param {?} hours
  1938. * @param {?} minutes
  1939. * @param {?} isLower
  1940. * @return {?}
  1941. */
  1942. Locale.prototype.meridiem = /**
  1943. * @param {?} hours
  1944. * @param {?} minutes
  1945. * @param {?} isLower
  1946. * @return {?}
  1947. */
  1948. function (hours, minutes, isLower) {
  1949. if (hours > 11) {
  1950. return isLower ? 'pm' : 'PM';
  1951. }
  1952. return isLower ? 'am' : 'AM';
  1953. };
  1954. /**
  1955. * @param {?} key
  1956. * @return {?}
  1957. */
  1958. Locale.prototype.formatLongDate = /**
  1959. * @param {?} key
  1960. * @return {?}
  1961. */
  1962. function (key) {
  1963. this._longDateFormat = this._longDateFormat ? this._longDateFormat : defaultLongDateFormat;
  1964. /** @type {?} */
  1965. var format = this._longDateFormat[key];
  1966. /** @type {?} */
  1967. var formatUpper = this._longDateFormat[key.toUpperCase()];
  1968. if (format || !formatUpper) {
  1969. return format;
  1970. }
  1971. this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, (/**
  1972. * @param {?} val
  1973. * @return {?}
  1974. */
  1975. function (val) {
  1976. return val.slice(1);
  1977. }));
  1978. return this._longDateFormat[key];
  1979. };
  1980. /**
  1981. * @private
  1982. * @param {?} monthName
  1983. * @param {?} format
  1984. * @param {?=} strict
  1985. * @return {?}
  1986. */
  1987. Locale.prototype.handleMonthStrictParse = /**
  1988. * @private
  1989. * @param {?} monthName
  1990. * @param {?} format
  1991. * @param {?=} strict
  1992. * @return {?}
  1993. */
  1994. function (monthName, format, strict) {
  1995. /** @type {?} */
  1996. var llc = monthName.toLocaleLowerCase();
  1997. /** @type {?} */
  1998. var i;
  1999. /** @type {?} */
  2000. var ii;
  2001. /** @type {?} */
  2002. var mom;
  2003. if (!this._monthsParse) {
  2004. // this is not used
  2005. this._monthsParse = [];
  2006. this._longMonthsParse = [];
  2007. this._shortMonthsParse = [];
  2008. for (i = 0; i < 12; ++i) {
  2009. mom = new Date(2000, i);
  2010. this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();
  2011. this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
  2012. }
  2013. }
  2014. if (strict) {
  2015. if (format === 'MMM') {
  2016. ii = ((/** @type {?} */ (this._shortMonthsParse))).indexOf(llc);
  2017. return ii !== -1 ? ii : null;
  2018. }
  2019. ii = ((/** @type {?} */ (this._longMonthsParse))).indexOf(llc);
  2020. return ii !== -1 ? ii : null;
  2021. }
  2022. if (format === 'MMM') {
  2023. ii = ((/** @type {?} */ (this._shortMonthsParse))).indexOf(llc);
  2024. if (ii !== -1) {
  2025. return ii;
  2026. }
  2027. ii = ((/** @type {?} */ (this._longMonthsParse))).indexOf(llc);
  2028. return ii !== -1 ? ii : null;
  2029. }
  2030. ii = ((/** @type {?} */ (this._longMonthsParse))).indexOf(llc);
  2031. if (ii !== -1) {
  2032. return ii;
  2033. }
  2034. ii = ((/** @type {?} */ (this._shortMonthsParse))).indexOf(llc);
  2035. return ii !== -1 ? ii : null;
  2036. };
  2037. /**
  2038. * @private
  2039. * @param {?} weekdayName
  2040. * @param {?} format
  2041. * @param {?} strict
  2042. * @return {?}
  2043. */
  2044. Locale.prototype.handleWeekStrictParse = /**
  2045. * @private
  2046. * @param {?} weekdayName
  2047. * @param {?} format
  2048. * @param {?} strict
  2049. * @return {?}
  2050. */
  2051. function (weekdayName, format, strict) {
  2052. /** @type {?} */
  2053. var ii;
  2054. /** @type {?} */
  2055. var llc = weekdayName.toLocaleLowerCase();
  2056. if (!this._weekdaysParse) {
  2057. this._weekdaysParse = [];
  2058. this._shortWeekdaysParse = [];
  2059. this._minWeekdaysParse = [];
  2060. /** @type {?} */
  2061. var i = void 0;
  2062. for (i = 0; i < 7; ++i) {
  2063. /** @type {?} */
  2064. var date = setDayOfWeek(new Date(Date.UTC(2000, 1)), i, null, true);
  2065. this._minWeekdaysParse[i] = this.weekdaysMin(date).toLocaleLowerCase();
  2066. this._shortWeekdaysParse[i] = this.weekdaysShort(date).toLocaleLowerCase();
  2067. this._weekdaysParse[i] = this.weekdays(date, '').toLocaleLowerCase();
  2068. }
  2069. }
  2070. if (!isArray(this._weekdaysParse)
  2071. || !isArray(this._shortWeekdaysParse)
  2072. || !isArray(this._minWeekdaysParse)) {
  2073. return;
  2074. }
  2075. if (strict) {
  2076. if (format === 'dddd') {
  2077. ii = this._weekdaysParse.indexOf(llc);
  2078. return ii !== -1 ? ii : null;
  2079. }
  2080. else if (format === 'ddd') {
  2081. ii = this._shortWeekdaysParse.indexOf(llc);
  2082. return ii !== -1 ? ii : null;
  2083. }
  2084. else {
  2085. ii = this._minWeekdaysParse.indexOf(llc);
  2086. return ii !== -1 ? ii : null;
  2087. }
  2088. }
  2089. else {
  2090. if (format === 'dddd') {
  2091. ii = this._weekdaysParse.indexOf(llc);
  2092. if (ii !== -1) {
  2093. return ii;
  2094. }
  2095. ii = this._shortWeekdaysParse.indexOf(llc);
  2096. if (ii !== -1) {
  2097. return ii;
  2098. }
  2099. ii = this._minWeekdaysParse.indexOf(llc);
  2100. return ii !== -1 ? ii : null;
  2101. }
  2102. else if (format === 'ddd') {
  2103. ii = this._shortWeekdaysParse.indexOf(llc);
  2104. if (ii !== -1) {
  2105. return ii;
  2106. }
  2107. ii = this._weekdaysParse.indexOf(llc);
  2108. if (ii !== -1) {
  2109. return ii;
  2110. }
  2111. ii = this._minWeekdaysParse.indexOf(llc);
  2112. return ii !== -1 ? ii : null;
  2113. }
  2114. else {
  2115. ii = this._minWeekdaysParse.indexOf(llc);
  2116. if (ii !== -1) {
  2117. return ii;
  2118. }
  2119. ii = this._weekdaysParse.indexOf(llc);
  2120. if (ii !== -1) {
  2121. return ii;
  2122. }
  2123. ii = this._shortWeekdaysParse.indexOf(llc);
  2124. return ii !== -1 ? ii : null;
  2125. }
  2126. }
  2127. };
  2128. /**
  2129. * @private
  2130. * @return {?}
  2131. */
  2132. Locale.prototype.computeMonthsParse = /**
  2133. * @private
  2134. * @return {?}
  2135. */
  2136. function () {
  2137. /** @type {?} */
  2138. var shortPieces = [];
  2139. /** @type {?} */
  2140. var longPieces = [];
  2141. /** @type {?} */
  2142. var mixedPieces = [];
  2143. /** @type {?} */
  2144. var date;
  2145. /** @type {?} */
  2146. var i;
  2147. for (i = 0; i < 12; i++) {
  2148. // make the regex if we don't have it already
  2149. date = new Date(2000, i);
  2150. shortPieces.push(this.monthsShort(date, ''));
  2151. longPieces.push(this.months(date, ''));
  2152. mixedPieces.push(this.months(date, ''));
  2153. mixedPieces.push(this.monthsShort(date, ''));
  2154. }
  2155. // Sorting makes sure if one month (or abbr) is a prefix of another it
  2156. // will match the longer piece.
  2157. shortPieces.sort(cmpLenRev);
  2158. longPieces.sort(cmpLenRev);
  2159. mixedPieces.sort(cmpLenRev);
  2160. for (i = 0; i < 12; i++) {
  2161. shortPieces[i] = regexEscape(shortPieces[i]);
  2162. longPieces[i] = regexEscape(longPieces[i]);
  2163. }
  2164. for (i = 0; i < 24; i++) {
  2165. mixedPieces[i] = regexEscape(mixedPieces[i]);
  2166. }
  2167. this._monthsRegex = new RegExp("^(" + mixedPieces.join('|') + ")", 'i');
  2168. this._monthsShortRegex = this._monthsRegex;
  2169. this._monthsStrictRegex = new RegExp("^(" + longPieces.join('|') + ")", 'i');
  2170. this._monthsShortStrictRegex = new RegExp("^(" + shortPieces.join('|') + ")", 'i');
  2171. };
  2172. /**
  2173. * @private
  2174. * @return {?}
  2175. */
  2176. Locale.prototype.computeWeekdaysParse = /**
  2177. * @private
  2178. * @return {?}
  2179. */
  2180. function () {
  2181. /** @type {?} */
  2182. var minPieces = [];
  2183. /** @type {?} */
  2184. var shortPieces = [];
  2185. /** @type {?} */
  2186. var longPieces = [];
  2187. /** @type {?} */
  2188. var mixedPieces = [];
  2189. /** @type {?} */
  2190. var i;
  2191. for (i = 0; i < 7; i++) {
  2192. // make the regex if we don't have it already
  2193. // let mom = createUTC([2000, 1]).day(i);
  2194. /** @type {?} */
  2195. var date = setDayOfWeek(new Date(Date.UTC(2000, 1)), i, null, true);
  2196. /** @type {?} */
  2197. var minp = this.weekdaysMin(date);
  2198. /** @type {?} */
  2199. var shortp = this.weekdaysShort(date);
  2200. /** @type {?} */
  2201. var longp = this.weekdays(date);
  2202. minPieces.push(minp);
  2203. shortPieces.push(shortp);
  2204. longPieces.push(longp);
  2205. mixedPieces.push(minp);
  2206. mixedPieces.push(shortp);
  2207. mixedPieces.push(longp);
  2208. }
  2209. // Sorting makes sure if one weekday (or abbr) is a prefix of another it
  2210. // will match the longer piece.
  2211. minPieces.sort(cmpLenRev);
  2212. shortPieces.sort(cmpLenRev);
  2213. longPieces.sort(cmpLenRev);
  2214. mixedPieces.sort(cmpLenRev);
  2215. for (i = 0; i < 7; i++) {
  2216. shortPieces[i] = regexEscape(shortPieces[i]);
  2217. longPieces[i] = regexEscape(longPieces[i]);
  2218. mixedPieces[i] = regexEscape(mixedPieces[i]);
  2219. }
  2220. this._weekdaysRegex = new RegExp("^(" + mixedPieces.join('|') + ")", 'i');
  2221. this._weekdaysShortRegex = this._weekdaysRegex;
  2222. this._weekdaysMinRegex = this._weekdaysRegex;
  2223. this._weekdaysStrictRegex = new RegExp("^(" + longPieces.join('|') + ")", 'i');
  2224. this._weekdaysShortStrictRegex = new RegExp("^(" + shortPieces.join('|') + ")", 'i');
  2225. this._weekdaysMinStrictRegex = new RegExp("^(" + minPieces.join('|') + ")", 'i');
  2226. };
  2227. return Locale;
  2228. }());
  2229. /**
  2230. * @param {?} a
  2231. * @param {?} b
  2232. * @return {?}
  2233. */
  2234. function cmpLenRev(a, b) {
  2235. return b.length - a.length;
  2236. }
  2237. /**
  2238. * @fileoverview added by tsickle
  2239. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2240. */
  2241. /** @type {?} */
  2242. var defaultCalendar = {
  2243. sameDay: '[Today at] LT',
  2244. nextDay: '[Tomorrow at] LT',
  2245. nextWeek: 'dddd [at] LT',
  2246. lastDay: '[Yesterday at] LT',
  2247. lastWeek: '[Last] dddd [at] LT',
  2248. sameElse: 'L'
  2249. };
  2250. /**
  2251. * @fileoverview added by tsickle
  2252. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2253. */
  2254. /** @type {?} */
  2255. var defaultInvalidDate = 'Invalid date';
  2256. /** @type {?} */
  2257. var defaultLocaleWeek = {
  2258. dow: 0,
  2259. // Sunday is the first day of the week.
  2260. doy: 6 // The week that contains Jan 1st is the first week of the year.
  2261. };
  2262. /** @type {?} */
  2263. var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;
  2264. /** @type {?} */
  2265. var defaultRelativeTime = {
  2266. future: 'in %s',
  2267. past: '%s ago',
  2268. s: 'a few seconds',
  2269. ss: '%d seconds',
  2270. m: 'a minute',
  2271. mm: '%d minutes',
  2272. h: 'an hour',
  2273. hh: '%d hours',
  2274. d: 'a day',
  2275. dd: '%d days',
  2276. M: 'a month',
  2277. MM: '%d months',
  2278. y: 'a year',
  2279. yy: '%d years'
  2280. };
  2281. /** @type {?} */
  2282. var baseConfig = {
  2283. calendar: defaultCalendar,
  2284. longDateFormat: defaultLongDateFormat,
  2285. invalidDate: defaultInvalidDate,
  2286. ordinal: defaultOrdinal,
  2287. dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
  2288. relativeTime: defaultRelativeTime,
  2289. months: defaultLocaleMonths,
  2290. monthsShort: defaultLocaleMonthsShort,
  2291. week: defaultLocaleWeek,
  2292. weekdays: defaultLocaleWeekdays,
  2293. weekdaysMin: defaultLocaleWeekdaysMin,
  2294. weekdaysShort: defaultLocaleWeekdaysShort,
  2295. meridiemParse: defaultLocaleMeridiemParse
  2296. };
  2297. /**
  2298. * @fileoverview added by tsickle
  2299. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2300. */
  2301. /**
  2302. * @template T
  2303. * @param {?} array1
  2304. * @param {?} array2
  2305. * @param {?} dontConvert
  2306. * @return {?}
  2307. */
  2308. function compareArrays(array1, array2, dontConvert) {
  2309. /** @type {?} */
  2310. var len = Math.min(array1.length, array2.length);
  2311. /** @type {?} */
  2312. var lengthDiff = Math.abs(array1.length - array2.length);
  2313. /** @type {?} */
  2314. var diffs = 0;
  2315. /** @type {?} */
  2316. var i;
  2317. for (i = 0; i < len; i++) {
  2318. if ((dontConvert && array1[i] !== array2[i])
  2319. || (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
  2320. diffs++;
  2321. }
  2322. }
  2323. return diffs + lengthDiff;
  2324. }
  2325. /**
  2326. * @fileoverview added by tsickle
  2327. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2328. */
  2329. // FORMATTING
  2330. /**
  2331. * @return {?}
  2332. */
  2333. function initWeek() {
  2334. addFormatToken('w', ['ww', 2, false], 'wo', (/**
  2335. * @param {?} date
  2336. * @param {?} opts
  2337. * @return {?}
  2338. */
  2339. function (date, opts) {
  2340. return getWeek(date, opts.locale)
  2341. .toString(10);
  2342. }));
  2343. addFormatToken('W', ['WW', 2, false], 'Wo', (/**
  2344. * @param {?} date
  2345. * @return {?}
  2346. */
  2347. function (date) {
  2348. return getISOWeek(date)
  2349. .toString(10);
  2350. }));
  2351. // ALIASES
  2352. addUnitAlias('week', 'w');
  2353. addUnitAlias('isoWeek', 'W');
  2354. // PARSING
  2355. addRegexToken('w', match1to2);
  2356. addRegexToken('ww', match1to2, match2);
  2357. addRegexToken('W', match1to2);
  2358. addRegexToken('WW', match1to2, match2);
  2359. addWeekParseToken(['w', 'ww', 'W', 'WW'], (/**
  2360. * @param {?} input
  2361. * @param {?} week
  2362. * @param {?} config
  2363. * @param {?} token
  2364. * @return {?}
  2365. */
  2366. function (input, week, config, token) {
  2367. week[token.substr(0, 1)] = toInt(input);
  2368. return config;
  2369. }));
  2370. // export function getSetWeek (input) {
  2371. // var week = this.localeData().week(this);
  2372. // return input == null ? week : this.add((input - week) * 7, 'd');
  2373. // }
  2374. }
  2375. /**
  2376. * @param {?} date
  2377. * @param {?=} locale
  2378. * @param {?=} isUTC
  2379. * @return {?}
  2380. */
  2381. function getWeek(date, locale, isUTC) {
  2382. if (locale === void 0) { locale = getLocale(); }
  2383. return locale.week(date, isUTC);
  2384. }
  2385. /**
  2386. * @param {?} date
  2387. * @param {?=} isUTC
  2388. * @return {?}
  2389. */
  2390. function getISOWeek(date, isUTC) {
  2391. return weekOfYear(date, 1, 4, isUTC).week;
  2392. }
  2393. /**
  2394. * @fileoverview added by tsickle
  2395. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2396. */
  2397. // FORMATTING
  2398. /**
  2399. * @return {?}
  2400. */
  2401. function initWeekYear() {
  2402. addFormatToken(null, ['gg', 2, false], null, (/**
  2403. * @param {?} date
  2404. * @param {?} opts
  2405. * @return {?}
  2406. */
  2407. function (date, opts) {
  2408. // return this.weekYear() % 100;
  2409. return (getWeekYear(date, opts.locale) % 100).toString();
  2410. }));
  2411. addFormatToken(null, ['GG', 2, false], null, (/**
  2412. * @param {?} date
  2413. * @return {?}
  2414. */
  2415. function (date) {
  2416. // return this.isoWeekYear() % 100;
  2417. return (getISOWeekYear(date) % 100).toString();
  2418. }));
  2419. addWeekYearFormatToken('gggg', _getWeekYearFormatCb);
  2420. addWeekYearFormatToken('ggggg', _getWeekYearFormatCb);
  2421. addWeekYearFormatToken('GGGG', _getISOWeekYearFormatCb);
  2422. addWeekYearFormatToken('GGGGG', _getISOWeekYearFormatCb);
  2423. // ALIASES
  2424. addUnitAlias('weekYear', 'gg');
  2425. addUnitAlias('isoWeekYear', 'GG');
  2426. // PARSING
  2427. addRegexToken('G', matchSigned);
  2428. addRegexToken('g', matchSigned);
  2429. addRegexToken('GG', match1to2, match2);
  2430. addRegexToken('gg', match1to2, match2);
  2431. addRegexToken('GGGG', match1to4, match4);
  2432. addRegexToken('gggg', match1to4, match4);
  2433. addRegexToken('GGGGG', match1to6, match6);
  2434. addRegexToken('ggggg', match1to6, match6);
  2435. addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], (/**
  2436. * @param {?} input
  2437. * @param {?} week
  2438. * @param {?} config
  2439. * @param {?} token
  2440. * @return {?}
  2441. */
  2442. function (input, week, config, token) {
  2443. week[token.substr(0, 2)] = toInt(input);
  2444. return config;
  2445. }));
  2446. addWeekParseToken(['gg', 'GG'], (/**
  2447. * @param {?} input
  2448. * @param {?} week
  2449. * @param {?} config
  2450. * @param {?} token
  2451. * @return {?}
  2452. */
  2453. function (input, week, config, token) {
  2454. week[token] = parseTwoDigitYear(input);
  2455. return config;
  2456. }));
  2457. }
  2458. /**
  2459. * @param {?} token
  2460. * @param {?} getter
  2461. * @return {?}
  2462. */
  2463. function addWeekYearFormatToken(token, getter) {
  2464. addFormatToken(null, [token, token.length, false], null, getter);
  2465. }
  2466. /**
  2467. * @param {?} date
  2468. * @param {?} opts
  2469. * @return {?}
  2470. */
  2471. function _getWeekYearFormatCb(date, opts) {
  2472. return getWeekYear(date, opts.locale).toString();
  2473. }
  2474. /**
  2475. * @param {?} date
  2476. * @return {?}
  2477. */
  2478. function _getISOWeekYearFormatCb(date) {
  2479. return getISOWeekYear(date).toString();
  2480. }
  2481. /**
  2482. * @param {?} date
  2483. * @param {?=} locale
  2484. * @param {?=} isUTC
  2485. * @return {?}
  2486. */
  2487. function getWeekYear(date, locale, isUTC) {
  2488. if (locale === void 0) { locale = getLocale(); }
  2489. return weekOfYear(date, locale.firstDayOfWeek(), locale.firstDayOfYear(), isUTC).year;
  2490. }
  2491. /**
  2492. * @param {?} date
  2493. * @param {?=} isUTC
  2494. * @return {?}
  2495. */
  2496. function getISOWeekYear(date, isUTC) {
  2497. return weekOfYear(date, 1, 4, isUTC).year;
  2498. }
  2499. /**
  2500. * @fileoverview added by tsickle
  2501. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2502. */
  2503. // todo: add support for timezones
  2504. /**
  2505. * @return {?}
  2506. */
  2507. function initTimezone() {
  2508. // FORMATTING
  2509. addFormatToken('z', null, null, (/**
  2510. * @param {?} date
  2511. * @param {?} opts
  2512. * @return {?}
  2513. */
  2514. function (date, opts) {
  2515. return opts.isUTC ? 'UTC' : '';
  2516. }));
  2517. addFormatToken('zz', null, null, (/**
  2518. * @param {?} date
  2519. * @param {?} opts
  2520. * @return {?}
  2521. */
  2522. function (date, opts) {
  2523. return opts.isUTC ? 'Coordinated Universal Time' : '';
  2524. }));
  2525. }
  2526. /**
  2527. * @fileoverview added by tsickle
  2528. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2529. */
  2530. /**
  2531. * @return {?}
  2532. */
  2533. function initTimestamp() {
  2534. // FORMATTING
  2535. addFormatToken('X', null, null, (/**
  2536. * @param {?} date
  2537. * @return {?}
  2538. */
  2539. function (date) {
  2540. return unix(date)
  2541. .toString(10);
  2542. }));
  2543. addFormatToken('x', null, null, (/**
  2544. * @param {?} date
  2545. * @return {?}
  2546. */
  2547. function (date) {
  2548. return date.valueOf()
  2549. .toString(10);
  2550. }));
  2551. // PARSING
  2552. addRegexToken('x', matchSigned);
  2553. addRegexToken('X', matchTimestamp);
  2554. addParseToken('X', (/**
  2555. * @param {?} input
  2556. * @param {?} array
  2557. * @param {?} config
  2558. * @return {?}
  2559. */
  2560. function (input, array, config) {
  2561. config._d = new Date(parseFloat(input) * 1000);
  2562. return config;
  2563. }));
  2564. addParseToken('x', (/**
  2565. * @param {?} input
  2566. * @param {?} array
  2567. * @param {?} config
  2568. * @return {?}
  2569. */
  2570. function (input, array, config) {
  2571. config._d = new Date(toInt(input));
  2572. return config;
  2573. }));
  2574. }
  2575. /**
  2576. * @fileoverview added by tsickle
  2577. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2578. */
  2579. /**
  2580. * @return {?}
  2581. */
  2582. function initSecond() {
  2583. // FORMATTING
  2584. addFormatToken('s', ['ss', 2, false], null, (/**
  2585. * @param {?} date
  2586. * @param {?} opts
  2587. * @return {?}
  2588. */
  2589. function (date, opts) {
  2590. return getSeconds(date, opts.isUTC)
  2591. .toString(10);
  2592. }));
  2593. // ALIASES
  2594. addUnitAlias('second', 's');
  2595. // PARSING
  2596. addRegexToken('s', match1to2);
  2597. addRegexToken('ss', match1to2, match2);
  2598. addParseToken(['s', 'ss'], SECOND);
  2599. }
  2600. /**
  2601. * @fileoverview added by tsickle
  2602. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2603. */
  2604. /**
  2605. * @return {?}
  2606. */
  2607. function initQuarter() {
  2608. // FORMATTING
  2609. addFormatToken('Q', null, 'Qo', (/**
  2610. * @param {?} date
  2611. * @param {?} opts
  2612. * @return {?}
  2613. */
  2614. function (date, opts) {
  2615. return getQuarter(date, opts.isUTC)
  2616. .toString(10);
  2617. }));
  2618. // ALIASES
  2619. addUnitAlias('quarter', 'Q');
  2620. // PARSING
  2621. addRegexToken('Q', match1);
  2622. addParseToken('Q', (/**
  2623. * @param {?} input
  2624. * @param {?} array
  2625. * @param {?} config
  2626. * @return {?}
  2627. */
  2628. function (input, array, config) {
  2629. array[MONTH] = (toInt(input) - 1) * 3;
  2630. return config;
  2631. }));
  2632. }
  2633. // MOMENTS
  2634. /**
  2635. * @param {?} date
  2636. * @param {?=} isUTC
  2637. * @return {?}
  2638. */
  2639. function getQuarter(date, isUTC) {
  2640. if (isUTC === void 0) { isUTC = false; }
  2641. return Math.ceil((getMonth(date, isUTC) + 1) / 3);
  2642. }
  2643. /**
  2644. * @fileoverview added by tsickle
  2645. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2646. */
  2647. /**
  2648. * @param {?} token
  2649. * @param {?} separator
  2650. * @return {?}
  2651. */
  2652. function addOffsetFormatToken(token, separator) {
  2653. addFormatToken(token, null, null, (/**
  2654. * @param {?} date
  2655. * @param {?} config
  2656. * @return {?}
  2657. */
  2658. function (date, config) {
  2659. /** @type {?} */
  2660. var offset = getUTCOffset(date, { _isUTC: config.isUTC, _offset: config.offset });
  2661. /** @type {?} */
  2662. var sign = '+';
  2663. if (offset < 0) {
  2664. offset = -offset;
  2665. sign = '-';
  2666. }
  2667. return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);
  2668. }));
  2669. }
  2670. /**
  2671. * @return {?}
  2672. */
  2673. function initOffset() {
  2674. addOffsetFormatToken('Z', ':');
  2675. addOffsetFormatToken('ZZ', '');
  2676. // PARSING
  2677. addRegexToken('Z', matchShortOffset);
  2678. addRegexToken('ZZ', matchShortOffset);
  2679. addParseToken(['Z', 'ZZ'], (/**
  2680. * @param {?} input
  2681. * @param {?} array
  2682. * @param {?} config
  2683. * @return {?}
  2684. */
  2685. function (input, array, config) {
  2686. config._useUTC = true;
  2687. config._tzm = offsetFromString(matchShortOffset, input);
  2688. return config;
  2689. }));
  2690. }
  2691. // HELPERS
  2692. // timezone chunker
  2693. // '+10:00' > ['10', '00']
  2694. // '-1530' > ['-15', '30']
  2695. /** @type {?} */
  2696. var chunkOffset = /([\+\-]|\d\d)/gi;
  2697. /**
  2698. * @param {?} matcher
  2699. * @param {?} str
  2700. * @return {?}
  2701. */
  2702. function offsetFromString(matcher, str) {
  2703. /** @type {?} */
  2704. var matches = (str || '').match(matcher);
  2705. if (matches === null) {
  2706. return null;
  2707. }
  2708. /** @type {?} */
  2709. var chunk = matches[matches.length - 1];
  2710. /** @type {?} */
  2711. var parts = chunk.match(chunkOffset) || ['-', '0', '0'];
  2712. /** @type {?} */
  2713. var minutes = parseInt(parts[1], 10) * 60 + toInt(parts[2]);
  2714. /** @type {?} */
  2715. var _min = parts[0] === '+' ? minutes : -minutes;
  2716. return minutes === 0 ? 0 : _min;
  2717. }
  2718. // Return a moment from input, that is local/utc/zone equivalent to model.
  2719. /**
  2720. * @param {?} input
  2721. * @param {?} date
  2722. * @param {?=} config
  2723. * @return {?}
  2724. */
  2725. function cloneWithOffset(input, date, config) {
  2726. if (config === void 0) { config = {}; }
  2727. if (!config._isUTC) {
  2728. return input;
  2729. }
  2730. /** @type {?} */
  2731. var res = cloneDate(date);
  2732. // todo: input._d - res._d + ((res._offset || 0) - (input._offset || 0))*60000
  2733. /** @type {?} */
  2734. var offsetDiff = (config._offset || 0) * 60000;
  2735. /** @type {?} */
  2736. var diff = input.valueOf() - res.valueOf() + offsetDiff;
  2737. // Use low-level api, because this fn is low-level api.
  2738. res.setTime(res.valueOf() + diff);
  2739. // todo: add timezone handling
  2740. // hooks.updateOffset(res, false);
  2741. return res;
  2742. }
  2743. /**
  2744. * @param {?} date
  2745. * @return {?}
  2746. */
  2747. function getDateOffset(date) {
  2748. // On Firefox.24 Date#getTimezoneOffset returns a floating point.
  2749. // https://github.com/moment/moment/pull/1871
  2750. return -Math.round(date.getTimezoneOffset() / 15) * 15;
  2751. }
  2752. // HOOKS
  2753. // This function will be called whenever a moment is mutated.
  2754. // It is intended to keep the offset in sync with the timezone.
  2755. // todo: it's from moment timezones
  2756. // hooks.updateOffset = function () {
  2757. // };
  2758. // MOMENTS
  2759. // keepLocalTime = true means only change the timezone, without
  2760. // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
  2761. // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
  2762. // +0200, so we adjust the time as needed, to be valid.
  2763. //
  2764. // Keeping the time actually adds/subtracts (one hour)
  2765. // from the actual represented time. That is why we call updateOffset
  2766. // a second time. In case it wants us to change the offset again
  2767. // _changeInProgress == true case, then we have to adjust, because
  2768. // there is no such time in the given timezone.
  2769. /**
  2770. * @param {?} date
  2771. * @param {?=} config
  2772. * @return {?}
  2773. */
  2774. function getUTCOffset(date, config) {
  2775. if (config === void 0) { config = {}; }
  2776. /** @type {?} */
  2777. var _offset = config._offset || 0;
  2778. return config._isUTC ? _offset : getDateOffset(date);
  2779. }
  2780. /**
  2781. * @fileoverview added by tsickle
  2782. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2783. */
  2784. /**
  2785. * @return {?}
  2786. */
  2787. function initMinute() {
  2788. // FORMATTING
  2789. addFormatToken('m', ['mm', 2, false], null, (/**
  2790. * @param {?} date
  2791. * @param {?} opts
  2792. * @return {?}
  2793. */
  2794. function (date, opts) {
  2795. return getMinutes(date, opts.isUTC)
  2796. .toString(10);
  2797. }));
  2798. // ALIASES
  2799. addUnitAlias('minute', 'm');
  2800. // PARSING
  2801. addRegexToken('m', match1to2);
  2802. addRegexToken('mm', match1to2, match2);
  2803. addParseToken(['m', 'mm'], MINUTE);
  2804. }
  2805. /**
  2806. * @fileoverview added by tsickle
  2807. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2808. */
  2809. /**
  2810. * @return {?}
  2811. */
  2812. function initMillisecond() {
  2813. addFormatToken('S', null, null, (/**
  2814. * @param {?} date
  2815. * @param {?} opts
  2816. * @return {?}
  2817. */
  2818. function (date, opts) {
  2819. return (~~(getMilliseconds(date, opts.isUTC) / 100)).toString(10);
  2820. }));
  2821. addFormatToken(null, ['SS', 2, false], null, (/**
  2822. * @param {?} date
  2823. * @param {?} opts
  2824. * @return {?}
  2825. */
  2826. function (date, opts) {
  2827. return (~~(getMilliseconds(date, opts.isUTC) / 10)).toString(10);
  2828. }));
  2829. addFormatToken(null, ['SSS', 3, false], null, (/**
  2830. * @param {?} date
  2831. * @param {?} opts
  2832. * @return {?}
  2833. */
  2834. function (date, opts) {
  2835. return (getMilliseconds(date, opts.isUTC)).toString(10);
  2836. }));
  2837. addFormatToken(null, ['SSSS', 4, false], null, (/**
  2838. * @param {?} date
  2839. * @param {?} opts
  2840. * @return {?}
  2841. */
  2842. function (date, opts) {
  2843. return (getMilliseconds(date, opts.isUTC) * 10).toString(10);
  2844. }));
  2845. addFormatToken(null, ['SSSSS', 5, false], null, (/**
  2846. * @param {?} date
  2847. * @param {?} opts
  2848. * @return {?}
  2849. */
  2850. function (date, opts) {
  2851. return (getMilliseconds(date, opts.isUTC) * 100).toString(10);
  2852. }));
  2853. addFormatToken(null, ['SSSSSS', 6, false], null, (/**
  2854. * @param {?} date
  2855. * @param {?} opts
  2856. * @return {?}
  2857. */
  2858. function (date, opts) {
  2859. return (getMilliseconds(date, opts.isUTC) * 1000).toString(10);
  2860. }));
  2861. addFormatToken(null, ['SSSSSSS', 7, false], null, (/**
  2862. * @param {?} date
  2863. * @param {?} opts
  2864. * @return {?}
  2865. */
  2866. function (date, opts) {
  2867. return (getMilliseconds(date, opts.isUTC) * 10000).toString(10);
  2868. }));
  2869. addFormatToken(null, ['SSSSSSSS', 8, false], null, (/**
  2870. * @param {?} date
  2871. * @param {?} opts
  2872. * @return {?}
  2873. */
  2874. function (date, opts) {
  2875. return (getMilliseconds(date, opts.isUTC) * 100000).toString(10);
  2876. }));
  2877. addFormatToken(null, ['SSSSSSSSS', 9, false], null, (/**
  2878. * @param {?} date
  2879. * @param {?} opts
  2880. * @return {?}
  2881. */
  2882. function (date, opts) {
  2883. return (getMilliseconds(date, opts.isUTC) * 1000000).toString(10);
  2884. }));
  2885. // ALIASES
  2886. addUnitAlias('millisecond', 'ms');
  2887. // PARSING
  2888. addRegexToken('S', match1to3, match1);
  2889. addRegexToken('SS', match1to3, match2);
  2890. addRegexToken('SSS', match1to3, match3);
  2891. /** @type {?} */
  2892. var token;
  2893. for (token = 'SSSS'; token.length <= 9; token += 'S') {
  2894. addRegexToken(token, matchUnsigned);
  2895. }
  2896. /**
  2897. * @param {?} input
  2898. * @param {?} array
  2899. * @param {?} config
  2900. * @return {?}
  2901. */
  2902. function parseMs(input, array, config) {
  2903. array[MILLISECOND] = toInt(parseFloat("0." + input) * 1000);
  2904. return config;
  2905. }
  2906. for (token = 'S'; token.length <= 9; token += 'S') {
  2907. addParseToken(token, parseMs);
  2908. }
  2909. // MOMENTS
  2910. }
  2911. /**
  2912. * @fileoverview added by tsickle
  2913. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  2914. */
  2915. /**
  2916. * @return {?}
  2917. */
  2918. function initHour() {
  2919. // FORMATTING
  2920. // FORMATTING
  2921. /**
  2922. * @param {?} date
  2923. * @param {?} isUTC
  2924. * @return {?}
  2925. */
  2926. function hFormat(date, isUTC) {
  2927. return getHours(date, isUTC) % 12 || 12;
  2928. }
  2929. /**
  2930. * @param {?} date
  2931. * @param {?} isUTC
  2932. * @return {?}
  2933. */
  2934. function kFormat(date, isUTC) {
  2935. return getHours(date, isUTC) || 24;
  2936. }
  2937. addFormatToken('H', ['HH', 2, false], null, (/**
  2938. * @param {?} date
  2939. * @param {?} opts
  2940. * @return {?}
  2941. */
  2942. function (date, opts) {
  2943. return getHours(date, opts.isUTC)
  2944. .toString(10);
  2945. }));
  2946. addFormatToken('h', ['hh', 2, false], null, (/**
  2947. * @param {?} date
  2948. * @param {?} opts
  2949. * @return {?}
  2950. */
  2951. function (date, opts) {
  2952. return hFormat(date, opts.isUTC)
  2953. .toString(10);
  2954. }));
  2955. addFormatToken('k', ['kk', 2, false], null, (/**
  2956. * @param {?} date
  2957. * @param {?} opts
  2958. * @return {?}
  2959. */
  2960. function (date, opts) {
  2961. return kFormat(date, opts.isUTC)
  2962. .toString(10);
  2963. }));
  2964. addFormatToken('hmm', null, null, (/**
  2965. * @param {?} date
  2966. * @param {?} opts
  2967. * @return {?}
  2968. */
  2969. function (date, opts) {
  2970. /** @type {?} */
  2971. var _h = hFormat(date, opts.isUTC);
  2972. /** @type {?} */
  2973. var _mm = zeroFill(getMinutes(date, opts.isUTC), 2);
  2974. return "" + _h + _mm;
  2975. }));
  2976. addFormatToken('hmmss', null, null, (/**
  2977. * @param {?} date
  2978. * @param {?} opts
  2979. * @return {?}
  2980. */
  2981. function (date, opts) {
  2982. /** @type {?} */
  2983. var _h = hFormat(date, opts.isUTC);
  2984. /** @type {?} */
  2985. var _mm = zeroFill(getMinutes(date, opts.isUTC), 2);
  2986. /** @type {?} */
  2987. var _ss = zeroFill(getSeconds(date, opts.isUTC), 2);
  2988. return "" + _h + _mm + _ss;
  2989. }));
  2990. addFormatToken('Hmm', null, null, (/**
  2991. * @param {?} date
  2992. * @param {?} opts
  2993. * @return {?}
  2994. */
  2995. function (date, opts) {
  2996. /** @type {?} */
  2997. var _H = getHours(date, opts.isUTC);
  2998. /** @type {?} */
  2999. var _mm = zeroFill(getMinutes(date, opts.isUTC), 2);
  3000. return "" + _H + _mm;
  3001. }));
  3002. addFormatToken('Hmmss', null, null, (/**
  3003. * @param {?} date
  3004. * @param {?} opts
  3005. * @return {?}
  3006. */
  3007. function (date, opts) {
  3008. /** @type {?} */
  3009. var _H = getHours(date, opts.isUTC);
  3010. /** @type {?} */
  3011. var _mm = zeroFill(getMinutes(date, opts.isUTC), 2);
  3012. /** @type {?} */
  3013. var _ss = zeroFill(getSeconds(date, opts.isUTC), 2);
  3014. return "" + _H + _mm + _ss;
  3015. }));
  3016. /**
  3017. * @param {?} token
  3018. * @param {?} lowercase
  3019. * @return {?}
  3020. */
  3021. function meridiem(token, lowercase) {
  3022. addFormatToken(token, null, null, (/**
  3023. * @param {?} date
  3024. * @param {?} opts
  3025. * @return {?}
  3026. */
  3027. function (date, opts) {
  3028. return opts.locale.meridiem(getHours(date, opts.isUTC), getMinutes(date, opts.isUTC), lowercase);
  3029. }));
  3030. }
  3031. meridiem('a', true);
  3032. meridiem('A', false);
  3033. // ALIASES
  3034. addUnitAlias('hour', 'h');
  3035. // PARSING
  3036. /**
  3037. * @param {?} isStrict
  3038. * @param {?} locale
  3039. * @return {?}
  3040. */
  3041. function matchMeridiem(isStrict, locale) {
  3042. return locale._meridiemParse;
  3043. }
  3044. addRegexToken('a', matchMeridiem);
  3045. addRegexToken('A', matchMeridiem);
  3046. addRegexToken('H', match1to2);
  3047. addRegexToken('h', match1to2);
  3048. addRegexToken('k', match1to2);
  3049. addRegexToken('HH', match1to2, match2);
  3050. addRegexToken('hh', match1to2, match2);
  3051. addRegexToken('kk', match1to2, match2);
  3052. addRegexToken('hmm', match3to4);
  3053. addRegexToken('hmmss', match5to6);
  3054. addRegexToken('Hmm', match3to4);
  3055. addRegexToken('Hmmss', match5to6);
  3056. addParseToken(['H', 'HH'], HOUR);
  3057. addParseToken(['k', 'kk'], (/**
  3058. * @param {?} input
  3059. * @param {?} array
  3060. * @param {?} config
  3061. * @return {?}
  3062. */
  3063. function (input, array, config) {
  3064. /** @type {?} */
  3065. var kInput = toInt(input);
  3066. array[HOUR] = kInput === 24 ? 0 : kInput;
  3067. return config;
  3068. }));
  3069. addParseToken(['a', 'A'], (/**
  3070. * @param {?} input
  3071. * @param {?} array
  3072. * @param {?} config
  3073. * @return {?}
  3074. */
  3075. function (input, array, config) {
  3076. config._isPm = config._locale.isPM(input);
  3077. config._meridiem = input;
  3078. return config;
  3079. }));
  3080. addParseToken(['h', 'hh'], (/**
  3081. * @param {?} input
  3082. * @param {?} array
  3083. * @param {?} config
  3084. * @return {?}
  3085. */
  3086. function (input, array, config) {
  3087. array[HOUR] = toInt(input);
  3088. getParsingFlags(config).bigHour = true;
  3089. return config;
  3090. }));
  3091. addParseToken('hmm', (/**
  3092. * @param {?} input
  3093. * @param {?} array
  3094. * @param {?} config
  3095. * @return {?}
  3096. */
  3097. function (input, array, config) {
  3098. /** @type {?} */
  3099. var pos = input.length - 2;
  3100. array[HOUR] = toInt(input.substr(0, pos));
  3101. array[MINUTE] = toInt(input.substr(pos));
  3102. getParsingFlags(config).bigHour = true;
  3103. return config;
  3104. }));
  3105. addParseToken('hmmss', (/**
  3106. * @param {?} input
  3107. * @param {?} array
  3108. * @param {?} config
  3109. * @return {?}
  3110. */
  3111. function (input, array, config) {
  3112. /** @type {?} */
  3113. var pos1 = input.length - 4;
  3114. /** @type {?} */
  3115. var pos2 = input.length - 2;
  3116. array[HOUR] = toInt(input.substr(0, pos1));
  3117. array[MINUTE] = toInt(input.substr(pos1, 2));
  3118. array[SECOND] = toInt(input.substr(pos2));
  3119. getParsingFlags(config).bigHour = true;
  3120. return config;
  3121. }));
  3122. addParseToken('Hmm', (/**
  3123. * @param {?} input
  3124. * @param {?} array
  3125. * @param {?} config
  3126. * @return {?}
  3127. */
  3128. function (input, array, config) {
  3129. /** @type {?} */
  3130. var pos = input.length - 2;
  3131. array[HOUR] = toInt(input.substr(0, pos));
  3132. array[MINUTE] = toInt(input.substr(pos));
  3133. return config;
  3134. }));
  3135. addParseToken('Hmmss', (/**
  3136. * @param {?} input
  3137. * @param {?} array
  3138. * @param {?} config
  3139. * @return {?}
  3140. */
  3141. function (input, array, config) {
  3142. /** @type {?} */
  3143. var pos1 = input.length - 4;
  3144. /** @type {?} */
  3145. var pos2 = input.length - 2;
  3146. array[HOUR] = toInt(input.substr(0, pos1));
  3147. array[MINUTE] = toInt(input.substr(pos1, 2));
  3148. array[SECOND] = toInt(input.substr(pos2));
  3149. return config;
  3150. }));
  3151. }
  3152. /**
  3153. * @fileoverview added by tsickle
  3154. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  3155. */
  3156. /** @type {?} */
  3157. var locales = {};
  3158. /** @type {?} */
  3159. var localeFamilies = {};
  3160. /** @type {?} */
  3161. var globalLocale;
  3162. /**
  3163. * @param {?} key
  3164. * @return {?}
  3165. */
  3166. function normalizeLocale(key) {
  3167. return key ? key.toLowerCase().replace('_', '-') : key;
  3168. }
  3169. // pick the locale from the array
  3170. // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
  3171. // substring from most specific to least,
  3172. // but move to the next array item if it's a more specific variant than the current root
  3173. /**
  3174. * @param {?} names
  3175. * @return {?}
  3176. */
  3177. function chooseLocale(names) {
  3178. /** @type {?} */
  3179. var next;
  3180. /** @type {?} */
  3181. var locale;
  3182. /** @type {?} */
  3183. var i = 0;
  3184. while (i < names.length) {
  3185. /** @type {?} */
  3186. var split = normalizeLocale(names[i]).split('-');
  3187. /** @type {?} */
  3188. var j = split.length;
  3189. next = normalizeLocale(names[i + 1]);
  3190. next = next ? next.split('-') : null;
  3191. while (j > 0) {
  3192. locale = loadLocale(split.slice(0, j).join('-'));
  3193. if (locale) {
  3194. return locale;
  3195. }
  3196. if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
  3197. // the next array item is better than a shallower substring of this one
  3198. break;
  3199. }
  3200. j--;
  3201. }
  3202. i++;
  3203. }
  3204. return null;
  3205. }
  3206. /**
  3207. * @param {?} parentConfig
  3208. * @param {?} childConfig
  3209. * @return {?}
  3210. */
  3211. function mergeConfigs(parentConfig, childConfig) {
  3212. /** @type {?} */
  3213. var res = Object.assign({}, parentConfig);
  3214. for (var childProp in childConfig) {
  3215. if (!hasOwnProp(childConfig, childProp)) {
  3216. continue;
  3217. }
  3218. if (isObject(parentConfig[childProp]) && isObject(childConfig[childProp])) {
  3219. res[(/** @type {?} */ (childProp))] = {};
  3220. Object.assign(res[childProp], parentConfig[childProp]);
  3221. Object.assign(res[childProp], childConfig[childProp]);
  3222. }
  3223. else if (childConfig[childProp] != null) {
  3224. res[(/** @type {?} */ (childProp))] = childConfig[childProp];
  3225. }
  3226. else {
  3227. delete res[(/** @type {?} */ (childProp))];
  3228. }
  3229. }
  3230. for (var parentProp in parentConfig) {
  3231. if (hasOwnProp(parentConfig, parentProp) &&
  3232. !hasOwnProp(childConfig, parentProp) &&
  3233. isObject(parentConfig[(/** @type {?} */ (parentProp))])) {
  3234. // make sure changes to properties don't modify parent config
  3235. res[(/** @type {?} */ (parentProp))] = Object.assign({}, res[(/** @type {?} */ (parentProp))]);
  3236. }
  3237. }
  3238. return res;
  3239. }
  3240. /**
  3241. * @param {?} name
  3242. * @return {?}
  3243. */
  3244. function loadLocale(name) {
  3245. // no way!
  3246. /* var oldLocale = null;
  3247. // TODO: Find a better way to register and load all the locales in Node
  3248. if (!locales[name] && (typeof module !== 'undefined') &&
  3249. module && module.exports) {
  3250. try {
  3251. oldLocale = globalLocale._abbr;
  3252. var aliasedRequire = require;
  3253. aliasedRequire('./locale/' + name);
  3254. getSetGlobalLocale(oldLocale);
  3255. } catch (e) {}
  3256. }*/
  3257. if (!locales[name]) {
  3258. // tslint:disable-next-line
  3259. console.error("Khronos locale error: please load locale \"" + name + "\" before using it");
  3260. // throw new Error(`Khronos locale error: please load locale "${name}" before using it`);
  3261. }
  3262. return locales[name];
  3263. }
  3264. // This function will load locale and then set the global locale. If
  3265. // no arguments are passed in, it will simply return the current global
  3266. // locale key.
  3267. /**
  3268. * @param {?=} key
  3269. * @param {?=} values
  3270. * @return {?}
  3271. */
  3272. function getSetGlobalLocale(key, values) {
  3273. /** @type {?} */
  3274. var data;
  3275. if (key) {
  3276. if (isUndefined(values)) {
  3277. data = getLocale(key);
  3278. }
  3279. else if (isString(key)) {
  3280. data = defineLocale(key, values);
  3281. }
  3282. if (data) {
  3283. globalLocale = data;
  3284. }
  3285. }
  3286. return globalLocale && globalLocale._abbr;
  3287. }
  3288. /**
  3289. * @param {?} name
  3290. * @param {?=} config
  3291. * @return {?}
  3292. */
  3293. function defineLocale(name, config) {
  3294. if (config === null) {
  3295. // useful for testing
  3296. delete locales[name];
  3297. globalLocale = getLocale('en');
  3298. return null;
  3299. }
  3300. if (!config) {
  3301. return;
  3302. }
  3303. /** @type {?} */
  3304. var parentConfig = baseConfig;
  3305. config.abbr = name;
  3306. if (config.parentLocale != null) {
  3307. if (locales[config.parentLocale] != null) {
  3308. parentConfig = locales[config.parentLocale]._config;
  3309. }
  3310. else {
  3311. if (!localeFamilies[config.parentLocale]) {
  3312. localeFamilies[config.parentLocale] = [];
  3313. }
  3314. localeFamilies[config.parentLocale].push({ name: name, config: config });
  3315. return null;
  3316. }
  3317. }
  3318. locales[name] = new Locale(mergeConfigs(parentConfig, config));
  3319. if (localeFamilies[name]) {
  3320. localeFamilies[name].forEach((/**
  3321. * @param {?} x
  3322. * @return {?}
  3323. */
  3324. function (x) {
  3325. defineLocale(x.name, x.config);
  3326. }));
  3327. }
  3328. // backwards compat for now: also set the locale
  3329. // make sure we set the locale AFTER all child locales have been
  3330. // created, so we won't end up with the child locale set.
  3331. getSetGlobalLocale(name);
  3332. return locales[name];
  3333. }
  3334. /**
  3335. * @param {?} name
  3336. * @param {?=} config
  3337. * @return {?}
  3338. */
  3339. function updateLocale(name, config) {
  3340. /** @type {?} */
  3341. var _config = config;
  3342. if (_config != null) {
  3343. /** @type {?} */
  3344. var parentConfig = baseConfig;
  3345. // MERGE
  3346. /** @type {?} */
  3347. var tmpLocale = loadLocale(name);
  3348. if (tmpLocale != null) {
  3349. parentConfig = tmpLocale._config;
  3350. }
  3351. _config = mergeConfigs(parentConfig, _config);
  3352. /** @type {?} */
  3353. var locale = new Locale(_config);
  3354. locale.parentLocale = locales[name];
  3355. locales[name] = locale;
  3356. // backwards compat for now: also set the locale
  3357. getSetGlobalLocale(name);
  3358. }
  3359. else {
  3360. // pass null for config to unupdate, useful for tests
  3361. if (locales[name] != null) {
  3362. if (locales[name].parentLocale != null) {
  3363. locales[name] = locales[name].parentLocale;
  3364. }
  3365. else if (locales[name] != null) {
  3366. delete locales[name];
  3367. }
  3368. }
  3369. }
  3370. return locales[name];
  3371. }
  3372. // returns locale data
  3373. /**
  3374. * @param {?=} key
  3375. * @return {?}
  3376. */
  3377. function getLocale(key) {
  3378. setDefaultLocale();
  3379. if (!key) {
  3380. return globalLocale;
  3381. }
  3382. // let locale;
  3383. /** @type {?} */
  3384. var _key = isArray(key) ? key : [key];
  3385. return chooseLocale(_key);
  3386. }
  3387. /**
  3388. * @return {?}
  3389. */
  3390. function listLocales() {
  3391. return Object.keys(locales);
  3392. }
  3393. /**
  3394. * @return {?}
  3395. */
  3396. function setDefaultLocale() {
  3397. if (locales["en"]) {
  3398. return undefined;
  3399. }
  3400. getSetGlobalLocale('en', {
  3401. dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
  3402. ordinal: /**
  3403. * @param {?} num
  3404. * @return {?}
  3405. */
  3406. function (num) {
  3407. /** @type {?} */
  3408. var b = num % 10;
  3409. /** @type {?} */
  3410. var output = toInt((num % 100) / 10) === 1
  3411. ? 'th'
  3412. : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';
  3413. return num + output;
  3414. }
  3415. });
  3416. initWeek();
  3417. initWeekYear();
  3418. initYear();
  3419. initTimezone();
  3420. initTimestamp();
  3421. initSecond();
  3422. initQuarter();
  3423. initOffset();
  3424. initMonth();
  3425. initMinute();
  3426. initMillisecond();
  3427. initHour();
  3428. initDayOfYear();
  3429. initDayOfWeek();
  3430. initDayOfMonth();
  3431. }
  3432. /**
  3433. * @fileoverview added by tsickle
  3434. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  3435. */
  3436. /** @type {?} */
  3437. var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hours', 'minutes', 'seconds', 'milliseconds'];
  3438. var ɵ0 = /**
  3439. * @param {?} mem
  3440. * @param {?} order
  3441. * @return {?}
  3442. */
  3443. function (mem, order) {
  3444. mem[order] = true;
  3445. return mem;
  3446. };
  3447. /** @type {?} */
  3448. var orderingHash = ordering.reduce((ɵ0), {});
  3449. /**
  3450. * @param {?} duration
  3451. * @return {?}
  3452. */
  3453. function isDurationValid(duration) {
  3454. /** @type {?} */
  3455. var durationKeys = Object.keys(duration);
  3456. if (durationKeys
  3457. .some((/**
  3458. * @param {?} key
  3459. * @return {?}
  3460. */
  3461. function (key) {
  3462. return (key in orderingHash)
  3463. && duration[key] === null
  3464. || isNaN(duration[key]);
  3465. }))) {
  3466. return false;
  3467. }
  3468. // for (let key in duration) {
  3469. // if (!(indexOf.call(ordering, key) !== -1 && (duration[key] == null || !isNaN(duration[key])))) {
  3470. // return false;
  3471. // }
  3472. // }
  3473. /** @type {?} */
  3474. var unitHasDecimal = false;
  3475. for (var i = 0; i < ordering.length; ++i) {
  3476. if (duration[ordering[i]]) {
  3477. // only allow non-integers for smallest unit
  3478. if (unitHasDecimal) {
  3479. return false;
  3480. }
  3481. if (duration[ordering[i]] !== toInt(duration[ordering[i]])) {
  3482. unitHasDecimal = true;
  3483. }
  3484. }
  3485. }
  3486. return true;
  3487. }
  3488. /**
  3489. * @fileoverview added by tsickle
  3490. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  3491. */
  3492. /**
  3493. * @param {?} number
  3494. * @return {?}
  3495. */
  3496. function absCeil(number) {
  3497. return number < 0 ? Math.floor(number) : Math.ceil(number);
  3498. }
  3499. /**
  3500. * @fileoverview added by tsickle
  3501. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  3502. */
  3503. /**
  3504. * @param {?} dur
  3505. * @return {?}
  3506. */
  3507. function bubble(dur) {
  3508. /** @type {?} */
  3509. var milliseconds = dur._milliseconds;
  3510. /** @type {?} */
  3511. var days = dur._days;
  3512. /** @type {?} */
  3513. var months = dur._months;
  3514. /** @type {?} */
  3515. var data = dur._data;
  3516. // if we have a mix of positive and negative values, bubble down first
  3517. // check: https://github.com/moment/moment/issues/2166
  3518. if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
  3519. (milliseconds <= 0 && days <= 0 && months <= 0))) {
  3520. milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
  3521. days = 0;
  3522. months = 0;
  3523. }
  3524. // The following code bubbles up values, see the tests for
  3525. // examples of what that means.
  3526. data.milliseconds = milliseconds % 1000;
  3527. /** @type {?} */
  3528. var seconds = absFloor(milliseconds / 1000);
  3529. data.seconds = seconds % 60;
  3530. /** @type {?} */
  3531. var minutes = absFloor(seconds / 60);
  3532. data.minutes = minutes % 60;
  3533. /** @type {?} */
  3534. var hours = absFloor(minutes / 60);
  3535. data.hours = hours % 24;
  3536. days += absFloor(hours / 24);
  3537. // convert days to months
  3538. /** @type {?} */
  3539. var monthsFromDays = absFloor(daysToMonths(days));
  3540. months += monthsFromDays;
  3541. days -= absCeil(monthsToDays(monthsFromDays));
  3542. // 12 months -> 1 year
  3543. /** @type {?} */
  3544. var years = absFloor(months / 12);
  3545. months %= 12;
  3546. data.day = days;
  3547. data.month = months;
  3548. data.year = years;
  3549. return dur;
  3550. }
  3551. /**
  3552. * @param {?} day
  3553. * @return {?}
  3554. */
  3555. function daysToMonths(day) {
  3556. // 400 years have 146097 days (taking into account leap year rules)
  3557. // 400 years have 12 months === 4800
  3558. return day * 4800 / 146097;
  3559. }
  3560. /**
  3561. * @param {?} month
  3562. * @return {?}
  3563. */
  3564. function monthsToDays(month) {
  3565. // the reverse of daysToMonths
  3566. return month * 146097 / 4800;
  3567. }
  3568. /**
  3569. * @fileoverview added by tsickle
  3570. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  3571. */
  3572. /** @type {?} */
  3573. var round = Math.round;
  3574. /** @type {?} */
  3575. var thresholds = {
  3576. ss: 44,
  3577. // a few seconds to seconds
  3578. s: 45,
  3579. // seconds to minute
  3580. m: 45,
  3581. // minutes to hour
  3582. h: 22,
  3583. // hours to day
  3584. d: 26,
  3585. // days to month
  3586. M: 11 // months to year
  3587. };
  3588. // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
  3589. /**
  3590. * @param {?} str
  3591. * @param {?} num
  3592. * @param {?} withoutSuffix
  3593. * @param {?} isFuture
  3594. * @param {?} locale
  3595. * @return {?}
  3596. */
  3597. function substituteTimeAgo(str, num, withoutSuffix, isFuture, locale) {
  3598. return locale.relativeTime(num || 1, !!withoutSuffix, str, isFuture);
  3599. }
  3600. /**
  3601. * @param {?} posNegDuration
  3602. * @param {?} withoutSuffix
  3603. * @param {?} locale
  3604. * @return {?}
  3605. */
  3606. function relativeTime(posNegDuration, withoutSuffix, locale) {
  3607. /** @type {?} */
  3608. var duration = createDuration(posNegDuration).abs();
  3609. /** @type {?} */
  3610. var seconds = round(duration.as('s'));
  3611. /** @type {?} */
  3612. var minutes = round(duration.as('m'));
  3613. /** @type {?} */
  3614. var hours = round(duration.as('h'));
  3615. /** @type {?} */
  3616. var days = round(duration.as('d'));
  3617. /** @type {?} */
  3618. var months = round(duration.as('M'));
  3619. /** @type {?} */
  3620. var years = round(duration.as('y'));
  3621. /** @type {?} */
  3622. var a = seconds <= thresholds.ss && ['s', seconds] ||
  3623. seconds < thresholds.s && ['ss', seconds] ||
  3624. minutes <= 1 && ['m'] ||
  3625. minutes < thresholds.m && ['mm', minutes] ||
  3626. hours <= 1 && ['h'] ||
  3627. hours < thresholds.h && ['hh', hours] ||
  3628. days <= 1 && ['d'] ||
  3629. days < thresholds.d && ['dd', days] ||
  3630. months <= 1 && ['M'] ||
  3631. months < thresholds.M && ['MM', months] ||
  3632. years <= 1 && ['y'] || ['yy', years];
  3633. /** @type {?} */
  3634. var b = [a[0], a[1], withoutSuffix, +posNegDuration > 0, locale];
  3635. // a[2] = withoutSuffix;
  3636. // a[3] = +posNegDuration > 0;
  3637. // a[4] = locale;
  3638. return substituteTimeAgo.apply(null, b);
  3639. }
  3640. /**
  3641. * @fileoverview added by tsickle
  3642. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  3643. */
  3644. var Duration = /** @class */ (function () {
  3645. function Duration(duration, config) {
  3646. if (config === void 0) { config = {}; }
  3647. this._data = {};
  3648. this._locale = getLocale();
  3649. this._locale = config && config._locale || getLocale();
  3650. // const normalizedInput = normalizeObjectUnits(duration);
  3651. /** @type {?} */
  3652. var normalizedInput = duration;
  3653. /** @type {?} */
  3654. var years = normalizedInput.year || 0;
  3655. /** @type {?} */
  3656. var quarters = normalizedInput.quarter || 0;
  3657. /** @type {?} */
  3658. var months = normalizedInput.month || 0;
  3659. /** @type {?} */
  3660. var weeks = normalizedInput.week || 0;
  3661. /** @type {?} */
  3662. var days = normalizedInput.day || 0;
  3663. /** @type {?} */
  3664. var hours = normalizedInput.hours || 0;
  3665. /** @type {?} */
  3666. var minutes = normalizedInput.minutes || 0;
  3667. /** @type {?} */
  3668. var seconds = normalizedInput.seconds || 0;
  3669. /** @type {?} */
  3670. var milliseconds = normalizedInput.milliseconds || 0;
  3671. this._isValid = isDurationValid(normalizedInput);
  3672. // representation for dateAddRemove
  3673. this._milliseconds = +milliseconds +
  3674. seconds * 1000 +
  3675. minutes * 60 * 1000 + // 1000 * 60
  3676. hours * 1000 * 60 * 60; // using 1000 * 60 * 60
  3677. // instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
  3678. // Because of dateAddRemove treats 24 hours as different from a
  3679. // day when working around DST, we need to store them separately
  3680. this._days = +days +
  3681. weeks * 7;
  3682. // It is impossible to translate months into days without knowing
  3683. // which months you are are talking about, so we have to store
  3684. // it separately.
  3685. this._months = +months +
  3686. quarters * 3 +
  3687. years * 12;
  3688. // this._data = {};
  3689. // this._locale = getLocale();
  3690. // this._bubble();
  3691. return bubble(this);
  3692. }
  3693. /**
  3694. * @return {?}
  3695. */
  3696. Duration.prototype.isValid = /**
  3697. * @return {?}
  3698. */
  3699. function () {
  3700. return this._isValid;
  3701. };
  3702. /**
  3703. * @param {?=} withSuffix
  3704. * @return {?}
  3705. */
  3706. Duration.prototype.humanize = /**
  3707. * @param {?=} withSuffix
  3708. * @return {?}
  3709. */
  3710. function (withSuffix) {
  3711. // throw new Error(`TODO: implement`);
  3712. if (!this.isValid()) {
  3713. return this.localeData().invalidDate;
  3714. }
  3715. /** @type {?} */
  3716. var locale = this.localeData();
  3717. /** @type {?} */
  3718. var output = relativeTime(this, !withSuffix, locale);
  3719. if (withSuffix) {
  3720. output = locale.pastFuture(+this, output);
  3721. }
  3722. return locale.postformat(output);
  3723. };
  3724. /**
  3725. * @return {?}
  3726. */
  3727. Duration.prototype.localeData = /**
  3728. * @return {?}
  3729. */
  3730. function () {
  3731. return this._locale;
  3732. };
  3733. /**
  3734. * @param {?=} localeKey
  3735. * @return {?}
  3736. */
  3737. Duration.prototype.locale = /**
  3738. * @param {?=} localeKey
  3739. * @return {?}
  3740. */
  3741. function (localeKey) {
  3742. if (!localeKey) {
  3743. return this._locale._abbr;
  3744. }
  3745. this._locale = getLocale(localeKey) || this._locale;
  3746. return this;
  3747. };
  3748. /**
  3749. * @return {?}
  3750. */
  3751. Duration.prototype.abs = /**
  3752. * @return {?}
  3753. */
  3754. function () {
  3755. /** @type {?} */
  3756. var mathAbs = Math.abs;
  3757. /** @type {?} */
  3758. var data = this._data;
  3759. this._milliseconds = mathAbs(this._milliseconds);
  3760. this._days = mathAbs(this._days);
  3761. this._months = mathAbs(this._months);
  3762. data.milliseconds = mathAbs(data.milliseconds);
  3763. data.seconds = mathAbs(data.seconds);
  3764. data.minutes = mathAbs(data.minutes);
  3765. data.hours = mathAbs(data.hours);
  3766. data.month = mathAbs(data.month);
  3767. data.year = mathAbs(data.year);
  3768. return this;
  3769. };
  3770. /**
  3771. * @param {?} _units
  3772. * @return {?}
  3773. */
  3774. Duration.prototype.as = /**
  3775. * @param {?} _units
  3776. * @return {?}
  3777. */
  3778. function (_units) {
  3779. if (!this.isValid()) {
  3780. return NaN;
  3781. }
  3782. /** @type {?} */
  3783. var days;
  3784. /** @type {?} */
  3785. var months;
  3786. /** @type {?} */
  3787. var milliseconds = this._milliseconds;
  3788. /** @type {?} */
  3789. var units = normalizeUnits(_units);
  3790. if (units === 'month' || units === 'year') {
  3791. days = this._days + milliseconds / 864e5;
  3792. months = this._months + daysToMonths(days);
  3793. return units === 'month' ? months : months / 12;
  3794. }
  3795. // handle milliseconds separately because of floating point math errors (issue #1867)
  3796. days = this._days + Math.round(monthsToDays(this._months));
  3797. switch (units) {
  3798. case 'week':
  3799. return days / 7 + milliseconds / 6048e5;
  3800. case 'day':
  3801. return days + milliseconds / 864e5;
  3802. case 'hours':
  3803. return days * 24 + milliseconds / 36e5;
  3804. case 'minutes':
  3805. return days * 1440 + milliseconds / 6e4;
  3806. case 'seconds':
  3807. return days * 86400 + milliseconds / 1000;
  3808. // Math.floor prevents floating point math errors here
  3809. case 'milliseconds':
  3810. return Math.floor(days * 864e5) + milliseconds;
  3811. default:
  3812. throw new Error("Unknown unit " + units);
  3813. }
  3814. };
  3815. /**
  3816. * @return {?}
  3817. */
  3818. Duration.prototype.valueOf = /**
  3819. * @return {?}
  3820. */
  3821. function () {
  3822. if (!this.isValid()) {
  3823. return NaN;
  3824. }
  3825. return (this._milliseconds +
  3826. this._days * 864e5 +
  3827. (this._months % 12) * 2592e6 +
  3828. toInt(this._months / 12) * 31536e6);
  3829. };
  3830. return Duration;
  3831. }());
  3832. /**
  3833. * @param {?} obj
  3834. * @return {?}
  3835. */
  3836. function isDuration(obj) {
  3837. return obj instanceof Duration;
  3838. }
  3839. /**
  3840. * @fileoverview added by tsickle
  3841. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  3842. */
  3843. /**
  3844. * @param {?} config
  3845. * @return {?}
  3846. */
  3847. function isValid(config) {
  3848. if (config._isValid == null) {
  3849. /** @type {?} */
  3850. var flags = getParsingFlags(config);
  3851. /** @type {?} */
  3852. var parsedParts = Array.prototype.some.call(flags.parsedDateParts, (/**
  3853. * @param {?} i
  3854. * @return {?}
  3855. */
  3856. function (i) {
  3857. return i != null;
  3858. }));
  3859. /** @type {?} */
  3860. var isNowValid = !isNaN(config._d && config._d.getTime()) &&
  3861. flags.overflow < 0 &&
  3862. !flags.empty &&
  3863. !flags.invalidMonth &&
  3864. !flags.invalidWeekday &&
  3865. !flags.weekdayMismatch &&
  3866. !flags.nullInput &&
  3867. !flags.invalidFormat &&
  3868. !flags.userInvalidated &&
  3869. (!flags.meridiem || (flags.meridiem && parsedParts));
  3870. if (config._strict) {
  3871. isNowValid = isNowValid &&
  3872. flags.charsLeftOver === 0 &&
  3873. flags.unusedTokens.length === 0 &&
  3874. flags.bigHour === undefined;
  3875. }
  3876. if (Object.isFrozen == null || !Object.isFrozen(config)) {
  3877. config._isValid = isNowValid;
  3878. }
  3879. else {
  3880. return isNowValid;
  3881. }
  3882. }
  3883. return config._isValid;
  3884. }
  3885. /**
  3886. * @param {?} config
  3887. * @param {?=} flags
  3888. * @return {?}
  3889. */
  3890. function createInvalid(config, flags) {
  3891. config._d = new Date(NaN);
  3892. Object.assign(getParsingFlags(config), flags || { userInvalidated: true });
  3893. return config;
  3894. }
  3895. /**
  3896. * @param {?} config
  3897. * @return {?}
  3898. */
  3899. function markInvalid(config) {
  3900. config._isValid = false;
  3901. return config;
  3902. }
  3903. /**
  3904. * @fileoverview added by tsickle
  3905. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  3906. */
  3907. // iso 8601 regex
  3908. // 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)
  3909. // tslint:disable-next-line
  3910. /** @type {?} */
  3911. 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)?)?$/;
  3912. // tslint:disable-next-line
  3913. /** @type {?} */
  3914. 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)?)?$/;
  3915. /** @type {?} */
  3916. var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/;
  3917. /** @type {?} */
  3918. var isoDates = [
  3919. ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/, true],
  3920. ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/, true],
  3921. ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/, true],
  3922. ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
  3923. ['YYYY-DDD', /\d{4}-\d{3}/, true],
  3924. ['YYYY-MM', /\d{4}-\d\d/, false],
  3925. ['YYYYYYMMDD', /[+-]\d{10}/, true],
  3926. ['YYYYMMDD', /\d{8}/, true],
  3927. // YYYYMM is NOT allowed by the standard
  3928. ['GGGG[W]WWE', /\d{4}W\d{3}/, true],
  3929. ['GGGG[W]WW', /\d{4}W\d{2}/, false],
  3930. ['YYYYDDD', /\d{7}/, true]
  3931. ];
  3932. // iso time formats and regexes
  3933. /** @type {?} */
  3934. var isoTimes = [
  3935. ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
  3936. ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
  3937. ['HH:mm:ss', /\d\d:\d\d:\d\d/],
  3938. ['HH:mm', /\d\d:\d\d/],
  3939. ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
  3940. ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
  3941. ['HHmmss', /\d\d\d\d\d\d/],
  3942. ['HHmm', /\d\d\d\d/],
  3943. ['HH', /\d\d/]
  3944. ];
  3945. /** @type {?} */
  3946. var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i;
  3947. /** @type {?} */
  3948. var obsOffsets = {
  3949. UT: 0,
  3950. GMT: 0,
  3951. EDT: -4 * 60,
  3952. EST: -5 * 60,
  3953. CDT: -5 * 60,
  3954. CST: -6 * 60,
  3955. MDT: -6 * 60,
  3956. MST: -7 * 60,
  3957. PDT: -7 * 60,
  3958. PST: -8 * 60
  3959. };
  3960. // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
  3961. // tslint:disable-next-line
  3962. /** @type {?} */
  3963. 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}))$/;
  3964. // date from iso format
  3965. /**
  3966. * @param {?} config
  3967. * @return {?}
  3968. */
  3969. function configFromISO(config) {
  3970. if (!isString(config._i)) {
  3971. return config;
  3972. }
  3973. /** @type {?} */
  3974. var input = config._i;
  3975. /** @type {?} */
  3976. var match = extendedIsoRegex.exec(input) || basicIsoRegex.exec(input);
  3977. /** @type {?} */
  3978. var allowTime;
  3979. /** @type {?} */
  3980. var dateFormat;
  3981. /** @type {?} */
  3982. var timeFormat;
  3983. /** @type {?} */
  3984. var tzFormat;
  3985. if (!match) {
  3986. config._isValid = false;
  3987. return config;
  3988. }
  3989. // getParsingFlags(config).iso = true;
  3990. /** @type {?} */
  3991. var i;
  3992. /** @type {?} */
  3993. var l;
  3994. for (i = 0, l = isoDates.length; i < l; i++) {
  3995. if (isoDates[i][1].exec(match[1])) {
  3996. dateFormat = isoDates[i][0];
  3997. allowTime = isoDates[i][2] !== false;
  3998. break;
  3999. }
  4000. }
  4001. if (dateFormat == null) {
  4002. config._isValid = false;
  4003. return config;
  4004. }
  4005. if (match[3]) {
  4006. for (i = 0, l = isoTimes.length; i < l; i++) {
  4007. if (isoTimes[i][1].exec(match[3])) {
  4008. // match[2] should be 'T' or space
  4009. timeFormat = (match[2] || ' ') + isoTimes[i][0];
  4010. break;
  4011. }
  4012. }
  4013. if (timeFormat == null) {
  4014. config._isValid = false;
  4015. return config;
  4016. }
  4017. }
  4018. if (!allowTime && timeFormat != null) {
  4019. config._isValid = false;
  4020. return config;
  4021. }
  4022. if (match[4]) {
  4023. if (tzRegex.exec(match[4])) {
  4024. tzFormat = 'Z';
  4025. }
  4026. else {
  4027. config._isValid = false;
  4028. return config;
  4029. }
  4030. }
  4031. config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
  4032. return configFromStringAndFormat(config);
  4033. }
  4034. // tslint:disable-next-line
  4035. /**
  4036. * @param {?} yearStr
  4037. * @param {?} monthStr
  4038. * @param {?} dayStr
  4039. * @param {?} hourStr
  4040. * @param {?} minuteStr
  4041. * @param {?} secondStr
  4042. * @return {?}
  4043. */
  4044. function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
  4045. /** @type {?} */
  4046. var result = [
  4047. untruncateYear(yearStr),
  4048. defaultLocaleMonthsShort.indexOf(monthStr),
  4049. parseInt(dayStr, 10),
  4050. parseInt(hourStr, 10),
  4051. parseInt(minuteStr, 10)
  4052. ];
  4053. if (secondStr) {
  4054. result.push(parseInt(secondStr, 10));
  4055. }
  4056. return result;
  4057. }
  4058. /**
  4059. * @param {?} yearStr
  4060. * @return {?}
  4061. */
  4062. function untruncateYear(yearStr) {
  4063. /** @type {?} */
  4064. var year = parseInt(yearStr, 10);
  4065. return year <= 49 ? year + 2000 : year;
  4066. }
  4067. /**
  4068. * @param {?} str
  4069. * @return {?}
  4070. */
  4071. function preprocessRFC2822(str) {
  4072. // Remove comments and folding whitespace and replace multiple-spaces with a single space
  4073. return str
  4074. .replace(/\([^)]*\)|[\n\t]/g, ' ')
  4075. .replace(/(\s\s+)/g, ' ').trim();
  4076. }
  4077. /**
  4078. * @param {?} weekdayStr
  4079. * @param {?} parsedInput
  4080. * @param {?} config
  4081. * @return {?}
  4082. */
  4083. function checkWeekday(weekdayStr, parsedInput, config) {
  4084. if (weekdayStr) {
  4085. // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.
  4086. /** @type {?} */
  4087. var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr);
  4088. /** @type {?} */
  4089. var weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();
  4090. if (weekdayProvided !== weekdayActual) {
  4091. getParsingFlags(config).weekdayMismatch = true;
  4092. config._isValid = false;
  4093. return false;
  4094. }
  4095. }
  4096. return true;
  4097. }
  4098. /**
  4099. * @param {?} obsOffset
  4100. * @param {?} militaryOffset
  4101. * @param {?} numOffset
  4102. * @return {?}
  4103. */
  4104. function calculateOffset(obsOffset, militaryOffset, numOffset) {
  4105. if (obsOffset) {
  4106. return obsOffsets[obsOffset];
  4107. }
  4108. else if (militaryOffset) {
  4109. // the only allowed military tz is Z
  4110. return 0;
  4111. }
  4112. else {
  4113. /** @type {?} */
  4114. var hm = parseInt(numOffset, 10);
  4115. /** @type {?} */
  4116. var m = hm % 100;
  4117. /** @type {?} */
  4118. var h = (hm - m) / 100;
  4119. return h * 60 + m;
  4120. }
  4121. }
  4122. // date and time from ref 2822 format
  4123. /**
  4124. * @param {?} config
  4125. * @return {?}
  4126. */
  4127. function configFromRFC2822(config) {
  4128. if (!isString(config._i)) {
  4129. return config;
  4130. }
  4131. /** @type {?} */
  4132. var match = rfc2822.exec(preprocessRFC2822(config._i));
  4133. if (!match) {
  4134. return markInvalid(config);
  4135. }
  4136. /** @type {?} */
  4137. var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);
  4138. if (!checkWeekday(match[1], parsedArray, config)) {
  4139. return config;
  4140. }
  4141. config._a = parsedArray;
  4142. config._tzm = calculateOffset(match[8], match[9], match[10]);
  4143. config._d = createUTCDate.apply(null, config._a);
  4144. config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
  4145. getParsingFlags(config).rfc2822 = true;
  4146. return config;
  4147. }
  4148. // date from iso format or fallback
  4149. /**
  4150. * @param {?} config
  4151. * @return {?}
  4152. */
  4153. function configFromString(config) {
  4154. if (!isString(config._i)) {
  4155. return config;
  4156. }
  4157. /** @type {?} */
  4158. var matched = aspNetJsonRegex.exec(config._i);
  4159. if (matched !== null) {
  4160. config._d = new Date(+matched[1]);
  4161. return config;
  4162. }
  4163. // todo: update logic processing
  4164. // isISO -> configFromISO
  4165. // isRFC -> configFromRFC
  4166. configFromISO(config);
  4167. if (config._isValid === false) {
  4168. delete config._isValid;
  4169. }
  4170. else {
  4171. return config;
  4172. }
  4173. configFromRFC2822(config);
  4174. if (config._isValid === false) {
  4175. delete config._isValid;
  4176. }
  4177. else {
  4178. return config;
  4179. }
  4180. // Final attempt, use Input Fallback
  4181. // hooks.createFromInputFallback(config);
  4182. return createInvalid(config);
  4183. }
  4184. /**
  4185. * @fileoverview added by tsickle
  4186. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4187. */
  4188. /**
  4189. * @param {?} date
  4190. * @param {?} format
  4191. * @param {?=} locale
  4192. * @param {?=} isUTC
  4193. * @param {?=} offset
  4194. * @return {?}
  4195. */
  4196. function formatDate(date, format, locale, isUTC, offset) {
  4197. if (offset === void 0) { offset = 0; }
  4198. /** @type {?} */
  4199. var _locale = getLocale(locale || 'en');
  4200. if (!_locale) {
  4201. throw new Error("Locale \"" + locale + "\" is not defined, please add it with \"defineLocale(...)\"");
  4202. }
  4203. /** @type {?} */
  4204. var _format = format || (isUTC ? 'YYYY-MM-DDTHH:mm:ss[Z]' : 'YYYY-MM-DDTHH:mm:ssZ');
  4205. /** @type {?} */
  4206. var output = formatMoment(date, _format, _locale, isUTC, offset);
  4207. if (!output) {
  4208. return output;
  4209. }
  4210. return _locale.postformat(output);
  4211. }
  4212. // format date using native date object
  4213. /**
  4214. * @param {?} date
  4215. * @param {?} _format
  4216. * @param {?} locale
  4217. * @param {?=} isUTC
  4218. * @param {?=} offset
  4219. * @return {?}
  4220. */
  4221. function formatMoment(date, _format, locale, isUTC, offset) {
  4222. if (offset === void 0) { offset = 0; }
  4223. if (!isDateValid(date)) {
  4224. return locale.invalidDate;
  4225. }
  4226. /** @type {?} */
  4227. var format = expandFormat(_format, locale);
  4228. formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);
  4229. return formatFunctions[format](date, locale, isUTC, offset);
  4230. }
  4231. /**
  4232. * @param {?} _format
  4233. * @param {?} locale
  4234. * @return {?}
  4235. */
  4236. function expandFormat(_format, locale) {
  4237. /** @type {?} */
  4238. var format = _format;
  4239. /** @type {?} */
  4240. var i = 5;
  4241. /** @type {?} */
  4242. var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;
  4243. /** @type {?} */
  4244. var replaceLongDateFormatTokens = (/**
  4245. * @param {?} input
  4246. * @return {?}
  4247. */
  4248. function (input) {
  4249. return locale.formatLongDate(input) || input;
  4250. });
  4251. localFormattingTokens.lastIndex = 0;
  4252. while (i >= 0 && localFormattingTokens.test(format)) {
  4253. format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
  4254. localFormattingTokens.lastIndex = 0;
  4255. i -= 1;
  4256. }
  4257. return format;
  4258. }
  4259. /**
  4260. * @fileoverview added by tsickle
  4261. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4262. */
  4263. // Pick the first defined of two or three arguments.
  4264. /**
  4265. * @template T
  4266. * @param {?=} a
  4267. * @param {?=} b
  4268. * @param {?=} c
  4269. * @return {?}
  4270. */
  4271. function defaults(a, b, c) {
  4272. if (a != null) {
  4273. return a;
  4274. }
  4275. if (b != null) {
  4276. return b;
  4277. }
  4278. return c;
  4279. }
  4280. /**
  4281. * @fileoverview added by tsickle
  4282. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4283. */
  4284. /**
  4285. * @param {?} config
  4286. * @return {?}
  4287. */
  4288. function currentDateArray(config) {
  4289. /** @type {?} */
  4290. var nowValue = new Date();
  4291. if (config._useUTC) {
  4292. return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];
  4293. }
  4294. return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
  4295. }
  4296. // convert an array to a date.
  4297. // the array should mirror the parameters below
  4298. // note: all values past the year are optional and will default to the lowest possible value.
  4299. // [year, month, day , hour, minute, second, millisecond]
  4300. /**
  4301. * @param {?} config
  4302. * @return {?}
  4303. */
  4304. function configFromArray(config) {
  4305. /** @type {?} */
  4306. var input = [];
  4307. /** @type {?} */
  4308. var i;
  4309. /** @type {?} */
  4310. var date;
  4311. /** @type {?} */
  4312. var currentDate;
  4313. /** @type {?} */
  4314. var expectedWeekday;
  4315. /** @type {?} */
  4316. var yearToUse;
  4317. if (config._d) {
  4318. return config;
  4319. }
  4320. currentDate = currentDateArray(config);
  4321. // compute day of the year from weeks and weekdays
  4322. if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
  4323. dayOfYearFromWeekInfo(config);
  4324. }
  4325. // if the day of the year is set, figure out what it is
  4326. if (config._dayOfYear != null) {
  4327. yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
  4328. if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {
  4329. getParsingFlags(config)._overflowDayOfYear = true;
  4330. }
  4331. date = new Date(Date.UTC(yearToUse, 0, config._dayOfYear));
  4332. config._a[MONTH] = date.getUTCMonth();
  4333. config._a[DATE] = date.getUTCDate();
  4334. }
  4335. // Default to current date.
  4336. // * if no year, month, day of month are given, default to today
  4337. // * if day of month is given, default month and year
  4338. // * if month is given, default only year
  4339. // * if year is given, don't default anything
  4340. for (i = 0; i < 3 && config._a[i] == null; ++i) {
  4341. config._a[i] = input[i] = currentDate[i];
  4342. }
  4343. // Zero out whatever was not defaulted, including time
  4344. for (; i < 7; i++) {
  4345. config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
  4346. }
  4347. // Check for 24:00:00.000
  4348. if (config._a[HOUR] === 24 &&
  4349. config._a[MINUTE] === 0 &&
  4350. config._a[SECOND] === 0 &&
  4351. config._a[MILLISECOND] === 0) {
  4352. config._nextDay = true;
  4353. config._a[HOUR] = 0;
  4354. }
  4355. config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
  4356. expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();
  4357. // Apply timezone offset from input. The actual utcOffset can be changed
  4358. // with parseZone.
  4359. if (config._tzm != null) {
  4360. config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
  4361. }
  4362. if (config._nextDay) {
  4363. config._a[HOUR] = 24;
  4364. }
  4365. // check for mismatching day of week
  4366. if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {
  4367. getParsingFlags(config).weekdayMismatch = true;
  4368. }
  4369. return config;
  4370. }
  4371. /**
  4372. * @param {?} config
  4373. * @return {?}
  4374. */
  4375. function dayOfYearFromWeekInfo(config) {
  4376. /** @type {?} */
  4377. var w;
  4378. /** @type {?} */
  4379. var weekYear;
  4380. /** @type {?} */
  4381. var week;
  4382. /** @type {?} */
  4383. var weekday;
  4384. /** @type {?} */
  4385. var dow;
  4386. /** @type {?} */
  4387. var doy;
  4388. /** @type {?} */
  4389. var temp;
  4390. /** @type {?} */
  4391. var weekdayOverflow;
  4392. w = config._w;
  4393. if (w.GG != null || w.W != null || w.E != null) {
  4394. dow = 1;
  4395. doy = 4;
  4396. // TODO: We need to take the current isoWeekYear, but that depends on
  4397. // how we interpret now (local, utc, fixed offset). So create
  4398. // a now version of current config (take local/utc/offset flags, and
  4399. // create now).
  4400. weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(new Date(), 1, 4).year);
  4401. week = defaults(w.W, 1);
  4402. weekday = defaults(w.E, 1);
  4403. if (weekday < 1 || weekday > 7) {
  4404. weekdayOverflow = true;
  4405. }
  4406. }
  4407. else {
  4408. dow = config._locale._week.dow;
  4409. doy = config._locale._week.doy;
  4410. /** @type {?} */
  4411. var curWeek = weekOfYear(new Date(), dow, doy);
  4412. weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
  4413. // Default to current week.
  4414. week = defaults(w.w, curWeek.week);
  4415. if (w.d != null) {
  4416. // weekday -- low day numbers are considered next week
  4417. weekday = w.d;
  4418. if (weekday < 0 || weekday > 6) {
  4419. weekdayOverflow = true;
  4420. }
  4421. }
  4422. else if (w.e != null) {
  4423. // local weekday -- counting starts from begining of week
  4424. weekday = w.e + dow;
  4425. if (w.e < 0 || w.e > 6) {
  4426. weekdayOverflow = true;
  4427. }
  4428. }
  4429. else {
  4430. // default to begining of week
  4431. weekday = dow;
  4432. }
  4433. }
  4434. if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
  4435. getParsingFlags(config)._overflowWeeks = true;
  4436. }
  4437. else if (weekdayOverflow != null) {
  4438. getParsingFlags(config)._overflowWeekday = true;
  4439. }
  4440. else {
  4441. temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
  4442. config._a[YEAR] = temp.year;
  4443. config._dayOfYear = temp.dayOfYear;
  4444. }
  4445. return config;
  4446. }
  4447. /**
  4448. * @fileoverview added by tsickle
  4449. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4450. */
  4451. /**
  4452. * @param {?} config
  4453. * @return {?}
  4454. */
  4455. function checkOverflow(config) {
  4456. /** @type {?} */
  4457. var overflow;
  4458. /** @type {?} */
  4459. var a = config._a;
  4460. if (a && getParsingFlags(config).overflow === -2) {
  4461. // todo: fix this sh*t
  4462. overflow =
  4463. a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
  4464. a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
  4465. a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
  4466. a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
  4467. a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
  4468. a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
  4469. -1;
  4470. if (getParsingFlags(config)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
  4471. overflow = DATE;
  4472. }
  4473. if (getParsingFlags(config)._overflowWeeks && overflow === -1) {
  4474. overflow = WEEK;
  4475. }
  4476. if (getParsingFlags(config)._overflowWeekday && overflow === -1) {
  4477. overflow = WEEKDAY;
  4478. }
  4479. getParsingFlags(config).overflow = overflow;
  4480. }
  4481. return config;
  4482. }
  4483. /**
  4484. * @fileoverview added by tsickle
  4485. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4486. */
  4487. // constant that refers to the ISO standard
  4488. // hooks.ISO_8601 = function () {};
  4489. /** @type {?} */
  4490. var ISO_8601 = 'ISO_8601';
  4491. // constant that refers to the RFC 2822 form
  4492. // hooks.RFC_2822 = function () {};
  4493. /** @type {?} */
  4494. var RFC_2822 = 'RFC_2822';
  4495. // date from string and format string
  4496. /**
  4497. * @param {?} config
  4498. * @return {?}
  4499. */
  4500. function configFromStringAndFormat(config) {
  4501. // TODO: Move this to another part of the creation flow to prevent circular deps
  4502. if (config._f === ISO_8601) {
  4503. return configFromISO(config);
  4504. }
  4505. if (config._f === RFC_2822) {
  4506. return configFromRFC2822(config);
  4507. }
  4508. config._a = [];
  4509. getParsingFlags(config).empty = true;
  4510. if (isArray(config._f) || (!config._i && config._i !== 0)) {
  4511. return config;
  4512. }
  4513. // This array is used to make a Date, either with `new Date` or `Date.UTC`
  4514. /** @type {?} */
  4515. var input = config._i.toString();
  4516. /** @type {?} */
  4517. var totalParsedInputLength = 0;
  4518. /** @type {?} */
  4519. var inputLength = input.length;
  4520. /** @type {?} */
  4521. var tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
  4522. /** @type {?} */
  4523. var i;
  4524. /** @type {?} */
  4525. var token;
  4526. /** @type {?} */
  4527. var parsedInput;
  4528. /** @type {?} */
  4529. var skipped;
  4530. for (i = 0; i < tokens.length; i++) {
  4531. token = tokens[i];
  4532. parsedInput = (input.match(getParseRegexForToken(token, config._locale)) || [])[0];
  4533. if (parsedInput) {
  4534. skipped = input.substr(0, input.indexOf(parsedInput));
  4535. if (skipped.length > 0) {
  4536. getParsingFlags(config).unusedInput.push(skipped);
  4537. }
  4538. input = input.slice(input.indexOf(parsedInput) + parsedInput.length);
  4539. totalParsedInputLength += parsedInput.length;
  4540. }
  4541. // don't parse if it's not a known token
  4542. if (formatTokenFunctions[token]) {
  4543. if (parsedInput) {
  4544. getParsingFlags(config).empty = false;
  4545. }
  4546. else {
  4547. getParsingFlags(config).unusedTokens.push(token);
  4548. }
  4549. addTimeToArrayFromToken(token, parsedInput, config);
  4550. }
  4551. else if (config._strict && !parsedInput) {
  4552. getParsingFlags(config).unusedTokens.push(token);
  4553. }
  4554. }
  4555. // add remaining unparsed input length to the string
  4556. getParsingFlags(config).charsLeftOver = inputLength - totalParsedInputLength;
  4557. if (input.length > 0) {
  4558. getParsingFlags(config).unusedInput.push(input);
  4559. }
  4560. // clear _12h flag if hour is <= 12
  4561. if (config._a[HOUR] <= 12 &&
  4562. getParsingFlags(config).bigHour === true &&
  4563. config._a[HOUR] > 0) {
  4564. getParsingFlags(config).bigHour = void 0;
  4565. }
  4566. getParsingFlags(config).parsedDateParts = config._a.slice(0);
  4567. getParsingFlags(config).meridiem = config._meridiem;
  4568. // handle meridiem
  4569. config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
  4570. configFromArray(config);
  4571. return checkOverflow(config);
  4572. }
  4573. /**
  4574. * @param {?} locale
  4575. * @param {?} _hour
  4576. * @param {?} meridiem
  4577. * @return {?}
  4578. */
  4579. function meridiemFixWrap(locale, _hour, meridiem) {
  4580. /** @type {?} */
  4581. var hour = _hour;
  4582. if (meridiem == null) {
  4583. // nothing to do
  4584. return hour;
  4585. }
  4586. if (locale.meridiemHour != null) {
  4587. return locale.meridiemHour(hour, meridiem);
  4588. }
  4589. if (locale.isPM == null) {
  4590. // this is not supposed to happen
  4591. return hour;
  4592. }
  4593. // Fallback
  4594. /** @type {?} */
  4595. var isPm = locale.isPM(meridiem);
  4596. if (isPm && hour < 12) {
  4597. hour += 12;
  4598. }
  4599. if (!isPm && hour === 12) {
  4600. hour = 0;
  4601. }
  4602. return hour;
  4603. }
  4604. /**
  4605. * @fileoverview added by tsickle
  4606. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4607. */
  4608. // date from string and array of format strings
  4609. /**
  4610. * @param {?} config
  4611. * @return {?}
  4612. */
  4613. function configFromStringAndArray(config) {
  4614. /** @type {?} */
  4615. var tempConfig;
  4616. /** @type {?} */
  4617. var bestMoment;
  4618. /** @type {?} */
  4619. var scoreToBeat;
  4620. /** @type {?} */
  4621. var currentScore;
  4622. if (!config._f || config._f.length === 0) {
  4623. getParsingFlags(config).invalidFormat = true;
  4624. return createInvalid(config);
  4625. }
  4626. /** @type {?} */
  4627. var i;
  4628. for (i = 0; i < config._f.length; i++) {
  4629. currentScore = 0;
  4630. tempConfig = Object.assign({}, config);
  4631. if (config._useUTC != null) {
  4632. tempConfig._useUTC = config._useUTC;
  4633. }
  4634. tempConfig._f = config._f[i];
  4635. configFromStringAndFormat(tempConfig);
  4636. if (!isValid(tempConfig)) {
  4637. continue;
  4638. }
  4639. // if there is any input that was not parsed add a penalty for that format
  4640. currentScore += getParsingFlags(tempConfig).charsLeftOver;
  4641. // or tokens
  4642. currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
  4643. getParsingFlags(tempConfig).score = currentScore;
  4644. if (scoreToBeat == null || currentScore < scoreToBeat) {
  4645. scoreToBeat = currentScore;
  4646. bestMoment = tempConfig;
  4647. }
  4648. }
  4649. return Object.assign(config, bestMoment || tempConfig);
  4650. }
  4651. /**
  4652. * @fileoverview added by tsickle
  4653. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4654. */
  4655. /**
  4656. * @param {?} config
  4657. * @return {?}
  4658. */
  4659. function configFromObject(config) {
  4660. if (config._d) {
  4661. return config;
  4662. }
  4663. /** @type {?} */
  4664. var input = config._i;
  4665. if (isObject(input)) {
  4666. /** @type {?} */
  4667. var i = normalizeObjectUnits((/** @type {?} */ (input)));
  4668. config._a = [i.year, i.month, i.day, i.hours, i.minutes, i.seconds, i.milliseconds]
  4669. // todo: obsolete -> remove it
  4670. .map((/**
  4671. * @param {?} obj
  4672. * @return {?}
  4673. */
  4674. function (obj) { return isString(obj) ? parseInt(obj, 10) : obj; }));
  4675. }
  4676. return configFromArray(config);
  4677. }
  4678. /**
  4679. * @fileoverview added by tsickle
  4680. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4681. */
  4682. /**
  4683. * @param {?} config
  4684. * @return {?}
  4685. */
  4686. function createFromConfig(config) {
  4687. /** @type {?} */
  4688. var res = checkOverflow(prepareConfig(config));
  4689. // todo: remove, in moment.js it's never called cuz of moment constructor
  4690. res._d = new Date(res._d != null ? res._d.getTime() : NaN);
  4691. if (!isValid(Object.assign({}, res, { _isValid: null }))) {
  4692. res._d = new Date(NaN);
  4693. }
  4694. // todo: update offset
  4695. /*if (res._nextDay) {
  4696. // Adding is smart enough around DST
  4697. res._d = add(res._d, 1, 'day');
  4698. res._nextDay = undefined;
  4699. }*/
  4700. return res;
  4701. }
  4702. /**
  4703. * @param {?} config
  4704. * @return {?}
  4705. */
  4706. function prepareConfig(config) {
  4707. /** @type {?} */
  4708. var input = config._i;
  4709. /** @type {?} */
  4710. var format = config._f;
  4711. config._locale = config._locale || getLocale(config._l);
  4712. if (input === null || (format === undefined && input === '')) {
  4713. return createInvalid(config, { nullInput: true });
  4714. }
  4715. if (isString(input)) {
  4716. config._i = input = config._locale.preparse(input);
  4717. }
  4718. if (isDate(input)) {
  4719. config._d = cloneDate(input);
  4720. return config;
  4721. }
  4722. // todo: add check for recursion
  4723. if (isArray(format)) {
  4724. configFromStringAndArray(config);
  4725. }
  4726. else if (format) {
  4727. configFromStringAndFormat(config);
  4728. }
  4729. else {
  4730. configFromInput(config);
  4731. }
  4732. if (!isValid(config)) {
  4733. config._d = null;
  4734. }
  4735. return config;
  4736. }
  4737. /**
  4738. * @param {?} config
  4739. * @return {?}
  4740. */
  4741. function configFromInput(config) {
  4742. /** @type {?} */
  4743. var input = config._i;
  4744. if (isUndefined(input)) {
  4745. config._d = new Date();
  4746. }
  4747. else if (isDate(input)) {
  4748. config._d = cloneDate(input);
  4749. }
  4750. else if (isString(input)) {
  4751. configFromString(config);
  4752. }
  4753. else if (isArray(input) && input.length) {
  4754. /** @type {?} */
  4755. var _arr = input.slice(0);
  4756. config._a = _arr.map((/**
  4757. * @param {?} obj
  4758. * @return {?}
  4759. */
  4760. function (obj) { return isString(obj) ? parseInt(obj, 10) : obj; }));
  4761. configFromArray(config);
  4762. }
  4763. else if (isObject(input)) {
  4764. configFromObject(config);
  4765. }
  4766. else if (isNumber(input)) {
  4767. // from milliseconds
  4768. config._d = new Date(input);
  4769. }
  4770. else {
  4771. // hooks.createFromInputFallback(config);
  4772. return createInvalid(config);
  4773. }
  4774. return config;
  4775. }
  4776. /**
  4777. * @param {?} input
  4778. * @param {?=} format
  4779. * @param {?=} localeKey
  4780. * @param {?=} strict
  4781. * @param {?=} isUTC
  4782. * @return {?}
  4783. */
  4784. function createLocalOrUTC(input, format, localeKey, strict, isUTC) {
  4785. /** @type {?} */
  4786. var config = {};
  4787. /** @type {?} */
  4788. var _input = input;
  4789. // params switch -> skip; test it well
  4790. // if (localeKey === true || localeKey === false) {
  4791. // strict = localeKey;
  4792. // localeKey = undefined;
  4793. // }
  4794. // todo: fail fast and return not valid date
  4795. if ((isObject(_input) && isObjectEmpty(_input)) || (isArray(_input) && _input.length === 0)) {
  4796. _input = undefined;
  4797. }
  4798. // object construction must be done this way.
  4799. // https://github.com/moment/moment/issues/1423
  4800. // config._isAMomentObject = true;
  4801. config._useUTC = config._isUTC = isUTC;
  4802. config._l = localeKey;
  4803. config._i = _input;
  4804. config._f = format;
  4805. config._strict = strict;
  4806. return createFromConfig(config);
  4807. }
  4808. /**
  4809. * @fileoverview added by tsickle
  4810. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4811. */
  4812. /**
  4813. * @param {?} input
  4814. * @param {?=} format
  4815. * @param {?=} localeKey
  4816. * @param {?=} strict
  4817. * @param {?=} isUTC
  4818. * @return {?}
  4819. */
  4820. function parseDate(input, format, localeKey, strict, isUTC) {
  4821. if (isDate(input)) {
  4822. return input;
  4823. }
  4824. /** @type {?} */
  4825. var config = createLocalOrUTC(input, format, localeKey, strict, isUTC);
  4826. return config._d;
  4827. }
  4828. /**
  4829. * @param {?} date
  4830. * @return {?}
  4831. */
  4832. function utcAsLocal(date) {
  4833. if (!(date instanceof Date)) {
  4834. return null;
  4835. }
  4836. return new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds());
  4837. }
  4838. /**
  4839. * @fileoverview added by tsickle
  4840. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4841. */
  4842. /**
  4843. * @param {?} num
  4844. * @return {?}
  4845. */
  4846. function absRound(num) {
  4847. return num < 0 ? Math.round(num * -1) * -1 : Math.round(num);
  4848. }
  4849. /**
  4850. * @fileoverview added by tsickle
  4851. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4852. */
  4853. /**
  4854. * @param {?} date1
  4855. * @param {?} date2
  4856. * @param {?=} units
  4857. * @return {?}
  4858. */
  4859. function isAfter(date1, date2, units) {
  4860. if (units === void 0) { units = 'milliseconds'; }
  4861. if (!date1 || !date2) {
  4862. return false;
  4863. }
  4864. if (units === 'milliseconds') {
  4865. return date1.valueOf() > date2.valueOf();
  4866. }
  4867. return date2.valueOf() < startOf(date1, units).valueOf();
  4868. }
  4869. /**
  4870. * @param {?} date1
  4871. * @param {?} date2
  4872. * @param {?=} units
  4873. * @return {?}
  4874. */
  4875. function isBefore(date1, date2, units) {
  4876. if (units === void 0) { units = 'milliseconds'; }
  4877. if (!date1 || !date2) {
  4878. return false;
  4879. }
  4880. if (units === 'milliseconds') {
  4881. return date1.valueOf() < date2.valueOf();
  4882. }
  4883. return endOf(date1, units).valueOf() < date2.valueOf();
  4884. }
  4885. /**
  4886. * @param {?} date
  4887. * @param {?} daysDisabled
  4888. * @return {?}
  4889. */
  4890. function isDisabledDay(date, daysDisabled) {
  4891. if (daysDisabled === undefined || !daysDisabled || !daysDisabled.length) {
  4892. return false;
  4893. }
  4894. return daysDisabled.some((/**
  4895. * @param {?} day
  4896. * @return {?}
  4897. */
  4898. function (day) { return day === date.getDay(); }));
  4899. }
  4900. /**
  4901. * @param {?} date1
  4902. * @param {?} date2
  4903. * @param {?=} units
  4904. * @return {?}
  4905. */
  4906. function isSame(date1, date2, units) {
  4907. if (units === void 0) { units = 'milliseconds'; }
  4908. if (!date1 || !date2) {
  4909. return false;
  4910. }
  4911. if (units === 'milliseconds') {
  4912. return date1.valueOf() === date2.valueOf();
  4913. }
  4914. /** @type {?} */
  4915. var inputMs = date2.valueOf();
  4916. return (startOf(date1, units).valueOf() <= inputMs &&
  4917. inputMs <= endOf(date1, units).valueOf());
  4918. }
  4919. /**
  4920. * @fileoverview added by tsickle
  4921. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  4922. */
  4923. /** @type {?} */
  4924. var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/;
  4925. // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
  4926. // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
  4927. // and further modified to allow for strings containing both week and day
  4928. // tslint:disable-next-line
  4929. /** @type {?} */
  4930. 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)?)?$/;
  4931. /**
  4932. * @param {?=} input
  4933. * @param {?=} key
  4934. * @param {?=} config
  4935. * @return {?}
  4936. */
  4937. function createDuration(input, key, config) {
  4938. if (config === void 0) { config = {}; }
  4939. /** @type {?} */
  4940. var duration = convertDuration(input, key);
  4941. // matching against regexp is expensive, do it on demand
  4942. return new Duration(duration, config);
  4943. }
  4944. /**
  4945. * @param {?} input
  4946. * @param {?} key
  4947. * @return {?}
  4948. */
  4949. function convertDuration(input, key) {
  4950. var _a;
  4951. // checks for null or undefined
  4952. if (input == null) {
  4953. return {};
  4954. }
  4955. if (isDuration(input)) {
  4956. return {
  4957. milliseconds: input._milliseconds,
  4958. day: input._days,
  4959. month: input._months
  4960. };
  4961. }
  4962. if (isNumber(input)) {
  4963. // duration = {};
  4964. return key ? (_a = {}, _a[key] = input, _a) : { milliseconds: input };
  4965. }
  4966. if (isString(input)) {
  4967. /** @type {?} */
  4968. var match = aspNetRegex.exec(input);
  4969. if (match) {
  4970. /** @type {?} */
  4971. var sign = (match[1] === '-') ? -1 : 1;
  4972. return {
  4973. year: 0,
  4974. day: toInt(match[DATE]) * sign,
  4975. hours: toInt(match[HOUR]) * sign,
  4976. minutes: toInt(match[MINUTE]) * sign,
  4977. seconds: toInt(match[SECOND]) * sign,
  4978. // the millisecond decimal point is included in the match
  4979. milliseconds: toInt(absRound(toInt(match[MILLISECOND]) * 1000)) * sign
  4980. };
  4981. }
  4982. match = isoRegex.exec(input);
  4983. if (match) {
  4984. /** @type {?} */
  4985. var sign = (match[1] === '-') ? -1 : (match[1] === '+') ? 1 : 1;
  4986. return {
  4987. year: parseIso(match[2], sign),
  4988. month: parseIso(match[3], sign),
  4989. week: parseIso(match[4], sign),
  4990. day: parseIso(match[5], sign),
  4991. hours: parseIso(match[6], sign),
  4992. minutes: parseIso(match[7], sign),
  4993. seconds: parseIso(match[8], sign)
  4994. };
  4995. }
  4996. }
  4997. if (isObject(input) && ('from' in input || 'to' in input)) {
  4998. /** @type {?} */
  4999. var diffRes = momentsDifference(parseDate(input.from), parseDate(input.to));
  5000. return {
  5001. milliseconds: diffRes.milliseconds,
  5002. month: diffRes.months
  5003. };
  5004. }
  5005. return input;
  5006. }
  5007. // createDuration.fn = Duration.prototype;
  5008. // createDuration.invalid = invalid;
  5009. /**
  5010. * @param {?} inp
  5011. * @param {?} sign
  5012. * @return {?}
  5013. */
  5014. function parseIso(inp, sign) {
  5015. // We'd normally use ~~inp for this, but unfortunately it also
  5016. // converts floats to ints.
  5017. // inp may be undefined, so careful calling replace on it.
  5018. /** @type {?} */
  5019. var res = inp && parseFloat(inp.replace(',', '.'));
  5020. // apply sign while we're at it
  5021. return (isNaN(res) ? 0 : res) * sign;
  5022. }
  5023. /**
  5024. * @param {?} base
  5025. * @param {?} other
  5026. * @return {?}
  5027. */
  5028. function positiveMomentsDifference(base, other) {
  5029. /** @type {?} */
  5030. var res = { milliseconds: 0, months: 0 };
  5031. res.months = getMonth(other) - getMonth(base) +
  5032. (getFullYear(other) - getFullYear(base)) * 12;
  5033. /** @type {?} */
  5034. var _basePlus = add(cloneDate(base), res.months, 'month');
  5035. if (isAfter(_basePlus, other)) {
  5036. --res.months;
  5037. }
  5038. res.milliseconds = +other - +(add(cloneDate(base), res.months, 'month'));
  5039. return res;
  5040. }
  5041. /**
  5042. * @param {?} base
  5043. * @param {?} other
  5044. * @return {?}
  5045. */
  5046. function momentsDifference(base, other) {
  5047. if (!(isDateValid(base) && isDateValid(other))) {
  5048. return { milliseconds: 0, months: 0 };
  5049. }
  5050. /** @type {?} */
  5051. var res;
  5052. /** @type {?} */
  5053. var _other = cloneWithOffset(other, base, { _offset: base.getTimezoneOffset() });
  5054. if (isBefore(base, _other)) {
  5055. res = positiveMomentsDifference(base, _other);
  5056. }
  5057. else {
  5058. res = positiveMomentsDifference(_other, base);
  5059. res.milliseconds = -res.milliseconds;
  5060. res.months = -res.months;
  5061. }
  5062. return res;
  5063. }
  5064. /**
  5065. * @fileoverview added by tsickle
  5066. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  5067. */
  5068. /**
  5069. * @param {?} date
  5070. * @param {?} val
  5071. * @param {?} period
  5072. * @param {?=} isUTC
  5073. * @return {?}
  5074. */
  5075. function add(date, val, period, isUTC) {
  5076. /** @type {?} */
  5077. var dur = createDuration(val, period);
  5078. return addSubtract(date, dur, 1, isUTC);
  5079. }
  5080. /**
  5081. * @param {?} date
  5082. * @param {?} val
  5083. * @param {?} period
  5084. * @param {?=} isUTC
  5085. * @return {?}
  5086. */
  5087. function subtract(date, val, period, isUTC) {
  5088. /** @type {?} */
  5089. var dur = createDuration(val, period);
  5090. return addSubtract(date, dur, -1, isUTC);
  5091. }
  5092. /**
  5093. * @param {?} date
  5094. * @param {?} duration
  5095. * @param {?} isAdding
  5096. * @param {?=} isUTC
  5097. * @return {?}
  5098. */
  5099. function addSubtract(date, duration, isAdding, isUTC) {
  5100. /** @type {?} */
  5101. var milliseconds = duration._milliseconds;
  5102. /** @type {?} */
  5103. var days = absRound(duration._days);
  5104. /** @type {?} */
  5105. var months = absRound(duration._months);
  5106. // todo: add timezones support
  5107. // const _updateOffset = updateOffset == null ? true : updateOffset;
  5108. if (months) {
  5109. setMonth(date, getMonth(date, isUTC) + months * isAdding, isUTC);
  5110. }
  5111. if (days) {
  5112. setDate(date, getDate(date, isUTC) + days * isAdding, isUTC);
  5113. }
  5114. if (milliseconds) {
  5115. setTime(date, getTime(date) + milliseconds * isAdding);
  5116. }
  5117. return cloneDate(date);
  5118. // todo: add timezones support
  5119. // if (_updateOffset) {
  5120. // hooks.updateOffset(date, days || months);
  5121. // }
  5122. }
  5123. /**
  5124. * @fileoverview added by tsickle
  5125. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  5126. */
  5127. /**
  5128. * @return {?}
  5129. */
  5130. function initDayOfWeek() {
  5131. // FORMATTING
  5132. addFormatToken('d', null, 'do', (/**
  5133. * @param {?} date
  5134. * @param {?} opts
  5135. * @return {?}
  5136. */
  5137. function (date, opts) {
  5138. return getDay(date, opts.isUTC)
  5139. .toString(10);
  5140. }));
  5141. addFormatToken('dd', null, null, (/**
  5142. * @param {?} date
  5143. * @param {?} opts
  5144. * @return {?}
  5145. */
  5146. function (date, opts) {
  5147. return opts.locale.weekdaysMin(date, opts.format, opts.isUTC);
  5148. }));
  5149. addFormatToken('ddd', null, null, (/**
  5150. * @param {?} date
  5151. * @param {?} opts
  5152. * @return {?}
  5153. */
  5154. function (date, opts) {
  5155. return opts.locale.weekdaysShort(date, opts.format, opts.isUTC);
  5156. }));
  5157. addFormatToken('dddd', null, null, (/**
  5158. * @param {?} date
  5159. * @param {?} opts
  5160. * @return {?}
  5161. */
  5162. function (date, opts) {
  5163. return opts.locale.weekdays(date, opts.format, opts.isUTC);
  5164. }));
  5165. addFormatToken('e', null, null, (/**
  5166. * @param {?} date
  5167. * @param {?} opts
  5168. * @return {?}
  5169. */
  5170. function (date, opts) {
  5171. return getLocaleDayOfWeek(date, opts.locale, opts.isUTC)
  5172. .toString(10);
  5173. // return getDay(date, opts.isUTC).toString(10);
  5174. }));
  5175. addFormatToken('E', null, null, (/**
  5176. * @param {?} date
  5177. * @param {?} opts
  5178. * @return {?}
  5179. */
  5180. function (date, opts) {
  5181. return getISODayOfWeek(date, opts.isUTC)
  5182. .toString(10);
  5183. }));
  5184. // ALIASES
  5185. addUnitAlias('day', 'd');
  5186. addUnitAlias('weekday', 'e');
  5187. addUnitAlias('isoWeekday', 'E');
  5188. // PARSING
  5189. addRegexToken('d', match1to2);
  5190. addRegexToken('e', match1to2);
  5191. addRegexToken('E', match1to2);
  5192. addRegexToken('dd', (/**
  5193. * @param {?} isStrict
  5194. * @param {?} locale
  5195. * @return {?}
  5196. */
  5197. function (isStrict, locale) {
  5198. return locale.weekdaysMinRegex(isStrict);
  5199. }));
  5200. addRegexToken('ddd', (/**
  5201. * @param {?} isStrict
  5202. * @param {?} locale
  5203. * @return {?}
  5204. */
  5205. function (isStrict, locale) {
  5206. return locale.weekdaysShortRegex(isStrict);
  5207. }));
  5208. addRegexToken('dddd', (/**
  5209. * @param {?} isStrict
  5210. * @param {?} locale
  5211. * @return {?}
  5212. */
  5213. function (isStrict, locale) {
  5214. return locale.weekdaysRegex(isStrict);
  5215. }));
  5216. addWeekParseToken(['dd', 'ddd', 'dddd'], (/**
  5217. * @param {?} input
  5218. * @param {?} week
  5219. * @param {?} config
  5220. * @param {?} token
  5221. * @return {?}
  5222. */
  5223. function (input, week, config, token) {
  5224. /** @type {?} */
  5225. var weekday = config._locale.weekdaysParse(input, token, config._strict);
  5226. // if we didn't get a weekday name, mark the date as invalid
  5227. if (weekday != null) {
  5228. week.d = weekday;
  5229. }
  5230. else {
  5231. getParsingFlags(config).invalidWeekday = !!input;
  5232. }
  5233. return config;
  5234. }));
  5235. addWeekParseToken(['d', 'e', 'E'], (/**
  5236. * @param {?} input
  5237. * @param {?} week
  5238. * @param {?} config
  5239. * @param {?} token
  5240. * @return {?}
  5241. */
  5242. function (input, week, config, token) {
  5243. week[token] = toInt(input);
  5244. return config;
  5245. }));
  5246. }
  5247. // HELPERS
  5248. /**
  5249. * @param {?} input
  5250. * @param {?} locale
  5251. * @return {?}
  5252. */
  5253. function parseWeekday(input, locale) {
  5254. if (!isString(input)) {
  5255. return input;
  5256. }
  5257. /** @type {?} */
  5258. var _num = parseInt(input, 10);
  5259. if (!isNaN(_num)) {
  5260. return _num;
  5261. }
  5262. /** @type {?} */
  5263. var _weekDay = locale.weekdaysParse(input);
  5264. if (isNumber(_weekDay)) {
  5265. return _weekDay;
  5266. }
  5267. return null;
  5268. }
  5269. /**
  5270. * @param {?} input
  5271. * @param {?=} locale
  5272. * @return {?}
  5273. */
  5274. function parseIsoWeekday(input, locale) {
  5275. if (locale === void 0) { locale = getLocale(); }
  5276. if (isString(input)) {
  5277. return locale.weekdaysParse(input) % 7 || 7;
  5278. }
  5279. return isNumber(input) && isNaN(input) ? null : input;
  5280. }
  5281. /**
  5282. * @param {?} date
  5283. * @param {?} input
  5284. * @param {?=} locale
  5285. * @param {?=} isUTC
  5286. * @return {?}
  5287. */
  5288. function setDayOfWeek(date, input, locale, isUTC) {
  5289. if (locale === void 0) { locale = getLocale(); }
  5290. /** @type {?} */
  5291. var day = getDay(date, isUTC);
  5292. /** @type {?} */
  5293. var _input = parseWeekday(input, locale);
  5294. return add(date, _input - day, 'day');
  5295. }
  5296. /**
  5297. * @param {?} date
  5298. * @param {?=} isUTC
  5299. * @return {?}
  5300. */
  5301. function getDayOfWeek(date, isUTC) {
  5302. return getDay(date, isUTC);
  5303. }
  5304. /**
  5305. * ****************************************
  5306. * @param {?} date
  5307. * @param {?=} locale
  5308. * @param {?=} isUTC
  5309. * @return {?}
  5310. */
  5311. // todo: utc
  5312. // getSetLocaleDayOfWeek
  5313. function getLocaleDayOfWeek(date, locale, isUTC) {
  5314. if (locale === void 0) { locale = getLocale(); }
  5315. return (getDay(date, isUTC) + 7 - locale.firstDayOfWeek()) % 7;
  5316. }
  5317. /**
  5318. * @param {?} date
  5319. * @param {?} input
  5320. * @param {?=} opts
  5321. * @return {?}
  5322. */
  5323. function setLocaleDayOfWeek(date, input, opts) {
  5324. if (opts === void 0) { opts = {}; }
  5325. /** @type {?} */
  5326. var weekday = getLocaleDayOfWeek(date, opts.locale, opts.isUTC);
  5327. return add(date, input - weekday, 'day');
  5328. }
  5329. // getSetISODayOfWeek
  5330. /**
  5331. * @param {?} date
  5332. * @param {?=} isUTC
  5333. * @return {?}
  5334. */
  5335. function getISODayOfWeek(date, isUTC) {
  5336. return getDay(date, isUTC) || 7;
  5337. }
  5338. /**
  5339. * @param {?} date
  5340. * @param {?} input
  5341. * @param {?=} opts
  5342. * @return {?}
  5343. */
  5344. function setISODayOfWeek(date, input, opts) {
  5345. // behaves the same as moment#day except
  5346. // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
  5347. // as a setter, sunday should belong to the previous week.
  5348. if (opts === void 0) { opts = {}; }
  5349. // behaves the same as moment#day except
  5350. // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
  5351. // as a setter, sunday should belong to the previous week.
  5352. /** @type {?} */
  5353. var weekday = parseIsoWeekday(input, opts.locale);
  5354. return setDayOfWeek(date, getDayOfWeek(date) % 7 ? weekday : weekday - 7);
  5355. }
  5356. /**
  5357. * @fileoverview added by tsickle
  5358. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  5359. */
  5360. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  5361. //! moment.js locale configuration
  5362. //! locale : Arabic [ar]
  5363. //! author : Abdel Said: https://github.com/abdelsaid
  5364. //! author : Ahmed Elkhatib
  5365. //! author : forabi https://github.com/forabi
  5366. /** @type {?} */
  5367. var symbolMap = {
  5368. 1: '١',
  5369. 2: '٢',
  5370. 3: '٣',
  5371. 4: '٤',
  5372. 5: '٥',
  5373. 6: '٦',
  5374. 7: '٧',
  5375. 8: '٨',
  5376. 9: '٩',
  5377. 0: '٠'
  5378. };
  5379. /** @type {?} */
  5380. var numberMap = {
  5381. '١': '1',
  5382. '٢': '2',
  5383. '٣': '3',
  5384. '٤': '4',
  5385. '٥': '5',
  5386. '٦': '6',
  5387. '٧': '7',
  5388. '٨': '8',
  5389. '٩': '9',
  5390. '٠': '0'
  5391. };
  5392. /** @type {?} */
  5393. var pluralForm = (/**
  5394. * @param {?} num
  5395. * @return {?}
  5396. */
  5397. function (num) {
  5398. return num === 0 ? 0 : num === 1 ? 1 : num === 2 ? 2 : num % 100 >= 3 && num % 100 <= 10 ? 3 : num % 100 >= 11 ? 4 : 5;
  5399. });
  5400. /** @type {?} */
  5401. var plurals = {
  5402. s: ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],
  5403. m: ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],
  5404. h: ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],
  5405. d: ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],
  5406. M: ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],
  5407. y: ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']
  5408. };
  5409. /** @type {?} */
  5410. var pluralize = (/**
  5411. * @param {?} u
  5412. * @return {?}
  5413. */
  5414. function (u) {
  5415. return (/**
  5416. * @param {?} num
  5417. * @param {?} withoutSuffix
  5418. * @return {?}
  5419. */
  5420. function (num, withoutSuffix) {
  5421. /** @type {?} */
  5422. var f = pluralForm(num);
  5423. /** @type {?} */
  5424. var str = plurals[u][pluralForm(num)];
  5425. if (f === 2) {
  5426. str = str[withoutSuffix ? 0 : 1];
  5427. }
  5428. return ((/** @type {?} */ (str))).replace(/%d/i, num.toString());
  5429. });
  5430. });
  5431. /** @type {?} */
  5432. var months = [
  5433. 'يناير',
  5434. 'فبراير',
  5435. 'مارس',
  5436. 'أبريل',
  5437. 'مايو',
  5438. 'يونيو',
  5439. 'يوليو',
  5440. 'أغسطس',
  5441. 'سبتمبر',
  5442. 'أكتوبر',
  5443. 'نوفمبر',
  5444. 'ديسمبر'
  5445. ];
  5446. /** @type {?} */
  5447. var arLocale = {
  5448. abbr: 'ar',
  5449. months: months,
  5450. monthsShort: months,
  5451. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  5452. weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  5453. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  5454. weekdaysParseExact: true,
  5455. longDateFormat: {
  5456. LT: 'HH:mm',
  5457. LTS: 'HH:mm:ss',
  5458. L: 'D/\u200FM/\u200FYYYY',
  5459. LL: 'D MMMM YYYY',
  5460. LLL: 'D MMMM YYYY HH:mm',
  5461. LLLL: 'dddd D MMMM YYYY HH:mm'
  5462. },
  5463. meridiemParse: /ص|م/,
  5464. isPM: /**
  5465. * @param {?} input
  5466. * @return {?}
  5467. */
  5468. function (input) {
  5469. return 'م' === input;
  5470. },
  5471. meridiem: /**
  5472. * @param {?} hour
  5473. * @param {?} minute
  5474. * @param {?} isLower
  5475. * @return {?}
  5476. */
  5477. function (hour, minute, isLower) {
  5478. if (hour < 12) {
  5479. return 'ص';
  5480. }
  5481. else {
  5482. return 'م';
  5483. }
  5484. },
  5485. calendar: {
  5486. sameDay: '[اليوم عند الساعة] LT',
  5487. nextDay: '[غدًا عند الساعة] LT',
  5488. nextWeek: 'dddd [عند الساعة] LT',
  5489. lastDay: '[أمس عند الساعة] LT',
  5490. lastWeek: 'dddd [عند الساعة] LT',
  5491. sameElse: 'L'
  5492. },
  5493. relativeTime: {
  5494. future: 'بعد %s',
  5495. past: 'منذ %s',
  5496. s: pluralize('s'),
  5497. ss: pluralize('s'),
  5498. m: pluralize('m'),
  5499. mm: pluralize('m'),
  5500. h: pluralize('h'),
  5501. hh: pluralize('h'),
  5502. d: pluralize('d'),
  5503. dd: pluralize('d'),
  5504. M: pluralize('M'),
  5505. MM: pluralize('M'),
  5506. y: pluralize('y'),
  5507. yy: pluralize('y')
  5508. },
  5509. preparse: /**
  5510. * @param {?} str
  5511. * @return {?}
  5512. */
  5513. function (str) {
  5514. return str.replace(/[١٢٣٤٥٦٧٨٩٠]/g, (/**
  5515. * @param {?} match
  5516. * @return {?}
  5517. */
  5518. function (match) {
  5519. return numberMap[match];
  5520. })).replace(/،/g, ',');
  5521. },
  5522. postformat: /**
  5523. * @param {?} str
  5524. * @return {?}
  5525. */
  5526. function (str) {
  5527. return str.replace(/\d/g, (/**
  5528. * @param {?} match
  5529. * @return {?}
  5530. */
  5531. function (match) {
  5532. return symbolMap[match];
  5533. })).replace(/,/g, '،');
  5534. },
  5535. week: {
  5536. dow: 6,
  5537. // Saturday is the first day of the week.
  5538. doy: 12 // The week that contains Jan 1st is the first week of the year.
  5539. }
  5540. };
  5541. /**
  5542. * @fileoverview added by tsickle
  5543. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  5544. */
  5545. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  5546. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  5547. // tslint:disable:no-shadowed-variable switch-default prefer-const
  5548. // tslint:disable:one-variable-per-declaration newline-before-return
  5549. //! moment.js locale configuration
  5550. //! locale : Bulgarian [bg]
  5551. //! author : Iskren Ivov Chernev : https://github.com/ichernev
  5552. //! author : Kunal Marwaha : https://github.com/marwahaha
  5553. //! author : Matt Grande : https://github.com/mattgrande
  5554. //! author : Isaac Cambron : https://github.com/icambron
  5555. //! author : Venelin Manchev : https://github.com/vmanchev
  5556. var ɵ0$1 = /**
  5557. * @param {?} d
  5558. * @return {?}
  5559. */
  5560. function (d) {
  5561. switch (d) {
  5562. case 0:
  5563. case 3:
  5564. case 6:
  5565. return '[В изминалата] dddd [в] LT';
  5566. case 1:
  5567. case 2:
  5568. case 4:
  5569. case 5:
  5570. return '[В изминалия] dddd [в] LT';
  5571. }
  5572. };
  5573. /** @type {?} */
  5574. var bgLocale = {
  5575. abbr: 'bg',
  5576. months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'),
  5577. monthsShort: 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
  5578. weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'),
  5579. weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
  5580. weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  5581. longDateFormat: {
  5582. LT: 'H:mm',
  5583. LTS: 'H:mm:ss',
  5584. L: 'D.MM.YYYY',
  5585. LL: 'D MMMM YYYY',
  5586. LLL: 'D MMMM YYYY H:mm',
  5587. LLLL: 'dddd, D MMMM YYYY H:mm'
  5588. },
  5589. calendar: {
  5590. sameDay: '[Днес в] LT',
  5591. nextDay: '[Утре в] LT',
  5592. nextWeek: 'dddd [в] LT',
  5593. lastDay: '[Вчера в] LT',
  5594. lastWeek: (ɵ0$1),
  5595. sameElse: 'L'
  5596. },
  5597. relativeTime: {
  5598. future: 'след %s',
  5599. past: 'преди %s',
  5600. s: 'няколко секунди',
  5601. ss: '%d секунди',
  5602. m: 'минута',
  5603. mm: '%d минути',
  5604. h: 'час',
  5605. hh: '%d часа',
  5606. d: 'ден',
  5607. dd: '%d дни',
  5608. M: 'месец',
  5609. MM: '%d месеца',
  5610. y: 'година',
  5611. yy: '%d години'
  5612. },
  5613. dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
  5614. ordinal: (/**
  5615. * @param {?} _num
  5616. * @return {?}
  5617. */
  5618. function (_num) {
  5619. /** @type {?} */
  5620. var number = Number(_num);
  5621. /** @type {?} */
  5622. var lastDigit = number % 10;
  5623. /** @type {?} */
  5624. var last2Digits = number % 100;
  5625. if (number === 0) {
  5626. return number + '-ев';
  5627. }
  5628. else if (last2Digits === 0) {
  5629. return number + '-ен';
  5630. }
  5631. else if (last2Digits > 10 && last2Digits < 20) {
  5632. return number + '-ти';
  5633. }
  5634. else if (lastDigit === 1) {
  5635. return number + '-ви';
  5636. }
  5637. else if (lastDigit === 2) {
  5638. return number + '-ри';
  5639. }
  5640. else if (lastDigit === 7 || lastDigit === 8) {
  5641. return number + '-ми';
  5642. }
  5643. else {
  5644. return number + '-ти';
  5645. }
  5646. }),
  5647. week: {
  5648. dow: 1,
  5649. // Monday is the first day of the week.
  5650. doy: 7 // The week that contains Jan 1st is the first week of the year.
  5651. }
  5652. };
  5653. /**
  5654. * @fileoverview added by tsickle
  5655. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  5656. */
  5657. //! moment.js locale configuration
  5658. //! locale : Catalan [ca]
  5659. //! author : Xavier Arbat : https://github.com/XavisaurusRex
  5660. /** @type {?} */
  5661. var monthsShortDot = 'gen._feb._mar._abr._mai._jun._jul._ago._set._oct._nov._des.'.split('_');
  5662. /** @type {?} */
  5663. var monthsShort = 'ene_feb_mar_abr_mai_jun_jul_ago_set_oct_nov_des'.split('_');
  5664. /** @type {?} */
  5665. 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];
  5666. /** @type {?} */
  5667. 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;
  5668. /** @type {?} */
  5669. var caLocale = {
  5670. abbr: 'ca',
  5671. months: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),
  5672. monthsShort: /**
  5673. * @param {?} date
  5674. * @param {?} format
  5675. * @param {?=} isUTC
  5676. * @return {?}
  5677. */
  5678. function (date, format, isUTC) {
  5679. if (!date) {
  5680. return monthsShortDot;
  5681. }
  5682. if (/-MMM-/.test(format)) {
  5683. return monthsShort[getMonth(date, isUTC)];
  5684. }
  5685. return monthsShortDot[getMonth(date, isUTC)];
  5686. },
  5687. monthsRegex: monthsRegex,
  5688. monthsShortRegex: monthsRegex,
  5689. monthsStrictRegex: /^(gener|febrer|març|abril|maig|juny|juliol|agost|setembre|octubre|novembre|desembre)/i,
  5690. monthsShortStrictRegex: /^(gen\.?|feb\.?|mar\.?|abr\.?|mai\.?|jun\.?|jul\.?|ago\.?|set\.?|oct\.?|nov\.?|des\.?)/i,
  5691. monthsParse: monthsParse,
  5692. longMonthsParse: monthsParse,
  5693. shortMonthsParse: monthsParse,
  5694. weekdays: 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),
  5695. weekdaysShort: 'diu._dil._dim._dix._dij._div._dis.'.split('_'),
  5696. weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
  5697. weekdaysParseExact: true,
  5698. longDateFormat: {
  5699. LT: 'H:mm',
  5700. LTS: 'H:mm:ss',
  5701. L: 'DD/MM/YYYY',
  5702. LL: 'D [de] MMMM [de] YYYY',
  5703. LLL: 'D [de] MMMM [de] YYYY H:mm',
  5704. LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'
  5705. },
  5706. calendar: {
  5707. sameDay: /**
  5708. * @param {?} date
  5709. * @return {?}
  5710. */
  5711. function (date) {
  5712. return '[avui a ' + ('la' + (getHours(date) !== 1) ? 'les' : '') + '] LT';
  5713. },
  5714. nextDay: /**
  5715. * @param {?} date
  5716. * @return {?}
  5717. */
  5718. function (date) {
  5719. return '[dema a ' + ('la' + (getHours(date) !== 1) ? 'les' : '') + '] LT';
  5720. },
  5721. nextWeek: /**
  5722. * @param {?} date
  5723. * @return {?}
  5724. */
  5725. function (date) {
  5726. return 'dddd [a ' + ('la' + (getHours(date) !== 1) ? 'les' : '') + '] LT';
  5727. },
  5728. lastDay: /**
  5729. * @param {?} date
  5730. * @return {?}
  5731. */
  5732. function (date) {
  5733. return '[ahir a ' + ('la' + (getHours(date) !== 1) ? 'les' : '') + '] LT';
  5734. },
  5735. lastWeek: /**
  5736. * @param {?} date
  5737. * @return {?}
  5738. */
  5739. function (date) {
  5740. return '[el] dddd [' + ('passada la ' + (getHours(date) !== 1) ? 'passades les' : '') + '] LT';
  5741. },
  5742. sameElse: 'L'
  5743. },
  5744. relativeTime: {
  5745. future: 'en %s',
  5746. past: 'fa %s',
  5747. s: 'uns segons',
  5748. ss: '%d segons',
  5749. m: 'un minut',
  5750. mm: '%d minuts',
  5751. h: 'una hora',
  5752. hh: '%d hores',
  5753. d: 'un dia',
  5754. dd: '%d dies',
  5755. M: 'un mes',
  5756. MM: '%d mesos',
  5757. y: 'un any',
  5758. yy: '%d anys'
  5759. },
  5760. dayOfMonthOrdinalParse: /\d{1,2}(er|on|er|rt|é)/,
  5761. ordinal: /**
  5762. * @param {?} _num
  5763. * @return {?}
  5764. */
  5765. function (_num) {
  5766. /** @type {?} */
  5767. var num = Number(_num);
  5768. /** @type {?} */
  5769. var output = (num > 4) ? 'é' :
  5770. (num === 1 || num === 3) ? 'r' :
  5771. (num === 2) ? 'n' :
  5772. (num === 4) ? 't' : 'é';
  5773. return num + output;
  5774. },
  5775. week: {
  5776. dow: 1,
  5777. // Monday is the first day of the week.
  5778. doy: 4 // The week that contains Jan 4th is the first week of the year.
  5779. }
  5780. };
  5781. /**
  5782. * @fileoverview added by tsickle
  5783. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  5784. */
  5785. //! moment.js locale configuration
  5786. //! locale : Czech [cs]
  5787. //! author : petrbela : https://github.com/petrbela
  5788. /** @type {?} */
  5789. var months$1 = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_');
  5790. /** @type {?} */
  5791. var monthsShort$1 = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_');
  5792. /**
  5793. * @param {?} num
  5794. * @return {?}
  5795. */
  5796. function plural(num) {
  5797. return (num > 1) && (num < 5) && (~~(num / 10) !== 1);
  5798. }
  5799. /**
  5800. * @param {?} num
  5801. * @param {?} withoutSuffix
  5802. * @param {?} key
  5803. * @param {?} isFuture
  5804. * @return {?}
  5805. */
  5806. function translate(num, withoutSuffix, key, isFuture) {
  5807. /** @type {?} */
  5808. var result = num + ' ';
  5809. switch (key) {
  5810. case 's': // a few seconds / in a few seconds / a few seconds ago
  5811. return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami';
  5812. case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
  5813. if (withoutSuffix || isFuture) {
  5814. return result + (plural(num) ? 'sekundy' : 'sekund');
  5815. }
  5816. else {
  5817. return result + 'sekundami';
  5818. }
  5819. // break;
  5820. case 'm': // a minute / in a minute / a minute ago
  5821. return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou');
  5822. case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
  5823. if (withoutSuffix || isFuture) {
  5824. return result + (plural(num) ? 'minuty' : 'minut');
  5825. }
  5826. else {
  5827. return result + 'minutami';
  5828. }
  5829. // break;
  5830. case 'h': // an hour / in an hour / an hour ago
  5831. return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
  5832. case 'hh': // 9 hours / in 9 hours / 9 hours ago
  5833. if (withoutSuffix || isFuture) {
  5834. return result + (plural(num) ? 'hodiny' : 'hodin');
  5835. }
  5836. else {
  5837. return result + 'hodinami';
  5838. }
  5839. // break;
  5840. case 'd': // a day / in a day / a day ago
  5841. return (withoutSuffix || isFuture) ? 'den' : 'dnem';
  5842. case 'dd': // 9 days / in 9 days / 9 days ago
  5843. if (withoutSuffix || isFuture) {
  5844. return result + (plural(num) ? 'dny' : 'dní');
  5845. }
  5846. else {
  5847. return result + 'dny';
  5848. }
  5849. // break;
  5850. case 'M': // a month / in a month / a month ago
  5851. return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem';
  5852. case 'MM': // 9 months / in 9 months / 9 months ago
  5853. if (withoutSuffix || isFuture) {
  5854. return result + (plural(num) ? 'měsíce' : 'měsíců');
  5855. }
  5856. else {
  5857. return result + 'měsíci';
  5858. }
  5859. // break;
  5860. case 'y': // a year / in a year / a year ago
  5861. return (withoutSuffix || isFuture) ? 'rok' : 'rokem';
  5862. case 'yy': // 9 years / in 9 years / 9 years ago
  5863. if (withoutSuffix || isFuture) {
  5864. return result + (plural(num) ? 'roky' : 'let');
  5865. }
  5866. else {
  5867. return result + 'lety';
  5868. }
  5869. // break;
  5870. }
  5871. }
  5872. var ɵ0$2 = /**
  5873. * @param {?} months
  5874. * @param {?} monthsShort
  5875. * @return {?}
  5876. */
  5877. function (months, monthsShort) {
  5878. /** @type {?} */
  5879. var i;
  5880. /** @type {?} */
  5881. var _monthsParse = [];
  5882. for (i = 0; i < 12; i++) {
  5883. // use custom parser to solve problem with July (červenec)
  5884. _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');
  5885. }
  5886. return _monthsParse;
  5887. }, ɵ1 = /**
  5888. * @param {?} monthsShort
  5889. * @return {?}
  5890. */
  5891. function (monthsShort) {
  5892. /** @type {?} */
  5893. var i;
  5894. /** @type {?} */
  5895. var _shortMonthsParse = [];
  5896. for (i = 0; i < 12; i++) {
  5897. _shortMonthsParse[i] = new RegExp('^' + monthsShort[i] + '$', 'i');
  5898. }
  5899. return _shortMonthsParse;
  5900. }, ɵ2 = /**
  5901. * @param {?} months
  5902. * @return {?}
  5903. */
  5904. function (months) {
  5905. /** @type {?} */
  5906. var i;
  5907. /** @type {?} */
  5908. var _longMonthsParse = [];
  5909. for (i = 0; i < 12; i++) {
  5910. _longMonthsParse[i] = new RegExp('^' + months[i] + '$', 'i');
  5911. }
  5912. return _longMonthsParse;
  5913. };
  5914. /** @type {?} */
  5915. var csLocale = {
  5916. abbr: 'cs',
  5917. months: months$1,
  5918. monthsShort: monthsShort$1,
  5919. monthsParse: ((ɵ0$2)(months$1, monthsShort$1)),
  5920. shortMonthsParse: ((ɵ1)(monthsShort$1)),
  5921. longMonthsParse: ((ɵ2)(months$1)),
  5922. weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
  5923. weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),
  5924. weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),
  5925. longDateFormat: {
  5926. LT: 'H:mm',
  5927. LTS: 'H:mm:ss',
  5928. L: 'DD.MM.YYYY',
  5929. LL: 'D. MMMM YYYY',
  5930. LLL: 'D. MMMM YYYY H:mm',
  5931. LLLL: 'dddd D. MMMM YYYY H:mm',
  5932. l: 'D. M. YYYY'
  5933. },
  5934. calendar: {
  5935. sameDay: '[dnes v] LT',
  5936. nextDay: '[zítra v] LT',
  5937. nextWeek: /**
  5938. * @param {?} date
  5939. * @return {?}
  5940. */
  5941. function (date) {
  5942. switch (getDayOfWeek(date)) {
  5943. case 0:
  5944. return '[v neděli v] LT';
  5945. case 1:
  5946. case 2:
  5947. return '[v] dddd [v] LT';
  5948. case 3:
  5949. return '[ve středu v] LT';
  5950. case 4:
  5951. return '[ve čtvrtek v] LT';
  5952. case 5:
  5953. return '[v pátek v] LT';
  5954. case 6:
  5955. return '[v sobotu v] LT';
  5956. }
  5957. },
  5958. lastDay: '[včera v] LT',
  5959. lastWeek: /**
  5960. * @param {?} date
  5961. * @return {?}
  5962. */
  5963. function (date) {
  5964. switch (getDayOfWeek(date)) {
  5965. case 0:
  5966. return '[minulou neděli v] LT';
  5967. case 1:
  5968. case 2:
  5969. return '[minulé] dddd [v] LT';
  5970. case 3:
  5971. return '[minulou středu v] LT';
  5972. case 4:
  5973. case 5:
  5974. return '[minulý] dddd [v] LT';
  5975. case 6:
  5976. return '[minulou sobotu v] LT';
  5977. }
  5978. },
  5979. sameElse: 'L'
  5980. },
  5981. relativeTime: {
  5982. future: 'za %s',
  5983. past: 'před %s',
  5984. s: translate,
  5985. ss: translate,
  5986. m: translate,
  5987. mm: translate,
  5988. h: translate,
  5989. hh: translate,
  5990. d: translate,
  5991. dd: translate,
  5992. M: translate,
  5993. MM: translate,
  5994. y: translate,
  5995. yy: translate
  5996. },
  5997. dayOfMonthOrdinalParse: /\d{1,2}\./,
  5998. ordinal: '%d.',
  5999. week: {
  6000. dow: 1,
  6001. // Monday is the first day of the week.
  6002. doy: 4 // The week that contains Jan 4th is the first week of the year.
  6003. }
  6004. };
  6005. /**
  6006. * @fileoverview added by tsickle
  6007. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6008. */
  6009. // tslint:disable:comment-format
  6010. //! moment.js locale configuration
  6011. //! locale : Danish (Denmark) [da]
  6012. //! author : Per Hansen : https://github.com/perhp
  6013. /** @type {?} */
  6014. var daLocale = {
  6015. abbr: 'da',
  6016. months: 'Januar_Februar_Marts_April_Maj_Juni_Juli_August_September_Oktober_November_December'.split('_'),
  6017. monthsShort: 'Jan_Feb_Mar_Apr_Maj_Jun_Jul_Aug_Sep_Okt_Nov_Dec'.split('_'),
  6018. weekdays: 'Søndag_Mandag_Tirsdag_Onsdag_Torsdag_Fredag_Lørdag'.split('_'),
  6019. weekdaysShort: 'Søn_Man_Tir_Ons_Tor_Fre_Lør'.split('_'),
  6020. weekdaysMin: 'Sø_Ma_Ti_On_To_Fr_Lø'.split('_'),
  6021. longDateFormat: {
  6022. LT: 'HH:mm',
  6023. LTS: 'HH:mm:ss',
  6024. L: 'DD/MM/YYYY',
  6025. LL: 'D. MMMM YYYY',
  6026. LLL: 'D. MMMM YYYY HH:mm',
  6027. LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm'
  6028. },
  6029. calendar: {
  6030. sameDay: '[i dag kl.] LT',
  6031. nextDay: '[i morgen kl.] LT',
  6032. nextWeek: 'på dddd [kl.] LT',
  6033. lastDay: '[i går kl.] LT',
  6034. lastWeek: '[i] dddd[s kl.] LT',
  6035. sameElse: 'L'
  6036. },
  6037. relativeTime: {
  6038. future: 'om %s',
  6039. past: '%s siden',
  6040. s: 'få sekunder',
  6041. m: 'et minut',
  6042. mm: '%d minutter',
  6043. h: 'en time',
  6044. hh: '%d timer',
  6045. d: 'en dag',
  6046. dd: '%d dage',
  6047. M: 'en måned',
  6048. MM: '%d måneder',
  6049. y: 'et år',
  6050. yy: '%d år'
  6051. },
  6052. dayOfMonthOrdinalParse: /\d{1,2}\./,
  6053. ordinal: '%d.',
  6054. week: {
  6055. dow: 1,
  6056. // Monday is the first day of the week.
  6057. doy: 4 // The week that contains Jan 4th is the first week of the year.
  6058. }
  6059. };
  6060. /**
  6061. * @fileoverview added by tsickle
  6062. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6063. */
  6064. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  6065. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  6066. // tslint:disable:no-shadowed-variable switch-default prefer-const
  6067. // tslint:disable:one-variable-per-declaration newline-before-return
  6068. // tslint:disable:object-literal-key-quotes
  6069. //! moment.js locale configuration
  6070. //! locale : German [de]
  6071. //! author : lluchs : https://github.com/lluchs
  6072. //! author: Menelion Elensúle: https://github.com/Oire
  6073. //! author : Mikolaj Dadela : https://github.com/mik01aj
  6074. /**
  6075. * @param {?} num
  6076. * @param {?} withoutSuffix
  6077. * @param {?} key
  6078. * @param {?} isFuture
  6079. * @return {?}
  6080. */
  6081. function processRelativeTime(num, withoutSuffix, key, isFuture) {
  6082. /** @type {?} */
  6083. var format = {
  6084. 'm': ['eine Minute', 'einer Minute'],
  6085. 'h': ['eine Stunde', 'einer Stunde'],
  6086. 'd': ['ein Tag', 'einem Tag'],
  6087. 'dd': [num + ' Tage', num + ' Tagen'],
  6088. 'M': ['ein Monat', 'einem Monat'],
  6089. 'MM': [num + ' Monate', num + ' Monaten'],
  6090. 'y': ['ein Jahr', 'einem Jahr'],
  6091. 'yy': [num + ' Jahre', num + ' Jahren']
  6092. };
  6093. return withoutSuffix ? format[key][0] : format[key][1];
  6094. }
  6095. /** @type {?} */
  6096. var deLocale = {
  6097. abbr: 'de',
  6098. months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
  6099. monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
  6100. monthsParseExact: true,
  6101. weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
  6102. weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
  6103. weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  6104. weekdaysParseExact: true,
  6105. longDateFormat: {
  6106. LT: 'HH:mm',
  6107. LTS: 'HH:mm:ss',
  6108. L: 'DD.MM.YYYY',
  6109. LL: 'D. MMMM YYYY',
  6110. LLL: 'D. MMMM YYYY HH:mm',
  6111. LLLL: 'dddd, D. MMMM YYYY HH:mm'
  6112. },
  6113. calendar: {
  6114. sameDay: '[heute um] LT [Uhr]',
  6115. sameElse: 'L',
  6116. nextDay: '[morgen um] LT [Uhr]',
  6117. nextWeek: 'dddd [um] LT [Uhr]',
  6118. lastDay: '[gestern um] LT [Uhr]',
  6119. lastWeek: '[letzten] dddd [um] LT [Uhr]'
  6120. },
  6121. relativeTime: {
  6122. future: 'in %s',
  6123. past: 'vor %s',
  6124. s: 'ein paar Sekunden',
  6125. ss: '%d Sekunden',
  6126. m: processRelativeTime,
  6127. mm: '%d Minuten',
  6128. h: processRelativeTime,
  6129. hh: '%d Stunden',
  6130. d: processRelativeTime,
  6131. dd: processRelativeTime,
  6132. M: processRelativeTime,
  6133. MM: processRelativeTime,
  6134. y: processRelativeTime,
  6135. yy: processRelativeTime
  6136. },
  6137. dayOfMonthOrdinalParse: /\d{1,2}\./,
  6138. ordinal: '%d.',
  6139. week: {
  6140. dow: 1,
  6141. // Monday is the first day of the week.
  6142. doy: 4 // The week that contains Jan 4th is the first week of the year.
  6143. }
  6144. };
  6145. /**
  6146. * @fileoverview added by tsickle
  6147. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6148. */
  6149. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  6150. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  6151. // tslint:disable:no-shadowed-variable switch-default prefer-const
  6152. // tslint:disable:one-variable-per-declaration newline-before-return
  6153. //! moment.js locale configuration
  6154. //! locale : English (United Kingdom) [en-gb]
  6155. //! author : Chris Gedrim : https://github.com/chrisgedrim
  6156. /** @type {?} */
  6157. var enGbLocale = {
  6158. abbr: 'en-gb',
  6159. months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
  6160. monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  6161. weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
  6162. weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  6163. weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  6164. longDateFormat: {
  6165. LT: 'HH:mm',
  6166. LTS: 'HH:mm:ss',
  6167. L: 'DD/MM/YYYY',
  6168. LL: 'D MMMM YYYY',
  6169. LLL: 'D MMMM YYYY HH:mm',
  6170. LLLL: 'dddd, D MMMM YYYY HH:mm'
  6171. },
  6172. calendar: {
  6173. sameDay: '[Today at] LT',
  6174. nextDay: '[Tomorrow at] LT',
  6175. nextWeek: 'dddd [at] LT',
  6176. lastDay: '[Yesterday at] LT',
  6177. lastWeek: '[Last] dddd [at] LT',
  6178. sameElse: 'L'
  6179. },
  6180. relativeTime: {
  6181. future: 'in %s',
  6182. past: '%s ago',
  6183. s: 'a few seconds',
  6184. ss: '%d seconds',
  6185. m: 'a minute',
  6186. mm: '%d minutes',
  6187. h: 'an hour',
  6188. hh: '%d hours',
  6189. d: 'a day',
  6190. dd: '%d days',
  6191. M: 'a month',
  6192. MM: '%d months',
  6193. y: 'a year',
  6194. yy: '%d years'
  6195. },
  6196. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  6197. ordinal: /**
  6198. * @param {?} _num
  6199. * @return {?}
  6200. */
  6201. function (_num) {
  6202. /** @type {?} */
  6203. var num = Number(_num);
  6204. /** @type {?} */
  6205. var b = num % 10;
  6206. /** @type {?} */
  6207. var output = (~~(num % 100 / 10) === 1) ? 'th' :
  6208. (b === 1) ? 'st' :
  6209. (b === 2) ? 'nd' :
  6210. (b === 3) ? 'rd' : 'th';
  6211. return num + output;
  6212. },
  6213. week: {
  6214. dow: 1,
  6215. // Monday is the first day of the week.
  6216. doy: 4 // The week that contains Jan 4th is the first week of the year.
  6217. }
  6218. };
  6219. /**
  6220. * @fileoverview added by tsickle
  6221. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6222. */
  6223. //! moment.js locale configuration
  6224. //! locale : Spanish (Dominican Republic) [es-do]
  6225. /** @type {?} */
  6226. var monthsShortDot$1 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
  6227. /** @type {?} */
  6228. var monthsShort$2 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
  6229. /** @type {?} */
  6230. 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];
  6231. /** @type {?} */
  6232. 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;
  6233. /** @type {?} */
  6234. var esDoLocale = {
  6235. abbr: 'es-do',
  6236. months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
  6237. monthsShort: /**
  6238. * @param {?} date
  6239. * @param {?} format
  6240. * @param {?=} isUTC
  6241. * @return {?}
  6242. */
  6243. function (date, format, isUTC) {
  6244. if (!date) {
  6245. return monthsShortDot$1;
  6246. }
  6247. else if (/-MMM-/.test(format)) {
  6248. return monthsShort$2[getMonth(date, isUTC)];
  6249. }
  6250. else {
  6251. return monthsShortDot$1[getMonth(date, isUTC)];
  6252. }
  6253. },
  6254. monthsRegex: monthsRegex$1,
  6255. monthsShortRegex: monthsRegex$1,
  6256. monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  6257. monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  6258. monthsParse: monthsParse$1,
  6259. longMonthsParse: monthsParse$1,
  6260. shortMonthsParse: monthsParse$1,
  6261. weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  6262. weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  6263. weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  6264. weekdaysParseExact: true,
  6265. longDateFormat: {
  6266. LT: 'h:mm A',
  6267. LTS: 'h:mm:ss A',
  6268. L: 'DD/MM/YYYY',
  6269. LL: 'D [de] MMMM [de] YYYY',
  6270. LLL: 'D [de] MMMM [de] YYYY h:mm A',
  6271. LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A'
  6272. },
  6273. calendar: {
  6274. sameDay: /**
  6275. * @param {?} date
  6276. * @return {?}
  6277. */
  6278. function (date) {
  6279. return '[hoy a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6280. },
  6281. nextDay: /**
  6282. * @param {?} date
  6283. * @return {?}
  6284. */
  6285. function (date) {
  6286. return '[mañana a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6287. },
  6288. nextWeek: /**
  6289. * @param {?} date
  6290. * @return {?}
  6291. */
  6292. function (date) {
  6293. return 'dddd [a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6294. },
  6295. lastDay: /**
  6296. * @param {?} date
  6297. * @return {?}
  6298. */
  6299. function (date) {
  6300. return '[ayer a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6301. },
  6302. lastWeek: /**
  6303. * @param {?} date
  6304. * @return {?}
  6305. */
  6306. function (date) {
  6307. return '[el] dddd [pasado a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6308. },
  6309. sameElse: 'L'
  6310. },
  6311. relativeTime: {
  6312. future: 'en %s',
  6313. past: 'hace %s',
  6314. s: 'unos segundos',
  6315. ss: '%d segundos',
  6316. m: 'un minuto',
  6317. mm: '%d minutos',
  6318. h: 'una hora',
  6319. hh: '%d horas',
  6320. d: 'un día',
  6321. dd: '%d días',
  6322. M: 'un mes',
  6323. MM: '%d meses',
  6324. y: 'un año',
  6325. yy: '%d años'
  6326. },
  6327. dayOfMonthOrdinalParse: /\d{1,2}º/,
  6328. ordinal: '%dº',
  6329. week: {
  6330. dow: 1,
  6331. // Monday is the first day of the week.
  6332. doy: 4 // The week that contains Jan 4th is the first week of the year.
  6333. }
  6334. };
  6335. /**
  6336. * @fileoverview added by tsickle
  6337. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6338. */
  6339. //! moment.js locale configuration
  6340. //! locale : Spanish [es]
  6341. //! author : Julio Napurí : https://github.com/julionc
  6342. /** @type {?} */
  6343. var monthsShortDot$2 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
  6344. /** @type {?} */
  6345. var monthsShort$3 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
  6346. /** @type {?} */
  6347. 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];
  6348. /** @type {?} */
  6349. 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;
  6350. /** @type {?} */
  6351. var esLocale = {
  6352. abbr: 'es',
  6353. months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
  6354. monthsShort: /**
  6355. * @param {?} date
  6356. * @param {?} format
  6357. * @param {?=} isUTC
  6358. * @return {?}
  6359. */
  6360. function (date, format, isUTC) {
  6361. if (!date) {
  6362. return monthsShortDot$2;
  6363. }
  6364. if (/-MMM-/.test(format)) {
  6365. return monthsShort$3[getMonth(date, isUTC)];
  6366. }
  6367. return monthsShortDot$2[getMonth(date, isUTC)];
  6368. },
  6369. monthsRegex: monthsRegex$2,
  6370. monthsShortRegex: monthsRegex$2,
  6371. monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  6372. monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  6373. monthsParse: monthsParse$2,
  6374. longMonthsParse: monthsParse$2,
  6375. shortMonthsParse: monthsParse$2,
  6376. weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  6377. weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  6378. weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  6379. weekdaysParseExact: true,
  6380. longDateFormat: {
  6381. LT: 'H:mm',
  6382. LTS: 'H:mm:ss',
  6383. L: 'DD/MM/YYYY',
  6384. LL: 'D [de] MMMM [de] YYYY',
  6385. LLL: 'D [de] MMMM [de] YYYY H:mm',
  6386. LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'
  6387. },
  6388. calendar: {
  6389. sameDay: /**
  6390. * @param {?} date
  6391. * @return {?}
  6392. */
  6393. function (date) {
  6394. return '[hoy a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6395. },
  6396. nextDay: /**
  6397. * @param {?} date
  6398. * @return {?}
  6399. */
  6400. function (date) {
  6401. return '[mañana a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6402. },
  6403. nextWeek: /**
  6404. * @param {?} date
  6405. * @return {?}
  6406. */
  6407. function (date) {
  6408. return 'dddd [a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6409. },
  6410. lastDay: /**
  6411. * @param {?} date
  6412. * @return {?}
  6413. */
  6414. function (date) {
  6415. return '[ayer a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6416. },
  6417. lastWeek: /**
  6418. * @param {?} date
  6419. * @return {?}
  6420. */
  6421. function (date) {
  6422. return '[el] dddd [pasado a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6423. },
  6424. sameElse: 'L'
  6425. },
  6426. relativeTime: {
  6427. future: 'en %s',
  6428. past: 'hace %s',
  6429. s: 'unos segundos',
  6430. ss: '%d segundos',
  6431. m: 'un minuto',
  6432. mm: '%d minutos',
  6433. h: 'una hora',
  6434. hh: '%d horas',
  6435. d: 'un día',
  6436. dd: '%d días',
  6437. M: 'un mes',
  6438. MM: '%d meses',
  6439. y: 'un año',
  6440. yy: '%d años'
  6441. },
  6442. dayOfMonthOrdinalParse: /\d{1,2}º/,
  6443. ordinal: '%dº',
  6444. week: {
  6445. dow: 1,
  6446. // Monday is the first day of the week.
  6447. doy: 4 // The week that contains Jan 4th is the first week of the year.
  6448. }
  6449. };
  6450. /**
  6451. * @fileoverview added by tsickle
  6452. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6453. */
  6454. //! moment.js locale configuration
  6455. //! locale : Spanish (United States) [es-us]
  6456. //! author : bustta : https://github.com/bustta
  6457. /** @type {?} */
  6458. var monthsShortDot$3 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
  6459. /** @type {?} */
  6460. var monthsShort$4 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
  6461. /** @type {?} */
  6462. var esUsLocale = {
  6463. abbr: 'es-us',
  6464. months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
  6465. monthsShort: /**
  6466. * @param {?} date
  6467. * @param {?} format
  6468. * @param {?=} isUTC
  6469. * @return {?}
  6470. */
  6471. function (date, format, isUTC) {
  6472. if (!date) {
  6473. return monthsShortDot$3;
  6474. }
  6475. else if (/-MMM-/.test(format)) {
  6476. return monthsShort$4[getMonth(date, isUTC)];
  6477. }
  6478. else {
  6479. return monthsShortDot$3[getMonth(date, isUTC)];
  6480. }
  6481. },
  6482. monthsParseExact: true,
  6483. weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  6484. weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  6485. weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  6486. weekdaysParseExact: true,
  6487. longDateFormat: {
  6488. LT: 'h:mm A',
  6489. LTS: 'h:mm:ss A',
  6490. L: 'MM/DD/YYYY',
  6491. LL: 'MMMM [de] D [de] YYYY',
  6492. LLL: 'MMMM [de] D [de] YYYY h:mm A',
  6493. LLLL: 'dddd, MMMM [de] D [de] YYYY h:mm A'
  6494. },
  6495. calendar: {
  6496. sameDay: /**
  6497. * @param {?} date
  6498. * @return {?}
  6499. */
  6500. function (date) {
  6501. return '[hoy a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6502. },
  6503. nextDay: /**
  6504. * @param {?} date
  6505. * @return {?}
  6506. */
  6507. function (date) {
  6508. return '[mañana a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6509. },
  6510. nextWeek: /**
  6511. * @param {?} date
  6512. * @return {?}
  6513. */
  6514. function (date) {
  6515. return 'dddd [a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6516. },
  6517. lastDay: /**
  6518. * @param {?} date
  6519. * @return {?}
  6520. */
  6521. function (date) {
  6522. return '[ayer a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6523. },
  6524. lastWeek: /**
  6525. * @param {?} date
  6526. * @return {?}
  6527. */
  6528. function (date) {
  6529. return '[el] dddd [pasado a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6530. },
  6531. sameElse: 'L'
  6532. },
  6533. relativeTime: {
  6534. future: 'en %s',
  6535. past: 'hace %s',
  6536. s: 'unos segundos',
  6537. ss: '%d segundos',
  6538. m: 'un minuto',
  6539. mm: '%d minutos',
  6540. h: 'una hora',
  6541. hh: '%d horas',
  6542. d: 'un día',
  6543. dd: '%d días',
  6544. M: 'un mes',
  6545. MM: '%d meses',
  6546. y: 'un año',
  6547. yy: '%d años'
  6548. },
  6549. dayOfMonthOrdinalParse: /\d{1,2}º/,
  6550. ordinal: '%dº',
  6551. week: {
  6552. dow: 0,
  6553. // Sunday is the first day of the week.
  6554. doy: 6 // The week that contains Jan 1st is the first week of the year.
  6555. }
  6556. };
  6557. /**
  6558. * @fileoverview added by tsickle
  6559. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6560. */
  6561. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  6562. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  6563. // tslint:disable:no-shadowed-variable switch-default prefer-const
  6564. // tslint:disable:one-variable-per-declaration newline-before-return
  6565. //! moment.js locale configuration
  6566. //! locale : Estonian [et]
  6567. //! author : Chris Gedrim : https://github.com/a90machado
  6568. /** @type {?} */
  6569. var processRelativeTime$1 = (/**
  6570. * @param {?} num
  6571. * @param {?} withoutSuffix
  6572. * @param {?} key
  6573. * @param {?} isFuture
  6574. * @return {?}
  6575. */
  6576. function (num, withoutSuffix, key, isFuture) {
  6577. /** @type {?} */
  6578. var format = {
  6579. s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
  6580. ss: [num + 'sekundi', num + 'sekundit'],
  6581. m: ['ühe minuti', 'üks minut'],
  6582. mm: [num + ' minuti', num + ' minutit'],
  6583. h: ['ühe tunni', 'tund aega', 'üks tund'],
  6584. hh: [num + ' tunni', num + ' tundi'],
  6585. d: ['ühe päeva', 'üks päev'],
  6586. M: ['kuu aja', 'kuu aega', 'üks kuu'],
  6587. MM: [num + ' kuu', num + ' kuud'],
  6588. y: ['ühe aasta', 'aasta', 'üks aasta'],
  6589. yy: [num + ' aasta', num + ' aastat']
  6590. };
  6591. if (withoutSuffix) {
  6592. return format[key][2] ? format[key][2] : format[key][1];
  6593. }
  6594. return isFuture ? format[key][0] : format[key][1];
  6595. });
  6596. /** @type {?} */
  6597. var etLocale = {
  6598. abbr: 'et',
  6599. months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'),
  6600. monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),
  6601. weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'),
  6602. weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
  6603. weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
  6604. longDateFormat: {
  6605. LT: 'H:mm',
  6606. LTS: 'H:mm:ss',
  6607. L: 'DD.MM.YYYY',
  6608. LL: 'D. MMMM YYYY',
  6609. LLL: 'D. MMMM YYYY H:mm',
  6610. LLLL: 'dddd, D. MMMM YYYY H:mm'
  6611. },
  6612. calendar: {
  6613. sameDay: '[Täna,] LT',
  6614. nextDay: '[Homme,] LT',
  6615. nextWeek: '[Järgmine] dddd LT',
  6616. lastDay: '[Eile,] LT',
  6617. lastWeek: '[Eelmine] dddd LT',
  6618. sameElse: 'L'
  6619. },
  6620. relativeTime: {
  6621. future: '%s pärast',
  6622. past: '%s tagasi',
  6623. s: processRelativeTime$1,
  6624. ss: processRelativeTime$1,
  6625. m: processRelativeTime$1,
  6626. mm: processRelativeTime$1,
  6627. h: processRelativeTime$1,
  6628. hh: processRelativeTime$1,
  6629. d: processRelativeTime$1,
  6630. dd: '%d päeva',
  6631. M: processRelativeTime$1,
  6632. MM: processRelativeTime$1,
  6633. y: processRelativeTime$1,
  6634. yy: processRelativeTime$1
  6635. },
  6636. dayOfMonthOrdinalParse: /\d{1,2}./,
  6637. ordinal: '%d.',
  6638. week: {
  6639. dow: 1,
  6640. // Monday is the first day of the week.
  6641. doy: 4 // The week that contains Jan 4th is the first week of the year.
  6642. }
  6643. };
  6644. /**
  6645. * @fileoverview added by tsickle
  6646. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6647. */
  6648. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  6649. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  6650. // tslint:disable:no-shadowed-variable switch-default prefer-const
  6651. // tslint:disable:one-variable-per-declaration newline-before-return
  6652. //! moment.js locale configuration
  6653. // https://github.com/moment/moment/blob/develop/locale/fi.js
  6654. /** @type {?} */
  6655. var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' ');
  6656. /** @type {?} */
  6657. var numbersFuture = [
  6658. 'nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden',
  6659. numbersPast[7], numbersPast[8], numbersPast[9]
  6660. ];
  6661. /**
  6662. * @param {?} num
  6663. * @param {?} withoutSuffix
  6664. * @param {?} key
  6665. * @param {?} isFuture
  6666. * @return {?}
  6667. */
  6668. function translate$1(num, withoutSuffix, key, isFuture) {
  6669. /** @type {?} */
  6670. var result = '';
  6671. switch (key) {
  6672. case 's':
  6673. return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
  6674. case 'ss':
  6675. return isFuture ? 'sekunnin' : 'sekuntia';
  6676. case 'm':
  6677. return isFuture ? 'minuutin' : 'minuutti';
  6678. case 'mm':
  6679. result = isFuture ? 'minuutin' : 'minuuttia';
  6680. break;
  6681. case 'h':
  6682. return isFuture ? 'tunnin' : 'tunti';
  6683. case 'hh':
  6684. result = isFuture ? 'tunnin' : 'tuntia';
  6685. break;
  6686. case 'd':
  6687. return isFuture ? 'päivän' : 'päivä';
  6688. case 'dd':
  6689. result = isFuture ? 'päivän' : 'päivää';
  6690. break;
  6691. case 'M':
  6692. return isFuture ? 'kuukauden' : 'kuukausi';
  6693. case 'MM':
  6694. result = isFuture ? 'kuukauden' : 'kuukautta';
  6695. break;
  6696. case 'y':
  6697. return isFuture ? 'vuoden' : 'vuosi';
  6698. case 'yy':
  6699. result = isFuture ? 'vuoden' : 'vuotta';
  6700. break;
  6701. }
  6702. result = verbalNumber(num, isFuture) + ' ' + result;
  6703. return result;
  6704. }
  6705. /**
  6706. * @param {?} num
  6707. * @param {?} isFuture
  6708. * @return {?}
  6709. */
  6710. function verbalNumber(num, isFuture) {
  6711. return num < 10 ? (isFuture ? numbersFuture[num] : numbersPast[num]) : num;
  6712. }
  6713. /** @type {?} */
  6714. var fiLocale = {
  6715. abbr: 'fi',
  6716. months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'),
  6717. monthsShort: 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'),
  6718. weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'),
  6719. weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),
  6720. weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),
  6721. longDateFormat: {
  6722. LT: 'HH.mm',
  6723. LTS: 'HH.mm.ss',
  6724. L: 'DD.MM.YYYY',
  6725. LL: 'Do MMMM[ta] YYYY',
  6726. LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',
  6727. LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
  6728. l: 'D.M.YYYY',
  6729. ll: 'Do MMM YYYY',
  6730. lll: 'Do MMM YYYY, [klo] HH.mm',
  6731. llll: 'ddd, Do MMM YYYY, [klo] HH.mm'
  6732. },
  6733. calendar: {
  6734. sameDay: '[tänään] [klo] LT',
  6735. nextDay: '[huomenna] [klo] LT',
  6736. nextWeek: 'dddd [klo] LT',
  6737. lastDay: '[eilen] [klo] LT',
  6738. lastWeek: '[viime] dddd[na] [klo] LT',
  6739. sameElse: 'L'
  6740. },
  6741. relativeTime: {
  6742. future: '%s päästä',
  6743. past: '%s sitten',
  6744. s: translate$1,
  6745. ss: translate$1,
  6746. m: translate$1,
  6747. mm: translate$1,
  6748. h: translate$1,
  6749. hh: translate$1,
  6750. d: translate$1,
  6751. dd: translate$1,
  6752. M: translate$1,
  6753. MM: translate$1,
  6754. y: translate$1,
  6755. yy: translate$1
  6756. },
  6757. dayOfMonthOrdinalParse: /\d{1,2}\./,
  6758. ordinal: '%d.',
  6759. week: {
  6760. dow: 1,
  6761. // Monday is the first day of the week.
  6762. doy: 4 // The week that contains Jan 4th is the first week of the year.
  6763. }
  6764. };
  6765. /**
  6766. * @fileoverview added by tsickle
  6767. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6768. */
  6769. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  6770. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  6771. // tslint:disable:no-shadowed-variable switch-default prefer-const
  6772. // tslint:disable:one-variable-per-declaration newline-before-return
  6773. //! moment.js locale configuration
  6774. //! locale : French [fr]
  6775. //! author : John Fischer : https://github.com/jfroffice
  6776. /** @type {?} */
  6777. var frLocale = {
  6778. abbr: 'fr',
  6779. months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
  6780. monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
  6781. monthsParseExact: true,
  6782. weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
  6783. weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
  6784. weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
  6785. weekdaysParseExact: true,
  6786. longDateFormat: {
  6787. LT: 'HH:mm',
  6788. LTS: 'HH:mm:ss',
  6789. L: 'DD/MM/YYYY',
  6790. LL: 'D MMMM YYYY',
  6791. LLL: 'D MMMM YYYY HH:mm',
  6792. LLLL: 'dddd D MMMM YYYY HH:mm'
  6793. },
  6794. calendar: {
  6795. sameDay: '[Aujourd’hui à] LT',
  6796. nextDay: '[Demain à] LT',
  6797. nextWeek: 'dddd [à] LT',
  6798. lastDay: '[Hier à] LT',
  6799. lastWeek: 'dddd [dernier à] LT',
  6800. sameElse: 'L'
  6801. },
  6802. relativeTime: {
  6803. future: 'dans %s',
  6804. past: 'il y a %s',
  6805. s: 'quelques secondes',
  6806. ss: '%d secondes',
  6807. m: 'une minute',
  6808. mm: '%d minutes',
  6809. h: 'une heure',
  6810. hh: '%d heures',
  6811. d: 'un jour',
  6812. dd: '%d jours',
  6813. M: 'un mois',
  6814. MM: '%d mois',
  6815. y: 'un an',
  6816. yy: '%d ans'
  6817. },
  6818. dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
  6819. ordinal: /**
  6820. * @param {?} _num
  6821. * @param {?} period
  6822. * @return {?}
  6823. */
  6824. function (_num, period) {
  6825. /** @type {?} */
  6826. var num = Number(_num);
  6827. switch (period) {
  6828. // TODO: Return 'e' when day of month > 1. Move this case inside
  6829. // block for masculine words below.
  6830. // See https://github.com/moment/moment/issues/3375
  6831. case 'D':
  6832. return num + (num === 1 ? 'er' : '');
  6833. // Words with masculine grammatical gender: mois, trimestre, jour
  6834. default:
  6835. case 'M':
  6836. case 'Q':
  6837. case 'DDD':
  6838. case 'd':
  6839. return num + (num === 1 ? 'er' : 'e');
  6840. // Words with feminine grammatical gender: semaine
  6841. case 'w':
  6842. case 'W':
  6843. return num + (num === 1 ? 're' : 'e');
  6844. }
  6845. },
  6846. week: {
  6847. dow: 1,
  6848. // Monday is the first day of the week.
  6849. doy: 4 // The week that contains Jan 4th is the first week of the year.
  6850. }
  6851. };
  6852. /**
  6853. * @fileoverview added by tsickle
  6854. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6855. */
  6856. //! moment.js locale configuration
  6857. //! locale : Galician [gl]
  6858. //! author : Darío Beiró : https://github.com/quinobravo
  6859. /** @type {?} */
  6860. var monthsShortDot$4 = 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split('_');
  6861. /** @type {?} */
  6862. var monthsShort$5 = 'xan_feb_mar_abr_mai_xuñ_xul_ago_set_out_nov_dec'.split('_');
  6863. /** @type {?} */
  6864. 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];
  6865. /** @type {?} */
  6866. 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;
  6867. /** @type {?} */
  6868. var glLocale = {
  6869. abbr: 'gl',
  6870. months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'),
  6871. monthsShort: /**
  6872. * @param {?} date
  6873. * @param {?} format
  6874. * @param {?=} isUTC
  6875. * @return {?}
  6876. */
  6877. function (date, format, isUTC) {
  6878. if (!date) {
  6879. return monthsShortDot$4;
  6880. }
  6881. if (/-MMM-/.test(format)) {
  6882. return monthsShort$5[getMonth(date, isUTC)];
  6883. }
  6884. return monthsShortDot$4[getMonth(date, isUTC)];
  6885. },
  6886. monthsRegex: monthsRegex$3,
  6887. monthsShortRegex: monthsRegex$3,
  6888. monthsStrictRegex: /^(xaneiro|febreiro|marzo|abril|maio|xuño|xullo|agosto|setembro|outubro|novembro|decembro)/i,
  6889. monthsShortStrictRegex: /^(xan\.?|feb\.?|mar\.?|abr\.?|mai\.?|xuñ\.?|xul\.?|ago\.?|set\.?|out\.?|nov\.?|dec\.?)/i,
  6890. monthsParse: monthsParse$3,
  6891. longMonthsParse: monthsParse$3,
  6892. shortMonthsParse: monthsParse$3,
  6893. weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
  6894. weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
  6895. weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),
  6896. weekdaysParseExact: true,
  6897. longDateFormat: {
  6898. LT: 'H:mm',
  6899. LTS: 'H:mm:ss',
  6900. L: 'DD/MM/YYYY',
  6901. LL: 'D [de] MMMM [de] YYYY',
  6902. LLL: 'D [de] MMMM [de] YYYY H:mm',
  6903. LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'
  6904. },
  6905. calendar: {
  6906. sameDay: /**
  6907. * @param {?} date
  6908. * @return {?}
  6909. */
  6910. function (date) {
  6911. return '[hoxe á' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6912. },
  6913. nextDay: /**
  6914. * @param {?} date
  6915. * @return {?}
  6916. */
  6917. function (date) {
  6918. return '[mañan á' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6919. },
  6920. nextWeek: /**
  6921. * @param {?} date
  6922. * @return {?}
  6923. */
  6924. function (date) {
  6925. return 'dddd [á' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6926. },
  6927. lastDay: /**
  6928. * @param {?} date
  6929. * @return {?}
  6930. */
  6931. function (date) {
  6932. return '[onte á' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6933. },
  6934. lastWeek: /**
  6935. * @param {?} date
  6936. * @return {?}
  6937. */
  6938. function (date) {
  6939. return '[o] dddd [pasado á' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
  6940. },
  6941. sameElse: 'L'
  6942. },
  6943. relativeTime: {
  6944. future: 'en %s',
  6945. past: 'fai %s',
  6946. s: 'uns segundos',
  6947. ss: '%d segundos',
  6948. m: 'un minuto',
  6949. mm: '%d minutos',
  6950. h: 'unha hora',
  6951. hh: '%d horas',
  6952. d: 'un día',
  6953. dd: '%d días',
  6954. M: 'un mes',
  6955. MM: '%d meses',
  6956. y: 'un ano',
  6957. yy: '%d anos'
  6958. },
  6959. dayOfMonthOrdinalParse: /\d{1,2}º/,
  6960. ordinal: '%dº',
  6961. week: {
  6962. dow: 1,
  6963. // Monday is the first day of the week.
  6964. doy: 4 // The week that contains Jan 4th is the first week of the year.
  6965. }
  6966. };
  6967. /**
  6968. * @fileoverview added by tsickle
  6969. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  6970. */
  6971. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  6972. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  6973. // tslint:disable:no-shadowed-variable switch-default prefer-const
  6974. // tslint:disable:one-variable-per-declaration newline-before-return
  6975. //! moment.js locale configuration
  6976. //! locale : Hebrew [he]
  6977. //! author : Tomer Cohen : https://github.com/tomer
  6978. //! author : Moshe Simantov : https://github.com/DevelopmentIL
  6979. //! author : Tal Ater : https://github.com/TalAter
  6980. /** @type {?} */
  6981. var heLocale = {
  6982. abbr: 'he',
  6983. months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'),
  6984. monthsShort: 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),
  6985. weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
  6986. weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
  6987. weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),
  6988. longDateFormat: {
  6989. LT: 'HH:mm',
  6990. LTS: 'HH:mm:ss',
  6991. L: 'DD/MM/YYYY',
  6992. LL: 'D [ב]MMMM YYYY',
  6993. LLL: 'D [ב]MMMM YYYY HH:mm',
  6994. LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',
  6995. l: 'D/M/YYYY',
  6996. ll: 'D MMM YYYY',
  6997. lll: 'D MMM YYYY HH:mm',
  6998. llll: 'ddd, D MMM YYYY HH:mm'
  6999. },
  7000. calendar: {
  7001. sameDay: '[היום ב־]LT',
  7002. nextDay: '[מחר ב־]LT',
  7003. nextWeek: 'dddd [בשעה] LT',
  7004. lastDay: '[אתמול ב־]LT',
  7005. lastWeek: '[ביום] dddd [האחרון בשעה] LT',
  7006. sameElse: 'L'
  7007. },
  7008. relativeTime: {
  7009. future: 'בעוד %s',
  7010. past: 'לפני %s',
  7011. s: 'מספר שניות',
  7012. ss: '%d שניות',
  7013. m: 'דקה',
  7014. mm: '%d דקות',
  7015. h: 'שעה',
  7016. hh: /**
  7017. * @param {?} num
  7018. * @return {?}
  7019. */
  7020. function (num) {
  7021. if (num === 2) {
  7022. return 'שעתיים';
  7023. }
  7024. return num + ' שעות';
  7025. },
  7026. d: 'יום',
  7027. dd: /**
  7028. * @param {?} num
  7029. * @return {?}
  7030. */
  7031. function (num) {
  7032. if (num === 2) {
  7033. return 'יומיים';
  7034. }
  7035. return num + ' ימים';
  7036. },
  7037. M: 'חודש',
  7038. MM: /**
  7039. * @param {?} num
  7040. * @return {?}
  7041. */
  7042. function (num) {
  7043. if (num === 2) {
  7044. return 'חודשיים';
  7045. }
  7046. return num + ' חודשים';
  7047. },
  7048. y: 'שנה',
  7049. yy: /**
  7050. * @param {?} num
  7051. * @return {?}
  7052. */
  7053. function (num) {
  7054. if (num === 2) {
  7055. return 'שנתיים';
  7056. }
  7057. else if (num % 10 === 0 && num !== 10) {
  7058. return num + ' שנה';
  7059. }
  7060. return num + ' שנים';
  7061. }
  7062. },
  7063. meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
  7064. isPM: /**
  7065. * @param {?} input
  7066. * @return {?}
  7067. */
  7068. function (input) {
  7069. return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
  7070. },
  7071. meridiem: /**
  7072. * @param {?} hour
  7073. * @param {?} minute
  7074. * @param {?} isLower
  7075. * @return {?}
  7076. */
  7077. function (hour, minute, isLower) {
  7078. if (hour < 5) {
  7079. return 'לפנות בוקר';
  7080. }
  7081. else if (hour < 10) {
  7082. return 'בבוקר';
  7083. }
  7084. else if (hour < 12) {
  7085. return isLower ? 'לפנה"צ' : 'לפני הצהריים';
  7086. }
  7087. else if (hour < 18) {
  7088. return isLower ? 'אחה"צ' : 'אחרי הצהריים';
  7089. }
  7090. else {
  7091. return 'בערב';
  7092. }
  7093. }
  7094. };
  7095. /**
  7096. * @fileoverview added by tsickle
  7097. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  7098. */
  7099. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  7100. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  7101. // tslint:disable:no-shadowed-variable switch-default prefer-const
  7102. // tslint:disable:one-variable-per-declaration newline-before-return
  7103. // tslint:disable:no-parameter-reassignment prefer-switch
  7104. //! moment.js locale configuration
  7105. //! locale : Hindi [hi]
  7106. //! author : Mayank Singhal : https://github.com/mayanksinghal
  7107. /** @type {?} */
  7108. var symbolMap$1 = {
  7109. 1: '१',
  7110. 2: '२',
  7111. 3: '३',
  7112. 4: '४',
  7113. 5: '५',
  7114. 6: '६',
  7115. 7: '७',
  7116. 8: '८',
  7117. 9: '९',
  7118. 0: '०'
  7119. };
  7120. /** @type {?} */
  7121. var numberMap$1 = {
  7122. '१': '1',
  7123. '२': '2',
  7124. '३': '3',
  7125. '४': '4',
  7126. '५': '5',
  7127. '६': '6',
  7128. '७': '7',
  7129. '८': '8',
  7130. '९': '9',
  7131. '०': '0'
  7132. };
  7133. /** @type {?} */
  7134. var hiLocale = {
  7135. abbr: 'hi',
  7136. months: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'),
  7137. monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
  7138. monthsParseExact: true,
  7139. weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
  7140. weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
  7141. weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
  7142. longDateFormat: {
  7143. LT: 'A h:mm बजे',
  7144. LTS: 'A h:mm:ss बजे',
  7145. L: 'DD/MM/YYYY',
  7146. LL: 'D MMMM YYYY',
  7147. LLL: 'D MMMM YYYY, A h:mm बजे',
  7148. LLLL: 'dddd, D MMMM YYYY, A h:mm बजे'
  7149. },
  7150. calendar: {
  7151. sameDay: '[आज] LT',
  7152. nextDay: '[कल] LT',
  7153. nextWeek: 'dddd, LT',
  7154. lastDay: '[कल] LT',
  7155. lastWeek: '[पिछले] dddd, LT',
  7156. sameElse: 'L'
  7157. },
  7158. relativeTime: {
  7159. future: '%s में',
  7160. past: '%s पहले',
  7161. s: 'कुछ ही क्षण',
  7162. ss: '%d सेकंड',
  7163. m: 'एक मिनट',
  7164. mm: '%d मिनट',
  7165. h: 'एक घंटा',
  7166. hh: '%d घंटे',
  7167. d: 'एक दिन',
  7168. dd: '%d दिन',
  7169. M: 'एक महीने',
  7170. MM: '%d महीने',
  7171. y: 'एक वर्ष',
  7172. yy: '%d वर्ष'
  7173. },
  7174. preparse: /**
  7175. * @param {?} str
  7176. * @return {?}
  7177. */
  7178. function (str) {
  7179. return str.replace(/[१२३४५६७८९०]/g, (/**
  7180. * @param {?} match
  7181. * @return {?}
  7182. */
  7183. function (match) {
  7184. return numberMap$1[match];
  7185. }));
  7186. },
  7187. postformat: /**
  7188. * @param {?} str
  7189. * @return {?}
  7190. */
  7191. function (str) {
  7192. return str.replace(/\d/g, (/**
  7193. * @param {?} match
  7194. * @return {?}
  7195. */
  7196. function (match) {
  7197. return symbolMap$1[match];
  7198. }));
  7199. },
  7200. // Hindi notation for meridiems are quite fuzzy in practice. While there exists
  7201. // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
  7202. meridiemParse: /रात|सुबह|दोपहर|शाम/,
  7203. meridiemHour: /**
  7204. * @param {?} hour
  7205. * @param {?} meridiem
  7206. * @return {?}
  7207. */
  7208. function (hour, meridiem) {
  7209. if (hour === 12) {
  7210. hour = 0;
  7211. }
  7212. if (meridiem === 'रात') {
  7213. return hour < 4 ? hour : hour + 12;
  7214. }
  7215. else if (meridiem === 'सुबह') {
  7216. return hour;
  7217. }
  7218. else if (meridiem === 'दोपहर') {
  7219. return hour >= 10 ? hour : hour + 12;
  7220. }
  7221. else if (meridiem === 'शाम') {
  7222. return hour + 12;
  7223. }
  7224. },
  7225. meridiem: /**
  7226. * @param {?} hour
  7227. * @param {?} minute
  7228. * @param {?} isLower
  7229. * @return {?}
  7230. */
  7231. function (hour, minute, isLower) {
  7232. if (hour < 4) {
  7233. return 'रात';
  7234. }
  7235. else if (hour < 10) {
  7236. return 'सुबह';
  7237. }
  7238. else if (hour < 17) {
  7239. return 'दोपहर';
  7240. }
  7241. else if (hour < 20) {
  7242. return 'शाम';
  7243. }
  7244. else {
  7245. return 'रात';
  7246. }
  7247. },
  7248. week: {
  7249. dow: 0,
  7250. // Sunday is the first day of the week.
  7251. doy: 6 // The week that contains Jan 1st is the first week of the year.
  7252. }
  7253. };
  7254. /**
  7255. * @fileoverview added by tsickle
  7256. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  7257. */
  7258. //! moment.js locale configuration
  7259. //! locale : Hungarian [hu]
  7260. //! author : Adam Brunner : https://github.com/adambrunner
  7261. /** @type {?} */
  7262. var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
  7263. /**
  7264. * @param {?} num
  7265. * @param {?} withoutSuffix
  7266. * @param {?} key
  7267. * @param {?} isFuture
  7268. * @return {?}
  7269. */
  7270. function translate$2(num, withoutSuffix, key, isFuture) {
  7271. switch (key) {
  7272. case 's':
  7273. return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
  7274. case 'ss':
  7275. return num + ((isFuture || withoutSuffix) ? ' másodperc' : ' másodperce');
  7276. case 'm':
  7277. return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
  7278. case 'mm':
  7279. return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
  7280. case 'h':
  7281. return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
  7282. case 'hh':
  7283. return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
  7284. case 'd':
  7285. return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
  7286. case 'dd':
  7287. return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
  7288. case 'M':
  7289. return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
  7290. case 'MM':
  7291. return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
  7292. case 'y':
  7293. return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
  7294. case 'yy':
  7295. return num + (isFuture || withoutSuffix ? ' év' : ' éve');
  7296. }
  7297. return '';
  7298. }
  7299. /**
  7300. * @param {?} date
  7301. * @param {?} isFuture
  7302. * @return {?}
  7303. */
  7304. function week(date, isFuture) {
  7305. return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[getDayOfWeek(date)] + '] LT[-kor]';
  7306. }
  7307. /** @type {?} */
  7308. var huLocale = {
  7309. abbr: 'hu',
  7310. months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'),
  7311. monthsShort: 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'),
  7312. weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
  7313. weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
  7314. weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),
  7315. longDateFormat: {
  7316. LT: 'H:mm',
  7317. LTS: 'H:mm:ss',
  7318. L: 'YYYY.MM.DD.',
  7319. LL: 'YYYY. MMMM D.',
  7320. LLL: 'YYYY. MMMM D. H:mm',
  7321. LLLL: 'YYYY. MMMM D., dddd H:mm'
  7322. },
  7323. meridiemParse: /de|du/i,
  7324. isPM: /**
  7325. * @param {?} input
  7326. * @return {?}
  7327. */
  7328. function (input) {
  7329. return input.charAt(1).toLowerCase() === 'u';
  7330. },
  7331. meridiem: /**
  7332. * @param {?} hours
  7333. * @param {?} minutes
  7334. * @param {?} isLower
  7335. * @return {?}
  7336. */
  7337. function (hours, minutes, isLower) {
  7338. if (hours < 12) {
  7339. return isLower === true ? 'de' : 'DE';
  7340. }
  7341. else {
  7342. return isLower === true ? 'du' : 'DU';
  7343. }
  7344. },
  7345. calendar: {
  7346. sameDay: '[ma] LT[-kor]',
  7347. nextDay: '[holnap] LT[-kor]',
  7348. nextWeek: /**
  7349. * @param {?} date
  7350. * @return {?}
  7351. */
  7352. function (date) {
  7353. return week(date, true);
  7354. },
  7355. lastDay: '[tegnap] LT[-kor]',
  7356. lastWeek: /**
  7357. * @param {?} date
  7358. * @return {?}
  7359. */
  7360. function (date) {
  7361. return week(date, false);
  7362. },
  7363. sameElse: 'L'
  7364. },
  7365. relativeTime: {
  7366. future: '%s múlva',
  7367. past: '%s',
  7368. s: translate$2,
  7369. ss: translate$2,
  7370. m: translate$2,
  7371. mm: translate$2,
  7372. h: translate$2,
  7373. hh: translate$2,
  7374. d: translate$2,
  7375. dd: translate$2,
  7376. M: translate$2,
  7377. MM: translate$2,
  7378. y: translate$2,
  7379. yy: translate$2
  7380. },
  7381. dayOfMonthOrdinalParse: /\d{1,2}\./,
  7382. ordinal: '%d.',
  7383. week: {
  7384. dow: 1,
  7385. // Monday is the first day of the week.
  7386. doy: 4 // The week that contains Jan 4th is the first week of the year.
  7387. }
  7388. };
  7389. /**
  7390. * @fileoverview added by tsickle
  7391. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  7392. */
  7393. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  7394. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  7395. // tslint:disable:no-shadowed-variable switch-default prefer-const
  7396. // tslint:disable:one-variable-per-declaration newline-before-return
  7397. //! moment.js locale configuration
  7398. //! locale : Croatian [hr]
  7399. //! author : Danijel Grmec : https://github.com/cobaltsis
  7400. /** @type {?} */
  7401. var hrLocale = {
  7402. abbr: 'hr',
  7403. months: 'Siječanj_Veljača_Ožujak_Travanj_Svibanj_Lipanj_Srpanj_Kolovoz_Rujan_Listopad_Studeni_Prosinac'.split('_'),
  7404. monthsShort: 'Sij_Velj_Ožu_Tra_Svi_Lip_Srp_Kol_Ruj_Lis_Stu_Pro'.split('_'),
  7405. weekdays: 'Nedjelja_Ponedjeljak_Utorak_Srijeda_Četvrtak_Petak_Subota'.split('_'),
  7406. weekdaysShort: 'Ned_Pon_Uto_Sri_Čet_Pet_Sub'.split('_'),
  7407. weekdaysMin: 'Ne_Po_Ut_Sr_Če_Pe_Su'.split('_'),
  7408. longDateFormat: {
  7409. LT: 'HH:mm',
  7410. LTS: 'HH:mm:ss',
  7411. L: 'DD/MM/YYYY',
  7412. LL: 'D MMMM YYYY',
  7413. LLL: 'D MMMM YYYY HH:mm',
  7414. LLLL: 'dddd, D MMMM YYYY HH:mm'
  7415. },
  7416. calendar: {
  7417. sameDay: '[Danas u] LT',
  7418. nextDay: '[Sutra u] LT',
  7419. nextWeek: 'dddd [u] LT',
  7420. lastDay: '[Jučer u] LT',
  7421. lastWeek: '[Zadnji] dddd [u] LT',
  7422. sameElse: 'L'
  7423. },
  7424. invalidDate: 'Neispravan datum',
  7425. relativeTime: {
  7426. future: 'za %s',
  7427. past: '%s prije',
  7428. s: 'nekoliko sekundi',
  7429. ss: '%d sekundi',
  7430. m: 'minuta',
  7431. mm: '%d minuta',
  7432. h: 'sat',
  7433. hh: '%d sati',
  7434. d: 'dan',
  7435. dd: '%d dana',
  7436. M: 'mjesec',
  7437. MM: '%d mjeseci',
  7438. y: 'godina',
  7439. yy: '%d godina'
  7440. },
  7441. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  7442. ordinal: /**
  7443. * @param {?} _num
  7444. * @return {?}
  7445. */
  7446. function (_num) {
  7447. /** @type {?} */
  7448. var num = Number(_num);
  7449. /** @type {?} */
  7450. var b = num % 10;
  7451. /** @type {?} */
  7452. var output = (~~(num % 100 / 10) === 1) ? '.' :
  7453. (b === 1) ? '.' :
  7454. (b === 2) ? '.' :
  7455. (b === 3) ? '.' : '.';
  7456. return num + output;
  7457. },
  7458. week: {
  7459. dow: 1,
  7460. // Monday is the first day of the week.
  7461. doy: 4 // The week that contains Jan 4th is the first week of the year.
  7462. }
  7463. };
  7464. /**
  7465. * @fileoverview added by tsickle
  7466. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  7467. */
  7468. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  7469. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  7470. // tslint:disable:no-shadowed-variable switch-default prefer-const
  7471. // tslint:disable:one-variable-per-declaration newline-before-return
  7472. // tslint:disable:no-parameter-reassignment prefer-switch
  7473. //! moment.js locale configuration
  7474. //! locale : Indonesia [id]
  7475. //! author : Romy Kusuma : https://github.com/rkusuma
  7476. //! reference: https://github.com/moment/moment/blob/develop/locale/id.js
  7477. /** @type {?} */
  7478. var idLocale = {
  7479. abbr: 'id',
  7480. months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'),
  7481. monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des'.split('_'),
  7482. weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
  7483. weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
  7484. weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
  7485. longDateFormat: {
  7486. LT: 'HH.mm',
  7487. LTS: 'HH.mm.ss',
  7488. L: 'DD/MM/YYYY',
  7489. LL: 'D MMMM YYYY',
  7490. LLL: 'D MMMM YYYY [pukul] HH.mm',
  7491. LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'
  7492. },
  7493. meridiemParse: /pagi|siang|sore|malam/,
  7494. meridiemHour: /**
  7495. * @param {?} hour
  7496. * @param {?} meridiem
  7497. * @return {?}
  7498. */
  7499. function (hour, meridiem) {
  7500. if (hour === 12) {
  7501. hour = 0;
  7502. }
  7503. if (meridiem === 'pagi') {
  7504. return hour;
  7505. }
  7506. else if (meridiem === 'siang') {
  7507. return hour >= 11 ? hour : hour + 12;
  7508. }
  7509. else if (meridiem === 'sore' || meridiem === 'malam') {
  7510. return hour + 12;
  7511. }
  7512. },
  7513. meridiem: /**
  7514. * @param {?} hours
  7515. * @param {?} minutes
  7516. * @param {?} isLower
  7517. * @return {?}
  7518. */
  7519. function (hours, minutes, isLower) {
  7520. if (hours < 11) {
  7521. return 'pagi';
  7522. }
  7523. else if (hours < 15) {
  7524. return 'siang';
  7525. }
  7526. else if (hours < 19) {
  7527. return 'sore';
  7528. }
  7529. else {
  7530. return 'malam';
  7531. }
  7532. },
  7533. calendar: {
  7534. sameDay: '[Hari ini pukul] LT',
  7535. nextDay: '[Besok pukul] LT',
  7536. nextWeek: 'dddd [pukul] LT',
  7537. lastDay: '[Kemarin pukul] LT',
  7538. lastWeek: 'dddd [lalu pukul] LT',
  7539. sameElse: 'L'
  7540. },
  7541. relativeTime: {
  7542. future: 'dalam %s',
  7543. past: '%s yang lalu',
  7544. s: 'beberapa detik',
  7545. ss: '%d detik',
  7546. m: 'semenit',
  7547. mm: '%d menit',
  7548. h: 'sejam',
  7549. hh: '%d jam',
  7550. d: 'sehari',
  7551. dd: '%d hari',
  7552. M: 'sebulan',
  7553. MM: '%d bulan',
  7554. y: 'setahun',
  7555. yy: '%d tahun'
  7556. },
  7557. week: {
  7558. dow: 1,
  7559. // Monday is the first day of the week.
  7560. doy: 7 // The week that contains Jan 1st is the first week of the year.
  7561. }
  7562. };
  7563. /**
  7564. * @fileoverview added by tsickle
  7565. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  7566. */
  7567. //! moment.js locale configuration
  7568. //! locale : Italian [it]
  7569. //! author : Lorenzo : https://github.com/aliem
  7570. //! author: Mattia Larentis: https://github.com/nostalgiaz
  7571. /** @type {?} */
  7572. var itLocale = {
  7573. abbr: 'it',
  7574. months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),
  7575. monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
  7576. weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'),
  7577. weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
  7578. weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
  7579. longDateFormat: {
  7580. LT: 'HH:mm',
  7581. LTS: 'HH:mm:ss',
  7582. L: 'DD/MM/YYYY',
  7583. LL: 'D MMMM YYYY',
  7584. LLL: 'D MMMM YYYY HH:mm',
  7585. LLLL: 'dddd D MMMM YYYY HH:mm'
  7586. },
  7587. calendar: {
  7588. sameDay: '[Oggi alle] LT',
  7589. nextDay: '[Domani alle] LT',
  7590. nextWeek: 'dddd [alle] LT',
  7591. lastDay: '[Ieri alle] LT',
  7592. lastWeek: /**
  7593. * @param {?} date
  7594. * @return {?}
  7595. */
  7596. function (date) {
  7597. switch (getDayOfWeek(date)) {
  7598. case 0:
  7599. return '[la scorsa] dddd [alle] LT';
  7600. default:
  7601. return '[lo scorso] dddd [alle] LT';
  7602. }
  7603. },
  7604. sameElse: 'L'
  7605. },
  7606. relativeTime: {
  7607. future: /**
  7608. * @param {?} num
  7609. * @return {?}
  7610. */
  7611. function (num) {
  7612. return ((/^[0-9].+$/).test(num.toString(10)) ? 'tra' : 'in') + ' ' + num;
  7613. },
  7614. past: '%s fa',
  7615. s: 'alcuni secondi',
  7616. ss: '%d secondi',
  7617. m: 'un minuto',
  7618. mm: '%d minuti',
  7619. h: 'un\'ora',
  7620. hh: '%d ore',
  7621. d: 'un giorno',
  7622. dd: '%d giorni',
  7623. M: 'un mese',
  7624. MM: '%d mesi',
  7625. y: 'un anno',
  7626. yy: '%d anni'
  7627. },
  7628. dayOfMonthOrdinalParse: /\d{1,2}º/,
  7629. ordinal: '%dº',
  7630. week: {
  7631. dow: 1,
  7632. // Monday is the first day of the week.
  7633. doy: 4 // The week that contains Jan 4th is the first week of the year.
  7634. }
  7635. };
  7636. /**
  7637. * @fileoverview added by tsickle
  7638. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  7639. */
  7640. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  7641. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  7642. // tslint:disable:no-shadowed-variable switch-default prefer-const
  7643. // tslint:disable:one-variable-per-declaration newline-before-return
  7644. //! moment.js locale configuration
  7645. //! locale : Japanese [ja]
  7646. //! author : LI Long : https://github.com/baryon
  7647. /** @type {?} */
  7648. var jaLocale = {
  7649. abbr: 'ja',
  7650. months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  7651. monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  7652. weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
  7653. weekdaysShort: '日_月_火_水_木_金_土'.split('_'),
  7654. weekdaysMin: '日_月_火_水_木_金_土'.split('_'),
  7655. longDateFormat: {
  7656. LT: 'HH:mm',
  7657. LTS: 'HH:mm:ss',
  7658. L: 'YYYY/MM/DD',
  7659. LL: 'YYYY年M月D日',
  7660. LLL: 'YYYY年M月D日 HH:mm',
  7661. LLLL: 'YYYY年M月D日 HH:mm dddd',
  7662. l: 'YYYY/MM/DD',
  7663. ll: 'YYYY年M月D日',
  7664. lll: 'YYYY年M月D日 HH:mm',
  7665. llll: 'YYYY年M月D日 HH:mm dddd'
  7666. },
  7667. meridiemParse: /午前|午後/i,
  7668. isPM: /**
  7669. * @param {?} input
  7670. * @return {?}
  7671. */
  7672. function (input) {
  7673. return input === '午後';
  7674. },
  7675. meridiem: /**
  7676. * @param {?} hour
  7677. * @param {?} minute
  7678. * @param {?} isLower
  7679. * @return {?}
  7680. */
  7681. function (hour, minute, isLower) {
  7682. if (hour < 12) {
  7683. return '午前';
  7684. }
  7685. else {
  7686. return '午後';
  7687. }
  7688. },
  7689. calendar: {
  7690. sameDay: '[今日] LT',
  7691. nextDay: '[明日] LT',
  7692. nextWeek: '[来週]dddd LT',
  7693. lastDay: '[昨日] LT',
  7694. lastWeek: '[前週]dddd LT',
  7695. sameElse: 'L'
  7696. },
  7697. dayOfMonthOrdinalParse: /\d{1,2}日/,
  7698. ordinal: /**
  7699. * @param {?} num
  7700. * @param {?} period
  7701. * @return {?}
  7702. */
  7703. function (num, period) {
  7704. switch (period) {
  7705. case 'd':
  7706. case 'D':
  7707. case 'DDD':
  7708. return num + '日';
  7709. default:
  7710. return num.toString(10);
  7711. }
  7712. },
  7713. relativeTime: {
  7714. future: '%s後',
  7715. past: '%s前',
  7716. s: '数秒',
  7717. ss: '%d秒',
  7718. m: '1分',
  7719. mm: '%d分',
  7720. h: '1時間',
  7721. hh: '%d時間',
  7722. d: '1日',
  7723. dd: '%d日',
  7724. M: '1ヶ月',
  7725. MM: '%dヶ月',
  7726. y: '1年',
  7727. yy: '%d年'
  7728. }
  7729. };
  7730. /**
  7731. * @fileoverview added by tsickle
  7732. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  7733. */
  7734. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  7735. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  7736. // tslint:disable:no-shadowed-variable switch-default prefer-const
  7737. // tslint:disable:one-variable-per-declaration newline-before-return
  7738. // tslint:disable:object-literal-shorthand
  7739. //! moment.js locale configuration
  7740. //! locale : Korean [ko]
  7741. //! author : Kyungwook, Park : https://github.com/kyungw00k
  7742. //! author : Jeeeyul Lee <jeeeyul@gmail.com>
  7743. /** @type {?} */
  7744. var koLocale = {
  7745. abbr: 'ko',
  7746. months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
  7747. monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
  7748. weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
  7749. weekdaysShort: '일_월_화_수_목_금_토'.split('_'),
  7750. weekdaysMin: '일_월_화_수_목_금_토'.split('_'),
  7751. longDateFormat: {
  7752. LT: 'A h:mm',
  7753. LTS: 'A h:mm:ss',
  7754. L: 'YYYY.MM.DD',
  7755. LL: 'YYYY년 MMMM D일',
  7756. LLL: 'YYYY년 MMMM D일 A h:mm',
  7757. LLLL: 'YYYY년 MMMM D일 dddd A h:mm',
  7758. l: 'YYYY.MM.DD',
  7759. ll: 'YYYY년 MMMM D일',
  7760. lll: 'YYYY년 MMMM D일 A h:mm',
  7761. llll: 'YYYY년 MMMM D일 dddd A h:mm'
  7762. },
  7763. calendar: {
  7764. sameDay: '오늘 LT',
  7765. nextDay: '내일 LT',
  7766. nextWeek: 'dddd LT',
  7767. lastDay: '어제 LT',
  7768. lastWeek: '지난주 dddd LT',
  7769. sameElse: 'L'
  7770. },
  7771. relativeTime: {
  7772. future: '%s 후',
  7773. past: '%s 전',
  7774. s: '몇 초',
  7775. ss: '%d초',
  7776. m: '1분',
  7777. mm: '%d분',
  7778. h: '한 시간',
  7779. hh: '%d시간',
  7780. d: '하루',
  7781. dd: '%d일',
  7782. M: '한 달',
  7783. MM: '%d달',
  7784. y: '일 년',
  7785. yy: '%d년'
  7786. },
  7787. dayOfMonthOrdinalParse: /\d{1,2}(일|월|주)/,
  7788. ordinal: (/**
  7789. * @param {?} num
  7790. * @param {?} period
  7791. * @return {?}
  7792. */
  7793. function (num, period) {
  7794. switch (period) {
  7795. case 'd':
  7796. case 'D':
  7797. case 'DDD':
  7798. return num + '일';
  7799. case 'M':
  7800. return num + '월';
  7801. case 'w':
  7802. case 'W':
  7803. return num + '주';
  7804. default:
  7805. return num.toString(10);
  7806. }
  7807. }),
  7808. meridiemParse: /오전|오후/,
  7809. isPM: (/**
  7810. * @param {?} token
  7811. * @return {?}
  7812. */
  7813. function (token) {
  7814. return token === '오후';
  7815. }),
  7816. meridiem: (/**
  7817. * @param {?} hour
  7818. * @param {?} minute
  7819. * @param {?} isUpper
  7820. * @return {?}
  7821. */
  7822. function (hour, minute, isUpper) {
  7823. return hour < 12 ? '오전' : '오후';
  7824. })
  7825. };
  7826. /**
  7827. * @fileoverview added by tsickle
  7828. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  7829. */
  7830. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  7831. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  7832. // tslint:disable:no-shadowed-variable switch-default prefer-const
  7833. // tslint:disable:one-variable-per-declaration newline-before-return
  7834. //! moment.js locale configuration
  7835. //! locale : Lithuanian [lt]
  7836. //! author : Stanislavas Guk : https://github.com/ixoster
  7837. /** @type {?} */
  7838. var units = {
  7839. ss: 'sekundė_sekundžių_sekundes',
  7840. m: 'minutė_minutės_minutę',
  7841. mm: 'minutės_minučių_minutes',
  7842. h: 'valanda_valandos_valandą',
  7843. hh: 'valandos_valandų_valandas',
  7844. d: 'diena_dienos_dieną',
  7845. dd: 'dienos_dienų_dienas',
  7846. M: 'mėnuo_mėnesio_mėnesį',
  7847. MM: 'mėnesiai_mėnesių_mėnesius',
  7848. y: 'metai_metų_metus',
  7849. yy: 'metai_metų_metus'
  7850. };
  7851. /**
  7852. * @param {?} num
  7853. * @param {?} withoutSuffix
  7854. * @param {?} key
  7855. * @param {?} isFuture
  7856. * @return {?}
  7857. */
  7858. function translateSeconds(num, withoutSuffix, key, isFuture) {
  7859. if (withoutSuffix) {
  7860. return 'kelios sekundės';
  7861. }
  7862. else {
  7863. return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
  7864. }
  7865. }
  7866. /**
  7867. * @param {?} num
  7868. * @param {?} withoutSuffix
  7869. * @param {?} key
  7870. * @param {?} isFuture
  7871. * @return {?}
  7872. */
  7873. function translateSingular(num, withoutSuffix, key, isFuture) {
  7874. return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]);
  7875. }
  7876. /**
  7877. * @param {?} num
  7878. * @return {?}
  7879. */
  7880. function special(num) {
  7881. return num % 10 === 0 || (num > 10 && num < 20);
  7882. }
  7883. /**
  7884. * @param {?} key
  7885. * @return {?}
  7886. */
  7887. function forms(key) {
  7888. return ((/** @type {?} */ (units)))[key].split('_');
  7889. }
  7890. /**
  7891. * @param {?} num
  7892. * @param {?} withoutSuffix
  7893. * @param {?} key
  7894. * @param {?} isFuture
  7895. * @return {?}
  7896. */
  7897. function translate$3(num, withoutSuffix, key, isFuture) {
  7898. /** @type {?} */
  7899. var result = num + ' ';
  7900. if (num === 1) {
  7901. return result + translateSingular(num, withoutSuffix, key[0], isFuture);
  7902. }
  7903. else if (withoutSuffix) {
  7904. return result + (special(num) ? forms(key)[1] : forms(key)[0]);
  7905. }
  7906. else {
  7907. if (isFuture) {
  7908. return result + forms(key)[1];
  7909. }
  7910. else {
  7911. return result + (special(num) ? forms(key)[1] : forms(key)[2]);
  7912. }
  7913. }
  7914. }
  7915. /** @type {?} */
  7916. var ltLocale = {
  7917. abbr: 'lt',
  7918. months: {
  7919. format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'),
  7920. standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'),
  7921. isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/
  7922. },
  7923. monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
  7924. weekdays: {
  7925. format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'),
  7926. standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'),
  7927. isFormat: /dddd HH:mm/
  7928. },
  7929. weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
  7930. weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),
  7931. weekdaysParseExact: true,
  7932. longDateFormat: {
  7933. LT: 'HH:mm',
  7934. LTS: 'HH:mm:ss',
  7935. L: 'YYYY-MM-DD',
  7936. LL: 'YYYY [m.] MMMM D [d.]',
  7937. LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
  7938. LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
  7939. l: 'YYYY-MM-DD',
  7940. ll: 'YYYY [m.] MMMM D [d.]',
  7941. lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
  7942. llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]'
  7943. },
  7944. calendar: {
  7945. sameDay: '[Šiandien] LT',
  7946. nextDay: '[Rytoj] LT',
  7947. nextWeek: 'dddd LT',
  7948. lastDay: '[Vakar] LT',
  7949. lastWeek: '[Praėjusį] dddd LT',
  7950. sameElse: 'L'
  7951. },
  7952. relativeTime: {
  7953. future: 'po %s',
  7954. past: 'prieš %s',
  7955. s: translateSeconds,
  7956. ss: translate$3,
  7957. m: translateSingular,
  7958. mm: translate$3,
  7959. h: translateSingular,
  7960. hh: translate$3,
  7961. d: translateSingular,
  7962. dd: translate$3,
  7963. M: translateSingular,
  7964. MM: translate$3,
  7965. y: translateSingular,
  7966. yy: translate$3
  7967. },
  7968. dayOfMonthOrdinalParse: /\d{1,2}-oji/,
  7969. ordinal: /**
  7970. * @param {?} num
  7971. * @return {?}
  7972. */
  7973. function (num) {
  7974. return num + '-oji';
  7975. },
  7976. week: {
  7977. dow: 1,
  7978. // Monday is the first day of the week.
  7979. doy: 4 // The week that contains Jan 4th is the first week of the year.
  7980. }
  7981. };
  7982. /**
  7983. * @fileoverview added by tsickle
  7984. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  7985. */
  7986. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  7987. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  7988. // tslint:disable:no-shadowed-variable switch-default prefer-const
  7989. // tslint:disable:one-variable-per-declaration newline-before-return
  7990. //! moment.js locale configuration
  7991. //! locale : Latvian [lv]
  7992. //! author : Matiss Janis Aboltins : https://github.com/matissjanis
  7993. /** @type {?} */
  7994. var lvLocale = {
  7995. abbr: 'lv',
  7996. months: 'Janvāris_Februāris_Marts_Aprīlis_Maijs_Jūnijs_Jūlijs_Augusts_Septembris_Oktobris_Novembris_Decembris'.split('_'),
  7997. monthsShort: 'Jan_Feb_Mar_Apr_Mai_Jūn_Jūl_Aug_Sep_Okt_Nov_Dec'.split('_'),
  7998. weekdays: 'Svētdiena_Pirmdiena_Otrdiena_Trešdiena_Ceturtdiena_Piektdiena_Sestdiena'.split('_'),
  7999. weekdaysShort: 'Svētd_Pirmd_Otrd_Trešd_Ceturtd_Piektd_Sestd'.split('_'),
  8000. weekdaysMin: 'Sv_Pi_Ot_Tr_Ce_Pk_Se'.split('_'),
  8001. longDateFormat: {
  8002. LT: 'HH:mm',
  8003. LTS: 'HH:mm:ss',
  8004. L: 'DD/MM/YYYY',
  8005. LL: 'D MMMM YYYY',
  8006. LLL: 'D MMMM YYYY HH:mm',
  8007. LLLL: 'dddd, D MMMM YYYY HH:mm'
  8008. },
  8009. calendar: {
  8010. sameDay: '[Today at] LT',
  8011. nextDay: '[Tomorrow at] LT',
  8012. nextWeek: 'dddd [at] LT',
  8013. lastDay: '[Yesterday at] LT',
  8014. lastWeek: '[Last] dddd [at] LT',
  8015. sameElse: 'L'
  8016. },
  8017. relativeTime: {
  8018. future: 'pēc %s',
  8019. past: 'pirms %s',
  8020. s: 'dažām sekundēm',
  8021. ss: '%d sekundēm',
  8022. m: 'minūtes',
  8023. mm: '%d minūtēm',
  8024. h: 'stundas',
  8025. hh: '%d stundām',
  8026. d: 'dienas',
  8027. dd: '%d dienām',
  8028. M: 'mēneša',
  8029. MM: '%d mēnešiem',
  8030. y: 'gada',
  8031. yy: '%d gadiem'
  8032. },
  8033. dayOfMonthOrdinalParse: /\d{1,2}\./,
  8034. ordinal: /**
  8035. * @param {?} num
  8036. * @return {?}
  8037. */
  8038. function (num) {
  8039. return num + '.';
  8040. },
  8041. week: {
  8042. dow: 1,
  8043. // Monday is the first day of the week.
  8044. doy: 4 // The week that contains Jan 4th is the first week of the year.
  8045. }
  8046. };
  8047. /**
  8048. * @fileoverview added by tsickle
  8049. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  8050. */
  8051. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  8052. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  8053. // tslint:disable:no-shadowed-variable switch-default prefer-const
  8054. // tslint:disable:one-variable-per-declaration newline-before-return
  8055. // tslint:disable:object-literal-shorthand
  8056. //! moment.js locale configuration
  8057. //! locale : Mongolian [mn]
  8058. //! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7
  8059. /**
  8060. * @param {?} num
  8061. * @param {?} withoutSuffix
  8062. * @param {?} key
  8063. * @param {?} isFuture
  8064. * @return {?}
  8065. */
  8066. function translate$4(num, withoutSuffix, key, isFuture) {
  8067. switch (key) {
  8068. case 's':
  8069. return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';
  8070. case 'ss':
  8071. return num + (withoutSuffix ? ' секунд' : ' секундын');
  8072. case 'm':
  8073. case 'mm':
  8074. return num + (withoutSuffix ? ' минут' : ' минутын');
  8075. case 'h':
  8076. case 'hh':
  8077. return num + (withoutSuffix ? ' цаг' : ' цагийн');
  8078. case 'd':
  8079. case 'dd':
  8080. return num + (withoutSuffix ? ' өдөр' : ' өдрийн');
  8081. case 'M':
  8082. case 'MM':
  8083. return num + (withoutSuffix ? ' сар' : ' сарын');
  8084. case 'y':
  8085. case 'yy':
  8086. return num + (withoutSuffix ? ' жил' : ' жилийн');
  8087. default:
  8088. return num.toString(10);
  8089. }
  8090. }
  8091. /** @type {?} */
  8092. var mnLocale = {
  8093. abbr: 'mn',
  8094. months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split('_'),
  8095. monthsShort: '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split('_'),
  8096. monthsParseExact: true,
  8097. weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),
  8098. weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),
  8099. weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),
  8100. weekdaysParseExact: true,
  8101. longDateFormat: {
  8102. LT: 'HH:mm',
  8103. LTS: 'HH:mm:ss',
  8104. L: 'YYYY-MM-DD',
  8105. LL: 'YYYY оны MMMMын D',
  8106. LLL: 'YYYY оны MMMMын D HH:mm',
  8107. LLLL: 'dddd, YYYY оны MMMMын D HH:mm'
  8108. },
  8109. meridiemParse: /ҮӨ|ҮХ/i,
  8110. isPM: (/**
  8111. * @param {?} input
  8112. * @return {?}
  8113. */
  8114. function (input) {
  8115. return input === 'ҮХ';
  8116. }),
  8117. meridiem: (/**
  8118. * @param {?} hour
  8119. * @param {?} minute
  8120. * @param {?} isLower
  8121. * @return {?}
  8122. */
  8123. function (hour, minute, isLower) {
  8124. if (hour < 12) {
  8125. return 'ҮӨ';
  8126. }
  8127. else {
  8128. return 'ҮХ';
  8129. }
  8130. }),
  8131. calendar: {
  8132. sameDay: '[Өнөөдөр] LT',
  8133. nextDay: '[Маргааш] LT',
  8134. nextWeek: '[Ирэх] dddd LT',
  8135. lastDay: '[Өчигдөр] LT',
  8136. lastWeek: '[Өнгөрсөн] dddd LT',
  8137. sameElse: 'L'
  8138. },
  8139. relativeTime: {
  8140. future: '%s дараа',
  8141. past: '%s өмнө',
  8142. s: translate$4,
  8143. ss: translate$4,
  8144. m: translate$4,
  8145. mm: translate$4,
  8146. h: translate$4,
  8147. hh: translate$4,
  8148. d: translate$4,
  8149. dd: translate$4,
  8150. M: translate$4,
  8151. MM: translate$4,
  8152. y: translate$4,
  8153. yy: translate$4
  8154. },
  8155. dayOfMonthOrdinalParse: /\d{1,2} өдөр/,
  8156. ordinal: (/**
  8157. * @param {?} num
  8158. * @param {?} period
  8159. * @return {?}
  8160. */
  8161. function (num, period) {
  8162. switch (period) {
  8163. case 'd':
  8164. case 'D':
  8165. case 'DDD':
  8166. return num + ' өдөр';
  8167. default:
  8168. return num.toString(10);
  8169. }
  8170. })
  8171. };
  8172. /**
  8173. * @fileoverview added by tsickle
  8174. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  8175. */
  8176. //! moment.js locale configuration
  8177. //! locale : Norwegian Bokmål [nb]
  8178. //! authors : Espen Hovlandsdal : https://github.com/rexxars
  8179. //! Sigurd Gartmann : https://github.com/sigurdga
  8180. /** @type {?} */
  8181. var nbLocale = {
  8182. abbr: 'nb',
  8183. months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
  8184. monthsShort: 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
  8185. monthsParseExact: true,
  8186. weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
  8187. weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
  8188. weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
  8189. weekdaysParseExact: true,
  8190. longDateFormat: {
  8191. LT: 'HH:mm',
  8192. LTS: 'HH:mm:ss',
  8193. L: 'DD.MM.YYYY',
  8194. LL: 'D. MMMM YYYY',
  8195. LLL: 'D. MMMM YYYY [kl.] HH:mm',
  8196. LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm'
  8197. },
  8198. calendar: {
  8199. sameDay: '[i dag kl.] LT',
  8200. nextDay: '[i morgen kl.] LT',
  8201. nextWeek: 'dddd [kl.] LT',
  8202. lastDay: '[i går kl.] LT',
  8203. lastWeek: '[forrige] dddd [kl.] LT',
  8204. sameElse: 'L'
  8205. },
  8206. relativeTime: {
  8207. future: 'om %s',
  8208. past: '%s siden',
  8209. s: 'noen sekunder',
  8210. ss: '%d sekunder',
  8211. m: 'ett minutt',
  8212. mm: '%d minutter',
  8213. h: 'en time',
  8214. hh: '%d timer',
  8215. d: 'en dag',
  8216. dd: '%d dager',
  8217. M: 'en måned',
  8218. MM: '%d måneder',
  8219. y: 'ett år',
  8220. yy: '%d år'
  8221. },
  8222. dayOfMonthOrdinalParse: /\d{1,2}\./,
  8223. ordinal: '%d.',
  8224. week: {
  8225. dow: 1,
  8226. // Monday is the first day of the week.
  8227. doy: 4 // The week that contains Jan 4th is the first week of the year.
  8228. }
  8229. };
  8230. /**
  8231. * @fileoverview added by tsickle
  8232. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  8233. */
  8234. //! moment.js locale configuration
  8235. //! locale : Dutch (Belgium) [nl-be]
  8236. //! author : Joris Röling : https://github.com/jorisroling
  8237. //! author : Jacob Middag : https://github.com/middagj
  8238. /** @type {?} */
  8239. var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');
  8240. /** @type {?} */
  8241. var monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');
  8242. /** @type {?} */
  8243. 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];
  8244. /** @type {?} */
  8245. 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;
  8246. /** @type {?} */
  8247. var nlBeLocale = {
  8248. abbr: 'nl-be',
  8249. months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
  8250. monthsShort: /**
  8251. * @param {?} date
  8252. * @param {?} format
  8253. * @param {?=} isUTC
  8254. * @return {?}
  8255. */
  8256. function (date, format, isUTC) {
  8257. if (!date) {
  8258. return monthsShortWithDots;
  8259. }
  8260. else if (/-MMM-/.test(format)) {
  8261. return monthsShortWithoutDots[getMonth(date, isUTC)];
  8262. }
  8263. else {
  8264. return monthsShortWithDots[getMonth(date, isUTC)];
  8265. }
  8266. },
  8267. monthsRegex: monthsRegex$4,
  8268. monthsShortRegex: monthsRegex$4,
  8269. monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,
  8270. monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
  8271. monthsParse: monthsParse$4,
  8272. longMonthsParse: monthsParse$4,
  8273. shortMonthsParse: monthsParse$4,
  8274. weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
  8275. weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
  8276. weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
  8277. weekdaysParseExact: true,
  8278. longDateFormat: {
  8279. LT: 'HH:mm',
  8280. LTS: 'HH:mm:ss',
  8281. L: 'DD/MM/YYYY',
  8282. LL: 'D MMMM YYYY',
  8283. LLL: 'D MMMM YYYY HH:mm',
  8284. LLLL: 'dddd D MMMM YYYY HH:mm'
  8285. },
  8286. calendar: {
  8287. sameDay: '[vandaag om] LT',
  8288. nextDay: '[morgen om] LT',
  8289. nextWeek: 'dddd [om] LT',
  8290. lastDay: '[gisteren om] LT',
  8291. lastWeek: '[afgelopen] dddd [om] LT',
  8292. sameElse: 'L'
  8293. },
  8294. relativeTime: {
  8295. future: 'over %s',
  8296. past: '%s geleden',
  8297. s: 'een paar seconden',
  8298. ss: '%d seconden',
  8299. m: 'één minuut',
  8300. mm: '%d minuten',
  8301. h: 'één uur',
  8302. hh: '%d uur',
  8303. d: 'één dag',
  8304. dd: '%d dagen',
  8305. M: 'één maand',
  8306. MM: '%d maanden',
  8307. y: 'één jaar',
  8308. yy: '%d jaar'
  8309. },
  8310. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  8311. ordinal: /**
  8312. * @param {?} _num
  8313. * @return {?}
  8314. */
  8315. function (_num) {
  8316. /** @type {?} */
  8317. var num = Number(_num);
  8318. return num + ((num === 1 || num === 8 || num >= 20) ? 'ste' : 'de');
  8319. },
  8320. week: {
  8321. dow: 1,
  8322. // Monday is the first day of the week.
  8323. doy: 4 // The week that contains Jan 4th is the first week of the year.
  8324. }
  8325. };
  8326. /**
  8327. * @fileoverview added by tsickle
  8328. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  8329. */
  8330. //! moment.js locale configuration
  8331. //! locale : Dutch [nl]
  8332. //! author : Joris Röling : https://github.com/jorisroling
  8333. //! author : Jacob Middag : https://github.com/middagj
  8334. /** @type {?} */
  8335. var monthsShortWithDots$1 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');
  8336. /** @type {?} */
  8337. var monthsShortWithoutDots$1 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');
  8338. /** @type {?} */
  8339. 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];
  8340. /** @type {?} */
  8341. 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;
  8342. /** @type {?} */
  8343. var nlLocale = {
  8344. abbr: 'nl',
  8345. months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
  8346. monthsShort: /**
  8347. * @param {?} date
  8348. * @param {?} format
  8349. * @param {?=} isUTC
  8350. * @return {?}
  8351. */
  8352. function (date, format, isUTC) {
  8353. if (!date) {
  8354. return monthsShortWithDots$1;
  8355. }
  8356. else if (/-MMM-/.test(format)) {
  8357. return monthsShortWithoutDots$1[getMonth(date, isUTC)];
  8358. }
  8359. else {
  8360. return monthsShortWithDots$1[getMonth(date, isUTC)];
  8361. }
  8362. },
  8363. monthsRegex: monthsRegex$5,
  8364. monthsShortRegex: monthsRegex$5,
  8365. monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,
  8366. monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
  8367. monthsParse: monthsParse$5,
  8368. longMonthsParse: monthsParse$5,
  8369. shortMonthsParse: monthsParse$5,
  8370. weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
  8371. weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
  8372. weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
  8373. weekdaysParseExact: true,
  8374. longDateFormat: {
  8375. LT: 'HH:mm',
  8376. LTS: 'HH:mm:ss',
  8377. L: 'DD-MM-YYYY',
  8378. LL: 'D MMMM YYYY',
  8379. LLL: 'D MMMM YYYY HH:mm',
  8380. LLLL: 'dddd D MMMM YYYY HH:mm'
  8381. },
  8382. calendar: {
  8383. sameDay: '[vandaag om] LT',
  8384. nextDay: '[morgen om] LT',
  8385. nextWeek: 'dddd [om] LT',
  8386. lastDay: '[gisteren om] LT',
  8387. lastWeek: '[afgelopen] dddd [om] LT',
  8388. sameElse: 'L'
  8389. },
  8390. relativeTime: {
  8391. future: 'over %s',
  8392. past: '%s geleden',
  8393. s: 'een paar seconden',
  8394. ss: '%d seconden',
  8395. m: 'één minuut',
  8396. mm: '%d minuten',
  8397. h: 'één uur',
  8398. hh: '%d uur',
  8399. d: 'één dag',
  8400. dd: '%d dagen',
  8401. M: 'één maand',
  8402. MM: '%d maanden',
  8403. y: 'één jaar',
  8404. yy: '%d jaar'
  8405. },
  8406. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  8407. ordinal: /**
  8408. * @param {?} _num
  8409. * @return {?}
  8410. */
  8411. function (_num) {
  8412. /** @type {?} */
  8413. var num = Number(_num);
  8414. return num + ((num === 1 || num === 8 || num >= 20) ? 'ste' : 'de');
  8415. },
  8416. week: {
  8417. dow: 1,
  8418. // Monday is the first day of the week.
  8419. doy: 4 // The week that contains Jan 4th is the first week of the year.
  8420. }
  8421. };
  8422. /**
  8423. * @fileoverview added by tsickle
  8424. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  8425. */
  8426. //! moment.js locale configuration
  8427. //! locale : Polish [pl]
  8428. //! author : Rafal Hirsz : https://github.com/evoL
  8429. /** @type {?} */
  8430. var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_');
  8431. /** @type {?} */
  8432. var monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');
  8433. /**
  8434. * @param {?} num
  8435. * @return {?}
  8436. */
  8437. function plural$1(num) {
  8438. return (num % 10 < 5) && (num % 10 > 1) && ((~~(num / 10) % 10) !== 1);
  8439. }
  8440. /**
  8441. * @param {?} num
  8442. * @param {?} withoutSuffix
  8443. * @param {?} key
  8444. * @return {?}
  8445. */
  8446. function translate$5(num, withoutSuffix, key) {
  8447. /** @type {?} */
  8448. var result = num + ' ';
  8449. switch (key) {
  8450. case 'ss':
  8451. return result + (plural$1(num) ? 'sekundy' : 'sekund');
  8452. case 'm':
  8453. return withoutSuffix ? 'minuta' : 'minutę';
  8454. case 'mm':
  8455. return result + (plural$1(num) ? 'minuty' : 'minut');
  8456. case 'h':
  8457. return withoutSuffix ? 'godzina' : 'godzinę';
  8458. case 'hh':
  8459. return result + (plural$1(num) ? 'godziny' : 'godzin');
  8460. case 'MM':
  8461. return result + (plural$1(num) ? 'miesiące' : 'miesięcy');
  8462. case 'yy':
  8463. return result + (plural$1(num) ? 'lata' : 'lat');
  8464. }
  8465. }
  8466. /** @type {?} */
  8467. var plLocale = {
  8468. abbr: 'pl',
  8469. months: /**
  8470. * @param {?} date
  8471. * @param {?} format
  8472. * @param {?=} isUTC
  8473. * @return {?}
  8474. */
  8475. function (date, format, isUTC) {
  8476. if (!date) {
  8477. return monthsNominative;
  8478. }
  8479. else if (format === '') {
  8480. // Hack: if format empty we know this is used to generate
  8481. // RegExp by moment. Give then back both valid forms of months
  8482. // in RegExp ready format.
  8483. return '(' + monthsSubjective[getMonth(date, isUTC)] + '|' + monthsNominative[getMonth(date, isUTC)] + ')';
  8484. }
  8485. else if (/D MMMM/.test(format)) {
  8486. return monthsSubjective[getMonth(date, isUTC)];
  8487. }
  8488. else {
  8489. return monthsNominative[getMonth(date, isUTC)];
  8490. }
  8491. },
  8492. monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
  8493. weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
  8494. weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
  8495. weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
  8496. longDateFormat: {
  8497. LT: 'HH:mm',
  8498. LTS: 'HH:mm:ss',
  8499. L: 'DD.MM.YYYY',
  8500. LL: 'D MMMM YYYY',
  8501. LLL: 'D MMMM YYYY HH:mm',
  8502. LLLL: 'dddd, D MMMM YYYY HH:mm'
  8503. },
  8504. calendar: {
  8505. sameDay: '[Dziś o] LT',
  8506. nextDay: '[Jutro o] LT',
  8507. nextWeek: /**
  8508. * @param {?} date
  8509. * @return {?}
  8510. */
  8511. function (date) {
  8512. switch (getDayOfWeek(date)) {
  8513. case 0:
  8514. return '[W niedzielę o] LT';
  8515. case 2:
  8516. return '[We wtorek o] LT';
  8517. case 3:
  8518. return '[W środę o] LT';
  8519. case 5:
  8520. return '[W piątek o] LT';
  8521. case 6:
  8522. return '[W sobotę o] LT';
  8523. default:
  8524. return '[W] dddd [o] LT';
  8525. }
  8526. },
  8527. lastDay: '[Wczoraj o] LT',
  8528. lastWeek: /**
  8529. * @param {?} date
  8530. * @return {?}
  8531. */
  8532. function (date) {
  8533. switch (getDayOfWeek(date)) {
  8534. case 0:
  8535. return '[W zeszłą niedzielę o] LT';
  8536. case 3:
  8537. return '[W zeszłą środę o] LT';
  8538. case 4:
  8539. return '[W zeszłą czwartek o] LT';
  8540. case 5:
  8541. return '[W zeszłą piątek o] LT';
  8542. case 6:
  8543. return '[W zeszłą sobotę o] LT';
  8544. default:
  8545. return '[W zeszły] dddd [o] LT';
  8546. }
  8547. },
  8548. sameElse: 'L'
  8549. },
  8550. relativeTime: {
  8551. future: 'za %s',
  8552. past: '%s temu',
  8553. s: 'kilka sekund',
  8554. ss: translate$5,
  8555. m: translate$5,
  8556. mm: translate$5,
  8557. h: translate$5,
  8558. hh: translate$5,
  8559. d: '1 dzień',
  8560. dd: '%d dni',
  8561. M: 'miesiąc',
  8562. MM: translate$5,
  8563. y: 'rok',
  8564. yy: translate$5
  8565. },
  8566. dayOfMonthOrdinalParse: /\d{1,2}\./,
  8567. ordinal: '%d.',
  8568. week: {
  8569. dow: 1,
  8570. // Monday is the first day of the week.
  8571. doy: 4 // The week that contains Jan 4th is the first week of the year.
  8572. }
  8573. };
  8574. /**
  8575. * @fileoverview added by tsickle
  8576. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  8577. */
  8578. //! moment.js locale configuration
  8579. //! locale : Portuguese (Brazil) [pt-br]
  8580. //! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
  8581. /** @type {?} */
  8582. var ptBrLocale = {
  8583. abbr: 'pt-br',
  8584. months: 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),
  8585. monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
  8586. weekdays: 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),
  8587. weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
  8588. weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
  8589. weekdaysParseExact: true,
  8590. longDateFormat: {
  8591. LT: 'HH:mm',
  8592. LTS: 'HH:mm:ss',
  8593. L: 'DD/MM/YYYY',
  8594. LL: 'D [de] MMMM [de] YYYY',
  8595. LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
  8596. LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm'
  8597. },
  8598. calendar: {
  8599. sameDay: '[Hoje às] LT',
  8600. nextDay: '[Amanhã às] LT',
  8601. nextWeek: 'dddd [às] LT',
  8602. lastDay: '[Ontem às] LT',
  8603. lastWeek: /**
  8604. * @param {?} date
  8605. * @return {?}
  8606. */
  8607. function (date) {
  8608. return (getDayOfWeek(date) === 0 || getDayOfWeek(date) === 6) ?
  8609. '[Último] dddd [às] LT' : // Saturday + Sunday
  8610. '[Última] dddd [às] LT'; // Monday - Friday
  8611. },
  8612. sameElse: 'L'
  8613. },
  8614. relativeTime: {
  8615. future: 'em %s',
  8616. past: '%s atrás',
  8617. s: 'poucos segundos',
  8618. ss: '%d segundos',
  8619. m: 'um minuto',
  8620. mm: '%d minutos',
  8621. h: 'uma hora',
  8622. hh: '%d horas',
  8623. d: 'um dia',
  8624. dd: '%d dias',
  8625. M: 'um mês',
  8626. MM: '%d meses',
  8627. y: 'um ano',
  8628. yy: '%d anos'
  8629. },
  8630. dayOfMonthOrdinalParse: /\d{1,2}º/,
  8631. ordinal: '%dº'
  8632. };
  8633. /**
  8634. * @fileoverview added by tsickle
  8635. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  8636. */
  8637. // ! moment.js locale configuration
  8638. // ! locale : Romanian [ro]
  8639. //! author : Vlad Gurdiga : https://github.com/gurdiga
  8640. //! author : Valentin Agachi : https://github.com/avaly
  8641. // ! author : Earle white: https://github.com/5earle
  8642. /**
  8643. * @param {?} num
  8644. * @param {?} withoutSuffix
  8645. * @param {?} key
  8646. * @return {?}
  8647. */
  8648. function relativeTimeWithPlural(num, withoutSuffix, key) {
  8649. /** @type {?} */
  8650. var format = {
  8651. ss: 'secunde',
  8652. mm: 'minute',
  8653. hh: 'ore',
  8654. dd: 'zile',
  8655. MM: 'luni',
  8656. yy: 'ani'
  8657. };
  8658. /** @type {?} */
  8659. var separator = ' ';
  8660. if (num % 100 >= 20 || (num >= 100 && num % 100 === 0)) {
  8661. separator = ' de ';
  8662. }
  8663. return num + separator + format[key];
  8664. }
  8665. /** @type {?} */
  8666. var roLocale = {
  8667. abbr: 'ro',
  8668. months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'),
  8669. monthsShort: 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'),
  8670. monthsParseExact: true,
  8671. weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
  8672. weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
  8673. weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
  8674. longDateFormat: {
  8675. LT: 'H:mm',
  8676. LTS: 'H:mm:ss',
  8677. L: 'DD.MM.YYYY',
  8678. LL: 'D MMMM YYYY',
  8679. LLL: 'D MMMM YYYY H:mm',
  8680. LLLL: 'dddd, D MMMM YYYY H:mm'
  8681. },
  8682. calendar: {
  8683. sameDay: '[azi la] LT',
  8684. nextDay: '[mâine la] LT',
  8685. nextWeek: 'dddd [la] LT',
  8686. lastDay: '[ieri la] LT',
  8687. lastWeek: '[fosta] dddd [la] LT',
  8688. sameElse: 'L'
  8689. },
  8690. relativeTime: {
  8691. future: 'peste %s',
  8692. past: '%s în urmă',
  8693. s: 'câteva secunde',
  8694. ss: relativeTimeWithPlural,
  8695. m: 'un minut',
  8696. mm: relativeTimeWithPlural,
  8697. h: 'o oră',
  8698. hh: relativeTimeWithPlural,
  8699. d: 'o zi',
  8700. dd: relativeTimeWithPlural,
  8701. M: 'o lună',
  8702. MM: relativeTimeWithPlural,
  8703. y: 'un an',
  8704. yy: relativeTimeWithPlural
  8705. },
  8706. week: {
  8707. dow: 1,
  8708. // Monday is the first day of the week.
  8709. doy: 7 // The week that contains Jan 1st is the first week of the year.
  8710. }
  8711. };
  8712. /**
  8713. * @fileoverview added by tsickle
  8714. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  8715. */
  8716. //! moment.js locale configuration
  8717. //! locale : Russian [ru]
  8718. //! author : Viktorminator : https://github.com/Viktorminator
  8719. //! Author : Menelion Elensúle : https://github.com/Oire
  8720. //! author : Коренберг Марк : https://github.com/socketpair
  8721. /**
  8722. * @param {?} word
  8723. * @param {?} num
  8724. * @return {?}
  8725. */
  8726. function plural$2(word, num) {
  8727. /** @type {?} */
  8728. var forms = word.split('_');
  8729. 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]);
  8730. }
  8731. /**
  8732. * @param {?} num
  8733. * @param {?} withoutSuffix
  8734. * @param {?} key
  8735. * @return {?}
  8736. */
  8737. function relativeTimeWithPlural$1(num, withoutSuffix, key) {
  8738. /** @type {?} */
  8739. var format = {
  8740. ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
  8741. mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
  8742. hh: 'час_часа_часов',
  8743. dd: 'день_дня_дней',
  8744. MM: 'месяц_месяца_месяцев',
  8745. yy: 'год_года_лет'
  8746. };
  8747. if (key === 'm') {
  8748. return withoutSuffix ? 'минута' : 'минуту';
  8749. }
  8750. return num + ' ' + plural$2(format[key], +num);
  8751. }
  8752. /** @type {?} */
  8753. var monthsParse$6 = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i];
  8754. // http://new.gramota.ru/spravka/rules/139-prop : § 103
  8755. // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
  8756. // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
  8757. /** @type {?} */
  8758. var ruLocale = {
  8759. abbr: 'ru',
  8760. months: {
  8761. format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'),
  8762. standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_')
  8763. },
  8764. monthsShort: {
  8765. // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку ?
  8766. format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'),
  8767. standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_')
  8768. },
  8769. weekdays: {
  8770. standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),
  8771. format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'),
  8772. isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/
  8773. },
  8774. weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
  8775. weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
  8776. monthsParse: monthsParse$6,
  8777. longMonthsParse: monthsParse$6,
  8778. shortMonthsParse: monthsParse$6,
  8779. // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
  8780. monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
  8781. // копия предыдущего
  8782. monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
  8783. // полные названия с падежами
  8784. monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
  8785. // Выражение, которое соотвествует только сокращённым формам
  8786. monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
  8787. longDateFormat: {
  8788. LT: 'H:mm',
  8789. LTS: 'H:mm:ss',
  8790. L: 'DD.MM.YYYY',
  8791. LL: 'D MMMM YYYY г.',
  8792. LLL: 'D MMMM YYYY г., H:mm',
  8793. LLLL: 'dddd, D MMMM YYYY г., H:mm'
  8794. },
  8795. calendar: {
  8796. sameDay: '[Сегодня в] LT',
  8797. nextDay: '[Завтра в] LT',
  8798. lastDay: '[Вчера в] LT',
  8799. nextWeek: /**
  8800. * @param {?} date
  8801. * @param {?} now
  8802. * @return {?}
  8803. */
  8804. function (date, now) {
  8805. if (getWeek(now) !== getWeek(date)) {
  8806. switch (getDayOfWeek(date)) {
  8807. case 0:
  8808. return '[В следующее] dddd [в] LT';
  8809. case 1:
  8810. case 2:
  8811. case 4:
  8812. return '[В следующий] dddd [в] LT';
  8813. case 3:
  8814. case 5:
  8815. case 6:
  8816. return '[В следующую] dddd [в] LT';
  8817. }
  8818. }
  8819. else {
  8820. if (getDayOfWeek(date) === 2) {
  8821. return '[Во] dddd [в] LT';
  8822. }
  8823. else {
  8824. return '[В] dddd [в] LT';
  8825. }
  8826. }
  8827. },
  8828. lastWeek: /**
  8829. * @param {?} date
  8830. * @param {?} now
  8831. * @return {?}
  8832. */
  8833. function (date, now) {
  8834. if (getWeek(now) !== getWeek(date)) {
  8835. switch (getDayOfWeek(date)) {
  8836. case 0:
  8837. return '[В прошлое] dddd [в] LT';
  8838. case 1:
  8839. case 2:
  8840. case 4:
  8841. return '[В прошлый] dddd [в] LT';
  8842. case 3:
  8843. case 5:
  8844. case 6:
  8845. return '[В прошлую] dddd [в] LT';
  8846. }
  8847. }
  8848. else {
  8849. if (getDayOfWeek(date) === 2) {
  8850. return '[Во] dddd [в] LT';
  8851. }
  8852. else {
  8853. return '[В] dddd [в] LT';
  8854. }
  8855. }
  8856. },
  8857. sameElse: 'L'
  8858. },
  8859. relativeTime: {
  8860. future: 'через %s',
  8861. past: '%s назад',
  8862. s: 'несколько секунд',
  8863. ss: relativeTimeWithPlural$1,
  8864. m: relativeTimeWithPlural$1,
  8865. mm: relativeTimeWithPlural$1,
  8866. h: 'час',
  8867. hh: relativeTimeWithPlural$1,
  8868. d: 'день',
  8869. dd: relativeTimeWithPlural$1,
  8870. M: 'месяц',
  8871. MM: relativeTimeWithPlural$1,
  8872. y: 'год',
  8873. yy: relativeTimeWithPlural$1
  8874. },
  8875. meridiemParse: /ночи|утра|дня|вечера/i,
  8876. isPM: /**
  8877. * @param {?} input
  8878. * @return {?}
  8879. */
  8880. function (input) {
  8881. return /^(дня|вечера)$/.test(input);
  8882. },
  8883. meridiem: /**
  8884. * @param {?} hour
  8885. * @param {?} minute
  8886. * @param {?} isLower
  8887. * @return {?}
  8888. */
  8889. function (hour, minute, isLower) {
  8890. if (hour < 4) {
  8891. return 'ночи';
  8892. }
  8893. else if (hour < 12) {
  8894. return 'утра';
  8895. }
  8896. else if (hour < 17) {
  8897. return 'дня';
  8898. }
  8899. else {
  8900. return 'вечера';
  8901. }
  8902. },
  8903. dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
  8904. ordinal: /**
  8905. * @param {?} _num
  8906. * @param {?} period
  8907. * @return {?}
  8908. */
  8909. function (_num, period) {
  8910. /** @type {?} */
  8911. var num = Number(_num);
  8912. switch (period) {
  8913. case 'M':
  8914. case 'd':
  8915. case 'DDD':
  8916. return num + '-й';
  8917. case 'D':
  8918. return num + '-го';
  8919. case 'w':
  8920. case 'W':
  8921. return num + '-я';
  8922. default:
  8923. return num.toString(10);
  8924. }
  8925. },
  8926. week: {
  8927. dow: 1,
  8928. // Monday is the first day of the week.
  8929. doy: 4 // The week that contains Jan 4th is the first week of the year.
  8930. }
  8931. };
  8932. /**
  8933. * @fileoverview added by tsickle
  8934. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  8935. */
  8936. //! moment.js locale configuration
  8937. //! locale : Slovak [sk]
  8938. //! author : Jozef Pažin : https://github.com/atiris
  8939. /** @type {?} */
  8940. var months$2 = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_');
  8941. /** @type {?} */
  8942. var monthsShort$6 = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
  8943. /**
  8944. * @param {?} num
  8945. * @return {?}
  8946. */
  8947. function plural$3(num) {
  8948. return (num > 1) && (num < 5) && (~~(num / 10) !== 1);
  8949. }
  8950. /**
  8951. * @param {?} num
  8952. * @param {?} withoutSuffix
  8953. * @param {?} key
  8954. * @param {?} isFuture
  8955. * @return {?}
  8956. */
  8957. function translate$6(num, withoutSuffix, key, isFuture) {
  8958. /** @type {?} */
  8959. var result = num + ' ';
  8960. switch (key) {
  8961. case 's': // a few seconds / in a few seconds / a few seconds ago
  8962. return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';
  8963. case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
  8964. if (withoutSuffix || isFuture) {
  8965. return result + (plural$3(num) ? 'sekundy' : 'sekúnd');
  8966. }
  8967. else {
  8968. return result + 'sekundami';
  8969. }
  8970. // break;
  8971. case 'm': // a minute / in a minute / a minute ago
  8972. return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou');
  8973. case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
  8974. if (withoutSuffix || isFuture) {
  8975. return result + (plural$3(num) ? 'minúty' : 'minút');
  8976. }
  8977. else {
  8978. return result + 'minútami';
  8979. }
  8980. // break;
  8981. case 'h': // an hour / in an hour / an hour ago
  8982. return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
  8983. case 'hh': // 9 hours / in 9 hours / 9 hours ago
  8984. if (withoutSuffix || isFuture) {
  8985. return result + (plural$3(num) ? 'hodiny' : 'hodín');
  8986. }
  8987. else {
  8988. return result + 'hodinami';
  8989. }
  8990. // break;
  8991. case 'd': // a day / in a day / a day ago
  8992. return (withoutSuffix || isFuture) ? 'deň' : 'dňom';
  8993. case 'dd': // 9 days / in 9 days / 9 days ago
  8994. if (withoutSuffix || isFuture) {
  8995. return result + (plural$3(num) ? 'dni' : 'dní');
  8996. }
  8997. else {
  8998. return result + 'dňami';
  8999. }
  9000. // break;
  9001. case 'M': // a month / in a month / a month ago
  9002. return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom';
  9003. case 'MM': // 9 months / in 9 months / 9 months ago
  9004. if (withoutSuffix || isFuture) {
  9005. return result + (plural$3(num) ? 'mesiace' : 'mesiacov');
  9006. }
  9007. else {
  9008. return result + 'mesiacmi';
  9009. }
  9010. // break;
  9011. case 'y': // a year / in a year / a year ago
  9012. return (withoutSuffix || isFuture) ? 'rok' : 'rokom';
  9013. case 'yy': // 9 years / in 9 years / 9 years ago
  9014. if (withoutSuffix || isFuture) {
  9015. return result + (plural$3(num) ? 'roky' : 'rokov');
  9016. }
  9017. else {
  9018. return result + 'rokmi';
  9019. }
  9020. // break;
  9021. }
  9022. }
  9023. /** @type {?} */
  9024. var skLocale = {
  9025. abbr: 'sk',
  9026. months: months$2,
  9027. monthsShort: monthsShort$6,
  9028. weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
  9029. weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),
  9030. weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),
  9031. longDateFormat: {
  9032. LT: 'H:mm',
  9033. LTS: 'H:mm:ss',
  9034. L: 'DD.MM.YYYY',
  9035. LL: 'D. MMMM YYYY',
  9036. LLL: 'D. MMMM YYYY H:mm',
  9037. LLLL: 'dddd D. MMMM YYYY H:mm',
  9038. l: 'D. M. YYYY'
  9039. },
  9040. calendar: {
  9041. sameDay: '[dnes o] LT',
  9042. nextDay: '[zajtra o] LT',
  9043. nextWeek: /**
  9044. * @param {?} date
  9045. * @return {?}
  9046. */
  9047. function (date) {
  9048. switch (getDayOfWeek(date)) {
  9049. case 0:
  9050. return '[v nedeľu o] LT';
  9051. case 1:
  9052. case 2:
  9053. return '[v] dddd [o] LT';
  9054. case 3:
  9055. return '[v stredu o] LT';
  9056. case 4:
  9057. return '[vo štvrtok o] LT';
  9058. case 5:
  9059. return '[v piatok o] LT';
  9060. case 6:
  9061. return '[v sobotu o] LT';
  9062. }
  9063. },
  9064. lastDay: '[včera o] LT',
  9065. lastWeek: /**
  9066. * @param {?} date
  9067. * @return {?}
  9068. */
  9069. function (date) {
  9070. switch (getDayOfWeek(date)) {
  9071. case 0:
  9072. return '[minulú nedeľu o] LT';
  9073. case 1:
  9074. case 2:
  9075. return '[minulý] dddd [o] LT';
  9076. case 3:
  9077. return '[minulú stredu o] LT';
  9078. case 4:
  9079. case 5:
  9080. return '[minulý] dddd [o] LT';
  9081. case 6:
  9082. return '[minulú sobotu o] LT';
  9083. }
  9084. },
  9085. sameElse: 'L'
  9086. },
  9087. relativeTime: {
  9088. future: 'o %s',
  9089. past: 'pred %s',
  9090. s: translate$6,
  9091. ss: translate$6,
  9092. m: translate$6,
  9093. mm: translate$6,
  9094. h: translate$6,
  9095. hh: translate$6,
  9096. d: translate$6,
  9097. dd: translate$6,
  9098. M: translate$6,
  9099. MM: translate$6,
  9100. y: translate$6,
  9101. yy: translate$6
  9102. },
  9103. dayOfMonthOrdinalParse: /\d{1,2}\./,
  9104. ordinal: '%d.',
  9105. week: {
  9106. dow: 1,
  9107. // Monday is the first day of the week.
  9108. doy: 4 // The week that contains Jan 4th is the first week of the year.
  9109. }
  9110. };
  9111. /**
  9112. * @fileoverview added by tsickle
  9113. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  9114. */
  9115. //! moment.js locale configuration
  9116. //! locale : Slovenian [sl]
  9117. //! author : mihan : https://github.com/mihan
  9118. /**
  9119. * @param {?} number
  9120. * @param {?} withoutSuffix
  9121. * @param {?} key
  9122. * @param {?} isFuture
  9123. * @return {?}
  9124. */
  9125. function processRelativeTime$2(number, withoutSuffix, key, isFuture) {
  9126. /** @type {?} */
  9127. var result = number + ' ';
  9128. switch (key) {
  9129. case 's':
  9130. return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';
  9131. case 'ss':
  9132. if (number === 1) {
  9133. result += withoutSuffix ? 'sekundo' : 'sekundi';
  9134. }
  9135. else if (number === 2) {
  9136. result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';
  9137. }
  9138. else if (number < 5) {
  9139. result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';
  9140. }
  9141. else {
  9142. result += withoutSuffix || isFuture ? 'sekund' : 'sekund';
  9143. }
  9144. return result;
  9145. case 'm':
  9146. return withoutSuffix ? 'ena minuta' : 'eno minuto';
  9147. case 'mm':
  9148. if (number === 1) {
  9149. result += withoutSuffix ? 'minuta' : 'minuto';
  9150. }
  9151. else if (number === 2) {
  9152. result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
  9153. }
  9154. else if (number < 5) {
  9155. result += withoutSuffix || isFuture ? 'minute' : 'minutami';
  9156. }
  9157. else {
  9158. result += withoutSuffix || isFuture ? 'minut' : 'minutami';
  9159. }
  9160. return result;
  9161. case 'h':
  9162. return withoutSuffix ? 'ena ura' : 'eno uro';
  9163. case 'hh':
  9164. if (number === 1) {
  9165. result += withoutSuffix ? 'ura' : 'uro';
  9166. }
  9167. else if (number === 2) {
  9168. result += withoutSuffix || isFuture ? 'uri' : 'urama';
  9169. }
  9170. else if (number < 5) {
  9171. result += withoutSuffix || isFuture ? 'ure' : 'urami';
  9172. }
  9173. else {
  9174. result += withoutSuffix || isFuture ? 'ur' : 'urami';
  9175. }
  9176. return result;
  9177. case 'd':
  9178. return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
  9179. case 'dd':
  9180. if (number === 1) {
  9181. result += withoutSuffix || isFuture ? 'dan' : 'dnem';
  9182. }
  9183. else if (number === 2) {
  9184. result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
  9185. }
  9186. else {
  9187. result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
  9188. }
  9189. return result;
  9190. case 'M':
  9191. return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
  9192. case 'MM':
  9193. if (number === 1) {
  9194. result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
  9195. }
  9196. else if (number === 2) {
  9197. result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
  9198. }
  9199. else if (number < 5) {
  9200. result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
  9201. }
  9202. else {
  9203. result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
  9204. }
  9205. return result;
  9206. case 'y':
  9207. return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
  9208. case 'yy':
  9209. if (number === 1) {
  9210. result += withoutSuffix || isFuture ? 'leto' : 'letom';
  9211. }
  9212. else if (number === 2) {
  9213. result += withoutSuffix || isFuture ? 'leti' : 'letoma';
  9214. }
  9215. else if (number < 5) {
  9216. result += withoutSuffix || isFuture ? 'leta' : 'leti';
  9217. }
  9218. else {
  9219. result += withoutSuffix || isFuture ? 'let' : 'leti';
  9220. }
  9221. return result;
  9222. }
  9223. }
  9224. /** @type {?} */
  9225. var slLocale = {
  9226. abbr: 'sl',
  9227. months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'),
  9228. monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'),
  9229. monthsParseExact: true,
  9230. weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
  9231. weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
  9232. weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),
  9233. weekdaysParseExact: true,
  9234. longDateFormat: {
  9235. LT: 'H:mm',
  9236. LTS: 'H:mm:ss',
  9237. L: 'DD.MM.YYYY',
  9238. LL: 'D. MMMM YYYY',
  9239. LLL: 'D. MMMM YYYY H:mm',
  9240. LLLL: 'dddd, D. MMMM YYYY H:mm'
  9241. },
  9242. calendar: {
  9243. sameDay: '[danes ob] LT',
  9244. nextDay: '[jutri ob] LT',
  9245. nextWeek: /**
  9246. * @param {?} date
  9247. * @return {?}
  9248. */
  9249. function (date) {
  9250. switch (getDayOfWeek(date)) {
  9251. case 0:
  9252. return '[v] [nedeljo] [ob] LT';
  9253. case 3:
  9254. return '[v] [sredo] [ob] LT';
  9255. case 6:
  9256. return '[v] [soboto] [ob] LT';
  9257. case 1:
  9258. case 2:
  9259. case 4:
  9260. case 5:
  9261. return '[v] dddd [ob] LT';
  9262. }
  9263. },
  9264. lastDay: '[včeraj ob] LT',
  9265. lastWeek: /**
  9266. * @param {?} date
  9267. * @return {?}
  9268. */
  9269. function (date) {
  9270. switch (getDayOfWeek(date)) {
  9271. case 0:
  9272. return '[prejšnjo] [nedeljo] [ob] LT';
  9273. case 3:
  9274. return '[prejšnjo] [sredo] [ob] LT';
  9275. case 6:
  9276. return '[prejšnjo] [soboto] [ob] LT';
  9277. case 1:
  9278. case 2:
  9279. case 4:
  9280. case 5:
  9281. return '[prejšnji] dddd [ob] LT';
  9282. }
  9283. },
  9284. sameElse: 'L'
  9285. },
  9286. relativeTime: {
  9287. future: 'čez %s',
  9288. past: 'pred %s',
  9289. s: processRelativeTime$2,
  9290. ss: processRelativeTime$2,
  9291. m: processRelativeTime$2,
  9292. mm: processRelativeTime$2,
  9293. h: processRelativeTime$2,
  9294. hh: processRelativeTime$2,
  9295. d: processRelativeTime$2,
  9296. dd: processRelativeTime$2,
  9297. M: processRelativeTime$2,
  9298. MM: processRelativeTime$2,
  9299. y: processRelativeTime$2,
  9300. yy: processRelativeTime$2
  9301. },
  9302. dayOfMonthOrdinalParse: /\d{1,2}\./,
  9303. ordinal: '%d.',
  9304. week: {
  9305. dow: 1,
  9306. // Monday is the first day of the week.
  9307. doy: 7 // The week that contains Jan 1st is the first week of the year.
  9308. }
  9309. };
  9310. /**
  9311. * @fileoverview added by tsickle
  9312. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  9313. */
  9314. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  9315. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  9316. // tslint:disable:no-shadowed-variable switch-default prefer-const
  9317. // tslint:disable:one-variable-per-declaration newline-before-return
  9318. //! moment.js locale configuration
  9319. //! locale : Swedish [sv]
  9320. //! author : Jens Alm : https://github.com/ulmus
  9321. /** @type {?} */
  9322. var svLocale = {
  9323. abbr: 'sv',
  9324. months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'),
  9325. monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
  9326. weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
  9327. weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
  9328. weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
  9329. longDateFormat: {
  9330. LT: 'HH:mm',
  9331. LTS: 'HH:mm:ss',
  9332. L: 'YYYY-MM-DD',
  9333. LL: 'D MMMM YYYY',
  9334. LLL: 'D MMMM YYYY [kl.] HH:mm',
  9335. LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
  9336. lll: 'D MMM YYYY HH:mm',
  9337. llll: 'ddd D MMM YYYY HH:mm'
  9338. },
  9339. calendar: {
  9340. sameDay: '[Idag] LT',
  9341. nextDay: '[Imorgon] LT',
  9342. lastDay: '[Igår] LT',
  9343. nextWeek: '[På] dddd LT',
  9344. lastWeek: '[I] dddd[s] LT',
  9345. sameElse: 'L'
  9346. },
  9347. relativeTime: {
  9348. future: 'om %s',
  9349. past: 'för %s sedan',
  9350. s: 'några sekunder',
  9351. ss: '%d sekunder',
  9352. m: 'en minut',
  9353. mm: '%d minuter',
  9354. h: 'en timme',
  9355. hh: '%d timmar',
  9356. d: 'en dag',
  9357. dd: '%d dagar',
  9358. M: 'en månad',
  9359. MM: '%d månader',
  9360. y: 'ett år',
  9361. yy: '%d år'
  9362. },
  9363. dayOfMonthOrdinalParse: /\d{1,2}(e|a)/,
  9364. ordinal: /**
  9365. * @param {?} _num
  9366. * @return {?}
  9367. */
  9368. function (_num) {
  9369. /** @type {?} */
  9370. var num = Number(_num);
  9371. /** @type {?} */
  9372. var b = num % 10;
  9373. /** @type {?} */
  9374. var output = (~~(num % 100 / 10) === 1) ? 'e' :
  9375. (b === 1) ? 'a' :
  9376. (b === 2) ? 'a' :
  9377. (b === 3) ? 'e' : 'e';
  9378. return num + output;
  9379. },
  9380. week: {
  9381. dow: 1,
  9382. // Monday is the first day of the week.
  9383. doy: 4 // The week that contains Jan 4th is the first week of the year.
  9384. }
  9385. };
  9386. /**
  9387. * @fileoverview added by tsickle
  9388. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  9389. */
  9390. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  9391. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  9392. // tslint:disable:no-shadowed-variable switch-default prefer-const
  9393. // tslint:disable:one-variable-per-declaration newline-before-return
  9394. // moment.js locale configuration
  9395. // locale : Thai [th]
  9396. // author : Watcharapol Sanitwong : https://github.com/tumit
  9397. /** @type {?} */
  9398. var thLocale = {
  9399. abbr: 'th',
  9400. months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'),
  9401. monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'),
  9402. monthsParseExact: true,
  9403. weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
  9404. weekdaysShort: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
  9405. // yes, three characters difference
  9406. weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
  9407. weekdaysParseExact: true,
  9408. longDateFormat: {
  9409. LT: 'H:mm',
  9410. LTS: 'H:mm:ss',
  9411. L: 'DD/MM/YYYY',
  9412. LL: 'D MMMM YYYY',
  9413. LLL: 'D MMMM YYYY เวลา H:mm',
  9414. LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm'
  9415. },
  9416. meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
  9417. isPM: /**
  9418. * @param {?} input
  9419. * @return {?}
  9420. */
  9421. function (input) {
  9422. return input === 'หลังเที่ยง';
  9423. },
  9424. meridiem: /**
  9425. * @param {?} hour
  9426. * @param {?} minute
  9427. * @param {?} isLower
  9428. * @return {?}
  9429. */
  9430. function (hour, minute, isLower) {
  9431. if (hour < 12) {
  9432. return 'ก่อนเที่ยง';
  9433. }
  9434. else {
  9435. return 'หลังเที่ยง';
  9436. }
  9437. },
  9438. calendar: {
  9439. sameDay: '[วันนี้ เวลา] LT',
  9440. nextDay: '[พรุ่งนี้ เวลา] LT',
  9441. nextWeek: 'dddd[หน้า เวลา] LT',
  9442. lastDay: '[เมื่อวานนี้ เวลา] LT',
  9443. lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',
  9444. sameElse: 'L'
  9445. },
  9446. relativeTime: {
  9447. future: 'อีก %s',
  9448. past: '%sที่แล้ว',
  9449. s: 'ไม่กี่วินาที',
  9450. ss: '%d วินาที',
  9451. m: '1 นาที',
  9452. mm: '%d นาที',
  9453. h: '1 ชั่วโมง',
  9454. hh: '%d ชั่วโมง',
  9455. d: '1 วัน',
  9456. dd: '%d วัน',
  9457. M: '1 เดือน',
  9458. MM: '%d เดือน',
  9459. y: '1 ปี',
  9460. yy: '%d ปี'
  9461. }
  9462. };
  9463. /**
  9464. * @fileoverview added by tsickle
  9465. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  9466. */
  9467. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  9468. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  9469. // tslint:disable:no-shadowed-variable switch-default prefer-const
  9470. // tslint:disable:one-variable-per-declaration newline-before-return
  9471. //! moment.js locale configuration
  9472. //! locale : Turkish [tr]
  9473. //! authors : Erhan Gundogan : https://github.com/erhangundogan,
  9474. //! Burak Yiğit Kaya: https://github.com/BYK
  9475. /** @type {?} */
  9476. var suffixes = {
  9477. 1: '\'inci',
  9478. 5: '\'inci',
  9479. 8: '\'inci',
  9480. 70: '\'inci',
  9481. 80: '\'inci',
  9482. 2: '\'nci',
  9483. 7: '\'nci',
  9484. 20: '\'nci',
  9485. 50: '\'nci',
  9486. 3: '\'üncü',
  9487. 4: '\'üncü',
  9488. 100: '\'üncü',
  9489. 6: '\'ncı',
  9490. 9: '\'uncu',
  9491. 10: '\'uncu',
  9492. 30: '\'uncu',
  9493. 60: '\'ıncı',
  9494. 90: '\'ıncı'
  9495. };
  9496. /** @type {?} */
  9497. var trLocale = {
  9498. abbr: 'tr',
  9499. months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),
  9500. monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
  9501. weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),
  9502. weekdaysShort: 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),
  9503. weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
  9504. longDateFormat: {
  9505. LT: 'HH:mm',
  9506. LTS: 'HH:mm:ss',
  9507. L: 'DD.MM.YYYY',
  9508. LL: 'D MMMM YYYY',
  9509. LLL: 'D MMMM YYYY HH:mm',
  9510. LLLL: 'dddd, D MMMM YYYY HH:mm'
  9511. },
  9512. calendar: {
  9513. sameDay: '[bugün saat] LT',
  9514. nextDay: '[yarın saat] LT',
  9515. nextWeek: '[gelecek] dddd [saat] LT',
  9516. lastDay: '[dün] LT',
  9517. lastWeek: '[geçen] dddd [saat] LT',
  9518. sameElse: 'L'
  9519. },
  9520. relativeTime: {
  9521. future: '%s sonra',
  9522. past: '%s önce',
  9523. s: 'birkaç saniye',
  9524. ss: '%d saniye',
  9525. m: 'bir dakika',
  9526. mm: '%d dakika',
  9527. h: 'bir saat',
  9528. hh: '%d saat',
  9529. d: 'bir gün',
  9530. dd: '%d gün',
  9531. M: 'bir ay',
  9532. MM: '%d ay',
  9533. y: 'bir yıl',
  9534. yy: '%d yıl'
  9535. },
  9536. dayOfMonthOrdinalParse: /\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,
  9537. ordinal: /**
  9538. * @param {?} _num
  9539. * @return {?}
  9540. */
  9541. function (_num) {
  9542. /** @type {?} */
  9543. var num = Number(_num);
  9544. if (num === 0) { // special case for zero
  9545. return num + '\'ıncı';
  9546. }
  9547. /** @type {?} */
  9548. var a = num % 10;
  9549. /** @type {?} */
  9550. var b = num % 100 - a;
  9551. /** @type {?} */
  9552. var c = num >= 100 ? 100 : null;
  9553. return num + (suffixes[a] || suffixes[b] || suffixes[c]);
  9554. },
  9555. week: {
  9556. dow: 1,
  9557. // Monday is the first day of the week.
  9558. doy: 7 // The week that contains Jan 1st is the first week of the year.
  9559. }
  9560. };
  9561. /**
  9562. * @fileoverview added by tsickle
  9563. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  9564. */
  9565. //! moment.js locale configuration
  9566. //! locale : Ukrainian [uk]
  9567. //! author : zemlanin : https://github.com/zemlanin
  9568. //! Author : Menelion Elensúle : https://github.com/Oire
  9569. /**
  9570. * @param {?} word
  9571. * @param {?} num
  9572. * @return {?}
  9573. */
  9574. function plural$4(word, num) {
  9575. /** @type {?} */
  9576. var forms = word.split('_');
  9577. 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]);
  9578. }
  9579. /**
  9580. * @param {?} num
  9581. * @param {?} withoutSuffix
  9582. * @param {?} key
  9583. * @return {?}
  9584. */
  9585. function relativeTimeWithPlural$2(num, withoutSuffix, key) {
  9586. /** @type {?} */
  9587. var format = {
  9588. ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',
  9589. mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
  9590. hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
  9591. dd: 'день_дні_днів',
  9592. MM: 'місяць_місяці_місяців',
  9593. yy: 'рік_роки_років'
  9594. };
  9595. if (key === 'm') {
  9596. return withoutSuffix ? 'хвилина' : 'хвилину';
  9597. }
  9598. if (key === 'h') {
  9599. return withoutSuffix ? 'година' : 'годину';
  9600. }
  9601. return num + ' ' + plural$4(format[key], +num);
  9602. }
  9603. /**
  9604. * @param {?} date
  9605. * @param {?} format
  9606. * @param {?=} isUTC
  9607. * @return {?}
  9608. */
  9609. function weekdaysCaseReplace(date, format, isUTC) {
  9610. /** @type {?} */
  9611. var weekdays = {
  9612. nominative: 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),
  9613. accusative: 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),
  9614. genitive: 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')
  9615. };
  9616. if (!date) {
  9617. return weekdays.nominative;
  9618. }
  9619. /** @type {?} */
  9620. var nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ?
  9621. 'accusative' :
  9622. ((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ?
  9623. 'genitive' :
  9624. 'nominative');
  9625. return weekdays[nounCase][getDayOfWeek(date, isUTC)];
  9626. }
  9627. /**
  9628. * @param {?} str
  9629. * @return {?}
  9630. */
  9631. function processHoursFunction(str) {
  9632. return (/**
  9633. * @param {?} date
  9634. * @return {?}
  9635. */
  9636. function (date) {
  9637. return str + 'о' + (getHours(date) === 11 ? 'б' : '') + '] LT';
  9638. });
  9639. }
  9640. /** @type {?} */
  9641. var ukLocale = {
  9642. abbr: 'uk',
  9643. months: {
  9644. format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'),
  9645. standalone: 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_')
  9646. },
  9647. monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'),
  9648. weekdays: weekdaysCaseReplace,
  9649. weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  9650. weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  9651. longDateFormat: {
  9652. LT: 'HH:mm',
  9653. LTS: 'HH:mm:ss',
  9654. L: 'DD.MM.YYYY',
  9655. LL: 'D MMMM YYYY р.',
  9656. LLL: 'D MMMM YYYY р., HH:mm',
  9657. LLLL: 'dddd, D MMMM YYYY р., HH:mm'
  9658. },
  9659. calendar: {
  9660. sameDay: processHoursFunction('[Сьогодні '),
  9661. nextDay: processHoursFunction('[Завтра '),
  9662. lastDay: processHoursFunction('[Вчора '),
  9663. nextWeek: processHoursFunction('[У] dddd ['),
  9664. lastWeek: /**
  9665. * @param {?} date
  9666. * @return {?}
  9667. */
  9668. function (date) {
  9669. switch (getDayOfWeek(date)) {
  9670. case 0:
  9671. case 3:
  9672. case 5:
  9673. case 6:
  9674. return processHoursFunction('[Минулої] dddd [')(date);
  9675. case 1:
  9676. case 2:
  9677. case 4:
  9678. return processHoursFunction('[Минулого] dddd [')(date);
  9679. }
  9680. },
  9681. sameElse: 'L'
  9682. },
  9683. relativeTime: {
  9684. future: 'за %s',
  9685. past: '%s тому',
  9686. s: 'декілька секунд',
  9687. ss: relativeTimeWithPlural$2,
  9688. m: relativeTimeWithPlural$2,
  9689. mm: relativeTimeWithPlural$2,
  9690. h: 'годину',
  9691. hh: relativeTimeWithPlural$2,
  9692. d: 'день',
  9693. dd: relativeTimeWithPlural$2,
  9694. M: 'місяць',
  9695. MM: relativeTimeWithPlural$2,
  9696. y: 'рік',
  9697. yy: relativeTimeWithPlural$2
  9698. },
  9699. // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
  9700. meridiemParse: /ночі|ранку|дня|вечора/,
  9701. isPM: /**
  9702. * @param {?} input
  9703. * @return {?}
  9704. */
  9705. function (input) {
  9706. return /^(дня|вечора)$/.test(input);
  9707. },
  9708. meridiem: /**
  9709. * @param {?} hour
  9710. * @param {?} minute
  9711. * @param {?} isLower
  9712. * @return {?}
  9713. */
  9714. function (hour, minute, isLower) {
  9715. if (hour < 4) {
  9716. return 'ночі';
  9717. }
  9718. else if (hour < 12) {
  9719. return 'ранку';
  9720. }
  9721. else if (hour < 17) {
  9722. return 'дня';
  9723. }
  9724. else {
  9725. return 'вечора';
  9726. }
  9727. },
  9728. dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
  9729. ordinal: /**
  9730. * @param {?} _num
  9731. * @param {?} period
  9732. * @return {?}
  9733. */
  9734. function (_num, period) {
  9735. /** @type {?} */
  9736. var num = Number(_num);
  9737. switch (period) {
  9738. case 'M':
  9739. case 'd':
  9740. case 'DDD':
  9741. case 'w':
  9742. case 'W':
  9743. return num + '-й';
  9744. case 'D':
  9745. return num + '-го';
  9746. default:
  9747. return num.toString();
  9748. }
  9749. },
  9750. week: {
  9751. dow: 1,
  9752. // Monday is the first day of the week.
  9753. doy: 7 // The week that contains Jan 1st is the first week of the year.
  9754. }
  9755. };
  9756. /**
  9757. * @fileoverview added by tsickle
  9758. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  9759. */
  9760. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  9761. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  9762. // tslint:disable:no-shadowed-variable switch-default prefer-const
  9763. // tslint:disable:one-variable-per-declaration newline-before-return
  9764. //! moment.js locale configuration
  9765. //! locale : Việt Nam [vi]
  9766. //! author : Chris Gedrim : https://github.com/chrisgedrim
  9767. /** @type {?} */
  9768. var viLocale = {
  9769. abbr: 'vi',
  9770. 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('_'),
  9771. monthsShort: 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'),
  9772. monthsParseExact: true,
  9773. weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'),
  9774. weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
  9775. weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
  9776. weekdaysParseExact: true,
  9777. meridiemParse: /sa|ch/i,
  9778. isPM: /**
  9779. * @param {?} input
  9780. * @return {?}
  9781. */
  9782. function (input) {
  9783. return /^ch$/i.test(input);
  9784. },
  9785. meridiem: /**
  9786. * @param {?} hours
  9787. * @param {?} minutes
  9788. * @param {?} isLower
  9789. * @return {?}
  9790. */
  9791. function (hours, minutes, isLower) {
  9792. if (hours < 12) {
  9793. return isLower ? 'sa' : 'SA';
  9794. }
  9795. else {
  9796. return isLower ? 'ch' : 'CH';
  9797. }
  9798. },
  9799. longDateFormat: {
  9800. LT: 'HH:mm',
  9801. LTS: 'HH:mm:ss',
  9802. L: 'DD/MM/YYYY',
  9803. LL: 'D MMMM [năm] YYYY',
  9804. LLL: 'D MMMM [năm] YYYY HH:mm',
  9805. LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',
  9806. l: 'DD/M/YYYY',
  9807. ll: 'D MMM YYYY',
  9808. lll: 'D MMM YYYY HH:mm',
  9809. llll: 'ddd, D MMM YYYY HH:mm'
  9810. },
  9811. calendar: {
  9812. sameDay: '[Hôm nay lúc] LT',
  9813. nextDay: '[Ngày mai lúc] LT',
  9814. nextWeek: 'dddd [tuần tới lúc] LT',
  9815. lastDay: '[Hôm qua lúc] LT',
  9816. lastWeek: 'dddd [tuần trước lúc] LT',
  9817. sameElse: 'L'
  9818. },
  9819. relativeTime: {
  9820. future: '%s tới',
  9821. past: '%s trước',
  9822. s: 'vài giây',
  9823. ss: '%d giây',
  9824. m: 'một phút',
  9825. mm: '%d phút',
  9826. h: 'một giờ',
  9827. hh: '%d giờ',
  9828. d: 'một ngày',
  9829. dd: '%d ngày',
  9830. M: 'một tháng',
  9831. MM: '%d tháng',
  9832. y: 'một năm',
  9833. yy: '%d năm'
  9834. },
  9835. dayOfMonthOrdinalParse: /\d{1,2}/,
  9836. ordinal: /**
  9837. * @param {?} _num
  9838. * @return {?}
  9839. */
  9840. function (_num) {
  9841. return '' + _num;
  9842. },
  9843. week: {
  9844. dow: 1,
  9845. // Thứ Hai là ngày đầu tuần.
  9846. doy: 4 // Tuần chứa ngày 4 tháng 1 là tuần đầu tiên trong năm.
  9847. }
  9848. };
  9849. /**
  9850. * @fileoverview added by tsickle
  9851. * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
  9852. */
  9853. // tslint:disable:comment-format binary-expression-operand-order max-line-length
  9854. // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
  9855. // tslint:disable:no-shadowed-variable switch-default prefer-const
  9856. // tslint:disable:one-variable-per-declaration newline-before-return
  9857. // tslint:disable:no-parameter-reassignment prefer-switch
  9858. //! moment.js locale configuration
  9859. //! locale : Chinese (China) [zh-cn]
  9860. //! author : suupic : https://github.com/suupic
  9861. //! author : Zeno Zeng : https://github.com/zenozeng
  9862. /** @type {?} */
  9863. var zhCnLocale = {
  9864. abbr: 'zh-cn',
  9865. months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
  9866. monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  9867. weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  9868. weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
  9869. weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
  9870. longDateFormat: {
  9871. LT: 'HH:mm',
  9872. LTS: 'HH:mm:ss',
  9873. L: 'YYYY/MM/DD',
  9874. LL: 'YYYY年M月D日',
  9875. LLL: 'YYYY年M月D日Ah点mm分',
  9876. LLLL: 'YYYY年M月D日ddddAh点mm分',
  9877. l: 'YYYY/M/D',
  9878. ll: 'YYYY年M月D日',
  9879. lll: 'YYYY年M月D日 HH:mm',
  9880. llll: 'YYYY年M月D日dddd HH:mm'
  9881. },
  9882. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  9883. meridiemHour: /**
  9884. * @param {?} hour
  9885. * @param {?} meridiem
  9886. * @return {?}
  9887. */
  9888. function (hour, meridiem) {
  9889. if (hour === 12) {
  9890. hour = 0;
  9891. }
  9892. if (meridiem === '凌晨' || meridiem === '早上' ||
  9893. meridiem === '上午') {
  9894. return hour;
  9895. }
  9896. else if (meridiem === '下午' || meridiem === '晚上') {
  9897. return hour + 12;
  9898. }
  9899. else {
  9900. // '中午'
  9901. return hour >= 11 ? hour : hour + 12;
  9902. }
  9903. },
  9904. meridiem: /**
  9905. * @param {?} hour
  9906. * @param {?} minute
  9907. * @param {?} isLower
  9908. * @return {?}
  9909. */
  9910. function (hour, minute, isLower) {
  9911. /** @type {?} */
  9912. var hm = hour * 100 + minute;
  9913. if (hm < 600) {
  9914. return '凌晨';
  9915. }
  9916. else if (hm < 900) {
  9917. return '早上';
  9918. }
  9919. else if (hm < 1130) {
  9920. return '上午';
  9921. }
  9922. else if (hm < 1230) {
  9923. return '中午';
  9924. }
  9925. else if (hm < 1800) {
  9926. return '下午';
  9927. }
  9928. else {
  9929. return '晚上';
  9930. }
  9931. },
  9932. calendar: {
  9933. sameDay: '[今天]LT',
  9934. nextDay: '[明天]LT',
  9935. nextWeek: '[下]ddddLT',
  9936. lastDay: '[昨天]LT',
  9937. lastWeek: '[上]ddddLT',
  9938. sameElse: 'L'
  9939. },
  9940. dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
  9941. ordinal: /**
  9942. * @param {?} _num
  9943. * @param {?} period
  9944. * @return {?}
  9945. */
  9946. function (_num, period) {
  9947. /** @type {?} */
  9948. var num = Number(_num);
  9949. switch (period) {
  9950. case 'd':
  9951. case 'D':
  9952. case 'DDD':
  9953. return num + '日';
  9954. case 'M':
  9955. return num + '月';
  9956. case 'w':
  9957. case 'W':
  9958. return num + '周';
  9959. default:
  9960. return num.toString();
  9961. }
  9962. },
  9963. relativeTime: {
  9964. future: '%s内',
  9965. past: '%s前',
  9966. s: '几秒',
  9967. ss: '%d 秒',
  9968. m: '1 分钟',
  9969. mm: '%d 分钟',
  9970. h: '1 小时',
  9971. hh: '%d 小时',
  9972. d: '1 天',
  9973. dd: '%d 天',
  9974. M: '1 个月',
  9975. MM: '%d 个月',
  9976. y: '1 年',
  9977. yy: '%d 年'
  9978. },
  9979. week: {
  9980. // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
  9981. dow: 1,
  9982. // Monday is the first day of the week.
  9983. doy: 4 // The week that contains Jan 4th is the first week of the year.
  9984. }
  9985. };
  9986. export { add, arLocale, bgLocale, caLocale, csLocale, daLocale, deLocale, defineLocale, enGbLocale, endOf, esDoLocale, esLocale, esUsLocale, etLocale, fiLocale, formatDate, frLocale, getDay, getFirstDayOfMonth, getFullYear, getLocale, getMonth, getSetGlobalLocale, glLocale, heLocale, hiLocale, hrLocale, huLocale, idLocale, isAfter, isArray, isBefore, isDate, isDateValid, isDisabledDay, isFirstDayOfWeek, isSame, isSameDay, isSameMonth, isSameYear, itLocale, jaLocale, koLocale, listLocales, ltLocale, lvLocale, mnLocale, nbLocale, nlBeLocale, nlLocale, parseDate, plLocale, ptBrLocale, roLocale, ruLocale, setFullDate, shiftDate, skLocale, slLocale, startOf, subtract, svLocale, thLocale, trLocale, ukLocale, updateLocale, utcAsLocal, viLocale, zhCnLocale, createDate as ɵa };
  9987. //# sourceMappingURL=ngx-bootstrap-chronos.js.map