| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863 |
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} n
- * @param {?} x
- * @return {?}
- */
- function mod(n, x) {
- return (n % x + x) % x;
- }
- /**
- * @param {?} num
- * @return {?}
- */
- function absFloor(num) {
- return num < 0 ? Math.ceil(num) || 0 : Math.floor(num);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} str
- * @return {?}
- */
- function isString(str) {
- return typeof str === 'string';
- }
- /**
- * @param {?} value
- * @return {?}
- */
- function isDate(value) {
- return value instanceof Date || Object.prototype.toString.call(value) === '[object Date]';
- }
- /**
- * @param {?} date
- * @return {?}
- */
- function isDateValid(date) {
- return date && date.getTime && !isNaN(date.getTime());
- }
- /**
- * @param {?} fn
- * @return {?}
- */
- function isFunction(fn) {
- return (fn instanceof Function ||
- Object.prototype.toString.call(fn) === '[object Function]');
- }
- /**
- * @param {?=} value
- * @return {?}
- */
- function isNumber(value) {
- return typeof value === 'number' || Object.prototype.toString.call(value) === '[object Number]';
- }
- /**
- * @template T
- * @param {?=} input
- * @return {?}
- */
- function isArray(input) {
- return (input instanceof Array ||
- Object.prototype.toString.call(input) === '[object Array]');
- }
- /**
- * @template T
- * @param {?} a
- * @param {?} b
- * @return {?}
- */
- function hasOwnProp(a /*object*/, b) {
- return Object.prototype.hasOwnProperty.call(a, b);
- }
- /**
- * @template T
- * @param {?} input
- * @return {?}
- */
- function isObject(input /*object*/) {
- // IE8 will treat undefined and null as object if it wasn't for
- // input != null
- return (input != null && Object.prototype.toString.call(input) === '[object Object]');
- }
- /**
- * @param {?} obj
- * @return {?}
- */
- function isObjectEmpty(obj) {
- if (Object.getOwnPropertyNames) {
- return (Object.getOwnPropertyNames(obj).length === 0);
- }
- /** @type {?} */
- let k;
- for (k in obj) {
- if (obj.hasOwnProperty(k)) {
- return false;
- }
- }
- return true;
- }
- /**
- * @param {?} input
- * @return {?}
- */
- function isUndefined(input) {
- return input === void 0;
- }
- /**
- * @template T
- * @param {?} argumentForCoercion
- * @return {?}
- */
- function toInt(argumentForCoercion) {
- /** @type {?} */
- const coercedNumber = +argumentForCoercion;
- /** @type {?} */
- let value = 0;
- if (coercedNumber !== 0 && isFinite(coercedNumber)) {
- value = absFloor(coercedNumber);
- }
- return value;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- const aliases = {};
- /** @type {?} */
- const _mapUnits = {
- date: 'day',
- hour: 'hours',
- minute: 'minutes',
- second: 'seconds',
- millisecond: 'milliseconds'
- };
- /**
- * @param {?} unit
- * @param {?} shorthand
- * @return {?}
- */
- function addUnitAlias(unit, shorthand) {
- /** @type {?} */
- const lowerCase = unit.toLowerCase();
- /** @type {?} */
- let _unit = unit;
- if (lowerCase in _mapUnits) {
- _unit = _mapUnits[lowerCase];
- }
- aliases[lowerCase] = aliases[`${lowerCase}s`] = aliases[shorthand] = _unit;
- }
- /**
- * @param {?} units
- * @return {?}
- */
- function normalizeUnits(units) {
- return isString(units) ? aliases[units] || aliases[units.toLowerCase()] : undefined;
- }
- /**
- * @param {?} inputObject
- * @return {?}
- */
- function normalizeObjectUnits(inputObject) {
- /** @type {?} */
- const normalizedInput = {};
- /** @type {?} */
- let normalizedProp;
- /** @type {?} */
- let prop;
- for (prop in inputObject) {
- if (hasOwnProp(inputObject, prop)) {
- normalizedProp = normalizeUnits(prop);
- if (normalizedProp) {
- normalizedInput[normalizedProp] = inputObject[prop];
- }
- }
- }
- return (/** @type {?} */ (normalizedInput));
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // place in new Date([array])
- /** @type {?} */
- const YEAR = 0;
- /** @type {?} */
- const MONTH = 1;
- /** @type {?} */
- const DATE = 2;
- /** @type {?} */
- const HOUR = 3;
- /** @type {?} */
- const MINUTE = 4;
- /** @type {?} */
- const SECOND = 5;
- /** @type {?} */
- const MILLISECOND = 6;
- /** @type {?} */
- const WEEK = 7;
- /** @type {?} */
- const WEEKDAY = 8;
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} num
- * @param {?} targetLength
- * @param {?=} forceSign
- * @return {?}
- */
- function zeroFill(num, targetLength, forceSign) {
- /** @type {?} */
- const absNumber = `${Math.abs(num)}`;
- /** @type {?} */
- const zerosToFill = targetLength - absNumber.length;
- /** @type {?} */
- const sign = num >= 0;
- /** @type {?} */
- const _sign = sign ? (forceSign ? '+' : '') : '-';
- // todo: this is crazy slow
- /** @type {?} */
- const _zeros = Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1);
- return (_sign + _zeros + absNumber);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- let formatFunctions = {};
- /** @type {?} */
- let formatTokenFunctions = {};
- // tslint:disable-next-line
- /** @type {?} */
- const 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;
- // token: 'M'
- // padded: ['MM', 2]
- // ordinal: 'Mo'
- // callback: function () { this.month() + 1 }
- /**
- * @param {?} token
- * @param {?} padded
- * @param {?} ordinal
- * @param {?} callback
- * @return {?}
- */
- function addFormatToken(token, padded, ordinal, callback) {
- if (token) {
- formatTokenFunctions[token] = callback;
- }
- if (padded) {
- formatTokenFunctions[padded[0]] = (/**
- * @return {?}
- */
- function () {
- return zeroFill(callback.apply(null, arguments), padded[1], padded[2]);
- });
- }
- if (ordinal) {
- formatTokenFunctions[ordinal] = (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return opts.locale.ordinal(callback.apply(null, arguments), token);
- });
- }
- }
- /**
- * @param {?} format
- * @return {?}
- */
- function makeFormatFunction(format) {
- /** @type {?} */
- const array = format.match(formattingTokens);
- /** @type {?} */
- const length = array.length;
- /** @type {?} */
- const formatArr = new Array(length);
- for (let i = 0; i < length; i++) {
- formatArr[i] = formatTokenFunctions[array[i]]
- ? formatTokenFunctions[array[i]]
- : removeFormattingTokens(array[i]);
- }
- return (/**
- * @param {?} date
- * @param {?} locale
- * @param {?} isUTC
- * @param {?=} offset
- * @return {?}
- */
- function (date, locale, isUTC, offset = 0) {
- /** @type {?} */
- let output = '';
- for (let j = 0; j < length; j++) {
- output += isFunction(formatArr[j])
- ? ((/** @type {?} */ (formatArr[j]))).call(null, date, { format, locale, isUTC, offset })
- : formatArr[j];
- }
- return output;
- });
- }
- /**
- * @param {?} input
- * @return {?}
- */
- function removeFormattingTokens(input) {
- if (input.match(/\[[\s\S]/)) {
- return input.replace(/^\[|\]$/g, '');
- }
- return input.replace(/\\/g, '');
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?=} y
- * @param {?=} m
- * @param {?=} d
- * @return {?}
- */
- function createUTCDate(y, m, d) {
- /** @type {?} */
- const date = new Date(Date.UTC.apply(null, arguments));
- // the Date.UTC function remaps years 0-99 to 1900-1999
- if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
- date.setUTCFullYear(y);
- }
- return date;
- }
- /**
- * @param {?=} y
- * @param {?=} m
- * @param {?=} d
- * @param {?=} h
- * @param {?=} M
- * @param {?=} s
- * @param {?=} ms
- * @return {?}
- */
- function createDate(y, m = 0, d = 1, h = 0, M = 0, s = 0, ms = 0) {
- /** @type {?} */
- const date = new Date(y, m, d, h, M, s, ms);
- // the date constructor remaps years 0-99 to 1900-1999
- if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
- date.setFullYear(y);
- }
- return date;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getHours(date, isUTC = false) {
- return isUTC ? date.getUTCHours() : date.getHours();
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getMinutes(date, isUTC = false) {
- return isUTC ? date.getUTCMinutes() : date.getMinutes();
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getSeconds(date, isUTC = false) {
- return isUTC ? date.getUTCSeconds() : date.getSeconds();
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getMilliseconds(date, isUTC = false) {
- return isUTC ? date.getUTCMilliseconds() : date.getMilliseconds();
- }
- /**
- * @param {?} date
- * @return {?}
- */
- function getTime(date) {
- return date.getTime();
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getDay(date, isUTC = false) {
- return isUTC ? date.getUTCDay() : date.getDay();
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getDate(date, isUTC = false) {
- return isUTC ? date.getUTCDate() : date.getDate();
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getMonth(date, isUTC = false) {
- return isUTC ? date.getUTCMonth() : date.getMonth();
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getFullYear(date, isUTC = false) {
- return isUTC ? date.getUTCFullYear() : date.getFullYear();
- }
- /**
- * @param {?} date
- * @return {?}
- */
- function unix(date) {
- return Math.floor(date.valueOf() / 1000);
- }
- /**
- * @param {?} date
- * @return {?}
- */
- function getFirstDayOfMonth(date) {
- return createDate(date.getFullYear(), date.getMonth(), 1, date.getHours(), date.getMinutes(), date.getSeconds());
- }
- /**
- * @param {?} date
- * @param {?} firstDayOfWeek
- * @return {?}
- */
- function isFirstDayOfWeek(date, firstDayOfWeek) {
- return date.getDay() === firstDayOfWeek;
- }
- /**
- * @param {?} date1
- * @param {?} date2
- * @return {?}
- */
- function isSameMonth(date1, date2) {
- if (!date1 || !date2) {
- return false;
- }
- return isSameYear(date1, date2) && getMonth(date1) === getMonth(date2);
- }
- /**
- * @param {?} date1
- * @param {?} date2
- * @return {?}
- */
- function isSameYear(date1, date2) {
- if (!date1 || !date2) {
- return false;
- }
- return getFullYear(date1) === getFullYear(date2);
- }
- /**
- * @param {?} date1
- * @param {?} date2
- * @return {?}
- */
- function isSameDay(date1, date2) {
- if (!date1 || !date2) {
- return false;
- }
- return (isSameYear(date1, date2) &&
- isSameMonth(date1, date2) &&
- getDate(date1) === getDate(date2));
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- const match1 = /\d/;
- // 0 - 9
- /** @type {?} */
- const match2 = /\d\d/;
- // 00 - 99
- /** @type {?} */
- const match3 = /\d{3}/;
- // 000 - 999
- /** @type {?} */
- const match4 = /\d{4}/;
- // 0000 - 9999
- /** @type {?} */
- const match6 = /[+-]?\d{6}/;
- // -999999 - 999999
- /** @type {?} */
- const match1to2 = /\d\d?/;
- // 0 - 99
- /** @type {?} */
- const match3to4 = /\d\d\d\d?/;
- // 999 - 9999
- /** @type {?} */
- const match5to6 = /\d\d\d\d\d\d?/;
- // 99999 - 999999
- /** @type {?} */
- const match1to3 = /\d{1,3}/;
- // 0 - 999
- /** @type {?} */
- const match1to4 = /\d{1,4}/;
- // 0 - 9999
- /** @type {?} */
- const match1to6 = /[+-]?\d{1,6}/;
- // -999999 - 999999
- /** @type {?} */
- const matchUnsigned = /\d+/;
- // 0 - inf
- /** @type {?} */
- const matchSigned = /[+-]?\d+/;
- // +00:00 -00:00 +0000 -0000 or Z
- /** @type {?} */
- const matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi;
- // +00 -00 +00:00 -00:00 +0000 -0000 or Z
- /** @type {?} */
- const matchTimestamp = /[+-]?\d+(\.\d{1,3})?/;
- // 123456789 123456789.123
- // any word (or two) characters or numbers including two/three word month in arabic.
- // includes scottish gaelic two word and hyphenated months
- // tslint:disable-next-line
- /** @type {?} */
- const 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;
- /** @type {?} */
- const regexes = {};
- /**
- * @param {?} token
- * @param {?} regex
- * @param {?=} strictRegex
- * @return {?}
- */
- function addRegexToken(token, regex, strictRegex) {
- if (isFunction(regex)) {
- regexes[token] = regex;
- return;
- }
- regexes[token] = (/**
- * @param {?} isStrict
- * @param {?} locale
- * @return {?}
- */
- function (isStrict, locale) {
- return (isStrict && strictRegex) ? strictRegex : regex;
- });
- }
- /**
- * @param {?} token
- * @param {?} locale
- * @return {?}
- */
- function getParseRegexForToken(token, locale) {
- /** @type {?} */
- const _strict = false;
- if (!hasOwnProp(regexes, token)) {
- return new RegExp(unescapeFormat(token));
- }
- return regexes[token](_strict, locale);
- }
- // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
- /**
- * @param {?} str
- * @return {?}
- */
- function unescapeFormat(str) {
- // tslint:disable-next-line
- return regexEscape(str
- .replace('\\', '')
- .replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, (/**
- * @param {?} matched
- * @param {?} p1
- * @param {?} p2
- * @param {?} p3
- * @param {?} p4
- * @return {?}
- */
- (matched, p1, p2, p3, p4) => p1 || p2 || p3 || p4)));
- }
- /**
- * @param {?} str
- * @return {?}
- */
- function regexEscape(str) {
- return str.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- const tokens = {};
- /**
- * @param {?} token
- * @param {?} callback
- * @return {?}
- */
- function addParseToken(token, callback) {
- /** @type {?} */
- const _token = isString(token) ? [token] : token;
- /** @type {?} */
- let func = callback;
- if (isNumber(callback)) {
- func = (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- array[callback] = toInt(input);
- return config;
- });
- }
- if (isArray(_token) && isFunction(func)) {
- /** @type {?} */
- let i;
- for (i = 0; i < _token.length; i++) {
- tokens[_token[i]] = func;
- }
- }
- }
- /**
- * @param {?} token
- * @param {?} callback
- * @return {?}
- */
- function addWeekParseToken(token, callback) {
- addParseToken(token, (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @param {?} _token
- * @return {?}
- */
- function (input, array, config, _token) {
- config._w = config._w || {};
- return callback(input, config._w, config, _token);
- }));
- }
- /**
- * @param {?} token
- * @param {?} input
- * @param {?} config
- * @return {?}
- */
- function addTimeToArrayFromToken(token, input, config) {
- if (input != null && hasOwnProp(tokens, token)) {
- tokens[token](input, config._a, config, token);
- }
- return config;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @return {?}
- */
- function initDayOfMonth() {
- // FORMATTING
- addFormatToken('D', ['DD', 2, false], 'Do', (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return getDate(date, opts.isUTC)
- .toString(10);
- }));
- // ALIASES
- addUnitAlias('date', 'D');
- // PARSING
- addRegexToken('D', match1to2);
- addRegexToken('DD', match1to2, match2);
- addRegexToken('Do', (/**
- * @param {?} isStrict
- * @param {?} locale
- * @return {?}
- */
- function (isStrict, locale) {
- return locale._dayOfMonthOrdinalParse || locale._ordinalParse;
- }));
- addParseToken(['D', 'DD'], DATE);
- addParseToken('Do', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- array[DATE] = toInt(input.match(match1to2)[0]);
- return config;
- }));
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @return {?}
- */
- function defaultParsingFlags() {
- // We need to deep clone this object.
- return {
- empty: false,
- unusedTokens: [],
- unusedInput: [],
- overflow: -2,
- charsLeftOver: 0,
- nullInput: false,
- invalidMonth: null,
- invalidFormat: false,
- userInvalidated: false,
- iso: false,
- parsedDateParts: [],
- meridiem: null,
- rfc2822: false,
- weekdayMismatch: false
- };
- }
- /**
- * @param {?} config
- * @return {?}
- */
- function getParsingFlags(config) {
- if (config._pf == null) {
- config._pf = defaultParsingFlags();
- }
- return config._pf;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // FORMATTING
- /**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function getYear(date, opts) {
- return getFullYear(date, opts.isUTC).toString();
- }
- /**
- * @return {?}
- */
- function initYear() {
- addFormatToken('Y', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- /** @type {?} */
- const y = getFullYear(date, opts.isUTC);
- return y <= 9999 ? y.toString(10) : `+${y}`;
- }));
- addFormatToken(null, ['YY', 2, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (getFullYear(date, opts.isUTC) % 100).toString(10);
- }));
- addFormatToken(null, ['YYYY', 4, false], null, getYear);
- addFormatToken(null, ['YYYYY', 5, false], null, getYear);
- addFormatToken(null, ['YYYYYY', 6, true], null, getYear);
- // ALIASES
- addUnitAlias('year', 'y');
- // PARSING
- addRegexToken('Y', matchSigned);
- addRegexToken('YY', match1to2, match2);
- addRegexToken('YYYY', match1to4, match4);
- addRegexToken('YYYYY', match1to6, match6);
- addRegexToken('YYYYYY', match1to6, match6);
- addParseToken(['YYYYY', 'YYYYYY'], YEAR);
- addParseToken('YYYY', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- array[YEAR] = input.length === 2 ? parseTwoDigitYear(input) : toInt(input);
- return config;
- }));
- addParseToken('YY', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- array[YEAR] = parseTwoDigitYear(input);
- return config;
- }));
- addParseToken('Y', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- array[YEAR] = parseInt(input, 10);
- return config;
- }));
- }
- /**
- * @param {?} input
- * @return {?}
- */
- function parseTwoDigitYear(input) {
- return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
- }
- /**
- * @param {?} year
- * @return {?}
- */
- function daysInYear(year) {
- return isLeapYear(year) ? 366 : 365;
- }
- /**
- * @param {?} year
- * @return {?}
- */
- function isLeapYear(year) {
- return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // todo: this is duplicate, source in date-getters.ts
- /**
- * @param {?} year
- * @param {?} month
- * @return {?}
- */
- function daysInMonth(year, month) {
- if (isNaN(year) || isNaN(month)) {
- return NaN;
- }
- /** @type {?} */
- const modMonth = mod(month, 12);
- /** @type {?} */
- const _year = year + (month - modMonth) / 12;
- return modMonth === 1
- ? isLeapYear(_year) ? 29 : 28
- : (31 - modMonth % 7 % 2);
- }
- /**
- * @return {?}
- */
- function initMonth() {
- // FORMATTING
- addFormatToken('M', ['MM', 2, false], 'Mo', (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (getMonth(date, opts.isUTC) + 1).toString(10);
- }));
- addFormatToken('MMM', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return opts.locale.monthsShort(date, opts.format, opts.isUTC);
- }));
- addFormatToken('MMMM', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return opts.locale.months(date, opts.format, opts.isUTC);
- }));
- // ALIASES
- addUnitAlias('month', 'M');
- // PARSING
- addRegexToken('M', match1to2);
- addRegexToken('MM', match1to2, match2);
- addRegexToken('MMM', (/**
- * @param {?} isStrict
- * @param {?} locale
- * @return {?}
- */
- function (isStrict, locale) {
- return locale.monthsShortRegex(isStrict);
- }));
- addRegexToken('MMMM', (/**
- * @param {?} isStrict
- * @param {?} locale
- * @return {?}
- */
- function (isStrict, locale) {
- return locale.monthsRegex(isStrict);
- }));
- addParseToken(['M', 'MM'], (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- array[MONTH] = toInt(input) - 1;
- return config;
- }));
- addParseToken(['MMM', 'MMMM'], (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @param {?} token
- * @return {?}
- */
- function (input, array, config, token) {
- /** @type {?} */
- const month = config._locale.monthsParse(input, token, config._strict);
- // if we didn't find a month name, mark the date as invalid.
- if (month != null) {
- array[MONTH] = month;
- }
- else {
- getParsingFlags(config).invalidMonth = !!input;
- }
- return config;
- }));
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- const defaultTimeUnit = {
- year: 0,
- month: 0,
- day: 0,
- hour: 0,
- minute: 0,
- seconds: 0
- };
- /**
- * @param {?} date
- * @param {?} unit
- * @return {?}
- */
- function shiftDate(date, unit) {
- /** @type {?} */
- const _unit = Object.assign({}, defaultTimeUnit, unit);
- /** @type {?} */
- const year = date.getFullYear() + (_unit.year || 0);
- /** @type {?} */
- const month = date.getMonth() + (_unit.month || 0);
- /** @type {?} */
- let day = date.getDate() + (_unit.day || 0);
- if (_unit.month && !_unit.day) {
- day = Math.min(day, daysInMonth(year, month));
- }
- return createDate(year, month, day, date.getHours() + (_unit.hour || 0), date.getMinutes() + (_unit.minute || 0), date.getSeconds() + (_unit.seconds || 0));
- }
- /**
- * @param {?} date
- * @param {?} unit
- * @return {?}
- */
- function setFullDate(date, unit) {
- 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)
- getNum(date.getHours(), unit.hour), getNum(date.getMinutes(), unit.minute), getNum(date.getSeconds(), unit.seconds), getNum(date.getMilliseconds(), unit.milliseconds));
- }
- /**
- * @param {?} def
- * @param {?=} num
- * @return {?}
- */
- function getNum(def, num) {
- return isNumber(num) ? num : def;
- }
- /**
- * @param {?} date
- * @param {?} value
- * @param {?=} isUTC
- * @return {?}
- */
- function setMonth(date, value, isUTC) {
- /** @type {?} */
- const dayOfMonth = Math.min(getDate(date), daysInMonth(getFullYear(date), value));
- isUTC ? date.setUTCMonth(value, dayOfMonth) : date.setMonth(value, dayOfMonth);
- return date;
- }
- /**
- * @param {?} date
- * @param {?} value
- * @param {?=} isUTC
- * @return {?}
- */
- function setHours(date, value, isUTC) {
- isUTC ? date.setUTCHours(value) : date.setHours(value);
- return date;
- }
- /**
- * @param {?} date
- * @param {?} value
- * @param {?=} isUTC
- * @return {?}
- */
- function setMinutes(date, value, isUTC) {
- isUTC ? date.setUTCMinutes(value) : date.setMinutes(value);
- return date;
- }
- /**
- * @param {?} date
- * @param {?} value
- * @param {?=} isUTC
- * @return {?}
- */
- function setSeconds(date, value, isUTC) {
- isUTC ? date.setUTCSeconds(value) : date.setSeconds(value);
- return date;
- }
- /**
- * @param {?} date
- * @param {?} value
- * @param {?=} isUTC
- * @return {?}
- */
- function setMilliseconds(date, value, isUTC) {
- isUTC ? date.setUTCMilliseconds(value) : date.setMilliseconds(value);
- return date;
- }
- /**
- * @param {?} date
- * @param {?} value
- * @param {?=} isUTC
- * @return {?}
- */
- function setDate(date, value, isUTC) {
- isUTC ? date.setUTCDate(value) : date.setDate(value);
- return date;
- }
- /**
- * @param {?} date
- * @param {?} value
- * @return {?}
- */
- function setTime(date, value) {
- date.setTime(value);
- return date;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // fastest way to clone date
- // https://jsperf.com/clone-date-object2
- /**
- * @param {?} date
- * @return {?}
- */
- function cloneDate(date) {
- return new Date(date.getTime());
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} date
- * @param {?} unit
- * @param {?=} isUTC
- * @return {?}
- */
- function startOf(date, unit, isUTC) {
- /** @type {?} */
- const _date = cloneDate(date);
- // the following switch intentionally omits break keywords
- // to utilize falling through the cases.
- switch (unit) {
- case 'year':
- setMonth(_date, 0, isUTC);
- /* falls through */
- case 'quarter':
- case 'month':
- setDate(_date, 1, isUTC);
- /* falls through */
- case 'week':
- case 'isoWeek':
- case 'day':
- case 'date':
- setHours(_date, 0, isUTC);
- /* falls through */
- case 'hours':
- setMinutes(_date, 0, isUTC);
- /* falls through */
- case 'minutes':
- setSeconds(_date, 0, isUTC);
- /* falls through */
- case 'seconds':
- setMilliseconds(_date, 0, isUTC);
- }
- // weeks are a special case
- if (unit === 'week') {
- setLocaleDayOfWeek(_date, 0, { isUTC });
- }
- if (unit === 'isoWeek') {
- setISODayOfWeek(_date, 1);
- }
- // quarters are also special
- if (unit === 'quarter') {
- setMonth(_date, Math.floor(getMonth(_date, isUTC) / 3) * 3, isUTC);
- }
- return _date;
- }
- /**
- * @param {?} date
- * @param {?} unit
- * @param {?=} isUTC
- * @return {?}
- */
- function endOf(date, unit, isUTC) {
- /** @type {?} */
- let _unit = unit;
- // 'date' is an alias for 'day', so it should be considered as such.
- if (_unit === 'date') {
- _unit = 'day';
- }
- /** @type {?} */
- const start = startOf(date, _unit, isUTC);
- /** @type {?} */
- const _step = add(start, 1, _unit === 'isoWeek' ? 'week' : _unit, isUTC);
- /** @type {?} */
- const res = subtract(_step, 1, 'milliseconds', isUTC);
- return res;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @return {?}
- */
- function initDayOfYear() {
- // FORMATTING
- addFormatToken('DDD', ['DDDD', 3, false], 'DDDo', (/**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return getDayOfYear(date)
- .toString(10);
- }));
- // ALIASES
- addUnitAlias('dayOfYear', 'DDD');
- addRegexToken('DDD', match1to3);
- addRegexToken('DDDD', match3);
- addParseToken(['DDD', 'DDDD'], (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- config._dayOfYear = toInt(input);
- return config;
- }));
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getDayOfYear(date, isUTC) {
- /** @type {?} */
- const date1 = +startOf(date, 'day', isUTC);
- /** @type {?} */
- const date2 = +startOf(date, 'year', isUTC);
- /** @type {?} */
- const someDate = date1 - date2;
- /** @type {?} */
- const oneDay = 1000 * 60 * 60 * 24;
- return Math.round(someDate / oneDay) + 1;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} year
- * @param {?} dow
- * @param {?} doy
- * @return {?}
- */
- function firstWeekOffset(year, dow, doy) {
- // first-week day -- which january is always in the first week (4 for iso, 1 for other)
- /** @type {?} */
- const fwd = dow - doy + 7;
- // first-week day local weekday -- which local weekday is fwd
- /** @type {?} */
- const fwdlw = (createUTCDate(year, 0, fwd).getUTCDay() - dow + 7) % 7;
- return -fwdlw + fwd - 1;
- }
- // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
- /**
- * @param {?} year
- * @param {?} week
- * @param {?} weekday
- * @param {?} dow
- * @param {?} doy
- * @return {?}
- */
- function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
- /** @type {?} */
- const localWeekday = (7 + weekday - dow) % 7;
- /** @type {?} */
- const weekOffset = firstWeekOffset(year, dow, doy);
- /** @type {?} */
- const dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset;
- /** @type {?} */
- let resYear;
- /** @type {?} */
- let resDayOfYear;
- if (dayOfYear <= 0) {
- resYear = year - 1;
- resDayOfYear = daysInYear(resYear) + dayOfYear;
- }
- else if (dayOfYear > daysInYear(year)) {
- resYear = year + 1;
- resDayOfYear = dayOfYear - daysInYear(year);
- }
- else {
- resYear = year;
- resDayOfYear = dayOfYear;
- }
- return {
- year: resYear,
- dayOfYear: resDayOfYear
- };
- }
- /**
- * @param {?} date
- * @param {?} dow
- * @param {?} doy
- * @param {?=} isUTC
- * @return {?}
- */
- function weekOfYear(date, dow, doy, isUTC) {
- /** @type {?} */
- const weekOffset = firstWeekOffset(getFullYear(date, isUTC), dow, doy);
- /** @type {?} */
- const week = Math.floor((getDayOfYear(date, isUTC) - weekOffset - 1) / 7) + 1;
- /** @type {?} */
- let resWeek;
- /** @type {?} */
- let resYear;
- if (week < 1) {
- resYear = getFullYear(date, isUTC) - 1;
- resWeek = week + weeksInYear(resYear, dow, doy);
- }
- else if (week > weeksInYear(getFullYear(date, isUTC), dow, doy)) {
- resWeek = week - weeksInYear(getFullYear(date, isUTC), dow, doy);
- resYear = getFullYear(date, isUTC) + 1;
- }
- else {
- resYear = getFullYear(date, isUTC);
- resWeek = week;
- }
- return {
- week: resWeek,
- year: resYear
- };
- }
- /**
- * @param {?} year
- * @param {?} dow
- * @param {?} doy
- * @return {?}
- */
- function weeksInYear(year, dow, doy) {
- /** @type {?} */
- const weekOffset = firstWeekOffset(year, dow, doy);
- /** @type {?} */
- const weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
- return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- const MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;
- /** @type {?} */
- const defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
- /** @type {?} */
- const defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
- /** @type {?} */
- const defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
- /** @type {?} */
- const defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');
- /** @type {?} */
- const defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');
- /** @type {?} */
- const defaultLongDateFormat = {
- LTS: 'h:mm:ss A',
- LT: 'h:mm A',
- L: 'MM/DD/YYYY',
- LL: 'MMMM D, YYYY',
- LLL: 'MMMM D, YYYY h:mm A',
- LLLL: 'dddd, MMMM D, YYYY h:mm A'
- };
- /** @type {?} */
- const defaultOrdinal = '%d';
- /** @type {?} */
- const defaultDayOfMonthOrdinalParse = /\d{1,2}/;
- /** @type {?} */
- const defaultMonthsShortRegex = matchWord;
- /** @type {?} */
- const defaultMonthsRegex = matchWord;
- class Locale {
- /**
- * @param {?} config
- */
- constructor(config) {
- if (!!config) {
- this.set(config);
- }
- }
- /**
- * @param {?} config
- * @return {?}
- */
- set(config) {
- /** @type {?} */
- let confKey;
- for (confKey in config) {
- if (!config.hasOwnProperty(confKey)) {
- continue;
- }
- /** @type {?} */
- const prop = config[(/** @type {?} */ (confKey))];
- /** @type {?} */
- const key = (/** @type {?} */ ((isFunction(prop) ? confKey : `_${confKey}`)));
- this[key] = (/** @type {?} */ (prop));
- }
- this._config = config;
- }
- /**
- * @param {?} key
- * @param {?} date
- * @param {?} now
- * @return {?}
- */
- calendar(key, date, now) {
- /** @type {?} */
- const output = this._calendar[key] || this._calendar.sameElse;
- return isFunction(output) ? output.call(null, date, now) : output;
- }
- /**
- * @param {?} key
- * @return {?}
- */
- longDateFormat(key) {
- /** @type {?} */
- const format = this._longDateFormat[key];
- /** @type {?} */
- const formatUpper = this._longDateFormat[key.toUpperCase()];
- if (format || !formatUpper) {
- return format;
- }
- this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, (/**
- * @param {?} val
- * @return {?}
- */
- function (val) {
- return val.slice(1);
- }));
- return this._longDateFormat[key];
- }
- /**
- * @return {?}
- */
- get invalidDate() {
- return this._invalidDate;
- }
- /**
- * @param {?} val
- * @return {?}
- */
- set invalidDate(val) {
- this._invalidDate = val;
- }
- /**
- * @param {?} num
- * @param {?=} token
- * @return {?}
- */
- ordinal(num, token) {
- return this._ordinal.replace('%d', num.toString(10));
- }
- /**
- * @param {?} str
- * @return {?}
- */
- preparse(str) {
- return str;
- }
- /**
- * @param {?} str
- * @return {?}
- */
- postformat(str) {
- return str;
- }
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} str
- * @param {?} isFuture
- * @return {?}
- */
- relativeTime(num, withoutSuffix, str, isFuture) {
- /** @type {?} */
- const output = this._relativeTime[str];
- return (isFunction(output)) ?
- output(num, withoutSuffix, str, isFuture) :
- output.replace(/%d/i, num.toString(10));
- }
- /**
- * @param {?} diff
- * @param {?} output
- * @return {?}
- */
- pastFuture(diff, output) {
- /** @type {?} */
- const format = this._relativeTime[diff > 0 ? 'future' : 'past'];
- return isFunction(format) ? format(output) : format.replace(/%s/i, output);
- }
- /**
- * @param {?=} date
- * @param {?=} format
- * @param {?=} isUTC
- * @return {?}
- */
- months(date, format, isUTC = false) {
- if (!date) {
- return isArray(this._months)
- ? this._months
- : this._months.standalone;
- }
- if (isArray(this._months)) {
- return this._months[getMonth(date, isUTC)];
- }
- /** @type {?} */
- const key = (this._months.isFormat || MONTHS_IN_FORMAT).test(format)
- ? 'format'
- : 'standalone';
- return this._months[key][getMonth(date, isUTC)];
- }
- /**
- * @param {?=} date
- * @param {?=} format
- * @param {?=} isUTC
- * @return {?}
- */
- monthsShort(date, format, isUTC = false) {
- if (!date) {
- return isArray(this._monthsShort)
- ? this._monthsShort
- : this._monthsShort.standalone;
- }
- if (isArray(this._monthsShort)) {
- return this._monthsShort[getMonth(date, isUTC)];
- }
- /** @type {?} */
- const key = MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone';
- return this._monthsShort[key][getMonth(date, isUTC)];
- }
- /**
- * @param {?} monthName
- * @param {?=} format
- * @param {?=} strict
- * @return {?}
- */
- monthsParse(monthName, format, strict) {
- /** @type {?} */
- let date;
- /** @type {?} */
- let regex;
- if (this._monthsParseExact) {
- return this.handleMonthStrictParse(monthName, format, strict);
- }
- if (!this._monthsParse) {
- this._monthsParse = [];
- this._longMonthsParse = [];
- this._shortMonthsParse = [];
- }
- // TODO: add sorting
- // Sorting makes sure if one month (or abbr) is a prefix of another
- // see sorting in computeMonthsParse
- /** @type {?} */
- let i;
- for (i = 0; i < 12; i++) {
- // make the regex if we don't have it already
- date = new Date(Date.UTC(2000, i));
- if (strict && !this._longMonthsParse[i]) {
- /** @type {?} */
- const _months = this.months(date, '', true).replace('.', '');
- /** @type {?} */
- const _shortMonths = this.monthsShort(date, '', true).replace('.', '');
- this._longMonthsParse[i] = new RegExp(`^${_months}$`, 'i');
- this._shortMonthsParse[i] = new RegExp(`^${_shortMonths}$`, 'i');
- }
- if (!strict && !this._monthsParse[i]) {
- regex = `^${this.months(date, '', true)}|^${this.monthsShort(date, '', true)}`;
- this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
- }
- // test the regex
- if (strict && format === 'MMMM' && ((/** @type {?} */ (this._longMonthsParse[i]))).test(monthName)) {
- return i;
- }
- if (strict && format === 'MMM' && ((/** @type {?} */ (this._shortMonthsParse[i]))).test(monthName)) {
- return i;
- }
- if (!strict && this._monthsParse[i].test(monthName)) {
- return i;
- }
- }
- }
- /**
- * @param {?} isStrict
- * @return {?}
- */
- monthsRegex(isStrict) {
- if (this._monthsParseExact) {
- if (!hasOwnProp(this, '_monthsRegex')) {
- this.computeMonthsParse();
- }
- if (isStrict) {
- return this._monthsStrictRegex;
- }
- return this._monthsRegex;
- }
- if (!hasOwnProp(this, '_monthsRegex')) {
- this._monthsRegex = defaultMonthsRegex;
- }
- return this._monthsStrictRegex && isStrict ?
- this._monthsStrictRegex : this._monthsRegex;
- }
- /**
- * @param {?} isStrict
- * @return {?}
- */
- monthsShortRegex(isStrict) {
- if (this._monthsParseExact) {
- if (!hasOwnProp(this, '_monthsRegex')) {
- this.computeMonthsParse();
- }
- if (isStrict) {
- return this._monthsShortStrictRegex;
- }
- return this._monthsShortRegex;
- }
- if (!hasOwnProp(this, '_monthsShortRegex')) {
- this._monthsShortRegex = defaultMonthsShortRegex;
- }
- return this._monthsShortStrictRegex && isStrict ?
- this._monthsShortStrictRegex : this._monthsShortRegex;
- }
- /**
- * Week
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- week(date, isUTC) {
- return weekOfYear(date, this._week.dow, this._week.doy, isUTC).week;
- }
- /**
- * @return {?}
- */
- firstDayOfWeek() {
- return this._week.dow;
- }
- /**
- * @return {?}
- */
- firstDayOfYear() {
- return this._week.doy;
- }
- /**
- * @param {?=} date
- * @param {?=} format
- * @param {?=} isUTC
- * @return {?}
- */
- weekdays(date, format, isUTC) {
- if (!date) {
- return isArray(this._weekdays)
- ? this._weekdays
- : this._weekdays.standalone;
- }
- if (isArray(this._weekdays)) {
- return this._weekdays[getDay(date, isUTC)];
- }
- /** @type {?} */
- const _key = this._weekdays.isFormat.test(format)
- ? 'format'
- : 'standalone';
- return this._weekdays[_key][getDay(date, isUTC)];
- }
- /**
- * @param {?=} date
- * @param {?=} format
- * @param {?=} isUTC
- * @return {?}
- */
- weekdaysMin(date, format, isUTC) {
- return date ? this._weekdaysMin[getDay(date, isUTC)] : this._weekdaysMin;
- }
- /**
- * @param {?=} date
- * @param {?=} format
- * @param {?=} isUTC
- * @return {?}
- */
- weekdaysShort(date, format, isUTC) {
- return date ? this._weekdaysShort[getDay(date, isUTC)] : this._weekdaysShort;
- }
- // proto.weekdaysParse = localeWeekdaysParse;
- /**
- * @param {?=} weekdayName
- * @param {?=} format
- * @param {?=} strict
- * @return {?}
- */
- weekdaysParse(weekdayName, format, strict) {
- /** @type {?} */
- let i;
- /** @type {?} */
- let regex;
- if (this._weekdaysParseExact) {
- return this.handleWeekStrictParse(weekdayName, format, strict);
- }
- if (!this._weekdaysParse) {
- this._weekdaysParse = [];
- this._minWeekdaysParse = [];
- this._shortWeekdaysParse = [];
- this._fullWeekdaysParse = [];
- }
- for (i = 0; i < 7; i++) {
- // make the regex if we don't have it already
- // fix: here is the issue
- /** @type {?} */
- const date = setDayOfWeek(new Date(Date.UTC(2000, 1)), i, null, true);
- if (strict && !this._fullWeekdaysParse[i]) {
- this._fullWeekdaysParse[i] = new RegExp(`^${this.weekdays(date, '', true).replace('.', '\.?')}$`, 'i');
- this._shortWeekdaysParse[i] = new RegExp(`^${this.weekdaysShort(date, '', true).replace('.', '\.?')}$`, 'i');
- this._minWeekdaysParse[i] = new RegExp(`^${this.weekdaysMin(date, '', true).replace('.', '\.?')}$`, 'i');
- }
- if (!this._weekdaysParse[i]) {
- regex = `^${this.weekdays(date, '', true)}|^${this.weekdaysShort(date, '', true)}|^${this.weekdaysMin(date, '', true)}`;
- this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
- }
- if (!isArray(this._fullWeekdaysParse)
- || !isArray(this._shortWeekdaysParse)
- || !isArray(this._minWeekdaysParse)
- || !isArray(this._weekdaysParse)) {
- return;
- }
- // test the regex
- if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {
- return i;
- }
- else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {
- return i;
- }
- else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {
- return i;
- }
- else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
- return i;
- }
- }
- }
- // proto.weekdaysRegex = weekdaysRegex;
- /**
- * @param {?} isStrict
- * @return {?}
- */
- weekdaysRegex(isStrict) {
- if (this._weekdaysParseExact) {
- if (!hasOwnProp(this, '_weekdaysRegex')) {
- this.computeWeekdaysParse();
- }
- if (isStrict) {
- return this._weekdaysStrictRegex;
- }
- else {
- return this._weekdaysRegex;
- }
- }
- else {
- if (!hasOwnProp(this, '_weekdaysRegex')) {
- this._weekdaysRegex = matchWord;
- }
- return this._weekdaysStrictRegex && isStrict ?
- this._weekdaysStrictRegex : this._weekdaysRegex;
- }
- }
- // proto.weekdaysShortRegex = weekdaysShortRegex;
- // proto.weekdaysMinRegex = weekdaysMinRegex;
- /**
- * @param {?=} isStrict
- * @return {?}
- */
- weekdaysShortRegex(isStrict) {
- if (this._weekdaysParseExact) {
- if (!hasOwnProp(this, '_weekdaysRegex')) {
- this.computeWeekdaysParse();
- }
- if (isStrict) {
- return this._weekdaysShortStrictRegex;
- }
- else {
- return this._weekdaysShortRegex;
- }
- }
- else {
- if (!hasOwnProp(this, '_weekdaysShortRegex')) {
- this._weekdaysShortRegex = matchWord;
- }
- return this._weekdaysShortStrictRegex && isStrict ?
- this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
- }
- }
- /**
- * @param {?=} isStrict
- * @return {?}
- */
- weekdaysMinRegex(isStrict) {
- if (this._weekdaysParseExact) {
- if (!hasOwnProp(this, '_weekdaysRegex')) {
- this.computeWeekdaysParse();
- }
- if (isStrict) {
- return this._weekdaysMinStrictRegex;
- }
- else {
- return this._weekdaysMinRegex;
- }
- }
- else {
- if (!hasOwnProp(this, '_weekdaysMinRegex')) {
- this._weekdaysMinRegex = matchWord;
- }
- return this._weekdaysMinStrictRegex && isStrict ?
- this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
- }
- }
- /**
- * @param {?} input
- * @return {?}
- */
- isPM(input) {
- // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
- // Using charAt should be more compatible.
- return input.toLowerCase().charAt(0) === 'p';
- }
- /**
- * @param {?} hours
- * @param {?} minutes
- * @param {?} isLower
- * @return {?}
- */
- meridiem(hours, minutes, isLower) {
- if (hours > 11) {
- return isLower ? 'pm' : 'PM';
- }
- return isLower ? 'am' : 'AM';
- }
- /**
- * @param {?} key
- * @return {?}
- */
- formatLongDate(key) {
- this._longDateFormat = this._longDateFormat ? this._longDateFormat : defaultLongDateFormat;
- /** @type {?} */
- const format = this._longDateFormat[key];
- /** @type {?} */
- const formatUpper = this._longDateFormat[key.toUpperCase()];
- if (format || !formatUpper) {
- return format;
- }
- this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, (/**
- * @param {?} val
- * @return {?}
- */
- (val) => {
- return val.slice(1);
- }));
- return this._longDateFormat[key];
- }
- /**
- * @private
- * @param {?} monthName
- * @param {?} format
- * @param {?=} strict
- * @return {?}
- */
- handleMonthStrictParse(monthName, format, strict) {
- /** @type {?} */
- const llc = monthName.toLocaleLowerCase();
- /** @type {?} */
- let i;
- /** @type {?} */
- let ii;
- /** @type {?} */
- let mom;
- if (!this._monthsParse) {
- // this is not used
- this._monthsParse = [];
- this._longMonthsParse = [];
- this._shortMonthsParse = [];
- for (i = 0; i < 12; ++i) {
- mom = new Date(2000, i);
- this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();
- this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
- }
- }
- if (strict) {
- if (format === 'MMM') {
- ii = ((/** @type {?} */ (this._shortMonthsParse))).indexOf(llc);
- return ii !== -1 ? ii : null;
- }
- ii = ((/** @type {?} */ (this._longMonthsParse))).indexOf(llc);
- return ii !== -1 ? ii : null;
- }
- if (format === 'MMM') {
- ii = ((/** @type {?} */ (this._shortMonthsParse))).indexOf(llc);
- if (ii !== -1) {
- return ii;
- }
- ii = ((/** @type {?} */ (this._longMonthsParse))).indexOf(llc);
- return ii !== -1 ? ii : null;
- }
- ii = ((/** @type {?} */ (this._longMonthsParse))).indexOf(llc);
- if (ii !== -1) {
- return ii;
- }
- ii = ((/** @type {?} */ (this._shortMonthsParse))).indexOf(llc);
- return ii !== -1 ? ii : null;
- }
- /**
- * @private
- * @param {?} weekdayName
- * @param {?} format
- * @param {?} strict
- * @return {?}
- */
- handleWeekStrictParse(weekdayName, format, strict) {
- /** @type {?} */
- let ii;
- /** @type {?} */
- const llc = weekdayName.toLocaleLowerCase();
- if (!this._weekdaysParse) {
- this._weekdaysParse = [];
- this._shortWeekdaysParse = [];
- this._minWeekdaysParse = [];
- /** @type {?} */
- let i;
- for (i = 0; i < 7; ++i) {
- /** @type {?} */
- const date = setDayOfWeek(new Date(Date.UTC(2000, 1)), i, null, true);
- this._minWeekdaysParse[i] = this.weekdaysMin(date).toLocaleLowerCase();
- this._shortWeekdaysParse[i] = this.weekdaysShort(date).toLocaleLowerCase();
- this._weekdaysParse[i] = this.weekdays(date, '').toLocaleLowerCase();
- }
- }
- if (!isArray(this._weekdaysParse)
- || !isArray(this._shortWeekdaysParse)
- || !isArray(this._minWeekdaysParse)) {
- return;
- }
- if (strict) {
- if (format === 'dddd') {
- ii = this._weekdaysParse.indexOf(llc);
- return ii !== -1 ? ii : null;
- }
- else if (format === 'ddd') {
- ii = this._shortWeekdaysParse.indexOf(llc);
- return ii !== -1 ? ii : null;
- }
- else {
- ii = this._minWeekdaysParse.indexOf(llc);
- return ii !== -1 ? ii : null;
- }
- }
- else {
- if (format === 'dddd') {
- ii = this._weekdaysParse.indexOf(llc);
- if (ii !== -1) {
- return ii;
- }
- ii = this._shortWeekdaysParse.indexOf(llc);
- if (ii !== -1) {
- return ii;
- }
- ii = this._minWeekdaysParse.indexOf(llc);
- return ii !== -1 ? ii : null;
- }
- else if (format === 'ddd') {
- ii = this._shortWeekdaysParse.indexOf(llc);
- if (ii !== -1) {
- return ii;
- }
- ii = this._weekdaysParse.indexOf(llc);
- if (ii !== -1) {
- return ii;
- }
- ii = this._minWeekdaysParse.indexOf(llc);
- return ii !== -1 ? ii : null;
- }
- else {
- ii = this._minWeekdaysParse.indexOf(llc);
- if (ii !== -1) {
- return ii;
- }
- ii = this._weekdaysParse.indexOf(llc);
- if (ii !== -1) {
- return ii;
- }
- ii = this._shortWeekdaysParse.indexOf(llc);
- return ii !== -1 ? ii : null;
- }
- }
- }
- /**
- * @private
- * @return {?}
- */
- computeMonthsParse() {
- /** @type {?} */
- const shortPieces = [];
- /** @type {?} */
- const longPieces = [];
- /** @type {?} */
- const mixedPieces = [];
- /** @type {?} */
- let date;
- /** @type {?} */
- let i;
- for (i = 0; i < 12; i++) {
- // make the regex if we don't have it already
- date = new Date(2000, i);
- shortPieces.push(this.monthsShort(date, ''));
- longPieces.push(this.months(date, ''));
- mixedPieces.push(this.months(date, ''));
- mixedPieces.push(this.monthsShort(date, ''));
- }
- // Sorting makes sure if one month (or abbr) is a prefix of another it
- // will match the longer piece.
- shortPieces.sort(cmpLenRev);
- longPieces.sort(cmpLenRev);
- mixedPieces.sort(cmpLenRev);
- for (i = 0; i < 12; i++) {
- shortPieces[i] = regexEscape(shortPieces[i]);
- longPieces[i] = regexEscape(longPieces[i]);
- }
- for (i = 0; i < 24; i++) {
- mixedPieces[i] = regexEscape(mixedPieces[i]);
- }
- this._monthsRegex = new RegExp(`^(${mixedPieces.join('|')})`, 'i');
- this._monthsShortRegex = this._monthsRegex;
- this._monthsStrictRegex = new RegExp(`^(${longPieces.join('|')})`, 'i');
- this._monthsShortStrictRegex = new RegExp(`^(${shortPieces.join('|')})`, 'i');
- }
- /**
- * @private
- * @return {?}
- */
- computeWeekdaysParse() {
- /** @type {?} */
- const minPieces = [];
- /** @type {?} */
- const shortPieces = [];
- /** @type {?} */
- const longPieces = [];
- /** @type {?} */
- const mixedPieces = [];
- /** @type {?} */
- let i;
- for (i = 0; i < 7; i++) {
- // make the regex if we don't have it already
- // let mom = createUTC([2000, 1]).day(i);
- /** @type {?} */
- const date = setDayOfWeek(new Date(Date.UTC(2000, 1)), i, null, true);
- /** @type {?} */
- const minp = this.weekdaysMin(date);
- /** @type {?} */
- const shortp = this.weekdaysShort(date);
- /** @type {?} */
- const longp = this.weekdays(date);
- minPieces.push(minp);
- shortPieces.push(shortp);
- longPieces.push(longp);
- mixedPieces.push(minp);
- mixedPieces.push(shortp);
- mixedPieces.push(longp);
- }
- // Sorting makes sure if one weekday (or abbr) is a prefix of another it
- // will match the longer piece.
- minPieces.sort(cmpLenRev);
- shortPieces.sort(cmpLenRev);
- longPieces.sort(cmpLenRev);
- mixedPieces.sort(cmpLenRev);
- for (i = 0; i < 7; i++) {
- shortPieces[i] = regexEscape(shortPieces[i]);
- longPieces[i] = regexEscape(longPieces[i]);
- mixedPieces[i] = regexEscape(mixedPieces[i]);
- }
- this._weekdaysRegex = new RegExp(`^(${mixedPieces.join('|')})`, 'i');
- this._weekdaysShortRegex = this._weekdaysRegex;
- this._weekdaysMinRegex = this._weekdaysRegex;
- this._weekdaysStrictRegex = new RegExp(`^(${longPieces.join('|')})`, 'i');
- this._weekdaysShortStrictRegex = new RegExp(`^(${shortPieces.join('|')})`, 'i');
- this._weekdaysMinStrictRegex = new RegExp(`^(${minPieces.join('|')})`, 'i');
- }
- }
- /**
- * @param {?} a
- * @param {?} b
- * @return {?}
- */
- function cmpLenRev(a, b) {
- return b.length - a.length;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- const defaultCalendar = {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L'
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- const defaultInvalidDate = 'Invalid date';
- /** @type {?} */
- const defaultLocaleWeek = {
- dow: 0,
- // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 1st is the first week of the year.
- };
- /** @type {?} */
- const defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;
- /** @type {?} */
- const defaultRelativeTime = {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years'
- };
- /** @type {?} */
- const baseConfig = {
- calendar: defaultCalendar,
- longDateFormat: defaultLongDateFormat,
- invalidDate: defaultInvalidDate,
- ordinal: defaultOrdinal,
- dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
- relativeTime: defaultRelativeTime,
- months: defaultLocaleMonths,
- monthsShort: defaultLocaleMonthsShort,
- week: defaultLocaleWeek,
- weekdays: defaultLocaleWeekdays,
- weekdaysMin: defaultLocaleWeekdaysMin,
- weekdaysShort: defaultLocaleWeekdaysShort,
- meridiemParse: defaultLocaleMeridiemParse
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @template T
- * @param {?} array1
- * @param {?} array2
- * @param {?} dontConvert
- * @return {?}
- */
- function compareArrays(array1, array2, dontConvert) {
- /** @type {?} */
- const len = Math.min(array1.length, array2.length);
- /** @type {?} */
- const lengthDiff = Math.abs(array1.length - array2.length);
- /** @type {?} */
- let diffs = 0;
- /** @type {?} */
- let i;
- for (i = 0; i < len; i++) {
- if ((dontConvert && array1[i] !== array2[i])
- || (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
- diffs++;
- }
- }
- return diffs + lengthDiff;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // FORMATTING
- /**
- * @return {?}
- */
- function initWeek() {
- addFormatToken('w', ['ww', 2, false], 'wo', (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return getWeek(date, opts.locale)
- .toString(10);
- }));
- addFormatToken('W', ['WW', 2, false], 'Wo', (/**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return getISOWeek(date)
- .toString(10);
- }));
- // ALIASES
- addUnitAlias('week', 'w');
- addUnitAlias('isoWeek', 'W');
- // PARSING
- addRegexToken('w', match1to2);
- addRegexToken('ww', match1to2, match2);
- addRegexToken('W', match1to2);
- addRegexToken('WW', match1to2, match2);
- addWeekParseToken(['w', 'ww', 'W', 'WW'], (/**
- * @param {?} input
- * @param {?} week
- * @param {?} config
- * @param {?} token
- * @return {?}
- */
- function (input, week, config, token) {
- week[token.substr(0, 1)] = toInt(input);
- return config;
- }));
- // export function getSetWeek (input) {
- // var week = this.localeData().week(this);
- // return input == null ? week : this.add((input - week) * 7, 'd');
- // }
- }
- /**
- * @param {?} date
- * @param {?=} locale
- * @param {?=} isUTC
- * @return {?}
- */
- function getWeek(date, locale = getLocale(), isUTC) {
- return locale.week(date, isUTC);
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getISOWeek(date, isUTC) {
- return weekOfYear(date, 1, 4, isUTC).week;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // FORMATTING
- /**
- * @return {?}
- */
- function initWeekYear() {
- addFormatToken(null, ['gg', 2, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- // return this.weekYear() % 100;
- return (getWeekYear(date, opts.locale) % 100).toString();
- }));
- addFormatToken(null, ['GG', 2, false], null, (/**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- // return this.isoWeekYear() % 100;
- return (getISOWeekYear(date) % 100).toString();
- }));
- addWeekYearFormatToken('gggg', _getWeekYearFormatCb);
- addWeekYearFormatToken('ggggg', _getWeekYearFormatCb);
- addWeekYearFormatToken('GGGG', _getISOWeekYearFormatCb);
- addWeekYearFormatToken('GGGGG', _getISOWeekYearFormatCb);
- // ALIASES
- addUnitAlias('weekYear', 'gg');
- addUnitAlias('isoWeekYear', 'GG');
- // PARSING
- addRegexToken('G', matchSigned);
- addRegexToken('g', matchSigned);
- addRegexToken('GG', match1to2, match2);
- addRegexToken('gg', match1to2, match2);
- addRegexToken('GGGG', match1to4, match4);
- addRegexToken('gggg', match1to4, match4);
- addRegexToken('GGGGG', match1to6, match6);
- addRegexToken('ggggg', match1to6, match6);
- addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], (/**
- * @param {?} input
- * @param {?} week
- * @param {?} config
- * @param {?} token
- * @return {?}
- */
- function (input, week, config, token) {
- week[token.substr(0, 2)] = toInt(input);
- return config;
- }));
- addWeekParseToken(['gg', 'GG'], (/**
- * @param {?} input
- * @param {?} week
- * @param {?} config
- * @param {?} token
- * @return {?}
- */
- function (input, week, config, token) {
- week[token] = parseTwoDigitYear(input);
- return config;
- }));
- }
- /**
- * @param {?} token
- * @param {?} getter
- * @return {?}
- */
- function addWeekYearFormatToken(token, getter) {
- addFormatToken(null, [token, token.length, false], null, getter);
- }
- /**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function _getWeekYearFormatCb(date, opts) {
- return getWeekYear(date, opts.locale).toString();
- }
- /**
- * @param {?} date
- * @return {?}
- */
- function _getISOWeekYearFormatCb(date) {
- return getISOWeekYear(date).toString();
- }
- /**
- * @param {?} date
- * @param {?=} locale
- * @param {?=} isUTC
- * @return {?}
- */
- function getWeekYear(date, locale = getLocale(), isUTC) {
- return weekOfYear(date, locale.firstDayOfWeek(), locale.firstDayOfYear(), isUTC).year;
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getISOWeekYear(date, isUTC) {
- return weekOfYear(date, 1, 4, isUTC).year;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // todo: add support for timezones
- /**
- * @return {?}
- */
- function initTimezone() {
- // FORMATTING
- addFormatToken('z', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return opts.isUTC ? 'UTC' : '';
- }));
- addFormatToken('zz', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return opts.isUTC ? 'Coordinated Universal Time' : '';
- }));
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @return {?}
- */
- function initTimestamp() {
- // FORMATTING
- addFormatToken('X', null, null, (/**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return unix(date)
- .toString(10);
- }));
- addFormatToken('x', null, null, (/**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return date.valueOf()
- .toString(10);
- }));
- // PARSING
- addRegexToken('x', matchSigned);
- addRegexToken('X', matchTimestamp);
- addParseToken('X', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- config._d = new Date(parseFloat(input) * 1000);
- return config;
- }));
- addParseToken('x', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- config._d = new Date(toInt(input));
- return config;
- }));
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @return {?}
- */
- function initSecond() {
- // FORMATTING
- addFormatToken('s', ['ss', 2, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return getSeconds(date, opts.isUTC)
- .toString(10);
- }));
- // ALIASES
- addUnitAlias('second', 's');
- // PARSING
- addRegexToken('s', match1to2);
- addRegexToken('ss', match1to2, match2);
- addParseToken(['s', 'ss'], SECOND);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @return {?}
- */
- function initQuarter() {
- // FORMATTING
- addFormatToken('Q', null, 'Qo', (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return getQuarter(date, opts.isUTC)
- .toString(10);
- }));
- // ALIASES
- addUnitAlias('quarter', 'Q');
- // PARSING
- addRegexToken('Q', match1);
- addParseToken('Q', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- array[MONTH] = (toInt(input) - 1) * 3;
- return config;
- }));
- }
- // MOMENTS
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getQuarter(date, isUTC = false) {
- return Math.ceil((getMonth(date, isUTC) + 1) / 3);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} token
- * @param {?} separator
- * @return {?}
- */
- function addOffsetFormatToken(token, separator) {
- addFormatToken(token, null, null, (/**
- * @param {?} date
- * @param {?} config
- * @return {?}
- */
- function (date, config) {
- /** @type {?} */
- let offset = getUTCOffset(date, { _isUTC: config.isUTC, _offset: config.offset });
- /** @type {?} */
- let sign = '+';
- if (offset < 0) {
- offset = -offset;
- sign = '-';
- }
- return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);
- }));
- }
- /**
- * @return {?}
- */
- function initOffset() {
- addOffsetFormatToken('Z', ':');
- addOffsetFormatToken('ZZ', '');
- // PARSING
- addRegexToken('Z', matchShortOffset);
- addRegexToken('ZZ', matchShortOffset);
- addParseToken(['Z', 'ZZ'], (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- config._useUTC = true;
- config._tzm = offsetFromString(matchShortOffset, input);
- return config;
- }));
- }
- // HELPERS
- // timezone chunker
- // '+10:00' > ['10', '00']
- // '-1530' > ['-15', '30']
- /** @type {?} */
- const chunkOffset = /([\+\-]|\d\d)/gi;
- /**
- * @param {?} matcher
- * @param {?} str
- * @return {?}
- */
- function offsetFromString(matcher, str) {
- /** @type {?} */
- const matches = (str || '').match(matcher);
- if (matches === null) {
- return null;
- }
- /** @type {?} */
- const chunk = matches[matches.length - 1];
- /** @type {?} */
- const parts = chunk.match(chunkOffset) || ['-', '0', '0'];
- /** @type {?} */
- const minutes = parseInt(parts[1], 10) * 60 + toInt(parts[2]);
- /** @type {?} */
- const _min = parts[0] === '+' ? minutes : -minutes;
- return minutes === 0 ? 0 : _min;
- }
- // Return a moment from input, that is local/utc/zone equivalent to model.
- /**
- * @param {?} input
- * @param {?} date
- * @param {?=} config
- * @return {?}
- */
- function cloneWithOffset(input, date, config = {}) {
- if (!config._isUTC) {
- return input;
- }
- /** @type {?} */
- const res = cloneDate(date);
- // todo: input._d - res._d + ((res._offset || 0) - (input._offset || 0))*60000
- /** @type {?} */
- const offsetDiff = (config._offset || 0) * 60000;
- /** @type {?} */
- const diff = input.valueOf() - res.valueOf() + offsetDiff;
- // Use low-level api, because this fn is low-level api.
- res.setTime(res.valueOf() + diff);
- // todo: add timezone handling
- // hooks.updateOffset(res, false);
- return res;
- }
- /**
- * @param {?} date
- * @return {?}
- */
- function getDateOffset(date) {
- // On Firefox.24 Date#getTimezoneOffset returns a floating point.
- // https://github.com/moment/moment/pull/1871
- return -Math.round(date.getTimezoneOffset() / 15) * 15;
- }
- // HOOKS
- // This function will be called whenever a moment is mutated.
- // It is intended to keep the offset in sync with the timezone.
- // todo: it's from moment timezones
- // hooks.updateOffset = function () {
- // };
- // MOMENTS
- // keepLocalTime = true means only change the timezone, without
- // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
- // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
- // +0200, so we adjust the time as needed, to be valid.
- //
- // Keeping the time actually adds/subtracts (one hour)
- // from the actual represented time. That is why we call updateOffset
- // a second time. In case it wants us to change the offset again
- // _changeInProgress == true case, then we have to adjust, because
- // there is no such time in the given timezone.
- /**
- * @param {?} date
- * @param {?=} config
- * @return {?}
- */
- function getUTCOffset(date, config = {}) {
- /** @type {?} */
- const _offset = config._offset || 0;
- return config._isUTC ? _offset : getDateOffset(date);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @return {?}
- */
- function initMinute() {
- // FORMATTING
- addFormatToken('m', ['mm', 2, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return getMinutes(date, opts.isUTC)
- .toString(10);
- }));
- // ALIASES
- addUnitAlias('minute', 'm');
- // PARSING
- addRegexToken('m', match1to2);
- addRegexToken('mm', match1to2, match2);
- addParseToken(['m', 'mm'], MINUTE);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @return {?}
- */
- function initMillisecond() {
- addFormatToken('S', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (~~(getMilliseconds(date, opts.isUTC) / 100)).toString(10);
- }));
- addFormatToken(null, ['SS', 2, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (~~(getMilliseconds(date, opts.isUTC) / 10)).toString(10);
- }));
- addFormatToken(null, ['SSS', 3, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (getMilliseconds(date, opts.isUTC)).toString(10);
- }));
- addFormatToken(null, ['SSSS', 4, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (getMilliseconds(date, opts.isUTC) * 10).toString(10);
- }));
- addFormatToken(null, ['SSSSS', 5, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (getMilliseconds(date, opts.isUTC) * 100).toString(10);
- }));
- addFormatToken(null, ['SSSSSS', 6, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (getMilliseconds(date, opts.isUTC) * 1000).toString(10);
- }));
- addFormatToken(null, ['SSSSSSS', 7, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (getMilliseconds(date, opts.isUTC) * 10000).toString(10);
- }));
- addFormatToken(null, ['SSSSSSSS', 8, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (getMilliseconds(date, opts.isUTC) * 100000).toString(10);
- }));
- addFormatToken(null, ['SSSSSSSSS', 9, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return (getMilliseconds(date, opts.isUTC) * 1000000).toString(10);
- }));
- // ALIASES
- addUnitAlias('millisecond', 'ms');
- // PARSING
- addRegexToken('S', match1to3, match1);
- addRegexToken('SS', match1to3, match2);
- addRegexToken('SSS', match1to3, match3);
- /** @type {?} */
- let token;
- for (token = 'SSSS'; token.length <= 9; token += 'S') {
- addRegexToken(token, matchUnsigned);
- }
- /**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function parseMs(input, array, config) {
- array[MILLISECOND] = toInt(parseFloat(`0.${input}`) * 1000);
- return config;
- }
- for (token = 'S'; token.length <= 9; token += 'S') {
- addParseToken(token, parseMs);
- }
- // MOMENTS
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @return {?}
- */
- function initHour() {
- // FORMATTING
- // FORMATTING
- /**
- * @param {?} date
- * @param {?} isUTC
- * @return {?}
- */
- function hFormat(date, isUTC) {
- return getHours(date, isUTC) % 12 || 12;
- }
- /**
- * @param {?} date
- * @param {?} isUTC
- * @return {?}
- */
- function kFormat(date, isUTC) {
- return getHours(date, isUTC) || 24;
- }
- addFormatToken('H', ['HH', 2, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return getHours(date, opts.isUTC)
- .toString(10);
- }));
- addFormatToken('h', ['hh', 2, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return hFormat(date, opts.isUTC)
- .toString(10);
- }));
- addFormatToken('k', ['kk', 2, false], null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return kFormat(date, opts.isUTC)
- .toString(10);
- }));
- addFormatToken('hmm', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- /** @type {?} */
- const _h = hFormat(date, opts.isUTC);
- /** @type {?} */
- const _mm = zeroFill(getMinutes(date, opts.isUTC), 2);
- return `${_h}${_mm}`;
- }));
- addFormatToken('hmmss', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- /** @type {?} */
- const _h = hFormat(date, opts.isUTC);
- /** @type {?} */
- const _mm = zeroFill(getMinutes(date, opts.isUTC), 2);
- /** @type {?} */
- const _ss = zeroFill(getSeconds(date, opts.isUTC), 2);
- return `${_h}${_mm}${_ss}`;
- }));
- addFormatToken('Hmm', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- /** @type {?} */
- const _H = getHours(date, opts.isUTC);
- /** @type {?} */
- const _mm = zeroFill(getMinutes(date, opts.isUTC), 2);
- return `${_H}${_mm}`;
- }));
- addFormatToken('Hmmss', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- /** @type {?} */
- const _H = getHours(date, opts.isUTC);
- /** @type {?} */
- const _mm = zeroFill(getMinutes(date, opts.isUTC), 2);
- /** @type {?} */
- const _ss = zeroFill(getSeconds(date, opts.isUTC), 2);
- return `${_H}${_mm}${_ss}`;
- }));
- /**
- * @param {?} token
- * @param {?} lowercase
- * @return {?}
- */
- function meridiem(token, lowercase) {
- addFormatToken(token, null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return opts.locale.meridiem(getHours(date, opts.isUTC), getMinutes(date, opts.isUTC), lowercase);
- }));
- }
- meridiem('a', true);
- meridiem('A', false);
- // ALIASES
- addUnitAlias('hour', 'h');
- // PARSING
- /**
- * @param {?} isStrict
- * @param {?} locale
- * @return {?}
- */
- function matchMeridiem(isStrict, locale) {
- return locale._meridiemParse;
- }
- addRegexToken('a', matchMeridiem);
- addRegexToken('A', matchMeridiem);
- addRegexToken('H', match1to2);
- addRegexToken('h', match1to2);
- addRegexToken('k', match1to2);
- addRegexToken('HH', match1to2, match2);
- addRegexToken('hh', match1to2, match2);
- addRegexToken('kk', match1to2, match2);
- addRegexToken('hmm', match3to4);
- addRegexToken('hmmss', match5to6);
- addRegexToken('Hmm', match3to4);
- addRegexToken('Hmmss', match5to6);
- addParseToken(['H', 'HH'], HOUR);
- addParseToken(['k', 'kk'], (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- /** @type {?} */
- const kInput = toInt(input);
- array[HOUR] = kInput === 24 ? 0 : kInput;
- return config;
- }));
- addParseToken(['a', 'A'], (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- config._isPm = config._locale.isPM(input);
- config._meridiem = input;
- return config;
- }));
- addParseToken(['h', 'hh'], (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- array[HOUR] = toInt(input);
- getParsingFlags(config).bigHour = true;
- return config;
- }));
- addParseToken('hmm', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- /** @type {?} */
- const pos = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos));
- array[MINUTE] = toInt(input.substr(pos));
- getParsingFlags(config).bigHour = true;
- return config;
- }));
- addParseToken('hmmss', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- /** @type {?} */
- const pos1 = input.length - 4;
- /** @type {?} */
- const pos2 = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos1));
- array[MINUTE] = toInt(input.substr(pos1, 2));
- array[SECOND] = toInt(input.substr(pos2));
- getParsingFlags(config).bigHour = true;
- return config;
- }));
- addParseToken('Hmm', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- /** @type {?} */
- const pos = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos));
- array[MINUTE] = toInt(input.substr(pos));
- return config;
- }));
- addParseToken('Hmmss', (/**
- * @param {?} input
- * @param {?} array
- * @param {?} config
- * @return {?}
- */
- function (input, array, config) {
- /** @type {?} */
- const pos1 = input.length - 4;
- /** @type {?} */
- const pos2 = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos1));
- array[MINUTE] = toInt(input.substr(pos1, 2));
- array[SECOND] = toInt(input.substr(pos2));
- return config;
- }));
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- const locales = {};
- /** @type {?} */
- const localeFamilies = {};
- /** @type {?} */
- let globalLocale;
- /**
- * @param {?} key
- * @return {?}
- */
- function normalizeLocale(key) {
- return key ? key.toLowerCase().replace('_', '-') : key;
- }
- // pick the locale from the array
- // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
- // substring from most specific to least,
- // but move to the next array item if it's a more specific variant than the current root
- /**
- * @param {?} names
- * @return {?}
- */
- function chooseLocale(names) {
- /** @type {?} */
- let next;
- /** @type {?} */
- let locale;
- /** @type {?} */
- let i = 0;
- while (i < names.length) {
- /** @type {?} */
- const split = normalizeLocale(names[i]).split('-');
- /** @type {?} */
- let j = split.length;
- next = normalizeLocale(names[i + 1]);
- next = next ? next.split('-') : null;
- while (j > 0) {
- locale = loadLocale(split.slice(0, j).join('-'));
- if (locale) {
- return locale;
- }
- if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
- // the next array item is better than a shallower substring of this one
- break;
- }
- j--;
- }
- i++;
- }
- return null;
- }
- /**
- * @param {?} parentConfig
- * @param {?} childConfig
- * @return {?}
- */
- function mergeConfigs(parentConfig, childConfig) {
- /** @type {?} */
- const res = Object.assign({}, parentConfig);
- for (const childProp in childConfig) {
- if (!hasOwnProp(childConfig, childProp)) {
- continue;
- }
- if (isObject(parentConfig[childProp]) && isObject(childConfig[childProp])) {
- res[(/** @type {?} */ (childProp))] = {};
- Object.assign(res[childProp], parentConfig[childProp]);
- Object.assign(res[childProp], childConfig[childProp]);
- }
- else if (childConfig[childProp] != null) {
- res[(/** @type {?} */ (childProp))] = childConfig[childProp];
- }
- else {
- delete res[(/** @type {?} */ (childProp))];
- }
- }
- for (const parentProp in parentConfig) {
- if (hasOwnProp(parentConfig, parentProp) &&
- !hasOwnProp(childConfig, parentProp) &&
- isObject(parentConfig[(/** @type {?} */ (parentProp))])) {
- // make sure changes to properties don't modify parent config
- res[(/** @type {?} */ (parentProp))] = Object.assign({}, res[(/** @type {?} */ (parentProp))]);
- }
- }
- return res;
- }
- /**
- * @param {?} name
- * @return {?}
- */
- function loadLocale(name) {
- // no way!
- /* var oldLocale = null;
- // TODO: Find a better way to register and load all the locales in Node
- if (!locales[name] && (typeof module !== 'undefined') &&
- module && module.exports) {
- try {
- oldLocale = globalLocale._abbr;
- var aliasedRequire = require;
- aliasedRequire('./locale/' + name);
- getSetGlobalLocale(oldLocale);
- } catch (e) {}
- }*/
- if (!locales[name]) {
- // tslint:disable-next-line
- console.error(`Khronos locale error: please load locale "${name}" before using it`);
- // throw new Error(`Khronos locale error: please load locale "${name}" before using it`);
- }
- return locales[name];
- }
- // This function will load locale and then set the global locale. If
- // no arguments are passed in, it will simply return the current global
- // locale key.
- /**
- * @param {?=} key
- * @param {?=} values
- * @return {?}
- */
- function getSetGlobalLocale(key, values) {
- /** @type {?} */
- let data;
- if (key) {
- if (isUndefined(values)) {
- data = getLocale(key);
- }
- else if (isString(key)) {
- data = defineLocale(key, values);
- }
- if (data) {
- globalLocale = data;
- }
- }
- return globalLocale && globalLocale._abbr;
- }
- /**
- * @param {?} name
- * @param {?=} config
- * @return {?}
- */
- function defineLocale(name, config) {
- if (config === null) {
- // useful for testing
- delete locales[name];
- globalLocale = getLocale('en');
- return null;
- }
- if (!config) {
- return;
- }
- /** @type {?} */
- let parentConfig = baseConfig;
- config.abbr = name;
- if (config.parentLocale != null) {
- if (locales[config.parentLocale] != null) {
- parentConfig = locales[config.parentLocale]._config;
- }
- else {
- if (!localeFamilies[config.parentLocale]) {
- localeFamilies[config.parentLocale] = [];
- }
- localeFamilies[config.parentLocale].push({ name, config });
- return null;
- }
- }
- locales[name] = new Locale(mergeConfigs(parentConfig, config));
- if (localeFamilies[name]) {
- localeFamilies[name].forEach((/**
- * @param {?} x
- * @return {?}
- */
- function (x) {
- defineLocale(x.name, x.config);
- }));
- }
- // backwards compat for now: also set the locale
- // make sure we set the locale AFTER all child locales have been
- // created, so we won't end up with the child locale set.
- getSetGlobalLocale(name);
- return locales[name];
- }
- /**
- * @param {?} name
- * @param {?=} config
- * @return {?}
- */
- function updateLocale(name, config) {
- /** @type {?} */
- let _config = config;
- if (_config != null) {
- /** @type {?} */
- let parentConfig = baseConfig;
- // MERGE
- /** @type {?} */
- const tmpLocale = loadLocale(name);
- if (tmpLocale != null) {
- parentConfig = tmpLocale._config;
- }
- _config = mergeConfigs(parentConfig, _config);
- /** @type {?} */
- const locale = new Locale(_config);
- locale.parentLocale = locales[name];
- locales[name] = locale;
- // backwards compat for now: also set the locale
- getSetGlobalLocale(name);
- }
- else {
- // pass null for config to unupdate, useful for tests
- if (locales[name] != null) {
- if (locales[name].parentLocale != null) {
- locales[name] = locales[name].parentLocale;
- }
- else if (locales[name] != null) {
- delete locales[name];
- }
- }
- }
- return locales[name];
- }
- // returns locale data
- /**
- * @param {?=} key
- * @return {?}
- */
- function getLocale(key) {
- setDefaultLocale();
- if (!key) {
- return globalLocale;
- }
- // let locale;
- /** @type {?} */
- const _key = isArray(key) ? key : [key];
- return chooseLocale(_key);
- }
- /**
- * @return {?}
- */
- function listLocales() {
- return Object.keys(locales);
- }
- /**
- * @return {?}
- */
- function setDefaultLocale() {
- if (locales[`en`]) {
- return undefined;
- }
- getSetGlobalLocale('en', {
- dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
- /**
- * @param {?} num
- * @return {?}
- */
- ordinal(num) {
- /** @type {?} */
- const b = num % 10;
- /** @type {?} */
- const output = toInt((num % 100) / 10) === 1
- ? 'th'
- : b === 1 ? 'st' : b === 2 ? 'nd' : b === 3 ? 'rd' : 'th';
- return num + output;
- }
- });
- initWeek();
- initWeekYear();
- initYear();
- initTimezone();
- initTimestamp();
- initSecond();
- initQuarter();
- initOffset();
- initMonth();
- initMinute();
- initMillisecond();
- initHour();
- initDayOfYear();
- initDayOfWeek();
- initDayOfMonth();
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- const ordering = ['year', 'quarter', 'month', 'week', 'day', 'hours', 'minutes', 'seconds', 'milliseconds'];
- const ɵ0 = /**
- * @param {?} mem
- * @param {?} order
- * @return {?}
- */
- (mem, order) => {
- mem[order] = true;
- return mem;
- };
- /** @type {?} */
- const orderingHash = ordering.reduce((ɵ0), {});
- /**
- * @param {?} duration
- * @return {?}
- */
- function isDurationValid(duration) {
- /** @type {?} */
- const durationKeys = Object.keys(duration);
- if (durationKeys
- .some((/**
- * @param {?} key
- * @return {?}
- */
- (key) => {
- return (key in orderingHash)
- && duration[key] === null
- || isNaN(duration[key]);
- }))) {
- return false;
- }
- // for (let key in duration) {
- // if (!(indexOf.call(ordering, key) !== -1 && (duration[key] == null || !isNaN(duration[key])))) {
- // return false;
- // }
- // }
- /** @type {?} */
- let unitHasDecimal = false;
- for (let i = 0; i < ordering.length; ++i) {
- if (duration[ordering[i]]) {
- // only allow non-integers for smallest unit
- if (unitHasDecimal) {
- return false;
- }
- if (duration[ordering[i]] !== toInt(duration[ordering[i]])) {
- unitHasDecimal = true;
- }
- }
- }
- return true;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} number
- * @return {?}
- */
- function absCeil(number) {
- return number < 0 ? Math.floor(number) : Math.ceil(number);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} dur
- * @return {?}
- */
- function bubble(dur) {
- /** @type {?} */
- let milliseconds = dur._milliseconds;
- /** @type {?} */
- let days = dur._days;
- /** @type {?} */
- let months = dur._months;
- /** @type {?} */
- const data = dur._data;
- // if we have a mix of positive and negative values, bubble down first
- // check: https://github.com/moment/moment/issues/2166
- if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
- (milliseconds <= 0 && days <= 0 && months <= 0))) {
- milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
- days = 0;
- months = 0;
- }
- // The following code bubbles up values, see the tests for
- // examples of what that means.
- data.milliseconds = milliseconds % 1000;
- /** @type {?} */
- const seconds = absFloor(milliseconds / 1000);
- data.seconds = seconds % 60;
- /** @type {?} */
- const minutes = absFloor(seconds / 60);
- data.minutes = minutes % 60;
- /** @type {?} */
- const hours = absFloor(minutes / 60);
- data.hours = hours % 24;
- days += absFloor(hours / 24);
- // convert days to months
- /** @type {?} */
- const monthsFromDays = absFloor(daysToMonths(days));
- months += monthsFromDays;
- days -= absCeil(monthsToDays(monthsFromDays));
- // 12 months -> 1 year
- /** @type {?} */
- const years = absFloor(months / 12);
- months %= 12;
- data.day = days;
- data.month = months;
- data.year = years;
- return dur;
- }
- /**
- * @param {?} day
- * @return {?}
- */
- function daysToMonths(day) {
- // 400 years have 146097 days (taking into account leap year rules)
- // 400 years have 12 months === 4800
- return day * 4800 / 146097;
- }
- /**
- * @param {?} month
- * @return {?}
- */
- function monthsToDays(month) {
- // the reverse of daysToMonths
- return month * 146097 / 4800;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- let round = Math.round;
- /** @type {?} */
- const thresholds = {
- ss: 44,
- // a few seconds to seconds
- s: 45,
- // seconds to minute
- m: 45,
- // minutes to hour
- h: 22,
- // hours to day
- d: 26,
- // days to month
- M: 11 // months to year
- };
- // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
- /**
- * @param {?} str
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} isFuture
- * @param {?} locale
- * @return {?}
- */
- function substituteTimeAgo(str, num, withoutSuffix, isFuture, locale) {
- return locale.relativeTime(num || 1, !!withoutSuffix, str, isFuture);
- }
- /**
- * @param {?} posNegDuration
- * @param {?} withoutSuffix
- * @param {?} locale
- * @return {?}
- */
- function relativeTime(posNegDuration, withoutSuffix, locale) {
- /** @type {?} */
- const duration = createDuration(posNegDuration).abs();
- /** @type {?} */
- const seconds = round(duration.as('s'));
- /** @type {?} */
- const minutes = round(duration.as('m'));
- /** @type {?} */
- const hours = round(duration.as('h'));
- /** @type {?} */
- const days = round(duration.as('d'));
- /** @type {?} */
- const months = round(duration.as('M'));
- /** @type {?} */
- const years = round(duration.as('y'));
- /** @type {?} */
- const a = seconds <= thresholds.ss && ['s', seconds] ||
- seconds < thresholds.s && ['ss', seconds] ||
- minutes <= 1 && ['m'] ||
- minutes < thresholds.m && ['mm', minutes] ||
- hours <= 1 && ['h'] ||
- hours < thresholds.h && ['hh', hours] ||
- days <= 1 && ['d'] ||
- days < thresholds.d && ['dd', days] ||
- months <= 1 && ['M'] ||
- months < thresholds.M && ['MM', months] ||
- years <= 1 && ['y'] || ['yy', years];
- /** @type {?} */
- const b = [a[0], a[1], withoutSuffix, +posNegDuration > 0, locale];
- // a[2] = withoutSuffix;
- // a[3] = +posNegDuration > 0;
- // a[4] = locale;
- return substituteTimeAgo.apply(null, b);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- class Duration {
- /**
- * @param {?} duration
- * @param {?=} config
- */
- constructor(duration, config = {}) {
- this._data = {};
- this._locale = getLocale();
- this._locale = config && config._locale || getLocale();
- // const normalizedInput = normalizeObjectUnits(duration);
- /** @type {?} */
- const normalizedInput = duration;
- /** @type {?} */
- const years = normalizedInput.year || 0;
- /** @type {?} */
- const quarters = normalizedInput.quarter || 0;
- /** @type {?} */
- const months = normalizedInput.month || 0;
- /** @type {?} */
- const weeks = normalizedInput.week || 0;
- /** @type {?} */
- const days = normalizedInput.day || 0;
- /** @type {?} */
- const hours = normalizedInput.hours || 0;
- /** @type {?} */
- const minutes = normalizedInput.minutes || 0;
- /** @type {?} */
- const seconds = normalizedInput.seconds || 0;
- /** @type {?} */
- const milliseconds = normalizedInput.milliseconds || 0;
- this._isValid = isDurationValid(normalizedInput);
- // representation for dateAddRemove
- this._milliseconds = +milliseconds +
- seconds * 1000 +
- minutes * 60 * 1000 + // 1000 * 60
- hours * 1000 * 60 * 60; // using 1000 * 60 * 60
- // instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
- // Because of dateAddRemove treats 24 hours as different from a
- // day when working around DST, we need to store them separately
- this._days = +days +
- weeks * 7;
- // It is impossible to translate months into days without knowing
- // which months you are are talking about, so we have to store
- // it separately.
- this._months = +months +
- quarters * 3 +
- years * 12;
- // this._data = {};
- // this._locale = getLocale();
- // this._bubble();
- return bubble(this);
- }
- /**
- * @return {?}
- */
- isValid() {
- return this._isValid;
- }
- /**
- * @param {?=} withSuffix
- * @return {?}
- */
- humanize(withSuffix) {
- // throw new Error(`TODO: implement`);
- if (!this.isValid()) {
- return this.localeData().invalidDate;
- }
- /** @type {?} */
- const locale = this.localeData();
- /** @type {?} */
- let output = relativeTime(this, !withSuffix, locale);
- if (withSuffix) {
- output = locale.pastFuture(+this, output);
- }
- return locale.postformat(output);
- }
- /**
- * @return {?}
- */
- localeData() {
- return this._locale;
- }
- /**
- * @param {?=} localeKey
- * @return {?}
- */
- locale(localeKey) {
- if (!localeKey) {
- return this._locale._abbr;
- }
- this._locale = getLocale(localeKey) || this._locale;
- return this;
- }
- /**
- * @return {?}
- */
- abs() {
- /** @type {?} */
- const mathAbs = Math.abs;
- /** @type {?} */
- const data = this._data;
- this._milliseconds = mathAbs(this._milliseconds);
- this._days = mathAbs(this._days);
- this._months = mathAbs(this._months);
- data.milliseconds = mathAbs(data.milliseconds);
- data.seconds = mathAbs(data.seconds);
- data.minutes = mathAbs(data.minutes);
- data.hours = mathAbs(data.hours);
- data.month = mathAbs(data.month);
- data.year = mathAbs(data.year);
- return this;
- }
- /**
- * @param {?} _units
- * @return {?}
- */
- as(_units) {
- if (!this.isValid()) {
- return NaN;
- }
- /** @type {?} */
- let days;
- /** @type {?} */
- let months;
- /** @type {?} */
- const milliseconds = this._milliseconds;
- /** @type {?} */
- const units = normalizeUnits(_units);
- if (units === 'month' || units === 'year') {
- days = this._days + milliseconds / 864e5;
- months = this._months + daysToMonths(days);
- return units === 'month' ? months : months / 12;
- }
- // handle milliseconds separately because of floating point math errors (issue #1867)
- days = this._days + Math.round(monthsToDays(this._months));
- switch (units) {
- case 'week':
- return days / 7 + milliseconds / 6048e5;
- case 'day':
- return days + milliseconds / 864e5;
- case 'hours':
- return days * 24 + milliseconds / 36e5;
- case 'minutes':
- return days * 1440 + milliseconds / 6e4;
- case 'seconds':
- return days * 86400 + milliseconds / 1000;
- // Math.floor prevents floating point math errors here
- case 'milliseconds':
- return Math.floor(days * 864e5) + milliseconds;
- default:
- throw new Error(`Unknown unit ${units}`);
- }
- }
- /**
- * @return {?}
- */
- valueOf() {
- if (!this.isValid()) {
- return NaN;
- }
- return (this._milliseconds +
- this._days * 864e5 +
- (this._months % 12) * 2592e6 +
- toInt(this._months / 12) * 31536e6);
- }
- }
- /**
- * @param {?} obj
- * @return {?}
- */
- function isDuration(obj) {
- return obj instanceof Duration;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} config
- * @return {?}
- */
- function isValid(config) {
- if (config._isValid == null) {
- /** @type {?} */
- const flags = getParsingFlags(config);
- /** @type {?} */
- const parsedParts = Array.prototype.some.call(flags.parsedDateParts, (/**
- * @param {?} i
- * @return {?}
- */
- function (i) {
- return i != null;
- }));
- /** @type {?} */
- let isNowValid = !isNaN(config._d && config._d.getTime()) &&
- flags.overflow < 0 &&
- !flags.empty &&
- !flags.invalidMonth &&
- !flags.invalidWeekday &&
- !flags.weekdayMismatch &&
- !flags.nullInput &&
- !flags.invalidFormat &&
- !flags.userInvalidated &&
- (!flags.meridiem || (flags.meridiem && parsedParts));
- if (config._strict) {
- isNowValid = isNowValid &&
- flags.charsLeftOver === 0 &&
- flags.unusedTokens.length === 0 &&
- flags.bigHour === undefined;
- }
- if (Object.isFrozen == null || !Object.isFrozen(config)) {
- config._isValid = isNowValid;
- }
- else {
- return isNowValid;
- }
- }
- return config._isValid;
- }
- /**
- * @param {?} config
- * @param {?=} flags
- * @return {?}
- */
- function createInvalid(config, flags) {
- config._d = new Date(NaN);
- Object.assign(getParsingFlags(config), flags || { userInvalidated: true });
- return config;
- }
- /**
- * @param {?} config
- * @return {?}
- */
- function markInvalid(config) {
- config._isValid = false;
- return config;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // iso 8601 regex
- // 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)
- // tslint:disable-next-line
- /** @type {?} */
- const 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)?)?$/;
- // tslint:disable-next-line
- /** @type {?} */
- const 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)?)?$/;
- /** @type {?} */
- const tzRegex = /Z|[+-]\d\d(?::?\d\d)?/;
- /** @type {?} */
- const isoDates = [
- ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/, true],
- ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/, true],
- ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/, true],
- ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
- ['YYYY-DDD', /\d{4}-\d{3}/, true],
- ['YYYY-MM', /\d{4}-\d\d/, false],
- ['YYYYYYMMDD', /[+-]\d{10}/, true],
- ['YYYYMMDD', /\d{8}/, true],
- // YYYYMM is NOT allowed by the standard
- ['GGGG[W]WWE', /\d{4}W\d{3}/, true],
- ['GGGG[W]WW', /\d{4}W\d{2}/, false],
- ['YYYYDDD', /\d{7}/, true]
- ];
- // iso time formats and regexes
- /** @type {?} */
- const isoTimes = [
- ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
- ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
- ['HH:mm:ss', /\d\d:\d\d:\d\d/],
- ['HH:mm', /\d\d:\d\d/],
- ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
- ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
- ['HHmmss', /\d\d\d\d\d\d/],
- ['HHmm', /\d\d\d\d/],
- ['HH', /\d\d/]
- ];
- /** @type {?} */
- const aspNetJsonRegex = /^\/?Date\((\-?\d+)/i;
- /** @type {?} */
- const obsOffsets = {
- UT: 0,
- GMT: 0,
- EDT: -4 * 60,
- EST: -5 * 60,
- CDT: -5 * 60,
- CST: -6 * 60,
- MDT: -6 * 60,
- MST: -7 * 60,
- PDT: -7 * 60,
- PST: -8 * 60
- };
- // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
- // tslint:disable-next-line
- /** @type {?} */
- const 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}))$/;
- // date from iso format
- /**
- * @param {?} config
- * @return {?}
- */
- function configFromISO(config) {
- if (!isString(config._i)) {
- return config;
- }
- /** @type {?} */
- const input = config._i;
- /** @type {?} */
- const match = extendedIsoRegex.exec(input) || basicIsoRegex.exec(input);
- /** @type {?} */
- let allowTime;
- /** @type {?} */
- let dateFormat;
- /** @type {?} */
- let timeFormat;
- /** @type {?} */
- let tzFormat;
- if (!match) {
- config._isValid = false;
- return config;
- }
- // getParsingFlags(config).iso = true;
- /** @type {?} */
- let i;
- /** @type {?} */
- let l;
- for (i = 0, l = isoDates.length; i < l; i++) {
- if (isoDates[i][1].exec(match[1])) {
- dateFormat = isoDates[i][0];
- allowTime = isoDates[i][2] !== false;
- break;
- }
- }
- if (dateFormat == null) {
- config._isValid = false;
- return config;
- }
- if (match[3]) {
- for (i = 0, l = isoTimes.length; i < l; i++) {
- if (isoTimes[i][1].exec(match[3])) {
- // match[2] should be 'T' or space
- timeFormat = (match[2] || ' ') + isoTimes[i][0];
- break;
- }
- }
- if (timeFormat == null) {
- config._isValid = false;
- return config;
- }
- }
- if (!allowTime && timeFormat != null) {
- config._isValid = false;
- return config;
- }
- if (match[4]) {
- if (tzRegex.exec(match[4])) {
- tzFormat = 'Z';
- }
- else {
- config._isValid = false;
- return config;
- }
- }
- config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
- return configFromStringAndFormat(config);
- }
- // tslint:disable-next-line
- /**
- * @param {?} yearStr
- * @param {?} monthStr
- * @param {?} dayStr
- * @param {?} hourStr
- * @param {?} minuteStr
- * @param {?} secondStr
- * @return {?}
- */
- function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
- /** @type {?} */
- const result = [
- untruncateYear(yearStr),
- defaultLocaleMonthsShort.indexOf(monthStr),
- parseInt(dayStr, 10),
- parseInt(hourStr, 10),
- parseInt(minuteStr, 10)
- ];
- if (secondStr) {
- result.push(parseInt(secondStr, 10));
- }
- return result;
- }
- /**
- * @param {?} yearStr
- * @return {?}
- */
- function untruncateYear(yearStr) {
- /** @type {?} */
- const year = parseInt(yearStr, 10);
- return year <= 49 ? year + 2000 : year;
- }
- /**
- * @param {?} str
- * @return {?}
- */
- function preprocessRFC2822(str) {
- // Remove comments and folding whitespace and replace multiple-spaces with a single space
- return str
- .replace(/\([^)]*\)|[\n\t]/g, ' ')
- .replace(/(\s\s+)/g, ' ').trim();
- }
- /**
- * @param {?} weekdayStr
- * @param {?} parsedInput
- * @param {?} config
- * @return {?}
- */
- function checkWeekday(weekdayStr, parsedInput, config) {
- if (weekdayStr) {
- // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.
- /** @type {?} */
- const weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr);
- /** @type {?} */
- const weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();
- if (weekdayProvided !== weekdayActual) {
- getParsingFlags(config).weekdayMismatch = true;
- config._isValid = false;
- return false;
- }
- }
- return true;
- }
- /**
- * @param {?} obsOffset
- * @param {?} militaryOffset
- * @param {?} numOffset
- * @return {?}
- */
- function calculateOffset(obsOffset, militaryOffset, numOffset) {
- if (obsOffset) {
- return obsOffsets[obsOffset];
- }
- else if (militaryOffset) {
- // the only allowed military tz is Z
- return 0;
- }
- else {
- /** @type {?} */
- const hm = parseInt(numOffset, 10);
- /** @type {?} */
- const m = hm % 100;
- /** @type {?} */
- const h = (hm - m) / 100;
- return h * 60 + m;
- }
- }
- // date and time from ref 2822 format
- /**
- * @param {?} config
- * @return {?}
- */
- function configFromRFC2822(config) {
- if (!isString(config._i)) {
- return config;
- }
- /** @type {?} */
- const match = rfc2822.exec(preprocessRFC2822(config._i));
- if (!match) {
- return markInvalid(config);
- }
- /** @type {?} */
- const parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);
- if (!checkWeekday(match[1], parsedArray, config)) {
- return config;
- }
- config._a = parsedArray;
- config._tzm = calculateOffset(match[8], match[9], match[10]);
- config._d = createUTCDate.apply(null, config._a);
- config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
- getParsingFlags(config).rfc2822 = true;
- return config;
- }
- // date from iso format or fallback
- /**
- * @param {?} config
- * @return {?}
- */
- function configFromString(config) {
- if (!isString(config._i)) {
- return config;
- }
- /** @type {?} */
- const matched = aspNetJsonRegex.exec(config._i);
- if (matched !== null) {
- config._d = new Date(+matched[1]);
- return config;
- }
- // todo: update logic processing
- // isISO -> configFromISO
- // isRFC -> configFromRFC
- configFromISO(config);
- if (config._isValid === false) {
- delete config._isValid;
- }
- else {
- return config;
- }
- configFromRFC2822(config);
- if (config._isValid === false) {
- delete config._isValid;
- }
- else {
- return config;
- }
- // Final attempt, use Input Fallback
- // hooks.createFromInputFallback(config);
- return createInvalid(config);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} date
- * @param {?} format
- * @param {?=} locale
- * @param {?=} isUTC
- * @param {?=} offset
- * @return {?}
- */
- function formatDate(date, format, locale, isUTC, offset = 0) {
- /** @type {?} */
- const _locale = getLocale(locale || 'en');
- if (!_locale) {
- throw new Error(`Locale "${locale}" is not defined, please add it with "defineLocale(...)"`);
- }
- /** @type {?} */
- const _format = format || (isUTC ? 'YYYY-MM-DDTHH:mm:ss[Z]' : 'YYYY-MM-DDTHH:mm:ssZ');
- /** @type {?} */
- const output = formatMoment(date, _format, _locale, isUTC, offset);
- if (!output) {
- return output;
- }
- return _locale.postformat(output);
- }
- // format date using native date object
- /**
- * @param {?} date
- * @param {?} _format
- * @param {?} locale
- * @param {?=} isUTC
- * @param {?=} offset
- * @return {?}
- */
- function formatMoment(date, _format, locale, isUTC, offset = 0) {
- if (!isDateValid(date)) {
- return locale.invalidDate;
- }
- /** @type {?} */
- const format = expandFormat(_format, locale);
- formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);
- return formatFunctions[format](date, locale, isUTC, offset);
- }
- /**
- * @param {?} _format
- * @param {?} locale
- * @return {?}
- */
- function expandFormat(_format, locale) {
- /** @type {?} */
- let format = _format;
- /** @type {?} */
- let i = 5;
- /** @type {?} */
- const localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;
- /** @type {?} */
- const replaceLongDateFormatTokens = (/**
- * @param {?} input
- * @return {?}
- */
- (input) => {
- return locale.formatLongDate(input) || input;
- });
- localFormattingTokens.lastIndex = 0;
- while (i >= 0 && localFormattingTokens.test(format)) {
- format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
- localFormattingTokens.lastIndex = 0;
- i -= 1;
- }
- return format;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // Pick the first defined of two or three arguments.
- /**
- * @template T
- * @param {?=} a
- * @param {?=} b
- * @param {?=} c
- * @return {?}
- */
- function defaults(a, b, c) {
- if (a != null) {
- return a;
- }
- if (b != null) {
- return b;
- }
- return c;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} config
- * @return {?}
- */
- function currentDateArray(config) {
- /** @type {?} */
- const nowValue = new Date();
- if (config._useUTC) {
- return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];
- }
- return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
- }
- // convert an array to a date.
- // the array should mirror the parameters below
- // note: all values past the year are optional and will default to the lowest possible value.
- // [year, month, day , hour, minute, second, millisecond]
- /**
- * @param {?} config
- * @return {?}
- */
- function configFromArray(config) {
- /** @type {?} */
- const input = [];
- /** @type {?} */
- let i;
- /** @type {?} */
- let date;
- /** @type {?} */
- let currentDate;
- /** @type {?} */
- let expectedWeekday;
- /** @type {?} */
- let yearToUse;
- if (config._d) {
- return config;
- }
- currentDate = currentDateArray(config);
- // compute day of the year from weeks and weekdays
- if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
- dayOfYearFromWeekInfo(config);
- }
- // if the day of the year is set, figure out what it is
- if (config._dayOfYear != null) {
- yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
- if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {
- getParsingFlags(config)._overflowDayOfYear = true;
- }
- date = new Date(Date.UTC(yearToUse, 0, config._dayOfYear));
- config._a[MONTH] = date.getUTCMonth();
- config._a[DATE] = date.getUTCDate();
- }
- // Default to current date.
- // * if no year, month, day of month are given, default to today
- // * if day of month is given, default month and year
- // * if month is given, default only year
- // * if year is given, don't default anything
- for (i = 0; i < 3 && config._a[i] == null; ++i) {
- config._a[i] = input[i] = currentDate[i];
- }
- // Zero out whatever was not defaulted, including time
- for (; i < 7; i++) {
- config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
- }
- // Check for 24:00:00.000
- if (config._a[HOUR] === 24 &&
- config._a[MINUTE] === 0 &&
- config._a[SECOND] === 0 &&
- config._a[MILLISECOND] === 0) {
- config._nextDay = true;
- config._a[HOUR] = 0;
- }
- config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
- expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();
- // Apply timezone offset from input. The actual utcOffset can be changed
- // with parseZone.
- if (config._tzm != null) {
- config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
- }
- if (config._nextDay) {
- config._a[HOUR] = 24;
- }
- // check for mismatching day of week
- if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {
- getParsingFlags(config).weekdayMismatch = true;
- }
- return config;
- }
- /**
- * @param {?} config
- * @return {?}
- */
- function dayOfYearFromWeekInfo(config) {
- /** @type {?} */
- let w;
- /** @type {?} */
- let weekYear;
- /** @type {?} */
- let week;
- /** @type {?} */
- let weekday;
- /** @type {?} */
- let dow;
- /** @type {?} */
- let doy;
- /** @type {?} */
- let temp;
- /** @type {?} */
- let weekdayOverflow;
- w = config._w;
- if (w.GG != null || w.W != null || w.E != null) {
- dow = 1;
- doy = 4;
- // TODO: We need to take the current isoWeekYear, but that depends on
- // how we interpret now (local, utc, fixed offset). So create
- // a now version of current config (take local/utc/offset flags, and
- // create now).
- weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(new Date(), 1, 4).year);
- week = defaults(w.W, 1);
- weekday = defaults(w.E, 1);
- if (weekday < 1 || weekday > 7) {
- weekdayOverflow = true;
- }
- }
- else {
- dow = config._locale._week.dow;
- doy = config._locale._week.doy;
- /** @type {?} */
- const curWeek = weekOfYear(new Date(), dow, doy);
- weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
- // Default to current week.
- week = defaults(w.w, curWeek.week);
- if (w.d != null) {
- // weekday -- low day numbers are considered next week
- weekday = w.d;
- if (weekday < 0 || weekday > 6) {
- weekdayOverflow = true;
- }
- }
- else if (w.e != null) {
- // local weekday -- counting starts from begining of week
- weekday = w.e + dow;
- if (w.e < 0 || w.e > 6) {
- weekdayOverflow = true;
- }
- }
- else {
- // default to begining of week
- weekday = dow;
- }
- }
- if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
- getParsingFlags(config)._overflowWeeks = true;
- }
- else if (weekdayOverflow != null) {
- getParsingFlags(config)._overflowWeekday = true;
- }
- else {
- temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
- config._a[YEAR] = temp.year;
- config._dayOfYear = temp.dayOfYear;
- }
- return config;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} config
- * @return {?}
- */
- function checkOverflow(config) {
- /** @type {?} */
- let overflow;
- /** @type {?} */
- const a = config._a;
- if (a && getParsingFlags(config).overflow === -2) {
- // todo: fix this sh*t
- overflow =
- a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
- a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
- a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
- a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
- a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
- a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
- -1;
- if (getParsingFlags(config)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
- overflow = DATE;
- }
- if (getParsingFlags(config)._overflowWeeks && overflow === -1) {
- overflow = WEEK;
- }
- if (getParsingFlags(config)._overflowWeekday && overflow === -1) {
- overflow = WEEKDAY;
- }
- getParsingFlags(config).overflow = overflow;
- }
- return config;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // constant that refers to the ISO standard
- // hooks.ISO_8601 = function () {};
- /** @type {?} */
- const ISO_8601 = 'ISO_8601';
- // constant that refers to the RFC 2822 form
- // hooks.RFC_2822 = function () {};
- /** @type {?} */
- const RFC_2822 = 'RFC_2822';
- // date from string and format string
- /**
- * @param {?} config
- * @return {?}
- */
- function configFromStringAndFormat(config) {
- // TODO: Move this to another part of the creation flow to prevent circular deps
- if (config._f === ISO_8601) {
- return configFromISO(config);
- }
- if (config._f === RFC_2822) {
- return configFromRFC2822(config);
- }
- config._a = [];
- getParsingFlags(config).empty = true;
- if (isArray(config._f) || (!config._i && config._i !== 0)) {
- return config;
- }
- // This array is used to make a Date, either with `new Date` or `Date.UTC`
- /** @type {?} */
- let input = config._i.toString();
- /** @type {?} */
- let totalParsedInputLength = 0;
- /** @type {?} */
- const inputLength = input.length;
- /** @type {?} */
- const tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
- /** @type {?} */
- let i;
- /** @type {?} */
- let token;
- /** @type {?} */
- let parsedInput;
- /** @type {?} */
- let skipped;
- for (i = 0; i < tokens.length; i++) {
- token = tokens[i];
- parsedInput = (input.match(getParseRegexForToken(token, config._locale)) || [])[0];
- if (parsedInput) {
- skipped = input.substr(0, input.indexOf(parsedInput));
- if (skipped.length > 0) {
- getParsingFlags(config).unusedInput.push(skipped);
- }
- input = input.slice(input.indexOf(parsedInput) + parsedInput.length);
- totalParsedInputLength += parsedInput.length;
- }
- // don't parse if it's not a known token
- if (formatTokenFunctions[token]) {
- if (parsedInput) {
- getParsingFlags(config).empty = false;
- }
- else {
- getParsingFlags(config).unusedTokens.push(token);
- }
- addTimeToArrayFromToken(token, parsedInput, config);
- }
- else if (config._strict && !parsedInput) {
- getParsingFlags(config).unusedTokens.push(token);
- }
- }
- // add remaining unparsed input length to the string
- getParsingFlags(config).charsLeftOver = inputLength - totalParsedInputLength;
- if (input.length > 0) {
- getParsingFlags(config).unusedInput.push(input);
- }
- // clear _12h flag if hour is <= 12
- if (config._a[HOUR] <= 12 &&
- getParsingFlags(config).bigHour === true &&
- config._a[HOUR] > 0) {
- getParsingFlags(config).bigHour = void 0;
- }
- getParsingFlags(config).parsedDateParts = config._a.slice(0);
- getParsingFlags(config).meridiem = config._meridiem;
- // handle meridiem
- config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
- configFromArray(config);
- return checkOverflow(config);
- }
- /**
- * @param {?} locale
- * @param {?} _hour
- * @param {?} meridiem
- * @return {?}
- */
- function meridiemFixWrap(locale, _hour, meridiem) {
- /** @type {?} */
- let hour = _hour;
- if (meridiem == null) {
- // nothing to do
- return hour;
- }
- if (locale.meridiemHour != null) {
- return locale.meridiemHour(hour, meridiem);
- }
- if (locale.isPM == null) {
- // this is not supposed to happen
- return hour;
- }
- // Fallback
- /** @type {?} */
- const isPm = locale.isPM(meridiem);
- if (isPm && hour < 12) {
- hour += 12;
- }
- if (!isPm && hour === 12) {
- hour = 0;
- }
- return hour;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // date from string and array of format strings
- /**
- * @param {?} config
- * @return {?}
- */
- function configFromStringAndArray(config) {
- /** @type {?} */
- let tempConfig;
- /** @type {?} */
- let bestMoment;
- /** @type {?} */
- let scoreToBeat;
- /** @type {?} */
- let currentScore;
- if (!config._f || config._f.length === 0) {
- getParsingFlags(config).invalidFormat = true;
- return createInvalid(config);
- }
- /** @type {?} */
- let i;
- for (i = 0; i < config._f.length; i++) {
- currentScore = 0;
- tempConfig = Object.assign({}, config);
- if (config._useUTC != null) {
- tempConfig._useUTC = config._useUTC;
- }
- tempConfig._f = config._f[i];
- configFromStringAndFormat(tempConfig);
- if (!isValid(tempConfig)) {
- continue;
- }
- // if there is any input that was not parsed add a penalty for that format
- currentScore += getParsingFlags(tempConfig).charsLeftOver;
- // or tokens
- currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
- getParsingFlags(tempConfig).score = currentScore;
- if (scoreToBeat == null || currentScore < scoreToBeat) {
- scoreToBeat = currentScore;
- bestMoment = tempConfig;
- }
- }
- return Object.assign(config, bestMoment || tempConfig);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} config
- * @return {?}
- */
- function configFromObject(config) {
- if (config._d) {
- return config;
- }
- /** @type {?} */
- const input = config._i;
- if (isObject(input)) {
- /** @type {?} */
- const i = normalizeObjectUnits((/** @type {?} */ (input)));
- config._a = [i.year, i.month, i.day, i.hours, i.minutes, i.seconds, i.milliseconds]
- // todo: obsolete -> remove it
- .map((/**
- * @param {?} obj
- * @return {?}
- */
- obj => isString(obj) ? parseInt(obj, 10) : obj));
- }
- return configFromArray(config);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} config
- * @return {?}
- */
- function createFromConfig(config) {
- /** @type {?} */
- const res = checkOverflow(prepareConfig(config));
- // todo: remove, in moment.js it's never called cuz of moment constructor
- res._d = new Date(res._d != null ? res._d.getTime() : NaN);
- if (!isValid(Object.assign({}, res, { _isValid: null }))) {
- res._d = new Date(NaN);
- }
- // todo: update offset
- /*if (res._nextDay) {
- // Adding is smart enough around DST
- res._d = add(res._d, 1, 'day');
- res._nextDay = undefined;
- }*/
- return res;
- }
- /**
- * @param {?} config
- * @return {?}
- */
- function prepareConfig(config) {
- /** @type {?} */
- let input = config._i;
- /** @type {?} */
- const format = config._f;
- config._locale = config._locale || getLocale(config._l);
- if (input === null || (format === undefined && input === '')) {
- return createInvalid(config, { nullInput: true });
- }
- if (isString(input)) {
- config._i = input = config._locale.preparse(input);
- }
- if (isDate(input)) {
- config._d = cloneDate(input);
- return config;
- }
- // todo: add check for recursion
- if (isArray(format)) {
- configFromStringAndArray(config);
- }
- else if (format) {
- configFromStringAndFormat(config);
- }
- else {
- configFromInput(config);
- }
- if (!isValid(config)) {
- config._d = null;
- }
- return config;
- }
- /**
- * @param {?} config
- * @return {?}
- */
- function configFromInput(config) {
- /** @type {?} */
- const input = config._i;
- if (isUndefined(input)) {
- config._d = new Date();
- }
- else if (isDate(input)) {
- config._d = cloneDate(input);
- }
- else if (isString(input)) {
- configFromString(config);
- }
- else if (isArray(input) && input.length) {
- /** @type {?} */
- const _arr = input.slice(0);
- config._a = _arr.map((/**
- * @param {?} obj
- * @return {?}
- */
- obj => isString(obj) ? parseInt(obj, 10) : obj));
- configFromArray(config);
- }
- else if (isObject(input)) {
- configFromObject(config);
- }
- else if (isNumber(input)) {
- // from milliseconds
- config._d = new Date(input);
- }
- else {
- // hooks.createFromInputFallback(config);
- return createInvalid(config);
- }
- return config;
- }
- /**
- * @param {?} input
- * @param {?=} format
- * @param {?=} localeKey
- * @param {?=} strict
- * @param {?=} isUTC
- * @return {?}
- */
- function createLocalOrUTC(input, format, localeKey, strict, isUTC) {
- /** @type {?} */
- const config = {};
- /** @type {?} */
- let _input = input;
- // params switch -> skip; test it well
- // if (localeKey === true || localeKey === false) {
- // strict = localeKey;
- // localeKey = undefined;
- // }
- // todo: fail fast and return not valid date
- if ((isObject(_input) && isObjectEmpty(_input)) || (isArray(_input) && _input.length === 0)) {
- _input = undefined;
- }
- // object construction must be done this way.
- // https://github.com/moment/moment/issues/1423
- // config._isAMomentObject = true;
- config._useUTC = config._isUTC = isUTC;
- config._l = localeKey;
- config._i = _input;
- config._f = format;
- config._strict = strict;
- return createFromConfig(config);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} input
- * @param {?=} format
- * @param {?=} localeKey
- * @param {?=} strict
- * @param {?=} isUTC
- * @return {?}
- */
- function parseDate(input, format, localeKey, strict, isUTC) {
- if (isDate(input)) {
- return input;
- }
- /** @type {?} */
- const config = createLocalOrUTC(input, format, localeKey, strict, isUTC);
- return config._d;
- }
- /**
- * @param {?} date
- * @return {?}
- */
- function utcAsLocal(date) {
- if (!(date instanceof Date)) {
- return null;
- }
- return new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds(), date.getUTCMilliseconds());
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} num
- * @return {?}
- */
- function absRound(num) {
- return num < 0 ? Math.round(num * -1) * -1 : Math.round(num);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} date1
- * @param {?} date2
- * @param {?=} units
- * @return {?}
- */
- function isAfter(date1, date2, units = 'milliseconds') {
- if (!date1 || !date2) {
- return false;
- }
- if (units === 'milliseconds') {
- return date1.valueOf() > date2.valueOf();
- }
- return date2.valueOf() < startOf(date1, units).valueOf();
- }
- /**
- * @param {?} date1
- * @param {?} date2
- * @param {?=} units
- * @return {?}
- */
- function isBefore(date1, date2, units = 'milliseconds') {
- if (!date1 || !date2) {
- return false;
- }
- if (units === 'milliseconds') {
- return date1.valueOf() < date2.valueOf();
- }
- return endOf(date1, units).valueOf() < date2.valueOf();
- }
- /**
- * @param {?} date
- * @param {?} daysDisabled
- * @return {?}
- */
- function isDisabledDay(date, daysDisabled) {
- if (daysDisabled === undefined || !daysDisabled || !daysDisabled.length) {
- return false;
- }
- return daysDisabled.some((/**
- * @param {?} day
- * @return {?}
- */
- (day) => day === date.getDay()));
- }
- /**
- * @param {?} date1
- * @param {?} date2
- * @param {?=} units
- * @return {?}
- */
- function isSame(date1, date2, units = 'milliseconds') {
- if (!date1 || !date2) {
- return false;
- }
- if (units === 'milliseconds') {
- return date1.valueOf() === date2.valueOf();
- }
- /** @type {?} */
- const inputMs = date2.valueOf();
- return (startOf(date1, units).valueOf() <= inputMs &&
- inputMs <= endOf(date1, units).valueOf());
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /** @type {?} */
- const aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/;
- // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
- // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
- // and further modified to allow for strings containing both week and day
- // tslint:disable-next-line
- /** @type {?} */
- const isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
- /**
- * @param {?=} input
- * @param {?=} key
- * @param {?=} config
- * @return {?}
- */
- function createDuration(input, key, config = {}) {
- /** @type {?} */
- const duration = convertDuration(input, key);
- // matching against regexp is expensive, do it on demand
- return new Duration(duration, config);
- }
- /**
- * @param {?} input
- * @param {?} key
- * @return {?}
- */
- function convertDuration(input, key) {
- // checks for null or undefined
- if (input == null) {
- return {};
- }
- if (isDuration(input)) {
- return {
- milliseconds: input._milliseconds,
- day: input._days,
- month: input._months
- };
- }
- if (isNumber(input)) {
- // duration = {};
- return key ? { [key]: input } : { milliseconds: input };
- }
- if (isString(input)) {
- /** @type {?} */
- let match = aspNetRegex.exec(input);
- if (match) {
- /** @type {?} */
- const sign = (match[1] === '-') ? -1 : 1;
- return {
- year: 0,
- day: toInt(match[DATE]) * sign,
- hours: toInt(match[HOUR]) * sign,
- minutes: toInt(match[MINUTE]) * sign,
- seconds: toInt(match[SECOND]) * sign,
- // the millisecond decimal point is included in the match
- milliseconds: toInt(absRound(toInt(match[MILLISECOND]) * 1000)) * sign
- };
- }
- match = isoRegex.exec(input);
- if (match) {
- /** @type {?} */
- const sign = (match[1] === '-') ? -1 : (match[1] === '+') ? 1 : 1;
- return {
- year: parseIso(match[2], sign),
- month: parseIso(match[3], sign),
- week: parseIso(match[4], sign),
- day: parseIso(match[5], sign),
- hours: parseIso(match[6], sign),
- minutes: parseIso(match[7], sign),
- seconds: parseIso(match[8], sign)
- };
- }
- }
- if (isObject(input) && ('from' in input || 'to' in input)) {
- /** @type {?} */
- const diffRes = momentsDifference(parseDate(input.from), parseDate(input.to));
- return {
- milliseconds: diffRes.milliseconds,
- month: diffRes.months
- };
- }
- return input;
- }
- // createDuration.fn = Duration.prototype;
- // createDuration.invalid = invalid;
- /**
- * @param {?} inp
- * @param {?} sign
- * @return {?}
- */
- function parseIso(inp, sign) {
- // We'd normally use ~~inp for this, but unfortunately it also
- // converts floats to ints.
- // inp may be undefined, so careful calling replace on it.
- /** @type {?} */
- const res = inp && parseFloat(inp.replace(',', '.'));
- // apply sign while we're at it
- return (isNaN(res) ? 0 : res) * sign;
- }
- /**
- * @param {?} base
- * @param {?} other
- * @return {?}
- */
- function positiveMomentsDifference(base, other) {
- /** @type {?} */
- const res = { milliseconds: 0, months: 0 };
- res.months = getMonth(other) - getMonth(base) +
- (getFullYear(other) - getFullYear(base)) * 12;
- /** @type {?} */
- const _basePlus = add(cloneDate(base), res.months, 'month');
- if (isAfter(_basePlus, other)) {
- --res.months;
- }
- res.milliseconds = +other - +(add(cloneDate(base), res.months, 'month'));
- return res;
- }
- /**
- * @param {?} base
- * @param {?} other
- * @return {?}
- */
- function momentsDifference(base, other) {
- if (!(isDateValid(base) && isDateValid(other))) {
- return { milliseconds: 0, months: 0 };
- }
- /** @type {?} */
- let res;
- /** @type {?} */
- const _other = cloneWithOffset(other, base, { _offset: base.getTimezoneOffset() });
- if (isBefore(base, _other)) {
- res = positiveMomentsDifference(base, _other);
- }
- else {
- res = positiveMomentsDifference(_other, base);
- res.milliseconds = -res.milliseconds;
- res.months = -res.months;
- }
- return res;
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @param {?} date
- * @param {?} val
- * @param {?} period
- * @param {?=} isUTC
- * @return {?}
- */
- function add(date, val, period, isUTC) {
- /** @type {?} */
- const dur = createDuration(val, period);
- return addSubtract(date, dur, 1, isUTC);
- }
- /**
- * @param {?} date
- * @param {?} val
- * @param {?} period
- * @param {?=} isUTC
- * @return {?}
- */
- function subtract(date, val, period, isUTC) {
- /** @type {?} */
- const dur = createDuration(val, period);
- return addSubtract(date, dur, -1, isUTC);
- }
- /**
- * @param {?} date
- * @param {?} duration
- * @param {?} isAdding
- * @param {?=} isUTC
- * @return {?}
- */
- function addSubtract(date, duration, isAdding, isUTC) {
- /** @type {?} */
- const milliseconds = duration._milliseconds;
- /** @type {?} */
- const days = absRound(duration._days);
- /** @type {?} */
- const months = absRound(duration._months);
- // todo: add timezones support
- // const _updateOffset = updateOffset == null ? true : updateOffset;
- if (months) {
- setMonth(date, getMonth(date, isUTC) + months * isAdding, isUTC);
- }
- if (days) {
- setDate(date, getDate(date, isUTC) + days * isAdding, isUTC);
- }
- if (milliseconds) {
- setTime(date, getTime(date) + milliseconds * isAdding);
- }
- return cloneDate(date);
- // todo: add timezones support
- // if (_updateOffset) {
- // hooks.updateOffset(date, days || months);
- // }
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- /**
- * @return {?}
- */
- function initDayOfWeek() {
- // FORMATTING
- addFormatToken('d', null, 'do', (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return getDay(date, opts.isUTC)
- .toString(10);
- }));
- addFormatToken('dd', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return opts.locale.weekdaysMin(date, opts.format, opts.isUTC);
- }));
- addFormatToken('ddd', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return opts.locale.weekdaysShort(date, opts.format, opts.isUTC);
- }));
- addFormatToken('dddd', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return opts.locale.weekdays(date, opts.format, opts.isUTC);
- }));
- addFormatToken('e', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return getLocaleDayOfWeek(date, opts.locale, opts.isUTC)
- .toString(10);
- // return getDay(date, opts.isUTC).toString(10);
- }));
- addFormatToken('E', null, null, (/**
- * @param {?} date
- * @param {?} opts
- * @return {?}
- */
- function (date, opts) {
- return getISODayOfWeek(date, opts.isUTC)
- .toString(10);
- }));
- // ALIASES
- addUnitAlias('day', 'd');
- addUnitAlias('weekday', 'e');
- addUnitAlias('isoWeekday', 'E');
- // PARSING
- addRegexToken('d', match1to2);
- addRegexToken('e', match1to2);
- addRegexToken('E', match1to2);
- addRegexToken('dd', (/**
- * @param {?} isStrict
- * @param {?} locale
- * @return {?}
- */
- function (isStrict, locale) {
- return locale.weekdaysMinRegex(isStrict);
- }));
- addRegexToken('ddd', (/**
- * @param {?} isStrict
- * @param {?} locale
- * @return {?}
- */
- function (isStrict, locale) {
- return locale.weekdaysShortRegex(isStrict);
- }));
- addRegexToken('dddd', (/**
- * @param {?} isStrict
- * @param {?} locale
- * @return {?}
- */
- function (isStrict, locale) {
- return locale.weekdaysRegex(isStrict);
- }));
- addWeekParseToken(['dd', 'ddd', 'dddd'], (/**
- * @param {?} input
- * @param {?} week
- * @param {?} config
- * @param {?} token
- * @return {?}
- */
- function (input, week, config, token) {
- /** @type {?} */
- const weekday = config._locale.weekdaysParse(input, token, config._strict);
- // if we didn't get a weekday name, mark the date as invalid
- if (weekday != null) {
- week.d = weekday;
- }
- else {
- getParsingFlags(config).invalidWeekday = !!input;
- }
- return config;
- }));
- addWeekParseToken(['d', 'e', 'E'], (/**
- * @param {?} input
- * @param {?} week
- * @param {?} config
- * @param {?} token
- * @return {?}
- */
- function (input, week, config, token) {
- week[token] = toInt(input);
- return config;
- }));
- }
- // HELPERS
- /**
- * @param {?} input
- * @param {?} locale
- * @return {?}
- */
- function parseWeekday(input, locale) {
- if (!isString(input)) {
- return input;
- }
- /** @type {?} */
- const _num = parseInt(input, 10);
- if (!isNaN(_num)) {
- return _num;
- }
- /** @type {?} */
- const _weekDay = locale.weekdaysParse(input);
- if (isNumber(_weekDay)) {
- return _weekDay;
- }
- return null;
- }
- /**
- * @param {?} input
- * @param {?=} locale
- * @return {?}
- */
- function parseIsoWeekday(input, locale = getLocale()) {
- if (isString(input)) {
- return locale.weekdaysParse(input) % 7 || 7;
- }
- return isNumber(input) && isNaN(input) ? null : input;
- }
- /**
- * @param {?} date
- * @param {?} input
- * @param {?=} locale
- * @param {?=} isUTC
- * @return {?}
- */
- function setDayOfWeek(date, input, locale = getLocale(), isUTC) {
- /** @type {?} */
- const day = getDay(date, isUTC);
- /** @type {?} */
- const _input = parseWeekday(input, locale);
- return add(date, _input - day, 'day');
- }
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getDayOfWeek(date, isUTC) {
- return getDay(date, isUTC);
- }
- /**
- * ****************************************
- * @param {?} date
- * @param {?=} locale
- * @param {?=} isUTC
- * @return {?}
- */
- // todo: utc
- // getSetLocaleDayOfWeek
- function getLocaleDayOfWeek(date, locale = getLocale(), isUTC) {
- return (getDay(date, isUTC) + 7 - locale.firstDayOfWeek()) % 7;
- }
- /**
- * @param {?} date
- * @param {?} input
- * @param {?=} opts
- * @return {?}
- */
- function setLocaleDayOfWeek(date, input, opts = {}) {
- /** @type {?} */
- const weekday = getLocaleDayOfWeek(date, opts.locale, opts.isUTC);
- return add(date, input - weekday, 'day');
- }
- // getSetISODayOfWeek
- /**
- * @param {?} date
- * @param {?=} isUTC
- * @return {?}
- */
- function getISODayOfWeek(date, isUTC) {
- return getDay(date, isUTC) || 7;
- }
- /**
- * @param {?} date
- * @param {?} input
- * @param {?=} opts
- * @return {?}
- */
- function setISODayOfWeek(date, input, opts = {}) {
- // behaves the same as moment#day except
- // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
- // as a setter, sunday should belong to the previous week.
- // behaves the same as moment#day except
- // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
- // as a setter, sunday should belong to the previous week.
- /** @type {?} */
- const weekday = parseIsoWeekday(input, opts.locale);
- return setDayOfWeek(date, getDayOfWeek(date) % 7 ? weekday : weekday - 7);
- }
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- //! moment.js locale configuration
- //! locale : Arabic [ar]
- //! author : Abdel Said: https://github.com/abdelsaid
- //! author : Ahmed Elkhatib
- //! author : forabi https://github.com/forabi
- /** @type {?} */
- const symbolMap = {
- 1: '١',
- 2: '٢',
- 3: '٣',
- 4: '٤',
- 5: '٥',
- 6: '٦',
- 7: '٧',
- 8: '٨',
- 9: '٩',
- 0: '٠'
- };
- /** @type {?} */
- const numberMap = {
- '١': '1',
- '٢': '2',
- '٣': '3',
- '٤': '4',
- '٥': '5',
- '٦': '6',
- '٧': '7',
- '٨': '8',
- '٩': '9',
- '٠': '0'
- };
- /** @type {?} */
- const pluralForm = (/**
- * @param {?} num
- * @return {?}
- */
- function (num) {
- return num === 0 ? 0 : num === 1 ? 1 : num === 2 ? 2 : num % 100 >= 3 && num % 100 <= 10 ? 3 : num % 100 >= 11 ? 4 : 5;
- });
- /** @type {?} */
- const plurals = {
- s: ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],
- m: ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],
- h: ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],
- d: ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],
- M: ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],
- y: ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']
- };
- /** @type {?} */
- const pluralize = (/**
- * @param {?} u
- * @return {?}
- */
- function (u) {
- return (/**
- * @param {?} num
- * @param {?} withoutSuffix
- * @return {?}
- */
- function (num, withoutSuffix) {
- /** @type {?} */
- const f = pluralForm(num);
- /** @type {?} */
- let str = plurals[u][pluralForm(num)];
- if (f === 2) {
- str = str[withoutSuffix ? 0 : 1];
- }
- return ((/** @type {?} */ (str))).replace(/%d/i, num.toString());
- });
- });
- /** @type {?} */
- const months = [
- 'يناير',
- 'فبراير',
- 'مارس',
- 'أبريل',
- 'مايو',
- 'يونيو',
- 'يوليو',
- 'أغسطس',
- 'سبتمبر',
- 'أكتوبر',
- 'نوفمبر',
- 'ديسمبر'
- ];
- /** @type {?} */
- const arLocale = {
- abbr: 'ar',
- months,
- monthsShort: months,
- weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
- weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
- weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'D/\u200FM/\u200FYYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm'
- },
- meridiemParse: /ص|م/,
- /**
- * @param {?} input
- * @return {?}
- */
- isPM(input) {
- return 'م' === input;
- },
- /**
- * @param {?} hour
- * @param {?} minute
- * @param {?} isLower
- * @return {?}
- */
- meridiem(hour, minute, isLower) {
- if (hour < 12) {
- return 'ص';
- }
- else {
- return 'م';
- }
- },
- calendar: {
- sameDay: '[اليوم عند الساعة] LT',
- nextDay: '[غدًا عند الساعة] LT',
- nextWeek: 'dddd [عند الساعة] LT',
- lastDay: '[أمس عند الساعة] LT',
- lastWeek: 'dddd [عند الساعة] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'بعد %s',
- past: 'منذ %s',
- s: pluralize('s'),
- ss: pluralize('s'),
- m: pluralize('m'),
- mm: pluralize('m'),
- h: pluralize('h'),
- hh: pluralize('h'),
- d: pluralize('d'),
- dd: pluralize('d'),
- M: pluralize('M'),
- MM: pluralize('M'),
- y: pluralize('y'),
- yy: pluralize('y')
- },
- /**
- * @param {?} str
- * @return {?}
- */
- preparse(str) {
- return str.replace(/[١٢٣٤٥٦٧٨٩٠]/g, (/**
- * @param {?} match
- * @return {?}
- */
- function (match) {
- return numberMap[match];
- })).replace(/،/g, ',');
- },
- /**
- * @param {?} str
- * @return {?}
- */
- postformat(str) {
- return str.replace(/\d/g, (/**
- * @param {?} match
- * @return {?}
- */
- function (match) {
- return symbolMap[match];
- })).replace(/,/g, '،');
- },
- week: {
- dow: 6,
- // Saturday is the first day of the week.
- doy: 12 // The week that contains Jan 1st is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : Bulgarian [bg]
- //! author : Iskren Ivov Chernev : https://github.com/ichernev
- //! author : Kunal Marwaha : https://github.com/marwahaha
- //! author : Matt Grande : https://github.com/mattgrande
- //! author : Isaac Cambron : https://github.com/icambron
- //! author : Venelin Manchev : https://github.com/vmanchev
- const ɵ0$1 = /**
- * @param {?} d
- * @return {?}
- */
- function (d) {
- switch (d) {
- case 0:
- case 3:
- case 6:
- return '[В изминалата] dddd [в] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[В изминалия] dddd [в] LT';
- }
- };
- /** @type {?} */
- const bgLocale = {
- abbr: 'bg',
- months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'),
- monthsShort: 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
- weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'),
- weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
- weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'D.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY H:mm',
- LLLL: 'dddd, D MMMM YYYY H:mm'
- },
- calendar: {
- sameDay: '[Днес в] LT',
- nextDay: '[Утре в] LT',
- nextWeek: 'dddd [в] LT',
- lastDay: '[Вчера в] LT',
- lastWeek: (ɵ0$1),
- sameElse: 'L'
- },
- relativeTime: {
- future: 'след %s',
- past: 'преди %s',
- s: 'няколко секунди',
- ss: '%d секунди',
- m: 'минута',
- mm: '%d минути',
- h: 'час',
- hh: '%d часа',
- d: 'ден',
- dd: '%d дни',
- M: 'месец',
- MM: '%d месеца',
- y: 'година',
- yy: '%d години'
- },
- dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
- ordinal: (/**
- * @param {?} _num
- * @return {?}
- */
- function (_num) {
- /** @type {?} */
- const number = Number(_num);
- /** @type {?} */
- let lastDigit = number % 10;
- /** @type {?} */
- let last2Digits = number % 100;
- if (number === 0) {
- return number + '-ев';
- }
- else if (last2Digits === 0) {
- return number + '-ен';
- }
- else if (last2Digits > 10 && last2Digits < 20) {
- return number + '-ти';
- }
- else if (lastDigit === 1) {
- return number + '-ви';
- }
- else if (lastDigit === 2) {
- return number + '-ри';
- }
- else if (lastDigit === 7 || lastDigit === 8) {
- return number + '-ми';
- }
- else {
- return number + '-ти';
- }
- }),
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 1st is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Catalan [ca]
- //! author : Xavier Arbat : https://github.com/XavisaurusRex
- /** @type {?} */
- let monthsShortDot = 'gen._feb._mar._abr._mai._jun._jul._ago._set._oct._nov._des.'.split('_');
- /** @type {?} */
- let monthsShort = 'ene_feb_mar_abr_mai_jun_jul_ago_set_oct_nov_des'.split('_');
- /** @type {?} */
- let 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];
- /** @type {?} */
- let 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;
- /** @type {?} */
- const caLocale = {
- abbr: 'ca',
- months: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),
- /**
- * @param {?} date
- * @param {?} format
- * @param {?=} isUTC
- * @return {?}
- */
- monthsShort(date, format, isUTC) {
- if (!date) {
- return monthsShortDot;
- }
- if (/-MMM-/.test(format)) {
- return monthsShort[getMonth(date, isUTC)];
- }
- return monthsShortDot[getMonth(date, isUTC)];
- },
- monthsRegex,
- monthsShortRegex: monthsRegex,
- monthsStrictRegex: /^(gener|febrer|març|abril|maig|juny|juliol|agost|setembre|octubre|novembre|desembre)/i,
- monthsShortStrictRegex: /^(gen\.?|feb\.?|mar\.?|abr\.?|mai\.?|jun\.?|jul\.?|ago\.?|set\.?|oct\.?|nov\.?|des\.?)/i,
- monthsParse,
- longMonthsParse: monthsParse,
- shortMonthsParse: monthsParse,
- weekdays: 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),
- weekdaysShort: 'diu._dil._dim._dix._dij._div._dis.'.split('_'),
- weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY H:mm',
- LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'
- },
- calendar: {
- /**
- * @param {?} date
- * @return {?}
- */
- sameDay(date) {
- return '[avui a ' + ('la' + (getHours(date) !== 1) ? 'les' : '') + '] LT';
- },
- /**
- * @param {?} date
- * @return {?}
- */
- nextDay(date) {
- return '[dema a ' + ('la' + (getHours(date) !== 1) ? 'les' : '') + '] LT';
- },
- /**
- * @param {?} date
- * @return {?}
- */
- nextWeek(date) {
- return 'dddd [a ' + ('la' + (getHours(date) !== 1) ? 'les' : '') + '] LT';
- },
- /**
- * @param {?} date
- * @return {?}
- */
- lastDay(date) {
- return '[ahir a ' + ('la' + (getHours(date) !== 1) ? 'les' : '') + '] LT';
- },
- /**
- * @param {?} date
- * @return {?}
- */
- lastWeek(date) {
- return '[el] dddd [' + ('passada la ' + (getHours(date) !== 1) ? 'passades les' : '') + '] LT';
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'en %s',
- past: 'fa %s',
- s: 'uns segons',
- ss: '%d segons',
- m: 'un minut',
- mm: '%d minuts',
- h: 'una hora',
- hh: '%d hores',
- d: 'un dia',
- dd: '%d dies',
- M: 'un mes',
- MM: '%d mesos',
- y: 'un any',
- yy: '%d anys'
- },
- dayOfMonthOrdinalParse: /\d{1,2}(er|on|er|rt|é)/,
- /**
- * @param {?} _num
- * @return {?}
- */
- ordinal(_num) {
- /** @type {?} */
- const num = Number(_num);
- /** @type {?} */
- const output = (num > 4) ? 'é' :
- (num === 1 || num === 3) ? 'r' :
- (num === 2) ? 'n' :
- (num === 4) ? 't' : 'é';
- return num + output;
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Czech [cs]
- //! author : petrbela : https://github.com/petrbela
- /** @type {?} */
- const months$1 = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_');
- /** @type {?} */
- const monthsShort$1 = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_');
- /**
- * @param {?} num
- * @return {?}
- */
- function plural(num) {
- return (num > 1) && (num < 5) && (~~(num / 10) !== 1);
- }
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function translate(num, withoutSuffix, key, isFuture) {
- /** @type {?} */
- const result = num + ' ';
- switch (key) {
- case 's': // a few seconds / in a few seconds / a few seconds ago
- return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami';
- case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
- if (withoutSuffix || isFuture) {
- return result + (plural(num) ? 'sekundy' : 'sekund');
- }
- else {
- return result + 'sekundami';
- }
- // break;
- case 'm': // a minute / in a minute / a minute ago
- return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou');
- case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
- if (withoutSuffix || isFuture) {
- return result + (plural(num) ? 'minuty' : 'minut');
- }
- else {
- return result + 'minutami';
- }
- // break;
- case 'h': // an hour / in an hour / an hour ago
- return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
- case 'hh': // 9 hours / in 9 hours / 9 hours ago
- if (withoutSuffix || isFuture) {
- return result + (plural(num) ? 'hodiny' : 'hodin');
- }
- else {
- return result + 'hodinami';
- }
- // break;
- case 'd': // a day / in a day / a day ago
- return (withoutSuffix || isFuture) ? 'den' : 'dnem';
- case 'dd': // 9 days / in 9 days / 9 days ago
- if (withoutSuffix || isFuture) {
- return result + (plural(num) ? 'dny' : 'dní');
- }
- else {
- return result + 'dny';
- }
- // break;
- case 'M': // a month / in a month / a month ago
- return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem';
- case 'MM': // 9 months / in 9 months / 9 months ago
- if (withoutSuffix || isFuture) {
- return result + (plural(num) ? 'měsíce' : 'měsíců');
- }
- else {
- return result + 'měsíci';
- }
- // break;
- case 'y': // a year / in a year / a year ago
- return (withoutSuffix || isFuture) ? 'rok' : 'rokem';
- case 'yy': // 9 years / in 9 years / 9 years ago
- if (withoutSuffix || isFuture) {
- return result + (plural(num) ? 'roky' : 'let');
- }
- else {
- return result + 'lety';
- }
- // break;
- }
- }
- const ɵ0$2 = /**
- * @param {?} months
- * @param {?} monthsShort
- * @return {?}
- */
- function (months, monthsShort) {
- /** @type {?} */
- let i;
- /** @type {?} */
- let _monthsParse = [];
- for (i = 0; i < 12; i++) {
- // use custom parser to solve problem with July (červenec)
- _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');
- }
- return _monthsParse;
- }, ɵ1 = /**
- * @param {?} monthsShort
- * @return {?}
- */
- function (monthsShort) {
- /** @type {?} */
- let i;
- /** @type {?} */
- let _shortMonthsParse = [];
- for (i = 0; i < 12; i++) {
- _shortMonthsParse[i] = new RegExp('^' + monthsShort[i] + '$', 'i');
- }
- return _shortMonthsParse;
- }, ɵ2 = /**
- * @param {?} months
- * @return {?}
- */
- function (months) {
- /** @type {?} */
- let i;
- /** @type {?} */
- let _longMonthsParse = [];
- for (i = 0; i < 12; i++) {
- _longMonthsParse[i] = new RegExp('^' + months[i] + '$', 'i');
- }
- return _longMonthsParse;
- };
- /** @type {?} */
- const csLocale = {
- abbr: 'cs',
- months: months$1,
- monthsShort: monthsShort$1,
- monthsParse: ((ɵ0$2)(months$1, monthsShort$1)),
- shortMonthsParse: ((ɵ1)(monthsShort$1)),
- longMonthsParse: ((ɵ2)(months$1)),
- weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
- weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),
- weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd D. MMMM YYYY H:mm',
- l: 'D. M. YYYY'
- },
- calendar: {
- sameDay: '[dnes v] LT',
- nextDay: '[zítra v] LT',
- /**
- * @param {?} date
- * @return {?}
- */
- nextWeek(date) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[v neděli v] LT';
- case 1:
- case 2:
- return '[v] dddd [v] LT';
- case 3:
- return '[ve středu v] LT';
- case 4:
- return '[ve čtvrtek v] LT';
- case 5:
- return '[v pátek v] LT';
- case 6:
- return '[v sobotu v] LT';
- }
- },
- lastDay: '[včera v] LT',
- /**
- * @param {?} date
- * @return {?}
- */
- lastWeek(date) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[minulou neděli v] LT';
- case 1:
- case 2:
- return '[minulé] dddd [v] LT';
- case 3:
- return '[minulou středu v] LT';
- case 4:
- case 5:
- return '[minulý] dddd [v] LT';
- case 6:
- return '[minulou sobotu v] LT';
- }
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'za %s',
- past: 'před %s',
- s: translate,
- ss: translate,
- m: translate,
- mm: translate,
- h: translate,
- hh: translate,
- d: translate,
- dd: translate,
- M: translate,
- MM: translate,
- y: translate,
- yy: translate
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format
- //! moment.js locale configuration
- //! locale : Danish (Denmark) [da]
- //! author : Per Hansen : https://github.com/perhp
- /** @type {?} */
- const daLocale = {
- abbr: 'da',
- months: 'Januar_Februar_Marts_April_Maj_Juni_Juli_August_September_Oktober_November_December'.split('_'),
- monthsShort: 'Jan_Feb_Mar_Apr_Maj_Jun_Jul_Aug_Sep_Okt_Nov_Dec'.split('_'),
- weekdays: 'Søndag_Mandag_Tirsdag_Onsdag_Torsdag_Fredag_Lørdag'.split('_'),
- weekdaysShort: 'Søn_Man_Tir_Ons_Tor_Fre_Lør'.split('_'),
- weekdaysMin: 'Sø_Ma_Ti_On_To_Fr_Lø'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY HH:mm',
- LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm'
- },
- calendar: {
- sameDay: '[i dag kl.] LT',
- nextDay: '[i morgen kl.] LT',
- nextWeek: 'på dddd [kl.] LT',
- lastDay: '[i går kl.] LT',
- lastWeek: '[i] dddd[s kl.] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'om %s',
- past: '%s siden',
- s: 'få sekunder',
- m: 'et minut',
- mm: '%d minutter',
- h: 'en time',
- hh: '%d timer',
- d: 'en dag',
- dd: '%d dage',
- M: 'en måned',
- MM: '%d måneder',
- y: 'et år',
- yy: '%d år'
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- // tslint:disable:object-literal-key-quotes
- //! moment.js locale configuration
- //! locale : German [de]
- //! author : lluchs : https://github.com/lluchs
- //! author: Menelion Elensúle: https://github.com/Oire
- //! author : Mikolaj Dadela : https://github.com/mik01aj
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function processRelativeTime(num, withoutSuffix, key, isFuture) {
- /** @type {?} */
- const format = {
- 'm': ['eine Minute', 'einer Minute'],
- 'h': ['eine Stunde', 'einer Stunde'],
- 'd': ['ein Tag', 'einem Tag'],
- 'dd': [num + ' Tage', num + ' Tagen'],
- 'M': ['ein Monat', 'einem Monat'],
- 'MM': [num + ' Monate', num + ' Monaten'],
- 'y': ['ein Jahr', 'einem Jahr'],
- 'yy': [num + ' Jahre', num + ' Jahren']
- };
- return withoutSuffix ? format[key][0] : format[key][1];
- }
- /** @type {?} */
- const deLocale = {
- abbr: 'de',
- months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
- monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
- monthsParseExact: true,
- weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
- weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
- weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY HH:mm',
- LLLL: 'dddd, D. MMMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[heute um] LT [Uhr]',
- sameElse: 'L',
- nextDay: '[morgen um] LT [Uhr]',
- nextWeek: 'dddd [um] LT [Uhr]',
- lastDay: '[gestern um] LT [Uhr]',
- lastWeek: '[letzten] dddd [um] LT [Uhr]'
- },
- relativeTime: {
- future: 'in %s',
- past: 'vor %s',
- s: 'ein paar Sekunden',
- ss: '%d Sekunden',
- m: processRelativeTime,
- mm: '%d Minuten',
- h: processRelativeTime,
- hh: '%d Stunden',
- d: processRelativeTime,
- dd: processRelativeTime,
- M: processRelativeTime,
- MM: processRelativeTime,
- y: processRelativeTime,
- yy: processRelativeTime
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : English (United Kingdom) [en-gb]
- //! author : Chris Gedrim : https://github.com/chrisgedrim
- /** @type {?} */
- const enGbLocale = {
- abbr: 'en-gb',
- months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
- monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
- weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
- weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'in %s',
- past: '%s ago',
- s: 'a few seconds',
- ss: '%d seconds',
- m: 'a minute',
- mm: '%d minutes',
- h: 'an hour',
- hh: '%d hours',
- d: 'a day',
- dd: '%d days',
- M: 'a month',
- MM: '%d months',
- y: 'a year',
- yy: '%d years'
- },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- /**
- * @param {?} _num
- * @return {?}
- */
- ordinal(_num) {
- /** @type {?} */
- const num = Number(_num);
- /** @type {?} */
- const b = num % 10;
- /** @type {?} */
- const output = (~~(num % 100 / 10) === 1) ? 'th' :
- (b === 1) ? 'st' :
- (b === 2) ? 'nd' :
- (b === 3) ? 'rd' : 'th';
- return num + output;
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Spanish (Dominican Republic) [es-do]
- /** @type {?} */
- let monthsShortDot$1 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
- /** @type {?} */
- let monthsShort$2 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
- /** @type {?} */
- let 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];
- /** @type {?} */
- let 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;
- /** @type {?} */
- const esDoLocale = {
- abbr: 'es-do',
- months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
- /**
- * @param {?} date
- * @param {?} format
- * @param {?=} isUTC
- * @return {?}
- */
- monthsShort(date, format, isUTC) {
- if (!date) {
- return monthsShortDot$1;
- }
- else if (/-MMM-/.test(format)) {
- return monthsShort$2[getMonth(date, isUTC)];
- }
- else {
- return monthsShortDot$1[getMonth(date, isUTC)];
- }
- },
- monthsRegex: monthsRegex$1,
- monthsShortRegex: monthsRegex$1,
- monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
- monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
- monthsParse: monthsParse$1,
- longMonthsParse: monthsParse$1,
- shortMonthsParse: monthsParse$1,
- weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
- weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
- weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'DD/MM/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY h:mm A',
- LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A'
- },
- calendar: {
- /**
- * @param {?} date
- * @return {?}
- */
- sameDay(date) {
- return '[hoy a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- /**
- * @param {?} date
- * @return {?}
- */
- nextDay(date) {
- return '[mañana a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- /**
- * @param {?} date
- * @return {?}
- */
- nextWeek(date) {
- return 'dddd [a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- /**
- * @param {?} date
- * @return {?}
- */
- lastDay(date) {
- return '[ayer a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- /**
- * @param {?} date
- * @return {?}
- */
- lastWeek(date) {
- return '[el] dddd [pasado a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'en %s',
- past: 'hace %s',
- s: 'unos segundos',
- ss: '%d segundos',
- m: 'un minuto',
- mm: '%d minutos',
- h: 'una hora',
- hh: '%d horas',
- d: 'un día',
- dd: '%d días',
- M: 'un mes',
- MM: '%d meses',
- y: 'un año',
- yy: '%d años'
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Spanish [es]
- //! author : Julio Napurí : https://github.com/julionc
- /** @type {?} */
- let monthsShortDot$2 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
- /** @type {?} */
- let monthsShort$3 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
- /** @type {?} */
- let 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];
- /** @type {?} */
- let 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;
- /** @type {?} */
- const esLocale = {
- abbr: 'es',
- months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
- /**
- * @param {?} date
- * @param {?} format
- * @param {?=} isUTC
- * @return {?}
- */
- monthsShort(date, format, isUTC) {
- if (!date) {
- return monthsShortDot$2;
- }
- if (/-MMM-/.test(format)) {
- return monthsShort$3[getMonth(date, isUTC)];
- }
- return monthsShortDot$2[getMonth(date, isUTC)];
- },
- monthsRegex: monthsRegex$2,
- monthsShortRegex: monthsRegex$2,
- monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
- monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
- monthsParse: monthsParse$2,
- longMonthsParse: monthsParse$2,
- shortMonthsParse: monthsParse$2,
- weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
- weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
- weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY H:mm',
- LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'
- },
- calendar: {
- /**
- * @param {?} date
- * @return {?}
- */
- sameDay(date) {
- return '[hoy a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- /**
- * @param {?} date
- * @return {?}
- */
- nextDay(date) {
- return '[mañana a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- /**
- * @param {?} date
- * @return {?}
- */
- nextWeek(date) {
- return 'dddd [a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- /**
- * @param {?} date
- * @return {?}
- */
- lastDay(date) {
- return '[ayer a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- /**
- * @param {?} date
- * @return {?}
- */
- lastWeek(date) {
- return '[el] dddd [pasado a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'en %s',
- past: 'hace %s',
- s: 'unos segundos',
- ss: '%d segundos',
- m: 'un minuto',
- mm: '%d minutos',
- h: 'una hora',
- hh: '%d horas',
- d: 'un día',
- dd: '%d días',
- M: 'un mes',
- MM: '%d meses',
- y: 'un año',
- yy: '%d años'
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Spanish (United States) [es-us]
- //! author : bustta : https://github.com/bustta
- /** @type {?} */
- let monthsShortDot$3 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
- /** @type {?} */
- let monthsShort$4 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
- /** @type {?} */
- const esUsLocale = {
- abbr: 'es-us',
- months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
- /**
- * @param {?} date
- * @param {?} format
- * @param {?=} isUTC
- * @return {?}
- */
- monthsShort(date, format, isUTC) {
- if (!date) {
- return monthsShortDot$3;
- }
- else if (/-MMM-/.test(format)) {
- return monthsShort$4[getMonth(date, isUTC)];
- }
- else {
- return monthsShortDot$3[getMonth(date, isUTC)];
- }
- },
- monthsParseExact: true,
- weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
- weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
- weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'h:mm A',
- LTS: 'h:mm:ss A',
- L: 'MM/DD/YYYY',
- LL: 'MMMM [de] D [de] YYYY',
- LLL: 'MMMM [de] D [de] YYYY h:mm A',
- LLLL: 'dddd, MMMM [de] D [de] YYYY h:mm A'
- },
- calendar: {
- /**
- * @param {?} date
- * @return {?}
- */
- sameDay(date) {
- return '[hoy a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- /**
- * @param {?} date
- * @return {?}
- */
- nextDay(date) {
- return '[mañana a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- /**
- * @param {?} date
- * @return {?}
- */
- nextWeek(date) {
- return 'dddd [a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- /**
- * @param {?} date
- * @return {?}
- */
- lastDay(date) {
- return '[ayer a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- /**
- * @param {?} date
- * @return {?}
- */
- lastWeek(date) {
- return '[el] dddd [pasado a la' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'en %s',
- past: 'hace %s',
- s: 'unos segundos',
- ss: '%d segundos',
- m: 'un minuto',
- mm: '%d minutos',
- h: 'una hora',
- hh: '%d horas',
- d: 'un día',
- dd: '%d días',
- M: 'un mes',
- MM: '%d meses',
- y: 'un año',
- yy: '%d años'
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 0,
- // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 1st is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : Estonian [et]
- //! author : Chris Gedrim : https://github.com/a90machado
- /** @type {?} */
- const processRelativeTime$1 = (/**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function (num, withoutSuffix, key, isFuture) {
- /** @type {?} */
- const format = {
- s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
- ss: [num + 'sekundi', num + 'sekundit'],
- m: ['ühe minuti', 'üks minut'],
- mm: [num + ' minuti', num + ' minutit'],
- h: ['ühe tunni', 'tund aega', 'üks tund'],
- hh: [num + ' tunni', num + ' tundi'],
- d: ['ühe päeva', 'üks päev'],
- M: ['kuu aja', 'kuu aega', 'üks kuu'],
- MM: [num + ' kuu', num + ' kuud'],
- y: ['ühe aasta', 'aasta', 'üks aasta'],
- yy: [num + ' aasta', num + ' aastat']
- };
- if (withoutSuffix) {
- return format[key][2] ? format[key][2] : format[key][1];
- }
- return isFuture ? format[key][0] : format[key][1];
- });
- /** @type {?} */
- const etLocale = {
- abbr: 'et',
- months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'),
- monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),
- weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'),
- weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),
- weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd, D. MMMM YYYY H:mm'
- },
- calendar: {
- sameDay: '[Täna,] LT',
- nextDay: '[Homme,] LT',
- nextWeek: '[Järgmine] dddd LT',
- lastDay: '[Eile,] LT',
- lastWeek: '[Eelmine] dddd LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: '%s pärast',
- past: '%s tagasi',
- s: processRelativeTime$1,
- ss: processRelativeTime$1,
- m: processRelativeTime$1,
- mm: processRelativeTime$1,
- h: processRelativeTime$1,
- hh: processRelativeTime$1,
- d: processRelativeTime$1,
- dd: '%d päeva',
- M: processRelativeTime$1,
- MM: processRelativeTime$1,
- y: processRelativeTime$1,
- yy: processRelativeTime$1
- },
- dayOfMonthOrdinalParse: /\d{1,2}./,
- ordinal: '%d.',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- // https://github.com/moment/moment/blob/develop/locale/fi.js
- /** @type {?} */
- var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' ');
- /** @type {?} */
- var numbersFuture = [
- 'nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden',
- numbersPast[7], numbersPast[8], numbersPast[9]
- ];
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function translate$1(num, withoutSuffix, key, isFuture) {
- /** @type {?} */
- var result = '';
- switch (key) {
- case 's':
- return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
- case 'ss':
- return isFuture ? 'sekunnin' : 'sekuntia';
- case 'm':
- return isFuture ? 'minuutin' : 'minuutti';
- case 'mm':
- result = isFuture ? 'minuutin' : 'minuuttia';
- break;
- case 'h':
- return isFuture ? 'tunnin' : 'tunti';
- case 'hh':
- result = isFuture ? 'tunnin' : 'tuntia';
- break;
- case 'd':
- return isFuture ? 'päivän' : 'päivä';
- case 'dd':
- result = isFuture ? 'päivän' : 'päivää';
- break;
- case 'M':
- return isFuture ? 'kuukauden' : 'kuukausi';
- case 'MM':
- result = isFuture ? 'kuukauden' : 'kuukautta';
- break;
- case 'y':
- return isFuture ? 'vuoden' : 'vuosi';
- case 'yy':
- result = isFuture ? 'vuoden' : 'vuotta';
- break;
- }
- result = verbalNumber(num, isFuture) + ' ' + result;
- return result;
- }
- /**
- * @param {?} num
- * @param {?} isFuture
- * @return {?}
- */
- function verbalNumber(num, isFuture) {
- return num < 10 ? (isFuture ? numbersFuture[num] : numbersPast[num]) : num;
- }
- /** @type {?} */
- const fiLocale = {
- abbr: 'fi',
- months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'),
- monthsShort: 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'),
- weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'),
- weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),
- weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),
- longDateFormat: {
- LT: 'HH.mm',
- LTS: 'HH.mm.ss',
- L: 'DD.MM.YYYY',
- LL: 'Do MMMM[ta] YYYY',
- LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',
- LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
- l: 'D.M.YYYY',
- ll: 'Do MMM YYYY',
- lll: 'Do MMM YYYY, [klo] HH.mm',
- llll: 'ddd, Do MMM YYYY, [klo] HH.mm'
- },
- calendar: {
- sameDay: '[tänään] [klo] LT',
- nextDay: '[huomenna] [klo] LT',
- nextWeek: 'dddd [klo] LT',
- lastDay: '[eilen] [klo] LT',
- lastWeek: '[viime] dddd[na] [klo] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: '%s päästä',
- past: '%s sitten',
- s: translate$1,
- ss: translate$1,
- m: translate$1,
- mm: translate$1,
- h: translate$1,
- hh: translate$1,
- d: translate$1,
- dd: translate$1,
- M: translate$1,
- MM: translate$1,
- y: translate$1,
- yy: translate$1
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : French [fr]
- //! author : John Fischer : https://github.com/jfroffice
- /** @type {?} */
- const frLocale = {
- abbr: 'fr',
- months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
- monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
- monthsParseExact: true,
- weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
- weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
- weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[Aujourd’hui à] LT',
- nextDay: '[Demain à] LT',
- nextWeek: 'dddd [à] LT',
- lastDay: '[Hier à] LT',
- lastWeek: 'dddd [dernier à] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'dans %s',
- past: 'il y a %s',
- s: 'quelques secondes',
- ss: '%d secondes',
- m: 'une minute',
- mm: '%d minutes',
- h: 'une heure',
- hh: '%d heures',
- d: 'un jour',
- dd: '%d jours',
- M: 'un mois',
- MM: '%d mois',
- y: 'un an',
- yy: '%d ans'
- },
- dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
- /**
- * @param {?} _num
- * @param {?} period
- * @return {?}
- */
- ordinal(_num, period) {
- /** @type {?} */
- const num = Number(_num);
- switch (period) {
- // TODO: Return 'e' when day of month > 1. Move this case inside
- // block for masculine words below.
- // See https://github.com/moment/moment/issues/3375
- case 'D':
- return num + (num === 1 ? 'er' : '');
- // Words with masculine grammatical gender: mois, trimestre, jour
- default:
- case 'M':
- case 'Q':
- case 'DDD':
- case 'd':
- return num + (num === 1 ? 'er' : 'e');
- // Words with feminine grammatical gender: semaine
- case 'w':
- case 'W':
- return num + (num === 1 ? 're' : 'e');
- }
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Galician [gl]
- //! author : Darío Beiró : https://github.com/quinobravo
- /** @type {?} */
- let monthsShortDot$4 = 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split('_');
- /** @type {?} */
- let monthsShort$5 = 'xan_feb_mar_abr_mai_xuñ_xul_ago_set_out_nov_dec'.split('_');
- /** @type {?} */
- let 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];
- /** @type {?} */
- let 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;
- /** @type {?} */
- const glLocale = {
- abbr: 'gl',
- months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'),
- /**
- * @param {?} date
- * @param {?} format
- * @param {?=} isUTC
- * @return {?}
- */
- monthsShort(date, format, isUTC) {
- if (!date) {
- return monthsShortDot$4;
- }
- if (/-MMM-/.test(format)) {
- return monthsShort$5[getMonth(date, isUTC)];
- }
- return monthsShortDot$4[getMonth(date, isUTC)];
- },
- monthsRegex: monthsRegex$3,
- monthsShortRegex: monthsRegex$3,
- monthsStrictRegex: /^(xaneiro|febreiro|marzo|abril|maio|xuño|xullo|agosto|setembro|outubro|novembro|decembro)/i,
- monthsShortStrictRegex: /^(xan\.?|feb\.?|mar\.?|abr\.?|mai\.?|xuñ\.?|xul\.?|ago\.?|set\.?|out\.?|nov\.?|dec\.?)/i,
- monthsParse: monthsParse$3,
- longMonthsParse: monthsParse$3,
- shortMonthsParse: monthsParse$3,
- weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
- weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
- weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY H:mm',
- LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm'
- },
- calendar: {
- /**
- * @param {?} date
- * @return {?}
- */
- sameDay(date) {
- return '[hoxe á' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- /**
- * @param {?} date
- * @return {?}
- */
- nextDay(date) {
- return '[mañan á' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- /**
- * @param {?} date
- * @return {?}
- */
- nextWeek(date) {
- return 'dddd [á' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- /**
- * @param {?} date
- * @return {?}
- */
- lastDay(date) {
- return '[onte á' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- /**
- * @param {?} date
- * @return {?}
- */
- lastWeek(date) {
- return '[o] dddd [pasado á' + ((getHours(date) !== 1) ? 's' : '') + '] LT';
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'en %s',
- past: 'fai %s',
- s: 'uns segundos',
- ss: '%d segundos',
- m: 'un minuto',
- mm: '%d minutos',
- h: 'unha hora',
- hh: '%d horas',
- d: 'un día',
- dd: '%d días',
- M: 'un mes',
- MM: '%d meses',
- y: 'un ano',
- yy: '%d anos'
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : Hebrew [he]
- //! author : Tomer Cohen : https://github.com/tomer
- //! author : Moshe Simantov : https://github.com/DevelopmentIL
- //! author : Tal Ater : https://github.com/TalAter
- /** @type {?} */
- const heLocale = {
- abbr: 'he',
- months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'),
- monthsShort: 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),
- weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
- weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
- weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [ב]MMMM YYYY',
- LLL: 'D [ב]MMMM YYYY HH:mm',
- LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',
- l: 'D/M/YYYY',
- ll: 'D MMM YYYY',
- lll: 'D MMM YYYY HH:mm',
- llll: 'ddd, D MMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[היום ב־]LT',
- nextDay: '[מחר ב־]LT',
- nextWeek: 'dddd [בשעה] LT',
- lastDay: '[אתמול ב־]LT',
- lastWeek: '[ביום] dddd [האחרון בשעה] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'בעוד %s',
- past: 'לפני %s',
- s: 'מספר שניות',
- ss: '%d שניות',
- m: 'דקה',
- mm: '%d דקות',
- h: 'שעה',
- /**
- * @param {?} num
- * @return {?}
- */
- hh(num) {
- if (num === 2) {
- return 'שעתיים';
- }
- return num + ' שעות';
- },
- d: 'יום',
- /**
- * @param {?} num
- * @return {?}
- */
- dd(num) {
- if (num === 2) {
- return 'יומיים';
- }
- return num + ' ימים';
- },
- M: 'חודש',
- /**
- * @param {?} num
- * @return {?}
- */
- MM(num) {
- if (num === 2) {
- return 'חודשיים';
- }
- return num + ' חודשים';
- },
- y: 'שנה',
- /**
- * @param {?} num
- * @return {?}
- */
- yy(num) {
- if (num === 2) {
- return 'שנתיים';
- }
- else if (num % 10 === 0 && num !== 10) {
- return num + ' שנה';
- }
- return num + ' שנים';
- }
- },
- meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
- /**
- * @param {?} input
- * @return {?}
- */
- isPM(input) {
- return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
- },
- /**
- * @param {?} hour
- * @param {?} minute
- * @param {?} isLower
- * @return {?}
- */
- meridiem(hour, minute, isLower) {
- if (hour < 5) {
- return 'לפנות בוקר';
- }
- else if (hour < 10) {
- return 'בבוקר';
- }
- else if (hour < 12) {
- return isLower ? 'לפנה"צ' : 'לפני הצהריים';
- }
- else if (hour < 18) {
- return isLower ? 'אחה"צ' : 'אחרי הצהריים';
- }
- else {
- return 'בערב';
- }
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- // tslint:disable:no-parameter-reassignment prefer-switch
- //! moment.js locale configuration
- //! locale : Hindi [hi]
- //! author : Mayank Singhal : https://github.com/mayanksinghal
- /** @type {?} */
- let symbolMap$1 = {
- 1: '१',
- 2: '२',
- 3: '३',
- 4: '४',
- 5: '५',
- 6: '६',
- 7: '७',
- 8: '८',
- 9: '९',
- 0: '०'
- };
- /** @type {?} */
- let numberMap$1 = {
- '१': '1',
- '२': '2',
- '३': '3',
- '४': '4',
- '५': '5',
- '६': '6',
- '७': '7',
- '८': '8',
- '९': '9',
- '०': '0'
- };
- /** @type {?} */
- const hiLocale = {
- abbr: 'hi',
- months: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'),
- monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
- monthsParseExact: true,
- weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
- weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
- weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
- longDateFormat: {
- LT: 'A h:mm बजे',
- LTS: 'A h:mm:ss बजे',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY, A h:mm बजे',
- LLLL: 'dddd, D MMMM YYYY, A h:mm बजे'
- },
- calendar: {
- sameDay: '[आज] LT',
- nextDay: '[कल] LT',
- nextWeek: 'dddd, LT',
- lastDay: '[कल] LT',
- lastWeek: '[पिछले] dddd, LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: '%s में',
- past: '%s पहले',
- s: 'कुछ ही क्षण',
- ss: '%d सेकंड',
- m: 'एक मिनट',
- mm: '%d मिनट',
- h: 'एक घंटा',
- hh: '%d घंटे',
- d: 'एक दिन',
- dd: '%d दिन',
- M: 'एक महीने',
- MM: '%d महीने',
- y: 'एक वर्ष',
- yy: '%d वर्ष'
- },
- /**
- * @param {?} str
- * @return {?}
- */
- preparse(str) {
- return str.replace(/[१२३४५६७८९०]/g, (/**
- * @param {?} match
- * @return {?}
- */
- function (match) {
- return numberMap$1[match];
- }));
- },
- /**
- * @param {?} str
- * @return {?}
- */
- postformat(str) {
- return str.replace(/\d/g, (/**
- * @param {?} match
- * @return {?}
- */
- function (match) {
- return symbolMap$1[match];
- }));
- },
- // Hindi notation for meridiems are quite fuzzy in practice. While there exists
- // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
- meridiemParse: /रात|सुबह|दोपहर|शाम/,
- /**
- * @param {?} hour
- * @param {?} meridiem
- * @return {?}
- */
- meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'रात') {
- return hour < 4 ? hour : hour + 12;
- }
- else if (meridiem === 'सुबह') {
- return hour;
- }
- else if (meridiem === 'दोपहर') {
- return hour >= 10 ? hour : hour + 12;
- }
- else if (meridiem === 'शाम') {
- return hour + 12;
- }
- },
- /**
- * @param {?} hour
- * @param {?} minute
- * @param {?} isLower
- * @return {?}
- */
- meridiem(hour, minute, isLower) {
- if (hour < 4) {
- return 'रात';
- }
- else if (hour < 10) {
- return 'सुबह';
- }
- else if (hour < 17) {
- return 'दोपहर';
- }
- else if (hour < 20) {
- return 'शाम';
- }
- else {
- return 'रात';
- }
- },
- week: {
- dow: 0,
- // Sunday is the first day of the week.
- doy: 6 // The week that contains Jan 1st is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Hungarian [hu]
- //! author : Adam Brunner : https://github.com/adambrunner
- /** @type {?} */
- let weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function translate$2(num, withoutSuffix, key, isFuture) {
- switch (key) {
- case 's':
- return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
- case 'ss':
- return num + ((isFuture || withoutSuffix) ? ' másodperc' : ' másodperce');
- case 'm':
- return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
- case 'mm':
- return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
- case 'h':
- return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
- case 'hh':
- return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
- case 'd':
- return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
- case 'dd':
- return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
- case 'M':
- return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
- case 'MM':
- return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
- case 'y':
- return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
- case 'yy':
- return num + (isFuture || withoutSuffix ? ' év' : ' éve');
- }
- return '';
- }
- /**
- * @param {?} date
- * @param {?} isFuture
- * @return {?}
- */
- function week(date, isFuture) {
- return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[getDayOfWeek(date)] + '] LT[-kor]';
- }
- /** @type {?} */
- const huLocale = {
- abbr: 'hu',
- months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'),
- monthsShort: 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'),
- weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
- weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
- weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'YYYY.MM.DD.',
- LL: 'YYYY. MMMM D.',
- LLL: 'YYYY. MMMM D. H:mm',
- LLLL: 'YYYY. MMMM D., dddd H:mm'
- },
- meridiemParse: /de|du/i,
- /**
- * @param {?} input
- * @return {?}
- */
- isPM(input) {
- return input.charAt(1).toLowerCase() === 'u';
- },
- /**
- * @param {?} hours
- * @param {?} minutes
- * @param {?} isLower
- * @return {?}
- */
- meridiem(hours, minutes, isLower) {
- if (hours < 12) {
- return isLower === true ? 'de' : 'DE';
- }
- else {
- return isLower === true ? 'du' : 'DU';
- }
- },
- calendar: {
- sameDay: '[ma] LT[-kor]',
- nextDay: '[holnap] LT[-kor]',
- /**
- * @param {?} date
- * @return {?}
- */
- nextWeek(date) {
- return week(date, true);
- },
- lastDay: '[tegnap] LT[-kor]',
- /**
- * @param {?} date
- * @return {?}
- */
- lastWeek(date) {
- return week(date, false);
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: '%s múlva',
- past: '%s',
- s: translate$2,
- ss: translate$2,
- m: translate$2,
- mm: translate$2,
- h: translate$2,
- hh: translate$2,
- d: translate$2,
- dd: translate$2,
- M: translate$2,
- MM: translate$2,
- y: translate$2,
- yy: translate$2
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : Croatian [hr]
- //! author : Danijel Grmec : https://github.com/cobaltsis
- /** @type {?} */
- const hrLocale = {
- abbr: 'hr',
- months: 'Siječanj_Veljača_Ožujak_Travanj_Svibanj_Lipanj_Srpanj_Kolovoz_Rujan_Listopad_Studeni_Prosinac'.split('_'),
- monthsShort: 'Sij_Velj_Ožu_Tra_Svi_Lip_Srp_Kol_Ruj_Lis_Stu_Pro'.split('_'),
- weekdays: 'Nedjelja_Ponedjeljak_Utorak_Srijeda_Četvrtak_Petak_Subota'.split('_'),
- weekdaysShort: 'Ned_Pon_Uto_Sri_Čet_Pet_Sub'.split('_'),
- weekdaysMin: 'Ne_Po_Ut_Sr_Če_Pe_Su'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[Danas u] LT',
- nextDay: '[Sutra u] LT',
- nextWeek: 'dddd [u] LT',
- lastDay: '[Jučer u] LT',
- lastWeek: '[Zadnji] dddd [u] LT',
- sameElse: 'L'
- },
- invalidDate: 'Neispravan datum',
- relativeTime: {
- future: 'za %s',
- past: '%s prije',
- s: 'nekoliko sekundi',
- ss: '%d sekundi',
- m: 'minuta',
- mm: '%d minuta',
- h: 'sat',
- hh: '%d sati',
- d: 'dan',
- dd: '%d dana',
- M: 'mjesec',
- MM: '%d mjeseci',
- y: 'godina',
- yy: '%d godina'
- },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- /**
- * @param {?} _num
- * @return {?}
- */
- ordinal(_num) {
- /** @type {?} */
- const num = Number(_num);
- /** @type {?} */
- const b = num % 10;
- /** @type {?} */
- const output = (~~(num % 100 / 10) === 1) ? '.' :
- (b === 1) ? '.' :
- (b === 2) ? '.' :
- (b === 3) ? '.' : '.';
- return num + output;
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- // tslint:disable:no-parameter-reassignment prefer-switch
- //! moment.js locale configuration
- //! locale : Indonesia [id]
- //! author : Romy Kusuma : https://github.com/rkusuma
- //! reference: https://github.com/moment/moment/blob/develop/locale/id.js
- /** @type {?} */
- const idLocale = {
- abbr: 'id',
- months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'),
- monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des'.split('_'),
- weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
- weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
- weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
- longDateFormat: {
- LT: 'HH.mm',
- LTS: 'HH.mm.ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY [pukul] HH.mm',
- LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm'
- },
- meridiemParse: /pagi|siang|sore|malam/,
- /**
- * @param {?} hour
- * @param {?} meridiem
- * @return {?}
- */
- meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === 'pagi') {
- return hour;
- }
- else if (meridiem === 'siang') {
- return hour >= 11 ? hour : hour + 12;
- }
- else if (meridiem === 'sore' || meridiem === 'malam') {
- return hour + 12;
- }
- },
- /**
- * @param {?} hours
- * @param {?} minutes
- * @param {?} isLower
- * @return {?}
- */
- meridiem(hours, minutes, isLower) {
- if (hours < 11) {
- return 'pagi';
- }
- else if (hours < 15) {
- return 'siang';
- }
- else if (hours < 19) {
- return 'sore';
- }
- else {
- return 'malam';
- }
- },
- calendar: {
- sameDay: '[Hari ini pukul] LT',
- nextDay: '[Besok pukul] LT',
- nextWeek: 'dddd [pukul] LT',
- lastDay: '[Kemarin pukul] LT',
- lastWeek: 'dddd [lalu pukul] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'dalam %s',
- past: '%s yang lalu',
- s: 'beberapa detik',
- ss: '%d detik',
- m: 'semenit',
- mm: '%d menit',
- h: 'sejam',
- hh: '%d jam',
- d: 'sehari',
- dd: '%d hari',
- M: 'sebulan',
- MM: '%d bulan',
- y: 'setahun',
- yy: '%d tahun'
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 1st is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Italian [it]
- //! author : Lorenzo : https://github.com/aliem
- //! author: Mattia Larentis: https://github.com/nostalgiaz
- /** @type {?} */
- const itLocale = {
- abbr: 'it',
- months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),
- monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
- weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'),
- weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
- weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[Oggi alle] LT',
- nextDay: '[Domani alle] LT',
- nextWeek: 'dddd [alle] LT',
- lastDay: '[Ieri alle] LT',
- /**
- * @param {?} date
- * @return {?}
- */
- lastWeek(date) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[la scorsa] dddd [alle] LT';
- default:
- return '[lo scorso] dddd [alle] LT';
- }
- },
- sameElse: 'L'
- },
- relativeTime: {
- /**
- * @param {?} num
- * @return {?}
- */
- future(num) {
- return ((/^[0-9].+$/).test(num.toString(10)) ? 'tra' : 'in') + ' ' + num;
- },
- past: '%s fa',
- s: 'alcuni secondi',
- ss: '%d secondi',
- m: 'un minuto',
- mm: '%d minuti',
- h: 'un\'ora',
- hh: '%d ore',
- d: 'un giorno',
- dd: '%d giorni',
- M: 'un mese',
- MM: '%d mesi',
- y: 'un anno',
- yy: '%d anni'
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : Japanese [ja]
- //! author : LI Long : https://github.com/baryon
- /** @type {?} */
- const jaLocale = {
- abbr: 'ja',
- months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
- monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
- weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
- weekdaysShort: '日_月_火_水_木_金_土'.split('_'),
- weekdaysMin: '日_月_火_水_木_金_土'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY/MM/DD',
- LL: 'YYYY年M月D日',
- LLL: 'YYYY年M月D日 HH:mm',
- LLLL: 'YYYY年M月D日 HH:mm dddd',
- l: 'YYYY/MM/DD',
- ll: 'YYYY年M月D日',
- lll: 'YYYY年M月D日 HH:mm',
- llll: 'YYYY年M月D日 HH:mm dddd'
- },
- meridiemParse: /午前|午後/i,
- /**
- * @param {?} input
- * @return {?}
- */
- isPM(input) {
- return input === '午後';
- },
- /**
- * @param {?} hour
- * @param {?} minute
- * @param {?} isLower
- * @return {?}
- */
- meridiem(hour, minute, isLower) {
- if (hour < 12) {
- return '午前';
- }
- else {
- return '午後';
- }
- },
- calendar: {
- sameDay: '[今日] LT',
- nextDay: '[明日] LT',
- nextWeek: '[来週]dddd LT',
- lastDay: '[昨日] LT',
- lastWeek: '[前週]dddd LT',
- sameElse: 'L'
- },
- dayOfMonthOrdinalParse: /\d{1,2}日/,
- /**
- * @param {?} num
- * @param {?} period
- * @return {?}
- */
- ordinal(num, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return num + '日';
- default:
- return num.toString(10);
- }
- },
- relativeTime: {
- future: '%s後',
- past: '%s前',
- s: '数秒',
- ss: '%d秒',
- m: '1分',
- mm: '%d分',
- h: '1時間',
- hh: '%d時間',
- d: '1日',
- dd: '%d日',
- M: '1ヶ月',
- MM: '%dヶ月',
- y: '1年',
- yy: '%d年'
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- // tslint:disable:object-literal-shorthand
- //! moment.js locale configuration
- //! locale : Korean [ko]
- //! author : Kyungwook, Park : https://github.com/kyungw00k
- //! author : Jeeeyul Lee <jeeeyul@gmail.com>
- /** @type {?} */
- const koLocale = {
- abbr: 'ko',
- months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
- monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
- weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
- weekdaysShort: '일_월_화_수_목_금_토'.split('_'),
- weekdaysMin: '일_월_화_수_목_금_토'.split('_'),
- longDateFormat: {
- LT: 'A h:mm',
- LTS: 'A h:mm:ss',
- L: 'YYYY.MM.DD',
- LL: 'YYYY년 MMMM D일',
- LLL: 'YYYY년 MMMM D일 A h:mm',
- LLLL: 'YYYY년 MMMM D일 dddd A h:mm',
- l: 'YYYY.MM.DD',
- ll: 'YYYY년 MMMM D일',
- lll: 'YYYY년 MMMM D일 A h:mm',
- llll: 'YYYY년 MMMM D일 dddd A h:mm'
- },
- calendar: {
- sameDay: '오늘 LT',
- nextDay: '내일 LT',
- nextWeek: 'dddd LT',
- lastDay: '어제 LT',
- lastWeek: '지난주 dddd LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: '%s 후',
- past: '%s 전',
- s: '몇 초',
- ss: '%d초',
- m: '1분',
- mm: '%d분',
- h: '한 시간',
- hh: '%d시간',
- d: '하루',
- dd: '%d일',
- M: '한 달',
- MM: '%d달',
- y: '일 년',
- yy: '%d년'
- },
- dayOfMonthOrdinalParse: /\d{1,2}(일|월|주)/,
- ordinal: (/**
- * @param {?} num
- * @param {?} period
- * @return {?}
- */
- function (num, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return num + '일';
- case 'M':
- return num + '월';
- case 'w':
- case 'W':
- return num + '주';
- default:
- return num.toString(10);
- }
- }),
- meridiemParse: /오전|오후/,
- isPM: (/**
- * @param {?} token
- * @return {?}
- */
- function (token) {
- return token === '오후';
- }),
- meridiem: (/**
- * @param {?} hour
- * @param {?} minute
- * @param {?} isUpper
- * @return {?}
- */
- function (hour, minute, isUpper) {
- return hour < 12 ? '오전' : '오후';
- })
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : Lithuanian [lt]
- //! author : Stanislavas Guk : https://github.com/ixoster
- /** @type {?} */
- const units = {
- ss: 'sekundė_sekundžių_sekundes',
- m: 'minutė_minutės_minutę',
- mm: 'minutės_minučių_minutes',
- h: 'valanda_valandos_valandą',
- hh: 'valandos_valandų_valandas',
- d: 'diena_dienos_dieną',
- dd: 'dienos_dienų_dienas',
- M: 'mėnuo_mėnesio_mėnesį',
- MM: 'mėnesiai_mėnesių_mėnesius',
- y: 'metai_metų_metus',
- yy: 'metai_metų_metus'
- };
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function translateSeconds(num, withoutSuffix, key, isFuture) {
- if (withoutSuffix) {
- return 'kelios sekundės';
- }
- else {
- return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
- }
- }
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function translateSingular(num, withoutSuffix, key, isFuture) {
- return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]);
- }
- /**
- * @param {?} num
- * @return {?}
- */
- function special(num) {
- return num % 10 === 0 || (num > 10 && num < 20);
- }
- /**
- * @param {?} key
- * @return {?}
- */
- function forms(key) {
- return ((/** @type {?} */ (units)))[key].split('_');
- }
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function translate$3(num, withoutSuffix, key, isFuture) {
- /** @type {?} */
- let result = num + ' ';
- if (num === 1) {
- return result + translateSingular(num, withoutSuffix, key[0], isFuture);
- }
- else if (withoutSuffix) {
- return result + (special(num) ? forms(key)[1] : forms(key)[0]);
- }
- else {
- if (isFuture) {
- return result + forms(key)[1];
- }
- else {
- return result + (special(num) ? forms(key)[1] : forms(key)[2]);
- }
- }
- }
- /** @type {?} */
- const ltLocale = {
- abbr: 'lt',
- months: {
- format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'),
- standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'),
- isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/
- },
- monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
- weekdays: {
- format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'),
- standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'),
- isFormat: /dddd HH:mm/
- },
- weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
- weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY-MM-DD',
- LL: 'YYYY [m.] MMMM D [d.]',
- LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
- LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
- l: 'YYYY-MM-DD',
- ll: 'YYYY [m.] MMMM D [d.]',
- lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
- llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]'
- },
- calendar: {
- sameDay: '[Šiandien] LT',
- nextDay: '[Rytoj] LT',
- nextWeek: 'dddd LT',
- lastDay: '[Vakar] LT',
- lastWeek: '[Praėjusį] dddd LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'po %s',
- past: 'prieš %s',
- s: translateSeconds,
- ss: translate$3,
- m: translateSingular,
- mm: translate$3,
- h: translateSingular,
- hh: translate$3,
- d: translateSingular,
- dd: translate$3,
- M: translateSingular,
- MM: translate$3,
- y: translateSingular,
- yy: translate$3
- },
- dayOfMonthOrdinalParse: /\d{1,2}-oji/,
- /**
- * @param {?} num
- * @return {?}
- */
- ordinal(num) {
- return num + '-oji';
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : Latvian [lv]
- //! author : Matiss Janis Aboltins : https://github.com/matissjanis
- /** @type {?} */
- const lvLocale = {
- abbr: 'lv',
- months: 'Janvāris_Februāris_Marts_Aprīlis_Maijs_Jūnijs_Jūlijs_Augusts_Septembris_Oktobris_Novembris_Decembris'.split('_'),
- monthsShort: 'Jan_Feb_Mar_Apr_Mai_Jūn_Jūl_Aug_Sep_Okt_Nov_Dec'.split('_'),
- weekdays: 'Svētdiena_Pirmdiena_Otrdiena_Trešdiena_Ceturtdiena_Piektdiena_Sestdiena'.split('_'),
- weekdaysShort: 'Svētd_Pirmd_Otrd_Trešd_Ceturtd_Piektd_Sestd'.split('_'),
- weekdaysMin: 'Sv_Pi_Ot_Tr_Ce_Pk_Se'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[Today at] LT',
- nextDay: '[Tomorrow at] LT',
- nextWeek: 'dddd [at] LT',
- lastDay: '[Yesterday at] LT',
- lastWeek: '[Last] dddd [at] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'pēc %s',
- past: 'pirms %s',
- s: 'dažām sekundēm',
- ss: '%d sekundēm',
- m: 'minūtes',
- mm: '%d minūtēm',
- h: 'stundas',
- hh: '%d stundām',
- d: 'dienas',
- dd: '%d dienām',
- M: 'mēneša',
- MM: '%d mēnešiem',
- y: 'gada',
- yy: '%d gadiem'
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- /**
- * @param {?} num
- * @return {?}
- */
- ordinal(num) {
- return num + '.';
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- // tslint:disable:object-literal-shorthand
- //! moment.js locale configuration
- //! locale : Mongolian [mn]
- //! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function translate$4(num, withoutSuffix, key, isFuture) {
- switch (key) {
- case 's':
- return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';
- case 'ss':
- return num + (withoutSuffix ? ' секунд' : ' секундын');
- case 'm':
- case 'mm':
- return num + (withoutSuffix ? ' минут' : ' минутын');
- case 'h':
- case 'hh':
- return num + (withoutSuffix ? ' цаг' : ' цагийн');
- case 'd':
- case 'dd':
- return num + (withoutSuffix ? ' өдөр' : ' өдрийн');
- case 'M':
- case 'MM':
- return num + (withoutSuffix ? ' сар' : ' сарын');
- case 'y':
- case 'yy':
- return num + (withoutSuffix ? ' жил' : ' жилийн');
- default:
- return num.toString(10);
- }
- }
- /** @type {?} */
- const mnLocale = {
- abbr: 'mn',
- months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split('_'),
- monthsShort: '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split('_'),
- monthsParseExact: true,
- weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),
- weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),
- weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY-MM-DD',
- LL: 'YYYY оны MMMMын D',
- LLL: 'YYYY оны MMMMын D HH:mm',
- LLLL: 'dddd, YYYY оны MMMMын D HH:mm'
- },
- meridiemParse: /ҮӨ|ҮХ/i,
- isPM: (/**
- * @param {?} input
- * @return {?}
- */
- function (input) {
- return input === 'ҮХ';
- }),
- meridiem: (/**
- * @param {?} hour
- * @param {?} minute
- * @param {?} isLower
- * @return {?}
- */
- function (hour, minute, isLower) {
- if (hour < 12) {
- return 'ҮӨ';
- }
- else {
- return 'ҮХ';
- }
- }),
- calendar: {
- sameDay: '[Өнөөдөр] LT',
- nextDay: '[Маргааш] LT',
- nextWeek: '[Ирэх] dddd LT',
- lastDay: '[Өчигдөр] LT',
- lastWeek: '[Өнгөрсөн] dddd LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: '%s дараа',
- past: '%s өмнө',
- s: translate$4,
- ss: translate$4,
- m: translate$4,
- mm: translate$4,
- h: translate$4,
- hh: translate$4,
- d: translate$4,
- dd: translate$4,
- M: translate$4,
- MM: translate$4,
- y: translate$4,
- yy: translate$4
- },
- dayOfMonthOrdinalParse: /\d{1,2} өдөр/,
- ordinal: (/**
- * @param {?} num
- * @param {?} period
- * @return {?}
- */
- function (num, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return num + ' өдөр';
- default:
- return num.toString(10);
- }
- })
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Norwegian Bokmål [nb]
- //! authors : Espen Hovlandsdal : https://github.com/rexxars
- //! Sigurd Gartmann : https://github.com/sigurdga
- /** @type {?} */
- const nbLocale = {
- abbr: 'nb',
- months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
- monthsShort: 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
- monthsParseExact: true,
- weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
- weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),
- weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY [kl.] HH:mm',
- LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm'
- },
- calendar: {
- sameDay: '[i dag kl.] LT',
- nextDay: '[i morgen kl.] LT',
- nextWeek: 'dddd [kl.] LT',
- lastDay: '[i går kl.] LT',
- lastWeek: '[forrige] dddd [kl.] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'om %s',
- past: '%s siden',
- s: 'noen sekunder',
- ss: '%d sekunder',
- m: 'ett minutt',
- mm: '%d minutter',
- h: 'en time',
- hh: '%d timer',
- d: 'en dag',
- dd: '%d dager',
- M: 'en måned',
- MM: '%d måneder',
- y: 'ett år',
- yy: '%d år'
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Dutch (Belgium) [nl-be]
- //! author : Joris Röling : https://github.com/jorisroling
- //! author : Jacob Middag : https://github.com/middagj
- /** @type {?} */
- let monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');
- /** @type {?} */
- let monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');
- /** @type {?} */
- let 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];
- /** @type {?} */
- let 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;
- /** @type {?} */
- const nlBeLocale = {
- abbr: 'nl-be',
- months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
- /**
- * @param {?} date
- * @param {?} format
- * @param {?=} isUTC
- * @return {?}
- */
- monthsShort(date, format, isUTC) {
- if (!date) {
- return monthsShortWithDots;
- }
- else if (/-MMM-/.test(format)) {
- return monthsShortWithoutDots[getMonth(date, isUTC)];
- }
- else {
- return monthsShortWithDots[getMonth(date, isUTC)];
- }
- },
- monthsRegex: monthsRegex$4,
- monthsShortRegex: monthsRegex$4,
- monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,
- monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
- monthsParse: monthsParse$4,
- longMonthsParse: monthsParse$4,
- shortMonthsParse: monthsParse$4,
- weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
- weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
- weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[vandaag om] LT',
- nextDay: '[morgen om] LT',
- nextWeek: 'dddd [om] LT',
- lastDay: '[gisteren om] LT',
- lastWeek: '[afgelopen] dddd [om] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'over %s',
- past: '%s geleden',
- s: 'een paar seconden',
- ss: '%d seconden',
- m: 'één minuut',
- mm: '%d minuten',
- h: 'één uur',
- hh: '%d uur',
- d: 'één dag',
- dd: '%d dagen',
- M: 'één maand',
- MM: '%d maanden',
- y: 'één jaar',
- yy: '%d jaar'
- },
- dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
- /**
- * @param {?} _num
- * @return {?}
- */
- ordinal(_num) {
- /** @type {?} */
- const num = Number(_num);
- return num + ((num === 1 || num === 8 || num >= 20) ? 'ste' : 'de');
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Dutch [nl]
- //! author : Joris Röling : https://github.com/jorisroling
- //! author : Jacob Middag : https://github.com/middagj
- /** @type {?} */
- let monthsShortWithDots$1 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');
- /** @type {?} */
- let monthsShortWithoutDots$1 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');
- /** @type {?} */
- let 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];
- /** @type {?} */
- let 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;
- /** @type {?} */
- const nlLocale = {
- abbr: 'nl',
- months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
- /**
- * @param {?} date
- * @param {?} format
- * @param {?=} isUTC
- * @return {?}
- */
- monthsShort(date, format, isUTC) {
- if (!date) {
- return monthsShortWithDots$1;
- }
- else if (/-MMM-/.test(format)) {
- return monthsShortWithoutDots$1[getMonth(date, isUTC)];
- }
- else {
- return monthsShortWithDots$1[getMonth(date, isUTC)];
- }
- },
- monthsRegex: monthsRegex$5,
- monthsShortRegex: monthsRegex$5,
- monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,
- monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
- monthsParse: monthsParse$5,
- longMonthsParse: monthsParse$5,
- shortMonthsParse: monthsParse$5,
- weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
- weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),
- weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD-MM-YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd D MMMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[vandaag om] LT',
- nextDay: '[morgen om] LT',
- nextWeek: 'dddd [om] LT',
- lastDay: '[gisteren om] LT',
- lastWeek: '[afgelopen] dddd [om] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'over %s',
- past: '%s geleden',
- s: 'een paar seconden',
- ss: '%d seconden',
- m: 'één minuut',
- mm: '%d minuten',
- h: 'één uur',
- hh: '%d uur',
- d: 'één dag',
- dd: '%d dagen',
- M: 'één maand',
- MM: '%d maanden',
- y: 'één jaar',
- yy: '%d jaar'
- },
- dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
- /**
- * @param {?} _num
- * @return {?}
- */
- ordinal(_num) {
- /** @type {?} */
- const num = Number(_num);
- return num + ((num === 1 || num === 8 || num >= 20) ? 'ste' : 'de');
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Polish [pl]
- //! author : Rafal Hirsz : https://github.com/evoL
- /** @type {?} */
- let monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_');
- /** @type {?} */
- let monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');
- /**
- * @param {?} num
- * @return {?}
- */
- function plural$1(num) {
- return (num % 10 < 5) && (num % 10 > 1) && ((~~(num / 10) % 10) !== 1);
- }
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @return {?}
- */
- function translate$5(num, withoutSuffix, key) {
- /** @type {?} */
- let result = num + ' ';
- switch (key) {
- case 'ss':
- return result + (plural$1(num) ? 'sekundy' : 'sekund');
- case 'm':
- return withoutSuffix ? 'minuta' : 'minutę';
- case 'mm':
- return result + (plural$1(num) ? 'minuty' : 'minut');
- case 'h':
- return withoutSuffix ? 'godzina' : 'godzinę';
- case 'hh':
- return result + (plural$1(num) ? 'godziny' : 'godzin');
- case 'MM':
- return result + (plural$1(num) ? 'miesiące' : 'miesięcy');
- case 'yy':
- return result + (plural$1(num) ? 'lata' : 'lat');
- }
- }
- /** @type {?} */
- const plLocale = {
- abbr: 'pl',
- /**
- * @param {?} date
- * @param {?} format
- * @param {?=} isUTC
- * @return {?}
- */
- months(date, format, isUTC) {
- if (!date) {
- return monthsNominative;
- }
- else if (format === '') {
- // Hack: if format empty we know this is used to generate
- // RegExp by moment. Give then back both valid forms of months
- // in RegExp ready format.
- return '(' + monthsSubjective[getMonth(date, isUTC)] + '|' + monthsNominative[getMonth(date, isUTC)] + ')';
- }
- else if (/D MMMM/.test(format)) {
- return monthsSubjective[getMonth(date, isUTC)];
- }
- else {
- return monthsNominative[getMonth(date, isUTC)];
- }
- },
- monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
- weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
- weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
- weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[Dziś o] LT',
- nextDay: '[Jutro o] LT',
- /**
- * @param {?} date
- * @return {?}
- */
- nextWeek(date) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[W niedzielę o] LT';
- case 2:
- return '[We wtorek o] LT';
- case 3:
- return '[W środę o] LT';
- case 5:
- return '[W piątek o] LT';
- case 6:
- return '[W sobotę o] LT';
- default:
- return '[W] dddd [o] LT';
- }
- },
- lastDay: '[Wczoraj o] LT',
- /**
- * @param {?} date
- * @return {?}
- */
- lastWeek(date) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[W zeszłą niedzielę o] LT';
- case 3:
- return '[W zeszłą środę o] LT';
- case 4:
- return '[W zeszłą czwartek o] LT';
- case 5:
- return '[W zeszłą piątek o] LT';
- case 6:
- return '[W zeszłą sobotę o] LT';
- default:
- return '[W zeszły] dddd [o] LT';
- }
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'za %s',
- past: '%s temu',
- s: 'kilka sekund',
- ss: translate$5,
- m: translate$5,
- mm: translate$5,
- h: translate$5,
- hh: translate$5,
- d: '1 dzień',
- dd: '%d dni',
- M: 'miesiąc',
- MM: translate$5,
- y: 'rok',
- yy: translate$5
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Portuguese (Brazil) [pt-br]
- //! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
- /** @type {?} */
- const ptBrLocale = {
- abbr: 'pt-br',
- months: 'Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro'.split('_'),
- monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),
- weekdays: 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),
- weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
- weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D [de] MMMM [de] YYYY',
- LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',
- LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm'
- },
- calendar: {
- sameDay: '[Hoje às] LT',
- nextDay: '[Amanhã às] LT',
- nextWeek: 'dddd [às] LT',
- lastDay: '[Ontem às] LT',
- /**
- * @param {?} date
- * @return {?}
- */
- lastWeek(date) {
- return (getDayOfWeek(date) === 0 || getDayOfWeek(date) === 6) ?
- '[Último] dddd [às] LT' : // Saturday + Sunday
- '[Última] dddd [às] LT'; // Monday - Friday
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'em %s',
- past: '%s atrás',
- s: 'poucos segundos',
- ss: '%d segundos',
- m: 'um minuto',
- mm: '%d minutos',
- h: 'uma hora',
- hh: '%d horas',
- d: 'um dia',
- dd: '%d dias',
- M: 'um mês',
- MM: '%d meses',
- y: 'um ano',
- yy: '%d anos'
- },
- dayOfMonthOrdinalParse: /\d{1,2}º/,
- ordinal: '%dº'
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // ! moment.js locale configuration
- // ! locale : Romanian [ro]
- //! author : Vlad Gurdiga : https://github.com/gurdiga
- //! author : Valentin Agachi : https://github.com/avaly
- // ! author : Earle white: https://github.com/5earle
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @return {?}
- */
- function relativeTimeWithPlural(num, withoutSuffix, key) {
- /** @type {?} */
- let format = {
- ss: 'secunde',
- mm: 'minute',
- hh: 'ore',
- dd: 'zile',
- MM: 'luni',
- yy: 'ani'
- };
- /** @type {?} */
- let separator = ' ';
- if (num % 100 >= 20 || (num >= 100 && num % 100 === 0)) {
- separator = ' de ';
- }
- return num + separator + format[key];
- }
- /** @type {?} */
- const roLocale = {
- abbr: 'ro',
- months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'),
- monthsShort: 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'),
- monthsParseExact: true,
- weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
- weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
- weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY H:mm',
- LLLL: 'dddd, D MMMM YYYY H:mm'
- },
- calendar: {
- sameDay: '[azi la] LT',
- nextDay: '[mâine la] LT',
- nextWeek: 'dddd [la] LT',
- lastDay: '[ieri la] LT',
- lastWeek: '[fosta] dddd [la] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'peste %s',
- past: '%s în urmă',
- s: 'câteva secunde',
- ss: relativeTimeWithPlural,
- m: 'un minut',
- mm: relativeTimeWithPlural,
- h: 'o oră',
- hh: relativeTimeWithPlural,
- d: 'o zi',
- dd: relativeTimeWithPlural,
- M: 'o lună',
- MM: relativeTimeWithPlural,
- y: 'un an',
- yy: relativeTimeWithPlural
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 1st is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Russian [ru]
- //! author : Viktorminator : https://github.com/Viktorminator
- //! Author : Menelion Elensúle : https://github.com/Oire
- //! author : Коренберг Марк : https://github.com/socketpair
- /**
- * @param {?} word
- * @param {?} num
- * @return {?}
- */
- function plural$2(word, num) {
- /** @type {?} */
- let forms = word.split('_');
- 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]);
- }
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @return {?}
- */
- function relativeTimeWithPlural$1(num, withoutSuffix, key) {
- /** @type {?} */
- let format = {
- ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',
- mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
- hh: 'час_часа_часов',
- dd: 'день_дня_дней',
- MM: 'месяц_месяца_месяцев',
- yy: 'год_года_лет'
- };
- if (key === 'm') {
- return withoutSuffix ? 'минута' : 'минуту';
- }
- return num + ' ' + plural$2(format[key], +num);
- }
- /** @type {?} */
- let monthsParse$6 = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i];
- // http://new.gramota.ru/spravka/rules/139-prop : § 103
- // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
- // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
- /** @type {?} */
- const ruLocale = {
- abbr: 'ru',
- months: {
- format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'),
- standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_')
- },
- monthsShort: {
- // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку ?
- format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'),
- standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_')
- },
- weekdays: {
- standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),
- format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'),
- isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/
- },
- weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
- weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
- monthsParse: monthsParse$6,
- longMonthsParse: monthsParse$6,
- shortMonthsParse: monthsParse$6,
- // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
- monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
- // копия предыдущего
- monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
- // полные названия с падежами
- monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
- // Выражение, которое соотвествует только сокращённым формам
- monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY г.',
- LLL: 'D MMMM YYYY г., H:mm',
- LLLL: 'dddd, D MMMM YYYY г., H:mm'
- },
- calendar: {
- sameDay: '[Сегодня в] LT',
- nextDay: '[Завтра в] LT',
- lastDay: '[Вчера в] LT',
- /**
- * @param {?} date
- * @param {?} now
- * @return {?}
- */
- nextWeek(date, now) {
- if (getWeek(now) !== getWeek(date)) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[В следующее] dddd [в] LT';
- case 1:
- case 2:
- case 4:
- return '[В следующий] dddd [в] LT';
- case 3:
- case 5:
- case 6:
- return '[В следующую] dddd [в] LT';
- }
- }
- else {
- if (getDayOfWeek(date) === 2) {
- return '[Во] dddd [в] LT';
- }
- else {
- return '[В] dddd [в] LT';
- }
- }
- },
- /**
- * @param {?} date
- * @param {?} now
- * @return {?}
- */
- lastWeek(date, now) {
- if (getWeek(now) !== getWeek(date)) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[В прошлое] dddd [в] LT';
- case 1:
- case 2:
- case 4:
- return '[В прошлый] dddd [в] LT';
- case 3:
- case 5:
- case 6:
- return '[В прошлую] dddd [в] LT';
- }
- }
- else {
- if (getDayOfWeek(date) === 2) {
- return '[Во] dddd [в] LT';
- }
- else {
- return '[В] dddd [в] LT';
- }
- }
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'через %s',
- past: '%s назад',
- s: 'несколько секунд',
- ss: relativeTimeWithPlural$1,
- m: relativeTimeWithPlural$1,
- mm: relativeTimeWithPlural$1,
- h: 'час',
- hh: relativeTimeWithPlural$1,
- d: 'день',
- dd: relativeTimeWithPlural$1,
- M: 'месяц',
- MM: relativeTimeWithPlural$1,
- y: 'год',
- yy: relativeTimeWithPlural$1
- },
- meridiemParse: /ночи|утра|дня|вечера/i,
- /**
- * @param {?} input
- * @return {?}
- */
- isPM(input) {
- return /^(дня|вечера)$/.test(input);
- },
- /**
- * @param {?} hour
- * @param {?} minute
- * @param {?} isLower
- * @return {?}
- */
- meridiem(hour, minute, isLower) {
- if (hour < 4) {
- return 'ночи';
- }
- else if (hour < 12) {
- return 'утра';
- }
- else if (hour < 17) {
- return 'дня';
- }
- else {
- return 'вечера';
- }
- },
- dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
- /**
- * @param {?} _num
- * @param {?} period
- * @return {?}
- */
- ordinal(_num, period) {
- /** @type {?} */
- const num = Number(_num);
- switch (period) {
- case 'M':
- case 'd':
- case 'DDD':
- return num + '-й';
- case 'D':
- return num + '-го';
- case 'w':
- case 'W':
- return num + '-я';
- default:
- return num.toString(10);
- }
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Slovak [sk]
- //! author : Jozef Pažin : https://github.com/atiris
- /** @type {?} */
- const months$2 = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_');
- /** @type {?} */
- const monthsShort$6 = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
- /**
- * @param {?} num
- * @return {?}
- */
- function plural$3(num) {
- return (num > 1) && (num < 5) && (~~(num / 10) !== 1);
- }
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function translate$6(num, withoutSuffix, key, isFuture) {
- /** @type {?} */
- const result = num + ' ';
- switch (key) {
- case 's': // a few seconds / in a few seconds / a few seconds ago
- return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';
- case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago
- if (withoutSuffix || isFuture) {
- return result + (plural$3(num) ? 'sekundy' : 'sekúnd');
- }
- else {
- return result + 'sekundami';
- }
- // break;
- case 'm': // a minute / in a minute / a minute ago
- return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou');
- case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
- if (withoutSuffix || isFuture) {
- return result + (plural$3(num) ? 'minúty' : 'minút');
- }
- else {
- return result + 'minútami';
- }
- // break;
- case 'h': // an hour / in an hour / an hour ago
- return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
- case 'hh': // 9 hours / in 9 hours / 9 hours ago
- if (withoutSuffix || isFuture) {
- return result + (plural$3(num) ? 'hodiny' : 'hodín');
- }
- else {
- return result + 'hodinami';
- }
- // break;
- case 'd': // a day / in a day / a day ago
- return (withoutSuffix || isFuture) ? 'deň' : 'dňom';
- case 'dd': // 9 days / in 9 days / 9 days ago
- if (withoutSuffix || isFuture) {
- return result + (plural$3(num) ? 'dni' : 'dní');
- }
- else {
- return result + 'dňami';
- }
- // break;
- case 'M': // a month / in a month / a month ago
- return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom';
- case 'MM': // 9 months / in 9 months / 9 months ago
- if (withoutSuffix || isFuture) {
- return result + (plural$3(num) ? 'mesiace' : 'mesiacov');
- }
- else {
- return result + 'mesiacmi';
- }
- // break;
- case 'y': // a year / in a year / a year ago
- return (withoutSuffix || isFuture) ? 'rok' : 'rokom';
- case 'yy': // 9 years / in 9 years / 9 years ago
- if (withoutSuffix || isFuture) {
- return result + (plural$3(num) ? 'roky' : 'rokov');
- }
- else {
- return result + 'rokmi';
- }
- // break;
- }
- }
- /** @type {?} */
- const skLocale = {
- abbr: 'sk',
- months: months$2,
- monthsShort: monthsShort$6,
- weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
- weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),
- weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd D. MMMM YYYY H:mm',
- l: 'D. M. YYYY'
- },
- calendar: {
- sameDay: '[dnes o] LT',
- nextDay: '[zajtra o] LT',
- /**
- * @param {?} date
- * @return {?}
- */
- nextWeek(date) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[v nedeľu o] LT';
- case 1:
- case 2:
- return '[v] dddd [o] LT';
- case 3:
- return '[v stredu o] LT';
- case 4:
- return '[vo štvrtok o] LT';
- case 5:
- return '[v piatok o] LT';
- case 6:
- return '[v sobotu o] LT';
- }
- },
- lastDay: '[včera o] LT',
- /**
- * @param {?} date
- * @return {?}
- */
- lastWeek(date) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[minulú nedeľu o] LT';
- case 1:
- case 2:
- return '[minulý] dddd [o] LT';
- case 3:
- return '[minulú stredu o] LT';
- case 4:
- case 5:
- return '[minulý] dddd [o] LT';
- case 6:
- return '[minulú sobotu o] LT';
- }
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'o %s',
- past: 'pred %s',
- s: translate$6,
- ss: translate$6,
- m: translate$6,
- mm: translate$6,
- h: translate$6,
- hh: translate$6,
- d: translate$6,
- dd: translate$6,
- M: translate$6,
- MM: translate$6,
- y: translate$6,
- yy: translate$6
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Slovenian [sl]
- //! author : mihan : https://github.com/mihan
- /**
- * @param {?} number
- * @param {?} withoutSuffix
- * @param {?} key
- * @param {?} isFuture
- * @return {?}
- */
- function processRelativeTime$2(number, withoutSuffix, key, isFuture) {
- /** @type {?} */
- var result = number + ' ';
- switch (key) {
- case 's':
- return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';
- case 'ss':
- if (number === 1) {
- result += withoutSuffix ? 'sekundo' : 'sekundi';
- }
- else if (number === 2) {
- result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';
- }
- else if (number < 5) {
- result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';
- }
- else {
- result += withoutSuffix || isFuture ? 'sekund' : 'sekund';
- }
- return result;
- case 'm':
- return withoutSuffix ? 'ena minuta' : 'eno minuto';
- case 'mm':
- if (number === 1) {
- result += withoutSuffix ? 'minuta' : 'minuto';
- }
- else if (number === 2) {
- result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
- }
- else if (number < 5) {
- result += withoutSuffix || isFuture ? 'minute' : 'minutami';
- }
- else {
- result += withoutSuffix || isFuture ? 'minut' : 'minutami';
- }
- return result;
- case 'h':
- return withoutSuffix ? 'ena ura' : 'eno uro';
- case 'hh':
- if (number === 1) {
- result += withoutSuffix ? 'ura' : 'uro';
- }
- else if (number === 2) {
- result += withoutSuffix || isFuture ? 'uri' : 'urama';
- }
- else if (number < 5) {
- result += withoutSuffix || isFuture ? 'ure' : 'urami';
- }
- else {
- result += withoutSuffix || isFuture ? 'ur' : 'urami';
- }
- return result;
- case 'd':
- return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
- case 'dd':
- if (number === 1) {
- result += withoutSuffix || isFuture ? 'dan' : 'dnem';
- }
- else if (number === 2) {
- result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
- }
- else {
- result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
- }
- return result;
- case 'M':
- return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
- case 'MM':
- if (number === 1) {
- result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
- }
- else if (number === 2) {
- result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
- }
- else if (number < 5) {
- result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
- }
- else {
- result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
- }
- return result;
- case 'y':
- return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
- case 'yy':
- if (number === 1) {
- result += withoutSuffix || isFuture ? 'leto' : 'letom';
- }
- else if (number === 2) {
- result += withoutSuffix || isFuture ? 'leti' : 'letoma';
- }
- else if (number < 5) {
- result += withoutSuffix || isFuture ? 'leta' : 'leti';
- }
- else {
- result += withoutSuffix || isFuture ? 'let' : 'leti';
- }
- return result;
- }
- }
- /** @type {?} */
- const slLocale = {
- abbr: 'sl',
- months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'),
- monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'),
- monthsParseExact: true,
- weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
- weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
- weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D. MMMM YYYY',
- LLL: 'D. MMMM YYYY H:mm',
- LLLL: 'dddd, D. MMMM YYYY H:mm'
- },
- calendar: {
- sameDay: '[danes ob] LT',
- nextDay: '[jutri ob] LT',
- /**
- * @param {?} date
- * @return {?}
- */
- nextWeek(date) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[v] [nedeljo] [ob] LT';
- case 3:
- return '[v] [sredo] [ob] LT';
- case 6:
- return '[v] [soboto] [ob] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[v] dddd [ob] LT';
- }
- },
- lastDay: '[včeraj ob] LT',
- /**
- * @param {?} date
- * @return {?}
- */
- lastWeek(date) {
- switch (getDayOfWeek(date)) {
- case 0:
- return '[prejšnjo] [nedeljo] [ob] LT';
- case 3:
- return '[prejšnjo] [sredo] [ob] LT';
- case 6:
- return '[prejšnjo] [soboto] [ob] LT';
- case 1:
- case 2:
- case 4:
- case 5:
- return '[prejšnji] dddd [ob] LT';
- }
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'čez %s',
- past: 'pred %s',
- s: processRelativeTime$2,
- ss: processRelativeTime$2,
- m: processRelativeTime$2,
- mm: processRelativeTime$2,
- h: processRelativeTime$2,
- hh: processRelativeTime$2,
- d: processRelativeTime$2,
- dd: processRelativeTime$2,
- M: processRelativeTime$2,
- MM: processRelativeTime$2,
- y: processRelativeTime$2,
- yy: processRelativeTime$2
- },
- dayOfMonthOrdinalParse: /\d{1,2}\./,
- ordinal: '%d.',
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 1st is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : Swedish [sv]
- //! author : Jens Alm : https://github.com/ulmus
- /** @type {?} */
- const svLocale = {
- abbr: 'sv',
- months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'),
- monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
- weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
- weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
- weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY-MM-DD',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY [kl.] HH:mm',
- LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',
- lll: 'D MMM YYYY HH:mm',
- llll: 'ddd D MMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[Idag] LT',
- nextDay: '[Imorgon] LT',
- lastDay: '[Igår] LT',
- nextWeek: '[På] dddd LT',
- lastWeek: '[I] dddd[s] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'om %s',
- past: 'för %s sedan',
- s: 'några sekunder',
- ss: '%d sekunder',
- m: 'en minut',
- mm: '%d minuter',
- h: 'en timme',
- hh: '%d timmar',
- d: 'en dag',
- dd: '%d dagar',
- M: 'en månad',
- MM: '%d månader',
- y: 'ett år',
- yy: '%d år'
- },
- dayOfMonthOrdinalParse: /\d{1,2}(e|a)/,
- /**
- * @param {?} _num
- * @return {?}
- */
- ordinal(_num) {
- /** @type {?} */
- const num = Number(_num);
- /** @type {?} */
- let b = num % 10;
- /** @type {?} */
- let output = (~~(num % 100 / 10) === 1) ? 'e' :
- (b === 1) ? 'a' :
- (b === 2) ? 'a' :
- (b === 3) ? 'e' : 'e';
- return num + output;
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- // moment.js locale configuration
- // locale : Thai [th]
- // author : Watcharapol Sanitwong : https://github.com/tumit
- /** @type {?} */
- const thLocale = {
- abbr: 'th',
- months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'),
- monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'),
- monthsParseExact: true,
- weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
- weekdaysShort: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
- // yes, three characters difference
- weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
- weekdaysParseExact: true,
- longDateFormat: {
- LT: 'H:mm',
- LTS: 'H:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY เวลา H:mm',
- LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm'
- },
- meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
- /**
- * @param {?} input
- * @return {?}
- */
- isPM(input) {
- return input === 'หลังเที่ยง';
- },
- /**
- * @param {?} hour
- * @param {?} minute
- * @param {?} isLower
- * @return {?}
- */
- meridiem(hour, minute, isLower) {
- if (hour < 12) {
- return 'ก่อนเที่ยง';
- }
- else {
- return 'หลังเที่ยง';
- }
- },
- calendar: {
- sameDay: '[วันนี้ เวลา] LT',
- nextDay: '[พรุ่งนี้ เวลา] LT',
- nextWeek: 'dddd[หน้า เวลา] LT',
- lastDay: '[เมื่อวานนี้ เวลา] LT',
- lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: 'อีก %s',
- past: '%sที่แล้ว',
- s: 'ไม่กี่วินาที',
- ss: '%d วินาที',
- m: '1 นาที',
- mm: '%d นาที',
- h: '1 ชั่วโมง',
- hh: '%d ชั่วโมง',
- d: '1 วัน',
- dd: '%d วัน',
- M: '1 เดือน',
- MM: '%d เดือน',
- y: '1 ปี',
- yy: '%d ปี'
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : Turkish [tr]
- //! authors : Erhan Gundogan : https://github.com/erhangundogan,
- //! Burak Yiğit Kaya: https://github.com/BYK
- /** @type {?} */
- let suffixes = {
- 1: '\'inci',
- 5: '\'inci',
- 8: '\'inci',
- 70: '\'inci',
- 80: '\'inci',
- 2: '\'nci',
- 7: '\'nci',
- 20: '\'nci',
- 50: '\'nci',
- 3: '\'üncü',
- 4: '\'üncü',
- 100: '\'üncü',
- 6: '\'ncı',
- 9: '\'uncu',
- 10: '\'uncu',
- 30: '\'uncu',
- 60: '\'ıncı',
- 90: '\'ıncı'
- };
- /** @type {?} */
- const trLocale = {
- abbr: 'tr',
- months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),
- monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
- weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),
- weekdaysShort: 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),
- weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY',
- LLL: 'D MMMM YYYY HH:mm',
- LLLL: 'dddd, D MMMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[bugün saat] LT',
- nextDay: '[yarın saat] LT',
- nextWeek: '[gelecek] dddd [saat] LT',
- lastDay: '[dün] LT',
- lastWeek: '[geçen] dddd [saat] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: '%s sonra',
- past: '%s önce',
- s: 'birkaç saniye',
- ss: '%d saniye',
- m: 'bir dakika',
- mm: '%d dakika',
- h: 'bir saat',
- hh: '%d saat',
- d: 'bir gün',
- dd: '%d gün',
- M: 'bir ay',
- MM: '%d ay',
- y: 'bir yıl',
- yy: '%d yıl'
- },
- dayOfMonthOrdinalParse: /\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,
- /**
- * @param {?} _num
- * @return {?}
- */
- ordinal(_num) {
- /** @type {?} */
- const num = Number(_num);
- if (num === 0) { // special case for zero
- return num + '\'ıncı';
- }
- /** @type {?} */
- let a = num % 10;
- /** @type {?} */
- let b = num % 100 - a;
- /** @type {?} */
- let c = num >= 100 ? 100 : null;
- return num + (suffixes[a] || suffixes[b] || suffixes[c]);
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 1st is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- //! moment.js locale configuration
- //! locale : Ukrainian [uk]
- //! author : zemlanin : https://github.com/zemlanin
- //! Author : Menelion Elensúle : https://github.com/Oire
- /**
- * @param {?} word
- * @param {?} num
- * @return {?}
- */
- function plural$4(word, num) {
- /** @type {?} */
- let forms = word.split('_');
- 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]);
- }
- /**
- * @param {?} num
- * @param {?} withoutSuffix
- * @param {?} key
- * @return {?}
- */
- function relativeTimeWithPlural$2(num, withoutSuffix, key) {
- /** @type {?} */
- let format = {
- ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',
- mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
- hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
- dd: 'день_дні_днів',
- MM: 'місяць_місяці_місяців',
- yy: 'рік_роки_років'
- };
- if (key === 'm') {
- return withoutSuffix ? 'хвилина' : 'хвилину';
- }
- if (key === 'h') {
- return withoutSuffix ? 'година' : 'годину';
- }
- return num + ' ' + plural$4(format[key], +num);
- }
- /**
- * @param {?} date
- * @param {?} format
- * @param {?=} isUTC
- * @return {?}
- */
- function weekdaysCaseReplace(date, format, isUTC) {
- /** @type {?} */
- let weekdays = {
- nominative: 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),
- accusative: 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),
- genitive: 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')
- };
- if (!date) {
- return weekdays.nominative;
- }
- /** @type {?} */
- let nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ?
- 'accusative' :
- ((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ?
- 'genitive' :
- 'nominative');
- return weekdays[nounCase][getDayOfWeek(date, isUTC)];
- }
- /**
- * @param {?} str
- * @return {?}
- */
- function processHoursFunction(str) {
- return (/**
- * @param {?} date
- * @return {?}
- */
- function (date) {
- return str + 'о' + (getHours(date) === 11 ? 'б' : '') + '] LT';
- });
- }
- /** @type {?} */
- const ukLocale = {
- abbr: 'uk',
- months: {
- format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'),
- standalone: 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_')
- },
- monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'),
- weekdays: weekdaysCaseReplace,
- weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
- weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD.MM.YYYY',
- LL: 'D MMMM YYYY р.',
- LLL: 'D MMMM YYYY р., HH:mm',
- LLLL: 'dddd, D MMMM YYYY р., HH:mm'
- },
- calendar: {
- sameDay: processHoursFunction('[Сьогодні '),
- nextDay: processHoursFunction('[Завтра '),
- lastDay: processHoursFunction('[Вчора '),
- nextWeek: processHoursFunction('[У] dddd ['),
- /**
- * @param {?} date
- * @return {?}
- */
- lastWeek(date) {
- switch (getDayOfWeek(date)) {
- case 0:
- case 3:
- case 5:
- case 6:
- return processHoursFunction('[Минулої] dddd [')(date);
- case 1:
- case 2:
- case 4:
- return processHoursFunction('[Минулого] dddd [')(date);
- }
- },
- sameElse: 'L'
- },
- relativeTime: {
- future: 'за %s',
- past: '%s тому',
- s: 'декілька секунд',
- ss: relativeTimeWithPlural$2,
- m: relativeTimeWithPlural$2,
- mm: relativeTimeWithPlural$2,
- h: 'годину',
- hh: relativeTimeWithPlural$2,
- d: 'день',
- dd: relativeTimeWithPlural$2,
- M: 'місяць',
- MM: relativeTimeWithPlural$2,
- y: 'рік',
- yy: relativeTimeWithPlural$2
- },
- // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
- meridiemParse: /ночі|ранку|дня|вечора/,
- /**
- * @param {?} input
- * @return {?}
- */
- isPM(input) {
- return /^(дня|вечора)$/.test(input);
- },
- /**
- * @param {?} hour
- * @param {?} minute
- * @param {?} isLower
- * @return {?}
- */
- meridiem(hour, minute, isLower) {
- if (hour < 4) {
- return 'ночі';
- }
- else if (hour < 12) {
- return 'ранку';
- }
- else if (hour < 17) {
- return 'дня';
- }
- else {
- return 'вечора';
- }
- },
- dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
- /**
- * @param {?} _num
- * @param {?} period
- * @return {?}
- */
- ordinal(_num, period) {
- /** @type {?} */
- const num = Number(_num);
- switch (period) {
- case 'M':
- case 'd':
- case 'DDD':
- case 'w':
- case 'W':
- return num + '-й';
- case 'D':
- return num + '-го';
- default:
- return num.toString();
- }
- },
- week: {
- dow: 1,
- // Monday is the first day of the week.
- doy: 7 // The week that contains Jan 1st is the first week of the year.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- //! moment.js locale configuration
- //! locale : Việt Nam [vi]
- //! author : Chris Gedrim : https://github.com/chrisgedrim
- /** @type {?} */
- const viLocale = {
- abbr: 'vi',
- 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('_'),
- monthsShort: 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'),
- monthsParseExact: true,
- weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'),
- weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
- weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
- weekdaysParseExact: true,
- meridiemParse: /sa|ch/i,
- /**
- * @param {?} input
- * @return {?}
- */
- isPM(input) {
- return /^ch$/i.test(input);
- },
- /**
- * @param {?} hours
- * @param {?} minutes
- * @param {?} isLower
- * @return {?}
- */
- meridiem(hours, minutes, isLower) {
- if (hours < 12) {
- return isLower ? 'sa' : 'SA';
- }
- else {
- return isLower ? 'ch' : 'CH';
- }
- },
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'DD/MM/YYYY',
- LL: 'D MMMM [năm] YYYY',
- LLL: 'D MMMM [năm] YYYY HH:mm',
- LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',
- l: 'DD/M/YYYY',
- ll: 'D MMM YYYY',
- lll: 'D MMM YYYY HH:mm',
- llll: 'ddd, D MMM YYYY HH:mm'
- },
- calendar: {
- sameDay: '[Hôm nay lúc] LT',
- nextDay: '[Ngày mai lúc] LT',
- nextWeek: 'dddd [tuần tới lúc] LT',
- lastDay: '[Hôm qua lúc] LT',
- lastWeek: 'dddd [tuần trước lúc] LT',
- sameElse: 'L'
- },
- relativeTime: {
- future: '%s tới',
- past: '%s trước',
- s: 'vài giây',
- ss: '%d giây',
- m: 'một phút',
- mm: '%d phút',
- h: 'một giờ',
- hh: '%d giờ',
- d: 'một ngày',
- dd: '%d ngày',
- M: 'một tháng',
- MM: '%d tháng',
- y: 'một năm',
- yy: '%d năm'
- },
- dayOfMonthOrdinalParse: /\d{1,2}/,
- /**
- * @param {?} _num
- * @return {?}
- */
- ordinal(_num) {
- return '' + _num;
- },
- week: {
- dow: 1,
- // Thứ Hai là ngày đầu tuần.
- doy: 4 // Tuần chứa ngày 4 tháng 1 là tuần đầu tiên trong năm.
- }
- };
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
- */
- // tslint:disable:comment-format binary-expression-operand-order max-line-length
- // tslint:disable:no-bitwise prefer-template cyclomatic-complexity
- // tslint:disable:no-shadowed-variable switch-default prefer-const
- // tslint:disable:one-variable-per-declaration newline-before-return
- // tslint:disable:no-parameter-reassignment prefer-switch
- //! moment.js locale configuration
- //! locale : Chinese (China) [zh-cn]
- //! author : suupic : https://github.com/suupic
- //! author : Zeno Zeng : https://github.com/zenozeng
- /** @type {?} */
- const zhCnLocale = {
- abbr: 'zh-cn',
- months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
- monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
- weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
- weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
- weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
- longDateFormat: {
- LT: 'HH:mm',
- LTS: 'HH:mm:ss',
- L: 'YYYY/MM/DD',
- LL: 'YYYY年M月D日',
- LLL: 'YYYY年M月D日Ah点mm分',
- LLLL: 'YYYY年M月D日ddddAh点mm分',
- l: 'YYYY/M/D',
- ll: 'YYYY年M月D日',
- lll: 'YYYY年M月D日 HH:mm',
- llll: 'YYYY年M月D日dddd HH:mm'
- },
- meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
- /**
- * @param {?} hour
- * @param {?} meridiem
- * @return {?}
- */
- meridiemHour(hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === '凌晨' || meridiem === '早上' ||
- meridiem === '上午') {
- return hour;
- }
- else if (meridiem === '下午' || meridiem === '晚上') {
- return hour + 12;
- }
- else {
- // '中午'
- return hour >= 11 ? hour : hour + 12;
- }
- },
- /**
- * @param {?} hour
- * @param {?} minute
- * @param {?} isLower
- * @return {?}
- */
- meridiem(hour, minute, isLower) {
- /** @type {?} */
- let hm = hour * 100 + minute;
- if (hm < 600) {
- return '凌晨';
- }
- else if (hm < 900) {
- return '早上';
- }
- else if (hm < 1130) {
- return '上午';
- }
- else if (hm < 1230) {
- return '中午';
- }
- else if (hm < 1800) {
- return '下午';
- }
- else {
- return '晚上';
- }
- },
- calendar: {
- sameDay: '[今天]LT',
- nextDay: '[明天]LT',
- nextWeek: '[下]ddddLT',
- lastDay: '[昨天]LT',
- lastWeek: '[上]ddddLT',
- sameElse: 'L'
- },
- dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
- /**
- * @param {?} _num
- * @param {?} period
- * @return {?}
- */
- ordinal(_num, period) {
- /** @type {?} */
- const num = Number(_num);
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return num + '日';
- case 'M':
- return num + '月';
- case 'w':
- case 'W':
- return num + '周';
- default:
- return num.toString();
- }
- },
- relativeTime: {
- future: '%s内',
- past: '%s前',
- s: '几秒',
- ss: '%d 秒',
- m: '1 分钟',
- mm: '%d 分钟',
- h: '1 小时',
- hh: '%d 小时',
- d: '1 天',
- dd: '%d 天',
- M: '1 个月',
- MM: '%d 个月',
- y: '1 年',
- yy: '%d 年'
- },
- week: {
- // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
- dow: 1,
- // Monday is the first day of the week.
- doy: 4 // The week that contains Jan 4th is the first week of the year.
- }
- };
- 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 };
- //# sourceMappingURL=ngx-bootstrap-chronos.js.map
|