converse.js 3.3 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862358633586435865358663586735868358693587035871358723587335874358753587635877358783587935880358813588235883358843588535886358873588835889358903589135892358933589435895358963589735898358993590035901359023590335904359053590635907359083590935910359113591235913359143591535916359173591835919359203592135922359233592435925359263592735928359293593035931359323593335934359353593635937359383593935940359413594235943359443594535946359473594835949359503595135952359533595435955359563595735958359593596035961359623596335964359653596635967359683596935970359713597235973359743597535976359773597835979359803598135982359833598435985359863598735988359893599035991359923599335994359953599635997359983599936000360013600236003360043600536006360073600836009360103601136012360133601436015360163601736018360193602036021360223602336024360253602636027360283602936030360313603236033360343603536036360373603836039360403604136042360433604436045360463604736048360493605036051360523605336054360553605636057360583605936060360613606236063360643606536066360673606836069360703607136072360733607436075360763607736078360793608036081360823608336084360853608636087360883608936090360913609236093360943609536096360973609836099361003610136102361033610436105361063610736108361093611036111361123611336114361153611636117361183611936120361213612236123361243612536126361273612836129361303613136132361333613436135361363613736138361393614036141361423614336144361453614636147361483614936150361513615236153361543615536156361573615836159361603616136162361633616436165361663616736168361693617036171361723617336174361753617636177361783617936180361813618236183361843618536186361873618836189361903619136192361933619436195361963619736198361993620036201362023620336204362053620636207362083620936210362113621236213362143621536216362173621836219362203622136222362233622436225362263622736228362293623036231362323623336234362353623636237362383623936240362413624236243362443624536246362473624836249362503625136252362533625436255362563625736258362593626036261362623626336264362653626636267362683626936270362713627236273362743627536276362773627836279362803628136282362833628436285362863628736288362893629036291362923629336294362953629636297362983629936300363013630236303363043630536306363073630836309363103631136312363133631436315363163631736318363193632036321363223632336324363253632636327363283632936330363313633236333363343633536336363373633836339363403634136342363433634436345363463634736348363493635036351363523635336354363553635636357363583635936360363613636236363363643636536366363673636836369363703637136372363733637436375363763637736378363793638036381363823638336384363853638636387363883638936390363913639236393363943639536396363973639836399364003640136402364033640436405364063640736408364093641036411364123641336414364153641636417364183641936420364213642236423364243642536426364273642836429364303643136432364333643436435364363643736438364393644036441364423644336444364453644636447364483644936450364513645236453364543645536456364573645836459364603646136462364633646436465364663646736468364693647036471364723647336474364753647636477364783647936480364813648236483364843648536486364873648836489364903649136492364933649436495364963649736498364993650036501365023650336504365053650636507365083650936510365113651236513365143651536516365173651836519365203652136522365233652436525365263652736528365293653036531365323653336534365353653636537365383653936540365413654236543365443654536546365473654836549365503655136552365533655436555365563655736558365593656036561365623656336564365653656636567365683656936570365713657236573365743657536576365773657836579365803658136582365833658436585365863658736588365893659036591365923659336594365953659636597365983659936600366013660236603366043660536606366073660836609366103661136612366133661436615366163661736618366193662036621366223662336624366253662636627366283662936630366313663236633366343663536636366373663836639366403664136642366433664436645366463664736648366493665036651366523665336654366553665636657366583665936660366613666236663366643666536666366673666836669366703667136672366733667436675366763667736678366793668036681366823668336684366853668636687366883668936690366913669236693366943669536696366973669836699367003670136702367033670436705367063670736708367093671036711367123671336714367153671636717367183671936720367213672236723367243672536726367273672836729367303673136732367333673436735367363673736738367393674036741367423674336744367453674636747367483674936750367513675236753367543675536756367573675836759367603676136762367633676436765367663676736768367693677036771367723677336774367753677636777367783677936780367813678236783367843678536786367873678836789367903679136792367933679436795367963679736798367993680036801368023680336804368053680636807368083680936810368113681236813368143681536816368173681836819368203682136822368233682436825368263682736828368293683036831368323683336834368353683636837368383683936840368413684236843368443684536846368473684836849368503685136852368533685436855368563685736858368593686036861368623686336864368653686636867368683686936870368713687236873368743687536876368773687836879368803688136882368833688436885368863688736888368893689036891368923689336894368953689636897368983689936900369013690236903369043690536906369073690836909369103691136912369133691436915369163691736918369193692036921369223692336924369253692636927369283692936930369313693236933369343693536936369373693836939369403694136942369433694436945369463694736948369493695036951369523695336954369553695636957369583695936960369613696236963369643696536966369673696836969369703697136972369733697436975369763697736978369793698036981369823698336984369853698636987369883698936990369913699236993369943699536996369973699836999370003700137002370033700437005370063700737008370093701037011370123701337014370153701637017370183701937020370213702237023370243702537026370273702837029370303703137032370333703437035370363703737038370393704037041370423704337044370453704637047370483704937050370513705237053370543705537056370573705837059370603706137062370633706437065370663706737068370693707037071370723707337074370753707637077370783707937080370813708237083370843708537086370873708837089370903709137092370933709437095370963709737098370993710037101371023710337104371053710637107371083710937110371113711237113371143711537116371173711837119371203712137122371233712437125371263712737128371293713037131371323713337134371353713637137371383713937140371413714237143371443714537146371473714837149371503715137152371533715437155371563715737158371593716037161371623716337164371653716637167371683716937170371713717237173371743717537176371773717837179371803718137182371833718437185371863718737188371893719037191371923719337194371953719637197371983719937200372013720237203372043720537206372073720837209372103721137212372133721437215372163721737218372193722037221372223722337224372253722637227372283722937230372313723237233372343723537236372373723837239372403724137242372433724437245372463724737248372493725037251372523725337254372553725637257372583725937260372613726237263372643726537266372673726837269372703727137272372733727437275372763727737278372793728037281372823728337284372853728637287372883728937290372913729237293372943729537296372973729837299373003730137302373033730437305373063730737308373093731037311373123731337314373153731637317373183731937320373213732237323373243732537326373273732837329373303733137332373333733437335373363733737338373393734037341373423734337344373453734637347373483734937350373513735237353373543735537356373573735837359373603736137362373633736437365373663736737368373693737037371373723737337374373753737637377373783737937380373813738237383373843738537386373873738837389373903739137392373933739437395373963739737398373993740037401374023740337404374053740637407374083740937410374113741237413374143741537416374173741837419374203742137422374233742437425374263742737428374293743037431374323743337434374353743637437374383743937440374413744237443374443744537446374473744837449374503745137452374533745437455374563745737458374593746037461374623746337464374653746637467374683746937470374713747237473374743747537476374773747837479374803748137482374833748437485374863748737488374893749037491374923749337494374953749637497374983749937500375013750237503375043750537506375073750837509375103751137512375133751437515375163751737518375193752037521375223752337524375253752637527375283752937530375313753237533375343753537536375373753837539375403754137542375433754437545375463754737548375493755037551375523755337554375553755637557375583755937560375613756237563375643756537566375673756837569375703757137572375733757437575375763757737578375793758037581375823758337584375853758637587375883758937590375913759237593375943759537596375973759837599376003760137602376033760437605376063760737608376093761037611376123761337614376153761637617376183761937620376213762237623376243762537626376273762837629376303763137632376333763437635376363763737638376393764037641376423764337644376453764637647376483764937650376513765237653376543765537656376573765837659376603766137662376633766437665376663766737668376693767037671376723767337674376753767637677376783767937680376813768237683376843768537686376873768837689376903769137692376933769437695376963769737698376993770037701377023770337704377053770637707377083770937710377113771237713377143771537716377173771837719377203772137722377233772437725377263772737728377293773037731377323773337734377353773637737377383773937740377413774237743377443774537746377473774837749377503775137752377533775437755377563775737758377593776037761377623776337764377653776637767377683776937770377713777237773377743777537776377773777837779377803778137782377833778437785377863778737788377893779037791377923779337794377953779637797377983779937800378013780237803378043780537806378073780837809378103781137812378133781437815378163781737818378193782037821378223782337824378253782637827378283782937830378313783237833378343783537836378373783837839378403784137842378433784437845378463784737848378493785037851378523785337854378553785637857378583785937860378613786237863378643786537866378673786837869378703787137872378733787437875378763787737878378793788037881378823788337884378853788637887378883788937890378913789237893378943789537896378973789837899379003790137902379033790437905379063790737908379093791037911379123791337914379153791637917379183791937920379213792237923379243792537926379273792837929379303793137932379333793437935379363793737938379393794037941379423794337944379453794637947379483794937950379513795237953379543795537956379573795837959379603796137962379633796437965379663796737968379693797037971379723797337974379753797637977379783797937980379813798237983379843798537986379873798837989379903799137992379933799437995379963799737998379993800038001380023800338004380053800638007380083800938010380113801238013380143801538016380173801838019380203802138022380233802438025380263802738028380293803038031380323803338034380353803638037380383803938040380413804238043380443804538046380473804838049380503805138052380533805438055380563805738058380593806038061380623806338064380653806638067380683806938070380713807238073380743807538076380773807838079380803808138082380833808438085380863808738088380893809038091380923809338094380953809638097380983809938100381013810238103381043810538106381073810838109381103811138112381133811438115381163811738118381193812038121381223812338124381253812638127381283812938130381313813238133381343813538136381373813838139381403814138142381433814438145381463814738148381493815038151381523815338154381553815638157381583815938160381613816238163381643816538166381673816838169381703817138172381733817438175381763817738178381793818038181381823818338184381853818638187381883818938190381913819238193381943819538196381973819838199382003820138202382033820438205382063820738208382093821038211382123821338214382153821638217382183821938220382213822238223382243822538226382273822838229382303823138232382333823438235382363823738238382393824038241382423824338244382453824638247382483824938250382513825238253382543825538256382573825838259382603826138262382633826438265382663826738268382693827038271382723827338274382753827638277382783827938280382813828238283382843828538286382873828838289382903829138292382933829438295382963829738298382993830038301383023830338304383053830638307383083830938310383113831238313383143831538316383173831838319383203832138322383233832438325383263832738328383293833038331383323833338334383353833638337383383833938340383413834238343383443834538346383473834838349383503835138352383533835438355383563835738358383593836038361383623836338364383653836638367383683836938370383713837238373383743837538376383773837838379383803838138382383833838438385383863838738388383893839038391383923839338394383953839638397383983839938400384013840238403384043840538406384073840838409384103841138412384133841438415384163841738418384193842038421384223842338424384253842638427384283842938430384313843238433384343843538436384373843838439384403844138442384433844438445384463844738448384493845038451384523845338454384553845638457384583845938460384613846238463384643846538466384673846838469384703847138472384733847438475384763847738478384793848038481384823848338484384853848638487384883848938490384913849238493384943849538496384973849838499385003850138502385033850438505385063850738508385093851038511385123851338514385153851638517385183851938520385213852238523385243852538526385273852838529385303853138532385333853438535385363853738538385393854038541385423854338544385453854638547385483854938550385513855238553385543855538556385573855838559385603856138562385633856438565385663856738568385693857038571385723857338574385753857638577385783857938580385813858238583385843858538586385873858838589385903859138592385933859438595385963859738598385993860038601386023860338604386053860638607386083860938610386113861238613386143861538616386173861838619386203862138622386233862438625386263862738628386293863038631386323863338634386353863638637386383863938640386413864238643386443864538646386473864838649386503865138652386533865438655386563865738658386593866038661386623866338664386653866638667386683866938670386713867238673386743867538676386773867838679386803868138682386833868438685386863868738688386893869038691386923869338694386953869638697386983869938700387013870238703387043870538706387073870838709387103871138712387133871438715387163871738718387193872038721387223872338724387253872638727387283872938730387313873238733387343873538736387373873838739387403874138742387433874438745387463874738748387493875038751387523875338754387553875638757387583875938760387613876238763387643876538766387673876838769387703877138772387733877438775387763877738778387793878038781387823878338784387853878638787387883878938790387913879238793387943879538796387973879838799388003880138802388033880438805388063880738808388093881038811388123881338814388153881638817388183881938820388213882238823388243882538826388273882838829388303883138832388333883438835388363883738838388393884038841388423884338844388453884638847388483884938850388513885238853388543885538856388573885838859388603886138862388633886438865388663886738868388693887038871388723887338874388753887638877388783887938880388813888238883388843888538886388873888838889388903889138892388933889438895388963889738898388993890038901389023890338904389053890638907389083890938910389113891238913389143891538916389173891838919389203892138922389233892438925389263892738928389293893038931389323893338934389353893638937389383893938940389413894238943389443894538946389473894838949389503895138952389533895438955389563895738958389593896038961389623896338964389653896638967389683896938970389713897238973389743897538976389773897838979389803898138982389833898438985389863898738988389893899038991389923899338994389953899638997389983899939000390013900239003390043900539006390073900839009390103901139012390133901439015390163901739018390193902039021390223902339024390253902639027390283902939030390313903239033390343903539036390373903839039390403904139042390433904439045390463904739048390493905039051390523905339054390553905639057390583905939060390613906239063390643906539066390673906839069390703907139072390733907439075390763907739078390793908039081390823908339084390853908639087390883908939090390913909239093390943909539096390973909839099391003910139102391033910439105391063910739108391093911039111391123911339114391153911639117391183911939120391213912239123391243912539126391273912839129391303913139132391333913439135391363913739138391393914039141391423914339144391453914639147391483914939150391513915239153391543915539156391573915839159391603916139162391633916439165391663916739168391693917039171391723917339174391753917639177391783917939180391813918239183391843918539186391873918839189391903919139192391933919439195391963919739198391993920039201392023920339204392053920639207392083920939210392113921239213392143921539216392173921839219392203922139222392233922439225392263922739228392293923039231392323923339234392353923639237392383923939240392413924239243392443924539246392473924839249392503925139252392533925439255392563925739258392593926039261392623926339264392653926639267392683926939270392713927239273392743927539276392773927839279392803928139282392833928439285392863928739288392893929039291392923929339294392953929639297392983929939300393013930239303393043930539306393073930839309393103931139312393133931439315393163931739318393193932039321393223932339324393253932639327393283932939330393313933239333393343933539336393373933839339393403934139342393433934439345393463934739348393493935039351393523935339354393553935639357393583935939360393613936239363393643936539366393673936839369393703937139372393733937439375393763937739378393793938039381393823938339384393853938639387393883938939390393913939239393393943939539396393973939839399394003940139402394033940439405394063940739408394093941039411394123941339414394153941639417394183941939420394213942239423394243942539426394273942839429394303943139432394333943439435394363943739438394393944039441394423944339444394453944639447394483944939450394513945239453394543945539456394573945839459394603946139462394633946439465394663946739468394693947039471394723947339474394753947639477394783947939480394813948239483394843948539486394873948839489394903949139492394933949439495394963949739498394993950039501395023950339504395053950639507395083950939510395113951239513395143951539516395173951839519395203952139522395233952439525395263952739528395293953039531395323953339534395353953639537395383953939540395413954239543395443954539546395473954839549395503955139552395533955439555395563955739558395593956039561395623956339564395653956639567395683956939570395713957239573395743957539576395773957839579395803958139582395833958439585395863958739588395893959039591395923959339594395953959639597395983959939600396013960239603396043960539606396073960839609396103961139612396133961439615396163961739618396193962039621396223962339624396253962639627396283962939630396313963239633396343963539636396373963839639396403964139642396433964439645396463964739648396493965039651396523965339654396553965639657396583965939660396613966239663396643966539666396673966839669396703967139672396733967439675396763967739678396793968039681396823968339684396853968639687396883968939690396913969239693396943969539696396973969839699397003970139702397033970439705397063970739708397093971039711397123971339714397153971639717397183971939720397213972239723397243972539726397273972839729397303973139732397333973439735397363973739738397393974039741397423974339744397453974639747397483974939750397513975239753397543975539756397573975839759397603976139762397633976439765397663976739768397693977039771397723977339774397753977639777397783977939780397813978239783397843978539786397873978839789397903979139792397933979439795397963979739798397993980039801398023980339804398053980639807398083980939810398113981239813398143981539816398173981839819398203982139822398233982439825398263982739828398293983039831398323983339834398353983639837398383983939840398413984239843398443984539846398473984839849398503985139852398533985439855398563985739858398593986039861398623986339864398653986639867398683986939870398713987239873398743987539876398773987839879398803988139882398833988439885398863988739888398893989039891398923989339894398953989639897398983989939900399013990239903399043990539906399073990839909399103991139912399133991439915399163991739918399193992039921399223992339924399253992639927399283992939930399313993239933399343993539936399373993839939399403994139942399433994439945399463994739948399493995039951399523995339954399553995639957399583995939960399613996239963399643996539966399673996839969399703997139972399733997439975399763997739978399793998039981399823998339984399853998639987399883998939990399913999239993399943999539996399973999839999400004000140002400034000440005400064000740008400094001040011400124001340014400154001640017400184001940020400214002240023400244002540026400274002840029400304003140032400334003440035400364003740038400394004040041400424004340044400454004640047400484004940050400514005240053400544005540056400574005840059400604006140062400634006440065400664006740068400694007040071400724007340074400754007640077400784007940080400814008240083400844008540086400874008840089400904009140092400934009440095400964009740098400994010040101401024010340104401054010640107401084010940110401114011240113401144011540116401174011840119401204012140122401234012440125401264012740128401294013040131401324013340134401354013640137401384013940140401414014240143401444014540146401474014840149401504015140152401534015440155401564015740158401594016040161401624016340164401654016640167401684016940170401714017240173401744017540176401774017840179401804018140182401834018440185401864018740188401894019040191401924019340194401954019640197401984019940200402014020240203402044020540206402074020840209402104021140212402134021440215402164021740218402194022040221402224022340224402254022640227402284022940230402314023240233402344023540236402374023840239402404024140242402434024440245402464024740248402494025040251402524025340254402554025640257402584025940260402614026240263402644026540266402674026840269402704027140272402734027440275402764027740278402794028040281402824028340284402854028640287402884028940290402914029240293402944029540296402974029840299403004030140302403034030440305403064030740308403094031040311403124031340314403154031640317403184031940320403214032240323403244032540326403274032840329403304033140332403334033440335403364033740338403394034040341403424034340344403454034640347403484034940350403514035240353403544035540356403574035840359403604036140362403634036440365403664036740368403694037040371403724037340374403754037640377403784037940380403814038240383403844038540386403874038840389403904039140392403934039440395403964039740398403994040040401404024040340404404054040640407404084040940410404114041240413404144041540416404174041840419404204042140422404234042440425404264042740428404294043040431404324043340434404354043640437404384043940440404414044240443404444044540446404474044840449404504045140452404534045440455404564045740458404594046040461404624046340464404654046640467404684046940470404714047240473404744047540476404774047840479404804048140482404834048440485404864048740488404894049040491404924049340494404954049640497404984049940500405014050240503405044050540506405074050840509405104051140512405134051440515405164051740518405194052040521405224052340524405254052640527405284052940530405314053240533405344053540536405374053840539405404054140542405434054440545405464054740548405494055040551405524055340554405554055640557405584055940560405614056240563405644056540566405674056840569405704057140572405734057440575405764057740578405794058040581405824058340584405854058640587405884058940590405914059240593405944059540596405974059840599406004060140602406034060440605406064060740608406094061040611406124061340614406154061640617406184061940620406214062240623406244062540626406274062840629406304063140632406334063440635406364063740638406394064040641406424064340644406454064640647406484064940650406514065240653406544065540656406574065840659406604066140662406634066440665406664066740668406694067040671406724067340674406754067640677406784067940680406814068240683406844068540686406874068840689406904069140692406934069440695406964069740698406994070040701407024070340704407054070640707407084070940710407114071240713407144071540716407174071840719407204072140722407234072440725407264072740728407294073040731407324073340734407354073640737407384073940740407414074240743407444074540746407474074840749407504075140752407534075440755407564075740758407594076040761407624076340764407654076640767407684076940770407714077240773407744077540776407774077840779407804078140782407834078440785407864078740788407894079040791407924079340794407954079640797407984079940800408014080240803408044080540806408074080840809408104081140812408134081440815408164081740818408194082040821408224082340824408254082640827408284082940830408314083240833408344083540836408374083840839408404084140842408434084440845408464084740848408494085040851408524085340854408554085640857408584085940860408614086240863408644086540866408674086840869408704087140872408734087440875408764087740878408794088040881408824088340884408854088640887408884088940890408914089240893408944089540896408974089840899409004090140902409034090440905409064090740908409094091040911409124091340914409154091640917409184091940920409214092240923409244092540926409274092840929409304093140932409334093440935409364093740938409394094040941409424094340944409454094640947409484094940950409514095240953409544095540956409574095840959409604096140962409634096440965409664096740968409694097040971409724097340974409754097640977409784097940980409814098240983409844098540986409874098840989409904099140992409934099440995409964099740998409994100041001410024100341004410054100641007410084100941010410114101241013410144101541016410174101841019410204102141022410234102441025410264102741028410294103041031410324103341034410354103641037410384103941040410414104241043410444104541046410474104841049410504105141052410534105441055410564105741058410594106041061410624106341064410654106641067410684106941070410714107241073410744107541076410774107841079410804108141082410834108441085410864108741088410894109041091410924109341094410954109641097410984109941100411014110241103411044110541106411074110841109411104111141112411134111441115411164111741118411194112041121411224112341124411254112641127411284112941130411314113241133411344113541136411374113841139411404114141142411434114441145411464114741148411494115041151411524115341154411554115641157411584115941160411614116241163411644116541166411674116841169411704117141172411734117441175411764117741178411794118041181411824118341184411854118641187411884118941190411914119241193411944119541196411974119841199412004120141202412034120441205412064120741208412094121041211412124121341214412154121641217412184121941220412214122241223412244122541226412274122841229412304123141232412334123441235412364123741238412394124041241412424124341244412454124641247412484124941250412514125241253412544125541256412574125841259412604126141262412634126441265412664126741268412694127041271412724127341274412754127641277412784127941280412814128241283412844128541286412874128841289412904129141292412934129441295412964129741298412994130041301413024130341304413054130641307413084130941310413114131241313413144131541316413174131841319413204132141322413234132441325413264132741328413294133041331413324133341334413354133641337413384133941340413414134241343413444134541346413474134841349413504135141352413534135441355413564135741358413594136041361413624136341364413654136641367413684136941370413714137241373413744137541376413774137841379413804138141382413834138441385413864138741388413894139041391413924139341394413954139641397413984139941400414014140241403414044140541406414074140841409414104141141412414134141441415414164141741418414194142041421414224142341424414254142641427414284142941430414314143241433414344143541436414374143841439414404144141442414434144441445414464144741448414494145041451414524145341454414554145641457414584145941460414614146241463414644146541466414674146841469414704147141472414734147441475414764147741478414794148041481414824148341484414854148641487414884148941490414914149241493414944149541496414974149841499415004150141502415034150441505415064150741508415094151041511415124151341514415154151641517415184151941520415214152241523415244152541526415274152841529415304153141532415334153441535415364153741538415394154041541415424154341544415454154641547415484154941550415514155241553415544155541556415574155841559415604156141562415634156441565415664156741568415694157041571415724157341574415754157641577415784157941580415814158241583415844158541586415874158841589415904159141592415934159441595415964159741598415994160041601416024160341604416054160641607416084160941610416114161241613416144161541616416174161841619416204162141622416234162441625416264162741628416294163041631416324163341634416354163641637416384163941640416414164241643416444164541646416474164841649416504165141652416534165441655416564165741658416594166041661416624166341664416654166641667416684166941670416714167241673416744167541676416774167841679416804168141682416834168441685416864168741688416894169041691416924169341694416954169641697416984169941700417014170241703417044170541706417074170841709417104171141712417134171441715417164171741718417194172041721417224172341724417254172641727417284172941730417314173241733417344173541736417374173841739417404174141742417434174441745417464174741748417494175041751417524175341754417554175641757417584175941760417614176241763417644176541766417674176841769417704177141772417734177441775417764177741778417794178041781417824178341784417854178641787417884178941790417914179241793417944179541796417974179841799418004180141802418034180441805418064180741808418094181041811418124181341814418154181641817418184181941820418214182241823418244182541826418274182841829418304183141832418334183441835418364183741838418394184041841418424184341844418454184641847418484184941850418514185241853418544185541856418574185841859418604186141862418634186441865418664186741868418694187041871418724187341874418754187641877418784187941880418814188241883418844188541886418874188841889418904189141892418934189441895418964189741898418994190041901419024190341904419054190641907419084190941910419114191241913419144191541916419174191841919419204192141922419234192441925419264192741928419294193041931419324193341934419354193641937419384193941940419414194241943419444194541946419474194841949419504195141952419534195441955419564195741958419594196041961419624196341964419654196641967419684196941970419714197241973419744197541976419774197841979419804198141982419834198441985419864198741988419894199041991419924199341994419954199641997419984199942000420014200242003420044200542006420074200842009420104201142012420134201442015420164201742018420194202042021420224202342024420254202642027420284202942030420314203242033420344203542036420374203842039420404204142042420434204442045420464204742048420494205042051420524205342054420554205642057420584205942060420614206242063420644206542066420674206842069420704207142072420734207442075420764207742078420794208042081420824208342084420854208642087420884208942090420914209242093420944209542096420974209842099421004210142102421034210442105421064210742108421094211042111421124211342114421154211642117421184211942120421214212242123421244212542126421274212842129421304213142132421334213442135421364213742138421394214042141421424214342144421454214642147421484214942150421514215242153421544215542156421574215842159421604216142162421634216442165421664216742168421694217042171421724217342174421754217642177421784217942180421814218242183421844218542186421874218842189421904219142192421934219442195421964219742198421994220042201422024220342204422054220642207422084220942210422114221242213422144221542216422174221842219422204222142222422234222442225422264222742228422294223042231422324223342234422354223642237422384223942240422414224242243422444224542246422474224842249422504225142252422534225442255422564225742258422594226042261422624226342264422654226642267422684226942270422714227242273422744227542276422774227842279422804228142282422834228442285422864228742288422894229042291422924229342294422954229642297422984229942300423014230242303423044230542306423074230842309423104231142312423134231442315423164231742318423194232042321423224232342324423254232642327423284232942330423314233242333423344233542336423374233842339423404234142342423434234442345423464234742348423494235042351423524235342354423554235642357423584235942360423614236242363423644236542366423674236842369423704237142372423734237442375423764237742378423794238042381423824238342384423854238642387423884238942390423914239242393423944239542396423974239842399424004240142402424034240442405424064240742408424094241042411424124241342414424154241642417424184241942420424214242242423424244242542426424274242842429424304243142432424334243442435424364243742438424394244042441424424244342444424454244642447424484244942450424514245242453424544245542456424574245842459424604246142462424634246442465424664246742468424694247042471424724247342474424754247642477424784247942480424814248242483424844248542486424874248842489424904249142492424934249442495424964249742498424994250042501425024250342504425054250642507425084250942510425114251242513425144251542516425174251842519425204252142522425234252442525425264252742528425294253042531425324253342534425354253642537425384253942540425414254242543425444254542546425474254842549425504255142552425534255442555425564255742558425594256042561425624256342564425654256642567425684256942570425714257242573425744257542576425774257842579425804258142582425834258442585425864258742588425894259042591425924259342594425954259642597425984259942600426014260242603426044260542606426074260842609426104261142612426134261442615426164261742618426194262042621426224262342624426254262642627426284262942630426314263242633426344263542636426374263842639426404264142642426434264442645426464264742648426494265042651426524265342654426554265642657426584265942660426614266242663426644266542666426674266842669426704267142672426734267442675426764267742678426794268042681426824268342684426854268642687426884268942690426914269242693426944269542696426974269842699427004270142702427034270442705427064270742708427094271042711427124271342714427154271642717427184271942720427214272242723427244272542726427274272842729427304273142732427334273442735427364273742738427394274042741427424274342744427454274642747427484274942750427514275242753427544275542756427574275842759427604276142762427634276442765427664276742768427694277042771427724277342774427754277642777427784277942780427814278242783427844278542786427874278842789427904279142792427934279442795427964279742798427994280042801428024280342804428054280642807428084280942810428114281242813428144281542816428174281842819428204282142822428234282442825428264282742828428294283042831428324283342834428354283642837428384283942840428414284242843428444284542846428474284842849428504285142852428534285442855428564285742858428594286042861428624286342864428654286642867428684286942870428714287242873428744287542876428774287842879428804288142882428834288442885428864288742888428894289042891428924289342894428954289642897428984289942900429014290242903429044290542906429074290842909429104291142912429134291442915429164291742918429194292042921429224292342924429254292642927429284292942930429314293242933429344293542936429374293842939429404294142942429434294442945429464294742948429494295042951429524295342954429554295642957429584295942960429614296242963429644296542966429674296842969429704297142972429734297442975429764297742978429794298042981429824298342984429854298642987429884298942990429914299242993429944299542996429974299842999430004300143002430034300443005430064300743008430094301043011430124301343014430154301643017430184301943020430214302243023430244302543026430274302843029430304303143032430334303443035430364303743038430394304043041430424304343044430454304643047430484304943050430514305243053430544305543056430574305843059430604306143062430634306443065430664306743068430694307043071430724307343074430754307643077430784307943080430814308243083430844308543086430874308843089430904309143092430934309443095430964309743098430994310043101431024310343104431054310643107431084310943110431114311243113431144311543116431174311843119431204312143122431234312443125431264312743128431294313043131431324313343134431354313643137431384313943140431414314243143431444314543146431474314843149431504315143152431534315443155431564315743158431594316043161431624316343164431654316643167431684316943170431714317243173431744317543176431774317843179431804318143182431834318443185431864318743188431894319043191431924319343194431954319643197431984319943200432014320243203432044320543206432074320843209432104321143212432134321443215432164321743218432194322043221432224322343224432254322643227432284322943230432314323243233432344323543236432374323843239432404324143242432434324443245432464324743248432494325043251432524325343254432554325643257432584325943260432614326243263432644326543266432674326843269432704327143272432734327443275432764327743278432794328043281432824328343284432854328643287432884328943290432914329243293432944329543296432974329843299433004330143302433034330443305433064330743308433094331043311433124331343314433154331643317433184331943320433214332243323433244332543326433274332843329433304333143332433334333443335433364333743338433394334043341433424334343344433454334643347433484334943350433514335243353433544335543356433574335843359433604336143362433634336443365433664336743368433694337043371433724337343374433754337643377433784337943380433814338243383433844338543386433874338843389433904339143392433934339443395433964339743398433994340043401434024340343404434054340643407434084340943410434114341243413434144341543416434174341843419434204342143422434234342443425434264342743428434294343043431434324343343434434354343643437434384343943440434414344243443434444344543446434474344843449434504345143452434534345443455434564345743458434594346043461434624346343464434654346643467434684346943470434714347243473434744347543476434774347843479434804348143482434834348443485434864348743488434894349043491434924349343494434954349643497434984349943500435014350243503435044350543506435074350843509435104351143512435134351443515435164351743518435194352043521435224352343524435254352643527435284352943530435314353243533435344353543536435374353843539435404354143542435434354443545435464354743548435494355043551435524355343554435554355643557435584355943560435614356243563435644356543566435674356843569435704357143572435734357443575435764357743578435794358043581435824358343584435854358643587435884358943590435914359243593435944359543596435974359843599436004360143602436034360443605436064360743608436094361043611436124361343614436154361643617436184361943620436214362243623436244362543626436274362843629436304363143632436334363443635436364363743638436394364043641436424364343644436454364643647436484364943650436514365243653436544365543656436574365843659436604366143662436634366443665436664366743668436694367043671436724367343674436754367643677436784367943680436814368243683436844368543686436874368843689436904369143692436934369443695436964369743698436994370043701437024370343704437054370643707437084370943710437114371243713437144371543716437174371843719437204372143722437234372443725437264372743728437294373043731437324373343734437354373643737437384373943740437414374243743437444374543746437474374843749437504375143752437534375443755437564375743758437594376043761437624376343764437654376643767437684376943770437714377243773437744377543776437774377843779437804378143782437834378443785437864378743788437894379043791437924379343794437954379643797437984379943800438014380243803438044380543806438074380843809438104381143812438134381443815438164381743818438194382043821438224382343824438254382643827438284382943830438314383243833438344383543836438374383843839438404384143842438434384443845438464384743848438494385043851438524385343854438554385643857438584385943860438614386243863438644386543866438674386843869438704387143872438734387443875438764387743878438794388043881438824388343884438854388643887438884388943890438914389243893438944389543896438974389843899439004390143902439034390443905439064390743908439094391043911439124391343914439154391643917439184391943920439214392243923439244392543926439274392843929439304393143932439334393443935439364393743938439394394043941439424394343944439454394643947439484394943950439514395243953439544395543956439574395843959439604396143962439634396443965439664396743968439694397043971439724397343974439754397643977439784397943980439814398243983439844398543986439874398843989439904399143992439934399443995439964399743998439994400044001440024400344004440054400644007440084400944010440114401244013440144401544016440174401844019440204402144022440234402444025440264402744028440294403044031440324403344034440354403644037440384403944040440414404244043440444404544046440474404844049440504405144052440534405444055440564405744058440594406044061440624406344064440654406644067440684406944070440714407244073440744407544076440774407844079440804408144082440834408444085440864408744088440894409044091440924409344094440954409644097440984409944100441014410244103441044410544106441074410844109441104411144112441134411444115441164411744118441194412044121441224412344124441254412644127441284412944130441314413244133441344413544136441374413844139441404414144142441434414444145441464414744148441494415044151441524415344154441554415644157441584415944160441614416244163441644416544166441674416844169441704417144172441734417444175441764417744178441794418044181441824418344184441854418644187441884418944190441914419244193441944419544196441974419844199442004420144202442034420444205442064420744208442094421044211442124421344214442154421644217442184421944220442214422244223442244422544226442274422844229442304423144232442334423444235442364423744238442394424044241442424424344244442454424644247442484424944250442514425244253442544425544256442574425844259442604426144262442634426444265442664426744268442694427044271442724427344274442754427644277442784427944280442814428244283442844428544286442874428844289442904429144292442934429444295442964429744298442994430044301443024430344304443054430644307443084430944310443114431244313443144431544316443174431844319443204432144322443234432444325443264432744328443294433044331443324433344334443354433644337443384433944340443414434244343443444434544346443474434844349443504435144352443534435444355443564435744358443594436044361443624436344364443654436644367443684436944370443714437244373443744437544376443774437844379443804438144382443834438444385443864438744388443894439044391443924439344394443954439644397443984439944400444014440244403444044440544406444074440844409444104441144412444134441444415444164441744418444194442044421444224442344424444254442644427444284442944430444314443244433444344443544436444374443844439444404444144442444434444444445444464444744448444494445044451444524445344454444554445644457444584445944460444614446244463444644446544466444674446844469444704447144472444734447444475444764447744478444794448044481444824448344484444854448644487444884448944490444914449244493444944449544496444974449844499445004450144502445034450444505445064450744508445094451044511445124451344514445154451644517445184451944520445214452244523445244452544526445274452844529445304453144532445334453444535445364453744538445394454044541445424454344544445454454644547445484454944550445514455244553445544455544556445574455844559445604456144562445634456444565445664456744568445694457044571445724457344574445754457644577445784457944580445814458244583445844458544586445874458844589445904459144592445934459444595445964459744598445994460044601446024460344604446054460644607446084460944610446114461244613446144461544616446174461844619446204462144622446234462444625446264462744628446294463044631446324463344634446354463644637446384463944640446414464244643446444464544646446474464844649446504465144652446534465444655446564465744658446594466044661446624466344664446654466644667446684466944670446714467244673446744467544676446774467844679446804468144682446834468444685446864468744688446894469044691446924469344694446954469644697446984469944700447014470244703447044470544706447074470844709447104471144712447134471444715447164471744718447194472044721447224472344724447254472644727447284472944730447314473244733447344473544736447374473844739447404474144742447434474444745447464474744748447494475044751447524475344754447554475644757447584475944760447614476244763447644476544766447674476844769447704477144772447734477444775447764477744778447794478044781447824478344784447854478644787447884478944790447914479244793447944479544796447974479844799448004480144802448034480444805448064480744808448094481044811448124481344814448154481644817448184481944820448214482244823448244482544826448274482844829448304483144832448334483444835448364483744838448394484044841448424484344844448454484644847448484484944850448514485244853448544485544856448574485844859448604486144862448634486444865448664486744868448694487044871448724487344874448754487644877448784487944880448814488244883448844488544886448874488844889448904489144892448934489444895448964489744898448994490044901449024490344904449054490644907449084490944910449114491244913449144491544916449174491844919449204492144922449234492444925449264492744928449294493044931449324493344934449354493644937449384493944940449414494244943449444494544946449474494844949449504495144952449534495444955449564495744958449594496044961449624496344964449654496644967449684496944970449714497244973449744497544976449774497844979449804498144982449834498444985449864498744988449894499044991449924499344994449954499644997449984499945000450014500245003450044500545006450074500845009450104501145012450134501445015450164501745018450194502045021450224502345024450254502645027450284502945030450314503245033450344503545036450374503845039450404504145042450434504445045450464504745048450494505045051450524505345054450554505645057450584505945060450614506245063450644506545066450674506845069450704507145072450734507445075450764507745078450794508045081450824508345084450854508645087450884508945090450914509245093450944509545096450974509845099451004510145102451034510445105451064510745108451094511045111451124511345114451154511645117451184511945120451214512245123451244512545126451274512845129451304513145132451334513445135451364513745138451394514045141451424514345144451454514645147451484514945150451514515245153451544515545156451574515845159451604516145162451634516445165451664516745168451694517045171451724517345174451754517645177451784517945180451814518245183451844518545186451874518845189451904519145192451934519445195451964519745198451994520045201452024520345204452054520645207452084520945210452114521245213452144521545216452174521845219452204522145222452234522445225452264522745228452294523045231452324523345234452354523645237452384523945240452414524245243452444524545246452474524845249452504525145252452534525445255452564525745258452594526045261452624526345264452654526645267452684526945270452714527245273452744527545276452774527845279452804528145282452834528445285452864528745288452894529045291452924529345294452954529645297452984529945300453014530245303453044530545306453074530845309453104531145312453134531445315453164531745318453194532045321453224532345324453254532645327453284532945330453314533245333453344533545336453374533845339453404534145342453434534445345453464534745348453494535045351453524535345354453554535645357453584535945360453614536245363453644536545366453674536845369453704537145372453734537445375453764537745378453794538045381453824538345384453854538645387453884538945390453914539245393453944539545396453974539845399454004540145402454034540445405454064540745408454094541045411454124541345414454154541645417454184541945420454214542245423454244542545426454274542845429454304543145432454334543445435454364543745438454394544045441454424544345444454454544645447454484544945450454514545245453454544545545456454574545845459454604546145462454634546445465454664546745468454694547045471454724547345474454754547645477454784547945480454814548245483454844548545486454874548845489454904549145492454934549445495454964549745498454994550045501455024550345504455054550645507455084550945510455114551245513455144551545516455174551845519455204552145522455234552445525455264552745528455294553045531455324553345534455354553645537455384553945540455414554245543455444554545546455474554845549455504555145552455534555445555455564555745558455594556045561455624556345564455654556645567455684556945570455714557245573455744557545576455774557845579455804558145582455834558445585455864558745588455894559045591455924559345594455954559645597455984559945600456014560245603456044560545606456074560845609456104561145612456134561445615456164561745618456194562045621456224562345624456254562645627456284562945630456314563245633456344563545636456374563845639456404564145642456434564445645456464564745648456494565045651456524565345654456554565645657456584565945660456614566245663456644566545666456674566845669456704567145672456734567445675456764567745678456794568045681456824568345684456854568645687456884568945690456914569245693456944569545696456974569845699457004570145702457034570445705457064570745708457094571045711457124571345714457154571645717457184571945720457214572245723457244572545726457274572845729457304573145732457334573445735457364573745738457394574045741457424574345744457454574645747457484574945750457514575245753457544575545756457574575845759457604576145762457634576445765457664576745768457694577045771457724577345774457754577645777457784577945780457814578245783457844578545786457874578845789457904579145792457934579445795457964579745798457994580045801458024580345804458054580645807458084580945810458114581245813458144581545816458174581845819458204582145822458234582445825458264582745828458294583045831458324583345834458354583645837458384583945840458414584245843458444584545846458474584845849458504585145852458534585445855458564585745858458594586045861458624586345864458654586645867458684586945870458714587245873458744587545876458774587845879458804588145882458834588445885458864588745888458894589045891458924589345894458954589645897458984589945900459014590245903459044590545906459074590845909459104591145912459134591445915459164591745918459194592045921459224592345924459254592645927459284592945930459314593245933459344593545936459374593845939459404594145942459434594445945459464594745948459494595045951459524595345954459554595645957459584595945960459614596245963459644596545966459674596845969459704597145972459734597445975459764597745978459794598045981459824598345984459854598645987459884598945990459914599245993459944599545996459974599845999460004600146002460034600446005460064600746008460094601046011460124601346014460154601646017460184601946020460214602246023460244602546026460274602846029460304603146032460334603446035460364603746038460394604046041460424604346044460454604646047460484604946050460514605246053460544605546056460574605846059460604606146062460634606446065460664606746068460694607046071460724607346074460754607646077460784607946080460814608246083460844608546086460874608846089460904609146092460934609446095460964609746098460994610046101461024610346104461054610646107461084610946110461114611246113461144611546116461174611846119461204612146122461234612446125461264612746128461294613046131461324613346134461354613646137461384613946140461414614246143461444614546146461474614846149461504615146152461534615446155461564615746158461594616046161461624616346164461654616646167461684616946170461714617246173461744617546176461774617846179461804618146182461834618446185461864618746188461894619046191461924619346194461954619646197461984619946200462014620246203462044620546206462074620846209462104621146212462134621446215462164621746218462194622046221462224622346224462254622646227462284622946230462314623246233462344623546236462374623846239462404624146242462434624446245462464624746248462494625046251462524625346254462554625646257462584625946260462614626246263462644626546266462674626846269462704627146272462734627446275462764627746278462794628046281462824628346284462854628646287462884628946290462914629246293462944629546296462974629846299463004630146302463034630446305463064630746308463094631046311463124631346314463154631646317463184631946320463214632246323463244632546326463274632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356463574635846359463604636146362463634636446365463664636746368463694637046371463724637346374463754637646377463784637946380463814638246383463844638546386463874638846389463904639146392463934639446395463964639746398463994640046401464024640346404464054640646407464084640946410464114641246413464144641546416464174641846419464204642146422464234642446425464264642746428464294643046431464324643346434464354643646437464384643946440464414644246443464444644546446464474644846449464504645146452464534645446455464564645746458464594646046461464624646346464464654646646467464684646946470464714647246473464744647546476464774647846479464804648146482464834648446485464864648746488464894649046491464924649346494464954649646497464984649946500465014650246503465044650546506465074650846509465104651146512465134651446515465164651746518465194652046521465224652346524465254652646527465284652946530465314653246533465344653546536465374653846539465404654146542465434654446545465464654746548465494655046551465524655346554465554655646557465584655946560465614656246563465644656546566465674656846569465704657146572465734657446575465764657746578465794658046581465824658346584465854658646587465884658946590465914659246593465944659546596465974659846599466004660146602466034660446605466064660746608466094661046611466124661346614466154661646617466184661946620466214662246623466244662546626466274662846629466304663146632466334663446635466364663746638466394664046641466424664346644466454664646647466484664946650466514665246653466544665546656466574665846659466604666146662466634666446665466664666746668466694667046671466724667346674466754667646677466784667946680466814668246683466844668546686466874668846689466904669146692466934669446695466964669746698466994670046701467024670346704467054670646707467084670946710467114671246713467144671546716467174671846719467204672146722467234672446725467264672746728467294673046731467324673346734467354673646737467384673946740467414674246743467444674546746467474674846749467504675146752467534675446755467564675746758467594676046761467624676346764467654676646767467684676946770467714677246773467744677546776467774677846779467804678146782467834678446785467864678746788467894679046791467924679346794467954679646797467984679946800468014680246803468044680546806468074680846809468104681146812468134681446815468164681746818468194682046821468224682346824468254682646827468284682946830468314683246833468344683546836468374683846839468404684146842468434684446845468464684746848468494685046851468524685346854468554685646857468584685946860468614686246863468644686546866468674686846869468704687146872468734687446875468764687746878468794688046881468824688346884468854688646887468884688946890468914689246893468944689546896468974689846899469004690146902469034690446905469064690746908469094691046911469124691346914469154691646917469184691946920469214692246923469244692546926469274692846929469304693146932469334693446935469364693746938469394694046941469424694346944469454694646947469484694946950469514695246953469544695546956469574695846959469604696146962469634696446965469664696746968469694697046971469724697346974469754697646977469784697946980469814698246983469844698546986469874698846989469904699146992469934699446995469964699746998469994700047001470024700347004470054700647007470084700947010470114701247013470144701547016470174701847019470204702147022470234702447025470264702747028470294703047031470324703347034470354703647037470384703947040470414704247043470444704547046470474704847049470504705147052470534705447055470564705747058470594706047061470624706347064470654706647067470684706947070470714707247073470744707547076470774707847079470804708147082470834708447085470864708747088470894709047091470924709347094470954709647097470984709947100471014710247103471044710547106471074710847109471104711147112471134711447115471164711747118471194712047121471224712347124471254712647127471284712947130471314713247133471344713547136471374713847139471404714147142471434714447145471464714747148471494715047151471524715347154471554715647157471584715947160471614716247163471644716547166471674716847169471704717147172471734717447175471764717747178471794718047181471824718347184471854718647187471884718947190471914719247193471944719547196471974719847199472004720147202472034720447205472064720747208472094721047211472124721347214472154721647217472184721947220472214722247223472244722547226472274722847229472304723147232472334723447235472364723747238472394724047241472424724347244472454724647247472484724947250472514725247253472544725547256472574725847259472604726147262472634726447265472664726747268472694727047271472724727347274472754727647277472784727947280472814728247283472844728547286472874728847289472904729147292472934729447295472964729747298472994730047301473024730347304473054730647307473084730947310473114731247313473144731547316473174731847319473204732147322473234732447325473264732747328473294733047331473324733347334473354733647337473384733947340473414734247343473444734547346473474734847349473504735147352473534735447355473564735747358473594736047361473624736347364473654736647367473684736947370473714737247373473744737547376473774737847379473804738147382473834738447385473864738747388473894739047391473924739347394473954739647397473984739947400474014740247403474044740547406474074740847409474104741147412474134741447415474164741747418474194742047421474224742347424474254742647427474284742947430474314743247433474344743547436474374743847439474404744147442474434744447445474464744747448474494745047451474524745347454474554745647457474584745947460474614746247463474644746547466474674746847469474704747147472474734747447475474764747747478474794748047481474824748347484474854748647487474884748947490474914749247493474944749547496474974749847499475004750147502475034750447505475064750747508475094751047511475124751347514475154751647517475184751947520475214752247523475244752547526475274752847529475304753147532475334753447535475364753747538475394754047541475424754347544475454754647547475484754947550475514755247553475544755547556475574755847559475604756147562475634756447565475664756747568475694757047571475724757347574475754757647577475784757947580475814758247583475844758547586475874758847589475904759147592475934759447595475964759747598475994760047601476024760347604476054760647607476084760947610476114761247613476144761547616476174761847619476204762147622476234762447625476264762747628476294763047631476324763347634476354763647637476384763947640476414764247643476444764547646476474764847649476504765147652476534765447655476564765747658476594766047661476624766347664476654766647667476684766947670476714767247673476744767547676476774767847679476804768147682476834768447685476864768747688476894769047691476924769347694476954769647697476984769947700477014770247703477044770547706477074770847709477104771147712477134771447715477164771747718477194772047721477224772347724477254772647727477284772947730477314773247733477344773547736477374773847739477404774147742477434774447745477464774747748477494775047751477524775347754477554775647757477584775947760477614776247763477644776547766477674776847769477704777147772477734777447775477764777747778477794778047781477824778347784477854778647787477884778947790477914779247793477944779547796477974779847799478004780147802478034780447805478064780747808478094781047811478124781347814478154781647817478184781947820478214782247823478244782547826478274782847829478304783147832478334783447835478364783747838478394784047841478424784347844478454784647847478484784947850478514785247853478544785547856478574785847859478604786147862478634786447865478664786747868478694787047871478724787347874478754787647877478784787947880478814788247883478844788547886478874788847889478904789147892478934789447895478964789747898478994790047901479024790347904479054790647907479084790947910479114791247913479144791547916479174791847919479204792147922479234792447925479264792747928479294793047931479324793347934479354793647937479384793947940479414794247943479444794547946479474794847949479504795147952479534795447955479564795747958479594796047961479624796347964479654796647967479684796947970479714797247973479744797547976479774797847979479804798147982479834798447985479864798747988479894799047991479924799347994479954799647997479984799948000480014800248003480044800548006480074800848009480104801148012480134801448015480164801748018480194802048021480224802348024480254802648027480284802948030480314803248033480344803548036480374803848039480404804148042480434804448045480464804748048480494805048051480524805348054480554805648057480584805948060480614806248063480644806548066480674806848069480704807148072480734807448075480764807748078480794808048081480824808348084480854808648087480884808948090480914809248093480944809548096480974809848099481004810148102481034810448105481064810748108481094811048111481124811348114481154811648117481184811948120481214812248123481244812548126481274812848129481304813148132481334813448135481364813748138481394814048141481424814348144481454814648147481484814948150481514815248153481544815548156481574815848159481604816148162481634816448165481664816748168481694817048171481724817348174481754817648177481784817948180481814818248183481844818548186481874818848189481904819148192481934819448195481964819748198481994820048201482024820348204482054820648207482084820948210482114821248213482144821548216482174821848219482204822148222482234822448225482264822748228482294823048231482324823348234482354823648237482384823948240482414824248243482444824548246482474824848249482504825148252482534825448255482564825748258482594826048261482624826348264482654826648267482684826948270482714827248273482744827548276482774827848279482804828148282482834828448285482864828748288482894829048291482924829348294482954829648297482984829948300483014830248303483044830548306483074830848309483104831148312483134831448315483164831748318483194832048321483224832348324483254832648327483284832948330483314833248333483344833548336483374833848339483404834148342483434834448345483464834748348483494835048351483524835348354483554835648357483584835948360483614836248363483644836548366483674836848369483704837148372483734837448375483764837748378483794838048381483824838348384483854838648387483884838948390483914839248393483944839548396483974839848399484004840148402484034840448405484064840748408484094841048411484124841348414484154841648417484184841948420484214842248423484244842548426484274842848429484304843148432484334843448435484364843748438484394844048441484424844348444484454844648447484484844948450484514845248453484544845548456484574845848459484604846148462484634846448465484664846748468484694847048471484724847348474484754847648477484784847948480484814848248483484844848548486484874848848489484904849148492484934849448495484964849748498484994850048501485024850348504485054850648507485084850948510485114851248513485144851548516485174851848519485204852148522485234852448525485264852748528485294853048531485324853348534485354853648537485384853948540485414854248543485444854548546485474854848549485504855148552485534855448555485564855748558485594856048561485624856348564485654856648567485684856948570485714857248573485744857548576485774857848579485804858148582485834858448585485864858748588485894859048591485924859348594485954859648597485984859948600486014860248603486044860548606486074860848609486104861148612486134861448615486164861748618486194862048621486224862348624486254862648627486284862948630486314863248633486344863548636486374863848639486404864148642486434864448645486464864748648486494865048651486524865348654486554865648657486584865948660486614866248663486644866548666486674866848669486704867148672486734867448675486764867748678486794868048681486824868348684486854868648687486884868948690486914869248693486944869548696486974869848699487004870148702487034870448705487064870748708487094871048711487124871348714487154871648717487184871948720487214872248723487244872548726487274872848729487304873148732487334873448735487364873748738487394874048741487424874348744487454874648747487484874948750487514875248753487544875548756487574875848759487604876148762487634876448765487664876748768487694877048771487724877348774487754877648777487784877948780487814878248783487844878548786487874878848789487904879148792487934879448795487964879748798487994880048801488024880348804488054880648807488084880948810488114881248813488144881548816488174881848819488204882148822488234882448825488264882748828488294883048831488324883348834488354883648837488384883948840488414884248843488444884548846488474884848849488504885148852488534885448855488564885748858488594886048861488624886348864488654886648867488684886948870488714887248873488744887548876488774887848879488804888148882488834888448885488864888748888488894889048891488924889348894488954889648897488984889948900489014890248903489044890548906489074890848909489104891148912489134891448915489164891748918489194892048921489224892348924489254892648927489284892948930489314893248933489344893548936489374893848939489404894148942489434894448945489464894748948489494895048951489524895348954489554895648957489584895948960489614896248963489644896548966489674896848969489704897148972489734897448975489764897748978489794898048981489824898348984489854898648987489884898948990489914899248993489944899548996489974899848999490004900149002490034900449005490064900749008490094901049011490124901349014490154901649017490184901949020490214902249023490244902549026490274902849029490304903149032490334903449035490364903749038490394904049041490424904349044490454904649047490484904949050490514905249053490544905549056490574905849059490604906149062490634906449065490664906749068490694907049071490724907349074490754907649077490784907949080490814908249083490844908549086490874908849089490904909149092490934909449095490964909749098490994910049101491024910349104491054910649107491084910949110491114911249113491144911549116491174911849119491204912149122491234912449125491264912749128491294913049131491324913349134491354913649137491384913949140491414914249143491444914549146491474914849149491504915149152491534915449155491564915749158491594916049161491624916349164491654916649167491684916949170491714917249173491744917549176491774917849179491804918149182491834918449185491864918749188491894919049191491924919349194491954919649197491984919949200492014920249203492044920549206492074920849209492104921149212492134921449215492164921749218492194922049221492224922349224492254922649227492284922949230492314923249233492344923549236492374923849239492404924149242492434924449245492464924749248492494925049251492524925349254492554925649257492584925949260492614926249263492644926549266492674926849269492704927149272492734927449275492764927749278492794928049281492824928349284492854928649287492884928949290492914929249293492944929549296492974929849299493004930149302493034930449305493064930749308493094931049311493124931349314493154931649317493184931949320493214932249323493244932549326493274932849329493304933149332493334933449335493364933749338493394934049341493424934349344493454934649347493484934949350493514935249353493544935549356493574935849359493604936149362493634936449365493664936749368493694937049371493724937349374493754937649377493784937949380493814938249383493844938549386493874938849389493904939149392493934939449395493964939749398493994940049401494024940349404494054940649407494084940949410494114941249413494144941549416494174941849419494204942149422494234942449425494264942749428494294943049431494324943349434494354943649437494384943949440494414944249443494444944549446494474944849449494504945149452494534945449455494564945749458494594946049461494624946349464494654946649467494684946949470494714947249473494744947549476494774947849479494804948149482494834948449485494864948749488494894949049491494924949349494494954949649497494984949949500495014950249503495044950549506495074950849509495104951149512495134951449515495164951749518495194952049521495224952349524495254952649527495284952949530495314953249533495344953549536495374953849539495404954149542495434954449545495464954749548495494955049551495524955349554495554955649557495584955949560495614956249563495644956549566495674956849569495704957149572495734957449575495764957749578495794958049581495824958349584495854958649587495884958949590495914959249593495944959549596495974959849599496004960149602496034960449605496064960749608496094961049611496124961349614496154961649617496184961949620496214962249623496244962549626496274962849629496304963149632496334963449635496364963749638496394964049641496424964349644496454964649647496484964949650496514965249653496544965549656496574965849659496604966149662496634966449665496664966749668496694967049671496724967349674496754967649677496784967949680496814968249683496844968549686496874968849689496904969149692496934969449695496964969749698496994970049701497024970349704497054970649707497084970949710497114971249713497144971549716497174971849719497204972149722497234972449725497264972749728497294973049731497324973349734497354973649737497384973949740497414974249743497444974549746497474974849749497504975149752497534975449755497564975749758497594976049761497624976349764497654976649767497684976949770497714977249773497744977549776497774977849779497804978149782497834978449785497864978749788497894979049791497924979349794497954979649797497984979949800498014980249803498044980549806498074980849809498104981149812498134981449815498164981749818498194982049821498224982349824498254982649827498284982949830498314983249833498344983549836498374983849839498404984149842498434984449845498464984749848498494985049851498524985349854498554985649857498584985949860498614986249863498644986549866498674986849869498704987149872498734987449875498764987749878498794988049881498824988349884498854988649887498884988949890498914989249893498944989549896498974989849899499004990149902499034990449905499064990749908499094991049911499124991349914499154991649917499184991949920499214992249923499244992549926499274992849929499304993149932499334993449935499364993749938499394994049941499424994349944499454994649947499484994949950499514995249953499544995549956499574995849959499604996149962499634996449965499664996749968499694997049971499724997349974499754997649977499784997949980499814998249983499844998549986499874998849989499904999149992499934999449995499964999749998499995000050001500025000350004500055000650007500085000950010500115001250013500145001550016500175001850019500205002150022500235002450025500265002750028500295003050031500325003350034500355003650037500385003950040500415004250043500445004550046500475004850049500505005150052500535005450055500565005750058500595006050061500625006350064500655006650067500685006950070500715007250073500745007550076500775007850079500805008150082500835008450085500865008750088500895009050091500925009350094500955009650097500985009950100501015010250103501045010550106501075010850109501105011150112501135011450115501165011750118501195012050121501225012350124501255012650127501285012950130501315013250133501345013550136501375013850139501405014150142501435014450145501465014750148501495015050151501525015350154501555015650157501585015950160501615016250163501645016550166501675016850169501705017150172501735017450175501765017750178501795018050181501825018350184501855018650187501885018950190501915019250193501945019550196501975019850199502005020150202502035020450205502065020750208502095021050211502125021350214502155021650217502185021950220502215022250223502245022550226502275022850229502305023150232502335023450235502365023750238502395024050241502425024350244502455024650247502485024950250502515025250253502545025550256502575025850259502605026150262502635026450265502665026750268502695027050271502725027350274502755027650277502785027950280502815028250283502845028550286502875028850289502905029150292502935029450295502965029750298502995030050301503025030350304503055030650307503085030950310503115031250313503145031550316503175031850319503205032150322503235032450325503265032750328503295033050331503325033350334503355033650337503385033950340503415034250343503445034550346503475034850349503505035150352503535035450355503565035750358503595036050361503625036350364503655036650367503685036950370503715037250373503745037550376503775037850379503805038150382503835038450385503865038750388503895039050391503925039350394503955039650397503985039950400504015040250403504045040550406504075040850409504105041150412504135041450415504165041750418504195042050421504225042350424504255042650427504285042950430504315043250433504345043550436504375043850439504405044150442504435044450445504465044750448504495045050451504525045350454504555045650457504585045950460504615046250463504645046550466504675046850469504705047150472504735047450475504765047750478504795048050481504825048350484504855048650487504885048950490504915049250493504945049550496504975049850499505005050150502505035050450505505065050750508505095051050511505125051350514505155051650517505185051950520505215052250523505245052550526505275052850529505305053150532505335053450535505365053750538505395054050541505425054350544505455054650547505485054950550505515055250553505545055550556505575055850559505605056150562505635056450565505665056750568505695057050571505725057350574505755057650577505785057950580505815058250583505845058550586505875058850589505905059150592505935059450595505965059750598505995060050601506025060350604506055060650607506085060950610506115061250613506145061550616506175061850619506205062150622506235062450625506265062750628506295063050631506325063350634506355063650637506385063950640506415064250643506445064550646506475064850649506505065150652506535065450655506565065750658506595066050661506625066350664506655066650667506685066950670506715067250673506745067550676506775067850679506805068150682506835068450685506865068750688506895069050691506925069350694506955069650697506985069950700507015070250703507045070550706507075070850709507105071150712507135071450715507165071750718507195072050721507225072350724507255072650727507285072950730507315073250733507345073550736507375073850739507405074150742507435074450745507465074750748507495075050751507525075350754507555075650757507585075950760507615076250763507645076550766507675076850769507705077150772507735077450775507765077750778507795078050781507825078350784507855078650787507885078950790507915079250793507945079550796507975079850799508005080150802508035080450805508065080750808508095081050811508125081350814508155081650817508185081950820508215082250823508245082550826508275082850829508305083150832508335083450835508365083750838508395084050841508425084350844508455084650847508485084950850508515085250853508545085550856508575085850859508605086150862508635086450865508665086750868508695087050871508725087350874508755087650877508785087950880508815088250883508845088550886508875088850889508905089150892508935089450895508965089750898508995090050901509025090350904509055090650907509085090950910509115091250913509145091550916509175091850919509205092150922509235092450925509265092750928509295093050931509325093350934509355093650937509385093950940509415094250943509445094550946509475094850949509505095150952509535095450955509565095750958509595096050961509625096350964509655096650967509685096950970509715097250973509745097550976509775097850979509805098150982509835098450985509865098750988509895099050991509925099350994509955099650997509985099951000510015100251003510045100551006510075100851009510105101151012510135101451015510165101751018510195102051021510225102351024510255102651027510285102951030510315103251033510345103551036510375103851039510405104151042510435104451045510465104751048510495105051051510525105351054510555105651057510585105951060510615106251063510645106551066510675106851069510705107151072510735107451075510765107751078510795108051081510825108351084510855108651087510885108951090510915109251093510945109551096510975109851099511005110151102511035110451105511065110751108511095111051111511125111351114511155111651117511185111951120511215112251123511245112551126511275112851129511305113151132511335113451135511365113751138511395114051141511425114351144511455114651147511485114951150511515115251153511545115551156511575115851159511605116151162511635116451165511665116751168511695117051171511725117351174511755117651177511785117951180511815118251183511845118551186511875118851189511905119151192511935119451195511965119751198511995120051201512025120351204512055120651207512085120951210512115121251213512145121551216512175121851219512205122151222512235122451225512265122751228512295123051231512325123351234512355123651237512385123951240512415124251243512445124551246512475124851249512505125151252512535125451255512565125751258512595126051261512625126351264512655126651267512685126951270512715127251273512745127551276512775127851279512805128151282512835128451285512865128751288512895129051291512925129351294512955129651297512985129951300513015130251303513045130551306513075130851309513105131151312513135131451315513165131751318513195132051321513225132351324513255132651327513285132951330513315133251333513345133551336513375133851339513405134151342513435134451345513465134751348513495135051351513525135351354513555135651357513585135951360513615136251363513645136551366513675136851369513705137151372513735137451375513765137751378513795138051381513825138351384513855138651387513885138951390513915139251393513945139551396513975139851399514005140151402514035140451405514065140751408514095141051411514125141351414514155141651417514185141951420514215142251423514245142551426514275142851429514305143151432514335143451435514365143751438514395144051441514425144351444514455144651447514485144951450514515145251453514545145551456514575145851459514605146151462514635146451465514665146751468514695147051471514725147351474514755147651477514785147951480514815148251483514845148551486514875148851489514905149151492514935149451495514965149751498514995150051501515025150351504515055150651507515085150951510515115151251513515145151551516515175151851519515205152151522515235152451525515265152751528515295153051531515325153351534515355153651537515385153951540515415154251543515445154551546515475154851549515505155151552515535155451555515565155751558515595156051561515625156351564515655156651567515685156951570515715157251573515745157551576515775157851579515805158151582515835158451585515865158751588515895159051591515925159351594515955159651597515985159951600516015160251603516045160551606516075160851609516105161151612516135161451615516165161751618516195162051621516225162351624516255162651627516285162951630516315163251633516345163551636516375163851639516405164151642516435164451645516465164751648516495165051651516525165351654516555165651657516585165951660516615166251663516645166551666516675166851669516705167151672516735167451675516765167751678516795168051681516825168351684516855168651687516885168951690516915169251693516945169551696516975169851699517005170151702517035170451705517065170751708517095171051711517125171351714517155171651717517185171951720517215172251723517245172551726517275172851729517305173151732517335173451735517365173751738517395174051741517425174351744517455174651747517485174951750517515175251753517545175551756517575175851759517605176151762517635176451765517665176751768517695177051771517725177351774517755177651777517785177951780517815178251783517845178551786517875178851789517905179151792517935179451795517965179751798517995180051801518025180351804518055180651807518085180951810518115181251813518145181551816518175181851819518205182151822518235182451825518265182751828518295183051831518325183351834518355183651837518385183951840518415184251843518445184551846518475184851849518505185151852518535185451855518565185751858518595186051861518625186351864518655186651867518685186951870518715187251873518745187551876518775187851879518805188151882518835188451885518865188751888518895189051891518925189351894518955189651897518985189951900519015190251903519045190551906519075190851909519105191151912519135191451915519165191751918519195192051921519225192351924519255192651927519285192951930519315193251933519345193551936519375193851939519405194151942519435194451945519465194751948519495195051951519525195351954519555195651957519585195951960519615196251963519645196551966519675196851969519705197151972519735197451975519765197751978519795198051981519825198351984519855198651987519885198951990519915199251993519945199551996519975199851999520005200152002520035200452005520065200752008520095201052011520125201352014520155201652017520185201952020520215202252023520245202552026520275202852029520305203152032520335203452035520365203752038520395204052041520425204352044520455204652047520485204952050520515205252053520545205552056520575205852059520605206152062520635206452065520665206752068520695207052071520725207352074520755207652077520785207952080520815208252083520845208552086520875208852089520905209152092520935209452095520965209752098520995210052101521025210352104521055210652107521085210952110521115211252113521145211552116521175211852119521205212152122521235212452125521265212752128521295213052131521325213352134521355213652137521385213952140521415214252143521445214552146521475214852149521505215152152521535215452155521565215752158521595216052161521625216352164521655216652167521685216952170521715217252173521745217552176521775217852179521805218152182521835218452185521865218752188521895219052191521925219352194521955219652197521985219952200522015220252203522045220552206522075220852209522105221152212522135221452215522165221752218522195222052221522225222352224522255222652227522285222952230522315223252233522345223552236522375223852239522405224152242522435224452245522465224752248522495225052251522525225352254522555225652257522585225952260522615226252263522645226552266522675226852269522705227152272522735227452275522765227752278522795228052281522825228352284522855228652287522885228952290522915229252293522945229552296522975229852299523005230152302523035230452305523065230752308523095231052311523125231352314523155231652317523185231952320523215232252323523245232552326523275232852329523305233152332523335233452335523365233752338523395234052341523425234352344523455234652347523485234952350523515235252353523545235552356523575235852359523605236152362523635236452365523665236752368523695237052371523725237352374523755237652377523785237952380523815238252383523845238552386523875238852389523905239152392523935239452395523965239752398523995240052401524025240352404524055240652407524085240952410524115241252413524145241552416524175241852419524205242152422524235242452425524265242752428524295243052431524325243352434524355243652437524385243952440524415244252443524445244552446524475244852449524505245152452524535245452455524565245752458524595246052461524625246352464524655246652467524685246952470524715247252473524745247552476524775247852479524805248152482524835248452485524865248752488524895249052491524925249352494524955249652497524985249952500525015250252503525045250552506525075250852509525105251152512525135251452515525165251752518525195252052521525225252352524525255252652527525285252952530525315253252533525345253552536525375253852539525405254152542525435254452545525465254752548525495255052551525525255352554525555255652557525585255952560525615256252563525645256552566525675256852569525705257152572525735257452575525765257752578525795258052581525825258352584525855258652587525885258952590525915259252593525945259552596525975259852599526005260152602526035260452605526065260752608526095261052611526125261352614526155261652617526185261952620526215262252623526245262552626526275262852629526305263152632526335263452635526365263752638526395264052641526425264352644526455264652647526485264952650526515265252653526545265552656526575265852659526605266152662526635266452665526665266752668526695267052671526725267352674526755267652677526785267952680526815268252683526845268552686526875268852689526905269152692526935269452695526965269752698526995270052701527025270352704527055270652707527085270952710527115271252713527145271552716527175271852719527205272152722527235272452725527265272752728527295273052731527325273352734527355273652737527385273952740527415274252743527445274552746527475274852749527505275152752527535275452755527565275752758527595276052761527625276352764527655276652767527685276952770527715277252773527745277552776527775277852779527805278152782527835278452785527865278752788527895279052791527925279352794527955279652797527985279952800528015280252803528045280552806528075280852809528105281152812528135281452815528165281752818528195282052821528225282352824528255282652827528285282952830528315283252833528345283552836528375283852839528405284152842528435284452845528465284752848528495285052851528525285352854528555285652857528585285952860528615286252863528645286552866528675286852869528705287152872528735287452875528765287752878528795288052881528825288352884528855288652887528885288952890528915289252893528945289552896528975289852899529005290152902529035290452905529065290752908529095291052911529125291352914529155291652917529185291952920529215292252923529245292552926529275292852929529305293152932529335293452935529365293752938529395294052941529425294352944529455294652947529485294952950529515295252953529545295552956529575295852959529605296152962529635296452965529665296752968529695297052971529725297352974529755297652977529785297952980529815298252983529845298552986529875298852989529905299152992529935299452995529965299752998529995300053001530025300353004530055300653007530085300953010530115301253013530145301553016530175301853019530205302153022530235302453025530265302753028530295303053031530325303353034530355303653037530385303953040530415304253043530445304553046530475304853049530505305153052530535305453055530565305753058530595306053061530625306353064530655306653067530685306953070530715307253073530745307553076530775307853079530805308153082530835308453085530865308753088530895309053091530925309353094530955309653097530985309953100531015310253103531045310553106531075310853109531105311153112531135311453115531165311753118531195312053121531225312353124531255312653127531285312953130531315313253133531345313553136531375313853139531405314153142531435314453145531465314753148531495315053151531525315353154531555315653157531585315953160531615316253163531645316553166531675316853169531705317153172531735317453175531765317753178531795318053181531825318353184531855318653187531885318953190531915319253193531945319553196531975319853199532005320153202532035320453205532065320753208532095321053211532125321353214532155321653217532185321953220532215322253223532245322553226532275322853229532305323153232532335323453235532365323753238532395324053241532425324353244532455324653247532485324953250532515325253253532545325553256532575325853259532605326153262532635326453265532665326753268532695327053271532725327353274532755327653277532785327953280532815328253283532845328553286532875328853289532905329153292532935329453295532965329753298532995330053301533025330353304533055330653307533085330953310533115331253313533145331553316533175331853319533205332153322533235332453325533265332753328533295333053331533325333353334533355333653337533385333953340533415334253343533445334553346533475334853349533505335153352533535335453355533565335753358533595336053361533625336353364533655336653367533685336953370533715337253373533745337553376533775337853379533805338153382533835338453385533865338753388533895339053391533925339353394533955339653397533985339953400534015340253403534045340553406534075340853409534105341153412534135341453415534165341753418534195342053421534225342353424534255342653427534285342953430534315343253433534345343553436534375343853439534405344153442534435344453445534465344753448534495345053451534525345353454534555345653457534585345953460534615346253463534645346553466534675346853469534705347153472534735347453475534765347753478534795348053481534825348353484534855348653487534885348953490534915349253493534945349553496534975349853499535005350153502535035350453505535065350753508535095351053511535125351353514535155351653517535185351953520535215352253523535245352553526535275352853529535305353153532535335353453535535365353753538535395354053541535425354353544535455354653547535485354953550535515355253553535545355553556535575355853559535605356153562535635356453565535665356753568535695357053571535725357353574535755357653577535785357953580535815358253583535845358553586535875358853589535905359153592535935359453595535965359753598535995360053601536025360353604536055360653607536085360953610536115361253613536145361553616536175361853619536205362153622536235362453625536265362753628536295363053631536325363353634536355363653637536385363953640536415364253643536445364553646536475364853649536505365153652536535365453655536565365753658536595366053661536625366353664536655366653667536685366953670536715367253673536745367553676536775367853679536805368153682536835368453685536865368753688536895369053691536925369353694536955369653697536985369953700537015370253703537045370553706537075370853709537105371153712537135371453715537165371753718537195372053721537225372353724537255372653727537285372953730537315373253733537345373553736537375373853739537405374153742537435374453745537465374753748537495375053751537525375353754537555375653757537585375953760537615376253763537645376553766537675376853769537705377153772537735377453775537765377753778537795378053781537825378353784537855378653787537885378953790537915379253793537945379553796537975379853799538005380153802538035380453805538065380753808538095381053811538125381353814538155381653817538185381953820538215382253823538245382553826538275382853829538305383153832538335383453835538365383753838538395384053841538425384353844538455384653847538485384953850538515385253853538545385553856538575385853859538605386153862538635386453865538665386753868538695387053871538725387353874538755387653877538785387953880538815388253883538845388553886538875388853889538905389153892538935389453895538965389753898538995390053901539025390353904539055390653907539085390953910539115391253913539145391553916539175391853919539205392153922539235392453925539265392753928539295393053931539325393353934539355393653937539385393953940539415394253943539445394553946539475394853949539505395153952539535395453955539565395753958539595396053961539625396353964539655396653967539685396953970539715397253973539745397553976539775397853979539805398153982539835398453985539865398753988539895399053991539925399353994539955399653997539985399954000540015400254003540045400554006540075400854009540105401154012540135401454015540165401754018540195402054021540225402354024540255402654027540285402954030540315403254033540345403554036540375403854039540405404154042540435404454045540465404754048540495405054051540525405354054540555405654057540585405954060540615406254063540645406554066540675406854069540705407154072540735407454075540765407754078540795408054081540825408354084540855408654087540885408954090540915409254093540945409554096540975409854099541005410154102541035410454105541065410754108541095411054111541125411354114541155411654117541185411954120541215412254123541245412554126541275412854129541305413154132541335413454135541365413754138541395414054141541425414354144541455414654147541485414954150541515415254153541545415554156541575415854159541605416154162541635416454165541665416754168541695417054171541725417354174541755417654177541785417954180541815418254183541845418554186541875418854189541905419154192541935419454195541965419754198541995420054201542025420354204542055420654207542085420954210542115421254213542145421554216542175421854219542205422154222542235422454225542265422754228542295423054231542325423354234542355423654237542385423954240542415424254243542445424554246542475424854249542505425154252542535425454255542565425754258542595426054261542625426354264542655426654267542685426954270542715427254273542745427554276542775427854279542805428154282542835428454285542865428754288542895429054291542925429354294542955429654297542985429954300543015430254303543045430554306543075430854309543105431154312543135431454315543165431754318543195432054321543225432354324543255432654327543285432954330543315433254333543345433554336543375433854339543405434154342543435434454345543465434754348543495435054351543525435354354543555435654357543585435954360543615436254363543645436554366543675436854369543705437154372543735437454375543765437754378543795438054381543825438354384543855438654387543885438954390543915439254393543945439554396543975439854399544005440154402544035440454405544065440754408544095441054411544125441354414544155441654417544185441954420544215442254423544245442554426544275442854429544305443154432544335443454435544365443754438544395444054441544425444354444544455444654447544485444954450544515445254453544545445554456544575445854459544605446154462544635446454465544665446754468544695447054471544725447354474544755447654477544785447954480544815448254483544845448554486544875448854489544905449154492544935449454495544965449754498544995450054501545025450354504545055450654507545085450954510545115451254513545145451554516545175451854519545205452154522545235452454525545265452754528545295453054531545325453354534545355453654537545385453954540545415454254543545445454554546545475454854549545505455154552545535455454555545565455754558545595456054561545625456354564545655456654567545685456954570545715457254573545745457554576545775457854579545805458154582545835458454585545865458754588545895459054591545925459354594545955459654597545985459954600546015460254603546045460554606546075460854609546105461154612546135461454615546165461754618546195462054621546225462354624546255462654627546285462954630546315463254633546345463554636546375463854639546405464154642546435464454645546465464754648546495465054651546525465354654546555465654657546585465954660546615466254663546645466554666546675466854669546705467154672546735467454675546765467754678546795468054681546825468354684546855468654687546885468954690546915469254693546945469554696546975469854699547005470154702547035470454705547065470754708547095471054711547125471354714547155471654717547185471954720547215472254723547245472554726547275472854729547305473154732547335473454735547365473754738547395474054741547425474354744547455474654747547485474954750547515475254753547545475554756547575475854759547605476154762547635476454765547665476754768547695477054771547725477354774547755477654777547785477954780547815478254783547845478554786547875478854789547905479154792547935479454795547965479754798547995480054801548025480354804548055480654807548085480954810548115481254813548145481554816548175481854819548205482154822548235482454825548265482754828548295483054831548325483354834548355483654837548385483954840548415484254843548445484554846548475484854849548505485154852548535485454855548565485754858548595486054861548625486354864548655486654867548685486954870548715487254873548745487554876548775487854879548805488154882548835488454885548865488754888548895489054891548925489354894548955489654897548985489954900549015490254903549045490554906549075490854909549105491154912549135491454915549165491754918549195492054921549225492354924549255492654927549285492954930549315493254933549345493554936549375493854939549405494154942549435494454945549465494754948549495495054951549525495354954549555495654957549585495954960549615496254963549645496554966549675496854969549705497154972549735497454975549765497754978549795498054981549825498354984549855498654987549885498954990549915499254993549945499554996549975499854999550005500155002550035500455005550065500755008550095501055011550125501355014550155501655017550185501955020550215502255023550245502555026550275502855029550305503155032550335503455035550365503755038550395504055041550425504355044550455504655047550485504955050550515505255053550545505555056550575505855059550605506155062550635506455065550665506755068550695507055071550725507355074550755507655077550785507955080550815508255083550845508555086550875508855089550905509155092550935509455095550965509755098550995510055101551025510355104551055510655107551085510955110551115511255113551145511555116551175511855119551205512155122551235512455125551265512755128551295513055131551325513355134551355513655137551385513955140551415514255143551445514555146551475514855149551505515155152551535515455155551565515755158551595516055161551625516355164551655516655167551685516955170551715517255173551745517555176551775517855179551805518155182551835518455185551865518755188551895519055191551925519355194551955519655197551985519955200552015520255203552045520555206552075520855209552105521155212552135521455215552165521755218552195522055221552225522355224552255522655227552285522955230552315523255233552345523555236552375523855239552405524155242552435524455245552465524755248552495525055251552525525355254552555525655257552585525955260552615526255263552645526555266552675526855269552705527155272552735527455275552765527755278552795528055281552825528355284552855528655287552885528955290552915529255293552945529555296552975529855299553005530155302553035530455305553065530755308553095531055311553125531355314553155531655317553185531955320553215532255323553245532555326553275532855329553305533155332553335533455335553365533755338553395534055341553425534355344553455534655347553485534955350553515535255353553545535555356553575535855359553605536155362553635536455365553665536755368553695537055371553725537355374553755537655377553785537955380553815538255383553845538555386553875538855389553905539155392553935539455395553965539755398553995540055401554025540355404554055540655407554085540955410554115541255413554145541555416554175541855419554205542155422554235542455425554265542755428554295543055431554325543355434554355543655437554385543955440554415544255443554445544555446554475544855449554505545155452554535545455455554565545755458554595546055461554625546355464554655546655467554685546955470554715547255473554745547555476554775547855479554805548155482554835548455485554865548755488554895549055491554925549355494554955549655497554985549955500555015550255503555045550555506555075550855509555105551155512555135551455515555165551755518555195552055521555225552355524555255552655527555285552955530555315553255533555345553555536555375553855539555405554155542555435554455545555465554755548555495555055551555525555355554555555555655557555585555955560555615556255563555645556555566555675556855569555705557155572555735557455575555765557755578555795558055581555825558355584555855558655587555885558955590555915559255593555945559555596555975559855599556005560155602556035560455605556065560755608556095561055611556125561355614556155561655617556185561955620556215562255623556245562555626556275562855629556305563155632556335563455635556365563755638556395564055641556425564355644556455564655647556485564955650556515565255653556545565555656556575565855659556605566155662556635566455665556665566755668556695567055671556725567355674556755567655677556785567955680556815568255683556845568555686556875568855689556905569155692556935569455695556965569755698556995570055701557025570355704557055570655707557085570955710557115571255713557145571555716557175571855719557205572155722557235572455725557265572755728557295573055731557325573355734557355573655737557385573955740557415574255743557445574555746557475574855749557505575155752557535575455755557565575755758557595576055761557625576355764557655576655767557685576955770557715577255773557745577555776557775577855779557805578155782557835578455785557865578755788557895579055791557925579355794557955579655797557985579955800558015580255803558045580555806558075580855809558105581155812558135581455815558165581755818558195582055821558225582355824558255582655827558285582955830558315583255833558345583555836558375583855839558405584155842558435584455845558465584755848558495585055851558525585355854558555585655857558585585955860558615586255863558645586555866558675586855869558705587155872558735587455875558765587755878558795588055881558825588355884558855588655887558885588955890558915589255893558945589555896558975589855899559005590155902559035590455905559065590755908559095591055911559125591355914559155591655917559185591955920559215592255923559245592555926559275592855929559305593155932559335593455935559365593755938559395594055941559425594355944559455594655947559485594955950559515595255953559545595555956559575595855959559605596155962559635596455965559665596755968559695597055971559725597355974559755597655977559785597955980559815598255983559845598555986559875598855989559905599155992559935599455995559965599755998559995600056001560025600356004560055600656007560085600956010560115601256013560145601556016560175601856019560205602156022560235602456025560265602756028560295603056031560325603356034560355603656037560385603956040560415604256043560445604556046560475604856049560505605156052560535605456055560565605756058560595606056061560625606356064560655606656067560685606956070560715607256073560745607556076560775607856079560805608156082560835608456085560865608756088560895609056091560925609356094560955609656097560985609956100561015610256103561045610556106561075610856109561105611156112561135611456115561165611756118561195612056121561225612356124561255612656127561285612956130561315613256133561345613556136561375613856139561405614156142561435614456145561465614756148561495615056151561525615356154561555615656157561585615956160561615616256163561645616556166561675616856169561705617156172561735617456175561765617756178561795618056181561825618356184561855618656187561885618956190561915619256193561945619556196561975619856199562005620156202562035620456205562065620756208562095621056211562125621356214562155621656217562185621956220562215622256223562245622556226562275622856229562305623156232562335623456235562365623756238562395624056241562425624356244562455624656247562485624956250562515625256253562545625556256562575625856259562605626156262562635626456265562665626756268562695627056271562725627356274562755627656277562785627956280562815628256283562845628556286562875628856289562905629156292562935629456295562965629756298562995630056301563025630356304563055630656307563085630956310563115631256313563145631556316563175631856319563205632156322563235632456325563265632756328563295633056331563325633356334563355633656337563385633956340563415634256343563445634556346563475634856349563505635156352563535635456355563565635756358563595636056361563625636356364563655636656367563685636956370563715637256373563745637556376563775637856379563805638156382563835638456385563865638756388563895639056391563925639356394563955639656397563985639956400564015640256403564045640556406564075640856409564105641156412564135641456415564165641756418564195642056421564225642356424564255642656427564285642956430564315643256433564345643556436564375643856439564405644156442564435644456445564465644756448564495645056451564525645356454564555645656457564585645956460564615646256463564645646556466564675646856469564705647156472564735647456475564765647756478564795648056481564825648356484564855648656487564885648956490564915649256493564945649556496564975649856499565005650156502565035650456505565065650756508565095651056511565125651356514565155651656517565185651956520565215652256523565245652556526565275652856529565305653156532565335653456535565365653756538565395654056541565425654356544565455654656547565485654956550565515655256553565545655556556565575655856559565605656156562565635656456565565665656756568565695657056571565725657356574565755657656577565785657956580565815658256583565845658556586565875658856589565905659156592565935659456595565965659756598565995660056601566025660356604566055660656607566085660956610566115661256613566145661556616566175661856619566205662156622566235662456625566265662756628566295663056631566325663356634566355663656637566385663956640566415664256643566445664556646566475664856649566505665156652566535665456655566565665756658566595666056661566625666356664566655666656667566685666956670566715667256673566745667556676566775667856679566805668156682566835668456685566865668756688566895669056691566925669356694566955669656697566985669956700567015670256703567045670556706567075670856709567105671156712567135671456715567165671756718567195672056721567225672356724567255672656727567285672956730567315673256733567345673556736567375673856739567405674156742567435674456745567465674756748567495675056751567525675356754567555675656757567585675956760567615676256763567645676556766567675676856769567705677156772567735677456775567765677756778567795678056781567825678356784567855678656787567885678956790567915679256793567945679556796567975679856799568005680156802568035680456805568065680756808568095681056811568125681356814568155681656817568185681956820568215682256823568245682556826568275682856829568305683156832568335683456835568365683756838568395684056841568425684356844568455684656847568485684956850568515685256853568545685556856568575685856859568605686156862568635686456865568665686756868568695687056871568725687356874568755687656877568785687956880568815688256883568845688556886568875688856889568905689156892568935689456895568965689756898568995690056901569025690356904569055690656907569085690956910569115691256913569145691556916569175691856919569205692156922569235692456925569265692756928569295693056931569325693356934569355693656937569385693956940569415694256943569445694556946569475694856949569505695156952569535695456955569565695756958569595696056961569625696356964569655696656967569685696956970569715697256973569745697556976569775697856979569805698156982569835698456985569865698756988569895699056991569925699356994569955699656997569985699957000570015700257003570045700557006570075700857009570105701157012570135701457015570165701757018570195702057021570225702357024570255702657027570285702957030570315703257033570345703557036570375703857039570405704157042570435704457045570465704757048570495705057051570525705357054570555705657057570585705957060570615706257063570645706557066570675706857069570705707157072570735707457075570765707757078570795708057081570825708357084570855708657087570885708957090570915709257093570945709557096570975709857099571005710157102571035710457105571065710757108571095711057111571125711357114571155711657117571185711957120571215712257123571245712557126571275712857129571305713157132571335713457135571365713757138571395714057141571425714357144571455714657147571485714957150571515715257153571545715557156571575715857159571605716157162571635716457165571665716757168571695717057171571725717357174571755717657177571785717957180571815718257183571845718557186571875718857189571905719157192571935719457195571965719757198571995720057201572025720357204572055720657207572085720957210572115721257213572145721557216572175721857219572205722157222572235722457225572265722757228572295723057231572325723357234572355723657237572385723957240572415724257243572445724557246572475724857249572505725157252572535725457255572565725757258572595726057261572625726357264572655726657267572685726957270572715727257273572745727557276572775727857279572805728157282572835728457285572865728757288572895729057291572925729357294572955729657297572985729957300573015730257303573045730557306573075730857309573105731157312573135731457315573165731757318573195732057321573225732357324573255732657327573285732957330573315733257333573345733557336573375733857339573405734157342573435734457345573465734757348573495735057351573525735357354573555735657357573585735957360573615736257363573645736557366573675736857369573705737157372573735737457375573765737757378573795738057381573825738357384573855738657387573885738957390573915739257393573945739557396573975739857399574005740157402574035740457405574065740757408574095741057411574125741357414574155741657417574185741957420574215742257423574245742557426574275742857429574305743157432574335743457435574365743757438574395744057441574425744357444574455744657447574485744957450574515745257453574545745557456574575745857459574605746157462574635746457465574665746757468574695747057471574725747357474574755747657477574785747957480574815748257483574845748557486574875748857489574905749157492574935749457495574965749757498574995750057501575025750357504575055750657507575085750957510575115751257513575145751557516575175751857519575205752157522575235752457525575265752757528575295753057531575325753357534575355753657537575385753957540575415754257543575445754557546575475754857549575505755157552575535755457555575565755757558575595756057561575625756357564575655756657567575685756957570575715757257573575745757557576575775757857579575805758157582575835758457585575865758757588575895759057591575925759357594575955759657597575985759957600576015760257603576045760557606576075760857609576105761157612576135761457615576165761757618576195762057621576225762357624576255762657627576285762957630576315763257633576345763557636576375763857639576405764157642576435764457645576465764757648576495765057651576525765357654576555765657657576585765957660576615766257663576645766557666576675766857669576705767157672576735767457675576765767757678576795768057681576825768357684576855768657687576885768957690576915769257693576945769557696576975769857699577005770157702577035770457705577065770757708577095771057711577125771357714577155771657717577185771957720577215772257723577245772557726577275772857729577305773157732577335773457735577365773757738577395774057741577425774357744577455774657747577485774957750577515775257753577545775557756577575775857759577605776157762577635776457765577665776757768577695777057771577725777357774577755777657777577785777957780577815778257783577845778557786577875778857789577905779157792577935779457795577965779757798577995780057801578025780357804578055780657807578085780957810578115781257813578145781557816578175781857819578205782157822578235782457825578265782757828578295783057831578325783357834578355783657837578385783957840578415784257843578445784557846578475784857849578505785157852578535785457855578565785757858578595786057861578625786357864578655786657867578685786957870578715787257873578745787557876578775787857879578805788157882578835788457885578865788757888578895789057891578925789357894578955789657897578985789957900579015790257903579045790557906579075790857909579105791157912579135791457915579165791757918579195792057921579225792357924579255792657927579285792957930579315793257933579345793557936579375793857939579405794157942579435794457945579465794757948579495795057951579525795357954579555795657957579585795957960579615796257963579645796557966579675796857969579705797157972579735797457975579765797757978579795798057981579825798357984579855798657987579885798957990579915799257993579945799557996579975799857999580005800158002580035800458005580065800758008580095801058011580125801358014580155801658017580185801958020580215802258023580245802558026580275802858029580305803158032580335803458035580365803758038580395804058041580425804358044580455804658047580485804958050580515805258053580545805558056580575805858059580605806158062580635806458065580665806758068580695807058071580725807358074580755807658077580785807958080580815808258083580845808558086580875808858089580905809158092580935809458095580965809758098580995810058101581025810358104581055810658107581085810958110581115811258113581145811558116581175811858119581205812158122581235812458125581265812758128581295813058131581325813358134581355813658137581385813958140581415814258143581445814558146581475814858149581505815158152581535815458155581565815758158581595816058161581625816358164581655816658167581685816958170581715817258173581745817558176581775817858179581805818158182581835818458185581865818758188581895819058191581925819358194581955819658197581985819958200582015820258203582045820558206582075820858209582105821158212582135821458215582165821758218582195822058221582225822358224582255822658227582285822958230582315823258233582345823558236582375823858239582405824158242582435824458245582465824758248582495825058251582525825358254582555825658257582585825958260582615826258263582645826558266582675826858269582705827158272582735827458275582765827758278582795828058281582825828358284582855828658287582885828958290582915829258293582945829558296582975829858299583005830158302583035830458305583065830758308583095831058311583125831358314583155831658317583185831958320583215832258323583245832558326583275832858329583305833158332583335833458335583365833758338583395834058341583425834358344583455834658347583485834958350583515835258353583545835558356583575835858359583605836158362583635836458365583665836758368583695837058371583725837358374583755837658377583785837958380583815838258383583845838558386583875838858389583905839158392583935839458395583965839758398583995840058401584025840358404584055840658407584085840958410584115841258413584145841558416584175841858419584205842158422584235842458425584265842758428584295843058431584325843358434584355843658437584385843958440584415844258443584445844558446584475844858449584505845158452584535845458455584565845758458584595846058461584625846358464584655846658467584685846958470584715847258473584745847558476584775847858479584805848158482584835848458485584865848758488584895849058491584925849358494584955849658497584985849958500585015850258503585045850558506585075850858509585105851158512585135851458515585165851758518585195852058521585225852358524585255852658527585285852958530585315853258533585345853558536585375853858539585405854158542585435854458545585465854758548585495855058551585525855358554585555855658557585585855958560585615856258563585645856558566585675856858569585705857158572585735857458575585765857758578585795858058581585825858358584585855858658587585885858958590585915859258593585945859558596585975859858599586005860158602586035860458605586065860758608586095861058611586125861358614586155861658617586185861958620586215862258623586245862558626586275862858629586305863158632586335863458635586365863758638586395864058641586425864358644586455864658647586485864958650586515865258653586545865558656586575865858659586605866158662586635866458665586665866758668586695867058671586725867358674586755867658677586785867958680586815868258683586845868558686586875868858689586905869158692586935869458695586965869758698586995870058701587025870358704587055870658707587085870958710587115871258713587145871558716587175871858719587205872158722587235872458725587265872758728587295873058731587325873358734587355873658737587385873958740587415874258743587445874558746587475874858749587505875158752587535875458755587565875758758587595876058761587625876358764587655876658767587685876958770587715877258773587745877558776587775877858779587805878158782587835878458785587865878758788587895879058791587925879358794587955879658797587985879958800588015880258803588045880558806588075880858809588105881158812588135881458815588165881758818588195882058821588225882358824588255882658827588285882958830588315883258833588345883558836588375883858839588405884158842588435884458845588465884758848588495885058851588525885358854588555885658857588585885958860588615886258863588645886558866588675886858869588705887158872588735887458875588765887758878588795888058881588825888358884588855888658887588885888958890588915889258893588945889558896588975889858899589005890158902589035890458905589065890758908589095891058911589125891358914589155891658917589185891958920589215892258923589245892558926589275892858929589305893158932589335893458935589365893758938589395894058941589425894358944589455894658947589485894958950589515895258953589545895558956589575895858959589605896158962589635896458965589665896758968589695897058971589725897358974589755897658977589785897958980589815898258983589845898558986589875898858989589905899158992589935899458995589965899758998589995900059001590025900359004590055900659007590085900959010590115901259013590145901559016590175901859019590205902159022590235902459025590265902759028590295903059031590325903359034590355903659037590385903959040590415904259043590445904559046590475904859049590505905159052590535905459055590565905759058590595906059061590625906359064590655906659067590685906959070590715907259073590745907559076590775907859079590805908159082590835908459085590865908759088590895909059091590925909359094590955909659097590985909959100591015910259103591045910559106591075910859109591105911159112591135911459115591165911759118591195912059121591225912359124591255912659127591285912959130591315913259133591345913559136591375913859139591405914159142591435914459145591465914759148591495915059151591525915359154591555915659157591585915959160591615916259163591645916559166591675916859169591705917159172591735917459175591765917759178591795918059181591825918359184591855918659187591885918959190591915919259193591945919559196591975919859199592005920159202592035920459205592065920759208592095921059211592125921359214592155921659217592185921959220592215922259223592245922559226592275922859229592305923159232592335923459235592365923759238592395924059241592425924359244592455924659247592485924959250592515925259253592545925559256592575925859259592605926159262592635926459265592665926759268592695927059271592725927359274592755927659277592785927959280592815928259283592845928559286592875928859289592905929159292592935929459295592965929759298592995930059301593025930359304593055930659307593085930959310593115931259313593145931559316593175931859319593205932159322593235932459325593265932759328593295933059331593325933359334593355933659337593385933959340593415934259343593445934559346593475934859349593505935159352593535935459355593565935759358593595936059361593625936359364593655936659367593685936959370593715937259373593745937559376593775937859379593805938159382593835938459385593865938759388593895939059391593925939359394593955939659397593985939959400594015940259403594045940559406594075940859409594105941159412594135941459415594165941759418594195942059421594225942359424594255942659427594285942959430594315943259433594345943559436594375943859439594405944159442594435944459445594465944759448594495945059451594525945359454594555945659457594585945959460594615946259463594645946559466594675946859469594705947159472594735947459475594765947759478594795948059481594825948359484594855948659487594885948959490594915949259493594945949559496594975949859499595005950159502595035950459505595065950759508595095951059511595125951359514595155951659517595185951959520595215952259523595245952559526595275952859529595305953159532595335953459535595365953759538595395954059541595425954359544595455954659547595485954959550595515955259553595545955559556595575955859559595605956159562595635956459565595665956759568595695957059571595725957359574595755957659577595785957959580595815958259583595845958559586595875958859589595905959159592595935959459595595965959759598595995960059601596025960359604596055960659607596085960959610596115961259613596145961559616596175961859619596205962159622596235962459625596265962759628596295963059631596325963359634596355963659637596385963959640596415964259643596445964559646596475964859649596505965159652596535965459655596565965759658596595966059661596625966359664596655966659667596685966959670596715967259673596745967559676596775967859679596805968159682596835968459685596865968759688596895969059691596925969359694596955969659697596985969959700597015970259703597045970559706597075970859709597105971159712597135971459715597165971759718597195972059721597225972359724597255972659727597285972959730597315973259733597345973559736597375973859739597405974159742597435974459745597465974759748597495975059751597525975359754597555975659757597585975959760597615976259763597645976559766597675976859769597705977159772597735977459775597765977759778597795978059781597825978359784597855978659787597885978959790597915979259793597945979559796597975979859799598005980159802598035980459805598065980759808598095981059811598125981359814598155981659817598185981959820598215982259823598245982559826598275982859829598305983159832598335983459835598365983759838598395984059841598425984359844598455984659847598485984959850598515985259853598545985559856598575985859859598605986159862598635986459865598665986759868598695987059871598725987359874598755987659877598785987959880598815988259883598845988559886598875988859889598905989159892598935989459895598965989759898598995990059901599025990359904599055990659907599085990959910599115991259913599145991559916599175991859919599205992159922599235992459925599265992759928599295993059931599325993359934599355993659937599385993959940599415994259943599445994559946599475994859949599505995159952599535995459955599565995759958599595996059961599625996359964599655996659967599685996959970599715997259973599745997559976599775997859979599805998159982599835998459985599865998759988599895999059991599925999359994599955999659997599985999960000600016000260003600046000560006600076000860009600106001160012600136001460015600166001760018600196002060021600226002360024600256002660027600286002960030600316003260033600346003560036600376003860039600406004160042600436004460045600466004760048600496005060051600526005360054600556005660057600586005960060600616006260063600646006560066600676006860069600706007160072600736007460075600766007760078600796008060081600826008360084600856008660087600886008960090600916009260093600946009560096600976009860099601006010160102601036010460105601066010760108601096011060111601126011360114601156011660117601186011960120601216012260123601246012560126601276012860129601306013160132601336013460135601366013760138601396014060141601426014360144601456014660147601486014960150601516015260153601546015560156601576015860159601606016160162601636016460165601666016760168601696017060171601726017360174601756017660177601786017960180601816018260183601846018560186601876018860189601906019160192601936019460195601966019760198601996020060201602026020360204602056020660207602086020960210602116021260213602146021560216602176021860219602206022160222602236022460225602266022760228602296023060231602326023360234602356023660237602386023960240602416024260243602446024560246602476024860249602506025160252602536025460255602566025760258602596026060261602626026360264602656026660267602686026960270602716027260273602746027560276602776027860279602806028160282602836028460285602866028760288602896029060291602926029360294602956029660297602986029960300603016030260303603046030560306603076030860309603106031160312603136031460315603166031760318603196032060321603226032360324603256032660327603286032960330603316033260333603346033560336603376033860339603406034160342603436034460345603466034760348603496035060351603526035360354603556035660357603586035960360603616036260363603646036560366603676036860369603706037160372603736037460375603766037760378603796038060381603826038360384603856038660387603886038960390603916039260393603946039560396603976039860399604006040160402604036040460405604066040760408604096041060411604126041360414604156041660417604186041960420604216042260423604246042560426604276042860429604306043160432604336043460435604366043760438604396044060441604426044360444604456044660447604486044960450604516045260453604546045560456604576045860459604606046160462604636046460465604666046760468604696047060471604726047360474604756047660477604786047960480604816048260483604846048560486604876048860489604906049160492604936049460495604966049760498604996050060501605026050360504605056050660507605086050960510605116051260513605146051560516605176051860519605206052160522605236052460525605266052760528605296053060531605326053360534605356053660537605386053960540605416054260543605446054560546605476054860549605506055160552605536055460555605566055760558605596056060561605626056360564605656056660567605686056960570605716057260573605746057560576605776057860579605806058160582605836058460585605866058760588605896059060591605926059360594605956059660597605986059960600606016060260603606046060560606606076060860609606106061160612606136061460615606166061760618606196062060621606226062360624606256062660627606286062960630606316063260633606346063560636606376063860639606406064160642606436064460645606466064760648606496065060651606526065360654606556065660657606586065960660606616066260663606646066560666606676066860669606706067160672606736067460675606766067760678606796068060681606826068360684606856068660687606886068960690606916069260693606946069560696606976069860699607006070160702607036070460705607066070760708607096071060711607126071360714607156071660717607186071960720607216072260723607246072560726607276072860729607306073160732607336073460735607366073760738607396074060741607426074360744607456074660747607486074960750607516075260753607546075560756607576075860759607606076160762607636076460765607666076760768607696077060771607726077360774607756077660777607786077960780607816078260783607846078560786607876078860789607906079160792607936079460795607966079760798607996080060801608026080360804608056080660807608086080960810608116081260813608146081560816608176081860819608206082160822608236082460825608266082760828608296083060831608326083360834608356083660837608386083960840608416084260843608446084560846608476084860849608506085160852608536085460855608566085760858608596086060861608626086360864608656086660867608686086960870608716087260873608746087560876608776087860879608806088160882608836088460885608866088760888608896089060891608926089360894608956089660897608986089960900609016090260903609046090560906609076090860909609106091160912609136091460915609166091760918609196092060921609226092360924609256092660927609286092960930609316093260933609346093560936609376093860939609406094160942609436094460945609466094760948609496095060951609526095360954609556095660957609586095960960609616096260963609646096560966609676096860969609706097160972609736097460975609766097760978609796098060981609826098360984609856098660987609886098960990609916099260993609946099560996609976099860999610006100161002610036100461005610066100761008610096101061011610126101361014610156101661017610186101961020610216102261023610246102561026610276102861029610306103161032610336103461035610366103761038610396104061041610426104361044610456104661047610486104961050610516105261053610546105561056610576105861059610606106161062610636106461065610666106761068610696107061071610726107361074610756107661077610786107961080610816108261083610846108561086610876108861089610906109161092610936109461095610966109761098610996110061101611026110361104611056110661107611086110961110611116111261113611146111561116611176111861119611206112161122611236112461125611266112761128611296113061131611326113361134611356113661137611386113961140611416114261143611446114561146611476114861149611506115161152611536115461155611566115761158611596116061161611626116361164611656116661167611686116961170611716117261173611746117561176611776117861179611806118161182611836118461185611866118761188611896119061191611926119361194611956119661197611986119961200612016120261203612046120561206612076120861209612106121161212612136121461215612166121761218612196122061221612226122361224612256122661227612286122961230612316123261233612346123561236612376123861239612406124161242612436124461245612466124761248612496125061251612526125361254612556125661257612586125961260612616126261263612646126561266612676126861269612706127161272612736127461275612766127761278612796128061281612826128361284612856128661287612886128961290612916129261293612946129561296612976129861299613006130161302613036130461305613066130761308613096131061311613126131361314613156131661317613186131961320613216132261323613246132561326613276132861329613306133161332613336133461335613366133761338613396134061341613426134361344613456134661347613486134961350613516135261353613546135561356613576135861359613606136161362613636136461365613666136761368613696137061371613726137361374613756137661377613786137961380613816138261383613846138561386613876138861389613906139161392613936139461395613966139761398613996140061401614026140361404614056140661407614086140961410614116141261413614146141561416614176141861419614206142161422614236142461425614266142761428614296143061431614326143361434614356143661437614386143961440614416144261443614446144561446614476144861449614506145161452614536145461455614566145761458614596146061461614626146361464614656146661467614686146961470614716147261473614746147561476614776147861479614806148161482614836148461485614866148761488614896149061491614926149361494614956149661497614986149961500615016150261503615046150561506615076150861509615106151161512615136151461515615166151761518615196152061521615226152361524615256152661527615286152961530615316153261533615346153561536615376153861539615406154161542615436154461545615466154761548615496155061551615526155361554615556155661557615586155961560615616156261563615646156561566615676156861569615706157161572615736157461575615766157761578615796158061581615826158361584615856158661587615886158961590615916159261593615946159561596615976159861599616006160161602616036160461605616066160761608616096161061611616126161361614616156161661617616186161961620616216162261623616246162561626616276162861629616306163161632616336163461635616366163761638616396164061641616426164361644616456164661647616486164961650616516165261653616546165561656616576165861659616606166161662616636166461665616666166761668616696167061671616726167361674616756167661677616786167961680616816168261683616846168561686616876168861689616906169161692616936169461695616966169761698616996170061701617026170361704617056170661707617086170961710617116171261713617146171561716617176171861719617206172161722617236172461725617266172761728617296173061731617326173361734617356173661737617386173961740617416174261743617446174561746617476174861749617506175161752617536175461755617566175761758617596176061761617626176361764617656176661767617686176961770617716177261773617746177561776617776177861779617806178161782617836178461785617866178761788617896179061791617926179361794617956179661797617986179961800618016180261803618046180561806618076180861809618106181161812618136181461815618166181761818618196182061821618226182361824618256182661827618286182961830618316183261833618346183561836618376183861839618406184161842618436184461845618466184761848618496185061851618526185361854618556185661857618586185961860618616186261863618646186561866618676186861869618706187161872618736187461875618766187761878618796188061881618826188361884618856188661887618886188961890618916189261893618946189561896618976189861899619006190161902619036190461905619066190761908619096191061911619126191361914619156191661917619186191961920619216192261923619246192561926619276192861929619306193161932619336193461935619366193761938619396194061941619426194361944619456194661947619486194961950619516195261953619546195561956619576195861959619606196161962619636196461965619666196761968619696197061971619726197361974619756197661977619786197961980619816198261983619846198561986619876198861989619906199161992619936199461995619966199761998619996200062001620026200362004620056200662007620086200962010620116201262013620146201562016620176201862019620206202162022620236202462025620266202762028620296203062031620326203362034620356203662037620386203962040620416204262043620446204562046620476204862049620506205162052620536205462055620566205762058620596206062061620626206362064620656206662067620686206962070620716207262073620746207562076620776207862079620806208162082620836208462085620866208762088620896209062091620926209362094620956209662097620986209962100621016210262103621046210562106621076210862109621106211162112621136211462115621166211762118621196212062121621226212362124621256212662127621286212962130621316213262133621346213562136621376213862139621406214162142621436214462145621466214762148621496215062151621526215362154621556215662157621586215962160621616216262163621646216562166621676216862169621706217162172621736217462175621766217762178621796218062181621826218362184621856218662187621886218962190621916219262193621946219562196621976219862199622006220162202622036220462205622066220762208622096221062211622126221362214622156221662217622186221962220622216222262223622246222562226622276222862229622306223162232622336223462235622366223762238622396224062241622426224362244622456224662247622486224962250622516225262253622546225562256622576225862259622606226162262622636226462265622666226762268622696227062271622726227362274622756227662277622786227962280622816228262283622846228562286622876228862289622906229162292622936229462295622966229762298622996230062301623026230362304623056230662307623086230962310623116231262313623146231562316623176231862319623206232162322623236232462325623266232762328623296233062331623326233362334623356233662337623386233962340623416234262343623446234562346623476234862349623506235162352623536235462355623566235762358623596236062361623626236362364623656236662367623686236962370623716237262373623746237562376623776237862379623806238162382623836238462385623866238762388623896239062391623926239362394623956239662397623986239962400624016240262403624046240562406624076240862409624106241162412624136241462415624166241762418624196242062421624226242362424624256242662427624286242962430624316243262433624346243562436624376243862439624406244162442624436244462445624466244762448624496245062451624526245362454624556245662457624586245962460624616246262463624646246562466624676246862469624706247162472624736247462475624766247762478624796248062481624826248362484624856248662487624886248962490624916249262493624946249562496624976249862499625006250162502625036250462505625066250762508625096251062511625126251362514625156251662517625186251962520625216252262523625246252562526625276252862529625306253162532625336253462535625366253762538625396254062541625426254362544625456254662547625486254962550625516255262553625546255562556625576255862559625606256162562625636256462565625666256762568625696257062571625726257362574625756257662577625786257962580625816258262583625846258562586625876258862589625906259162592625936259462595625966259762598625996260062601626026260362604626056260662607626086260962610626116261262613626146261562616626176261862619626206262162622626236262462625626266262762628626296263062631626326263362634626356263662637626386263962640626416264262643626446264562646626476264862649626506265162652626536265462655626566265762658626596266062661626626266362664626656266662667626686266962670626716267262673626746267562676626776267862679626806268162682626836268462685626866268762688626896269062691626926269362694626956269662697626986269962700627016270262703627046270562706627076270862709627106271162712627136271462715627166271762718627196272062721627226272362724627256272662727627286272962730627316273262733627346273562736627376273862739627406274162742627436274462745627466274762748627496275062751627526275362754627556275662757627586275962760627616276262763627646276562766627676276862769627706277162772627736277462775627766277762778627796278062781627826278362784627856278662787627886278962790627916279262793627946279562796627976279862799628006280162802628036280462805628066280762808628096281062811628126281362814628156281662817628186281962820628216282262823628246282562826628276282862829628306283162832628336283462835628366283762838628396284062841628426284362844628456284662847628486284962850628516285262853628546285562856628576285862859628606286162862628636286462865628666286762868628696287062871628726287362874628756287662877628786287962880628816288262883628846288562886628876288862889628906289162892628936289462895628966289762898628996290062901629026290362904629056290662907629086290962910629116291262913629146291562916629176291862919629206292162922629236292462925629266292762928629296293062931629326293362934629356293662937629386293962940629416294262943629446294562946629476294862949629506295162952629536295462955629566295762958629596296062961629626296362964629656296662967629686296962970629716297262973629746297562976629776297862979629806298162982629836298462985629866298762988629896299062991629926299362994629956299662997629986299963000630016300263003630046300563006630076300863009630106301163012630136301463015630166301763018630196302063021630226302363024630256302663027630286302963030630316303263033630346303563036630376303863039630406304163042630436304463045630466304763048630496305063051630526305363054630556305663057630586305963060630616306263063630646306563066630676306863069630706307163072630736307463075630766307763078630796308063081630826308363084630856308663087630886308963090630916309263093630946309563096630976309863099631006310163102631036310463105631066310763108631096311063111631126311363114631156311663117631186311963120631216312263123631246312563126631276312863129631306313163132631336313463135631366313763138631396314063141631426314363144631456314663147631486314963150631516315263153631546315563156631576315863159631606316163162631636316463165631666316763168631696317063171631726317363174631756317663177631786317963180631816318263183631846318563186631876318863189631906319163192631936319463195631966319763198631996320063201632026320363204632056320663207632086320963210632116321263213632146321563216632176321863219632206322163222632236322463225632266322763228632296323063231632326323363234632356323663237632386323963240632416324263243632446324563246632476324863249632506325163252632536325463255632566325763258632596326063261632626326363264632656326663267632686326963270632716327263273632746327563276632776327863279632806328163282632836328463285632866328763288632896329063291632926329363294632956329663297632986329963300633016330263303633046330563306633076330863309633106331163312633136331463315633166331763318633196332063321633226332363324633256332663327633286332963330633316333263333633346333563336633376333863339633406334163342633436334463345633466334763348633496335063351633526335363354633556335663357633586335963360633616336263363633646336563366633676336863369633706337163372633736337463375633766337763378633796338063381633826338363384633856338663387633886338963390633916339263393633946339563396633976339863399634006340163402634036340463405634066340763408634096341063411634126341363414634156341663417634186341963420634216342263423634246342563426634276342863429634306343163432634336343463435634366343763438634396344063441634426344363444634456344663447634486344963450634516345263453634546345563456634576345863459634606346163462634636346463465634666346763468634696347063471634726347363474634756347663477634786347963480634816348263483634846348563486634876348863489634906349163492634936349463495634966349763498634996350063501635026350363504635056350663507635086350963510635116351263513635146351563516635176351863519635206352163522635236352463525635266352763528635296353063531635326353363534635356353663537635386353963540635416354263543635446354563546635476354863549635506355163552635536355463555635566355763558635596356063561635626356363564635656356663567635686356963570635716357263573635746357563576635776357863579635806358163582635836358463585635866358763588635896359063591635926359363594635956359663597635986359963600636016360263603636046360563606636076360863609636106361163612636136361463615636166361763618636196362063621636226362363624636256362663627636286362963630636316363263633636346363563636636376363863639636406364163642636436364463645636466364763648636496365063651636526365363654636556365663657636586365963660636616366263663636646366563666636676366863669636706367163672636736367463675636766367763678636796368063681636826368363684636856368663687636886368963690636916369263693636946369563696636976369863699637006370163702637036370463705637066370763708637096371063711637126371363714637156371663717637186371963720637216372263723637246372563726637276372863729637306373163732637336373463735637366373763738637396374063741637426374363744637456374663747637486374963750637516375263753637546375563756637576375863759637606376163762637636376463765637666376763768637696377063771637726377363774637756377663777637786377963780637816378263783637846378563786637876378863789637906379163792637936379463795637966379763798637996380063801638026380363804638056380663807638086380963810638116381263813638146381563816638176381863819638206382163822638236382463825638266382763828638296383063831638326383363834638356383663837638386383963840638416384263843638446384563846638476384863849638506385163852638536385463855638566385763858638596386063861638626386363864638656386663867638686386963870638716387263873638746387563876638776387863879638806388163882638836388463885638866388763888638896389063891638926389363894638956389663897638986389963900639016390263903639046390563906639076390863909639106391163912639136391463915639166391763918639196392063921639226392363924639256392663927639286392963930639316393263933639346393563936639376393863939639406394163942639436394463945639466394763948639496395063951639526395363954639556395663957639586395963960639616396263963639646396563966639676396863969639706397163972639736397463975639766397763978639796398063981639826398363984639856398663987639886398963990639916399263993639946399563996639976399863999640006400164002640036400464005640066400764008640096401064011640126401364014640156401664017640186401964020640216402264023640246402564026640276402864029640306403164032640336403464035640366403764038640396404064041640426404364044640456404664047640486404964050640516405264053640546405564056640576405864059640606406164062640636406464065640666406764068640696407064071640726407364074640756407664077640786407964080640816408264083640846408564086640876408864089640906409164092640936409464095640966409764098640996410064101641026410364104641056410664107641086410964110641116411264113641146411564116641176411864119641206412164122641236412464125641266412764128641296413064131641326413364134641356413664137641386413964140641416414264143641446414564146641476414864149641506415164152641536415464155641566415764158641596416064161641626416364164641656416664167641686416964170641716417264173641746417564176641776417864179641806418164182641836418464185641866418764188641896419064191641926419364194641956419664197641986419964200642016420264203642046420564206642076420864209642106421164212642136421464215642166421764218642196422064221642226422364224642256422664227642286422964230642316423264233642346423564236642376423864239642406424164242642436424464245642466424764248642496425064251642526425364254642556425664257642586425964260642616426264263642646426564266642676426864269642706427164272642736427464275642766427764278642796428064281642826428364284642856428664287642886428964290642916429264293642946429564296642976429864299643006430164302643036430464305643066430764308643096431064311643126431364314643156431664317643186431964320643216432264323643246432564326643276432864329643306433164332643336433464335643366433764338643396434064341643426434364344643456434664347643486434964350643516435264353643546435564356643576435864359643606436164362643636436464365643666436764368643696437064371643726437364374643756437664377643786437964380643816438264383643846438564386643876438864389643906439164392643936439464395643966439764398643996440064401644026440364404644056440664407644086440964410644116441264413644146441564416644176441864419644206442164422644236442464425644266442764428644296443064431644326443364434644356443664437644386443964440644416444264443644446444564446644476444864449644506445164452644536445464455644566445764458644596446064461644626446364464644656446664467644686446964470644716447264473644746447564476644776447864479644806448164482644836448464485644866448764488644896449064491644926449364494644956449664497644986449964500645016450264503645046450564506645076450864509645106451164512645136451464515645166451764518645196452064521645226452364524645256452664527645286452964530645316453264533645346453564536645376453864539645406454164542645436454464545645466454764548645496455064551645526455364554645556455664557645586455964560645616456264563645646456564566645676456864569645706457164572645736457464575645766457764578645796458064581645826458364584645856458664587645886458964590645916459264593645946459564596645976459864599646006460164602646036460464605646066460764608646096461064611646126461364614646156461664617646186461964620646216462264623646246462564626646276462864629646306463164632646336463464635646366463764638646396464064641646426464364644646456464664647646486464964650646516465264653646546465564656646576465864659646606466164662646636466464665646666466764668646696467064671646726467364674646756467664677646786467964680646816468264683646846468564686646876468864689646906469164692646936469464695646966469764698646996470064701647026470364704647056470664707647086470964710647116471264713647146471564716647176471864719647206472164722647236472464725647266472764728647296473064731647326473364734647356473664737647386473964740647416474264743647446474564746647476474864749647506475164752647536475464755647566475764758647596476064761647626476364764647656476664767647686476964770647716477264773647746477564776647776477864779647806478164782647836478464785647866478764788647896479064791647926479364794647956479664797647986479964800648016480264803648046480564806648076480864809648106481164812648136481464815648166481764818648196482064821648226482364824648256482664827648286482964830648316483264833648346483564836648376483864839648406484164842648436484464845648466484764848648496485064851648526485364854648556485664857648586485964860648616486264863648646486564866648676486864869648706487164872648736487464875648766487764878648796488064881648826488364884648856488664887648886488964890648916489264893648946489564896648976489864899649006490164902649036490464905649066490764908649096491064911649126491364914649156491664917649186491964920649216492264923649246492564926649276492864929649306493164932649336493464935649366493764938649396494064941649426494364944649456494664947649486494964950649516495264953649546495564956649576495864959649606496164962649636496464965649666496764968649696497064971649726497364974649756497664977649786497964980649816498264983649846498564986649876498864989649906499164992649936499464995649966499764998649996500065001650026500365004650056500665007650086500965010650116501265013650146501565016650176501865019650206502165022650236502465025650266502765028650296503065031650326503365034650356503665037650386503965040650416504265043650446504565046650476504865049650506505165052650536505465055650566505765058650596506065061650626506365064650656506665067650686506965070650716507265073650746507565076650776507865079650806508165082650836508465085650866508765088650896509065091650926509365094650956509665097650986509965100651016510265103651046510565106651076510865109651106511165112651136511465115651166511765118651196512065121651226512365124651256512665127651286512965130651316513265133651346513565136651376513865139651406514165142651436514465145651466514765148651496515065151651526515365154651556515665157651586515965160651616516265163651646516565166651676516865169651706517165172651736517465175651766517765178651796518065181651826518365184651856518665187651886518965190651916519265193651946519565196651976519865199652006520165202652036520465205652066520765208652096521065211652126521365214652156521665217652186521965220652216522265223652246522565226652276522865229652306523165232652336523465235652366523765238652396524065241652426524365244652456524665247652486524965250652516525265253652546525565256652576525865259652606526165262652636526465265652666526765268652696527065271652726527365274652756527665277652786527965280652816528265283652846528565286652876528865289652906529165292652936529465295652966529765298652996530065301653026530365304653056530665307653086530965310653116531265313653146531565316653176531865319653206532165322653236532465325653266532765328653296533065331653326533365334653356533665337653386533965340653416534265343653446534565346653476534865349653506535165352653536535465355653566535765358653596536065361653626536365364653656536665367653686536965370653716537265373653746537565376653776537865379653806538165382653836538465385653866538765388653896539065391653926539365394653956539665397653986539965400654016540265403654046540565406654076540865409654106541165412654136541465415654166541765418654196542065421654226542365424654256542665427654286542965430654316543265433654346543565436654376543865439654406544165442654436544465445654466544765448654496545065451654526545365454654556545665457654586545965460654616546265463654646546565466654676546865469654706547165472654736547465475654766547765478654796548065481654826548365484654856548665487654886548965490654916549265493654946549565496654976549865499655006550165502655036550465505655066550765508655096551065511655126551365514655156551665517655186551965520655216552265523655246552565526655276552865529655306553165532655336553465535655366553765538655396554065541655426554365544655456554665547655486554965550655516555265553655546555565556655576555865559655606556165562655636556465565655666556765568655696557065571655726557365574655756557665577655786557965580655816558265583655846558565586655876558865589655906559165592655936559465595655966559765598655996560065601656026560365604656056560665607656086560965610656116561265613656146561565616656176561865619656206562165622656236562465625656266562765628656296563065631656326563365634656356563665637656386563965640656416564265643656446564565646656476564865649656506565165652656536565465655656566565765658656596566065661656626566365664656656566665667656686566965670656716567265673656746567565676656776567865679656806568165682656836568465685656866568765688656896569065691656926569365694656956569665697656986569965700657016570265703657046570565706657076570865709657106571165712657136571465715657166571765718657196572065721657226572365724657256572665727657286572965730657316573265733657346573565736657376573865739657406574165742657436574465745657466574765748657496575065751657526575365754657556575665757657586575965760657616576265763657646576565766657676576865769657706577165772657736577465775657766577765778657796578065781657826578365784657856578665787657886578965790657916579265793657946579565796657976579865799658006580165802658036580465805658066580765808658096581065811658126581365814658156581665817658186581965820658216582265823658246582565826658276582865829658306583165832658336583465835658366583765838658396584065841658426584365844658456584665847658486584965850658516585265853658546585565856658576585865859658606586165862658636586465865658666586765868658696587065871658726587365874658756587665877658786587965880658816588265883658846588565886658876588865889658906589165892658936589465895658966589765898658996590065901659026590365904659056590665907659086590965910659116591265913659146591565916659176591865919659206592165922659236592465925659266592765928659296593065931659326593365934659356593665937659386593965940659416594265943659446594565946659476594865949659506595165952659536595465955659566595765958659596596065961659626596365964659656596665967659686596965970659716597265973659746597565976659776597865979659806598165982659836598465985659866598765988659896599065991659926599365994659956599665997659986599966000660016600266003660046600566006660076600866009660106601166012660136601466015660166601766018660196602066021660226602366024660256602666027660286602966030660316603266033660346603566036660376603866039660406604166042660436604466045660466604766048660496605066051660526605366054660556605666057660586605966060660616606266063660646606566066660676606866069660706607166072660736607466075660766607766078660796608066081660826608366084660856608666087660886608966090660916609266093660946609566096660976609866099661006610166102661036610466105661066610766108661096611066111661126611366114661156611666117661186611966120661216612266123661246612566126661276612866129661306613166132661336613466135661366613766138661396614066141661426614366144661456614666147661486614966150661516615266153661546615566156661576615866159661606616166162661636616466165661666616766168661696617066171661726617366174661756617666177661786617966180661816618266183661846618566186661876618866189661906619166192661936619466195661966619766198661996620066201662026620366204662056620666207662086620966210662116621266213662146621566216662176621866219662206622166222662236622466225662266622766228662296623066231662326623366234662356623666237662386623966240662416624266243662446624566246662476624866249662506625166252662536625466255662566625766258662596626066261662626626366264662656626666267662686626966270662716627266273662746627566276662776627866279662806628166282662836628466285662866628766288662896629066291662926629366294662956629666297662986629966300663016630266303663046630566306663076630866309663106631166312663136631466315663166631766318663196632066321663226632366324663256632666327663286632966330663316633266333663346633566336663376633866339663406634166342663436634466345663466634766348663496635066351663526635366354663556635666357663586635966360663616636266363663646636566366663676636866369663706637166372663736637466375663766637766378663796638066381663826638366384663856638666387663886638966390663916639266393663946639566396663976639866399664006640166402664036640466405664066640766408664096641066411664126641366414664156641666417664186641966420664216642266423664246642566426664276642866429664306643166432664336643466435664366643766438664396644066441664426644366444664456644666447664486644966450664516645266453664546645566456664576645866459664606646166462664636646466465664666646766468664696647066471664726647366474664756647666477664786647966480664816648266483664846648566486664876648866489664906649166492664936649466495664966649766498664996650066501665026650366504665056650666507665086650966510665116651266513665146651566516665176651866519665206652166522665236652466525665266652766528665296653066531665326653366534665356653666537665386653966540665416654266543665446654566546665476654866549665506655166552665536655466555665566655766558665596656066561665626656366564665656656666567665686656966570665716657266573665746657566576665776657866579665806658166582665836658466585665866658766588665896659066591665926659366594665956659666597665986659966600666016660266603666046660566606666076660866609666106661166612666136661466615666166661766618666196662066621666226662366624666256662666627666286662966630666316663266633666346663566636666376663866639666406664166642666436664466645666466664766648666496665066651666526665366654666556665666657666586665966660666616666266663666646666566666666676666866669666706667166672666736667466675666766667766678666796668066681666826668366684666856668666687666886668966690666916669266693666946669566696666976669866699667006670166702667036670466705667066670766708667096671066711667126671366714667156671666717667186671966720667216672266723667246672566726667276672866729667306673166732667336673466735667366673766738667396674066741667426674366744667456674666747667486674966750667516675266753667546675566756667576675866759667606676166762667636676466765667666676766768667696677066771667726677366774667756677666777667786677966780667816678266783667846678566786667876678866789667906679166792667936679466795667966679766798667996680066801668026680366804668056680666807668086680966810668116681266813668146681566816668176681866819668206682166822668236682466825668266682766828668296683066831668326683366834668356683666837668386683966840668416684266843668446684566846668476684866849668506685166852668536685466855668566685766858668596686066861668626686366864668656686666867668686686966870668716687266873668746687566876668776687866879668806688166882668836688466885668866688766888668896689066891668926689366894668956689666897668986689966900669016690266903669046690566906669076690866909669106691166912669136691466915669166691766918669196692066921669226692366924669256692666927669286692966930669316693266933669346693566936669376693866939669406694166942669436694466945669466694766948669496695066951669526695366954669556695666957669586695966960669616696266963669646696566966669676696866969669706697166972669736697466975669766697766978669796698066981669826698366984669856698666987669886698966990669916699266993669946699566996669976699866999670006700167002670036700467005670066700767008670096701067011670126701367014670156701667017670186701967020670216702267023670246702567026670276702867029670306703167032670336703467035670366703767038670396704067041670426704367044670456704667047670486704967050670516705267053670546705567056670576705867059670606706167062670636706467065670666706767068670696707067071670726707367074670756707667077670786707967080670816708267083670846708567086670876708867089670906709167092670936709467095670966709767098670996710067101671026710367104671056710667107671086710967110671116711267113671146711567116671176711867119671206712167122671236712467125671266712767128671296713067131671326713367134671356713667137671386713967140671416714267143671446714567146671476714867149671506715167152671536715467155671566715767158671596716067161671626716367164671656716667167671686716967170671716717267173671746717567176671776717867179671806718167182671836718467185671866718767188671896719067191671926719367194671956719667197671986719967200672016720267203672046720567206672076720867209672106721167212672136721467215672166721767218672196722067221672226722367224672256722667227672286722967230672316723267233672346723567236672376723867239672406724167242672436724467245672466724767248672496725067251672526725367254672556725667257672586725967260672616726267263672646726567266672676726867269672706727167272672736727467275672766727767278672796728067281672826728367284672856728667287672886728967290672916729267293672946729567296672976729867299673006730167302673036730467305673066730767308673096731067311673126731367314673156731667317673186731967320673216732267323673246732567326673276732867329673306733167332673336733467335673366733767338673396734067341673426734367344673456734667347673486734967350673516735267353673546735567356673576735867359673606736167362673636736467365673666736767368673696737067371673726737367374673756737667377673786737967380673816738267383673846738567386673876738867389673906739167392673936739467395673966739767398673996740067401674026740367404674056740667407674086740967410674116741267413674146741567416674176741867419674206742167422674236742467425674266742767428674296743067431674326743367434674356743667437674386743967440674416744267443674446744567446674476744867449674506745167452674536745467455674566745767458674596746067461674626746367464674656746667467674686746967470674716747267473674746747567476674776747867479674806748167482674836748467485674866748767488674896749067491674926749367494674956749667497674986749967500675016750267503675046750567506675076750867509675106751167512675136751467515675166751767518675196752067521675226752367524675256752667527675286752967530675316753267533675346753567536675376753867539675406754167542675436754467545675466754767548675496755067551675526755367554675556755667557675586755967560675616756267563675646756567566675676756867569675706757167572675736757467575675766757767578675796758067581675826758367584675856758667587675886758967590675916759267593675946759567596675976759867599676006760167602676036760467605676066760767608676096761067611676126761367614676156761667617676186761967620676216762267623676246762567626676276762867629676306763167632676336763467635676366763767638676396764067641676426764367644676456764667647676486764967650676516765267653676546765567656676576765867659676606766167662676636766467665676666766767668676696767067671676726767367674676756767667677676786767967680676816768267683676846768567686676876768867689676906769167692676936769467695676966769767698676996770067701677026770367704677056770667707677086770967710677116771267713677146771567716677176771867719677206772167722677236772467725677266772767728677296773067731677326773367734677356773667737677386773967740677416774267743677446774567746677476774867749677506775167752677536775467755677566775767758677596776067761677626776367764677656776667767677686776967770677716777267773677746777567776677776777867779677806778167782677836778467785677866778767788677896779067791677926779367794677956779667797677986779967800678016780267803678046780567806678076780867809678106781167812678136781467815678166781767818678196782067821678226782367824678256782667827678286782967830678316783267833678346783567836678376783867839678406784167842678436784467845678466784767848678496785067851678526785367854678556785667857678586785967860678616786267863678646786567866678676786867869678706787167872678736787467875678766787767878678796788067881678826788367884678856788667887678886788967890678916789267893678946789567896678976789867899679006790167902679036790467905679066790767908679096791067911679126791367914679156791667917679186791967920679216792267923679246792567926679276792867929679306793167932679336793467935679366793767938679396794067941679426794367944679456794667947679486794967950679516795267953679546795567956679576795867959679606796167962679636796467965679666796767968679696797067971679726797367974679756797667977679786797967980679816798267983679846798567986679876798867989679906799167992679936799467995679966799767998679996800068001680026800368004680056800668007680086800968010680116801268013680146801568016680176801868019680206802168022680236802468025680266802768028680296803068031680326803368034680356803668037680386803968040680416804268043680446804568046680476804868049680506805168052680536805468055680566805768058680596806068061680626806368064680656806668067680686806968070680716807268073680746807568076680776807868079680806808168082680836808468085680866808768088680896809068091680926809368094680956809668097680986809968100681016810268103681046810568106681076810868109681106811168112681136811468115681166811768118681196812068121681226812368124681256812668127681286812968130681316813268133681346813568136681376813868139681406814168142681436814468145681466814768148681496815068151681526815368154681556815668157681586815968160681616816268163681646816568166681676816868169681706817168172681736817468175681766817768178681796818068181681826818368184681856818668187681886818968190681916819268193681946819568196681976819868199682006820168202682036820468205682066820768208682096821068211682126821368214682156821668217682186821968220682216822268223682246822568226682276822868229682306823168232682336823468235682366823768238682396824068241682426824368244682456824668247682486824968250682516825268253682546825568256682576825868259682606826168262682636826468265682666826768268682696827068271682726827368274682756827668277682786827968280682816828268283682846828568286682876828868289682906829168292682936829468295682966829768298682996830068301683026830368304683056830668307683086830968310683116831268313683146831568316683176831868319683206832168322683236832468325683266832768328683296833068331683326833368334683356833668337683386833968340683416834268343683446834568346683476834868349683506835168352683536835468355683566835768358683596836068361683626836368364683656836668367683686836968370683716837268373683746837568376683776837868379683806838168382683836838468385683866838768388683896839068391683926839368394683956839668397683986839968400684016840268403684046840568406684076840868409684106841168412684136841468415684166841768418684196842068421684226842368424684256842668427684286842968430684316843268433684346843568436684376843868439684406844168442684436844468445684466844768448684496845068451684526845368454684556845668457684586845968460684616846268463684646846568466684676846868469684706847168472684736847468475684766847768478684796848068481684826848368484684856848668487684886848968490684916849268493684946849568496684976849868499685006850168502685036850468505685066850768508685096851068511685126851368514685156851668517685186851968520685216852268523685246852568526685276852868529685306853168532685336853468535685366853768538685396854068541685426854368544685456854668547685486854968550685516855268553685546855568556685576855868559685606856168562685636856468565685666856768568685696857068571685726857368574685756857668577685786857968580685816858268583685846858568586685876858868589685906859168592685936859468595685966859768598685996860068601686026860368604686056860668607686086860968610686116861268613686146861568616686176861868619686206862168622686236862468625686266862768628686296863068631686326863368634686356863668637686386863968640686416864268643686446864568646686476864868649686506865168652686536865468655686566865768658686596866068661686626866368664686656866668667686686866968670686716867268673686746867568676686776867868679686806868168682686836868468685686866868768688686896869068691686926869368694686956869668697686986869968700687016870268703687046870568706687076870868709687106871168712687136871468715687166871768718687196872068721687226872368724687256872668727687286872968730687316873268733687346873568736687376873868739687406874168742687436874468745687466874768748687496875068751687526875368754687556875668757687586875968760687616876268763687646876568766687676876868769687706877168772687736877468775687766877768778687796878068781687826878368784687856878668787687886878968790687916879268793687946879568796687976879868799688006880168802688036880468805688066880768808688096881068811688126881368814688156881668817688186881968820688216882268823688246882568826688276882868829688306883168832688336883468835688366883768838688396884068841688426884368844688456884668847688486884968850688516885268853688546885568856688576885868859688606886168862688636886468865688666886768868688696887068871688726887368874688756887668877688786887968880688816888268883688846888568886688876888868889688906889168892688936889468895688966889768898688996890068901689026890368904689056890668907689086890968910689116891268913689146891568916689176891868919689206892168922689236892468925689266892768928689296893068931689326893368934689356893668937689386893968940689416894268943689446894568946689476894868949689506895168952689536895468955689566895768958689596896068961689626896368964689656896668967689686896968970689716897268973689746897568976689776897868979689806898168982689836898468985689866898768988689896899068991689926899368994689956899668997689986899969000690016900269003690046900569006690076900869009690106901169012690136901469015690166901769018690196902069021690226902369024690256902669027690286902969030690316903269033690346903569036690376903869039690406904169042690436904469045690466904769048690496905069051690526905369054690556905669057690586905969060690616906269063690646906569066690676906869069690706907169072690736907469075690766907769078690796908069081690826908369084690856908669087690886908969090690916909269093690946909569096690976909869099691006910169102691036910469105691066910769108691096911069111691126911369114691156911669117691186911969120691216912269123691246912569126691276912869129691306913169132691336913469135691366913769138691396914069141691426914369144691456914669147691486914969150691516915269153691546915569156691576915869159691606916169162691636916469165691666916769168691696917069171691726917369174691756917669177691786917969180691816918269183691846918569186691876918869189691906919169192691936919469195691966919769198691996920069201692026920369204692056920669207692086920969210692116921269213692146921569216692176921869219692206922169222692236922469225692266922769228692296923069231692326923369234692356923669237692386923969240692416924269243692446924569246692476924869249692506925169252692536925469255692566925769258692596926069261692626926369264692656926669267692686926969270692716927269273692746927569276692776927869279692806928169282692836928469285692866928769288692896929069291692926929369294692956929669297692986929969300693016930269303693046930569306693076930869309693106931169312693136931469315693166931769318693196932069321693226932369324693256932669327693286932969330693316933269333693346933569336693376933869339693406934169342693436934469345693466934769348693496935069351693526935369354693556935669357693586935969360693616936269363693646936569366693676936869369693706937169372693736937469375693766937769378693796938069381693826938369384693856938669387693886938969390693916939269393693946939569396693976939869399694006940169402694036940469405694066940769408694096941069411694126941369414694156941669417694186941969420694216942269423694246942569426694276942869429694306943169432694336943469435694366943769438694396944069441694426944369444694456944669447694486944969450694516945269453694546945569456694576945869459694606946169462694636946469465694666946769468694696947069471694726947369474694756947669477694786947969480694816948269483694846948569486694876948869489694906949169492694936949469495694966949769498694996950069501695026950369504695056950669507695086950969510695116951269513695146951569516695176951869519695206952169522695236952469525695266952769528695296953069531695326953369534695356953669537695386953969540695416954269543695446954569546695476954869549695506955169552695536955469555695566955769558695596956069561695626956369564695656956669567695686956969570695716957269573695746957569576695776957869579695806958169582695836958469585695866958769588695896959069591695926959369594695956959669597695986959969600696016960269603696046960569606696076960869609696106961169612696136961469615696166961769618696196962069621696226962369624696256962669627696286962969630696316963269633696346963569636696376963869639696406964169642696436964469645696466964769648696496965069651696526965369654696556965669657696586965969660696616966269663696646966569666696676966869669696706967169672696736967469675696766967769678696796968069681696826968369684696856968669687696886968969690696916969269693696946969569696696976969869699697006970169702697036970469705697066970769708697096971069711697126971369714697156971669717697186971969720697216972269723697246972569726697276972869729697306973169732697336973469735697366973769738697396974069741697426974369744697456974669747697486974969750697516975269753697546975569756697576975869759697606976169762697636976469765697666976769768697696977069771697726977369774697756977669777697786977969780697816978269783697846978569786697876978869789697906979169792697936979469795697966979769798697996980069801698026980369804698056980669807698086980969810698116981269813698146981569816698176981869819698206982169822698236982469825698266982769828698296983069831698326983369834698356983669837698386983969840698416984269843698446984569846698476984869849698506985169852698536985469855698566985769858698596986069861698626986369864698656986669867698686986969870698716987269873698746987569876698776987869879698806988169882698836988469885698866988769888698896989069891698926989369894698956989669897698986989969900699016990269903699046990569906699076990869909699106991169912699136991469915699166991769918699196992069921699226992369924699256992669927699286992969930699316993269933699346993569936699376993869939699406994169942699436994469945699466994769948699496995069951699526995369954699556995669957699586995969960699616996269963699646996569966699676996869969699706997169972699736997469975699766997769978699796998069981699826998369984699856998669987699886998969990699916999269993699946999569996699976999869999700007000170002700037000470005700067000770008700097001070011700127001370014700157001670017700187001970020700217002270023700247002570026700277002870029700307003170032700337003470035700367003770038700397004070041700427004370044700457004670047700487004970050700517005270053700547005570056700577005870059700607006170062700637006470065700667006770068700697007070071700727007370074700757007670077700787007970080700817008270083700847008570086700877008870089700907009170092700937009470095700967009770098700997010070101701027010370104701057010670107701087010970110701117011270113701147011570116701177011870119701207012170122701237012470125701267012770128701297013070131701327013370134701357013670137701387013970140701417014270143701447014570146701477014870149701507015170152701537015470155701567015770158701597016070161701627016370164701657016670167701687016970170701717017270173701747017570176701777017870179701807018170182701837018470185701867018770188701897019070191701927019370194701957019670197701987019970200702017020270203702047020570206702077020870209702107021170212702137021470215702167021770218702197022070221702227022370224702257022670227702287022970230702317023270233702347023570236702377023870239702407024170242702437024470245702467024770248702497025070251702527025370254702557025670257702587025970260702617026270263702647026570266702677026870269702707027170272702737027470275702767027770278702797028070281702827028370284702857028670287702887028970290702917029270293702947029570296702977029870299703007030170302703037030470305703067030770308703097031070311703127031370314703157031670317703187031970320703217032270323703247032570326703277032870329703307033170332703337033470335703367033770338703397034070341703427034370344703457034670347703487034970350703517035270353703547035570356703577035870359703607036170362703637036470365703667036770368703697037070371703727037370374703757037670377703787037970380703817038270383703847038570386703877038870389703907039170392703937039470395703967039770398703997040070401704027040370404704057040670407704087040970410704117041270413704147041570416704177041870419704207042170422704237042470425704267042770428704297043070431704327043370434704357043670437704387043970440704417044270443704447044570446704477044870449704507045170452704537045470455704567045770458704597046070461704627046370464704657046670467704687046970470704717047270473704747047570476704777047870479704807048170482704837048470485704867048770488704897049070491704927049370494704957049670497704987049970500705017050270503705047050570506705077050870509705107051170512705137051470515705167051770518705197052070521705227052370524705257052670527705287052970530705317053270533705347053570536705377053870539705407054170542705437054470545705467054770548705497055070551705527055370554705557055670557705587055970560705617056270563705647056570566705677056870569705707057170572705737057470575705767057770578705797058070581705827058370584705857058670587705887058970590705917059270593705947059570596705977059870599706007060170602706037060470605706067060770608706097061070611706127061370614706157061670617706187061970620706217062270623706247062570626706277062870629706307063170632706337063470635706367063770638706397064070641706427064370644706457064670647706487064970650706517065270653706547065570656706577065870659706607066170662706637066470665706667066770668706697067070671706727067370674706757067670677706787067970680706817068270683706847068570686706877068870689706907069170692706937069470695706967069770698706997070070701707027070370704707057070670707707087070970710707117071270713707147071570716707177071870719707207072170722707237072470725707267072770728707297073070731707327073370734707357073670737707387073970740707417074270743707447074570746707477074870749707507075170752707537075470755707567075770758707597076070761707627076370764707657076670767707687076970770707717077270773707747077570776707777077870779707807078170782707837078470785707867078770788707897079070791707927079370794707957079670797707987079970800708017080270803708047080570806708077080870809708107081170812708137081470815708167081770818708197082070821708227082370824708257082670827708287082970830708317083270833708347083570836708377083870839708407084170842708437084470845708467084770848708497085070851708527085370854708557085670857708587085970860708617086270863708647086570866708677086870869708707087170872708737087470875708767087770878708797088070881708827088370884708857088670887708887088970890708917089270893708947089570896708977089870899709007090170902709037090470905709067090770908709097091070911709127091370914709157091670917709187091970920709217092270923709247092570926709277092870929709307093170932709337093470935709367093770938709397094070941709427094370944709457094670947709487094970950709517095270953709547095570956709577095870959709607096170962709637096470965709667096770968709697097070971709727097370974709757097670977709787097970980709817098270983709847098570986709877098870989709907099170992709937099470995709967099770998709997100071001710027100371004710057100671007710087100971010710117101271013710147101571016710177101871019710207102171022710237102471025710267102771028710297103071031710327103371034710357103671037710387103971040710417104271043710447104571046710477104871049710507105171052710537105471055710567105771058710597106071061710627106371064710657106671067710687106971070710717107271073710747107571076710777107871079710807108171082710837108471085710867108771088710897109071091710927109371094710957109671097710987109971100711017110271103711047110571106711077110871109711107111171112711137111471115711167111771118711197112071121711227112371124711257112671127711287112971130711317113271133711347113571136711377113871139711407114171142711437114471145711467114771148711497115071151711527115371154711557115671157711587115971160711617116271163711647116571166711677116871169711707117171172711737117471175711767117771178711797118071181711827118371184711857118671187711887118971190711917119271193711947119571196711977119871199712007120171202712037120471205712067120771208712097121071211712127121371214712157121671217712187121971220712217122271223712247122571226712277122871229712307123171232712337123471235712367123771238712397124071241712427124371244712457124671247712487124971250712517125271253712547125571256712577125871259712607126171262712637126471265712667126771268712697127071271712727127371274712757127671277712787127971280712817128271283712847128571286712877128871289712907129171292712937129471295712967129771298712997130071301713027130371304713057130671307713087130971310713117131271313713147131571316713177131871319713207132171322713237132471325713267132771328713297133071331713327133371334713357133671337713387133971340713417134271343713447134571346713477134871349713507135171352713537135471355713567135771358713597136071361713627136371364713657136671367713687136971370713717137271373713747137571376713777137871379713807138171382713837138471385713867138771388713897139071391713927139371394713957139671397713987139971400714017140271403714047140571406714077140871409714107141171412714137141471415714167141771418714197142071421714227142371424714257142671427714287142971430714317143271433714347143571436714377143871439714407144171442714437144471445714467144771448714497145071451714527145371454714557145671457714587145971460714617146271463714647146571466714677146871469714707147171472714737147471475714767147771478714797148071481714827148371484714857148671487714887148971490714917149271493714947149571496714977149871499715007150171502715037150471505715067150771508715097151071511715127151371514715157151671517715187151971520715217152271523715247152571526715277152871529715307153171532715337153471535715367153771538715397154071541715427154371544715457154671547715487154971550715517155271553715547155571556715577155871559715607156171562715637156471565715667156771568715697157071571715727157371574715757157671577715787157971580715817158271583715847158571586715877158871589715907159171592715937159471595715967159771598715997160071601716027160371604716057160671607716087160971610716117161271613716147161571616716177161871619716207162171622716237162471625716267162771628716297163071631716327163371634716357163671637716387163971640716417164271643716447164571646716477164871649716507165171652716537165471655716567165771658716597166071661716627166371664716657166671667716687166971670716717167271673716747167571676716777167871679716807168171682716837168471685716867168771688716897169071691716927169371694716957169671697716987169971700717017170271703717047170571706717077170871709717107171171712717137171471715717167171771718717197172071721717227172371724717257172671727717287172971730717317173271733717347173571736717377173871739717407174171742717437174471745717467174771748717497175071751717527175371754717557175671757717587175971760717617176271763717647176571766717677176871769717707177171772717737177471775717767177771778717797178071781717827178371784717857178671787717887178971790717917179271793717947179571796717977179871799718007180171802718037180471805718067180771808718097181071811718127181371814718157181671817718187181971820718217182271823718247182571826718277182871829718307183171832718337183471835718367183771838718397184071841718427184371844718457184671847718487184971850718517185271853718547185571856718577185871859718607186171862718637186471865718667186771868718697187071871718727187371874718757187671877718787187971880718817188271883718847188571886718877188871889718907189171892718937189471895718967189771898718997190071901719027190371904719057190671907719087190971910719117191271913719147191571916719177191871919719207192171922719237192471925719267192771928719297193071931719327193371934719357193671937719387193971940719417194271943719447194571946719477194871949719507195171952719537195471955719567195771958719597196071961719627196371964719657196671967719687196971970719717197271973719747197571976719777197871979719807198171982719837198471985719867198771988719897199071991719927199371994719957199671997719987199972000720017200272003720047200572006720077200872009720107201172012720137201472015720167201772018720197202072021720227202372024720257202672027720287202972030720317203272033720347203572036720377203872039720407204172042720437204472045720467204772048720497205072051720527205372054720557205672057720587205972060720617206272063720647206572066720677206872069720707207172072720737207472075720767207772078720797208072081720827208372084720857208672087720887208972090720917209272093720947209572096720977209872099721007210172102721037210472105721067210772108721097211072111721127211372114721157211672117721187211972120721217212272123721247212572126721277212872129721307213172132721337213472135721367213772138721397214072141721427214372144721457214672147721487214972150721517215272153721547215572156721577215872159721607216172162721637216472165721667216772168721697217072171721727217372174721757217672177721787217972180721817218272183721847218572186721877218872189721907219172192721937219472195721967219772198721997220072201722027220372204722057220672207722087220972210722117221272213722147221572216722177221872219722207222172222722237222472225722267222772228722297223072231722327223372234722357223672237722387223972240722417224272243722447224572246722477224872249722507225172252722537225472255722567225772258722597226072261722627226372264722657226672267722687226972270722717227272273722747227572276722777227872279722807228172282722837228472285722867228772288722897229072291722927229372294722957229672297722987229972300723017230272303723047230572306723077230872309723107231172312723137231472315723167231772318723197232072321723227232372324723257232672327723287232972330723317233272333723347233572336723377233872339723407234172342723437234472345723467234772348723497235072351723527235372354723557235672357723587235972360723617236272363723647236572366723677236872369723707237172372723737237472375723767237772378723797238072381723827238372384723857238672387723887238972390723917239272393723947239572396723977239872399724007240172402724037240472405724067240772408724097241072411724127241372414724157241672417724187241972420724217242272423724247242572426724277242872429724307243172432724337243472435724367243772438724397244072441724427244372444724457244672447724487244972450724517245272453724547245572456724577245872459724607246172462724637246472465724667246772468724697247072471724727247372474724757247672477724787247972480724817248272483724847248572486724877248872489724907249172492724937249472495724967249772498724997250072501725027250372504725057250672507725087250972510725117251272513725147251572516725177251872519725207252172522725237252472525725267252772528725297253072531725327253372534725357253672537725387253972540725417254272543725447254572546725477254872549725507255172552725537255472555725567255772558725597256072561725627256372564725657256672567725687256972570725717257272573725747257572576725777257872579725807258172582725837258472585725867258772588725897259072591725927259372594725957259672597725987259972600726017260272603726047260572606726077260872609726107261172612726137261472615726167261772618726197262072621726227262372624726257262672627726287262972630726317263272633726347263572636726377263872639726407264172642726437264472645726467264772648726497265072651726527265372654726557265672657726587265972660726617266272663726647266572666726677266872669726707267172672726737267472675726767267772678726797268072681726827268372684726857268672687726887268972690726917269272693726947269572696726977269872699727007270172702727037270472705727067270772708727097271072711727127271372714727157271672717727187271972720727217272272723727247272572726727277272872729727307273172732727337273472735727367273772738727397274072741727427274372744727457274672747727487274972750727517275272753727547275572756727577275872759727607276172762727637276472765727667276772768727697277072771727727277372774727757277672777727787277972780727817278272783727847278572786727877278872789727907279172792727937279472795727967279772798727997280072801728027280372804728057280672807728087280972810728117281272813728147281572816728177281872819728207282172822728237282472825728267282772828728297283072831728327283372834728357283672837728387283972840728417284272843728447284572846728477284872849728507285172852728537285472855728567285772858728597286072861728627286372864728657286672867728687286972870728717287272873728747287572876728777287872879728807288172882728837288472885728867288772888728897289072891728927289372894728957289672897728987289972900729017290272903729047290572906729077290872909729107291172912729137291472915729167291772918729197292072921729227292372924729257292672927729287292972930729317293272933729347293572936729377293872939729407294172942729437294472945729467294772948729497295072951729527295372954729557295672957729587295972960729617296272963729647296572966729677296872969729707297172972729737297472975729767297772978729797298072981729827298372984729857298672987729887298972990729917299272993729947299572996729977299872999730007300173002730037300473005730067300773008730097301073011730127301373014730157301673017730187301973020730217302273023730247302573026730277302873029730307303173032730337303473035730367303773038730397304073041730427304373044730457304673047730487304973050730517305273053730547305573056730577305873059730607306173062730637306473065730667306773068730697307073071730727307373074730757307673077730787307973080730817308273083730847308573086730877308873089730907309173092730937309473095730967309773098730997310073101731027310373104731057310673107731087310973110731117311273113731147311573116731177311873119731207312173122731237312473125731267312773128731297313073131731327313373134731357313673137731387313973140731417314273143731447314573146731477314873149731507315173152731537315473155731567315773158731597316073161731627316373164731657316673167731687316973170731717317273173731747317573176731777317873179731807318173182731837318473185731867318773188731897319073191731927319373194731957319673197731987319973200732017320273203732047320573206732077320873209732107321173212732137321473215732167321773218732197322073221732227322373224732257322673227732287322973230732317323273233732347323573236732377323873239732407324173242732437324473245732467324773248732497325073251732527325373254732557325673257732587325973260732617326273263732647326573266732677326873269732707327173272732737327473275732767327773278732797328073281732827328373284732857328673287732887328973290732917329273293732947329573296732977329873299733007330173302733037330473305733067330773308733097331073311733127331373314733157331673317733187331973320733217332273323733247332573326733277332873329733307333173332733337333473335733367333773338733397334073341733427334373344733457334673347733487334973350733517335273353733547335573356733577335873359733607336173362733637336473365733667336773368733697337073371733727337373374733757337673377733787337973380733817338273383733847338573386733877338873389733907339173392733937339473395733967339773398733997340073401734027340373404734057340673407734087340973410734117341273413734147341573416734177341873419734207342173422734237342473425734267342773428734297343073431734327343373434734357343673437734387343973440734417344273443734447344573446734477344873449734507345173452734537345473455734567345773458734597346073461734627346373464734657346673467734687346973470734717347273473734747347573476734777347873479734807348173482734837348473485734867348773488734897349073491734927349373494734957349673497734987349973500735017350273503735047350573506735077350873509735107351173512735137351473515735167351773518735197352073521735227352373524735257352673527735287352973530735317353273533735347353573536735377353873539735407354173542735437354473545735467354773548735497355073551735527355373554735557355673557735587355973560735617356273563735647356573566735677356873569735707357173572735737357473575735767357773578735797358073581735827358373584735857358673587735887358973590735917359273593735947359573596735977359873599736007360173602736037360473605736067360773608736097361073611736127361373614736157361673617736187361973620736217362273623736247362573626736277362873629736307363173632736337363473635736367363773638736397364073641736427364373644736457364673647736487364973650736517365273653736547365573656736577365873659736607366173662736637366473665736667366773668736697367073671736727367373674736757367673677736787367973680736817368273683736847368573686736877368873689736907369173692736937369473695736967369773698736997370073701737027370373704737057370673707737087370973710737117371273713737147371573716737177371873719737207372173722737237372473725737267372773728737297373073731737327373373734737357373673737737387373973740737417374273743737447374573746737477374873749737507375173752737537375473755737567375773758737597376073761737627376373764737657376673767737687376973770737717377273773737747377573776737777377873779737807378173782737837378473785737867378773788737897379073791737927379373794737957379673797737987379973800738017380273803738047380573806738077380873809738107381173812738137381473815738167381773818738197382073821738227382373824738257382673827738287382973830738317383273833738347383573836738377383873839738407384173842738437384473845738467384773848738497385073851738527385373854738557385673857738587385973860738617386273863738647386573866738677386873869738707387173872738737387473875738767387773878738797388073881738827388373884738857388673887738887388973890738917389273893738947389573896738977389873899739007390173902739037390473905739067390773908739097391073911739127391373914739157391673917739187391973920739217392273923739247392573926739277392873929739307393173932739337393473935739367393773938739397394073941739427394373944739457394673947739487394973950739517395273953739547395573956739577395873959739607396173962739637396473965739667396773968739697397073971739727397373974739757397673977739787397973980739817398273983739847398573986739877398873989739907399173992739937399473995739967399773998739997400074001740027400374004740057400674007740087400974010740117401274013740147401574016740177401874019740207402174022740237402474025740267402774028740297403074031740327403374034740357403674037740387403974040740417404274043740447404574046740477404874049740507405174052740537405474055740567405774058740597406074061740627406374064740657406674067740687406974070740717407274073740747407574076740777407874079740807408174082740837408474085740867408774088740897409074091740927409374094740957409674097740987409974100741017410274103741047410574106741077410874109741107411174112741137411474115741167411774118741197412074121741227412374124741257412674127741287412974130741317413274133741347413574136741377413874139741407414174142741437414474145741467414774148741497415074151741527415374154741557415674157741587415974160741617416274163741647416574166741677416874169741707417174172741737417474175741767417774178741797418074181741827418374184741857418674187741887418974190741917419274193741947419574196741977419874199742007420174202742037420474205742067420774208742097421074211742127421374214742157421674217742187421974220742217422274223742247422574226742277422874229742307423174232742337423474235742367423774238742397424074241742427424374244742457424674247742487424974250742517425274253742547425574256742577425874259742607426174262742637426474265742667426774268742697427074271742727427374274742757427674277742787427974280742817428274283742847428574286742877428874289742907429174292742937429474295742967429774298742997430074301743027430374304743057430674307743087430974310743117431274313743147431574316743177431874319743207432174322743237432474325743267432774328743297433074331743327433374334743357433674337743387433974340743417434274343743447434574346743477434874349743507435174352743537435474355743567435774358743597436074361743627436374364743657436674367743687436974370743717437274373743747437574376743777437874379743807438174382743837438474385743867438774388743897439074391743927439374394743957439674397743987439974400744017440274403744047440574406744077440874409744107441174412744137441474415744167441774418744197442074421744227442374424744257442674427744287442974430744317443274433744347443574436744377443874439744407444174442744437444474445744467444774448744497445074451744527445374454744557445674457744587445974460744617446274463744647446574466744677446874469744707447174472744737447474475744767447774478744797448074481744827448374484744857448674487744887448974490744917449274493744947449574496744977449874499745007450174502745037450474505745067450774508745097451074511745127451374514745157451674517745187451974520745217452274523745247452574526745277452874529745307453174532745337453474535745367453774538745397454074541745427454374544745457454674547745487454974550745517455274553745547455574556745577455874559745607456174562745637456474565745667456774568745697457074571745727457374574745757457674577745787457974580745817458274583745847458574586745877458874589745907459174592745937459474595745967459774598745997460074601746027460374604746057460674607746087460974610746117461274613746147461574616746177461874619746207462174622746237462474625746267462774628746297463074631746327463374634746357463674637746387463974640746417464274643746447464574646746477464874649746507465174652746537465474655746567465774658746597466074661746627466374664746657466674667746687466974670746717467274673746747467574676746777467874679746807468174682746837468474685746867468774688746897469074691746927469374694746957469674697746987469974700747017470274703747047470574706747077470874709747107471174712747137471474715747167471774718747197472074721747227472374724747257472674727747287472974730747317473274733747347473574736747377473874739747407474174742747437474474745747467474774748747497475074751747527475374754747557475674757747587475974760747617476274763747647476574766747677476874769747707477174772747737477474775747767477774778747797478074781747827478374784747857478674787747887478974790747917479274793747947479574796747977479874799748007480174802748037480474805748067480774808748097481074811748127481374814748157481674817748187481974820748217482274823748247482574826748277482874829748307483174832748337483474835748367483774838748397484074841748427484374844748457484674847748487484974850748517485274853748547485574856748577485874859748607486174862748637486474865748667486774868748697487074871748727487374874748757487674877748787487974880748817488274883748847488574886748877488874889748907489174892748937489474895748967489774898748997490074901749027490374904749057490674907749087490974910749117491274913749147491574916749177491874919749207492174922749237492474925749267492774928749297493074931749327493374934749357493674937749387493974940749417494274943749447494574946749477494874949749507495174952749537495474955749567495774958749597496074961749627496374964749657496674967749687496974970749717497274973749747497574976749777497874979749807498174982749837498474985749867498774988749897499074991749927499374994749957499674997749987499975000750017500275003750047500575006750077500875009750107501175012750137501475015750167501775018750197502075021750227502375024750257502675027750287502975030750317503275033750347503575036750377503875039750407504175042750437504475045750467504775048750497505075051750527505375054750557505675057750587505975060750617506275063750647506575066750677506875069750707507175072750737507475075750767507775078750797508075081750827508375084750857508675087750887508975090750917509275093750947509575096750977509875099751007510175102751037510475105751067510775108751097511075111751127511375114751157511675117751187511975120751217512275123751247512575126751277512875129751307513175132751337513475135751367513775138751397514075141751427514375144751457514675147751487514975150751517515275153751547515575156751577515875159751607516175162751637516475165751667516775168751697517075171751727517375174751757517675177751787517975180751817518275183751847518575186751877518875189751907519175192751937519475195751967519775198751997520075201752027520375204752057520675207752087520975210752117521275213752147521575216752177521875219752207522175222752237522475225752267522775228752297523075231752327523375234752357523675237752387523975240752417524275243752447524575246752477524875249752507525175252752537525475255752567525775258752597526075261752627526375264752657526675267752687526975270752717527275273752747527575276752777527875279752807528175282752837528475285752867528775288752897529075291752927529375294752957529675297752987529975300753017530275303753047530575306753077530875309753107531175312753137531475315753167531775318753197532075321753227532375324753257532675327753287532975330753317533275333753347533575336753377533875339753407534175342753437534475345753467534775348753497535075351753527535375354753557535675357753587535975360753617536275363753647536575366753677536875369753707537175372753737537475375753767537775378753797538075381753827538375384753857538675387753887538975390753917539275393753947539575396753977539875399754007540175402754037540475405754067540775408754097541075411754127541375414754157541675417754187541975420754217542275423754247542575426754277542875429754307543175432754337543475435754367543775438754397544075441754427544375444754457544675447754487544975450754517545275453754547545575456754577545875459754607546175462754637546475465754667546775468754697547075471754727547375474754757547675477754787547975480754817548275483754847548575486754877548875489754907549175492754937549475495754967549775498754997550075501755027550375504755057550675507755087550975510755117551275513755147551575516755177551875519755207552175522755237552475525755267552775528755297553075531755327553375534755357553675537755387553975540755417554275543755447554575546755477554875549755507555175552755537555475555755567555775558755597556075561755627556375564755657556675567755687556975570755717557275573755747557575576755777557875579755807558175582755837558475585755867558775588755897559075591755927559375594755957559675597755987559975600756017560275603756047560575606756077560875609756107561175612756137561475615756167561775618756197562075621756227562375624756257562675627756287562975630756317563275633756347563575636756377563875639756407564175642756437564475645756467564775648756497565075651756527565375654756557565675657756587565975660756617566275663756647566575666756677566875669756707567175672756737567475675756767567775678756797568075681756827568375684756857568675687756887568975690756917569275693756947569575696756977569875699757007570175702757037570475705757067570775708757097571075711757127571375714757157571675717757187571975720757217572275723757247572575726757277572875729757307573175732757337573475735757367573775738757397574075741757427574375744757457574675747757487574975750757517575275753757547575575756757577575875759757607576175762757637576475765757667576775768757697577075771757727577375774757757577675777757787577975780757817578275783757847578575786757877578875789757907579175792757937579475795757967579775798757997580075801758027580375804758057580675807758087580975810758117581275813758147581575816758177581875819758207582175822758237582475825758267582775828758297583075831758327583375834758357583675837758387583975840758417584275843758447584575846758477584875849758507585175852758537585475855758567585775858758597586075861758627586375864758657586675867758687586975870758717587275873758747587575876758777587875879758807588175882758837588475885758867588775888758897589075891758927589375894758957589675897758987589975900759017590275903759047590575906759077590875909759107591175912759137591475915759167591775918759197592075921759227592375924759257592675927759287592975930759317593275933759347593575936759377593875939759407594175942759437594475945759467594775948759497595075951759527595375954759557595675957759587595975960759617596275963759647596575966759677596875969759707597175972759737597475975759767597775978759797598075981759827598375984759857598675987759887598975990759917599275993759947599575996759977599875999760007600176002760037600476005760067600776008760097601076011760127601376014760157601676017760187601976020760217602276023760247602576026760277602876029760307603176032760337603476035760367603776038760397604076041760427604376044760457604676047760487604976050760517605276053760547605576056760577605876059760607606176062760637606476065760667606776068760697607076071760727607376074760757607676077760787607976080760817608276083760847608576086760877608876089760907609176092760937609476095760967609776098760997610076101761027610376104761057610676107761087610976110761117611276113761147611576116761177611876119761207612176122761237612476125761267612776128761297613076131761327613376134761357613676137761387613976140761417614276143761447614576146761477614876149761507615176152761537615476155761567615776158761597616076161761627616376164761657616676167761687616976170761717617276173761747617576176761777617876179761807618176182761837618476185761867618776188761897619076191761927619376194761957619676197761987619976200762017620276203762047620576206762077620876209762107621176212762137621476215762167621776218762197622076221762227622376224762257622676227762287622976230762317623276233762347623576236762377623876239762407624176242762437624476245762467624776248762497625076251762527625376254762557625676257762587625976260762617626276263762647626576266762677626876269762707627176272762737627476275762767627776278762797628076281762827628376284762857628676287762887628976290762917629276293762947629576296762977629876299763007630176302763037630476305763067630776308763097631076311763127631376314763157631676317763187631976320763217632276323763247632576326763277632876329763307633176332763337633476335763367633776338763397634076341763427634376344763457634676347763487634976350763517635276353763547635576356763577635876359763607636176362763637636476365763667636776368763697637076371763727637376374763757637676377763787637976380763817638276383763847638576386763877638876389763907639176392763937639476395763967639776398763997640076401764027640376404764057640676407764087640976410764117641276413764147641576416764177641876419764207642176422764237642476425764267642776428764297643076431764327643376434764357643676437764387643976440764417644276443764447644576446764477644876449764507645176452764537645476455764567645776458764597646076461764627646376464764657646676467764687646976470764717647276473764747647576476764777647876479764807648176482764837648476485764867648776488764897649076491764927649376494764957649676497764987649976500765017650276503765047650576506765077650876509765107651176512765137651476515765167651776518765197652076521765227652376524765257652676527765287652976530765317653276533765347653576536765377653876539765407654176542765437654476545765467654776548765497655076551765527655376554765557655676557765587655976560765617656276563765647656576566765677656876569765707657176572765737657476575765767657776578765797658076581765827658376584765857658676587765887658976590765917659276593765947659576596765977659876599766007660176602766037660476605766067660776608766097661076611766127661376614766157661676617766187661976620766217662276623766247662576626766277662876629766307663176632766337663476635766367663776638766397664076641766427664376644766457664676647766487664976650766517665276653766547665576656766577665876659766607666176662766637666476665766667666776668766697667076671766727667376674766757667676677766787667976680766817668276683766847668576686766877668876689766907669176692766937669476695766967669776698766997670076701767027670376704767057670676707767087670976710767117671276713767147671576716767177671876719767207672176722767237672476725767267672776728767297673076731767327673376734767357673676737767387673976740767417674276743767447674576746767477674876749767507675176752767537675476755767567675776758767597676076761767627676376764767657676676767767687676976770767717677276773767747677576776767777677876779767807678176782767837678476785767867678776788767897679076791767927679376794767957679676797767987679976800768017680276803768047680576806768077680876809768107681176812768137681476815768167681776818768197682076821768227682376824768257682676827768287682976830768317683276833768347683576836768377683876839768407684176842768437684476845768467684776848768497685076851768527685376854768557685676857768587685976860768617686276863768647686576866768677686876869768707687176872768737687476875768767687776878768797688076881768827688376884768857688676887768887688976890768917689276893768947689576896768977689876899769007690176902769037690476905769067690776908769097691076911769127691376914769157691676917769187691976920769217692276923769247692576926769277692876929769307693176932769337693476935769367693776938769397694076941769427694376944769457694676947769487694976950769517695276953769547695576956769577695876959769607696176962769637696476965769667696776968769697697076971769727697376974769757697676977769787697976980769817698276983769847698576986769877698876989769907699176992769937699476995769967699776998769997700077001770027700377004770057700677007770087700977010770117701277013770147701577016770177701877019770207702177022770237702477025770267702777028770297703077031770327703377034770357703677037770387703977040770417704277043770447704577046770477704877049770507705177052770537705477055770567705777058770597706077061770627706377064770657706677067770687706977070770717707277073770747707577076770777707877079770807708177082770837708477085770867708777088770897709077091770927709377094770957709677097770987709977100771017710277103771047710577106771077710877109771107711177112771137711477115771167711777118771197712077121771227712377124771257712677127771287712977130771317713277133771347713577136771377713877139771407714177142771437714477145771467714777148771497715077151771527715377154771557715677157771587715977160771617716277163771647716577166771677716877169771707717177172771737717477175771767717777178771797718077181771827718377184771857718677187771887718977190771917719277193771947719577196771977719877199772007720177202772037720477205772067720777208772097721077211772127721377214772157721677217772187721977220772217722277223772247722577226772277722877229772307723177232772337723477235772367723777238772397724077241772427724377244772457724677247772487724977250772517725277253772547725577256772577725877259772607726177262772637726477265772667726777268772697727077271772727727377274772757727677277772787727977280772817728277283772847728577286772877728877289772907729177292772937729477295772967729777298772997730077301773027730377304773057730677307773087730977310773117731277313773147731577316773177731877319773207732177322773237732477325773267732777328773297733077331773327733377334773357733677337773387733977340773417734277343773447734577346773477734877349773507735177352773537735477355773567735777358773597736077361773627736377364773657736677367773687736977370773717737277373773747737577376773777737877379773807738177382773837738477385773867738777388773897739077391773927739377394773957739677397773987739977400774017740277403774047740577406774077740877409774107741177412774137741477415774167741777418774197742077421774227742377424774257742677427774287742977430774317743277433774347743577436774377743877439774407744177442774437744477445774467744777448774497745077451774527745377454774557745677457774587745977460774617746277463774647746577466774677746877469774707747177472774737747477475774767747777478774797748077481774827748377484774857748677487774887748977490774917749277493774947749577496774977749877499775007750177502775037750477505775067750777508775097751077511775127751377514775157751677517775187751977520775217752277523775247752577526775277752877529775307753177532775337753477535775367753777538775397754077541775427754377544775457754677547775487754977550775517755277553775547755577556775577755877559775607756177562775637756477565775667756777568775697757077571775727757377574775757757677577775787757977580775817758277583775847758577586775877758877589775907759177592775937759477595775967759777598775997760077601776027760377604776057760677607776087760977610776117761277613776147761577616776177761877619776207762177622776237762477625776267762777628776297763077631776327763377634776357763677637776387763977640776417764277643776447764577646776477764877649776507765177652776537765477655776567765777658776597766077661776627766377664776657766677667776687766977670776717767277673776747767577676776777767877679776807768177682776837768477685776867768777688776897769077691776927769377694776957769677697776987769977700777017770277703777047770577706777077770877709777107771177712777137771477715777167771777718777197772077721777227772377724777257772677727777287772977730777317773277733777347773577736777377773877739777407774177742777437774477745777467774777748777497775077751777527775377754777557775677757777587775977760777617776277763777647776577766777677776877769777707777177772777737777477775777767777777778777797778077781777827778377784777857778677787777887778977790777917779277793777947779577796777977779877799778007780177802778037780477805778067780777808778097781077811778127781377814778157781677817778187781977820778217782277823778247782577826778277782877829778307783177832778337783477835778367783777838778397784077841778427784377844778457784677847778487784977850778517785277853778547785577856778577785877859778607786177862778637786477865778667786777868778697787077871778727787377874778757787677877778787787977880778817788277883778847788577886778877788877889778907789177892778937789477895778967789777898778997790077901779027790377904779057790677907779087790977910779117791277913779147791577916779177791877919779207792177922779237792477925779267792777928779297793077931779327793377934779357793677937779387793977940779417794277943779447794577946779477794877949779507795177952779537795477955779567795777958779597796077961779627796377964779657796677967779687796977970779717797277973779747797577976779777797877979779807798177982779837798477985779867798777988779897799077991779927799377994779957799677997779987799978000780017800278003780047800578006780077800878009780107801178012780137801478015780167801778018780197802078021780227802378024780257802678027780287802978030780317803278033780347803578036780377803878039780407804178042780437804478045780467804778048780497805078051780527805378054780557805678057780587805978060780617806278063780647806578066780677806878069780707807178072780737807478075780767807778078780797808078081780827808378084780857808678087780887808978090780917809278093780947809578096780977809878099781007810178102781037810478105781067810778108781097811078111781127811378114781157811678117781187811978120781217812278123781247812578126781277812878129781307813178132781337813478135781367813778138781397814078141781427814378144781457814678147781487814978150781517815278153781547815578156781577815878159781607816178162781637816478165781667816778168781697817078171781727817378174781757817678177781787817978180781817818278183781847818578186781877818878189781907819178192781937819478195781967819778198781997820078201782027820378204782057820678207782087820978210782117821278213782147821578216782177821878219782207822178222782237822478225782267822778228782297823078231782327823378234782357823678237782387823978240782417824278243782447824578246782477824878249782507825178252782537825478255782567825778258782597826078261782627826378264782657826678267782687826978270782717827278273782747827578276782777827878279782807828178282782837828478285782867828778288782897829078291782927829378294782957829678297782987829978300783017830278303783047830578306783077830878309783107831178312783137831478315783167831778318783197832078321783227832378324783257832678327783287832978330783317833278333783347833578336783377833878339783407834178342783437834478345783467834778348783497835078351783527835378354783557835678357783587835978360783617836278363783647836578366783677836878369783707837178372783737837478375783767837778378783797838078381783827838378384783857838678387783887838978390783917839278393783947839578396783977839878399784007840178402784037840478405784067840778408784097841078411784127841378414784157841678417784187841978420784217842278423784247842578426784277842878429784307843178432784337843478435784367843778438784397844078441784427844378444784457844678447784487844978450784517845278453784547845578456784577845878459784607846178462784637846478465784667846778468784697847078471784727847378474784757847678477784787847978480784817848278483784847848578486784877848878489784907849178492784937849478495784967849778498784997850078501785027850378504785057850678507785087850978510785117851278513785147851578516785177851878519785207852178522785237852478525785267852778528785297853078531785327853378534785357853678537785387853978540785417854278543785447854578546785477854878549785507855178552785537855478555785567855778558785597856078561785627856378564785657856678567785687856978570785717857278573785747857578576785777857878579785807858178582785837858478585785867858778588785897859078591785927859378594785957859678597785987859978600786017860278603786047860578606786077860878609786107861178612786137861478615786167861778618786197862078621786227862378624786257862678627786287862978630786317863278633786347863578636786377863878639786407864178642786437864478645786467864778648786497865078651786527865378654786557865678657786587865978660786617866278663786647866578666786677866878669786707867178672786737867478675786767867778678786797868078681786827868378684786857868678687786887868978690786917869278693786947869578696786977869878699787007870178702787037870478705787067870778708787097871078711787127871378714787157871678717787187871978720787217872278723787247872578726787277872878729787307873178732787337873478735787367873778738787397874078741787427874378744787457874678747787487874978750787517875278753787547875578756787577875878759787607876178762787637876478765787667876778768787697877078771787727877378774787757877678777787787877978780787817878278783787847878578786787877878878789787907879178792787937879478795787967879778798787997880078801788027880378804788057880678807788087880978810788117881278813788147881578816788177881878819788207882178822788237882478825788267882778828788297883078831788327883378834788357883678837788387883978840788417884278843788447884578846788477884878849788507885178852788537885478855788567885778858788597886078861788627886378864788657886678867788687886978870788717887278873788747887578876788777887878879788807888178882788837888478885788867888778888788897889078891788927889378894788957889678897788987889978900789017890278903789047890578906789077890878909789107891178912789137891478915789167891778918789197892078921789227892378924789257892678927789287892978930789317893278933789347893578936789377893878939789407894178942789437894478945789467894778948789497895078951789527895378954789557895678957789587895978960789617896278963789647896578966789677896878969789707897178972789737897478975789767897778978789797898078981789827898378984789857898678987789887898978990789917899278993789947899578996789977899878999790007900179002790037900479005790067900779008790097901079011790127901379014790157901679017790187901979020790217902279023790247902579026790277902879029790307903179032790337903479035790367903779038790397904079041790427904379044790457904679047790487904979050790517905279053790547905579056790577905879059790607906179062790637906479065790667906779068790697907079071790727907379074790757907679077790787907979080790817908279083790847908579086790877908879089790907909179092790937909479095790967909779098790997910079101791027910379104791057910679107791087910979110791117911279113791147911579116791177911879119791207912179122791237912479125791267912779128791297913079131791327913379134791357913679137791387913979140791417914279143791447914579146791477914879149791507915179152791537915479155791567915779158791597916079161791627916379164791657916679167791687916979170791717917279173791747917579176791777917879179791807918179182791837918479185791867918779188791897919079191791927919379194791957919679197791987919979200792017920279203792047920579206792077920879209792107921179212792137921479215792167921779218792197922079221792227922379224792257922679227792287922979230792317923279233792347923579236792377923879239792407924179242792437924479245792467924779248792497925079251792527925379254792557925679257792587925979260792617926279263792647926579266792677926879269792707927179272792737927479275792767927779278792797928079281792827928379284792857928679287792887928979290792917929279293792947929579296792977929879299793007930179302793037930479305793067930779308793097931079311793127931379314793157931679317793187931979320793217932279323793247932579326793277932879329793307933179332793337933479335793367933779338793397934079341793427934379344793457934679347793487934979350793517935279353793547935579356793577935879359793607936179362793637936479365793667936779368793697937079371793727937379374793757937679377793787937979380793817938279383793847938579386793877938879389793907939179392793937939479395793967939779398793997940079401794027940379404794057940679407794087940979410794117941279413794147941579416794177941879419794207942179422794237942479425794267942779428794297943079431794327943379434794357943679437794387943979440794417944279443794447944579446794477944879449794507945179452794537945479455794567945779458794597946079461794627946379464794657946679467794687946979470794717947279473794747947579476794777947879479794807948179482794837948479485794867948779488794897949079491794927949379494794957949679497794987949979500795017950279503795047950579506795077950879509795107951179512795137951479515795167951779518795197952079521795227952379524795257952679527795287952979530795317953279533795347953579536795377953879539795407954179542795437954479545795467954779548795497955079551795527955379554795557955679557795587955979560795617956279563795647956579566795677956879569795707957179572795737957479575795767957779578795797958079581795827958379584795857958679587795887958979590795917959279593795947959579596795977959879599796007960179602796037960479605796067960779608796097961079611796127961379614796157961679617796187961979620796217962279623796247962579626796277962879629796307963179632796337963479635796367963779638796397964079641796427964379644796457964679647796487964979650796517965279653796547965579656796577965879659796607966179662796637966479665796667966779668796697967079671796727967379674796757967679677796787967979680796817968279683796847968579686796877968879689796907969179692796937969479695796967969779698796997970079701797027970379704797057970679707797087970979710797117971279713797147971579716797177971879719797207972179722797237972479725797267972779728797297973079731797327973379734797357973679737797387973979740797417974279743797447974579746797477974879749797507975179752797537975479755797567975779758797597976079761797627976379764797657976679767797687976979770797717977279773797747977579776797777977879779797807978179782797837978479785797867978779788797897979079791797927979379794797957979679797797987979979800798017980279803798047980579806798077980879809798107981179812798137981479815798167981779818798197982079821798227982379824798257982679827798287982979830798317983279833798347983579836798377983879839798407984179842798437984479845798467984779848798497985079851798527985379854798557985679857798587985979860798617986279863798647986579866798677986879869798707987179872798737987479875798767987779878798797988079881798827988379884798857988679887798887988979890798917989279893798947989579896798977989879899799007990179902799037990479905799067990779908799097991079911799127991379914799157991679917799187991979920799217992279923799247992579926799277992879929799307993179932799337993479935799367993779938799397994079941799427994379944799457994679947799487994979950799517995279953799547995579956799577995879959799607996179962799637996479965799667996779968799697997079971799727997379974799757997679977799787997979980799817998279983799847998579986799877998879989799907999179992799937999479995799967999779998799998000080001800028000380004800058000680007800088000980010800118001280013800148001580016800178001880019800208002180022800238002480025800268002780028800298003080031800328003380034800358003680037800388003980040800418004280043800448004580046800478004880049800508005180052800538005480055800568005780058800598006080061800628006380064800658006680067800688006980070800718007280073800748007580076800778007880079800808008180082800838008480085800868008780088800898009080091800928009380094800958009680097800988009980100801018010280103801048010580106801078010880109801108011180112801138011480115801168011780118801198012080121801228012380124801258012680127801288012980130801318013280133801348013580136801378013880139801408014180142801438014480145801468014780148801498015080151801528015380154801558015680157801588015980160801618016280163801648016580166801678016880169801708017180172801738017480175801768017780178801798018080181801828018380184801858018680187801888018980190801918019280193801948019580196801978019880199802008020180202802038020480205802068020780208802098021080211802128021380214802158021680217802188021980220802218022280223802248022580226802278022880229802308023180232802338023480235802368023780238802398024080241802428024380244802458024680247802488024980250802518025280253802548025580256802578025880259802608026180262802638026480265802668026780268802698027080271802728027380274802758027680277802788027980280802818028280283802848028580286802878028880289802908029180292802938029480295802968029780298802998030080301803028030380304803058030680307803088030980310803118031280313803148031580316803178031880319803208032180322803238032480325803268032780328803298033080331803328033380334803358033680337803388033980340803418034280343803448034580346803478034880349803508035180352803538035480355803568035780358803598036080361803628036380364803658036680367803688036980370803718037280373803748037580376803778037880379803808038180382803838038480385803868038780388803898039080391803928039380394803958039680397803988039980400804018040280403804048040580406804078040880409804108041180412804138041480415804168041780418804198042080421804228042380424804258042680427804288042980430804318043280433804348043580436804378043880439804408044180442804438044480445804468044780448804498045080451804528045380454804558045680457804588045980460804618046280463804648046580466804678046880469804708047180472804738047480475804768047780478804798048080481804828048380484804858048680487804888048980490804918049280493804948049580496804978049880499805008050180502805038050480505805068050780508805098051080511805128051380514805158051680517805188051980520805218052280523805248052580526805278052880529805308053180532805338053480535805368053780538805398054080541805428054380544805458054680547805488054980550805518055280553805548055580556805578055880559805608056180562805638056480565805668056780568805698057080571805728057380574805758057680577805788057980580805818058280583805848058580586805878058880589805908059180592805938059480595805968059780598805998060080601806028060380604806058060680607806088060980610806118061280613806148061580616806178061880619806208062180622806238062480625806268062780628806298063080631806328063380634806358063680637806388063980640806418064280643806448064580646806478064880649806508065180652806538065480655806568065780658806598066080661806628066380664806658066680667806688066980670806718067280673806748067580676806778067880679806808068180682806838068480685806868068780688806898069080691806928069380694806958069680697806988069980700807018070280703807048070580706807078070880709807108071180712807138071480715807168071780718807198072080721807228072380724807258072680727807288072980730807318073280733807348073580736807378073880739807408074180742807438074480745807468074780748807498075080751807528075380754807558075680757807588075980760807618076280763807648076580766807678076880769807708077180772807738077480775807768077780778807798078080781807828078380784807858078680787807888078980790807918079280793807948079580796807978079880799808008080180802808038080480805808068080780808808098081080811808128081380814808158081680817808188081980820808218082280823808248082580826808278082880829808308083180832808338083480835808368083780838808398084080841808428084380844808458084680847808488084980850808518085280853808548085580856808578085880859808608086180862808638086480865808668086780868808698087080871808728087380874808758087680877808788087980880808818088280883808848088580886808878088880889808908089180892808938089480895808968089780898808998090080901809028090380904809058090680907809088090980910809118091280913809148091580916809178091880919809208092180922809238092480925809268092780928809298093080931809328093380934809358093680937809388093980940809418094280943809448094580946809478094880949809508095180952809538095480955809568095780958809598096080961809628096380964809658096680967809688096980970809718097280973809748097580976809778097880979809808098180982809838098480985809868098780988809898099080991809928099380994809958099680997809988099981000810018100281003810048100581006810078100881009810108101181012810138101481015810168101781018810198102081021810228102381024810258102681027810288102981030810318103281033810348103581036810378103881039810408104181042810438104481045810468104781048810498105081051810528105381054810558105681057810588105981060810618106281063810648106581066810678106881069810708107181072810738107481075810768107781078810798108081081810828108381084810858108681087810888108981090810918109281093810948109581096810978109881099811008110181102811038110481105811068110781108811098111081111811128111381114811158111681117811188111981120811218112281123811248112581126811278112881129811308113181132811338113481135811368113781138811398114081141811428114381144811458114681147811488114981150811518115281153811548115581156811578115881159811608116181162811638116481165811668116781168811698117081171811728117381174811758117681177811788117981180811818118281183811848118581186811878118881189811908119181192811938119481195811968119781198811998120081201812028120381204812058120681207812088120981210812118121281213812148121581216812178121881219812208122181222812238122481225812268122781228812298123081231812328123381234812358123681237812388123981240812418124281243812448124581246812478124881249812508125181252812538125481255812568125781258812598126081261812628126381264812658126681267812688126981270812718127281273812748127581276812778127881279812808128181282812838128481285812868128781288812898129081291812928129381294812958129681297812988129981300813018130281303813048130581306813078130881309813108131181312813138131481315813168131781318813198132081321813228132381324813258132681327813288132981330813318133281333813348133581336813378133881339813408134181342813438134481345813468134781348813498135081351813528135381354813558135681357813588135981360813618136281363813648136581366813678136881369813708137181372813738137481375813768137781378813798138081381813828138381384813858138681387813888138981390813918139281393813948139581396813978139881399814008140181402814038140481405814068140781408814098141081411814128141381414814158141681417814188141981420814218142281423814248142581426814278142881429814308143181432814338143481435814368143781438814398144081441814428144381444814458144681447814488144981450814518145281453814548145581456814578145881459814608146181462814638146481465814668146781468814698147081471814728147381474814758147681477814788147981480814818148281483814848148581486814878148881489814908149181492814938149481495814968149781498814998150081501815028150381504815058150681507815088150981510815118151281513815148151581516815178151881519815208152181522815238152481525815268152781528815298153081531815328153381534815358153681537815388153981540815418154281543815448154581546815478154881549815508155181552815538155481555815568155781558815598156081561815628156381564815658156681567815688156981570815718157281573815748157581576815778157881579815808158181582815838158481585815868158781588815898159081591815928159381594815958159681597815988159981600816018160281603816048160581606816078160881609816108161181612816138161481615816168161781618816198162081621816228162381624816258162681627816288162981630816318163281633816348163581636816378163881639816408164181642816438164481645816468164781648816498165081651816528165381654816558165681657816588165981660816618166281663816648166581666816678166881669816708167181672816738167481675816768167781678816798168081681816828168381684816858168681687816888168981690816918169281693816948169581696816978169881699817008170181702817038170481705817068170781708817098171081711817128171381714817158171681717817188171981720817218172281723817248172581726817278172881729817308173181732817338173481735817368173781738817398174081741817428174381744817458174681747817488174981750817518175281753817548175581756817578175881759817608176181762817638176481765817668176781768817698177081771817728177381774817758177681777817788177981780817818178281783817848178581786817878178881789817908179181792817938179481795817968179781798817998180081801818028180381804818058180681807818088180981810818118181281813818148181581816818178181881819818208182181822818238182481825818268182781828818298183081831818328183381834818358183681837818388183981840818418184281843818448184581846818478184881849818508185181852818538185481855818568185781858818598186081861818628186381864818658186681867818688186981870818718187281873818748187581876818778187881879818808188181882818838188481885818868188781888818898189081891818928189381894818958189681897818988189981900819018190281903819048190581906819078190881909819108191181912819138191481915819168191781918819198192081921819228192381924819258192681927819288192981930819318193281933819348193581936819378193881939819408194181942819438194481945819468194781948819498195081951819528195381954819558195681957819588195981960819618196281963819648196581966819678196881969819708197181972819738197481975819768197781978819798198081981819828198381984819858198681987819888198981990819918199281993819948199581996819978199881999820008200182002820038200482005820068200782008820098201082011820128201382014820158201682017820188201982020820218202282023820248202582026820278202882029820308203182032820338203482035820368203782038820398204082041820428204382044820458204682047820488204982050820518205282053820548205582056820578205882059820608206182062820638206482065820668206782068820698207082071820728207382074820758207682077820788207982080820818208282083820848208582086820878208882089820908209182092820938209482095820968209782098820998210082101821028210382104821058210682107821088210982110821118211282113821148211582116821178211882119821208212182122821238212482125821268212782128821298213082131821328213382134821358213682137821388213982140821418214282143821448214582146821478214882149821508215182152821538215482155821568215782158821598216082161821628216382164821658216682167821688216982170821718217282173821748217582176821778217882179821808218182182821838218482185821868218782188821898219082191821928219382194821958219682197821988219982200822018220282203822048220582206822078220882209822108221182212822138221482215822168221782218822198222082221822228222382224822258222682227822288222982230822318223282233822348223582236822378223882239822408224182242822438224482245822468224782248822498225082251822528225382254822558225682257822588225982260822618226282263822648226582266822678226882269822708227182272822738227482275822768227782278822798228082281822828228382284822858228682287822888228982290822918229282293822948229582296822978229882299823008230182302823038230482305823068230782308823098231082311823128231382314823158231682317823188231982320823218232282323823248232582326823278232882329823308233182332823338233482335823368233782338823398234082341823428234382344823458234682347823488234982350823518235282353823548235582356823578235882359823608236182362823638236482365823668236782368823698237082371823728237382374823758237682377823788237982380823818238282383823848238582386823878238882389823908239182392823938239482395823968239782398823998240082401824028240382404824058240682407824088240982410824118241282413824148241582416824178241882419824208242182422824238242482425824268242782428824298243082431824328243382434824358243682437824388243982440824418244282443824448244582446824478244882449824508245182452824538245482455824568245782458824598246082461824628246382464824658246682467824688246982470824718247282473824748247582476824778247882479824808248182482824838248482485824868248782488824898249082491824928249382494824958249682497824988249982500825018250282503825048250582506825078250882509825108251182512825138251482515825168251782518825198252082521825228252382524825258252682527825288252982530825318253282533825348253582536825378253882539825408254182542825438254482545825468254782548825498255082551825528255382554825558255682557825588255982560825618256282563825648256582566825678256882569825708257182572825738257482575825768257782578825798258082581825828258382584825858258682587825888258982590825918259282593825948259582596825978259882599826008260182602826038260482605826068260782608826098261082611826128261382614826158261682617826188261982620826218262282623826248262582626826278262882629826308263182632826338263482635826368263782638826398264082641826428264382644826458264682647826488264982650826518265282653826548265582656826578265882659826608266182662826638266482665826668266782668826698267082671826728267382674826758267682677826788267982680826818268282683826848268582686826878268882689826908269182692826938269482695826968269782698826998270082701827028270382704827058270682707827088270982710827118271282713827148271582716827178271882719827208272182722827238272482725827268272782728827298273082731827328273382734827358273682737827388273982740827418274282743827448274582746827478274882749827508275182752827538275482755827568275782758827598276082761827628276382764827658276682767827688276982770827718277282773827748277582776827778277882779827808278182782827838278482785827868278782788827898279082791827928279382794827958279682797827988279982800828018280282803828048280582806828078280882809828108281182812828138281482815828168281782818828198282082821828228282382824828258282682827828288282982830828318283282833828348283582836828378283882839828408284182842828438284482845828468284782848828498285082851828528285382854828558285682857828588285982860828618286282863828648286582866828678286882869828708287182872828738287482875828768287782878828798288082881828828288382884828858288682887828888288982890828918289282893828948289582896828978289882899829008290182902829038290482905829068290782908829098291082911829128291382914829158291682917829188291982920829218292282923829248292582926829278292882929829308293182932829338293482935829368293782938829398294082941829428294382944829458294682947829488294982950829518295282953829548295582956829578295882959829608296182962829638296482965829668296782968829698297082971829728297382974829758297682977829788297982980829818298282983829848298582986829878298882989829908299182992829938299482995829968299782998829998300083001830028300383004830058300683007830088300983010830118301283013830148301583016830178301883019830208302183022830238302483025830268302783028830298303083031830328303383034830358303683037830388303983040830418304283043830448304583046830478304883049830508305183052830538305483055830568305783058830598306083061830628306383064830658306683067830688306983070830718307283073830748307583076830778307883079830808308183082830838308483085830868308783088830898309083091830928309383094830958309683097830988309983100831018310283103831048310583106831078310883109831108311183112831138311483115831168311783118831198312083121831228312383124831258312683127831288312983130831318313283133831348313583136831378313883139831408314183142831438314483145831468314783148831498315083151831528315383154831558315683157831588315983160831618316283163831648316583166831678316883169831708317183172831738317483175831768317783178831798318083181831828318383184831858318683187831888318983190831918319283193831948319583196831978319883199832008320183202832038320483205832068320783208832098321083211832128321383214832158321683217832188321983220832218322283223832248322583226832278322883229832308323183232832338323483235832368323783238832398324083241832428324383244832458324683247832488324983250832518325283253832548325583256832578325883259832608326183262832638326483265832668326783268832698327083271832728327383274832758327683277832788327983280832818328283283832848328583286832878328883289832908329183292832938329483295832968329783298832998330083301833028330383304833058330683307833088330983310833118331283313833148331583316833178331883319833208332183322833238332483325833268332783328833298333083331833328333383334833358333683337833388333983340833418334283343833448334583346833478334883349833508335183352833538335483355833568335783358833598336083361833628336383364833658336683367833688336983370833718337283373833748337583376833778337883379833808338183382833838338483385833868338783388833898339083391833928339383394833958339683397833988339983400834018340283403834048340583406834078340883409834108341183412834138341483415834168341783418834198342083421834228342383424834258342683427834288342983430834318343283433834348343583436834378343883439834408344183442834438344483445834468344783448834498345083451834528345383454834558345683457834588345983460834618346283463834648346583466834678346883469834708347183472834738347483475834768347783478834798348083481834828348383484834858348683487834888348983490834918349283493834948349583496834978349883499835008350183502835038350483505835068350783508835098351083511835128351383514835158351683517835188351983520835218352283523835248352583526835278352883529835308353183532835338353483535835368353783538835398354083541835428354383544835458354683547835488354983550835518355283553835548355583556835578355883559835608356183562835638356483565835668356783568835698357083571835728357383574835758357683577835788357983580835818358283583835848358583586835878358883589835908359183592835938359483595835968359783598835998360083601836028360383604836058360683607836088360983610836118361283613836148361583616836178361883619836208362183622836238362483625836268362783628836298363083631836328363383634836358363683637836388363983640836418364283643836448364583646836478364883649836508365183652836538365483655836568365783658836598366083661836628366383664836658366683667836688366983670836718367283673836748367583676836778367883679836808368183682836838368483685836868368783688836898369083691836928369383694836958369683697836988369983700837018370283703837048370583706837078370883709837108371183712837138371483715837168371783718837198372083721837228372383724837258372683727837288372983730837318373283733837348373583736837378373883739837408374183742837438374483745837468374783748837498375083751837528375383754837558375683757837588375983760837618376283763837648376583766837678376883769837708377183772837738377483775837768377783778837798378083781837828378383784837858378683787837888378983790837918379283793837948379583796837978379883799838008380183802838038380483805838068380783808838098381083811838128381383814838158381683817838188381983820838218382283823838248382583826838278382883829838308383183832838338383483835838368383783838838398384083841838428384383844838458384683847838488384983850838518385283853838548385583856838578385883859838608386183862838638386483865838668386783868838698387083871838728387383874838758387683877838788387983880838818388283883838848388583886838878388883889838908389183892838938389483895838968389783898838998390083901839028390383904839058390683907839088390983910839118391283913839148391583916839178391883919839208392183922839238392483925839268392783928839298393083931839328393383934839358393683937839388393983940839418394283943839448394583946839478394883949839508395183952839538395483955839568395783958839598396083961839628396383964839658396683967839688396983970839718397283973839748397583976839778397883979839808398183982839838398483985839868398783988839898399083991839928399383994839958399683997839988399984000840018400284003840048400584006840078400884009840108401184012840138401484015840168401784018840198402084021840228402384024840258402684027840288402984030840318403284033840348403584036840378403884039840408404184042840438404484045840468404784048840498405084051840528405384054840558405684057840588405984060840618406284063840648406584066840678406884069840708407184072840738407484075840768407784078840798408084081840828408384084840858408684087840888408984090840918409284093840948409584096840978409884099841008410184102841038410484105841068410784108841098411084111841128411384114841158411684117841188411984120841218412284123841248412584126841278412884129841308413184132841338413484135841368413784138841398414084141841428414384144841458414684147841488414984150841518415284153841548415584156841578415884159841608416184162841638416484165841668416784168841698417084171841728417384174841758417684177841788417984180841818418284183841848418584186841878418884189841908419184192841938419484195841968419784198841998420084201842028420384204842058420684207842088420984210842118421284213842148421584216842178421884219842208422184222842238422484225842268422784228842298423084231842328423384234842358423684237842388423984240842418424284243842448424584246842478424884249842508425184252842538425484255842568425784258842598426084261842628426384264842658426684267842688426984270842718427284273842748427584276842778427884279842808428184282842838428484285842868428784288842898429084291842928429384294842958429684297842988429984300843018430284303843048430584306843078430884309843108431184312843138431484315843168431784318843198432084321843228432384324843258432684327843288432984330843318433284333843348433584336843378433884339843408434184342843438434484345843468434784348843498435084351843528435384354843558435684357843588435984360843618436284363843648436584366843678436884369843708437184372843738437484375843768437784378843798438084381843828438384384843858438684387843888438984390843918439284393843948439584396843978439884399844008440184402844038440484405844068440784408844098441084411844128441384414844158441684417844188441984420844218442284423844248442584426844278442884429844308443184432844338443484435844368443784438844398444084441844428444384444844458444684447844488444984450844518445284453844548445584456844578445884459844608446184462844638446484465844668446784468844698447084471844728447384474844758447684477844788447984480844818448284483844848448584486844878448884489844908449184492844938449484495844968449784498844998450084501845028450384504845058450684507845088450984510845118451284513845148451584516845178451884519845208452184522845238452484525845268452784528845298453084531845328453384534845358453684537845388453984540845418454284543845448454584546845478454884549845508455184552845538455484555845568455784558845598456084561845628456384564845658456684567845688456984570845718457284573845748457584576845778457884579845808458184582845838458484585845868458784588845898459084591845928459384594845958459684597845988459984600846018460284603846048460584606846078460884609846108461184612846138461484615846168461784618846198462084621846228462384624846258462684627846288462984630846318463284633846348463584636846378463884639846408464184642846438464484645846468464784648846498465084651846528465384654846558465684657846588465984660846618466284663846648466584666846678466884669846708467184672846738467484675846768467784678846798468084681846828468384684846858468684687846888468984690846918469284693846948469584696846978469884699847008470184702847038470484705847068470784708847098471084711847128471384714847158471684717847188471984720847218472284723847248472584726847278472884729847308473184732847338473484735847368473784738847398474084741847428474384744847458474684747847488474984750847518475284753847548475584756847578475884759847608476184762847638476484765847668476784768847698477084771847728477384774847758477684777847788477984780847818478284783847848478584786847878478884789847908479184792847938479484795847968479784798847998480084801848028480384804848058480684807848088480984810848118481284813848148481584816848178481884819848208482184822848238482484825848268482784828848298483084831848328483384834848358483684837848388483984840848418484284843848448484584846848478484884849848508485184852848538485484855848568485784858848598486084861848628486384864848658486684867848688486984870848718487284873848748487584876848778487884879848808488184882848838488484885848868488784888848898489084891848928489384894848958489684897848988489984900849018490284903849048490584906849078490884909849108491184912849138491484915849168491784918849198492084921849228492384924849258492684927849288492984930849318493284933849348493584936849378493884939849408494184942849438494484945849468494784948849498495084951849528495384954849558495684957849588495984960849618496284963849648496584966849678496884969849708497184972849738497484975849768497784978849798498084981849828498384984849858498684987849888498984990849918499284993849948499584996849978499884999850008500185002850038500485005850068500785008850098501085011850128501385014850158501685017850188501985020850218502285023850248502585026850278502885029850308503185032850338503485035850368503785038850398504085041850428504385044850458504685047850488504985050850518505285053850548505585056850578505885059850608506185062850638506485065850668506785068850698507085071850728507385074850758507685077850788507985080850818508285083850848508585086850878508885089850908509185092850938509485095850968509785098850998510085101851028510385104851058510685107851088510985110851118511285113851148511585116851178511885119851208512185122851238512485125851268512785128851298513085131851328513385134851358513685137851388513985140851418514285143851448514585146851478514885149851508515185152851538515485155851568515785158851598516085161851628516385164851658516685167851688516985170851718517285173851748517585176851778517885179851808518185182851838518485185851868518785188851898519085191851928519385194851958519685197851988519985200852018520285203852048520585206852078520885209852108521185212852138521485215852168521785218852198522085221852228522385224852258522685227852288522985230852318523285233852348523585236852378523885239852408524185242852438524485245852468524785248852498525085251852528525385254852558525685257852588525985260852618526285263852648526585266852678526885269852708527185272852738527485275852768527785278852798528085281852828528385284852858528685287852888528985290852918529285293852948529585296852978529885299853008530185302853038530485305853068530785308853098531085311853128531385314853158531685317853188531985320853218532285323853248532585326853278532885329853308533185332853338533485335853368533785338853398534085341853428534385344853458534685347853488534985350853518535285353853548535585356853578535885359853608536185362853638536485365853668536785368853698537085371853728537385374853758537685377853788537985380853818538285383853848538585386853878538885389853908539185392853938539485395853968539785398853998540085401854028540385404854058540685407854088540985410854118541285413854148541585416854178541885419854208542185422854238542485425854268542785428854298543085431854328543385434854358543685437854388543985440854418544285443854448544585446854478544885449854508545185452854538545485455854568545785458854598546085461854628546385464854658546685467854688546985470854718547285473854748547585476854778547885479854808548185482854838548485485854868548785488854898549085491854928549385494854958549685497854988549985500855018550285503855048550585506855078550885509855108551185512855138551485515855168551785518855198552085521855228552385524855258552685527855288552985530855318553285533855348553585536855378553885539855408554185542855438554485545855468554785548855498555085551855528555385554855558555685557855588555985560855618556285563855648556585566855678556885569855708557185572855738557485575855768557785578855798558085581855828558385584855858558685587855888558985590855918559285593855948559585596855978559885599856008560185602856038560485605856068560785608856098561085611856128561385614856158561685617856188561985620856218562285623856248562585626856278562885629856308563185632856338563485635856368563785638856398564085641856428564385644856458564685647856488564985650856518565285653856548565585656856578565885659856608566185662856638566485665856668566785668856698567085671856728567385674856758567685677856788567985680856818568285683856848568585686856878568885689856908569185692856938569485695856968569785698856998570085701857028570385704857058570685707857088570985710857118571285713857148571585716857178571885719857208572185722857238572485725857268572785728857298573085731857328573385734857358573685737857388573985740857418574285743857448574585746857478574885749857508575185752857538575485755857568575785758857598576085761857628576385764857658576685767857688576985770857718577285773857748577585776857778577885779857808578185782857838578485785857868578785788857898579085791857928579385794857958579685797857988579985800858018580285803858048580585806858078580885809858108581185812858138581485815858168581785818858198582085821858228582385824858258582685827858288582985830858318583285833858348583585836858378583885839858408584185842858438584485845858468584785848858498585085851858528585385854858558585685857858588585985860858618586285863858648586585866858678586885869858708587185872858738587485875858768587785878858798588085881858828588385884858858588685887858888588985890858918589285893858948589585896858978589885899859008590185902859038590485905859068590785908859098591085911859128591385914859158591685917859188591985920859218592285923859248592585926859278592885929859308593185932859338593485935859368593785938859398594085941859428594385944859458594685947859488594985950859518595285953859548595585956859578595885959859608596185962859638596485965859668596785968859698597085971859728597385974859758597685977859788597985980859818598285983859848598585986859878598885989859908599185992859938599485995859968599785998859998600086001860028600386004860058600686007860088600986010860118601286013860148601586016860178601886019860208602186022860238602486025860268602786028860298603086031860328603386034860358603686037860388603986040860418604286043860448604586046860478604886049860508605186052860538605486055860568605786058860598606086061860628606386064860658606686067860688606986070860718607286073860748607586076860778607886079860808608186082860838608486085860868608786088860898609086091860928609386094860958609686097860988609986100861018610286103861048610586106861078610886109861108611186112861138611486115861168611786118861198612086121861228612386124861258612686127861288612986130861318613286133861348613586136861378613886139861408614186142861438614486145861468614786148861498615086151861528615386154861558615686157861588615986160861618616286163861648616586166861678616886169861708617186172861738617486175861768617786178861798618086181861828618386184861858618686187861888618986190861918619286193861948619586196861978619886199862008620186202862038620486205862068620786208862098621086211862128621386214862158621686217862188621986220862218622286223862248622586226862278622886229862308623186232862338623486235862368623786238862398624086241862428624386244862458624686247862488624986250862518625286253862548625586256862578625886259862608626186262862638626486265862668626786268862698627086271862728627386274862758627686277862788627986280862818628286283862848628586286862878628886289862908629186292862938629486295862968629786298862998630086301863028630386304863058630686307863088630986310863118631286313863148631586316863178631886319863208632186322863238632486325863268632786328863298633086331863328633386334863358633686337863388633986340863418634286343863448634586346863478634886349863508635186352863538635486355863568635786358863598636086361863628636386364863658636686367863688636986370863718637286373863748637586376863778637886379863808638186382863838638486385863868638786388863898639086391863928639386394863958639686397863988639986400864018640286403864048640586406864078640886409864108641186412864138641486415864168641786418864198642086421864228642386424864258642686427864288642986430864318643286433864348643586436864378643886439864408644186442864438644486445864468644786448864498645086451864528645386454864558645686457864588645986460864618646286463864648646586466864678646886469864708647186472864738647486475864768647786478864798648086481864828648386484864858648686487864888648986490864918649286493864948649586496864978649886499865008650186502865038650486505865068650786508865098651086511865128651386514865158651686517865188651986520865218652286523865248652586526865278652886529865308653186532865338653486535865368653786538865398654086541865428654386544865458654686547865488654986550865518655286553865548655586556865578655886559865608656186562865638656486565865668656786568865698657086571865728657386574865758657686577865788657986580865818658286583865848658586586865878658886589865908659186592865938659486595865968659786598865998660086601866028660386604866058660686607866088660986610866118661286613866148661586616866178661886619866208662186622866238662486625866268662786628866298663086631866328663386634866358663686637866388663986640866418664286643866448664586646866478664886649866508665186652866538665486655866568665786658866598666086661866628666386664866658666686667866688666986670866718667286673866748667586676866778667886679866808668186682866838668486685866868668786688866898669086691866928669386694866958669686697866988669986700867018670286703867048670586706867078670886709867108671186712867138671486715867168671786718867198672086721867228672386724867258672686727867288672986730867318673286733867348673586736867378673886739867408674186742867438674486745867468674786748867498675086751867528675386754867558675686757867588675986760867618676286763867648676586766867678676886769867708677186772867738677486775867768677786778867798678086781867828678386784867858678686787867888678986790867918679286793867948679586796867978679886799868008680186802868038680486805868068680786808868098681086811868128681386814868158681686817868188681986820868218682286823868248682586826868278682886829868308683186832868338683486835868368683786838868398684086841868428684386844868458684686847868488684986850868518685286853868548685586856868578685886859868608686186862868638686486865868668686786868868698687086871868728687386874868758687686877868788687986880868818688286883868848688586886868878688886889868908689186892868938689486895868968689786898868998690086901869028690386904869058690686907869088690986910869118691286913869148691586916869178691886919869208692186922869238692486925869268692786928869298693086931869328693386934869358693686937869388693986940869418694286943869448694586946869478694886949869508695186952869538695486955869568695786958869598696086961869628696386964869658696686967869688696986970869718697286973869748697586976869778697886979869808698186982869838698486985869868698786988869898699086991869928699386994869958699686997869988699987000870018700287003870048700587006870078700887009870108701187012870138701487015870168701787018870198702087021870228702387024870258702687027870288702987030870318703287033870348703587036870378703887039870408704187042870438704487045870468704787048870498705087051870528705387054870558705687057870588705987060870618706287063870648706587066870678706887069870708707187072870738707487075870768707787078870798708087081870828708387084870858708687087870888708987090870918709287093870948709587096870978709887099871008710187102871038710487105871068710787108871098711087111871128711387114871158711687117871188711987120871218712287123871248712587126871278712887129871308713187132871338713487135871368713787138871398714087141871428714387144871458714687147871488714987150871518715287153871548715587156871578715887159871608716187162871638716487165871668716787168871698717087171871728717387174871758717687177871788717987180871818718287183871848718587186871878718887189871908719187192871938719487195871968719787198871998720087201872028720387204872058720687207872088720987210872118721287213872148721587216872178721887219872208722187222872238722487225872268722787228872298723087231872328723387234872358723687237872388723987240872418724287243872448724587246872478724887249872508725187252872538725487255872568725787258872598726087261872628726387264872658726687267872688726987270872718727287273872748727587276872778727887279872808728187282872838728487285872868728787288872898729087291872928729387294872958729687297872988729987300873018730287303873048730587306873078730887309873108731187312873138731487315873168731787318873198732087321873228732387324873258732687327873288732987330873318733287333873348733587336873378733887339873408734187342873438734487345873468734787348873498735087351873528735387354873558735687357873588735987360873618736287363873648736587366873678736887369873708737187372873738737487375873768737787378873798738087381873828738387384873858738687387873888738987390873918739287393873948739587396873978739887399874008740187402874038740487405874068740787408874098741087411874128741387414874158741687417874188741987420874218742287423874248742587426874278742887429874308743187432874338743487435874368743787438874398744087441874428744387444874458744687447874488744987450874518745287453874548745587456874578745887459874608746187462874638746487465874668746787468874698747087471874728747387474874758747687477874788747987480874818748287483874848748587486874878748887489874908749187492874938749487495874968749787498874998750087501875028750387504875058750687507875088750987510875118751287513875148751587516875178751887519875208752187522875238752487525875268752787528875298753087531875328753387534875358753687537875388753987540875418754287543875448754587546875478754887549875508755187552875538755487555875568755787558875598756087561875628756387564875658756687567875688756987570875718757287573875748757587576875778757887579875808758187582875838758487585875868758787588875898759087591875928759387594875958759687597875988759987600876018760287603876048760587606876078760887609876108761187612876138761487615876168761787618876198762087621876228762387624876258762687627876288762987630876318763287633876348763587636876378763887639876408764187642876438764487645876468764787648876498765087651876528765387654876558765687657876588765987660876618766287663876648766587666876678766887669876708767187672876738767487675876768767787678876798768087681876828768387684876858768687687876888768987690876918769287693876948769587696876978769887699877008770187702877038770487705877068770787708877098771087711877128771387714877158771687717877188771987720877218772287723877248772587726877278772887729877308773187732877338773487735877368773787738877398774087741877428774387744877458774687747877488774987750877518775287753877548775587756877578775887759877608776187762877638776487765877668776787768877698777087771877728777387774877758777687777877788777987780877818778287783877848778587786877878778887789877908779187792877938779487795877968779787798877998780087801878028780387804878058780687807878088780987810878118781287813878148781587816878178781887819878208782187822878238782487825878268782787828878298783087831878328783387834878358783687837878388783987840878418784287843878448784587846878478784887849878508785187852878538785487855878568785787858878598786087861878628786387864878658786687867878688786987870878718787287873878748787587876878778787887879878808788187882878838788487885878868788787888878898789087891878928789387894878958789687897878988789987900879018790287903879048790587906879078790887909879108791187912879138791487915879168791787918879198792087921879228792387924879258792687927879288792987930879318793287933879348793587936879378793887939879408794187942879438794487945879468794787948879498795087951879528795387954879558795687957879588795987960879618796287963879648796587966879678796887969879708797187972879738797487975879768797787978879798798087981879828798387984879858798687987879888798987990879918799287993879948799587996879978799887999880008800188002880038800488005880068800788008880098801088011880128801388014880158801688017880188801988020880218802288023880248802588026880278802888029880308803188032880338803488035880368803788038880398804088041880428804388044880458804688047880488804988050880518805288053880548805588056880578805888059880608806188062880638806488065880668806788068880698807088071880728807388074880758807688077880788807988080880818808288083880848808588086880878808888089880908809188092880938809488095880968809788098880998810088101881028810388104881058810688107881088810988110881118811288113881148811588116881178811888119881208812188122881238812488125881268812788128881298813088131881328813388134881358813688137881388813988140881418814288143881448814588146881478814888149881508815188152881538815488155881568815788158881598816088161881628816388164881658816688167881688816988170881718817288173881748817588176881778817888179881808818188182881838818488185881868818788188881898819088191881928819388194881958819688197881988819988200882018820288203882048820588206882078820888209882108821188212882138821488215882168821788218882198822088221882228822388224882258822688227882288822988230882318823288233882348823588236882378823888239882408824188242882438824488245882468824788248882498825088251882528825388254882558825688257882588825988260882618826288263882648826588266882678826888269882708827188272882738827488275882768827788278882798828088281882828828388284882858828688287882888828988290882918829288293882948829588296882978829888299883008830188302883038830488305883068830788308883098831088311883128831388314883158831688317883188831988320883218832288323883248832588326883278832888329883308833188332883338833488335883368833788338883398834088341883428834388344883458834688347883488834988350883518835288353883548835588356883578835888359883608836188362883638836488365883668836788368883698837088371883728837388374883758837688377883788837988380883818838288383883848838588386883878838888389883908839188392883938839488395883968839788398883998840088401884028840388404884058840688407884088840988410884118841288413884148841588416884178841888419884208842188422884238842488425884268842788428884298843088431884328843388434884358843688437884388843988440884418844288443884448844588446884478844888449884508845188452884538845488455884568845788458884598846088461884628846388464884658846688467884688846988470884718847288473884748847588476884778847888479884808848188482884838848488485884868848788488884898849088491884928849388494884958849688497884988849988500885018850288503885048850588506885078850888509885108851188512885138851488515885168851788518885198852088521885228852388524885258852688527885288852988530885318853288533885348853588536885378853888539885408854188542885438854488545885468854788548885498855088551885528855388554885558855688557885588855988560885618856288563885648856588566885678856888569885708857188572885738857488575885768857788578885798858088581885828858388584885858858688587885888858988590885918859288593885948859588596885978859888599886008860188602886038860488605886068860788608886098861088611886128861388614886158861688617886188861988620886218862288623886248862588626886278862888629886308863188632886338863488635886368863788638886398864088641886428864388644886458864688647886488864988650886518865288653886548865588656886578865888659886608866188662886638866488665886668866788668886698867088671886728867388674886758867688677886788867988680886818868288683886848868588686886878868888689886908869188692886938869488695886968869788698886998870088701887028870388704887058870688707887088870988710887118871288713887148871588716887178871888719887208872188722887238872488725887268872788728887298873088731887328873388734887358873688737887388873988740887418874288743887448874588746887478874888749887508875188752887538875488755887568875788758887598876088761887628876388764887658876688767887688876988770887718877288773887748877588776887778877888779887808878188782887838878488785887868878788788887898879088791887928879388794887958879688797887988879988800888018880288803888048880588806888078880888809888108881188812888138881488815888168881788818888198882088821888228882388824888258882688827888288882988830888318883288833888348883588836888378883888839888408884188842888438884488845888468884788848888498885088851888528885388854888558885688857888588885988860888618886288863888648886588866888678886888869888708887188872888738887488875888768887788878888798888088881888828888388884888858888688887888888888988890888918889288893888948889588896888978889888899889008890188902889038890488905889068890788908889098891088911889128891388914889158891688917889188891988920889218892288923889248892588926889278892888929889308893188932889338893488935889368893788938889398894088941889428894388944889458894688947889488894988950889518895288953889548895588956889578895888959889608896188962889638896488965889668896788968889698897088971889728897388974889758897688977889788897988980889818898288983889848898588986889878898888989889908899188992889938899488995889968899788998889998900089001890028900389004890058900689007890088900989010890118901289013890148901589016890178901889019890208902189022890238902489025890268902789028890298903089031890328903389034890358903689037890388903989040890418904289043890448904589046890478904889049890508905189052890538905489055890568905789058890598906089061890628906389064890658906689067890688906989070890718907289073890748907589076890778907889079890808908189082890838908489085890868908789088890898909089091890928909389094890958909689097890988909989100891018910289103891048910589106891078910889109891108911189112891138911489115891168911789118891198912089121891228912389124891258912689127891288912989130891318913289133891348913589136891378913889139891408914189142891438914489145891468914789148891498915089151891528915389154891558915689157891588915989160891618916289163891648916589166891678916889169891708917189172891738917489175891768917789178891798918089181891828918389184891858918689187891888918989190891918919289193891948919589196891978919889199892008920189202892038920489205892068920789208892098921089211892128921389214892158921689217892188921989220892218922289223892248922589226892278922889229892308923189232892338923489235892368923789238892398924089241892428924389244892458924689247892488924989250892518925289253892548925589256892578925889259892608926189262892638926489265892668926789268892698927089271892728927389274892758927689277892788927989280892818928289283892848928589286892878928889289892908929189292892938929489295892968929789298892998930089301893028930389304893058930689307893088930989310893118931289313893148931589316893178931889319893208932189322893238932489325893268932789328893298933089331893328933389334893358933689337893388933989340893418934289343893448934589346893478934889349893508935189352893538935489355893568935789358893598936089361893628936389364893658936689367893688936989370893718937289373893748937589376893778937889379893808938189382893838938489385893868938789388893898939089391893928939389394893958939689397893988939989400894018940289403894048940589406894078940889409894108941189412894138941489415894168941789418894198942089421894228942389424894258942689427894288942989430894318943289433894348943589436894378943889439894408944189442894438944489445894468944789448894498945089451894528945389454894558945689457894588945989460894618946289463894648946589466894678946889469894708947189472894738947489475894768947789478894798948089481894828948389484894858948689487894888948989490894918949289493894948949589496894978949889499895008950189502895038950489505895068950789508895098951089511895128951389514895158951689517895188951989520895218952289523895248952589526895278952889529895308953189532895338953489535895368953789538895398954089541895428954389544895458954689547895488954989550895518955289553895548955589556895578955889559895608956189562895638956489565895668956789568895698957089571895728957389574895758957689577895788957989580895818958289583895848958589586895878958889589895908959189592895938959489595895968959789598895998960089601896028960389604896058960689607896088960989610896118961289613896148961589616896178961889619896208962189622896238962489625896268962789628896298963089631896328963389634896358963689637896388963989640896418964289643896448964589646896478964889649896508965189652896538965489655896568965789658896598966089661896628966389664896658966689667896688966989670896718967289673896748967589676896778967889679896808968189682896838968489685896868968789688896898969089691896928969389694896958969689697896988969989700897018970289703897048970589706897078970889709897108971189712897138971489715897168971789718897198972089721897228972389724897258972689727897288972989730897318973289733897348973589736897378973889739897408974189742897438974489745897468974789748897498975089751897528975389754897558975689757897588975989760897618976289763897648976589766897678976889769897708977189772897738977489775897768977789778897798978089781897828978389784897858978689787897888978989790897918979289793897948979589796897978979889799898008980189802898038980489805898068980789808898098981089811898128981389814898158981689817898188981989820898218982289823898248982589826898278982889829898308983189832898338983489835898368983789838898398984089841898428984389844898458984689847898488984989850898518985289853898548985589856898578985889859898608986189862898638986489865898668986789868898698987089871898728987389874898758987689877898788987989880898818988289883898848988589886898878988889889898908989189892898938989489895898968989789898898998990089901899028990389904899058990689907899088990989910899118991289913899148991589916899178991889919899208992189922899238992489925899268992789928899298993089931899328993389934899358993689937899388993989940899418994289943899448994589946899478994889949899508995189952899538995489955899568995789958899598996089961899628996389964899658996689967899688996989970899718997289973899748997589976899778997889979899808998189982899838998489985899868998789988899898999089991899928999389994899958999689997899988999990000900019000290003900049000590006900079000890009900109001190012900139001490015900169001790018900199002090021900229002390024900259002690027900289002990030900319003290033900349003590036900379003890039900409004190042900439004490045900469004790048900499005090051900529005390054900559005690057900589005990060900619006290063900649006590066900679006890069900709007190072900739007490075900769007790078900799008090081900829008390084900859008690087900889008990090900919009290093900949009590096900979009890099901009010190102901039010490105901069010790108901099011090111901129011390114901159011690117901189011990120901219012290123901249012590126901279012890129901309013190132901339013490135901369013790138901399014090141901429014390144901459014690147901489014990150901519015290153901549015590156901579015890159901609016190162901639016490165901669016790168901699017090171901729017390174901759017690177901789017990180901819018290183901849018590186901879018890189901909019190192901939019490195901969019790198901999020090201902029020390204902059020690207902089020990210902119021290213902149021590216902179021890219902209022190222902239022490225902269022790228902299023090231902329023390234902359023690237902389023990240902419024290243902449024590246902479024890249902509025190252902539025490255902569025790258902599026090261902629026390264902659026690267902689026990270902719027290273902749027590276902779027890279902809028190282902839028490285902869028790288902899029090291902929029390294902959029690297902989029990300903019030290303903049030590306903079030890309903109031190312903139031490315903169031790318903199032090321903229032390324903259032690327903289032990330903319033290333903349033590336903379033890339903409034190342903439034490345903469034790348903499035090351903529035390354903559035690357903589035990360903619036290363903649036590366903679036890369903709037190372903739037490375903769037790378903799038090381903829038390384903859038690387903889038990390903919039290393903949039590396903979039890399904009040190402904039040490405904069040790408904099041090411904129041390414904159041690417904189041990420904219042290423904249042590426904279042890429904309043190432904339043490435904369043790438904399044090441904429044390444904459044690447904489044990450904519045290453904549045590456904579045890459904609046190462904639046490465904669046790468904699047090471904729047390474904759047690477904789047990480904819048290483904849048590486904879048890489904909049190492904939049490495904969049790498904999050090501905029050390504905059050690507905089050990510905119051290513905149051590516905179051890519905209052190522905239052490525905269052790528905299053090531905329053390534905359053690537905389053990540905419054290543905449054590546905479054890549905509055190552905539055490555905569055790558905599056090561905629056390564905659056690567905689056990570905719057290573905749057590576905779057890579905809058190582905839058490585905869058790588905899059090591905929059390594905959059690597905989059990600906019060290603906049060590606906079060890609906109061190612906139061490615906169061790618906199062090621906229062390624906259062690627906289062990630906319063290633906349063590636906379063890639906409064190642906439064490645906469064790648906499065090651906529065390654906559065690657906589065990660906619066290663906649066590666906679066890669906709067190672906739067490675906769067790678906799068090681906829068390684906859068690687906889068990690906919069290693906949069590696906979069890699907009070190702907039070490705907069070790708907099071090711907129071390714907159071690717907189071990720907219072290723907249072590726907279072890729907309073190732907339073490735907369073790738907399074090741907429074390744907459074690747907489074990750907519075290753907549075590756907579075890759907609076190762907639076490765907669076790768907699077090771907729077390774907759077690777907789077990780907819078290783907849078590786907879078890789907909079190792907939079490795907969079790798907999080090801908029080390804908059080690807908089080990810908119081290813908149081590816908179081890819908209082190822908239082490825908269082790828908299083090831908329083390834908359083690837908389083990840908419084290843908449084590846908479084890849908509085190852908539085490855908569085790858908599086090861908629086390864908659086690867908689086990870908719087290873908749087590876908779087890879908809088190882908839088490885908869088790888908899089090891908929089390894908959089690897908989089990900909019090290903909049090590906909079090890909909109091190912909139091490915909169091790918909199092090921909229092390924909259092690927909289092990930909319093290933909349093590936909379093890939909409094190942909439094490945909469094790948909499095090951909529095390954909559095690957909589095990960909619096290963909649096590966909679096890969909709097190972909739097490975909769097790978909799098090981909829098390984909859098690987909889098990990909919099290993909949099590996909979099890999910009100191002910039100491005910069100791008910099101091011910129101391014910159101691017910189101991020910219102291023910249102591026910279102891029910309103191032910339103491035910369103791038910399104091041910429104391044910459104691047910489104991050910519105291053910549105591056910579105891059910609106191062910639106491065910669106791068910699107091071910729107391074910759107691077910789107991080910819108291083910849108591086910879108891089910909109191092910939109491095910969109791098910999110091101911029110391104911059110691107911089110991110911119111291113911149111591116911179111891119911209112191122911239112491125911269112791128911299113091131911329113391134911359113691137911389113991140911419114291143911449114591146911479114891149911509115191152911539115491155911569115791158911599116091161911629116391164911659116691167911689116991170911719117291173911749117591176911779117891179911809118191182911839118491185911869118791188911899119091191911929119391194911959119691197911989119991200912019120291203912049120591206912079120891209912109121191212912139121491215912169121791218912199122091221912229122391224912259122691227912289122991230912319123291233912349123591236912379123891239912409124191242912439124491245912469124791248912499125091251912529125391254912559125691257912589125991260912619126291263912649126591266912679126891269912709127191272912739127491275912769127791278912799128091281912829128391284912859128691287912889128991290912919129291293912949129591296912979129891299913009130191302913039130491305913069130791308913099131091311913129131391314913159131691317913189131991320913219132291323913249132591326913279132891329913309133191332913339133491335913369133791338913399134091341913429134391344913459134691347913489134991350913519135291353913549135591356913579135891359913609136191362913639136491365913669136791368913699137091371913729137391374913759137691377913789137991380913819138291383913849138591386913879138891389913909139191392913939139491395913969139791398913999140091401914029140391404914059140691407914089140991410914119141291413914149141591416914179141891419914209142191422914239142491425914269142791428914299143091431914329143391434914359143691437914389143991440914419144291443914449144591446914479144891449914509145191452914539145491455914569145791458914599146091461914629146391464914659146691467914689146991470914719147291473914749147591476914779147891479914809148191482914839148491485914869148791488914899149091491914929149391494914959149691497914989149991500915019150291503915049150591506915079150891509915109151191512915139151491515915169151791518915199152091521915229152391524915259152691527915289152991530915319153291533915349153591536915379153891539915409154191542915439154491545915469154791548915499155091551915529155391554915559155691557915589155991560915619156291563915649156591566915679156891569915709157191572915739157491575915769157791578915799158091581915829158391584915859158691587915889158991590915919159291593915949159591596915979159891599916009160191602916039160491605916069160791608916099161091611916129161391614916159161691617916189161991620916219162291623916249162591626916279162891629916309163191632916339163491635916369163791638916399164091641916429164391644916459164691647916489164991650916519165291653916549165591656916579165891659916609166191662916639166491665916669166791668916699167091671916729167391674916759167691677916789167991680916819168291683916849168591686916879168891689916909169191692916939169491695916969169791698916999170091701917029170391704917059170691707917089170991710917119171291713917149171591716917179171891719917209172191722917239172491725917269172791728917299173091731917329173391734917359173691737917389173991740917419174291743917449174591746917479174891749917509175191752917539175491755917569175791758917599176091761917629176391764917659176691767917689176991770917719177291773917749177591776917779177891779917809178191782917839178491785917869178791788917899179091791917929179391794917959179691797917989179991800918019180291803918049180591806918079180891809918109181191812918139181491815918169181791818918199182091821918229182391824918259182691827918289182991830918319183291833918349183591836918379183891839918409184191842918439184491845918469184791848918499185091851918529185391854918559185691857918589185991860918619186291863918649186591866918679186891869918709187191872918739187491875918769187791878918799188091881918829188391884918859188691887918889188991890918919189291893918949189591896918979189891899919009190191902919039190491905919069190791908919099191091911919129191391914919159191691917919189191991920919219192291923919249192591926919279192891929919309193191932919339193491935919369193791938919399194091941919429194391944919459194691947919489194991950919519195291953919549195591956919579195891959919609196191962919639196491965919669196791968919699197091971919729197391974919759197691977919789197991980919819198291983919849198591986919879198891989919909199191992919939199491995919969199791998919999200092001920029200392004920059200692007920089200992010920119201292013920149201592016920179201892019920209202192022920239202492025920269202792028920299203092031920329203392034920359203692037920389203992040920419204292043920449204592046920479204892049920509205192052920539205492055920569205792058920599206092061920629206392064920659206692067920689206992070920719207292073920749207592076920779207892079920809208192082920839208492085920869208792088920899209092091920929209392094920959209692097920989209992100921019210292103921049210592106921079210892109921109211192112921139211492115921169211792118921199212092121921229212392124921259212692127921289212992130921319213292133921349213592136921379213892139921409214192142921439214492145921469214792148921499215092151921529215392154921559215692157921589215992160921619216292163921649216592166921679216892169921709217192172921739217492175921769217792178921799218092181921829218392184921859218692187921889218992190921919219292193921949219592196921979219892199922009220192202922039220492205922069220792208922099221092211922129221392214922159221692217922189221992220922219222292223922249222592226922279222892229922309223192232922339223492235922369223792238922399224092241922429224392244922459224692247922489224992250922519225292253922549225592256922579225892259922609226192262922639226492265922669226792268922699227092271922729227392274922759227692277922789227992280922819228292283922849228592286922879228892289922909229192292922939229492295922969229792298922999230092301923029230392304923059230692307923089230992310923119231292313923149231592316923179231892319923209232192322923239232492325923269232792328923299233092331923329233392334923359233692337923389233992340923419234292343923449234592346923479234892349923509235192352923539235492355923569235792358923599236092361923629236392364923659236692367923689236992370923719237292373923749237592376923779237892379923809238192382923839238492385923869238792388923899239092391923929239392394923959239692397923989239992400924019240292403924049240592406924079240892409924109241192412924139241492415924169241792418924199242092421924229242392424924259242692427924289242992430924319243292433924349243592436924379243892439924409244192442924439244492445924469244792448924499245092451924529245392454924559245692457924589245992460924619246292463924649246592466924679246892469924709247192472924739247492475924769247792478924799248092481924829248392484924859248692487924889248992490924919249292493924949249592496924979249892499925009250192502925039250492505925069250792508925099251092511925129251392514925159251692517925189251992520925219252292523925249252592526925279252892529925309253192532925339253492535925369253792538925399254092541925429254392544925459254692547925489254992550925519255292553925549255592556925579255892559925609256192562925639256492565925669256792568925699257092571925729257392574925759257692577925789257992580925819258292583925849258592586925879258892589925909259192592925939259492595925969259792598925999260092601926029260392604926059260692607926089260992610926119261292613926149261592616926179261892619926209262192622926239262492625926269262792628926299263092631926329263392634926359263692637926389263992640926419264292643926449264592646926479264892649926509265192652926539265492655926569265792658926599266092661926629266392664926659266692667926689266992670926719267292673926749267592676926779267892679926809268192682926839268492685926869268792688926899269092691926929269392694926959269692697926989269992700927019270292703927049270592706927079270892709927109271192712927139271492715927169271792718927199272092721927229272392724927259272692727927289272992730927319273292733927349273592736927379273892739927409274192742927439274492745927469274792748927499275092751927529275392754927559275692757927589275992760927619276292763927649276592766927679276892769927709277192772927739277492775927769277792778927799278092781927829278392784927859278692787927889278992790927919279292793927949279592796927979279892799928009280192802928039280492805928069280792808928099281092811928129281392814928159281692817928189281992820928219282292823928249282592826928279282892829928309283192832928339283492835928369283792838928399284092841928429284392844928459284692847928489284992850928519285292853928549285592856928579285892859928609286192862928639286492865928669286792868928699287092871928729287392874928759287692877928789287992880928819288292883928849288592886928879288892889928909289192892928939289492895928969289792898928999290092901929029290392904929059290692907929089290992910929119291292913929149291592916929179291892919929209292192922929239292492925929269292792928929299293092931929329293392934929359293692937929389293992940929419294292943929449294592946929479294892949929509295192952929539295492955929569295792958929599296092961929629296392964929659296692967929689296992970929719297292973929749297592976929779297892979929809298192982929839298492985929869298792988929899299092991929929299392994929959299692997929989299993000930019300293003930049300593006930079300893009930109301193012930139301493015930169301793018930199302093021930229302393024930259302693027930289302993030930319303293033930349303593036930379303893039930409304193042930439304493045930469304793048930499305093051930529305393054930559305693057930589305993060930619306293063930649306593066930679306893069930709307193072930739307493075930769307793078930799308093081930829308393084930859308693087930889308993090930919309293093930949309593096930979309893099931009310193102931039310493105931069310793108931099311093111931129311393114931159311693117931189311993120931219312293123931249312593126931279312893129931309313193132931339313493135931369313793138931399314093141931429314393144931459314693147931489314993150931519315293153931549315593156931579315893159931609316193162931639316493165931669316793168931699317093171931729317393174931759317693177931789317993180931819318293183931849318593186931879318893189931909319193192931939319493195931969319793198931999320093201932029320393204932059320693207932089320993210932119321293213932149321593216932179321893219932209322193222932239322493225932269322793228932299323093231932329323393234932359323693237932389323993240932419324293243932449324593246932479324893249932509325193252932539325493255932569325793258932599326093261932629326393264932659326693267932689326993270932719327293273932749327593276932779327893279932809328193282932839328493285932869328793288932899329093291932929329393294932959329693297932989329993300933019330293303933049330593306933079330893309933109331193312933139331493315933169331793318933199332093321933229332393324933259332693327933289332993330933319333293333933349333593336933379333893339933409334193342933439334493345933469334793348933499335093351933529335393354933559335693357933589335993360933619336293363933649336593366933679336893369933709337193372933739337493375933769337793378933799338093381933829338393384933859338693387933889338993390933919339293393933949339593396933979339893399934009340193402934039340493405934069340793408934099341093411934129341393414934159341693417934189341993420934219342293423934249342593426934279342893429934309343193432934339343493435934369343793438934399344093441934429344393444934459344693447934489344993450934519345293453934549345593456934579345893459934609346193462934639346493465934669346793468934699347093471934729347393474934759347693477934789347993480934819348293483934849348593486934879348893489934909349193492934939349493495934969349793498934999350093501935029350393504935059350693507935089350993510935119351293513935149351593516935179351893519935209352193522935239352493525935269352793528935299353093531935329353393534935359353693537935389353993540935419354293543935449354593546935479354893549935509355193552935539355493555935569355793558935599356093561935629356393564935659356693567935689356993570935719357293573935749357593576935779357893579935809358193582935839358493585935869358793588935899359093591935929359393594935959359693597935989359993600936019360293603936049360593606936079360893609936109361193612936139361493615936169361793618936199362093621936229362393624936259362693627936289362993630936319363293633936349363593636936379363893639936409364193642936439364493645936469364793648936499365093651936529365393654936559365693657936589365993660936619366293663936649366593666936679366893669936709367193672936739367493675936769367793678936799368093681936829368393684936859368693687936889368993690936919369293693936949369593696936979369893699937009370193702937039370493705937069370793708937099371093711937129371393714937159371693717937189371993720937219372293723937249372593726937279372893729937309373193732937339373493735937369373793738937399374093741937429374393744937459374693747937489374993750937519375293753937549375593756937579375893759937609376193762937639376493765937669376793768937699377093771937729377393774937759377693777937789377993780937819378293783937849378593786937879378893789937909379193792937939379493795937969379793798937999380093801938029380393804938059380693807938089380993810938119381293813938149381593816938179381893819938209382193822938239382493825938269382793828938299383093831938329383393834938359383693837938389383993840938419384293843938449384593846938479384893849938509385193852938539385493855938569385793858938599386093861938629386393864938659386693867938689386993870938719387293873938749387593876938779387893879938809388193882938839388493885938869388793888938899389093891938929389393894938959389693897938989389993900939019390293903939049390593906939079390893909939109391193912939139391493915939169391793918939199392093921939229392393924939259392693927939289392993930939319393293933939349393593936939379393893939939409394193942939439394493945939469394793948939499395093951939529395393954939559395693957939589395993960939619396293963939649396593966939679396893969939709397193972939739397493975939769397793978939799398093981939829398393984939859398693987939889398993990939919399293993939949399593996939979399893999940009400194002940039400494005940069400794008940099401094011940129401394014940159401694017940189401994020940219402294023940249402594026940279402894029940309403194032940339403494035940369403794038940399404094041940429404394044940459404694047940489404994050940519405294053940549405594056940579405894059940609406194062940639406494065940669406794068940699407094071940729407394074940759407694077940789407994080940819408294083940849408594086940879408894089940909409194092940939409494095940969409794098940999410094101941029410394104941059410694107941089410994110941119411294113941149411594116941179411894119941209412194122941239412494125941269412794128941299413094131941329413394134941359413694137941389413994140941419414294143941449414594146941479414894149941509415194152941539415494155941569415794158941599416094161941629416394164941659416694167941689416994170941719417294173941749417594176941779417894179941809418194182941839418494185941869418794188941899419094191941929419394194941959419694197941989419994200942019420294203942049420594206942079420894209942109421194212942139421494215942169421794218942199422094221942229422394224942259422694227942289422994230942319423294233942349423594236942379423894239942409424194242942439424494245942469424794248942499425094251942529425394254942559425694257942589425994260942619426294263942649426594266942679426894269942709427194272942739427494275942769427794278942799428094281942829428394284942859428694287942889428994290942919429294293942949429594296942979429894299943009430194302943039430494305943069430794308943099431094311943129431394314943159431694317943189431994320943219432294323943249432594326943279432894329943309433194332943339433494335943369433794338943399434094341943429434394344943459434694347943489434994350943519435294353943549435594356943579435894359943609436194362943639436494365943669436794368943699437094371943729437394374943759437694377943789437994380943819438294383943849438594386943879438894389943909439194392943939439494395943969439794398943999440094401944029440394404944059440694407944089440994410944119441294413944149441594416944179441894419944209442194422944239442494425944269442794428944299443094431944329443394434944359443694437944389443994440944419444294443944449444594446944479444894449944509445194452944539445494455944569445794458944599446094461944629446394464944659446694467944689446994470944719447294473944749447594476944779447894479944809448194482944839448494485944869448794488944899449094491944929449394494944959449694497944989449994500945019450294503945049450594506945079450894509945109451194512945139451494515945169451794518945199452094521945229452394524945259452694527945289452994530945319453294533945349453594536945379453894539945409454194542945439454494545945469454794548945499455094551945529455394554945559455694557945589455994560945619456294563945649456594566945679456894569945709457194572945739457494575945769457794578945799458094581945829458394584945859458694587945889458994590945919459294593945949459594596945979459894599946009460194602946039460494605946069460794608946099461094611946129461394614946159461694617946189461994620946219462294623946249462594626946279462894629946309463194632946339463494635946369463794638946399464094641946429464394644946459464694647946489464994650946519465294653946549465594656946579465894659946609466194662946639466494665946669466794668946699467094671946729467394674946759467694677946789467994680946819468294683946849468594686946879468894689946909469194692946939469494695946969469794698946999470094701947029470394704947059470694707947089470994710947119471294713947149471594716947179471894719947209472194722947239472494725947269472794728947299473094731947329473394734947359473694737947389473994740947419474294743947449474594746947479474894749947509475194752947539475494755947569475794758947599476094761947629476394764947659476694767947689476994770947719477294773947749477594776947779477894779947809478194782947839478494785947869478794788947899479094791947929479394794947959479694797947989479994800948019480294803948049480594806948079480894809948109481194812948139481494815948169481794818948199482094821948229482394824948259482694827948289482994830948319483294833948349483594836948379483894839948409484194842948439484494845948469484794848948499485094851948529485394854948559485694857948589485994860948619486294863948649486594866948679486894869948709487194872948739487494875948769487794878948799488094881948829488394884948859488694887948889488994890948919489294893948949489594896948979489894899949009490194902949039490494905949069490794908949099491094911949129491394914949159491694917949189491994920949219492294923949249492594926949279492894929949309493194932949339493494935949369493794938949399494094941949429494394944949459494694947949489494994950949519495294953949549495594956949579495894959949609496194962949639496494965949669496794968949699497094971949729497394974949759497694977949789497994980949819498294983949849498594986949879498894989949909499194992949939499494995949969499794998949999500095001950029500395004950059500695007950089500995010950119501295013950149501595016950179501895019950209502195022950239502495025950269502795028950299503095031950329503395034950359503695037950389503995040950419504295043950449504595046950479504895049950509505195052950539505495055950569505795058950599506095061950629506395064950659506695067950689506995070950719507295073950749507595076950779507895079950809508195082950839508495085950869508795088950899509095091950929509395094950959509695097950989509995100951019510295103951049510595106951079510895109951109511195112951139511495115951169511795118951199512095121951229512395124951259512695127951289512995130951319513295133951349513595136951379513895139951409514195142951439514495145951469514795148951499515095151951529515395154951559515695157951589515995160951619516295163951649516595166951679516895169951709517195172951739517495175951769517795178951799518095181951829518395184951859518695187951889518995190951919519295193951949519595196951979519895199952009520195202952039520495205952069520795208952099521095211952129521395214952159521695217952189521995220952219522295223952249522595226952279522895229952309523195232952339523495235952369523795238952399524095241952429524395244952459524695247952489524995250952519525295253952549525595256952579525895259952609526195262952639526495265952669526795268952699527095271952729527395274952759527695277952789527995280952819528295283952849528595286952879528895289952909529195292952939529495295952969529795298952999530095301953029530395304953059530695307953089530995310953119531295313953149531595316953179531895319953209532195322953239532495325953269532795328953299533095331953329533395334953359533695337953389533995340953419534295343953449534595346953479534895349953509535195352953539535495355953569535795358953599536095361953629536395364953659536695367953689536995370953719537295373953749537595376953779537895379953809538195382953839538495385953869538795388953899539095391953929539395394953959539695397953989539995400954019540295403954049540595406954079540895409954109541195412954139541495415954169541795418954199542095421954229542395424954259542695427954289542995430954319543295433954349543595436954379543895439954409544195442954439544495445954469544795448954499545095451954529545395454954559545695457954589545995460954619546295463954649546595466954679546895469954709547195472954739547495475954769547795478954799548095481954829548395484954859548695487954889548995490954919549295493954949549595496954979549895499955009550195502955039550495505955069550795508955099551095511955129551395514955159551695517955189551995520955219552295523955249552595526955279552895529955309553195532955339553495535955369553795538955399554095541955429554395544955459554695547955489554995550955519555295553955549555595556955579555895559955609556195562955639556495565955669556795568955699557095571955729557395574955759557695577955789557995580955819558295583955849558595586955879558895589955909559195592955939559495595955969559795598955999560095601956029560395604956059560695607956089560995610956119561295613956149561595616956179561895619956209562195622956239562495625956269562795628956299563095631956329563395634956359563695637956389563995640956419564295643956449564595646956479564895649956509565195652956539565495655956569565795658956599566095661956629566395664956659566695667956689566995670956719567295673956749567595676956779567895679956809568195682956839568495685956869568795688956899569095691956929569395694956959569695697956989569995700957019570295703957049570595706957079570895709957109571195712957139571495715957169571795718957199572095721957229572395724957259572695727957289572995730957319573295733957349573595736957379573895739957409574195742957439574495745957469574795748957499575095751957529575395754957559575695757957589575995760957619576295763957649576595766957679576895769957709577195772957739577495775957769577795778957799578095781957829578395784957859578695787957889578995790957919579295793957949579595796957979579895799958009580195802958039580495805958069580795808958099581095811958129581395814958159581695817958189581995820958219582295823958249582595826958279582895829958309583195832958339583495835958369583795838958399584095841958429584395844958459584695847958489584995850958519585295853958549585595856958579585895859958609586195862958639586495865958669586795868958699587095871958729587395874958759587695877958789587995880958819588295883958849588595886958879588895889958909589195892958939589495895958969589795898958999590095901959029590395904959059590695907959089590995910959119591295913959149591595916959179591895919959209592195922959239592495925959269592795928959299593095931959329593395934959359593695937959389593995940959419594295943959449594595946959479594895949959509595195952959539595495955959569595795958959599596095961959629596395964959659596695967959689596995970959719597295973959749597595976959779597895979959809598195982959839598495985959869598795988959899599095991959929599395994959959599695997959989599996000960019600296003960049600596006960079600896009960109601196012960139601496015960169601796018960199602096021960229602396024960259602696027960289602996030960319603296033960349603596036960379603896039960409604196042960439604496045960469604796048960499605096051960529605396054960559605696057960589605996060960619606296063960649606596066960679606896069960709607196072960739607496075960769607796078960799608096081960829608396084960859608696087960889608996090960919609296093960949609596096960979609896099961009610196102961039610496105961069610796108961099611096111961129611396114961159611696117961189611996120961219612296123961249612596126961279612896129961309613196132961339613496135961369613796138961399614096141961429614396144961459614696147961489614996150961519615296153961549615596156961579615896159961609616196162961639616496165961669616796168961699617096171961729617396174961759617696177961789617996180961819618296183961849618596186961879618896189961909619196192961939619496195961969619796198961999620096201962029620396204962059620696207962089620996210962119621296213962149621596216962179621896219962209622196222962239622496225962269622796228962299623096231962329623396234962359623696237962389623996240962419624296243962449624596246962479624896249962509625196252962539625496255962569625796258962599626096261962629626396264962659626696267962689626996270962719627296273962749627596276962779627896279962809628196282962839628496285962869628796288962899629096291962929629396294962959629696297962989629996300963019630296303963049630596306963079630896309963109631196312963139631496315963169631796318963199632096321963229632396324963259632696327963289632996330963319633296333963349633596336963379633896339963409634196342963439634496345963469634796348963499635096351963529635396354963559635696357963589635996360963619636296363963649636596366963679636896369963709637196372963739637496375963769637796378963799638096381963829638396384963859638696387963889638996390963919639296393963949639596396963979639896399964009640196402964039640496405964069640796408964099641096411964129641396414964159641696417964189641996420964219642296423964249642596426964279642896429964309643196432964339643496435964369643796438964399644096441964429644396444964459644696447964489644996450964519645296453964549645596456964579645896459964609646196462964639646496465964669646796468964699647096471964729647396474964759647696477964789647996480964819648296483964849648596486964879648896489964909649196492964939649496495964969649796498964999650096501965029650396504965059650696507965089650996510965119651296513965149651596516965179651896519965209652196522965239652496525965269652796528965299653096531965329653396534965359653696537965389653996540965419654296543965449654596546965479654896549965509655196552965539655496555965569655796558965599656096561965629656396564965659656696567965689656996570965719657296573965749657596576965779657896579965809658196582965839658496585965869658796588965899659096591965929659396594965959659696597965989659996600966019660296603966049660596606966079660896609966109661196612966139661496615966169661796618966199662096621966229662396624966259662696627966289662996630966319663296633966349663596636966379663896639966409664196642966439664496645966469664796648966499665096651966529665396654966559665696657966589665996660966619666296663966649666596666966679666896669966709667196672966739667496675966769667796678966799668096681966829668396684966859668696687966889668996690966919669296693966949669596696966979669896699967009670196702967039670496705967069670796708967099671096711967129671396714967159671696717967189671996720967219672296723967249672596726967279672896729967309673196732967339673496735967369673796738967399674096741967429674396744967459674696747967489674996750967519675296753967549675596756967579675896759967609676196762967639676496765967669676796768967699677096771967729677396774967759677696777967789677996780967819678296783967849678596786967879678896789967909679196792967939679496795967969679796798967999680096801968029680396804968059680696807968089680996810968119681296813968149681596816968179681896819968209682196822968239682496825968269682796828968299683096831968329683396834968359683696837968389683996840968419684296843968449684596846968479684896849968509685196852968539685496855968569685796858968599686096861968629686396864968659686696867968689686996870968719687296873968749687596876968779687896879968809688196882968839688496885968869688796888968899689096891968929689396894968959689696897968989689996900969019690296903969049690596906969079690896909969109691196912969139691496915969169691796918969199692096921969229692396924969259692696927969289692996930969319693296933969349693596936969379693896939969409694196942969439694496945969469694796948969499695096951969529695396954969559695696957969589695996960969619696296963969649696596966969679696896969969709697196972969739697496975969769697796978969799698096981969829698396984969859698696987969889698996990969919699296993969949699596996969979699896999970009700197002970039700497005970069700797008970099701097011970129701397014970159701697017970189701997020970219702297023970249702597026970279702897029970309703197032970339703497035970369703797038970399704097041970429704397044970459704697047970489704997050970519705297053970549705597056970579705897059970609706197062970639706497065970669706797068970699707097071970729707397074970759707697077970789707997080970819708297083970849708597086970879708897089970909709197092970939709497095970969709797098970999710097101971029710397104971059710697107971089710997110971119711297113971149711597116971179711897119971209712197122971239712497125971269712797128971299713097131971329713397134971359713697137971389713997140971419714297143971449714597146971479714897149971509715197152971539715497155971569715797158971599716097161971629716397164971659716697167971689716997170971719717297173971749717597176971779717897179971809718197182971839718497185971869718797188971899719097191971929719397194971959719697197971989719997200972019720297203972049720597206972079720897209972109721197212972139721497215972169721797218972199722097221972229722397224972259722697227972289722997230972319723297233972349723597236972379723897239972409724197242972439724497245972469724797248972499725097251972529725397254972559725697257972589725997260972619726297263972649726597266972679726897269972709727197272972739727497275972769727797278972799728097281972829728397284972859728697287972889728997290972919729297293972949729597296972979729897299973009730197302973039730497305973069730797308973099731097311973129731397314973159731697317973189731997320973219732297323973249732597326973279732897329973309733197332973339733497335973369733797338973399734097341973429734397344973459734697347973489734997350973519735297353973549735597356973579735897359973609736197362973639736497365973669736797368973699737097371973729737397374973759737697377973789737997380973819738297383973849738597386973879738897389973909739197392973939739497395973969739797398973999740097401974029740397404974059740697407974089740997410974119741297413974149741597416974179741897419974209742197422974239742497425974269742797428974299743097431974329743397434974359743697437974389743997440974419744297443974449744597446974479744897449974509745197452974539745497455974569745797458974599746097461974629746397464974659746697467974689746997470974719747297473974749747597476974779747897479974809748197482974839748497485974869748797488974899749097491974929749397494974959749697497974989749997500975019750297503975049750597506975079750897509975109751197512975139751497515975169751797518975199752097521975229752397524975259752697527975289752997530975319753297533975349753597536975379753897539975409754197542975439754497545975469754797548975499755097551975529755397554975559755697557975589755997560975619756297563975649756597566975679756897569975709757197572975739757497575975769757797578975799758097581975829758397584975859758697587975889758997590975919759297593975949759597596975979759897599976009760197602976039760497605976069760797608976099761097611976129761397614976159761697617976189761997620976219762297623976249762597626976279762897629976309763197632976339763497635976369763797638976399764097641976429764397644976459764697647976489764997650976519765297653976549765597656976579765897659976609766197662976639766497665976669766797668976699767097671976729767397674976759767697677976789767997680976819768297683976849768597686976879768897689976909769197692976939769497695976969769797698976999770097701977029770397704977059770697707977089770997710977119771297713977149771597716977179771897719977209772197722977239772497725977269772797728977299773097731977329773397734977359773697737977389773997740977419774297743977449774597746977479774897749977509775197752977539775497755977569775797758977599776097761977629776397764977659776697767977689776997770977719777297773977749777597776977779777897779977809778197782977839778497785977869778797788977899779097791977929779397794977959779697797977989779997800978019780297803978049780597806978079780897809978109781197812978139781497815978169781797818978199782097821978229782397824978259782697827978289782997830978319783297833978349783597836978379783897839978409784197842978439784497845978469784797848978499785097851978529785397854978559785697857978589785997860978619786297863978649786597866978679786897869978709787197872978739787497875978769787797878978799788097881978829788397884978859788697887978889788997890978919789297893978949789597896978979789897899979009790197902979039790497905979069790797908979099791097911979129791397914979159791697917979189791997920979219792297923979249792597926979279792897929979309793197932979339793497935979369793797938979399794097941979429794397944979459794697947979489794997950979519795297953979549795597956979579795897959979609796197962979639796497965979669796797968979699797097971979729797397974979759797697977979789797997980979819798297983979849798597986979879798897989979909799197992979939799497995979969799797998979999800098001980029800398004980059800698007980089800998010980119801298013980149801598016980179801898019980209802198022980239802498025980269802798028980299803098031980329803398034980359803698037980389803998040980419804298043980449804598046980479804898049980509805198052980539805498055980569805798058980599806098061980629806398064980659806698067980689806998070980719807298073980749807598076980779807898079980809808198082980839808498085980869808798088980899809098091980929809398094980959809698097980989809998100981019810298103981049810598106981079810898109981109811198112981139811498115981169811798118981199812098121981229812398124981259812698127981289812998130981319813298133981349813598136981379813898139981409814198142981439814498145981469814798148981499815098151981529815398154981559815698157981589815998160981619816298163981649816598166981679816898169981709817198172981739817498175981769817798178981799818098181981829818398184981859818698187981889818998190981919819298193981949819598196981979819898199982009820198202982039820498205982069820798208982099821098211982129821398214982159821698217982189821998220982219822298223982249822598226982279822898229982309823198232982339823498235982369823798238982399824098241982429824398244982459824698247982489824998250982519825298253982549825598256982579825898259982609826198262982639826498265982669826798268982699827098271982729827398274982759827698277982789827998280982819828298283982849828598286982879828898289982909829198292982939829498295982969829798298982999830098301983029830398304983059830698307983089830998310983119831298313983149831598316983179831898319983209832198322983239832498325983269832798328983299833098331983329833398334983359833698337983389833998340983419834298343983449834598346983479834898349983509835198352983539835498355983569835798358983599836098361983629836398364983659836698367983689836998370983719837298373983749837598376983779837898379983809838198382983839838498385983869838798388983899839098391983929839398394983959839698397983989839998400984019840298403984049840598406984079840898409984109841198412984139841498415984169841798418984199842098421984229842398424984259842698427984289842998430984319843298433984349843598436984379843898439984409844198442984439844498445984469844798448984499845098451984529845398454984559845698457984589845998460984619846298463984649846598466984679846898469984709847198472984739847498475984769847798478984799848098481984829848398484984859848698487984889848998490984919849298493984949849598496984979849898499985009850198502985039850498505985069850798508985099851098511985129851398514985159851698517985189851998520985219852298523985249852598526985279852898529985309853198532985339853498535985369853798538985399854098541985429854398544985459854698547985489854998550985519855298553985549855598556985579855898559985609856198562985639856498565985669856798568985699857098571985729857398574985759857698577985789857998580985819858298583985849858598586985879858898589985909859198592985939859498595985969859798598985999860098601986029860398604986059860698607986089860998610986119861298613986149861598616986179861898619986209862198622986239862498625986269862798628986299863098631986329863398634986359863698637986389863998640986419864298643986449864598646986479864898649986509865198652986539865498655986569865798658986599866098661986629866398664986659866698667986689866998670986719867298673986749867598676986779867898679986809868198682986839868498685986869868798688986899869098691986929869398694986959869698697986989869998700987019870298703987049870598706987079870898709987109871198712987139871498715987169871798718987199872098721987229872398724987259872698727987289872998730987319873298733987349873598736987379873898739987409874198742987439874498745987469874798748987499875098751987529875398754987559875698757987589875998760987619876298763987649876598766987679876898769987709877198772987739877498775987769877798778987799878098781987829878398784987859878698787987889878998790987919879298793987949879598796987979879898799988009880198802988039880498805988069880798808988099881098811988129881398814988159881698817988189881998820988219882298823988249882598826988279882898829988309883198832988339883498835988369883798838988399884098841988429884398844988459884698847988489884998850988519885298853988549885598856988579885898859988609886198862988639886498865988669886798868988699887098871988729887398874988759887698877988789887998880988819888298883988849888598886988879888898889988909889198892988939889498895988969889798898988999890098901989029890398904989059890698907989089890998910989119891298913989149891598916989179891898919989209892198922989239892498925989269892798928989299893098931989329893398934989359893698937989389893998940989419894298943989449894598946989479894898949989509895198952989539895498955989569895798958989599896098961989629896398964989659896698967989689896998970989719897298973989749897598976989779897898979989809898198982989839898498985989869898798988989899899098991989929899398994989959899698997989989899999000990019900299003990049900599006990079900899009990109901199012990139901499015990169901799018990199902099021990229902399024990259902699027990289902999030990319903299033990349903599036990379903899039990409904199042990439904499045990469904799048990499905099051990529905399054990559905699057990589905999060990619906299063990649906599066990679906899069990709907199072990739907499075990769907799078990799908099081990829908399084990859908699087990889908999090990919909299093990949909599096990979909899099991009910199102991039910499105991069910799108991099911099111991129911399114991159911699117991189911999120991219912299123991249912599126991279912899129991309913199132991339913499135991369913799138991399914099141991429914399144991459914699147991489914999150991519915299153991549915599156991579915899159991609916199162991639916499165991669916799168991699917099171991729917399174991759917699177991789917999180991819918299183991849918599186991879918899189991909919199192991939919499195991969919799198991999920099201992029920399204992059920699207992089920999210992119921299213992149921599216992179921899219992209922199222992239922499225992269922799228992299923099231992329923399234992359923699237992389923999240992419924299243992449924599246992479924899249992509925199252992539925499255992569925799258992599926099261992629926399264992659926699267992689926999270992719927299273992749927599276992779927899279992809928199282992839928499285992869928799288992899929099291992929929399294992959929699297992989929999300993019930299303993049930599306993079930899309993109931199312993139931499315993169931799318993199932099321993229932399324993259932699327993289932999330993319933299333993349933599336993379933899339993409934199342993439934499345993469934799348993499935099351993529935399354993559935699357993589935999360993619936299363993649936599366993679936899369993709937199372993739937499375993769937799378993799938099381993829938399384993859938699387993889938999390993919939299393993949939599396993979939899399994009940199402994039940499405994069940799408994099941099411994129941399414994159941699417994189941999420994219942299423994249942599426994279942899429994309943199432994339943499435994369943799438994399944099441994429944399444994459944699447994489944999450994519945299453994549945599456994579945899459994609946199462994639946499465994669946799468994699947099471994729947399474994759947699477994789947999480994819948299483994849948599486994879948899489994909949199492994939949499495994969949799498994999950099501995029950399504995059950699507995089950999510995119951299513995149951599516995179951899519995209952199522995239952499525995269952799528995299953099531995329953399534995359953699537995389953999540995419954299543995449954599546995479954899549995509955199552995539955499555995569955799558995599956099561995629956399564995659956699567995689956999570995719957299573995749957599576995779957899579995809958199582995839958499585995869958799588995899959099591995929959399594995959959699597995989959999600996019960299603996049960599606996079960899609996109961199612996139961499615996169961799618996199962099621996229962399624996259962699627996289962999630996319963299633996349963599636996379963899639996409964199642996439964499645996469964799648996499965099651996529965399654996559965699657996589965999660996619966299663996649966599666996679966899669996709967199672996739967499675996769967799678996799968099681996829968399684996859968699687996889968999690996919969299693996949969599696996979969899699997009970199702997039970499705997069970799708997099971099711997129971399714997159971699717997189971999720997219972299723997249972599726997279972899729997309973199732997339973499735997369973799738997399974099741997429974399744997459974699747997489974999750997519975299753997549975599756997579975899759997609976199762997639976499765997669976799768997699977099771997729977399774997759977699777997789977999780997819978299783997849978599786997879978899789997909979199792997939979499795997969979799798997999980099801998029980399804998059980699807998089980999810998119981299813998149981599816998179981899819998209982199822998239982499825998269982799828998299983099831998329983399834998359983699837998389983999840998419984299843998449984599846998479984899849998509985199852998539985499855998569985799858998599986099861998629986399864998659986699867998689986999870998719987299873998749987599876998779987899879998809988199882998839988499885998869988799888998899989099891998929989399894998959989699897998989989999900999019990299903999049990599906999079990899909999109991199912999139991499915999169991799918999199992099921999229992399924999259992699927999289992999930999319993299933999349993599936999379993899939999409994199942999439994499945999469994799948999499995099951999529995399954999559995699957999589995999960999619996299963999649996599966999679996899969999709997199972999739997499975999769997799978999799998099981999829998399984999859998699987999889998999990999919999299993999949999599996999979999899999100000100001100002100003100004100005100006100007100008100009100010100011100012100013100014100015100016100017100018100019100020100021100022100023100024100025100026100027100028100029100030100031100032100033100034100035100036100037100038100039100040100041100042100043100044100045100046100047100048100049100050100051100052100053100054100055100056100057100058100059100060100061100062100063100064100065100066100067100068100069100070100071100072100073100074100075100076100077100078100079100080100081100082100083100084100085100086100087100088100089100090100091100092100093100094100095100096100097100098100099100100100101100102100103100104100105100106100107100108100109100110100111100112100113100114100115100116100117100118100119100120100121100122100123100124100125100126100127100128100129100130100131100132100133100134100135100136100137100138100139100140100141100142100143100144100145100146100147100148100149100150100151100152100153100154100155100156100157100158100159100160100161100162100163100164100165100166100167100168100169100170100171100172100173100174100175100176100177100178100179100180100181100182100183100184100185100186100187100188100189100190100191100192100193100194100195100196100197100198100199100200100201100202100203100204100205100206100207100208100209100210100211100212100213100214100215100216100217100218100219100220100221100222100223100224100225100226100227100228100229100230100231100232100233100234100235100236100237100238100239100240100241100242100243100244100245100246100247100248100249100250100251100252100253100254100255100256100257100258100259100260100261100262100263100264100265100266100267100268100269100270100271100272100273100274100275100276100277100278100279100280100281100282100283100284100285100286100287100288100289100290100291100292100293100294100295100296100297100298100299100300100301100302100303100304100305100306100307100308100309100310100311100312100313100314100315100316100317100318100319100320100321100322100323100324100325100326100327100328100329100330100331100332100333100334100335100336100337100338100339100340100341100342100343100344100345100346100347100348100349100350100351100352100353100354100355100356100357100358100359100360100361100362100363100364100365100366100367100368100369100370100371100372100373100374100375100376100377100378100379100380100381100382100383100384100385100386100387100388100389100390100391100392100393100394100395100396100397100398100399100400100401100402100403100404100405100406100407100408100409100410100411100412100413100414100415100416100417100418100419100420100421100422100423100424100425100426100427100428100429100430100431100432100433100434100435100436100437100438100439100440100441100442100443100444100445100446100447100448100449100450100451100452100453100454100455100456100457100458100459100460100461100462100463100464100465100466100467100468100469100470100471100472100473100474100475100476100477100478100479100480100481100482100483100484100485100486100487100488100489100490100491100492100493100494100495100496100497100498100499100500100501100502100503100504100505100506100507100508100509100510100511100512100513100514100515100516100517100518100519100520100521100522100523100524100525100526100527100528100529100530100531100532100533100534100535100536100537100538100539100540100541100542100543100544100545100546100547100548100549100550100551100552100553100554100555100556100557100558100559100560100561100562100563100564100565100566100567100568100569100570100571100572100573100574100575100576100577100578100579100580100581100582100583100584100585100586100587100588100589100590100591100592100593100594100595100596100597100598100599100600100601100602100603100604100605100606100607100608100609100610100611100612100613100614100615100616100617100618100619100620100621100622100623100624100625100626100627100628100629100630100631100632100633100634100635100636100637100638100639100640100641100642100643100644100645100646100647100648100649100650100651100652100653100654100655100656100657100658100659100660100661100662100663100664100665100666100667100668100669100670100671100672100673100674100675100676100677100678100679100680100681100682100683100684100685100686100687100688100689100690100691100692100693100694100695100696100697100698100699100700100701100702100703100704100705100706100707100708100709100710100711100712100713100714100715100716100717100718100719100720100721100722100723100724100725100726100727100728100729100730100731100732100733100734100735100736100737100738100739100740100741100742100743100744100745100746100747100748100749100750100751100752100753100754100755100756100757100758100759100760100761100762100763100764100765100766100767100768100769100770100771100772100773100774100775100776100777100778100779100780100781100782100783100784100785100786100787100788100789100790100791100792100793100794100795100796100797100798100799100800100801100802100803100804100805100806100807100808100809100810100811100812100813100814100815100816100817100818100819100820100821100822100823100824100825100826100827100828100829100830100831100832100833100834100835100836100837100838100839100840100841100842100843100844100845100846100847100848100849100850100851100852100853100854100855100856100857100858100859100860100861100862100863100864100865100866100867100868100869100870100871100872100873100874100875100876100877100878100879100880100881100882100883100884100885100886100887100888100889100890100891100892100893100894100895100896100897100898100899100900100901100902100903100904100905100906100907100908100909100910100911100912100913100914100915100916100917100918100919100920100921100922100923100924100925100926100927100928100929100930100931100932100933100934100935100936100937100938100939100940100941100942100943100944100945100946100947100948100949100950100951100952100953100954100955100956100957100958100959100960100961100962100963100964100965100966100967100968100969100970100971100972100973100974100975100976100977100978100979100980100981100982100983100984100985100986100987100988100989100990100991100992100993100994100995100996100997100998100999101000101001101002101003101004101005101006101007101008101009101010101011101012101013101014101015101016101017101018101019101020101021101022101023101024101025101026101027101028101029101030101031101032101033101034101035101036101037101038101039101040101041101042101043101044101045101046101047101048101049101050101051101052101053101054101055101056101057101058101059101060101061101062101063101064101065101066101067101068101069101070101071101072101073101074101075101076101077101078101079101080101081101082101083101084101085101086101087101088101089101090101091101092101093101094101095101096101097101098101099101100101101101102101103101104101105101106101107101108101109101110101111101112101113101114101115101116101117101118101119101120101121101122101123101124101125101126101127101128101129101130101131101132101133101134101135101136101137101138101139101140101141101142101143101144101145101146101147101148101149101150101151101152101153101154101155101156101157101158101159101160101161101162101163101164101165101166101167101168101169101170101171101172101173101174101175101176101177101178101179101180101181101182101183101184101185101186101187101188101189101190101191101192101193101194101195101196101197101198101199101200101201101202101203101204101205101206101207101208101209101210101211101212101213101214101215101216101217101218101219101220101221101222101223101224101225101226101227101228101229101230101231101232101233101234101235101236101237101238101239101240101241101242101243101244101245101246101247101248101249101250101251101252101253101254101255101256101257101258101259101260101261101262101263101264101265101266101267101268101269101270101271101272101273101274101275101276101277101278101279101280101281101282101283101284101285101286101287101288101289101290101291101292101293101294101295101296101297101298101299101300101301101302101303101304101305101306101307101308101309101310101311101312101313101314101315101316101317101318101319101320101321101322101323101324101325101326101327101328101329101330101331101332101333101334101335101336101337101338101339101340101341101342101343101344101345101346101347101348101349101350101351101352101353101354101355101356101357101358101359101360101361101362101363101364101365101366101367101368101369101370101371101372101373101374101375101376101377101378101379101380101381101382101383101384101385101386101387101388101389101390101391101392101393101394101395101396101397101398101399101400101401101402101403101404101405101406101407101408101409101410101411101412101413101414101415101416101417101418101419101420101421101422101423101424101425101426101427101428101429101430101431101432101433101434101435101436101437101438101439101440101441101442101443101444101445101446101447101448101449101450101451101452101453101454101455101456101457101458101459101460101461101462101463101464101465101466101467101468101469101470101471101472101473101474101475101476101477101478101479101480101481101482101483101484101485101486101487101488101489101490101491101492101493101494101495101496101497101498101499101500101501101502101503101504101505101506101507101508101509101510101511101512101513101514101515101516101517101518101519101520101521101522101523101524101525101526101527101528101529101530101531101532101533101534101535101536101537101538101539101540101541101542101543101544101545101546101547101548101549101550101551101552101553101554101555101556101557101558101559101560101561101562101563101564101565101566101567101568101569101570101571101572101573101574101575101576101577101578101579101580101581101582101583101584101585101586101587101588101589101590101591101592101593101594101595101596101597101598101599101600101601101602101603101604101605101606101607101608101609101610101611101612101613101614101615101616101617101618101619101620101621101622101623101624101625101626101627101628101629101630101631101632101633101634101635101636101637101638101639101640101641101642101643101644101645101646101647101648101649101650101651101652101653101654101655101656101657101658101659101660101661101662101663101664101665101666101667101668101669101670101671101672101673101674101675101676101677101678101679101680101681101682101683101684101685101686101687101688101689101690101691101692101693101694101695101696101697101698101699101700101701101702101703101704101705101706101707101708101709101710101711101712101713101714101715101716101717101718101719101720101721101722101723101724101725101726101727101728101729101730101731101732101733101734101735101736101737101738101739101740101741101742101743101744101745101746101747101748101749101750101751101752101753101754101755101756101757101758101759101760101761101762101763101764101765101766101767101768101769101770101771101772101773101774101775101776101777101778101779101780101781101782101783101784101785101786101787101788101789101790101791101792101793101794101795101796101797101798101799101800101801101802101803101804101805101806101807101808101809101810101811101812101813101814101815101816101817101818101819101820101821101822101823101824101825101826101827101828101829101830101831101832101833101834101835101836101837101838101839101840101841101842101843101844101845101846101847101848101849101850101851101852101853101854101855101856101857101858101859101860101861101862101863101864101865101866101867101868101869101870101871101872101873101874101875101876101877101878101879101880101881101882101883101884101885101886101887101888101889101890101891101892101893101894101895101896101897101898101899101900101901101902101903101904101905101906101907101908101909101910101911101912101913101914101915101916101917101918101919101920101921101922101923101924101925101926101927101928101929101930101931101932101933101934101935101936101937101938101939101940101941101942101943101944101945101946101947101948101949101950101951101952101953101954101955101956101957101958101959101960101961101962101963101964101965101966101967101968101969101970101971101972101973101974101975101976101977101978101979101980101981101982101983101984101985101986101987101988101989101990101991101992101993101994101995101996101997101998101999102000102001102002102003102004102005102006102007102008102009102010102011102012102013102014102015102016102017102018102019102020102021102022102023102024102025102026102027102028102029102030102031102032102033102034102035102036102037102038102039102040102041102042102043102044102045102046102047102048102049102050102051102052102053102054102055102056102057102058102059102060102061102062102063102064102065102066102067102068102069102070102071102072102073102074102075102076102077102078102079102080102081102082102083102084102085102086102087102088102089102090102091102092102093102094102095102096102097102098102099102100102101102102102103102104102105102106102107102108102109102110102111102112102113102114102115102116102117102118102119102120102121102122102123102124102125102126102127102128102129102130102131102132102133102134102135102136102137102138102139102140102141102142102143102144102145102146102147102148102149102150102151102152102153102154102155102156102157102158102159102160102161102162102163102164102165102166102167102168102169102170102171102172102173102174102175102176102177102178102179102180102181102182102183102184102185102186102187102188102189102190102191102192102193102194102195102196102197102198102199102200102201102202102203102204102205102206102207102208102209102210102211102212102213102214102215102216102217102218102219102220102221102222102223102224102225102226102227102228102229102230102231102232102233102234102235102236102237102238102239102240102241102242102243102244102245102246102247102248102249102250102251102252102253102254102255102256102257102258102259102260102261102262102263102264102265102266102267102268102269102270102271102272102273102274102275102276102277102278102279102280102281102282102283102284102285102286102287102288102289102290102291102292102293102294102295102296102297102298102299102300102301102302102303102304102305102306102307102308102309102310102311102312102313102314102315102316102317102318102319102320102321102322102323102324102325102326102327102328102329102330102331102332102333102334102335102336102337102338102339102340102341102342102343102344102345102346102347102348102349102350102351102352102353102354102355102356102357102358102359102360102361102362102363102364102365102366102367102368102369102370102371102372102373102374102375102376102377102378102379102380102381102382102383102384102385102386102387102388102389102390102391102392102393102394102395102396102397102398102399102400102401102402102403102404102405102406102407102408102409102410102411102412102413102414102415102416102417102418102419102420102421102422102423102424102425102426102427102428102429102430102431102432102433102434102435102436102437102438102439102440102441102442102443102444102445102446102447102448102449102450102451102452102453102454102455102456102457102458102459102460102461102462102463102464102465102466102467102468102469102470102471102472102473102474102475102476102477102478102479102480102481102482102483102484102485102486102487102488102489102490102491102492102493102494102495102496102497102498102499102500102501102502102503102504102505102506102507102508102509102510102511102512102513102514102515102516102517102518102519102520102521102522102523102524102525102526102527102528102529102530102531102532102533102534102535102536102537102538102539102540102541102542102543102544102545102546102547102548102549102550102551102552102553102554102555102556102557102558102559102560102561102562102563102564102565102566102567102568102569102570102571102572102573102574102575102576102577102578102579102580102581102582102583102584102585102586102587102588102589102590102591102592102593102594102595102596102597102598102599102600102601102602102603102604102605102606102607102608102609102610102611102612102613102614102615102616102617102618102619102620102621102622102623102624102625102626102627102628102629102630102631102632102633102634102635102636102637102638102639102640102641102642102643102644102645102646102647102648102649102650102651102652102653102654102655102656102657102658102659102660102661102662102663102664102665102666102667102668102669102670102671102672102673102674102675102676102677102678102679102680102681102682102683102684102685102686102687102688102689102690102691102692102693102694102695102696102697102698102699102700102701102702102703102704102705102706102707102708102709102710102711102712102713102714102715102716102717102718102719102720102721102722102723102724102725102726102727102728102729102730102731102732102733102734102735102736102737102738102739102740102741102742102743102744102745102746102747102748102749102750102751102752102753102754102755102756102757102758102759102760102761102762102763102764102765102766102767102768102769102770102771102772102773102774102775102776102777102778102779102780102781102782102783102784102785102786102787102788102789102790102791102792102793102794102795102796102797102798102799102800102801102802102803102804102805102806102807102808102809102810102811102812102813102814102815102816102817102818102819102820102821102822102823102824102825102826102827102828102829102830102831102832102833102834102835102836102837102838102839102840102841102842102843102844102845102846102847102848102849102850102851102852102853102854102855102856102857102858102859102860102861102862102863102864102865102866102867102868102869102870102871102872102873102874102875102876102877102878102879102880102881102882102883102884102885102886102887102888102889102890102891102892102893102894102895102896102897102898102899102900102901102902102903102904102905102906102907102908102909102910102911102912102913102914102915102916102917102918102919102920102921102922102923102924102925102926102927102928102929102930102931102932102933102934102935102936102937102938102939102940102941102942102943102944102945102946102947102948102949102950102951102952102953102954102955102956102957102958102959102960102961102962102963102964102965102966102967102968102969102970102971102972102973102974102975102976102977102978102979102980102981102982102983102984102985102986102987102988102989102990102991102992102993102994102995102996102997102998102999103000103001103002103003103004103005103006103007103008103009103010103011103012103013103014103015103016103017103018103019103020103021103022103023103024103025103026103027103028103029103030103031103032103033103034103035103036103037103038103039103040103041103042103043103044103045103046103047103048103049103050103051103052103053103054103055103056103057103058103059103060103061103062103063103064103065103066103067103068103069103070103071103072103073103074103075103076103077103078103079103080103081103082103083103084103085103086103087103088103089103090103091103092103093103094103095103096103097103098103099103100103101103102103103103104103105103106103107103108103109103110103111103112103113103114103115103116103117103118103119103120103121103122103123103124103125103126103127103128103129103130103131103132103133103134103135103136103137103138103139103140103141103142103143103144103145103146103147103148103149103150103151103152103153103154103155103156103157103158103159103160103161103162103163103164103165103166103167103168103169103170103171103172103173103174103175103176103177103178103179103180103181103182103183103184103185103186103187103188103189103190103191103192103193103194103195103196103197103198103199103200103201103202103203103204103205103206103207103208103209103210103211103212103213103214103215103216103217103218103219103220103221103222103223103224103225103226103227103228103229103230103231103232103233103234103235103236103237103238103239103240103241103242103243103244103245103246103247103248103249103250103251103252103253103254103255103256103257103258103259103260103261103262103263103264103265103266103267103268103269103270103271103272103273103274103275103276103277103278103279103280103281103282103283103284103285103286103287103288103289103290103291103292103293103294103295103296103297103298103299103300103301103302103303103304103305103306103307103308103309103310103311103312103313103314103315103316103317103318103319103320103321103322103323103324103325103326103327103328103329103330103331103332103333103334103335103336103337103338103339103340103341103342103343103344103345103346103347103348103349103350103351103352103353103354103355103356103357103358103359103360103361103362103363103364103365103366103367103368103369103370103371103372103373103374103375103376103377103378103379103380103381103382103383103384103385103386103387103388103389103390103391103392103393103394103395103396103397103398103399103400103401103402103403103404103405103406103407103408103409103410103411103412103413103414103415103416103417103418103419103420103421103422103423103424103425103426103427103428103429103430103431103432103433103434103435103436103437103438103439103440103441103442103443103444103445103446103447103448103449103450103451103452103453103454103455103456103457103458103459103460103461103462103463103464103465103466103467103468103469103470103471103472103473103474103475103476103477103478103479103480103481103482103483103484103485103486103487103488103489103490103491103492103493103494103495103496103497103498103499103500103501103502103503103504103505103506103507103508103509103510103511103512103513103514103515103516103517103518103519103520103521103522103523103524103525103526103527103528103529103530103531103532103533103534103535103536103537103538103539103540103541103542103543103544103545103546103547103548103549103550103551103552103553103554103555103556103557103558103559103560103561103562103563103564103565103566103567103568103569103570103571103572103573103574103575103576103577103578103579103580103581103582103583103584103585103586103587103588103589103590103591103592103593103594103595103596103597103598103599103600103601103602103603103604103605103606103607103608103609103610103611103612103613103614103615103616103617103618103619103620103621103622103623103624103625103626103627103628103629103630103631103632103633103634103635103636103637103638103639103640103641103642103643103644103645103646103647103648103649103650103651103652103653103654103655103656103657103658103659103660103661103662103663103664103665103666103667103668103669103670103671103672103673103674103675103676103677103678103679103680103681103682103683103684103685103686103687103688103689103690103691103692103693103694103695103696103697103698103699103700103701103702103703103704103705103706103707103708103709103710103711103712103713103714103715103716103717103718103719103720103721103722103723103724103725103726103727103728103729103730103731103732103733103734103735103736103737103738103739103740103741103742103743103744103745103746103747103748103749103750103751103752103753103754103755103756103757103758103759103760103761103762103763103764103765103766103767103768103769103770103771103772103773103774103775103776103777103778103779103780103781103782103783103784103785103786103787103788103789103790103791103792103793103794103795103796103797103798103799103800103801103802103803103804103805103806103807103808103809103810103811103812103813103814103815103816103817103818103819103820103821103822103823103824103825103826103827103828103829103830103831103832103833103834103835103836103837103838103839103840103841103842103843103844103845103846103847103848103849103850103851103852103853103854103855103856103857103858103859103860103861103862103863103864103865103866103867103868103869103870103871103872103873103874103875103876103877103878103879103880103881103882103883103884103885103886103887103888103889103890103891103892103893103894103895103896103897103898103899103900103901103902103903103904103905103906103907103908103909103910103911103912103913103914103915103916103917103918103919103920103921103922103923103924103925103926103927103928103929103930103931103932103933103934103935103936103937103938103939103940103941103942103943103944103945103946103947103948103949103950103951103952103953103954103955103956103957103958103959103960103961103962103963103964103965103966103967103968103969103970103971103972103973103974103975103976103977103978103979103980103981103982103983103984103985103986103987103988103989103990103991103992103993103994103995103996103997103998103999104000104001104002104003104004104005104006104007104008104009104010104011104012104013104014104015104016104017104018104019104020104021104022104023104024104025104026104027104028104029104030104031104032104033104034104035104036104037104038104039104040104041104042104043104044104045104046104047104048104049104050104051104052104053104054104055104056104057104058104059104060104061104062104063104064104065104066104067104068104069104070104071104072104073104074104075104076104077104078104079104080104081104082104083104084104085104086104087104088104089104090104091104092104093104094104095104096104097104098104099104100104101104102104103104104104105104106104107104108104109104110104111104112104113104114104115104116104117104118104119104120104121104122104123104124104125104126104127104128104129104130104131104132104133104134104135104136104137104138104139104140104141104142104143104144104145104146104147104148104149104150104151104152104153104154104155104156104157104158104159104160104161104162104163104164104165104166104167104168104169104170104171104172104173104174104175104176104177104178104179104180104181104182104183104184104185104186104187104188104189104190104191104192104193104194104195104196104197104198104199104200104201104202104203104204104205104206104207104208104209104210104211104212104213104214104215104216104217104218104219104220104221104222104223104224104225104226104227104228104229104230104231104232104233104234104235104236104237104238104239104240104241104242104243104244104245104246104247104248104249104250104251104252104253104254104255104256104257104258104259104260104261104262104263104264104265104266104267104268104269104270104271104272104273104274104275104276104277104278104279104280104281104282104283104284104285104286104287104288104289104290104291104292104293104294104295104296104297104298104299104300104301104302104303104304104305104306104307104308104309104310104311104312104313104314104315104316104317104318104319104320104321104322104323104324104325104326104327104328104329104330104331104332104333104334104335104336104337104338104339104340104341104342104343104344104345104346104347104348104349104350104351104352104353104354104355104356104357104358104359104360104361104362104363104364104365104366104367104368104369104370104371104372104373104374104375104376104377104378104379104380104381104382104383104384104385104386104387104388104389104390104391104392104393104394104395104396104397104398104399104400104401104402104403104404104405104406104407104408104409104410104411104412104413104414104415104416104417104418104419104420104421104422104423104424104425104426104427104428104429104430104431104432104433104434104435104436104437104438104439104440104441104442104443104444104445104446104447104448104449104450104451104452104453104454104455104456104457104458104459104460104461104462104463104464104465104466104467104468104469104470104471104472104473104474104475104476104477104478104479104480104481104482104483104484104485104486104487104488104489104490104491104492104493104494104495104496104497104498104499104500104501104502104503104504104505104506104507104508104509104510104511104512104513104514104515104516104517104518104519104520104521104522104523104524104525104526104527104528104529104530104531104532104533104534104535104536104537104538104539104540
  1. /******/ (function(modules) { // webpackBootstrap
  2. /******/ // The module cache
  3. /******/ var installedModules = {};
  4. /******/
  5. /******/ // The require function
  6. /******/ function __webpack_require__(moduleId) {
  7. /******/
  8. /******/ // Check if module is in cache
  9. /******/ if(installedModules[moduleId]) {
  10. /******/ return installedModules[moduleId].exports;
  11. /******/ }
  12. /******/ // Create a new module (and put it into the cache)
  13. /******/ var module = installedModules[moduleId] = {
  14. /******/ i: moduleId,
  15. /******/ l: false,
  16. /******/ exports: {}
  17. /******/ };
  18. /******/
  19. /******/ // Execute the module function
  20. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  21. /******/
  22. /******/ // Flag the module as loaded
  23. /******/ module.l = true;
  24. /******/
  25. /******/ // Return the exports of the module
  26. /******/ return module.exports;
  27. /******/ }
  28. /******/
  29. /******/
  30. /******/ // expose the modules object (__webpack_modules__)
  31. /******/ __webpack_require__.m = modules;
  32. /******/
  33. /******/ // expose the module cache
  34. /******/ __webpack_require__.c = installedModules;
  35. /******/
  36. /******/ // define getter function for harmony exports
  37. /******/ __webpack_require__.d = function(exports, name, getter) {
  38. /******/ if(!__webpack_require__.o(exports, name)) {
  39. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  40. /******/ }
  41. /******/ };
  42. /******/
  43. /******/ // define __esModule on exports
  44. /******/ __webpack_require__.r = function(exports) {
  45. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  46. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  47. /******/ }
  48. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  49. /******/ };
  50. /******/
  51. /******/ // create a fake namespace object
  52. /******/ // mode & 1: value is a module id, require it
  53. /******/ // mode & 2: merge all properties of value into the ns
  54. /******/ // mode & 4: return value when already ns object
  55. /******/ // mode & 8|1: behave like require
  56. /******/ __webpack_require__.t = function(value, mode) {
  57. /******/ if(mode & 1) value = __webpack_require__(value);
  58. /******/ if(mode & 8) return value;
  59. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  60. /******/ var ns = Object.create(null);
  61. /******/ __webpack_require__.r(ns);
  62. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  63. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  64. /******/ return ns;
  65. /******/ };
  66. /******/
  67. /******/ // getDefaultExport function for compatibility with non-harmony modules
  68. /******/ __webpack_require__.n = function(module) {
  69. /******/ var getter = module && module.__esModule ?
  70. /******/ function getDefault() { return module['default']; } :
  71. /******/ function getModuleExports() { return module; };
  72. /******/ __webpack_require__.d(getter, 'a', getter);
  73. /******/ return getter;
  74. /******/ };
  75. /******/
  76. /******/ // Object.prototype.hasOwnProperty.call
  77. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  78. /******/
  79. /******/ // __webpack_public_path__
  80. /******/ __webpack_require__.p = "";
  81. /******/
  82. /******/
  83. /******/ // Load entry module and return exports
  84. /******/ return __webpack_require__(__webpack_require__.s = "./src/converse.js");
  85. /******/ })
  86. /************************************************************************/
  87. /******/ ({
  88. /***/ "../strophejs/dist/strophe.js":
  89. /*!************************************!*\
  90. !*** ../strophejs/dist/strophe.js ***!
  91. \************************************/
  92. /*! no static exports found */
  93. /***/ (function(module, exports, __webpack_require__) {
  94. "use strict";
  95. (function webpackUniversalModuleDefinition(root, factory) {
  96. if (true) module.exports = factory();else {}
  97. })(window, function () {
  98. return (
  99. /******/
  100. function (modules) {
  101. // webpackBootstrap
  102. /******/
  103. // The module cache
  104. /******/
  105. var installedModules = {};
  106. /******/
  107. /******/
  108. // The require function
  109. /******/
  110. function __webpack_require__(moduleId) {
  111. /******/
  112. /******/
  113. // Check if module is in cache
  114. /******/
  115. if (installedModules[moduleId]) {
  116. /******/
  117. return installedModules[moduleId].exports;
  118. /******/
  119. }
  120. /******/
  121. // Create a new module (and put it into the cache)
  122. /******/
  123. var module = installedModules[moduleId] = {
  124. /******/
  125. i: moduleId,
  126. /******/
  127. l: false,
  128. /******/
  129. exports: {}
  130. /******/
  131. };
  132. /******/
  133. /******/
  134. // Execute the module function
  135. /******/
  136. modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  137. /******/
  138. /******/
  139. // Flag the module as loaded
  140. /******/
  141. module.l = true;
  142. /******/
  143. /******/
  144. // Return the exports of the module
  145. /******/
  146. return module.exports;
  147. /******/
  148. }
  149. /******/
  150. /******/
  151. /******/
  152. // expose the modules object (__webpack_modules__)
  153. /******/
  154. __webpack_require__.m = modules;
  155. /******/
  156. /******/
  157. // expose the module cache
  158. /******/
  159. __webpack_require__.c = installedModules;
  160. /******/
  161. /******/
  162. // define getter function for harmony exports
  163. /******/
  164. __webpack_require__.d = function (exports, name, getter) {
  165. /******/
  166. if (!__webpack_require__.o(exports, name)) {
  167. /******/
  168. Object.defineProperty(exports, name, {
  169. enumerable: true,
  170. get: getter
  171. });
  172. /******/
  173. }
  174. /******/
  175. };
  176. /******/
  177. /******/
  178. // define __esModule on exports
  179. /******/
  180. __webpack_require__.r = function (exports) {
  181. /******/
  182. if (typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  183. /******/
  184. Object.defineProperty(exports, Symbol.toStringTag, {
  185. value: 'Module'
  186. });
  187. /******/
  188. }
  189. /******/
  190. Object.defineProperty(exports, '__esModule', {
  191. value: true
  192. });
  193. /******/
  194. };
  195. /******/
  196. /******/
  197. // create a fake namespace object
  198. /******/
  199. // mode & 1: value is a module id, require it
  200. /******/
  201. // mode & 2: merge all properties of value into the ns
  202. /******/
  203. // mode & 4: return value when already ns object
  204. /******/
  205. // mode & 8|1: behave like require
  206. /******/
  207. __webpack_require__.t = function (value, mode) {
  208. /******/
  209. if (mode & 1) value = __webpack_require__(value);
  210. /******/
  211. if (mode & 8) return value;
  212. /******/
  213. if (mode & 4 && typeof value === 'object' && value && value.__esModule) return value;
  214. /******/
  215. var ns = Object.create(null);
  216. /******/
  217. __webpack_require__.r(ns);
  218. /******/
  219. Object.defineProperty(ns, 'default', {
  220. enumerable: true,
  221. value: value
  222. });
  223. /******/
  224. if (mode & 2 && typeof value != 'string') for (var key in value) __webpack_require__.d(ns, key, function (key) {
  225. return value[key];
  226. }.bind(null, key));
  227. /******/
  228. return ns;
  229. /******/
  230. };
  231. /******/
  232. /******/
  233. // getDefaultExport function for compatibility with non-harmony modules
  234. /******/
  235. __webpack_require__.n = function (module) {
  236. /******/
  237. var getter = module && module.__esModule ?
  238. /******/
  239. function getDefault() {
  240. return module['default'];
  241. } :
  242. /******/
  243. function getModuleExports() {
  244. return module;
  245. };
  246. /******/
  247. __webpack_require__.d(getter, 'a', getter);
  248. /******/
  249. return getter;
  250. /******/
  251. };
  252. /******/
  253. /******/
  254. // Object.prototype.hasOwnProperty.call
  255. /******/
  256. __webpack_require__.o = function (object, property) {
  257. return Object.prototype.hasOwnProperty.call(object, property);
  258. };
  259. /******/
  260. /******/
  261. // __webpack_public_path__
  262. /******/
  263. __webpack_require__.p = "";
  264. /******/
  265. /******/
  266. /******/
  267. // Load entry module and return exports
  268. /******/
  269. return __webpack_require__(__webpack_require__.s = "./src/strophe.js");
  270. /******/
  271. }(
  272. /************************************************************************/
  273. /******/
  274. {
  275. /***/
  276. "./src/bosh.js":
  277. /*!*********************!*\
  278. !*** ./src/bosh.js ***!
  279. \*********************/
  280. /*! no exports provided */
  281. /***/
  282. function srcBoshJs(module, __webpack_exports__, __webpack_require__) {
  283. "use strict";
  284. __webpack_require__.r(__webpack_exports__);
  285. /* harmony import */
  286. var core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
  287. /*! core */
  288. "./src/core.js");
  289. /*
  290. This program is distributed under the terms of the MIT license.
  291. Please see the LICENSE file for details.
  292. Copyright 2006-2008, OGG, LLC
  293. */
  294. /* global window, setTimeout, clearTimeout, XMLHttpRequest, ActiveXObject */
  295. var Strophe = core__WEBPACK_IMPORTED_MODULE_0__["default"].Strophe;
  296. var $build = core__WEBPACK_IMPORTED_MODULE_0__["default"].$build;
  297. /** PrivateClass: Strophe.Request
  298. * _Private_ helper class that provides a cross implementation abstraction
  299. * for a BOSH related XMLHttpRequest.
  300. *
  301. * The Strophe.Request class is used internally to encapsulate BOSH request
  302. * information. It is not meant to be used from user's code.
  303. */
  304. /** PrivateConstructor: Strophe.Request
  305. * Create and initialize a new Strophe.Request object.
  306. *
  307. * Parameters:
  308. * (XMLElement) elem - The XML data to be sent in the request.
  309. * (Function) func - The function that will be called when the
  310. * XMLHttpRequest readyState changes.
  311. * (Integer) rid - The BOSH rid attribute associated with this request.
  312. * (Integer) sends - The number of times this same request has been sent.
  313. */
  314. Strophe.Request = function (elem, func, rid, sends) {
  315. this.id = ++Strophe._requestId;
  316. this.xmlData = elem;
  317. this.data = Strophe.serialize(elem); // save original function in case we need to make a new request
  318. // from this one.
  319. this.origFunc = func;
  320. this.func = func;
  321. this.rid = rid;
  322. this.date = NaN;
  323. this.sends = sends || 0;
  324. this.abort = false;
  325. this.dead = null;
  326. this.age = function () {
  327. if (!this.date) {
  328. return 0;
  329. }
  330. var now = new Date();
  331. return (now - this.date) / 1000;
  332. };
  333. this.timeDead = function () {
  334. if (!this.dead) {
  335. return 0;
  336. }
  337. var now = new Date();
  338. return (now - this.dead) / 1000;
  339. };
  340. this.xhr = this._newXHR();
  341. };
  342. Strophe.Request.prototype = {
  343. /** PrivateFunction: getResponse
  344. * Get a response from the underlying XMLHttpRequest.
  345. *
  346. * This function attempts to get a response from the request and checks
  347. * for errors.
  348. *
  349. * Throws:
  350. * "parsererror" - A parser error occured.
  351. * "bad-format" - The entity has sent XML that cannot be processed.
  352. *
  353. * Returns:
  354. * The DOM element tree of the response.
  355. */
  356. getResponse: function getResponse() {
  357. var node = null;
  358. if (this.xhr.responseXML && this.xhr.responseXML.documentElement) {
  359. node = this.xhr.responseXML.documentElement;
  360. if (node.tagName === "parsererror") {
  361. Strophe.error("invalid response received");
  362. Strophe.error("responseText: " + this.xhr.responseText);
  363. Strophe.error("responseXML: " + Strophe.serialize(this.xhr.responseXML));
  364. throw new Error("parsererror");
  365. }
  366. } else if (this.xhr.responseText) {
  367. // In React Native, we may get responseText but no responseXML. We can try to parse it manually.
  368. Strophe.debug("Got responseText but no responseXML; attempting to parse it with DOMParser...");
  369. node = new DOMParser().parseFromString(this.xhr.responseText, 'application/xml').documentElement;
  370. if (!node) {
  371. throw new Error('Parsing produced null node');
  372. } else if (node.querySelector('parsererror')) {
  373. Strophe.error("invalid response received: " + node.querySelector('parsererror').textContent);
  374. Strophe.error("responseText: " + this.xhr.responseText);
  375. var error = new Error();
  376. error.name = Strophe.ErrorCondition.BAD_FORMAT;
  377. throw error;
  378. }
  379. }
  380. return node;
  381. },
  382. /** PrivateFunction: _newXHR
  383. * _Private_ helper function to create XMLHttpRequests.
  384. *
  385. * This function creates XMLHttpRequests across all implementations.
  386. *
  387. * Returns:
  388. * A new XMLHttpRequest.
  389. */
  390. _newXHR: function _newXHR() {
  391. var xhr = null;
  392. if (window.XMLHttpRequest) {
  393. xhr = new XMLHttpRequest();
  394. if (xhr.overrideMimeType) {
  395. xhr.overrideMimeType("text/xml; charset=utf-8");
  396. }
  397. } else if (window.ActiveXObject) {
  398. xhr = new ActiveXObject("Microsoft.XMLHTTP");
  399. } // use Function.bind() to prepend ourselves as an argument
  400. xhr.onreadystatechange = this.func.bind(null, this);
  401. return xhr;
  402. }
  403. };
  404. /** Class: Strophe.Bosh
  405. * _Private_ helper class that handles BOSH Connections
  406. *
  407. * The Strophe.Bosh class is used internally by Strophe.Connection
  408. * to encapsulate BOSH sessions. It is not meant to be used from user's code.
  409. */
  410. /** File: bosh.js
  411. * A JavaScript library to enable BOSH in Strophejs.
  412. *
  413. * this library uses Bidirectional-streams Over Synchronous HTTP (BOSH)
  414. * to emulate a persistent, stateful, two-way connection to an XMPP server.
  415. * More information on BOSH can be found in XEP 124.
  416. */
  417. /** PrivateConstructor: Strophe.Bosh
  418. * Create and initialize a Strophe.Bosh object.
  419. *
  420. * Parameters:
  421. * (Strophe.Connection) connection - The Strophe.Connection that will use BOSH.
  422. *
  423. * Returns:
  424. * A new Strophe.Bosh object.
  425. */
  426. Strophe.Bosh = function (connection) {
  427. this._conn = connection;
  428. /* request id for body tags */
  429. this.rid = Math.floor(Math.random() * 4294967295);
  430. /* The current session ID. */
  431. this.sid = null; // default BOSH values
  432. this.hold = 1;
  433. this.wait = 60;
  434. this.window = 5;
  435. this.errors = 0;
  436. this.inactivity = null;
  437. this.lastResponseHeaders = null;
  438. this._requests = [];
  439. };
  440. Strophe.Bosh.prototype = {
  441. /** Variable: strip
  442. *
  443. * BOSH-Connections will have all stanzas wrapped in a <body> tag when
  444. * passed to <Strophe.Connection.xmlInput> or <Strophe.Connection.xmlOutput>.
  445. * To strip this tag, User code can set <Strophe.Bosh.strip> to "body":
  446. *
  447. * > Strophe.Bosh.prototype.strip = "body";
  448. *
  449. * This will enable stripping of the body tag in both
  450. * <Strophe.Connection.xmlInput> and <Strophe.Connection.xmlOutput>.
  451. */
  452. strip: null,
  453. /** PrivateFunction: _buildBody
  454. * _Private_ helper function to generate the <body/> wrapper for BOSH.
  455. *
  456. * Returns:
  457. * A Strophe.Builder with a <body/> element.
  458. */
  459. _buildBody: function _buildBody() {
  460. var bodyWrap = $build('body', {
  461. 'rid': this.rid++,
  462. 'xmlns': Strophe.NS.HTTPBIND
  463. });
  464. if (this.sid !== null) {
  465. bodyWrap.attrs({
  466. 'sid': this.sid
  467. });
  468. }
  469. if (this._conn.options.keepalive && this._conn._sessionCachingSupported()) {
  470. this._cacheSession();
  471. }
  472. return bodyWrap;
  473. },
  474. /** PrivateFunction: _reset
  475. * Reset the connection.
  476. *
  477. * This function is called by the reset function of the Strophe Connection
  478. */
  479. _reset: function _reset() {
  480. this.rid = Math.floor(Math.random() * 4294967295);
  481. this.sid = null;
  482. this.errors = 0;
  483. if (this._conn._sessionCachingSupported()) {
  484. window.sessionStorage.removeItem('strophe-bosh-session');
  485. }
  486. this._conn.nextValidRid(this.rid);
  487. },
  488. /** PrivateFunction: _connect
  489. * _Private_ function that initializes the BOSH connection.
  490. *
  491. * Creates and sends the Request that initializes the BOSH connection.
  492. */
  493. _connect: function _connect(wait, hold, route) {
  494. this.wait = wait || this.wait;
  495. this.hold = hold || this.hold;
  496. this.errors = 0;
  497. var body = this._buildBody().attrs({
  498. "to": this._conn.domain,
  499. "xml:lang": "en",
  500. "wait": this.wait,
  501. "hold": this.hold,
  502. "content": "text/xml; charset=utf-8",
  503. "ver": "1.6",
  504. "xmpp:version": "1.0",
  505. "xmlns:xmpp": Strophe.NS.BOSH
  506. });
  507. if (route) {
  508. body.attrs({
  509. 'route': route
  510. });
  511. }
  512. var _connect_cb = this._conn._connect_cb;
  513. this._requests.push(new Strophe.Request(body.tree(), this._onRequestStateChange.bind(this, _connect_cb.bind(this._conn)), body.tree().getAttribute("rid")));
  514. this._throttledRequestHandler();
  515. },
  516. /** PrivateFunction: _attach
  517. * Attach to an already created and authenticated BOSH session.
  518. *
  519. * This function is provided to allow Strophe to attach to BOSH
  520. * sessions which have been created externally, perhaps by a Web
  521. * application. This is often used to support auto-login type features
  522. * without putting user credentials into the page.
  523. *
  524. * Parameters:
  525. * (String) jid - The full JID that is bound by the session.
  526. * (String) sid - The SID of the BOSH session.
  527. * (String) rid - The current RID of the BOSH session. This RID
  528. * will be used by the next request.
  529. * (Function) callback The connect callback function.
  530. * (Integer) wait - The optional HTTPBIND wait value. This is the
  531. * time the server will wait before returning an empty result for
  532. * a request. The default setting of 60 seconds is recommended.
  533. * Other settings will require tweaks to the Strophe.TIMEOUT value.
  534. * (Integer) hold - The optional HTTPBIND hold value. This is the
  535. * number of connections the server will hold at one time. This
  536. * should almost always be set to 1 (the default).
  537. * (Integer) wind - The optional HTTBIND window value. This is the
  538. * allowed range of request ids that are valid. The default is 5.
  539. */
  540. _attach: function _attach(jid, sid, rid, callback, wait, hold, wind) {
  541. this._conn.jid = jid;
  542. this.sid = sid;
  543. this.rid = rid;
  544. this._conn.connect_callback = callback;
  545. this._conn.domain = Strophe.getDomainFromJid(this._conn.jid);
  546. this._conn.authenticated = true;
  547. this._conn.connected = true;
  548. this.wait = wait || this.wait;
  549. this.hold = hold || this.hold;
  550. this.window = wind || this.window;
  551. this._conn._changeConnectStatus(Strophe.Status.ATTACHED, null);
  552. },
  553. /** PrivateFunction: _restore
  554. * Attempt to restore a cached BOSH session
  555. *
  556. * Parameters:
  557. * (String) jid - The full JID that is bound by the session.
  558. * This parameter is optional but recommended, specifically in cases
  559. * where prebinded BOSH sessions are used where it's important to know
  560. * that the right session is being restored.
  561. * (Function) callback The connect callback function.
  562. * (Integer) wait - The optional HTTPBIND wait value. This is the
  563. * time the server will wait before returning an empty result for
  564. * a request. The default setting of 60 seconds is recommended.
  565. * Other settings will require tweaks to the Strophe.TIMEOUT value.
  566. * (Integer) hold - The optional HTTPBIND hold value. This is the
  567. * number of connections the server will hold at one time. This
  568. * should almost always be set to 1 (the default).
  569. * (Integer) wind - The optional HTTBIND window value. This is the
  570. * allowed range of request ids that are valid. The default is 5.
  571. */
  572. _restore: function _restore(jid, callback, wait, hold, wind) {
  573. var session = JSON.parse(window.sessionStorage.getItem('strophe-bosh-session'));
  574. if (typeof session !== "undefined" && session !== null && session.rid && session.sid && session.jid && (typeof jid === "undefined" || jid === null || Strophe.getBareJidFromJid(session.jid) === Strophe.getBareJidFromJid(jid) || // If authcid is null, then it's an anonymous login, so
  575. // we compare only the domains:
  576. Strophe.getNodeFromJid(jid) === null && Strophe.getDomainFromJid(session.jid) === jid)) {
  577. this._conn.restored = true;
  578. this._attach(session.jid, session.sid, session.rid, callback, wait, hold, wind);
  579. } else {
  580. var error = new Error("_restore: no restoreable session.");
  581. error.name = "StropheSessionError";
  582. throw error;
  583. }
  584. },
  585. /** PrivateFunction: _cacheSession
  586. * _Private_ handler for the beforeunload event.
  587. *
  588. * This handler is used to process the Bosh-part of the initial request.
  589. * Parameters:
  590. * (Strophe.Request) bodyWrap - The received stanza.
  591. */
  592. _cacheSession: function _cacheSession() {
  593. if (this._conn.authenticated) {
  594. if (this._conn.jid && this.rid && this.sid) {
  595. window.sessionStorage.setItem('strophe-bosh-session', JSON.stringify({
  596. 'jid': this._conn.jid,
  597. 'rid': this.rid,
  598. 'sid': this.sid
  599. }));
  600. }
  601. } else {
  602. window.sessionStorage.removeItem('strophe-bosh-session');
  603. }
  604. },
  605. /** PrivateFunction: _connect_cb
  606. * _Private_ handler for initial connection request.
  607. *
  608. * This handler is used to process the Bosh-part of the initial request.
  609. * Parameters:
  610. * (Strophe.Request) bodyWrap - The received stanza.
  611. */
  612. _connect_cb: function _connect_cb(bodyWrap) {
  613. var typ = bodyWrap.getAttribute("type");
  614. if (typ !== null && typ === "terminate") {
  615. // an error occurred
  616. var cond = bodyWrap.getAttribute("condition");
  617. Strophe.error("BOSH-Connection failed: " + cond);
  618. var conflict = bodyWrap.getElementsByTagName("conflict");
  619. if (cond !== null) {
  620. if (cond === "remote-stream-error" && conflict.length > 0) {
  621. cond = "conflict";
  622. }
  623. this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, cond);
  624. } else {
  625. this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "unknown");
  626. }
  627. this._conn._doDisconnect(cond);
  628. return Strophe.Status.CONNFAIL;
  629. } // check to make sure we don't overwrite these if _connect_cb is
  630. // called multiple times in the case of missing stream:features
  631. if (!this.sid) {
  632. this.sid = bodyWrap.getAttribute("sid");
  633. }
  634. var wind = bodyWrap.getAttribute('requests');
  635. if (wind) {
  636. this.window = parseInt(wind, 10);
  637. }
  638. var hold = bodyWrap.getAttribute('hold');
  639. if (hold) {
  640. this.hold = parseInt(hold, 10);
  641. }
  642. var wait = bodyWrap.getAttribute('wait');
  643. if (wait) {
  644. this.wait = parseInt(wait, 10);
  645. }
  646. var inactivity = bodyWrap.getAttribute('inactivity');
  647. if (inactivity) {
  648. this.inactivity = parseInt(inactivity, 10);
  649. }
  650. },
  651. /** PrivateFunction: _disconnect
  652. * _Private_ part of Connection.disconnect for Bosh
  653. *
  654. * Parameters:
  655. * (Request) pres - This stanza will be sent before disconnecting.
  656. */
  657. _disconnect: function _disconnect(pres) {
  658. this._sendTerminate(pres);
  659. },
  660. /** PrivateFunction: _doDisconnect
  661. * _Private_ function to disconnect.
  662. *
  663. * Resets the SID and RID.
  664. */
  665. _doDisconnect: function _doDisconnect() {
  666. this.sid = null;
  667. this.rid = Math.floor(Math.random() * 4294967295);
  668. if (this._conn._sessionCachingSupported()) {
  669. window.sessionStorage.removeItem('strophe-bosh-session');
  670. }
  671. this._conn.nextValidRid(this.rid);
  672. },
  673. /** PrivateFunction: _emptyQueue
  674. * _Private_ function to check if the Request queue is empty.
  675. *
  676. * Returns:
  677. * True, if there are no Requests queued, False otherwise.
  678. */
  679. _emptyQueue: function _emptyQueue() {
  680. return this._requests.length === 0;
  681. },
  682. /** PrivateFunction: _callProtocolErrorHandlers
  683. * _Private_ function to call error handlers registered for HTTP errors.
  684. *
  685. * Parameters:
  686. * (Strophe.Request) req - The request that is changing readyState.
  687. */
  688. _callProtocolErrorHandlers: function _callProtocolErrorHandlers(req) {
  689. var reqStatus = this._getRequestStatus(req);
  690. var err_callback = this._conn.protocolErrorHandlers.HTTP[reqStatus];
  691. if (err_callback) {
  692. err_callback.call(this, reqStatus);
  693. }
  694. },
  695. /** PrivateFunction: _hitError
  696. * _Private_ function to handle the error count.
  697. *
  698. * Requests are resent automatically until their error count reaches
  699. * 5. Each time an error is encountered, this function is called to
  700. * increment the count and disconnect if the count is too high.
  701. *
  702. * Parameters:
  703. * (Integer) reqStatus - The request status.
  704. */
  705. _hitError: function _hitError(reqStatus) {
  706. this.errors++;
  707. Strophe.warn("request errored, status: " + reqStatus + ", number of errors: " + this.errors);
  708. if (this.errors > 4) {
  709. this._conn._onDisconnectTimeout();
  710. }
  711. },
  712. /** PrivateFunction: _no_auth_received
  713. *
  714. * Called on stream start/restart when no stream:features
  715. * has been received and sends a blank poll request.
  716. */
  717. _no_auth_received: function _no_auth_received(callback) {
  718. Strophe.warn("Server did not yet offer a supported authentication " + "mechanism. Sending a blank poll request.");
  719. if (callback) {
  720. callback = callback.bind(this._conn);
  721. } else {
  722. callback = this._conn._connect_cb.bind(this._conn);
  723. }
  724. var body = this._buildBody();
  725. this._requests.push(new Strophe.Request(body.tree(), this._onRequestStateChange.bind(this, callback), body.tree().getAttribute("rid")));
  726. this._throttledRequestHandler();
  727. },
  728. /** PrivateFunction: _onDisconnectTimeout
  729. * _Private_ timeout handler for handling non-graceful disconnection.
  730. *
  731. * Cancels all remaining Requests and clears the queue.
  732. */
  733. _onDisconnectTimeout: function _onDisconnectTimeout() {
  734. this._abortAllRequests();
  735. },
  736. /** PrivateFunction: _abortAllRequests
  737. * _Private_ helper function that makes sure all pending requests are aborted.
  738. */
  739. _abortAllRequests: function _abortAllRequests() {
  740. while (this._requests.length > 0) {
  741. var req = this._requests.pop();
  742. req.abort = true;
  743. req.xhr.abort(); // jslint complains, but this is fine. setting to empty func
  744. // is necessary for IE6
  745. req.xhr.onreadystatechange = function () {}; // jshint ignore:line
  746. }
  747. },
  748. /** PrivateFunction: _onIdle
  749. * _Private_ handler called by Strophe.Connection._onIdle
  750. *
  751. * Sends all queued Requests or polls with empty Request if there are none.
  752. */
  753. _onIdle: function _onIdle() {
  754. var data = this._conn._data; // if no requests are in progress, poll
  755. if (this._conn.authenticated && this._requests.length === 0 && data.length === 0 && !this._conn.disconnecting) {
  756. Strophe.info("no requests during idle cycle, sending " + "blank request");
  757. data.push(null);
  758. }
  759. if (this._conn.paused) {
  760. return;
  761. }
  762. if (this._requests.length < 2 && data.length > 0) {
  763. var body = this._buildBody();
  764. for (var i = 0; i < data.length; i++) {
  765. if (data[i] !== null) {
  766. if (data[i] === "restart") {
  767. body.attrs({
  768. "to": this._conn.domain,
  769. "xml:lang": "en",
  770. "xmpp:restart": "true",
  771. "xmlns:xmpp": Strophe.NS.BOSH
  772. });
  773. } else {
  774. body.cnode(data[i]).up();
  775. }
  776. }
  777. }
  778. delete this._conn._data;
  779. this._conn._data = [];
  780. this._requests.push(new Strophe.Request(body.tree(), this._onRequestStateChange.bind(this, this._conn._dataRecv.bind(this._conn)), body.tree().getAttribute("rid")));
  781. this._throttledRequestHandler();
  782. }
  783. if (this._requests.length > 0) {
  784. var time_elapsed = this._requests[0].age();
  785. if (this._requests[0].dead !== null) {
  786. if (this._requests[0].timeDead() > Math.floor(Strophe.SECONDARY_TIMEOUT * this.wait)) {
  787. this._throttledRequestHandler();
  788. }
  789. }
  790. if (time_elapsed > Math.floor(Strophe.TIMEOUT * this.wait)) {
  791. Strophe.warn("Request " + this._requests[0].id + " timed out, over " + Math.floor(Strophe.TIMEOUT * this.wait) + " seconds since last activity");
  792. this._throttledRequestHandler();
  793. }
  794. }
  795. },
  796. /** PrivateFunction: _getRequestStatus
  797. *
  798. * Returns the HTTP status code from a Strophe.Request
  799. *
  800. * Parameters:
  801. * (Strophe.Request) req - The Strophe.Request instance.
  802. * (Integer) def - The default value that should be returned if no
  803. * status value was found.
  804. */
  805. _getRequestStatus: function _getRequestStatus(req, def) {
  806. var reqStatus;
  807. if (req.xhr.readyState === 4) {
  808. try {
  809. reqStatus = req.xhr.status;
  810. } catch (e) {
  811. // ignore errors from undefined status attribute. Works
  812. // around a browser bug
  813. Strophe.error("Caught an error while retrieving a request's status, " + "reqStatus: " + reqStatus);
  814. }
  815. }
  816. if (typeof reqStatus === "undefined") {
  817. reqStatus = typeof def === 'number' ? def : 0;
  818. }
  819. return reqStatus;
  820. },
  821. /** PrivateFunction: _onRequestStateChange
  822. * _Private_ handler for Strophe.Request state changes.
  823. *
  824. * This function is called when the XMLHttpRequest readyState changes.
  825. * It contains a lot of error handling logic for the many ways that
  826. * requests can fail, and calls the request callback when requests
  827. * succeed.
  828. *
  829. * Parameters:
  830. * (Function) func - The handler for the request.
  831. * (Strophe.Request) req - The request that is changing readyState.
  832. */
  833. _onRequestStateChange: function _onRequestStateChange(func, req) {
  834. Strophe.debug("request id " + req.id + "." + req.sends + " state changed to " + req.xhr.readyState);
  835. if (req.abort) {
  836. req.abort = false;
  837. return;
  838. }
  839. if (req.xhr.readyState !== 4) {
  840. // The request is not yet complete
  841. return;
  842. }
  843. var reqStatus = this._getRequestStatus(req);
  844. this.lastResponseHeaders = req.xhr.getAllResponseHeaders();
  845. if (this.disconnecting && reqStatus >= 400) {
  846. this._hitError(reqStatus);
  847. this._callProtocolErrorHandlers(req);
  848. return;
  849. }
  850. var valid_request = reqStatus > 0 && reqStatus < 500;
  851. var too_many_retries = req.sends > this._conn.maxRetries;
  852. if (valid_request || too_many_retries) {
  853. // remove from internal queue
  854. this._removeRequest(req);
  855. Strophe.debug("request id " + req.id + " should now be removed");
  856. }
  857. if (reqStatus === 200) {
  858. // request succeeded
  859. var reqIs0 = this._requests[0] === req;
  860. var reqIs1 = this._requests[1] === req; // if request 1 finished, or request 0 finished and request
  861. // 1 is over Strophe.SECONDARY_TIMEOUT seconds old, we need to
  862. // restart the other - both will be in the first spot, as the
  863. // completed request has been removed from the queue already
  864. if (reqIs1 || reqIs0 && this._requests.length > 0 && this._requests[0].age() > Math.floor(Strophe.SECONDARY_TIMEOUT * this.wait)) {
  865. this._restartRequest(0);
  866. }
  867. this._conn.nextValidRid(Number(req.rid) + 1);
  868. Strophe.debug("request id " + req.id + "." + req.sends + " got 200");
  869. func(req); // call handler
  870. this.errors = 0;
  871. } else if (reqStatus === 0 || reqStatus >= 400 && reqStatus < 600 || reqStatus >= 12000) {
  872. // request failed
  873. Strophe.error("request id " + req.id + "." + req.sends + " error " + reqStatus + " happened");
  874. this._hitError(reqStatus);
  875. this._callProtocolErrorHandlers(req);
  876. if (reqStatus >= 400 && reqStatus < 500) {
  877. this._conn._changeConnectStatus(Strophe.Status.DISCONNECTING, null);
  878. this._conn._doDisconnect();
  879. }
  880. } else {
  881. Strophe.error("request id " + req.id + "." + req.sends + " error " + reqStatus + " happened");
  882. }
  883. if (!valid_request && !too_many_retries) {
  884. this._throttledRequestHandler();
  885. } else if (too_many_retries && !this._conn.connected) {
  886. this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "giving-up");
  887. }
  888. },
  889. /** PrivateFunction: _processRequest
  890. * _Private_ function to process a request in the queue.
  891. *
  892. * This function takes requests off the queue and sends them and
  893. * restarts dead requests.
  894. *
  895. * Parameters:
  896. * (Integer) i - The index of the request in the queue.
  897. */
  898. _processRequest: function _processRequest(i) {
  899. var _this = this;
  900. var req = this._requests[i];
  901. var reqStatus = this._getRequestStatus(req, -1); // make sure we limit the number of retries
  902. if (req.sends > this._conn.maxRetries) {
  903. this._conn._onDisconnectTimeout();
  904. return;
  905. }
  906. var time_elapsed = req.age();
  907. var primary_timeout = !isNaN(time_elapsed) && time_elapsed > Math.floor(Strophe.TIMEOUT * this.wait);
  908. var secondary_timeout = req.dead !== null && req.timeDead() > Math.floor(Strophe.SECONDARY_TIMEOUT * this.wait);
  909. var server_error = req.xhr.readyState === 4 && (reqStatus < 1 || reqStatus >= 500);
  910. if (primary_timeout || secondary_timeout || server_error) {
  911. if (secondary_timeout) {
  912. Strophe.error("Request ".concat(this._requests[i].id, " timed out (secondary), restarting"));
  913. }
  914. req.abort = true;
  915. req.xhr.abort(); // setting to null fails on IE6, so set to empty function
  916. req.xhr.onreadystatechange = function () {};
  917. this._requests[i] = new Strophe.Request(req.xmlData, req.origFunc, req.rid, req.sends);
  918. req = this._requests[i];
  919. }
  920. if (req.xhr.readyState === 0) {
  921. Strophe.debug("request id " + req.id + "." + req.sends + " posting");
  922. try {
  923. var content_type = this._conn.options.contentType || "text/xml; charset=utf-8";
  924. req.xhr.open("POST", this._conn.service, this._conn.options.sync ? false : true);
  925. if (typeof req.xhr.setRequestHeader !== 'undefined') {
  926. // IE9 doesn't have setRequestHeader
  927. req.xhr.setRequestHeader("Content-Type", content_type);
  928. }
  929. if (this._conn.options.withCredentials) {
  930. req.xhr.withCredentials = true;
  931. }
  932. } catch (e2) {
  933. Strophe.error("XHR open failed: " + e2.toString());
  934. if (!this._conn.connected) {
  935. this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "bad-service");
  936. }
  937. this._conn.disconnect();
  938. return;
  939. } // Fires the XHR request -- may be invoked immediately
  940. // or on a gradually expanding retry window for reconnects
  941. var sendFunc = function sendFunc() {
  942. req.date = new Date();
  943. if (_this._conn.options.customHeaders) {
  944. var headers = _this._conn.options.customHeaders;
  945. for (var header in headers) {
  946. if (Object.prototype.hasOwnProperty.call(headers, header)) {
  947. req.xhr.setRequestHeader(header, headers[header]);
  948. }
  949. }
  950. }
  951. req.xhr.send(req.data);
  952. }; // Implement progressive backoff for reconnects --
  953. // First retry (send === 1) should also be instantaneous
  954. if (req.sends > 1) {
  955. // Using a cube of the retry number creates a nicely
  956. // expanding retry window
  957. var backoff = Math.min(Math.floor(Strophe.TIMEOUT * this.wait), Math.pow(req.sends, 3)) * 1000;
  958. setTimeout(function () {
  959. // XXX: setTimeout should be called only with function expressions (23974bc1)
  960. sendFunc();
  961. }, backoff);
  962. } else {
  963. sendFunc();
  964. }
  965. req.sends++;
  966. if (this._conn.xmlOutput !== Strophe.Connection.prototype.xmlOutput) {
  967. if (req.xmlData.nodeName === this.strip && req.xmlData.childNodes.length) {
  968. this._conn.xmlOutput(req.xmlData.childNodes[0]);
  969. } else {
  970. this._conn.xmlOutput(req.xmlData);
  971. }
  972. }
  973. if (this._conn.rawOutput !== Strophe.Connection.prototype.rawOutput) {
  974. this._conn.rawOutput(req.data);
  975. }
  976. } else {
  977. Strophe.debug("_processRequest: " + (i === 0 ? "first" : "second") + " request has readyState of " + req.xhr.readyState);
  978. }
  979. },
  980. /** PrivateFunction: _removeRequest
  981. * _Private_ function to remove a request from the queue.
  982. *
  983. * Parameters:
  984. * (Strophe.Request) req - The request to remove.
  985. */
  986. _removeRequest: function _removeRequest(req) {
  987. Strophe.debug("removing request");
  988. for (var i = this._requests.length - 1; i >= 0; i--) {
  989. if (req === this._requests[i]) {
  990. this._requests.splice(i, 1);
  991. }
  992. } // IE6 fails on setting to null, so set to empty function
  993. req.xhr.onreadystatechange = function () {};
  994. this._throttledRequestHandler();
  995. },
  996. /** PrivateFunction: _restartRequest
  997. * _Private_ function to restart a request that is presumed dead.
  998. *
  999. * Parameters:
  1000. * (Integer) i - The index of the request in the queue.
  1001. */
  1002. _restartRequest: function _restartRequest(i) {
  1003. var req = this._requests[i];
  1004. if (req.dead === null) {
  1005. req.dead = new Date();
  1006. }
  1007. this._processRequest(i);
  1008. },
  1009. /** PrivateFunction: _reqToData
  1010. * _Private_ function to get a stanza out of a request.
  1011. *
  1012. * Tries to extract a stanza out of a Request Object.
  1013. * When this fails the current connection will be disconnected.
  1014. *
  1015. * Parameters:
  1016. * (Object) req - The Request.
  1017. *
  1018. * Returns:
  1019. * The stanza that was passed.
  1020. */
  1021. _reqToData: function _reqToData(req) {
  1022. try {
  1023. return req.getResponse();
  1024. } catch (e) {
  1025. if (e.message !== "parsererror") {
  1026. throw e;
  1027. }
  1028. this._conn.disconnect("strophe-parsererror");
  1029. }
  1030. },
  1031. /** PrivateFunction: _sendTerminate
  1032. * _Private_ function to send initial disconnect sequence.
  1033. *
  1034. * This is the first step in a graceful disconnect. It sends
  1035. * the BOSH server a terminate body and includes an unavailable
  1036. * presence if authentication has completed.
  1037. */
  1038. _sendTerminate: function _sendTerminate(pres) {
  1039. Strophe.info("_sendTerminate was called");
  1040. var body = this._buildBody().attrs({
  1041. type: "terminate"
  1042. });
  1043. if (pres) {
  1044. body.cnode(pres.tree());
  1045. }
  1046. var req = new Strophe.Request(body.tree(), this._onRequestStateChange.bind(this, this._conn._dataRecv.bind(this._conn)), body.tree().getAttribute("rid"));
  1047. this._requests.push(req);
  1048. this._throttledRequestHandler();
  1049. },
  1050. /** PrivateFunction: _send
  1051. * _Private_ part of the Connection.send function for BOSH
  1052. *
  1053. * Just triggers the RequestHandler to send the messages that are in the queue
  1054. */
  1055. _send: function _send() {
  1056. var _this2 = this;
  1057. clearTimeout(this._conn._idleTimeout);
  1058. this._throttledRequestHandler();
  1059. this._conn._idleTimeout = setTimeout(function () {
  1060. return _this2._conn._onIdle();
  1061. }, 100);
  1062. },
  1063. /** PrivateFunction: _sendRestart
  1064. *
  1065. * Send an xmpp:restart stanza.
  1066. */
  1067. _sendRestart: function _sendRestart() {
  1068. this._throttledRequestHandler();
  1069. clearTimeout(this._conn._idleTimeout);
  1070. },
  1071. /** PrivateFunction: _throttledRequestHandler
  1072. * _Private_ function to throttle requests to the connection window.
  1073. *
  1074. * This function makes sure we don't send requests so fast that the
  1075. * request ids overflow the connection window in the case that one
  1076. * request died.
  1077. */
  1078. _throttledRequestHandler: function _throttledRequestHandler() {
  1079. if (!this._requests) {
  1080. Strophe.debug("_throttledRequestHandler called with " + "undefined requests");
  1081. } else {
  1082. Strophe.debug("_throttledRequestHandler called with " + this._requests.length + " requests");
  1083. }
  1084. if (!this._requests || this._requests.length === 0) {
  1085. return;
  1086. }
  1087. if (this._requests.length > 0) {
  1088. this._processRequest(0);
  1089. }
  1090. if (this._requests.length > 1 && Math.abs(this._requests[0].rid - this._requests[1].rid) < this.window) {
  1091. this._processRequest(1);
  1092. }
  1093. }
  1094. };
  1095. /***/
  1096. },
  1097. /***/
  1098. "./src/core.js":
  1099. /*!*********************!*\
  1100. !*** ./src/core.js ***!
  1101. \*********************/
  1102. /*! exports provided: default */
  1103. /***/
  1104. function srcCoreJs(module, __webpack_exports__, __webpack_require__) {
  1105. "use strict";
  1106. __webpack_require__.r(__webpack_exports__);
  1107. /* harmony import */
  1108. var md5__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
  1109. /*! md5 */
  1110. "./src/md5.js");
  1111. /* harmony import */
  1112. var sha1__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
  1113. /*! sha1 */
  1114. "./src/sha1.js");
  1115. /* harmony import */
  1116. var utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
  1117. /*! utils */
  1118. "./src/utils.js");
  1119. function _toConsumableArray(arr) {
  1120. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
  1121. }
  1122. function _nonIterableSpread() {
  1123. throw new TypeError("Invalid attempt to spread non-iterable instance");
  1124. }
  1125. function _iterableToArray(iter) {
  1126. if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
  1127. }
  1128. function _arrayWithoutHoles(arr) {
  1129. if (Array.isArray(arr)) {
  1130. for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
  1131. arr2[i] = arr[i];
  1132. }
  1133. return arr2;
  1134. }
  1135. }
  1136. function _typeof(obj) {
  1137. if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  1138. _typeof = function _typeof(obj) {
  1139. return typeof obj;
  1140. };
  1141. } else {
  1142. _typeof = function _typeof(obj) {
  1143. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  1144. };
  1145. }
  1146. return _typeof(obj);
  1147. }
  1148. /*
  1149. This program is distributed under the terms of the MIT license.
  1150. Please see the LICENSE file for details.
  1151. Copyright 2006-2018, OGG, LLC
  1152. */
  1153. /*global define, document, sessionStorage, setTimeout, clearTimeout, ActiveXObject, DOMParser, btoa, atob, module */
  1154. /** Function: $build
  1155. * Create a Strophe.Builder.
  1156. * This is an alias for 'new Strophe.Builder(name, attrs)'.
  1157. *
  1158. * Parameters:
  1159. * (String) name - The root element name.
  1160. * (Object) attrs - The attributes for the root element in object notation.
  1161. *
  1162. * Returns:
  1163. * A new Strophe.Builder object.
  1164. */
  1165. function $build(name, attrs) {
  1166. return new Strophe.Builder(name, attrs);
  1167. }
  1168. /** Function: $msg
  1169. * Create a Strophe.Builder with a <message/> element as the root.
  1170. *
  1171. * Parameters:
  1172. * (Object) attrs - The <message/> element attributes in object notation.
  1173. *
  1174. * Returns:
  1175. * A new Strophe.Builder object.
  1176. */
  1177. function $msg(attrs) {
  1178. return new Strophe.Builder("message", attrs);
  1179. }
  1180. /** Function: $iq
  1181. * Create a Strophe.Builder with an <iq/> element as the root.
  1182. *
  1183. * Parameters:
  1184. * (Object) attrs - The <iq/> element attributes in object notation.
  1185. *
  1186. * Returns:
  1187. * A new Strophe.Builder object.
  1188. */
  1189. function $iq(attrs) {
  1190. return new Strophe.Builder("iq", attrs);
  1191. }
  1192. /** Function: $pres
  1193. * Create a Strophe.Builder with a <presence/> element as the root.
  1194. *
  1195. * Parameters:
  1196. * (Object) attrs - The <presence/> element attributes in object notation.
  1197. *
  1198. * Returns:
  1199. * A new Strophe.Builder object.
  1200. */
  1201. function $pres(attrs) {
  1202. return new Strophe.Builder("presence", attrs);
  1203. }
  1204. /** Class: Strophe
  1205. * An object container for all Strophe library functions.
  1206. *
  1207. * This class is just a container for all the objects and constants
  1208. * used in the library. It is not meant to be instantiated, but to
  1209. * provide a namespace for library objects, constants, and functions.
  1210. */
  1211. var Strophe = {
  1212. /** Constant: VERSION */
  1213. VERSION: "@VERSION@",
  1214. /** Constants: XMPP Namespace Constants
  1215. * Common namespace constants from the XMPP RFCs and XEPs.
  1216. *
  1217. * NS.HTTPBIND - HTTP BIND namespace from XEP 124.
  1218. * NS.BOSH - BOSH namespace from XEP 206.
  1219. * NS.CLIENT - Main XMPP client namespace.
  1220. * NS.AUTH - Legacy authentication namespace.
  1221. * NS.ROSTER - Roster operations namespace.
  1222. * NS.PROFILE - Profile namespace.
  1223. * NS.DISCO_INFO - Service discovery info namespace from XEP 30.
  1224. * NS.DISCO_ITEMS - Service discovery items namespace from XEP 30.
  1225. * NS.MUC - Multi-User Chat namespace from XEP 45.
  1226. * NS.SASL - XMPP SASL namespace from RFC 3920.
  1227. * NS.STREAM - XMPP Streams namespace from RFC 3920.
  1228. * NS.BIND - XMPP Binding namespace from RFC 3920.
  1229. * NS.SESSION - XMPP Session namespace from RFC 3920.
  1230. * NS.XHTML_IM - XHTML-IM namespace from XEP 71.
  1231. * NS.XHTML - XHTML body namespace from XEP 71.
  1232. */
  1233. NS: {
  1234. HTTPBIND: "http://jabber.org/protocol/httpbind",
  1235. BOSH: "urn:xmpp:xbosh",
  1236. CLIENT: "jabber:client",
  1237. AUTH: "jabber:iq:auth",
  1238. ROSTER: "jabber:iq:roster",
  1239. PROFILE: "jabber:iq:profile",
  1240. DISCO_INFO: "http://jabber.org/protocol/disco#info",
  1241. DISCO_ITEMS: "http://jabber.org/protocol/disco#items",
  1242. MUC: "http://jabber.org/protocol/muc",
  1243. SASL: "urn:ietf:params:xml:ns:xmpp-sasl",
  1244. STREAM: "http://etherx.jabber.org/streams",
  1245. FRAMING: "urn:ietf:params:xml:ns:xmpp-framing",
  1246. BIND: "urn:ietf:params:xml:ns:xmpp-bind",
  1247. SESSION: "urn:ietf:params:xml:ns:xmpp-session",
  1248. VERSION: "jabber:iq:version",
  1249. STANZAS: "urn:ietf:params:xml:ns:xmpp-stanzas",
  1250. XHTML_IM: "http://jabber.org/protocol/xhtml-im",
  1251. XHTML: "http://www.w3.org/1999/xhtml"
  1252. },
  1253. /** Constants: XHTML_IM Namespace
  1254. * contains allowed tags, tag attributes, and css properties.
  1255. * Used in the createHtml function to filter incoming html into the allowed XHTML-IM subset.
  1256. * See http://xmpp.org/extensions/xep-0071.html#profile-summary for the list of recommended
  1257. * allowed tags and their attributes.
  1258. */
  1259. XHTML: {
  1260. tags: ['a', 'blockquote', 'br', 'cite', 'em', 'img', 'li', 'ol', 'p', 'span', 'strong', 'ul', 'body'],
  1261. attributes: {
  1262. 'a': ['href'],
  1263. 'blockquote': ['style'],
  1264. 'br': [],
  1265. 'cite': ['style'],
  1266. 'em': [],
  1267. 'img': ['src', 'alt', 'style', 'height', 'width'],
  1268. 'li': ['style'],
  1269. 'ol': ['style'],
  1270. 'p': ['style'],
  1271. 'span': ['style'],
  1272. 'strong': [],
  1273. 'ul': ['style'],
  1274. 'body': []
  1275. },
  1276. css: ['background-color', 'color', 'font-family', 'font-size', 'font-style', 'font-weight', 'margin-left', 'margin-right', 'text-align', 'text-decoration'],
  1277. /** Function: XHTML.validTag
  1278. *
  1279. * Utility method to determine whether a tag is allowed
  1280. * in the XHTML_IM namespace.
  1281. *
  1282. * XHTML tag names are case sensitive and must be lower case.
  1283. */
  1284. validTag: function validTag(tag) {
  1285. for (var i = 0; i < Strophe.XHTML.tags.length; i++) {
  1286. if (tag === Strophe.XHTML.tags[i]) {
  1287. return true;
  1288. }
  1289. }
  1290. return false;
  1291. },
  1292. /** Function: XHTML.validAttribute
  1293. *
  1294. * Utility method to determine whether an attribute is allowed
  1295. * as recommended per XEP-0071
  1296. *
  1297. * XHTML attribute names are case sensitive and must be lower case.
  1298. */
  1299. validAttribute: function validAttribute(tag, attribute) {
  1300. if (typeof Strophe.XHTML.attributes[tag] !== 'undefined' && Strophe.XHTML.attributes[tag].length > 0) {
  1301. for (var i = 0; i < Strophe.XHTML.attributes[tag].length; i++) {
  1302. if (attribute === Strophe.XHTML.attributes[tag][i]) {
  1303. return true;
  1304. }
  1305. }
  1306. }
  1307. return false;
  1308. },
  1309. validCSS: function validCSS(style) {
  1310. for (var i = 0; i < Strophe.XHTML.css.length; i++) {
  1311. if (style === Strophe.XHTML.css[i]) {
  1312. return true;
  1313. }
  1314. }
  1315. return false;
  1316. }
  1317. },
  1318. /** Constants: Connection Status Constants
  1319. * Connection status constants for use by the connection handler
  1320. * callback.
  1321. *
  1322. * Status.ERROR - An error has occurred
  1323. * Status.CONNECTING - The connection is currently being made
  1324. * Status.CONNFAIL - The connection attempt failed
  1325. * Status.AUTHENTICATING - The connection is authenticating
  1326. * Status.AUTHFAIL - The authentication attempt failed
  1327. * Status.CONNECTED - The connection has succeeded
  1328. * Status.DISCONNECTED - The connection has been terminated
  1329. * Status.DISCONNECTING - The connection is currently being terminated
  1330. * Status.ATTACHED - The connection has been attached
  1331. * Status.REDIRECT - The connection has been redirected
  1332. * Status.CONNTIMEOUT - The connection has timed out
  1333. */
  1334. Status: {
  1335. ERROR: 0,
  1336. CONNECTING: 1,
  1337. CONNFAIL: 2,
  1338. AUTHENTICATING: 3,
  1339. AUTHFAIL: 4,
  1340. CONNECTED: 5,
  1341. DISCONNECTED: 6,
  1342. DISCONNECTING: 7,
  1343. ATTACHED: 8,
  1344. REDIRECT: 9,
  1345. CONNTIMEOUT: 10
  1346. },
  1347. ErrorCondition: {
  1348. BAD_FORMAT: "bad-format",
  1349. CONFLICT: "conflict",
  1350. MISSING_JID_NODE: "x-strophe-bad-non-anon-jid",
  1351. NO_AUTH_MECH: "no-auth-mech",
  1352. UNKNOWN_REASON: "unknown"
  1353. },
  1354. /** Constants: Log Level Constants
  1355. * Logging level indicators.
  1356. *
  1357. * LogLevel.DEBUG - Debug output
  1358. * LogLevel.INFO - Informational output
  1359. * LogLevel.WARN - Warnings
  1360. * LogLevel.ERROR - Errors
  1361. * LogLevel.FATAL - Fatal errors
  1362. */
  1363. LogLevel: {
  1364. DEBUG: 0,
  1365. INFO: 1,
  1366. WARN: 2,
  1367. ERROR: 3,
  1368. FATAL: 4
  1369. },
  1370. /** PrivateConstants: DOM Element Type Constants
  1371. * DOM element types.
  1372. *
  1373. * ElementType.NORMAL - Normal element.
  1374. * ElementType.TEXT - Text data element.
  1375. * ElementType.FRAGMENT - XHTML fragment element.
  1376. */
  1377. ElementType: {
  1378. NORMAL: 1,
  1379. TEXT: 3,
  1380. CDATA: 4,
  1381. FRAGMENT: 11
  1382. },
  1383. /** PrivateConstants: Timeout Values
  1384. * Timeout values for error states. These values are in seconds.
  1385. * These should not be changed unless you know exactly what you are
  1386. * doing.
  1387. *
  1388. * TIMEOUT - Timeout multiplier. A waiting request will be considered
  1389. * failed after Math.floor(TIMEOUT * wait) seconds have elapsed.
  1390. * This defaults to 1.1, and with default wait, 66 seconds.
  1391. * SECONDARY_TIMEOUT - Secondary timeout multiplier. In cases where
  1392. * Strophe can detect early failure, it will consider the request
  1393. * failed if it doesn't return after
  1394. * Math.floor(SECONDARY_TIMEOUT * wait) seconds have elapsed.
  1395. * This defaults to 0.1, and with default wait, 6 seconds.
  1396. */
  1397. TIMEOUT: 1.1,
  1398. SECONDARY_TIMEOUT: 0.1,
  1399. /** Function: addNamespace
  1400. * This function is used to extend the current namespaces in
  1401. * Strophe.NS. It takes a key and a value with the key being the
  1402. * name of the new namespace, with its actual value.
  1403. * For example:
  1404. * Strophe.addNamespace('PUBSUB', "http://jabber.org/protocol/pubsub");
  1405. *
  1406. * Parameters:
  1407. * (String) name - The name under which the namespace will be
  1408. * referenced under Strophe.NS
  1409. * (String) value - The actual namespace.
  1410. */
  1411. addNamespace: function addNamespace(name, value) {
  1412. Strophe.NS[name] = value;
  1413. },
  1414. /** Function: forEachChild
  1415. * Map a function over some or all child elements of a given element.
  1416. *
  1417. * This is a small convenience function for mapping a function over
  1418. * some or all of the children of an element. If elemName is null, all
  1419. * children will be passed to the function, otherwise only children
  1420. * whose tag names match elemName will be passed.
  1421. *
  1422. * Parameters:
  1423. * (XMLElement) elem - The element to operate on.
  1424. * (String) elemName - The child element tag name filter.
  1425. * (Function) func - The function to apply to each child. This
  1426. * function should take a single argument, a DOM element.
  1427. */
  1428. forEachChild: function forEachChild(elem, elemName, func) {
  1429. for (var i = 0; i < elem.childNodes.length; i++) {
  1430. var childNode = elem.childNodes[i];
  1431. if (childNode.nodeType === Strophe.ElementType.NORMAL && (!elemName || this.isTagEqual(childNode, elemName))) {
  1432. func(childNode);
  1433. }
  1434. }
  1435. },
  1436. /** Function: isTagEqual
  1437. * Compare an element's tag name with a string.
  1438. *
  1439. * This function is case sensitive.
  1440. *
  1441. * Parameters:
  1442. * (XMLElement) el - A DOM element.
  1443. * (String) name - The element name.
  1444. *
  1445. * Returns:
  1446. * true if the element's tag name matches _el_, and false
  1447. * otherwise.
  1448. */
  1449. isTagEqual: function isTagEqual(el, name) {
  1450. return el.tagName === name;
  1451. },
  1452. /** PrivateVariable: _xmlGenerator
  1453. * _Private_ variable that caches a DOM document to
  1454. * generate elements.
  1455. */
  1456. _xmlGenerator: null,
  1457. /** PrivateFunction: _makeGenerator
  1458. * _Private_ function that creates a dummy XML DOM document to serve as
  1459. * an element and text node generator.
  1460. */
  1461. _makeGenerator: function _makeGenerator() {
  1462. var doc; // IE9 does implement createDocument(); however, using it will cause the browser to leak memory on page unload.
  1463. // Here, we test for presence of createDocument() plus IE's proprietary documentMode attribute, which would be
  1464. // less than 10 in the case of IE9 and below.
  1465. if (document.implementation.createDocument === undefined || document.implementation.createDocument && document.documentMode && document.documentMode < 10) {
  1466. doc = this._getIEXmlDom();
  1467. doc.appendChild(doc.createElement('strophe'));
  1468. } else {
  1469. doc = document.implementation.createDocument('jabber:client', 'strophe', null);
  1470. }
  1471. return doc;
  1472. },
  1473. /** Function: xmlGenerator
  1474. * Get the DOM document to generate elements.
  1475. *
  1476. * Returns:
  1477. * The currently used DOM document.
  1478. */
  1479. xmlGenerator: function xmlGenerator() {
  1480. if (!Strophe._xmlGenerator) {
  1481. Strophe._xmlGenerator = Strophe._makeGenerator();
  1482. }
  1483. return Strophe._xmlGenerator;
  1484. },
  1485. /** PrivateFunction: _getIEXmlDom
  1486. * Gets IE xml doc object
  1487. *
  1488. * Returns:
  1489. * A Microsoft XML DOM Object
  1490. * See Also:
  1491. * http://msdn.microsoft.com/en-us/library/ms757837%28VS.85%29.aspx
  1492. */
  1493. _getIEXmlDom: function _getIEXmlDom() {
  1494. var doc = null;
  1495. var docStrings = ["Msxml2.DOMDocument.6.0", "Msxml2.DOMDocument.5.0", "Msxml2.DOMDocument.4.0", "MSXML2.DOMDocument.3.0", "MSXML2.DOMDocument", "MSXML.DOMDocument", "Microsoft.XMLDOM"];
  1496. for (var d = 0; d < docStrings.length; d++) {
  1497. if (doc === null) {
  1498. try {
  1499. doc = new ActiveXObject(docStrings[d]);
  1500. } catch (e) {
  1501. doc = null;
  1502. }
  1503. } else {
  1504. break;
  1505. }
  1506. }
  1507. return doc;
  1508. },
  1509. /** Function: xmlElement
  1510. * Create an XML DOM element.
  1511. *
  1512. * This function creates an XML DOM element correctly across all
  1513. * implementations. Note that these are not HTML DOM elements, which
  1514. * aren't appropriate for XMPP stanzas.
  1515. *
  1516. * Parameters:
  1517. * (String) name - The name for the element.
  1518. * (Array|Object) attrs - An optional array or object containing
  1519. * key/value pairs to use as element attributes. The object should
  1520. * be in the format {'key': 'value'} or {key: 'value'}. The array
  1521. * should have the format [['key1', 'value1'], ['key2', 'value2']].
  1522. * (String) text - The text child data for the element.
  1523. *
  1524. * Returns:
  1525. * A new XML DOM element.
  1526. */
  1527. xmlElement: function xmlElement(name) {
  1528. if (!name) {
  1529. return null;
  1530. }
  1531. var node = Strophe.xmlGenerator().createElement(name); // FIXME: this should throw errors if args are the wrong type or
  1532. // there are more than two optional args
  1533. for (var a = 1; a < arguments.length; a++) {
  1534. var arg = arguments[a];
  1535. if (!arg) {
  1536. continue;
  1537. }
  1538. if (typeof arg === "string" || typeof arg === "number") {
  1539. node.appendChild(Strophe.xmlTextNode(arg));
  1540. } else if (_typeof(arg) === "object" && typeof arg.sort === "function") {
  1541. for (var i = 0; i < arg.length; i++) {
  1542. var attr = arg[i];
  1543. if (_typeof(attr) === "object" && typeof attr.sort === "function" && attr[1] !== undefined && attr[1] !== null) {
  1544. node.setAttribute(attr[0], attr[1]);
  1545. }
  1546. }
  1547. } else if (_typeof(arg) === "object") {
  1548. for (var k in arg) {
  1549. if (Object.prototype.hasOwnProperty.call(arg, k) && arg[k] !== undefined && arg[k] !== null) {
  1550. node.setAttribute(k, arg[k]);
  1551. }
  1552. }
  1553. }
  1554. }
  1555. return node;
  1556. },
  1557. /* Function: xmlescape
  1558. * Excapes invalid xml characters.
  1559. *
  1560. * Parameters:
  1561. * (String) text - text to escape.
  1562. *
  1563. * Returns:
  1564. * Escaped text.
  1565. */
  1566. xmlescape: function xmlescape(text) {
  1567. text = text.replace(/\&/g, "&amp;");
  1568. text = text.replace(/</g, "&lt;");
  1569. text = text.replace(/>/g, "&gt;");
  1570. text = text.replace(/'/g, "&apos;");
  1571. text = text.replace(/"/g, "&quot;");
  1572. return text;
  1573. },
  1574. /* Function: xmlunescape
  1575. * Unexcapes invalid xml characters.
  1576. *
  1577. * Parameters:
  1578. * (String) text - text to unescape.
  1579. *
  1580. * Returns:
  1581. * Unescaped text.
  1582. */
  1583. xmlunescape: function xmlunescape(text) {
  1584. text = text.replace(/\&amp;/g, "&");
  1585. text = text.replace(/&lt;/g, "<");
  1586. text = text.replace(/&gt;/g, ">");
  1587. text = text.replace(/&apos;/g, "'");
  1588. text = text.replace(/&quot;/g, "\"");
  1589. return text;
  1590. },
  1591. /** Function: xmlTextNode
  1592. * Creates an XML DOM text node.
  1593. *
  1594. * Provides a cross implementation version of document.createTextNode.
  1595. *
  1596. * Parameters:
  1597. * (String) text - The content of the text node.
  1598. *
  1599. * Returns:
  1600. * A new XML DOM text node.
  1601. */
  1602. xmlTextNode: function xmlTextNode(text) {
  1603. return Strophe.xmlGenerator().createTextNode(text);
  1604. },
  1605. /** Function: xmlHtmlNode
  1606. * Creates an XML DOM html node.
  1607. *
  1608. * Parameters:
  1609. * (String) html - The content of the html node.
  1610. *
  1611. * Returns:
  1612. * A new XML DOM text node.
  1613. */
  1614. xmlHtmlNode: function xmlHtmlNode(html) {
  1615. var node; //ensure text is escaped
  1616. if (DOMParser) {
  1617. var parser = new DOMParser();
  1618. node = parser.parseFromString(html, "text/xml");
  1619. } else {
  1620. node = new ActiveXObject("Microsoft.XMLDOM");
  1621. node.async = "false";
  1622. node.loadXML(html);
  1623. }
  1624. return node;
  1625. },
  1626. /** Function: getText
  1627. * Get the concatenation of all text children of an element.
  1628. *
  1629. * Parameters:
  1630. * (XMLElement) elem - A DOM element.
  1631. *
  1632. * Returns:
  1633. * A String with the concatenated text of all text element children.
  1634. */
  1635. getText: function getText(elem) {
  1636. if (!elem) {
  1637. return null;
  1638. }
  1639. var str = "";
  1640. if (elem.childNodes.length === 0 && elem.nodeType === Strophe.ElementType.TEXT) {
  1641. str += elem.nodeValue;
  1642. }
  1643. for (var i = 0; i < elem.childNodes.length; i++) {
  1644. if (elem.childNodes[i].nodeType === Strophe.ElementType.TEXT) {
  1645. str += elem.childNodes[i].nodeValue;
  1646. }
  1647. }
  1648. return Strophe.xmlescape(str);
  1649. },
  1650. /** Function: copyElement
  1651. * Copy an XML DOM element.
  1652. *
  1653. * This function copies a DOM element and all its descendants and returns
  1654. * the new copy.
  1655. *
  1656. * Parameters:
  1657. * (XMLElement) elem - A DOM element.
  1658. *
  1659. * Returns:
  1660. * A new, copied DOM element tree.
  1661. */
  1662. copyElement: function copyElement(elem) {
  1663. var el;
  1664. if (elem.nodeType === Strophe.ElementType.NORMAL) {
  1665. el = Strophe.xmlElement(elem.tagName);
  1666. for (var i = 0; i < elem.attributes.length; i++) {
  1667. el.setAttribute(elem.attributes[i].nodeName, elem.attributes[i].value);
  1668. }
  1669. for (var _i = 0; _i < elem.childNodes.length; _i++) {
  1670. el.appendChild(Strophe.copyElement(elem.childNodes[_i]));
  1671. }
  1672. } else if (elem.nodeType === Strophe.ElementType.TEXT) {
  1673. el = Strophe.xmlGenerator().createTextNode(elem.nodeValue);
  1674. }
  1675. return el;
  1676. },
  1677. /** Function: createHtml
  1678. * Copy an HTML DOM element into an XML DOM.
  1679. *
  1680. * This function copies a DOM element and all its descendants and returns
  1681. * the new copy.
  1682. *
  1683. * Parameters:
  1684. * (HTMLElement) elem - A DOM element.
  1685. *
  1686. * Returns:
  1687. * A new, copied DOM element tree.
  1688. */
  1689. createHtml: function createHtml(elem) {
  1690. var el;
  1691. if (elem.nodeType === Strophe.ElementType.NORMAL) {
  1692. var tag = elem.nodeName.toLowerCase(); // XHTML tags must be lower case.
  1693. if (Strophe.XHTML.validTag(tag)) {
  1694. try {
  1695. el = Strophe.xmlElement(tag);
  1696. for (var i = 0; i < Strophe.XHTML.attributes[tag].length; i++) {
  1697. var attribute = Strophe.XHTML.attributes[tag][i];
  1698. var value = elem.getAttribute(attribute);
  1699. if (typeof value === 'undefined' || value === null || value === '' || value === false || value === 0) {
  1700. continue;
  1701. }
  1702. if (attribute === 'style' && _typeof(value) === 'object' && typeof value.cssText !== 'undefined') {
  1703. value = value.cssText; // we're dealing with IE, need to get CSS out
  1704. } // filter out invalid css styles
  1705. if (attribute === 'style') {
  1706. var css = [];
  1707. var cssAttrs = value.split(';');
  1708. for (var j = 0; j < cssAttrs.length; j++) {
  1709. var attr = cssAttrs[j].split(':');
  1710. var cssName = attr[0].replace(/^\s*/, "").replace(/\s*$/, "").toLowerCase();
  1711. if (Strophe.XHTML.validCSS(cssName)) {
  1712. var cssValue = attr[1].replace(/^\s*/, "").replace(/\s*$/, "");
  1713. css.push(cssName + ': ' + cssValue);
  1714. }
  1715. }
  1716. if (css.length > 0) {
  1717. value = css.join('; ');
  1718. el.setAttribute(attribute, value);
  1719. }
  1720. } else {
  1721. el.setAttribute(attribute, value);
  1722. }
  1723. }
  1724. for (var _i2 = 0; _i2 < elem.childNodes.length; _i2++) {
  1725. el.appendChild(Strophe.createHtml(elem.childNodes[_i2]));
  1726. }
  1727. } catch (e) {
  1728. // invalid elements
  1729. el = Strophe.xmlTextNode('');
  1730. }
  1731. } else {
  1732. el = Strophe.xmlGenerator().createDocumentFragment();
  1733. for (var _i3 = 0; _i3 < elem.childNodes.length; _i3++) {
  1734. el.appendChild(Strophe.createHtml(elem.childNodes[_i3]));
  1735. }
  1736. }
  1737. } else if (elem.nodeType === Strophe.ElementType.FRAGMENT) {
  1738. el = Strophe.xmlGenerator().createDocumentFragment();
  1739. for (var _i4 = 0; _i4 < elem.childNodes.length; _i4++) {
  1740. el.appendChild(Strophe.createHtml(elem.childNodes[_i4]));
  1741. }
  1742. } else if (elem.nodeType === Strophe.ElementType.TEXT) {
  1743. el = Strophe.xmlTextNode(elem.nodeValue);
  1744. }
  1745. return el;
  1746. },
  1747. /** Function: escapeNode
  1748. * Escape the node part (also called local part) of a JID.
  1749. *
  1750. * Parameters:
  1751. * (String) node - A node (or local part).
  1752. *
  1753. * Returns:
  1754. * An escaped node (or local part).
  1755. */
  1756. escapeNode: function escapeNode(node) {
  1757. if (typeof node !== "string") {
  1758. return node;
  1759. }
  1760. return node.replace(/^\s+|\s+$/g, '').replace(/\\/g, "\\5c").replace(/ /g, "\\20").replace(/\"/g, "\\22").replace(/\&/g, "\\26").replace(/\'/g, "\\27").replace(/\//g, "\\2f").replace(/:/g, "\\3a").replace(/</g, "\\3c").replace(/>/g, "\\3e").replace(/@/g, "\\40");
  1761. },
  1762. /** Function: unescapeNode
  1763. * Unescape a node part (also called local part) of a JID.
  1764. *
  1765. * Parameters:
  1766. * (String) node - A node (or local part).
  1767. *
  1768. * Returns:
  1769. * An unescaped node (or local part).
  1770. */
  1771. unescapeNode: function unescapeNode(node) {
  1772. if (typeof node !== "string") {
  1773. return node;
  1774. }
  1775. return node.replace(/\\20/g, " ").replace(/\\22/g, '"').replace(/\\26/g, "&").replace(/\\27/g, "'").replace(/\\2f/g, "/").replace(/\\3a/g, ":").replace(/\\3c/g, "<").replace(/\\3e/g, ">").replace(/\\40/g, "@").replace(/\\5c/g, "\\");
  1776. },
  1777. /** Function: getNodeFromJid
  1778. * Get the node portion of a JID String.
  1779. *
  1780. * Parameters:
  1781. * (String) jid - A JID.
  1782. *
  1783. * Returns:
  1784. * A String containing the node.
  1785. */
  1786. getNodeFromJid: function getNodeFromJid(jid) {
  1787. if (jid.indexOf("@") < 0) {
  1788. return null;
  1789. }
  1790. return jid.split("@")[0];
  1791. },
  1792. /** Function: getDomainFromJid
  1793. * Get the domain portion of a JID String.
  1794. *
  1795. * Parameters:
  1796. * (String) jid - A JID.
  1797. *
  1798. * Returns:
  1799. * A String containing the domain.
  1800. */
  1801. getDomainFromJid: function getDomainFromJid(jid) {
  1802. var bare = Strophe.getBareJidFromJid(jid);
  1803. if (bare.indexOf("@") < 0) {
  1804. return bare;
  1805. } else {
  1806. var parts = bare.split("@");
  1807. parts.splice(0, 1);
  1808. return parts.join('@');
  1809. }
  1810. },
  1811. /** Function: getResourceFromJid
  1812. * Get the resource portion of a JID String.
  1813. *
  1814. * Parameters:
  1815. * (String) jid - A JID.
  1816. *
  1817. * Returns:
  1818. * A String containing the resource.
  1819. */
  1820. getResourceFromJid: function getResourceFromJid(jid) {
  1821. var s = jid.split("/");
  1822. if (s.length < 2) {
  1823. return null;
  1824. }
  1825. s.splice(0, 1);
  1826. return s.join('/');
  1827. },
  1828. /** Function: getBareJidFromJid
  1829. * Get the bare JID from a JID String.
  1830. *
  1831. * Parameters:
  1832. * (String) jid - A JID.
  1833. *
  1834. * Returns:
  1835. * A String containing the bare JID.
  1836. */
  1837. getBareJidFromJid: function getBareJidFromJid(jid) {
  1838. return jid ? jid.split("/")[0] : null;
  1839. },
  1840. /** PrivateFunction: _handleError
  1841. * _Private_ function that properly logs an error to the console
  1842. */
  1843. _handleError: function _handleError(e) {
  1844. if (typeof e.stack !== "undefined") {
  1845. Strophe.fatal(e.stack);
  1846. }
  1847. if (e.sourceURL) {
  1848. Strophe.fatal("error: " + this.handler + " " + e.sourceURL + ":" + e.line + " - " + e.name + ": " + e.message);
  1849. } else if (e.fileName) {
  1850. Strophe.fatal("error: " + this.handler + " " + e.fileName + ":" + e.lineNumber + " - " + e.name + ": " + e.message);
  1851. } else {
  1852. Strophe.fatal("error: " + e.message);
  1853. }
  1854. },
  1855. /** Function: log
  1856. * User overrideable logging function.
  1857. *
  1858. * This function is called whenever the Strophe library calls any
  1859. * of the logging functions. The default implementation of this
  1860. * function logs only fatal errors. If client code wishes to handle the logging
  1861. * messages, it should override this with
  1862. * > Strophe.log = function (level, msg) {
  1863. * > (user code here)
  1864. * > };
  1865. *
  1866. * Please note that data sent and received over the wire is logged
  1867. * via Strophe.Connection.rawInput() and Strophe.Connection.rawOutput().
  1868. *
  1869. * The different levels and their meanings are
  1870. *
  1871. * DEBUG - Messages useful for debugging purposes.
  1872. * INFO - Informational messages. This is mostly information like
  1873. * 'disconnect was called' or 'SASL auth succeeded'.
  1874. * WARN - Warnings about potential problems. This is mostly used
  1875. * to report transient connection errors like request timeouts.
  1876. * ERROR - Some error occurred.
  1877. * FATAL - A non-recoverable fatal error occurred.
  1878. *
  1879. * Parameters:
  1880. * (Integer) level - The log level of the log message. This will
  1881. * be one of the values in Strophe.LogLevel.
  1882. * (String) msg - The log message.
  1883. */
  1884. log: function log(level, msg) {
  1885. if (level === this.LogLevel.FATAL && _typeof(window.console) === 'object' && typeof window.console.error === 'function') {
  1886. window.console.error(msg);
  1887. }
  1888. },
  1889. /** Function: debug
  1890. * Log a message at the Strophe.LogLevel.DEBUG level.
  1891. *
  1892. * Parameters:
  1893. * (String) msg - The log message.
  1894. */
  1895. debug: function debug(msg) {
  1896. this.log(this.LogLevel.DEBUG, msg);
  1897. },
  1898. /** Function: info
  1899. * Log a message at the Strophe.LogLevel.INFO level.
  1900. *
  1901. * Parameters:
  1902. * (String) msg - The log message.
  1903. */
  1904. info: function info(msg) {
  1905. this.log(this.LogLevel.INFO, msg);
  1906. },
  1907. /** Function: warn
  1908. * Log a message at the Strophe.LogLevel.WARN level.
  1909. *
  1910. * Parameters:
  1911. * (String) msg - The log message.
  1912. */
  1913. warn: function warn(msg) {
  1914. this.log(this.LogLevel.WARN, msg);
  1915. },
  1916. /** Function: error
  1917. * Log a message at the Strophe.LogLevel.ERROR level.
  1918. *
  1919. * Parameters:
  1920. * (String) msg - The log message.
  1921. */
  1922. error: function error(msg) {
  1923. this.log(this.LogLevel.ERROR, msg);
  1924. },
  1925. /** Function: fatal
  1926. * Log a message at the Strophe.LogLevel.FATAL level.
  1927. *
  1928. * Parameters:
  1929. * (String) msg - The log message.
  1930. */
  1931. fatal: function fatal(msg) {
  1932. this.log(this.LogLevel.FATAL, msg);
  1933. },
  1934. /** Function: serialize
  1935. * Render a DOM element and all descendants to a String.
  1936. *
  1937. * Parameters:
  1938. * (XMLElement) elem - A DOM element.
  1939. *
  1940. * Returns:
  1941. * The serialized element tree as a String.
  1942. */
  1943. serialize: function serialize(elem) {
  1944. if (!elem) {
  1945. return null;
  1946. }
  1947. if (typeof elem.tree === "function") {
  1948. elem = elem.tree();
  1949. }
  1950. var names = _toConsumableArray(Array(elem.attributes.length).keys()).map(function (i) {
  1951. return elem.attributes[i].nodeName;
  1952. });
  1953. names.sort();
  1954. var result = names.reduce(function (a, n) {
  1955. return "".concat(a, " ").concat(n, "=\"").concat(Strophe.xmlescape(elem.attributes.getNamedItem(n).value), "\"");
  1956. }, "<".concat(elem.nodeName));
  1957. if (elem.childNodes.length > 0) {
  1958. result += ">";
  1959. for (var i = 0; i < elem.childNodes.length; i++) {
  1960. var child = elem.childNodes[i];
  1961. switch (child.nodeType) {
  1962. case Strophe.ElementType.NORMAL:
  1963. // normal element, so recurse
  1964. result += Strophe.serialize(child);
  1965. break;
  1966. case Strophe.ElementType.TEXT:
  1967. // text element to escape values
  1968. result += Strophe.xmlescape(child.nodeValue);
  1969. break;
  1970. case Strophe.ElementType.CDATA:
  1971. // cdata section so don't escape values
  1972. result += "<![CDATA[" + child.nodeValue + "]]>";
  1973. }
  1974. }
  1975. result += "</" + elem.nodeName + ">";
  1976. } else {
  1977. result += "/>";
  1978. }
  1979. return result;
  1980. },
  1981. /** PrivateVariable: _requestId
  1982. * _Private_ variable that keeps track of the request ids for
  1983. * connections.
  1984. */
  1985. _requestId: 0,
  1986. /** PrivateVariable: Strophe.connectionPlugins
  1987. * _Private_ variable Used to store plugin names that need
  1988. * initialization on Strophe.Connection construction.
  1989. */
  1990. _connectionPlugins: {},
  1991. /** Function: addConnectionPlugin
  1992. * Extends the Strophe.Connection object with the given plugin.
  1993. *
  1994. * Parameters:
  1995. * (String) name - The name of the extension.
  1996. * (Object) ptype - The plugin's prototype.
  1997. */
  1998. addConnectionPlugin: function addConnectionPlugin(name, ptype) {
  1999. Strophe._connectionPlugins[name] = ptype;
  2000. }
  2001. };
  2002. /** Class: Strophe.Builder
  2003. * XML DOM builder.
  2004. *
  2005. * This object provides an interface similar to JQuery but for building
  2006. * DOM elements easily and rapidly. All the functions except for toString()
  2007. * and tree() return the object, so calls can be chained. Here's an
  2008. * example using the $iq() builder helper.
  2009. * > $iq({to: 'you', from: 'me', type: 'get', id: '1'})
  2010. * > .c('query', {xmlns: 'strophe:example'})
  2011. * > .c('example')
  2012. * > .toString()
  2013. *
  2014. * The above generates this XML fragment
  2015. * > <iq to='you' from='me' type='get' id='1'>
  2016. * > <query xmlns='strophe:example'>
  2017. * > <example/>
  2018. * > </query>
  2019. * > </iq>
  2020. * The corresponding DOM manipulations to get a similar fragment would be
  2021. * a lot more tedious and probably involve several helper variables.
  2022. *
  2023. * Since adding children makes new operations operate on the child, up()
  2024. * is provided to traverse up the tree. To add two children, do
  2025. * > builder.c('child1', ...).up().c('child2', ...)
  2026. * The next operation on the Builder will be relative to the second child.
  2027. */
  2028. /** Constructor: Strophe.Builder
  2029. * Create a Strophe.Builder object.
  2030. *
  2031. * The attributes should be passed in object notation. For example
  2032. * > let b = new Builder('message', {to: 'you', from: 'me'});
  2033. * or
  2034. * > let b = new Builder('messsage', {'xml:lang': 'en'});
  2035. *
  2036. * Parameters:
  2037. * (String) name - The name of the root element.
  2038. * (Object) attrs - The attributes for the root element in object notation.
  2039. *
  2040. * Returns:
  2041. * A new Strophe.Builder.
  2042. */
  2043. Strophe.Builder = function (name, attrs) {
  2044. // Set correct namespace for jabber:client elements
  2045. if (name === "presence" || name === "message" || name === "iq") {
  2046. if (attrs && !attrs.xmlns) {
  2047. attrs.xmlns = Strophe.NS.CLIENT;
  2048. } else if (!attrs) {
  2049. attrs = {
  2050. xmlns: Strophe.NS.CLIENT
  2051. };
  2052. }
  2053. } // Holds the tree being built.
  2054. this.nodeTree = Strophe.xmlElement(name, attrs); // Points to the current operation node.
  2055. this.node = this.nodeTree;
  2056. };
  2057. Strophe.Builder.prototype = {
  2058. /** Function: tree
  2059. * Return the DOM tree.
  2060. *
  2061. * This function returns the current DOM tree as an element object. This
  2062. * is suitable for passing to functions like Strophe.Connection.send().
  2063. *
  2064. * Returns:
  2065. * The DOM tree as a element object.
  2066. */
  2067. tree: function tree() {
  2068. return this.nodeTree;
  2069. },
  2070. /** Function: toString
  2071. * Serialize the DOM tree to a String.
  2072. *
  2073. * This function returns a string serialization of the current DOM
  2074. * tree. It is often used internally to pass data to a
  2075. * Strophe.Request object.
  2076. *
  2077. * Returns:
  2078. * The serialized DOM tree in a String.
  2079. */
  2080. toString: function toString() {
  2081. return Strophe.serialize(this.nodeTree);
  2082. },
  2083. /** Function: up
  2084. * Make the current parent element the new current element.
  2085. *
  2086. * This function is often used after c() to traverse back up the tree.
  2087. * For example, to add two children to the same element
  2088. * > builder.c('child1', {}).up().c('child2', {});
  2089. *
  2090. * Returns:
  2091. * The Stophe.Builder object.
  2092. */
  2093. up: function up() {
  2094. this.node = this.node.parentNode;
  2095. return this;
  2096. },
  2097. /** Function: root
  2098. * Make the root element the new current element.
  2099. *
  2100. * When at a deeply nested element in the tree, this function can be used
  2101. * to jump back to the root of the tree, instead of having to repeatedly
  2102. * call up().
  2103. *
  2104. * Returns:
  2105. * The Stophe.Builder object.
  2106. */
  2107. root: function root() {
  2108. this.node = this.nodeTree;
  2109. return this;
  2110. },
  2111. /** Function: attrs
  2112. * Add or modify attributes of the current element.
  2113. *
  2114. * The attributes should be passed in object notation. This function
  2115. * does not move the current element pointer.
  2116. *
  2117. * Parameters:
  2118. * (Object) moreattrs - The attributes to add/modify in object notation.
  2119. *
  2120. * Returns:
  2121. * The Strophe.Builder object.
  2122. */
  2123. attrs: function attrs(moreattrs) {
  2124. for (var k in moreattrs) {
  2125. if (Object.prototype.hasOwnProperty.call(moreattrs, k)) {
  2126. if (moreattrs[k] === undefined) {
  2127. this.node.removeAttribute(k);
  2128. } else {
  2129. this.node.setAttribute(k, moreattrs[k]);
  2130. }
  2131. }
  2132. }
  2133. return this;
  2134. },
  2135. /** Function: c
  2136. * Add a child to the current element and make it the new current
  2137. * element.
  2138. *
  2139. * This function moves the current element pointer to the child,
  2140. * unless text is provided. If you need to add another child, it
  2141. * is necessary to use up() to go back to the parent in the tree.
  2142. *
  2143. * Parameters:
  2144. * (String) name - The name of the child.
  2145. * (Object) attrs - The attributes of the child in object notation.
  2146. * (String) text - The text to add to the child.
  2147. *
  2148. * Returns:
  2149. * The Strophe.Builder object.
  2150. */
  2151. c: function c(name, attrs, text) {
  2152. var child = Strophe.xmlElement(name, attrs, text);
  2153. this.node.appendChild(child);
  2154. if (typeof text !== "string" && typeof text !== "number") {
  2155. this.node = child;
  2156. }
  2157. return this;
  2158. },
  2159. /** Function: cnode
  2160. * Add a child to the current element and make it the new current
  2161. * element.
  2162. *
  2163. * This function is the same as c() except that instead of using a
  2164. * name and an attributes object to create the child it uses an
  2165. * existing DOM element object.
  2166. *
  2167. * Parameters:
  2168. * (XMLElement) elem - A DOM element.
  2169. *
  2170. * Returns:
  2171. * The Strophe.Builder object.
  2172. */
  2173. cnode: function cnode(elem) {
  2174. var impNode;
  2175. var xmlGen = Strophe.xmlGenerator();
  2176. try {
  2177. impNode = xmlGen.importNode !== undefined;
  2178. } catch (e) {
  2179. impNode = false;
  2180. }
  2181. var newElem = impNode ? xmlGen.importNode(elem, true) : Strophe.copyElement(elem);
  2182. this.node.appendChild(newElem);
  2183. this.node = newElem;
  2184. return this;
  2185. },
  2186. /** Function: t
  2187. * Add a child text element.
  2188. *
  2189. * This *does not* make the child the new current element since there
  2190. * are no children of text elements.
  2191. *
  2192. * Parameters:
  2193. * (String) text - The text data to append to the current element.
  2194. *
  2195. * Returns:
  2196. * The Strophe.Builder object.
  2197. */
  2198. t: function t(text) {
  2199. var child = Strophe.xmlTextNode(text);
  2200. this.node.appendChild(child);
  2201. return this;
  2202. },
  2203. /** Function: h
  2204. * Replace current element contents with the HTML passed in.
  2205. *
  2206. * This *does not* make the child the new current element
  2207. *
  2208. * Parameters:
  2209. * (String) html - The html to insert as contents of current element.
  2210. *
  2211. * Returns:
  2212. * The Strophe.Builder object.
  2213. */
  2214. h: function h(html) {
  2215. var fragment = document.createElement('body'); // force the browser to try and fix any invalid HTML tags
  2216. fragment.innerHTML = html; // copy cleaned html into an xml dom
  2217. var xhtml = Strophe.createHtml(fragment);
  2218. while (xhtml.childNodes.length > 0) {
  2219. this.node.appendChild(xhtml.childNodes[0]);
  2220. }
  2221. return this;
  2222. }
  2223. };
  2224. /** PrivateClass: Strophe.Handler
  2225. * _Private_ helper class for managing stanza handlers.
  2226. *
  2227. * A Strophe.Handler encapsulates a user provided callback function to be
  2228. * executed when matching stanzas are received by the connection.
  2229. * Handlers can be either one-off or persistant depending on their
  2230. * return value. Returning true will cause a Handler to remain active, and
  2231. * returning false will remove the Handler.
  2232. *
  2233. * Users will not use Strophe.Handler objects directly, but instead they
  2234. * will use Strophe.Connection.addHandler() and
  2235. * Strophe.Connection.deleteHandler().
  2236. */
  2237. /** PrivateConstructor: Strophe.Handler
  2238. * Create and initialize a new Strophe.Handler.
  2239. *
  2240. * Parameters:
  2241. * (Function) handler - A function to be executed when the handler is run.
  2242. * (String) ns - The namespace to match.
  2243. * (String) name - The element name to match.
  2244. * (String) type - The element type to match.
  2245. * (String) id - The element id attribute to match.
  2246. * (String) from - The element from attribute to match.
  2247. * (Object) options - Handler options
  2248. *
  2249. * Returns:
  2250. * A new Strophe.Handler object.
  2251. */
  2252. Strophe.Handler = function (handler, ns, name, type, id, from, options) {
  2253. this.handler = handler;
  2254. this.ns = ns;
  2255. this.name = name;
  2256. this.type = type;
  2257. this.id = id;
  2258. this.options = options || {
  2259. 'matchBareFromJid': false,
  2260. 'ignoreNamespaceFragment': false
  2261. }; // BBB: Maintain backward compatibility with old `matchBare` option
  2262. if (this.options.matchBare) {
  2263. Strophe.warn('The "matchBare" option is deprecated, use "matchBareFromJid" instead.');
  2264. this.options.matchBareFromJid = this.options.matchBare;
  2265. delete this.options.matchBare;
  2266. }
  2267. if (this.options.matchBareFromJid) {
  2268. this.from = from ? Strophe.getBareJidFromJid(from) : null;
  2269. } else {
  2270. this.from = from;
  2271. } // whether the handler is a user handler or a system handler
  2272. this.user = true;
  2273. };
  2274. Strophe.Handler.prototype = {
  2275. /** PrivateFunction: getNamespace
  2276. * Returns the XML namespace attribute on an element.
  2277. * If `ignoreNamespaceFragment` was passed in for this handler, then the
  2278. * URL fragment will be stripped.
  2279. *
  2280. * Parameters:
  2281. * (XMLElement) elem - The XML element with the namespace.
  2282. *
  2283. * Returns:
  2284. * The namespace, with optionally the fragment stripped.
  2285. */
  2286. getNamespace: function getNamespace(elem) {
  2287. var elNamespace = elem.getAttribute("xmlns");
  2288. if (elNamespace && this.options.ignoreNamespaceFragment) {
  2289. elNamespace = elNamespace.split('#')[0];
  2290. }
  2291. return elNamespace;
  2292. },
  2293. /** PrivateFunction: namespaceMatch
  2294. * Tests if a stanza matches the namespace set for this Strophe.Handler.
  2295. *
  2296. * Parameters:
  2297. * (XMLElement) elem - The XML element to test.
  2298. *
  2299. * Returns:
  2300. * true if the stanza matches and false otherwise.
  2301. */
  2302. namespaceMatch: function namespaceMatch(elem) {
  2303. var _this = this;
  2304. var nsMatch = false;
  2305. if (!this.ns) {
  2306. return true;
  2307. } else {
  2308. Strophe.forEachChild(elem, null, function (elem) {
  2309. if (_this.getNamespace(elem) === _this.ns) {
  2310. nsMatch = true;
  2311. }
  2312. });
  2313. return nsMatch || this.getNamespace(elem) === this.ns;
  2314. }
  2315. },
  2316. /** PrivateFunction: isMatch
  2317. * Tests if a stanza matches the Strophe.Handler.
  2318. *
  2319. * Parameters:
  2320. * (XMLElement) elem - The XML element to test.
  2321. *
  2322. * Returns:
  2323. * true if the stanza matches and false otherwise.
  2324. */
  2325. isMatch: function isMatch(elem) {
  2326. var from = elem.getAttribute('from');
  2327. if (this.options.matchBareFromJid) {
  2328. from = Strophe.getBareJidFromJid(from);
  2329. }
  2330. var elem_type = elem.getAttribute("type");
  2331. if (this.namespaceMatch(elem) && (!this.name || Strophe.isTagEqual(elem, this.name)) && (!this.type || (Array.isArray(this.type) ? this.type.indexOf(elem_type) !== -1 : elem_type === this.type)) && (!this.id || elem.getAttribute("id") === this.id) && (!this.from || from === this.from)) {
  2332. return true;
  2333. }
  2334. return false;
  2335. },
  2336. /** PrivateFunction: run
  2337. * Run the callback on a matching stanza.
  2338. *
  2339. * Parameters:
  2340. * (XMLElement) elem - The DOM element that triggered the
  2341. * Strophe.Handler.
  2342. *
  2343. * Returns:
  2344. * A boolean indicating if the handler should remain active.
  2345. */
  2346. run: function run(elem) {
  2347. var result = null;
  2348. try {
  2349. result = this.handler(elem);
  2350. } catch (e) {
  2351. Strophe._handleError(e);
  2352. throw e;
  2353. }
  2354. return result;
  2355. },
  2356. /** PrivateFunction: toString
  2357. * Get a String representation of the Strophe.Handler object.
  2358. *
  2359. * Returns:
  2360. * A String.
  2361. */
  2362. toString: function toString() {
  2363. return "{Handler: " + this.handler + "(" + this.name + "," + this.id + "," + this.ns + ")}";
  2364. }
  2365. };
  2366. /** PrivateClass: Strophe.TimedHandler
  2367. * _Private_ helper class for managing timed handlers.
  2368. *
  2369. * A Strophe.TimedHandler encapsulates a user provided callback that
  2370. * should be called after a certain period of time or at regular
  2371. * intervals. The return value of the callback determines whether the
  2372. * Strophe.TimedHandler will continue to fire.
  2373. *
  2374. * Users will not use Strophe.TimedHandler objects directly, but instead
  2375. * they will use Strophe.Connection.addTimedHandler() and
  2376. * Strophe.Connection.deleteTimedHandler().
  2377. */
  2378. /** PrivateConstructor: Strophe.TimedHandler
  2379. * Create and initialize a new Strophe.TimedHandler object.
  2380. *
  2381. * Parameters:
  2382. * (Integer) period - The number of milliseconds to wait before the
  2383. * handler is called.
  2384. * (Function) handler - The callback to run when the handler fires. This
  2385. * function should take no arguments.
  2386. *
  2387. * Returns:
  2388. * A new Strophe.TimedHandler object.
  2389. */
  2390. Strophe.TimedHandler = function (period, handler) {
  2391. this.period = period;
  2392. this.handler = handler;
  2393. this.lastCalled = new Date().getTime();
  2394. this.user = true;
  2395. };
  2396. Strophe.TimedHandler.prototype = {
  2397. /** PrivateFunction: run
  2398. * Run the callback for the Strophe.TimedHandler.
  2399. *
  2400. * Returns:
  2401. * true if the Strophe.TimedHandler should be called again, and false
  2402. * otherwise.
  2403. */
  2404. run: function run() {
  2405. this.lastCalled = new Date().getTime();
  2406. return this.handler();
  2407. },
  2408. /** PrivateFunction: reset
  2409. * Reset the last called time for the Strophe.TimedHandler.
  2410. */
  2411. reset: function reset() {
  2412. this.lastCalled = new Date().getTime();
  2413. },
  2414. /** PrivateFunction: toString
  2415. * Get a string representation of the Strophe.TimedHandler object.
  2416. *
  2417. * Returns:
  2418. * The string representation.
  2419. */
  2420. toString: function toString() {
  2421. return "{TimedHandler: " + this.handler + "(" + this.period + ")}";
  2422. }
  2423. };
  2424. /** Class: Strophe.Connection
  2425. * XMPP Connection manager.
  2426. *
  2427. * This class is the main part of Strophe. It manages a BOSH or websocket
  2428. * connection to an XMPP server and dispatches events to the user callbacks
  2429. * as data arrives. It supports SASL PLAIN, SASL DIGEST-MD5, SASL SCRAM-SHA1
  2430. * and legacy authentication.
  2431. *
  2432. * After creating a Strophe.Connection object, the user will typically
  2433. * call connect() with a user supplied callback to handle connection level
  2434. * events like authentication failure, disconnection, or connection
  2435. * complete.
  2436. *
  2437. * The user will also have several event handlers defined by using
  2438. * addHandler() and addTimedHandler(). These will allow the user code to
  2439. * respond to interesting stanzas or do something periodically with the
  2440. * connection. These handlers will be active once authentication is
  2441. * finished.
  2442. *
  2443. * To send data to the connection, use send().
  2444. */
  2445. /** Constructor: Strophe.Connection
  2446. * Create and initialize a Strophe.Connection object.
  2447. *
  2448. * The transport-protocol for this connection will be chosen automatically
  2449. * based on the given service parameter. URLs starting with "ws://" or
  2450. * "wss://" will use WebSockets, URLs starting with "http://", "https://"
  2451. * or without a protocol will use BOSH.
  2452. *
  2453. * To make Strophe connect to the current host you can leave out the protocol
  2454. * and host part and just pass the path, e.g.
  2455. *
  2456. * > let conn = new Strophe.Connection("/http-bind/");
  2457. *
  2458. * Options common to both Websocket and BOSH:
  2459. * ------------------------------------------
  2460. *
  2461. * cookies:
  2462. *
  2463. * The *cookies* option allows you to pass in cookies to be added to the
  2464. * document. These cookies will then be included in the BOSH XMLHttpRequest
  2465. * or in the websocket connection.
  2466. *
  2467. * The passed in value must be a map of cookie names and string values.
  2468. *
  2469. * > { "myCookie": {
  2470. * > "value": "1234",
  2471. * > "domain": ".example.org",
  2472. * > "path": "/",
  2473. * > "expires": expirationDate
  2474. * > }
  2475. * > }
  2476. *
  2477. * Note that cookies can't be set in this way for other domains (i.e. cross-domain).
  2478. * Those cookies need to be set under those domains, for example they can be
  2479. * set server-side by making a XHR call to that domain to ask it to set any
  2480. * necessary cookies.
  2481. *
  2482. * mechanisms:
  2483. *
  2484. * The *mechanisms* option allows you to specify the SASL mechanisms that this
  2485. * instance of Strophe.Connection (and therefore your XMPP client) will
  2486. * support.
  2487. *
  2488. * The value must be an array of objects with Strophe.SASLMechanism
  2489. * prototypes.
  2490. *
  2491. * If nothing is specified, then the following mechanisms (and their
  2492. * priorities) are registered:
  2493. *
  2494. * SCRAM-SHA1 - 70
  2495. * DIGEST-MD5 - 60
  2496. * PLAIN - 50
  2497. * OAUTH-BEARER - 40
  2498. * OAUTH-2 - 30
  2499. * ANONYMOUS - 20
  2500. * EXTERNAL - 10
  2501. *
  2502. * WebSocket options:
  2503. * ------------------
  2504. *
  2505. * If you want to connect to the current host with a WebSocket connection you
  2506. * can tell Strophe to use WebSockets through a "protocol" attribute in the
  2507. * optional options parameter. Valid values are "ws" for WebSocket and "wss"
  2508. * for Secure WebSocket.
  2509. * So to connect to "wss://CURRENT_HOSTNAME/xmpp-websocket" you would call
  2510. *
  2511. * > let conn = new Strophe.Connection("/xmpp-websocket/", {protocol: "wss"});
  2512. *
  2513. * Note that relative URLs _NOT_ starting with a "/" will also include the path
  2514. * of the current site.
  2515. *
  2516. * Also because downgrading security is not permitted by browsers, when using
  2517. * relative URLs both BOSH and WebSocket connections will use their secure
  2518. * variants if the current connection to the site is also secure (https).
  2519. *
  2520. * BOSH options:
  2521. * -------------
  2522. *
  2523. * By adding "sync" to the options, you can control if requests will
  2524. * be made synchronously or not. The default behaviour is asynchronous.
  2525. * If you want to make requests synchronous, make "sync" evaluate to true.
  2526. * > let conn = new Strophe.Connection("/http-bind/", {sync: true});
  2527. *
  2528. * You can also toggle this on an already established connection.
  2529. * > conn.options.sync = true;
  2530. *
  2531. * The *customHeaders* option can be used to provide custom HTTP headers to be
  2532. * included in the XMLHttpRequests made.
  2533. *
  2534. * The *keepalive* option can be used to instruct Strophe to maintain the
  2535. * current BOSH session across interruptions such as webpage reloads.
  2536. *
  2537. * It will do this by caching the sessions tokens in sessionStorage, and when
  2538. * "restore" is called it will check whether there are cached tokens with
  2539. * which it can resume an existing session.
  2540. *
  2541. * The *withCredentials* option should receive a Boolean value and is used to
  2542. * indicate wether cookies should be included in ajax requests (by default
  2543. * they're not).
  2544. * Set this value to true if you are connecting to a BOSH service
  2545. * and for some reason need to send cookies to it.
  2546. * In order for this to work cross-domain, the server must also enable
  2547. * credentials by setting the Access-Control-Allow-Credentials response header
  2548. * to "true". For most usecases however this setting should be false (which
  2549. * is the default).
  2550. * Additionally, when using Access-Control-Allow-Credentials, the
  2551. * Access-Control-Allow-Origin header can't be set to the wildcard "*", but
  2552. * instead must be restricted to actual domains.
  2553. *
  2554. * The *contentType* option can be set to change the default Content-Type
  2555. * of "text/xml; charset=utf-8", which can be useful to reduce the amount of
  2556. * CORS preflight requests that are sent to the server.
  2557. *
  2558. * Parameters:
  2559. * (String) service - The BOSH or WebSocket service URL.
  2560. * (Object) options - A hash of configuration options
  2561. *
  2562. * Returns:
  2563. * A new Strophe.Connection object.
  2564. */
  2565. Strophe.Connection = function (service, options) {
  2566. var _this2 = this; // The service URL
  2567. this.service = service; // Configuration options
  2568. this.options = options || {};
  2569. var proto = this.options.protocol || ""; // Select protocal based on service or options
  2570. if (service.indexOf("ws:") === 0 || service.indexOf("wss:") === 0 || proto.indexOf("ws") === 0) {
  2571. this._proto = new Strophe.Websocket(this);
  2572. } else {
  2573. this._proto = new Strophe.Bosh(this);
  2574. }
  2575. /* The connected JID. */
  2576. this.jid = "";
  2577. /* the JIDs domain */
  2578. this.domain = null;
  2579. /* stream:features */
  2580. this.features = null; // SASL
  2581. this._sasl_data = {};
  2582. this.do_session = false;
  2583. this.do_bind = false; // handler lists
  2584. this.timedHandlers = [];
  2585. this.handlers = [];
  2586. this.removeTimeds = [];
  2587. this.removeHandlers = [];
  2588. this.addTimeds = [];
  2589. this.addHandlers = [];
  2590. this.protocolErrorHandlers = {
  2591. 'HTTP': {},
  2592. 'websocket': {}
  2593. };
  2594. this._idleTimeout = null;
  2595. this._disconnectTimeout = null;
  2596. this.authenticated = false;
  2597. this.connected = false;
  2598. this.disconnecting = false;
  2599. this.do_authentication = true;
  2600. this.paused = false;
  2601. this.restored = false;
  2602. this._data = [];
  2603. this._uniqueId = 0;
  2604. this._sasl_success_handler = null;
  2605. this._sasl_failure_handler = null;
  2606. this._sasl_challenge_handler = null; // Max retries before disconnecting
  2607. this.maxRetries = 5; // Call onIdle callback every 1/10th of a second
  2608. this._idleTimeout = setTimeout(function () {
  2609. return _this2._onIdle();
  2610. }, 100);
  2611. utils__WEBPACK_IMPORTED_MODULE_2__["default"].addCookies(this.options.cookies);
  2612. this.registerSASLMechanisms(this.options.mechanisms); // initialize plugins
  2613. for (var k in Strophe._connectionPlugins) {
  2614. if (Object.prototype.hasOwnProperty.call(Strophe._connectionPlugins, k)) {
  2615. var F = function F() {};
  2616. F.prototype = Strophe._connectionPlugins[k];
  2617. this[k] = new F();
  2618. this[k].init(this);
  2619. }
  2620. }
  2621. };
  2622. Strophe.Connection.prototype = {
  2623. /** Function: reset
  2624. * Reset the connection.
  2625. *
  2626. * This function should be called after a connection is disconnected
  2627. * before that connection is reused.
  2628. */
  2629. reset: function reset() {
  2630. this._proto._reset(); // SASL
  2631. this.do_session = false;
  2632. this.do_bind = false; // handler lists
  2633. this.timedHandlers = [];
  2634. this.handlers = [];
  2635. this.removeTimeds = [];
  2636. this.removeHandlers = [];
  2637. this.addTimeds = [];
  2638. this.addHandlers = [];
  2639. this.authenticated = false;
  2640. this.connected = false;
  2641. this.disconnecting = false;
  2642. this.restored = false;
  2643. this._data = [];
  2644. this._requests = [];
  2645. this._uniqueId = 0;
  2646. },
  2647. /** Function: pause
  2648. * Pause the request manager.
  2649. *
  2650. * This will prevent Strophe from sending any more requests to the
  2651. * server. This is very useful for temporarily pausing
  2652. * BOSH-Connections while a lot of send() calls are happening quickly.
  2653. * This causes Strophe to send the data in a single request, saving
  2654. * many request trips.
  2655. */
  2656. pause: function pause() {
  2657. this.paused = true;
  2658. },
  2659. /** Function: resume
  2660. * Resume the request manager.
  2661. *
  2662. * This resumes after pause() has been called.
  2663. */
  2664. resume: function resume() {
  2665. this.paused = false;
  2666. },
  2667. /** Function: getUniqueId
  2668. * Generate a unique ID for use in <iq/> elements.
  2669. *
  2670. * All <iq/> stanzas are required to have unique id attributes. This
  2671. * function makes creating these easy. Each connection instance has
  2672. * a counter which starts from zero, and the value of this counter
  2673. * plus a colon followed by the suffix becomes the unique id. If no
  2674. * suffix is supplied, the counter is used as the unique id.
  2675. *
  2676. * Suffixes are used to make debugging easier when reading the stream
  2677. * data, and their use is recommended. The counter resets to 0 for
  2678. * every new connection for the same reason. For connections to the
  2679. * same server that authenticate the same way, all the ids should be
  2680. * the same, which makes it easy to see changes. This is useful for
  2681. * automated testing as well.
  2682. *
  2683. * Parameters:
  2684. * (String) suffix - A optional suffix to append to the id.
  2685. *
  2686. * Returns:
  2687. * A unique string to be used for the id attribute.
  2688. */
  2689. getUniqueId: function getUniqueId(suffix) {
  2690. var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
  2691. var r = Math.random() * 16 | 0,
  2692. v = c === 'x' ? r : r & 0x3 | 0x8;
  2693. return v.toString(16);
  2694. });
  2695. if (typeof suffix === "string" || typeof suffix === "number") {
  2696. return uuid + ":" + suffix;
  2697. } else {
  2698. return uuid + "";
  2699. }
  2700. },
  2701. /** Function: addProtocolErrorHandler
  2702. * Register a handler function for when a protocol (websocker or HTTP)
  2703. * error occurs.
  2704. *
  2705. * NOTE: Currently only HTTP errors for BOSH requests are handled.
  2706. * Patches that handle websocket errors would be very welcome.
  2707. *
  2708. * Parameters:
  2709. * (String) protocol - 'HTTP' or 'websocket'
  2710. * (Integer) status_code - Error status code (e.g 500, 400 or 404)
  2711. * (Function) callback - Function that will fire on Http error
  2712. *
  2713. * Example:
  2714. * function onError(err_code){
  2715. * //do stuff
  2716. * }
  2717. *
  2718. * let conn = Strophe.connect('http://example.com/http-bind');
  2719. * conn.addProtocolErrorHandler('HTTP', 500, onError);
  2720. * // Triggers HTTP 500 error and onError handler will be called
  2721. * conn.connect('user_jid@incorrect_jabber_host', 'secret', onConnect);
  2722. */
  2723. addProtocolErrorHandler: function addProtocolErrorHandler(protocol, status_code, callback) {
  2724. this.protocolErrorHandlers[protocol][status_code] = callback;
  2725. },
  2726. /** Function: connect
  2727. * Starts the connection process.
  2728. *
  2729. * As the connection process proceeds, the user supplied callback will
  2730. * be triggered multiple times with status updates. The callback
  2731. * should take two arguments - the status code and the error condition.
  2732. *
  2733. * The status code will be one of the values in the Strophe.Status
  2734. * constants. The error condition will be one of the conditions
  2735. * defined in RFC 3920 or the condition 'strophe-parsererror'.
  2736. *
  2737. * The Parameters _wait_, _hold_ and _route_ are optional and only relevant
  2738. * for BOSH connections. Please see XEP 124 for a more detailed explanation
  2739. * of the optional parameters.
  2740. *
  2741. * Parameters:
  2742. * (String) jid - The user's JID. This may be a bare JID,
  2743. * or a full JID. If a node is not supplied, SASL OAUTHBEARER or
  2744. * SASL ANONYMOUS authentication will be attempted (OAUTHBEARER will
  2745. * process the provided password value as an access token).
  2746. * (String) pass - The user's password.
  2747. * (Function) callback - The connect callback function.
  2748. * (Integer) wait - The optional HTTPBIND wait value. This is the
  2749. * time the server will wait before returning an empty result for
  2750. * a request. The default setting of 60 seconds is recommended.
  2751. * (Integer) hold - The optional HTTPBIND hold value. This is the
  2752. * number of connections the server will hold at one time. This
  2753. * should almost always be set to 1 (the default).
  2754. * (String) route - The optional route value.
  2755. * (String) authcid - The optional alternative authentication identity
  2756. * (username) if intending to impersonate another user.
  2757. * When using the SASL-EXTERNAL authentication mechanism, for example
  2758. * with client certificates, then the authcid value is used to
  2759. * determine whether an authorization JID (authzid) should be sent to
  2760. * the server. The authzid should not be sent to the server if the
  2761. * authzid and authcid are the same. So to prevent it from being sent
  2762. * (for example when the JID is already contained in the client
  2763. * certificate), set authcid to that same JID. See XEP-178 for more
  2764. * details.
  2765. */
  2766. connect: function connect(jid, pass, callback, wait, hold, route, authcid) {
  2767. this.jid = jid;
  2768. /** Variable: authzid
  2769. * Authorization identity.
  2770. */
  2771. this.authzid = Strophe.getBareJidFromJid(this.jid);
  2772. /** Variable: authcid
  2773. * Authentication identity (User name).
  2774. */
  2775. this.authcid = authcid || Strophe.getNodeFromJid(this.jid);
  2776. /** Variable: pass
  2777. * Authentication identity (User password).
  2778. */
  2779. this.pass = pass;
  2780. /** Variable: servtype
  2781. * Digest MD5 compatibility.
  2782. */
  2783. this.servtype = "xmpp";
  2784. this.connect_callback = callback;
  2785. this.disconnecting = false;
  2786. this.connected = false;
  2787. this.authenticated = false;
  2788. this.restored = false; // parse jid for domain
  2789. this.domain = Strophe.getDomainFromJid(this.jid);
  2790. this._changeConnectStatus(Strophe.Status.CONNECTING, null);
  2791. this._proto._connect(wait, hold, route);
  2792. },
  2793. /** Function: attach
  2794. * Attach to an already created and authenticated BOSH session.
  2795. *
  2796. * This function is provided to allow Strophe to attach to BOSH
  2797. * sessions which have been created externally, perhaps by a Web
  2798. * application. This is often used to support auto-login type features
  2799. * without putting user credentials into the page.
  2800. *
  2801. * Parameters:
  2802. * (String) jid - The full JID that is bound by the session.
  2803. * (String) sid - The SID of the BOSH session.
  2804. * (String) rid - The current RID of the BOSH session. This RID
  2805. * will be used by the next request.
  2806. * (Function) callback The connect callback function.
  2807. * (Integer) wait - The optional HTTPBIND wait value. This is the
  2808. * time the server will wait before returning an empty result for
  2809. * a request. The default setting of 60 seconds is recommended.
  2810. * Other settings will require tweaks to the Strophe.TIMEOUT value.
  2811. * (Integer) hold - The optional HTTPBIND hold value. This is the
  2812. * number of connections the server will hold at one time. This
  2813. * should almost always be set to 1 (the default).
  2814. * (Integer) wind - The optional HTTBIND window value. This is the
  2815. * allowed range of request ids that are valid. The default is 5.
  2816. */
  2817. attach: function attach(jid, sid, rid, callback, wait, hold, wind) {
  2818. if (this._proto instanceof Strophe.Bosh) {
  2819. this._proto._attach(jid, sid, rid, callback, wait, hold, wind);
  2820. } else {
  2821. var error = new Error('The "attach" method can only be used with a BOSH connection.');
  2822. error.name = 'StropheSessionError';
  2823. throw error;
  2824. }
  2825. },
  2826. /** Function: restore
  2827. * Attempt to restore a cached BOSH session.
  2828. *
  2829. * This function is only useful in conjunction with providing the
  2830. * "keepalive":true option when instantiating a new Strophe.Connection.
  2831. *
  2832. * When "keepalive" is set to true, Strophe will cache the BOSH tokens
  2833. * RID (Request ID) and SID (Session ID) and then when this function is
  2834. * called, it will attempt to restore the session from those cached
  2835. * tokens.
  2836. *
  2837. * This function must therefore be called instead of connect or attach.
  2838. *
  2839. * For an example on how to use it, please see examples/restore.js
  2840. *
  2841. * Parameters:
  2842. * (String) jid - The user's JID. This may be a bare JID or a full JID.
  2843. * (Function) callback - The connect callback function.
  2844. * (Integer) wait - The optional HTTPBIND wait value. This is the
  2845. * time the server will wait before returning an empty result for
  2846. * a request. The default setting of 60 seconds is recommended.
  2847. * (Integer) hold - The optional HTTPBIND hold value. This is the
  2848. * number of connections the server will hold at one time. This
  2849. * should almost always be set to 1 (the default).
  2850. * (Integer) wind - The optional HTTBIND window value. This is the
  2851. * allowed range of request ids that are valid. The default is 5.
  2852. */
  2853. restore: function restore(jid, callback, wait, hold, wind) {
  2854. if (this._sessionCachingSupported()) {
  2855. this._proto._restore(jid, callback, wait, hold, wind);
  2856. } else {
  2857. var error = new Error('The "restore" method can only be used with a BOSH connection.');
  2858. error.name = 'StropheSessionError';
  2859. throw error;
  2860. }
  2861. },
  2862. /** PrivateFunction: _sessionCachingSupported
  2863. * Checks whether sessionStorage and JSON are supported and whether we're
  2864. * using BOSH.
  2865. */
  2866. _sessionCachingSupported: function _sessionCachingSupported() {
  2867. if (this._proto instanceof Strophe.Bosh) {
  2868. if (!JSON) {
  2869. return false;
  2870. }
  2871. try {
  2872. sessionStorage.setItem('_strophe_', '_strophe_');
  2873. sessionStorage.removeItem('_strophe_');
  2874. } catch (e) {
  2875. return false;
  2876. }
  2877. return true;
  2878. }
  2879. return false;
  2880. },
  2881. /** Function: xmlInput
  2882. * User overrideable function that receives XML data coming into the
  2883. * connection.
  2884. *
  2885. * The default function does nothing. User code can override this with
  2886. * > Strophe.Connection.xmlInput = function (elem) {
  2887. * > (user code)
  2888. * > };
  2889. *
  2890. * Due to limitations of current Browsers' XML-Parsers the opening and closing
  2891. * <stream> tag for WebSocket-Connoctions will be passed as selfclosing here.
  2892. *
  2893. * BOSH-Connections will have all stanzas wrapped in a <body> tag. See
  2894. * <Strophe.Bosh.strip> if you want to strip this tag.
  2895. *
  2896. * Parameters:
  2897. * (XMLElement) elem - The XML data received by the connection.
  2898. */
  2899. /* jshint unused:false */
  2900. xmlInput: function xmlInput(elem) {
  2901. return;
  2902. },
  2903. /* jshint unused:true */
  2904. /** Function: xmlOutput
  2905. * User overrideable function that receives XML data sent to the
  2906. * connection.
  2907. *
  2908. * The default function does nothing. User code can override this with
  2909. * > Strophe.Connection.xmlOutput = function (elem) {
  2910. * > (user code)
  2911. * > };
  2912. *
  2913. * Due to limitations of current Browsers' XML-Parsers the opening and closing
  2914. * <stream> tag for WebSocket-Connoctions will be passed as selfclosing here.
  2915. *
  2916. * BOSH-Connections will have all stanzas wrapped in a <body> tag. See
  2917. * <Strophe.Bosh.strip> if you want to strip this tag.
  2918. *
  2919. * Parameters:
  2920. * (XMLElement) elem - The XMLdata sent by the connection.
  2921. */
  2922. /* jshint unused:false */
  2923. xmlOutput: function xmlOutput(elem) {
  2924. return;
  2925. },
  2926. /* jshint unused:true */
  2927. /** Function: rawInput
  2928. * User overrideable function that receives raw data coming into the
  2929. * connection.
  2930. *
  2931. * The default function does nothing. User code can override this with
  2932. * > Strophe.Connection.rawInput = function (data) {
  2933. * > (user code)
  2934. * > };
  2935. *
  2936. * Parameters:
  2937. * (String) data - The data received by the connection.
  2938. */
  2939. /* jshint unused:false */
  2940. rawInput: function rawInput(data) {
  2941. return;
  2942. },
  2943. /* jshint unused:true */
  2944. /** Function: rawOutput
  2945. * User overrideable function that receives raw data sent to the
  2946. * connection.
  2947. *
  2948. * The default function does nothing. User code can override this with
  2949. * > Strophe.Connection.rawOutput = function (data) {
  2950. * > (user code)
  2951. * > };
  2952. *
  2953. * Parameters:
  2954. * (String) data - The data sent by the connection.
  2955. */
  2956. /* jshint unused:false */
  2957. rawOutput: function rawOutput(data) {
  2958. return;
  2959. },
  2960. /* jshint unused:true */
  2961. /** Function: nextValidRid
  2962. * User overrideable function that receives the new valid rid.
  2963. *
  2964. * The default function does nothing. User code can override this with
  2965. * > Strophe.Connection.nextValidRid = function (rid) {
  2966. * > (user code)
  2967. * > };
  2968. *
  2969. * Parameters:
  2970. * (Number) rid - The next valid rid
  2971. */
  2972. /* jshint unused:false */
  2973. nextValidRid: function nextValidRid(rid) {
  2974. return;
  2975. },
  2976. /* jshint unused:true */
  2977. /** Function: send
  2978. * Send a stanza.
  2979. *
  2980. * This function is called to push data onto the send queue to
  2981. * go out over the wire. Whenever a request is sent to the BOSH
  2982. * server, all pending data is sent and the queue is flushed.
  2983. *
  2984. * Parameters:
  2985. * (XMLElement |
  2986. * [XMLElement] |
  2987. * Strophe.Builder) elem - The stanza to send.
  2988. */
  2989. send: function send(elem) {
  2990. if (elem === null) {
  2991. return;
  2992. }
  2993. if (typeof elem.sort === "function") {
  2994. for (var i = 0; i < elem.length; i++) {
  2995. this._queueData(elem[i]);
  2996. }
  2997. } else if (typeof elem.tree === "function") {
  2998. this._queueData(elem.tree());
  2999. } else {
  3000. this._queueData(elem);
  3001. }
  3002. this._proto._send();
  3003. },
  3004. /** Function: flush
  3005. * Immediately send any pending outgoing data.
  3006. *
  3007. * Normally send() queues outgoing data until the next idle period
  3008. * (100ms), which optimizes network use in the common cases when
  3009. * several send()s are called in succession. flush() can be used to
  3010. * immediately send all pending data.
  3011. */
  3012. flush: function flush() {
  3013. // cancel the pending idle period and run the idle function
  3014. // immediately
  3015. clearTimeout(this._idleTimeout);
  3016. this._onIdle();
  3017. },
  3018. /** Function: sendPresence
  3019. * Helper function to send presence stanzas. The main benefit is for
  3020. * sending presence stanzas for which you expect a responding presence
  3021. * stanza with the same id (for example when leaving a chat room).
  3022. *
  3023. * Parameters:
  3024. * (XMLElement) elem - The stanza to send.
  3025. * (Function) callback - The callback function for a successful request.
  3026. * (Function) errback - The callback function for a failed or timed
  3027. * out request. On timeout, the stanza will be null.
  3028. * (Integer) timeout - The time specified in milliseconds for a
  3029. * timeout to occur.
  3030. *
  3031. * Returns:
  3032. * The id used to send the presence.
  3033. */
  3034. sendPresence: function sendPresence(elem, callback, errback, timeout) {
  3035. var _this3 = this;
  3036. var timeoutHandler = null;
  3037. if (typeof elem.tree === "function") {
  3038. elem = elem.tree();
  3039. }
  3040. var id = elem.getAttribute('id');
  3041. if (!id) {
  3042. // inject id if not found
  3043. id = this.getUniqueId("sendPresence");
  3044. elem.setAttribute("id", id);
  3045. }
  3046. if (typeof callback === "function" || typeof errback === "function") {
  3047. var handler = this.addHandler(function (stanza) {
  3048. // remove timeout handler if there is one
  3049. if (timeoutHandler) {
  3050. _this3.deleteTimedHandler(timeoutHandler);
  3051. }
  3052. if (stanza.getAttribute('type') === 'error') {
  3053. if (errback) {
  3054. errback(stanza);
  3055. }
  3056. } else if (callback) {
  3057. callback(stanza);
  3058. }
  3059. }, null, 'presence', null, id); // if timeout specified, set up a timeout handler.
  3060. if (timeout) {
  3061. timeoutHandler = this.addTimedHandler(timeout, function () {
  3062. // get rid of normal handler
  3063. _this3.deleteHandler(handler); // call errback on timeout with null stanza
  3064. if (errback) {
  3065. errback(null);
  3066. }
  3067. return false;
  3068. });
  3069. }
  3070. }
  3071. this.send(elem);
  3072. return id;
  3073. },
  3074. /** Function: sendIQ
  3075. * Helper function to send IQ stanzas.
  3076. *
  3077. * Parameters:
  3078. * (XMLElement) elem - The stanza to send.
  3079. * (Function) callback - The callback function for a successful request.
  3080. * (Function) errback - The callback function for a failed or timed
  3081. * out request. On timeout, the stanza will be null.
  3082. * (Integer) timeout - The time specified in milliseconds for a
  3083. * timeout to occur.
  3084. *
  3085. * Returns:
  3086. * The id used to send the IQ.
  3087. */
  3088. sendIQ: function sendIQ(elem, callback, errback, timeout) {
  3089. var _this4 = this;
  3090. var timeoutHandler = null;
  3091. if (typeof elem.tree === "function") {
  3092. elem = elem.tree();
  3093. }
  3094. var id = elem.getAttribute('id');
  3095. if (!id) {
  3096. // inject id if not found
  3097. id = this.getUniqueId("sendIQ");
  3098. elem.setAttribute("id", id);
  3099. }
  3100. if (typeof callback === "function" || typeof errback === "function") {
  3101. var handler = this.addHandler(function (stanza) {
  3102. // remove timeout handler if there is one
  3103. if (timeoutHandler) {
  3104. _this4.deleteTimedHandler(timeoutHandler);
  3105. }
  3106. var iqtype = stanza.getAttribute('type');
  3107. if (iqtype === 'result') {
  3108. if (callback) {
  3109. callback(stanza);
  3110. }
  3111. } else if (iqtype === 'error') {
  3112. if (errback) {
  3113. errback(stanza);
  3114. }
  3115. } else {
  3116. var error = new Error("Got bad IQ type of ".concat(iqtype));
  3117. error.name = "StropheError";
  3118. throw error;
  3119. }
  3120. }, null, 'iq', ['error', 'result'], id); // if timeout specified, set up a timeout handler.
  3121. if (timeout) {
  3122. timeoutHandler = this.addTimedHandler(timeout, function () {
  3123. // get rid of normal handler
  3124. _this4.deleteHandler(handler); // call errback on timeout with null stanza
  3125. if (errback) {
  3126. errback(null);
  3127. }
  3128. return false;
  3129. });
  3130. }
  3131. }
  3132. this.send(elem);
  3133. return id;
  3134. },
  3135. /** PrivateFunction: _queueData
  3136. * Queue outgoing data for later sending. Also ensures that the data
  3137. * is a DOMElement.
  3138. */
  3139. _queueData: function _queueData(element) {
  3140. if (element === null || !element.tagName || !element.childNodes) {
  3141. var error = new Error("Cannot queue non-DOMElement.");
  3142. error.name = "StropheError";
  3143. throw error;
  3144. }
  3145. this._data.push(element);
  3146. },
  3147. /** PrivateFunction: _sendRestart
  3148. * Send an xmpp:restart stanza.
  3149. */
  3150. _sendRestart: function _sendRestart() {
  3151. var _this5 = this;
  3152. this._data.push("restart");
  3153. this._proto._sendRestart();
  3154. this._idleTimeout = setTimeout(function () {
  3155. return _this5._onIdle();
  3156. }, 100);
  3157. },
  3158. /** Function: addTimedHandler
  3159. * Add a timed handler to the connection.
  3160. *
  3161. * This function adds a timed handler. The provided handler will
  3162. * be called every period milliseconds until it returns false,
  3163. * the connection is terminated, or the handler is removed. Handlers
  3164. * that wish to continue being invoked should return true.
  3165. *
  3166. * Because of method binding it is necessary to save the result of
  3167. * this function if you wish to remove a handler with
  3168. * deleteTimedHandler().
  3169. *
  3170. * Note that user handlers are not active until authentication is
  3171. * successful.
  3172. *
  3173. * Parameters:
  3174. * (Integer) period - The period of the handler.
  3175. * (Function) handler - The callback function.
  3176. *
  3177. * Returns:
  3178. * A reference to the handler that can be used to remove it.
  3179. */
  3180. addTimedHandler: function addTimedHandler(period, handler) {
  3181. var thand = new Strophe.TimedHandler(period, handler);
  3182. this.addTimeds.push(thand);
  3183. return thand;
  3184. },
  3185. /** Function: deleteTimedHandler
  3186. * Delete a timed handler for a connection.
  3187. *
  3188. * This function removes a timed handler from the connection. The
  3189. * handRef parameter is *not* the function passed to addTimedHandler(),
  3190. * but is the reference returned from addTimedHandler().
  3191. *
  3192. * Parameters:
  3193. * (Strophe.TimedHandler) handRef - The handler reference.
  3194. */
  3195. deleteTimedHandler: function deleteTimedHandler(handRef) {
  3196. // this must be done in the Idle loop so that we don't change
  3197. // the handlers during iteration
  3198. this.removeTimeds.push(handRef);
  3199. },
  3200. /** Function: addHandler
  3201. * Add a stanza handler for the connection.
  3202. *
  3203. * This function adds a stanza handler to the connection. The
  3204. * handler callback will be called for any stanza that matches
  3205. * the parameters. Note that if multiple parameters are supplied,
  3206. * they must all match for the handler to be invoked.
  3207. *
  3208. * The handler will receive the stanza that triggered it as its argument.
  3209. * *The handler should return true if it is to be invoked again;
  3210. * returning false will remove the handler after it returns.*
  3211. *
  3212. * As a convenience, the ns parameters applies to the top level element
  3213. * and also any of its immediate children. This is primarily to make
  3214. * matching /iq/query elements easy.
  3215. *
  3216. * Options
  3217. * ~~~~~~~
  3218. * With the options argument, you can specify boolean flags that affect how
  3219. * matches are being done.
  3220. *
  3221. * Currently two flags exist:
  3222. *
  3223. * - matchBareFromJid:
  3224. * When set to true, the from parameter and the
  3225. * from attribute on the stanza will be matched as bare JIDs instead
  3226. * of full JIDs. To use this, pass {matchBareFromJid: true} as the
  3227. * value of options. The default value for matchBareFromJid is false.
  3228. *
  3229. * - ignoreNamespaceFragment:
  3230. * When set to true, a fragment specified on the stanza's namespace
  3231. * URL will be ignored when it's matched with the one configured for
  3232. * the handler.
  3233. *
  3234. * This means that if you register like this:
  3235. * > connection.addHandler(
  3236. * > handler,
  3237. * > 'http://jabber.org/protocol/muc',
  3238. * > null, null, null, null,
  3239. * > {'ignoreNamespaceFragment': true}
  3240. * > );
  3241. *
  3242. * Then a stanza with XML namespace of
  3243. * 'http://jabber.org/protocol/muc#user' will also be matched. If
  3244. * 'ignoreNamespaceFragment' is false, then only stanzas with
  3245. * 'http://jabber.org/protocol/muc' will be matched.
  3246. *
  3247. * Deleting the handler
  3248. * ~~~~~~~~~~~~~~~~~~~~
  3249. * The return value should be saved if you wish to remove the handler
  3250. * with deleteHandler().
  3251. *
  3252. * Parameters:
  3253. * (Function) handler - The user callback.
  3254. * (String) ns - The namespace to match.
  3255. * (String) name - The stanza name to match.
  3256. * (String|Array) type - The stanza type (or types if an array) to match.
  3257. * (String) id - The stanza id attribute to match.
  3258. * (String) from - The stanza from attribute to match.
  3259. * (String) options - The handler options
  3260. *
  3261. * Returns:
  3262. * A reference to the handler that can be used to remove it.
  3263. */
  3264. addHandler: function addHandler(handler, ns, name, type, id, from, options) {
  3265. var hand = new Strophe.Handler(handler, ns, name, type, id, from, options);
  3266. this.addHandlers.push(hand);
  3267. return hand;
  3268. },
  3269. /** Function: deleteHandler
  3270. * Delete a stanza handler for a connection.
  3271. *
  3272. * This function removes a stanza handler from the connection. The
  3273. * handRef parameter is *not* the function passed to addHandler(),
  3274. * but is the reference returned from addHandler().
  3275. *
  3276. * Parameters:
  3277. * (Strophe.Handler) handRef - The handler reference.
  3278. */
  3279. deleteHandler: function deleteHandler(handRef) {
  3280. // this must be done in the Idle loop so that we don't change
  3281. // the handlers during iteration
  3282. this.removeHandlers.push(handRef); // If a handler is being deleted while it is being added,
  3283. // prevent it from getting added
  3284. var i = this.addHandlers.indexOf(handRef);
  3285. if (i >= 0) {
  3286. this.addHandlers.splice(i, 1);
  3287. }
  3288. },
  3289. /** Function: registerSASLMechanisms
  3290. *
  3291. * Register the SASL mechanisms which will be supported by this instance of
  3292. * Strophe.Connection (i.e. which this XMPP client will support).
  3293. *
  3294. * Parameters:
  3295. * (Array) mechanisms - Array of objects with Strophe.SASLMechanism prototypes
  3296. *
  3297. */
  3298. registerSASLMechanisms: function registerSASLMechanisms(mechanisms) {
  3299. this.mechanisms = {};
  3300. mechanisms = mechanisms || [Strophe.SASLAnonymous, Strophe.SASLExternal, Strophe.SASLMD5, Strophe.SASLOAuthBearer, Strophe.SASLXOAuth2, Strophe.SASLPlain, Strophe.SASLSHA1];
  3301. mechanisms.forEach(this.registerSASLMechanism.bind(this));
  3302. },
  3303. /** Function: registerSASLMechanism
  3304. *
  3305. * Register a single SASL mechanism, to be supported by this client.
  3306. *
  3307. * Parameters:
  3308. * (Object) mechanism - Object with a Strophe.SASLMechanism prototype
  3309. *
  3310. */
  3311. registerSASLMechanism: function registerSASLMechanism(mechanism) {
  3312. this.mechanisms[mechanism.prototype.name] = mechanism;
  3313. },
  3314. /** Function: disconnect
  3315. * Start the graceful disconnection process.
  3316. *
  3317. * This function starts the disconnection process. This process starts
  3318. * by sending unavailable presence and sending BOSH body of type
  3319. * terminate. A timeout handler makes sure that disconnection happens
  3320. * even if the BOSH server does not respond.
  3321. * If the Connection object isn't connected, at least tries to abort all pending requests
  3322. * so the connection object won't generate successful requests (which were already opened).
  3323. *
  3324. * The user supplied connection callback will be notified of the
  3325. * progress as this process happens.
  3326. *
  3327. * Parameters:
  3328. * (String) reason - The reason the disconnect is occuring.
  3329. */
  3330. disconnect: function disconnect(reason) {
  3331. this._changeConnectStatus(Strophe.Status.DISCONNECTING, reason);
  3332. Strophe.info("Disconnect was called because: " + reason);
  3333. if (this.connected) {
  3334. var pres = false;
  3335. this.disconnecting = true;
  3336. if (this.authenticated) {
  3337. pres = $pres({
  3338. 'xmlns': Strophe.NS.CLIENT,
  3339. 'type': 'unavailable'
  3340. });
  3341. } // setup timeout handler
  3342. this._disconnectTimeout = this._addSysTimedHandler(3000, this._onDisconnectTimeout.bind(this));
  3343. this._proto._disconnect(pres);
  3344. } else {
  3345. Strophe.info("Disconnect was called before Strophe connected to the server");
  3346. this._proto._abortAllRequests();
  3347. this._doDisconnect();
  3348. }
  3349. },
  3350. /** PrivateFunction: _changeConnectStatus
  3351. * _Private_ helper function that makes sure plugins and the user's
  3352. * callback are notified of connection status changes.
  3353. *
  3354. * Parameters:
  3355. * (Integer) status - the new connection status, one of the values
  3356. * in Strophe.Status
  3357. * (String) condition - the error condition or null
  3358. * (XMLElement) elem - The triggering stanza.
  3359. */
  3360. _changeConnectStatus: function _changeConnectStatus(status, condition, elem) {
  3361. // notify all plugins listening for status changes
  3362. for (var k in Strophe._connectionPlugins) {
  3363. if (Object.prototype.hasOwnProperty.call(Strophe._connectionPlugins, k)) {
  3364. var plugin = this[k];
  3365. if (plugin.statusChanged) {
  3366. try {
  3367. plugin.statusChanged(status, condition);
  3368. } catch (err) {
  3369. Strophe.error("".concat(k, " plugin caused an exception changing status: ").concat(err));
  3370. }
  3371. }
  3372. }
  3373. } // notify the user's callback
  3374. if (this.connect_callback) {
  3375. try {
  3376. this.connect_callback(status, condition, elem);
  3377. } catch (e) {
  3378. Strophe._handleError(e);
  3379. Strophe.error("User connection callback caused an exception: ".concat(e));
  3380. }
  3381. }
  3382. },
  3383. /** PrivateFunction: _doDisconnect
  3384. * _Private_ function to disconnect.
  3385. *
  3386. * This is the last piece of the disconnection logic. This resets the
  3387. * connection and alerts the user's connection callback.
  3388. */
  3389. _doDisconnect: function _doDisconnect(condition) {
  3390. if (typeof this._idleTimeout === "number") {
  3391. clearTimeout(this._idleTimeout);
  3392. } // Cancel Disconnect Timeout
  3393. if (this._disconnectTimeout !== null) {
  3394. this.deleteTimedHandler(this._disconnectTimeout);
  3395. this._disconnectTimeout = null;
  3396. }
  3397. Strophe.info("_doDisconnect was called");
  3398. this._proto._doDisconnect();
  3399. this.authenticated = false;
  3400. this.disconnecting = false;
  3401. this.restored = false; // delete handlers
  3402. this.handlers = [];
  3403. this.timedHandlers = [];
  3404. this.removeTimeds = [];
  3405. this.removeHandlers = [];
  3406. this.addTimeds = [];
  3407. this.addHandlers = []; // tell the parent we disconnected
  3408. this._changeConnectStatus(Strophe.Status.DISCONNECTED, condition);
  3409. this.connected = false;
  3410. },
  3411. /** PrivateFunction: _dataRecv
  3412. * _Private_ handler to processes incoming data from the the connection.
  3413. *
  3414. * Except for _connect_cb handling the initial connection request,
  3415. * this function handles the incoming data for all requests. This
  3416. * function also fires stanza handlers that match each incoming
  3417. * stanza.
  3418. *
  3419. * Parameters:
  3420. * (Strophe.Request) req - The request that has data ready.
  3421. * (string) req - The stanza a raw string (optiona).
  3422. */
  3423. _dataRecv: function _dataRecv(req, raw) {
  3424. var _this6 = this;
  3425. Strophe.info("_dataRecv called");
  3426. var elem = this._proto._reqToData(req);
  3427. if (elem === null) {
  3428. return;
  3429. }
  3430. if (this.xmlInput !== Strophe.Connection.prototype.xmlInput) {
  3431. if (elem.nodeName === this._proto.strip && elem.childNodes.length) {
  3432. this.xmlInput(elem.childNodes[0]);
  3433. } else {
  3434. this.xmlInput(elem);
  3435. }
  3436. }
  3437. if (this.rawInput !== Strophe.Connection.prototype.rawInput) {
  3438. if (raw) {
  3439. this.rawInput(raw);
  3440. } else {
  3441. this.rawInput(Strophe.serialize(elem));
  3442. }
  3443. } // remove handlers scheduled for deletion
  3444. while (this.removeHandlers.length > 0) {
  3445. var hand = this.removeHandlers.pop();
  3446. var i = this.handlers.indexOf(hand);
  3447. if (i >= 0) {
  3448. this.handlers.splice(i, 1);
  3449. }
  3450. } // add handlers scheduled for addition
  3451. while (this.addHandlers.length > 0) {
  3452. this.handlers.push(this.addHandlers.pop());
  3453. } // handle graceful disconnect
  3454. if (this.disconnecting && this._proto._emptyQueue()) {
  3455. this._doDisconnect();
  3456. return;
  3457. }
  3458. var type = elem.getAttribute("type");
  3459. if (type !== null && type === "terminate") {
  3460. // Don't process stanzas that come in after disconnect
  3461. if (this.disconnecting) {
  3462. return;
  3463. } // an error occurred
  3464. var cond = elem.getAttribute("condition");
  3465. var conflict = elem.getElementsByTagName("conflict");
  3466. if (cond !== null) {
  3467. if (cond === "remote-stream-error" && conflict.length > 0) {
  3468. cond = "conflict";
  3469. }
  3470. this._changeConnectStatus(Strophe.Status.CONNFAIL, cond);
  3471. } else {
  3472. this._changeConnectStatus(Strophe.Status.CONNFAIL, Strophe.ErrorCondition.UNKOWN_REASON);
  3473. }
  3474. this._doDisconnect(cond);
  3475. return;
  3476. } // send each incoming stanza through the handler chain
  3477. Strophe.forEachChild(elem, null, function (child) {
  3478. // process handlers
  3479. var newList = _this6.handlers;
  3480. _this6.handlers = [];
  3481. for (var _i5 = 0; _i5 < newList.length; _i5++) {
  3482. var _hand = newList[_i5]; // encapsulate 'handler.run' not to lose the whole handler list if
  3483. // one of the handlers throws an exception
  3484. try {
  3485. if (_hand.isMatch(child) && (_this6.authenticated || !_hand.user)) {
  3486. if (_hand.run(child)) {
  3487. _this6.handlers.push(_hand);
  3488. }
  3489. } else {
  3490. _this6.handlers.push(_hand);
  3491. }
  3492. } catch (e) {
  3493. // if the handler throws an exception, we consider it as false
  3494. Strophe.warn('Removing Strophe handlers due to uncaught exception: ' + e.message);
  3495. }
  3496. }
  3497. });
  3498. },
  3499. /** Attribute: mechanisms
  3500. * SASL Mechanisms available for Connection.
  3501. */
  3502. mechanisms: {},
  3503. /** PrivateFunction: _connect_cb
  3504. * _Private_ handler for initial connection request.
  3505. *
  3506. * This handler is used to process the initial connection request
  3507. * response from the BOSH server. It is used to set up authentication
  3508. * handlers and start the authentication process.
  3509. *
  3510. * SASL authentication will be attempted if available, otherwise
  3511. * the code will fall back to legacy authentication.
  3512. *
  3513. * Parameters:
  3514. * (Strophe.Request) req - The current request.
  3515. * (Function) _callback - low level (xmpp) connect callback function.
  3516. * Useful for plugins with their own xmpp connect callback (when they
  3517. * want to do something special).
  3518. */
  3519. _connect_cb: function _connect_cb(req, _callback, raw) {
  3520. Strophe.info("_connect_cb was called");
  3521. this.connected = true;
  3522. var bodyWrap;
  3523. try {
  3524. bodyWrap = this._proto._reqToData(req);
  3525. } catch (e) {
  3526. if (e.name !== Strophe.ErrorCondition.BAD_FORMAT) {
  3527. throw e;
  3528. }
  3529. this._changeConnectStatus(Strophe.Status.CONNFAIL, Strophe.ErrorCondition.BAD_FORMAT);
  3530. this._doDisconnect(Strophe.ErrorCondition.BAD_FORMAT);
  3531. }
  3532. if (!bodyWrap) {
  3533. return;
  3534. }
  3535. if (this.xmlInput !== Strophe.Connection.prototype.xmlInput) {
  3536. if (bodyWrap.nodeName === this._proto.strip && bodyWrap.childNodes.length) {
  3537. this.xmlInput(bodyWrap.childNodes[0]);
  3538. } else {
  3539. this.xmlInput(bodyWrap);
  3540. }
  3541. }
  3542. if (this.rawInput !== Strophe.Connection.prototype.rawInput) {
  3543. if (raw) {
  3544. this.rawInput(raw);
  3545. } else {
  3546. this.rawInput(Strophe.serialize(bodyWrap));
  3547. }
  3548. }
  3549. var conncheck = this._proto._connect_cb(bodyWrap);
  3550. if (conncheck === Strophe.Status.CONNFAIL) {
  3551. return;
  3552. } // Check for the stream:features tag
  3553. var hasFeatures;
  3554. if (bodyWrap.getElementsByTagNameNS) {
  3555. hasFeatures = bodyWrap.getElementsByTagNameNS(Strophe.NS.STREAM, "features").length > 0;
  3556. } else {
  3557. hasFeatures = bodyWrap.getElementsByTagName("stream:features").length > 0 || bodyWrap.getElementsByTagName("features").length > 0;
  3558. }
  3559. if (!hasFeatures) {
  3560. this._proto._no_auth_received(_callback);
  3561. return;
  3562. }
  3563. var matched = [];
  3564. var mechanisms = bodyWrap.getElementsByTagName("mechanism");
  3565. if (mechanisms.length > 0) {
  3566. for (var i = 0; i < mechanisms.length; i++) {
  3567. var mech = Strophe.getText(mechanisms[i]);
  3568. if (this.mechanisms[mech]) matched.push(this.mechanisms[mech]);
  3569. }
  3570. }
  3571. if (matched.length === 0) {
  3572. if (bodyWrap.getElementsByTagName("auth").length === 0) {
  3573. // There are no matching SASL mechanisms and also no legacy
  3574. // auth available.
  3575. this._proto._no_auth_received(_callback);
  3576. return;
  3577. }
  3578. }
  3579. if (this.do_authentication !== false) {
  3580. this.authenticate(matched);
  3581. }
  3582. },
  3583. /** Function: sortMechanismsByPriority
  3584. *
  3585. * Sorts an array of objects with prototype SASLMechanism according to
  3586. * their priorities.
  3587. *
  3588. * Parameters:
  3589. * (Array) mechanisms - Array of SASL mechanisms.
  3590. *
  3591. */
  3592. sortMechanismsByPriority: function sortMechanismsByPriority(mechanisms) {
  3593. // Sorting mechanisms according to priority.
  3594. for (var i = 0; i < mechanisms.length - 1; ++i) {
  3595. var higher = i;
  3596. for (var j = i + 1; j < mechanisms.length; ++j) {
  3597. if (mechanisms[j].prototype.priority > mechanisms[higher].prototype.priority) {
  3598. higher = j;
  3599. }
  3600. }
  3601. if (higher !== i) {
  3602. var swap = mechanisms[i];
  3603. mechanisms[i] = mechanisms[higher];
  3604. mechanisms[higher] = swap;
  3605. }
  3606. }
  3607. return mechanisms;
  3608. },
  3609. /** PrivateFunction: _attemptSASLAuth
  3610. *
  3611. * Iterate through an array of SASL mechanisms and attempt authentication
  3612. * with the highest priority (enabled) mechanism.
  3613. *
  3614. * Parameters:
  3615. * (Array) mechanisms - Array of SASL mechanisms.
  3616. *
  3617. * Returns:
  3618. * (Boolean) mechanism_found - true or false, depending on whether a
  3619. * valid SASL mechanism was found with which authentication could be
  3620. * started.
  3621. */
  3622. _attemptSASLAuth: function _attemptSASLAuth(mechanisms) {
  3623. mechanisms = this.sortMechanismsByPriority(mechanisms || []);
  3624. var mechanism_found = false;
  3625. for (var i = 0; i < mechanisms.length; ++i) {
  3626. if (!mechanisms[i].prototype.test(this)) {
  3627. continue;
  3628. }
  3629. this._sasl_success_handler = this._addSysHandler(this._sasl_success_cb.bind(this), null, "success", null, null);
  3630. this._sasl_failure_handler = this._addSysHandler(this._sasl_failure_cb.bind(this), null, "failure", null, null);
  3631. this._sasl_challenge_handler = this._addSysHandler(this._sasl_challenge_cb.bind(this), null, "challenge", null, null);
  3632. this._sasl_mechanism = new mechanisms[i]();
  3633. this._sasl_mechanism.onStart(this);
  3634. var request_auth_exchange = $build("auth", {
  3635. 'xmlns': Strophe.NS.SASL,
  3636. 'mechanism': this._sasl_mechanism.name
  3637. });
  3638. if (this._sasl_mechanism.isClientFirst) {
  3639. var response = this._sasl_mechanism.onChallenge(this, null);
  3640. request_auth_exchange.t(btoa(response));
  3641. }
  3642. this.send(request_auth_exchange.tree());
  3643. mechanism_found = true;
  3644. break;
  3645. }
  3646. return mechanism_found;
  3647. },
  3648. /** PrivateFunction: _attemptLegacyAuth
  3649. *
  3650. * Attempt legacy (i.e. non-SASL) authentication.
  3651. *
  3652. */
  3653. _attemptLegacyAuth: function _attemptLegacyAuth() {
  3654. if (Strophe.getNodeFromJid(this.jid) === null) {
  3655. // we don't have a node, which is required for non-anonymous
  3656. // client connections
  3657. this._changeConnectStatus(Strophe.Status.CONNFAIL, Strophe.ErrorCondition.MISSING_JID_NODE);
  3658. this.disconnect(Strophe.ErrorCondition.MISSING_JID_NODE);
  3659. } else {
  3660. // Fall back to legacy authentication
  3661. this._changeConnectStatus(Strophe.Status.AUTHENTICATING, null);
  3662. this._addSysHandler(this._auth1_cb.bind(this), null, null, null, "_auth_1");
  3663. this.send($iq({
  3664. 'type': "get",
  3665. 'to': this.domain,
  3666. 'id': "_auth_1"
  3667. }).c("query", {
  3668. xmlns: Strophe.NS.AUTH
  3669. }).c("username", {}).t(Strophe.getNodeFromJid(this.jid)).tree());
  3670. }
  3671. },
  3672. /** Function: authenticate
  3673. * Set up authentication
  3674. *
  3675. * Continues the initial connection request by setting up authentication
  3676. * handlers and starting the authentication process.
  3677. *
  3678. * SASL authentication will be attempted if available, otherwise
  3679. * the code will fall back to legacy authentication.
  3680. *
  3681. * Parameters:
  3682. * (Array) matched - Array of SASL mechanisms supported.
  3683. *
  3684. */
  3685. authenticate: function authenticate(matched) {
  3686. if (!this._attemptSASLAuth(matched)) {
  3687. this._attemptLegacyAuth();
  3688. }
  3689. },
  3690. /** PrivateFunction: _sasl_challenge_cb
  3691. * _Private_ handler for the SASL challenge
  3692. *
  3693. */
  3694. _sasl_challenge_cb: function _sasl_challenge_cb(elem) {
  3695. var challenge = atob(Strophe.getText(elem));
  3696. var response = this._sasl_mechanism.onChallenge(this, challenge);
  3697. var stanza = $build('response', {
  3698. 'xmlns': Strophe.NS.SASL
  3699. });
  3700. if (response !== "") {
  3701. stanza.t(btoa(response));
  3702. }
  3703. this.send(stanza.tree());
  3704. return true;
  3705. },
  3706. /** PrivateFunction: _auth1_cb
  3707. * _Private_ handler for legacy authentication.
  3708. *
  3709. * This handler is called in response to the initial <iq type='get'/>
  3710. * for legacy authentication. It builds an authentication <iq/> and
  3711. * sends it, creating a handler (calling back to _auth2_cb()) to
  3712. * handle the result
  3713. *
  3714. * Parameters:
  3715. * (XMLElement) elem - The stanza that triggered the callback.
  3716. *
  3717. * Returns:
  3718. * false to remove the handler.
  3719. */
  3720. /* jshint unused:false */
  3721. _auth1_cb: function _auth1_cb(elem) {
  3722. // build plaintext auth iq
  3723. var iq = $iq({
  3724. type: "set",
  3725. id: "_auth_2"
  3726. }).c('query', {
  3727. xmlns: Strophe.NS.AUTH
  3728. }).c('username', {}).t(Strophe.getNodeFromJid(this.jid)).up().c('password').t(this.pass);
  3729. if (!Strophe.getResourceFromJid(this.jid)) {
  3730. // since the user has not supplied a resource, we pick
  3731. // a default one here. unlike other auth methods, the server
  3732. // cannot do this for us.
  3733. this.jid = Strophe.getBareJidFromJid(this.jid) + '/strophe';
  3734. }
  3735. iq.up().c('resource', {}).t(Strophe.getResourceFromJid(this.jid));
  3736. this._addSysHandler(this._auth2_cb.bind(this), null, null, null, "_auth_2");
  3737. this.send(iq.tree());
  3738. return false;
  3739. },
  3740. /* jshint unused:true */
  3741. /** PrivateFunction: _sasl_success_cb
  3742. * _Private_ handler for succesful SASL authentication.
  3743. *
  3744. * Parameters:
  3745. * (XMLElement) elem - The matching stanza.
  3746. *
  3747. * Returns:
  3748. * false to remove the handler.
  3749. */
  3750. _sasl_success_cb: function _sasl_success_cb(elem) {
  3751. var _this7 = this;
  3752. if (this._sasl_data["server-signature"]) {
  3753. var serverSignature;
  3754. var success = atob(Strophe.getText(elem));
  3755. var attribMatch = /([a-z]+)=([^,]+)(,|$)/;
  3756. var matches = success.match(attribMatch);
  3757. if (matches[1] === "v") {
  3758. serverSignature = matches[2];
  3759. }
  3760. if (serverSignature !== this._sasl_data["server-signature"]) {
  3761. // remove old handlers
  3762. this.deleteHandler(this._sasl_failure_handler);
  3763. this._sasl_failure_handler = null;
  3764. if (this._sasl_challenge_handler) {
  3765. this.deleteHandler(this._sasl_challenge_handler);
  3766. this._sasl_challenge_handler = null;
  3767. }
  3768. this._sasl_data = {};
  3769. return this._sasl_failure_cb(null);
  3770. }
  3771. }
  3772. Strophe.info("SASL authentication succeeded.");
  3773. if (this._sasl_mechanism) {
  3774. this._sasl_mechanism.onSuccess();
  3775. } // remove old handlers
  3776. this.deleteHandler(this._sasl_failure_handler);
  3777. this._sasl_failure_handler = null;
  3778. if (this._sasl_challenge_handler) {
  3779. this.deleteHandler(this._sasl_challenge_handler);
  3780. this._sasl_challenge_handler = null;
  3781. }
  3782. var streamfeature_handlers = [];
  3783. var wrapper = function wrapper(handlers, elem) {
  3784. while (handlers.length) {
  3785. _this7.deleteHandler(handlers.pop());
  3786. }
  3787. _this7._sasl_auth1_cb(elem);
  3788. return false;
  3789. };
  3790. streamfeature_handlers.push(this._addSysHandler(function (elem) {
  3791. return wrapper(streamfeature_handlers, elem);
  3792. }, null, "stream:features", null, null));
  3793. streamfeature_handlers.push(this._addSysHandler(function (elem) {
  3794. return wrapper(streamfeature_handlers, elem);
  3795. }, Strophe.NS.STREAM, "features", null, null)); // we must send an xmpp:restart now
  3796. this._sendRestart();
  3797. return false;
  3798. },
  3799. /** PrivateFunction: _sasl_auth1_cb
  3800. * _Private_ handler to start stream binding.
  3801. *
  3802. * Parameters:
  3803. * (XMLElement) elem - The matching stanza.
  3804. *
  3805. * Returns:
  3806. * false to remove the handler.
  3807. */
  3808. _sasl_auth1_cb: function _sasl_auth1_cb(elem) {
  3809. // save stream:features for future usage
  3810. this.features = elem;
  3811. for (var i = 0; i < elem.childNodes.length; i++) {
  3812. var child = elem.childNodes[i];
  3813. if (child.nodeName === 'bind') {
  3814. this.do_bind = true;
  3815. }
  3816. if (child.nodeName === 'session') {
  3817. this.do_session = true;
  3818. }
  3819. }
  3820. if (!this.do_bind) {
  3821. this._changeConnectStatus(Strophe.Status.AUTHFAIL, null);
  3822. return false;
  3823. } else {
  3824. this._addSysHandler(this._sasl_bind_cb.bind(this), null, null, null, "_bind_auth_2");
  3825. var resource = Strophe.getResourceFromJid(this.jid);
  3826. if (resource) {
  3827. this.send($iq({
  3828. type: "set",
  3829. id: "_bind_auth_2"
  3830. }).c('bind', {
  3831. xmlns: Strophe.NS.BIND
  3832. }).c('resource', {}).t(resource).tree());
  3833. } else {
  3834. this.send($iq({
  3835. type: "set",
  3836. id: "_bind_auth_2"
  3837. }).c('bind', {
  3838. xmlns: Strophe.NS.BIND
  3839. }).tree());
  3840. }
  3841. }
  3842. return false;
  3843. },
  3844. /** PrivateFunction: _sasl_bind_cb
  3845. * _Private_ handler for binding result and session start.
  3846. *
  3847. * Parameters:
  3848. * (XMLElement) elem - The matching stanza.
  3849. *
  3850. * Returns:
  3851. * false to remove the handler.
  3852. */
  3853. _sasl_bind_cb: function _sasl_bind_cb(elem) {
  3854. if (elem.getAttribute("type") === "error") {
  3855. Strophe.info("SASL binding failed.");
  3856. var conflict = elem.getElementsByTagName("conflict");
  3857. var condition;
  3858. if (conflict.length > 0) {
  3859. condition = Strophe.ErrorCondition.CONFLICT;
  3860. }
  3861. this._changeConnectStatus(Strophe.Status.AUTHFAIL, condition, elem);
  3862. return false;
  3863. } // TODO - need to grab errors
  3864. var bind = elem.getElementsByTagName("bind");
  3865. if (bind.length > 0) {
  3866. var jidNode = bind[0].getElementsByTagName("jid");
  3867. if (jidNode.length > 0) {
  3868. this.jid = Strophe.getText(jidNode[0]);
  3869. if (this.do_session) {
  3870. this._addSysHandler(this._sasl_session_cb.bind(this), null, null, null, "_session_auth_2");
  3871. this.send($iq({
  3872. type: "set",
  3873. id: "_session_auth_2"
  3874. }).c('session', {
  3875. xmlns: Strophe.NS.SESSION
  3876. }).tree());
  3877. } else {
  3878. this.authenticated = true;
  3879. this._changeConnectStatus(Strophe.Status.CONNECTED, null);
  3880. }
  3881. }
  3882. } else {
  3883. Strophe.info("SASL binding failed.");
  3884. this._changeConnectStatus(Strophe.Status.AUTHFAIL, null, elem);
  3885. return false;
  3886. }
  3887. },
  3888. /** PrivateFunction: _sasl_session_cb
  3889. * _Private_ handler to finish successful SASL connection.
  3890. *
  3891. * This sets Connection.authenticated to true on success, which
  3892. * starts the processing of user handlers.
  3893. *
  3894. * Parameters:
  3895. * (XMLElement) elem - The matching stanza.
  3896. *
  3897. * Returns:
  3898. * false to remove the handler.
  3899. */
  3900. _sasl_session_cb: function _sasl_session_cb(elem) {
  3901. if (elem.getAttribute("type") === "result") {
  3902. this.authenticated = true;
  3903. this._changeConnectStatus(Strophe.Status.CONNECTED, null);
  3904. } else if (elem.getAttribute("type") === "error") {
  3905. Strophe.info("Session creation failed.");
  3906. this._changeConnectStatus(Strophe.Status.AUTHFAIL, null, elem);
  3907. return false;
  3908. }
  3909. return false;
  3910. },
  3911. /** PrivateFunction: _sasl_failure_cb
  3912. * _Private_ handler for SASL authentication failure.
  3913. *
  3914. * Parameters:
  3915. * (XMLElement) elem - The matching stanza.
  3916. *
  3917. * Returns:
  3918. * false to remove the handler.
  3919. */
  3920. /* jshint unused:false */
  3921. _sasl_failure_cb: function _sasl_failure_cb(elem) {
  3922. // delete unneeded handlers
  3923. if (this._sasl_success_handler) {
  3924. this.deleteHandler(this._sasl_success_handler);
  3925. this._sasl_success_handler = null;
  3926. }
  3927. if (this._sasl_challenge_handler) {
  3928. this.deleteHandler(this._sasl_challenge_handler);
  3929. this._sasl_challenge_handler = null;
  3930. }
  3931. if (this._sasl_mechanism) this._sasl_mechanism.onFailure();
  3932. this._changeConnectStatus(Strophe.Status.AUTHFAIL, null, elem);
  3933. return false;
  3934. },
  3935. /* jshint unused:true */
  3936. /** PrivateFunction: _auth2_cb
  3937. * _Private_ handler to finish legacy authentication.
  3938. *
  3939. * This handler is called when the result from the jabber:iq:auth
  3940. * <iq/> stanza is returned.
  3941. *
  3942. * Parameters:
  3943. * (XMLElement) elem - The stanza that triggered the callback.
  3944. *
  3945. * Returns:
  3946. * false to remove the handler.
  3947. */
  3948. _auth2_cb: function _auth2_cb(elem) {
  3949. if (elem.getAttribute("type") === "result") {
  3950. this.authenticated = true;
  3951. this._changeConnectStatus(Strophe.Status.CONNECTED, null);
  3952. } else if (elem.getAttribute("type") === "error") {
  3953. this._changeConnectStatus(Strophe.Status.AUTHFAIL, null, elem);
  3954. this.disconnect('authentication failed');
  3955. }
  3956. return false;
  3957. },
  3958. /** PrivateFunction: _addSysTimedHandler
  3959. * _Private_ function to add a system level timed handler.
  3960. *
  3961. * This function is used to add a Strophe.TimedHandler for the
  3962. * library code. System timed handlers are allowed to run before
  3963. * authentication is complete.
  3964. *
  3965. * Parameters:
  3966. * (Integer) period - The period of the handler.
  3967. * (Function) handler - The callback function.
  3968. */
  3969. _addSysTimedHandler: function _addSysTimedHandler(period, handler) {
  3970. var thand = new Strophe.TimedHandler(period, handler);
  3971. thand.user = false;
  3972. this.addTimeds.push(thand);
  3973. return thand;
  3974. },
  3975. /** PrivateFunction: _addSysHandler
  3976. * _Private_ function to add a system level stanza handler.
  3977. *
  3978. * This function is used to add a Strophe.Handler for the
  3979. * library code. System stanza handlers are allowed to run before
  3980. * authentication is complete.
  3981. *
  3982. * Parameters:
  3983. * (Function) handler - The callback function.
  3984. * (String) ns - The namespace to match.
  3985. * (String) name - The stanza name to match.
  3986. * (String) type - The stanza type attribute to match.
  3987. * (String) id - The stanza id attribute to match.
  3988. */
  3989. _addSysHandler: function _addSysHandler(handler, ns, name, type, id) {
  3990. var hand = new Strophe.Handler(handler, ns, name, type, id);
  3991. hand.user = false;
  3992. this.addHandlers.push(hand);
  3993. return hand;
  3994. },
  3995. /** PrivateFunction: _onDisconnectTimeout
  3996. * _Private_ timeout handler for handling non-graceful disconnection.
  3997. *
  3998. * If the graceful disconnect process does not complete within the
  3999. * time allotted, this handler finishes the disconnect anyway.
  4000. *
  4001. * Returns:
  4002. * false to remove the handler.
  4003. */
  4004. _onDisconnectTimeout: function _onDisconnectTimeout() {
  4005. Strophe.info("_onDisconnectTimeout was called");
  4006. this._changeConnectStatus(Strophe.Status.CONNTIMEOUT, null);
  4007. this._proto._onDisconnectTimeout(); // actually disconnect
  4008. this._doDisconnect();
  4009. return false;
  4010. },
  4011. /** PrivateFunction: _onIdle
  4012. * _Private_ handler to process events during idle cycle.
  4013. *
  4014. * This handler is called every 100ms to fire timed handlers that
  4015. * are ready and keep poll requests going.
  4016. */
  4017. _onIdle: function _onIdle() {
  4018. var _this8 = this; // add timed handlers scheduled for addition
  4019. // NOTE: we add before remove in the case a timed handler is
  4020. // added and then deleted before the next _onIdle() call.
  4021. while (this.addTimeds.length > 0) {
  4022. this.timedHandlers.push(this.addTimeds.pop());
  4023. } // remove timed handlers that have been scheduled for deletion
  4024. while (this.removeTimeds.length > 0) {
  4025. var thand = this.removeTimeds.pop();
  4026. var i = this.timedHandlers.indexOf(thand);
  4027. if (i >= 0) {
  4028. this.timedHandlers.splice(i, 1);
  4029. }
  4030. } // call ready timed handlers
  4031. var now = new Date().getTime();
  4032. var newList = [];
  4033. for (var _i6 = 0; _i6 < this.timedHandlers.length; _i6++) {
  4034. var _thand = this.timedHandlers[_i6];
  4035. if (this.authenticated || !_thand.user) {
  4036. var since = _thand.lastCalled + _thand.period;
  4037. if (since - now <= 0) {
  4038. if (_thand.run()) {
  4039. newList.push(_thand);
  4040. }
  4041. } else {
  4042. newList.push(_thand);
  4043. }
  4044. }
  4045. }
  4046. this.timedHandlers = newList;
  4047. clearTimeout(this._idleTimeout);
  4048. this._proto._onIdle(); // reactivate the timer only if connected
  4049. if (this.connected) {
  4050. this._idleTimeout = setTimeout(function () {
  4051. return _this8._onIdle();
  4052. }, 100);
  4053. }
  4054. }
  4055. };
  4056. /** Class: Strophe.SASLMechanism
  4057. *
  4058. * encapsulates SASL authentication mechanisms.
  4059. *
  4060. * User code may override the priority for each mechanism or disable it completely.
  4061. * See <priority> for information about changing priority and <test> for informatian on
  4062. * how to disable a mechanism.
  4063. *
  4064. * By default, all mechanisms are enabled and the priorities are
  4065. *
  4066. * OAUTHBEARER - 60
  4067. * SCRAM-SHA1 - 50
  4068. * DIGEST-MD5 - 40
  4069. * PLAIN - 30
  4070. * ANONYMOUS - 20
  4071. * EXTERNAL - 10
  4072. *
  4073. * See: Strophe.Connection.addSupportedSASLMechanisms
  4074. */
  4075. /**
  4076. * PrivateConstructor: Strophe.SASLMechanism
  4077. * SASL auth mechanism abstraction.
  4078. *
  4079. * Parameters:
  4080. * (String) name - SASL Mechanism name.
  4081. * (Boolean) isClientFirst - If client should send response first without challenge.
  4082. * (Number) priority - Priority.
  4083. *
  4084. * Returns:
  4085. * A new Strophe.SASLMechanism object.
  4086. */
  4087. Strophe.SASLMechanism = function (name, isClientFirst, priority) {
  4088. /** PrivateVariable: name
  4089. * Mechanism name.
  4090. */
  4091. this.name = name;
  4092. /** PrivateVariable: isClientFirst
  4093. * If client sends response without initial server challenge.
  4094. */
  4095. this.isClientFirst = isClientFirst;
  4096. /** Variable: priority
  4097. * Determines which <SASLMechanism> is chosen for authentication (Higher is better).
  4098. * Users may override this to prioritize mechanisms differently.
  4099. *
  4100. * In the default configuration the priorities are
  4101. *
  4102. * SCRAM-SHA1 - 40
  4103. * DIGEST-MD5 - 30
  4104. * Plain - 20
  4105. *
  4106. * Example: (This will cause Strophe to choose the mechanism that the server sent first)
  4107. *
  4108. * > Strophe.SASLMD5.priority = Strophe.SASLSHA1.priority;
  4109. *
  4110. * See <SASL mechanisms> for a list of available mechanisms.
  4111. *
  4112. */
  4113. this.priority = priority;
  4114. };
  4115. Strophe.SASLMechanism.prototype = {
  4116. /**
  4117. * Function: test
  4118. * Checks if mechanism able to run.
  4119. * To disable a mechanism, make this return false;
  4120. *
  4121. * To disable plain authentication run
  4122. * > Strophe.SASLPlain.test = function() {
  4123. * > return false;
  4124. * > }
  4125. *
  4126. * See <SASL mechanisms> for a list of available mechanisms.
  4127. *
  4128. * Parameters:
  4129. * (Strophe.Connection) connection - Target Connection.
  4130. *
  4131. * Returns:
  4132. * (Boolean) If mechanism was able to run.
  4133. */
  4134. /* jshint unused:false */
  4135. test: function test(connection) {
  4136. return true;
  4137. },
  4138. /* jshint unused:true */
  4139. /** PrivateFunction: onStart
  4140. * Called before starting mechanism on some connection.
  4141. *
  4142. * Parameters:
  4143. * (Strophe.Connection) connection - Target Connection.
  4144. */
  4145. onStart: function onStart(connection) {
  4146. this._connection = connection;
  4147. },
  4148. /** PrivateFunction: onChallenge
  4149. * Called by protocol implementation on incoming challenge. If client is
  4150. * first (isClientFirst === true) challenge will be null on the first call.
  4151. *
  4152. * Parameters:
  4153. * (Strophe.Connection) connection - Target Connection.
  4154. * (String) challenge - current challenge to handle.
  4155. *
  4156. * Returns:
  4157. * (String) Mechanism response.
  4158. */
  4159. /* jshint unused:false */
  4160. onChallenge: function onChallenge(connection, challenge) {
  4161. throw new Error("You should implement challenge handling!");
  4162. },
  4163. /* jshint unused:true */
  4164. /** PrivateFunction: onFailure
  4165. * Protocol informs mechanism implementation about SASL failure.
  4166. */
  4167. onFailure: function onFailure() {
  4168. this._connection = null;
  4169. },
  4170. /** PrivateFunction: onSuccess
  4171. * Protocol informs mechanism implementation about SASL success.
  4172. */
  4173. onSuccess: function onSuccess() {
  4174. this._connection = null;
  4175. }
  4176. };
  4177. /** Constants: SASL mechanisms
  4178. * Available authentication mechanisms
  4179. *
  4180. * Strophe.SASLAnonymous - SASL ANONYMOUS authentication.
  4181. * Strophe.SASLPlain - SASL PLAIN authentication.
  4182. * Strophe.SASLMD5 - SASL DIGEST-MD5 authentication
  4183. * Strophe.SASLSHA1 - SASL SCRAM-SHA1 authentication
  4184. * Strophe.SASLOAuthBearer - SASL OAuth Bearer authentication
  4185. * Strophe.SASLExternal - SASL EXTERNAL authentication
  4186. * Strophe.SASLXOAuth2 - SASL X-OAuth2 authentication
  4187. */
  4188. // Building SASL callbacks
  4189. /** PrivateConstructor: SASLAnonymous
  4190. * SASL ANONYMOUS authentication.
  4191. */
  4192. Strophe.SASLAnonymous = function () {};
  4193. Strophe.SASLAnonymous.prototype = new Strophe.SASLMechanism("ANONYMOUS", false, 20);
  4194. Strophe.SASLAnonymous.prototype.test = function (connection) {
  4195. return connection.authcid === null;
  4196. };
  4197. /** PrivateConstructor: SASLPlain
  4198. * SASL PLAIN authentication.
  4199. */
  4200. Strophe.SASLPlain = function () {};
  4201. Strophe.SASLPlain.prototype = new Strophe.SASLMechanism("PLAIN", true, 50);
  4202. Strophe.SASLPlain.prototype.test = function (connection) {
  4203. return connection.authcid !== null;
  4204. };
  4205. Strophe.SASLPlain.prototype.onChallenge = function (connection) {
  4206. var auth_str = connection.authzid;
  4207. auth_str = auth_str + "\0";
  4208. auth_str = auth_str + connection.authcid;
  4209. auth_str = auth_str + "\0";
  4210. auth_str = auth_str + connection.pass;
  4211. return utils__WEBPACK_IMPORTED_MODULE_2__["default"].utf16to8(auth_str);
  4212. };
  4213. /** PrivateConstructor: SASLSHA1
  4214. * SASL SCRAM SHA 1 authentication.
  4215. */
  4216. Strophe.SASLSHA1 = function () {};
  4217. Strophe.SASLSHA1.prototype = new Strophe.SASLMechanism("SCRAM-SHA-1", true, 70);
  4218. Strophe.SASLSHA1.prototype.test = function (connection) {
  4219. return connection.authcid !== null;
  4220. };
  4221. Strophe.SASLSHA1.prototype.onChallenge = function (connection, challenge, test_cnonce) {
  4222. var cnonce = test_cnonce || md5__WEBPACK_IMPORTED_MODULE_0__["default"].hexdigest(Math.random() * 1234567890);
  4223. var auth_str = "n=" + utils__WEBPACK_IMPORTED_MODULE_2__["default"].utf16to8(connection.authcid);
  4224. auth_str += ",r=";
  4225. auth_str += cnonce;
  4226. connection._sasl_data.cnonce = cnonce;
  4227. connection._sasl_data["client-first-message-bare"] = auth_str;
  4228. auth_str = "n,," + auth_str;
  4229. this.onChallenge = function (connection, challenge) {
  4230. var nonce, salt, iter, Hi, U, U_old, i, k;
  4231. var responseText = "c=biws,";
  4232. var authMessage = "".concat(connection._sasl_data["client-first-message-bare"], ",").concat(challenge, ",");
  4233. var cnonce = connection._sasl_data.cnonce;
  4234. var attribMatch = /([a-z]+)=([^,]+)(,|$)/;
  4235. while (challenge.match(attribMatch)) {
  4236. var matches = challenge.match(attribMatch);
  4237. challenge = challenge.replace(matches[0], "");
  4238. switch (matches[1]) {
  4239. case "r":
  4240. nonce = matches[2];
  4241. break;
  4242. case "s":
  4243. salt = matches[2];
  4244. break;
  4245. case "i":
  4246. iter = matches[2];
  4247. break;
  4248. }
  4249. }
  4250. if (nonce.substr(0, cnonce.length) !== cnonce) {
  4251. connection._sasl_data = {};
  4252. return connection._sasl_failure_cb();
  4253. }
  4254. responseText += "r=" + nonce;
  4255. authMessage += responseText;
  4256. salt = atob(salt);
  4257. salt += "\x00\x00\x00\x01";
  4258. var pass = utils__WEBPACK_IMPORTED_MODULE_2__["default"].utf16to8(connection.pass);
  4259. Hi = U_old = sha1__WEBPACK_IMPORTED_MODULE_1__["default"].core_hmac_sha1(pass, salt);
  4260. for (i = 1; i < iter; i++) {
  4261. U = sha1__WEBPACK_IMPORTED_MODULE_1__["default"].core_hmac_sha1(pass, sha1__WEBPACK_IMPORTED_MODULE_1__["default"].binb2str(U_old));
  4262. for (k = 0; k < 5; k++) {
  4263. Hi[k] ^= U[k];
  4264. }
  4265. U_old = U;
  4266. }
  4267. Hi = sha1__WEBPACK_IMPORTED_MODULE_1__["default"].binb2str(Hi);
  4268. var clientKey = sha1__WEBPACK_IMPORTED_MODULE_1__["default"].core_hmac_sha1(Hi, "Client Key");
  4269. var serverKey = sha1__WEBPACK_IMPORTED_MODULE_1__["default"].str_hmac_sha1(Hi, "Server Key");
  4270. var clientSignature = sha1__WEBPACK_IMPORTED_MODULE_1__["default"].core_hmac_sha1(sha1__WEBPACK_IMPORTED_MODULE_1__["default"].str_sha1(sha1__WEBPACK_IMPORTED_MODULE_1__["default"].binb2str(clientKey)), authMessage);
  4271. connection._sasl_data["server-signature"] = sha1__WEBPACK_IMPORTED_MODULE_1__["default"].b64_hmac_sha1(serverKey, authMessage);
  4272. for (k = 0; k < 5; k++) {
  4273. clientKey[k] ^= clientSignature[k];
  4274. }
  4275. responseText += ",p=" + btoa(sha1__WEBPACK_IMPORTED_MODULE_1__["default"].binb2str(clientKey));
  4276. return responseText;
  4277. };
  4278. return auth_str;
  4279. };
  4280. /** PrivateConstructor: SASLMD5
  4281. * SASL DIGEST MD5 authentication.
  4282. */
  4283. Strophe.SASLMD5 = function () {};
  4284. Strophe.SASLMD5.prototype = new Strophe.SASLMechanism("DIGEST-MD5", false, 60);
  4285. Strophe.SASLMD5.prototype.test = function (connection) {
  4286. return connection.authcid !== null;
  4287. };
  4288. /** PrivateFunction: _quote
  4289. * _Private_ utility function to backslash escape and quote strings.
  4290. *
  4291. * Parameters:
  4292. * (String) str - The string to be quoted.
  4293. *
  4294. * Returns:
  4295. * quoted string
  4296. */
  4297. Strophe.SASLMD5.prototype._quote = function (str) {
  4298. return '"' + str.replace(/\\/g, "\\\\").replace(/"/g, '\\"') + '"'; //" end string workaround for emacs
  4299. };
  4300. Strophe.SASLMD5.prototype.onChallenge = function (connection, challenge, test_cnonce) {
  4301. var attribMatch = /([a-z]+)=("[^"]+"|[^,"]+)(?:,|$)/;
  4302. var cnonce = test_cnonce || md5__WEBPACK_IMPORTED_MODULE_0__["default"].hexdigest("" + Math.random() * 1234567890);
  4303. var realm = "";
  4304. var host = null;
  4305. var nonce = "";
  4306. var qop = "";
  4307. while (challenge.match(attribMatch)) {
  4308. var matches = challenge.match(attribMatch);
  4309. challenge = challenge.replace(matches[0], "");
  4310. matches[2] = matches[2].replace(/^"(.+)"$/, "$1");
  4311. switch (matches[1]) {
  4312. case "realm":
  4313. realm = matches[2];
  4314. break;
  4315. case "nonce":
  4316. nonce = matches[2];
  4317. break;
  4318. case "qop":
  4319. qop = matches[2];
  4320. break;
  4321. case "host":
  4322. host = matches[2];
  4323. break;
  4324. }
  4325. }
  4326. var digest_uri = connection.servtype + "/" + connection.domain;
  4327. if (host !== null) {
  4328. digest_uri = digest_uri + "/" + host;
  4329. }
  4330. var cred = utils__WEBPACK_IMPORTED_MODULE_2__["default"].utf16to8(connection.authcid + ":" + realm + ":" + this._connection.pass);
  4331. var A1 = md5__WEBPACK_IMPORTED_MODULE_0__["default"].hash(cred) + ":" + nonce + ":" + cnonce;
  4332. var A2 = 'AUTHENTICATE:' + digest_uri;
  4333. var responseText = "";
  4334. responseText += 'charset=utf-8,';
  4335. responseText += 'username=' + this._quote(utils__WEBPACK_IMPORTED_MODULE_2__["default"].utf16to8(connection.authcid)) + ',';
  4336. responseText += 'realm=' + this._quote(realm) + ',';
  4337. responseText += 'nonce=' + this._quote(nonce) + ',';
  4338. responseText += 'nc=00000001,';
  4339. responseText += 'cnonce=' + this._quote(cnonce) + ',';
  4340. responseText += 'digest-uri=' + this._quote(digest_uri) + ',';
  4341. responseText += 'response=' + md5__WEBPACK_IMPORTED_MODULE_0__["default"].hexdigest(md5__WEBPACK_IMPORTED_MODULE_0__["default"].hexdigest(A1) + ":" + nonce + ":00000001:" + cnonce + ":auth:" + md5__WEBPACK_IMPORTED_MODULE_0__["default"].hexdigest(A2)) + ",";
  4342. responseText += 'qop=auth';
  4343. this.onChallenge = function () {
  4344. return "";
  4345. };
  4346. return responseText;
  4347. };
  4348. /** PrivateConstructor: SASLOAuthBearer
  4349. * SASL OAuth Bearer authentication.
  4350. */
  4351. Strophe.SASLOAuthBearer = function () {};
  4352. Strophe.SASLOAuthBearer.prototype = new Strophe.SASLMechanism("OAUTHBEARER", true, 40);
  4353. Strophe.SASLOAuthBearer.prototype.test = function (connection) {
  4354. return connection.pass !== null;
  4355. };
  4356. Strophe.SASLOAuthBearer.prototype.onChallenge = function (connection) {
  4357. var auth_str = 'n,';
  4358. if (connection.authcid !== null) {
  4359. auth_str = auth_str + 'a=' + connection.authzid;
  4360. }
  4361. auth_str = auth_str + ',';
  4362. auth_str = auth_str + "\x01";
  4363. auth_str = auth_str + 'auth=Bearer ';
  4364. auth_str = auth_str + connection.pass;
  4365. auth_str = auth_str + "\x01";
  4366. auth_str = auth_str + "\x01";
  4367. return utils__WEBPACK_IMPORTED_MODULE_2__["default"].utf16to8(auth_str);
  4368. };
  4369. /** PrivateConstructor: SASLExternal
  4370. * SASL EXTERNAL authentication.
  4371. *
  4372. * The EXTERNAL mechanism allows a client to request the server to use
  4373. * credentials established by means external to the mechanism to
  4374. * authenticate the client. The external means may be, for instance,
  4375. * TLS services.
  4376. */
  4377. Strophe.SASLExternal = function () {};
  4378. Strophe.SASLExternal.prototype = new Strophe.SASLMechanism("EXTERNAL", true, 10);
  4379. Strophe.SASLExternal.prototype.onChallenge = function (connection) {
  4380. /** According to XEP-178, an authzid SHOULD NOT be presented when the
  4381. * authcid contained or implied in the client certificate is the JID (i.e.
  4382. * authzid) with which the user wants to log in as.
  4383. *
  4384. * To NOT send the authzid, the user should therefore set the authcid equal
  4385. * to the JID when instantiating a new Strophe.Connection object.
  4386. */
  4387. return connection.authcid === connection.authzid ? '' : connection.authzid;
  4388. };
  4389. /** PrivateConstructor: SASLXOAuth2
  4390. * SASL X-OAuth2 authentication.
  4391. */
  4392. Strophe.SASLXOAuth2 = function () {};
  4393. Strophe.SASLXOAuth2.prototype = new Strophe.SASLMechanism("X-OAUTH2", true, 30);
  4394. Strophe.SASLXOAuth2.prototype.test = function (connection) {
  4395. return connection.pass !== null;
  4396. };
  4397. Strophe.SASLXOAuth2.prototype.onChallenge = function (connection) {
  4398. var auth_str = "\0";
  4399. if (connection.authcid !== null) {
  4400. auth_str = auth_str + connection.authzid;
  4401. }
  4402. auth_str = auth_str + "\0";
  4403. auth_str = auth_str + connection.pass;
  4404. return utils__WEBPACK_IMPORTED_MODULE_2__["default"].utf16to8(auth_str);
  4405. };
  4406. /* harmony default export */
  4407. __webpack_exports__["default"] = {
  4408. 'Strophe': Strophe,
  4409. '$build': $build,
  4410. '$iq': $iq,
  4411. '$msg': $msg,
  4412. '$pres': $pres,
  4413. 'SHA1': sha1__WEBPACK_IMPORTED_MODULE_1__["default"],
  4414. 'MD5': md5__WEBPACK_IMPORTED_MODULE_0__["default"],
  4415. 'b64_hmac_sha1': sha1__WEBPACK_IMPORTED_MODULE_1__["default"].b64_hmac_sha1,
  4416. 'b64_sha1': sha1__WEBPACK_IMPORTED_MODULE_1__["default"].b64_sha1,
  4417. 'str_hmac_sha1': sha1__WEBPACK_IMPORTED_MODULE_1__["default"].str_hmac_sha1,
  4418. 'str_sha1': sha1__WEBPACK_IMPORTED_MODULE_1__["default"].str_sha1
  4419. };
  4420. /***/
  4421. },
  4422. /***/
  4423. "./src/md5.js":
  4424. /*!********************!*\
  4425. !*** ./src/md5.js ***!
  4426. \********************/
  4427. /*! exports provided: default */
  4428. /***/
  4429. function srcMd5Js(module, __webpack_exports__, __webpack_require__) {
  4430. "use strict";
  4431. __webpack_require__.r(__webpack_exports__);
  4432. /* harmony export (binding) */
  4433. __webpack_require__.d(__webpack_exports__, "default", function () {
  4434. return MD5;
  4435. });
  4436. /*
  4437. * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
  4438. * Digest Algorithm, as defined in RFC 1321.
  4439. * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
  4440. * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
  4441. * Distributed under the BSD License
  4442. * See http://pajhome.org.uk/crypt/md5 for more info.
  4443. */
  4444. /*
  4445. * Everything that isn't used by Strophe has been stripped here!
  4446. */
  4447. /*
  4448. * Add integers, wrapping at 2^32. This uses 16-bit operations internally
  4449. * to work around bugs in some JS interpreters.
  4450. */
  4451. var safe_add = function safe_add(x, y) {
  4452. var lsw = (x & 0xFFFF) + (y & 0xFFFF);
  4453. var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
  4454. return msw << 16 | lsw & 0xFFFF;
  4455. };
  4456. /*
  4457. * Bitwise rotate a 32-bit number to the left.
  4458. */
  4459. var bit_rol = function bit_rol(num, cnt) {
  4460. return num << cnt | num >>> 32 - cnt;
  4461. };
  4462. /*
  4463. * Convert a string to an array of little-endian words
  4464. */
  4465. var str2binl = function str2binl(str) {
  4466. var bin = [];
  4467. for (var i = 0; i < str.length * 8; i += 8) {
  4468. bin[i >> 5] |= (str.charCodeAt(i / 8) & 255) << i % 32;
  4469. }
  4470. return bin;
  4471. };
  4472. /*
  4473. * Convert an array of little-endian words to a string
  4474. */
  4475. var binl2str = function binl2str(bin) {
  4476. var str = "";
  4477. for (var i = 0; i < bin.length * 32; i += 8) {
  4478. str += String.fromCharCode(bin[i >> 5] >>> i % 32 & 255);
  4479. }
  4480. return str;
  4481. };
  4482. /*
  4483. * Convert an array of little-endian words to a hex string.
  4484. */
  4485. var binl2hex = function binl2hex(binarray) {
  4486. var hex_tab = "0123456789abcdef";
  4487. var str = "";
  4488. for (var i = 0; i < binarray.length * 4; i++) {
  4489. str += hex_tab.charAt(binarray[i >> 2] >> i % 4 * 8 + 4 & 0xF) + hex_tab.charAt(binarray[i >> 2] >> i % 4 * 8 & 0xF);
  4490. }
  4491. return str;
  4492. };
  4493. /*
  4494. * These functions implement the four basic operations the algorithm uses.
  4495. */
  4496. var md5_cmn = function md5_cmn(q, a, b, x, s, t) {
  4497. return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b);
  4498. };
  4499. var md5_ff = function md5_ff(a, b, c, d, x, s, t) {
  4500. return md5_cmn(b & c | ~b & d, a, b, x, s, t);
  4501. };
  4502. var md5_gg = function md5_gg(a, b, c, d, x, s, t) {
  4503. return md5_cmn(b & d | c & ~d, a, b, x, s, t);
  4504. };
  4505. var md5_hh = function md5_hh(a, b, c, d, x, s, t) {
  4506. return md5_cmn(b ^ c ^ d, a, b, x, s, t);
  4507. };
  4508. var md5_ii = function md5_ii(a, b, c, d, x, s, t) {
  4509. return md5_cmn(c ^ (b | ~d), a, b, x, s, t);
  4510. };
  4511. /*
  4512. * Calculate the MD5 of an array of little-endian words, and a bit length
  4513. */
  4514. var core_md5 = function core_md5(x, len) {
  4515. /* append padding */
  4516. x[len >> 5] |= 0x80 << len % 32;
  4517. x[(len + 64 >>> 9 << 4) + 14] = len;
  4518. var a = 1732584193;
  4519. var b = -271733879;
  4520. var c = -1732584194;
  4521. var d = 271733878;
  4522. var olda, oldb, oldc, oldd;
  4523. for (var i = 0; i < x.length; i += 16) {
  4524. olda = a;
  4525. oldb = b;
  4526. oldc = c;
  4527. oldd = d;
  4528. a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936);
  4529. d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);
  4530. c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);
  4531. b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);
  4532. a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);
  4533. d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);
  4534. c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);
  4535. b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);
  4536. a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);
  4537. d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);
  4538. c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);
  4539. b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);
  4540. a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);
  4541. d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);
  4542. c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);
  4543. b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);
  4544. a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);
  4545. d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);
  4546. c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);
  4547. b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302);
  4548. a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);
  4549. d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);
  4550. c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);
  4551. b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);
  4552. a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);
  4553. d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);
  4554. c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);
  4555. b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);
  4556. a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);
  4557. d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);
  4558. c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);
  4559. b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);
  4560. a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);
  4561. d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);
  4562. c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);
  4563. b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);
  4564. a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);
  4565. d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);
  4566. c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);
  4567. b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);
  4568. a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);
  4569. d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222);
  4570. c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);
  4571. b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);
  4572. a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);
  4573. d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);
  4574. c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);
  4575. b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);
  4576. a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844);
  4577. d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);
  4578. c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);
  4579. b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);
  4580. a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);
  4581. d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);
  4582. c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);
  4583. b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);
  4584. a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);
  4585. d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);
  4586. c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);
  4587. b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);
  4588. a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);
  4589. d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);
  4590. c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);
  4591. b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);
  4592. a = safe_add(a, olda);
  4593. b = safe_add(b, oldb);
  4594. c = safe_add(c, oldc);
  4595. d = safe_add(d, oldd);
  4596. }
  4597. return [a, b, c, d];
  4598. };
  4599. /*
  4600. * These are the functions you'll usually want to call.
  4601. * They take string arguments and return either hex or base-64 encoded
  4602. * strings.
  4603. */
  4604. var MD5 = {
  4605. hexdigest: function hexdigest(s) {
  4606. return binl2hex(core_md5(str2binl(s), s.length * 8));
  4607. },
  4608. hash: function hash(s) {
  4609. return binl2str(core_md5(str2binl(s), s.length * 8));
  4610. }
  4611. };
  4612. /***/
  4613. },
  4614. /***/
  4615. "./src/sha1.js":
  4616. /*!*********************!*\
  4617. !*** ./src/sha1.js ***!
  4618. \*********************/
  4619. /*! exports provided: default */
  4620. /***/
  4621. function srcSha1Js(module, __webpack_exports__, __webpack_require__) {
  4622. "use strict";
  4623. __webpack_require__.r(__webpack_exports__);
  4624. /* harmony export (binding) */
  4625. __webpack_require__.d(__webpack_exports__, "default", function () {
  4626. return SHA1;
  4627. });
  4628. /*
  4629. * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined
  4630. * in FIPS PUB 180-1
  4631. * Version 2.1a Copyright Paul Johnston 2000 - 2002.
  4632. * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
  4633. * Distributed under the BSD License
  4634. * See http://pajhome.org.uk/crypt/md5 for details.
  4635. */
  4636. /* jshint undef: true, unused: true:, noarg: true, latedef: false */
  4637. /* global define */
  4638. /* Some functions and variables have been stripped for use with Strophe */
  4639. /*
  4640. * Calculate the SHA-1 of an array of big-endian words, and a bit length
  4641. */
  4642. function core_sha1(x, len) {
  4643. /* append padding */
  4644. x[len >> 5] |= 0x80 << 24 - len % 32;
  4645. x[(len + 64 >> 9 << 4) + 15] = len;
  4646. var w = new Array(80);
  4647. var a = 1732584193;
  4648. var b = -271733879;
  4649. var c = -1732584194;
  4650. var d = 271733878;
  4651. var e = -1009589776;
  4652. var i, j, t, olda, oldb, oldc, oldd, olde;
  4653. for (i = 0; i < x.length; i += 16) {
  4654. olda = a;
  4655. oldb = b;
  4656. oldc = c;
  4657. oldd = d;
  4658. olde = e;
  4659. for (j = 0; j < 80; j++) {
  4660. if (j < 16) {
  4661. w[j] = x[i + j];
  4662. } else {
  4663. w[j] = rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1);
  4664. }
  4665. t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), safe_add(safe_add(e, w[j]), sha1_kt(j)));
  4666. e = d;
  4667. d = c;
  4668. c = rol(b, 30);
  4669. b = a;
  4670. a = t;
  4671. }
  4672. a = safe_add(a, olda);
  4673. b = safe_add(b, oldb);
  4674. c = safe_add(c, oldc);
  4675. d = safe_add(d, oldd);
  4676. e = safe_add(e, olde);
  4677. }
  4678. return [a, b, c, d, e];
  4679. }
  4680. /*
  4681. * Perform the appropriate triplet combination function for the current
  4682. * iteration
  4683. */
  4684. function sha1_ft(t, b, c, d) {
  4685. if (t < 20) {
  4686. return b & c | ~b & d;
  4687. }
  4688. if (t < 40) {
  4689. return b ^ c ^ d;
  4690. }
  4691. if (t < 60) {
  4692. return b & c | b & d | c & d;
  4693. }
  4694. return b ^ c ^ d;
  4695. }
  4696. /*
  4697. * Determine the appropriate additive constant for the current iteration
  4698. */
  4699. function sha1_kt(t) {
  4700. return t < 20 ? 1518500249 : t < 40 ? 1859775393 : t < 60 ? -1894007588 : -899497514;
  4701. }
  4702. /*
  4703. * Calculate the HMAC-SHA1 of a key and some data
  4704. */
  4705. function core_hmac_sha1(key, data) {
  4706. var bkey = str2binb(key);
  4707. if (bkey.length > 16) {
  4708. bkey = core_sha1(bkey, key.length * 8);
  4709. }
  4710. var ipad = new Array(16),
  4711. opad = new Array(16);
  4712. for (var i = 0; i < 16; i++) {
  4713. ipad[i] = bkey[i] ^ 0x36363636;
  4714. opad[i] = bkey[i] ^ 0x5C5C5C5C;
  4715. }
  4716. var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * 8);
  4717. return core_sha1(opad.concat(hash), 512 + 160);
  4718. }
  4719. /*
  4720. * Add integers, wrapping at 2^32. This uses 16-bit operations internally
  4721. * to work around bugs in some JS interpreters.
  4722. */
  4723. function safe_add(x, y) {
  4724. var lsw = (x & 0xFFFF) + (y & 0xFFFF);
  4725. var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
  4726. return msw << 16 | lsw & 0xFFFF;
  4727. }
  4728. /*
  4729. * Bitwise rotate a 32-bit number to the left.
  4730. */
  4731. function rol(num, cnt) {
  4732. return num << cnt | num >>> 32 - cnt;
  4733. }
  4734. /*
  4735. * Convert an 8-bit or 16-bit string to an array of big-endian words
  4736. * In 8-bit function, characters >255 have their hi-byte silently ignored.
  4737. */
  4738. function str2binb(str) {
  4739. var bin = [];
  4740. var mask = 255;
  4741. for (var i = 0; i < str.length * 8; i += 8) {
  4742. bin[i >> 5] |= (str.charCodeAt(i / 8) & mask) << 24 - i % 32;
  4743. }
  4744. return bin;
  4745. }
  4746. /*
  4747. * Convert an array of big-endian words to a base-64 string
  4748. */
  4749. function binb2b64(binarray) {
  4750. var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  4751. var str = "";
  4752. var triplet, j;
  4753. for (var i = 0; i < binarray.length * 4; i += 3) {
  4754. triplet = (binarray[i >> 2] >> 8 * (3 - i % 4) & 0xFF) << 16 | (binarray[i + 1 >> 2] >> 8 * (3 - (i + 1) % 4) & 0xFF) << 8 | binarray[i + 2 >> 2] >> 8 * (3 - (i + 2) % 4) & 0xFF;
  4755. for (j = 0; j < 4; j++) {
  4756. if (i * 8 + j * 6 > binarray.length * 32) {
  4757. str += "=";
  4758. } else {
  4759. str += tab.charAt(triplet >> 6 * (3 - j) & 0x3F);
  4760. }
  4761. }
  4762. }
  4763. return str;
  4764. }
  4765. /*
  4766. * Convert an array of big-endian words to a string
  4767. */
  4768. function binb2str(bin) {
  4769. var str = "";
  4770. var mask = 255;
  4771. for (var i = 0; i < bin.length * 32; i += 8) {
  4772. str += String.fromCharCode(bin[i >> 5] >>> 24 - i % 32 & mask);
  4773. }
  4774. return str;
  4775. }
  4776. /*
  4777. * These are the functions you'll usually want to call
  4778. * They take string arguments and return either hex or base-64 encoded strings
  4779. */
  4780. var SHA1 = {
  4781. b64_hmac_sha1: function b64_hmac_sha1(key, data) {
  4782. return binb2b64(core_hmac_sha1(key, data));
  4783. },
  4784. b64_sha1: function b64_sha1(s) {
  4785. return binb2b64(core_sha1(str2binb(s), s.length * 8));
  4786. },
  4787. binb2str: binb2str,
  4788. core_hmac_sha1: core_hmac_sha1,
  4789. str_hmac_sha1: function str_hmac_sha1(key, data) {
  4790. return binb2str(core_hmac_sha1(key, data));
  4791. },
  4792. str_sha1: function str_sha1(s) {
  4793. return binb2str(core_sha1(str2binb(s), s.length * 8));
  4794. }
  4795. };
  4796. /***/
  4797. },
  4798. /***/
  4799. "./src/strophe.js":
  4800. /*!************************!*\
  4801. !*** ./src/strophe.js ***!
  4802. \************************/
  4803. /*! exports provided: default */
  4804. /***/
  4805. function srcStropheJs(module, __webpack_exports__, __webpack_require__) {
  4806. "use strict";
  4807. __webpack_require__.r(__webpack_exports__);
  4808. /* harmony import */
  4809. var bosh__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
  4810. /*! bosh */
  4811. "./src/bosh.js");
  4812. /* harmony import */
  4813. var websocket__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
  4814. /*! websocket */
  4815. "./src/websocket.js");
  4816. /* harmony import */
  4817. var core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
  4818. /*! core */
  4819. "./src/core.js");
  4820. /* harmony reexport (safe) */
  4821. __webpack_require__.d(__webpack_exports__, "default", function () {
  4822. return core__WEBPACK_IMPORTED_MODULE_2__["default"];
  4823. });
  4824. /***/
  4825. },
  4826. /***/
  4827. "./src/utils.js":
  4828. /*!**********************!*\
  4829. !*** ./src/utils.js ***!
  4830. \**********************/
  4831. /*! exports provided: default */
  4832. /***/
  4833. function srcUtilsJs(module, __webpack_exports__, __webpack_require__) {
  4834. "use strict";
  4835. __webpack_require__.r(__webpack_exports__);
  4836. /* harmony export (binding) */
  4837. __webpack_require__.d(__webpack_exports__, "default", function () {
  4838. return utils;
  4839. });
  4840. function _typeof(obj) {
  4841. if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
  4842. _typeof = function _typeof(obj) {
  4843. return typeof obj;
  4844. };
  4845. } else {
  4846. _typeof = function _typeof(obj) {
  4847. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  4848. };
  4849. }
  4850. return _typeof(obj);
  4851. }
  4852. var utils = {
  4853. utf16to8: function utf16to8(str) {
  4854. var i, c;
  4855. var out = "";
  4856. var len = str.length;
  4857. for (i = 0; i < len; i++) {
  4858. c = str.charCodeAt(i);
  4859. if (c >= 0x0000 && c <= 0x007F) {
  4860. out += str.charAt(i);
  4861. } else if (c > 0x07FF) {
  4862. out += String.fromCharCode(0xE0 | c >> 12 & 0x0F);
  4863. out += String.fromCharCode(0x80 | c >> 6 & 0x3F);
  4864. out += String.fromCharCode(0x80 | c >> 0 & 0x3F);
  4865. } else {
  4866. out += String.fromCharCode(0xC0 | c >> 6 & 0x1F);
  4867. out += String.fromCharCode(0x80 | c >> 0 & 0x3F);
  4868. }
  4869. }
  4870. return out;
  4871. },
  4872. addCookies: function addCookies(cookies) {
  4873. /* Parameters:
  4874. * (Object) cookies - either a map of cookie names
  4875. * to string values or to maps of cookie values.
  4876. *
  4877. * For example:
  4878. * { "myCookie": "1234" }
  4879. *
  4880. * or:
  4881. * { "myCookie": {
  4882. * "value": "1234",
  4883. * "domain": ".example.org",
  4884. * "path": "/",
  4885. * "expires": expirationDate
  4886. * }
  4887. * }
  4888. *
  4889. * These values get passed to Strophe.Connection via
  4890. * options.cookies
  4891. */
  4892. cookies = cookies || {};
  4893. for (var cookieName in cookies) {
  4894. if (Object.prototype.hasOwnProperty.call(cookies, cookieName)) {
  4895. var expires = '';
  4896. var domain = '';
  4897. var path = '';
  4898. var cookieObj = cookies[cookieName];
  4899. var isObj = _typeof(cookieObj) === "object";
  4900. var cookieValue = escape(unescape(isObj ? cookieObj.value : cookieObj));
  4901. if (isObj) {
  4902. expires = cookieObj.expires ? ";expires=" + cookieObj.expires : '';
  4903. domain = cookieObj.domain ? ";domain=" + cookieObj.domain : '';
  4904. path = cookieObj.path ? ";path=" + cookieObj.path : '';
  4905. }
  4906. document.cookie = cookieName + '=' + cookieValue + expires + domain + path;
  4907. }
  4908. }
  4909. }
  4910. };
  4911. /***/
  4912. },
  4913. /***/
  4914. "./src/websocket.js":
  4915. /*!**************************!*\
  4916. !*** ./src/websocket.js ***!
  4917. \**************************/
  4918. /*! no exports provided */
  4919. /***/
  4920. function srcWebsocketJs(module, __webpack_exports__, __webpack_require__) {
  4921. "use strict";
  4922. __webpack_require__.r(__webpack_exports__);
  4923. /* harmony import */
  4924. var core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
  4925. /*! core */
  4926. "./src/core.js");
  4927. /*
  4928. This program is distributed under the terms of the MIT license.
  4929. Please see the LICENSE file for details.
  4930. Copyright 2006-2008, OGG, LLC
  4931. */
  4932. /* global window, clearTimeout, WebSocket, DOMParser */
  4933. var Strophe = core__WEBPACK_IMPORTED_MODULE_0__["default"].Strophe;
  4934. var $build = core__WEBPACK_IMPORTED_MODULE_0__["default"].$build;
  4935. /** Class: Strophe.WebSocket
  4936. * _Private_ helper class that handles WebSocket Connections
  4937. *
  4938. * The Strophe.WebSocket class is used internally by Strophe.Connection
  4939. * to encapsulate WebSocket sessions. It is not meant to be used from user's code.
  4940. */
  4941. /** File: websocket.js
  4942. * A JavaScript library to enable XMPP over Websocket in Strophejs.
  4943. *
  4944. * This file implements XMPP over WebSockets for Strophejs.
  4945. * If a Connection is established with a Websocket url (ws://...)
  4946. * Strophe will use WebSockets.
  4947. * For more information on XMPP-over-WebSocket see RFC 7395:
  4948. * http://tools.ietf.org/html/rfc7395
  4949. *
  4950. * WebSocket support implemented by Andreas Guth (andreas.guth@rwth-aachen.de)
  4951. */
  4952. /** PrivateConstructor: Strophe.Websocket
  4953. * Create and initialize a Strophe.WebSocket object.
  4954. * Currently only sets the connection Object.
  4955. *
  4956. * Parameters:
  4957. * (Strophe.Connection) connection - The Strophe.Connection that will use WebSockets.
  4958. *
  4959. * Returns:
  4960. * A new Strophe.WebSocket object.
  4961. */
  4962. Strophe.Websocket = function (connection) {
  4963. this._conn = connection;
  4964. this.strip = "wrapper";
  4965. var service = connection.service;
  4966. if (service.indexOf("ws:") !== 0 && service.indexOf("wss:") !== 0) {
  4967. // If the service is not an absolute URL, assume it is a path and put the absolute
  4968. // URL together from options, current URL and the path.
  4969. var new_service = "";
  4970. if (connection.options.protocol === "ws" && window.location.protocol !== "https:") {
  4971. new_service += "ws";
  4972. } else {
  4973. new_service += "wss";
  4974. }
  4975. new_service += "://" + window.location.host;
  4976. if (service.indexOf("/") !== 0) {
  4977. new_service += window.location.pathname + service;
  4978. } else {
  4979. new_service += service;
  4980. }
  4981. connection.service = new_service;
  4982. }
  4983. };
  4984. Strophe.Websocket.prototype = {
  4985. /** PrivateFunction: _buildStream
  4986. * _Private_ helper function to generate the <stream> start tag for WebSockets
  4987. *
  4988. * Returns:
  4989. * A Strophe.Builder with a <stream> element.
  4990. */
  4991. _buildStream: function _buildStream() {
  4992. return $build("open", {
  4993. "xmlns": Strophe.NS.FRAMING,
  4994. "to": this._conn.domain,
  4995. "version": '1.0'
  4996. });
  4997. },
  4998. /** PrivateFunction: _check_streamerror
  4999. * _Private_ checks a message for stream:error
  5000. *
  5001. * Parameters:
  5002. * (Strophe.Request) bodyWrap - The received stanza.
  5003. * connectstatus - The ConnectStatus that will be set on error.
  5004. * Returns:
  5005. * true if there was a streamerror, false otherwise.
  5006. */
  5007. _check_streamerror: function _check_streamerror(bodyWrap, connectstatus) {
  5008. var errors;
  5009. if (bodyWrap.getElementsByTagNameNS) {
  5010. errors = bodyWrap.getElementsByTagNameNS(Strophe.NS.STREAM, "error");
  5011. } else {
  5012. errors = bodyWrap.getElementsByTagName("stream:error");
  5013. }
  5014. if (errors.length === 0) {
  5015. return false;
  5016. }
  5017. var error = errors[0];
  5018. var condition = "";
  5019. var text = "";
  5020. var ns = "urn:ietf:params:xml:ns:xmpp-streams";
  5021. for (var i = 0; i < error.childNodes.length; i++) {
  5022. var e = error.childNodes[i];
  5023. if (e.getAttribute("xmlns") !== ns) {
  5024. break;
  5025. }
  5026. if (e.nodeName === "text") {
  5027. text = e.textContent;
  5028. } else {
  5029. condition = e.nodeName;
  5030. }
  5031. }
  5032. var errorString = "WebSocket stream error: ";
  5033. if (condition) {
  5034. errorString += condition;
  5035. } else {
  5036. errorString += "unknown";
  5037. }
  5038. if (text) {
  5039. errorString += " - " + text;
  5040. }
  5041. Strophe.error(errorString); // close the connection on stream_error
  5042. this._conn._changeConnectStatus(connectstatus, condition);
  5043. this._conn._doDisconnect();
  5044. return true;
  5045. },
  5046. /** PrivateFunction: _reset
  5047. * Reset the connection.
  5048. *
  5049. * This function is called by the reset function of the Strophe Connection.
  5050. * Is not needed by WebSockets.
  5051. */
  5052. _reset: function _reset() {
  5053. return;
  5054. },
  5055. /** PrivateFunction: _connect
  5056. * _Private_ function called by Strophe.Connection.connect
  5057. *
  5058. * Creates a WebSocket for a connection and assigns Callbacks to it.
  5059. * Does nothing if there already is a WebSocket.
  5060. */
  5061. _connect: function _connect() {
  5062. // Ensure that there is no open WebSocket from a previous Connection.
  5063. this._closeSocket(); // Create the new WobSocket
  5064. this.socket = new WebSocket(this._conn.service, "xmpp");
  5065. this.socket.onopen = this._onOpen.bind(this);
  5066. this.socket.onerror = this._onError.bind(this);
  5067. this.socket.onclose = this._onClose.bind(this);
  5068. this.socket.onmessage = this._connect_cb_wrapper.bind(this);
  5069. },
  5070. /** PrivateFunction: _connect_cb
  5071. * _Private_ function called by Strophe.Connection._connect_cb
  5072. *
  5073. * checks for stream:error
  5074. *
  5075. * Parameters:
  5076. * (Strophe.Request) bodyWrap - The received stanza.
  5077. */
  5078. _connect_cb: function _connect_cb(bodyWrap) {
  5079. var error = this._check_streamerror(bodyWrap, Strophe.Status.CONNFAIL);
  5080. if (error) {
  5081. return Strophe.Status.CONNFAIL;
  5082. }
  5083. },
  5084. /** PrivateFunction: _handleStreamStart
  5085. * _Private_ function that checks the opening <open /> tag for errors.
  5086. *
  5087. * Disconnects if there is an error and returns false, true otherwise.
  5088. *
  5089. * Parameters:
  5090. * (Node) message - Stanza containing the <open /> tag.
  5091. */
  5092. _handleStreamStart: function _handleStreamStart(message) {
  5093. var error = false; // Check for errors in the <open /> tag
  5094. var ns = message.getAttribute("xmlns");
  5095. if (typeof ns !== "string") {
  5096. error = "Missing xmlns in <open />";
  5097. } else if (ns !== Strophe.NS.FRAMING) {
  5098. error = "Wrong xmlns in <open />: " + ns;
  5099. }
  5100. var ver = message.getAttribute("version");
  5101. if (typeof ver !== "string") {
  5102. error = "Missing version in <open />";
  5103. } else if (ver !== "1.0") {
  5104. error = "Wrong version in <open />: " + ver;
  5105. }
  5106. if (error) {
  5107. this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, error);
  5108. this._conn._doDisconnect();
  5109. return false;
  5110. }
  5111. return true;
  5112. },
  5113. /** PrivateFunction: _connect_cb_wrapper
  5114. * _Private_ function that handles the first connection messages.
  5115. *
  5116. * On receiving an opening stream tag this callback replaces itself with the real
  5117. * message handler. On receiving a stream error the connection is terminated.
  5118. */
  5119. _connect_cb_wrapper: function _connect_cb_wrapper(message) {
  5120. if (message.data.indexOf("<open ") === 0 || message.data.indexOf("<?xml") === 0) {
  5121. // Strip the XML Declaration, if there is one
  5122. var data = message.data.replace(/^(<\?.*?\?>\s*)*/, "");
  5123. if (data === '') return;
  5124. var streamStart = new DOMParser().parseFromString(data, "text/xml").documentElement;
  5125. this._conn.xmlInput(streamStart);
  5126. this._conn.rawInput(message.data); //_handleStreamSteart will check for XML errors and disconnect on error
  5127. if (this._handleStreamStart(streamStart)) {
  5128. //_connect_cb will check for stream:error and disconnect on error
  5129. this._connect_cb(streamStart);
  5130. }
  5131. } else if (message.data.indexOf("<close ") === 0) {
  5132. // <close xmlns="urn:ietf:params:xml:ns:xmpp-framing />
  5133. // Parse the raw string to an XML element
  5134. var parsedMessage = new DOMParser().parseFromString(message.data, "text/xml").documentElement; // Report this input to the raw and xml handlers
  5135. this._conn.xmlInput(parsedMessage);
  5136. this._conn.rawInput(message.data);
  5137. var see_uri = parsedMessage.getAttribute("see-other-uri");
  5138. if (see_uri) {
  5139. var service = this._conn.service; // Valid scenarios: WSS->WSS, WS->ANY
  5140. var isSecureRedirect = service.indexOf("wss:") >= 0 && see_uri.indexOf("wss:") >= 0 || service.indexOf("ws:") >= 0;
  5141. if (isSecureRedirect) {
  5142. this._conn._changeConnectStatus(Strophe.Status.REDIRECT, "Received see-other-uri, resetting connection");
  5143. this._conn.reset();
  5144. this._conn.service = see_uri;
  5145. this._connect();
  5146. }
  5147. } else {
  5148. this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "Received closing stream");
  5149. this._conn._doDisconnect();
  5150. }
  5151. } else {
  5152. var string = this._streamWrap(message.data);
  5153. var elem = new DOMParser().parseFromString(string, "text/xml").documentElement;
  5154. this.socket.onmessage = this._onMessage.bind(this);
  5155. this._conn._connect_cb(elem, null, message.data);
  5156. }
  5157. },
  5158. /** PrivateFunction: _disconnect
  5159. * _Private_ function called by Strophe.Connection.disconnect
  5160. *
  5161. * Disconnects and sends a last stanza if one is given
  5162. *
  5163. * Parameters:
  5164. * (Request) pres - This stanza will be sent before disconnecting.
  5165. */
  5166. _disconnect: function _disconnect(pres) {
  5167. if (this.socket && this.socket.readyState !== WebSocket.CLOSED) {
  5168. if (pres) {
  5169. this._conn.send(pres);
  5170. }
  5171. var close = $build("close", {
  5172. "xmlns": Strophe.NS.FRAMING
  5173. });
  5174. this._conn.xmlOutput(close.tree());
  5175. var closeString = Strophe.serialize(close);
  5176. this._conn.rawOutput(closeString);
  5177. try {
  5178. this.socket.send(closeString);
  5179. } catch (e) {
  5180. Strophe.info("Couldn't send <close /> tag.");
  5181. }
  5182. }
  5183. this._conn._doDisconnect();
  5184. },
  5185. /** PrivateFunction: _doDisconnect
  5186. * _Private_ function to disconnect.
  5187. *
  5188. * Just closes the Socket for WebSockets
  5189. */
  5190. _doDisconnect: function _doDisconnect() {
  5191. Strophe.info("WebSockets _doDisconnect was called");
  5192. this._closeSocket();
  5193. },
  5194. /** PrivateFunction _streamWrap
  5195. * _Private_ helper function to wrap a stanza in a <stream> tag.
  5196. * This is used so Strophe can process stanzas from WebSockets like BOSH
  5197. */
  5198. _streamWrap: function _streamWrap(stanza) {
  5199. return "<wrapper>" + stanza + '</wrapper>';
  5200. },
  5201. /** PrivateFunction: _closeSocket
  5202. * _Private_ function to close the WebSocket.
  5203. *
  5204. * Closes the socket if it is still open and deletes it
  5205. */
  5206. _closeSocket: function _closeSocket() {
  5207. if (this.socket) {
  5208. try {
  5209. this.socket.onerror = null;
  5210. this.socket.close();
  5211. } catch (e) {
  5212. Strophe.debug(e.message);
  5213. }
  5214. }
  5215. this.socket = null;
  5216. },
  5217. /** PrivateFunction: _emptyQueue
  5218. * _Private_ function to check if the message queue is empty.
  5219. *
  5220. * Returns:
  5221. * True, because WebSocket messages are send immediately after queueing.
  5222. */
  5223. _emptyQueue: function _emptyQueue() {
  5224. return true;
  5225. },
  5226. /** PrivateFunction: _onClose
  5227. * _Private_ function to handle websockets closing.
  5228. *
  5229. * Nothing to do here for WebSockets
  5230. */
  5231. _onClose: function _onClose(e) {
  5232. if (this._conn.connected && !this._conn.disconnecting) {
  5233. Strophe.error("Websocket closed unexpectedly");
  5234. this._conn._doDisconnect();
  5235. } else if (e && e.code === 1006 && !this._conn.connected && this.socket) {
  5236. // in case the onError callback was not called (Safari 10 does not
  5237. // call onerror when the initial connection fails) we need to
  5238. // dispatch a CONNFAIL status update to be consistent with the
  5239. // behavior on other browsers.
  5240. Strophe.error("Websocket closed unexcectedly");
  5241. this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "The WebSocket connection could not be established or was disconnected.");
  5242. this._conn._doDisconnect();
  5243. } else {
  5244. Strophe.info("Websocket closed");
  5245. }
  5246. },
  5247. /** PrivateFunction: _no_auth_received
  5248. *
  5249. * Called on stream start/restart when no stream:features
  5250. * has been received.
  5251. */
  5252. _no_auth_received: function _no_auth_received(callback) {
  5253. Strophe.error("Server did not offer a supported authentication mechanism");
  5254. this._changeConnectStatus(Strophe.Status.CONNFAIL, Strophe.ErrorCondition.NO_AUTH_MECH);
  5255. if (callback) {
  5256. callback.call(this._conn);
  5257. }
  5258. this._conn._doDisconnect();
  5259. },
  5260. /** PrivateFunction: _onDisconnectTimeout
  5261. * _Private_ timeout handler for handling non-graceful disconnection.
  5262. *
  5263. * This does nothing for WebSockets
  5264. */
  5265. _onDisconnectTimeout: function _onDisconnectTimeout() {},
  5266. /** PrivateFunction: _abortAllRequests
  5267. * _Private_ helper function that makes sure all pending requests are aborted.
  5268. */
  5269. _abortAllRequests: function _abortAllRequests() {},
  5270. /** PrivateFunction: _onError
  5271. * _Private_ function to handle websockets errors.
  5272. *
  5273. * Parameters:
  5274. * (Object) error - The websocket error.
  5275. */
  5276. _onError: function _onError(error) {
  5277. Strophe.error("Websocket error " + error);
  5278. this._conn._changeConnectStatus(Strophe.Status.CONNFAIL, "The WebSocket connection could not be established or was disconnected.");
  5279. this._disconnect();
  5280. },
  5281. /** PrivateFunction: _onIdle
  5282. * _Private_ function called by Strophe.Connection._onIdle
  5283. *
  5284. * sends all queued stanzas
  5285. */
  5286. _onIdle: function _onIdle() {
  5287. var data = this._conn._data;
  5288. if (data.length > 0 && !this._conn.paused) {
  5289. for (var i = 0; i < data.length; i++) {
  5290. if (data[i] !== null) {
  5291. var stanza = void 0;
  5292. if (data[i] === "restart") {
  5293. stanza = this._buildStream().tree();
  5294. } else {
  5295. stanza = data[i];
  5296. }
  5297. var rawStanza = Strophe.serialize(stanza);
  5298. this._conn.xmlOutput(stanza);
  5299. this._conn.rawOutput(rawStanza);
  5300. this.socket.send(rawStanza);
  5301. }
  5302. }
  5303. this._conn._data = [];
  5304. }
  5305. },
  5306. /** PrivateFunction: _onMessage
  5307. * _Private_ function to handle websockets messages.
  5308. *
  5309. * This function parses each of the messages as if they are full documents.
  5310. * [TODO : We may actually want to use a SAX Push parser].
  5311. *
  5312. * Since all XMPP traffic starts with
  5313. * <stream:stream version='1.0'
  5314. * xml:lang='en'
  5315. * xmlns='jabber:client'
  5316. * xmlns:stream='http://etherx.jabber.org/streams'
  5317. * id='3697395463'
  5318. * from='SERVER'>
  5319. *
  5320. * The first stanza will always fail to be parsed.
  5321. *
  5322. * Additionally, the seconds stanza will always be <stream:features> with
  5323. * the stream NS defined in the previous stanza, so we need to 'force'
  5324. * the inclusion of the NS in this stanza.
  5325. *
  5326. * Parameters:
  5327. * (string) message - The websocket message.
  5328. */
  5329. _onMessage: function _onMessage(message) {
  5330. var elem; // check for closing stream
  5331. var close = '<close xmlns="urn:ietf:params:xml:ns:xmpp-framing" />';
  5332. if (message.data === close) {
  5333. this._conn.rawInput(close);
  5334. this._conn.xmlInput(message);
  5335. if (!this._conn.disconnecting) {
  5336. this._conn._doDisconnect();
  5337. }
  5338. return;
  5339. } else if (message.data.search("<open ") === 0) {
  5340. // This handles stream restarts
  5341. elem = new DOMParser().parseFromString(message.data, "text/xml").documentElement;
  5342. if (!this._handleStreamStart(elem)) {
  5343. return;
  5344. }
  5345. } else {
  5346. var data = this._streamWrap(message.data);
  5347. elem = new DOMParser().parseFromString(data, "text/xml").documentElement;
  5348. }
  5349. if (this._check_streamerror(elem, Strophe.Status.ERROR)) {
  5350. return;
  5351. } //handle unavailable presence stanza before disconnecting
  5352. if (this._conn.disconnecting && elem.firstChild.nodeName === "presence" && elem.firstChild.getAttribute("type") === "unavailable") {
  5353. this._conn.xmlInput(elem);
  5354. this._conn.rawInput(Strophe.serialize(elem)); // if we are already disconnecting we will ignore the unavailable stanza and
  5355. // wait for the </stream:stream> tag before we close the connection
  5356. return;
  5357. }
  5358. this._conn._dataRecv(elem, message.data);
  5359. },
  5360. /** PrivateFunction: _onOpen
  5361. * _Private_ function to handle websockets connection setup.
  5362. *
  5363. * The opening stream tag is sent here.
  5364. */
  5365. _onOpen: function _onOpen() {
  5366. Strophe.info("Websocket open");
  5367. var start = this._buildStream();
  5368. this._conn.xmlOutput(start.tree());
  5369. var startString = Strophe.serialize(start);
  5370. this._conn.rawOutput(startString);
  5371. this.socket.send(startString);
  5372. },
  5373. /** PrivateFunction: _reqToData
  5374. * _Private_ function to get a stanza out of a request.
  5375. *
  5376. * WebSockets don't use requests, so the passed argument is just returned.
  5377. *
  5378. * Parameters:
  5379. * (Object) stanza - The stanza.
  5380. *
  5381. * Returns:
  5382. * The stanza that was passed.
  5383. */
  5384. _reqToData: function _reqToData(stanza) {
  5385. return stanza;
  5386. },
  5387. /** PrivateFunction: _send
  5388. * _Private_ part of the Connection.send function for WebSocket
  5389. *
  5390. * Just flushes the messages that are in the queue
  5391. */
  5392. _send: function _send() {
  5393. this._conn.flush();
  5394. },
  5395. /** PrivateFunction: _sendRestart
  5396. *
  5397. * Send an xmpp:restart stanza.
  5398. */
  5399. _sendRestart: function _sendRestart() {
  5400. clearTimeout(this._conn._idleTimeout);
  5401. this._conn._onIdle.bind(this._conn)();
  5402. }
  5403. };
  5404. /***/
  5405. }
  5406. /******/
  5407. })["default"]
  5408. );
  5409. });
  5410. /***/ }),
  5411. /***/ "./3rdparty/lodash.fp.js":
  5412. /*!*******************************!*\
  5413. !*** ./3rdparty/lodash.fp.js ***!
  5414. \*******************************/
  5415. /*! no static exports found */
  5416. /***/ (function(module, exports, __webpack_require__) {
  5417. "use strict";
  5418. (function webpackUniversalModuleDefinition(root, factory) {
  5419. if (true) module.exports = factory();else {}
  5420. })(void 0, function () {
  5421. return (
  5422. /******/
  5423. function (modules) {
  5424. // webpackBootstrap
  5425. /******/
  5426. // The module cache
  5427. /******/
  5428. var installedModules = {};
  5429. /******/
  5430. // The require function
  5431. /******/
  5432. function __webpack_require__(moduleId) {
  5433. /******/
  5434. // Check if module is in cache
  5435. /******/
  5436. if (installedModules[moduleId])
  5437. /******/
  5438. return installedModules[moduleId].exports;
  5439. /******/
  5440. // Create a new module (and put it into the cache)
  5441. /******/
  5442. var module = installedModules[moduleId] = {
  5443. /******/
  5444. exports: {},
  5445. /******/
  5446. id: moduleId,
  5447. /******/
  5448. loaded: false
  5449. /******/
  5450. };
  5451. /******/
  5452. // Execute the module function
  5453. /******/
  5454. modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  5455. /******/
  5456. // Flag the module as loaded
  5457. /******/
  5458. module.loaded = true;
  5459. /******/
  5460. // Return the exports of the module
  5461. /******/
  5462. return module.exports;
  5463. /******/
  5464. }
  5465. /******/
  5466. // expose the modules object (__webpack_modules__)
  5467. /******/
  5468. __webpack_require__.m = modules;
  5469. /******/
  5470. // expose the module cache
  5471. /******/
  5472. __webpack_require__.c = installedModules;
  5473. /******/
  5474. // __webpack_public_path__
  5475. /******/
  5476. __webpack_require__.p = "";
  5477. /******/
  5478. // Load entry module and return exports
  5479. /******/
  5480. return __webpack_require__(0);
  5481. /******/
  5482. }(
  5483. /************************************************************************/
  5484. /******/
  5485. [
  5486. /* 0 */
  5487. /***/
  5488. function (module, exports, __webpack_require__) {
  5489. var baseConvert = __webpack_require__(1);
  5490. /**
  5491. * Converts `lodash` to an immutable auto-curried iteratee-first data-last
  5492. * version with conversion `options` applied.
  5493. *
  5494. * @param {Function} lodash The lodash function to convert.
  5495. * @param {Object} [options] The options object. See `baseConvert` for more details.
  5496. * @returns {Function} Returns the converted `lodash`.
  5497. */
  5498. function browserConvert(lodash, options) {
  5499. return baseConvert(lodash, lodash, options);
  5500. }
  5501. if (typeof _ == 'function' && typeof _.runInContext == 'function') {
  5502. // XXX: Customization in order to be able to run both _ and fp in the
  5503. // non-AMD usecase.
  5504. fp = browserConvert(_.runInContext());
  5505. }
  5506. module.exports = browserConvert;
  5507. /***/
  5508. },
  5509. /* 1 */
  5510. /***/
  5511. function (module, exports, __webpack_require__) {
  5512. var mapping = __webpack_require__(2),
  5513. fallbackHolder = __webpack_require__(3);
  5514. /** Built-in value reference. */
  5515. var push = Array.prototype.push;
  5516. /**
  5517. * Creates a function, with an arity of `n`, that invokes `func` with the
  5518. * arguments it receives.
  5519. *
  5520. * @private
  5521. * @param {Function} func The function to wrap.
  5522. * @param {number} n The arity of the new function.
  5523. * @returns {Function} Returns the new function.
  5524. */
  5525. function baseArity(func, n) {
  5526. return n == 2 ? function (a, b) {
  5527. return func.apply(undefined, arguments);
  5528. } : function (a) {
  5529. return func.apply(undefined, arguments);
  5530. };
  5531. }
  5532. /**
  5533. * Creates a function that invokes `func`, with up to `n` arguments, ignoring
  5534. * any additional arguments.
  5535. *
  5536. * @private
  5537. * @param {Function} func The function to cap arguments for.
  5538. * @param {number} n The arity cap.
  5539. * @returns {Function} Returns the new function.
  5540. */
  5541. function baseAry(func, n) {
  5542. return n == 2 ? function (a, b) {
  5543. return func(a, b);
  5544. } : function (a) {
  5545. return func(a);
  5546. };
  5547. }
  5548. /**
  5549. * Creates a clone of `array`.
  5550. *
  5551. * @private
  5552. * @param {Array} array The array to clone.
  5553. * @returns {Array} Returns the cloned array.
  5554. */
  5555. function cloneArray(array) {
  5556. var length = array ? array.length : 0,
  5557. result = Array(length);
  5558. while (length--) {
  5559. result[length] = array[length];
  5560. }
  5561. return result;
  5562. }
  5563. /**
  5564. * Creates a function that clones a given object using the assignment `func`.
  5565. *
  5566. * @private
  5567. * @param {Function} func The assignment function.
  5568. * @returns {Function} Returns the new cloner function.
  5569. */
  5570. function createCloner(func) {
  5571. return function (object) {
  5572. return func({}, object);
  5573. };
  5574. }
  5575. /**
  5576. * A specialized version of `_.spread` which flattens the spread array into
  5577. * the arguments of the invoked `func`.
  5578. *
  5579. * @private
  5580. * @param {Function} func The function to spread arguments over.
  5581. * @param {number} start The start position of the spread.
  5582. * @returns {Function} Returns the new function.
  5583. */
  5584. function flatSpread(func, start) {
  5585. return function () {
  5586. var length = arguments.length,
  5587. lastIndex = length - 1,
  5588. args = Array(length);
  5589. while (length--) {
  5590. args[length] = arguments[length];
  5591. }
  5592. var array = args[start],
  5593. otherArgs = args.slice(0, start);
  5594. if (array) {
  5595. push.apply(otherArgs, array);
  5596. }
  5597. if (start != lastIndex) {
  5598. push.apply(otherArgs, args.slice(start + 1));
  5599. }
  5600. return func.apply(this, otherArgs);
  5601. };
  5602. }
  5603. /**
  5604. * Creates a function that wraps `func` and uses `cloner` to clone the first
  5605. * argument it receives.
  5606. *
  5607. * @private
  5608. * @param {Function} func The function to wrap.
  5609. * @param {Function} cloner The function to clone arguments.
  5610. * @returns {Function} Returns the new immutable function.
  5611. */
  5612. function wrapImmutable(func, cloner) {
  5613. return function () {
  5614. var length = arguments.length;
  5615. if (!length) {
  5616. return;
  5617. }
  5618. var args = Array(length);
  5619. while (length--) {
  5620. args[length] = arguments[length];
  5621. }
  5622. var result = args[0] = cloner.apply(undefined, args);
  5623. func.apply(undefined, args);
  5624. return result;
  5625. };
  5626. }
  5627. /**
  5628. * The base implementation of `convert` which accepts a `util` object of methods
  5629. * required to perform conversions.
  5630. *
  5631. * @param {Object} util The util object.
  5632. * @param {string} name The name of the function to convert.
  5633. * @param {Function} func The function to convert.
  5634. * @param {Object} [options] The options object.
  5635. * @param {boolean} [options.cap=true] Specify capping iteratee arguments.
  5636. * @param {boolean} [options.curry=true] Specify currying.
  5637. * @param {boolean} [options.fixed=true] Specify fixed arity.
  5638. * @param {boolean} [options.immutable=true] Specify immutable operations.
  5639. * @param {boolean} [options.rearg=true] Specify rearranging arguments.
  5640. * @returns {Function|Object} Returns the converted function or object.
  5641. */
  5642. function baseConvert(util, name, func, options) {
  5643. var setPlaceholder,
  5644. isLib = typeof name == 'function',
  5645. isObj = name === Object(name);
  5646. if (isObj) {
  5647. options = func;
  5648. func = name;
  5649. name = undefined;
  5650. }
  5651. if (func == null) {
  5652. throw new TypeError();
  5653. }
  5654. options || (options = {});
  5655. var config = {
  5656. 'cap': 'cap' in options ? options.cap : true,
  5657. 'curry': 'curry' in options ? options.curry : true,
  5658. 'fixed': 'fixed' in options ? options.fixed : true,
  5659. 'immutable': 'immutable' in options ? options.immutable : true,
  5660. 'rearg': 'rearg' in options ? options.rearg : true
  5661. };
  5662. var forceCurry = 'curry' in options && options.curry,
  5663. forceFixed = 'fixed' in options && options.fixed,
  5664. forceRearg = 'rearg' in options && options.rearg,
  5665. placeholder = isLib ? func : fallbackHolder,
  5666. pristine = isLib ? func.runInContext() : undefined;
  5667. var helpers = isLib ? func : {
  5668. 'ary': util.ary,
  5669. 'assign': util.assign,
  5670. 'clone': util.clone,
  5671. 'curry': util.curry,
  5672. 'forEach': util.forEach,
  5673. 'isArray': util.isArray,
  5674. 'isFunction': util.isFunction,
  5675. 'iteratee': util.iteratee,
  5676. 'keys': util.keys,
  5677. 'rearg': util.rearg,
  5678. 'toInteger': util.toInteger,
  5679. 'toPath': util.toPath
  5680. };
  5681. var ary = helpers.ary,
  5682. assign = helpers.assign,
  5683. clone = helpers.clone,
  5684. curry = helpers.curry,
  5685. each = helpers.forEach,
  5686. isArray = helpers.isArray,
  5687. isFunction = helpers.isFunction,
  5688. keys = helpers.keys,
  5689. rearg = helpers.rearg,
  5690. toInteger = helpers.toInteger,
  5691. toPath = helpers.toPath;
  5692. var aryMethodKeys = keys(mapping.aryMethod);
  5693. var wrappers = {
  5694. 'castArray': function castArray(_castArray) {
  5695. return function () {
  5696. var value = arguments[0];
  5697. return isArray(value) ? _castArray(cloneArray(value)) : _castArray.apply(undefined, arguments);
  5698. };
  5699. },
  5700. 'iteratee': function iteratee(_iteratee) {
  5701. return function () {
  5702. var func = arguments[0],
  5703. arity = arguments[1],
  5704. result = _iteratee(func, arity),
  5705. length = result.length;
  5706. if (config.cap && typeof arity == 'number') {
  5707. arity = arity > 2 ? arity - 2 : 1;
  5708. return length && length <= arity ? result : baseAry(result, arity);
  5709. }
  5710. return result;
  5711. };
  5712. },
  5713. 'mixin': function mixin(_mixin) {
  5714. return function (source) {
  5715. var func = this;
  5716. if (!isFunction(func)) {
  5717. return _mixin(func, Object(source));
  5718. }
  5719. var pairs = [];
  5720. each(keys(source), function (key) {
  5721. if (isFunction(source[key])) {
  5722. pairs.push([key, func.prototype[key]]);
  5723. }
  5724. });
  5725. _mixin(func, Object(source));
  5726. each(pairs, function (pair) {
  5727. var value = pair[1];
  5728. if (isFunction(value)) {
  5729. func.prototype[pair[0]] = value;
  5730. } else {
  5731. delete func.prototype[pair[0]];
  5732. }
  5733. });
  5734. return func;
  5735. };
  5736. },
  5737. 'nthArg': function nthArg(_nthArg) {
  5738. return function (n) {
  5739. var arity = n < 0 ? 1 : toInteger(n) + 1;
  5740. return curry(_nthArg(n), arity);
  5741. };
  5742. },
  5743. 'rearg': function rearg(_rearg) {
  5744. return function (func, indexes) {
  5745. var arity = indexes ? indexes.length : 0;
  5746. return curry(_rearg(func, indexes), arity);
  5747. };
  5748. },
  5749. 'runInContext': function runInContext(_runInContext) {
  5750. return function (context) {
  5751. return baseConvert(util, _runInContext(context), options);
  5752. };
  5753. }
  5754. };
  5755. /*--------------------------------------------------------------------------*/
  5756. /**
  5757. * Casts `func` to a function with an arity capped iteratee if needed.
  5758. *
  5759. * @private
  5760. * @param {string} name The name of the function to inspect.
  5761. * @param {Function} func The function to inspect.
  5762. * @returns {Function} Returns the cast function.
  5763. */
  5764. function castCap(name, func) {
  5765. if (config.cap) {
  5766. var indexes = mapping.iterateeRearg[name];
  5767. if (indexes) {
  5768. return iterateeRearg(func, indexes);
  5769. }
  5770. var n = !isLib && mapping.iterateeAry[name];
  5771. if (n) {
  5772. return iterateeAry(func, n);
  5773. }
  5774. }
  5775. return func;
  5776. }
  5777. /**
  5778. * Casts `func` to a curried function if needed.
  5779. *
  5780. * @private
  5781. * @param {string} name The name of the function to inspect.
  5782. * @param {Function} func The function to inspect.
  5783. * @param {number} n The arity of `func`.
  5784. * @returns {Function} Returns the cast function.
  5785. */
  5786. function castCurry(name, func, n) {
  5787. return forceCurry || config.curry && n > 1 ? curry(func, n) : func;
  5788. }
  5789. /**
  5790. * Casts `func` to a fixed arity function if needed.
  5791. *
  5792. * @private
  5793. * @param {string} name The name of the function to inspect.
  5794. * @param {Function} func The function to inspect.
  5795. * @param {number} n The arity cap.
  5796. * @returns {Function} Returns the cast function.
  5797. */
  5798. function castFixed(name, func, n) {
  5799. if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {
  5800. var data = mapping.methodSpread[name],
  5801. start = data && data.start;
  5802. return start === undefined ? ary(func, n) : flatSpread(func, start);
  5803. }
  5804. return func;
  5805. }
  5806. /**
  5807. * Casts `func` to an rearged function if needed.
  5808. *
  5809. * @private
  5810. * @param {string} name The name of the function to inspect.
  5811. * @param {Function} func The function to inspect.
  5812. * @param {number} n The arity of `func`.
  5813. * @returns {Function} Returns the cast function.
  5814. */
  5815. function castRearg(name, func, n) {
  5816. return config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]) ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n]) : func;
  5817. }
  5818. /**
  5819. * Creates a clone of `object` by `path`.
  5820. *
  5821. * @private
  5822. * @param {Object} object The object to clone.
  5823. * @param {Array|string} path The path to clone by.
  5824. * @returns {Object} Returns the cloned object.
  5825. */
  5826. function cloneByPath(object, path) {
  5827. path = toPath(path);
  5828. var index = -1,
  5829. length = path.length,
  5830. lastIndex = length - 1,
  5831. result = clone(Object(object)),
  5832. nested = result;
  5833. while (nested != null && ++index < length) {
  5834. var key = path[index],
  5835. value = nested[key];
  5836. if (value != null) {
  5837. nested[path[index]] = clone(index == lastIndex ? value : Object(value));
  5838. }
  5839. nested = nested[key];
  5840. }
  5841. return result;
  5842. }
  5843. /**
  5844. * Converts `lodash` to an immutable auto-curried iteratee-first data-last
  5845. * version with conversion `options` applied.
  5846. *
  5847. * @param {Object} [options] The options object. See `baseConvert` for more details.
  5848. * @returns {Function} Returns the converted `lodash`.
  5849. */
  5850. function convertLib(options) {
  5851. return _.runInContext.convert(options)(undefined);
  5852. }
  5853. /**
  5854. * Create a converter function for `func` of `name`.
  5855. *
  5856. * @param {string} name The name of the function to convert.
  5857. * @param {Function} func The function to convert.
  5858. * @returns {Function} Returns the new converter function.
  5859. */
  5860. function createConverter(name, func) {
  5861. var realName = mapping.aliasToReal[name] || name,
  5862. methodName = mapping.remap[realName] || realName,
  5863. oldOptions = options;
  5864. return function (options) {
  5865. var newUtil = isLib ? pristine : helpers,
  5866. newFunc = isLib ? pristine[methodName] : func,
  5867. newOptions = assign(assign({}, oldOptions), options);
  5868. return baseConvert(newUtil, realName, newFunc, newOptions);
  5869. };
  5870. }
  5871. /**
  5872. * Creates a function that wraps `func` to invoke its iteratee, with up to `n`
  5873. * arguments, ignoring any additional arguments.
  5874. *
  5875. * @private
  5876. * @param {Function} func The function to cap iteratee arguments for.
  5877. * @param {number} n The arity cap.
  5878. * @returns {Function} Returns the new function.
  5879. */
  5880. function iterateeAry(func, n) {
  5881. return overArg(func, function (func) {
  5882. return typeof func == 'function' ? baseAry(func, n) : func;
  5883. });
  5884. }
  5885. /**
  5886. * Creates a function that wraps `func` to invoke its iteratee with arguments
  5887. * arranged according to the specified `indexes` where the argument value at
  5888. * the first index is provided as the first argument, the argument value at
  5889. * the second index is provided as the second argument, and so on.
  5890. *
  5891. * @private
  5892. * @param {Function} func The function to rearrange iteratee arguments for.
  5893. * @param {number[]} indexes The arranged argument indexes.
  5894. * @returns {Function} Returns the new function.
  5895. */
  5896. function iterateeRearg(func, indexes) {
  5897. return overArg(func, function (func) {
  5898. var n = indexes.length;
  5899. return baseArity(rearg(baseAry(func, n), indexes), n);
  5900. });
  5901. }
  5902. /**
  5903. * Creates a function that invokes `func` with its first argument transformed.
  5904. *
  5905. * @private
  5906. * @param {Function} func The function to wrap.
  5907. * @param {Function} transform The argument transform.
  5908. * @returns {Function} Returns the new function.
  5909. */
  5910. function overArg(func, transform) {
  5911. return function () {
  5912. var length = arguments.length;
  5913. if (!length) {
  5914. return func();
  5915. }
  5916. var args = Array(length);
  5917. while (length--) {
  5918. args[length] = arguments[length];
  5919. }
  5920. var index = config.rearg ? 0 : length - 1;
  5921. args[index] = transform(args[index]);
  5922. return func.apply(undefined, args);
  5923. };
  5924. }
  5925. /**
  5926. * Creates a function that wraps `func` and applys the conversions
  5927. * rules by `name`.
  5928. *
  5929. * @private
  5930. * @param {string} name The name of the function to wrap.
  5931. * @param {Function} func The function to wrap.
  5932. * @returns {Function} Returns the converted function.
  5933. */
  5934. function wrap(name, func) {
  5935. var result,
  5936. realName = mapping.aliasToReal[name] || name,
  5937. wrapped = func,
  5938. wrapper = wrappers[realName];
  5939. if (wrapper) {
  5940. wrapped = wrapper(func);
  5941. } else if (config.immutable) {
  5942. if (mapping.mutate.array[realName]) {
  5943. wrapped = wrapImmutable(func, cloneArray);
  5944. } else if (mapping.mutate.object[realName]) {
  5945. wrapped = wrapImmutable(func, createCloner(func));
  5946. } else if (mapping.mutate.set[realName]) {
  5947. wrapped = wrapImmutable(func, cloneByPath);
  5948. }
  5949. }
  5950. each(aryMethodKeys, function (aryKey) {
  5951. each(mapping.aryMethod[aryKey], function (otherName) {
  5952. if (realName == otherName) {
  5953. var data = mapping.methodSpread[realName],
  5954. afterRearg = data && data.afterRearg;
  5955. result = afterRearg ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey) : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey);
  5956. result = castCap(realName, result);
  5957. result = castCurry(realName, result, aryKey);
  5958. return false;
  5959. }
  5960. });
  5961. return !result;
  5962. });
  5963. result || (result = wrapped);
  5964. if (result == func) {
  5965. result = forceCurry ? curry(result, 1) : function () {
  5966. return func.apply(this, arguments);
  5967. };
  5968. }
  5969. result.convert = createConverter(realName, func);
  5970. if (mapping.placeholder[realName]) {
  5971. setPlaceholder = true;
  5972. result.placeholder = func.placeholder = placeholder;
  5973. }
  5974. return result;
  5975. }
  5976. /*--------------------------------------------------------------------------*/
  5977. if (!isObj) {
  5978. return wrap(name, func);
  5979. }
  5980. var _ = func; // Convert methods by ary cap.
  5981. var pairs = [];
  5982. each(aryMethodKeys, function (aryKey) {
  5983. each(mapping.aryMethod[aryKey], function (key) {
  5984. var func = _[mapping.remap[key] || key];
  5985. if (func) {
  5986. pairs.push([key, wrap(key, func)]);
  5987. }
  5988. });
  5989. }); // Convert remaining methods.
  5990. each(keys(_), function (key) {
  5991. var func = _[key];
  5992. if (typeof func == 'function') {
  5993. var length = pairs.length;
  5994. while (length--) {
  5995. if (pairs[length][0] == key) {
  5996. return;
  5997. }
  5998. }
  5999. func.convert = createConverter(key, func);
  6000. pairs.push([key, func]);
  6001. }
  6002. }); // Assign to `_` leaving `_.prototype` unchanged to allow chaining.
  6003. each(pairs, function (pair) {
  6004. _[pair[0]] = pair[1];
  6005. });
  6006. _.convert = convertLib;
  6007. if (setPlaceholder) {
  6008. _.placeholder = placeholder;
  6009. } // Assign aliases.
  6010. each(keys(_), function (key) {
  6011. each(mapping.realToAlias[key] || [], function (alias) {
  6012. _[alias] = _[key];
  6013. });
  6014. });
  6015. return _;
  6016. }
  6017. module.exports = baseConvert;
  6018. /***/
  6019. },
  6020. /* 2 */
  6021. /***/
  6022. function (module, exports) {
  6023. /** Used to map aliases to their real names. */
  6024. exports.aliasToReal = {
  6025. // Lodash aliases.
  6026. 'each': 'forEach',
  6027. 'eachRight': 'forEachRight',
  6028. 'entries': 'toPairs',
  6029. 'entriesIn': 'toPairsIn',
  6030. 'extend': 'assignIn',
  6031. 'extendAll': 'assignInAll',
  6032. 'extendAllWith': 'assignInAllWith',
  6033. 'extendWith': 'assignInWith',
  6034. 'first': 'head',
  6035. // Methods that are curried variants of others.
  6036. 'conforms': 'conformsTo',
  6037. 'matches': 'isMatch',
  6038. 'property': 'get',
  6039. // Ramda aliases.
  6040. '__': 'placeholder',
  6041. 'F': 'stubFalse',
  6042. 'T': 'stubTrue',
  6043. 'all': 'every',
  6044. 'allPass': 'overEvery',
  6045. 'always': 'constant',
  6046. 'any': 'some',
  6047. 'anyPass': 'overSome',
  6048. 'apply': 'spread',
  6049. 'assoc': 'set',
  6050. 'assocPath': 'set',
  6051. 'complement': 'negate',
  6052. 'compose': 'flowRight',
  6053. 'contains': 'includes',
  6054. 'dissoc': 'unset',
  6055. 'dissocPath': 'unset',
  6056. 'dropLast': 'dropRight',
  6057. 'dropLastWhile': 'dropRightWhile',
  6058. 'equals': 'isEqual',
  6059. 'identical': 'eq',
  6060. 'indexBy': 'keyBy',
  6061. 'init': 'initial',
  6062. 'invertObj': 'invert',
  6063. 'juxt': 'over',
  6064. 'omitAll': 'omit',
  6065. 'nAry': 'ary',
  6066. 'path': 'get',
  6067. 'pathEq': 'matchesProperty',
  6068. 'pathOr': 'getOr',
  6069. 'paths': 'at',
  6070. 'pickAll': 'pick',
  6071. 'pipe': 'flow',
  6072. 'pluck': 'map',
  6073. 'prop': 'get',
  6074. 'propEq': 'matchesProperty',
  6075. 'propOr': 'getOr',
  6076. 'props': 'at',
  6077. 'symmetricDifference': 'xor',
  6078. 'symmetricDifferenceBy': 'xorBy',
  6079. 'symmetricDifferenceWith': 'xorWith',
  6080. 'takeLast': 'takeRight',
  6081. 'takeLastWhile': 'takeRightWhile',
  6082. 'unapply': 'rest',
  6083. 'unnest': 'flatten',
  6084. 'useWith': 'overArgs',
  6085. 'where': 'conformsTo',
  6086. 'whereEq': 'isMatch',
  6087. 'zipObj': 'zipObject'
  6088. };
  6089. /** Used to map ary to method names. */
  6090. exports.aryMethod = {
  6091. '1': ['assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create', 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow', 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll', 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome', 'rest', 'reverse', 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart', 'uniqueId', 'words', 'zipAll'],
  6092. '2': ['add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith', 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith', 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN', 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference', 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq', 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex', 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach', 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get', 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection', 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy', 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty', 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit', 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial', 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll', 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove', 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex', 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy', 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight', 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars', 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith', 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject', 'zipObjectDeep'],
  6093. '3': ['assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith', 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr', 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith', 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth', 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd', 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight', 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy', 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy', 'xorWith', 'zipWith'],
  6094. '4': ['fill', 'setWith', 'updateWith']
  6095. };
  6096. /** Used to map ary to rearg configs. */
  6097. exports.aryRearg = {
  6098. '2': [1, 0],
  6099. '3': [2, 0, 1],
  6100. '4': [3, 2, 0, 1]
  6101. };
  6102. /** Used to map method names to their iteratee ary. */
  6103. exports.iterateeAry = {
  6104. 'dropRightWhile': 1,
  6105. 'dropWhile': 1,
  6106. 'every': 1,
  6107. 'filter': 1,
  6108. 'find': 1,
  6109. 'findFrom': 1,
  6110. 'findIndex': 1,
  6111. 'findIndexFrom': 1,
  6112. 'findKey': 1,
  6113. 'findLast': 1,
  6114. 'findLastFrom': 1,
  6115. 'findLastIndex': 1,
  6116. 'findLastIndexFrom': 1,
  6117. 'findLastKey': 1,
  6118. 'flatMap': 1,
  6119. 'flatMapDeep': 1,
  6120. 'flatMapDepth': 1,
  6121. 'forEach': 1,
  6122. 'forEachRight': 1,
  6123. 'forIn': 1,
  6124. 'forInRight': 1,
  6125. 'forOwn': 1,
  6126. 'forOwnRight': 1,
  6127. 'map': 1,
  6128. 'mapKeys': 1,
  6129. 'mapValues': 1,
  6130. 'partition': 1,
  6131. 'reduce': 2,
  6132. 'reduceRight': 2,
  6133. 'reject': 1,
  6134. 'remove': 1,
  6135. 'some': 1,
  6136. 'takeRightWhile': 1,
  6137. 'takeWhile': 1,
  6138. 'times': 1,
  6139. 'transform': 2
  6140. };
  6141. /** Used to map method names to iteratee rearg configs. */
  6142. exports.iterateeRearg = {
  6143. 'mapKeys': [1],
  6144. 'reduceRight': [1, 0]
  6145. };
  6146. /** Used to map method names to rearg configs. */
  6147. exports.methodRearg = {
  6148. 'assignInAllWith': [1, 0],
  6149. 'assignInWith': [1, 2, 0],
  6150. 'assignAllWith': [1, 0],
  6151. 'assignWith': [1, 2, 0],
  6152. 'differenceBy': [1, 2, 0],
  6153. 'differenceWith': [1, 2, 0],
  6154. 'getOr': [2, 1, 0],
  6155. 'intersectionBy': [1, 2, 0],
  6156. 'intersectionWith': [1, 2, 0],
  6157. 'isEqualWith': [1, 2, 0],
  6158. 'isMatchWith': [2, 1, 0],
  6159. 'mergeAllWith': [1, 0],
  6160. 'mergeWith': [1, 2, 0],
  6161. 'padChars': [2, 1, 0],
  6162. 'padCharsEnd': [2, 1, 0],
  6163. 'padCharsStart': [2, 1, 0],
  6164. 'pullAllBy': [2, 1, 0],
  6165. 'pullAllWith': [2, 1, 0],
  6166. 'rangeStep': [1, 2, 0],
  6167. 'rangeStepRight': [1, 2, 0],
  6168. 'setWith': [3, 1, 2, 0],
  6169. 'sortedIndexBy': [2, 1, 0],
  6170. 'sortedLastIndexBy': [2, 1, 0],
  6171. 'unionBy': [1, 2, 0],
  6172. 'unionWith': [1, 2, 0],
  6173. 'updateWith': [3, 1, 2, 0],
  6174. 'xorBy': [1, 2, 0],
  6175. 'xorWith': [1, 2, 0],
  6176. 'zipWith': [1, 2, 0]
  6177. };
  6178. /** Used to map method names to spread configs. */
  6179. exports.methodSpread = {
  6180. 'assignAll': {
  6181. 'start': 0
  6182. },
  6183. 'assignAllWith': {
  6184. 'start': 0
  6185. },
  6186. 'assignInAll': {
  6187. 'start': 0
  6188. },
  6189. 'assignInAllWith': {
  6190. 'start': 0
  6191. },
  6192. 'defaultsAll': {
  6193. 'start': 0
  6194. },
  6195. 'defaultsDeepAll': {
  6196. 'start': 0
  6197. },
  6198. 'invokeArgs': {
  6199. 'start': 2
  6200. },
  6201. 'invokeArgsMap': {
  6202. 'start': 2
  6203. },
  6204. 'mergeAll': {
  6205. 'start': 0
  6206. },
  6207. 'mergeAllWith': {
  6208. 'start': 0
  6209. },
  6210. 'partial': {
  6211. 'start': 1
  6212. },
  6213. 'partialRight': {
  6214. 'start': 1
  6215. },
  6216. 'without': {
  6217. 'start': 1
  6218. },
  6219. 'zipAll': {
  6220. 'start': 0
  6221. }
  6222. };
  6223. /** Used to identify methods which mutate arrays or objects. */
  6224. exports.mutate = {
  6225. 'array': {
  6226. 'fill': true,
  6227. 'pull': true,
  6228. 'pullAll': true,
  6229. 'pullAllBy': true,
  6230. 'pullAllWith': true,
  6231. 'pullAt': true,
  6232. 'remove': true,
  6233. 'reverse': true
  6234. },
  6235. 'object': {
  6236. 'assign': true,
  6237. 'assignAll': true,
  6238. 'assignAllWith': true,
  6239. 'assignIn': true,
  6240. 'assignInAll': true,
  6241. 'assignInAllWith': true,
  6242. 'assignInWith': true,
  6243. 'assignWith': true,
  6244. 'defaults': true,
  6245. 'defaultsAll': true,
  6246. 'defaultsDeep': true,
  6247. 'defaultsDeepAll': true,
  6248. 'merge': true,
  6249. 'mergeAll': true,
  6250. 'mergeAllWith': true,
  6251. 'mergeWith': true
  6252. },
  6253. 'set': {
  6254. 'set': true,
  6255. 'setWith': true,
  6256. 'unset': true,
  6257. 'update': true,
  6258. 'updateWith': true
  6259. }
  6260. };
  6261. /** Used to track methods with placeholder support */
  6262. exports.placeholder = {
  6263. 'bind': true,
  6264. 'bindKey': true,
  6265. 'curry': true,
  6266. 'curryRight': true,
  6267. 'partial': true,
  6268. 'partialRight': true
  6269. };
  6270. /** Used to map real names to their aliases. */
  6271. exports.realToAlias = function () {
  6272. var hasOwnProperty = Object.prototype.hasOwnProperty,
  6273. object = exports.aliasToReal,
  6274. result = {};
  6275. for (var key in object) {
  6276. var value = object[key];
  6277. if (hasOwnProperty.call(result, value)) {
  6278. result[value].push(key);
  6279. } else {
  6280. result[value] = [key];
  6281. }
  6282. }
  6283. return result;
  6284. }();
  6285. /** Used to map method names to other names. */
  6286. exports.remap = {
  6287. 'assignAll': 'assign',
  6288. 'assignAllWith': 'assignWith',
  6289. 'assignInAll': 'assignIn',
  6290. 'assignInAllWith': 'assignInWith',
  6291. 'curryN': 'curry',
  6292. 'curryRightN': 'curryRight',
  6293. 'defaultsAll': 'defaults',
  6294. 'defaultsDeepAll': 'defaultsDeep',
  6295. 'findFrom': 'find',
  6296. 'findIndexFrom': 'findIndex',
  6297. 'findLastFrom': 'findLast',
  6298. 'findLastIndexFrom': 'findLastIndex',
  6299. 'getOr': 'get',
  6300. 'includesFrom': 'includes',
  6301. 'indexOfFrom': 'indexOf',
  6302. 'invokeArgs': 'invoke',
  6303. 'invokeArgsMap': 'invokeMap',
  6304. 'lastIndexOfFrom': 'lastIndexOf',
  6305. 'mergeAll': 'merge',
  6306. 'mergeAllWith': 'mergeWith',
  6307. 'padChars': 'pad',
  6308. 'padCharsEnd': 'padEnd',
  6309. 'padCharsStart': 'padStart',
  6310. 'propertyOf': 'get',
  6311. 'rangeStep': 'range',
  6312. 'rangeStepRight': 'rangeRight',
  6313. 'restFrom': 'rest',
  6314. 'spreadFrom': 'spread',
  6315. 'trimChars': 'trim',
  6316. 'trimCharsEnd': 'trimEnd',
  6317. 'trimCharsStart': 'trimStart',
  6318. 'zipAll': 'zip'
  6319. };
  6320. /** Used to track methods that skip fixing their arity. */
  6321. exports.skipFixed = {
  6322. 'castArray': true,
  6323. 'flow': true,
  6324. 'flowRight': true,
  6325. 'iteratee': true,
  6326. 'mixin': true,
  6327. 'rearg': true,
  6328. 'runInContext': true
  6329. };
  6330. /** Used to track methods that skip rearranging arguments. */
  6331. exports.skipRearg = {
  6332. 'add': true,
  6333. 'assign': true,
  6334. 'assignIn': true,
  6335. 'bind': true,
  6336. 'bindKey': true,
  6337. 'concat': true,
  6338. 'difference': true,
  6339. 'divide': true,
  6340. 'eq': true,
  6341. 'gt': true,
  6342. 'gte': true,
  6343. 'isEqual': true,
  6344. 'lt': true,
  6345. 'lte': true,
  6346. 'matchesProperty': true,
  6347. 'merge': true,
  6348. 'multiply': true,
  6349. 'overArgs': true,
  6350. 'partial': true,
  6351. 'partialRight': true,
  6352. 'propertyOf': true,
  6353. 'random': true,
  6354. 'range': true,
  6355. 'rangeRight': true,
  6356. 'subtract': true,
  6357. 'zip': true,
  6358. 'zipObject': true,
  6359. 'zipObjectDeep': true
  6360. };
  6361. /***/
  6362. },
  6363. /* 3 */
  6364. /***/
  6365. function (module, exports) {
  6366. /**
  6367. * The default argument placeholder value for methods.
  6368. *
  6369. * @type {Object}
  6370. */
  6371. module.exports = {};
  6372. /***/
  6373. }
  6374. /******/
  6375. ])
  6376. );
  6377. });
  6378. ;
  6379. /***/ }),
  6380. /***/ "./node_modules/awesomplete-avoid-xss/awesomplete.js":
  6381. /*!***********************************************************!*\
  6382. !*** ./node_modules/awesomplete-avoid-xss/awesomplete.js ***!
  6383. \***********************************************************/
  6384. /*! no static exports found */
  6385. /***/ (function(module, exports) {
  6386. /**
  6387. * Simple, lightweight, usable local autocomplete library for modern browsers
  6388. * Because there weren’t enough autocomplete scripts in the world? Because I’m completely insane and have NIH syndrome? Probably both. :P
  6389. * @author Lea Verou http://leaverou.github.io/awesomplete
  6390. * MIT license
  6391. */
  6392. (function () {
  6393. var _ = function (input, o) {
  6394. var me = this;
  6395. // Setup
  6396. this.isOpened = false;
  6397. this.input = $(input);
  6398. this.input.setAttribute("autocomplete", "off");
  6399. this.input.setAttribute("aria-autocomplete", "list");
  6400. o = o || {};
  6401. configure(this, {
  6402. minChars: 2,
  6403. maxItems: 10,
  6404. autoFirst: false,
  6405. data: _.DATA,
  6406. filter: _.FILTER_CONTAINS,
  6407. sort: o.sort === false ? false : _.SORT_BYLENGTH,
  6408. item: _.ITEM,
  6409. replace: _.REPLACE
  6410. }, o);
  6411. this.index = -1;
  6412. // Create necessary elements
  6413. this.container = $.create("div", {
  6414. className: "awesomplete",
  6415. around: input
  6416. });
  6417. this.ul = $.create("ul", {
  6418. hidden: "hidden",
  6419. inside: this.container
  6420. });
  6421. this.status = $.create("span", {
  6422. className: "visually-hidden",
  6423. role: "status",
  6424. "aria-live": "assertive",
  6425. "aria-relevant": "additions",
  6426. inside: this.container
  6427. });
  6428. // Bind events
  6429. this._events = {
  6430. input: {
  6431. "input": this.evaluate.bind(this),
  6432. "blur": this.close.bind(this, { reason: "blur" }),
  6433. "keydown": function(evt) {
  6434. var c = evt.keyCode;
  6435. // If the dropdown `ul` is in view, then act on keydown for the following keys:
  6436. // Enter / Esc / Up / Down
  6437. if(me.opened) {
  6438. if (c === 13 && me.selected) { // Enter
  6439. evt.preventDefault();
  6440. me.select();
  6441. }
  6442. else if (c === 27) { // Esc
  6443. me.close({ reason: "esc" });
  6444. }
  6445. else if (c === 38 || c === 40) { // Down/Up arrow
  6446. evt.preventDefault();
  6447. me[c === 38? "previous" : "next"]();
  6448. }
  6449. }
  6450. }
  6451. },
  6452. form: {
  6453. "submit": this.close.bind(this, { reason: "submit" })
  6454. },
  6455. ul: {
  6456. "mousedown": function(evt) {
  6457. var li = evt.target;
  6458. if (li !== this) {
  6459. while (li && !/li/i.test(li.nodeName)) {
  6460. li = li.parentNode;
  6461. }
  6462. if (li && evt.button === 0) { // Only select on left click
  6463. evt.preventDefault();
  6464. me.select(li, evt.target);
  6465. }
  6466. }
  6467. }
  6468. }
  6469. };
  6470. $.bind(this.input, this._events.input);
  6471. $.bind(this.input.form, this._events.form);
  6472. $.bind(this.ul, this._events.ul);
  6473. if (this.input.hasAttribute("list")) {
  6474. this.list = "#" + this.input.getAttribute("list");
  6475. this.input.removeAttribute("list");
  6476. }
  6477. else {
  6478. this.list = this.input.getAttribute("data-list") || o.list || [];
  6479. }
  6480. _.all.push(this);
  6481. };
  6482. _.prototype = {
  6483. set list(list) {
  6484. if (Array.isArray(list)) {
  6485. this._list = list;
  6486. }
  6487. else if (typeof list === "string" && list.indexOf(",") > -1) {
  6488. this._list = list.split(/\s*,\s*/);
  6489. }
  6490. else { // Element or CSS selector
  6491. list = $(list);
  6492. if (list && list.children) {
  6493. var items = [];
  6494. slice.apply(list.children).forEach(function (el) {
  6495. if (!el.disabled) {
  6496. var text = el.textContent.trim();
  6497. var value = el.value || text;
  6498. var label = el.label || text;
  6499. if (value !== "") {
  6500. items.push({ label: label, value: value });
  6501. }
  6502. }
  6503. });
  6504. this._list = items;
  6505. }
  6506. }
  6507. if (document.activeElement === this.input) {
  6508. this.evaluate();
  6509. }
  6510. },
  6511. get selected() {
  6512. return this.index > -1;
  6513. },
  6514. get opened() {
  6515. return this.isOpened;
  6516. },
  6517. close: function (o) {
  6518. if (!this.opened) {
  6519. return;
  6520. }
  6521. this.ul.setAttribute("hidden", "");
  6522. this.isOpened = false;
  6523. this.index = -1;
  6524. $.fire(this.input, "awesomplete-close", o || {});
  6525. },
  6526. open: function () {
  6527. this.ul.removeAttribute("hidden");
  6528. this.isOpened = true;
  6529. if (this.autoFirst && this.index === -1) {
  6530. this.goto(0);
  6531. }
  6532. $.fire(this.input, "awesomplete-open");
  6533. },
  6534. destroy: function() {
  6535. //remove events from the input and its form
  6536. $.unbind(this.input, this._events.input);
  6537. $.unbind(this.input.form, this._events.form);
  6538. //move the input out of the awesomplete container and remove the container and its children
  6539. var parentNode = this.container.parentNode;
  6540. parentNode.insertBefore(this.input, this.container);
  6541. parentNode.removeChild(this.container);
  6542. //remove autocomplete and aria-autocomplete attributes
  6543. this.input.removeAttribute("autocomplete");
  6544. this.input.removeAttribute("aria-autocomplete");
  6545. //remove this awesomeplete instance from the global array of instances
  6546. var indexOfAwesomplete = _.all.indexOf(this);
  6547. if (indexOfAwesomplete !== -1) {
  6548. _.all.splice(indexOfAwesomplete, 1);
  6549. }
  6550. },
  6551. next: function () {
  6552. var count = this.ul.children.length;
  6553. this.goto(this.index < count - 1 ? this.index + 1 : (count ? 0 : -1) );
  6554. },
  6555. previous: function () {
  6556. var count = this.ul.children.length;
  6557. var pos = this.index - 1;
  6558. this.goto(this.selected && pos !== -1 ? pos : count - 1);
  6559. },
  6560. // Should not be used, highlights specific item without any checks!
  6561. goto: function (i) {
  6562. var lis = this.ul.children;
  6563. if (this.selected) {
  6564. lis[this.index].setAttribute("aria-selected", "false");
  6565. }
  6566. this.index = i;
  6567. if (i > -1 && lis.length > 0) {
  6568. lis[i].setAttribute("aria-selected", "true");
  6569. this.status.textContent = lis[i].textContent;
  6570. // scroll to highlighted element in case parent's height is fixed
  6571. this.ul.scrollTop = lis[i].offsetTop - this.ul.clientHeight + lis[i].clientHeight;
  6572. $.fire(this.input, "awesomplete-highlight", {
  6573. text: this.suggestions[this.index]
  6574. });
  6575. }
  6576. },
  6577. select: function (selected, origin) {
  6578. if (selected) {
  6579. this.index = $.siblingIndex(selected);
  6580. } else {
  6581. selected = this.ul.children[this.index];
  6582. }
  6583. if (selected) {
  6584. var suggestion = this.suggestions[this.index];
  6585. var allowed = $.fire(this.input, "awesomplete-select", {
  6586. text: suggestion,
  6587. origin: origin || selected
  6588. });
  6589. if (allowed) {
  6590. this.replace(suggestion);
  6591. this.close({ reason: "select" });
  6592. $.fire(this.input, "awesomplete-selectcomplete", {
  6593. text: suggestion
  6594. });
  6595. }
  6596. }
  6597. },
  6598. evaluate: function() {
  6599. var me = this;
  6600. var value = this.input.value;
  6601. if (value.length >= this.minChars && this._list.length > 0) {
  6602. this.index = -1;
  6603. // Populate list with options that match
  6604. this.ul.innerHTML = "";
  6605. this.suggestions = this._list
  6606. .map(function(item) {
  6607. return new Suggestion(me.data(item, value));
  6608. })
  6609. .filter(function(item) {
  6610. return me.filter(item, value);
  6611. });
  6612. if (this.sort !== false) {
  6613. this.suggestions = this.suggestions.sort(this.sort);
  6614. }
  6615. this.suggestions = this.suggestions.slice(0, this.maxItems);
  6616. this.suggestions.forEach(function(text) {
  6617. me.ul.appendChild(me.item(text, value));
  6618. });
  6619. if (this.ul.children.length === 0) {
  6620. this.close({ reason: "nomatches" });
  6621. } else {
  6622. this.open();
  6623. }
  6624. }
  6625. else {
  6626. this.close({ reason: "nomatches" });
  6627. }
  6628. }
  6629. };
  6630. // Static methods/properties
  6631. _.all = [];
  6632. _.FILTER_CONTAINS = function (text, input) {
  6633. return RegExp($.regExpEscape(input.trim()), "i").test(text);
  6634. };
  6635. _.FILTER_STARTSWITH = function (text, input) {
  6636. return RegExp("^" + $.regExpEscape(input.trim()), "i").test(text);
  6637. };
  6638. _.SORT_BYLENGTH = function (a, b) {
  6639. if (a.length !== b.length) {
  6640. return a.length - b.length;
  6641. }
  6642. return a < b? -1 : 1;
  6643. };
  6644. _.ITEM = function (text, input) {
  6645. input = input.trim();
  6646. var element = document.createElement("li");
  6647. element.setAttribute("aria-selected", "false");
  6648. var regex = new RegExp("("+input+")", "ig");
  6649. var parts = input ? text.split(regex) : [text];
  6650. parts.forEach(function (txt) {
  6651. if (input && txt.match(regex)) {
  6652. var match = document.createElement("mark");
  6653. match.textContent = txt;
  6654. element.appendChild(match);
  6655. } else {
  6656. element.appendChild(document.createTextNode(txt));
  6657. }
  6658. });
  6659. return element;
  6660. };
  6661. _.REPLACE = function (text) {
  6662. this.input.value = text.value;
  6663. };
  6664. _.DATA = function (item/*, input*/) { return item; };
  6665. // Private functions
  6666. function Suggestion(data) {
  6667. var o = Array.isArray(data)
  6668. ? { label: data[0], value: data[1] }
  6669. : typeof data === "object" && "label" in data && "value" in data ? data : { label: data, value: data };
  6670. this.label = o.label || o.value;
  6671. this.value = o.value;
  6672. }
  6673. Object.defineProperty(Suggestion.prototype = Object.create(String.prototype), "length", {
  6674. get: function() { return this.label.length; }
  6675. });
  6676. Suggestion.prototype.toString = Suggestion.prototype.valueOf = function () {
  6677. return "" + this.label;
  6678. };
  6679. function configure(instance, properties, o) {
  6680. for (var i in properties) {
  6681. var initial = properties[i],
  6682. attrValue = instance.input.getAttribute("data-" + i.toLowerCase());
  6683. if (typeof initial === "number") {
  6684. instance[i] = parseInt(attrValue);
  6685. }
  6686. else if (initial === false) { // Boolean options must be false by default anyway
  6687. instance[i] = attrValue !== null;
  6688. }
  6689. else if (initial instanceof Function) {
  6690. instance[i] = null;
  6691. }
  6692. else {
  6693. instance[i] = attrValue;
  6694. }
  6695. if (!instance[i] && instance[i] !== 0) {
  6696. instance[i] = (i in o)? o[i] : initial;
  6697. }
  6698. }
  6699. }
  6700. // Helpers
  6701. var slice = Array.prototype.slice;
  6702. function $(expr, con) {
  6703. return typeof expr === "string"? (con || document).querySelector(expr) : expr || null;
  6704. }
  6705. function $$(expr, con) {
  6706. return slice.call((con || document).querySelectorAll(expr));
  6707. }
  6708. $.create = function(tag, o) {
  6709. var element = document.createElement(tag);
  6710. for (var i in o) {
  6711. var val = o[i];
  6712. if (i === "inside") {
  6713. $(val).appendChild(element);
  6714. }
  6715. else if (i === "around") {
  6716. var ref = $(val);
  6717. ref.parentNode.insertBefore(element, ref);
  6718. element.appendChild(ref);
  6719. }
  6720. else if (i in element) {
  6721. element[i] = val;
  6722. }
  6723. else {
  6724. element.setAttribute(i, val);
  6725. }
  6726. }
  6727. return element;
  6728. };
  6729. $.bind = function(element, o) {
  6730. if (element) {
  6731. for (var event in o) {
  6732. var callback = o[event];
  6733. event.split(/\s+/).forEach(function (event) {
  6734. element.addEventListener(event, callback);
  6735. });
  6736. }
  6737. }
  6738. };
  6739. $.unbind = function(element, o) {
  6740. if (element) {
  6741. for (var event in o) {
  6742. var callback = o[event];
  6743. event.split(/\s+/).forEach(function(event) {
  6744. element.removeEventListener(event, callback);
  6745. });
  6746. }
  6747. }
  6748. };
  6749. $.fire = function(target, type, properties) {
  6750. var evt = document.createEvent("HTMLEvents");
  6751. evt.initEvent(type, true, true );
  6752. for (var j in properties) {
  6753. evt[j] = properties[j];
  6754. }
  6755. return target.dispatchEvent(evt);
  6756. };
  6757. $.regExpEscape = function (s) {
  6758. return s.replace(/[-\\^$*+?.()|[\]{}]/g, "\\$&");
  6759. };
  6760. $.siblingIndex = function (el) {
  6761. /* eslint-disable no-cond-assign */
  6762. for (var i = 0; el = el.previousElementSibling; i++);
  6763. return i;
  6764. };
  6765. // Initialization
  6766. function init() {
  6767. $$("input.awesomplete").forEach(function (input) {
  6768. new _(input);
  6769. });
  6770. }
  6771. // Are we in a browser? Check for Document constructor
  6772. if (typeof Document !== "undefined") {
  6773. // DOM already loaded?
  6774. if (document.readyState !== "loading") {
  6775. init();
  6776. }
  6777. else {
  6778. // Wait for it
  6779. document.addEventListener("DOMContentLoaded", init);
  6780. }
  6781. }
  6782. _.$ = $;
  6783. _.$$ = $$;
  6784. // Make sure to export Awesomplete on self when in a browser
  6785. if (typeof self !== "undefined") {
  6786. self.Awesomplete = _;
  6787. }
  6788. // Expose Awesomplete as a CJS module
  6789. if (typeof module === "object" && module.exports) {
  6790. module.exports = _;
  6791. }
  6792. return _;
  6793. }());
  6794. /*** EXPORTS FROM exports-loader ***/
  6795. module.exports = Awesomplete;
  6796. /***/ }),
  6797. /***/ "./node_modules/backbone.browserStorage/backbone.browserStorage.js":
  6798. /*!*************************************************************************!*\
  6799. !*** ./node_modules/backbone.browserStorage/backbone.browserStorage.js ***!
  6800. \*************************************************************************/
  6801. /*! no static exports found */
  6802. /***/ (function(module, exports, __webpack_require__) {
  6803. /**
  6804. * Backbone localStorage and sessionStorage Adapter
  6805. * Version 0.0.3
  6806. *
  6807. * https://github.com/jcbrand/Backbone.browserStorage
  6808. */
  6809. (function (root, factory) {
  6810. if (true) {
  6811. module.exports = factory(__webpack_require__(/*! backbone */ "./node_modules/backbone/backbone.js"), __webpack_require__(/*! underscore */ "./src/underscore-shim.js"));
  6812. } else {}
  6813. }(this, function(Backbone, _) {
  6814. // A simple module to replace `Backbone.sync` with *browser storage*-based
  6815. // persistence. Models are given GUIDS, and saved into a JSON object. Simple
  6816. // as that.
  6817. // Hold reference to Underscore.js and Backbone.js in the closure in order
  6818. // to make things work even if they are removed from the global namespace
  6819. // Generate four random hex digits.
  6820. function S4() {
  6821. return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
  6822. }
  6823. // Generate a pseudo-GUID by concatenating random hexadecimal.
  6824. function guid() {
  6825. return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4());
  6826. }
  6827. function contains(array, item) {
  6828. var i = array.length;
  6829. while (i--) if (array[i] === item) return true;
  6830. return false;
  6831. }
  6832. function extend(obj, props) {
  6833. for (var key in props) { obj[key] = props[key]; }
  6834. return obj;
  6835. }
  6836. function _browserStorage (name, serializer, type) {
  6837. var _store;
  6838. if (type === 'local' && !window.localStorage ) {
  6839. throw "Backbone.browserStorage: Environment does not support localStorage.";
  6840. } else if (type === 'session' && !window.sessionStorage ) {
  6841. throw "Backbone.browserStorage: Environment does not support sessionStorage.";
  6842. }
  6843. this.name = name;
  6844. this.serializer = serializer || {
  6845. serialize: function(item) {
  6846. return _.isObject(item) ? JSON.stringify(item) : item;
  6847. },
  6848. // fix for "illegal access" error on Android when JSON.parse is passed null
  6849. deserialize: function (data) {
  6850. return data && JSON.parse(data);
  6851. }
  6852. };
  6853. if (type === 'session') {
  6854. this.store = window.sessionStorage;
  6855. } else if (type === 'local') {
  6856. this.store = window.localStorage;
  6857. } else {
  6858. throw "Backbone.browserStorage: No storage type was specified";
  6859. }
  6860. _store = this.store.getItem(this.name);
  6861. this.records = (_store && _store.split(",")) || [];
  6862. }
  6863. // Our Store is represented by a single JS object in *localStorage* or *sessionStorage*.
  6864. // Create it with a meaningful name, like the name you'd give a table.
  6865. Backbone.BrowserStorage = {
  6866. local: function (name, serializer) {
  6867. return _browserStorage.bind(this, name, serializer, 'local')();
  6868. },
  6869. session: function (name, serializer) {
  6870. return _browserStorage.bind(this, name, serializer, 'session')();
  6871. }
  6872. };
  6873. // The browser's local and session stores will be extended with this obj.
  6874. var _extension = {
  6875. // Save the current state of the **Store**
  6876. save: function() {
  6877. this.store.setItem(this.name, this.records.join(","));
  6878. },
  6879. // Add a model, giving it a (hopefully)-unique GUID, if it doesn't already
  6880. // have an id of it's own.
  6881. create: function(model) {
  6882. if (!model.id) {
  6883. model.id = guid();
  6884. model.set(model.idAttribute, model.id);
  6885. }
  6886. this.store.setItem(this._itemName(model.id), this.serializer.serialize(model));
  6887. this.records.push(model.id.toString());
  6888. this.save();
  6889. return this.find(model) !== false;
  6890. },
  6891. // Update a model by replacing its copy in `this.data`.
  6892. update: function(model) {
  6893. this.store.setItem(this._itemName(model.id), this.serializer.serialize(model));
  6894. var modelId = model.id.toString();
  6895. if (!contains(this.records, modelId)) {
  6896. this.records.push(modelId);
  6897. this.save();
  6898. }
  6899. return this.find(model) !== false;
  6900. },
  6901. // Retrieve a model from `this.data` by id.
  6902. find: function(model) {
  6903. return this.serializer.deserialize(this.store.getItem(this._itemName(model.id)));
  6904. },
  6905. // Return the array of all models currently in storage.
  6906. findAll: function() {
  6907. var result = [];
  6908. for (var i = 0, id, data; i < this.records.length; i++) {
  6909. id = this.records[i];
  6910. data = this.serializer.deserialize(this.store.getItem(this._itemName(id)));
  6911. if (data !== null) result.push(data);
  6912. }
  6913. return result;
  6914. },
  6915. // Delete a model from `this.data`, returning it.
  6916. destroy: function(model) {
  6917. this.store.removeItem(this._itemName(model.id));
  6918. var modelId = model.id.toString();
  6919. for (var i = 0, id; i < this.records.length; i++) {
  6920. if (this.records[i] === modelId) {
  6921. this.records.splice(i, 1);
  6922. }
  6923. }
  6924. this.save();
  6925. return model;
  6926. },
  6927. browserStorage: function() {
  6928. return {
  6929. session: sessionStorage,
  6930. local: localStorage
  6931. };
  6932. },
  6933. // Clear browserStorage for specific collection.
  6934. _clear: function() {
  6935. var local = this.store, itemRe;
  6936. // Escape special regex characters in id.
  6937. itemRe = new RegExp("^" + this.name.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&") + "-");
  6938. // Remove id-tracking item (e.g., "foo").
  6939. local.removeItem(this.name);
  6940. // Match all data items (e.g., "foo-ID") and remove.
  6941. for (var k in local) {
  6942. if (itemRe.test(k)) {
  6943. local.removeItem(k);
  6944. }
  6945. }
  6946. this.records.length = 0;
  6947. },
  6948. // Size of browserStorage.
  6949. _storageSize: function() {
  6950. return this.store.length;
  6951. },
  6952. _itemName: function(id) {
  6953. return this.name+"-"+id;
  6954. }
  6955. };
  6956. extend(Backbone.BrowserStorage.session.prototype, _extension);
  6957. extend(Backbone.BrowserStorage.local.prototype, _extension);
  6958. // localSync delegate to the model or collection's
  6959. // *browserStorage* property, which should be an instance of `Store`.
  6960. // window.Store.sync and Backbone.localSync is deprecated, use Backbone.BrowserStorage.sync instead
  6961. Backbone.BrowserStorage.sync = Backbone.localSync = function(method, model, options) {
  6962. var store = model.browserStorage || model.collection.browserStorage;
  6963. var resp, errorMessage;
  6964. //If $ is having Deferred - use it.
  6965. var syncDfd = Backbone.$ ?
  6966. (Backbone.$.Deferred && Backbone.$.Deferred()) :
  6967. (Backbone.Deferred && Backbone.Deferred());
  6968. try {
  6969. switch (method) {
  6970. case "read":
  6971. resp = model.id !== undefined ? store.find(model) : store.findAll();
  6972. break;
  6973. case "create":
  6974. resp = store.create(model);
  6975. break;
  6976. case "update":
  6977. resp = store.update(model);
  6978. break;
  6979. case "delete":
  6980. resp = store.destroy(model);
  6981. break;
  6982. }
  6983. } catch(error) {
  6984. if (error.code === 22 && store._storageSize() === 0)
  6985. errorMessage = "Private browsing is unsupported";
  6986. else
  6987. errorMessage = error.message;
  6988. }
  6989. if (resp) {
  6990. if (options && options.success) {
  6991. if (Backbone.VERSION === "0.9.10") {
  6992. options.success(model, resp, options);
  6993. } else {
  6994. options.success(resp);
  6995. }
  6996. }
  6997. if (syncDfd) {
  6998. syncDfd.resolve(resp);
  6999. }
  7000. } else {
  7001. errorMessage = errorMessage ? errorMessage
  7002. : "Record Not Found";
  7003. if (options && options.error)
  7004. if (Backbone.VERSION === "0.9.10") {
  7005. options.error(model, errorMessage, options);
  7006. } else {
  7007. options.error(errorMessage);
  7008. }
  7009. if (syncDfd)
  7010. syncDfd.reject(errorMessage);
  7011. }
  7012. // add compatibility with $.ajax
  7013. // always execute callback for success and error
  7014. if (options && options.complete) options.complete(resp);
  7015. return syncDfd && syncDfd.promise();
  7016. };
  7017. Backbone.ajaxSync = Backbone.sync;
  7018. Backbone.getSyncMethod = function(model) {
  7019. if(model.browserStorage || (model.collection && model.collection.browserStorage)) {
  7020. return Backbone.localSync;
  7021. }
  7022. return Backbone.ajaxSync;
  7023. };
  7024. // Override 'Backbone.sync' to default to localSync,
  7025. // the original 'Backbone.sync' is still available in 'Backbone.ajaxSync'
  7026. Backbone.sync = function(method, model, options) {
  7027. return Backbone.getSyncMethod(model).apply(this, [method, model, options]);
  7028. };
  7029. return Backbone.BrowserStorage;
  7030. }));
  7031. /***/ }),
  7032. /***/ "./node_modules/backbone.nativeview/backbone.nativeview.js":
  7033. /*!*****************************************************************!*\
  7034. !*** ./node_modules/backbone.nativeview/backbone.nativeview.js ***!
  7035. \*****************************************************************/
  7036. /*! no static exports found */
  7037. /***/ (function(module, exports, __webpack_require__) {
  7038. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Backbone.NativeView.js 0.3.3
  7039. // ---------------
  7040. // (c) 2015 Adam Krebs, Jimmy Yuen Ho Wong
  7041. // Backbone.NativeView may be freely distributed under the MIT license.
  7042. // For all details and documentation:
  7043. // https://github.com/akre54/Backbone.NativeView
  7044. (function (factory) {
  7045. if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! backbone */ "./node_modules/backbone/backbone.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  7046. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  7047. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  7048. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  7049. } else {}
  7050. }(function (Backbone) {
  7051. // Cached regex to match an opening '<' of an HTML tag, possibly left-padded
  7052. // with whitespace.
  7053. var paddedLt = /^\s*</;
  7054. // Caches a local reference to `Element.prototype` for faster access.
  7055. var ElementProto = (typeof Element !== 'undefined' && Element.prototype) || {};
  7056. // Cross-browser event listener shims
  7057. var elementAddEventListener = ElementProto.addEventListener || function(eventName, listener) {
  7058. return this.attachEvent('on' + eventName, listener);
  7059. }
  7060. var elementRemoveEventListener = ElementProto.removeEventListener || function(eventName, listener) {
  7061. return this.detachEvent('on' + eventName, listener);
  7062. }
  7063. var indexOf = function(array, item) {
  7064. for (var i = 0, len = array.length; i < len; i++) if (array[i] === item) return i;
  7065. return -1;
  7066. }
  7067. // Find the right `Element#matches` for IE>=9 and modern browsers.
  7068. var matchesSelector = ElementProto.matches ||
  7069. ElementProto.webkitMatchesSelector ||
  7070. ElementProto.mozMatchesSelector ||
  7071. ElementProto.msMatchesSelector ||
  7072. ElementProto.oMatchesSelector ||
  7073. // Make our own `Element#matches` for IE8
  7074. function(selector) {
  7075. // Use querySelectorAll to find all elements matching the selector,
  7076. // then check if the given element is included in that list.
  7077. // Executing the query on the parentNode reduces the resulting nodeList,
  7078. // (document doesn't have a parentNode).
  7079. var nodeList = (this.parentNode || document).querySelectorAll(selector) || [];
  7080. return ~indexOf(nodeList, this);
  7081. };
  7082. // Cache Backbone.View for later access in constructor
  7083. var BBView = Backbone.View;
  7084. // To extend an existing view to use native methods, extend the View prototype
  7085. // with the mixin: _.extend(MyView.prototype, Backbone.NativeViewMixin);
  7086. Backbone.NativeViewMixin = {
  7087. _domEvents: null,
  7088. constructor: function() {
  7089. this._domEvents = [];
  7090. return BBView.apply(this, arguments);
  7091. },
  7092. $: function(selector) {
  7093. return this.el.querySelectorAll(selector);
  7094. },
  7095. _removeElement: function() {
  7096. this.undelegateEvents();
  7097. if (this.el.parentNode) this.el.parentNode.removeChild(this.el);
  7098. },
  7099. // Apply the `element` to the view. `element` can be a CSS selector,
  7100. // a string of HTML, or an Element node.
  7101. _setElement: function(element) {
  7102. if (typeof element == 'string') {
  7103. if (paddedLt.test(element)) {
  7104. var el = document.createElement('div');
  7105. el.innerHTML = element;
  7106. this.el = el.firstChild;
  7107. } else {
  7108. this.el = document.querySelector(element);
  7109. }
  7110. } else {
  7111. this.el = element;
  7112. }
  7113. },
  7114. // Set a hash of attributes to the view's `el`. We use the "prop" version
  7115. // if available, falling back to `setAttribute` for the catch-all.
  7116. _setAttributes: function(attrs) {
  7117. for (var attr in attrs) {
  7118. attr in this.el ? this.el[attr] = attrs[attr] : this.el.setAttribute(attr, attrs[attr]);
  7119. }
  7120. },
  7121. // Make a event delegation handler for the given `eventName` and `selector`
  7122. // and attach it to `this.el`.
  7123. // If selector is empty, the listener will be bound to `this.el`. If not, a
  7124. // new handler that will recursively traverse up the event target's DOM
  7125. // hierarchy looking for a node that matches the selector. If one is found,
  7126. // the event's `delegateTarget` property is set to it and the return the
  7127. // result of calling bound `listener` with the parameters given to the
  7128. // handler.
  7129. delegate: function(eventName, selector, listener) {
  7130. if (typeof selector === 'function') {
  7131. listener = selector;
  7132. selector = null;
  7133. }
  7134. var root = this.el;
  7135. var handler = selector ? function (e) {
  7136. var node = e.target || e.srcElement;
  7137. for (; node && node != root; node = node.parentNode) {
  7138. if (matchesSelector.call(node, selector)) {
  7139. e.delegateTarget = node;
  7140. listener(e);
  7141. }
  7142. }
  7143. } : listener;
  7144. elementAddEventListener.call(this.el, eventName, handler, false);
  7145. this._domEvents.push({eventName: eventName, handler: handler, listener: listener, selector: selector});
  7146. return handler;
  7147. },
  7148. // Remove a single delegated event. Either `eventName` or `selector` must
  7149. // be included, `selector` and `listener` are optional.
  7150. undelegate: function(eventName, selector, listener) {
  7151. if (typeof selector === 'function') {
  7152. listener = selector;
  7153. selector = null;
  7154. }
  7155. if (this.el) {
  7156. var handlers = this._domEvents.slice();
  7157. for (var i = 0, len = handlers.length; i < len; i++) {
  7158. var item = handlers[i];
  7159. var match = item.eventName === eventName &&
  7160. (listener ? item.listener === listener : true) &&
  7161. (selector ? item.selector === selector : true);
  7162. if (!match) continue;
  7163. elementRemoveEventListener.call(this.el, item.eventName, item.handler, false);
  7164. this._domEvents.splice(indexOf(handlers, item), 1);
  7165. }
  7166. }
  7167. return this;
  7168. },
  7169. // Remove all events created with `delegate` from `el`
  7170. undelegateEvents: function() {
  7171. if (this.el) {
  7172. for (var i = 0, len = this._domEvents.length; i < len; i++) {
  7173. var item = this._domEvents[i];
  7174. elementRemoveEventListener.call(this.el, item.eventName, item.handler, false);
  7175. };
  7176. this._domEvents.length = 0;
  7177. }
  7178. return this;
  7179. }
  7180. };
  7181. Backbone.NativeView = Backbone.View.extend(Backbone.NativeViewMixin);
  7182. return Backbone.NativeView;
  7183. }));
  7184. /***/ }),
  7185. /***/ "./node_modules/backbone.overview/backbone.orderedlistview.js":
  7186. /*!********************************************************************!*\
  7187. !*** ./node_modules/backbone.overview/backbone.orderedlistview.js ***!
  7188. \********************************************************************/
  7189. /*! no static exports found */
  7190. /***/ (function(module, exports, __webpack_require__) {
  7191. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*** IMPORTS FROM imports-loader ***/
  7192. var backbone = (backbone || {});
  7193. backbone.nativeview = __webpack_require__(/*! backbone.nativeview */ "./node_modules/backbone.nativeview/backbone.nativeview.js");
  7194. /*!
  7195. * Backbone.OrderedListView
  7196. *
  7197. * Copyright (c) 2017, JC Brand <jc@opkode.com>
  7198. * Licensed under the Mozilla Public License (MPL)
  7199. */
  7200. (function (root, factory) {
  7201. if (true) {
  7202. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! underscore */ "./src/underscore-shim.js"), __webpack_require__(/*! backbone */ "./node_modules/backbone/backbone.js"), __webpack_require__(/*! backbone.overview */ "./node_modules/backbone.overview/backbone.overview.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  7203. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  7204. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  7205. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  7206. } else {}
  7207. }(this, function (_, Backbone) {
  7208. "use strict";
  7209. Backbone.OrderedListView = Backbone.Overview.extend({
  7210. /* An OrderedListView is a special type of Overview which adds some
  7211. * methods and conventions for rendering an ordered list of elements.
  7212. */
  7213. // The `listItems` attribute denotes the path (from this View) to the
  7214. // list of items.
  7215. listItems: 'model',
  7216. // The `sortEvent` attribute specifies the event which should cause the
  7217. // ordered list to be sorted.
  7218. sortEvent: 'change',
  7219. // The `listSelector` is the selector used to query for the DOM list
  7220. // element which contains the ordered items.
  7221. listSelector: '.ordered-items',
  7222. // The `itemView` is constructor which should be called to create a
  7223. // View for a new item.
  7224. ItemView: undefined,
  7225. // The `subviewIndex` is the attribute of the list element model which
  7226. // acts as the index of the subview in the overview.
  7227. // An overview is a "Collection" of views, and they can be retrieved
  7228. // via an index. By default this is the 'id' attribute, but it could be
  7229. // set to something else.
  7230. subviewIndex: 'id',
  7231. initialize () {
  7232. this.sortEventually = _.debounce(
  7233. this.sortAndPositionAllItems.bind(this), 500);
  7234. this.items = _.get(this, this.listItems);
  7235. this.items.on('add', this.sortAndPositionAllItems, this);
  7236. this.items.on('remove', this.removeView, this);
  7237. if (!_.isNil(this.sortEvent)) {
  7238. this.items.on(this.sortEvent, this.sortEventually, this);
  7239. }
  7240. },
  7241. createItemView (item) {
  7242. let item_view = this.get(item.get(this.subviewIndex));
  7243. if (!item_view) {
  7244. item_view = new this.ItemView({model: item});
  7245. this.add(item.get(this.subviewIndex), item_view);
  7246. } else {
  7247. item_view.model = item;
  7248. item_view.initialize();
  7249. }
  7250. item_view.render();
  7251. return item_view;
  7252. },
  7253. removeView (item) {
  7254. this.remove(item.get(this.subviewIndex));
  7255. },
  7256. sortAndPositionAllItems () {
  7257. if (!this.items.length) {
  7258. return;
  7259. }
  7260. this.items.sort();
  7261. const list_el = this.el.querySelector(this.listSelector);
  7262. const div = document.createElement('div');
  7263. list_el.parentNode.replaceChild(div, list_el);
  7264. this.items.each((item) => {
  7265. let view = this.get(item.get(this.subviewIndex));
  7266. if (_.isUndefined(view)) {
  7267. view = this.createItemView(item)
  7268. }
  7269. list_el.insertAdjacentElement('beforeend', view.el);
  7270. });
  7271. div.parentNode.replaceChild(list_el, div);
  7272. }
  7273. });
  7274. return Backbone.OrderedListView;
  7275. }));
  7276. /***/ }),
  7277. /***/ "./node_modules/backbone.overview/backbone.overview.js":
  7278. /*!*************************************************************!*\
  7279. !*** ./node_modules/backbone.overview/backbone.overview.js ***!
  7280. \*************************************************************/
  7281. /*! no static exports found */
  7282. /***/ (function(module, exports, __webpack_require__) {
  7283. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*** IMPORTS FROM imports-loader ***/
  7284. var backbone = (backbone || {});
  7285. backbone.nativeview = __webpack_require__(/*! backbone.nativeview */ "./node_modules/backbone.nativeview/backbone.nativeview.js");
  7286. /*!
  7287. * Backbone.Overview
  7288. *
  7289. * Copyright (c) 2018, JC Brand <jc@opkode.com>
  7290. * Licensed under the Mozilla Public License (MPL)
  7291. */
  7292. (function (root, factory) {
  7293. if (true) {
  7294. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! underscore */ "./src/underscore-shim.js"), __webpack_require__(/*! backbone */ "./node_modules/backbone/backbone.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  7295. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  7296. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  7297. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  7298. } else {}
  7299. }(this, function (_, Backbone) {
  7300. "use strict";
  7301. const View = _.isUndefined(Backbone.NativeView) ? Backbone.View : Backbone.NativeView;
  7302. const Overview = Backbone.Overview = function (options) {
  7303. /* An Overview is a View that contains and keeps track of sub-views.
  7304. * Kind of like what a Collection is to a Model.
  7305. */
  7306. var that = this;
  7307. this.views = {};
  7308. this.keys = _.partial(_.keys, this.views);
  7309. this.getAll = _.partial(_.identity, this.views);
  7310. this.get = function (id) {
  7311. return that.views[id];
  7312. };
  7313. this.xget = function (id) {
  7314. /* Exclusive get. Returns all instances except the given id. */
  7315. return _.filter(that.views, function (view, vid) {
  7316. return vid !== id;
  7317. });
  7318. };
  7319. this.add = function (id, view) {
  7320. that.views[id] = view;
  7321. return view;
  7322. };
  7323. this.remove = function (id) {
  7324. if (typeof id === "undefined") {
  7325. new View().remove.apply(that);
  7326. }
  7327. var view = that.views[id];
  7328. if (view) {
  7329. delete that.views[id];
  7330. view.remove();
  7331. return view;
  7332. }
  7333. };
  7334. this.removeAll = function () {
  7335. _.each(_.keys(that.views), that.remove);
  7336. return that;
  7337. };
  7338. View.apply(this, Array.prototype.slice.apply(arguments));
  7339. };
  7340. var methods = [
  7341. 'all', 'any', 'chain', 'collect', 'contains', 'detect',
  7342. 'difference', 'drop', 'each', 'every', 'filter', 'find',
  7343. 'first', 'foldl', 'foldr', 'forEach', 'head', 'include',
  7344. 'indexOf', 'initial', 'inject', 'invoke', 'isEmpty',
  7345. 'last', 'lastIndexOf', 'map', 'max', 'min', 'reduce',
  7346. 'reduceRight', 'reject', 'rest', 'sample', 'select',
  7347. 'shuffle', 'size', 'some', 'sortBy', 'tail', 'take',
  7348. 'toArray', 'without',
  7349. ];
  7350. // Mix in each Underscore method as a proxy to `Overview#view`.
  7351. _.each(methods, function(method) {
  7352. Overview.prototype[method] = function() {
  7353. var args = Array.prototype.slice.call(arguments);
  7354. args.unshift(this.views);
  7355. return _[method].apply(_, args);
  7356. };
  7357. });
  7358. _.extend(Overview.prototype, View.prototype);
  7359. Overview.extend = View.extend;
  7360. Backbone.OrderedListView = Backbone.Overview.extend({
  7361. // The `listItems` attribute denotes the path (from this View) to the
  7362. // list of items.
  7363. listItems: 'model',
  7364. // The `sortEvent` attribute specifies the event which should cause the
  7365. // ordered list to be sorted.
  7366. sortEvent: 'change',
  7367. // The `listSelector` is the selector used to query for the DOM list
  7368. // element which contains the ordered items.
  7369. listSelector: '.ordered-items',
  7370. // The `itemView` is constructor which should be called to create a
  7371. // View for a new item.
  7372. ItemView: undefined,
  7373. initialize () {
  7374. this.sortEventually = _.debounce(this.sortAndPositionAllItems.bind(this), 500);
  7375. this.items = _.get(this, this.listItems);
  7376. this.items.on('add', this.createItemView, this);
  7377. this.items.on('add', this.sortEventually, this);
  7378. this.items.on(this.sortEvent, this.sortEventually, this);
  7379. },
  7380. createItemView (item) {
  7381. let item_view = this.get(item.get('id'));
  7382. if (!item_view) {
  7383. item_view = new this.ItemView({model: item});
  7384. this.add(item.get('id'), item_view);
  7385. } else {
  7386. item_view.model = item;
  7387. item_view.initialize();
  7388. }
  7389. item_view.render();
  7390. return item_view;
  7391. },
  7392. sortAndPositionAllItems () {
  7393. this.items.sort();
  7394. this.items.each((item) => {
  7395. if (_.isUndefined(this.get(item.get('id')))) {
  7396. this.createItemView(item)
  7397. }
  7398. this.positionItem(item, this.el.querySelector(this.listSelector));
  7399. });
  7400. },
  7401. positionItem (item, list_el) {
  7402. /* Place the View's DOM element in the correct alphabetical
  7403. * position in the list.
  7404. *
  7405. * IMPORTANT: there's an important implicit assumption being
  7406. * made here. And that is that initially this method gets called
  7407. * for each item in the right positional order.
  7408. *
  7409. * In other words, it gets called for the 0th, then the
  7410. * 1st, then the 2nd, 3rd and so on.
  7411. *
  7412. * That's why we call it in the "success" handler after
  7413. * fetching the items, so that we know we have ALL of
  7414. * them and that they're sorted.
  7415. */
  7416. const view = this.get(item.get('id')),
  7417. index = this.items.indexOf(item);
  7418. if (index === 0) {
  7419. list_el.insertAdjacentElement('afterbegin', view.el);
  7420. } else if (index === (this.items.length-1)) {
  7421. list_el.insertAdjacentElement('beforeend', view.el);
  7422. } else {
  7423. const neighbour_el = list_el.querySelector('li:nth-child('+index+')');
  7424. neighbour_el.insertAdjacentElement('afterend', view.el);
  7425. }
  7426. return view;
  7427. }
  7428. });
  7429. return Backbone.Overview;
  7430. }));
  7431. /***/ }),
  7432. /***/ "./node_modules/backbone.vdomview/backbone.vdomview.js":
  7433. /*!*************************************************************!*\
  7434. !*** ./node_modules/backbone.vdomview/backbone.vdomview.js ***!
  7435. \*************************************************************/
  7436. /*! no static exports found */
  7437. /***/ (function(module, exports, __webpack_require__) {
  7438. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*** IMPORTS FROM imports-loader ***/
  7439. var backbone = (backbone || {});
  7440. backbone.nativeview = __webpack_require__(/*! backbone.nativeview */ "./node_modules/backbone.nativeview/backbone.nativeview.js");
  7441. /*!
  7442. * Backbone.VDOMView
  7443. *
  7444. * MIT Licensed. Copyright (c) 2017, JC Brand <jc@opkode.com>
  7445. */
  7446. (function (root, factory) {
  7447. if (true) {
  7448. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
  7449. __webpack_require__(/*! snabbdom */ "./node_modules/snabbdom/dist/snabbdom.js"),
  7450. __webpack_require__(/*! snabbdom-attributes */ "./node_modules/snabbdom/dist/snabbdom-attributes.js"),
  7451. __webpack_require__(/*! snabbdom-class */ "./node_modules/snabbdom/dist/snabbdom-class.js"),
  7452. __webpack_require__(/*! snabbdom-dataset */ "./node_modules/snabbdom/dist/snabbdom-dataset.js"),
  7453. __webpack_require__(/*! snabbdom-props */ "./node_modules/snabbdom/dist/snabbdom-props.js"),
  7454. __webpack_require__(/*! snabbdom-style */ "./node_modules/snabbdom/dist/snabbdom-style.js"),
  7455. __webpack_require__(/*! tovnode */ "./node_modules/snabbdom/dist/tovnode.js"),
  7456. __webpack_require__(/*! underscore */ "./src/underscore-shim.js"),
  7457. __webpack_require__(/*! backbone */ "./node_modules/backbone/backbone.js")
  7458. ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  7459. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  7460. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  7461. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  7462. } else {}
  7463. }(this, function (
  7464. snabbdom,
  7465. snabbdom_attributes,
  7466. snabbdom_class,
  7467. snabbdom_dataset,
  7468. snabbdom_props,
  7469. snabbdom_style,
  7470. tovnode,
  7471. _,
  7472. Backbone) {
  7473. "use strict";
  7474. let domParser = new DOMParser();
  7475. const patch = snabbdom.init([
  7476. snabbdom_attributes.default,
  7477. snabbdom_class.default,
  7478. snabbdom_dataset.default,
  7479. snabbdom_props.default,
  7480. snabbdom_style.default
  7481. ]);
  7482. const View = _.isUndefined(Backbone.NativeView) ? Backbone.View : Backbone.NativeView;
  7483. function parseHTMLToDOM (html_str) {
  7484. /* Parses a string with HTML and returns a DOM element.
  7485. *
  7486. * Forked from vdom_parser:
  7487. * https://github.com/bitinn/vdom-parser
  7488. */
  7489. if (typeof html_str !== 'string') {
  7490. throw new Error('Invalid parameter type in parseHTMLToDOM');
  7491. }
  7492. if ( !('DOMParser' in window) ) {
  7493. throw new Error(
  7494. 'DOMParser is not available, '+
  7495. 'so parsing string to DOM node is not possible.');
  7496. }
  7497. if (!html_str) {
  7498. return document.createTextNode('');
  7499. }
  7500. domParser = domParser || new DOMParser();
  7501. const doc = domParser.parseFromString(html_str, 'text/html');
  7502. // most tags default to body
  7503. if (doc.body.firstChild) {
  7504. return doc.getElementsByTagName('body')[0].firstChild;
  7505. // some tags, like script and style, default to head
  7506. } else if (doc.head.firstChild && (doc.head.firstChild.tagName !== 'TITLE' || doc.title)) {
  7507. return doc.head.firstChild;
  7508. // special case for html comment, cdata, doctype
  7509. } else if (doc.firstChild && doc.firstChild.tagName !== 'HTML') {
  7510. return doc.firstChild;
  7511. // other element, such as whitespace, or html/body/head tag, fallback to empty text node
  7512. } else {
  7513. return document.createTextNode('');
  7514. }
  7515. }
  7516. Backbone.VDOMView = View.extend({
  7517. updateEventListeners (old_vnode, new_vnode) {
  7518. this.setElement(new_vnode.elm);
  7519. },
  7520. render () {
  7521. if (_.isFunction(this.beforeRender)) {
  7522. this.beforeRender();
  7523. }
  7524. const new_vnode = tovnode.toVNode(parseHTMLToDOM(this.toHTML()));
  7525. new_vnode.data.hook = _.extend({
  7526. create: this.updateEventListeners.bind(this),
  7527. update: this.updateEventListeners.bind(this)
  7528. });
  7529. const el = this.vnode ? this.vnode.elm : this.el;
  7530. if (el.outerHTML !== new_vnode.elm.outerHTML) {
  7531. this.vnode = patch(this.vnode || this.el, new_vnode);
  7532. }
  7533. if (_.isFunction(this.afterRender)) {
  7534. this.afterRender();
  7535. }
  7536. return this;
  7537. }
  7538. });
  7539. return Backbone.VDOMView;
  7540. }));
  7541. /***/ }),
  7542. /***/ "./node_modules/backbone/backbone.js":
  7543. /*!*******************************************!*\
  7544. !*** ./node_modules/backbone/backbone.js ***!
  7545. \*******************************************/
  7546. /*! no static exports found */
  7547. /***/ (function(module, exports, __webpack_require__) {
  7548. /* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Backbone.js 1.3.3
  7549. // (c) 2010-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  7550. // Backbone may be freely distributed under the MIT license.
  7551. // For all details and documentation:
  7552. // http://backbonejs.org
  7553. (function(factory) {
  7554. // Establish the root object, `window` (`self`) in the browser, or `global` on the server.
  7555. // We use `self` instead of `window` for `WebWorker` support.
  7556. var root = (typeof self == 'object' && self.self === self && self) ||
  7557. (typeof global == 'object' && global.global === global && global);
  7558. // Set up Backbone appropriately for the environment. Start with AMD.
  7559. if (true) {
  7560. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! underscore */ "./src/underscore-shim.js"), __webpack_require__(/*! jquery */ "./src/jquery-stub.js"), exports], __WEBPACK_AMD_DEFINE_RESULT__ = (function(_, $, exports) {
  7561. // Export global even in AMD case in case this script is loaded with
  7562. // others that may still expect a global Backbone.
  7563. root.Backbone = factory(root, exports, _, $);
  7564. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  7565. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  7566. // Next for Node.js or CommonJS. jQuery may not be needed as a module.
  7567. } else { var _, $; }
  7568. })(function(root, Backbone, _, $) {
  7569. // Initial Setup
  7570. // -------------
  7571. // Save the previous value of the `Backbone` variable, so that it can be
  7572. // restored later on, if `noConflict` is used.
  7573. var previousBackbone = root.Backbone;
  7574. // Create a local reference to a common array method we'll want to use later.
  7575. var slice = Array.prototype.slice;
  7576. // Current version of the library. Keep in sync with `package.json`.
  7577. Backbone.VERSION = '1.3.3';
  7578. // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns
  7579. // the `$` variable.
  7580. Backbone.$ = $;
  7581. // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable
  7582. // to its previous owner. Returns a reference to this Backbone object.
  7583. Backbone.noConflict = function() {
  7584. root.Backbone = previousBackbone;
  7585. return this;
  7586. };
  7587. // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option
  7588. // will fake `"PATCH"`, `"PUT"` and `"DELETE"` requests via the `_method` parameter and
  7589. // set a `X-Http-Method-Override` header.
  7590. Backbone.emulateHTTP = false;
  7591. // Turn on `emulateJSON` to support legacy servers that can't deal with direct
  7592. // `application/json` requests ... this will encode the body as
  7593. // `application/x-www-form-urlencoded` instead and will send the model in a
  7594. // form param named `model`.
  7595. Backbone.emulateJSON = false;
  7596. // Proxy Backbone class methods to Underscore functions, wrapping the model's
  7597. // `attributes` object or collection's `models` array behind the scenes.
  7598. //
  7599. // collection.filter(function(model) { return model.get('age') > 10 });
  7600. // collection.each(this.addView);
  7601. //
  7602. // `Function#apply` can be slow so we use the method's arg count, if we know it.
  7603. var addMethod = function(length, method, attribute) {
  7604. switch (length) {
  7605. case 1: return function() {
  7606. return _[method](this[attribute]);
  7607. };
  7608. case 2: return function(value) {
  7609. return _[method](this[attribute], value);
  7610. };
  7611. case 3: return function(iteratee, context) {
  7612. return _[method](this[attribute], cb(iteratee, this), context);
  7613. };
  7614. case 4: return function(iteratee, defaultVal, context) {
  7615. return _[method](this[attribute], cb(iteratee, this), defaultVal, context);
  7616. };
  7617. default: return function() {
  7618. var args = slice.call(arguments);
  7619. args.unshift(this[attribute]);
  7620. return _[method].apply(_, args);
  7621. };
  7622. }
  7623. };
  7624. var addUnderscoreMethods = function(Class, methods, attribute) {
  7625. _.each(methods, function(length, method) {
  7626. if (_[method]) Class.prototype[method] = addMethod(length, method, attribute);
  7627. });
  7628. };
  7629. // Support `collection.sortBy('attr')` and `collection.findWhere({id: 1})`.
  7630. var cb = function(iteratee, instance) {
  7631. if (_.isFunction(iteratee)) return iteratee;
  7632. if (_.isObject(iteratee) && !instance._isModel(iteratee)) return modelMatcher(iteratee);
  7633. if (_.isString(iteratee)) return function(model) { return model.get(iteratee); };
  7634. return iteratee;
  7635. };
  7636. var modelMatcher = function(attrs) {
  7637. var matcher = _.matches(attrs);
  7638. return function(model) {
  7639. return matcher(model.attributes);
  7640. };
  7641. };
  7642. // Backbone.Events
  7643. // ---------------
  7644. // A module that can be mixed in to *any object* in order to provide it with
  7645. // a custom event channel. You may bind a callback to an event with `on` or
  7646. // remove with `off`; `trigger`-ing an event fires all callbacks in
  7647. // succession.
  7648. //
  7649. // var object = {};
  7650. // _.extend(object, Backbone.Events);
  7651. // object.on('expand', function(){ alert('expanded'); });
  7652. // object.trigger('expand');
  7653. //
  7654. var Events = Backbone.Events = {};
  7655. // Regular expression used to split event strings.
  7656. var eventSplitter = /\s+/;
  7657. // Iterates over the standard `event, callback` (as well as the fancy multiple
  7658. // space-separated events `"change blur", callback` and jQuery-style event
  7659. // maps `{event: callback}`).
  7660. var eventsApi = function(iteratee, events, name, callback, opts) {
  7661. var i = 0, names;
  7662. if (name && typeof name === 'object') {
  7663. // Handle event maps.
  7664. if (callback !== void 0 && 'context' in opts && opts.context === void 0) opts.context = callback;
  7665. for (names = _.keys(name); i < names.length ; i++) {
  7666. events = eventsApi(iteratee, events, names[i], name[names[i]], opts);
  7667. }
  7668. } else if (name && eventSplitter.test(name)) {
  7669. // Handle space-separated event names by delegating them individually.
  7670. for (names = name.split(eventSplitter); i < names.length; i++) {
  7671. events = iteratee(events, names[i], callback, opts);
  7672. }
  7673. } else {
  7674. // Finally, standard events.
  7675. events = iteratee(events, name, callback, opts);
  7676. }
  7677. return events;
  7678. };
  7679. // Bind an event to a `callback` function. Passing `"all"` will bind
  7680. // the callback to all events fired.
  7681. Events.on = function(name, callback, context) {
  7682. return internalOn(this, name, callback, context);
  7683. };
  7684. // Guard the `listening` argument from the public API.
  7685. var internalOn = function(obj, name, callback, context, listening) {
  7686. obj._events = eventsApi(onApi, obj._events || {}, name, callback, {
  7687. context: context,
  7688. ctx: obj,
  7689. listening: listening
  7690. });
  7691. if (listening) {
  7692. var listeners = obj._listeners || (obj._listeners = {});
  7693. listeners[listening.id] = listening;
  7694. }
  7695. return obj;
  7696. };
  7697. // Inversion-of-control versions of `on`. Tell *this* object to listen to
  7698. // an event in another object... keeping track of what it's listening to
  7699. // for easier unbinding later.
  7700. Events.listenTo = function(obj, name, callback) {
  7701. if (!obj) return this;
  7702. var id = obj._listenId || (obj._listenId = _.uniqueId('l'));
  7703. var listeningTo = this._listeningTo || (this._listeningTo = {});
  7704. var listening = listeningTo[id];
  7705. // This object is not listening to any other events on `obj` yet.
  7706. // Setup the necessary references to track the listening callbacks.
  7707. if (!listening) {
  7708. var thisId = this._listenId || (this._listenId = _.uniqueId('l'));
  7709. listening = listeningTo[id] = {obj: obj, objId: id, id: thisId, listeningTo: listeningTo, count: 0};
  7710. }
  7711. // Bind callbacks on obj, and keep track of them on listening.
  7712. internalOn(obj, name, callback, this, listening);
  7713. return this;
  7714. };
  7715. // The reducing API that adds a callback to the `events` object.
  7716. var onApi = function(events, name, callback, options) {
  7717. if (callback) {
  7718. var handlers = events[name] || (events[name] = []);
  7719. var context = options.context, ctx = options.ctx, listening = options.listening;
  7720. if (listening) listening.count++;
  7721. handlers.push({callback: callback, context: context, ctx: context || ctx, listening: listening});
  7722. }
  7723. return events;
  7724. };
  7725. // Remove one or many callbacks. If `context` is null, removes all
  7726. // callbacks with that function. If `callback` is null, removes all
  7727. // callbacks for the event. If `name` is null, removes all bound
  7728. // callbacks for all events.
  7729. Events.off = function(name, callback, context) {
  7730. if (!this._events) return this;
  7731. this._events = eventsApi(offApi, this._events, name, callback, {
  7732. context: context,
  7733. listeners: this._listeners
  7734. });
  7735. return this;
  7736. };
  7737. // Tell this object to stop listening to either specific events ... or
  7738. // to every object it's currently listening to.
  7739. Events.stopListening = function(obj, name, callback) {
  7740. var listeningTo = this._listeningTo;
  7741. if (!listeningTo) return this;
  7742. var ids = obj ? [obj._listenId] : _.keys(listeningTo);
  7743. for (var i = 0; i < ids.length; i++) {
  7744. var listening = listeningTo[ids[i]];
  7745. // If listening doesn't exist, this object is not currently
  7746. // listening to obj. Break out early.
  7747. if (!listening) break;
  7748. listening.obj.off(name, callback, this);
  7749. }
  7750. return this;
  7751. };
  7752. // The reducing API that removes a callback from the `events` object.
  7753. var offApi = function(events, name, callback, options) {
  7754. if (!events) return;
  7755. var i = 0, listening;
  7756. var context = options.context, listeners = options.listeners;
  7757. // Delete all events listeners and "drop" events.
  7758. if (!name && !callback && !context) {
  7759. var ids = _.keys(listeners);
  7760. for (; i < ids.length; i++) {
  7761. listening = listeners[ids[i]];
  7762. delete listeners[listening.id];
  7763. delete listening.listeningTo[listening.objId];
  7764. }
  7765. return;
  7766. }
  7767. var names = name ? [name] : _.keys(events);
  7768. for (; i < names.length; i++) {
  7769. name = names[i];
  7770. var handlers = events[name];
  7771. // Bail out if there are no events stored.
  7772. if (!handlers) break;
  7773. // Replace events if there are any remaining. Otherwise, clean up.
  7774. var remaining = [];
  7775. for (var j = 0; j < handlers.length; j++) {
  7776. var handler = handlers[j];
  7777. if (
  7778. callback && callback !== handler.callback &&
  7779. callback !== handler.callback._callback ||
  7780. context && context !== handler.context
  7781. ) {
  7782. remaining.push(handler);
  7783. } else {
  7784. listening = handler.listening;
  7785. if (listening && --listening.count === 0) {
  7786. delete listeners[listening.id];
  7787. delete listening.listeningTo[listening.objId];
  7788. }
  7789. }
  7790. }
  7791. // Update tail event if the list has any events. Otherwise, clean up.
  7792. if (remaining.length) {
  7793. events[name] = remaining;
  7794. } else {
  7795. delete events[name];
  7796. }
  7797. }
  7798. return events;
  7799. };
  7800. // Bind an event to only be triggered a single time. After the first time
  7801. // the callback is invoked, its listener will be removed. If multiple events
  7802. // are passed in using the space-separated syntax, the handler will fire
  7803. // once for each event, not once for a combination of all events.
  7804. Events.once = function(name, callback, context) {
  7805. // Map the event into a `{event: once}` object.
  7806. var events = eventsApi(onceMap, {}, name, callback, _.bind(this.off, this));
  7807. if (typeof name === 'string' && context == null) callback = void 0;
  7808. return this.on(events, callback, context);
  7809. };
  7810. // Inversion-of-control versions of `once`.
  7811. Events.listenToOnce = function(obj, name, callback) {
  7812. // Map the event into a `{event: once}` object.
  7813. var events = eventsApi(onceMap, {}, name, callback, _.bind(this.stopListening, this, obj));
  7814. return this.listenTo(obj, events);
  7815. };
  7816. // Reduces the event callbacks into a map of `{event: onceWrapper}`.
  7817. // `offer` unbinds the `onceWrapper` after it has been called.
  7818. var onceMap = function(map, name, callback, offer) {
  7819. if (callback) {
  7820. var once = map[name] = _.once(function() {
  7821. offer(name, once);
  7822. callback.apply(this, arguments);
  7823. });
  7824. once._callback = callback;
  7825. }
  7826. return map;
  7827. };
  7828. // Trigger one or many events, firing all bound callbacks. Callbacks are
  7829. // passed the same arguments as `trigger` is, apart from the event name
  7830. // (unless you're listening on `"all"`, which will cause your callback to
  7831. // receive the true name of the event as the first argument).
  7832. Events.trigger = function(name) {
  7833. if (!this._events) return this;
  7834. var length = Math.max(0, arguments.length - 1);
  7835. var args = Array(length);
  7836. for (var i = 0; i < length; i++) args[i] = arguments[i + 1];
  7837. eventsApi(triggerApi, this._events, name, void 0, args);
  7838. return this;
  7839. };
  7840. // Handles triggering the appropriate event callbacks.
  7841. var triggerApi = function(objEvents, name, callback, args) {
  7842. if (objEvents) {
  7843. var events = objEvents[name];
  7844. var allEvents = objEvents.all;
  7845. if (events && allEvents) allEvents = allEvents.slice();
  7846. if (events) triggerEvents(events, args);
  7847. if (allEvents) triggerEvents(allEvents, [name].concat(args));
  7848. }
  7849. return objEvents;
  7850. };
  7851. // A difficult-to-believe, but optimized internal dispatch function for
  7852. // triggering events. Tries to keep the usual cases speedy (most internal
  7853. // Backbone events have 3 arguments).
  7854. var triggerEvents = function(events, args) {
  7855. var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2];
  7856. switch (args.length) {
  7857. case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx); return;
  7858. case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return;
  7859. case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return;
  7860. case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return;
  7861. default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args); return;
  7862. }
  7863. };
  7864. // Aliases for backwards compatibility.
  7865. Events.bind = Events.on;
  7866. Events.unbind = Events.off;
  7867. // Allow the `Backbone` object to serve as a global event bus, for folks who
  7868. // want global "pubsub" in a convenient place.
  7869. _.extend(Backbone, Events);
  7870. // Backbone.Model
  7871. // --------------
  7872. // Backbone **Models** are the basic data object in the framework --
  7873. // frequently representing a row in a table in a database on your server.
  7874. // A discrete chunk of data and a bunch of useful, related methods for
  7875. // performing computations and transformations on that data.
  7876. // Create a new model with the specified attributes. A client id (`cid`)
  7877. // is automatically generated and assigned for you.
  7878. var Model = Backbone.Model = function(attributes, options) {
  7879. var attrs = attributes || {};
  7880. options || (options = {});
  7881. this.cid = _.uniqueId(this.cidPrefix);
  7882. this.attributes = {};
  7883. if (options.collection) this.collection = options.collection;
  7884. if (options.parse) attrs = this.parse(attrs, options) || {};
  7885. var defaults = _.result(this, 'defaults');
  7886. attrs = _.defaults(_.extend({}, defaults, attrs), defaults);
  7887. this.set(attrs, options);
  7888. this.changed = {};
  7889. this.initialize.apply(this, arguments);
  7890. };
  7891. // Attach all inheritable methods to the Model prototype.
  7892. _.extend(Model.prototype, Events, {
  7893. // A hash of attributes whose current and previous value differ.
  7894. changed: null,
  7895. // The value returned during the last failed validation.
  7896. validationError: null,
  7897. // The default name for the JSON `id` attribute is `"id"`. MongoDB and
  7898. // CouchDB users may want to set this to `"_id"`.
  7899. idAttribute: 'id',
  7900. // The prefix is used to create the client id which is used to identify models locally.
  7901. // You may want to override this if you're experiencing name clashes with model ids.
  7902. cidPrefix: 'c',
  7903. // Initialize is an empty function by default. Override it with your own
  7904. // initialization logic.
  7905. initialize: function(){},
  7906. // Return a copy of the model's `attributes` object.
  7907. toJSON: function(options) {
  7908. return _.clone(this.attributes);
  7909. },
  7910. // Proxy `Backbone.sync` by default -- but override this if you need
  7911. // custom syncing semantics for *this* particular model.
  7912. sync: function() {
  7913. return Backbone.sync.apply(this, arguments);
  7914. },
  7915. // Get the value of an attribute.
  7916. get: function(attr) {
  7917. return this.attributes[attr];
  7918. },
  7919. // Get the HTML-escaped value of an attribute.
  7920. escape: function(attr) {
  7921. return _.escape(this.get(attr));
  7922. },
  7923. // Returns `true` if the attribute contains a value that is not null
  7924. // or undefined.
  7925. has: function(attr) {
  7926. return this.get(attr) != null;
  7927. },
  7928. // Special-cased proxy to underscore's `_.matches` method.
  7929. matches: function(attrs) {
  7930. return !!_.iteratee(attrs, this)(this.attributes);
  7931. },
  7932. // Set a hash of model attributes on the object, firing `"change"`. This is
  7933. // the core primitive operation of a model, updating the data and notifying
  7934. // anyone who needs to know about the change in state. The heart of the beast.
  7935. set: function(key, val, options) {
  7936. if (key == null) return this;
  7937. // Handle both `"key", value` and `{key: value}` -style arguments.
  7938. var attrs;
  7939. if (typeof key === 'object') {
  7940. attrs = key;
  7941. options = val;
  7942. } else {
  7943. (attrs = {})[key] = val;
  7944. }
  7945. options || (options = {});
  7946. // Run validation.
  7947. if (!this._validate(attrs, options)) return false;
  7948. // Extract attributes and options.
  7949. var unset = options.unset;
  7950. var silent = options.silent;
  7951. var changes = [];
  7952. var changing = this._changing;
  7953. this._changing = true;
  7954. if (!changing) {
  7955. this._previousAttributes = _.clone(this.attributes);
  7956. this.changed = {};
  7957. }
  7958. var current = this.attributes;
  7959. var changed = this.changed;
  7960. var prev = this._previousAttributes;
  7961. // For each `set` attribute, update or delete the current value.
  7962. for (var attr in attrs) {
  7963. val = attrs[attr];
  7964. if (!_.isEqual(current[attr], val)) changes.push(attr);
  7965. if (!_.isEqual(prev[attr], val)) {
  7966. changed[attr] = val;
  7967. } else {
  7968. delete changed[attr];
  7969. }
  7970. unset ? delete current[attr] : current[attr] = val;
  7971. }
  7972. // Update the `id`.
  7973. if (this.idAttribute in attrs) this.id = this.get(this.idAttribute);
  7974. // Trigger all relevant attribute changes.
  7975. if (!silent) {
  7976. if (changes.length) this._pending = options;
  7977. for (var i = 0; i < changes.length; i++) {
  7978. this.trigger('change:' + changes[i], this, current[changes[i]], options);
  7979. }
  7980. }
  7981. // You might be wondering why there's a `while` loop here. Changes can
  7982. // be recursively nested within `"change"` events.
  7983. if (changing) return this;
  7984. if (!silent) {
  7985. while (this._pending) {
  7986. options = this._pending;
  7987. this._pending = false;
  7988. this.trigger('change', this, options);
  7989. }
  7990. }
  7991. this._pending = false;
  7992. this._changing = false;
  7993. return this;
  7994. },
  7995. // Remove an attribute from the model, firing `"change"`. `unset` is a noop
  7996. // if the attribute doesn't exist.
  7997. unset: function(attr, options) {
  7998. return this.set(attr, void 0, _.extend({}, options, {unset: true}));
  7999. },
  8000. // Clear all attributes on the model, firing `"change"`.
  8001. clear: function(options) {
  8002. var attrs = {};
  8003. for (var key in this.attributes) attrs[key] = void 0;
  8004. return this.set(attrs, _.extend({}, options, {unset: true}));
  8005. },
  8006. // Determine if the model has changed since the last `"change"` event.
  8007. // If you specify an attribute name, determine if that attribute has changed.
  8008. hasChanged: function(attr) {
  8009. if (attr == null) return !_.isEmpty(this.changed);
  8010. return _.has(this.changed, attr);
  8011. },
  8012. // Return an object containing all the attributes that have changed, or
  8013. // false if there are no changed attributes. Useful for determining what
  8014. // parts of a view need to be updated and/or what attributes need to be
  8015. // persisted to the server. Unset attributes will be set to undefined.
  8016. // You can also pass an attributes object to diff against the model,
  8017. // determining if there *would be* a change.
  8018. changedAttributes: function(diff) {
  8019. if (!diff) return this.hasChanged() ? _.clone(this.changed) : false;
  8020. var old = this._changing ? this._previousAttributes : this.attributes;
  8021. var changed = {};
  8022. for (var attr in diff) {
  8023. var val = diff[attr];
  8024. if (_.isEqual(old[attr], val)) continue;
  8025. changed[attr] = val;
  8026. }
  8027. return _.size(changed) ? changed : false;
  8028. },
  8029. // Get the previous value of an attribute, recorded at the time the last
  8030. // `"change"` event was fired.
  8031. previous: function(attr) {
  8032. if (attr == null || !this._previousAttributes) return null;
  8033. return this._previousAttributes[attr];
  8034. },
  8035. // Get all of the attributes of the model at the time of the previous
  8036. // `"change"` event.
  8037. previousAttributes: function() {
  8038. return _.clone(this._previousAttributes);
  8039. },
  8040. // Fetch the model from the server, merging the response with the model's
  8041. // local attributes. Any changed attributes will trigger a "change" event.
  8042. fetch: function(options) {
  8043. options = _.extend({parse: true}, options);
  8044. var model = this;
  8045. var success = options.success;
  8046. options.success = function(resp) {
  8047. var serverAttrs = options.parse ? model.parse(resp, options) : resp;
  8048. if (!model.set(serverAttrs, options)) return false;
  8049. if (success) success.call(options.context, model, resp, options);
  8050. model.trigger('sync', model, resp, options);
  8051. };
  8052. wrapError(this, options);
  8053. return this.sync('read', this, options);
  8054. },
  8055. // Set a hash of model attributes, and sync the model to the server.
  8056. // If the server returns an attributes hash that differs, the model's
  8057. // state will be `set` again.
  8058. save: function(key, val, options) {
  8059. // Handle both `"key", value` and `{key: value}` -style arguments.
  8060. var attrs;
  8061. if (key == null || typeof key === 'object') {
  8062. attrs = key;
  8063. options = val;
  8064. } else {
  8065. (attrs = {})[key] = val;
  8066. }
  8067. options = _.extend({validate: true, parse: true}, options);
  8068. var wait = options.wait;
  8069. // If we're not waiting and attributes exist, save acts as
  8070. // `set(attr).save(null, opts)` with validation. Otherwise, check if
  8071. // the model will be valid when the attributes, if any, are set.
  8072. if (attrs && !wait) {
  8073. if (!this.set(attrs, options)) return false;
  8074. } else if (!this._validate(attrs, options)) {
  8075. return false;
  8076. }
  8077. // After a successful server-side save, the client is (optionally)
  8078. // updated with the server-side state.
  8079. var model = this;
  8080. var success = options.success;
  8081. var attributes = this.attributes;
  8082. options.success = function(resp) {
  8083. // Ensure attributes are restored during synchronous saves.
  8084. model.attributes = attributes;
  8085. var serverAttrs = options.parse ? model.parse(resp, options) : resp;
  8086. if (wait) serverAttrs = _.extend({}, attrs, serverAttrs);
  8087. if (serverAttrs && !model.set(serverAttrs, options)) return false;
  8088. if (success) success.call(options.context, model, resp, options);
  8089. model.trigger('sync', model, resp, options);
  8090. };
  8091. wrapError(this, options);
  8092. // Set temporary attributes if `{wait: true}` to properly find new ids.
  8093. if (attrs && wait) this.attributes = _.extend({}, attributes, attrs);
  8094. var method = this.isNew() ? 'create' : (options.patch ? 'patch' : 'update');
  8095. if (method === 'patch' && !options.attrs) options.attrs = attrs;
  8096. var xhr = this.sync(method, this, options);
  8097. // Restore attributes.
  8098. this.attributes = attributes;
  8099. return xhr;
  8100. },
  8101. // Destroy this model on the server if it was already persisted.
  8102. // Optimistically removes the model from its collection, if it has one.
  8103. // If `wait: true` is passed, waits for the server to respond before removal.
  8104. destroy: function(options) {
  8105. options = options ? _.clone(options) : {};
  8106. var model = this;
  8107. var success = options.success;
  8108. var wait = options.wait;
  8109. var destroy = function() {
  8110. model.stopListening();
  8111. model.trigger('destroy', model, model.collection, options);
  8112. };
  8113. options.success = function(resp) {
  8114. if (wait) destroy();
  8115. if (success) success.call(options.context, model, resp, options);
  8116. if (!model.isNew()) model.trigger('sync', model, resp, options);
  8117. };
  8118. var xhr = false;
  8119. if (this.isNew()) {
  8120. _.defer(options.success);
  8121. } else {
  8122. wrapError(this, options);
  8123. xhr = this.sync('delete', this, options);
  8124. }
  8125. if (!wait) destroy();
  8126. return xhr;
  8127. },
  8128. // Default URL for the model's representation on the server -- if you're
  8129. // using Backbone's restful methods, override this to change the endpoint
  8130. // that will be called.
  8131. url: function() {
  8132. var base =
  8133. _.result(this, 'urlRoot') ||
  8134. _.result(this.collection, 'url') ||
  8135. urlError();
  8136. if (this.isNew()) return base;
  8137. var id = this.get(this.idAttribute);
  8138. return base.replace(/[^\/]$/, '$&/') + encodeURIComponent(id);
  8139. },
  8140. // **parse** converts a response into the hash of attributes to be `set` on
  8141. // the model. The default implementation is just to pass the response along.
  8142. parse: function(resp, options) {
  8143. return resp;
  8144. },
  8145. // Create a new model with identical attributes to this one.
  8146. clone: function() {
  8147. return new this.constructor(this.attributes);
  8148. },
  8149. // A model is new if it has never been saved to the server, and lacks an id.
  8150. isNew: function() {
  8151. return !this.has(this.idAttribute);
  8152. },
  8153. // Check if the model is currently in a valid state.
  8154. isValid: function(options) {
  8155. return this._validate({}, _.extend({}, options, {validate: true}));
  8156. },
  8157. // Run validation against the next complete set of model attributes,
  8158. // returning `true` if all is well. Otherwise, fire an `"invalid"` event.
  8159. _validate: function(attrs, options) {
  8160. if (!options.validate || !this.validate) return true;
  8161. attrs = _.extend({}, this.attributes, attrs);
  8162. var error = this.validationError = this.validate(attrs, options) || null;
  8163. if (!error) return true;
  8164. this.trigger('invalid', this, error, _.extend(options, {validationError: error}));
  8165. return false;
  8166. }
  8167. });
  8168. // Underscore methods that we want to implement on the Model, mapped to the
  8169. // number of arguments they take.
  8170. var modelMethods = {keys: 1, values: 1, pairs: 1, invert: 1, pick: 0,
  8171. omit: 0, chain: 1, isEmpty: 1};
  8172. // Mix in each Underscore method as a proxy to `Model#attributes`.
  8173. addUnderscoreMethods(Model, modelMethods, 'attributes');
  8174. // Backbone.Collection
  8175. // -------------------
  8176. // If models tend to represent a single row of data, a Backbone Collection is
  8177. // more analogous to a table full of data ... or a small slice or page of that
  8178. // table, or a collection of rows that belong together for a particular reason
  8179. // -- all of the messages in this particular folder, all of the documents
  8180. // belonging to this particular author, and so on. Collections maintain
  8181. // indexes of their models, both in order, and for lookup by `id`.
  8182. // Create a new **Collection**, perhaps to contain a specific type of `model`.
  8183. // If a `comparator` is specified, the Collection will maintain
  8184. // its models in sort order, as they're added and removed.
  8185. var Collection = Backbone.Collection = function(models, options) {
  8186. options || (options = {});
  8187. if (options.model) this.model = options.model;
  8188. if (options.comparator !== void 0) this.comparator = options.comparator;
  8189. this._reset();
  8190. this.initialize.apply(this, arguments);
  8191. if (models) this.reset(models, _.extend({silent: true}, options));
  8192. };
  8193. // Default options for `Collection#set`.
  8194. var setOptions = {add: true, remove: true, merge: true};
  8195. var addOptions = {add: true, remove: false};
  8196. // Splices `insert` into `array` at index `at`.
  8197. var splice = function(array, insert, at) {
  8198. at = Math.min(Math.max(at, 0), array.length);
  8199. var tail = Array(array.length - at);
  8200. var length = insert.length;
  8201. var i;
  8202. for (i = 0; i < tail.length; i++) tail[i] = array[i + at];
  8203. for (i = 0; i < length; i++) array[i + at] = insert[i];
  8204. for (i = 0; i < tail.length; i++) array[i + length + at] = tail[i];
  8205. };
  8206. // Define the Collection's inheritable methods.
  8207. _.extend(Collection.prototype, Events, {
  8208. // The default model for a collection is just a **Backbone.Model**.
  8209. // This should be overridden in most cases.
  8210. model: Model,
  8211. // Initialize is an empty function by default. Override it with your own
  8212. // initialization logic.
  8213. initialize: function(){},
  8214. // The JSON representation of a Collection is an array of the
  8215. // models' attributes.
  8216. toJSON: function(options) {
  8217. return this.map(function(model) { return model.toJSON(options); });
  8218. },
  8219. // Proxy `Backbone.sync` by default.
  8220. sync: function() {
  8221. return Backbone.sync.apply(this, arguments);
  8222. },
  8223. // Add a model, or list of models to the set. `models` may be Backbone
  8224. // Models or raw JavaScript objects to be converted to Models, or any
  8225. // combination of the two.
  8226. add: function(models, options) {
  8227. return this.set(models, _.extend({merge: false}, options, addOptions));
  8228. },
  8229. // Remove a model, or a list of models from the set.
  8230. remove: function(models, options) {
  8231. options = _.extend({}, options);
  8232. var singular = !_.isArray(models);
  8233. models = singular ? [models] : models.slice();
  8234. var removed = this._removeModels(models, options);
  8235. if (!options.silent && removed.length) {
  8236. options.changes = {added: [], merged: [], removed: removed};
  8237. this.trigger('update', this, options);
  8238. }
  8239. return singular ? removed[0] : removed;
  8240. },
  8241. // Update a collection by `set`-ing a new list of models, adding new ones,
  8242. // removing models that are no longer present, and merging models that
  8243. // already exist in the collection, as necessary. Similar to **Model#set**,
  8244. // the core operation for updating the data contained by the collection.
  8245. set: function(models, options) {
  8246. if (models == null) return;
  8247. options = _.extend({}, setOptions, options);
  8248. if (options.parse && !this._isModel(models)) {
  8249. models = this.parse(models, options) || [];
  8250. }
  8251. var singular = !_.isArray(models);
  8252. models = singular ? [models] : models.slice();
  8253. var at = options.at;
  8254. if (at != null) at = +at;
  8255. if (at > this.length) at = this.length;
  8256. if (at < 0) at += this.length + 1;
  8257. var set = [];
  8258. var toAdd = [];
  8259. var toMerge = [];
  8260. var toRemove = [];
  8261. var modelMap = {};
  8262. var add = options.add;
  8263. var merge = options.merge;
  8264. var remove = options.remove;
  8265. var sort = false;
  8266. var sortable = this.comparator && at == null && options.sort !== false;
  8267. var sortAttr = _.isString(this.comparator) ? this.comparator : null;
  8268. // Turn bare objects into model references, and prevent invalid models
  8269. // from being added.
  8270. var model, i;
  8271. for (i = 0; i < models.length; i++) {
  8272. model = models[i];
  8273. // If a duplicate is found, prevent it from being added and
  8274. // optionally merge it into the existing model.
  8275. var existing = this.get(model);
  8276. if (existing) {
  8277. if (merge && model !== existing) {
  8278. var attrs = this._isModel(model) ? model.attributes : model;
  8279. if (options.parse) attrs = existing.parse(attrs, options);
  8280. existing.set(attrs, options);
  8281. toMerge.push(existing);
  8282. if (sortable && !sort) sort = existing.hasChanged(sortAttr);
  8283. }
  8284. if (!modelMap[existing.cid]) {
  8285. modelMap[existing.cid] = true;
  8286. set.push(existing);
  8287. }
  8288. models[i] = existing;
  8289. // If this is a new, valid model, push it to the `toAdd` list.
  8290. } else if (add) {
  8291. model = models[i] = this._prepareModel(model, options);
  8292. if (model) {
  8293. toAdd.push(model);
  8294. this._addReference(model, options);
  8295. modelMap[model.cid] = true;
  8296. set.push(model);
  8297. }
  8298. }
  8299. }
  8300. // Remove stale models.
  8301. if (remove) {
  8302. for (i = 0; i < this.length; i++) {
  8303. model = this.models[i];
  8304. if (!modelMap[model.cid]) toRemove.push(model);
  8305. }
  8306. if (toRemove.length) this._removeModels(toRemove, options);
  8307. }
  8308. // See if sorting is needed, update `length` and splice in new models.
  8309. var orderChanged = false;
  8310. var replace = !sortable && add && remove;
  8311. if (set.length && replace) {
  8312. orderChanged = this.length !== set.length || _.some(this.models, function(m, index) {
  8313. return m !== set[index];
  8314. });
  8315. this.models.length = 0;
  8316. splice(this.models, set, 0);
  8317. this.length = this.models.length;
  8318. } else if (toAdd.length) {
  8319. if (sortable) sort = true;
  8320. splice(this.models, toAdd, at == null ? this.length : at);
  8321. this.length = this.models.length;
  8322. }
  8323. // Silently sort the collection if appropriate.
  8324. if (sort) this.sort({silent: true});
  8325. // Unless silenced, it's time to fire all appropriate add/sort/update events.
  8326. if (!options.silent) {
  8327. for (i = 0; i < toAdd.length; i++) {
  8328. if (at != null) options.index = at + i;
  8329. model = toAdd[i];
  8330. model.trigger('add', model, this, options);
  8331. }
  8332. if (sort || orderChanged) this.trigger('sort', this, options);
  8333. if (toAdd.length || toRemove.length || toMerge.length) {
  8334. options.changes = {
  8335. added: toAdd,
  8336. removed: toRemove,
  8337. merged: toMerge
  8338. };
  8339. this.trigger('update', this, options);
  8340. }
  8341. }
  8342. // Return the added (or merged) model (or models).
  8343. return singular ? models[0] : models;
  8344. },
  8345. // When you have more items than you want to add or remove individually,
  8346. // you can reset the entire set with a new list of models, without firing
  8347. // any granular `add` or `remove` events. Fires `reset` when finished.
  8348. // Useful for bulk operations and optimizations.
  8349. reset: function(models, options) {
  8350. options = options ? _.clone(options) : {};
  8351. for (var i = 0; i < this.models.length; i++) {
  8352. this._removeReference(this.models[i], options);
  8353. }
  8354. options.previousModels = this.models;
  8355. this._reset();
  8356. models = this.add(models, _.extend({silent: true}, options));
  8357. if (!options.silent) this.trigger('reset', this, options);
  8358. return models;
  8359. },
  8360. // Add a model to the end of the collection.
  8361. push: function(model, options) {
  8362. return this.add(model, _.extend({at: this.length}, options));
  8363. },
  8364. // Remove a model from the end of the collection.
  8365. pop: function(options) {
  8366. var model = this.at(this.length - 1);
  8367. return this.remove(model, options);
  8368. },
  8369. // Add a model to the beginning of the collection.
  8370. unshift: function(model, options) {
  8371. return this.add(model, _.extend({at: 0}, options));
  8372. },
  8373. // Remove a model from the beginning of the collection.
  8374. shift: function(options) {
  8375. var model = this.at(0);
  8376. return this.remove(model, options);
  8377. },
  8378. // Slice out a sub-array of models from the collection.
  8379. slice: function() {
  8380. return slice.apply(this.models, arguments);
  8381. },
  8382. // Get a model from the set by id, cid, model object with id or cid
  8383. // properties, or an attributes object that is transformed through modelId.
  8384. get: function(obj) {
  8385. if (obj == null) return void 0;
  8386. return this._byId[obj] ||
  8387. this._byId[this.modelId(obj.attributes || obj)] ||
  8388. obj.cid && this._byId[obj.cid];
  8389. },
  8390. // Returns `true` if the model is in the collection.
  8391. has: function(obj) {
  8392. return this.get(obj) != null;
  8393. },
  8394. // Get the model at the given index.
  8395. at: function(index) {
  8396. if (index < 0) index += this.length;
  8397. return this.models[index];
  8398. },
  8399. // Return models with matching attributes. Useful for simple cases of
  8400. // `filter`.
  8401. where: function(attrs, first) {
  8402. return this[first ? 'find' : 'filter'](attrs);
  8403. },
  8404. // Return the first model with matching attributes. Useful for simple cases
  8405. // of `find`.
  8406. findWhere: function(attrs) {
  8407. return this.where(attrs, true);
  8408. },
  8409. // Force the collection to re-sort itself. You don't need to call this under
  8410. // normal circumstances, as the set will maintain sort order as each item
  8411. // is added.
  8412. sort: function(options) {
  8413. var comparator = this.comparator;
  8414. if (!comparator) throw new Error('Cannot sort a set without a comparator');
  8415. options || (options = {});
  8416. var length = comparator.length;
  8417. if (_.isFunction(comparator)) comparator = _.bind(comparator, this);
  8418. // Run sort based on type of `comparator`.
  8419. if (length === 1 || _.isString(comparator)) {
  8420. this.models = this.sortBy(comparator);
  8421. } else {
  8422. this.models.sort(comparator);
  8423. }
  8424. if (!options.silent) this.trigger('sort', this, options);
  8425. return this;
  8426. },
  8427. // Pluck an attribute from each model in the collection.
  8428. pluck: function(attr) {
  8429. return this.map(attr + '');
  8430. },
  8431. // Fetch the default set of models for this collection, resetting the
  8432. // collection when they arrive. If `reset: true` is passed, the response
  8433. // data will be passed through the `reset` method instead of `set`.
  8434. fetch: function(options) {
  8435. options = _.extend({parse: true}, options);
  8436. var success = options.success;
  8437. var collection = this;
  8438. options.success = function(resp) {
  8439. var method = options.reset ? 'reset' : 'set';
  8440. collection[method](resp, options);
  8441. if (success) success.call(options.context, collection, resp, options);
  8442. collection.trigger('sync', collection, resp, options);
  8443. };
  8444. wrapError(this, options);
  8445. return this.sync('read', this, options);
  8446. },
  8447. // Create a new instance of a model in this collection. Add the model to the
  8448. // collection immediately, unless `wait: true` is passed, in which case we
  8449. // wait for the server to agree.
  8450. create: function(model, options) {
  8451. options = options ? _.clone(options) : {};
  8452. var wait = options.wait;
  8453. model = this._prepareModel(model, options);
  8454. if (!model) return false;
  8455. if (!wait) this.add(model, options);
  8456. var collection = this;
  8457. var success = options.success;
  8458. options.success = function(m, resp, callbackOpts) {
  8459. if (wait) collection.add(m, callbackOpts);
  8460. if (success) success.call(callbackOpts.context, m, resp, callbackOpts);
  8461. };
  8462. model.save(null, options);
  8463. return model;
  8464. },
  8465. // **parse** converts a response into a list of models to be added to the
  8466. // collection. The default implementation is just to pass it through.
  8467. parse: function(resp, options) {
  8468. return resp;
  8469. },
  8470. // Create a new collection with an identical list of models as this one.
  8471. clone: function() {
  8472. return new this.constructor(this.models, {
  8473. model: this.model,
  8474. comparator: this.comparator
  8475. });
  8476. },
  8477. // Define how to uniquely identify models in the collection.
  8478. modelId: function(attrs) {
  8479. return attrs[this.model.prototype.idAttribute || 'id'];
  8480. },
  8481. // Private method to reset all internal state. Called when the collection
  8482. // is first initialized or reset.
  8483. _reset: function() {
  8484. this.length = 0;
  8485. this.models = [];
  8486. this._byId = {};
  8487. },
  8488. // Prepare a hash of attributes (or other model) to be added to this
  8489. // collection.
  8490. _prepareModel: function(attrs, options) {
  8491. if (this._isModel(attrs)) {
  8492. if (!attrs.collection) attrs.collection = this;
  8493. return attrs;
  8494. }
  8495. options = options ? _.clone(options) : {};
  8496. options.collection = this;
  8497. var model = new this.model(attrs, options);
  8498. if (!model.validationError) return model;
  8499. this.trigger('invalid', this, model.validationError, options);
  8500. return false;
  8501. },
  8502. // Internal method called by both remove and set.
  8503. _removeModels: function(models, options) {
  8504. var removed = [];
  8505. for (var i = 0; i < models.length; i++) {
  8506. var model = this.get(models[i]);
  8507. if (!model) continue;
  8508. var index = this.indexOf(model);
  8509. this.models.splice(index, 1);
  8510. this.length--;
  8511. // Remove references before triggering 'remove' event to prevent an
  8512. // infinite loop. #3693
  8513. delete this._byId[model.cid];
  8514. var id = this.modelId(model.attributes);
  8515. if (id != null) delete this._byId[id];
  8516. if (!options.silent) {
  8517. options.index = index;
  8518. model.trigger('remove', model, this, options);
  8519. }
  8520. removed.push(model);
  8521. this._removeReference(model, options);
  8522. }
  8523. return removed;
  8524. },
  8525. // Method for checking whether an object should be considered a model for
  8526. // the purposes of adding to the collection.
  8527. _isModel: function(model) {
  8528. return model instanceof Model;
  8529. },
  8530. // Internal method to create a model's ties to a collection.
  8531. _addReference: function(model, options) {
  8532. this._byId[model.cid] = model;
  8533. var id = this.modelId(model.attributes);
  8534. if (id != null) this._byId[id] = model;
  8535. model.on('all', this._onModelEvent, this);
  8536. },
  8537. // Internal method to sever a model's ties to a collection.
  8538. _removeReference: function(model, options) {
  8539. delete this._byId[model.cid];
  8540. var id = this.modelId(model.attributes);
  8541. if (id != null) delete this._byId[id];
  8542. if (this === model.collection) delete model.collection;
  8543. model.off('all', this._onModelEvent, this);
  8544. },
  8545. // Internal method called every time a model in the set fires an event.
  8546. // Sets need to update their indexes when models change ids. All other
  8547. // events simply proxy through. "add" and "remove" events that originate
  8548. // in other collections are ignored.
  8549. _onModelEvent: function(event, model, collection, options) {
  8550. if (model) {
  8551. if ((event === 'add' || event === 'remove') && collection !== this) return;
  8552. if (event === 'destroy') this.remove(model, options);
  8553. if (event === 'change') {
  8554. var prevId = this.modelId(model.previousAttributes());
  8555. var id = this.modelId(model.attributes);
  8556. if (prevId !== id) {
  8557. if (prevId != null) delete this._byId[prevId];
  8558. if (id != null) this._byId[id] = model;
  8559. }
  8560. }
  8561. }
  8562. this.trigger.apply(this, arguments);
  8563. }
  8564. });
  8565. // Underscore methods that we want to implement on the Collection.
  8566. // 90% of the core usefulness of Backbone Collections is actually implemented
  8567. // right here:
  8568. var collectionMethods = {forEach: 3, each: 3, map: 3, collect: 3, reduce: 0,
  8569. foldl: 0, inject: 0, reduceRight: 0, foldr: 0, find: 3, detect: 3, filter: 3,
  8570. select: 3, reject: 3, every: 3, all: 3, some: 3, any: 3, include: 3, includes: 3,
  8571. contains: 3, invoke: 0, max: 3, min: 3, toArray: 1, size: 1, first: 3,
  8572. head: 3, take: 3, initial: 3, rest: 3, tail: 3, drop: 3, last: 3,
  8573. without: 0, difference: 0, indexOf: 3, shuffle: 1, lastIndexOf: 3,
  8574. isEmpty: 1, chain: 1, sample: 3, partition: 3, groupBy: 3, countBy: 3,
  8575. sortBy: 3, indexBy: 3, findIndex: 3, findLastIndex: 3};
  8576. // Mix in each Underscore method as a proxy to `Collection#models`.
  8577. addUnderscoreMethods(Collection, collectionMethods, 'models');
  8578. // Backbone.View
  8579. // -------------
  8580. // Backbone Views are almost more convention than they are actual code. A View
  8581. // is simply a JavaScript object that represents a logical chunk of UI in the
  8582. // DOM. This might be a single item, an entire list, a sidebar or panel, or
  8583. // even the surrounding frame which wraps your whole app. Defining a chunk of
  8584. // UI as a **View** allows you to define your DOM events declaratively, without
  8585. // having to worry about render order ... and makes it easy for the view to
  8586. // react to specific changes in the state of your models.
  8587. // Creating a Backbone.View creates its initial element outside of the DOM,
  8588. // if an existing element is not provided...
  8589. var View = Backbone.View = function(options) {
  8590. this.cid = _.uniqueId('view');
  8591. _.extend(this, _.pick(options, viewOptions));
  8592. this._ensureElement();
  8593. this.initialize.apply(this, arguments);
  8594. };
  8595. // Cached regex to split keys for `delegate`.
  8596. var delegateEventSplitter = /^(\S+)\s*(.*)$/;
  8597. // List of view options to be set as properties.
  8598. var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events'];
  8599. // Set up all inheritable **Backbone.View** properties and methods.
  8600. _.extend(View.prototype, Events, {
  8601. // The default `tagName` of a View's element is `"div"`.
  8602. tagName: 'div',
  8603. // jQuery delegate for element lookup, scoped to DOM elements within the
  8604. // current view. This should be preferred to global lookups where possible.
  8605. $: function(selector) {
  8606. return this.$el.find(selector);
  8607. },
  8608. // Initialize is an empty function by default. Override it with your own
  8609. // initialization logic.
  8610. initialize: function(){},
  8611. // **render** is the core function that your view should override, in order
  8612. // to populate its element (`this.el`), with the appropriate HTML. The
  8613. // convention is for **render** to always return `this`.
  8614. render: function() {
  8615. return this;
  8616. },
  8617. // Remove this view by taking the element out of the DOM, and removing any
  8618. // applicable Backbone.Events listeners.
  8619. remove: function() {
  8620. this._removeElement();
  8621. this.stopListening();
  8622. return this;
  8623. },
  8624. // Remove this view's element from the document and all event listeners
  8625. // attached to it. Exposed for subclasses using an alternative DOM
  8626. // manipulation API.
  8627. _removeElement: function() {
  8628. this.$el.remove();
  8629. },
  8630. // Change the view's element (`this.el` property) and re-delegate the
  8631. // view's events on the new element.
  8632. setElement: function(element) {
  8633. this.undelegateEvents();
  8634. this._setElement(element);
  8635. this.delegateEvents();
  8636. return this;
  8637. },
  8638. // Creates the `this.el` and `this.$el` references for this view using the
  8639. // given `el`. `el` can be a CSS selector or an HTML string, a jQuery
  8640. // context or an element. Subclasses can override this to utilize an
  8641. // alternative DOM manipulation API and are only required to set the
  8642. // `this.el` property.
  8643. _setElement: function(el) {
  8644. this.$el = el instanceof Backbone.$ ? el : Backbone.$(el);
  8645. this.el = this.$el[0];
  8646. },
  8647. // Set callbacks, where `this.events` is a hash of
  8648. //
  8649. // *{"event selector": "callback"}*
  8650. //
  8651. // {
  8652. // 'mousedown .title': 'edit',
  8653. // 'click .button': 'save',
  8654. // 'click .open': function(e) { ... }
  8655. // }
  8656. //
  8657. // pairs. Callbacks will be bound to the view, with `this` set properly.
  8658. // Uses event delegation for efficiency.
  8659. // Omitting the selector binds the event to `this.el`.
  8660. delegateEvents: function(events) {
  8661. events || (events = _.result(this, 'events'));
  8662. if (!events) return this;
  8663. this.undelegateEvents();
  8664. for (var key in events) {
  8665. var method = events[key];
  8666. if (!_.isFunction(method)) method = this[method];
  8667. if (!method) continue;
  8668. var match = key.match(delegateEventSplitter);
  8669. this.delegate(match[1], match[2], _.bind(method, this));
  8670. }
  8671. return this;
  8672. },
  8673. // Add a single event listener to the view's element (or a child element
  8674. // using `selector`). This only works for delegate-able events: not `focus`,
  8675. // `blur`, and not `change`, `submit`, and `reset` in Internet Explorer.
  8676. delegate: function(eventName, selector, listener) {
  8677. this.$el.on(eventName + '.delegateEvents' + this.cid, selector, listener);
  8678. return this;
  8679. },
  8680. // Clears all callbacks previously bound to the view by `delegateEvents`.
  8681. // You usually don't need to use this, but may wish to if you have multiple
  8682. // Backbone views attached to the same DOM element.
  8683. undelegateEvents: function() {
  8684. if (this.$el) this.$el.off('.delegateEvents' + this.cid);
  8685. return this;
  8686. },
  8687. // A finer-grained `undelegateEvents` for removing a single delegated event.
  8688. // `selector` and `listener` are both optional.
  8689. undelegate: function(eventName, selector, listener) {
  8690. this.$el.off(eventName + '.delegateEvents' + this.cid, selector, listener);
  8691. return this;
  8692. },
  8693. // Produces a DOM element to be assigned to your view. Exposed for
  8694. // subclasses using an alternative DOM manipulation API.
  8695. _createElement: function(tagName) {
  8696. return document.createElement(tagName);
  8697. },
  8698. // Ensure that the View has a DOM element to render into.
  8699. // If `this.el` is a string, pass it through `$()`, take the first
  8700. // matching element, and re-assign it to `el`. Otherwise, create
  8701. // an element from the `id`, `className` and `tagName` properties.
  8702. _ensureElement: function() {
  8703. if (!this.el) {
  8704. var attrs = _.extend({}, _.result(this, 'attributes'));
  8705. if (this.id) attrs.id = _.result(this, 'id');
  8706. if (this.className) attrs['class'] = _.result(this, 'className');
  8707. this.setElement(this._createElement(_.result(this, 'tagName')));
  8708. this._setAttributes(attrs);
  8709. } else {
  8710. this.setElement(_.result(this, 'el'));
  8711. }
  8712. },
  8713. // Set attributes from a hash on this view's element. Exposed for
  8714. // subclasses using an alternative DOM manipulation API.
  8715. _setAttributes: function(attributes) {
  8716. this.$el.attr(attributes);
  8717. }
  8718. });
  8719. // Backbone.sync
  8720. // -------------
  8721. // Override this function to change the manner in which Backbone persists
  8722. // models to the server. You will be passed the type of request, and the
  8723. // model in question. By default, makes a RESTful Ajax request
  8724. // to the model's `url()`. Some possible customizations could be:
  8725. //
  8726. // * Use `setTimeout` to batch rapid-fire updates into a single request.
  8727. // * Send up the models as XML instead of JSON.
  8728. // * Persist models via WebSockets instead of Ajax.
  8729. //
  8730. // Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests
  8731. // as `POST`, with a `_method` parameter containing the true HTTP method,
  8732. // as well as all requests with the body as `application/x-www-form-urlencoded`
  8733. // instead of `application/json` with the model in a param named `model`.
  8734. // Useful when interfacing with server-side languages like **PHP** that make
  8735. // it difficult to read the body of `PUT` requests.
  8736. Backbone.sync = function(method, model, options) {
  8737. var type = methodMap[method];
  8738. // Default options, unless specified.
  8739. _.defaults(options || (options = {}), {
  8740. emulateHTTP: Backbone.emulateHTTP,
  8741. emulateJSON: Backbone.emulateJSON
  8742. });
  8743. // Default JSON-request options.
  8744. var params = {type: type, dataType: 'json'};
  8745. // Ensure that we have a URL.
  8746. if (!options.url) {
  8747. params.url = _.result(model, 'url') || urlError();
  8748. }
  8749. // Ensure that we have the appropriate request data.
  8750. if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) {
  8751. params.contentType = 'application/json';
  8752. params.data = JSON.stringify(options.attrs || model.toJSON(options));
  8753. }
  8754. // For older servers, emulate JSON by encoding the request into an HTML-form.
  8755. if (options.emulateJSON) {
  8756. params.contentType = 'application/x-www-form-urlencoded';
  8757. params.data = params.data ? {model: params.data} : {};
  8758. }
  8759. // For older servers, emulate HTTP by mimicking the HTTP method with `_method`
  8760. // And an `X-HTTP-Method-Override` header.
  8761. if (options.emulateHTTP && (type === 'PUT' || type === 'DELETE' || type === 'PATCH')) {
  8762. params.type = 'POST';
  8763. if (options.emulateJSON) params.data._method = type;
  8764. var beforeSend = options.beforeSend;
  8765. options.beforeSend = function(xhr) {
  8766. xhr.setRequestHeader('X-HTTP-Method-Override', type);
  8767. if (beforeSend) return beforeSend.apply(this, arguments);
  8768. };
  8769. }
  8770. // Don't process data on a non-GET request.
  8771. if (params.type !== 'GET' && !options.emulateJSON) {
  8772. params.processData = false;
  8773. }
  8774. // Pass along `textStatus` and `errorThrown` from jQuery.
  8775. var error = options.error;
  8776. options.error = function(xhr, textStatus, errorThrown) {
  8777. options.textStatus = textStatus;
  8778. options.errorThrown = errorThrown;
  8779. if (error) error.call(options.context, xhr, textStatus, errorThrown);
  8780. };
  8781. // Make the request, allowing the user to override any Ajax options.
  8782. var xhr = options.xhr = Backbone.ajax(_.extend(params, options));
  8783. model.trigger('request', model, xhr, options);
  8784. return xhr;
  8785. };
  8786. // Map from CRUD to HTTP for our default `Backbone.sync` implementation.
  8787. var methodMap = {
  8788. 'create': 'POST',
  8789. 'update': 'PUT',
  8790. 'patch': 'PATCH',
  8791. 'delete': 'DELETE',
  8792. 'read': 'GET'
  8793. };
  8794. // Set the default implementation of `Backbone.ajax` to proxy through to `$`.
  8795. // Override this if you'd like to use a different library.
  8796. Backbone.ajax = function() {
  8797. return Backbone.$.ajax.apply(Backbone.$, arguments);
  8798. };
  8799. // Backbone.Router
  8800. // ---------------
  8801. // Routers map faux-URLs to actions, and fire events when routes are
  8802. // matched. Creating a new one sets its `routes` hash, if not set statically.
  8803. var Router = Backbone.Router = function(options) {
  8804. options || (options = {});
  8805. if (options.routes) this.routes = options.routes;
  8806. this._bindRoutes();
  8807. this.initialize.apply(this, arguments);
  8808. };
  8809. // Cached regular expressions for matching named param parts and splatted
  8810. // parts of route strings.
  8811. var optionalParam = /\((.*?)\)/g;
  8812. var namedParam = /(\(\?)?:\w+/g;
  8813. var splatParam = /\*\w+/g;
  8814. var escapeRegExp = /[\-{}\[\]+?.,\\\^$|#\s]/g;
  8815. // Set up all inheritable **Backbone.Router** properties and methods.
  8816. _.extend(Router.prototype, Events, {
  8817. // Initialize is an empty function by default. Override it with your own
  8818. // initialization logic.
  8819. initialize: function(){},
  8820. // Manually bind a single named route to a callback. For example:
  8821. //
  8822. // this.route('search/:query/p:num', 'search', function(query, num) {
  8823. // ...
  8824. // });
  8825. //
  8826. route: function(route, name, callback) {
  8827. if (!_.isRegExp(route)) route = this._routeToRegExp(route);
  8828. if (_.isFunction(name)) {
  8829. callback = name;
  8830. name = '';
  8831. }
  8832. if (!callback) callback = this[name];
  8833. var router = this;
  8834. Backbone.history.route(route, function(fragment) {
  8835. var args = router._extractParameters(route, fragment);
  8836. if (router.execute(callback, args, name) !== false) {
  8837. router.trigger.apply(router, ['route:' + name].concat(args));
  8838. router.trigger('route', name, args);
  8839. Backbone.history.trigger('route', router, name, args);
  8840. }
  8841. });
  8842. return this;
  8843. },
  8844. // Execute a route handler with the provided parameters. This is an
  8845. // excellent place to do pre-route setup or post-route cleanup.
  8846. execute: function(callback, args, name) {
  8847. if (callback) callback.apply(this, args);
  8848. },
  8849. // Simple proxy to `Backbone.history` to save a fragment into the history.
  8850. navigate: function(fragment, options) {
  8851. Backbone.history.navigate(fragment, options);
  8852. return this;
  8853. },
  8854. // Bind all defined routes to `Backbone.history`. We have to reverse the
  8855. // order of the routes here to support behavior where the most general
  8856. // routes can be defined at the bottom of the route map.
  8857. _bindRoutes: function() {
  8858. if (!this.routes) return;
  8859. this.routes = _.result(this, 'routes');
  8860. var route, routes = _.keys(this.routes);
  8861. while ((route = routes.pop()) != null) {
  8862. this.route(route, this.routes[route]);
  8863. }
  8864. },
  8865. // Convert a route string into a regular expression, suitable for matching
  8866. // against the current location hash.
  8867. _routeToRegExp: function(route) {
  8868. route = route.replace(escapeRegExp, '\\$&')
  8869. .replace(optionalParam, '(?:$1)?')
  8870. .replace(namedParam, function(match, optional) {
  8871. return optional ? match : '([^/?]+)';
  8872. })
  8873. .replace(splatParam, '([^?]*?)');
  8874. return new RegExp('^' + route + '(?:\\?([\\s\\S]*))?$');
  8875. },
  8876. // Given a route, and a URL fragment that it matches, return the array of
  8877. // extracted decoded parameters. Empty or unmatched parameters will be
  8878. // treated as `null` to normalize cross-browser behavior.
  8879. _extractParameters: function(route, fragment) {
  8880. var params = route.exec(fragment).slice(1);
  8881. return _.map(params, function(param, i) {
  8882. // Don't decode the search params.
  8883. if (i === params.length - 1) return param || null;
  8884. return param ? decodeURIComponent(param) : null;
  8885. });
  8886. }
  8887. });
  8888. // Backbone.History
  8889. // ----------------
  8890. // Handles cross-browser history management, based on either
  8891. // [pushState](http://diveintohtml5.info/history.html) and real URLs, or
  8892. // [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange)
  8893. // and URL fragments. If the browser supports neither (old IE, natch),
  8894. // falls back to polling.
  8895. var History = Backbone.History = function() {
  8896. this.handlers = [];
  8897. this.checkUrl = _.bind(this.checkUrl, this);
  8898. // Ensure that `History` can be used outside of the browser.
  8899. if (typeof window !== 'undefined') {
  8900. this.location = window.location;
  8901. this.history = window.history;
  8902. }
  8903. };
  8904. // Cached regex for stripping a leading hash/slash and trailing space.
  8905. var routeStripper = /^[#\/]|\s+$/g;
  8906. // Cached regex for stripping leading and trailing slashes.
  8907. var rootStripper = /^\/+|\/+$/g;
  8908. // Cached regex for stripping urls of hash.
  8909. var pathStripper = /#.*$/;
  8910. // Has the history handling already been started?
  8911. History.started = false;
  8912. // Set up all inheritable **Backbone.History** properties and methods.
  8913. _.extend(History.prototype, Events, {
  8914. // The default interval to poll for hash changes, if necessary, is
  8915. // twenty times a second.
  8916. interval: 50,
  8917. // Are we at the app root?
  8918. atRoot: function() {
  8919. var path = this.location.pathname.replace(/[^\/]$/, '$&/');
  8920. return path === this.root && !this.getSearch();
  8921. },
  8922. // Does the pathname match the root?
  8923. matchRoot: function() {
  8924. var path = this.decodeFragment(this.location.pathname);
  8925. var rootPath = path.slice(0, this.root.length - 1) + '/';
  8926. return rootPath === this.root;
  8927. },
  8928. // Unicode characters in `location.pathname` are percent encoded so they're
  8929. // decoded for comparison. `%25` should not be decoded since it may be part
  8930. // of an encoded parameter.
  8931. decodeFragment: function(fragment) {
  8932. return decodeURI(fragment.replace(/%25/g, '%2525'));
  8933. },
  8934. // In IE6, the hash fragment and search params are incorrect if the
  8935. // fragment contains `?`.
  8936. getSearch: function() {
  8937. var match = this.location.href.replace(/#.*/, '').match(/\?.+/);
  8938. return match ? match[0] : '';
  8939. },
  8940. // Gets the true hash value. Cannot use location.hash directly due to bug
  8941. // in Firefox where location.hash will always be decoded.
  8942. getHash: function(window) {
  8943. var match = (window || this).location.href.match(/#(.*)$/);
  8944. return match ? match[1] : '';
  8945. },
  8946. // Get the pathname and search params, without the root.
  8947. getPath: function() {
  8948. var path = this.decodeFragment(
  8949. this.location.pathname + this.getSearch()
  8950. ).slice(this.root.length - 1);
  8951. return path.charAt(0) === '/' ? path.slice(1) : path;
  8952. },
  8953. // Get the cross-browser normalized URL fragment from the path or hash.
  8954. getFragment: function(fragment) {
  8955. if (fragment == null) {
  8956. if (this._usePushState || !this._wantsHashChange) {
  8957. fragment = this.getPath();
  8958. } else {
  8959. fragment = this.getHash();
  8960. }
  8961. }
  8962. return fragment.replace(routeStripper, '');
  8963. },
  8964. // Start the hash change handling, returning `true` if the current URL matches
  8965. // an existing route, and `false` otherwise.
  8966. start: function(options) {
  8967. if (History.started) throw new Error('Backbone.history has already been started');
  8968. History.started = true;
  8969. // Figure out the initial configuration. Do we need an iframe?
  8970. // Is pushState desired ... is it available?
  8971. this.options = _.extend({root: '/'}, this.options, options);
  8972. this.root = this.options.root;
  8973. this._wantsHashChange = this.options.hashChange !== false;
  8974. this._hasHashChange = 'onhashchange' in window && (document.documentMode === void 0 || document.documentMode > 7);
  8975. this._useHashChange = this._wantsHashChange && this._hasHashChange;
  8976. this._wantsPushState = !!this.options.pushState;
  8977. this._hasPushState = !!(this.history && this.history.pushState);
  8978. this._usePushState = this._wantsPushState && this._hasPushState;
  8979. this.fragment = this.getFragment();
  8980. // Normalize root to always include a leading and trailing slash.
  8981. this.root = ('/' + this.root + '/').replace(rootStripper, '/');
  8982. // Transition from hashChange to pushState or vice versa if both are
  8983. // requested.
  8984. if (this._wantsHashChange && this._wantsPushState) {
  8985. // If we've started off with a route from a `pushState`-enabled
  8986. // browser, but we're currently in a browser that doesn't support it...
  8987. if (!this._hasPushState && !this.atRoot()) {
  8988. var rootPath = this.root.slice(0, -1) || '/';
  8989. this.location.replace(rootPath + '#' + this.getPath());
  8990. // Return immediately as browser will do redirect to new url
  8991. return true;
  8992. // Or if we've started out with a hash-based route, but we're currently
  8993. // in a browser where it could be `pushState`-based instead...
  8994. } else if (this._hasPushState && this.atRoot()) {
  8995. this.navigate(this.getHash(), {replace: true});
  8996. }
  8997. }
  8998. // Proxy an iframe to handle location events if the browser doesn't
  8999. // support the `hashchange` event, HTML5 history, or the user wants
  9000. // `hashChange` but not `pushState`.
  9001. if (!this._hasHashChange && this._wantsHashChange && !this._usePushState) {
  9002. this.iframe = document.createElement('iframe');
  9003. this.iframe.src = 'javascript:0';
  9004. this.iframe.style.display = 'none';
  9005. this.iframe.tabIndex = -1;
  9006. var body = document.body;
  9007. // Using `appendChild` will throw on IE < 9 if the document is not ready.
  9008. var iWindow = body.insertBefore(this.iframe, body.firstChild).contentWindow;
  9009. iWindow.document.open();
  9010. iWindow.document.close();
  9011. iWindow.location.hash = '#' + this.fragment;
  9012. }
  9013. // Add a cross-platform `addEventListener` shim for older browsers.
  9014. var addEventListener = window.addEventListener || function(eventName, listener) {
  9015. return attachEvent('on' + eventName, listener);
  9016. };
  9017. // Depending on whether we're using pushState or hashes, and whether
  9018. // 'onhashchange' is supported, determine how we check the URL state.
  9019. if (this._usePushState) {
  9020. addEventListener('popstate', this.checkUrl, false);
  9021. } else if (this._useHashChange && !this.iframe) {
  9022. addEventListener('hashchange', this.checkUrl, false);
  9023. } else if (this._wantsHashChange) {
  9024. this._checkUrlInterval = setInterval(this.checkUrl, this.interval);
  9025. }
  9026. if (!this.options.silent) return this.loadUrl();
  9027. },
  9028. // Disable Backbone.history, perhaps temporarily. Not useful in a real app,
  9029. // but possibly useful for unit testing Routers.
  9030. stop: function() {
  9031. // Add a cross-platform `removeEventListener` shim for older browsers.
  9032. var removeEventListener = window.removeEventListener || function(eventName, listener) {
  9033. return detachEvent('on' + eventName, listener);
  9034. };
  9035. // Remove window listeners.
  9036. if (this._usePushState) {
  9037. removeEventListener('popstate', this.checkUrl, false);
  9038. } else if (this._useHashChange && !this.iframe) {
  9039. removeEventListener('hashchange', this.checkUrl, false);
  9040. }
  9041. // Clean up the iframe if necessary.
  9042. if (this.iframe) {
  9043. document.body.removeChild(this.iframe);
  9044. this.iframe = null;
  9045. }
  9046. // Some environments will throw when clearing an undefined interval.
  9047. if (this._checkUrlInterval) clearInterval(this._checkUrlInterval);
  9048. History.started = false;
  9049. },
  9050. // Add a route to be tested when the fragment changes. Routes added later
  9051. // may override previous routes.
  9052. route: function(route, callback) {
  9053. this.handlers.unshift({route: route, callback: callback});
  9054. },
  9055. // Checks the current URL to see if it has changed, and if it has,
  9056. // calls `loadUrl`, normalizing across the hidden iframe.
  9057. checkUrl: function(e) {
  9058. var current = this.getFragment();
  9059. // If the user pressed the back button, the iframe's hash will have
  9060. // changed and we should use that for comparison.
  9061. if (current === this.fragment && this.iframe) {
  9062. current = this.getHash(this.iframe.contentWindow);
  9063. }
  9064. if (current === this.fragment) return false;
  9065. if (this.iframe) this.navigate(current);
  9066. this.loadUrl();
  9067. },
  9068. // Attempt to load the current URL fragment. If a route succeeds with a
  9069. // match, returns `true`. If no defined routes matches the fragment,
  9070. // returns `false`.
  9071. loadUrl: function(fragment) {
  9072. // If the root doesn't match, no routes can match either.
  9073. if (!this.matchRoot()) return false;
  9074. fragment = this.fragment = this.getFragment(fragment);
  9075. return _.some(this.handlers, function(handler) {
  9076. if (handler.route.test(fragment)) {
  9077. handler.callback(fragment);
  9078. return true;
  9079. }
  9080. });
  9081. },
  9082. // Save a fragment into the hash history, or replace the URL state if the
  9083. // 'replace' option is passed. You are responsible for properly URL-encoding
  9084. // the fragment in advance.
  9085. //
  9086. // The options object can contain `trigger: true` if you wish to have the
  9087. // route callback be fired (not usually desirable), or `replace: true`, if
  9088. // you wish to modify the current URL without adding an entry to the history.
  9089. navigate: function(fragment, options) {
  9090. if (!History.started) return false;
  9091. if (!options || options === true) options = {trigger: !!options};
  9092. // Normalize the fragment.
  9093. fragment = this.getFragment(fragment || '');
  9094. // Don't include a trailing slash on the root.
  9095. var rootPath = this.root;
  9096. if (fragment === '' || fragment.charAt(0) === '?') {
  9097. rootPath = rootPath.slice(0, -1) || '/';
  9098. }
  9099. var url = rootPath + fragment;
  9100. // Strip the hash and decode for matching.
  9101. fragment = this.decodeFragment(fragment.replace(pathStripper, ''));
  9102. if (this.fragment === fragment) return;
  9103. this.fragment = fragment;
  9104. // If pushState is available, we use it to set the fragment as a real URL.
  9105. if (this._usePushState) {
  9106. this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url);
  9107. // If hash changes haven't been explicitly disabled, update the hash
  9108. // fragment to store history.
  9109. } else if (this._wantsHashChange) {
  9110. this._updateHash(this.location, fragment, options.replace);
  9111. if (this.iframe && fragment !== this.getHash(this.iframe.contentWindow)) {
  9112. var iWindow = this.iframe.contentWindow;
  9113. // Opening and closing the iframe tricks IE7 and earlier to push a
  9114. // history entry on hash-tag change. When replace is true, we don't
  9115. // want this.
  9116. if (!options.replace) {
  9117. iWindow.document.open();
  9118. iWindow.document.close();
  9119. }
  9120. this._updateHash(iWindow.location, fragment, options.replace);
  9121. }
  9122. // If you've told us that you explicitly don't want fallback hashchange-
  9123. // based history, then `navigate` becomes a page refresh.
  9124. } else {
  9125. return this.location.assign(url);
  9126. }
  9127. if (options.trigger) return this.loadUrl(fragment);
  9128. },
  9129. // Update the hash location, either replacing the current entry, or adding
  9130. // a new one to the browser history.
  9131. _updateHash: function(location, fragment, replace) {
  9132. if (replace) {
  9133. var href = location.href.replace(/(javascript:|#).*$/, '');
  9134. location.replace(href + '#' + fragment);
  9135. } else {
  9136. // Some browsers require that `hash` contains a leading #.
  9137. location.hash = '#' + fragment;
  9138. }
  9139. }
  9140. });
  9141. // Create the default Backbone.history.
  9142. Backbone.history = new History;
  9143. // Helpers
  9144. // -------
  9145. // Helper function to correctly set up the prototype chain for subclasses.
  9146. // Similar to `goog.inherits`, but uses a hash of prototype properties and
  9147. // class properties to be extended.
  9148. var extend = function(protoProps, staticProps) {
  9149. var parent = this;
  9150. var child;
  9151. // The constructor function for the new subclass is either defined by you
  9152. // (the "constructor" property in your `extend` definition), or defaulted
  9153. // by us to simply call the parent constructor.
  9154. if (protoProps && _.has(protoProps, 'constructor')) {
  9155. child = protoProps.constructor;
  9156. } else {
  9157. child = function(){ return parent.apply(this, arguments); };
  9158. }
  9159. // Add static properties to the constructor function, if supplied.
  9160. _.extend(child, parent, staticProps);
  9161. // Set the prototype chain to inherit from `parent`, without calling
  9162. // `parent`'s constructor function and add the prototype properties.
  9163. child.prototype = _.create(parent.prototype, protoProps);
  9164. child.prototype.constructor = child;
  9165. // Set a convenience property in case the parent's prototype is needed
  9166. // later.
  9167. child.__super__ = parent.prototype;
  9168. return child;
  9169. };
  9170. // Set up inheritance for the model, collection, router, view and history.
  9171. Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend;
  9172. // Throw an error when a URL is needed, and none is supplied.
  9173. var urlError = function() {
  9174. throw new Error('A "url" property or function must be specified');
  9175. };
  9176. // Wrap an optional error callback with a fallback error event.
  9177. var wrapError = function(model, options) {
  9178. var error = options.error;
  9179. options.error = function(resp) {
  9180. if (error) error.call(options.context, model, resp, options);
  9181. model.trigger('error', model, resp, options);
  9182. };
  9183. };
  9184. return Backbone;
  9185. });
  9186. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  9187. /***/ }),
  9188. /***/ "./node_modules/bootstrap.native/dist/bootstrap-native-v4.js":
  9189. /*!*******************************************************************!*\
  9190. !*** ./node_modules/bootstrap.native/dist/bootstrap-native-v4.js ***!
  9191. \*******************************************************************/
  9192. /*! no static exports found */
  9193. /***/ (function(module, exports, __webpack_require__) {
  9194. /* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Native Javascript for Bootstrap 4 v2.0.23 | © dnp_theme | MIT-License
  9195. (function (root, factory) {
  9196. if (true) {
  9197. // AMD support:
  9198. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  9199. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  9200. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  9201. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  9202. } else { var bsn; }
  9203. }(this, function () {
  9204. /* Native Javascript for Bootstrap 4 | Internal Utility Functions
  9205. ----------------------------------------------------------------*/
  9206. "use strict";
  9207. // globals
  9208. var globalObject = typeof global !== 'undefined' ? global : this||window,
  9209. DOC = document, HTML = DOC.documentElement, body = 'body', // allow the library to be used in <head>
  9210. // Native Javascript for Bootstrap Global Object
  9211. BSN = globalObject.BSN = {},
  9212. supports = BSN.supports = [],
  9213. // function toggle attributes
  9214. dataToggle = 'data-toggle',
  9215. dataDismiss = 'data-dismiss',
  9216. dataSpy = 'data-spy',
  9217. dataRide = 'data-ride',
  9218. // components
  9219. stringAlert = 'Alert',
  9220. stringButton = 'Button',
  9221. stringCarousel = 'Carousel',
  9222. stringCollapse = 'Collapse',
  9223. stringDropdown = 'Dropdown',
  9224. stringModal = 'Modal',
  9225. stringPopover = 'Popover',
  9226. stringScrollSpy = 'ScrollSpy',
  9227. stringTab = 'Tab',
  9228. stringTooltip = 'Tooltip',
  9229. // options DATA API
  9230. databackdrop = 'data-backdrop',
  9231. dataKeyboard = 'data-keyboard',
  9232. dataTarget = 'data-target',
  9233. dataInterval = 'data-interval',
  9234. dataHeight = 'data-height',
  9235. dataPause = 'data-pause',
  9236. dataTitle = 'data-title',
  9237. dataOriginalTitle = 'data-original-title',
  9238. dataOriginalText = 'data-original-text',
  9239. dataDismissible = 'data-dismissible',
  9240. dataTrigger = 'data-trigger',
  9241. dataAnimation = 'data-animation',
  9242. dataContainer = 'data-container',
  9243. dataPlacement = 'data-placement',
  9244. dataDelay = 'data-delay',
  9245. dataOffsetTop = 'data-offset-top',
  9246. dataOffsetBottom = 'data-offset-bottom',
  9247. // option keys
  9248. backdrop = 'backdrop', keyboard = 'keyboard', delay = 'delay',
  9249. content = 'content', target = 'target',
  9250. interval = 'interval', pause = 'pause', animation = 'animation',
  9251. placement = 'placement', container = 'container',
  9252. // box model
  9253. offsetTop = 'offsetTop', offsetBottom = 'offsetBottom',
  9254. offsetLeft = 'offsetLeft',
  9255. scrollTop = 'scrollTop', scrollLeft = 'scrollLeft',
  9256. clientWidth = 'clientWidth', clientHeight = 'clientHeight',
  9257. offsetWidth = 'offsetWidth', offsetHeight = 'offsetHeight',
  9258. innerWidth = 'innerWidth', innerHeight = 'innerHeight',
  9259. scrollHeight = 'scrollHeight', height = 'height',
  9260. // aria
  9261. ariaExpanded = 'aria-expanded',
  9262. ariaHidden = 'aria-hidden',
  9263. // event names
  9264. clickEvent = 'click',
  9265. hoverEvent = 'hover',
  9266. keydownEvent = 'keydown',
  9267. keyupEvent = 'keyup',
  9268. resizeEvent = 'resize',
  9269. scrollEvent = 'scroll',
  9270. // originalEvents
  9271. showEvent = 'show',
  9272. shownEvent = 'shown',
  9273. hideEvent = 'hide',
  9274. hiddenEvent = 'hidden',
  9275. closeEvent = 'close',
  9276. closedEvent = 'closed',
  9277. slidEvent = 'slid',
  9278. slideEvent = 'slide',
  9279. changeEvent = 'change',
  9280. // other
  9281. getAttribute = 'getAttribute',
  9282. setAttribute = 'setAttribute',
  9283. hasAttribute = 'hasAttribute',
  9284. createElement = 'createElement',
  9285. appendChild = 'appendChild',
  9286. innerHTML = 'innerHTML',
  9287. getElementsByTagName = 'getElementsByTagName',
  9288. preventDefault = 'preventDefault',
  9289. getBoundingClientRect = 'getBoundingClientRect',
  9290. querySelectorAll = 'querySelectorAll',
  9291. getElementsByCLASSNAME = 'getElementsByClassName',
  9292. getComputedStyle = 'getComputedStyle',
  9293. indexOf = 'indexOf',
  9294. parentNode = 'parentNode',
  9295. length = 'length',
  9296. toLowerCase = 'toLowerCase',
  9297. Transition = 'Transition',
  9298. Duration = 'Duration',
  9299. Webkit = 'Webkit',
  9300. style = 'style',
  9301. push = 'push',
  9302. tabindex = 'tabindex',
  9303. contains = 'contains',
  9304. active = 'active',
  9305. showClass = 'show',
  9306. collapsing = 'collapsing',
  9307. disabled = 'disabled',
  9308. loading = 'loading',
  9309. left = 'left',
  9310. right = 'right',
  9311. top = 'top',
  9312. bottom = 'bottom',
  9313. // tooltip / popover
  9314. mouseHover = ('onmouseleave' in DOC) ? [ 'mouseenter', 'mouseleave'] : [ 'mouseover', 'mouseout' ],
  9315. tipPositions = /\b(top|bottom|left|right)+/,
  9316. // modal
  9317. modalOverlay = 0,
  9318. fixedTop = 'fixed-top',
  9319. fixedBottom = 'fixed-bottom',
  9320. // transitionEnd since 2.0.4
  9321. supportTransitions = Webkit+Transition in HTML[style] || Transition[toLowerCase]() in HTML[style],
  9322. transitionEndEvent = Webkit+Transition in HTML[style] ? Webkit[toLowerCase]()+Transition+'End' : Transition[toLowerCase]()+'end',
  9323. transitionDuration = Webkit+Duration in HTML[style] ? Webkit[toLowerCase]()+Transition+Duration : Transition[toLowerCase]()+Duration,
  9324. // set new focus element since 2.0.3
  9325. setFocus = function(element){
  9326. element.focus ? element.focus() : element.setActive();
  9327. },
  9328. // class manipulation, since 2.0.0 requires polyfill.js
  9329. addClass = function(element,classNAME) {
  9330. element.classList.add(classNAME);
  9331. },
  9332. removeClass = function(element,classNAME) {
  9333. element.classList.remove(classNAME);
  9334. },
  9335. hasClass = function(element,classNAME){ // since 2.0.0
  9336. return element.classList[contains](classNAME);
  9337. },
  9338. // selection methods
  9339. getElementsByClassName = function(element,classNAME) { // returns Array
  9340. return [].slice.call(element[getElementsByCLASSNAME]( classNAME ));
  9341. },
  9342. queryElement = function (selector, parent) {
  9343. var lookUp = parent ? parent : DOC;
  9344. return typeof selector === 'object' ? selector : lookUp.querySelector(selector);
  9345. },
  9346. getClosest = function (element, selector) { //element is the element and selector is for the closest parent element to find
  9347. // source http://gomakethings.com/climbing-up-and-down-the-dom-tree-with-vanilla-javascript/
  9348. var firstChar = selector.charAt(0), selectorSubstring = selector.substr(1);
  9349. if ( firstChar === '.' ) {// If selector is a class
  9350. for ( ; element && element !== DOC; element = element[parentNode] ) { // Get closest match
  9351. if ( queryElement(selector,element[parentNode]) !== null && hasClass(element,selectorSubstring) ) { return element; }
  9352. }
  9353. } else if ( firstChar === '#' ) { // If selector is an ID
  9354. for ( ; element && element !== DOC; element = element[parentNode] ) { // Get closest match
  9355. if ( element.id === selectorSubstring ) { return element; }
  9356. }
  9357. }
  9358. return false;
  9359. },
  9360. // event attach jQuery style / trigger since 1.2.0
  9361. on = function (element, event, handler) {
  9362. element.addEventListener(event, handler, false);
  9363. },
  9364. off = function(element, event, handler) {
  9365. element.removeEventListener(event, handler, false);
  9366. },
  9367. one = function (element, event, handler) { // one since 2.0.4
  9368. on(element, event, function handlerWrapper(e){
  9369. handler(e);
  9370. off(element, event, handlerWrapper);
  9371. });
  9372. },
  9373. getTransitionDurationFromElement = function(element) {
  9374. var duration = globalObject[getComputedStyle](element)[transitionDuration];
  9375. duration = parseFloat(duration);
  9376. duration = typeof duration === 'number' && !isNaN(duration) ? duration * 1000 : 0;
  9377. return duration + 50; // we take a short offset to make sure we fire on the next frame after animation
  9378. },
  9379. emulateTransitionEnd = function(element,handler){ // emulateTransitionEnd since 2.0.4
  9380. var called = 0, duration = getTransitionDurationFromElement(element);
  9381. supportTransitions && one(element, transitionEndEvent, function(e){ handler(e); called = 1; });
  9382. setTimeout(function() { !called && handler(); }, duration);
  9383. },
  9384. bootstrapCustomEvent = function (eventName, componentName, related) {
  9385. var OriginalCustomEvent = new CustomEvent( eventName + '.bs.' + componentName);
  9386. OriginalCustomEvent.relatedTarget = related;
  9387. this.dispatchEvent(OriginalCustomEvent);
  9388. },
  9389. // tooltip / popover stuff
  9390. getScroll = function() { // also Affix and ScrollSpy uses it
  9391. return {
  9392. y : globalObject.pageYOffset || HTML[scrollTop],
  9393. x : globalObject.pageXOffset || HTML[scrollLeft]
  9394. }
  9395. },
  9396. styleTip = function(link,element,position,parent) { // both popovers and tooltips (target,tooltip,placement,elementToAppendTo)
  9397. var elementDimensions = { w : element[offsetWidth], h: element[offsetHeight] },
  9398. windowWidth = (HTML[clientWidth] || DOC[body][clientWidth]),
  9399. windowHeight = (HTML[clientHeight] || DOC[body][clientHeight]),
  9400. rect = link[getBoundingClientRect](),
  9401. scroll = parent === DOC[body] ? getScroll() : { x: parent[offsetLeft] + parent[scrollLeft], y: parent[offsetTop] + parent[scrollTop] },
  9402. linkDimensions = { w: rect[right] - rect[left], h: rect[bottom] - rect[top] },
  9403. isPopover = hasClass(element,'popover'),
  9404. topPosition, leftPosition,
  9405. arrow = queryElement('.arrow',element),
  9406. arrowTop, arrowLeft, arrowWidth, arrowHeight,
  9407. halfTopExceed = rect[top] + linkDimensions.h/2 - elementDimensions.h/2 < 0,
  9408. halfLeftExceed = rect[left] + linkDimensions.w/2 - elementDimensions.w/2 < 0,
  9409. halfRightExceed = rect[left] + elementDimensions.w/2 + linkDimensions.w/2 >= windowWidth,
  9410. halfBottomExceed = rect[top] + elementDimensions.h/2 + linkDimensions.h/2 >= windowHeight,
  9411. topExceed = rect[top] - elementDimensions.h < 0,
  9412. leftExceed = rect[left] - elementDimensions.w < 0,
  9413. bottomExceed = rect[top] + elementDimensions.h + linkDimensions.h >= windowHeight,
  9414. rightExceed = rect[left] + elementDimensions.w + linkDimensions.w >= windowWidth;
  9415. // recompute position
  9416. position = (position === left || position === right) && leftExceed && rightExceed ? top : position; // first, when both left and right limits are exceeded, we fall back to top|bottom
  9417. position = position === top && topExceed ? bottom : position;
  9418. position = position === bottom && bottomExceed ? top : position;
  9419. position = position === left && leftExceed ? right : position;
  9420. position = position === right && rightExceed ? left : position;
  9421. // update tooltip/popover class
  9422. element.className[indexOf](position) === -1 && (element.className = element.className.replace(tipPositions,position));
  9423. // we check the computed width & height and update here
  9424. arrowWidth = arrow[offsetWidth]; arrowHeight = arrow[offsetHeight];
  9425. // apply styling to tooltip or popover
  9426. if ( position === left || position === right ) { // secondary|side positions
  9427. if ( position === left ) { // LEFT
  9428. leftPosition = rect[left] + scroll.x - elementDimensions.w - ( isPopover ? arrowWidth : 0 );
  9429. } else { // RIGHT
  9430. leftPosition = rect[left] + scroll.x + linkDimensions.w;
  9431. }
  9432. // adjust top and arrow
  9433. if (halfTopExceed) {
  9434. topPosition = rect[top] + scroll.y;
  9435. arrowTop = linkDimensions.h/2 - arrowWidth;
  9436. } else if (halfBottomExceed) {
  9437. topPosition = rect[top] + scroll.y - elementDimensions.h + linkDimensions.h;
  9438. arrowTop = elementDimensions.h - linkDimensions.h/2 - arrowWidth;
  9439. } else {
  9440. topPosition = rect[top] + scroll.y - elementDimensions.h/2 + linkDimensions.h/2;
  9441. arrowTop = elementDimensions.h/2 - (isPopover ? arrowHeight*0.9 : arrowHeight/2);
  9442. }
  9443. } else if ( position === top || position === bottom ) { // primary|vertical positions
  9444. if ( position === top) { // TOP
  9445. topPosition = rect[top] + scroll.y - elementDimensions.h - ( isPopover ? arrowHeight : 0 );
  9446. } else { // BOTTOM
  9447. topPosition = rect[top] + scroll.y + linkDimensions.h;
  9448. }
  9449. // adjust left | right and also the arrow
  9450. if (halfLeftExceed) {
  9451. leftPosition = 0;
  9452. arrowLeft = rect[left] + linkDimensions.w/2 - arrowWidth;
  9453. } else if (halfRightExceed) {
  9454. leftPosition = windowWidth - elementDimensions.w*1.01;
  9455. arrowLeft = elementDimensions.w - ( windowWidth - rect[left] ) + linkDimensions.w/2 - arrowWidth/2;
  9456. } else {
  9457. leftPosition = rect[left] + scroll.x - elementDimensions.w/2 + linkDimensions.w/2;
  9458. arrowLeft = elementDimensions.w/2 - arrowWidth/2;
  9459. }
  9460. }
  9461. // apply style to tooltip/popover and its arrow
  9462. element[style][top] = topPosition + 'px';
  9463. element[style][left] = leftPosition + 'px';
  9464. arrowTop && (arrow[style][top] = arrowTop + 'px');
  9465. arrowLeft && (arrow[style][left] = arrowLeft + 'px');
  9466. };
  9467. BSN.version = '2.0.23';
  9468. /* Native Javascript for Bootstrap 4 | Alert
  9469. -------------------------------------------*/
  9470. // ALERT DEFINITION
  9471. // ================
  9472. var Alert = function( element ) {
  9473. // initialization element
  9474. element = queryElement(element);
  9475. // bind, target alert, duration and stuff
  9476. var self = this, component = 'alert',
  9477. alert = getClosest(element,'.'+component),
  9478. triggerHandler = function(){ hasClass(alert,'fade') ? emulateTransitionEnd(alert,transitionEndHandler) : transitionEndHandler(); },
  9479. // handlers
  9480. clickHandler = function(e){
  9481. alert = getClosest(e[target],'.'+component);
  9482. element = queryElement('['+dataDismiss+'="'+component+'"]',alert);
  9483. element && alert && (element === e[target] || element[contains](e[target])) && self.close();
  9484. },
  9485. transitionEndHandler = function(){
  9486. bootstrapCustomEvent.call(alert, closedEvent, component);
  9487. off(element, clickEvent, clickHandler); // detach it's listener
  9488. alert[parentNode].removeChild(alert);
  9489. };
  9490. // public method
  9491. this.close = function() {
  9492. if ( alert && element && hasClass(alert,showClass) ) {
  9493. bootstrapCustomEvent.call(alert, closeEvent, component);
  9494. removeClass(alert,showClass);
  9495. alert && triggerHandler();
  9496. }
  9497. };
  9498. // init
  9499. if ( !(stringAlert in element ) ) { // prevent adding event handlers twice
  9500. on(element, clickEvent, clickHandler);
  9501. }
  9502. element[stringAlert] = self;
  9503. };
  9504. // ALERT DATA API
  9505. // ==============
  9506. supports[push]([stringAlert, Alert, '['+dataDismiss+'="alert"]']);
  9507. /* Native Javascript for Bootstrap 4 | Button
  9508. ---------------------------------------------*/
  9509. // BUTTON DEFINITION
  9510. // ===================
  9511. var Button = function( element ) {
  9512. // initialization element
  9513. element = queryElement(element);
  9514. // constant
  9515. var toggled = false, // toggled makes sure to prevent triggering twice the change.bs.button events
  9516. // strings
  9517. component = 'button',
  9518. checked = 'checked',
  9519. reset = 'reset',
  9520. LABEL = 'LABEL',
  9521. INPUT = 'INPUT',
  9522. // private methods
  9523. keyHandler = function(e){
  9524. var key = e.which || e.keyCode;
  9525. key === 32 && e[target] === DOC.activeElement && toggle(e);
  9526. },
  9527. preventScroll = function(e){
  9528. var key = e.which || e.keyCode;
  9529. key === 32 && e[preventDefault]();
  9530. },
  9531. toggle = function(e) {
  9532. var label = e[target].tagName === LABEL ? e[target] : e[target][parentNode].tagName === LABEL ? e[target][parentNode] : null; // the .btn label
  9533. if ( !label ) return; //react if a label or its immediate child is clicked
  9534. var eventTarget = e[target], // the button itself, the target of the handler function
  9535. labels = getElementsByClassName(eventTarget[parentNode],'btn'), // all the button group buttons
  9536. input = label[getElementsByTagName](INPUT)[0];
  9537. if ( !input ) return; //return if no input found
  9538. // manage the dom manipulation
  9539. if ( input.type === 'checkbox' ) { //checkboxes
  9540. if ( !input[checked] ) {
  9541. addClass(label,active);
  9542. input[getAttribute](checked);
  9543. input[setAttribute](checked,checked);
  9544. input[checked] = true;
  9545. } else {
  9546. removeClass(label,active);
  9547. input[getAttribute](checked);
  9548. input.removeAttribute(checked);
  9549. input[checked] = false;
  9550. }
  9551. if (!toggled) { // prevent triggering the event twice
  9552. toggled = true;
  9553. bootstrapCustomEvent.call(input, changeEvent, component); //trigger the change for the input
  9554. bootstrapCustomEvent.call(element, changeEvent, component); //trigger the change for the btn-group
  9555. }
  9556. }
  9557. if ( input.type === 'radio' && !toggled ) { // radio buttons
  9558. if ( !input[checked] ) { // don't trigger if already active
  9559. addClass(label,active);
  9560. input[setAttribute](checked,checked);
  9561. input[checked] = true;
  9562. bootstrapCustomEvent.call(input, changeEvent, component); //trigger the change for the input
  9563. bootstrapCustomEvent.call(element, changeEvent, component); //trigger the change for the btn-group
  9564. toggled = true;
  9565. for (var i = 0, ll = labels[length]; i<ll; i++) {
  9566. var otherLabel = labels[i], otherInput = otherLabel[getElementsByTagName](INPUT)[0];
  9567. if ( otherLabel !== label && hasClass(otherLabel,active) ) {
  9568. removeClass(otherLabel,active);
  9569. otherInput.removeAttribute(checked);
  9570. otherInput[checked] = false;
  9571. bootstrapCustomEvent.call(otherInput, changeEvent, component); // trigger the change
  9572. }
  9573. }
  9574. }
  9575. }
  9576. setTimeout( function() { toggled = false; }, 50 );
  9577. };
  9578. // init
  9579. if ( !( stringButton in element ) ) { // prevent adding event handlers twice
  9580. on( element, clickEvent, toggle );
  9581. queryElement('['+tabindex+']',element) && on( element, keyupEvent, keyHandler ),
  9582. on( element, keydownEvent, preventScroll );
  9583. }
  9584. // activate items on load
  9585. var labelsToACtivate = getElementsByClassName(element, 'btn'), lbll = labelsToACtivate[length];
  9586. for (var i=0; i<lbll; i++) {
  9587. !hasClass(labelsToACtivate[i],active) && queryElement('input:checked',labelsToACtivate[i])
  9588. && addClass(labelsToACtivate[i],active);
  9589. }
  9590. element[stringButton] = this;
  9591. };
  9592. // BUTTON DATA API
  9593. // =================
  9594. supports[push]( [ stringButton, Button, '['+dataToggle+'="buttons"]' ] );
  9595. /* Native Javascript for Bootstrap 4 | Carousel
  9596. ----------------------------------------------*/
  9597. // CAROUSEL DEFINITION
  9598. // ===================
  9599. var Carousel = function( element, options ) {
  9600. // initialization element
  9601. element = queryElement( element );
  9602. // set options
  9603. options = options || {};
  9604. // DATA API
  9605. var intervalAttribute = element[getAttribute](dataInterval),
  9606. intervalOption = options[interval],
  9607. intervalData = intervalAttribute === 'false' ? 0 : parseInt(intervalAttribute),
  9608. pauseData = element[getAttribute](dataPause) === hoverEvent || false,
  9609. keyboardData = element[getAttribute](dataKeyboard) === 'true' || false,
  9610. // strings
  9611. component = 'carousel',
  9612. paused = 'paused',
  9613. direction = 'direction',
  9614. carouselItem = 'carousel-item',
  9615. dataSlideTo = 'data-slide-to';
  9616. this[keyboard] = options[keyboard] === true || keyboardData;
  9617. this[pause] = (options[pause] === hoverEvent || pauseData) ? hoverEvent : false; // false / hover
  9618. this[interval] = typeof intervalOption === 'number' ? intervalOption
  9619. : intervalOption === false || intervalData === 0 || intervalData === false ? 0
  9620. : 5000; // bootstrap carousel default interval
  9621. // bind, event targets
  9622. var self = this, index = element.index = 0, timer = element.timer = 0,
  9623. isSliding = false, // isSliding prevents click event handlers when animation is running
  9624. slides = getElementsByClassName(element,carouselItem), total = slides[length],
  9625. slideDirection = this[direction] = left,
  9626. leftArrow = getElementsByClassName(element,component+'-control-prev')[0],
  9627. rightArrow = getElementsByClassName(element,component+'-control-next')[0],
  9628. indicator = queryElement( '.'+component+'-indicators', element ),
  9629. indicators = indicator && indicator[getElementsByTagName]( "LI" ) || [];
  9630. // handlers
  9631. var pauseHandler = function () {
  9632. if ( self[interval] !==false && !hasClass(element,paused) ) {
  9633. addClass(element,paused);
  9634. !isSliding && clearInterval( timer );
  9635. }
  9636. },
  9637. resumeHandler = function() {
  9638. if ( self[interval] !== false && hasClass(element,paused) ) {
  9639. removeClass(element,paused);
  9640. !isSliding && clearInterval( timer );
  9641. !isSliding && self.cycle();
  9642. }
  9643. },
  9644. indicatorHandler = function(e) {
  9645. e[preventDefault]();
  9646. if (isSliding) return;
  9647. var eventTarget = e[target]; // event target | the current active item
  9648. if ( eventTarget && !hasClass(eventTarget,active) && eventTarget[getAttribute](dataSlideTo) ) {
  9649. index = parseInt( eventTarget[getAttribute](dataSlideTo), 10 );
  9650. } else { return false; }
  9651. self.slideTo( index ); //Do the slide
  9652. },
  9653. controlsHandler = function (e) {
  9654. e[preventDefault]();
  9655. if (isSliding) return;
  9656. var eventTarget = e.currentTarget || e.srcElement;
  9657. if ( eventTarget === rightArrow ) {
  9658. index++;
  9659. } else if ( eventTarget === leftArrow ) {
  9660. index--;
  9661. }
  9662. self.slideTo( index ); //Do the slide
  9663. },
  9664. keyHandler = function (e) {
  9665. if (isSliding) return;
  9666. switch (e.which) {
  9667. case 39:
  9668. index++;
  9669. break;
  9670. case 37:
  9671. index--;
  9672. break;
  9673. default: return;
  9674. }
  9675. self.slideTo( index ); //Do the slide
  9676. },
  9677. // private methods
  9678. isElementInScrollRange = function () {
  9679. var rect = element[getBoundingClientRect](),
  9680. viewportHeight = globalObject[innerHeight] || HTML[clientHeight]
  9681. return rect[top] <= viewportHeight && rect[bottom] >= 0; // bottom && top
  9682. },
  9683. setActivePage = function( pageIndex ) { //indicators
  9684. for ( var i = 0, icl = indicators[length]; i < icl; i++ ) {
  9685. removeClass(indicators[i],active);
  9686. }
  9687. if (indicators[pageIndex]) addClass(indicators[pageIndex], active);
  9688. };
  9689. // public methods
  9690. this.cycle = function() {
  9691. timer = setInterval(function() {
  9692. isElementInScrollRange() && (index++, self.slideTo( index ) );
  9693. }, this[interval]);
  9694. };
  9695. this.slideTo = function( next ) {
  9696. if (isSliding) return; // when controled via methods, make sure to check again
  9697. var activeItem = this.getActiveIndex(), // the current active
  9698. orientation;
  9699. // determine slideDirection first
  9700. if ( (activeItem < next ) || (activeItem === 0 && next === total -1 ) ) {
  9701. slideDirection = self[direction] = left; // next
  9702. } else if ( (activeItem > next) || (activeItem === total - 1 && next === 0 ) ) {
  9703. slideDirection = self[direction] = right; // prev
  9704. }
  9705. // find the right next index
  9706. if ( next < 0 ) { next = total - 1; }
  9707. else if ( next === total ){ next = 0; }
  9708. // update index
  9709. index = next;
  9710. orientation = slideDirection === left ? 'next' : 'prev'; //determine type
  9711. bootstrapCustomEvent.call(element, slideEvent, component, slides[next]); // here we go with the slide
  9712. isSliding = true;
  9713. clearInterval(timer);
  9714. setActivePage( next );
  9715. if ( supportTransitions && hasClass(element,'slide') ) {
  9716. addClass(slides[next],carouselItem +'-'+ orientation);
  9717. slides[next][offsetWidth];
  9718. addClass(slides[next],carouselItem +'-'+ slideDirection);
  9719. addClass(slides[activeItem],carouselItem +'-'+ slideDirection);
  9720. one(slides[next], transitionEndEvent, function(e) {
  9721. var timeout = e[target] !== slides[next] ? e.elapsedTime*1000+100 : 20;
  9722. isSliding && setTimeout(function(){
  9723. isSliding = false;
  9724. addClass(slides[next],active);
  9725. removeClass(slides[activeItem],active);
  9726. removeClass(slides[next],carouselItem +'-'+ orientation);
  9727. removeClass(slides[next],carouselItem +'-'+ slideDirection);
  9728. removeClass(slides[activeItem],carouselItem +'-'+ slideDirection);
  9729. bootstrapCustomEvent.call(element, slidEvent, component, slides[next]);
  9730. if ( !DOC.hidden && self[interval] && !hasClass(element,paused) ) {
  9731. self.cycle();
  9732. }
  9733. }, timeout);
  9734. });
  9735. } else {
  9736. addClass(slides[next],active);
  9737. slides[next][offsetWidth];
  9738. removeClass(slides[activeItem],active);
  9739. setTimeout(function() {
  9740. isSliding = false;
  9741. if ( self[interval] && !hasClass(element,paused) ) {
  9742. self.cycle();
  9743. }
  9744. bootstrapCustomEvent.call(element, slidEvent, component, slides[next]);
  9745. }, 100 );
  9746. }
  9747. };
  9748. this.getActiveIndex = function () {
  9749. return slides[indexOf](getElementsByClassName(element,carouselItem+' active')[0]) || 0;
  9750. };
  9751. // init
  9752. if ( !(stringCarousel in element ) ) { // prevent adding event handlers twice
  9753. if ( self[pause] && self[interval] ) {
  9754. on( element, mouseHover[0], pauseHandler );
  9755. on( element, mouseHover[1], resumeHandler );
  9756. on( element, 'touchstart', pauseHandler );
  9757. on( element, 'touchend', resumeHandler );
  9758. }
  9759. rightArrow && on( rightArrow, clickEvent, controlsHandler );
  9760. leftArrow && on( leftArrow, clickEvent, controlsHandler );
  9761. indicator && on( indicator, clickEvent, indicatorHandler );
  9762. self[keyboard] === true && on( globalObject, keydownEvent, keyHandler );
  9763. }
  9764. if (self.getActiveIndex()<0) {
  9765. slides[length] && addClass(slides[0],active);
  9766. indicators[length] && setActivePage(0);
  9767. }
  9768. if ( self[interval] ){ self.cycle(); }
  9769. element[stringCarousel] = self;
  9770. };
  9771. // CAROUSEL DATA API
  9772. // =================
  9773. supports[push]( [ stringCarousel, Carousel, '['+dataRide+'="carousel"]' ] );
  9774. /* Native Javascript for Bootstrap 4 | Collapse
  9775. -----------------------------------------------*/
  9776. // COLLAPSE DEFINITION
  9777. // ===================
  9778. var Collapse = function( element, options ) {
  9779. // initialization element
  9780. element = queryElement(element);
  9781. // set options
  9782. options = options || {};
  9783. // event targets and constants
  9784. var accordion = null, collapse = null, self = this,
  9785. accordionData = element[getAttribute]('data-parent'),
  9786. activeCollapse, activeElement,
  9787. // component strings
  9788. component = 'collapse',
  9789. collapsed = 'collapsed',
  9790. isAnimating = 'isAnimating',
  9791. // private methods
  9792. openAction = function(collapseElement,toggle) {
  9793. bootstrapCustomEvent.call(collapseElement, showEvent, component);
  9794. collapseElement[isAnimating] = true;
  9795. addClass(collapseElement,collapsing);
  9796. removeClass(collapseElement,component);
  9797. collapseElement[style][height] = collapseElement[scrollHeight] + 'px';
  9798. emulateTransitionEnd(collapseElement, function() {
  9799. collapseElement[isAnimating] = false;
  9800. collapseElement[setAttribute](ariaExpanded,'true');
  9801. toggle[setAttribute](ariaExpanded,'true');
  9802. removeClass(collapseElement,collapsing);
  9803. addClass(collapseElement, component);
  9804. addClass(collapseElement,showClass);
  9805. collapseElement[style][height] = '';
  9806. bootstrapCustomEvent.call(collapseElement, shownEvent, component);
  9807. });
  9808. },
  9809. closeAction = function(collapseElement,toggle) {
  9810. bootstrapCustomEvent.call(collapseElement, hideEvent, component);
  9811. collapseElement[isAnimating] = true;
  9812. collapseElement[style][height] = collapseElement[scrollHeight] + 'px'; // set height first
  9813. removeClass(collapseElement,component);
  9814. removeClass(collapseElement,showClass);
  9815. addClass(collapseElement,collapsing);
  9816. collapseElement[offsetWidth]; // force reflow to enable transition
  9817. collapseElement[style][height] = '0px';
  9818. emulateTransitionEnd(collapseElement, function() {
  9819. collapseElement[isAnimating] = false;
  9820. collapseElement[setAttribute](ariaExpanded,'false');
  9821. toggle[setAttribute](ariaExpanded,'false');
  9822. removeClass(collapseElement,collapsing);
  9823. addClass(collapseElement,component);
  9824. collapseElement[style][height] = '';
  9825. bootstrapCustomEvent.call(collapseElement, hiddenEvent, component);
  9826. });
  9827. },
  9828. getTarget = function() {
  9829. var href = element.href && element[getAttribute]('href'),
  9830. parent = element[getAttribute](dataTarget),
  9831. id = href || ( parent && parent.charAt(0) === '#' ) && parent;
  9832. return id && queryElement(id);
  9833. };
  9834. // public methods
  9835. this.toggle = function(e) {
  9836. e[preventDefault]();
  9837. if (!hasClass(collapse,showClass)) { self.show(); }
  9838. else { self.hide(); }
  9839. };
  9840. this.hide = function() {
  9841. if ( collapse[isAnimating] ) return;
  9842. closeAction(collapse,element);
  9843. addClass(element,collapsed);
  9844. };
  9845. this.show = function() {
  9846. if ( accordion ) {
  9847. activeCollapse = queryElement('.'+component+'.'+showClass,accordion);
  9848. activeElement = activeCollapse && (queryElement('['+dataToggle+'="'+component+'"]['+dataTarget+'="#'+activeCollapse.id+'"]',accordion)
  9849. || queryElement('['+dataToggle+'="'+component+'"][href="#'+activeCollapse.id+'"]',accordion) );
  9850. }
  9851. if ( !collapse[isAnimating] || activeCollapse && !activeCollapse[isAnimating] ) {
  9852. if ( activeElement && activeCollapse !== collapse ) {
  9853. closeAction(activeCollapse,activeElement);
  9854. addClass(activeElement,collapsed);
  9855. }
  9856. openAction(collapse,element);
  9857. removeClass(element,collapsed);
  9858. }
  9859. };
  9860. // init
  9861. if ( !(stringCollapse in element ) ) { // prevent adding event handlers twice
  9862. on(element, clickEvent, self.toggle);
  9863. }
  9864. collapse = getTarget();
  9865. collapse[isAnimating] = false; // when true it will prevent click handlers
  9866. accordion = queryElement(options.parent) || accordionData && getClosest(element, accordionData);
  9867. element[stringCollapse] = self;
  9868. };
  9869. // COLLAPSE DATA API
  9870. // =================
  9871. supports[push]( [ stringCollapse, Collapse, '['+dataToggle+'="collapse"]' ] );
  9872. /* Native Javascript for Bootstrap 4 | Dropdown
  9873. ----------------------------------------------*/
  9874. // DROPDOWN DEFINITION
  9875. // ===================
  9876. var Dropdown = function( element, option ) {
  9877. // initialization element
  9878. element = queryElement(element);
  9879. // set option
  9880. this.persist = option === true || element[getAttribute]('data-persist') === 'true' || false;
  9881. // constants, event targets, strings
  9882. var self = this, children = 'children',
  9883. parent = element[parentNode],
  9884. component = 'dropdown', open = 'open',
  9885. relatedTarget = null,
  9886. menu = queryElement('.dropdown-menu', parent),
  9887. menuItems = (function(){
  9888. var set = menu[children], newSet = [];
  9889. for ( var i=0; i<set[length]; i++ ){
  9890. set[i][children][length] && (set[i][children][0].tagName === 'A' && newSet[push](set[i][children][0]));
  9891. set[i].tagName === 'A' && newSet[push](set[i]);
  9892. }
  9893. return newSet;
  9894. })(),
  9895. // preventDefault on empty anchor links
  9896. preventEmptyAnchor = function(anchor){
  9897. (anchor.href && anchor.href.slice(-1) === '#' || anchor[parentNode] && anchor[parentNode].href
  9898. && anchor[parentNode].href.slice(-1) === '#') && this[preventDefault]();
  9899. },
  9900. // toggle dismissible events
  9901. toggleDismiss = function(){
  9902. var type = element[open] ? on : off;
  9903. type(DOC, clickEvent, dismissHandler);
  9904. type(DOC, keydownEvent, preventScroll);
  9905. type(DOC, keyupEvent, keyHandler);
  9906. },
  9907. // handlers
  9908. dismissHandler = function(e) {
  9909. var eventTarget = e[target], hasData = eventTarget && (stringDropdown in eventTarget || stringDropdown in eventTarget[parentNode]);
  9910. if ( (eventTarget === menu || menu[contains](eventTarget)) && (self.persist || hasData) ) { return; }
  9911. else {
  9912. relatedTarget = eventTarget === element || element[contains](eventTarget) ? element : null;
  9913. hide();
  9914. }
  9915. preventEmptyAnchor.call(e,eventTarget);
  9916. },
  9917. clickHandler = function(e) {
  9918. relatedTarget = element;
  9919. show();
  9920. preventEmptyAnchor.call(e,e[target]);
  9921. },
  9922. preventScroll = function(e){
  9923. var key = e.which || e.keyCode;
  9924. if( key === 38 || key === 40 ) { e[preventDefault](); }
  9925. },
  9926. keyHandler = function(e){
  9927. var key = e.which || e.keyCode,
  9928. activeItem = DOC.activeElement,
  9929. idx = menuItems[indexOf](activeItem),
  9930. isSameElement = activeItem === element,
  9931. isInsideMenu = menu[contains](activeItem),
  9932. isMenuItem = activeItem[parentNode] === menu || activeItem[parentNode][parentNode] === menu;
  9933. if ( isMenuItem || isSameElement ) { // navigate up | down
  9934. idx = isSameElement ? 0
  9935. : key === 38 ? (idx>1?idx-1:0)
  9936. : key === 40 ? (idx<menuItems[length]-1?idx+1:idx) : idx;
  9937. menuItems[idx] && setFocus(menuItems[idx]);
  9938. }
  9939. if ( (menuItems[length] && isMenuItem // menu has items
  9940. || !menuItems[length] && (isInsideMenu || isSameElement) // menu might be a form
  9941. || !isInsideMenu ) // or the focused element is not in the menu at all
  9942. && element[open] && key === 27 // menu must be open
  9943. ) {
  9944. self.toggle();
  9945. relatedTarget = null;
  9946. }
  9947. },
  9948. // private methods
  9949. show = function() {
  9950. bootstrapCustomEvent.call(parent, showEvent, component, relatedTarget);
  9951. addClass(menu,showClass);
  9952. addClass(parent,showClass);
  9953. menu[setAttribute](ariaExpanded,true);
  9954. bootstrapCustomEvent.call(parent, shownEvent, component, relatedTarget);
  9955. element[open] = true;
  9956. off(element, clickEvent, clickHandler);
  9957. setTimeout(function(){
  9958. setFocus( menu[getElementsByTagName]('INPUT')[0] || element ); // focus the first input item | element
  9959. toggleDismiss();
  9960. },1);
  9961. },
  9962. hide = function() {
  9963. bootstrapCustomEvent.call(parent, hideEvent, component, relatedTarget);
  9964. removeClass(menu,showClass);
  9965. removeClass(parent,showClass);
  9966. menu[setAttribute](ariaExpanded,false);
  9967. bootstrapCustomEvent.call(parent, hiddenEvent, component, relatedTarget);
  9968. element[open] = false;
  9969. toggleDismiss();
  9970. setFocus(element);
  9971. setTimeout(function(){ on(element, clickEvent, clickHandler); },1);
  9972. };
  9973. // set initial state to closed
  9974. element[open] = false;
  9975. // public methods
  9976. this.toggle = function() {
  9977. if (hasClass(parent,showClass) && element[open]) { hide(); }
  9978. else { show(); }
  9979. };
  9980. // init
  9981. if ( !(stringDropdown in element) ) { // prevent adding event handlers twice
  9982. !tabindex in menu && menu[setAttribute](tabindex, '0'); // Fix onblur on Chrome | Safari
  9983. on(element, clickEvent, clickHandler);
  9984. }
  9985. element[stringDropdown] = self;
  9986. };
  9987. // DROPDOWN DATA API
  9988. // =================
  9989. supports[push]( [stringDropdown, Dropdown, '['+dataToggle+'="dropdown"]'] );
  9990. /* Native Javascript for Bootstrap 4 | Modal
  9991. -------------------------------------------*/
  9992. // MODAL DEFINITION
  9993. // ===============
  9994. var Modal = function(element, options) { // element can be the modal/triggering button
  9995. // the modal (both JavaScript / DATA API init) / triggering button element (DATA API)
  9996. element = queryElement(element);
  9997. // determine modal, triggering element
  9998. var btnCheck = element[getAttribute](dataTarget)||element[getAttribute]('href'),
  9999. checkModal = queryElement( btnCheck ),
  10000. modal = hasClass(element,'modal') ? element : checkModal,
  10001. overlayDelay,
  10002. // strings
  10003. component = 'modal',
  10004. staticString = 'static',
  10005. paddingLeft = 'paddingLeft',
  10006. paddingRight = 'paddingRight',
  10007. modalBackdropString = 'modal-backdrop';
  10008. if ( hasClass(element,'modal') ) { element = null; } // modal is now independent of it's triggering element
  10009. if ( !modal ) { return; } // invalidate
  10010. // set options
  10011. options = options || {};
  10012. this[keyboard] = options[keyboard] === false || modal[getAttribute](dataKeyboard) === 'false' ? false : true;
  10013. this[backdrop] = options[backdrop] === staticString || modal[getAttribute](databackdrop) === staticString ? staticString : true;
  10014. this[backdrop] = options[backdrop] === false || modal[getAttribute](databackdrop) === 'false' ? false : this[backdrop];
  10015. this[content] = options[content]; // JavaScript only
  10016. // bind, constants, event targets and other vars
  10017. var self = this, relatedTarget = null,
  10018. bodyIsOverflowing, modalIsOverflowing, scrollbarWidth, overlay,
  10019. // also find fixed-top / fixed-bottom items
  10020. fixedItems = getElementsByClassName(HTML,fixedTop).concat(getElementsByClassName(HTML,fixedBottom)),
  10021. // private methods
  10022. getWindowWidth = function() {
  10023. var htmlRect = HTML[getBoundingClientRect]();
  10024. return globalObject[innerWidth] || (htmlRect[right] - Math.abs(htmlRect[left]));
  10025. },
  10026. setScrollbar = function () {
  10027. var bodyStyle = globalObject[getComputedStyle](DOC[body]),
  10028. bodyPad = parseInt((bodyStyle[paddingRight]), 10), itemPad;
  10029. if (bodyIsOverflowing) {
  10030. DOC[body][style][paddingRight] = (bodyPad + scrollbarWidth) + 'px';
  10031. if (fixedItems[length]){
  10032. for (var i = 0; i < fixedItems[length]; i++) {
  10033. itemPad = globalObject[getComputedStyle](fixedItems[i])[paddingRight];
  10034. fixedItems[i][style][paddingRight] = ( parseInt(itemPad) + scrollbarWidth) + 'px';
  10035. }
  10036. }
  10037. }
  10038. },
  10039. resetScrollbar = function () {
  10040. DOC[body][style][paddingRight] = '';
  10041. if (fixedItems[length]){
  10042. for (var i = 0; i < fixedItems[length]; i++) {
  10043. fixedItems[i][style][paddingRight] = '';
  10044. }
  10045. }
  10046. },
  10047. measureScrollbar = function () { // thx walsh
  10048. var scrollDiv = DOC[createElement]('div'), scrollBarWidth;
  10049. scrollDiv.className = component+'-scrollbar-measure'; // this is here to stay
  10050. DOC[body][appendChild](scrollDiv);
  10051. scrollBarWidth = scrollDiv[offsetWidth] - scrollDiv[clientWidth];
  10052. DOC[body].removeChild(scrollDiv);
  10053. return scrollBarWidth;
  10054. },
  10055. checkScrollbar = function () {
  10056. bodyIsOverflowing = DOC[body][clientWidth] < getWindowWidth();
  10057. modalIsOverflowing = modal[scrollHeight] > HTML[clientHeight];
  10058. scrollbarWidth = measureScrollbar();
  10059. },
  10060. adjustDialog = function () {
  10061. modal[style][paddingLeft] = !bodyIsOverflowing && modalIsOverflowing ? scrollbarWidth + 'px' : '';
  10062. modal[style][paddingRight] = bodyIsOverflowing && !modalIsOverflowing ? scrollbarWidth + 'px' : '';
  10063. },
  10064. resetAdjustments = function () {
  10065. modal[style][paddingLeft] = '';
  10066. modal[style][paddingRight] = '';
  10067. },
  10068. createOverlay = function() {
  10069. modalOverlay = 1;
  10070. var newOverlay = DOC[createElement]('div');
  10071. overlay = queryElement('.'+modalBackdropString);
  10072. if ( overlay === null ) {
  10073. newOverlay[setAttribute]('class',modalBackdropString+' fade');
  10074. overlay = newOverlay;
  10075. DOC[body][appendChild](overlay);
  10076. }
  10077. },
  10078. removeOverlay = function() {
  10079. overlay = queryElement('.'+modalBackdropString);
  10080. if ( overlay && overlay !== null && typeof overlay === 'object' ) {
  10081. modalOverlay = 0;
  10082. DOC[body].removeChild(overlay); overlay = null;
  10083. }
  10084. bootstrapCustomEvent.call(modal, hiddenEvent, component);
  10085. },
  10086. keydownHandlerToggle = function() {
  10087. if (hasClass(modal,showClass)) {
  10088. on(DOC, keydownEvent, keyHandler);
  10089. } else {
  10090. off(DOC, keydownEvent, keyHandler);
  10091. }
  10092. },
  10093. resizeHandlerToggle = function() {
  10094. if (hasClass(modal,showClass)) {
  10095. on(globalObject, resizeEvent, self.update);
  10096. } else {
  10097. off(globalObject, resizeEvent, self.update);
  10098. }
  10099. },
  10100. dismissHandlerToggle = function() {
  10101. if (hasClass(modal,showClass)) {
  10102. on(modal, clickEvent, dismissHandler);
  10103. } else {
  10104. off(modal, clickEvent, dismissHandler);
  10105. }
  10106. },
  10107. // triggers
  10108. triggerShow = function() {
  10109. setFocus(modal);
  10110. bootstrapCustomEvent.call(modal, shownEvent, component, relatedTarget);
  10111. },
  10112. triggerHide = function() {
  10113. modal[style].display = '';
  10114. element && (setFocus(element));
  10115. (function(){
  10116. if (!getElementsByClassName(DOC,component+' '+showClass)[0]) {
  10117. resetAdjustments();
  10118. resetScrollbar();
  10119. removeClass(DOC[body],component+'-open');
  10120. overlay && hasClass(overlay,'fade') ? (removeClass(overlay,showClass), emulateTransitionEnd(overlay,removeOverlay))
  10121. : removeOverlay();
  10122. resizeHandlerToggle();
  10123. dismissHandlerToggle();
  10124. keydownHandlerToggle();
  10125. }
  10126. }());
  10127. },
  10128. // handlers
  10129. clickHandler = function(e) {
  10130. var clickTarget = e[target];
  10131. clickTarget = clickTarget[hasAttribute](dataTarget) || clickTarget[hasAttribute]('href') ? clickTarget : clickTarget[parentNode];
  10132. if ( clickTarget === element && !hasClass(modal,showClass) ) {
  10133. modal.modalTrigger = element;
  10134. relatedTarget = element;
  10135. self.show();
  10136. e[preventDefault]();
  10137. }
  10138. },
  10139. keyHandler = function(e) {
  10140. if (self[keyboard] && e.which == 27 && hasClass(modal,showClass)) {
  10141. self.hide();
  10142. }
  10143. },
  10144. dismissHandler = function(e) {
  10145. var clickTarget = e[target];
  10146. if ( hasClass(modal,showClass) && (clickTarget[parentNode][getAttribute](dataDismiss) === component
  10147. || clickTarget[getAttribute](dataDismiss) === component
  10148. || (clickTarget === modal && self[backdrop] !== staticString) ) ) {
  10149. self.hide(); relatedTarget = null;
  10150. e[preventDefault]();
  10151. }
  10152. };
  10153. // public methods
  10154. this.toggle = function() {
  10155. if ( hasClass(modal,showClass) ) {this.hide();} else {this.show();}
  10156. };
  10157. this.show = function() {
  10158. bootstrapCustomEvent.call(modal, showEvent, component, relatedTarget);
  10159. // we elegantly hide any opened modal
  10160. var currentOpen = getElementsByClassName(DOC,component+' '+showClass)[0];
  10161. currentOpen && currentOpen !== modal && currentOpen.modalTrigger[stringModal].hide();
  10162. if ( this[backdrop] ) {
  10163. !modalOverlay && createOverlay();
  10164. }
  10165. if ( overlay && modalOverlay && !hasClass(overlay,showClass)) {
  10166. overlay[offsetWidth]; // force reflow to enable trasition
  10167. overlayDelay = getTransitionDurationFromElement(overlay);
  10168. addClass(overlay, showClass);
  10169. }
  10170. setTimeout( function() {
  10171. modal[style].display = 'block';
  10172. checkScrollbar();
  10173. setScrollbar();
  10174. adjustDialog();
  10175. addClass(DOC[body],component+'-open');
  10176. addClass(modal,showClass);
  10177. modal[setAttribute](ariaHidden, false);
  10178. resizeHandlerToggle();
  10179. dismissHandlerToggle();
  10180. keydownHandlerToggle();
  10181. hasClass(modal,'fade') ? emulateTransitionEnd(modal, triggerShow) : triggerShow();
  10182. }, supportTransitions && overlay ? overlayDelay : 0);
  10183. };
  10184. this.hide = function() {
  10185. bootstrapCustomEvent.call(modal, hideEvent, component);
  10186. overlay = queryElement('.'+modalBackdropString);
  10187. overlayDelay = overlay && getTransitionDurationFromElement(overlay);
  10188. removeClass(modal,showClass);
  10189. modal[setAttribute](ariaHidden, true);
  10190. setTimeout(function(){
  10191. hasClass(modal,'fade') ? emulateTransitionEnd(modal, triggerHide) : triggerHide();
  10192. }, supportTransitions && overlay ? overlayDelay : 0);
  10193. };
  10194. this.setContent = function( content ) {
  10195. queryElement('.'+component+'-content',modal)[innerHTML] = content;
  10196. };
  10197. this.update = function() {
  10198. if (hasClass(modal,showClass)) {
  10199. checkScrollbar();
  10200. setScrollbar();
  10201. adjustDialog();
  10202. }
  10203. };
  10204. // init
  10205. // prevent adding event handlers over and over
  10206. // modal is independent of a triggering element
  10207. if ( !!element && !(stringModal in element) ) {
  10208. on(element, clickEvent, clickHandler);
  10209. }
  10210. if ( !!self[content] ) { self.setContent( self[content] ); }
  10211. !!element && (element[stringModal] = self);
  10212. };
  10213. // DATA API
  10214. supports[push]( [ stringModal, Modal, '['+dataToggle+'="modal"]' ] );
  10215. /* Native Javascript for Bootstrap 4 | Popover
  10216. ----------------------------------------------*/
  10217. // POPOVER DEFINITION
  10218. // ==================
  10219. var Popover = function( element, options ) {
  10220. // initialization element
  10221. element = queryElement(element);
  10222. // set options
  10223. options = options || {};
  10224. // DATA API
  10225. var triggerData = element[getAttribute](dataTrigger), // click / hover / focus
  10226. animationData = element[getAttribute](dataAnimation), // true / false
  10227. placementData = element[getAttribute](dataPlacement),
  10228. dismissibleData = element[getAttribute](dataDismissible),
  10229. delayData = element[getAttribute](dataDelay),
  10230. containerData = element[getAttribute](dataContainer),
  10231. // internal strings
  10232. component = 'popover',
  10233. template = 'template',
  10234. trigger = 'trigger',
  10235. classString = 'class',
  10236. div = 'div',
  10237. fade = 'fade',
  10238. content = 'content',
  10239. dataContent = 'data-content',
  10240. dismissible = 'dismissible',
  10241. closeBtn = '<button type="button" class="close">×</button>',
  10242. // check container
  10243. containerElement = queryElement(options[container]),
  10244. containerDataElement = queryElement(containerData),
  10245. // maybe the element is inside a modal
  10246. modal = getClosest(element,'.modal'),
  10247. // maybe the element is inside a fixed navbar
  10248. navbarFixedTop = getClosest(element,'.'+fixedTop),
  10249. navbarFixedBottom = getClosest(element,'.'+fixedBottom);
  10250. // set instance options
  10251. this[template] = options[template] ? options[template] : null; // JavaScript only
  10252. this[trigger] = options[trigger] ? options[trigger] : triggerData || hoverEvent;
  10253. this[animation] = options[animation] && options[animation] !== fade ? options[animation] : animationData || fade;
  10254. this[placement] = options[placement] ? options[placement] : placementData || top;
  10255. this[delay] = parseInt(options[delay] || delayData) || 200;
  10256. this[dismissible] = options[dismissible] || dismissibleData === 'true' ? true : false;
  10257. this[container] = containerElement ? containerElement
  10258. : containerDataElement ? containerDataElement
  10259. : navbarFixedTop ? navbarFixedTop
  10260. : navbarFixedBottom ? navbarFixedBottom
  10261. : modal ? modal : DOC[body];
  10262. // bind, content
  10263. var self = this,
  10264. titleString = element[getAttribute](dataTitle) || null,
  10265. contentString = element[getAttribute](dataContent) || null;
  10266. if ( !contentString && !this[template] ) return; // invalidate
  10267. // constants, vars
  10268. var popover = null, timer = 0, placementSetting = this[placement],
  10269. // handlers
  10270. dismissibleHandler = function(e) {
  10271. if (popover !== null && e[target] === queryElement('.close',popover)) {
  10272. self.hide();
  10273. }
  10274. },
  10275. // private methods
  10276. removePopover = function() {
  10277. self[container].removeChild(popover);
  10278. timer = null; popover = null;
  10279. },
  10280. createPopover = function() {
  10281. titleString = element[getAttribute](dataTitle); // check content again
  10282. contentString = element[getAttribute](dataContent);
  10283. popover = DOC[createElement](div);
  10284. // popover arrow
  10285. var popoverArrow = DOC[createElement](div);
  10286. popoverArrow[setAttribute](classString,'arrow');
  10287. popover[appendChild](popoverArrow);
  10288. if ( contentString !== null && self[template] === null ) { //create the popover from data attributes
  10289. popover[setAttribute]('role','tooltip');
  10290. if (titleString !== null) {
  10291. var popoverTitle = DOC[createElement]('h3');
  10292. popoverTitle[setAttribute](classString,component+'-header');
  10293. popoverTitle[innerHTML] = self[dismissible] ? titleString + closeBtn : titleString;
  10294. popover[appendChild](popoverTitle);
  10295. }
  10296. //set popover content
  10297. var popoverContent = DOC[createElement](div);
  10298. popoverContent[setAttribute](classString,component+'-body');
  10299. popoverContent[innerHTML] = self[dismissible] && titleString === null ? contentString + closeBtn : contentString;
  10300. popover[appendChild](popoverContent);
  10301. } else { // or create the popover from template
  10302. var popoverTemplate = DOC[createElement](div);
  10303. popoverTemplate[innerHTML] = self[template];
  10304. popover[innerHTML] = popoverTemplate.firstChild[innerHTML];
  10305. }
  10306. //append to the container
  10307. self[container][appendChild](popover);
  10308. popover[style].display = 'block';
  10309. popover[setAttribute](classString, component+ ' bs-' + component+'-'+placementSetting + ' ' + self[animation]);
  10310. },
  10311. showPopover = function () {
  10312. !hasClass(popover,showClass) && ( addClass(popover,showClass) );
  10313. },
  10314. updatePopover = function() {
  10315. styleTip(element,popover,placementSetting,self[container]);
  10316. },
  10317. // event toggle
  10318. dismissHandlerToggle = function(type){
  10319. if (clickEvent == self[trigger] || 'focus' == self[trigger]) {
  10320. !self[dismissible] && type( element, 'blur', self.hide );
  10321. }
  10322. self[dismissible] && type( DOC, clickEvent, dismissibleHandler );
  10323. type( globalObject, resizeEvent, self.hide );
  10324. },
  10325. // triggers
  10326. showTrigger = function() {
  10327. dismissHandlerToggle(on);
  10328. bootstrapCustomEvent.call(element, shownEvent, component);
  10329. },
  10330. hideTrigger = function() {
  10331. dismissHandlerToggle(off);
  10332. removePopover();
  10333. bootstrapCustomEvent.call(element, hiddenEvent, component);
  10334. };
  10335. // public methods / handlers
  10336. this.toggle = function() {
  10337. if (popover === null) { self.show(); }
  10338. else { self.hide(); }
  10339. };
  10340. this.show = function() {
  10341. clearTimeout(timer);
  10342. timer = setTimeout( function() {
  10343. if (popover === null) {
  10344. placementSetting = self[placement]; // we reset placement in all cases
  10345. createPopover();
  10346. updatePopover();
  10347. showPopover();
  10348. bootstrapCustomEvent.call(element, showEvent, component);
  10349. !!self[animation] ? emulateTransitionEnd(popover, showTrigger) : showTrigger();
  10350. }
  10351. }, 20 );
  10352. };
  10353. this.hide = function() {
  10354. clearTimeout(timer);
  10355. timer = setTimeout( function() {
  10356. if (popover && popover !== null && hasClass(popover,showClass)) {
  10357. bootstrapCustomEvent.call(element, hideEvent, component);
  10358. removeClass(popover,showClass);
  10359. !!self[animation] ? emulateTransitionEnd(popover, hideTrigger) : hideTrigger();
  10360. }
  10361. }, self[delay] );
  10362. };
  10363. // init
  10364. if ( !(stringPopover in element) ) { // prevent adding event handlers twice
  10365. if (self[trigger] === hoverEvent) {
  10366. on( element, mouseHover[0], self.show );
  10367. if (!self[dismissible]) { on( element, mouseHover[1], self.hide ); }
  10368. } else if (clickEvent == self[trigger] || 'focus' == self[trigger]) {
  10369. on( element, self[trigger], self.toggle );
  10370. }
  10371. }
  10372. element[stringPopover] = self;
  10373. };
  10374. // POPOVER DATA API
  10375. // ================
  10376. supports[push]( [ stringPopover, Popover, '['+dataToggle+'="popover"]' ] );
  10377. /* Native Javascript for Bootstrap 4 | ScrollSpy
  10378. -----------------------------------------------*/
  10379. // SCROLLSPY DEFINITION
  10380. // ====================
  10381. var ScrollSpy = function(element, options) {
  10382. // initialization element, the element we spy on
  10383. element = queryElement(element);
  10384. // DATA API
  10385. var targetData = queryElement(element[getAttribute](dataTarget)),
  10386. offsetData = element[getAttribute]('data-offset');
  10387. // set options
  10388. options = options || {};
  10389. if ( !options[target] && !targetData ) { return; } // invalidate
  10390. // event targets, constants
  10391. var self = this, spyTarget = options[target] && queryElement(options[target]) || targetData,
  10392. links = spyTarget && spyTarget[getElementsByTagName]('A'),
  10393. offset = parseInt(offsetData || options['offset']) || 10,
  10394. items = [], targetItems = [], scrollOffset,
  10395. scrollTarget = element[offsetHeight] < element[scrollHeight] ? element : globalObject, // determine which is the real scrollTarget
  10396. isWindow = scrollTarget === globalObject;
  10397. // populate items and targets
  10398. for (var i=0, il=links[length]; i<il; i++) {
  10399. var href = links[i][getAttribute]('href'),
  10400. targetItem = href && href.charAt(0) === '#' && href.slice(-1) !== '#' && queryElement(href);
  10401. if ( !!targetItem ) {
  10402. items[push](links[i]);
  10403. targetItems[push](targetItem);
  10404. }
  10405. }
  10406. // private methods
  10407. var updateItem = function(index) {
  10408. var item = items[index],
  10409. targetItem = targetItems[index], // the menu item targets this element
  10410. dropdown = item[parentNode][parentNode],
  10411. dropdownLink = hasClass(dropdown,'dropdown') && dropdown[getElementsByTagName]('A')[0],
  10412. targetRect = isWindow && targetItem[getBoundingClientRect](),
  10413. isActive = hasClass(item,active) || false,
  10414. topEdge = (isWindow ? targetRect[top] + scrollOffset : targetItem[offsetTop]) - offset,
  10415. bottomEdge = isWindow ? targetRect[bottom] + scrollOffset - offset : targetItems[index+1] ? targetItems[index+1][offsetTop] - offset : element[scrollHeight],
  10416. inside = scrollOffset >= topEdge && bottomEdge > scrollOffset;
  10417. if ( !isActive && inside ) {
  10418. if ( !hasClass(item,active) ) {
  10419. addClass(item,active);
  10420. if (dropdownLink && !hasClass(dropdownLink,active) ) {
  10421. addClass(dropdownLink,active);
  10422. }
  10423. bootstrapCustomEvent.call(element, 'activate', 'scrollspy', items[index]);
  10424. }
  10425. } else if ( !inside ) {
  10426. if ( hasClass(item,active) ) {
  10427. removeClass(item,active);
  10428. if (dropdownLink && hasClass(dropdownLink,active) && !getElementsByClassName(item[parentNode],active).length ) {
  10429. removeClass(dropdownLink,active);
  10430. }
  10431. }
  10432. } else if ( !inside && !isActive || isActive && inside ) {
  10433. return;
  10434. }
  10435. },
  10436. updateItems = function(){
  10437. scrollOffset = isWindow ? getScroll().y : element[scrollTop];
  10438. for (var index=0, itl=items[length]; index<itl; index++) {
  10439. updateItem(index)
  10440. }
  10441. };
  10442. // public method
  10443. this.refresh = function () {
  10444. updateItems();
  10445. }
  10446. // init
  10447. if ( !(stringScrollSpy in element) ) { // prevent adding event handlers twice
  10448. on( scrollTarget, scrollEvent, self.refresh );
  10449. on( globalObject, resizeEvent, self.refresh );
  10450. }
  10451. self.refresh();
  10452. element[stringScrollSpy] = self;
  10453. };
  10454. // SCROLLSPY DATA API
  10455. // ==================
  10456. supports[push]( [ stringScrollSpy, ScrollSpy, '['+dataSpy+'="scroll"]' ] );
  10457. /* Native Javascript for Bootstrap 4 | Tab
  10458. -----------------------------------------*/
  10459. // TAB DEFINITION
  10460. // ==============
  10461. var Tab = function( element, options ) {
  10462. // initialization element
  10463. element = queryElement(element);
  10464. // DATA API
  10465. var heightData = element[getAttribute](dataHeight),
  10466. // strings
  10467. component = 'tab', height = 'height', float = 'float', isAnimating = 'isAnimating';
  10468. // set options
  10469. options = options || {};
  10470. this[height] = supportTransitions ? (options[height] || heightData === 'true') : false;
  10471. // bind, event targets
  10472. var self = this, next,
  10473. tabs = getClosest(element,'.nav'),
  10474. tabsContentContainer = false,
  10475. dropdown = tabs && queryElement('.dropdown-toggle',tabs),
  10476. activeTab, activeContent, nextContent, containerHeight, equalContents, nextHeight,
  10477. // trigger
  10478. triggerEnd = function(){
  10479. tabsContentContainer[style][height] = '';
  10480. removeClass(tabsContentContainer,collapsing);
  10481. tabs[isAnimating] = false;
  10482. },
  10483. triggerShow = function() {
  10484. if (tabsContentContainer) { // height animation
  10485. if ( equalContents ) {
  10486. triggerEnd();
  10487. } else {
  10488. setTimeout(function(){ // enables height animation
  10489. tabsContentContainer[style][height] = nextHeight + 'px'; // height animation
  10490. tabsContentContainer[offsetWidth];
  10491. emulateTransitionEnd(tabsContentContainer, triggerEnd);
  10492. },50);
  10493. }
  10494. } else {
  10495. tabs[isAnimating] = false;
  10496. }
  10497. bootstrapCustomEvent.call(next, shownEvent, component, activeTab);
  10498. },
  10499. triggerHide = function() {
  10500. if (tabsContentContainer) {
  10501. activeContent[style][float] = left;
  10502. nextContent[style][float] = left;
  10503. containerHeight = activeContent[scrollHeight];
  10504. }
  10505. addClass(nextContent,active);
  10506. bootstrapCustomEvent.call(next, showEvent, component, activeTab);
  10507. removeClass(activeContent,active);
  10508. bootstrapCustomEvent.call(activeTab, hiddenEvent, component, next);
  10509. if (tabsContentContainer) {
  10510. nextHeight = nextContent[scrollHeight];
  10511. equalContents = nextHeight === containerHeight;
  10512. addClass(tabsContentContainer,collapsing);
  10513. tabsContentContainer[style][height] = containerHeight + 'px'; // height animation
  10514. tabsContentContainer[offsetHeight];
  10515. activeContent[style][float] = '';
  10516. nextContent[style][float] = '';
  10517. }
  10518. if ( hasClass(nextContent, 'fade') ) {
  10519. setTimeout(function(){
  10520. addClass(nextContent,showClass);
  10521. emulateTransitionEnd(nextContent,triggerShow);
  10522. },20);
  10523. } else { triggerShow(); }
  10524. };
  10525. if (!tabs) return; // invalidate
  10526. // set default animation state
  10527. tabs[isAnimating] = false;
  10528. // private methods
  10529. var getActiveTab = function() {
  10530. var activeTabs = getElementsByClassName(tabs,active), activeTab;
  10531. if ( activeTabs[length] === 1 && !hasClass(activeTabs[0][parentNode],'dropdown') ) {
  10532. activeTab = activeTabs[0];
  10533. } else if ( activeTabs[length] > 1 ) {
  10534. activeTab = activeTabs[activeTabs[length]-1];
  10535. }
  10536. return activeTab;
  10537. },
  10538. getActiveContent = function() {
  10539. return queryElement(getActiveTab()[getAttribute]('href'));
  10540. },
  10541. // handler
  10542. clickHandler = function(e) {
  10543. var href = e[target][getAttribute]('href');
  10544. e[preventDefault]();
  10545. next = e[target][getAttribute](dataToggle) === component || (href && href.charAt(0) === '#')
  10546. ? e[target] : e[target][parentNode]; // allow for child elements like icons to use the handler
  10547. !tabs[isAnimating] && !hasClass(next,active) && self.show();
  10548. };
  10549. // public method
  10550. this.show = function() { // the tab we clicked is now the next tab
  10551. next = next || element;
  10552. nextContent = queryElement(next[getAttribute]('href')); //this is the actual object, the next tab content to activate
  10553. activeTab = getActiveTab();
  10554. activeContent = getActiveContent();
  10555. tabs[isAnimating] = true;
  10556. removeClass(activeTab,active);
  10557. addClass(next,active);
  10558. if ( dropdown ) {
  10559. if ( !hasClass(element[parentNode],'dropdown-menu') ) {
  10560. if (hasClass(dropdown,active)) removeClass(dropdown,active);
  10561. } else {
  10562. if (!hasClass(dropdown,active)) addClass(dropdown,active);
  10563. }
  10564. }
  10565. bootstrapCustomEvent.call(activeTab, hideEvent, component, next);
  10566. if (hasClass(activeContent, 'fade')) {
  10567. removeClass(activeContent,showClass);
  10568. emulateTransitionEnd(activeContent, triggerHide);
  10569. } else { triggerHide(); }
  10570. };
  10571. // init
  10572. if ( !(stringTab in element) ) { // prevent adding event handlers twice
  10573. on(element, clickEvent, clickHandler);
  10574. }
  10575. if (self[height]) { tabsContentContainer = getActiveContent()[parentNode]; }
  10576. element[stringTab] = self;
  10577. };
  10578. // TAB DATA API
  10579. // ============
  10580. supports[push]( [ stringTab, Tab, '['+dataToggle+'="tab"]' ] );
  10581. /* Native Javascript for Bootstrap 4 | Tooltip
  10582. ---------------------------------------------*/
  10583. // TOOLTIP DEFINITION
  10584. // ==================
  10585. var Tooltip = function( element,options ) {
  10586. // initialization element
  10587. element = queryElement(element);
  10588. // set options
  10589. options = options || {};
  10590. // DATA API
  10591. var animationData = element[getAttribute](dataAnimation),
  10592. placementData = element[getAttribute](dataPlacement),
  10593. delayData = element[getAttribute](dataDelay),
  10594. containerData = element[getAttribute](dataContainer),
  10595. // strings
  10596. component = 'tooltip',
  10597. classString = 'class',
  10598. title = 'title',
  10599. fade = 'fade',
  10600. div = 'div',
  10601. // check container
  10602. containerElement = queryElement(options[container]),
  10603. containerDataElement = queryElement(containerData),
  10604. // maybe the element is inside a modal
  10605. modal = getClosest(element,'.modal'),
  10606. // maybe the element is inside a fixed navbar
  10607. navbarFixedTop = getClosest(element,'.'+fixedTop),
  10608. navbarFixedBottom = getClosest(element,'.'+fixedBottom);
  10609. // set instance options
  10610. this[animation] = options[animation] && options[animation] !== fade ? options[animation] : animationData || fade;
  10611. this[placement] = options[placement] ? options[placement] : placementData || top;
  10612. this[delay] = parseInt(options[delay] || delayData) || 200;
  10613. this[container] = containerElement ? containerElement
  10614. : containerDataElement ? containerDataElement
  10615. : navbarFixedTop ? navbarFixedTop
  10616. : navbarFixedBottom ? navbarFixedBottom
  10617. : modal ? modal : DOC[body];
  10618. // bind, event targets, title and constants
  10619. var self = this, timer = 0, placementSetting = this[placement], tooltip = null,
  10620. titleString = element[getAttribute](title) || element[getAttribute](dataTitle) || element[getAttribute](dataOriginalTitle);
  10621. if ( !titleString || titleString == "" ) return; // invalidate
  10622. // private methods
  10623. var removeToolTip = function() {
  10624. self[container].removeChild(tooltip);
  10625. tooltip = null; timer = null;
  10626. },
  10627. createToolTip = function() {
  10628. titleString = element[getAttribute](title) || element[getAttribute](dataTitle) || element[getAttribute](dataOriginalTitle); // read the title again
  10629. if ( !titleString || titleString == "" ) return false; // invalidate
  10630. tooltip = DOC[createElement](div);
  10631. tooltip[setAttribute]('role',component);
  10632. // tooltip arrow
  10633. var tooltipArrow = DOC[createElement](div);
  10634. tooltipArrow[setAttribute](classString,'arrow');
  10635. tooltip[appendChild](tooltipArrow);
  10636. var tooltipInner = DOC[createElement](div);
  10637. tooltipInner[setAttribute](classString,component+'-inner');
  10638. tooltip[appendChild](tooltipInner);
  10639. tooltipInner[innerHTML] = titleString;
  10640. self[container][appendChild](tooltip);
  10641. tooltip[setAttribute](classString, component + ' bs-' + component+'-'+placementSetting + ' ' + self[animation]);
  10642. },
  10643. updateTooltip = function () {
  10644. styleTip(element,tooltip,placementSetting,self[container]);
  10645. },
  10646. showTooltip = function () {
  10647. !hasClass(tooltip,showClass) && ( addClass(tooltip,showClass) );
  10648. },
  10649. // triggers
  10650. showTrigger = function() {
  10651. on( globalObject, resizeEvent, self.hide );
  10652. bootstrapCustomEvent.call(element, shownEvent, component);
  10653. },
  10654. hideTrigger = function() {
  10655. off( globalObject, resizeEvent, self.hide );
  10656. removeToolTip();
  10657. bootstrapCustomEvent.call(element, hiddenEvent, component);
  10658. };
  10659. // public methods
  10660. this.show = function() {
  10661. clearTimeout(timer);
  10662. timer = setTimeout( function() {
  10663. if (tooltip === null) {
  10664. placementSetting = self[placement]; // we reset placement in all cases
  10665. if(createToolTip() == false) return;
  10666. updateTooltip();
  10667. showTooltip();
  10668. bootstrapCustomEvent.call(element, showEvent, component);
  10669. !!self[animation] ? emulateTransitionEnd(tooltip, showTrigger) : showTrigger();
  10670. }
  10671. }, 20 );
  10672. };
  10673. this.hide = function() {
  10674. clearTimeout(timer);
  10675. timer = setTimeout( function() {
  10676. if (tooltip && hasClass(tooltip,showClass)) {
  10677. bootstrapCustomEvent.call(element, hideEvent, component);
  10678. removeClass(tooltip,showClass);
  10679. !!self[animation] ? emulateTransitionEnd(tooltip, hideTrigger) : hideTrigger();
  10680. }
  10681. }, self[delay]);
  10682. };
  10683. this.toggle = function() {
  10684. if (!tooltip) { self.show(); }
  10685. else { self.hide(); }
  10686. };
  10687. // init
  10688. if ( !(stringTooltip in element) ) { // prevent adding event handlers twice
  10689. element[setAttribute](dataOriginalTitle,titleString);
  10690. element.removeAttribute(title);
  10691. on(element, mouseHover[0], self.show);
  10692. on(element, mouseHover[1], self.hide);
  10693. }
  10694. element[stringTooltip] = self;
  10695. };
  10696. // TOOLTIP DATA API
  10697. // =================
  10698. supports[push]( [ stringTooltip, Tooltip, '['+dataToggle+'="tooltip"]' ] );
  10699. /* Native Javascript for Bootstrap 4 | Initialize Data API
  10700. --------------------------------------------------------*/
  10701. var initializeDataAPI = function( constructor, collection ){
  10702. for (var i=0, l=collection[length]; i<l; i++) {
  10703. new constructor(collection[i]);
  10704. }
  10705. },
  10706. initCallback = BSN.initCallback = function(lookUp){
  10707. lookUp = lookUp || DOC;
  10708. for (var i=0, l=supports[length]; i<l; i++) {
  10709. initializeDataAPI( supports[i][1], lookUp[querySelectorAll] (supports[i][2]) );
  10710. }
  10711. };
  10712. // bulk initialize all components
  10713. DOC[body] ? initCallback() : on( DOC, 'DOMContentLoaded', function(){ initCallback(); } );
  10714. return {
  10715. Alert: Alert,
  10716. Button: Button,
  10717. Carousel: Carousel,
  10718. Collapse: Collapse,
  10719. Dropdown: Dropdown,
  10720. Modal: Modal,
  10721. Popover: Popover,
  10722. ScrollSpy: ScrollSpy,
  10723. Tab: Tab,
  10724. Tooltip: Tooltip
  10725. };
  10726. }));
  10727. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  10728. /***/ }),
  10729. /***/ "./node_modules/es6-promise/dist/es6-promise.auto.js":
  10730. /*!***********************************************************!*\
  10731. !*** ./node_modules/es6-promise/dist/es6-promise.auto.js ***!
  10732. \***********************************************************/
  10733. /*! no static exports found */
  10734. /***/ (function(module, exports, __webpack_require__) {
  10735. /* WEBPACK VAR INJECTION */(function(process, global) {/*!
  10736. * @overview es6-promise - a tiny implementation of Promises/A+.
  10737. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
  10738. * @license Licensed under MIT license
  10739. * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
  10740. * @version v4.2.4+314e4831
  10741. */
  10742. (function (global, factory) {
  10743. true ? module.exports = factory() :
  10744. undefined;
  10745. }(this, (function () { 'use strict';
  10746. function objectOrFunction(x) {
  10747. var type = typeof x;
  10748. return x !== null && (type === 'object' || type === 'function');
  10749. }
  10750. function isFunction(x) {
  10751. return typeof x === 'function';
  10752. }
  10753. var _isArray = void 0;
  10754. if (Array.isArray) {
  10755. _isArray = Array.isArray;
  10756. } else {
  10757. _isArray = function (x) {
  10758. return Object.prototype.toString.call(x) === '[object Array]';
  10759. };
  10760. }
  10761. var isArray = _isArray;
  10762. var len = 0;
  10763. var vertxNext = void 0;
  10764. var customSchedulerFn = void 0;
  10765. var asap = function asap(callback, arg) {
  10766. queue[len] = callback;
  10767. queue[len + 1] = arg;
  10768. len += 2;
  10769. if (len === 2) {
  10770. // If len is 2, that means that we need to schedule an async flush.
  10771. // If additional callbacks are queued before the queue is flushed, they
  10772. // will be processed by this flush that we are scheduling.
  10773. if (customSchedulerFn) {
  10774. customSchedulerFn(flush);
  10775. } else {
  10776. scheduleFlush();
  10777. }
  10778. }
  10779. };
  10780. function setScheduler(scheduleFn) {
  10781. customSchedulerFn = scheduleFn;
  10782. }
  10783. function setAsap(asapFn) {
  10784. asap = asapFn;
  10785. }
  10786. var browserWindow = typeof window !== 'undefined' ? window : undefined;
  10787. var browserGlobal = browserWindow || {};
  10788. var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;
  10789. var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
  10790. // test for web worker but not in IE10
  10791. var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined';
  10792. // node
  10793. function useNextTick() {
  10794. // node version 0.10.x displays a deprecation warning when nextTick is used recursively
  10795. // see https://github.com/cujojs/when/issues/410 for details
  10796. return function () {
  10797. return process.nextTick(flush);
  10798. };
  10799. }
  10800. // vertx
  10801. function useVertxTimer() {
  10802. if (typeof vertxNext !== 'undefined') {
  10803. return function () {
  10804. vertxNext(flush);
  10805. };
  10806. }
  10807. return useSetTimeout();
  10808. }
  10809. function useMutationObserver() {
  10810. var iterations = 0;
  10811. var observer = new BrowserMutationObserver(flush);
  10812. var node = document.createTextNode('');
  10813. observer.observe(node, { characterData: true });
  10814. return function () {
  10815. node.data = iterations = ++iterations % 2;
  10816. };
  10817. }
  10818. // web worker
  10819. function useMessageChannel() {
  10820. var channel = new MessageChannel();
  10821. channel.port1.onmessage = flush;
  10822. return function () {
  10823. return channel.port2.postMessage(0);
  10824. };
  10825. }
  10826. function useSetTimeout() {
  10827. // Store setTimeout reference so es6-promise will be unaffected by
  10828. // other code modifying setTimeout (like sinon.useFakeTimers())
  10829. var globalSetTimeout = setTimeout;
  10830. return function () {
  10831. return globalSetTimeout(flush, 1);
  10832. };
  10833. }
  10834. var queue = new Array(1000);
  10835. function flush() {
  10836. for (var i = 0; i < len; i += 2) {
  10837. var callback = queue[i];
  10838. var arg = queue[i + 1];
  10839. callback(arg);
  10840. queue[i] = undefined;
  10841. queue[i + 1] = undefined;
  10842. }
  10843. len = 0;
  10844. }
  10845. function attemptVertx() {
  10846. try {
  10847. var vertx = Function('return this')().require('vertx');
  10848. vertxNext = vertx.runOnLoop || vertx.runOnContext;
  10849. return useVertxTimer();
  10850. } catch (e) {
  10851. return useSetTimeout();
  10852. }
  10853. }
  10854. var scheduleFlush = void 0;
  10855. // Decide what async method to use to triggering processing of queued callbacks:
  10856. if (isNode) {
  10857. scheduleFlush = useNextTick();
  10858. } else if (BrowserMutationObserver) {
  10859. scheduleFlush = useMutationObserver();
  10860. } else if (isWorker) {
  10861. scheduleFlush = useMessageChannel();
  10862. } else if (browserWindow === undefined && "function" === 'function') {
  10863. scheduleFlush = attemptVertx();
  10864. } else {
  10865. scheduleFlush = useSetTimeout();
  10866. }
  10867. function then(onFulfillment, onRejection) {
  10868. var parent = this;
  10869. var child = new this.constructor(noop);
  10870. if (child[PROMISE_ID] === undefined) {
  10871. makePromise(child);
  10872. }
  10873. var _state = parent._state;
  10874. if (_state) {
  10875. var callback = arguments[_state - 1];
  10876. asap(function () {
  10877. return invokeCallback(_state, child, callback, parent._result);
  10878. });
  10879. } else {
  10880. subscribe(parent, child, onFulfillment, onRejection);
  10881. }
  10882. return child;
  10883. }
  10884. /**
  10885. `Promise.resolve` returns a promise that will become resolved with the
  10886. passed `value`. It is shorthand for the following:
  10887. ```javascript
  10888. let promise = new Promise(function(resolve, reject){
  10889. resolve(1);
  10890. });
  10891. promise.then(function(value){
  10892. // value === 1
  10893. });
  10894. ```
  10895. Instead of writing the above, your code now simply becomes the following:
  10896. ```javascript
  10897. let promise = Promise.resolve(1);
  10898. promise.then(function(value){
  10899. // value === 1
  10900. });
  10901. ```
  10902. @method resolve
  10903. @static
  10904. @param {Any} value value that the returned promise will be resolved with
  10905. Useful for tooling.
  10906. @return {Promise} a promise that will become fulfilled with the given
  10907. `value`
  10908. */
  10909. function resolve$1(object) {
  10910. /*jshint validthis:true */
  10911. var Constructor = this;
  10912. if (object && typeof object === 'object' && object.constructor === Constructor) {
  10913. return object;
  10914. }
  10915. var promise = new Constructor(noop);
  10916. resolve(promise, object);
  10917. return promise;
  10918. }
  10919. var PROMISE_ID = Math.random().toString(36).substring(2);
  10920. function noop() {}
  10921. var PENDING = void 0;
  10922. var FULFILLED = 1;
  10923. var REJECTED = 2;
  10924. var TRY_CATCH_ERROR = { error: null };
  10925. function selfFulfillment() {
  10926. return new TypeError("You cannot resolve a promise with itself");
  10927. }
  10928. function cannotReturnOwn() {
  10929. return new TypeError('A promises callback cannot return that same promise.');
  10930. }
  10931. function getThen(promise) {
  10932. try {
  10933. return promise.then;
  10934. } catch (error) {
  10935. TRY_CATCH_ERROR.error = error;
  10936. return TRY_CATCH_ERROR;
  10937. }
  10938. }
  10939. function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {
  10940. try {
  10941. then$$1.call(value, fulfillmentHandler, rejectionHandler);
  10942. } catch (e) {
  10943. return e;
  10944. }
  10945. }
  10946. function handleForeignThenable(promise, thenable, then$$1) {
  10947. asap(function (promise) {
  10948. var sealed = false;
  10949. var error = tryThen(then$$1, thenable, function (value) {
  10950. if (sealed) {
  10951. return;
  10952. }
  10953. sealed = true;
  10954. if (thenable !== value) {
  10955. resolve(promise, value);
  10956. } else {
  10957. fulfill(promise, value);
  10958. }
  10959. }, function (reason) {
  10960. if (sealed) {
  10961. return;
  10962. }
  10963. sealed = true;
  10964. reject(promise, reason);
  10965. }, 'Settle: ' + (promise._label || ' unknown promise'));
  10966. if (!sealed && error) {
  10967. sealed = true;
  10968. reject(promise, error);
  10969. }
  10970. }, promise);
  10971. }
  10972. function handleOwnThenable(promise, thenable) {
  10973. if (thenable._state === FULFILLED) {
  10974. fulfill(promise, thenable._result);
  10975. } else if (thenable._state === REJECTED) {
  10976. reject(promise, thenable._result);
  10977. } else {
  10978. subscribe(thenable, undefined, function (value) {
  10979. return resolve(promise, value);
  10980. }, function (reason) {
  10981. return reject(promise, reason);
  10982. });
  10983. }
  10984. }
  10985. function handleMaybeThenable(promise, maybeThenable, then$$1) {
  10986. if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {
  10987. handleOwnThenable(promise, maybeThenable);
  10988. } else {
  10989. if (then$$1 === TRY_CATCH_ERROR) {
  10990. reject(promise, TRY_CATCH_ERROR.error);
  10991. TRY_CATCH_ERROR.error = null;
  10992. } else if (then$$1 === undefined) {
  10993. fulfill(promise, maybeThenable);
  10994. } else if (isFunction(then$$1)) {
  10995. handleForeignThenable(promise, maybeThenable, then$$1);
  10996. } else {
  10997. fulfill(promise, maybeThenable);
  10998. }
  10999. }
  11000. }
  11001. function resolve(promise, value) {
  11002. if (promise === value) {
  11003. reject(promise, selfFulfillment());
  11004. } else if (objectOrFunction(value)) {
  11005. handleMaybeThenable(promise, value, getThen(value));
  11006. } else {
  11007. fulfill(promise, value);
  11008. }
  11009. }
  11010. function publishRejection(promise) {
  11011. if (promise._onerror) {
  11012. promise._onerror(promise._result);
  11013. }
  11014. publish(promise);
  11015. }
  11016. function fulfill(promise, value) {
  11017. if (promise._state !== PENDING) {
  11018. return;
  11019. }
  11020. promise._result = value;
  11021. promise._state = FULFILLED;
  11022. if (promise._subscribers.length !== 0) {
  11023. asap(publish, promise);
  11024. }
  11025. }
  11026. function reject(promise, reason) {
  11027. if (promise._state !== PENDING) {
  11028. return;
  11029. }
  11030. promise._state = REJECTED;
  11031. promise._result = reason;
  11032. asap(publishRejection, promise);
  11033. }
  11034. function subscribe(parent, child, onFulfillment, onRejection) {
  11035. var _subscribers = parent._subscribers;
  11036. var length = _subscribers.length;
  11037. parent._onerror = null;
  11038. _subscribers[length] = child;
  11039. _subscribers[length + FULFILLED] = onFulfillment;
  11040. _subscribers[length + REJECTED] = onRejection;
  11041. if (length === 0 && parent._state) {
  11042. asap(publish, parent);
  11043. }
  11044. }
  11045. function publish(promise) {
  11046. var subscribers = promise._subscribers;
  11047. var settled = promise._state;
  11048. if (subscribers.length === 0) {
  11049. return;
  11050. }
  11051. var child = void 0,
  11052. callback = void 0,
  11053. detail = promise._result;
  11054. for (var i = 0; i < subscribers.length; i += 3) {
  11055. child = subscribers[i];
  11056. callback = subscribers[i + settled];
  11057. if (child) {
  11058. invokeCallback(settled, child, callback, detail);
  11059. } else {
  11060. callback(detail);
  11061. }
  11062. }
  11063. promise._subscribers.length = 0;
  11064. }
  11065. function tryCatch(callback, detail) {
  11066. try {
  11067. return callback(detail);
  11068. } catch (e) {
  11069. TRY_CATCH_ERROR.error = e;
  11070. return TRY_CATCH_ERROR;
  11071. }
  11072. }
  11073. function invokeCallback(settled, promise, callback, detail) {
  11074. var hasCallback = isFunction(callback),
  11075. value = void 0,
  11076. error = void 0,
  11077. succeeded = void 0,
  11078. failed = void 0;
  11079. if (hasCallback) {
  11080. value = tryCatch(callback, detail);
  11081. if (value === TRY_CATCH_ERROR) {
  11082. failed = true;
  11083. error = value.error;
  11084. value.error = null;
  11085. } else {
  11086. succeeded = true;
  11087. }
  11088. if (promise === value) {
  11089. reject(promise, cannotReturnOwn());
  11090. return;
  11091. }
  11092. } else {
  11093. value = detail;
  11094. succeeded = true;
  11095. }
  11096. if (promise._state !== PENDING) {
  11097. // noop
  11098. } else if (hasCallback && succeeded) {
  11099. resolve(promise, value);
  11100. } else if (failed) {
  11101. reject(promise, error);
  11102. } else if (settled === FULFILLED) {
  11103. fulfill(promise, value);
  11104. } else if (settled === REJECTED) {
  11105. reject(promise, value);
  11106. }
  11107. }
  11108. function initializePromise(promise, resolver) {
  11109. try {
  11110. resolver(function resolvePromise(value) {
  11111. resolve(promise, value);
  11112. }, function rejectPromise(reason) {
  11113. reject(promise, reason);
  11114. });
  11115. } catch (e) {
  11116. reject(promise, e);
  11117. }
  11118. }
  11119. var id = 0;
  11120. function nextId() {
  11121. return id++;
  11122. }
  11123. function makePromise(promise) {
  11124. promise[PROMISE_ID] = id++;
  11125. promise._state = undefined;
  11126. promise._result = undefined;
  11127. promise._subscribers = [];
  11128. }
  11129. function validationError() {
  11130. return new Error('Array Methods must be provided an Array');
  11131. }
  11132. var Enumerator = function () {
  11133. function Enumerator(Constructor, input) {
  11134. this._instanceConstructor = Constructor;
  11135. this.promise = new Constructor(noop);
  11136. if (!this.promise[PROMISE_ID]) {
  11137. makePromise(this.promise);
  11138. }
  11139. if (isArray(input)) {
  11140. this.length = input.length;
  11141. this._remaining = input.length;
  11142. this._result = new Array(this.length);
  11143. if (this.length === 0) {
  11144. fulfill(this.promise, this._result);
  11145. } else {
  11146. this.length = this.length || 0;
  11147. this._enumerate(input);
  11148. if (this._remaining === 0) {
  11149. fulfill(this.promise, this._result);
  11150. }
  11151. }
  11152. } else {
  11153. reject(this.promise, validationError());
  11154. }
  11155. }
  11156. Enumerator.prototype._enumerate = function _enumerate(input) {
  11157. for (var i = 0; this._state === PENDING && i < input.length; i++) {
  11158. this._eachEntry(input[i], i);
  11159. }
  11160. };
  11161. Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {
  11162. var c = this._instanceConstructor;
  11163. var resolve$$1 = c.resolve;
  11164. if (resolve$$1 === resolve$1) {
  11165. var _then = getThen(entry);
  11166. if (_then === then && entry._state !== PENDING) {
  11167. this._settledAt(entry._state, i, entry._result);
  11168. } else if (typeof _then !== 'function') {
  11169. this._remaining--;
  11170. this._result[i] = entry;
  11171. } else if (c === Promise$2) {
  11172. var promise = new c(noop);
  11173. handleMaybeThenable(promise, entry, _then);
  11174. this._willSettleAt(promise, i);
  11175. } else {
  11176. this._willSettleAt(new c(function (resolve$$1) {
  11177. return resolve$$1(entry);
  11178. }), i);
  11179. }
  11180. } else {
  11181. this._willSettleAt(resolve$$1(entry), i);
  11182. }
  11183. };
  11184. Enumerator.prototype._settledAt = function _settledAt(state, i, value) {
  11185. var promise = this.promise;
  11186. if (promise._state === PENDING) {
  11187. this._remaining--;
  11188. if (state === REJECTED) {
  11189. reject(promise, value);
  11190. } else {
  11191. this._result[i] = value;
  11192. }
  11193. }
  11194. if (this._remaining === 0) {
  11195. fulfill(promise, this._result);
  11196. }
  11197. };
  11198. Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {
  11199. var enumerator = this;
  11200. subscribe(promise, undefined, function (value) {
  11201. return enumerator._settledAt(FULFILLED, i, value);
  11202. }, function (reason) {
  11203. return enumerator._settledAt(REJECTED, i, reason);
  11204. });
  11205. };
  11206. return Enumerator;
  11207. }();
  11208. /**
  11209. `Promise.all` accepts an array of promises, and returns a new promise which
  11210. is fulfilled with an array of fulfillment values for the passed promises, or
  11211. rejected with the reason of the first passed promise to be rejected. It casts all
  11212. elements of the passed iterable to promises as it runs this algorithm.
  11213. Example:
  11214. ```javascript
  11215. let promise1 = resolve(1);
  11216. let promise2 = resolve(2);
  11217. let promise3 = resolve(3);
  11218. let promises = [ promise1, promise2, promise3 ];
  11219. Promise.all(promises).then(function(array){
  11220. // The array here would be [ 1, 2, 3 ];
  11221. });
  11222. ```
  11223. If any of the `promises` given to `all` are rejected, the first promise
  11224. that is rejected will be given as an argument to the returned promises's
  11225. rejection handler. For example:
  11226. Example:
  11227. ```javascript
  11228. let promise1 = resolve(1);
  11229. let promise2 = reject(new Error("2"));
  11230. let promise3 = reject(new Error("3"));
  11231. let promises = [ promise1, promise2, promise3 ];
  11232. Promise.all(promises).then(function(array){
  11233. // Code here never runs because there are rejected promises!
  11234. }, function(error) {
  11235. // error.message === "2"
  11236. });
  11237. ```
  11238. @method all
  11239. @static
  11240. @param {Array} entries array of promises
  11241. @param {String} label optional string for labeling the promise.
  11242. Useful for tooling.
  11243. @return {Promise} promise that is fulfilled when all `promises` have been
  11244. fulfilled, or rejected if any of them become rejected.
  11245. @static
  11246. */
  11247. function all(entries) {
  11248. return new Enumerator(this, entries).promise;
  11249. }
  11250. /**
  11251. `Promise.race` returns a new promise which is settled in the same way as the
  11252. first passed promise to settle.
  11253. Example:
  11254. ```javascript
  11255. let promise1 = new Promise(function(resolve, reject){
  11256. setTimeout(function(){
  11257. resolve('promise 1');
  11258. }, 200);
  11259. });
  11260. let promise2 = new Promise(function(resolve, reject){
  11261. setTimeout(function(){
  11262. resolve('promise 2');
  11263. }, 100);
  11264. });
  11265. Promise.race([promise1, promise2]).then(function(result){
  11266. // result === 'promise 2' because it was resolved before promise1
  11267. // was resolved.
  11268. });
  11269. ```
  11270. `Promise.race` is deterministic in that only the state of the first
  11271. settled promise matters. For example, even if other promises given to the
  11272. `promises` array argument are resolved, but the first settled promise has
  11273. become rejected before the other promises became fulfilled, the returned
  11274. promise will become rejected:
  11275. ```javascript
  11276. let promise1 = new Promise(function(resolve, reject){
  11277. setTimeout(function(){
  11278. resolve('promise 1');
  11279. }, 200);
  11280. });
  11281. let promise2 = new Promise(function(resolve, reject){
  11282. setTimeout(function(){
  11283. reject(new Error('promise 2'));
  11284. }, 100);
  11285. });
  11286. Promise.race([promise1, promise2]).then(function(result){
  11287. // Code here never runs
  11288. }, function(reason){
  11289. // reason.message === 'promise 2' because promise 2 became rejected before
  11290. // promise 1 became fulfilled
  11291. });
  11292. ```
  11293. An example real-world use case is implementing timeouts:
  11294. ```javascript
  11295. Promise.race([ajax('foo.json'), timeout(5000)])
  11296. ```
  11297. @method race
  11298. @static
  11299. @param {Array} promises array of promises to observe
  11300. Useful for tooling.
  11301. @return {Promise} a promise which settles in the same way as the first passed
  11302. promise to settle.
  11303. */
  11304. function race(entries) {
  11305. /*jshint validthis:true */
  11306. var Constructor = this;
  11307. if (!isArray(entries)) {
  11308. return new Constructor(function (_, reject) {
  11309. return reject(new TypeError('You must pass an array to race.'));
  11310. });
  11311. } else {
  11312. return new Constructor(function (resolve, reject) {
  11313. var length = entries.length;
  11314. for (var i = 0; i < length; i++) {
  11315. Constructor.resolve(entries[i]).then(resolve, reject);
  11316. }
  11317. });
  11318. }
  11319. }
  11320. /**
  11321. `Promise.reject` returns a promise rejected with the passed `reason`.
  11322. It is shorthand for the following:
  11323. ```javascript
  11324. let promise = new Promise(function(resolve, reject){
  11325. reject(new Error('WHOOPS'));
  11326. });
  11327. promise.then(function(value){
  11328. // Code here doesn't run because the promise is rejected!
  11329. }, function(reason){
  11330. // reason.message === 'WHOOPS'
  11331. });
  11332. ```
  11333. Instead of writing the above, your code now simply becomes the following:
  11334. ```javascript
  11335. let promise = Promise.reject(new Error('WHOOPS'));
  11336. promise.then(function(value){
  11337. // Code here doesn't run because the promise is rejected!
  11338. }, function(reason){
  11339. // reason.message === 'WHOOPS'
  11340. });
  11341. ```
  11342. @method reject
  11343. @static
  11344. @param {Any} reason value that the returned promise will be rejected with.
  11345. Useful for tooling.
  11346. @return {Promise} a promise rejected with the given `reason`.
  11347. */
  11348. function reject$1(reason) {
  11349. /*jshint validthis:true */
  11350. var Constructor = this;
  11351. var promise = new Constructor(noop);
  11352. reject(promise, reason);
  11353. return promise;
  11354. }
  11355. function needsResolver() {
  11356. throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
  11357. }
  11358. function needsNew() {
  11359. throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
  11360. }
  11361. /**
  11362. Promise objects represent the eventual result of an asynchronous operation. The
  11363. primary way of interacting with a promise is through its `then` method, which
  11364. registers callbacks to receive either a promise's eventual value or the reason
  11365. why the promise cannot be fulfilled.
  11366. Terminology
  11367. -----------
  11368. - `promise` is an object or function with a `then` method whose behavior conforms to this specification.
  11369. - `thenable` is an object or function that defines a `then` method.
  11370. - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
  11371. - `exception` is a value that is thrown using the throw statement.
  11372. - `reason` is a value that indicates why a promise was rejected.
  11373. - `settled` the final resting state of a promise, fulfilled or rejected.
  11374. A promise can be in one of three states: pending, fulfilled, or rejected.
  11375. Promises that are fulfilled have a fulfillment value and are in the fulfilled
  11376. state. Promises that are rejected have a rejection reason and are in the
  11377. rejected state. A fulfillment value is never a thenable.
  11378. Promises can also be said to *resolve* a value. If this value is also a
  11379. promise, then the original promise's settled state will match the value's
  11380. settled state. So a promise that *resolves* a promise that rejects will
  11381. itself reject, and a promise that *resolves* a promise that fulfills will
  11382. itself fulfill.
  11383. Basic Usage:
  11384. ------------
  11385. ```js
  11386. let promise = new Promise(function(resolve, reject) {
  11387. // on success
  11388. resolve(value);
  11389. // on failure
  11390. reject(reason);
  11391. });
  11392. promise.then(function(value) {
  11393. // on fulfillment
  11394. }, function(reason) {
  11395. // on rejection
  11396. });
  11397. ```
  11398. Advanced Usage:
  11399. ---------------
  11400. Promises shine when abstracting away asynchronous interactions such as
  11401. `XMLHttpRequest`s.
  11402. ```js
  11403. function getJSON(url) {
  11404. return new Promise(function(resolve, reject){
  11405. let xhr = new XMLHttpRequest();
  11406. xhr.open('GET', url);
  11407. xhr.onreadystatechange = handler;
  11408. xhr.responseType = 'json';
  11409. xhr.setRequestHeader('Accept', 'application/json');
  11410. xhr.send();
  11411. function handler() {
  11412. if (this.readyState === this.DONE) {
  11413. if (this.status === 200) {
  11414. resolve(this.response);
  11415. } else {
  11416. reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));
  11417. }
  11418. }
  11419. };
  11420. });
  11421. }
  11422. getJSON('/posts.json').then(function(json) {
  11423. // on fulfillment
  11424. }, function(reason) {
  11425. // on rejection
  11426. });
  11427. ```
  11428. Unlike callbacks, promises are great composable primitives.
  11429. ```js
  11430. Promise.all([
  11431. getJSON('/posts'),
  11432. getJSON('/comments')
  11433. ]).then(function(values){
  11434. values[0] // => postsJSON
  11435. values[1] // => commentsJSON
  11436. return values;
  11437. });
  11438. ```
  11439. @class Promise
  11440. @param {Function} resolver
  11441. Useful for tooling.
  11442. @constructor
  11443. */
  11444. var Promise$2 = function () {
  11445. function Promise(resolver) {
  11446. this[PROMISE_ID] = nextId();
  11447. this._result = this._state = undefined;
  11448. this._subscribers = [];
  11449. if (noop !== resolver) {
  11450. typeof resolver !== 'function' && needsResolver();
  11451. this instanceof Promise ? initializePromise(this, resolver) : needsNew();
  11452. }
  11453. }
  11454. /**
  11455. The primary way of interacting with a promise is through its `then` method,
  11456. which registers callbacks to receive either a promise's eventual value or the
  11457. reason why the promise cannot be fulfilled.
  11458. ```js
  11459. findUser().then(function(user){
  11460. // user is available
  11461. }, function(reason){
  11462. // user is unavailable, and you are given the reason why
  11463. });
  11464. ```
  11465. Chaining
  11466. --------
  11467. The return value of `then` is itself a promise. This second, 'downstream'
  11468. promise is resolved with the return value of the first promise's fulfillment
  11469. or rejection handler, or rejected if the handler throws an exception.
  11470. ```js
  11471. findUser().then(function (user) {
  11472. return user.name;
  11473. }, function (reason) {
  11474. return 'default name';
  11475. }).then(function (userName) {
  11476. // If `findUser` fulfilled, `userName` will be the user's name, otherwise it
  11477. // will be `'default name'`
  11478. });
  11479. findUser().then(function (user) {
  11480. throw new Error('Found user, but still unhappy');
  11481. }, function (reason) {
  11482. throw new Error('`findUser` rejected and we're unhappy');
  11483. }).then(function (value) {
  11484. // never reached
  11485. }, function (reason) {
  11486. // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
  11487. // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
  11488. });
  11489. ```
  11490. If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
  11491. ```js
  11492. findUser().then(function (user) {
  11493. throw new PedagogicalException('Upstream error');
  11494. }).then(function (value) {
  11495. // never reached
  11496. }).then(function (value) {
  11497. // never reached
  11498. }, function (reason) {
  11499. // The `PedgagocialException` is propagated all the way down to here
  11500. });
  11501. ```
  11502. Assimilation
  11503. ------------
  11504. Sometimes the value you want to propagate to a downstream promise can only be
  11505. retrieved asynchronously. This can be achieved by returning a promise in the
  11506. fulfillment or rejection handler. The downstream promise will then be pending
  11507. until the returned promise is settled. This is called *assimilation*.
  11508. ```js
  11509. findUser().then(function (user) {
  11510. return findCommentsByAuthor(user);
  11511. }).then(function (comments) {
  11512. // The user's comments are now available
  11513. });
  11514. ```
  11515. If the assimliated promise rejects, then the downstream promise will also reject.
  11516. ```js
  11517. findUser().then(function (user) {
  11518. return findCommentsByAuthor(user);
  11519. }).then(function (comments) {
  11520. // If `findCommentsByAuthor` fulfills, we'll have the value here
  11521. }, function (reason) {
  11522. // If `findCommentsByAuthor` rejects, we'll have the reason here
  11523. });
  11524. ```
  11525. Simple Example
  11526. --------------
  11527. Synchronous Example
  11528. ```javascript
  11529. let result;
  11530. try {
  11531. result = findResult();
  11532. // success
  11533. } catch(reason) {
  11534. // failure
  11535. }
  11536. ```
  11537. Errback Example
  11538. ```js
  11539. findResult(function(result, err){
  11540. if (err) {
  11541. // failure
  11542. } else {
  11543. // success
  11544. }
  11545. });
  11546. ```
  11547. Promise Example;
  11548. ```javascript
  11549. findResult().then(function(result){
  11550. // success
  11551. }, function(reason){
  11552. // failure
  11553. });
  11554. ```
  11555. Advanced Example
  11556. --------------
  11557. Synchronous Example
  11558. ```javascript
  11559. let author, books;
  11560. try {
  11561. author = findAuthor();
  11562. books = findBooksByAuthor(author);
  11563. // success
  11564. } catch(reason) {
  11565. // failure
  11566. }
  11567. ```
  11568. Errback Example
  11569. ```js
  11570. function foundBooks(books) {
  11571. }
  11572. function failure(reason) {
  11573. }
  11574. findAuthor(function(author, err){
  11575. if (err) {
  11576. failure(err);
  11577. // failure
  11578. } else {
  11579. try {
  11580. findBoooksByAuthor(author, function(books, err) {
  11581. if (err) {
  11582. failure(err);
  11583. } else {
  11584. try {
  11585. foundBooks(books);
  11586. } catch(reason) {
  11587. failure(reason);
  11588. }
  11589. }
  11590. });
  11591. } catch(error) {
  11592. failure(err);
  11593. }
  11594. // success
  11595. }
  11596. });
  11597. ```
  11598. Promise Example;
  11599. ```javascript
  11600. findAuthor().
  11601. then(findBooksByAuthor).
  11602. then(function(books){
  11603. // found books
  11604. }).catch(function(reason){
  11605. // something went wrong
  11606. });
  11607. ```
  11608. @method then
  11609. @param {Function} onFulfilled
  11610. @param {Function} onRejected
  11611. Useful for tooling.
  11612. @return {Promise}
  11613. */
  11614. /**
  11615. `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same
  11616. as the catch block of a try/catch statement.
  11617. ```js
  11618. function findAuthor(){
  11619. throw new Error('couldn't find that author');
  11620. }
  11621. // synchronous
  11622. try {
  11623. findAuthor();
  11624. } catch(reason) {
  11625. // something went wrong
  11626. }
  11627. // async with promises
  11628. findAuthor().catch(function(reason){
  11629. // something went wrong
  11630. });
  11631. ```
  11632. @method catch
  11633. @param {Function} onRejection
  11634. Useful for tooling.
  11635. @return {Promise}
  11636. */
  11637. Promise.prototype.catch = function _catch(onRejection) {
  11638. return this.then(null, onRejection);
  11639. };
  11640. /**
  11641. `finally` will be invoked regardless of the promise's fate just as native
  11642. try/catch/finally behaves
  11643. Synchronous example:
  11644. ```js
  11645. findAuthor() {
  11646. if (Math.random() > 0.5) {
  11647. throw new Error();
  11648. }
  11649. return new Author();
  11650. }
  11651. try {
  11652. return findAuthor(); // succeed or fail
  11653. } catch(error) {
  11654. return findOtherAuther();
  11655. } finally {
  11656. // always runs
  11657. // doesn't affect the return value
  11658. }
  11659. ```
  11660. Asynchronous example:
  11661. ```js
  11662. findAuthor().catch(function(reason){
  11663. return findOtherAuther();
  11664. }).finally(function(){
  11665. // author was either found, or not
  11666. });
  11667. ```
  11668. @method finally
  11669. @param {Function} callback
  11670. @return {Promise}
  11671. */
  11672. Promise.prototype.finally = function _finally(callback) {
  11673. var promise = this;
  11674. var constructor = promise.constructor;
  11675. return promise.then(function (value) {
  11676. return constructor.resolve(callback()).then(function () {
  11677. return value;
  11678. });
  11679. }, function (reason) {
  11680. return constructor.resolve(callback()).then(function () {
  11681. throw reason;
  11682. });
  11683. });
  11684. };
  11685. return Promise;
  11686. }();
  11687. Promise$2.prototype.then = then;
  11688. Promise$2.all = all;
  11689. Promise$2.race = race;
  11690. Promise$2.resolve = resolve$1;
  11691. Promise$2.reject = reject$1;
  11692. Promise$2._setScheduler = setScheduler;
  11693. Promise$2._setAsap = setAsap;
  11694. Promise$2._asap = asap;
  11695. /*global self*/
  11696. function polyfill() {
  11697. var local = void 0;
  11698. if (typeof global !== 'undefined') {
  11699. local = global;
  11700. } else if (typeof self !== 'undefined') {
  11701. local = self;
  11702. } else {
  11703. try {
  11704. local = Function('return this')();
  11705. } catch (e) {
  11706. throw new Error('polyfill failed because global object is unavailable in this environment');
  11707. }
  11708. }
  11709. var P = local.Promise;
  11710. if (P) {
  11711. var promiseToString = null;
  11712. try {
  11713. promiseToString = Object.prototype.toString.call(P.resolve());
  11714. } catch (e) {
  11715. // silently ignored
  11716. }
  11717. if (promiseToString === '[object Promise]' && !P.cast) {
  11718. return;
  11719. }
  11720. }
  11721. local.Promise = Promise$2;
  11722. }
  11723. // Strange compat..
  11724. Promise$2.polyfill = polyfill;
  11725. Promise$2.Promise = Promise$2;
  11726. Promise$2.polyfill();
  11727. return Promise$2;
  11728. })));
  11729. //# sourceMappingURL=es6-promise.auto.map
  11730. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../process/browser.js */ "./node_modules/process/browser.js"), __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  11731. /***/ }),
  11732. /***/ "./node_modules/fast-text-encoding/text.js":
  11733. /*!*************************************************!*\
  11734. !*** ./node_modules/fast-text-encoding/text.js ***!
  11735. \*************************************************/
  11736. /*! no static exports found */
  11737. /***/ (function(module, exports, __webpack_require__) {
  11738. /* WEBPACK VAR INJECTION */(function(global) {/*
  11739. * Copyright 2017 Sam Thorogood. All rights reserved.
  11740. *
  11741. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  11742. * use this file except in compliance with the License. You may obtain a copy of
  11743. * the License at
  11744. *
  11745. * http://www.apache.org/licenses/LICENSE-2.0
  11746. *
  11747. * Unless required by applicable law or agreed to in writing, software
  11748. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  11749. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  11750. * License for the specific language governing permissions and limitations under
  11751. * the License.
  11752. */
  11753. /**
  11754. * @fileoverview Polyfill for TextEncoder and TextDecoder.
  11755. *
  11756. * You probably want `text.min.js`, and not this file directly.
  11757. */
  11758. (function(scope) {
  11759. 'use strict';
  11760. // fail early
  11761. if (scope['TextEncoder'] && scope['TextDecoder']) {
  11762. return false;
  11763. }
  11764. /**
  11765. * @constructor
  11766. * @param {string=} utfLabel
  11767. */
  11768. function FastTextEncoder(utfLabel='utf-8') {
  11769. if (utfLabel !== 'utf-8') {
  11770. throw new RangeError(
  11771. `Failed to construct 'TextEncoder': The encoding label provided ('${utfLabel}') is invalid.`);
  11772. }
  11773. }
  11774. Object.defineProperty(FastTextEncoder.prototype, 'encoding', {value: 'utf-8'});
  11775. /**
  11776. * @param {string} string
  11777. * @param {{stream: boolean}=} options
  11778. * @return {!Uint8Array}
  11779. */
  11780. FastTextEncoder.prototype.encode = function(string, options={stream: false}) {
  11781. if (options.stream) {
  11782. throw new Error(`Failed to encode: the 'stream' option is unsupported.`);
  11783. }
  11784. let pos = 0;
  11785. const len = string.length;
  11786. const out = [];
  11787. let at = 0; // output position
  11788. let tlen = Math.max(32, len + (len >> 1) + 7); // 1.5x size
  11789. let target = new Uint8Array((tlen >> 3) << 3); // ... but at 8 byte offset
  11790. while (pos < len) {
  11791. let value = string.charCodeAt(pos++);
  11792. if (value >= 0xd800 && value <= 0xdbff) {
  11793. // high surrogate
  11794. if (pos < len) {
  11795. const extra = string.charCodeAt(pos);
  11796. if ((extra & 0xfc00) === 0xdc00) {
  11797. ++pos;
  11798. value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000;
  11799. }
  11800. }
  11801. if (value >= 0xd800 && value <= 0xdbff) {
  11802. continue; // drop lone surrogate
  11803. }
  11804. }
  11805. // expand the buffer if we couldn't write 4 bytes
  11806. if (at + 4 > target.length) {
  11807. tlen += 8; // minimum extra
  11808. tlen *= (1.0 + (pos / string.length) * 2); // take 2x the remaining
  11809. tlen = (tlen >> 3) << 3; // 8 byte offset
  11810. const update = new Uint8Array(tlen);
  11811. update.set(target);
  11812. target = update;
  11813. }
  11814. if ((value & 0xffffff80) === 0) { // 1-byte
  11815. target[at++] = value; // ASCII
  11816. continue;
  11817. } else if ((value & 0xfffff800) === 0) { // 2-byte
  11818. target[at++] = ((value >> 6) & 0x1f) | 0xc0;
  11819. } else if ((value & 0xffff0000) === 0) { // 3-byte
  11820. target[at++] = ((value >> 12) & 0x0f) | 0xe0;
  11821. target[at++] = ((value >> 6) & 0x3f) | 0x80;
  11822. } else if ((value & 0xffe00000) === 0) { // 4-byte
  11823. target[at++] = ((value >> 18) & 0x07) | 0xf0;
  11824. target[at++] = ((value >> 12) & 0x3f) | 0x80;
  11825. target[at++] = ((value >> 6) & 0x3f) | 0x80;
  11826. } else {
  11827. // FIXME: do we care
  11828. continue;
  11829. }
  11830. target[at++] = (value & 0x3f) | 0x80;
  11831. }
  11832. return target.slice(0, at);
  11833. }
  11834. /**
  11835. * @constructor
  11836. * @param {string=} utfLabel
  11837. * @param {{fatal: boolean}=} options
  11838. */
  11839. function FastTextDecoder(utfLabel='utf-8', options={fatal: false}) {
  11840. if (utfLabel !== 'utf-8') {
  11841. throw new RangeError(
  11842. `Failed to construct 'TextDecoder': The encoding label provided ('${utfLabel}') is invalid.`);
  11843. }
  11844. if (options.fatal) {
  11845. throw new Error(`Failed to construct 'TextDecoder': the 'fatal' option is unsupported.`);
  11846. }
  11847. }
  11848. Object.defineProperty(FastTextDecoder.prototype, 'encoding', {value: 'utf-8'});
  11849. Object.defineProperty(FastTextDecoder.prototype, 'fatal', {value: false});
  11850. Object.defineProperty(FastTextDecoder.prototype, 'ignoreBOM', {value: false});
  11851. /**
  11852. * @param {(!ArrayBuffer|!ArrayBufferView)} buffer
  11853. * @param {{stream: boolean}=} options
  11854. */
  11855. FastTextDecoder.prototype.decode = function(buffer, options={stream: false}) {
  11856. if (options['stream']) {
  11857. throw new Error(`Failed to decode: the 'stream' option is unsupported.`);
  11858. }
  11859. const bytes = new Uint8Array(buffer);
  11860. let pos = 0;
  11861. const len = bytes.length;
  11862. const out = [];
  11863. while (pos < len) {
  11864. const byte1 = bytes[pos++];
  11865. if (byte1 === 0) {
  11866. break; // NULL
  11867. }
  11868. if ((byte1 & 0x80) === 0) { // 1-byte
  11869. out.push(byte1);
  11870. } else if ((byte1 & 0xe0) === 0xc0) { // 2-byte
  11871. const byte2 = bytes[pos++] & 0x3f;
  11872. out.push(((byte1 & 0x1f) << 6) | byte2);
  11873. } else if ((byte1 & 0xf0) === 0xe0) {
  11874. const byte2 = bytes[pos++] & 0x3f;
  11875. const byte3 = bytes[pos++] & 0x3f;
  11876. out.push(((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3);
  11877. } else if ((byte1 & 0xf8) === 0xf0) {
  11878. const byte2 = bytes[pos++] & 0x3f;
  11879. const byte3 = bytes[pos++] & 0x3f;
  11880. const byte4 = bytes[pos++] & 0x3f;
  11881. // this can be > 0xffff, so possibly generate surrogates
  11882. let codepoint = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4;
  11883. if (codepoint > 0xffff) {
  11884. // codepoint &= ~0x10000;
  11885. codepoint -= 0x10000;
  11886. out.push((codepoint >>> 10) & 0x3ff | 0xd800)
  11887. codepoint = 0xdc00 | codepoint & 0x3ff;
  11888. }
  11889. out.push(codepoint);
  11890. } else {
  11891. // FIXME: we're ignoring this
  11892. }
  11893. }
  11894. return String.fromCharCode.apply(null, out);
  11895. }
  11896. scope['TextEncoder'] = FastTextEncoder;
  11897. scope['TextDecoder'] = FastTextDecoder;
  11898. }(typeof window !== 'undefined' ? window : (typeof global !== 'undefined' ? global : this)));
  11899. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  11900. /***/ }),
  11901. /***/ "./node_modules/filesize/lib/filesize.js":
  11902. /*!***********************************************!*\
  11903. !*** ./node_modules/filesize/lib/filesize.js ***!
  11904. \***********************************************/
  11905. /*! no static exports found */
  11906. /***/ (function(module, exports, __webpack_require__) {
  11907. "use strict";
  11908. /* WEBPACK VAR INJECTION */(function(global) {
  11909. /**
  11910. * filesize
  11911. *
  11912. * @copyright 2018 Jason Mulligan <jason.mulligan@avoidwork.com>
  11913. * @license BSD-3-Clause
  11914. * @version 3.6.1
  11915. */
  11916. (function (global) {
  11917. var b = /^(b|B)$/,
  11918. symbol = {
  11919. iec: {
  11920. bits: ["b", "Kib", "Mib", "Gib", "Tib", "Pib", "Eib", "Zib", "Yib"],
  11921. bytes: ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"]
  11922. },
  11923. jedec: {
  11924. bits: ["b", "Kb", "Mb", "Gb", "Tb", "Pb", "Eb", "Zb", "Yb"],
  11925. bytes: ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]
  11926. }
  11927. },
  11928. fullform = {
  11929. iec: ["", "kibi", "mebi", "gibi", "tebi", "pebi", "exbi", "zebi", "yobi"],
  11930. jedec: ["", "kilo", "mega", "giga", "tera", "peta", "exa", "zetta", "yotta"]
  11931. };
  11932. /**
  11933. * filesize
  11934. *
  11935. * @method filesize
  11936. * @param {Mixed} arg String, Int or Float to transform
  11937. * @param {Object} descriptor [Optional] Flags
  11938. * @return {String} Readable file size String
  11939. */
  11940. function filesize(arg) {
  11941. var descriptor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  11942. var result = [],
  11943. val = 0,
  11944. e = void 0,
  11945. base = void 0,
  11946. bits = void 0,
  11947. ceil = void 0,
  11948. full = void 0,
  11949. fullforms = void 0,
  11950. neg = void 0,
  11951. num = void 0,
  11952. output = void 0,
  11953. round = void 0,
  11954. unix = void 0,
  11955. separator = void 0,
  11956. spacer = void 0,
  11957. standard = void 0,
  11958. symbols = void 0;
  11959. if (isNaN(arg)) {
  11960. throw new Error("Invalid arguments");
  11961. }
  11962. bits = descriptor.bits === true;
  11963. unix = descriptor.unix === true;
  11964. base = descriptor.base || 2;
  11965. round = descriptor.round !== void 0 ? descriptor.round : unix ? 1 : 2;
  11966. separator = descriptor.separator !== void 0 ? descriptor.separator || "" : "";
  11967. spacer = descriptor.spacer !== void 0 ? descriptor.spacer : unix ? "" : " ";
  11968. symbols = descriptor.symbols || descriptor.suffixes || {};
  11969. standard = base === 2 ? descriptor.standard || "jedec" : "jedec";
  11970. output = descriptor.output || "string";
  11971. full = descriptor.fullform === true;
  11972. fullforms = descriptor.fullforms instanceof Array ? descriptor.fullforms : [];
  11973. e = descriptor.exponent !== void 0 ? descriptor.exponent : -1;
  11974. num = Number(arg);
  11975. neg = num < 0;
  11976. ceil = base > 2 ? 1000 : 1024;
  11977. // Flipping a negative number to determine the size
  11978. if (neg) {
  11979. num = -num;
  11980. }
  11981. // Determining the exponent
  11982. if (e === -1 || isNaN(e)) {
  11983. e = Math.floor(Math.log(num) / Math.log(ceil));
  11984. if (e < 0) {
  11985. e = 0;
  11986. }
  11987. }
  11988. // Exceeding supported length, time to reduce & multiply
  11989. if (e > 8) {
  11990. e = 8;
  11991. }
  11992. // Zero is now a special case because bytes divide by 1
  11993. if (num === 0) {
  11994. result[0] = 0;
  11995. result[1] = unix ? "" : symbol[standard][bits ? "bits" : "bytes"][e];
  11996. } else {
  11997. val = num / (base === 2 ? Math.pow(2, e * 10) : Math.pow(1000, e));
  11998. if (bits) {
  11999. val = val * 8;
  12000. if (val >= ceil && e < 8) {
  12001. val = val / ceil;
  12002. e++;
  12003. }
  12004. }
  12005. result[0] = Number(val.toFixed(e > 0 ? round : 0));
  12006. result[1] = base === 10 && e === 1 ? bits ? "kb" : "kB" : symbol[standard][bits ? "bits" : "bytes"][e];
  12007. if (unix) {
  12008. result[1] = standard === "jedec" ? result[1].charAt(0) : e > 0 ? result[1].replace(/B$/, "") : result[1];
  12009. if (b.test(result[1])) {
  12010. result[0] = Math.floor(result[0]);
  12011. result[1] = "";
  12012. }
  12013. }
  12014. }
  12015. // Decorating a 'diff'
  12016. if (neg) {
  12017. result[0] = -result[0];
  12018. }
  12019. // Applying custom symbol
  12020. result[1] = symbols[result[1]] || result[1];
  12021. // Returning Array, Object, or String (default)
  12022. if (output === "array") {
  12023. return result;
  12024. }
  12025. if (output === "exponent") {
  12026. return e;
  12027. }
  12028. if (output === "object") {
  12029. return { value: result[0], suffix: result[1], symbol: result[1] };
  12030. }
  12031. if (full) {
  12032. result[1] = fullforms[e] ? fullforms[e] : fullform[standard][e] + (bits ? "bit" : "byte") + (result[0] === 1 ? "" : "s");
  12033. }
  12034. if (separator.length > 0) {
  12035. result[0] = result[0].toString().replace(".", separator);
  12036. }
  12037. return result.join(spacer);
  12038. }
  12039. // Partial application for functional programming
  12040. filesize.partial = function (opt) {
  12041. return function (arg) {
  12042. return filesize(arg, opt);
  12043. };
  12044. };
  12045. // CommonJS, AMD, script tag
  12046. if (true) {
  12047. module.exports = filesize;
  12048. } else {}
  12049. })(typeof window !== "undefined" ? window : global);
  12050. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  12051. /***/ }),
  12052. /***/ "./node_modules/formdata-polyfill/FormData.js":
  12053. /*!****************************************************!*\
  12054. !*** ./node_modules/formdata-polyfill/FormData.js ***!
  12055. \****************************************************/
  12056. /*! no static exports found */
  12057. /***/ (function(module, exports) {
  12058. if (typeof FormData === 'undefined' || !FormData.prototype.keys) {
  12059. const global = typeof window === 'object'
  12060. ? window : typeof self === 'object'
  12061. ? self : this
  12062. // keep a reference to native implementation
  12063. const _FormData = global.FormData
  12064. // To be monkey patched
  12065. const _send = global.XMLHttpRequest && global.XMLHttpRequest.prototype.send
  12066. const _fetch = global.Request && global.fetch
  12067. // Unable to patch Request constructor correctly
  12068. // const _Request = global.Request
  12069. // only way is to use ES6 class extend
  12070. // https://github.com/babel/babel/issues/1966
  12071. const stringTag = global.Symbol && Symbol.toStringTag
  12072. const map = new WeakMap
  12073. const wm = o => map.get(o)
  12074. const arrayFrom = Array.from || (obj => [].slice.call(obj))
  12075. // Add missing stringTags to blob and files
  12076. if (stringTag) {
  12077. if (!Blob.prototype[stringTag]) {
  12078. Blob.prototype[stringTag] = 'Blob'
  12079. }
  12080. if ('File' in global && !File.prototype[stringTag]) {
  12081. File.prototype[stringTag] = 'File'
  12082. }
  12083. }
  12084. // Fix so you can construct your own File
  12085. try {
  12086. new File([], '')
  12087. } catch (a) {
  12088. global.File = function(b, d, c) {
  12089. const blob = new Blob(b, c)
  12090. const t = c && void 0 !== c.lastModified ? new Date(c.lastModified) : new Date
  12091. Object.defineProperties(blob, {
  12092. name: {
  12093. value: d
  12094. },
  12095. lastModifiedDate: {
  12096. value: t
  12097. },
  12098. lastModified: {
  12099. value: +t
  12100. },
  12101. toString: {
  12102. value() {
  12103. return '[object File]'
  12104. }
  12105. }
  12106. })
  12107. if (stringTag) {
  12108. Object.defineProperty(blob, stringTag, {
  12109. value: 'File'
  12110. })
  12111. }
  12112. return blob
  12113. }
  12114. }
  12115. function normalizeValue([value, filename]) {
  12116. if (value instanceof Blob)
  12117. // Should always returns a new File instance
  12118. // console.assert(fd.get(x) !== fd.get(x))
  12119. value = new File([value], filename, {
  12120. type: value.type,
  12121. lastModified: value.lastModified
  12122. })
  12123. return value
  12124. }
  12125. function stringify(name) {
  12126. if (!arguments.length)
  12127. throw new TypeError('1 argument required, but only 0 present.')
  12128. return [name + '']
  12129. }
  12130. function normalizeArgs(name, value, filename) {
  12131. if (arguments.length < 2)
  12132. throw new TypeError(
  12133. `2 arguments required, but only ${arguments.length} present.`
  12134. )
  12135. return value instanceof Blob
  12136. // normalize name and filename if adding an attachment
  12137. ? [name + '', value, filename !== undefined
  12138. ? filename + '' // Cast filename to string if 3th arg isn't undefined
  12139. : typeof value.name === 'string' // if name prop exist
  12140. ? value.name // Use File.name
  12141. : 'blob'] // otherwise fallback to Blob
  12142. // If no attachment, just cast the args to strings
  12143. : [name + '', value + '']
  12144. }
  12145. /**
  12146. * @implements {Iterable}
  12147. */
  12148. class FormDataPolyfill {
  12149. /**
  12150. * FormData class
  12151. *
  12152. * @param {HTMLElement=} form
  12153. */
  12154. constructor(form) {
  12155. map.set(this, Object.create(null))
  12156. if (!form)
  12157. return this
  12158. for (let elm of arrayFrom(form.elements)) {
  12159. if (!elm.name || elm.disabled) continue
  12160. if (elm.type === 'file')
  12161. for (let file of arrayFrom(elm.files || []))
  12162. this.append(elm.name, file)
  12163. else if (elm.type === 'select-multiple' || elm.type === 'select-one')
  12164. for (let opt of arrayFrom(elm.options))
  12165. !opt.disabled && opt.selected && this.append(elm.name, opt.value)
  12166. else if (elm.type === 'checkbox' || elm.type === 'radio') {
  12167. if (elm.checked) this.append(elm.name, elm.value)
  12168. } else
  12169. this.append(elm.name, elm.value)
  12170. }
  12171. }
  12172. /**
  12173. * Append a field
  12174. *
  12175. * @param {String} name field name
  12176. * @param {String|Blob|File} value string / blob / file
  12177. * @param {String=} filename filename to use with blob
  12178. * @return {Undefined}
  12179. */
  12180. append(name, value, filename) {
  12181. const map = wm(this)
  12182. if (!map[name])
  12183. map[name] = []
  12184. map[name].push([value, filename])
  12185. }
  12186. /**
  12187. * Delete all fields values given name
  12188. *
  12189. * @param {String} name Field name
  12190. * @return {Undefined}
  12191. */
  12192. delete(name) {
  12193. delete wm(this)[name]
  12194. }
  12195. /**
  12196. * Iterate over all fields as [name, value]
  12197. *
  12198. * @return {Iterator}
  12199. */
  12200. *entries() {
  12201. const map = wm(this)
  12202. for (let name in map)
  12203. for (let value of map[name])
  12204. yield [name, normalizeValue(value)]
  12205. }
  12206. /**
  12207. * Iterate over all fields
  12208. *
  12209. * @param {Function} callback Executed for each item with parameters (value, name, thisArg)
  12210. * @param {Object=} thisArg `this` context for callback function
  12211. * @return {Undefined}
  12212. */
  12213. forEach(callback, thisArg) {
  12214. for (let [name, value] of this)
  12215. callback.call(thisArg, value, name, this)
  12216. }
  12217. /**
  12218. * Return first field value given name
  12219. * or null if non existen
  12220. *
  12221. * @param {String} name Field name
  12222. * @return {String|File|null} value Fields value
  12223. */
  12224. get(name) {
  12225. const map = wm(this)
  12226. return map[name] ? normalizeValue(map[name][0]) : null
  12227. }
  12228. /**
  12229. * Return all fields values given name
  12230. *
  12231. * @param {String} name Fields name
  12232. * @return {Array} [{String|File}]
  12233. */
  12234. getAll(name) {
  12235. return (wm(this)[name] || []).map(normalizeValue)
  12236. }
  12237. /**
  12238. * Check for field name existence
  12239. *
  12240. * @param {String} name Field name
  12241. * @return {boolean}
  12242. */
  12243. has(name) {
  12244. return name in wm(this)
  12245. }
  12246. /**
  12247. * Iterate over all fields name
  12248. *
  12249. * @return {Iterator}
  12250. */
  12251. *keys() {
  12252. for (let [name] of this)
  12253. yield name
  12254. }
  12255. /**
  12256. * Overwrite all values given name
  12257. *
  12258. * @param {String} name Filed name
  12259. * @param {String} value Field value
  12260. * @param {String=} filename Filename (optional)
  12261. * @return {Undefined}
  12262. */
  12263. set(name, value, filename) {
  12264. wm(this)[name] = [[value, filename]]
  12265. }
  12266. /**
  12267. * Iterate over all fields
  12268. *
  12269. * @return {Iterator}
  12270. */
  12271. *values() {
  12272. for (let [name, value] of this)
  12273. yield value
  12274. }
  12275. /**
  12276. * Return a native (perhaps degraded) FormData with only a `append` method
  12277. * Can throw if it's not supported
  12278. *
  12279. * @return {FormData}
  12280. */
  12281. ['_asNative']() {
  12282. const fd = new _FormData
  12283. for (let [name, value] of this)
  12284. fd.append(name, value)
  12285. return fd
  12286. }
  12287. /**
  12288. * [_blob description]
  12289. *
  12290. * @return {Blob} [description]
  12291. */
  12292. ['_blob']() {
  12293. const boundary = '----formdata-polyfill-' + Math.random()
  12294. const chunks = []
  12295. for (let [name, value] of this) {
  12296. chunks.push(`--${boundary}\r\n`)
  12297. if (value instanceof Blob) {
  12298. chunks.push(
  12299. `Content-Disposition: form-data; name="${name}"; filename="${value.name}"\r\n`,
  12300. `Content-Type: ${value.type || 'application/octet-stream'}\r\n\r\n`,
  12301. value,
  12302. '\r\n'
  12303. )
  12304. } else {
  12305. chunks.push(
  12306. `Content-Disposition: form-data; name="${name}"\r\n\r\n${value}\r\n`
  12307. )
  12308. }
  12309. }
  12310. chunks.push(`--${boundary}--`)
  12311. return new Blob(chunks, {type: 'multipart/form-data; boundary=' + boundary})
  12312. }
  12313. /**
  12314. * The class itself is iterable
  12315. * alias for formdata.entries()
  12316. *
  12317. * @return {Iterator}
  12318. */
  12319. [Symbol.iterator]() {
  12320. return this.entries()
  12321. }
  12322. /**
  12323. * Create the default string description.
  12324. *
  12325. * @return {String} [object FormData]
  12326. */
  12327. toString() {
  12328. return '[object FormData]'
  12329. }
  12330. }
  12331. if (stringTag) {
  12332. /**
  12333. * Create the default string description.
  12334. * It is accessed internally by the Object.prototype.toString().
  12335. *
  12336. * @return {String} FormData
  12337. */
  12338. FormDataPolyfill.prototype[stringTag] = 'FormData'
  12339. }
  12340. const decorations = [
  12341. ['append', normalizeArgs],
  12342. ['delete', stringify],
  12343. ['get', stringify],
  12344. ['getAll', stringify],
  12345. ['has', stringify],
  12346. ['set', normalizeArgs]
  12347. ]
  12348. decorations.forEach(arr => {
  12349. const orig = FormDataPolyfill.prototype[arr[0]]
  12350. FormDataPolyfill.prototype[arr[0]] = function() {
  12351. return orig.apply(this, arr[1].apply(this, arrayFrom(arguments)))
  12352. }
  12353. })
  12354. // Patch xhr's send method to call _blob transparently
  12355. if (_send) {
  12356. XMLHttpRequest.prototype.send = function(data) {
  12357. // I would check if Content-Type isn't already set
  12358. // But xhr lacks getRequestHeaders functionallity
  12359. // https://github.com/jimmywarting/FormData/issues/44
  12360. if (data instanceof FormDataPolyfill) {
  12361. const blob = data['_blob']()
  12362. this.setRequestHeader('Content-Type', blob.type)
  12363. _send.call(this, blob)
  12364. } else {
  12365. _send.call(this, data)
  12366. }
  12367. }
  12368. }
  12369. // Patch fetch's function to call _blob transparently
  12370. if (_fetch) {
  12371. const _fetch = global.fetch
  12372. global.fetch = function(input, init) {
  12373. if (init && init.body && init.body instanceof FormDataPolyfill) {
  12374. init.body = init.body['_blob']()
  12375. }
  12376. return _fetch(input, init)
  12377. }
  12378. }
  12379. global['FormData'] = FormDataPolyfill
  12380. }
  12381. /***/ }),
  12382. /***/ "./node_modules/jed/jed.js":
  12383. /*!*********************************!*\
  12384. !*** ./node_modules/jed/jed.js ***!
  12385. \*********************************/
  12386. /*! no static exports found */
  12387. /***/ (function(module, exports, __webpack_require__) {
  12388. /**
  12389. * @preserve jed.js https://github.com/SlexAxton/Jed
  12390. */
  12391. /*
  12392. -----------
  12393. A gettext compatible i18n library for modern JavaScript Applications
  12394. by Alex Sexton - AlexSexton [at] gmail - @SlexAxton
  12395. MIT License
  12396. A jQuery Foundation project - requires CLA to contribute -
  12397. https://contribute.jquery.org/CLA/
  12398. Jed offers the entire applicable GNU gettext spec'd set of
  12399. functions, but also offers some nicer wrappers around them.
  12400. The api for gettext was written for a language with no function
  12401. overloading, so Jed allows a little more of that.
  12402. Many thanks to Joshua I. Miller - unrtst@cpan.org - who wrote
  12403. gettext.js back in 2008. I was able to vet a lot of my ideas
  12404. against his. I also made sure Jed passed against his tests
  12405. in order to offer easy upgrades -- jsgettext.berlios.de
  12406. */
  12407. (function (root, undef) {
  12408. // Set up some underscore-style functions, if you already have
  12409. // underscore, feel free to delete this section, and use it
  12410. // directly, however, the amount of functions used doesn't
  12411. // warrant having underscore as a full dependency.
  12412. // Underscore 1.3.0 was used to port and is licensed
  12413. // under the MIT License by Jeremy Ashkenas.
  12414. var ArrayProto = Array.prototype,
  12415. ObjProto = Object.prototype,
  12416. slice = ArrayProto.slice,
  12417. hasOwnProp = ObjProto.hasOwnProperty,
  12418. nativeForEach = ArrayProto.forEach,
  12419. breaker = {};
  12420. // We're not using the OOP style _ so we don't need the
  12421. // extra level of indirection. This still means that you
  12422. // sub out for real `_` though.
  12423. var _ = {
  12424. forEach : function( obj, iterator, context ) {
  12425. var i, l, key;
  12426. if ( obj === null ) {
  12427. return;
  12428. }
  12429. if ( nativeForEach && obj.forEach === nativeForEach ) {
  12430. obj.forEach( iterator, context );
  12431. }
  12432. else if ( obj.length === +obj.length ) {
  12433. for ( i = 0, l = obj.length; i < l; i++ ) {
  12434. if ( i in obj && iterator.call( context, obj[i], i, obj ) === breaker ) {
  12435. return;
  12436. }
  12437. }
  12438. }
  12439. else {
  12440. for ( key in obj) {
  12441. if ( hasOwnProp.call( obj, key ) ) {
  12442. if ( iterator.call (context, obj[key], key, obj ) === breaker ) {
  12443. return;
  12444. }
  12445. }
  12446. }
  12447. }
  12448. },
  12449. extend : function( obj ) {
  12450. this.forEach( slice.call( arguments, 1 ), function ( source ) {
  12451. for ( var prop in source ) {
  12452. obj[prop] = source[prop];
  12453. }
  12454. });
  12455. return obj;
  12456. }
  12457. };
  12458. // END Miniature underscore impl
  12459. // Jed is a constructor function
  12460. var Jed = function ( options ) {
  12461. // Some minimal defaults
  12462. this.defaults = {
  12463. "locale_data" : {
  12464. "messages" : {
  12465. "" : {
  12466. "domain" : "messages",
  12467. "lang" : "en",
  12468. "plural_forms" : "nplurals=2; plural=(n != 1);"
  12469. }
  12470. // There are no default keys, though
  12471. }
  12472. },
  12473. // The default domain if one is missing
  12474. "domain" : "messages",
  12475. // enable debug mode to log untranslated strings to the console
  12476. "debug" : false
  12477. };
  12478. // Mix in the sent options with the default options
  12479. this.options = _.extend( {}, this.defaults, options );
  12480. this.textdomain( this.options.domain );
  12481. if ( options.domain && ! this.options.locale_data[ this.options.domain ] ) {
  12482. throw new Error('Text domain set to non-existent domain: `' + options.domain + '`');
  12483. }
  12484. };
  12485. // The gettext spec sets this character as the default
  12486. // delimiter for context lookups.
  12487. // e.g.: context\u0004key
  12488. // If your translation company uses something different,
  12489. // just change this at any time and it will use that instead.
  12490. Jed.context_delimiter = String.fromCharCode( 4 );
  12491. function getPluralFormFunc ( plural_form_string ) {
  12492. return Jed.PF.compile( plural_form_string || "nplurals=2; plural=(n != 1);");
  12493. }
  12494. function Chain( key, i18n ){
  12495. this._key = key;
  12496. this._i18n = i18n;
  12497. }
  12498. // Create a chainable api for adding args prettily
  12499. _.extend( Chain.prototype, {
  12500. onDomain : function ( domain ) {
  12501. this._domain = domain;
  12502. return this;
  12503. },
  12504. withContext : function ( context ) {
  12505. this._context = context;
  12506. return this;
  12507. },
  12508. ifPlural : function ( num, pkey ) {
  12509. this._val = num;
  12510. this._pkey = pkey;
  12511. return this;
  12512. },
  12513. fetch : function ( sArr ) {
  12514. if ( {}.toString.call( sArr ) != '[object Array]' ) {
  12515. sArr = [].slice.call(arguments, 0);
  12516. }
  12517. return ( sArr && sArr.length ? Jed.sprintf : function(x){ return x; } )(
  12518. this._i18n.dcnpgettext(this._domain, this._context, this._key, this._pkey, this._val),
  12519. sArr
  12520. );
  12521. }
  12522. });
  12523. // Add functions to the Jed prototype.
  12524. // These will be the functions on the object that's returned
  12525. // from creating a `new Jed()`
  12526. // These seem redundant, but they gzip pretty well.
  12527. _.extend( Jed.prototype, {
  12528. // The sexier api start point
  12529. translate : function ( key ) {
  12530. return new Chain( key, this );
  12531. },
  12532. textdomain : function ( domain ) {
  12533. if ( ! domain ) {
  12534. return this._textdomain;
  12535. }
  12536. this._textdomain = domain;
  12537. },
  12538. gettext : function ( key ) {
  12539. return this.dcnpgettext.call( this, undef, undef, key );
  12540. },
  12541. dgettext : function ( domain, key ) {
  12542. return this.dcnpgettext.call( this, domain, undef, key );
  12543. },
  12544. dcgettext : function ( domain , key /*, category */ ) {
  12545. // Ignores the category anyways
  12546. return this.dcnpgettext.call( this, domain, undef, key );
  12547. },
  12548. ngettext : function ( skey, pkey, val ) {
  12549. return this.dcnpgettext.call( this, undef, undef, skey, pkey, val );
  12550. },
  12551. dngettext : function ( domain, skey, pkey, val ) {
  12552. return this.dcnpgettext.call( this, domain, undef, skey, pkey, val );
  12553. },
  12554. dcngettext : function ( domain, skey, pkey, val/*, category */) {
  12555. return this.dcnpgettext.call( this, domain, undef, skey, pkey, val );
  12556. },
  12557. pgettext : function ( context, key ) {
  12558. return this.dcnpgettext.call( this, undef, context, key );
  12559. },
  12560. dpgettext : function ( domain, context, key ) {
  12561. return this.dcnpgettext.call( this, domain, context, key );
  12562. },
  12563. dcpgettext : function ( domain, context, key/*, category */) {
  12564. return this.dcnpgettext.call( this, domain, context, key );
  12565. },
  12566. npgettext : function ( context, skey, pkey, val ) {
  12567. return this.dcnpgettext.call( this, undef, context, skey, pkey, val );
  12568. },
  12569. dnpgettext : function ( domain, context, skey, pkey, val ) {
  12570. return this.dcnpgettext.call( this, domain, context, skey, pkey, val );
  12571. },
  12572. // The most fully qualified gettext function. It has every option.
  12573. // Since it has every option, we can use it from every other method.
  12574. // This is the bread and butter.
  12575. // Technically there should be one more argument in this function for 'Category',
  12576. // but since we never use it, we might as well not waste the bytes to define it.
  12577. dcnpgettext : function ( domain, context, singular_key, plural_key, val ) {
  12578. // Set some defaults
  12579. plural_key = plural_key || singular_key;
  12580. // Use the global domain default if one
  12581. // isn't explicitly passed in
  12582. domain = domain || this._textdomain;
  12583. var fallback;
  12584. // Handle special cases
  12585. // No options found
  12586. if ( ! this.options ) {
  12587. // There's likely something wrong, but we'll return the correct key for english
  12588. // We do this by instantiating a brand new Jed instance with the default set
  12589. // for everything that could be broken.
  12590. fallback = new Jed();
  12591. return fallback.dcnpgettext.call( fallback, undefined, undefined, singular_key, plural_key, val );
  12592. }
  12593. // No translation data provided
  12594. if ( ! this.options.locale_data ) {
  12595. throw new Error('No locale data provided.');
  12596. }
  12597. if ( ! this.options.locale_data[ domain ] ) {
  12598. throw new Error('Domain `' + domain + '` was not found.');
  12599. }
  12600. if ( ! this.options.locale_data[ domain ][ "" ] ) {
  12601. throw new Error('No locale meta information provided.');
  12602. }
  12603. // Make sure we have a truthy key. Otherwise we might start looking
  12604. // into the empty string key, which is the options for the locale
  12605. // data.
  12606. if ( ! singular_key ) {
  12607. throw new Error('No translation key found.');
  12608. }
  12609. var key = context ? context + Jed.context_delimiter + singular_key : singular_key,
  12610. locale_data = this.options.locale_data,
  12611. dict = locale_data[ domain ],
  12612. defaultConf = (locale_data.messages || this.defaults.locale_data.messages)[""],
  12613. pluralForms = dict[""].plural_forms || dict[""]["Plural-Forms"] || dict[""]["plural-forms"] || defaultConf.plural_forms || defaultConf["Plural-Forms"] || defaultConf["plural-forms"],
  12614. val_list,
  12615. res;
  12616. var val_idx;
  12617. if (val === undefined) {
  12618. // No value passed in; assume singular key lookup.
  12619. val_idx = 0;
  12620. } else {
  12621. // Value has been passed in; use plural-forms calculations.
  12622. // Handle invalid numbers, but try casting strings for good measure
  12623. if ( typeof val != 'number' ) {
  12624. val = parseInt( val, 10 );
  12625. if ( isNaN( val ) ) {
  12626. throw new Error('The number that was passed in is not a number.');
  12627. }
  12628. }
  12629. val_idx = getPluralFormFunc(pluralForms)(val);
  12630. }
  12631. // Throw an error if a domain isn't found
  12632. if ( ! dict ) {
  12633. throw new Error('No domain named `' + domain + '` could be found.');
  12634. }
  12635. val_list = dict[ key ];
  12636. // If there is no match, then revert back to
  12637. // english style singular/plural with the keys passed in.
  12638. if ( ! val_list || val_idx > val_list.length ) {
  12639. if (this.options.missing_key_callback) {
  12640. this.options.missing_key_callback(key, domain);
  12641. }
  12642. res = [ singular_key, plural_key ];
  12643. // collect untranslated strings
  12644. if (this.options.debug===true) {
  12645. console.log(res[ getPluralFormFunc(pluralForms)( val ) ]);
  12646. }
  12647. return res[ getPluralFormFunc()( val ) ];
  12648. }
  12649. res = val_list[ val_idx ];
  12650. // This includes empty strings on purpose
  12651. if ( ! res ) {
  12652. res = [ singular_key, plural_key ];
  12653. return res[ getPluralFormFunc()( val ) ];
  12654. }
  12655. return res;
  12656. }
  12657. });
  12658. // We add in sprintf capabilities for post translation value interolation
  12659. // This is not internally used, so you can remove it if you have this
  12660. // available somewhere else, or want to use a different system.
  12661. // We _slightly_ modify the normal sprintf behavior to more gracefully handle
  12662. // undefined values.
  12663. /**
  12664. sprintf() for JavaScript 0.7-beta1
  12665. http://www.diveintojavascript.com/projects/javascript-sprintf
  12666. Copyright (c) Alexandru Marasteanu <alexaholic [at) gmail (dot] com>
  12667. All rights reserved.
  12668. Redistribution and use in source and binary forms, with or without
  12669. modification, are permitted provided that the following conditions are met:
  12670. * Redistributions of source code must retain the above copyright
  12671. notice, this list of conditions and the following disclaimer.
  12672. * Redistributions in binary form must reproduce the above copyright
  12673. notice, this list of conditions and the following disclaimer in the
  12674. documentation and/or other materials provided with the distribution.
  12675. * Neither the name of sprintf() for JavaScript nor the
  12676. names of its contributors may be used to endorse or promote products
  12677. derived from this software without specific prior written permission.
  12678. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  12679. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  12680. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  12681. DISCLAIMED. IN NO EVENT SHALL Alexandru Marasteanu BE LIABLE FOR ANY
  12682. DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  12683. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  12684. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  12685. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  12686. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  12687. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  12688. */
  12689. var sprintf = (function() {
  12690. function get_type(variable) {
  12691. return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase();
  12692. }
  12693. function str_repeat(input, multiplier) {
  12694. for (var output = []; multiplier > 0; output[--multiplier] = input) {/* do nothing */}
  12695. return output.join('');
  12696. }
  12697. var str_format = function() {
  12698. if (!str_format.cache.hasOwnProperty(arguments[0])) {
  12699. str_format.cache[arguments[0]] = str_format.parse(arguments[0]);
  12700. }
  12701. return str_format.format.call(null, str_format.cache[arguments[0]], arguments);
  12702. };
  12703. str_format.format = function(parse_tree, argv) {
  12704. var cursor = 1, tree_length = parse_tree.length, node_type = '', arg, output = [], i, k, match, pad, pad_character, pad_length;
  12705. for (i = 0; i < tree_length; i++) {
  12706. node_type = get_type(parse_tree[i]);
  12707. if (node_type === 'string') {
  12708. output.push(parse_tree[i]);
  12709. }
  12710. else if (node_type === 'array') {
  12711. match = parse_tree[i]; // convenience purposes only
  12712. if (match[2]) { // keyword argument
  12713. arg = argv[cursor];
  12714. for (k = 0; k < match[2].length; k++) {
  12715. if (!arg.hasOwnProperty(match[2][k])) {
  12716. throw(sprintf('[sprintf] property "%s" does not exist', match[2][k]));
  12717. }
  12718. arg = arg[match[2][k]];
  12719. }
  12720. }
  12721. else if (match[1]) { // positional argument (explicit)
  12722. arg = argv[match[1]];
  12723. }
  12724. else { // positional argument (implicit)
  12725. arg = argv[cursor++];
  12726. }
  12727. if (/[^s]/.test(match[8]) && (get_type(arg) != 'number')) {
  12728. throw(sprintf('[sprintf] expecting number but found %s', get_type(arg)));
  12729. }
  12730. // Jed EDIT
  12731. if ( typeof arg == 'undefined' || arg === null ) {
  12732. arg = '';
  12733. }
  12734. // Jed EDIT
  12735. switch (match[8]) {
  12736. case 'b': arg = arg.toString(2); break;
  12737. case 'c': arg = String.fromCharCode(arg); break;
  12738. case 'd': arg = parseInt(arg, 10); break;
  12739. case 'e': arg = match[7] ? arg.toExponential(match[7]) : arg.toExponential(); break;
  12740. case 'f': arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg); break;
  12741. case 'o': arg = arg.toString(8); break;
  12742. case 's': arg = ((arg = String(arg)) && match[7] ? arg.substring(0, match[7]) : arg); break;
  12743. case 'u': arg = Math.abs(arg); break;
  12744. case 'x': arg = arg.toString(16); break;
  12745. case 'X': arg = arg.toString(16).toUpperCase(); break;
  12746. }
  12747. arg = (/[def]/.test(match[8]) && match[3] && arg >= 0 ? '+'+ arg : arg);
  12748. pad_character = match[4] ? match[4] == '0' ? '0' : match[4].charAt(1) : ' ';
  12749. pad_length = match[6] - String(arg).length;
  12750. pad = match[6] ? str_repeat(pad_character, pad_length) : '';
  12751. output.push(match[5] ? arg + pad : pad + arg);
  12752. }
  12753. }
  12754. return output.join('');
  12755. };
  12756. str_format.cache = {};
  12757. str_format.parse = function(fmt) {
  12758. var _fmt = fmt, match = [], parse_tree = [], arg_names = 0;
  12759. while (_fmt) {
  12760. if ((match = /^[^\x25]+/.exec(_fmt)) !== null) {
  12761. parse_tree.push(match[0]);
  12762. }
  12763. else if ((match = /^\x25{2}/.exec(_fmt)) !== null) {
  12764. parse_tree.push('%');
  12765. }
  12766. else if ((match = /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(_fmt)) !== null) {
  12767. if (match[2]) {
  12768. arg_names |= 1;
  12769. var field_list = [], replacement_field = match[2], field_match = [];
  12770. if ((field_match = /^([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) {
  12771. field_list.push(field_match[1]);
  12772. while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {
  12773. if ((field_match = /^\.([a-z_][a-z_\d]*)/i.exec(replacement_field)) !== null) {
  12774. field_list.push(field_match[1]);
  12775. }
  12776. else if ((field_match = /^\[(\d+)\]/.exec(replacement_field)) !== null) {
  12777. field_list.push(field_match[1]);
  12778. }
  12779. else {
  12780. throw('[sprintf] huh?');
  12781. }
  12782. }
  12783. }
  12784. else {
  12785. throw('[sprintf] huh?');
  12786. }
  12787. match[2] = field_list;
  12788. }
  12789. else {
  12790. arg_names |= 2;
  12791. }
  12792. if (arg_names === 3) {
  12793. throw('[sprintf] mixing positional and named placeholders is not (yet) supported');
  12794. }
  12795. parse_tree.push(match);
  12796. }
  12797. else {
  12798. throw('[sprintf] huh?');
  12799. }
  12800. _fmt = _fmt.substring(match[0].length);
  12801. }
  12802. return parse_tree;
  12803. };
  12804. return str_format;
  12805. })();
  12806. var vsprintf = function(fmt, argv) {
  12807. argv.unshift(fmt);
  12808. return sprintf.apply(null, argv);
  12809. };
  12810. Jed.parse_plural = function ( plural_forms, n ) {
  12811. plural_forms = plural_forms.replace(/n/g, n);
  12812. return Jed.parse_expression(plural_forms);
  12813. };
  12814. Jed.sprintf = function ( fmt, args ) {
  12815. if ( {}.toString.call( args ) == '[object Array]' ) {
  12816. return vsprintf( fmt, [].slice.call(args) );
  12817. }
  12818. return sprintf.apply(this, [].slice.call(arguments) );
  12819. };
  12820. Jed.prototype.sprintf = function () {
  12821. return Jed.sprintf.apply(this, arguments);
  12822. };
  12823. // END sprintf Implementation
  12824. // Start the Plural forms section
  12825. // This is a full plural form expression parser. It is used to avoid
  12826. // running 'eval' or 'new Function' directly against the plural
  12827. // forms.
  12828. //
  12829. // This can be important if you get translations done through a 3rd
  12830. // party vendor. I encourage you to use this instead, however, I
  12831. // also will provide a 'precompiler' that you can use at build time
  12832. // to output valid/safe function representations of the plural form
  12833. // expressions. This means you can build this code out for the most
  12834. // part.
  12835. Jed.PF = {};
  12836. Jed.PF.parse = function ( p ) {
  12837. var plural_str = Jed.PF.extractPluralExpr( p );
  12838. return Jed.PF.parser.parse.call(Jed.PF.parser, plural_str);
  12839. };
  12840. Jed.PF.compile = function ( p ) {
  12841. // Handle trues and falses as 0 and 1
  12842. function imply( val ) {
  12843. return (val === true ? 1 : val ? val : 0);
  12844. }
  12845. var ast = Jed.PF.parse( p );
  12846. return function ( n ) {
  12847. return imply( Jed.PF.interpreter( ast )( n ) );
  12848. };
  12849. };
  12850. Jed.PF.interpreter = function ( ast ) {
  12851. return function ( n ) {
  12852. var res;
  12853. switch ( ast.type ) {
  12854. case 'GROUP':
  12855. return Jed.PF.interpreter( ast.expr )( n );
  12856. case 'TERNARY':
  12857. if ( Jed.PF.interpreter( ast.expr )( n ) ) {
  12858. return Jed.PF.interpreter( ast.truthy )( n );
  12859. }
  12860. return Jed.PF.interpreter( ast.falsey )( n );
  12861. case 'OR':
  12862. return Jed.PF.interpreter( ast.left )( n ) || Jed.PF.interpreter( ast.right )( n );
  12863. case 'AND':
  12864. return Jed.PF.interpreter( ast.left )( n ) && Jed.PF.interpreter( ast.right )( n );
  12865. case 'LT':
  12866. return Jed.PF.interpreter( ast.left )( n ) < Jed.PF.interpreter( ast.right )( n );
  12867. case 'GT':
  12868. return Jed.PF.interpreter( ast.left )( n ) > Jed.PF.interpreter( ast.right )( n );
  12869. case 'LTE':
  12870. return Jed.PF.interpreter( ast.left )( n ) <= Jed.PF.interpreter( ast.right )( n );
  12871. case 'GTE':
  12872. return Jed.PF.interpreter( ast.left )( n ) >= Jed.PF.interpreter( ast.right )( n );
  12873. case 'EQ':
  12874. return Jed.PF.interpreter( ast.left )( n ) == Jed.PF.interpreter( ast.right )( n );
  12875. case 'NEQ':
  12876. return Jed.PF.interpreter( ast.left )( n ) != Jed.PF.interpreter( ast.right )( n );
  12877. case 'MOD':
  12878. return Jed.PF.interpreter( ast.left )( n ) % Jed.PF.interpreter( ast.right )( n );
  12879. case 'VAR':
  12880. return n;
  12881. case 'NUM':
  12882. return ast.val;
  12883. default:
  12884. throw new Error("Invalid Token found.");
  12885. }
  12886. };
  12887. };
  12888. Jed.PF.extractPluralExpr = function ( p ) {
  12889. // trim first
  12890. p = p.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
  12891. if (! /;\s*$/.test(p)) {
  12892. p = p.concat(';');
  12893. }
  12894. var nplurals_re = /nplurals\=(\d+);/,
  12895. plural_re = /plural\=(.*);/,
  12896. nplurals_matches = p.match( nplurals_re ),
  12897. res = {},
  12898. plural_matches;
  12899. // Find the nplurals number
  12900. if ( nplurals_matches.length > 1 ) {
  12901. res.nplurals = nplurals_matches[1];
  12902. }
  12903. else {
  12904. throw new Error('nplurals not found in plural_forms string: ' + p );
  12905. }
  12906. // remove that data to get to the formula
  12907. p = p.replace( nplurals_re, "" );
  12908. plural_matches = p.match( plural_re );
  12909. if (!( plural_matches && plural_matches.length > 1 ) ) {
  12910. throw new Error('`plural` expression not found: ' + p);
  12911. }
  12912. return plural_matches[ 1 ];
  12913. };
  12914. /* Jison generated parser */
  12915. Jed.PF.parser = (function(){
  12916. var parser = {trace: function trace() { },
  12917. yy: {},
  12918. symbols_: {"error":2,"expressions":3,"e":4,"EOF":5,"?":6,":":7,"||":8,"&&":9,"<":10,"<=":11,">":12,">=":13,"!=":14,"==":15,"%":16,"(":17,")":18,"n":19,"NUMBER":20,"$accept":0,"$end":1},
  12919. terminals_: {2:"error",5:"EOF",6:"?",7:":",8:"||",9:"&&",10:"<",11:"<=",12:">",13:">=",14:"!=",15:"==",16:"%",17:"(",18:")",19:"n",20:"NUMBER"},
  12920. productions_: [0,[3,2],[4,5],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,1],[4,1]],
  12921. performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {
  12922. var $0 = $$.length - 1;
  12923. switch (yystate) {
  12924. case 1: return { type : 'GROUP', expr: $$[$0-1] };
  12925. break;
  12926. case 2:this.$ = { type: 'TERNARY', expr: $$[$0-4], truthy : $$[$0-2], falsey: $$[$0] };
  12927. break;
  12928. case 3:this.$ = { type: "OR", left: $$[$0-2], right: $$[$0] };
  12929. break;
  12930. case 4:this.$ = { type: "AND", left: $$[$0-2], right: $$[$0] };
  12931. break;
  12932. case 5:this.$ = { type: 'LT', left: $$[$0-2], right: $$[$0] };
  12933. break;
  12934. case 6:this.$ = { type: 'LTE', left: $$[$0-2], right: $$[$0] };
  12935. break;
  12936. case 7:this.$ = { type: 'GT', left: $$[$0-2], right: $$[$0] };
  12937. break;
  12938. case 8:this.$ = { type: 'GTE', left: $$[$0-2], right: $$[$0] };
  12939. break;
  12940. case 9:this.$ = { type: 'NEQ', left: $$[$0-2], right: $$[$0] };
  12941. break;
  12942. case 10:this.$ = { type: 'EQ', left: $$[$0-2], right: $$[$0] };
  12943. break;
  12944. case 11:this.$ = { type: 'MOD', left: $$[$0-2], right: $$[$0] };
  12945. break;
  12946. case 12:this.$ = { type: 'GROUP', expr: $$[$0-1] };
  12947. break;
  12948. case 13:this.$ = { type: 'VAR' };
  12949. break;
  12950. case 14:this.$ = { type: 'NUM', val: Number(yytext) };
  12951. break;
  12952. }
  12953. },
  12954. table: [{3:1,4:2,17:[1,3],19:[1,4],20:[1,5]},{1:[3]},{5:[1,6],6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{4:17,17:[1,3],19:[1,4],20:[1,5]},{5:[2,13],6:[2,13],7:[2,13],8:[2,13],9:[2,13],10:[2,13],11:[2,13],12:[2,13],13:[2,13],14:[2,13],15:[2,13],16:[2,13],18:[2,13]},{5:[2,14],6:[2,14],7:[2,14],8:[2,14],9:[2,14],10:[2,14],11:[2,14],12:[2,14],13:[2,14],14:[2,14],15:[2,14],16:[2,14],18:[2,14]},{1:[2,1]},{4:18,17:[1,3],19:[1,4],20:[1,5]},{4:19,17:[1,3],19:[1,4],20:[1,5]},{4:20,17:[1,3],19:[1,4],20:[1,5]},{4:21,17:[1,3],19:[1,4],20:[1,5]},{4:22,17:[1,3],19:[1,4],20:[1,5]},{4:23,17:[1,3],19:[1,4],20:[1,5]},{4:24,17:[1,3],19:[1,4],20:[1,5]},{4:25,17:[1,3],19:[1,4],20:[1,5]},{4:26,17:[1,3],19:[1,4],20:[1,5]},{4:27,17:[1,3],19:[1,4],20:[1,5]},{6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[1,28]},{6:[1,7],7:[1,29],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{5:[2,3],6:[2,3],7:[2,3],8:[2,3],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,3]},{5:[2,4],6:[2,4],7:[2,4],8:[2,4],9:[2,4],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,4]},{5:[2,5],6:[2,5],7:[2,5],8:[2,5],9:[2,5],10:[2,5],11:[2,5],12:[2,5],13:[2,5],14:[2,5],15:[2,5],16:[1,16],18:[2,5]},{5:[2,6],6:[2,6],7:[2,6],8:[2,6],9:[2,6],10:[2,6],11:[2,6],12:[2,6],13:[2,6],14:[2,6],15:[2,6],16:[1,16],18:[2,6]},{5:[2,7],6:[2,7],7:[2,7],8:[2,7],9:[2,7],10:[2,7],11:[2,7],12:[2,7],13:[2,7],14:[2,7],15:[2,7],16:[1,16],18:[2,7]},{5:[2,8],6:[2,8],7:[2,8],8:[2,8],9:[2,8],10:[2,8],11:[2,8],12:[2,8],13:[2,8],14:[2,8],15:[2,8],16:[1,16],18:[2,8]},{5:[2,9],6:[2,9],7:[2,9],8:[2,9],9:[2,9],10:[2,9],11:[2,9],12:[2,9],13:[2,9],14:[2,9],15:[2,9],16:[1,16],18:[2,9]},{5:[2,10],6:[2,10],7:[2,10],8:[2,10],9:[2,10],10:[2,10],11:[2,10],12:[2,10],13:[2,10],14:[2,10],15:[2,10],16:[1,16],18:[2,10]},{5:[2,11],6:[2,11],7:[2,11],8:[2,11],9:[2,11],10:[2,11],11:[2,11],12:[2,11],13:[2,11],14:[2,11],15:[2,11],16:[2,11],18:[2,11]},{5:[2,12],6:[2,12],7:[2,12],8:[2,12],9:[2,12],10:[2,12],11:[2,12],12:[2,12],13:[2,12],14:[2,12],15:[2,12],16:[2,12],18:[2,12]},{4:30,17:[1,3],19:[1,4],20:[1,5]},{5:[2,2],6:[1,7],7:[2,2],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,2]}],
  12955. defaultActions: {6:[2,1]},
  12956. parseError: function parseError(str, hash) {
  12957. throw new Error(str);
  12958. },
  12959. parse: function parse(input) {
  12960. var self = this,
  12961. stack = [0],
  12962. vstack = [null], // semantic value stack
  12963. lstack = [], // location stack
  12964. table = this.table,
  12965. yytext = '',
  12966. yylineno = 0,
  12967. yyleng = 0,
  12968. recovering = 0,
  12969. TERROR = 2,
  12970. EOF = 1;
  12971. //this.reductionCount = this.shiftCount = 0;
  12972. this.lexer.setInput(input);
  12973. this.lexer.yy = this.yy;
  12974. this.yy.lexer = this.lexer;
  12975. if (typeof this.lexer.yylloc == 'undefined')
  12976. this.lexer.yylloc = {};
  12977. var yyloc = this.lexer.yylloc;
  12978. lstack.push(yyloc);
  12979. if (typeof this.yy.parseError === 'function')
  12980. this.parseError = this.yy.parseError;
  12981. function popStack (n) {
  12982. stack.length = stack.length - 2*n;
  12983. vstack.length = vstack.length - n;
  12984. lstack.length = lstack.length - n;
  12985. }
  12986. function lex() {
  12987. var token;
  12988. token = self.lexer.lex() || 1; // $end = 1
  12989. // if token isn't its numeric value, convert
  12990. if (typeof token !== 'number') {
  12991. token = self.symbols_[token] || token;
  12992. }
  12993. return token;
  12994. }
  12995. var symbol, preErrorSymbol, state, action, a, r, yyval={},p,len,newState, expected;
  12996. while (true) {
  12997. // retreive state number from top of stack
  12998. state = stack[stack.length-1];
  12999. // use default actions if available
  13000. if (this.defaultActions[state]) {
  13001. action = this.defaultActions[state];
  13002. } else {
  13003. if (symbol == null)
  13004. symbol = lex();
  13005. // read action for current state and first input
  13006. action = table[state] && table[state][symbol];
  13007. }
  13008. // handle parse error
  13009. _handle_error:
  13010. if (typeof action === 'undefined' || !action.length || !action[0]) {
  13011. if (!recovering) {
  13012. // Report error
  13013. expected = [];
  13014. for (p in table[state]) if (this.terminals_[p] && p > 2) {
  13015. expected.push("'"+this.terminals_[p]+"'");
  13016. }
  13017. var errStr = '';
  13018. if (this.lexer.showPosition) {
  13019. errStr = 'Parse error on line '+(yylineno+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+expected.join(', ') + ", got '" + this.terminals_[symbol]+ "'";
  13020. } else {
  13021. errStr = 'Parse error on line '+(yylineno+1)+": Unexpected " +
  13022. (symbol == 1 /*EOF*/ ? "end of input" :
  13023. ("'"+(this.terminals_[symbol] || symbol)+"'"));
  13024. }
  13025. this.parseError(errStr,
  13026. {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});
  13027. }
  13028. // just recovered from another error
  13029. if (recovering == 3) {
  13030. if (symbol == EOF) {
  13031. throw new Error(errStr || 'Parsing halted.');
  13032. }
  13033. // discard current lookahead and grab another
  13034. yyleng = this.lexer.yyleng;
  13035. yytext = this.lexer.yytext;
  13036. yylineno = this.lexer.yylineno;
  13037. yyloc = this.lexer.yylloc;
  13038. symbol = lex();
  13039. }
  13040. // try to recover from error
  13041. while (1) {
  13042. // check for error recovery rule in this state
  13043. if ((TERROR.toString()) in table[state]) {
  13044. break;
  13045. }
  13046. if (state == 0) {
  13047. throw new Error(errStr || 'Parsing halted.');
  13048. }
  13049. popStack(1);
  13050. state = stack[stack.length-1];
  13051. }
  13052. preErrorSymbol = symbol; // save the lookahead token
  13053. symbol = TERROR; // insert generic error symbol as new lookahead
  13054. state = stack[stack.length-1];
  13055. action = table[state] && table[state][TERROR];
  13056. recovering = 3; // allow 3 real symbols to be shifted before reporting a new error
  13057. }
  13058. // this shouldn't happen, unless resolve defaults are off
  13059. if (action[0] instanceof Array && action.length > 1) {
  13060. throw new Error('Parse Error: multiple actions possible at state: '+state+', token: '+symbol);
  13061. }
  13062. switch (action[0]) {
  13063. case 1: // shift
  13064. //this.shiftCount++;
  13065. stack.push(symbol);
  13066. vstack.push(this.lexer.yytext);
  13067. lstack.push(this.lexer.yylloc);
  13068. stack.push(action[1]); // push state
  13069. symbol = null;
  13070. if (!preErrorSymbol) { // normal execution/no error
  13071. yyleng = this.lexer.yyleng;
  13072. yytext = this.lexer.yytext;
  13073. yylineno = this.lexer.yylineno;
  13074. yyloc = this.lexer.yylloc;
  13075. if (recovering > 0)
  13076. recovering--;
  13077. } else { // error just occurred, resume old lookahead f/ before error
  13078. symbol = preErrorSymbol;
  13079. preErrorSymbol = null;
  13080. }
  13081. break;
  13082. case 2: // reduce
  13083. //this.reductionCount++;
  13084. len = this.productions_[action[1]][1];
  13085. // perform semantic action
  13086. yyval.$ = vstack[vstack.length-len]; // default to $$ = $1
  13087. // default location, uses first token for firsts, last for lasts
  13088. yyval._$ = {
  13089. first_line: lstack[lstack.length-(len||1)].first_line,
  13090. last_line: lstack[lstack.length-1].last_line,
  13091. first_column: lstack[lstack.length-(len||1)].first_column,
  13092. last_column: lstack[lstack.length-1].last_column
  13093. };
  13094. r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
  13095. if (typeof r !== 'undefined') {
  13096. return r;
  13097. }
  13098. // pop off stack
  13099. if (len) {
  13100. stack = stack.slice(0,-1*len*2);
  13101. vstack = vstack.slice(0, -1*len);
  13102. lstack = lstack.slice(0, -1*len);
  13103. }
  13104. stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce)
  13105. vstack.push(yyval.$);
  13106. lstack.push(yyval._$);
  13107. // goto new state = table[STATE][NONTERMINAL]
  13108. newState = table[stack[stack.length-2]][stack[stack.length-1]];
  13109. stack.push(newState);
  13110. break;
  13111. case 3: // accept
  13112. return true;
  13113. }
  13114. }
  13115. return true;
  13116. }};/* Jison generated lexer */
  13117. var lexer = (function(){
  13118. var lexer = ({EOF:1,
  13119. parseError:function parseError(str, hash) {
  13120. if (this.yy.parseError) {
  13121. this.yy.parseError(str, hash);
  13122. } else {
  13123. throw new Error(str);
  13124. }
  13125. },
  13126. setInput:function (input) {
  13127. this._input = input;
  13128. this._more = this._less = this.done = false;
  13129. this.yylineno = this.yyleng = 0;
  13130. this.yytext = this.matched = this.match = '';
  13131. this.conditionStack = ['INITIAL'];
  13132. this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};
  13133. return this;
  13134. },
  13135. input:function () {
  13136. var ch = this._input[0];
  13137. this.yytext+=ch;
  13138. this.yyleng++;
  13139. this.match+=ch;
  13140. this.matched+=ch;
  13141. var lines = ch.match(/\n/);
  13142. if (lines) this.yylineno++;
  13143. this._input = this._input.slice(1);
  13144. return ch;
  13145. },
  13146. unput:function (ch) {
  13147. this._input = ch + this._input;
  13148. return this;
  13149. },
  13150. more:function () {
  13151. this._more = true;
  13152. return this;
  13153. },
  13154. pastInput:function () {
  13155. var past = this.matched.substr(0, this.matched.length - this.match.length);
  13156. return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\n/g, "");
  13157. },
  13158. upcomingInput:function () {
  13159. var next = this.match;
  13160. if (next.length < 20) {
  13161. next += this._input.substr(0, 20-next.length);
  13162. }
  13163. return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\n/g, "");
  13164. },
  13165. showPosition:function () {
  13166. var pre = this.pastInput();
  13167. var c = new Array(pre.length + 1).join("-");
  13168. return pre + this.upcomingInput() + "\n" + c+"^";
  13169. },
  13170. next:function () {
  13171. if (this.done) {
  13172. return this.EOF;
  13173. }
  13174. if (!this._input) this.done = true;
  13175. var token,
  13176. match,
  13177. col,
  13178. lines;
  13179. if (!this._more) {
  13180. this.yytext = '';
  13181. this.match = '';
  13182. }
  13183. var rules = this._currentRules();
  13184. for (var i=0;i < rules.length; i++) {
  13185. match = this._input.match(this.rules[rules[i]]);
  13186. if (match) {
  13187. lines = match[0].match(/\n.*/g);
  13188. if (lines) this.yylineno += lines.length;
  13189. this.yylloc = {first_line: this.yylloc.last_line,
  13190. last_line: this.yylineno+1,
  13191. first_column: this.yylloc.last_column,
  13192. last_column: lines ? lines[lines.length-1].length-1 : this.yylloc.last_column + match[0].length}
  13193. this.yytext += match[0];
  13194. this.match += match[0];
  13195. this.matches = match;
  13196. this.yyleng = this.yytext.length;
  13197. this._more = false;
  13198. this._input = this._input.slice(match[0].length);
  13199. this.matched += match[0];
  13200. token = this.performAction.call(this, this.yy, this, rules[i],this.conditionStack[this.conditionStack.length-1]);
  13201. if (token) return token;
  13202. else return;
  13203. }
  13204. }
  13205. if (this._input === "") {
  13206. return this.EOF;
  13207. } else {
  13208. this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\n'+this.showPosition(),
  13209. {text: "", token: null, line: this.yylineno});
  13210. }
  13211. },
  13212. lex:function lex() {
  13213. var r = this.next();
  13214. if (typeof r !== 'undefined') {
  13215. return r;
  13216. } else {
  13217. return this.lex();
  13218. }
  13219. },
  13220. begin:function begin(condition) {
  13221. this.conditionStack.push(condition);
  13222. },
  13223. popState:function popState() {
  13224. return this.conditionStack.pop();
  13225. },
  13226. _currentRules:function _currentRules() {
  13227. return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;
  13228. },
  13229. topState:function () {
  13230. return this.conditionStack[this.conditionStack.length-2];
  13231. },
  13232. pushState:function begin(condition) {
  13233. this.begin(condition);
  13234. }});
  13235. lexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {
  13236. var YYSTATE=YY_START;
  13237. switch($avoiding_name_collisions) {
  13238. case 0:/* skip whitespace */
  13239. break;
  13240. case 1:return 20
  13241. break;
  13242. case 2:return 19
  13243. break;
  13244. case 3:return 8
  13245. break;
  13246. case 4:return 9
  13247. break;
  13248. case 5:return 6
  13249. break;
  13250. case 6:return 7
  13251. break;
  13252. case 7:return 11
  13253. break;
  13254. case 8:return 13
  13255. break;
  13256. case 9:return 10
  13257. break;
  13258. case 10:return 12
  13259. break;
  13260. case 11:return 14
  13261. break;
  13262. case 12:return 15
  13263. break;
  13264. case 13:return 16
  13265. break;
  13266. case 14:return 17
  13267. break;
  13268. case 15:return 18
  13269. break;
  13270. case 16:return 5
  13271. break;
  13272. case 17:return 'INVALID'
  13273. break;
  13274. }
  13275. };
  13276. lexer.rules = [/^\s+/,/^[0-9]+(\.[0-9]+)?\b/,/^n\b/,/^\|\|/,/^&&/,/^\?/,/^:/,/^<=/,/^>=/,/^</,/^>/,/^!=/,/^==/,/^%/,/^\(/,/^\)/,/^$/,/^./];
  13277. lexer.conditions = {"INITIAL":{"rules":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],"inclusive":true}};return lexer;})()
  13278. parser.lexer = lexer;
  13279. return parser;
  13280. })();
  13281. // End parser
  13282. // Handle node, amd, and global systems
  13283. if (true) {
  13284. if (typeof module !== 'undefined' && module.exports) {
  13285. exports = module.exports = Jed;
  13286. }
  13287. exports.Jed = Jed;
  13288. }
  13289. else {}
  13290. })(this);
  13291. /***/ }),
  13292. /***/ "./node_modules/lodash/_Symbol.js":
  13293. /*!****************************************!*\
  13294. !*** ./node_modules/lodash/_Symbol.js ***!
  13295. \****************************************/
  13296. /*! no static exports found */
  13297. /***/ (function(module, exports, __webpack_require__) {
  13298. var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js");
  13299. /** Built-in value references. */
  13300. var Symbol = root.Symbol;
  13301. module.exports = Symbol;
  13302. /***/ }),
  13303. /***/ "./node_modules/lodash/_arrayMap.js":
  13304. /*!******************************************!*\
  13305. !*** ./node_modules/lodash/_arrayMap.js ***!
  13306. \******************************************/
  13307. /*! no static exports found */
  13308. /***/ (function(module, exports) {
  13309. /**
  13310. * A specialized version of `_.map` for arrays without support for iteratee
  13311. * shorthands.
  13312. *
  13313. * @private
  13314. * @param {Array} [array] The array to iterate over.
  13315. * @param {Function} iteratee The function invoked per iteration.
  13316. * @returns {Array} Returns the new mapped array.
  13317. */
  13318. function arrayMap(array, iteratee) {
  13319. var index = -1,
  13320. length = array == null ? 0 : array.length,
  13321. result = Array(length);
  13322. while (++index < length) {
  13323. result[index] = iteratee(array[index], index, array);
  13324. }
  13325. return result;
  13326. }
  13327. module.exports = arrayMap;
  13328. /***/ }),
  13329. /***/ "./node_modules/lodash/_baseGetTag.js":
  13330. /*!********************************************!*\
  13331. !*** ./node_modules/lodash/_baseGetTag.js ***!
  13332. \********************************************/
  13333. /*! no static exports found */
  13334. /***/ (function(module, exports, __webpack_require__) {
  13335. var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"),
  13336. getRawTag = __webpack_require__(/*! ./_getRawTag */ "./node_modules/lodash/_getRawTag.js"),
  13337. objectToString = __webpack_require__(/*! ./_objectToString */ "./node_modules/lodash/_objectToString.js");
  13338. /** `Object#toString` result references. */
  13339. var nullTag = '[object Null]',
  13340. undefinedTag = '[object Undefined]';
  13341. /** Built-in value references. */
  13342. var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  13343. /**
  13344. * The base implementation of `getTag` without fallbacks for buggy environments.
  13345. *
  13346. * @private
  13347. * @param {*} value The value to query.
  13348. * @returns {string} Returns the `toStringTag`.
  13349. */
  13350. function baseGetTag(value) {
  13351. if (value == null) {
  13352. return value === undefined ? undefinedTag : nullTag;
  13353. }
  13354. return (symToStringTag && symToStringTag in Object(value))
  13355. ? getRawTag(value)
  13356. : objectToString(value);
  13357. }
  13358. module.exports = baseGetTag;
  13359. /***/ }),
  13360. /***/ "./node_modules/lodash/_basePropertyOf.js":
  13361. /*!************************************************!*\
  13362. !*** ./node_modules/lodash/_basePropertyOf.js ***!
  13363. \************************************************/
  13364. /*! no static exports found */
  13365. /***/ (function(module, exports) {
  13366. /**
  13367. * The base implementation of `_.propertyOf` without support for deep paths.
  13368. *
  13369. * @private
  13370. * @param {Object} object The object to query.
  13371. * @returns {Function} Returns the new accessor function.
  13372. */
  13373. function basePropertyOf(object) {
  13374. return function(key) {
  13375. return object == null ? undefined : object[key];
  13376. };
  13377. }
  13378. module.exports = basePropertyOf;
  13379. /***/ }),
  13380. /***/ "./node_modules/lodash/_baseToString.js":
  13381. /*!**********************************************!*\
  13382. !*** ./node_modules/lodash/_baseToString.js ***!
  13383. \**********************************************/
  13384. /*! no static exports found */
  13385. /***/ (function(module, exports, __webpack_require__) {
  13386. var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"),
  13387. arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/lodash/_arrayMap.js"),
  13388. isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"),
  13389. isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js");
  13390. /** Used as references for various `Number` constants. */
  13391. var INFINITY = 1 / 0;
  13392. /** Used to convert symbols to primitives and strings. */
  13393. var symbolProto = Symbol ? Symbol.prototype : undefined,
  13394. symbolToString = symbolProto ? symbolProto.toString : undefined;
  13395. /**
  13396. * The base implementation of `_.toString` which doesn't convert nullish
  13397. * values to empty strings.
  13398. *
  13399. * @private
  13400. * @param {*} value The value to process.
  13401. * @returns {string} Returns the string.
  13402. */
  13403. function baseToString(value) {
  13404. // Exit early for strings to avoid a performance hit in some environments.
  13405. if (typeof value == 'string') {
  13406. return value;
  13407. }
  13408. if (isArray(value)) {
  13409. // Recursively convert values (susceptible to call stack limits).
  13410. return arrayMap(value, baseToString) + '';
  13411. }
  13412. if (isSymbol(value)) {
  13413. return symbolToString ? symbolToString.call(value) : '';
  13414. }
  13415. var result = (value + '');
  13416. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  13417. }
  13418. module.exports = baseToString;
  13419. /***/ }),
  13420. /***/ "./node_modules/lodash/_escapeHtmlChar.js":
  13421. /*!************************************************!*\
  13422. !*** ./node_modules/lodash/_escapeHtmlChar.js ***!
  13423. \************************************************/
  13424. /*! no static exports found */
  13425. /***/ (function(module, exports, __webpack_require__) {
  13426. var basePropertyOf = __webpack_require__(/*! ./_basePropertyOf */ "./node_modules/lodash/_basePropertyOf.js");
  13427. /** Used to map characters to HTML entities. */
  13428. var htmlEscapes = {
  13429. '&': '&amp;',
  13430. '<': '&lt;',
  13431. '>': '&gt;',
  13432. '"': '&quot;',
  13433. "'": '&#39;'
  13434. };
  13435. /**
  13436. * Used by `_.escape` to convert characters to HTML entities.
  13437. *
  13438. * @private
  13439. * @param {string} chr The matched character to escape.
  13440. * @returns {string} Returns the escaped character.
  13441. */
  13442. var escapeHtmlChar = basePropertyOf(htmlEscapes);
  13443. module.exports = escapeHtmlChar;
  13444. /***/ }),
  13445. /***/ "./node_modules/lodash/_freeGlobal.js":
  13446. /*!********************************************!*\
  13447. !*** ./node_modules/lodash/_freeGlobal.js ***!
  13448. \********************************************/
  13449. /*! no static exports found */
  13450. /***/ (function(module, exports, __webpack_require__) {
  13451. /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
  13452. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  13453. module.exports = freeGlobal;
  13454. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  13455. /***/ }),
  13456. /***/ "./node_modules/lodash/_getRawTag.js":
  13457. /*!*******************************************!*\
  13458. !*** ./node_modules/lodash/_getRawTag.js ***!
  13459. \*******************************************/
  13460. /*! no static exports found */
  13461. /***/ (function(module, exports, __webpack_require__) {
  13462. var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js");
  13463. /** Used for built-in method references. */
  13464. var objectProto = Object.prototype;
  13465. /** Used to check objects for own properties. */
  13466. var hasOwnProperty = objectProto.hasOwnProperty;
  13467. /**
  13468. * Used to resolve the
  13469. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  13470. * of values.
  13471. */
  13472. var nativeObjectToString = objectProto.toString;
  13473. /** Built-in value references. */
  13474. var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  13475. /**
  13476. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  13477. *
  13478. * @private
  13479. * @param {*} value The value to query.
  13480. * @returns {string} Returns the raw `toStringTag`.
  13481. */
  13482. function getRawTag(value) {
  13483. var isOwn = hasOwnProperty.call(value, symToStringTag),
  13484. tag = value[symToStringTag];
  13485. try {
  13486. value[symToStringTag] = undefined;
  13487. var unmasked = true;
  13488. } catch (e) {}
  13489. var result = nativeObjectToString.call(value);
  13490. if (unmasked) {
  13491. if (isOwn) {
  13492. value[symToStringTag] = tag;
  13493. } else {
  13494. delete value[symToStringTag];
  13495. }
  13496. }
  13497. return result;
  13498. }
  13499. module.exports = getRawTag;
  13500. /***/ }),
  13501. /***/ "./node_modules/lodash/_objectToString.js":
  13502. /*!************************************************!*\
  13503. !*** ./node_modules/lodash/_objectToString.js ***!
  13504. \************************************************/
  13505. /*! no static exports found */
  13506. /***/ (function(module, exports) {
  13507. /** Used for built-in method references. */
  13508. var objectProto = Object.prototype;
  13509. /**
  13510. * Used to resolve the
  13511. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  13512. * of values.
  13513. */
  13514. var nativeObjectToString = objectProto.toString;
  13515. /**
  13516. * Converts `value` to a string using `Object.prototype.toString`.
  13517. *
  13518. * @private
  13519. * @param {*} value The value to convert.
  13520. * @returns {string} Returns the converted string.
  13521. */
  13522. function objectToString(value) {
  13523. return nativeObjectToString.call(value);
  13524. }
  13525. module.exports = objectToString;
  13526. /***/ }),
  13527. /***/ "./node_modules/lodash/_root.js":
  13528. /*!**************************************!*\
  13529. !*** ./node_modules/lodash/_root.js ***!
  13530. \**************************************/
  13531. /*! no static exports found */
  13532. /***/ (function(module, exports, __webpack_require__) {
  13533. var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js");
  13534. /** Detect free variable `self`. */
  13535. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  13536. /** Used as a reference to the global object. */
  13537. var root = freeGlobal || freeSelf || Function('return this')();
  13538. module.exports = root;
  13539. /***/ }),
  13540. /***/ "./node_modules/lodash/escape.js":
  13541. /*!***************************************!*\
  13542. !*** ./node_modules/lodash/escape.js ***!
  13543. \***************************************/
  13544. /*! no static exports found */
  13545. /***/ (function(module, exports, __webpack_require__) {
  13546. var escapeHtmlChar = __webpack_require__(/*! ./_escapeHtmlChar */ "./node_modules/lodash/_escapeHtmlChar.js"),
  13547. toString = __webpack_require__(/*! ./toString */ "./node_modules/lodash/toString.js");
  13548. /** Used to match HTML entities and HTML characters. */
  13549. var reUnescapedHtml = /[&<>"']/g,
  13550. reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
  13551. /**
  13552. * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
  13553. * corresponding HTML entities.
  13554. *
  13555. * **Note:** No other characters are escaped. To escape additional
  13556. * characters use a third-party library like [_he_](https://mths.be/he).
  13557. *
  13558. * Though the ">" character is escaped for symmetry, characters like
  13559. * ">" and "/" don't need escaping in HTML and have no special meaning
  13560. * unless they're part of a tag or unquoted attribute value. See
  13561. * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
  13562. * (under "semi-related fun fact") for more details.
  13563. *
  13564. * When working with HTML you should always
  13565. * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
  13566. * XSS vectors.
  13567. *
  13568. * @static
  13569. * @since 0.1.0
  13570. * @memberOf _
  13571. * @category String
  13572. * @param {string} [string=''] The string to escape.
  13573. * @returns {string} Returns the escaped string.
  13574. * @example
  13575. *
  13576. * _.escape('fred, barney, & pebbles');
  13577. * // => 'fred, barney, &amp; pebbles'
  13578. */
  13579. function escape(string) {
  13580. string = toString(string);
  13581. return (string && reHasUnescapedHtml.test(string))
  13582. ? string.replace(reUnescapedHtml, escapeHtmlChar)
  13583. : string;
  13584. }
  13585. module.exports = escape;
  13586. /***/ }),
  13587. /***/ "./node_modules/lodash/isArray.js":
  13588. /*!****************************************!*\
  13589. !*** ./node_modules/lodash/isArray.js ***!
  13590. \****************************************/
  13591. /*! no static exports found */
  13592. /***/ (function(module, exports) {
  13593. /**
  13594. * Checks if `value` is classified as an `Array` object.
  13595. *
  13596. * @static
  13597. * @memberOf _
  13598. * @since 0.1.0
  13599. * @category Lang
  13600. * @param {*} value The value to check.
  13601. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  13602. * @example
  13603. *
  13604. * _.isArray([1, 2, 3]);
  13605. * // => true
  13606. *
  13607. * _.isArray(document.body.children);
  13608. * // => false
  13609. *
  13610. * _.isArray('abc');
  13611. * // => false
  13612. *
  13613. * _.isArray(_.noop);
  13614. * // => false
  13615. */
  13616. var isArray = Array.isArray;
  13617. module.exports = isArray;
  13618. /***/ }),
  13619. /***/ "./node_modules/lodash/isObjectLike.js":
  13620. /*!*********************************************!*\
  13621. !*** ./node_modules/lodash/isObjectLike.js ***!
  13622. \*********************************************/
  13623. /*! no static exports found */
  13624. /***/ (function(module, exports) {
  13625. /**
  13626. * Checks if `value` is object-like. A value is object-like if it's not `null`
  13627. * and has a `typeof` result of "object".
  13628. *
  13629. * @static
  13630. * @memberOf _
  13631. * @since 4.0.0
  13632. * @category Lang
  13633. * @param {*} value The value to check.
  13634. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  13635. * @example
  13636. *
  13637. * _.isObjectLike({});
  13638. * // => true
  13639. *
  13640. * _.isObjectLike([1, 2, 3]);
  13641. * // => true
  13642. *
  13643. * _.isObjectLike(_.noop);
  13644. * // => false
  13645. *
  13646. * _.isObjectLike(null);
  13647. * // => false
  13648. */
  13649. function isObjectLike(value) {
  13650. return value != null && typeof value == 'object';
  13651. }
  13652. module.exports = isObjectLike;
  13653. /***/ }),
  13654. /***/ "./node_modules/lodash/isSymbol.js":
  13655. /*!*****************************************!*\
  13656. !*** ./node_modules/lodash/isSymbol.js ***!
  13657. \*****************************************/
  13658. /*! no static exports found */
  13659. /***/ (function(module, exports, __webpack_require__) {
  13660. var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"),
  13661. isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js");
  13662. /** `Object#toString` result references. */
  13663. var symbolTag = '[object Symbol]';
  13664. /**
  13665. * Checks if `value` is classified as a `Symbol` primitive or object.
  13666. *
  13667. * @static
  13668. * @memberOf _
  13669. * @since 4.0.0
  13670. * @category Lang
  13671. * @param {*} value The value to check.
  13672. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  13673. * @example
  13674. *
  13675. * _.isSymbol(Symbol.iterator);
  13676. * // => true
  13677. *
  13678. * _.isSymbol('abc');
  13679. * // => false
  13680. */
  13681. function isSymbol(value) {
  13682. return typeof value == 'symbol' ||
  13683. (isObjectLike(value) && baseGetTag(value) == symbolTag);
  13684. }
  13685. module.exports = isSymbol;
  13686. /***/ }),
  13687. /***/ "./node_modules/lodash/lodash.js":
  13688. /*!***************************************!*\
  13689. !*** ./node_modules/lodash/lodash.js ***!
  13690. \***************************************/
  13691. /*! no static exports found */
  13692. /***/ (function(module, exports, __webpack_require__) {
  13693. /* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/**
  13694. * @license
  13695. * Lodash <https://lodash.com/>
  13696. * Copyright JS Foundation and other contributors <https://js.foundation/>
  13697. * Released under MIT license <https://lodash.com/license>
  13698. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  13699. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  13700. */
  13701. ;(function() {
  13702. /** Used as a safe reference for `undefined` in pre-ES5 environments. */
  13703. var undefined;
  13704. /** Used as the semantic version number. */
  13705. var VERSION = '4.17.10';
  13706. /** Used as the size to enable large array optimizations. */
  13707. var LARGE_ARRAY_SIZE = 200;
  13708. /** Error message constants. */
  13709. var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
  13710. FUNC_ERROR_TEXT = 'Expected a function';
  13711. /** Used to stand-in for `undefined` hash values. */
  13712. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  13713. /** Used as the maximum memoize cache size. */
  13714. var MAX_MEMOIZE_SIZE = 500;
  13715. /** Used as the internal argument placeholder. */
  13716. var PLACEHOLDER = '__lodash_placeholder__';
  13717. /** Used to compose bitmasks for cloning. */
  13718. var CLONE_DEEP_FLAG = 1,
  13719. CLONE_FLAT_FLAG = 2,
  13720. CLONE_SYMBOLS_FLAG = 4;
  13721. /** Used to compose bitmasks for value comparisons. */
  13722. var COMPARE_PARTIAL_FLAG = 1,
  13723. COMPARE_UNORDERED_FLAG = 2;
  13724. /** Used to compose bitmasks for function metadata. */
  13725. var WRAP_BIND_FLAG = 1,
  13726. WRAP_BIND_KEY_FLAG = 2,
  13727. WRAP_CURRY_BOUND_FLAG = 4,
  13728. WRAP_CURRY_FLAG = 8,
  13729. WRAP_CURRY_RIGHT_FLAG = 16,
  13730. WRAP_PARTIAL_FLAG = 32,
  13731. WRAP_PARTIAL_RIGHT_FLAG = 64,
  13732. WRAP_ARY_FLAG = 128,
  13733. WRAP_REARG_FLAG = 256,
  13734. WRAP_FLIP_FLAG = 512;
  13735. /** Used as default options for `_.truncate`. */
  13736. var DEFAULT_TRUNC_LENGTH = 30,
  13737. DEFAULT_TRUNC_OMISSION = '...';
  13738. /** Used to detect hot functions by number of calls within a span of milliseconds. */
  13739. var HOT_COUNT = 800,
  13740. HOT_SPAN = 16;
  13741. /** Used to indicate the type of lazy iteratees. */
  13742. var LAZY_FILTER_FLAG = 1,
  13743. LAZY_MAP_FLAG = 2,
  13744. LAZY_WHILE_FLAG = 3;
  13745. /** Used as references for various `Number` constants. */
  13746. var INFINITY = 1 / 0,
  13747. MAX_SAFE_INTEGER = 9007199254740991,
  13748. MAX_INTEGER = 1.7976931348623157e+308,
  13749. NAN = 0 / 0;
  13750. /** Used as references for the maximum length and index of an array. */
  13751. var MAX_ARRAY_LENGTH = 4294967295,
  13752. MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
  13753. HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
  13754. /** Used to associate wrap methods with their bit flags. */
  13755. var wrapFlags = [
  13756. ['ary', WRAP_ARY_FLAG],
  13757. ['bind', WRAP_BIND_FLAG],
  13758. ['bindKey', WRAP_BIND_KEY_FLAG],
  13759. ['curry', WRAP_CURRY_FLAG],
  13760. ['curryRight', WRAP_CURRY_RIGHT_FLAG],
  13761. ['flip', WRAP_FLIP_FLAG],
  13762. ['partial', WRAP_PARTIAL_FLAG],
  13763. ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
  13764. ['rearg', WRAP_REARG_FLAG]
  13765. ];
  13766. /** `Object#toString` result references. */
  13767. var argsTag = '[object Arguments]',
  13768. arrayTag = '[object Array]',
  13769. asyncTag = '[object AsyncFunction]',
  13770. boolTag = '[object Boolean]',
  13771. dateTag = '[object Date]',
  13772. domExcTag = '[object DOMException]',
  13773. errorTag = '[object Error]',
  13774. funcTag = '[object Function]',
  13775. genTag = '[object GeneratorFunction]',
  13776. mapTag = '[object Map]',
  13777. numberTag = '[object Number]',
  13778. nullTag = '[object Null]',
  13779. objectTag = '[object Object]',
  13780. promiseTag = '[object Promise]',
  13781. proxyTag = '[object Proxy]',
  13782. regexpTag = '[object RegExp]',
  13783. setTag = '[object Set]',
  13784. stringTag = '[object String]',
  13785. symbolTag = '[object Symbol]',
  13786. undefinedTag = '[object Undefined]',
  13787. weakMapTag = '[object WeakMap]',
  13788. weakSetTag = '[object WeakSet]';
  13789. var arrayBufferTag = '[object ArrayBuffer]',
  13790. dataViewTag = '[object DataView]',
  13791. float32Tag = '[object Float32Array]',
  13792. float64Tag = '[object Float64Array]',
  13793. int8Tag = '[object Int8Array]',
  13794. int16Tag = '[object Int16Array]',
  13795. int32Tag = '[object Int32Array]',
  13796. uint8Tag = '[object Uint8Array]',
  13797. uint8ClampedTag = '[object Uint8ClampedArray]',
  13798. uint16Tag = '[object Uint16Array]',
  13799. uint32Tag = '[object Uint32Array]';
  13800. /** Used to match empty string literals in compiled template source. */
  13801. var reEmptyStringLeading = /\b__p \+= '';/g,
  13802. reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
  13803. reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
  13804. /** Used to match HTML entities and HTML characters. */
  13805. var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
  13806. reUnescapedHtml = /[&<>"']/g,
  13807. reHasEscapedHtml = RegExp(reEscapedHtml.source),
  13808. reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
  13809. /** Used to match template delimiters. */
  13810. var reEscape = /<%-([\s\S]+?)%>/g,
  13811. reEvaluate = /<%([\s\S]+?)%>/g,
  13812. reInterpolate = /<%=([\s\S]+?)%>/g;
  13813. /** Used to match property names within property paths. */
  13814. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  13815. reIsPlainProp = /^\w*$/,
  13816. rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  13817. /**
  13818. * Used to match `RegExp`
  13819. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  13820. */
  13821. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
  13822. reHasRegExpChar = RegExp(reRegExpChar.source);
  13823. /** Used to match leading and trailing whitespace. */
  13824. var reTrim = /^\s+|\s+$/g,
  13825. reTrimStart = /^\s+/,
  13826. reTrimEnd = /\s+$/;
  13827. /** Used to match wrap detail comments. */
  13828. var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
  13829. reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
  13830. reSplitDetails = /,? & /;
  13831. /** Used to match words composed of alphanumeric characters. */
  13832. var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
  13833. /** Used to match backslashes in property paths. */
  13834. var reEscapeChar = /\\(\\)?/g;
  13835. /**
  13836. * Used to match
  13837. * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
  13838. */
  13839. var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
  13840. /** Used to match `RegExp` flags from their coerced string values. */
  13841. var reFlags = /\w*$/;
  13842. /** Used to detect bad signed hexadecimal string values. */
  13843. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  13844. /** Used to detect binary string values. */
  13845. var reIsBinary = /^0b[01]+$/i;
  13846. /** Used to detect host constructors (Safari). */
  13847. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  13848. /** Used to detect octal string values. */
  13849. var reIsOctal = /^0o[0-7]+$/i;
  13850. /** Used to detect unsigned integer values. */
  13851. var reIsUint = /^(?:0|[1-9]\d*)$/;
  13852. /** Used to match Latin Unicode letters (excluding mathematical operators). */
  13853. var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
  13854. /** Used to ensure capturing order of template delimiters. */
  13855. var reNoMatch = /($^)/;
  13856. /** Used to match unescaped characters in compiled string literals. */
  13857. var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
  13858. /** Used to compose unicode character classes. */
  13859. var rsAstralRange = '\\ud800-\\udfff',
  13860. rsComboMarksRange = '\\u0300-\\u036f',
  13861. reComboHalfMarksRange = '\\ufe20-\\ufe2f',
  13862. rsComboSymbolsRange = '\\u20d0-\\u20ff',
  13863. rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
  13864. rsDingbatRange = '\\u2700-\\u27bf',
  13865. rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
  13866. rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
  13867. rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
  13868. rsPunctuationRange = '\\u2000-\\u206f',
  13869. rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
  13870. rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
  13871. rsVarRange = '\\ufe0e\\ufe0f',
  13872. rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
  13873. /** Used to compose unicode capture groups. */
  13874. var rsApos = "['\u2019]",
  13875. rsAstral = '[' + rsAstralRange + ']',
  13876. rsBreak = '[' + rsBreakRange + ']',
  13877. rsCombo = '[' + rsComboRange + ']',
  13878. rsDigits = '\\d+',
  13879. rsDingbat = '[' + rsDingbatRange + ']',
  13880. rsLower = '[' + rsLowerRange + ']',
  13881. rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
  13882. rsFitz = '\\ud83c[\\udffb-\\udfff]',
  13883. rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
  13884. rsNonAstral = '[^' + rsAstralRange + ']',
  13885. rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
  13886. rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
  13887. rsUpper = '[' + rsUpperRange + ']',
  13888. rsZWJ = '\\u200d';
  13889. /** Used to compose unicode regexes. */
  13890. var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
  13891. rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
  13892. rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
  13893. rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
  13894. reOptMod = rsModifier + '?',
  13895. rsOptVar = '[' + rsVarRange + ']?',
  13896. rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
  13897. rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
  13898. rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
  13899. rsSeq = rsOptVar + reOptMod + rsOptJoin,
  13900. rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
  13901. rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
  13902. /** Used to match apostrophes. */
  13903. var reApos = RegExp(rsApos, 'g');
  13904. /**
  13905. * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
  13906. * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
  13907. */
  13908. var reComboMark = RegExp(rsCombo, 'g');
  13909. /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
  13910. var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
  13911. /** Used to match complex or compound words. */
  13912. var reUnicodeWord = RegExp([
  13913. rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
  13914. rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
  13915. rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
  13916. rsUpper + '+' + rsOptContrUpper,
  13917. rsOrdUpper,
  13918. rsOrdLower,
  13919. rsDigits,
  13920. rsEmoji
  13921. ].join('|'), 'g');
  13922. /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
  13923. var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
  13924. /** Used to detect strings that need a more robust regexp to match words. */
  13925. var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
  13926. /** Used to assign default `context` object properties. */
  13927. var contextProps = [
  13928. 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
  13929. 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
  13930. 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
  13931. 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
  13932. '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
  13933. ];
  13934. /** Used to make template sourceURLs easier to identify. */
  13935. var templateCounter = -1;
  13936. /** Used to identify `toStringTag` values of typed arrays. */
  13937. var typedArrayTags = {};
  13938. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  13939. typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  13940. typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  13941. typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  13942. typedArrayTags[uint32Tag] = true;
  13943. typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  13944. typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  13945. typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
  13946. typedArrayTags[errorTag] = typedArrayTags[funcTag] =
  13947. typedArrayTags[mapTag] = typedArrayTags[numberTag] =
  13948. typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
  13949. typedArrayTags[setTag] = typedArrayTags[stringTag] =
  13950. typedArrayTags[weakMapTag] = false;
  13951. /** Used to identify `toStringTag` values supported by `_.clone`. */
  13952. var cloneableTags = {};
  13953. cloneableTags[argsTag] = cloneableTags[arrayTag] =
  13954. cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
  13955. cloneableTags[boolTag] = cloneableTags[dateTag] =
  13956. cloneableTags[float32Tag] = cloneableTags[float64Tag] =
  13957. cloneableTags[int8Tag] = cloneableTags[int16Tag] =
  13958. cloneableTags[int32Tag] = cloneableTags[mapTag] =
  13959. cloneableTags[numberTag] = cloneableTags[objectTag] =
  13960. cloneableTags[regexpTag] = cloneableTags[setTag] =
  13961. cloneableTags[stringTag] = cloneableTags[symbolTag] =
  13962. cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
  13963. cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  13964. cloneableTags[errorTag] = cloneableTags[funcTag] =
  13965. cloneableTags[weakMapTag] = false;
  13966. /** Used to map Latin Unicode letters to basic Latin letters. */
  13967. var deburredLetters = {
  13968. // Latin-1 Supplement block.
  13969. '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
  13970. '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
  13971. '\xc7': 'C', '\xe7': 'c',
  13972. '\xd0': 'D', '\xf0': 'd',
  13973. '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
  13974. '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
  13975. '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
  13976. '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
  13977. '\xd1': 'N', '\xf1': 'n',
  13978. '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
  13979. '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
  13980. '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
  13981. '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
  13982. '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
  13983. '\xc6': 'Ae', '\xe6': 'ae',
  13984. '\xde': 'Th', '\xfe': 'th',
  13985. '\xdf': 'ss',
  13986. // Latin Extended-A block.
  13987. '\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
  13988. '\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
  13989. '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
  13990. '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
  13991. '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
  13992. '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
  13993. '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
  13994. '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
  13995. '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
  13996. '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
  13997. '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
  13998. '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
  13999. '\u0134': 'J', '\u0135': 'j',
  14000. '\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
  14001. '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
  14002. '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
  14003. '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
  14004. '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
  14005. '\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
  14006. '\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
  14007. '\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
  14008. '\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
  14009. '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
  14010. '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
  14011. '\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
  14012. '\u0163': 't', '\u0165': 't', '\u0167': 't',
  14013. '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
  14014. '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
  14015. '\u0174': 'W', '\u0175': 'w',
  14016. '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
  14017. '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
  14018. '\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
  14019. '\u0132': 'IJ', '\u0133': 'ij',
  14020. '\u0152': 'Oe', '\u0153': 'oe',
  14021. '\u0149': "'n", '\u017f': 's'
  14022. };
  14023. /** Used to map characters to HTML entities. */
  14024. var htmlEscapes = {
  14025. '&': '&amp;',
  14026. '<': '&lt;',
  14027. '>': '&gt;',
  14028. '"': '&quot;',
  14029. "'": '&#39;'
  14030. };
  14031. /** Used to map HTML entities to characters. */
  14032. var htmlUnescapes = {
  14033. '&amp;': '&',
  14034. '&lt;': '<',
  14035. '&gt;': '>',
  14036. '&quot;': '"',
  14037. '&#39;': "'"
  14038. };
  14039. /** Used to escape characters for inclusion in compiled string literals. */
  14040. var stringEscapes = {
  14041. '\\': '\\',
  14042. "'": "'",
  14043. '\n': 'n',
  14044. '\r': 'r',
  14045. '\u2028': 'u2028',
  14046. '\u2029': 'u2029'
  14047. };
  14048. /** Built-in method references without a dependency on `root`. */
  14049. var freeParseFloat = parseFloat,
  14050. freeParseInt = parseInt;
  14051. /** Detect free variable `global` from Node.js. */
  14052. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  14053. /** Detect free variable `self`. */
  14054. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  14055. /** Used as a reference to the global object. */
  14056. var root = freeGlobal || freeSelf || Function('return this')();
  14057. /** Detect free variable `exports`. */
  14058. var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
  14059. /** Detect free variable `module`. */
  14060. var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
  14061. /** Detect the popular CommonJS extension `module.exports`. */
  14062. var moduleExports = freeModule && freeModule.exports === freeExports;
  14063. /** Detect free variable `process` from Node.js. */
  14064. var freeProcess = moduleExports && freeGlobal.process;
  14065. /** Used to access faster Node.js helpers. */
  14066. var nodeUtil = (function() {
  14067. try {
  14068. // Use `util.types` for Node.js 10+.
  14069. var types = freeModule && freeModule.require && freeModule.require('util').types;
  14070. if (types) {
  14071. return types;
  14072. }
  14073. // Legacy `process.binding('util')` for Node.js < 10.
  14074. return freeProcess && freeProcess.binding && freeProcess.binding('util');
  14075. } catch (e) {}
  14076. }());
  14077. /* Node.js helper references. */
  14078. var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
  14079. nodeIsDate = nodeUtil && nodeUtil.isDate,
  14080. nodeIsMap = nodeUtil && nodeUtil.isMap,
  14081. nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
  14082. nodeIsSet = nodeUtil && nodeUtil.isSet,
  14083. nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  14084. /*--------------------------------------------------------------------------*/
  14085. /**
  14086. * A faster alternative to `Function#apply`, this function invokes `func`
  14087. * with the `this` binding of `thisArg` and the arguments of `args`.
  14088. *
  14089. * @private
  14090. * @param {Function} func The function to invoke.
  14091. * @param {*} thisArg The `this` binding of `func`.
  14092. * @param {Array} args The arguments to invoke `func` with.
  14093. * @returns {*} Returns the result of `func`.
  14094. */
  14095. function apply(func, thisArg, args) {
  14096. switch (args.length) {
  14097. case 0: return func.call(thisArg);
  14098. case 1: return func.call(thisArg, args[0]);
  14099. case 2: return func.call(thisArg, args[0], args[1]);
  14100. case 3: return func.call(thisArg, args[0], args[1], args[2]);
  14101. }
  14102. return func.apply(thisArg, args);
  14103. }
  14104. /**
  14105. * A specialized version of `baseAggregator` for arrays.
  14106. *
  14107. * @private
  14108. * @param {Array} [array] The array to iterate over.
  14109. * @param {Function} setter The function to set `accumulator` values.
  14110. * @param {Function} iteratee The iteratee to transform keys.
  14111. * @param {Object} accumulator The initial aggregated object.
  14112. * @returns {Function} Returns `accumulator`.
  14113. */
  14114. function arrayAggregator(array, setter, iteratee, accumulator) {
  14115. var index = -1,
  14116. length = array == null ? 0 : array.length;
  14117. while (++index < length) {
  14118. var value = array[index];
  14119. setter(accumulator, value, iteratee(value), array);
  14120. }
  14121. return accumulator;
  14122. }
  14123. /**
  14124. * A specialized version of `_.forEach` for arrays without support for
  14125. * iteratee shorthands.
  14126. *
  14127. * @private
  14128. * @param {Array} [array] The array to iterate over.
  14129. * @param {Function} iteratee The function invoked per iteration.
  14130. * @returns {Array} Returns `array`.
  14131. */
  14132. function arrayEach(array, iteratee) {
  14133. var index = -1,
  14134. length = array == null ? 0 : array.length;
  14135. while (++index < length) {
  14136. if (iteratee(array[index], index, array) === false) {
  14137. break;
  14138. }
  14139. }
  14140. return array;
  14141. }
  14142. /**
  14143. * A specialized version of `_.forEachRight` for arrays without support for
  14144. * iteratee shorthands.
  14145. *
  14146. * @private
  14147. * @param {Array} [array] The array to iterate over.
  14148. * @param {Function} iteratee The function invoked per iteration.
  14149. * @returns {Array} Returns `array`.
  14150. */
  14151. function arrayEachRight(array, iteratee) {
  14152. var length = array == null ? 0 : array.length;
  14153. while (length--) {
  14154. if (iteratee(array[length], length, array) === false) {
  14155. break;
  14156. }
  14157. }
  14158. return array;
  14159. }
  14160. /**
  14161. * A specialized version of `_.every` for arrays without support for
  14162. * iteratee shorthands.
  14163. *
  14164. * @private
  14165. * @param {Array} [array] The array to iterate over.
  14166. * @param {Function} predicate The function invoked per iteration.
  14167. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  14168. * else `false`.
  14169. */
  14170. function arrayEvery(array, predicate) {
  14171. var index = -1,
  14172. length = array == null ? 0 : array.length;
  14173. while (++index < length) {
  14174. if (!predicate(array[index], index, array)) {
  14175. return false;
  14176. }
  14177. }
  14178. return true;
  14179. }
  14180. /**
  14181. * A specialized version of `_.filter` for arrays without support for
  14182. * iteratee shorthands.
  14183. *
  14184. * @private
  14185. * @param {Array} [array] The array to iterate over.
  14186. * @param {Function} predicate The function invoked per iteration.
  14187. * @returns {Array} Returns the new filtered array.
  14188. */
  14189. function arrayFilter(array, predicate) {
  14190. var index = -1,
  14191. length = array == null ? 0 : array.length,
  14192. resIndex = 0,
  14193. result = [];
  14194. while (++index < length) {
  14195. var value = array[index];
  14196. if (predicate(value, index, array)) {
  14197. result[resIndex++] = value;
  14198. }
  14199. }
  14200. return result;
  14201. }
  14202. /**
  14203. * A specialized version of `_.includes` for arrays without support for
  14204. * specifying an index to search from.
  14205. *
  14206. * @private
  14207. * @param {Array} [array] The array to inspect.
  14208. * @param {*} target The value to search for.
  14209. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  14210. */
  14211. function arrayIncludes(array, value) {
  14212. var length = array == null ? 0 : array.length;
  14213. return !!length && baseIndexOf(array, value, 0) > -1;
  14214. }
  14215. /**
  14216. * This function is like `arrayIncludes` except that it accepts a comparator.
  14217. *
  14218. * @private
  14219. * @param {Array} [array] The array to inspect.
  14220. * @param {*} target The value to search for.
  14221. * @param {Function} comparator The comparator invoked per element.
  14222. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  14223. */
  14224. function arrayIncludesWith(array, value, comparator) {
  14225. var index = -1,
  14226. length = array == null ? 0 : array.length;
  14227. while (++index < length) {
  14228. if (comparator(value, array[index])) {
  14229. return true;
  14230. }
  14231. }
  14232. return false;
  14233. }
  14234. /**
  14235. * A specialized version of `_.map` for arrays without support for iteratee
  14236. * shorthands.
  14237. *
  14238. * @private
  14239. * @param {Array} [array] The array to iterate over.
  14240. * @param {Function} iteratee The function invoked per iteration.
  14241. * @returns {Array} Returns the new mapped array.
  14242. */
  14243. function arrayMap(array, iteratee) {
  14244. var index = -1,
  14245. length = array == null ? 0 : array.length,
  14246. result = Array(length);
  14247. while (++index < length) {
  14248. result[index] = iteratee(array[index], index, array);
  14249. }
  14250. return result;
  14251. }
  14252. /**
  14253. * Appends the elements of `values` to `array`.
  14254. *
  14255. * @private
  14256. * @param {Array} array The array to modify.
  14257. * @param {Array} values The values to append.
  14258. * @returns {Array} Returns `array`.
  14259. */
  14260. function arrayPush(array, values) {
  14261. var index = -1,
  14262. length = values.length,
  14263. offset = array.length;
  14264. while (++index < length) {
  14265. array[offset + index] = values[index];
  14266. }
  14267. return array;
  14268. }
  14269. /**
  14270. * A specialized version of `_.reduce` for arrays without support for
  14271. * iteratee shorthands.
  14272. *
  14273. * @private
  14274. * @param {Array} [array] The array to iterate over.
  14275. * @param {Function} iteratee The function invoked per iteration.
  14276. * @param {*} [accumulator] The initial value.
  14277. * @param {boolean} [initAccum] Specify using the first element of `array` as
  14278. * the initial value.
  14279. * @returns {*} Returns the accumulated value.
  14280. */
  14281. function arrayReduce(array, iteratee, accumulator, initAccum) {
  14282. var index = -1,
  14283. length = array == null ? 0 : array.length;
  14284. if (initAccum && length) {
  14285. accumulator = array[++index];
  14286. }
  14287. while (++index < length) {
  14288. accumulator = iteratee(accumulator, array[index], index, array);
  14289. }
  14290. return accumulator;
  14291. }
  14292. /**
  14293. * A specialized version of `_.reduceRight` for arrays without support for
  14294. * iteratee shorthands.
  14295. *
  14296. * @private
  14297. * @param {Array} [array] The array to iterate over.
  14298. * @param {Function} iteratee The function invoked per iteration.
  14299. * @param {*} [accumulator] The initial value.
  14300. * @param {boolean} [initAccum] Specify using the last element of `array` as
  14301. * the initial value.
  14302. * @returns {*} Returns the accumulated value.
  14303. */
  14304. function arrayReduceRight(array, iteratee, accumulator, initAccum) {
  14305. var length = array == null ? 0 : array.length;
  14306. if (initAccum && length) {
  14307. accumulator = array[--length];
  14308. }
  14309. while (length--) {
  14310. accumulator = iteratee(accumulator, array[length], length, array);
  14311. }
  14312. return accumulator;
  14313. }
  14314. /**
  14315. * A specialized version of `_.some` for arrays without support for iteratee
  14316. * shorthands.
  14317. *
  14318. * @private
  14319. * @param {Array} [array] The array to iterate over.
  14320. * @param {Function} predicate The function invoked per iteration.
  14321. * @returns {boolean} Returns `true` if any element passes the predicate check,
  14322. * else `false`.
  14323. */
  14324. function arraySome(array, predicate) {
  14325. var index = -1,
  14326. length = array == null ? 0 : array.length;
  14327. while (++index < length) {
  14328. if (predicate(array[index], index, array)) {
  14329. return true;
  14330. }
  14331. }
  14332. return false;
  14333. }
  14334. /**
  14335. * Gets the size of an ASCII `string`.
  14336. *
  14337. * @private
  14338. * @param {string} string The string inspect.
  14339. * @returns {number} Returns the string size.
  14340. */
  14341. var asciiSize = baseProperty('length');
  14342. /**
  14343. * Converts an ASCII `string` to an array.
  14344. *
  14345. * @private
  14346. * @param {string} string The string to convert.
  14347. * @returns {Array} Returns the converted array.
  14348. */
  14349. function asciiToArray(string) {
  14350. return string.split('');
  14351. }
  14352. /**
  14353. * Splits an ASCII `string` into an array of its words.
  14354. *
  14355. * @private
  14356. * @param {string} The string to inspect.
  14357. * @returns {Array} Returns the words of `string`.
  14358. */
  14359. function asciiWords(string) {
  14360. return string.match(reAsciiWord) || [];
  14361. }
  14362. /**
  14363. * The base implementation of methods like `_.findKey` and `_.findLastKey`,
  14364. * without support for iteratee shorthands, which iterates over `collection`
  14365. * using `eachFunc`.
  14366. *
  14367. * @private
  14368. * @param {Array|Object} collection The collection to inspect.
  14369. * @param {Function} predicate The function invoked per iteration.
  14370. * @param {Function} eachFunc The function to iterate over `collection`.
  14371. * @returns {*} Returns the found element or its key, else `undefined`.
  14372. */
  14373. function baseFindKey(collection, predicate, eachFunc) {
  14374. var result;
  14375. eachFunc(collection, function(value, key, collection) {
  14376. if (predicate(value, key, collection)) {
  14377. result = key;
  14378. return false;
  14379. }
  14380. });
  14381. return result;
  14382. }
  14383. /**
  14384. * The base implementation of `_.findIndex` and `_.findLastIndex` without
  14385. * support for iteratee shorthands.
  14386. *
  14387. * @private
  14388. * @param {Array} array The array to inspect.
  14389. * @param {Function} predicate The function invoked per iteration.
  14390. * @param {number} fromIndex The index to search from.
  14391. * @param {boolean} [fromRight] Specify iterating from right to left.
  14392. * @returns {number} Returns the index of the matched value, else `-1`.
  14393. */
  14394. function baseFindIndex(array, predicate, fromIndex, fromRight) {
  14395. var length = array.length,
  14396. index = fromIndex + (fromRight ? 1 : -1);
  14397. while ((fromRight ? index-- : ++index < length)) {
  14398. if (predicate(array[index], index, array)) {
  14399. return index;
  14400. }
  14401. }
  14402. return -1;
  14403. }
  14404. /**
  14405. * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
  14406. *
  14407. * @private
  14408. * @param {Array} array The array to inspect.
  14409. * @param {*} value The value to search for.
  14410. * @param {number} fromIndex The index to search from.
  14411. * @returns {number} Returns the index of the matched value, else `-1`.
  14412. */
  14413. function baseIndexOf(array, value, fromIndex) {
  14414. return value === value
  14415. ? strictIndexOf(array, value, fromIndex)
  14416. : baseFindIndex(array, baseIsNaN, fromIndex);
  14417. }
  14418. /**
  14419. * This function is like `baseIndexOf` except that it accepts a comparator.
  14420. *
  14421. * @private
  14422. * @param {Array} array The array to inspect.
  14423. * @param {*} value The value to search for.
  14424. * @param {number} fromIndex The index to search from.
  14425. * @param {Function} comparator The comparator invoked per element.
  14426. * @returns {number} Returns the index of the matched value, else `-1`.
  14427. */
  14428. function baseIndexOfWith(array, value, fromIndex, comparator) {
  14429. var index = fromIndex - 1,
  14430. length = array.length;
  14431. while (++index < length) {
  14432. if (comparator(array[index], value)) {
  14433. return index;
  14434. }
  14435. }
  14436. return -1;
  14437. }
  14438. /**
  14439. * The base implementation of `_.isNaN` without support for number objects.
  14440. *
  14441. * @private
  14442. * @param {*} value The value to check.
  14443. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  14444. */
  14445. function baseIsNaN(value) {
  14446. return value !== value;
  14447. }
  14448. /**
  14449. * The base implementation of `_.mean` and `_.meanBy` without support for
  14450. * iteratee shorthands.
  14451. *
  14452. * @private
  14453. * @param {Array} array The array to iterate over.
  14454. * @param {Function} iteratee The function invoked per iteration.
  14455. * @returns {number} Returns the mean.
  14456. */
  14457. function baseMean(array, iteratee) {
  14458. var length = array == null ? 0 : array.length;
  14459. return length ? (baseSum(array, iteratee) / length) : NAN;
  14460. }
  14461. /**
  14462. * The base implementation of `_.property` without support for deep paths.
  14463. *
  14464. * @private
  14465. * @param {string} key The key of the property to get.
  14466. * @returns {Function} Returns the new accessor function.
  14467. */
  14468. function baseProperty(key) {
  14469. return function(object) {
  14470. return object == null ? undefined : object[key];
  14471. };
  14472. }
  14473. /**
  14474. * The base implementation of `_.propertyOf` without support for deep paths.
  14475. *
  14476. * @private
  14477. * @param {Object} object The object to query.
  14478. * @returns {Function} Returns the new accessor function.
  14479. */
  14480. function basePropertyOf(object) {
  14481. return function(key) {
  14482. return object == null ? undefined : object[key];
  14483. };
  14484. }
  14485. /**
  14486. * The base implementation of `_.reduce` and `_.reduceRight`, without support
  14487. * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
  14488. *
  14489. * @private
  14490. * @param {Array|Object} collection The collection to iterate over.
  14491. * @param {Function} iteratee The function invoked per iteration.
  14492. * @param {*} accumulator The initial value.
  14493. * @param {boolean} initAccum Specify using the first or last element of
  14494. * `collection` as the initial value.
  14495. * @param {Function} eachFunc The function to iterate over `collection`.
  14496. * @returns {*} Returns the accumulated value.
  14497. */
  14498. function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
  14499. eachFunc(collection, function(value, index, collection) {
  14500. accumulator = initAccum
  14501. ? (initAccum = false, value)
  14502. : iteratee(accumulator, value, index, collection);
  14503. });
  14504. return accumulator;
  14505. }
  14506. /**
  14507. * The base implementation of `_.sortBy` which uses `comparer` to define the
  14508. * sort order of `array` and replaces criteria objects with their corresponding
  14509. * values.
  14510. *
  14511. * @private
  14512. * @param {Array} array The array to sort.
  14513. * @param {Function} comparer The function to define sort order.
  14514. * @returns {Array} Returns `array`.
  14515. */
  14516. function baseSortBy(array, comparer) {
  14517. var length = array.length;
  14518. array.sort(comparer);
  14519. while (length--) {
  14520. array[length] = array[length].value;
  14521. }
  14522. return array;
  14523. }
  14524. /**
  14525. * The base implementation of `_.sum` and `_.sumBy` without support for
  14526. * iteratee shorthands.
  14527. *
  14528. * @private
  14529. * @param {Array} array The array to iterate over.
  14530. * @param {Function} iteratee The function invoked per iteration.
  14531. * @returns {number} Returns the sum.
  14532. */
  14533. function baseSum(array, iteratee) {
  14534. var result,
  14535. index = -1,
  14536. length = array.length;
  14537. while (++index < length) {
  14538. var current = iteratee(array[index]);
  14539. if (current !== undefined) {
  14540. result = result === undefined ? current : (result + current);
  14541. }
  14542. }
  14543. return result;
  14544. }
  14545. /**
  14546. * The base implementation of `_.times` without support for iteratee shorthands
  14547. * or max array length checks.
  14548. *
  14549. * @private
  14550. * @param {number} n The number of times to invoke `iteratee`.
  14551. * @param {Function} iteratee The function invoked per iteration.
  14552. * @returns {Array} Returns the array of results.
  14553. */
  14554. function baseTimes(n, iteratee) {
  14555. var index = -1,
  14556. result = Array(n);
  14557. while (++index < n) {
  14558. result[index] = iteratee(index);
  14559. }
  14560. return result;
  14561. }
  14562. /**
  14563. * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
  14564. * of key-value pairs for `object` corresponding to the property names of `props`.
  14565. *
  14566. * @private
  14567. * @param {Object} object The object to query.
  14568. * @param {Array} props The property names to get values for.
  14569. * @returns {Object} Returns the key-value pairs.
  14570. */
  14571. function baseToPairs(object, props) {
  14572. return arrayMap(props, function(key) {
  14573. return [key, object[key]];
  14574. });
  14575. }
  14576. /**
  14577. * The base implementation of `_.unary` without support for storing metadata.
  14578. *
  14579. * @private
  14580. * @param {Function} func The function to cap arguments for.
  14581. * @returns {Function} Returns the new capped function.
  14582. */
  14583. function baseUnary(func) {
  14584. return function(value) {
  14585. return func(value);
  14586. };
  14587. }
  14588. /**
  14589. * The base implementation of `_.values` and `_.valuesIn` which creates an
  14590. * array of `object` property values corresponding to the property names
  14591. * of `props`.
  14592. *
  14593. * @private
  14594. * @param {Object} object The object to query.
  14595. * @param {Array} props The property names to get values for.
  14596. * @returns {Object} Returns the array of property values.
  14597. */
  14598. function baseValues(object, props) {
  14599. return arrayMap(props, function(key) {
  14600. return object[key];
  14601. });
  14602. }
  14603. /**
  14604. * Checks if a `cache` value for `key` exists.
  14605. *
  14606. * @private
  14607. * @param {Object} cache The cache to query.
  14608. * @param {string} key The key of the entry to check.
  14609. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  14610. */
  14611. function cacheHas(cache, key) {
  14612. return cache.has(key);
  14613. }
  14614. /**
  14615. * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
  14616. * that is not found in the character symbols.
  14617. *
  14618. * @private
  14619. * @param {Array} strSymbols The string symbols to inspect.
  14620. * @param {Array} chrSymbols The character symbols to find.
  14621. * @returns {number} Returns the index of the first unmatched string symbol.
  14622. */
  14623. function charsStartIndex(strSymbols, chrSymbols) {
  14624. var index = -1,
  14625. length = strSymbols.length;
  14626. while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  14627. return index;
  14628. }
  14629. /**
  14630. * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
  14631. * that is not found in the character symbols.
  14632. *
  14633. * @private
  14634. * @param {Array} strSymbols The string symbols to inspect.
  14635. * @param {Array} chrSymbols The character symbols to find.
  14636. * @returns {number} Returns the index of the last unmatched string symbol.
  14637. */
  14638. function charsEndIndex(strSymbols, chrSymbols) {
  14639. var index = strSymbols.length;
  14640. while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
  14641. return index;
  14642. }
  14643. /**
  14644. * Gets the number of `placeholder` occurrences in `array`.
  14645. *
  14646. * @private
  14647. * @param {Array} array The array to inspect.
  14648. * @param {*} placeholder The placeholder to search for.
  14649. * @returns {number} Returns the placeholder count.
  14650. */
  14651. function countHolders(array, placeholder) {
  14652. var length = array.length,
  14653. result = 0;
  14654. while (length--) {
  14655. if (array[length] === placeholder) {
  14656. ++result;
  14657. }
  14658. }
  14659. return result;
  14660. }
  14661. /**
  14662. * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
  14663. * letters to basic Latin letters.
  14664. *
  14665. * @private
  14666. * @param {string} letter The matched letter to deburr.
  14667. * @returns {string} Returns the deburred letter.
  14668. */
  14669. var deburrLetter = basePropertyOf(deburredLetters);
  14670. /**
  14671. * Used by `_.escape` to convert characters to HTML entities.
  14672. *
  14673. * @private
  14674. * @param {string} chr The matched character to escape.
  14675. * @returns {string} Returns the escaped character.
  14676. */
  14677. var escapeHtmlChar = basePropertyOf(htmlEscapes);
  14678. /**
  14679. * Used by `_.template` to escape characters for inclusion in compiled string literals.
  14680. *
  14681. * @private
  14682. * @param {string} chr The matched character to escape.
  14683. * @returns {string} Returns the escaped character.
  14684. */
  14685. function escapeStringChar(chr) {
  14686. return '\\' + stringEscapes[chr];
  14687. }
  14688. /**
  14689. * Gets the value at `key` of `object`.
  14690. *
  14691. * @private
  14692. * @param {Object} [object] The object to query.
  14693. * @param {string} key The key of the property to get.
  14694. * @returns {*} Returns the property value.
  14695. */
  14696. function getValue(object, key) {
  14697. return object == null ? undefined : object[key];
  14698. }
  14699. /**
  14700. * Checks if `string` contains Unicode symbols.
  14701. *
  14702. * @private
  14703. * @param {string} string The string to inspect.
  14704. * @returns {boolean} Returns `true` if a symbol is found, else `false`.
  14705. */
  14706. function hasUnicode(string) {
  14707. return reHasUnicode.test(string);
  14708. }
  14709. /**
  14710. * Checks if `string` contains a word composed of Unicode symbols.
  14711. *
  14712. * @private
  14713. * @param {string} string The string to inspect.
  14714. * @returns {boolean} Returns `true` if a word is found, else `false`.
  14715. */
  14716. function hasUnicodeWord(string) {
  14717. return reHasUnicodeWord.test(string);
  14718. }
  14719. /**
  14720. * Converts `iterator` to an array.
  14721. *
  14722. * @private
  14723. * @param {Object} iterator The iterator to convert.
  14724. * @returns {Array} Returns the converted array.
  14725. */
  14726. function iteratorToArray(iterator) {
  14727. var data,
  14728. result = [];
  14729. while (!(data = iterator.next()).done) {
  14730. result.push(data.value);
  14731. }
  14732. return result;
  14733. }
  14734. /**
  14735. * Converts `map` to its key-value pairs.
  14736. *
  14737. * @private
  14738. * @param {Object} map The map to convert.
  14739. * @returns {Array} Returns the key-value pairs.
  14740. */
  14741. function mapToArray(map) {
  14742. var index = -1,
  14743. result = Array(map.size);
  14744. map.forEach(function(value, key) {
  14745. result[++index] = [key, value];
  14746. });
  14747. return result;
  14748. }
  14749. /**
  14750. * Creates a unary function that invokes `func` with its argument transformed.
  14751. *
  14752. * @private
  14753. * @param {Function} func The function to wrap.
  14754. * @param {Function} transform The argument transform.
  14755. * @returns {Function} Returns the new function.
  14756. */
  14757. function overArg(func, transform) {
  14758. return function(arg) {
  14759. return func(transform(arg));
  14760. };
  14761. }
  14762. /**
  14763. * Replaces all `placeholder` elements in `array` with an internal placeholder
  14764. * and returns an array of their indexes.
  14765. *
  14766. * @private
  14767. * @param {Array} array The array to modify.
  14768. * @param {*} placeholder The placeholder to replace.
  14769. * @returns {Array} Returns the new array of placeholder indexes.
  14770. */
  14771. function replaceHolders(array, placeholder) {
  14772. var index = -1,
  14773. length = array.length,
  14774. resIndex = 0,
  14775. result = [];
  14776. while (++index < length) {
  14777. var value = array[index];
  14778. if (value === placeholder || value === PLACEHOLDER) {
  14779. array[index] = PLACEHOLDER;
  14780. result[resIndex++] = index;
  14781. }
  14782. }
  14783. return result;
  14784. }
  14785. /**
  14786. * Gets the value at `key`, unless `key` is "__proto__".
  14787. *
  14788. * @private
  14789. * @param {Object} object The object to query.
  14790. * @param {string} key The key of the property to get.
  14791. * @returns {*} Returns the property value.
  14792. */
  14793. function safeGet(object, key) {
  14794. return key == '__proto__'
  14795. ? undefined
  14796. : object[key];
  14797. }
  14798. /**
  14799. * Converts `set` to an array of its values.
  14800. *
  14801. * @private
  14802. * @param {Object} set The set to convert.
  14803. * @returns {Array} Returns the values.
  14804. */
  14805. function setToArray(set) {
  14806. var index = -1,
  14807. result = Array(set.size);
  14808. set.forEach(function(value) {
  14809. result[++index] = value;
  14810. });
  14811. return result;
  14812. }
  14813. /**
  14814. * Converts `set` to its value-value pairs.
  14815. *
  14816. * @private
  14817. * @param {Object} set The set to convert.
  14818. * @returns {Array} Returns the value-value pairs.
  14819. */
  14820. function setToPairs(set) {
  14821. var index = -1,
  14822. result = Array(set.size);
  14823. set.forEach(function(value) {
  14824. result[++index] = [value, value];
  14825. });
  14826. return result;
  14827. }
  14828. /**
  14829. * A specialized version of `_.indexOf` which performs strict equality
  14830. * comparisons of values, i.e. `===`.
  14831. *
  14832. * @private
  14833. * @param {Array} array The array to inspect.
  14834. * @param {*} value The value to search for.
  14835. * @param {number} fromIndex The index to search from.
  14836. * @returns {number} Returns the index of the matched value, else `-1`.
  14837. */
  14838. function strictIndexOf(array, value, fromIndex) {
  14839. var index = fromIndex - 1,
  14840. length = array.length;
  14841. while (++index < length) {
  14842. if (array[index] === value) {
  14843. return index;
  14844. }
  14845. }
  14846. return -1;
  14847. }
  14848. /**
  14849. * A specialized version of `_.lastIndexOf` which performs strict equality
  14850. * comparisons of values, i.e. `===`.
  14851. *
  14852. * @private
  14853. * @param {Array} array The array to inspect.
  14854. * @param {*} value The value to search for.
  14855. * @param {number} fromIndex The index to search from.
  14856. * @returns {number} Returns the index of the matched value, else `-1`.
  14857. */
  14858. function strictLastIndexOf(array, value, fromIndex) {
  14859. var index = fromIndex + 1;
  14860. while (index--) {
  14861. if (array[index] === value) {
  14862. return index;
  14863. }
  14864. }
  14865. return index;
  14866. }
  14867. /**
  14868. * Gets the number of symbols in `string`.
  14869. *
  14870. * @private
  14871. * @param {string} string The string to inspect.
  14872. * @returns {number} Returns the string size.
  14873. */
  14874. function stringSize(string) {
  14875. return hasUnicode(string)
  14876. ? unicodeSize(string)
  14877. : asciiSize(string);
  14878. }
  14879. /**
  14880. * Converts `string` to an array.
  14881. *
  14882. * @private
  14883. * @param {string} string The string to convert.
  14884. * @returns {Array} Returns the converted array.
  14885. */
  14886. function stringToArray(string) {
  14887. return hasUnicode(string)
  14888. ? unicodeToArray(string)
  14889. : asciiToArray(string);
  14890. }
  14891. /**
  14892. * Used by `_.unescape` to convert HTML entities to characters.
  14893. *
  14894. * @private
  14895. * @param {string} chr The matched character to unescape.
  14896. * @returns {string} Returns the unescaped character.
  14897. */
  14898. var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
  14899. /**
  14900. * Gets the size of a Unicode `string`.
  14901. *
  14902. * @private
  14903. * @param {string} string The string inspect.
  14904. * @returns {number} Returns the string size.
  14905. */
  14906. function unicodeSize(string) {
  14907. var result = reUnicode.lastIndex = 0;
  14908. while (reUnicode.test(string)) {
  14909. ++result;
  14910. }
  14911. return result;
  14912. }
  14913. /**
  14914. * Converts a Unicode `string` to an array.
  14915. *
  14916. * @private
  14917. * @param {string} string The string to convert.
  14918. * @returns {Array} Returns the converted array.
  14919. */
  14920. function unicodeToArray(string) {
  14921. return string.match(reUnicode) || [];
  14922. }
  14923. /**
  14924. * Splits a Unicode `string` into an array of its words.
  14925. *
  14926. * @private
  14927. * @param {string} The string to inspect.
  14928. * @returns {Array} Returns the words of `string`.
  14929. */
  14930. function unicodeWords(string) {
  14931. return string.match(reUnicodeWord) || [];
  14932. }
  14933. /*--------------------------------------------------------------------------*/
  14934. /**
  14935. * Create a new pristine `lodash` function using the `context` object.
  14936. *
  14937. * @static
  14938. * @memberOf _
  14939. * @since 1.1.0
  14940. * @category Util
  14941. * @param {Object} [context=root] The context object.
  14942. * @returns {Function} Returns a new `lodash` function.
  14943. * @example
  14944. *
  14945. * _.mixin({ 'foo': _.constant('foo') });
  14946. *
  14947. * var lodash = _.runInContext();
  14948. * lodash.mixin({ 'bar': lodash.constant('bar') });
  14949. *
  14950. * _.isFunction(_.foo);
  14951. * // => true
  14952. * _.isFunction(_.bar);
  14953. * // => false
  14954. *
  14955. * lodash.isFunction(lodash.foo);
  14956. * // => false
  14957. * lodash.isFunction(lodash.bar);
  14958. * // => true
  14959. *
  14960. * // Create a suped-up `defer` in Node.js.
  14961. * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
  14962. */
  14963. var runInContext = (function runInContext(context) {
  14964. context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
  14965. /** Built-in constructor references. */
  14966. var Array = context.Array,
  14967. Date = context.Date,
  14968. Error = context.Error,
  14969. Function = context.Function,
  14970. Math = context.Math,
  14971. Object = context.Object,
  14972. RegExp = context.RegExp,
  14973. String = context.String,
  14974. TypeError = context.TypeError;
  14975. /** Used for built-in method references. */
  14976. var arrayProto = Array.prototype,
  14977. funcProto = Function.prototype,
  14978. objectProto = Object.prototype;
  14979. /** Used to detect overreaching core-js shims. */
  14980. var coreJsData = context['__core-js_shared__'];
  14981. /** Used to resolve the decompiled source of functions. */
  14982. var funcToString = funcProto.toString;
  14983. /** Used to check objects for own properties. */
  14984. var hasOwnProperty = objectProto.hasOwnProperty;
  14985. /** Used to generate unique IDs. */
  14986. var idCounter = 0;
  14987. /** Used to detect methods masquerading as native. */
  14988. var maskSrcKey = (function() {
  14989. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  14990. return uid ? ('Symbol(src)_1.' + uid) : '';
  14991. }());
  14992. /**
  14993. * Used to resolve the
  14994. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  14995. * of values.
  14996. */
  14997. var nativeObjectToString = objectProto.toString;
  14998. /** Used to infer the `Object` constructor. */
  14999. var objectCtorString = funcToString.call(Object);
  15000. /** Used to restore the original `_` reference in `_.noConflict`. */
  15001. var oldDash = root._;
  15002. /** Used to detect if a method is native. */
  15003. var reIsNative = RegExp('^' +
  15004. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  15005. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  15006. );
  15007. /** Built-in value references. */
  15008. var Buffer = moduleExports ? context.Buffer : undefined,
  15009. Symbol = context.Symbol,
  15010. Uint8Array = context.Uint8Array,
  15011. allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
  15012. getPrototype = overArg(Object.getPrototypeOf, Object),
  15013. objectCreate = Object.create,
  15014. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  15015. splice = arrayProto.splice,
  15016. spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
  15017. symIterator = Symbol ? Symbol.iterator : undefined,
  15018. symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  15019. var defineProperty = (function() {
  15020. try {
  15021. var func = getNative(Object, 'defineProperty');
  15022. func({}, '', {});
  15023. return func;
  15024. } catch (e) {}
  15025. }());
  15026. /** Mocked built-ins. */
  15027. var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
  15028. ctxNow = Date && Date.now !== root.Date.now && Date.now,
  15029. ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
  15030. /* Built-in method references for those with the same name as other `lodash` methods. */
  15031. var nativeCeil = Math.ceil,
  15032. nativeFloor = Math.floor,
  15033. nativeGetSymbols = Object.getOwnPropertySymbols,
  15034. nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  15035. nativeIsFinite = context.isFinite,
  15036. nativeJoin = arrayProto.join,
  15037. nativeKeys = overArg(Object.keys, Object),
  15038. nativeMax = Math.max,
  15039. nativeMin = Math.min,
  15040. nativeNow = Date.now,
  15041. nativeParseInt = context.parseInt,
  15042. nativeRandom = Math.random,
  15043. nativeReverse = arrayProto.reverse;
  15044. /* Built-in method references that are verified to be native. */
  15045. var DataView = getNative(context, 'DataView'),
  15046. Map = getNative(context, 'Map'),
  15047. Promise = getNative(context, 'Promise'),
  15048. Set = getNative(context, 'Set'),
  15049. WeakMap = getNative(context, 'WeakMap'),
  15050. nativeCreate = getNative(Object, 'create');
  15051. /** Used to store function metadata. */
  15052. var metaMap = WeakMap && new WeakMap;
  15053. /** Used to lookup unminified function names. */
  15054. var realNames = {};
  15055. /** Used to detect maps, sets, and weakmaps. */
  15056. var dataViewCtorString = toSource(DataView),
  15057. mapCtorString = toSource(Map),
  15058. promiseCtorString = toSource(Promise),
  15059. setCtorString = toSource(Set),
  15060. weakMapCtorString = toSource(WeakMap);
  15061. /** Used to convert symbols to primitives and strings. */
  15062. var symbolProto = Symbol ? Symbol.prototype : undefined,
  15063. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
  15064. symbolToString = symbolProto ? symbolProto.toString : undefined;
  15065. /*------------------------------------------------------------------------*/
  15066. /**
  15067. * Creates a `lodash` object which wraps `value` to enable implicit method
  15068. * chain sequences. Methods that operate on and return arrays, collections,
  15069. * and functions can be chained together. Methods that retrieve a single value
  15070. * or may return a primitive value will automatically end the chain sequence
  15071. * and return the unwrapped value. Otherwise, the value must be unwrapped
  15072. * with `_#value`.
  15073. *
  15074. * Explicit chain sequences, which must be unwrapped with `_#value`, may be
  15075. * enabled using `_.chain`.
  15076. *
  15077. * The execution of chained methods is lazy, that is, it's deferred until
  15078. * `_#value` is implicitly or explicitly called.
  15079. *
  15080. * Lazy evaluation allows several methods to support shortcut fusion.
  15081. * Shortcut fusion is an optimization to merge iteratee calls; this avoids
  15082. * the creation of intermediate arrays and can greatly reduce the number of
  15083. * iteratee executions. Sections of a chain sequence qualify for shortcut
  15084. * fusion if the section is applied to an array and iteratees accept only
  15085. * one argument. The heuristic for whether a section qualifies for shortcut
  15086. * fusion is subject to change.
  15087. *
  15088. * Chaining is supported in custom builds as long as the `_#value` method is
  15089. * directly or indirectly included in the build.
  15090. *
  15091. * In addition to lodash methods, wrappers have `Array` and `String` methods.
  15092. *
  15093. * The wrapper `Array` methods are:
  15094. * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
  15095. *
  15096. * The wrapper `String` methods are:
  15097. * `replace` and `split`
  15098. *
  15099. * The wrapper methods that support shortcut fusion are:
  15100. * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
  15101. * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
  15102. * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
  15103. *
  15104. * The chainable wrapper methods are:
  15105. * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
  15106. * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
  15107. * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
  15108. * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
  15109. * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
  15110. * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
  15111. * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
  15112. * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
  15113. * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
  15114. * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
  15115. * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
  15116. * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
  15117. * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
  15118. * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
  15119. * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
  15120. * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
  15121. * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
  15122. * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
  15123. * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
  15124. * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
  15125. * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
  15126. * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
  15127. * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
  15128. * `zipObject`, `zipObjectDeep`, and `zipWith`
  15129. *
  15130. * The wrapper methods that are **not** chainable by default are:
  15131. * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
  15132. * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
  15133. * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
  15134. * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
  15135. * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
  15136. * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
  15137. * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
  15138. * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
  15139. * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
  15140. * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
  15141. * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
  15142. * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
  15143. * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
  15144. * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
  15145. * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
  15146. * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
  15147. * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
  15148. * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
  15149. * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
  15150. * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
  15151. * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
  15152. * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
  15153. * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
  15154. * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
  15155. * `upperFirst`, `value`, and `words`
  15156. *
  15157. * @name _
  15158. * @constructor
  15159. * @category Seq
  15160. * @param {*} value The value to wrap in a `lodash` instance.
  15161. * @returns {Object} Returns the new `lodash` wrapper instance.
  15162. * @example
  15163. *
  15164. * function square(n) {
  15165. * return n * n;
  15166. * }
  15167. *
  15168. * var wrapped = _([1, 2, 3]);
  15169. *
  15170. * // Returns an unwrapped value.
  15171. * wrapped.reduce(_.add);
  15172. * // => 6
  15173. *
  15174. * // Returns a wrapped value.
  15175. * var squares = wrapped.map(square);
  15176. *
  15177. * _.isArray(squares);
  15178. * // => false
  15179. *
  15180. * _.isArray(squares.value());
  15181. * // => true
  15182. */
  15183. function lodash(value) {
  15184. if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
  15185. if (value instanceof LodashWrapper) {
  15186. return value;
  15187. }
  15188. if (hasOwnProperty.call(value, '__wrapped__')) {
  15189. return wrapperClone(value);
  15190. }
  15191. }
  15192. return new LodashWrapper(value);
  15193. }
  15194. /**
  15195. * The base implementation of `_.create` without support for assigning
  15196. * properties to the created object.
  15197. *
  15198. * @private
  15199. * @param {Object} proto The object to inherit from.
  15200. * @returns {Object} Returns the new object.
  15201. */
  15202. var baseCreate = (function() {
  15203. function object() {}
  15204. return function(proto) {
  15205. if (!isObject(proto)) {
  15206. return {};
  15207. }
  15208. if (objectCreate) {
  15209. return objectCreate(proto);
  15210. }
  15211. object.prototype = proto;
  15212. var result = new object;
  15213. object.prototype = undefined;
  15214. return result;
  15215. };
  15216. }());
  15217. /**
  15218. * The function whose prototype chain sequence wrappers inherit from.
  15219. *
  15220. * @private
  15221. */
  15222. function baseLodash() {
  15223. // No operation performed.
  15224. }
  15225. /**
  15226. * The base constructor for creating `lodash` wrapper objects.
  15227. *
  15228. * @private
  15229. * @param {*} value The value to wrap.
  15230. * @param {boolean} [chainAll] Enable explicit method chain sequences.
  15231. */
  15232. function LodashWrapper(value, chainAll) {
  15233. this.__wrapped__ = value;
  15234. this.__actions__ = [];
  15235. this.__chain__ = !!chainAll;
  15236. this.__index__ = 0;
  15237. this.__values__ = undefined;
  15238. }
  15239. /**
  15240. * By default, the template delimiters used by lodash are like those in
  15241. * embedded Ruby (ERB) as well as ES2015 template strings. Change the
  15242. * following template settings to use alternative delimiters.
  15243. *
  15244. * @static
  15245. * @memberOf _
  15246. * @type {Object}
  15247. */
  15248. lodash.templateSettings = {
  15249. /**
  15250. * Used to detect `data` property values to be HTML-escaped.
  15251. *
  15252. * @memberOf _.templateSettings
  15253. * @type {RegExp}
  15254. */
  15255. 'escape': reEscape,
  15256. /**
  15257. * Used to detect code to be evaluated.
  15258. *
  15259. * @memberOf _.templateSettings
  15260. * @type {RegExp}
  15261. */
  15262. 'evaluate': reEvaluate,
  15263. /**
  15264. * Used to detect `data` property values to inject.
  15265. *
  15266. * @memberOf _.templateSettings
  15267. * @type {RegExp}
  15268. */
  15269. 'interpolate': reInterpolate,
  15270. /**
  15271. * Used to reference the data object in the template text.
  15272. *
  15273. * @memberOf _.templateSettings
  15274. * @type {string}
  15275. */
  15276. 'variable': '',
  15277. /**
  15278. * Used to import variables into the compiled template.
  15279. *
  15280. * @memberOf _.templateSettings
  15281. * @type {Object}
  15282. */
  15283. 'imports': {
  15284. /**
  15285. * A reference to the `lodash` function.
  15286. *
  15287. * @memberOf _.templateSettings.imports
  15288. * @type {Function}
  15289. */
  15290. '_': lodash
  15291. }
  15292. };
  15293. // Ensure wrappers are instances of `baseLodash`.
  15294. lodash.prototype = baseLodash.prototype;
  15295. lodash.prototype.constructor = lodash;
  15296. LodashWrapper.prototype = baseCreate(baseLodash.prototype);
  15297. LodashWrapper.prototype.constructor = LodashWrapper;
  15298. /*------------------------------------------------------------------------*/
  15299. /**
  15300. * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
  15301. *
  15302. * @private
  15303. * @constructor
  15304. * @param {*} value The value to wrap.
  15305. */
  15306. function LazyWrapper(value) {
  15307. this.__wrapped__ = value;
  15308. this.__actions__ = [];
  15309. this.__dir__ = 1;
  15310. this.__filtered__ = false;
  15311. this.__iteratees__ = [];
  15312. this.__takeCount__ = MAX_ARRAY_LENGTH;
  15313. this.__views__ = [];
  15314. }
  15315. /**
  15316. * Creates a clone of the lazy wrapper object.
  15317. *
  15318. * @private
  15319. * @name clone
  15320. * @memberOf LazyWrapper
  15321. * @returns {Object} Returns the cloned `LazyWrapper` object.
  15322. */
  15323. function lazyClone() {
  15324. var result = new LazyWrapper(this.__wrapped__);
  15325. result.__actions__ = copyArray(this.__actions__);
  15326. result.__dir__ = this.__dir__;
  15327. result.__filtered__ = this.__filtered__;
  15328. result.__iteratees__ = copyArray(this.__iteratees__);
  15329. result.__takeCount__ = this.__takeCount__;
  15330. result.__views__ = copyArray(this.__views__);
  15331. return result;
  15332. }
  15333. /**
  15334. * Reverses the direction of lazy iteration.
  15335. *
  15336. * @private
  15337. * @name reverse
  15338. * @memberOf LazyWrapper
  15339. * @returns {Object} Returns the new reversed `LazyWrapper` object.
  15340. */
  15341. function lazyReverse() {
  15342. if (this.__filtered__) {
  15343. var result = new LazyWrapper(this);
  15344. result.__dir__ = -1;
  15345. result.__filtered__ = true;
  15346. } else {
  15347. result = this.clone();
  15348. result.__dir__ *= -1;
  15349. }
  15350. return result;
  15351. }
  15352. /**
  15353. * Extracts the unwrapped value from its lazy wrapper.
  15354. *
  15355. * @private
  15356. * @name value
  15357. * @memberOf LazyWrapper
  15358. * @returns {*} Returns the unwrapped value.
  15359. */
  15360. function lazyValue() {
  15361. var array = this.__wrapped__.value(),
  15362. dir = this.__dir__,
  15363. isArr = isArray(array),
  15364. isRight = dir < 0,
  15365. arrLength = isArr ? array.length : 0,
  15366. view = getView(0, arrLength, this.__views__),
  15367. start = view.start,
  15368. end = view.end,
  15369. length = end - start,
  15370. index = isRight ? end : (start - 1),
  15371. iteratees = this.__iteratees__,
  15372. iterLength = iteratees.length,
  15373. resIndex = 0,
  15374. takeCount = nativeMin(length, this.__takeCount__);
  15375. if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
  15376. return baseWrapperValue(array, this.__actions__);
  15377. }
  15378. var result = [];
  15379. outer:
  15380. while (length-- && resIndex < takeCount) {
  15381. index += dir;
  15382. var iterIndex = -1,
  15383. value = array[index];
  15384. while (++iterIndex < iterLength) {
  15385. var data = iteratees[iterIndex],
  15386. iteratee = data.iteratee,
  15387. type = data.type,
  15388. computed = iteratee(value);
  15389. if (type == LAZY_MAP_FLAG) {
  15390. value = computed;
  15391. } else if (!computed) {
  15392. if (type == LAZY_FILTER_FLAG) {
  15393. continue outer;
  15394. } else {
  15395. break outer;
  15396. }
  15397. }
  15398. }
  15399. result[resIndex++] = value;
  15400. }
  15401. return result;
  15402. }
  15403. // Ensure `LazyWrapper` is an instance of `baseLodash`.
  15404. LazyWrapper.prototype = baseCreate(baseLodash.prototype);
  15405. LazyWrapper.prototype.constructor = LazyWrapper;
  15406. /*------------------------------------------------------------------------*/
  15407. /**
  15408. * Creates a hash object.
  15409. *
  15410. * @private
  15411. * @constructor
  15412. * @param {Array} [entries] The key-value pairs to cache.
  15413. */
  15414. function Hash(entries) {
  15415. var index = -1,
  15416. length = entries == null ? 0 : entries.length;
  15417. this.clear();
  15418. while (++index < length) {
  15419. var entry = entries[index];
  15420. this.set(entry[0], entry[1]);
  15421. }
  15422. }
  15423. /**
  15424. * Removes all key-value entries from the hash.
  15425. *
  15426. * @private
  15427. * @name clear
  15428. * @memberOf Hash
  15429. */
  15430. function hashClear() {
  15431. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  15432. this.size = 0;
  15433. }
  15434. /**
  15435. * Removes `key` and its value from the hash.
  15436. *
  15437. * @private
  15438. * @name delete
  15439. * @memberOf Hash
  15440. * @param {Object} hash The hash to modify.
  15441. * @param {string} key The key of the value to remove.
  15442. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  15443. */
  15444. function hashDelete(key) {
  15445. var result = this.has(key) && delete this.__data__[key];
  15446. this.size -= result ? 1 : 0;
  15447. return result;
  15448. }
  15449. /**
  15450. * Gets the hash value for `key`.
  15451. *
  15452. * @private
  15453. * @name get
  15454. * @memberOf Hash
  15455. * @param {string} key The key of the value to get.
  15456. * @returns {*} Returns the entry value.
  15457. */
  15458. function hashGet(key) {
  15459. var data = this.__data__;
  15460. if (nativeCreate) {
  15461. var result = data[key];
  15462. return result === HASH_UNDEFINED ? undefined : result;
  15463. }
  15464. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  15465. }
  15466. /**
  15467. * Checks if a hash value for `key` exists.
  15468. *
  15469. * @private
  15470. * @name has
  15471. * @memberOf Hash
  15472. * @param {string} key The key of the entry to check.
  15473. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  15474. */
  15475. function hashHas(key) {
  15476. var data = this.__data__;
  15477. return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
  15478. }
  15479. /**
  15480. * Sets the hash `key` to `value`.
  15481. *
  15482. * @private
  15483. * @name set
  15484. * @memberOf Hash
  15485. * @param {string} key The key of the value to set.
  15486. * @param {*} value The value to set.
  15487. * @returns {Object} Returns the hash instance.
  15488. */
  15489. function hashSet(key, value) {
  15490. var data = this.__data__;
  15491. this.size += this.has(key) ? 0 : 1;
  15492. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  15493. return this;
  15494. }
  15495. // Add methods to `Hash`.
  15496. Hash.prototype.clear = hashClear;
  15497. Hash.prototype['delete'] = hashDelete;
  15498. Hash.prototype.get = hashGet;
  15499. Hash.prototype.has = hashHas;
  15500. Hash.prototype.set = hashSet;
  15501. /*------------------------------------------------------------------------*/
  15502. /**
  15503. * Creates an list cache object.
  15504. *
  15505. * @private
  15506. * @constructor
  15507. * @param {Array} [entries] The key-value pairs to cache.
  15508. */
  15509. function ListCache(entries) {
  15510. var index = -1,
  15511. length = entries == null ? 0 : entries.length;
  15512. this.clear();
  15513. while (++index < length) {
  15514. var entry = entries[index];
  15515. this.set(entry[0], entry[1]);
  15516. }
  15517. }
  15518. /**
  15519. * Removes all key-value entries from the list cache.
  15520. *
  15521. * @private
  15522. * @name clear
  15523. * @memberOf ListCache
  15524. */
  15525. function listCacheClear() {
  15526. this.__data__ = [];
  15527. this.size = 0;
  15528. }
  15529. /**
  15530. * Removes `key` and its value from the list cache.
  15531. *
  15532. * @private
  15533. * @name delete
  15534. * @memberOf ListCache
  15535. * @param {string} key The key of the value to remove.
  15536. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  15537. */
  15538. function listCacheDelete(key) {
  15539. var data = this.__data__,
  15540. index = assocIndexOf(data, key);
  15541. if (index < 0) {
  15542. return false;
  15543. }
  15544. var lastIndex = data.length - 1;
  15545. if (index == lastIndex) {
  15546. data.pop();
  15547. } else {
  15548. splice.call(data, index, 1);
  15549. }
  15550. --this.size;
  15551. return true;
  15552. }
  15553. /**
  15554. * Gets the list cache value for `key`.
  15555. *
  15556. * @private
  15557. * @name get
  15558. * @memberOf ListCache
  15559. * @param {string} key The key of the value to get.
  15560. * @returns {*} Returns the entry value.
  15561. */
  15562. function listCacheGet(key) {
  15563. var data = this.__data__,
  15564. index = assocIndexOf(data, key);
  15565. return index < 0 ? undefined : data[index][1];
  15566. }
  15567. /**
  15568. * Checks if a list cache value for `key` exists.
  15569. *
  15570. * @private
  15571. * @name has
  15572. * @memberOf ListCache
  15573. * @param {string} key The key of the entry to check.
  15574. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  15575. */
  15576. function listCacheHas(key) {
  15577. return assocIndexOf(this.__data__, key) > -1;
  15578. }
  15579. /**
  15580. * Sets the list cache `key` to `value`.
  15581. *
  15582. * @private
  15583. * @name set
  15584. * @memberOf ListCache
  15585. * @param {string} key The key of the value to set.
  15586. * @param {*} value The value to set.
  15587. * @returns {Object} Returns the list cache instance.
  15588. */
  15589. function listCacheSet(key, value) {
  15590. var data = this.__data__,
  15591. index = assocIndexOf(data, key);
  15592. if (index < 0) {
  15593. ++this.size;
  15594. data.push([key, value]);
  15595. } else {
  15596. data[index][1] = value;
  15597. }
  15598. return this;
  15599. }
  15600. // Add methods to `ListCache`.
  15601. ListCache.prototype.clear = listCacheClear;
  15602. ListCache.prototype['delete'] = listCacheDelete;
  15603. ListCache.prototype.get = listCacheGet;
  15604. ListCache.prototype.has = listCacheHas;
  15605. ListCache.prototype.set = listCacheSet;
  15606. /*------------------------------------------------------------------------*/
  15607. /**
  15608. * Creates a map cache object to store key-value pairs.
  15609. *
  15610. * @private
  15611. * @constructor
  15612. * @param {Array} [entries] The key-value pairs to cache.
  15613. */
  15614. function MapCache(entries) {
  15615. var index = -1,
  15616. length = entries == null ? 0 : entries.length;
  15617. this.clear();
  15618. while (++index < length) {
  15619. var entry = entries[index];
  15620. this.set(entry[0], entry[1]);
  15621. }
  15622. }
  15623. /**
  15624. * Removes all key-value entries from the map.
  15625. *
  15626. * @private
  15627. * @name clear
  15628. * @memberOf MapCache
  15629. */
  15630. function mapCacheClear() {
  15631. this.size = 0;
  15632. this.__data__ = {
  15633. 'hash': new Hash,
  15634. 'map': new (Map || ListCache),
  15635. 'string': new Hash
  15636. };
  15637. }
  15638. /**
  15639. * Removes `key` and its value from the map.
  15640. *
  15641. * @private
  15642. * @name delete
  15643. * @memberOf MapCache
  15644. * @param {string} key The key of the value to remove.
  15645. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  15646. */
  15647. function mapCacheDelete(key) {
  15648. var result = getMapData(this, key)['delete'](key);
  15649. this.size -= result ? 1 : 0;
  15650. return result;
  15651. }
  15652. /**
  15653. * Gets the map value for `key`.
  15654. *
  15655. * @private
  15656. * @name get
  15657. * @memberOf MapCache
  15658. * @param {string} key The key of the value to get.
  15659. * @returns {*} Returns the entry value.
  15660. */
  15661. function mapCacheGet(key) {
  15662. return getMapData(this, key).get(key);
  15663. }
  15664. /**
  15665. * Checks if a map value for `key` exists.
  15666. *
  15667. * @private
  15668. * @name has
  15669. * @memberOf MapCache
  15670. * @param {string} key The key of the entry to check.
  15671. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  15672. */
  15673. function mapCacheHas(key) {
  15674. return getMapData(this, key).has(key);
  15675. }
  15676. /**
  15677. * Sets the map `key` to `value`.
  15678. *
  15679. * @private
  15680. * @name set
  15681. * @memberOf MapCache
  15682. * @param {string} key The key of the value to set.
  15683. * @param {*} value The value to set.
  15684. * @returns {Object} Returns the map cache instance.
  15685. */
  15686. function mapCacheSet(key, value) {
  15687. var data = getMapData(this, key),
  15688. size = data.size;
  15689. data.set(key, value);
  15690. this.size += data.size == size ? 0 : 1;
  15691. return this;
  15692. }
  15693. // Add methods to `MapCache`.
  15694. MapCache.prototype.clear = mapCacheClear;
  15695. MapCache.prototype['delete'] = mapCacheDelete;
  15696. MapCache.prototype.get = mapCacheGet;
  15697. MapCache.prototype.has = mapCacheHas;
  15698. MapCache.prototype.set = mapCacheSet;
  15699. /*------------------------------------------------------------------------*/
  15700. /**
  15701. *
  15702. * Creates an array cache object to store unique values.
  15703. *
  15704. * @private
  15705. * @constructor
  15706. * @param {Array} [values] The values to cache.
  15707. */
  15708. function SetCache(values) {
  15709. var index = -1,
  15710. length = values == null ? 0 : values.length;
  15711. this.__data__ = new MapCache;
  15712. while (++index < length) {
  15713. this.add(values[index]);
  15714. }
  15715. }
  15716. /**
  15717. * Adds `value` to the array cache.
  15718. *
  15719. * @private
  15720. * @name add
  15721. * @memberOf SetCache
  15722. * @alias push
  15723. * @param {*} value The value to cache.
  15724. * @returns {Object} Returns the cache instance.
  15725. */
  15726. function setCacheAdd(value) {
  15727. this.__data__.set(value, HASH_UNDEFINED);
  15728. return this;
  15729. }
  15730. /**
  15731. * Checks if `value` is in the array cache.
  15732. *
  15733. * @private
  15734. * @name has
  15735. * @memberOf SetCache
  15736. * @param {*} value The value to search for.
  15737. * @returns {number} Returns `true` if `value` is found, else `false`.
  15738. */
  15739. function setCacheHas(value) {
  15740. return this.__data__.has(value);
  15741. }
  15742. // Add methods to `SetCache`.
  15743. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  15744. SetCache.prototype.has = setCacheHas;
  15745. /*------------------------------------------------------------------------*/
  15746. /**
  15747. * Creates a stack cache object to store key-value pairs.
  15748. *
  15749. * @private
  15750. * @constructor
  15751. * @param {Array} [entries] The key-value pairs to cache.
  15752. */
  15753. function Stack(entries) {
  15754. var data = this.__data__ = new ListCache(entries);
  15755. this.size = data.size;
  15756. }
  15757. /**
  15758. * Removes all key-value entries from the stack.
  15759. *
  15760. * @private
  15761. * @name clear
  15762. * @memberOf Stack
  15763. */
  15764. function stackClear() {
  15765. this.__data__ = new ListCache;
  15766. this.size = 0;
  15767. }
  15768. /**
  15769. * Removes `key` and its value from the stack.
  15770. *
  15771. * @private
  15772. * @name delete
  15773. * @memberOf Stack
  15774. * @param {string} key The key of the value to remove.
  15775. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  15776. */
  15777. function stackDelete(key) {
  15778. var data = this.__data__,
  15779. result = data['delete'](key);
  15780. this.size = data.size;
  15781. return result;
  15782. }
  15783. /**
  15784. * Gets the stack value for `key`.
  15785. *
  15786. * @private
  15787. * @name get
  15788. * @memberOf Stack
  15789. * @param {string} key The key of the value to get.
  15790. * @returns {*} Returns the entry value.
  15791. */
  15792. function stackGet(key) {
  15793. return this.__data__.get(key);
  15794. }
  15795. /**
  15796. * Checks if a stack value for `key` exists.
  15797. *
  15798. * @private
  15799. * @name has
  15800. * @memberOf Stack
  15801. * @param {string} key The key of the entry to check.
  15802. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  15803. */
  15804. function stackHas(key) {
  15805. return this.__data__.has(key);
  15806. }
  15807. /**
  15808. * Sets the stack `key` to `value`.
  15809. *
  15810. * @private
  15811. * @name set
  15812. * @memberOf Stack
  15813. * @param {string} key The key of the value to set.
  15814. * @param {*} value The value to set.
  15815. * @returns {Object} Returns the stack cache instance.
  15816. */
  15817. function stackSet(key, value) {
  15818. var data = this.__data__;
  15819. if (data instanceof ListCache) {
  15820. var pairs = data.__data__;
  15821. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  15822. pairs.push([key, value]);
  15823. this.size = ++data.size;
  15824. return this;
  15825. }
  15826. data = this.__data__ = new MapCache(pairs);
  15827. }
  15828. data.set(key, value);
  15829. this.size = data.size;
  15830. return this;
  15831. }
  15832. // Add methods to `Stack`.
  15833. Stack.prototype.clear = stackClear;
  15834. Stack.prototype['delete'] = stackDelete;
  15835. Stack.prototype.get = stackGet;
  15836. Stack.prototype.has = stackHas;
  15837. Stack.prototype.set = stackSet;
  15838. /*------------------------------------------------------------------------*/
  15839. /**
  15840. * Creates an array of the enumerable property names of the array-like `value`.
  15841. *
  15842. * @private
  15843. * @param {*} value The value to query.
  15844. * @param {boolean} inherited Specify returning inherited property names.
  15845. * @returns {Array} Returns the array of property names.
  15846. */
  15847. function arrayLikeKeys(value, inherited) {
  15848. var isArr = isArray(value),
  15849. isArg = !isArr && isArguments(value),
  15850. isBuff = !isArr && !isArg && isBuffer(value),
  15851. isType = !isArr && !isArg && !isBuff && isTypedArray(value),
  15852. skipIndexes = isArr || isArg || isBuff || isType,
  15853. result = skipIndexes ? baseTimes(value.length, String) : [],
  15854. length = result.length;
  15855. for (var key in value) {
  15856. if ((inherited || hasOwnProperty.call(value, key)) &&
  15857. !(skipIndexes && (
  15858. // Safari 9 has enumerable `arguments.length` in strict mode.
  15859. key == 'length' ||
  15860. // Node.js 0.10 has enumerable non-index properties on buffers.
  15861. (isBuff && (key == 'offset' || key == 'parent')) ||
  15862. // PhantomJS 2 has enumerable non-index properties on typed arrays.
  15863. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
  15864. // Skip index properties.
  15865. isIndex(key, length)
  15866. ))) {
  15867. result.push(key);
  15868. }
  15869. }
  15870. return result;
  15871. }
  15872. /**
  15873. * A specialized version of `_.sample` for arrays.
  15874. *
  15875. * @private
  15876. * @param {Array} array The array to sample.
  15877. * @returns {*} Returns the random element.
  15878. */
  15879. function arraySample(array) {
  15880. var length = array.length;
  15881. return length ? array[baseRandom(0, length - 1)] : undefined;
  15882. }
  15883. /**
  15884. * A specialized version of `_.sampleSize` for arrays.
  15885. *
  15886. * @private
  15887. * @param {Array} array The array to sample.
  15888. * @param {number} n The number of elements to sample.
  15889. * @returns {Array} Returns the random elements.
  15890. */
  15891. function arraySampleSize(array, n) {
  15892. return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
  15893. }
  15894. /**
  15895. * A specialized version of `_.shuffle` for arrays.
  15896. *
  15897. * @private
  15898. * @param {Array} array The array to shuffle.
  15899. * @returns {Array} Returns the new shuffled array.
  15900. */
  15901. function arrayShuffle(array) {
  15902. return shuffleSelf(copyArray(array));
  15903. }
  15904. /**
  15905. * This function is like `assignValue` except that it doesn't assign
  15906. * `undefined` values.
  15907. *
  15908. * @private
  15909. * @param {Object} object The object to modify.
  15910. * @param {string} key The key of the property to assign.
  15911. * @param {*} value The value to assign.
  15912. */
  15913. function assignMergeValue(object, key, value) {
  15914. if ((value !== undefined && !eq(object[key], value)) ||
  15915. (value === undefined && !(key in object))) {
  15916. baseAssignValue(object, key, value);
  15917. }
  15918. }
  15919. /**
  15920. * Assigns `value` to `key` of `object` if the existing value is not equivalent
  15921. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  15922. * for equality comparisons.
  15923. *
  15924. * @private
  15925. * @param {Object} object The object to modify.
  15926. * @param {string} key The key of the property to assign.
  15927. * @param {*} value The value to assign.
  15928. */
  15929. function assignValue(object, key, value) {
  15930. var objValue = object[key];
  15931. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
  15932. (value === undefined && !(key in object))) {
  15933. baseAssignValue(object, key, value);
  15934. }
  15935. }
  15936. /**
  15937. * Gets the index at which the `key` is found in `array` of key-value pairs.
  15938. *
  15939. * @private
  15940. * @param {Array} array The array to inspect.
  15941. * @param {*} key The key to search for.
  15942. * @returns {number} Returns the index of the matched value, else `-1`.
  15943. */
  15944. function assocIndexOf(array, key) {
  15945. var length = array.length;
  15946. while (length--) {
  15947. if (eq(array[length][0], key)) {
  15948. return length;
  15949. }
  15950. }
  15951. return -1;
  15952. }
  15953. /**
  15954. * Aggregates elements of `collection` on `accumulator` with keys transformed
  15955. * by `iteratee` and values set by `setter`.
  15956. *
  15957. * @private
  15958. * @param {Array|Object} collection The collection to iterate over.
  15959. * @param {Function} setter The function to set `accumulator` values.
  15960. * @param {Function} iteratee The iteratee to transform keys.
  15961. * @param {Object} accumulator The initial aggregated object.
  15962. * @returns {Function} Returns `accumulator`.
  15963. */
  15964. function baseAggregator(collection, setter, iteratee, accumulator) {
  15965. baseEach(collection, function(value, key, collection) {
  15966. setter(accumulator, value, iteratee(value), collection);
  15967. });
  15968. return accumulator;
  15969. }
  15970. /**
  15971. * The base implementation of `_.assign` without support for multiple sources
  15972. * or `customizer` functions.
  15973. *
  15974. * @private
  15975. * @param {Object} object The destination object.
  15976. * @param {Object} source The source object.
  15977. * @returns {Object} Returns `object`.
  15978. */
  15979. function baseAssign(object, source) {
  15980. return object && copyObject(source, keys(source), object);
  15981. }
  15982. /**
  15983. * The base implementation of `_.assignIn` without support for multiple sources
  15984. * or `customizer` functions.
  15985. *
  15986. * @private
  15987. * @param {Object} object The destination object.
  15988. * @param {Object} source The source object.
  15989. * @returns {Object} Returns `object`.
  15990. */
  15991. function baseAssignIn(object, source) {
  15992. return object && copyObject(source, keysIn(source), object);
  15993. }
  15994. /**
  15995. * The base implementation of `assignValue` and `assignMergeValue` without
  15996. * value checks.
  15997. *
  15998. * @private
  15999. * @param {Object} object The object to modify.
  16000. * @param {string} key The key of the property to assign.
  16001. * @param {*} value The value to assign.
  16002. */
  16003. function baseAssignValue(object, key, value) {
  16004. if (key == '__proto__' && defineProperty) {
  16005. defineProperty(object, key, {
  16006. 'configurable': true,
  16007. 'enumerable': true,
  16008. 'value': value,
  16009. 'writable': true
  16010. });
  16011. } else {
  16012. object[key] = value;
  16013. }
  16014. }
  16015. /**
  16016. * The base implementation of `_.at` without support for individual paths.
  16017. *
  16018. * @private
  16019. * @param {Object} object The object to iterate over.
  16020. * @param {string[]} paths The property paths to pick.
  16021. * @returns {Array} Returns the picked elements.
  16022. */
  16023. function baseAt(object, paths) {
  16024. var index = -1,
  16025. length = paths.length,
  16026. result = Array(length),
  16027. skip = object == null;
  16028. while (++index < length) {
  16029. result[index] = skip ? undefined : get(object, paths[index]);
  16030. }
  16031. return result;
  16032. }
  16033. /**
  16034. * The base implementation of `_.clamp` which doesn't coerce arguments.
  16035. *
  16036. * @private
  16037. * @param {number} number The number to clamp.
  16038. * @param {number} [lower] The lower bound.
  16039. * @param {number} upper The upper bound.
  16040. * @returns {number} Returns the clamped number.
  16041. */
  16042. function baseClamp(number, lower, upper) {
  16043. if (number === number) {
  16044. if (upper !== undefined) {
  16045. number = number <= upper ? number : upper;
  16046. }
  16047. if (lower !== undefined) {
  16048. number = number >= lower ? number : lower;
  16049. }
  16050. }
  16051. return number;
  16052. }
  16053. /**
  16054. * The base implementation of `_.clone` and `_.cloneDeep` which tracks
  16055. * traversed objects.
  16056. *
  16057. * @private
  16058. * @param {*} value The value to clone.
  16059. * @param {boolean} bitmask The bitmask flags.
  16060. * 1 - Deep clone
  16061. * 2 - Flatten inherited properties
  16062. * 4 - Clone symbols
  16063. * @param {Function} [customizer] The function to customize cloning.
  16064. * @param {string} [key] The key of `value`.
  16065. * @param {Object} [object] The parent object of `value`.
  16066. * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
  16067. * @returns {*} Returns the cloned value.
  16068. */
  16069. function baseClone(value, bitmask, customizer, key, object, stack) {
  16070. var result,
  16071. isDeep = bitmask & CLONE_DEEP_FLAG,
  16072. isFlat = bitmask & CLONE_FLAT_FLAG,
  16073. isFull = bitmask & CLONE_SYMBOLS_FLAG;
  16074. if (customizer) {
  16075. result = object ? customizer(value, key, object, stack) : customizer(value);
  16076. }
  16077. if (result !== undefined) {
  16078. return result;
  16079. }
  16080. if (!isObject(value)) {
  16081. return value;
  16082. }
  16083. var isArr = isArray(value);
  16084. if (isArr) {
  16085. result = initCloneArray(value);
  16086. if (!isDeep) {
  16087. return copyArray(value, result);
  16088. }
  16089. } else {
  16090. var tag = getTag(value),
  16091. isFunc = tag == funcTag || tag == genTag;
  16092. if (isBuffer(value)) {
  16093. return cloneBuffer(value, isDeep);
  16094. }
  16095. if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
  16096. result = (isFlat || isFunc) ? {} : initCloneObject(value);
  16097. if (!isDeep) {
  16098. return isFlat
  16099. ? copySymbolsIn(value, baseAssignIn(result, value))
  16100. : copySymbols(value, baseAssign(result, value));
  16101. }
  16102. } else {
  16103. if (!cloneableTags[tag]) {
  16104. return object ? value : {};
  16105. }
  16106. result = initCloneByTag(value, tag, isDeep);
  16107. }
  16108. }
  16109. // Check for circular references and return its corresponding clone.
  16110. stack || (stack = new Stack);
  16111. var stacked = stack.get(value);
  16112. if (stacked) {
  16113. return stacked;
  16114. }
  16115. stack.set(value, result);
  16116. if (isSet(value)) {
  16117. value.forEach(function(subValue) {
  16118. result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
  16119. });
  16120. return result;
  16121. }
  16122. if (isMap(value)) {
  16123. value.forEach(function(subValue, key) {
  16124. result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
  16125. });
  16126. return result;
  16127. }
  16128. var keysFunc = isFull
  16129. ? (isFlat ? getAllKeysIn : getAllKeys)
  16130. : (isFlat ? keysIn : keys);
  16131. var props = isArr ? undefined : keysFunc(value);
  16132. arrayEach(props || value, function(subValue, key) {
  16133. if (props) {
  16134. key = subValue;
  16135. subValue = value[key];
  16136. }
  16137. // Recursively populate clone (susceptible to call stack limits).
  16138. assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
  16139. });
  16140. return result;
  16141. }
  16142. /**
  16143. * The base implementation of `_.conforms` which doesn't clone `source`.
  16144. *
  16145. * @private
  16146. * @param {Object} source The object of property predicates to conform to.
  16147. * @returns {Function} Returns the new spec function.
  16148. */
  16149. function baseConforms(source) {
  16150. var props = keys(source);
  16151. return function(object) {
  16152. return baseConformsTo(object, source, props);
  16153. };
  16154. }
  16155. /**
  16156. * The base implementation of `_.conformsTo` which accepts `props` to check.
  16157. *
  16158. * @private
  16159. * @param {Object} object The object to inspect.
  16160. * @param {Object} source The object of property predicates to conform to.
  16161. * @returns {boolean} Returns `true` if `object` conforms, else `false`.
  16162. */
  16163. function baseConformsTo(object, source, props) {
  16164. var length = props.length;
  16165. if (object == null) {
  16166. return !length;
  16167. }
  16168. object = Object(object);
  16169. while (length--) {
  16170. var key = props[length],
  16171. predicate = source[key],
  16172. value = object[key];
  16173. if ((value === undefined && !(key in object)) || !predicate(value)) {
  16174. return false;
  16175. }
  16176. }
  16177. return true;
  16178. }
  16179. /**
  16180. * The base implementation of `_.delay` and `_.defer` which accepts `args`
  16181. * to provide to `func`.
  16182. *
  16183. * @private
  16184. * @param {Function} func The function to delay.
  16185. * @param {number} wait The number of milliseconds to delay invocation.
  16186. * @param {Array} args The arguments to provide to `func`.
  16187. * @returns {number|Object} Returns the timer id or timeout object.
  16188. */
  16189. function baseDelay(func, wait, args) {
  16190. if (typeof func != 'function') {
  16191. throw new TypeError(FUNC_ERROR_TEXT);
  16192. }
  16193. return setTimeout(function() { func.apply(undefined, args); }, wait);
  16194. }
  16195. /**
  16196. * The base implementation of methods like `_.difference` without support
  16197. * for excluding multiple arrays or iteratee shorthands.
  16198. *
  16199. * @private
  16200. * @param {Array} array The array to inspect.
  16201. * @param {Array} values The values to exclude.
  16202. * @param {Function} [iteratee] The iteratee invoked per element.
  16203. * @param {Function} [comparator] The comparator invoked per element.
  16204. * @returns {Array} Returns the new array of filtered values.
  16205. */
  16206. function baseDifference(array, values, iteratee, comparator) {
  16207. var index = -1,
  16208. includes = arrayIncludes,
  16209. isCommon = true,
  16210. length = array.length,
  16211. result = [],
  16212. valuesLength = values.length;
  16213. if (!length) {
  16214. return result;
  16215. }
  16216. if (iteratee) {
  16217. values = arrayMap(values, baseUnary(iteratee));
  16218. }
  16219. if (comparator) {
  16220. includes = arrayIncludesWith;
  16221. isCommon = false;
  16222. }
  16223. else if (values.length >= LARGE_ARRAY_SIZE) {
  16224. includes = cacheHas;
  16225. isCommon = false;
  16226. values = new SetCache(values);
  16227. }
  16228. outer:
  16229. while (++index < length) {
  16230. var value = array[index],
  16231. computed = iteratee == null ? value : iteratee(value);
  16232. value = (comparator || value !== 0) ? value : 0;
  16233. if (isCommon && computed === computed) {
  16234. var valuesIndex = valuesLength;
  16235. while (valuesIndex--) {
  16236. if (values[valuesIndex] === computed) {
  16237. continue outer;
  16238. }
  16239. }
  16240. result.push(value);
  16241. }
  16242. else if (!includes(values, computed, comparator)) {
  16243. result.push(value);
  16244. }
  16245. }
  16246. return result;
  16247. }
  16248. /**
  16249. * The base implementation of `_.forEach` without support for iteratee shorthands.
  16250. *
  16251. * @private
  16252. * @param {Array|Object} collection The collection to iterate over.
  16253. * @param {Function} iteratee The function invoked per iteration.
  16254. * @returns {Array|Object} Returns `collection`.
  16255. */
  16256. var baseEach = createBaseEach(baseForOwn);
  16257. /**
  16258. * The base implementation of `_.forEachRight` without support for iteratee shorthands.
  16259. *
  16260. * @private
  16261. * @param {Array|Object} collection The collection to iterate over.
  16262. * @param {Function} iteratee The function invoked per iteration.
  16263. * @returns {Array|Object} Returns `collection`.
  16264. */
  16265. var baseEachRight = createBaseEach(baseForOwnRight, true);
  16266. /**
  16267. * The base implementation of `_.every` without support for iteratee shorthands.
  16268. *
  16269. * @private
  16270. * @param {Array|Object} collection The collection to iterate over.
  16271. * @param {Function} predicate The function invoked per iteration.
  16272. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  16273. * else `false`
  16274. */
  16275. function baseEvery(collection, predicate) {
  16276. var result = true;
  16277. baseEach(collection, function(value, index, collection) {
  16278. result = !!predicate(value, index, collection);
  16279. return result;
  16280. });
  16281. return result;
  16282. }
  16283. /**
  16284. * The base implementation of methods like `_.max` and `_.min` which accepts a
  16285. * `comparator` to determine the extremum value.
  16286. *
  16287. * @private
  16288. * @param {Array} array The array to iterate over.
  16289. * @param {Function} iteratee The iteratee invoked per iteration.
  16290. * @param {Function} comparator The comparator used to compare values.
  16291. * @returns {*} Returns the extremum value.
  16292. */
  16293. function baseExtremum(array, iteratee, comparator) {
  16294. var index = -1,
  16295. length = array.length;
  16296. while (++index < length) {
  16297. var value = array[index],
  16298. current = iteratee(value);
  16299. if (current != null && (computed === undefined
  16300. ? (current === current && !isSymbol(current))
  16301. : comparator(current, computed)
  16302. )) {
  16303. var computed = current,
  16304. result = value;
  16305. }
  16306. }
  16307. return result;
  16308. }
  16309. /**
  16310. * The base implementation of `_.fill` without an iteratee call guard.
  16311. *
  16312. * @private
  16313. * @param {Array} array The array to fill.
  16314. * @param {*} value The value to fill `array` with.
  16315. * @param {number} [start=0] The start position.
  16316. * @param {number} [end=array.length] The end position.
  16317. * @returns {Array} Returns `array`.
  16318. */
  16319. function baseFill(array, value, start, end) {
  16320. var length = array.length;
  16321. start = toInteger(start);
  16322. if (start < 0) {
  16323. start = -start > length ? 0 : (length + start);
  16324. }
  16325. end = (end === undefined || end > length) ? length : toInteger(end);
  16326. if (end < 0) {
  16327. end += length;
  16328. }
  16329. end = start > end ? 0 : toLength(end);
  16330. while (start < end) {
  16331. array[start++] = value;
  16332. }
  16333. return array;
  16334. }
  16335. /**
  16336. * The base implementation of `_.filter` without support for iteratee shorthands.
  16337. *
  16338. * @private
  16339. * @param {Array|Object} collection The collection to iterate over.
  16340. * @param {Function} predicate The function invoked per iteration.
  16341. * @returns {Array} Returns the new filtered array.
  16342. */
  16343. function baseFilter(collection, predicate) {
  16344. var result = [];
  16345. baseEach(collection, function(value, index, collection) {
  16346. if (predicate(value, index, collection)) {
  16347. result.push(value);
  16348. }
  16349. });
  16350. return result;
  16351. }
  16352. /**
  16353. * The base implementation of `_.flatten` with support for restricting flattening.
  16354. *
  16355. * @private
  16356. * @param {Array} array The array to flatten.
  16357. * @param {number} depth The maximum recursion depth.
  16358. * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
  16359. * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
  16360. * @param {Array} [result=[]] The initial result value.
  16361. * @returns {Array} Returns the new flattened array.
  16362. */
  16363. function baseFlatten(array, depth, predicate, isStrict, result) {
  16364. var index = -1,
  16365. length = array.length;
  16366. predicate || (predicate = isFlattenable);
  16367. result || (result = []);
  16368. while (++index < length) {
  16369. var value = array[index];
  16370. if (depth > 0 && predicate(value)) {
  16371. if (depth > 1) {
  16372. // Recursively flatten arrays (susceptible to call stack limits).
  16373. baseFlatten(value, depth - 1, predicate, isStrict, result);
  16374. } else {
  16375. arrayPush(result, value);
  16376. }
  16377. } else if (!isStrict) {
  16378. result[result.length] = value;
  16379. }
  16380. }
  16381. return result;
  16382. }
  16383. /**
  16384. * The base implementation of `baseForOwn` which iterates over `object`
  16385. * properties returned by `keysFunc` and invokes `iteratee` for each property.
  16386. * Iteratee functions may exit iteration early by explicitly returning `false`.
  16387. *
  16388. * @private
  16389. * @param {Object} object The object to iterate over.
  16390. * @param {Function} iteratee The function invoked per iteration.
  16391. * @param {Function} keysFunc The function to get the keys of `object`.
  16392. * @returns {Object} Returns `object`.
  16393. */
  16394. var baseFor = createBaseFor();
  16395. /**
  16396. * This function is like `baseFor` except that it iterates over properties
  16397. * in the opposite order.
  16398. *
  16399. * @private
  16400. * @param {Object} object The object to iterate over.
  16401. * @param {Function} iteratee The function invoked per iteration.
  16402. * @param {Function} keysFunc The function to get the keys of `object`.
  16403. * @returns {Object} Returns `object`.
  16404. */
  16405. var baseForRight = createBaseFor(true);
  16406. /**
  16407. * The base implementation of `_.forOwn` without support for iteratee shorthands.
  16408. *
  16409. * @private
  16410. * @param {Object} object The object to iterate over.
  16411. * @param {Function} iteratee The function invoked per iteration.
  16412. * @returns {Object} Returns `object`.
  16413. */
  16414. function baseForOwn(object, iteratee) {
  16415. return object && baseFor(object, iteratee, keys);
  16416. }
  16417. /**
  16418. * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
  16419. *
  16420. * @private
  16421. * @param {Object} object The object to iterate over.
  16422. * @param {Function} iteratee The function invoked per iteration.
  16423. * @returns {Object} Returns `object`.
  16424. */
  16425. function baseForOwnRight(object, iteratee) {
  16426. return object && baseForRight(object, iteratee, keys);
  16427. }
  16428. /**
  16429. * The base implementation of `_.functions` which creates an array of
  16430. * `object` function property names filtered from `props`.
  16431. *
  16432. * @private
  16433. * @param {Object} object The object to inspect.
  16434. * @param {Array} props The property names to filter.
  16435. * @returns {Array} Returns the function names.
  16436. */
  16437. function baseFunctions(object, props) {
  16438. return arrayFilter(props, function(key) {
  16439. return isFunction(object[key]);
  16440. });
  16441. }
  16442. /**
  16443. * The base implementation of `_.get` without support for default values.
  16444. *
  16445. * @private
  16446. * @param {Object} object The object to query.
  16447. * @param {Array|string} path The path of the property to get.
  16448. * @returns {*} Returns the resolved value.
  16449. */
  16450. function baseGet(object, path) {
  16451. path = castPath(path, object);
  16452. var index = 0,
  16453. length = path.length;
  16454. while (object != null && index < length) {
  16455. object = object[toKey(path[index++])];
  16456. }
  16457. return (index && index == length) ? object : undefined;
  16458. }
  16459. /**
  16460. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  16461. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  16462. * symbols of `object`.
  16463. *
  16464. * @private
  16465. * @param {Object} object The object to query.
  16466. * @param {Function} keysFunc The function to get the keys of `object`.
  16467. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  16468. * @returns {Array} Returns the array of property names and symbols.
  16469. */
  16470. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  16471. var result = keysFunc(object);
  16472. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  16473. }
  16474. /**
  16475. * The base implementation of `getTag` without fallbacks for buggy environments.
  16476. *
  16477. * @private
  16478. * @param {*} value The value to query.
  16479. * @returns {string} Returns the `toStringTag`.
  16480. */
  16481. function baseGetTag(value) {
  16482. if (value == null) {
  16483. return value === undefined ? undefinedTag : nullTag;
  16484. }
  16485. return (symToStringTag && symToStringTag in Object(value))
  16486. ? getRawTag(value)
  16487. : objectToString(value);
  16488. }
  16489. /**
  16490. * The base implementation of `_.gt` which doesn't coerce arguments.
  16491. *
  16492. * @private
  16493. * @param {*} value The value to compare.
  16494. * @param {*} other The other value to compare.
  16495. * @returns {boolean} Returns `true` if `value` is greater than `other`,
  16496. * else `false`.
  16497. */
  16498. function baseGt(value, other) {
  16499. return value > other;
  16500. }
  16501. /**
  16502. * The base implementation of `_.has` without support for deep paths.
  16503. *
  16504. * @private
  16505. * @param {Object} [object] The object to query.
  16506. * @param {Array|string} key The key to check.
  16507. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  16508. */
  16509. function baseHas(object, key) {
  16510. return object != null && hasOwnProperty.call(object, key);
  16511. }
  16512. /**
  16513. * The base implementation of `_.hasIn` without support for deep paths.
  16514. *
  16515. * @private
  16516. * @param {Object} [object] The object to query.
  16517. * @param {Array|string} key The key to check.
  16518. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  16519. */
  16520. function baseHasIn(object, key) {
  16521. return object != null && key in Object(object);
  16522. }
  16523. /**
  16524. * The base implementation of `_.inRange` which doesn't coerce arguments.
  16525. *
  16526. * @private
  16527. * @param {number} number The number to check.
  16528. * @param {number} start The start of the range.
  16529. * @param {number} end The end of the range.
  16530. * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
  16531. */
  16532. function baseInRange(number, start, end) {
  16533. return number >= nativeMin(start, end) && number < nativeMax(start, end);
  16534. }
  16535. /**
  16536. * The base implementation of methods like `_.intersection`, without support
  16537. * for iteratee shorthands, that accepts an array of arrays to inspect.
  16538. *
  16539. * @private
  16540. * @param {Array} arrays The arrays to inspect.
  16541. * @param {Function} [iteratee] The iteratee invoked per element.
  16542. * @param {Function} [comparator] The comparator invoked per element.
  16543. * @returns {Array} Returns the new array of shared values.
  16544. */
  16545. function baseIntersection(arrays, iteratee, comparator) {
  16546. var includes = comparator ? arrayIncludesWith : arrayIncludes,
  16547. length = arrays[0].length,
  16548. othLength = arrays.length,
  16549. othIndex = othLength,
  16550. caches = Array(othLength),
  16551. maxLength = Infinity,
  16552. result = [];
  16553. while (othIndex--) {
  16554. var array = arrays[othIndex];
  16555. if (othIndex && iteratee) {
  16556. array = arrayMap(array, baseUnary(iteratee));
  16557. }
  16558. maxLength = nativeMin(array.length, maxLength);
  16559. caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
  16560. ? new SetCache(othIndex && array)
  16561. : undefined;
  16562. }
  16563. array = arrays[0];
  16564. var index = -1,
  16565. seen = caches[0];
  16566. outer:
  16567. while (++index < length && result.length < maxLength) {
  16568. var value = array[index],
  16569. computed = iteratee ? iteratee(value) : value;
  16570. value = (comparator || value !== 0) ? value : 0;
  16571. if (!(seen
  16572. ? cacheHas(seen, computed)
  16573. : includes(result, computed, comparator)
  16574. )) {
  16575. othIndex = othLength;
  16576. while (--othIndex) {
  16577. var cache = caches[othIndex];
  16578. if (!(cache
  16579. ? cacheHas(cache, computed)
  16580. : includes(arrays[othIndex], computed, comparator))
  16581. ) {
  16582. continue outer;
  16583. }
  16584. }
  16585. if (seen) {
  16586. seen.push(computed);
  16587. }
  16588. result.push(value);
  16589. }
  16590. }
  16591. return result;
  16592. }
  16593. /**
  16594. * The base implementation of `_.invert` and `_.invertBy` which inverts
  16595. * `object` with values transformed by `iteratee` and set by `setter`.
  16596. *
  16597. * @private
  16598. * @param {Object} object The object to iterate over.
  16599. * @param {Function} setter The function to set `accumulator` values.
  16600. * @param {Function} iteratee The iteratee to transform values.
  16601. * @param {Object} accumulator The initial inverted object.
  16602. * @returns {Function} Returns `accumulator`.
  16603. */
  16604. function baseInverter(object, setter, iteratee, accumulator) {
  16605. baseForOwn(object, function(value, key, object) {
  16606. setter(accumulator, iteratee(value), key, object);
  16607. });
  16608. return accumulator;
  16609. }
  16610. /**
  16611. * The base implementation of `_.invoke` without support for individual
  16612. * method arguments.
  16613. *
  16614. * @private
  16615. * @param {Object} object The object to query.
  16616. * @param {Array|string} path The path of the method to invoke.
  16617. * @param {Array} args The arguments to invoke the method with.
  16618. * @returns {*} Returns the result of the invoked method.
  16619. */
  16620. function baseInvoke(object, path, args) {
  16621. path = castPath(path, object);
  16622. object = parent(object, path);
  16623. var func = object == null ? object : object[toKey(last(path))];
  16624. return func == null ? undefined : apply(func, object, args);
  16625. }
  16626. /**
  16627. * The base implementation of `_.isArguments`.
  16628. *
  16629. * @private
  16630. * @param {*} value The value to check.
  16631. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  16632. */
  16633. function baseIsArguments(value) {
  16634. return isObjectLike(value) && baseGetTag(value) == argsTag;
  16635. }
  16636. /**
  16637. * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
  16638. *
  16639. * @private
  16640. * @param {*} value The value to check.
  16641. * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
  16642. */
  16643. function baseIsArrayBuffer(value) {
  16644. return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
  16645. }
  16646. /**
  16647. * The base implementation of `_.isDate` without Node.js optimizations.
  16648. *
  16649. * @private
  16650. * @param {*} value The value to check.
  16651. * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
  16652. */
  16653. function baseIsDate(value) {
  16654. return isObjectLike(value) && baseGetTag(value) == dateTag;
  16655. }
  16656. /**
  16657. * The base implementation of `_.isEqual` which supports partial comparisons
  16658. * and tracks traversed objects.
  16659. *
  16660. * @private
  16661. * @param {*} value The value to compare.
  16662. * @param {*} other The other value to compare.
  16663. * @param {boolean} bitmask The bitmask flags.
  16664. * 1 - Unordered comparison
  16665. * 2 - Partial comparison
  16666. * @param {Function} [customizer] The function to customize comparisons.
  16667. * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  16668. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  16669. */
  16670. function baseIsEqual(value, other, bitmask, customizer, stack) {
  16671. if (value === other) {
  16672. return true;
  16673. }
  16674. if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
  16675. return value !== value && other !== other;
  16676. }
  16677. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  16678. }
  16679. /**
  16680. * A specialized version of `baseIsEqual` for arrays and objects which performs
  16681. * deep comparisons and tracks traversed objects enabling objects with circular
  16682. * references to be compared.
  16683. *
  16684. * @private
  16685. * @param {Object} object The object to compare.
  16686. * @param {Object} other The other object to compare.
  16687. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  16688. * @param {Function} customizer The function to customize comparisons.
  16689. * @param {Function} equalFunc The function to determine equivalents of values.
  16690. * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  16691. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  16692. */
  16693. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  16694. var objIsArr = isArray(object),
  16695. othIsArr = isArray(other),
  16696. objTag = objIsArr ? arrayTag : getTag(object),
  16697. othTag = othIsArr ? arrayTag : getTag(other);
  16698. objTag = objTag == argsTag ? objectTag : objTag;
  16699. othTag = othTag == argsTag ? objectTag : othTag;
  16700. var objIsObj = objTag == objectTag,
  16701. othIsObj = othTag == objectTag,
  16702. isSameTag = objTag == othTag;
  16703. if (isSameTag && isBuffer(object)) {
  16704. if (!isBuffer(other)) {
  16705. return false;
  16706. }
  16707. objIsArr = true;
  16708. objIsObj = false;
  16709. }
  16710. if (isSameTag && !objIsObj) {
  16711. stack || (stack = new Stack);
  16712. return (objIsArr || isTypedArray(object))
  16713. ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
  16714. : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  16715. }
  16716. if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
  16717. var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
  16718. othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
  16719. if (objIsWrapped || othIsWrapped) {
  16720. var objUnwrapped = objIsWrapped ? object.value() : object,
  16721. othUnwrapped = othIsWrapped ? other.value() : other;
  16722. stack || (stack = new Stack);
  16723. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  16724. }
  16725. }
  16726. if (!isSameTag) {
  16727. return false;
  16728. }
  16729. stack || (stack = new Stack);
  16730. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  16731. }
  16732. /**
  16733. * The base implementation of `_.isMap` without Node.js optimizations.
  16734. *
  16735. * @private
  16736. * @param {*} value The value to check.
  16737. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  16738. */
  16739. function baseIsMap(value) {
  16740. return isObjectLike(value) && getTag(value) == mapTag;
  16741. }
  16742. /**
  16743. * The base implementation of `_.isMatch` without support for iteratee shorthands.
  16744. *
  16745. * @private
  16746. * @param {Object} object The object to inspect.
  16747. * @param {Object} source The object of property values to match.
  16748. * @param {Array} matchData The property names, values, and compare flags to match.
  16749. * @param {Function} [customizer] The function to customize comparisons.
  16750. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  16751. */
  16752. function baseIsMatch(object, source, matchData, customizer) {
  16753. var index = matchData.length,
  16754. length = index,
  16755. noCustomizer = !customizer;
  16756. if (object == null) {
  16757. return !length;
  16758. }
  16759. object = Object(object);
  16760. while (index--) {
  16761. var data = matchData[index];
  16762. if ((noCustomizer && data[2])
  16763. ? data[1] !== object[data[0]]
  16764. : !(data[0] in object)
  16765. ) {
  16766. return false;
  16767. }
  16768. }
  16769. while (++index < length) {
  16770. data = matchData[index];
  16771. var key = data[0],
  16772. objValue = object[key],
  16773. srcValue = data[1];
  16774. if (noCustomizer && data[2]) {
  16775. if (objValue === undefined && !(key in object)) {
  16776. return false;
  16777. }
  16778. } else {
  16779. var stack = new Stack;
  16780. if (customizer) {
  16781. var result = customizer(objValue, srcValue, key, object, source, stack);
  16782. }
  16783. if (!(result === undefined
  16784. ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
  16785. : result
  16786. )) {
  16787. return false;
  16788. }
  16789. }
  16790. }
  16791. return true;
  16792. }
  16793. /**
  16794. * The base implementation of `_.isNative` without bad shim checks.
  16795. *
  16796. * @private
  16797. * @param {*} value The value to check.
  16798. * @returns {boolean} Returns `true` if `value` is a native function,
  16799. * else `false`.
  16800. */
  16801. function baseIsNative(value) {
  16802. if (!isObject(value) || isMasked(value)) {
  16803. return false;
  16804. }
  16805. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  16806. return pattern.test(toSource(value));
  16807. }
  16808. /**
  16809. * The base implementation of `_.isRegExp` without Node.js optimizations.
  16810. *
  16811. * @private
  16812. * @param {*} value The value to check.
  16813. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  16814. */
  16815. function baseIsRegExp(value) {
  16816. return isObjectLike(value) && baseGetTag(value) == regexpTag;
  16817. }
  16818. /**
  16819. * The base implementation of `_.isSet` without Node.js optimizations.
  16820. *
  16821. * @private
  16822. * @param {*} value The value to check.
  16823. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  16824. */
  16825. function baseIsSet(value) {
  16826. return isObjectLike(value) && getTag(value) == setTag;
  16827. }
  16828. /**
  16829. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  16830. *
  16831. * @private
  16832. * @param {*} value The value to check.
  16833. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  16834. */
  16835. function baseIsTypedArray(value) {
  16836. return isObjectLike(value) &&
  16837. isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  16838. }
  16839. /**
  16840. * The base implementation of `_.iteratee`.
  16841. *
  16842. * @private
  16843. * @param {*} [value=_.identity] The value to convert to an iteratee.
  16844. * @returns {Function} Returns the iteratee.
  16845. */
  16846. function baseIteratee(value) {
  16847. // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
  16848. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
  16849. if (typeof value == 'function') {
  16850. return value;
  16851. }
  16852. if (value == null) {
  16853. return identity;
  16854. }
  16855. if (typeof value == 'object') {
  16856. return isArray(value)
  16857. ? baseMatchesProperty(value[0], value[1])
  16858. : baseMatches(value);
  16859. }
  16860. return property(value);
  16861. }
  16862. /**
  16863. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  16864. *
  16865. * @private
  16866. * @param {Object} object The object to query.
  16867. * @returns {Array} Returns the array of property names.
  16868. */
  16869. function baseKeys(object) {
  16870. if (!isPrototype(object)) {
  16871. return nativeKeys(object);
  16872. }
  16873. var result = [];
  16874. for (var key in Object(object)) {
  16875. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  16876. result.push(key);
  16877. }
  16878. }
  16879. return result;
  16880. }
  16881. /**
  16882. * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
  16883. *
  16884. * @private
  16885. * @param {Object} object The object to query.
  16886. * @returns {Array} Returns the array of property names.
  16887. */
  16888. function baseKeysIn(object) {
  16889. if (!isObject(object)) {
  16890. return nativeKeysIn(object);
  16891. }
  16892. var isProto = isPrototype(object),
  16893. result = [];
  16894. for (var key in object) {
  16895. if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
  16896. result.push(key);
  16897. }
  16898. }
  16899. return result;
  16900. }
  16901. /**
  16902. * The base implementation of `_.lt` which doesn't coerce arguments.
  16903. *
  16904. * @private
  16905. * @param {*} value The value to compare.
  16906. * @param {*} other The other value to compare.
  16907. * @returns {boolean} Returns `true` if `value` is less than `other`,
  16908. * else `false`.
  16909. */
  16910. function baseLt(value, other) {
  16911. return value < other;
  16912. }
  16913. /**
  16914. * The base implementation of `_.map` without support for iteratee shorthands.
  16915. *
  16916. * @private
  16917. * @param {Array|Object} collection The collection to iterate over.
  16918. * @param {Function} iteratee The function invoked per iteration.
  16919. * @returns {Array} Returns the new mapped array.
  16920. */
  16921. function baseMap(collection, iteratee) {
  16922. var index = -1,
  16923. result = isArrayLike(collection) ? Array(collection.length) : [];
  16924. baseEach(collection, function(value, key, collection) {
  16925. result[++index] = iteratee(value, key, collection);
  16926. });
  16927. return result;
  16928. }
  16929. /**
  16930. * The base implementation of `_.matches` which doesn't clone `source`.
  16931. *
  16932. * @private
  16933. * @param {Object} source The object of property values to match.
  16934. * @returns {Function} Returns the new spec function.
  16935. */
  16936. function baseMatches(source) {
  16937. var matchData = getMatchData(source);
  16938. if (matchData.length == 1 && matchData[0][2]) {
  16939. return matchesStrictComparable(matchData[0][0], matchData[0][1]);
  16940. }
  16941. return function(object) {
  16942. return object === source || baseIsMatch(object, source, matchData);
  16943. };
  16944. }
  16945. /**
  16946. * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
  16947. *
  16948. * @private
  16949. * @param {string} path The path of the property to get.
  16950. * @param {*} srcValue The value to match.
  16951. * @returns {Function} Returns the new spec function.
  16952. */
  16953. function baseMatchesProperty(path, srcValue) {
  16954. if (isKey(path) && isStrictComparable(srcValue)) {
  16955. return matchesStrictComparable(toKey(path), srcValue);
  16956. }
  16957. return function(object) {
  16958. var objValue = get(object, path);
  16959. return (objValue === undefined && objValue === srcValue)
  16960. ? hasIn(object, path)
  16961. : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
  16962. };
  16963. }
  16964. /**
  16965. * The base implementation of `_.merge` without support for multiple sources.
  16966. *
  16967. * @private
  16968. * @param {Object} object The destination object.
  16969. * @param {Object} source The source object.
  16970. * @param {number} srcIndex The index of `source`.
  16971. * @param {Function} [customizer] The function to customize merged values.
  16972. * @param {Object} [stack] Tracks traversed source values and their merged
  16973. * counterparts.
  16974. */
  16975. function baseMerge(object, source, srcIndex, customizer, stack) {
  16976. if (object === source) {
  16977. return;
  16978. }
  16979. baseFor(source, function(srcValue, key) {
  16980. if (isObject(srcValue)) {
  16981. stack || (stack = new Stack);
  16982. baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
  16983. }
  16984. else {
  16985. var newValue = customizer
  16986. ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
  16987. : undefined;
  16988. if (newValue === undefined) {
  16989. newValue = srcValue;
  16990. }
  16991. assignMergeValue(object, key, newValue);
  16992. }
  16993. }, keysIn);
  16994. }
  16995. /**
  16996. * A specialized version of `baseMerge` for arrays and objects which performs
  16997. * deep merges and tracks traversed objects enabling objects with circular
  16998. * references to be merged.
  16999. *
  17000. * @private
  17001. * @param {Object} object The destination object.
  17002. * @param {Object} source The source object.
  17003. * @param {string} key The key of the value to merge.
  17004. * @param {number} srcIndex The index of `source`.
  17005. * @param {Function} mergeFunc The function to merge values.
  17006. * @param {Function} [customizer] The function to customize assigned values.
  17007. * @param {Object} [stack] Tracks traversed source values and their merged
  17008. * counterparts.
  17009. */
  17010. function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
  17011. var objValue = safeGet(object, key),
  17012. srcValue = safeGet(source, key),
  17013. stacked = stack.get(srcValue);
  17014. if (stacked) {
  17015. assignMergeValue(object, key, stacked);
  17016. return;
  17017. }
  17018. var newValue = customizer
  17019. ? customizer(objValue, srcValue, (key + ''), object, source, stack)
  17020. : undefined;
  17021. var isCommon = newValue === undefined;
  17022. if (isCommon) {
  17023. var isArr = isArray(srcValue),
  17024. isBuff = !isArr && isBuffer(srcValue),
  17025. isTyped = !isArr && !isBuff && isTypedArray(srcValue);
  17026. newValue = srcValue;
  17027. if (isArr || isBuff || isTyped) {
  17028. if (isArray(objValue)) {
  17029. newValue = objValue;
  17030. }
  17031. else if (isArrayLikeObject(objValue)) {
  17032. newValue = copyArray(objValue);
  17033. }
  17034. else if (isBuff) {
  17035. isCommon = false;
  17036. newValue = cloneBuffer(srcValue, true);
  17037. }
  17038. else if (isTyped) {
  17039. isCommon = false;
  17040. newValue = cloneTypedArray(srcValue, true);
  17041. }
  17042. else {
  17043. newValue = [];
  17044. }
  17045. }
  17046. else if (isPlainObject(srcValue) || isArguments(srcValue)) {
  17047. newValue = objValue;
  17048. if (isArguments(objValue)) {
  17049. newValue = toPlainObject(objValue);
  17050. }
  17051. else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
  17052. newValue = initCloneObject(srcValue);
  17053. }
  17054. }
  17055. else {
  17056. isCommon = false;
  17057. }
  17058. }
  17059. if (isCommon) {
  17060. // Recursively merge objects and arrays (susceptible to call stack limits).
  17061. stack.set(srcValue, newValue);
  17062. mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
  17063. stack['delete'](srcValue);
  17064. }
  17065. assignMergeValue(object, key, newValue);
  17066. }
  17067. /**
  17068. * The base implementation of `_.nth` which doesn't coerce arguments.
  17069. *
  17070. * @private
  17071. * @param {Array} array The array to query.
  17072. * @param {number} n The index of the element to return.
  17073. * @returns {*} Returns the nth element of `array`.
  17074. */
  17075. function baseNth(array, n) {
  17076. var length = array.length;
  17077. if (!length) {
  17078. return;
  17079. }
  17080. n += n < 0 ? length : 0;
  17081. return isIndex(n, length) ? array[n] : undefined;
  17082. }
  17083. /**
  17084. * The base implementation of `_.orderBy` without param guards.
  17085. *
  17086. * @private
  17087. * @param {Array|Object} collection The collection to iterate over.
  17088. * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
  17089. * @param {string[]} orders The sort orders of `iteratees`.
  17090. * @returns {Array} Returns the new sorted array.
  17091. */
  17092. function baseOrderBy(collection, iteratees, orders) {
  17093. var index = -1;
  17094. iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(getIteratee()));
  17095. var result = baseMap(collection, function(value, key, collection) {
  17096. var criteria = arrayMap(iteratees, function(iteratee) {
  17097. return iteratee(value);
  17098. });
  17099. return { 'criteria': criteria, 'index': ++index, 'value': value };
  17100. });
  17101. return baseSortBy(result, function(object, other) {
  17102. return compareMultiple(object, other, orders);
  17103. });
  17104. }
  17105. /**
  17106. * The base implementation of `_.pick` without support for individual
  17107. * property identifiers.
  17108. *
  17109. * @private
  17110. * @param {Object} object The source object.
  17111. * @param {string[]} paths The property paths to pick.
  17112. * @returns {Object} Returns the new object.
  17113. */
  17114. function basePick(object, paths) {
  17115. return basePickBy(object, paths, function(value, path) {
  17116. return hasIn(object, path);
  17117. });
  17118. }
  17119. /**
  17120. * The base implementation of `_.pickBy` without support for iteratee shorthands.
  17121. *
  17122. * @private
  17123. * @param {Object} object The source object.
  17124. * @param {string[]} paths The property paths to pick.
  17125. * @param {Function} predicate The function invoked per property.
  17126. * @returns {Object} Returns the new object.
  17127. */
  17128. function basePickBy(object, paths, predicate) {
  17129. var index = -1,
  17130. length = paths.length,
  17131. result = {};
  17132. while (++index < length) {
  17133. var path = paths[index],
  17134. value = baseGet(object, path);
  17135. if (predicate(value, path)) {
  17136. baseSet(result, castPath(path, object), value);
  17137. }
  17138. }
  17139. return result;
  17140. }
  17141. /**
  17142. * A specialized version of `baseProperty` which supports deep paths.
  17143. *
  17144. * @private
  17145. * @param {Array|string} path The path of the property to get.
  17146. * @returns {Function} Returns the new accessor function.
  17147. */
  17148. function basePropertyDeep(path) {
  17149. return function(object) {
  17150. return baseGet(object, path);
  17151. };
  17152. }
  17153. /**
  17154. * The base implementation of `_.pullAllBy` without support for iteratee
  17155. * shorthands.
  17156. *
  17157. * @private
  17158. * @param {Array} array The array to modify.
  17159. * @param {Array} values The values to remove.
  17160. * @param {Function} [iteratee] The iteratee invoked per element.
  17161. * @param {Function} [comparator] The comparator invoked per element.
  17162. * @returns {Array} Returns `array`.
  17163. */
  17164. function basePullAll(array, values, iteratee, comparator) {
  17165. var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
  17166. index = -1,
  17167. length = values.length,
  17168. seen = array;
  17169. if (array === values) {
  17170. values = copyArray(values);
  17171. }
  17172. if (iteratee) {
  17173. seen = arrayMap(array, baseUnary(iteratee));
  17174. }
  17175. while (++index < length) {
  17176. var fromIndex = 0,
  17177. value = values[index],
  17178. computed = iteratee ? iteratee(value) : value;
  17179. while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
  17180. if (seen !== array) {
  17181. splice.call(seen, fromIndex, 1);
  17182. }
  17183. splice.call(array, fromIndex, 1);
  17184. }
  17185. }
  17186. return array;
  17187. }
  17188. /**
  17189. * The base implementation of `_.pullAt` without support for individual
  17190. * indexes or capturing the removed elements.
  17191. *
  17192. * @private
  17193. * @param {Array} array The array to modify.
  17194. * @param {number[]} indexes The indexes of elements to remove.
  17195. * @returns {Array} Returns `array`.
  17196. */
  17197. function basePullAt(array, indexes) {
  17198. var length = array ? indexes.length : 0,
  17199. lastIndex = length - 1;
  17200. while (length--) {
  17201. var index = indexes[length];
  17202. if (length == lastIndex || index !== previous) {
  17203. var previous = index;
  17204. if (isIndex(index)) {
  17205. splice.call(array, index, 1);
  17206. } else {
  17207. baseUnset(array, index);
  17208. }
  17209. }
  17210. }
  17211. return array;
  17212. }
  17213. /**
  17214. * The base implementation of `_.random` without support for returning
  17215. * floating-point numbers.
  17216. *
  17217. * @private
  17218. * @param {number} lower The lower bound.
  17219. * @param {number} upper The upper bound.
  17220. * @returns {number} Returns the random number.
  17221. */
  17222. function baseRandom(lower, upper) {
  17223. return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
  17224. }
  17225. /**
  17226. * The base implementation of `_.range` and `_.rangeRight` which doesn't
  17227. * coerce arguments.
  17228. *
  17229. * @private
  17230. * @param {number} start The start of the range.
  17231. * @param {number} end The end of the range.
  17232. * @param {number} step The value to increment or decrement by.
  17233. * @param {boolean} [fromRight] Specify iterating from right to left.
  17234. * @returns {Array} Returns the range of numbers.
  17235. */
  17236. function baseRange(start, end, step, fromRight) {
  17237. var index = -1,
  17238. length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
  17239. result = Array(length);
  17240. while (length--) {
  17241. result[fromRight ? length : ++index] = start;
  17242. start += step;
  17243. }
  17244. return result;
  17245. }
  17246. /**
  17247. * The base implementation of `_.repeat` which doesn't coerce arguments.
  17248. *
  17249. * @private
  17250. * @param {string} string The string to repeat.
  17251. * @param {number} n The number of times to repeat the string.
  17252. * @returns {string} Returns the repeated string.
  17253. */
  17254. function baseRepeat(string, n) {
  17255. var result = '';
  17256. if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
  17257. return result;
  17258. }
  17259. // Leverage the exponentiation by squaring algorithm for a faster repeat.
  17260. // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
  17261. do {
  17262. if (n % 2) {
  17263. result += string;
  17264. }
  17265. n = nativeFloor(n / 2);
  17266. if (n) {
  17267. string += string;
  17268. }
  17269. } while (n);
  17270. return result;
  17271. }
  17272. /**
  17273. * The base implementation of `_.rest` which doesn't validate or coerce arguments.
  17274. *
  17275. * @private
  17276. * @param {Function} func The function to apply a rest parameter to.
  17277. * @param {number} [start=func.length-1] The start position of the rest parameter.
  17278. * @returns {Function} Returns the new function.
  17279. */
  17280. function baseRest(func, start) {
  17281. return setToString(overRest(func, start, identity), func + '');
  17282. }
  17283. /**
  17284. * The base implementation of `_.sample`.
  17285. *
  17286. * @private
  17287. * @param {Array|Object} collection The collection to sample.
  17288. * @returns {*} Returns the random element.
  17289. */
  17290. function baseSample(collection) {
  17291. return arraySample(values(collection));
  17292. }
  17293. /**
  17294. * The base implementation of `_.sampleSize` without param guards.
  17295. *
  17296. * @private
  17297. * @param {Array|Object} collection The collection to sample.
  17298. * @param {number} n The number of elements to sample.
  17299. * @returns {Array} Returns the random elements.
  17300. */
  17301. function baseSampleSize(collection, n) {
  17302. var array = values(collection);
  17303. return shuffleSelf(array, baseClamp(n, 0, array.length));
  17304. }
  17305. /**
  17306. * The base implementation of `_.set`.
  17307. *
  17308. * @private
  17309. * @param {Object} object The object to modify.
  17310. * @param {Array|string} path The path of the property to set.
  17311. * @param {*} value The value to set.
  17312. * @param {Function} [customizer] The function to customize path creation.
  17313. * @returns {Object} Returns `object`.
  17314. */
  17315. function baseSet(object, path, value, customizer) {
  17316. if (!isObject(object)) {
  17317. return object;
  17318. }
  17319. path = castPath(path, object);
  17320. var index = -1,
  17321. length = path.length,
  17322. lastIndex = length - 1,
  17323. nested = object;
  17324. while (nested != null && ++index < length) {
  17325. var key = toKey(path[index]),
  17326. newValue = value;
  17327. if (index != lastIndex) {
  17328. var objValue = nested[key];
  17329. newValue = customizer ? customizer(objValue, key, nested) : undefined;
  17330. if (newValue === undefined) {
  17331. newValue = isObject(objValue)
  17332. ? objValue
  17333. : (isIndex(path[index + 1]) ? [] : {});
  17334. }
  17335. }
  17336. assignValue(nested, key, newValue);
  17337. nested = nested[key];
  17338. }
  17339. return object;
  17340. }
  17341. /**
  17342. * The base implementation of `setData` without support for hot loop shorting.
  17343. *
  17344. * @private
  17345. * @param {Function} func The function to associate metadata with.
  17346. * @param {*} data The metadata.
  17347. * @returns {Function} Returns `func`.
  17348. */
  17349. var baseSetData = !metaMap ? identity : function(func, data) {
  17350. metaMap.set(func, data);
  17351. return func;
  17352. };
  17353. /**
  17354. * The base implementation of `setToString` without support for hot loop shorting.
  17355. *
  17356. * @private
  17357. * @param {Function} func The function to modify.
  17358. * @param {Function} string The `toString` result.
  17359. * @returns {Function} Returns `func`.
  17360. */
  17361. var baseSetToString = !defineProperty ? identity : function(func, string) {
  17362. return defineProperty(func, 'toString', {
  17363. 'configurable': true,
  17364. 'enumerable': false,
  17365. 'value': constant(string),
  17366. 'writable': true
  17367. });
  17368. };
  17369. /**
  17370. * The base implementation of `_.shuffle`.
  17371. *
  17372. * @private
  17373. * @param {Array|Object} collection The collection to shuffle.
  17374. * @returns {Array} Returns the new shuffled array.
  17375. */
  17376. function baseShuffle(collection) {
  17377. return shuffleSelf(values(collection));
  17378. }
  17379. /**
  17380. * The base implementation of `_.slice` without an iteratee call guard.
  17381. *
  17382. * @private
  17383. * @param {Array} array The array to slice.
  17384. * @param {number} [start=0] The start position.
  17385. * @param {number} [end=array.length] The end position.
  17386. * @returns {Array} Returns the slice of `array`.
  17387. */
  17388. function baseSlice(array, start, end) {
  17389. var index = -1,
  17390. length = array.length;
  17391. if (start < 0) {
  17392. start = -start > length ? 0 : (length + start);
  17393. }
  17394. end = end > length ? length : end;
  17395. if (end < 0) {
  17396. end += length;
  17397. }
  17398. length = start > end ? 0 : ((end - start) >>> 0);
  17399. start >>>= 0;
  17400. var result = Array(length);
  17401. while (++index < length) {
  17402. result[index] = array[index + start];
  17403. }
  17404. return result;
  17405. }
  17406. /**
  17407. * The base implementation of `_.some` without support for iteratee shorthands.
  17408. *
  17409. * @private
  17410. * @param {Array|Object} collection The collection to iterate over.
  17411. * @param {Function} predicate The function invoked per iteration.
  17412. * @returns {boolean} Returns `true` if any element passes the predicate check,
  17413. * else `false`.
  17414. */
  17415. function baseSome(collection, predicate) {
  17416. var result;
  17417. baseEach(collection, function(value, index, collection) {
  17418. result = predicate(value, index, collection);
  17419. return !result;
  17420. });
  17421. return !!result;
  17422. }
  17423. /**
  17424. * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
  17425. * performs a binary search of `array` to determine the index at which `value`
  17426. * should be inserted into `array` in order to maintain its sort order.
  17427. *
  17428. * @private
  17429. * @param {Array} array The sorted array to inspect.
  17430. * @param {*} value The value to evaluate.
  17431. * @param {boolean} [retHighest] Specify returning the highest qualified index.
  17432. * @returns {number} Returns the index at which `value` should be inserted
  17433. * into `array`.
  17434. */
  17435. function baseSortedIndex(array, value, retHighest) {
  17436. var low = 0,
  17437. high = array == null ? low : array.length;
  17438. if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
  17439. while (low < high) {
  17440. var mid = (low + high) >>> 1,
  17441. computed = array[mid];
  17442. if (computed !== null && !isSymbol(computed) &&
  17443. (retHighest ? (computed <= value) : (computed < value))) {
  17444. low = mid + 1;
  17445. } else {
  17446. high = mid;
  17447. }
  17448. }
  17449. return high;
  17450. }
  17451. return baseSortedIndexBy(array, value, identity, retHighest);
  17452. }
  17453. /**
  17454. * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
  17455. * which invokes `iteratee` for `value` and each element of `array` to compute
  17456. * their sort ranking. The iteratee is invoked with one argument; (value).
  17457. *
  17458. * @private
  17459. * @param {Array} array The sorted array to inspect.
  17460. * @param {*} value The value to evaluate.
  17461. * @param {Function} iteratee The iteratee invoked per element.
  17462. * @param {boolean} [retHighest] Specify returning the highest qualified index.
  17463. * @returns {number} Returns the index at which `value` should be inserted
  17464. * into `array`.
  17465. */
  17466. function baseSortedIndexBy(array, value, iteratee, retHighest) {
  17467. value = iteratee(value);
  17468. var low = 0,
  17469. high = array == null ? 0 : array.length,
  17470. valIsNaN = value !== value,
  17471. valIsNull = value === null,
  17472. valIsSymbol = isSymbol(value),
  17473. valIsUndefined = value === undefined;
  17474. while (low < high) {
  17475. var mid = nativeFloor((low + high) / 2),
  17476. computed = iteratee(array[mid]),
  17477. othIsDefined = computed !== undefined,
  17478. othIsNull = computed === null,
  17479. othIsReflexive = computed === computed,
  17480. othIsSymbol = isSymbol(computed);
  17481. if (valIsNaN) {
  17482. var setLow = retHighest || othIsReflexive;
  17483. } else if (valIsUndefined) {
  17484. setLow = othIsReflexive && (retHighest || othIsDefined);
  17485. } else if (valIsNull) {
  17486. setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
  17487. } else if (valIsSymbol) {
  17488. setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
  17489. } else if (othIsNull || othIsSymbol) {
  17490. setLow = false;
  17491. } else {
  17492. setLow = retHighest ? (computed <= value) : (computed < value);
  17493. }
  17494. if (setLow) {
  17495. low = mid + 1;
  17496. } else {
  17497. high = mid;
  17498. }
  17499. }
  17500. return nativeMin(high, MAX_ARRAY_INDEX);
  17501. }
  17502. /**
  17503. * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
  17504. * support for iteratee shorthands.
  17505. *
  17506. * @private
  17507. * @param {Array} array The array to inspect.
  17508. * @param {Function} [iteratee] The iteratee invoked per element.
  17509. * @returns {Array} Returns the new duplicate free array.
  17510. */
  17511. function baseSortedUniq(array, iteratee) {
  17512. var index = -1,
  17513. length = array.length,
  17514. resIndex = 0,
  17515. result = [];
  17516. while (++index < length) {
  17517. var value = array[index],
  17518. computed = iteratee ? iteratee(value) : value;
  17519. if (!index || !eq(computed, seen)) {
  17520. var seen = computed;
  17521. result[resIndex++] = value === 0 ? 0 : value;
  17522. }
  17523. }
  17524. return result;
  17525. }
  17526. /**
  17527. * The base implementation of `_.toNumber` which doesn't ensure correct
  17528. * conversions of binary, hexadecimal, or octal string values.
  17529. *
  17530. * @private
  17531. * @param {*} value The value to process.
  17532. * @returns {number} Returns the number.
  17533. */
  17534. function baseToNumber(value) {
  17535. if (typeof value == 'number') {
  17536. return value;
  17537. }
  17538. if (isSymbol(value)) {
  17539. return NAN;
  17540. }
  17541. return +value;
  17542. }
  17543. /**
  17544. * The base implementation of `_.toString` which doesn't convert nullish
  17545. * values to empty strings.
  17546. *
  17547. * @private
  17548. * @param {*} value The value to process.
  17549. * @returns {string} Returns the string.
  17550. */
  17551. function baseToString(value) {
  17552. // Exit early for strings to avoid a performance hit in some environments.
  17553. if (typeof value == 'string') {
  17554. return value;
  17555. }
  17556. if (isArray(value)) {
  17557. // Recursively convert values (susceptible to call stack limits).
  17558. return arrayMap(value, baseToString) + '';
  17559. }
  17560. if (isSymbol(value)) {
  17561. return symbolToString ? symbolToString.call(value) : '';
  17562. }
  17563. var result = (value + '');
  17564. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  17565. }
  17566. /**
  17567. * The base implementation of `_.uniqBy` without support for iteratee shorthands.
  17568. *
  17569. * @private
  17570. * @param {Array} array The array to inspect.
  17571. * @param {Function} [iteratee] The iteratee invoked per element.
  17572. * @param {Function} [comparator] The comparator invoked per element.
  17573. * @returns {Array} Returns the new duplicate free array.
  17574. */
  17575. function baseUniq(array, iteratee, comparator) {
  17576. var index = -1,
  17577. includes = arrayIncludes,
  17578. length = array.length,
  17579. isCommon = true,
  17580. result = [],
  17581. seen = result;
  17582. if (comparator) {
  17583. isCommon = false;
  17584. includes = arrayIncludesWith;
  17585. }
  17586. else if (length >= LARGE_ARRAY_SIZE) {
  17587. var set = iteratee ? null : createSet(array);
  17588. if (set) {
  17589. return setToArray(set);
  17590. }
  17591. isCommon = false;
  17592. includes = cacheHas;
  17593. seen = new SetCache;
  17594. }
  17595. else {
  17596. seen = iteratee ? [] : result;
  17597. }
  17598. outer:
  17599. while (++index < length) {
  17600. var value = array[index],
  17601. computed = iteratee ? iteratee(value) : value;
  17602. value = (comparator || value !== 0) ? value : 0;
  17603. if (isCommon && computed === computed) {
  17604. var seenIndex = seen.length;
  17605. while (seenIndex--) {
  17606. if (seen[seenIndex] === computed) {
  17607. continue outer;
  17608. }
  17609. }
  17610. if (iteratee) {
  17611. seen.push(computed);
  17612. }
  17613. result.push(value);
  17614. }
  17615. else if (!includes(seen, computed, comparator)) {
  17616. if (seen !== result) {
  17617. seen.push(computed);
  17618. }
  17619. result.push(value);
  17620. }
  17621. }
  17622. return result;
  17623. }
  17624. /**
  17625. * The base implementation of `_.unset`.
  17626. *
  17627. * @private
  17628. * @param {Object} object The object to modify.
  17629. * @param {Array|string} path The property path to unset.
  17630. * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  17631. */
  17632. function baseUnset(object, path) {
  17633. path = castPath(path, object);
  17634. object = parent(object, path);
  17635. return object == null || delete object[toKey(last(path))];
  17636. }
  17637. /**
  17638. * The base implementation of `_.update`.
  17639. *
  17640. * @private
  17641. * @param {Object} object The object to modify.
  17642. * @param {Array|string} path The path of the property to update.
  17643. * @param {Function} updater The function to produce the updated value.
  17644. * @param {Function} [customizer] The function to customize path creation.
  17645. * @returns {Object} Returns `object`.
  17646. */
  17647. function baseUpdate(object, path, updater, customizer) {
  17648. return baseSet(object, path, updater(baseGet(object, path)), customizer);
  17649. }
  17650. /**
  17651. * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
  17652. * without support for iteratee shorthands.
  17653. *
  17654. * @private
  17655. * @param {Array} array The array to query.
  17656. * @param {Function} predicate The function invoked per iteration.
  17657. * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
  17658. * @param {boolean} [fromRight] Specify iterating from right to left.
  17659. * @returns {Array} Returns the slice of `array`.
  17660. */
  17661. function baseWhile(array, predicate, isDrop, fromRight) {
  17662. var length = array.length,
  17663. index = fromRight ? length : -1;
  17664. while ((fromRight ? index-- : ++index < length) &&
  17665. predicate(array[index], index, array)) {}
  17666. return isDrop
  17667. ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
  17668. : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
  17669. }
  17670. /**
  17671. * The base implementation of `wrapperValue` which returns the result of
  17672. * performing a sequence of actions on the unwrapped `value`, where each
  17673. * successive action is supplied the return value of the previous.
  17674. *
  17675. * @private
  17676. * @param {*} value The unwrapped value.
  17677. * @param {Array} actions Actions to perform to resolve the unwrapped value.
  17678. * @returns {*} Returns the resolved value.
  17679. */
  17680. function baseWrapperValue(value, actions) {
  17681. var result = value;
  17682. if (result instanceof LazyWrapper) {
  17683. result = result.value();
  17684. }
  17685. return arrayReduce(actions, function(result, action) {
  17686. return action.func.apply(action.thisArg, arrayPush([result], action.args));
  17687. }, result);
  17688. }
  17689. /**
  17690. * The base implementation of methods like `_.xor`, without support for
  17691. * iteratee shorthands, that accepts an array of arrays to inspect.
  17692. *
  17693. * @private
  17694. * @param {Array} arrays The arrays to inspect.
  17695. * @param {Function} [iteratee] The iteratee invoked per element.
  17696. * @param {Function} [comparator] The comparator invoked per element.
  17697. * @returns {Array} Returns the new array of values.
  17698. */
  17699. function baseXor(arrays, iteratee, comparator) {
  17700. var length = arrays.length;
  17701. if (length < 2) {
  17702. return length ? baseUniq(arrays[0]) : [];
  17703. }
  17704. var index = -1,
  17705. result = Array(length);
  17706. while (++index < length) {
  17707. var array = arrays[index],
  17708. othIndex = -1;
  17709. while (++othIndex < length) {
  17710. if (othIndex != index) {
  17711. result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
  17712. }
  17713. }
  17714. }
  17715. return baseUniq(baseFlatten(result, 1), iteratee, comparator);
  17716. }
  17717. /**
  17718. * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
  17719. *
  17720. * @private
  17721. * @param {Array} props The property identifiers.
  17722. * @param {Array} values The property values.
  17723. * @param {Function} assignFunc The function to assign values.
  17724. * @returns {Object} Returns the new object.
  17725. */
  17726. function baseZipObject(props, values, assignFunc) {
  17727. var index = -1,
  17728. length = props.length,
  17729. valsLength = values.length,
  17730. result = {};
  17731. while (++index < length) {
  17732. var value = index < valsLength ? values[index] : undefined;
  17733. assignFunc(result, props[index], value);
  17734. }
  17735. return result;
  17736. }
  17737. /**
  17738. * Casts `value` to an empty array if it's not an array like object.
  17739. *
  17740. * @private
  17741. * @param {*} value The value to inspect.
  17742. * @returns {Array|Object} Returns the cast array-like object.
  17743. */
  17744. function castArrayLikeObject(value) {
  17745. return isArrayLikeObject(value) ? value : [];
  17746. }
  17747. /**
  17748. * Casts `value` to `identity` if it's not a function.
  17749. *
  17750. * @private
  17751. * @param {*} value The value to inspect.
  17752. * @returns {Function} Returns cast function.
  17753. */
  17754. function castFunction(value) {
  17755. return typeof value == 'function' ? value : identity;
  17756. }
  17757. /**
  17758. * Casts `value` to a path array if it's not one.
  17759. *
  17760. * @private
  17761. * @param {*} value The value to inspect.
  17762. * @param {Object} [object] The object to query keys on.
  17763. * @returns {Array} Returns the cast property path array.
  17764. */
  17765. function castPath(value, object) {
  17766. if (isArray(value)) {
  17767. return value;
  17768. }
  17769. return isKey(value, object) ? [value] : stringToPath(toString(value));
  17770. }
  17771. /**
  17772. * A `baseRest` alias which can be replaced with `identity` by module
  17773. * replacement plugins.
  17774. *
  17775. * @private
  17776. * @type {Function}
  17777. * @param {Function} func The function to apply a rest parameter to.
  17778. * @returns {Function} Returns the new function.
  17779. */
  17780. var castRest = baseRest;
  17781. /**
  17782. * Casts `array` to a slice if it's needed.
  17783. *
  17784. * @private
  17785. * @param {Array} array The array to inspect.
  17786. * @param {number} start The start position.
  17787. * @param {number} [end=array.length] The end position.
  17788. * @returns {Array} Returns the cast slice.
  17789. */
  17790. function castSlice(array, start, end) {
  17791. var length = array.length;
  17792. end = end === undefined ? length : end;
  17793. return (!start && end >= length) ? array : baseSlice(array, start, end);
  17794. }
  17795. /**
  17796. * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
  17797. *
  17798. * @private
  17799. * @param {number|Object} id The timer id or timeout object of the timer to clear.
  17800. */
  17801. var clearTimeout = ctxClearTimeout || function(id) {
  17802. return root.clearTimeout(id);
  17803. };
  17804. /**
  17805. * Creates a clone of `buffer`.
  17806. *
  17807. * @private
  17808. * @param {Buffer} buffer The buffer to clone.
  17809. * @param {boolean} [isDeep] Specify a deep clone.
  17810. * @returns {Buffer} Returns the cloned buffer.
  17811. */
  17812. function cloneBuffer(buffer, isDeep) {
  17813. if (isDeep) {
  17814. return buffer.slice();
  17815. }
  17816. var length = buffer.length,
  17817. result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
  17818. buffer.copy(result);
  17819. return result;
  17820. }
  17821. /**
  17822. * Creates a clone of `arrayBuffer`.
  17823. *
  17824. * @private
  17825. * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
  17826. * @returns {ArrayBuffer} Returns the cloned array buffer.
  17827. */
  17828. function cloneArrayBuffer(arrayBuffer) {
  17829. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  17830. new Uint8Array(result).set(new Uint8Array(arrayBuffer));
  17831. return result;
  17832. }
  17833. /**
  17834. * Creates a clone of `dataView`.
  17835. *
  17836. * @private
  17837. * @param {Object} dataView The data view to clone.
  17838. * @param {boolean} [isDeep] Specify a deep clone.
  17839. * @returns {Object} Returns the cloned data view.
  17840. */
  17841. function cloneDataView(dataView, isDeep) {
  17842. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  17843. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  17844. }
  17845. /**
  17846. * Creates a clone of `regexp`.
  17847. *
  17848. * @private
  17849. * @param {Object} regexp The regexp to clone.
  17850. * @returns {Object} Returns the cloned regexp.
  17851. */
  17852. function cloneRegExp(regexp) {
  17853. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  17854. result.lastIndex = regexp.lastIndex;
  17855. return result;
  17856. }
  17857. /**
  17858. * Creates a clone of the `symbol` object.
  17859. *
  17860. * @private
  17861. * @param {Object} symbol The symbol object to clone.
  17862. * @returns {Object} Returns the cloned symbol object.
  17863. */
  17864. function cloneSymbol(symbol) {
  17865. return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
  17866. }
  17867. /**
  17868. * Creates a clone of `typedArray`.
  17869. *
  17870. * @private
  17871. * @param {Object} typedArray The typed array to clone.
  17872. * @param {boolean} [isDeep] Specify a deep clone.
  17873. * @returns {Object} Returns the cloned typed array.
  17874. */
  17875. function cloneTypedArray(typedArray, isDeep) {
  17876. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  17877. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  17878. }
  17879. /**
  17880. * Compares values to sort them in ascending order.
  17881. *
  17882. * @private
  17883. * @param {*} value The value to compare.
  17884. * @param {*} other The other value to compare.
  17885. * @returns {number} Returns the sort order indicator for `value`.
  17886. */
  17887. function compareAscending(value, other) {
  17888. if (value !== other) {
  17889. var valIsDefined = value !== undefined,
  17890. valIsNull = value === null,
  17891. valIsReflexive = value === value,
  17892. valIsSymbol = isSymbol(value);
  17893. var othIsDefined = other !== undefined,
  17894. othIsNull = other === null,
  17895. othIsReflexive = other === other,
  17896. othIsSymbol = isSymbol(other);
  17897. if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
  17898. (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
  17899. (valIsNull && othIsDefined && othIsReflexive) ||
  17900. (!valIsDefined && othIsReflexive) ||
  17901. !valIsReflexive) {
  17902. return 1;
  17903. }
  17904. if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
  17905. (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
  17906. (othIsNull && valIsDefined && valIsReflexive) ||
  17907. (!othIsDefined && valIsReflexive) ||
  17908. !othIsReflexive) {
  17909. return -1;
  17910. }
  17911. }
  17912. return 0;
  17913. }
  17914. /**
  17915. * Used by `_.orderBy` to compare multiple properties of a value to another
  17916. * and stable sort them.
  17917. *
  17918. * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
  17919. * specify an order of "desc" for descending or "asc" for ascending sort order
  17920. * of corresponding values.
  17921. *
  17922. * @private
  17923. * @param {Object} object The object to compare.
  17924. * @param {Object} other The other object to compare.
  17925. * @param {boolean[]|string[]} orders The order to sort by for each property.
  17926. * @returns {number} Returns the sort order indicator for `object`.
  17927. */
  17928. function compareMultiple(object, other, orders) {
  17929. var index = -1,
  17930. objCriteria = object.criteria,
  17931. othCriteria = other.criteria,
  17932. length = objCriteria.length,
  17933. ordersLength = orders.length;
  17934. while (++index < length) {
  17935. var result = compareAscending(objCriteria[index], othCriteria[index]);
  17936. if (result) {
  17937. if (index >= ordersLength) {
  17938. return result;
  17939. }
  17940. var order = orders[index];
  17941. return result * (order == 'desc' ? -1 : 1);
  17942. }
  17943. }
  17944. // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
  17945. // that causes it, under certain circumstances, to provide the same value for
  17946. // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
  17947. // for more details.
  17948. //
  17949. // This also ensures a stable sort in V8 and other engines.
  17950. // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
  17951. return object.index - other.index;
  17952. }
  17953. /**
  17954. * Creates an array that is the composition of partially applied arguments,
  17955. * placeholders, and provided arguments into a single array of arguments.
  17956. *
  17957. * @private
  17958. * @param {Array} args The provided arguments.
  17959. * @param {Array} partials The arguments to prepend to those provided.
  17960. * @param {Array} holders The `partials` placeholder indexes.
  17961. * @params {boolean} [isCurried] Specify composing for a curried function.
  17962. * @returns {Array} Returns the new array of composed arguments.
  17963. */
  17964. function composeArgs(args, partials, holders, isCurried) {
  17965. var argsIndex = -1,
  17966. argsLength = args.length,
  17967. holdersLength = holders.length,
  17968. leftIndex = -1,
  17969. leftLength = partials.length,
  17970. rangeLength = nativeMax(argsLength - holdersLength, 0),
  17971. result = Array(leftLength + rangeLength),
  17972. isUncurried = !isCurried;
  17973. while (++leftIndex < leftLength) {
  17974. result[leftIndex] = partials[leftIndex];
  17975. }
  17976. while (++argsIndex < holdersLength) {
  17977. if (isUncurried || argsIndex < argsLength) {
  17978. result[holders[argsIndex]] = args[argsIndex];
  17979. }
  17980. }
  17981. while (rangeLength--) {
  17982. result[leftIndex++] = args[argsIndex++];
  17983. }
  17984. return result;
  17985. }
  17986. /**
  17987. * This function is like `composeArgs` except that the arguments composition
  17988. * is tailored for `_.partialRight`.
  17989. *
  17990. * @private
  17991. * @param {Array} args The provided arguments.
  17992. * @param {Array} partials The arguments to append to those provided.
  17993. * @param {Array} holders The `partials` placeholder indexes.
  17994. * @params {boolean} [isCurried] Specify composing for a curried function.
  17995. * @returns {Array} Returns the new array of composed arguments.
  17996. */
  17997. function composeArgsRight(args, partials, holders, isCurried) {
  17998. var argsIndex = -1,
  17999. argsLength = args.length,
  18000. holdersIndex = -1,
  18001. holdersLength = holders.length,
  18002. rightIndex = -1,
  18003. rightLength = partials.length,
  18004. rangeLength = nativeMax(argsLength - holdersLength, 0),
  18005. result = Array(rangeLength + rightLength),
  18006. isUncurried = !isCurried;
  18007. while (++argsIndex < rangeLength) {
  18008. result[argsIndex] = args[argsIndex];
  18009. }
  18010. var offset = argsIndex;
  18011. while (++rightIndex < rightLength) {
  18012. result[offset + rightIndex] = partials[rightIndex];
  18013. }
  18014. while (++holdersIndex < holdersLength) {
  18015. if (isUncurried || argsIndex < argsLength) {
  18016. result[offset + holders[holdersIndex]] = args[argsIndex++];
  18017. }
  18018. }
  18019. return result;
  18020. }
  18021. /**
  18022. * Copies the values of `source` to `array`.
  18023. *
  18024. * @private
  18025. * @param {Array} source The array to copy values from.
  18026. * @param {Array} [array=[]] The array to copy values to.
  18027. * @returns {Array} Returns `array`.
  18028. */
  18029. function copyArray(source, array) {
  18030. var index = -1,
  18031. length = source.length;
  18032. array || (array = Array(length));
  18033. while (++index < length) {
  18034. array[index] = source[index];
  18035. }
  18036. return array;
  18037. }
  18038. /**
  18039. * Copies properties of `source` to `object`.
  18040. *
  18041. * @private
  18042. * @param {Object} source The object to copy properties from.
  18043. * @param {Array} props The property identifiers to copy.
  18044. * @param {Object} [object={}] The object to copy properties to.
  18045. * @param {Function} [customizer] The function to customize copied values.
  18046. * @returns {Object} Returns `object`.
  18047. */
  18048. function copyObject(source, props, object, customizer) {
  18049. var isNew = !object;
  18050. object || (object = {});
  18051. var index = -1,
  18052. length = props.length;
  18053. while (++index < length) {
  18054. var key = props[index];
  18055. var newValue = customizer
  18056. ? customizer(object[key], source[key], key, object, source)
  18057. : undefined;
  18058. if (newValue === undefined) {
  18059. newValue = source[key];
  18060. }
  18061. if (isNew) {
  18062. baseAssignValue(object, key, newValue);
  18063. } else {
  18064. assignValue(object, key, newValue);
  18065. }
  18066. }
  18067. return object;
  18068. }
  18069. /**
  18070. * Copies own symbols of `source` to `object`.
  18071. *
  18072. * @private
  18073. * @param {Object} source The object to copy symbols from.
  18074. * @param {Object} [object={}] The object to copy symbols to.
  18075. * @returns {Object} Returns `object`.
  18076. */
  18077. function copySymbols(source, object) {
  18078. return copyObject(source, getSymbols(source), object);
  18079. }
  18080. /**
  18081. * Copies own and inherited symbols of `source` to `object`.
  18082. *
  18083. * @private
  18084. * @param {Object} source The object to copy symbols from.
  18085. * @param {Object} [object={}] The object to copy symbols to.
  18086. * @returns {Object} Returns `object`.
  18087. */
  18088. function copySymbolsIn(source, object) {
  18089. return copyObject(source, getSymbolsIn(source), object);
  18090. }
  18091. /**
  18092. * Creates a function like `_.groupBy`.
  18093. *
  18094. * @private
  18095. * @param {Function} setter The function to set accumulator values.
  18096. * @param {Function} [initializer] The accumulator object initializer.
  18097. * @returns {Function} Returns the new aggregator function.
  18098. */
  18099. function createAggregator(setter, initializer) {
  18100. return function(collection, iteratee) {
  18101. var func = isArray(collection) ? arrayAggregator : baseAggregator,
  18102. accumulator = initializer ? initializer() : {};
  18103. return func(collection, setter, getIteratee(iteratee, 2), accumulator);
  18104. };
  18105. }
  18106. /**
  18107. * Creates a function like `_.assign`.
  18108. *
  18109. * @private
  18110. * @param {Function} assigner The function to assign values.
  18111. * @returns {Function} Returns the new assigner function.
  18112. */
  18113. function createAssigner(assigner) {
  18114. return baseRest(function(object, sources) {
  18115. var index = -1,
  18116. length = sources.length,
  18117. customizer = length > 1 ? sources[length - 1] : undefined,
  18118. guard = length > 2 ? sources[2] : undefined;
  18119. customizer = (assigner.length > 3 && typeof customizer == 'function')
  18120. ? (length--, customizer)
  18121. : undefined;
  18122. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  18123. customizer = length < 3 ? undefined : customizer;
  18124. length = 1;
  18125. }
  18126. object = Object(object);
  18127. while (++index < length) {
  18128. var source = sources[index];
  18129. if (source) {
  18130. assigner(object, source, index, customizer);
  18131. }
  18132. }
  18133. return object;
  18134. });
  18135. }
  18136. /**
  18137. * Creates a `baseEach` or `baseEachRight` function.
  18138. *
  18139. * @private
  18140. * @param {Function} eachFunc The function to iterate over a collection.
  18141. * @param {boolean} [fromRight] Specify iterating from right to left.
  18142. * @returns {Function} Returns the new base function.
  18143. */
  18144. function createBaseEach(eachFunc, fromRight) {
  18145. return function(collection, iteratee) {
  18146. if (collection == null) {
  18147. return collection;
  18148. }
  18149. if (!isArrayLike(collection)) {
  18150. return eachFunc(collection, iteratee);
  18151. }
  18152. var length = collection.length,
  18153. index = fromRight ? length : -1,
  18154. iterable = Object(collection);
  18155. while ((fromRight ? index-- : ++index < length)) {
  18156. if (iteratee(iterable[index], index, iterable) === false) {
  18157. break;
  18158. }
  18159. }
  18160. return collection;
  18161. };
  18162. }
  18163. /**
  18164. * Creates a base function for methods like `_.forIn` and `_.forOwn`.
  18165. *
  18166. * @private
  18167. * @param {boolean} [fromRight] Specify iterating from right to left.
  18168. * @returns {Function} Returns the new base function.
  18169. */
  18170. function createBaseFor(fromRight) {
  18171. return function(object, iteratee, keysFunc) {
  18172. var index = -1,
  18173. iterable = Object(object),
  18174. props = keysFunc(object),
  18175. length = props.length;
  18176. while (length--) {
  18177. var key = props[fromRight ? length : ++index];
  18178. if (iteratee(iterable[key], key, iterable) === false) {
  18179. break;
  18180. }
  18181. }
  18182. return object;
  18183. };
  18184. }
  18185. /**
  18186. * Creates a function that wraps `func` to invoke it with the optional `this`
  18187. * binding of `thisArg`.
  18188. *
  18189. * @private
  18190. * @param {Function} func The function to wrap.
  18191. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  18192. * @param {*} [thisArg] The `this` binding of `func`.
  18193. * @returns {Function} Returns the new wrapped function.
  18194. */
  18195. function createBind(func, bitmask, thisArg) {
  18196. var isBind = bitmask & WRAP_BIND_FLAG,
  18197. Ctor = createCtor(func);
  18198. function wrapper() {
  18199. var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  18200. return fn.apply(isBind ? thisArg : this, arguments);
  18201. }
  18202. return wrapper;
  18203. }
  18204. /**
  18205. * Creates a function like `_.lowerFirst`.
  18206. *
  18207. * @private
  18208. * @param {string} methodName The name of the `String` case method to use.
  18209. * @returns {Function} Returns the new case function.
  18210. */
  18211. function createCaseFirst(methodName) {
  18212. return function(string) {
  18213. string = toString(string);
  18214. var strSymbols = hasUnicode(string)
  18215. ? stringToArray(string)
  18216. : undefined;
  18217. var chr = strSymbols
  18218. ? strSymbols[0]
  18219. : string.charAt(0);
  18220. var trailing = strSymbols
  18221. ? castSlice(strSymbols, 1).join('')
  18222. : string.slice(1);
  18223. return chr[methodName]() + trailing;
  18224. };
  18225. }
  18226. /**
  18227. * Creates a function like `_.camelCase`.
  18228. *
  18229. * @private
  18230. * @param {Function} callback The function to combine each word.
  18231. * @returns {Function} Returns the new compounder function.
  18232. */
  18233. function createCompounder(callback) {
  18234. return function(string) {
  18235. return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
  18236. };
  18237. }
  18238. /**
  18239. * Creates a function that produces an instance of `Ctor` regardless of
  18240. * whether it was invoked as part of a `new` expression or by `call` or `apply`.
  18241. *
  18242. * @private
  18243. * @param {Function} Ctor The constructor to wrap.
  18244. * @returns {Function} Returns the new wrapped function.
  18245. */
  18246. function createCtor(Ctor) {
  18247. return function() {
  18248. // Use a `switch` statement to work with class constructors. See
  18249. // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
  18250. // for more details.
  18251. var args = arguments;
  18252. switch (args.length) {
  18253. case 0: return new Ctor;
  18254. case 1: return new Ctor(args[0]);
  18255. case 2: return new Ctor(args[0], args[1]);
  18256. case 3: return new Ctor(args[0], args[1], args[2]);
  18257. case 4: return new Ctor(args[0], args[1], args[2], args[3]);
  18258. case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
  18259. case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
  18260. case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
  18261. }
  18262. var thisBinding = baseCreate(Ctor.prototype),
  18263. result = Ctor.apply(thisBinding, args);
  18264. // Mimic the constructor's `return` behavior.
  18265. // See https://es5.github.io/#x13.2.2 for more details.
  18266. return isObject(result) ? result : thisBinding;
  18267. };
  18268. }
  18269. /**
  18270. * Creates a function that wraps `func` to enable currying.
  18271. *
  18272. * @private
  18273. * @param {Function} func The function to wrap.
  18274. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  18275. * @param {number} arity The arity of `func`.
  18276. * @returns {Function} Returns the new wrapped function.
  18277. */
  18278. function createCurry(func, bitmask, arity) {
  18279. var Ctor = createCtor(func);
  18280. function wrapper() {
  18281. var length = arguments.length,
  18282. args = Array(length),
  18283. index = length,
  18284. placeholder = getHolder(wrapper);
  18285. while (index--) {
  18286. args[index] = arguments[index];
  18287. }
  18288. var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
  18289. ? []
  18290. : replaceHolders(args, placeholder);
  18291. length -= holders.length;
  18292. if (length < arity) {
  18293. return createRecurry(
  18294. func, bitmask, createHybrid, wrapper.placeholder, undefined,
  18295. args, holders, undefined, undefined, arity - length);
  18296. }
  18297. var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  18298. return apply(fn, this, args);
  18299. }
  18300. return wrapper;
  18301. }
  18302. /**
  18303. * Creates a `_.find` or `_.findLast` function.
  18304. *
  18305. * @private
  18306. * @param {Function} findIndexFunc The function to find the collection index.
  18307. * @returns {Function} Returns the new find function.
  18308. */
  18309. function createFind(findIndexFunc) {
  18310. return function(collection, predicate, fromIndex) {
  18311. var iterable = Object(collection);
  18312. if (!isArrayLike(collection)) {
  18313. var iteratee = getIteratee(predicate, 3);
  18314. collection = keys(collection);
  18315. predicate = function(key) { return iteratee(iterable[key], key, iterable); };
  18316. }
  18317. var index = findIndexFunc(collection, predicate, fromIndex);
  18318. return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
  18319. };
  18320. }
  18321. /**
  18322. * Creates a `_.flow` or `_.flowRight` function.
  18323. *
  18324. * @private
  18325. * @param {boolean} [fromRight] Specify iterating from right to left.
  18326. * @returns {Function} Returns the new flow function.
  18327. */
  18328. function createFlow(fromRight) {
  18329. return flatRest(function(funcs) {
  18330. var length = funcs.length,
  18331. index = length,
  18332. prereq = LodashWrapper.prototype.thru;
  18333. if (fromRight) {
  18334. funcs.reverse();
  18335. }
  18336. while (index--) {
  18337. var func = funcs[index];
  18338. if (typeof func != 'function') {
  18339. throw new TypeError(FUNC_ERROR_TEXT);
  18340. }
  18341. if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
  18342. var wrapper = new LodashWrapper([], true);
  18343. }
  18344. }
  18345. index = wrapper ? index : length;
  18346. while (++index < length) {
  18347. func = funcs[index];
  18348. var funcName = getFuncName(func),
  18349. data = funcName == 'wrapper' ? getData(func) : undefined;
  18350. if (data && isLaziable(data[0]) &&
  18351. data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
  18352. !data[4].length && data[9] == 1
  18353. ) {
  18354. wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
  18355. } else {
  18356. wrapper = (func.length == 1 && isLaziable(func))
  18357. ? wrapper[funcName]()
  18358. : wrapper.thru(func);
  18359. }
  18360. }
  18361. return function() {
  18362. var args = arguments,
  18363. value = args[0];
  18364. if (wrapper && args.length == 1 && isArray(value)) {
  18365. return wrapper.plant(value).value();
  18366. }
  18367. var index = 0,
  18368. result = length ? funcs[index].apply(this, args) : value;
  18369. while (++index < length) {
  18370. result = funcs[index].call(this, result);
  18371. }
  18372. return result;
  18373. };
  18374. });
  18375. }
  18376. /**
  18377. * Creates a function that wraps `func` to invoke it with optional `this`
  18378. * binding of `thisArg`, partial application, and currying.
  18379. *
  18380. * @private
  18381. * @param {Function|string} func The function or method name to wrap.
  18382. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  18383. * @param {*} [thisArg] The `this` binding of `func`.
  18384. * @param {Array} [partials] The arguments to prepend to those provided to
  18385. * the new function.
  18386. * @param {Array} [holders] The `partials` placeholder indexes.
  18387. * @param {Array} [partialsRight] The arguments to append to those provided
  18388. * to the new function.
  18389. * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
  18390. * @param {Array} [argPos] The argument positions of the new function.
  18391. * @param {number} [ary] The arity cap of `func`.
  18392. * @param {number} [arity] The arity of `func`.
  18393. * @returns {Function} Returns the new wrapped function.
  18394. */
  18395. function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
  18396. var isAry = bitmask & WRAP_ARY_FLAG,
  18397. isBind = bitmask & WRAP_BIND_FLAG,
  18398. isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
  18399. isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
  18400. isFlip = bitmask & WRAP_FLIP_FLAG,
  18401. Ctor = isBindKey ? undefined : createCtor(func);
  18402. function wrapper() {
  18403. var length = arguments.length,
  18404. args = Array(length),
  18405. index = length;
  18406. while (index--) {
  18407. args[index] = arguments[index];
  18408. }
  18409. if (isCurried) {
  18410. var placeholder = getHolder(wrapper),
  18411. holdersCount = countHolders(args, placeholder);
  18412. }
  18413. if (partials) {
  18414. args = composeArgs(args, partials, holders, isCurried);
  18415. }
  18416. if (partialsRight) {
  18417. args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
  18418. }
  18419. length -= holdersCount;
  18420. if (isCurried && length < arity) {
  18421. var newHolders = replaceHolders(args, placeholder);
  18422. return createRecurry(
  18423. func, bitmask, createHybrid, wrapper.placeholder, thisArg,
  18424. args, newHolders, argPos, ary, arity - length
  18425. );
  18426. }
  18427. var thisBinding = isBind ? thisArg : this,
  18428. fn = isBindKey ? thisBinding[func] : func;
  18429. length = args.length;
  18430. if (argPos) {
  18431. args = reorder(args, argPos);
  18432. } else if (isFlip && length > 1) {
  18433. args.reverse();
  18434. }
  18435. if (isAry && ary < length) {
  18436. args.length = ary;
  18437. }
  18438. if (this && this !== root && this instanceof wrapper) {
  18439. fn = Ctor || createCtor(fn);
  18440. }
  18441. return fn.apply(thisBinding, args);
  18442. }
  18443. return wrapper;
  18444. }
  18445. /**
  18446. * Creates a function like `_.invertBy`.
  18447. *
  18448. * @private
  18449. * @param {Function} setter The function to set accumulator values.
  18450. * @param {Function} toIteratee The function to resolve iteratees.
  18451. * @returns {Function} Returns the new inverter function.
  18452. */
  18453. function createInverter(setter, toIteratee) {
  18454. return function(object, iteratee) {
  18455. return baseInverter(object, setter, toIteratee(iteratee), {});
  18456. };
  18457. }
  18458. /**
  18459. * Creates a function that performs a mathematical operation on two values.
  18460. *
  18461. * @private
  18462. * @param {Function} operator The function to perform the operation.
  18463. * @param {number} [defaultValue] The value used for `undefined` arguments.
  18464. * @returns {Function} Returns the new mathematical operation function.
  18465. */
  18466. function createMathOperation(operator, defaultValue) {
  18467. return function(value, other) {
  18468. var result;
  18469. if (value === undefined && other === undefined) {
  18470. return defaultValue;
  18471. }
  18472. if (value !== undefined) {
  18473. result = value;
  18474. }
  18475. if (other !== undefined) {
  18476. if (result === undefined) {
  18477. return other;
  18478. }
  18479. if (typeof value == 'string' || typeof other == 'string') {
  18480. value = baseToString(value);
  18481. other = baseToString(other);
  18482. } else {
  18483. value = baseToNumber(value);
  18484. other = baseToNumber(other);
  18485. }
  18486. result = operator(value, other);
  18487. }
  18488. return result;
  18489. };
  18490. }
  18491. /**
  18492. * Creates a function like `_.over`.
  18493. *
  18494. * @private
  18495. * @param {Function} arrayFunc The function to iterate over iteratees.
  18496. * @returns {Function} Returns the new over function.
  18497. */
  18498. function createOver(arrayFunc) {
  18499. return flatRest(function(iteratees) {
  18500. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  18501. return baseRest(function(args) {
  18502. var thisArg = this;
  18503. return arrayFunc(iteratees, function(iteratee) {
  18504. return apply(iteratee, thisArg, args);
  18505. });
  18506. });
  18507. });
  18508. }
  18509. /**
  18510. * Creates the padding for `string` based on `length`. The `chars` string
  18511. * is truncated if the number of characters exceeds `length`.
  18512. *
  18513. * @private
  18514. * @param {number} length The padding length.
  18515. * @param {string} [chars=' '] The string used as padding.
  18516. * @returns {string} Returns the padding for `string`.
  18517. */
  18518. function createPadding(length, chars) {
  18519. chars = chars === undefined ? ' ' : baseToString(chars);
  18520. var charsLength = chars.length;
  18521. if (charsLength < 2) {
  18522. return charsLength ? baseRepeat(chars, length) : chars;
  18523. }
  18524. var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
  18525. return hasUnicode(chars)
  18526. ? castSlice(stringToArray(result), 0, length).join('')
  18527. : result.slice(0, length);
  18528. }
  18529. /**
  18530. * Creates a function that wraps `func` to invoke it with the `this` binding
  18531. * of `thisArg` and `partials` prepended to the arguments it receives.
  18532. *
  18533. * @private
  18534. * @param {Function} func The function to wrap.
  18535. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  18536. * @param {*} thisArg The `this` binding of `func`.
  18537. * @param {Array} partials The arguments to prepend to those provided to
  18538. * the new function.
  18539. * @returns {Function} Returns the new wrapped function.
  18540. */
  18541. function createPartial(func, bitmask, thisArg, partials) {
  18542. var isBind = bitmask & WRAP_BIND_FLAG,
  18543. Ctor = createCtor(func);
  18544. function wrapper() {
  18545. var argsIndex = -1,
  18546. argsLength = arguments.length,
  18547. leftIndex = -1,
  18548. leftLength = partials.length,
  18549. args = Array(leftLength + argsLength),
  18550. fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
  18551. while (++leftIndex < leftLength) {
  18552. args[leftIndex] = partials[leftIndex];
  18553. }
  18554. while (argsLength--) {
  18555. args[leftIndex++] = arguments[++argsIndex];
  18556. }
  18557. return apply(fn, isBind ? thisArg : this, args);
  18558. }
  18559. return wrapper;
  18560. }
  18561. /**
  18562. * Creates a `_.range` or `_.rangeRight` function.
  18563. *
  18564. * @private
  18565. * @param {boolean} [fromRight] Specify iterating from right to left.
  18566. * @returns {Function} Returns the new range function.
  18567. */
  18568. function createRange(fromRight) {
  18569. return function(start, end, step) {
  18570. if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
  18571. end = step = undefined;
  18572. }
  18573. // Ensure the sign of `-0` is preserved.
  18574. start = toFinite(start);
  18575. if (end === undefined) {
  18576. end = start;
  18577. start = 0;
  18578. } else {
  18579. end = toFinite(end);
  18580. }
  18581. step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
  18582. return baseRange(start, end, step, fromRight);
  18583. };
  18584. }
  18585. /**
  18586. * Creates a function that performs a relational operation on two values.
  18587. *
  18588. * @private
  18589. * @param {Function} operator The function to perform the operation.
  18590. * @returns {Function} Returns the new relational operation function.
  18591. */
  18592. function createRelationalOperation(operator) {
  18593. return function(value, other) {
  18594. if (!(typeof value == 'string' && typeof other == 'string')) {
  18595. value = toNumber(value);
  18596. other = toNumber(other);
  18597. }
  18598. return operator(value, other);
  18599. };
  18600. }
  18601. /**
  18602. * Creates a function that wraps `func` to continue currying.
  18603. *
  18604. * @private
  18605. * @param {Function} func The function to wrap.
  18606. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  18607. * @param {Function} wrapFunc The function to create the `func` wrapper.
  18608. * @param {*} placeholder The placeholder value.
  18609. * @param {*} [thisArg] The `this` binding of `func`.
  18610. * @param {Array} [partials] The arguments to prepend to those provided to
  18611. * the new function.
  18612. * @param {Array} [holders] The `partials` placeholder indexes.
  18613. * @param {Array} [argPos] The argument positions of the new function.
  18614. * @param {number} [ary] The arity cap of `func`.
  18615. * @param {number} [arity] The arity of `func`.
  18616. * @returns {Function} Returns the new wrapped function.
  18617. */
  18618. function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
  18619. var isCurry = bitmask & WRAP_CURRY_FLAG,
  18620. newHolders = isCurry ? holders : undefined,
  18621. newHoldersRight = isCurry ? undefined : holders,
  18622. newPartials = isCurry ? partials : undefined,
  18623. newPartialsRight = isCurry ? undefined : partials;
  18624. bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
  18625. bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
  18626. if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
  18627. bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
  18628. }
  18629. var newData = [
  18630. func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
  18631. newHoldersRight, argPos, ary, arity
  18632. ];
  18633. var result = wrapFunc.apply(undefined, newData);
  18634. if (isLaziable(func)) {
  18635. setData(result, newData);
  18636. }
  18637. result.placeholder = placeholder;
  18638. return setWrapToString(result, func, bitmask);
  18639. }
  18640. /**
  18641. * Creates a function like `_.round`.
  18642. *
  18643. * @private
  18644. * @param {string} methodName The name of the `Math` method to use when rounding.
  18645. * @returns {Function} Returns the new round function.
  18646. */
  18647. function createRound(methodName) {
  18648. var func = Math[methodName];
  18649. return function(number, precision) {
  18650. number = toNumber(number);
  18651. precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
  18652. if (precision) {
  18653. // Shift with exponential notation to avoid floating-point issues.
  18654. // See [MDN](https://mdn.io/round#Examples) for more details.
  18655. var pair = (toString(number) + 'e').split('e'),
  18656. value = func(pair[0] + 'e' + (+pair[1] + precision));
  18657. pair = (toString(value) + 'e').split('e');
  18658. return +(pair[0] + 'e' + (+pair[1] - precision));
  18659. }
  18660. return func(number);
  18661. };
  18662. }
  18663. /**
  18664. * Creates a set object of `values`.
  18665. *
  18666. * @private
  18667. * @param {Array} values The values to add to the set.
  18668. * @returns {Object} Returns the new set.
  18669. */
  18670. var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
  18671. return new Set(values);
  18672. };
  18673. /**
  18674. * Creates a `_.toPairs` or `_.toPairsIn` function.
  18675. *
  18676. * @private
  18677. * @param {Function} keysFunc The function to get the keys of a given object.
  18678. * @returns {Function} Returns the new pairs function.
  18679. */
  18680. function createToPairs(keysFunc) {
  18681. return function(object) {
  18682. var tag = getTag(object);
  18683. if (tag == mapTag) {
  18684. return mapToArray(object);
  18685. }
  18686. if (tag == setTag) {
  18687. return setToPairs(object);
  18688. }
  18689. return baseToPairs(object, keysFunc(object));
  18690. };
  18691. }
  18692. /**
  18693. * Creates a function that either curries or invokes `func` with optional
  18694. * `this` binding and partially applied arguments.
  18695. *
  18696. * @private
  18697. * @param {Function|string} func The function or method name to wrap.
  18698. * @param {number} bitmask The bitmask flags.
  18699. * 1 - `_.bind`
  18700. * 2 - `_.bindKey`
  18701. * 4 - `_.curry` or `_.curryRight` of a bound function
  18702. * 8 - `_.curry`
  18703. * 16 - `_.curryRight`
  18704. * 32 - `_.partial`
  18705. * 64 - `_.partialRight`
  18706. * 128 - `_.rearg`
  18707. * 256 - `_.ary`
  18708. * 512 - `_.flip`
  18709. * @param {*} [thisArg] The `this` binding of `func`.
  18710. * @param {Array} [partials] The arguments to be partially applied.
  18711. * @param {Array} [holders] The `partials` placeholder indexes.
  18712. * @param {Array} [argPos] The argument positions of the new function.
  18713. * @param {number} [ary] The arity cap of `func`.
  18714. * @param {number} [arity] The arity of `func`.
  18715. * @returns {Function} Returns the new wrapped function.
  18716. */
  18717. function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
  18718. var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
  18719. if (!isBindKey && typeof func != 'function') {
  18720. throw new TypeError(FUNC_ERROR_TEXT);
  18721. }
  18722. var length = partials ? partials.length : 0;
  18723. if (!length) {
  18724. bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
  18725. partials = holders = undefined;
  18726. }
  18727. ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
  18728. arity = arity === undefined ? arity : toInteger(arity);
  18729. length -= holders ? holders.length : 0;
  18730. if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
  18731. var partialsRight = partials,
  18732. holdersRight = holders;
  18733. partials = holders = undefined;
  18734. }
  18735. var data = isBindKey ? undefined : getData(func);
  18736. var newData = [
  18737. func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
  18738. argPos, ary, arity
  18739. ];
  18740. if (data) {
  18741. mergeData(newData, data);
  18742. }
  18743. func = newData[0];
  18744. bitmask = newData[1];
  18745. thisArg = newData[2];
  18746. partials = newData[3];
  18747. holders = newData[4];
  18748. arity = newData[9] = newData[9] === undefined
  18749. ? (isBindKey ? 0 : func.length)
  18750. : nativeMax(newData[9] - length, 0);
  18751. if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
  18752. bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
  18753. }
  18754. if (!bitmask || bitmask == WRAP_BIND_FLAG) {
  18755. var result = createBind(func, bitmask, thisArg);
  18756. } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
  18757. result = createCurry(func, bitmask, arity);
  18758. } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
  18759. result = createPartial(func, bitmask, thisArg, partials);
  18760. } else {
  18761. result = createHybrid.apply(undefined, newData);
  18762. }
  18763. var setter = data ? baseSetData : setData;
  18764. return setWrapToString(setter(result, newData), func, bitmask);
  18765. }
  18766. /**
  18767. * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
  18768. * of source objects to the destination object for all destination properties
  18769. * that resolve to `undefined`.
  18770. *
  18771. * @private
  18772. * @param {*} objValue The destination value.
  18773. * @param {*} srcValue The source value.
  18774. * @param {string} key The key of the property to assign.
  18775. * @param {Object} object The parent object of `objValue`.
  18776. * @returns {*} Returns the value to assign.
  18777. */
  18778. function customDefaultsAssignIn(objValue, srcValue, key, object) {
  18779. if (objValue === undefined ||
  18780. (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
  18781. return srcValue;
  18782. }
  18783. return objValue;
  18784. }
  18785. /**
  18786. * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
  18787. * objects into destination objects that are passed thru.
  18788. *
  18789. * @private
  18790. * @param {*} objValue The destination value.
  18791. * @param {*} srcValue The source value.
  18792. * @param {string} key The key of the property to merge.
  18793. * @param {Object} object The parent object of `objValue`.
  18794. * @param {Object} source The parent object of `srcValue`.
  18795. * @param {Object} [stack] Tracks traversed source values and their merged
  18796. * counterparts.
  18797. * @returns {*} Returns the value to assign.
  18798. */
  18799. function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
  18800. if (isObject(objValue) && isObject(srcValue)) {
  18801. // Recursively merge objects and arrays (susceptible to call stack limits).
  18802. stack.set(srcValue, objValue);
  18803. baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
  18804. stack['delete'](srcValue);
  18805. }
  18806. return objValue;
  18807. }
  18808. /**
  18809. * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
  18810. * objects.
  18811. *
  18812. * @private
  18813. * @param {*} value The value to inspect.
  18814. * @param {string} key The key of the property to inspect.
  18815. * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
  18816. */
  18817. function customOmitClone(value) {
  18818. return isPlainObject(value) ? undefined : value;
  18819. }
  18820. /**
  18821. * A specialized version of `baseIsEqualDeep` for arrays with support for
  18822. * partial deep comparisons.
  18823. *
  18824. * @private
  18825. * @param {Array} array The array to compare.
  18826. * @param {Array} other The other array to compare.
  18827. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  18828. * @param {Function} customizer The function to customize comparisons.
  18829. * @param {Function} equalFunc The function to determine equivalents of values.
  18830. * @param {Object} stack Tracks traversed `array` and `other` objects.
  18831. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  18832. */
  18833. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  18834. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  18835. arrLength = array.length,
  18836. othLength = other.length;
  18837. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  18838. return false;
  18839. }
  18840. // Assume cyclic values are equal.
  18841. var stacked = stack.get(array);
  18842. if (stacked && stack.get(other)) {
  18843. return stacked == other;
  18844. }
  18845. var index = -1,
  18846. result = true,
  18847. seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
  18848. stack.set(array, other);
  18849. stack.set(other, array);
  18850. // Ignore non-index properties.
  18851. while (++index < arrLength) {
  18852. var arrValue = array[index],
  18853. othValue = other[index];
  18854. if (customizer) {
  18855. var compared = isPartial
  18856. ? customizer(othValue, arrValue, index, other, array, stack)
  18857. : customizer(arrValue, othValue, index, array, other, stack);
  18858. }
  18859. if (compared !== undefined) {
  18860. if (compared) {
  18861. continue;
  18862. }
  18863. result = false;
  18864. break;
  18865. }
  18866. // Recursively compare arrays (susceptible to call stack limits).
  18867. if (seen) {
  18868. if (!arraySome(other, function(othValue, othIndex) {
  18869. if (!cacheHas(seen, othIndex) &&
  18870. (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  18871. return seen.push(othIndex);
  18872. }
  18873. })) {
  18874. result = false;
  18875. break;
  18876. }
  18877. } else if (!(
  18878. arrValue === othValue ||
  18879. equalFunc(arrValue, othValue, bitmask, customizer, stack)
  18880. )) {
  18881. result = false;
  18882. break;
  18883. }
  18884. }
  18885. stack['delete'](array);
  18886. stack['delete'](other);
  18887. return result;
  18888. }
  18889. /**
  18890. * A specialized version of `baseIsEqualDeep` for comparing objects of
  18891. * the same `toStringTag`.
  18892. *
  18893. * **Note:** This function only supports comparing values with tags of
  18894. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  18895. *
  18896. * @private
  18897. * @param {Object} object The object to compare.
  18898. * @param {Object} other The other object to compare.
  18899. * @param {string} tag The `toStringTag` of the objects to compare.
  18900. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  18901. * @param {Function} customizer The function to customize comparisons.
  18902. * @param {Function} equalFunc The function to determine equivalents of values.
  18903. * @param {Object} stack Tracks traversed `object` and `other` objects.
  18904. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  18905. */
  18906. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  18907. switch (tag) {
  18908. case dataViewTag:
  18909. if ((object.byteLength != other.byteLength) ||
  18910. (object.byteOffset != other.byteOffset)) {
  18911. return false;
  18912. }
  18913. object = object.buffer;
  18914. other = other.buffer;
  18915. case arrayBufferTag:
  18916. if ((object.byteLength != other.byteLength) ||
  18917. !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
  18918. return false;
  18919. }
  18920. return true;
  18921. case boolTag:
  18922. case dateTag:
  18923. case numberTag:
  18924. // Coerce booleans to `1` or `0` and dates to milliseconds.
  18925. // Invalid dates are coerced to `NaN`.
  18926. return eq(+object, +other);
  18927. case errorTag:
  18928. return object.name == other.name && object.message == other.message;
  18929. case regexpTag:
  18930. case stringTag:
  18931. // Coerce regexes to strings and treat strings, primitives and objects,
  18932. // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
  18933. // for more details.
  18934. return object == (other + '');
  18935. case mapTag:
  18936. var convert = mapToArray;
  18937. case setTag:
  18938. var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
  18939. convert || (convert = setToArray);
  18940. if (object.size != other.size && !isPartial) {
  18941. return false;
  18942. }
  18943. // Assume cyclic values are equal.
  18944. var stacked = stack.get(object);
  18945. if (stacked) {
  18946. return stacked == other;
  18947. }
  18948. bitmask |= COMPARE_UNORDERED_FLAG;
  18949. // Recursively compare objects (susceptible to call stack limits).
  18950. stack.set(object, other);
  18951. var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  18952. stack['delete'](object);
  18953. return result;
  18954. case symbolTag:
  18955. if (symbolValueOf) {
  18956. return symbolValueOf.call(object) == symbolValueOf.call(other);
  18957. }
  18958. }
  18959. return false;
  18960. }
  18961. /**
  18962. * A specialized version of `baseIsEqualDeep` for objects with support for
  18963. * partial deep comparisons.
  18964. *
  18965. * @private
  18966. * @param {Object} object The object to compare.
  18967. * @param {Object} other The other object to compare.
  18968. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  18969. * @param {Function} customizer The function to customize comparisons.
  18970. * @param {Function} equalFunc The function to determine equivalents of values.
  18971. * @param {Object} stack Tracks traversed `object` and `other` objects.
  18972. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  18973. */
  18974. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  18975. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  18976. objProps = getAllKeys(object),
  18977. objLength = objProps.length,
  18978. othProps = getAllKeys(other),
  18979. othLength = othProps.length;
  18980. if (objLength != othLength && !isPartial) {
  18981. return false;
  18982. }
  18983. var index = objLength;
  18984. while (index--) {
  18985. var key = objProps[index];
  18986. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  18987. return false;
  18988. }
  18989. }
  18990. // Assume cyclic values are equal.
  18991. var stacked = stack.get(object);
  18992. if (stacked && stack.get(other)) {
  18993. return stacked == other;
  18994. }
  18995. var result = true;
  18996. stack.set(object, other);
  18997. stack.set(other, object);
  18998. var skipCtor = isPartial;
  18999. while (++index < objLength) {
  19000. key = objProps[index];
  19001. var objValue = object[key],
  19002. othValue = other[key];
  19003. if (customizer) {
  19004. var compared = isPartial
  19005. ? customizer(othValue, objValue, key, other, object, stack)
  19006. : customizer(objValue, othValue, key, object, other, stack);
  19007. }
  19008. // Recursively compare objects (susceptible to call stack limits).
  19009. if (!(compared === undefined
  19010. ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
  19011. : compared
  19012. )) {
  19013. result = false;
  19014. break;
  19015. }
  19016. skipCtor || (skipCtor = key == 'constructor');
  19017. }
  19018. if (result && !skipCtor) {
  19019. var objCtor = object.constructor,
  19020. othCtor = other.constructor;
  19021. // Non `Object` object instances with different constructors are not equal.
  19022. if (objCtor != othCtor &&
  19023. ('constructor' in object && 'constructor' in other) &&
  19024. !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
  19025. typeof othCtor == 'function' && othCtor instanceof othCtor)) {
  19026. result = false;
  19027. }
  19028. }
  19029. stack['delete'](object);
  19030. stack['delete'](other);
  19031. return result;
  19032. }
  19033. /**
  19034. * A specialized version of `baseRest` which flattens the rest array.
  19035. *
  19036. * @private
  19037. * @param {Function} func The function to apply a rest parameter to.
  19038. * @returns {Function} Returns the new function.
  19039. */
  19040. function flatRest(func) {
  19041. return setToString(overRest(func, undefined, flatten), func + '');
  19042. }
  19043. /**
  19044. * Creates an array of own enumerable property names and symbols of `object`.
  19045. *
  19046. * @private
  19047. * @param {Object} object The object to query.
  19048. * @returns {Array} Returns the array of property names and symbols.
  19049. */
  19050. function getAllKeys(object) {
  19051. return baseGetAllKeys(object, keys, getSymbols);
  19052. }
  19053. /**
  19054. * Creates an array of own and inherited enumerable property names and
  19055. * symbols of `object`.
  19056. *
  19057. * @private
  19058. * @param {Object} object The object to query.
  19059. * @returns {Array} Returns the array of property names and symbols.
  19060. */
  19061. function getAllKeysIn(object) {
  19062. return baseGetAllKeys(object, keysIn, getSymbolsIn);
  19063. }
  19064. /**
  19065. * Gets metadata for `func`.
  19066. *
  19067. * @private
  19068. * @param {Function} func The function to query.
  19069. * @returns {*} Returns the metadata for `func`.
  19070. */
  19071. var getData = !metaMap ? noop : function(func) {
  19072. return metaMap.get(func);
  19073. };
  19074. /**
  19075. * Gets the name of `func`.
  19076. *
  19077. * @private
  19078. * @param {Function} func The function to query.
  19079. * @returns {string} Returns the function name.
  19080. */
  19081. function getFuncName(func) {
  19082. var result = (func.name + ''),
  19083. array = realNames[result],
  19084. length = hasOwnProperty.call(realNames, result) ? array.length : 0;
  19085. while (length--) {
  19086. var data = array[length],
  19087. otherFunc = data.func;
  19088. if (otherFunc == null || otherFunc == func) {
  19089. return data.name;
  19090. }
  19091. }
  19092. return result;
  19093. }
  19094. /**
  19095. * Gets the argument placeholder value for `func`.
  19096. *
  19097. * @private
  19098. * @param {Function} func The function to inspect.
  19099. * @returns {*} Returns the placeholder value.
  19100. */
  19101. function getHolder(func) {
  19102. var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
  19103. return object.placeholder;
  19104. }
  19105. /**
  19106. * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
  19107. * this function returns the custom method, otherwise it returns `baseIteratee`.
  19108. * If arguments are provided, the chosen function is invoked with them and
  19109. * its result is returned.
  19110. *
  19111. * @private
  19112. * @param {*} [value] The value to convert to an iteratee.
  19113. * @param {number} [arity] The arity of the created iteratee.
  19114. * @returns {Function} Returns the chosen function or its result.
  19115. */
  19116. function getIteratee() {
  19117. var result = lodash.iteratee || iteratee;
  19118. result = result === iteratee ? baseIteratee : result;
  19119. return arguments.length ? result(arguments[0], arguments[1]) : result;
  19120. }
  19121. /**
  19122. * Gets the data for `map`.
  19123. *
  19124. * @private
  19125. * @param {Object} map The map to query.
  19126. * @param {string} key The reference key.
  19127. * @returns {*} Returns the map data.
  19128. */
  19129. function getMapData(map, key) {
  19130. var data = map.__data__;
  19131. return isKeyable(key)
  19132. ? data[typeof key == 'string' ? 'string' : 'hash']
  19133. : data.map;
  19134. }
  19135. /**
  19136. * Gets the property names, values, and compare flags of `object`.
  19137. *
  19138. * @private
  19139. * @param {Object} object The object to query.
  19140. * @returns {Array} Returns the match data of `object`.
  19141. */
  19142. function getMatchData(object) {
  19143. var result = keys(object),
  19144. length = result.length;
  19145. while (length--) {
  19146. var key = result[length],
  19147. value = object[key];
  19148. result[length] = [key, value, isStrictComparable(value)];
  19149. }
  19150. return result;
  19151. }
  19152. /**
  19153. * Gets the native function at `key` of `object`.
  19154. *
  19155. * @private
  19156. * @param {Object} object The object to query.
  19157. * @param {string} key The key of the method to get.
  19158. * @returns {*} Returns the function if it's native, else `undefined`.
  19159. */
  19160. function getNative(object, key) {
  19161. var value = getValue(object, key);
  19162. return baseIsNative(value) ? value : undefined;
  19163. }
  19164. /**
  19165. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  19166. *
  19167. * @private
  19168. * @param {*} value The value to query.
  19169. * @returns {string} Returns the raw `toStringTag`.
  19170. */
  19171. function getRawTag(value) {
  19172. var isOwn = hasOwnProperty.call(value, symToStringTag),
  19173. tag = value[symToStringTag];
  19174. try {
  19175. value[symToStringTag] = undefined;
  19176. var unmasked = true;
  19177. } catch (e) {}
  19178. var result = nativeObjectToString.call(value);
  19179. if (unmasked) {
  19180. if (isOwn) {
  19181. value[symToStringTag] = tag;
  19182. } else {
  19183. delete value[symToStringTag];
  19184. }
  19185. }
  19186. return result;
  19187. }
  19188. /**
  19189. * Creates an array of the own enumerable symbols of `object`.
  19190. *
  19191. * @private
  19192. * @param {Object} object The object to query.
  19193. * @returns {Array} Returns the array of symbols.
  19194. */
  19195. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  19196. if (object == null) {
  19197. return [];
  19198. }
  19199. object = Object(object);
  19200. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  19201. return propertyIsEnumerable.call(object, symbol);
  19202. });
  19203. };
  19204. /**
  19205. * Creates an array of the own and inherited enumerable symbols of `object`.
  19206. *
  19207. * @private
  19208. * @param {Object} object The object to query.
  19209. * @returns {Array} Returns the array of symbols.
  19210. */
  19211. var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
  19212. var result = [];
  19213. while (object) {
  19214. arrayPush(result, getSymbols(object));
  19215. object = getPrototype(object);
  19216. }
  19217. return result;
  19218. };
  19219. /**
  19220. * Gets the `toStringTag` of `value`.
  19221. *
  19222. * @private
  19223. * @param {*} value The value to query.
  19224. * @returns {string} Returns the `toStringTag`.
  19225. */
  19226. var getTag = baseGetTag;
  19227. // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
  19228. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
  19229. (Map && getTag(new Map) != mapTag) ||
  19230. (Promise && getTag(Promise.resolve()) != promiseTag) ||
  19231. (Set && getTag(new Set) != setTag) ||
  19232. (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  19233. getTag = function(value) {
  19234. var result = baseGetTag(value),
  19235. Ctor = result == objectTag ? value.constructor : undefined,
  19236. ctorString = Ctor ? toSource(Ctor) : '';
  19237. if (ctorString) {
  19238. switch (ctorString) {
  19239. case dataViewCtorString: return dataViewTag;
  19240. case mapCtorString: return mapTag;
  19241. case promiseCtorString: return promiseTag;
  19242. case setCtorString: return setTag;
  19243. case weakMapCtorString: return weakMapTag;
  19244. }
  19245. }
  19246. return result;
  19247. };
  19248. }
  19249. /**
  19250. * Gets the view, applying any `transforms` to the `start` and `end` positions.
  19251. *
  19252. * @private
  19253. * @param {number} start The start of the view.
  19254. * @param {number} end The end of the view.
  19255. * @param {Array} transforms The transformations to apply to the view.
  19256. * @returns {Object} Returns an object containing the `start` and `end`
  19257. * positions of the view.
  19258. */
  19259. function getView(start, end, transforms) {
  19260. var index = -1,
  19261. length = transforms.length;
  19262. while (++index < length) {
  19263. var data = transforms[index],
  19264. size = data.size;
  19265. switch (data.type) {
  19266. case 'drop': start += size; break;
  19267. case 'dropRight': end -= size; break;
  19268. case 'take': end = nativeMin(end, start + size); break;
  19269. case 'takeRight': start = nativeMax(start, end - size); break;
  19270. }
  19271. }
  19272. return { 'start': start, 'end': end };
  19273. }
  19274. /**
  19275. * Extracts wrapper details from the `source` body comment.
  19276. *
  19277. * @private
  19278. * @param {string} source The source to inspect.
  19279. * @returns {Array} Returns the wrapper details.
  19280. */
  19281. function getWrapDetails(source) {
  19282. var match = source.match(reWrapDetails);
  19283. return match ? match[1].split(reSplitDetails) : [];
  19284. }
  19285. /**
  19286. * Checks if `path` exists on `object`.
  19287. *
  19288. * @private
  19289. * @param {Object} object The object to query.
  19290. * @param {Array|string} path The path to check.
  19291. * @param {Function} hasFunc The function to check properties.
  19292. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  19293. */
  19294. function hasPath(object, path, hasFunc) {
  19295. path = castPath(path, object);
  19296. var index = -1,
  19297. length = path.length,
  19298. result = false;
  19299. while (++index < length) {
  19300. var key = toKey(path[index]);
  19301. if (!(result = object != null && hasFunc(object, key))) {
  19302. break;
  19303. }
  19304. object = object[key];
  19305. }
  19306. if (result || ++index != length) {
  19307. return result;
  19308. }
  19309. length = object == null ? 0 : object.length;
  19310. return !!length && isLength(length) && isIndex(key, length) &&
  19311. (isArray(object) || isArguments(object));
  19312. }
  19313. /**
  19314. * Initializes an array clone.
  19315. *
  19316. * @private
  19317. * @param {Array} array The array to clone.
  19318. * @returns {Array} Returns the initialized clone.
  19319. */
  19320. function initCloneArray(array) {
  19321. var length = array.length,
  19322. result = new array.constructor(length);
  19323. // Add properties assigned by `RegExp#exec`.
  19324. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
  19325. result.index = array.index;
  19326. result.input = array.input;
  19327. }
  19328. return result;
  19329. }
  19330. /**
  19331. * Initializes an object clone.
  19332. *
  19333. * @private
  19334. * @param {Object} object The object to clone.
  19335. * @returns {Object} Returns the initialized clone.
  19336. */
  19337. function initCloneObject(object) {
  19338. return (typeof object.constructor == 'function' && !isPrototype(object))
  19339. ? baseCreate(getPrototype(object))
  19340. : {};
  19341. }
  19342. /**
  19343. * Initializes an object clone based on its `toStringTag`.
  19344. *
  19345. * **Note:** This function only supports cloning values with tags of
  19346. * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
  19347. *
  19348. * @private
  19349. * @param {Object} object The object to clone.
  19350. * @param {string} tag The `toStringTag` of the object to clone.
  19351. * @param {boolean} [isDeep] Specify a deep clone.
  19352. * @returns {Object} Returns the initialized clone.
  19353. */
  19354. function initCloneByTag(object, tag, isDeep) {
  19355. var Ctor = object.constructor;
  19356. switch (tag) {
  19357. case arrayBufferTag:
  19358. return cloneArrayBuffer(object);
  19359. case boolTag:
  19360. case dateTag:
  19361. return new Ctor(+object);
  19362. case dataViewTag:
  19363. return cloneDataView(object, isDeep);
  19364. case float32Tag: case float64Tag:
  19365. case int8Tag: case int16Tag: case int32Tag:
  19366. case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
  19367. return cloneTypedArray(object, isDeep);
  19368. case mapTag:
  19369. return new Ctor;
  19370. case numberTag:
  19371. case stringTag:
  19372. return new Ctor(object);
  19373. case regexpTag:
  19374. return cloneRegExp(object);
  19375. case setTag:
  19376. return new Ctor;
  19377. case symbolTag:
  19378. return cloneSymbol(object);
  19379. }
  19380. }
  19381. /**
  19382. * Inserts wrapper `details` in a comment at the top of the `source` body.
  19383. *
  19384. * @private
  19385. * @param {string} source The source to modify.
  19386. * @returns {Array} details The details to insert.
  19387. * @returns {string} Returns the modified source.
  19388. */
  19389. function insertWrapDetails(source, details) {
  19390. var length = details.length;
  19391. if (!length) {
  19392. return source;
  19393. }
  19394. var lastIndex = length - 1;
  19395. details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
  19396. details = details.join(length > 2 ? ', ' : ' ');
  19397. return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
  19398. }
  19399. /**
  19400. * Checks if `value` is a flattenable `arguments` object or array.
  19401. *
  19402. * @private
  19403. * @param {*} value The value to check.
  19404. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
  19405. */
  19406. function isFlattenable(value) {
  19407. return isArray(value) || isArguments(value) ||
  19408. !!(spreadableSymbol && value && value[spreadableSymbol]);
  19409. }
  19410. /**
  19411. * Checks if `value` is a valid array-like index.
  19412. *
  19413. * @private
  19414. * @param {*} value The value to check.
  19415. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  19416. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  19417. */
  19418. function isIndex(value, length) {
  19419. var type = typeof value;
  19420. length = length == null ? MAX_SAFE_INTEGER : length;
  19421. return !!length &&
  19422. (type == 'number' ||
  19423. (type != 'symbol' && reIsUint.test(value))) &&
  19424. (value > -1 && value % 1 == 0 && value < length);
  19425. }
  19426. /**
  19427. * Checks if the given arguments are from an iteratee call.
  19428. *
  19429. * @private
  19430. * @param {*} value The potential iteratee value argument.
  19431. * @param {*} index The potential iteratee index or key argument.
  19432. * @param {*} object The potential iteratee object argument.
  19433. * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
  19434. * else `false`.
  19435. */
  19436. function isIterateeCall(value, index, object) {
  19437. if (!isObject(object)) {
  19438. return false;
  19439. }
  19440. var type = typeof index;
  19441. if (type == 'number'
  19442. ? (isArrayLike(object) && isIndex(index, object.length))
  19443. : (type == 'string' && index in object)
  19444. ) {
  19445. return eq(object[index], value);
  19446. }
  19447. return false;
  19448. }
  19449. /**
  19450. * Checks if `value` is a property name and not a property path.
  19451. *
  19452. * @private
  19453. * @param {*} value The value to check.
  19454. * @param {Object} [object] The object to query keys on.
  19455. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  19456. */
  19457. function isKey(value, object) {
  19458. if (isArray(value)) {
  19459. return false;
  19460. }
  19461. var type = typeof value;
  19462. if (type == 'number' || type == 'symbol' || type == 'boolean' ||
  19463. value == null || isSymbol(value)) {
  19464. return true;
  19465. }
  19466. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
  19467. (object != null && value in Object(object));
  19468. }
  19469. /**
  19470. * Checks if `value` is suitable for use as unique object key.
  19471. *
  19472. * @private
  19473. * @param {*} value The value to check.
  19474. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  19475. */
  19476. function isKeyable(value) {
  19477. var type = typeof value;
  19478. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  19479. ? (value !== '__proto__')
  19480. : (value === null);
  19481. }
  19482. /**
  19483. * Checks if `func` has a lazy counterpart.
  19484. *
  19485. * @private
  19486. * @param {Function} func The function to check.
  19487. * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
  19488. * else `false`.
  19489. */
  19490. function isLaziable(func) {
  19491. var funcName = getFuncName(func),
  19492. other = lodash[funcName];
  19493. if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
  19494. return false;
  19495. }
  19496. if (func === other) {
  19497. return true;
  19498. }
  19499. var data = getData(other);
  19500. return !!data && func === data[0];
  19501. }
  19502. /**
  19503. * Checks if `func` has its source masked.
  19504. *
  19505. * @private
  19506. * @param {Function} func The function to check.
  19507. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  19508. */
  19509. function isMasked(func) {
  19510. return !!maskSrcKey && (maskSrcKey in func);
  19511. }
  19512. /**
  19513. * Checks if `func` is capable of being masked.
  19514. *
  19515. * @private
  19516. * @param {*} value The value to check.
  19517. * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
  19518. */
  19519. var isMaskable = coreJsData ? isFunction : stubFalse;
  19520. /**
  19521. * Checks if `value` is likely a prototype object.
  19522. *
  19523. * @private
  19524. * @param {*} value The value to check.
  19525. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  19526. */
  19527. function isPrototype(value) {
  19528. var Ctor = value && value.constructor,
  19529. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  19530. return value === proto;
  19531. }
  19532. /**
  19533. * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
  19534. *
  19535. * @private
  19536. * @param {*} value The value to check.
  19537. * @returns {boolean} Returns `true` if `value` if suitable for strict
  19538. * equality comparisons, else `false`.
  19539. */
  19540. function isStrictComparable(value) {
  19541. return value === value && !isObject(value);
  19542. }
  19543. /**
  19544. * A specialized version of `matchesProperty` for source values suitable
  19545. * for strict equality comparisons, i.e. `===`.
  19546. *
  19547. * @private
  19548. * @param {string} key The key of the property to get.
  19549. * @param {*} srcValue The value to match.
  19550. * @returns {Function} Returns the new spec function.
  19551. */
  19552. function matchesStrictComparable(key, srcValue) {
  19553. return function(object) {
  19554. if (object == null) {
  19555. return false;
  19556. }
  19557. return object[key] === srcValue &&
  19558. (srcValue !== undefined || (key in Object(object)));
  19559. };
  19560. }
  19561. /**
  19562. * A specialized version of `_.memoize` which clears the memoized function's
  19563. * cache when it exceeds `MAX_MEMOIZE_SIZE`.
  19564. *
  19565. * @private
  19566. * @param {Function} func The function to have its output memoized.
  19567. * @returns {Function} Returns the new memoized function.
  19568. */
  19569. function memoizeCapped(func) {
  19570. var result = memoize(func, function(key) {
  19571. if (cache.size === MAX_MEMOIZE_SIZE) {
  19572. cache.clear();
  19573. }
  19574. return key;
  19575. });
  19576. var cache = result.cache;
  19577. return result;
  19578. }
  19579. /**
  19580. * Merges the function metadata of `source` into `data`.
  19581. *
  19582. * Merging metadata reduces the number of wrappers used to invoke a function.
  19583. * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
  19584. * may be applied regardless of execution order. Methods like `_.ary` and
  19585. * `_.rearg` modify function arguments, making the order in which they are
  19586. * executed important, preventing the merging of metadata. However, we make
  19587. * an exception for a safe combined case where curried functions have `_.ary`
  19588. * and or `_.rearg` applied.
  19589. *
  19590. * @private
  19591. * @param {Array} data The destination metadata.
  19592. * @param {Array} source The source metadata.
  19593. * @returns {Array} Returns `data`.
  19594. */
  19595. function mergeData(data, source) {
  19596. var bitmask = data[1],
  19597. srcBitmask = source[1],
  19598. newBitmask = bitmask | srcBitmask,
  19599. isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
  19600. var isCombo =
  19601. ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
  19602. ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
  19603. ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
  19604. // Exit early if metadata can't be merged.
  19605. if (!(isCommon || isCombo)) {
  19606. return data;
  19607. }
  19608. // Use source `thisArg` if available.
  19609. if (srcBitmask & WRAP_BIND_FLAG) {
  19610. data[2] = source[2];
  19611. // Set when currying a bound function.
  19612. newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
  19613. }
  19614. // Compose partial arguments.
  19615. var value = source[3];
  19616. if (value) {
  19617. var partials = data[3];
  19618. data[3] = partials ? composeArgs(partials, value, source[4]) : value;
  19619. data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
  19620. }
  19621. // Compose partial right arguments.
  19622. value = source[5];
  19623. if (value) {
  19624. partials = data[5];
  19625. data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
  19626. data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
  19627. }
  19628. // Use source `argPos` if available.
  19629. value = source[7];
  19630. if (value) {
  19631. data[7] = value;
  19632. }
  19633. // Use source `ary` if it's smaller.
  19634. if (srcBitmask & WRAP_ARY_FLAG) {
  19635. data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
  19636. }
  19637. // Use source `arity` if one is not provided.
  19638. if (data[9] == null) {
  19639. data[9] = source[9];
  19640. }
  19641. // Use source `func` and merge bitmasks.
  19642. data[0] = source[0];
  19643. data[1] = newBitmask;
  19644. return data;
  19645. }
  19646. /**
  19647. * This function is like
  19648. * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  19649. * except that it includes inherited enumerable properties.
  19650. *
  19651. * @private
  19652. * @param {Object} object The object to query.
  19653. * @returns {Array} Returns the array of property names.
  19654. */
  19655. function nativeKeysIn(object) {
  19656. var result = [];
  19657. if (object != null) {
  19658. for (var key in Object(object)) {
  19659. result.push(key);
  19660. }
  19661. }
  19662. return result;
  19663. }
  19664. /**
  19665. * Converts `value` to a string using `Object.prototype.toString`.
  19666. *
  19667. * @private
  19668. * @param {*} value The value to convert.
  19669. * @returns {string} Returns the converted string.
  19670. */
  19671. function objectToString(value) {
  19672. return nativeObjectToString.call(value);
  19673. }
  19674. /**
  19675. * A specialized version of `baseRest` which transforms the rest array.
  19676. *
  19677. * @private
  19678. * @param {Function} func The function to apply a rest parameter to.
  19679. * @param {number} [start=func.length-1] The start position of the rest parameter.
  19680. * @param {Function} transform The rest array transform.
  19681. * @returns {Function} Returns the new function.
  19682. */
  19683. function overRest(func, start, transform) {
  19684. start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
  19685. return function() {
  19686. var args = arguments,
  19687. index = -1,
  19688. length = nativeMax(args.length - start, 0),
  19689. array = Array(length);
  19690. while (++index < length) {
  19691. array[index] = args[start + index];
  19692. }
  19693. index = -1;
  19694. var otherArgs = Array(start + 1);
  19695. while (++index < start) {
  19696. otherArgs[index] = args[index];
  19697. }
  19698. otherArgs[start] = transform(array);
  19699. return apply(func, this, otherArgs);
  19700. };
  19701. }
  19702. /**
  19703. * Gets the parent value at `path` of `object`.
  19704. *
  19705. * @private
  19706. * @param {Object} object The object to query.
  19707. * @param {Array} path The path to get the parent value of.
  19708. * @returns {*} Returns the parent value.
  19709. */
  19710. function parent(object, path) {
  19711. return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
  19712. }
  19713. /**
  19714. * Reorder `array` according to the specified indexes where the element at
  19715. * the first index is assigned as the first element, the element at
  19716. * the second index is assigned as the second element, and so on.
  19717. *
  19718. * @private
  19719. * @param {Array} array The array to reorder.
  19720. * @param {Array} indexes The arranged array indexes.
  19721. * @returns {Array} Returns `array`.
  19722. */
  19723. function reorder(array, indexes) {
  19724. var arrLength = array.length,
  19725. length = nativeMin(indexes.length, arrLength),
  19726. oldArray = copyArray(array);
  19727. while (length--) {
  19728. var index = indexes[length];
  19729. array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
  19730. }
  19731. return array;
  19732. }
  19733. /**
  19734. * Sets metadata for `func`.
  19735. *
  19736. * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
  19737. * period of time, it will trip its breaker and transition to an identity
  19738. * function to avoid garbage collection pauses in V8. See
  19739. * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
  19740. * for more details.
  19741. *
  19742. * @private
  19743. * @param {Function} func The function to associate metadata with.
  19744. * @param {*} data The metadata.
  19745. * @returns {Function} Returns `func`.
  19746. */
  19747. var setData = shortOut(baseSetData);
  19748. /**
  19749. * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
  19750. *
  19751. * @private
  19752. * @param {Function} func The function to delay.
  19753. * @param {number} wait The number of milliseconds to delay invocation.
  19754. * @returns {number|Object} Returns the timer id or timeout object.
  19755. */
  19756. var setTimeout = ctxSetTimeout || function(func, wait) {
  19757. return root.setTimeout(func, wait);
  19758. };
  19759. /**
  19760. * Sets the `toString` method of `func` to return `string`.
  19761. *
  19762. * @private
  19763. * @param {Function} func The function to modify.
  19764. * @param {Function} string The `toString` result.
  19765. * @returns {Function} Returns `func`.
  19766. */
  19767. var setToString = shortOut(baseSetToString);
  19768. /**
  19769. * Sets the `toString` method of `wrapper` to mimic the source of `reference`
  19770. * with wrapper details in a comment at the top of the source body.
  19771. *
  19772. * @private
  19773. * @param {Function} wrapper The function to modify.
  19774. * @param {Function} reference The reference function.
  19775. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  19776. * @returns {Function} Returns `wrapper`.
  19777. */
  19778. function setWrapToString(wrapper, reference, bitmask) {
  19779. var source = (reference + '');
  19780. return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
  19781. }
  19782. /**
  19783. * Creates a function that'll short out and invoke `identity` instead
  19784. * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
  19785. * milliseconds.
  19786. *
  19787. * @private
  19788. * @param {Function} func The function to restrict.
  19789. * @returns {Function} Returns the new shortable function.
  19790. */
  19791. function shortOut(func) {
  19792. var count = 0,
  19793. lastCalled = 0;
  19794. return function() {
  19795. var stamp = nativeNow(),
  19796. remaining = HOT_SPAN - (stamp - lastCalled);
  19797. lastCalled = stamp;
  19798. if (remaining > 0) {
  19799. if (++count >= HOT_COUNT) {
  19800. return arguments[0];
  19801. }
  19802. } else {
  19803. count = 0;
  19804. }
  19805. return func.apply(undefined, arguments);
  19806. };
  19807. }
  19808. /**
  19809. * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
  19810. *
  19811. * @private
  19812. * @param {Array} array The array to shuffle.
  19813. * @param {number} [size=array.length] The size of `array`.
  19814. * @returns {Array} Returns `array`.
  19815. */
  19816. function shuffleSelf(array, size) {
  19817. var index = -1,
  19818. length = array.length,
  19819. lastIndex = length - 1;
  19820. size = size === undefined ? length : size;
  19821. while (++index < size) {
  19822. var rand = baseRandom(index, lastIndex),
  19823. value = array[rand];
  19824. array[rand] = array[index];
  19825. array[index] = value;
  19826. }
  19827. array.length = size;
  19828. return array;
  19829. }
  19830. /**
  19831. * Converts `string` to a property path array.
  19832. *
  19833. * @private
  19834. * @param {string} string The string to convert.
  19835. * @returns {Array} Returns the property path array.
  19836. */
  19837. var stringToPath = memoizeCapped(function(string) {
  19838. var result = [];
  19839. if (string.charCodeAt(0) === 46 /* . */) {
  19840. result.push('');
  19841. }
  19842. string.replace(rePropName, function(match, number, quote, subString) {
  19843. result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
  19844. });
  19845. return result;
  19846. });
  19847. /**
  19848. * Converts `value` to a string key if it's not a string or symbol.
  19849. *
  19850. * @private
  19851. * @param {*} value The value to inspect.
  19852. * @returns {string|symbol} Returns the key.
  19853. */
  19854. function toKey(value) {
  19855. if (typeof value == 'string' || isSymbol(value)) {
  19856. return value;
  19857. }
  19858. var result = (value + '');
  19859. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  19860. }
  19861. /**
  19862. * Converts `func` to its source code.
  19863. *
  19864. * @private
  19865. * @param {Function} func The function to convert.
  19866. * @returns {string} Returns the source code.
  19867. */
  19868. function toSource(func) {
  19869. if (func != null) {
  19870. try {
  19871. return funcToString.call(func);
  19872. } catch (e) {}
  19873. try {
  19874. return (func + '');
  19875. } catch (e) {}
  19876. }
  19877. return '';
  19878. }
  19879. /**
  19880. * Updates wrapper `details` based on `bitmask` flags.
  19881. *
  19882. * @private
  19883. * @returns {Array} details The details to modify.
  19884. * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  19885. * @returns {Array} Returns `details`.
  19886. */
  19887. function updateWrapDetails(details, bitmask) {
  19888. arrayEach(wrapFlags, function(pair) {
  19889. var value = '_.' + pair[0];
  19890. if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
  19891. details.push(value);
  19892. }
  19893. });
  19894. return details.sort();
  19895. }
  19896. /**
  19897. * Creates a clone of `wrapper`.
  19898. *
  19899. * @private
  19900. * @param {Object} wrapper The wrapper to clone.
  19901. * @returns {Object} Returns the cloned wrapper.
  19902. */
  19903. function wrapperClone(wrapper) {
  19904. if (wrapper instanceof LazyWrapper) {
  19905. return wrapper.clone();
  19906. }
  19907. var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
  19908. result.__actions__ = copyArray(wrapper.__actions__);
  19909. result.__index__ = wrapper.__index__;
  19910. result.__values__ = wrapper.__values__;
  19911. return result;
  19912. }
  19913. /*------------------------------------------------------------------------*/
  19914. /**
  19915. * Creates an array of elements split into groups the length of `size`.
  19916. * If `array` can't be split evenly, the final chunk will be the remaining
  19917. * elements.
  19918. *
  19919. * @static
  19920. * @memberOf _
  19921. * @since 3.0.0
  19922. * @category Array
  19923. * @param {Array} array The array to process.
  19924. * @param {number} [size=1] The length of each chunk
  19925. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  19926. * @returns {Array} Returns the new array of chunks.
  19927. * @example
  19928. *
  19929. * _.chunk(['a', 'b', 'c', 'd'], 2);
  19930. * // => [['a', 'b'], ['c', 'd']]
  19931. *
  19932. * _.chunk(['a', 'b', 'c', 'd'], 3);
  19933. * // => [['a', 'b', 'c'], ['d']]
  19934. */
  19935. function chunk(array, size, guard) {
  19936. if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
  19937. size = 1;
  19938. } else {
  19939. size = nativeMax(toInteger(size), 0);
  19940. }
  19941. var length = array == null ? 0 : array.length;
  19942. if (!length || size < 1) {
  19943. return [];
  19944. }
  19945. var index = 0,
  19946. resIndex = 0,
  19947. result = Array(nativeCeil(length / size));
  19948. while (index < length) {
  19949. result[resIndex++] = baseSlice(array, index, (index += size));
  19950. }
  19951. return result;
  19952. }
  19953. /**
  19954. * Creates an array with all falsey values removed. The values `false`, `null`,
  19955. * `0`, `""`, `undefined`, and `NaN` are falsey.
  19956. *
  19957. * @static
  19958. * @memberOf _
  19959. * @since 0.1.0
  19960. * @category Array
  19961. * @param {Array} array The array to compact.
  19962. * @returns {Array} Returns the new array of filtered values.
  19963. * @example
  19964. *
  19965. * _.compact([0, 1, false, 2, '', 3]);
  19966. * // => [1, 2, 3]
  19967. */
  19968. function compact(array) {
  19969. var index = -1,
  19970. length = array == null ? 0 : array.length,
  19971. resIndex = 0,
  19972. result = [];
  19973. while (++index < length) {
  19974. var value = array[index];
  19975. if (value) {
  19976. result[resIndex++] = value;
  19977. }
  19978. }
  19979. return result;
  19980. }
  19981. /**
  19982. * Creates a new array concatenating `array` with any additional arrays
  19983. * and/or values.
  19984. *
  19985. * @static
  19986. * @memberOf _
  19987. * @since 4.0.0
  19988. * @category Array
  19989. * @param {Array} array The array to concatenate.
  19990. * @param {...*} [values] The values to concatenate.
  19991. * @returns {Array} Returns the new concatenated array.
  19992. * @example
  19993. *
  19994. * var array = [1];
  19995. * var other = _.concat(array, 2, [3], [[4]]);
  19996. *
  19997. * console.log(other);
  19998. * // => [1, 2, 3, [4]]
  19999. *
  20000. * console.log(array);
  20001. * // => [1]
  20002. */
  20003. function concat() {
  20004. var length = arguments.length;
  20005. if (!length) {
  20006. return [];
  20007. }
  20008. var args = Array(length - 1),
  20009. array = arguments[0],
  20010. index = length;
  20011. while (index--) {
  20012. args[index - 1] = arguments[index];
  20013. }
  20014. return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
  20015. }
  20016. /**
  20017. * Creates an array of `array` values not included in the other given arrays
  20018. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  20019. * for equality comparisons. The order and references of result values are
  20020. * determined by the first array.
  20021. *
  20022. * **Note:** Unlike `_.pullAll`, this method returns a new array.
  20023. *
  20024. * @static
  20025. * @memberOf _
  20026. * @since 0.1.0
  20027. * @category Array
  20028. * @param {Array} array The array to inspect.
  20029. * @param {...Array} [values] The values to exclude.
  20030. * @returns {Array} Returns the new array of filtered values.
  20031. * @see _.without, _.xor
  20032. * @example
  20033. *
  20034. * _.difference([2, 1], [2, 3]);
  20035. * // => [1]
  20036. */
  20037. var difference = baseRest(function(array, values) {
  20038. return isArrayLikeObject(array)
  20039. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
  20040. : [];
  20041. });
  20042. /**
  20043. * This method is like `_.difference` except that it accepts `iteratee` which
  20044. * is invoked for each element of `array` and `values` to generate the criterion
  20045. * by which they're compared. The order and references of result values are
  20046. * determined by the first array. The iteratee is invoked with one argument:
  20047. * (value).
  20048. *
  20049. * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
  20050. *
  20051. * @static
  20052. * @memberOf _
  20053. * @since 4.0.0
  20054. * @category Array
  20055. * @param {Array} array The array to inspect.
  20056. * @param {...Array} [values] The values to exclude.
  20057. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  20058. * @returns {Array} Returns the new array of filtered values.
  20059. * @example
  20060. *
  20061. * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  20062. * // => [1.2]
  20063. *
  20064. * // The `_.property` iteratee shorthand.
  20065. * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
  20066. * // => [{ 'x': 2 }]
  20067. */
  20068. var differenceBy = baseRest(function(array, values) {
  20069. var iteratee = last(values);
  20070. if (isArrayLikeObject(iteratee)) {
  20071. iteratee = undefined;
  20072. }
  20073. return isArrayLikeObject(array)
  20074. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
  20075. : [];
  20076. });
  20077. /**
  20078. * This method is like `_.difference` except that it accepts `comparator`
  20079. * which is invoked to compare elements of `array` to `values`. The order and
  20080. * references of result values are determined by the first array. The comparator
  20081. * is invoked with two arguments: (arrVal, othVal).
  20082. *
  20083. * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
  20084. *
  20085. * @static
  20086. * @memberOf _
  20087. * @since 4.0.0
  20088. * @category Array
  20089. * @param {Array} array The array to inspect.
  20090. * @param {...Array} [values] The values to exclude.
  20091. * @param {Function} [comparator] The comparator invoked per element.
  20092. * @returns {Array} Returns the new array of filtered values.
  20093. * @example
  20094. *
  20095. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  20096. *
  20097. * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
  20098. * // => [{ 'x': 2, 'y': 1 }]
  20099. */
  20100. var differenceWith = baseRest(function(array, values) {
  20101. var comparator = last(values);
  20102. if (isArrayLikeObject(comparator)) {
  20103. comparator = undefined;
  20104. }
  20105. return isArrayLikeObject(array)
  20106. ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
  20107. : [];
  20108. });
  20109. /**
  20110. * Creates a slice of `array` with `n` elements dropped from the beginning.
  20111. *
  20112. * @static
  20113. * @memberOf _
  20114. * @since 0.5.0
  20115. * @category Array
  20116. * @param {Array} array The array to query.
  20117. * @param {number} [n=1] The number of elements to drop.
  20118. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  20119. * @returns {Array} Returns the slice of `array`.
  20120. * @example
  20121. *
  20122. * _.drop([1, 2, 3]);
  20123. * // => [2, 3]
  20124. *
  20125. * _.drop([1, 2, 3], 2);
  20126. * // => [3]
  20127. *
  20128. * _.drop([1, 2, 3], 5);
  20129. * // => []
  20130. *
  20131. * _.drop([1, 2, 3], 0);
  20132. * // => [1, 2, 3]
  20133. */
  20134. function drop(array, n, guard) {
  20135. var length = array == null ? 0 : array.length;
  20136. if (!length) {
  20137. return [];
  20138. }
  20139. n = (guard || n === undefined) ? 1 : toInteger(n);
  20140. return baseSlice(array, n < 0 ? 0 : n, length);
  20141. }
  20142. /**
  20143. * Creates a slice of `array` with `n` elements dropped from the end.
  20144. *
  20145. * @static
  20146. * @memberOf _
  20147. * @since 3.0.0
  20148. * @category Array
  20149. * @param {Array} array The array to query.
  20150. * @param {number} [n=1] The number of elements to drop.
  20151. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  20152. * @returns {Array} Returns the slice of `array`.
  20153. * @example
  20154. *
  20155. * _.dropRight([1, 2, 3]);
  20156. * // => [1, 2]
  20157. *
  20158. * _.dropRight([1, 2, 3], 2);
  20159. * // => [1]
  20160. *
  20161. * _.dropRight([1, 2, 3], 5);
  20162. * // => []
  20163. *
  20164. * _.dropRight([1, 2, 3], 0);
  20165. * // => [1, 2, 3]
  20166. */
  20167. function dropRight(array, n, guard) {
  20168. var length = array == null ? 0 : array.length;
  20169. if (!length) {
  20170. return [];
  20171. }
  20172. n = (guard || n === undefined) ? 1 : toInteger(n);
  20173. n = length - n;
  20174. return baseSlice(array, 0, n < 0 ? 0 : n);
  20175. }
  20176. /**
  20177. * Creates a slice of `array` excluding elements dropped from the end.
  20178. * Elements are dropped until `predicate` returns falsey. The predicate is
  20179. * invoked with three arguments: (value, index, array).
  20180. *
  20181. * @static
  20182. * @memberOf _
  20183. * @since 3.0.0
  20184. * @category Array
  20185. * @param {Array} array The array to query.
  20186. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  20187. * @returns {Array} Returns the slice of `array`.
  20188. * @example
  20189. *
  20190. * var users = [
  20191. * { 'user': 'barney', 'active': true },
  20192. * { 'user': 'fred', 'active': false },
  20193. * { 'user': 'pebbles', 'active': false }
  20194. * ];
  20195. *
  20196. * _.dropRightWhile(users, function(o) { return !o.active; });
  20197. * // => objects for ['barney']
  20198. *
  20199. * // The `_.matches` iteratee shorthand.
  20200. * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
  20201. * // => objects for ['barney', 'fred']
  20202. *
  20203. * // The `_.matchesProperty` iteratee shorthand.
  20204. * _.dropRightWhile(users, ['active', false]);
  20205. * // => objects for ['barney']
  20206. *
  20207. * // The `_.property` iteratee shorthand.
  20208. * _.dropRightWhile(users, 'active');
  20209. * // => objects for ['barney', 'fred', 'pebbles']
  20210. */
  20211. function dropRightWhile(array, predicate) {
  20212. return (array && array.length)
  20213. ? baseWhile(array, getIteratee(predicate, 3), true, true)
  20214. : [];
  20215. }
  20216. /**
  20217. * Creates a slice of `array` excluding elements dropped from the beginning.
  20218. * Elements are dropped until `predicate` returns falsey. The predicate is
  20219. * invoked with three arguments: (value, index, array).
  20220. *
  20221. * @static
  20222. * @memberOf _
  20223. * @since 3.0.0
  20224. * @category Array
  20225. * @param {Array} array The array to query.
  20226. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  20227. * @returns {Array} Returns the slice of `array`.
  20228. * @example
  20229. *
  20230. * var users = [
  20231. * { 'user': 'barney', 'active': false },
  20232. * { 'user': 'fred', 'active': false },
  20233. * { 'user': 'pebbles', 'active': true }
  20234. * ];
  20235. *
  20236. * _.dropWhile(users, function(o) { return !o.active; });
  20237. * // => objects for ['pebbles']
  20238. *
  20239. * // The `_.matches` iteratee shorthand.
  20240. * _.dropWhile(users, { 'user': 'barney', 'active': false });
  20241. * // => objects for ['fred', 'pebbles']
  20242. *
  20243. * // The `_.matchesProperty` iteratee shorthand.
  20244. * _.dropWhile(users, ['active', false]);
  20245. * // => objects for ['pebbles']
  20246. *
  20247. * // The `_.property` iteratee shorthand.
  20248. * _.dropWhile(users, 'active');
  20249. * // => objects for ['barney', 'fred', 'pebbles']
  20250. */
  20251. function dropWhile(array, predicate) {
  20252. return (array && array.length)
  20253. ? baseWhile(array, getIteratee(predicate, 3), true)
  20254. : [];
  20255. }
  20256. /**
  20257. * Fills elements of `array` with `value` from `start` up to, but not
  20258. * including, `end`.
  20259. *
  20260. * **Note:** This method mutates `array`.
  20261. *
  20262. * @static
  20263. * @memberOf _
  20264. * @since 3.2.0
  20265. * @category Array
  20266. * @param {Array} array The array to fill.
  20267. * @param {*} value The value to fill `array` with.
  20268. * @param {number} [start=0] The start position.
  20269. * @param {number} [end=array.length] The end position.
  20270. * @returns {Array} Returns `array`.
  20271. * @example
  20272. *
  20273. * var array = [1, 2, 3];
  20274. *
  20275. * _.fill(array, 'a');
  20276. * console.log(array);
  20277. * // => ['a', 'a', 'a']
  20278. *
  20279. * _.fill(Array(3), 2);
  20280. * // => [2, 2, 2]
  20281. *
  20282. * _.fill([4, 6, 8, 10], '*', 1, 3);
  20283. * // => [4, '*', '*', 10]
  20284. */
  20285. function fill(array, value, start, end) {
  20286. var length = array == null ? 0 : array.length;
  20287. if (!length) {
  20288. return [];
  20289. }
  20290. if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
  20291. start = 0;
  20292. end = length;
  20293. }
  20294. return baseFill(array, value, start, end);
  20295. }
  20296. /**
  20297. * This method is like `_.find` except that it returns the index of the first
  20298. * element `predicate` returns truthy for instead of the element itself.
  20299. *
  20300. * @static
  20301. * @memberOf _
  20302. * @since 1.1.0
  20303. * @category Array
  20304. * @param {Array} array The array to inspect.
  20305. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  20306. * @param {number} [fromIndex=0] The index to search from.
  20307. * @returns {number} Returns the index of the found element, else `-1`.
  20308. * @example
  20309. *
  20310. * var users = [
  20311. * { 'user': 'barney', 'active': false },
  20312. * { 'user': 'fred', 'active': false },
  20313. * { 'user': 'pebbles', 'active': true }
  20314. * ];
  20315. *
  20316. * _.findIndex(users, function(o) { return o.user == 'barney'; });
  20317. * // => 0
  20318. *
  20319. * // The `_.matches` iteratee shorthand.
  20320. * _.findIndex(users, { 'user': 'fred', 'active': false });
  20321. * // => 1
  20322. *
  20323. * // The `_.matchesProperty` iteratee shorthand.
  20324. * _.findIndex(users, ['active', false]);
  20325. * // => 0
  20326. *
  20327. * // The `_.property` iteratee shorthand.
  20328. * _.findIndex(users, 'active');
  20329. * // => 2
  20330. */
  20331. function findIndex(array, predicate, fromIndex) {
  20332. var length = array == null ? 0 : array.length;
  20333. if (!length) {
  20334. return -1;
  20335. }
  20336. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  20337. if (index < 0) {
  20338. index = nativeMax(length + index, 0);
  20339. }
  20340. return baseFindIndex(array, getIteratee(predicate, 3), index);
  20341. }
  20342. /**
  20343. * This method is like `_.findIndex` except that it iterates over elements
  20344. * of `collection` from right to left.
  20345. *
  20346. * @static
  20347. * @memberOf _
  20348. * @since 2.0.0
  20349. * @category Array
  20350. * @param {Array} array The array to inspect.
  20351. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  20352. * @param {number} [fromIndex=array.length-1] The index to search from.
  20353. * @returns {number} Returns the index of the found element, else `-1`.
  20354. * @example
  20355. *
  20356. * var users = [
  20357. * { 'user': 'barney', 'active': true },
  20358. * { 'user': 'fred', 'active': false },
  20359. * { 'user': 'pebbles', 'active': false }
  20360. * ];
  20361. *
  20362. * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
  20363. * // => 2
  20364. *
  20365. * // The `_.matches` iteratee shorthand.
  20366. * _.findLastIndex(users, { 'user': 'barney', 'active': true });
  20367. * // => 0
  20368. *
  20369. * // The `_.matchesProperty` iteratee shorthand.
  20370. * _.findLastIndex(users, ['active', false]);
  20371. * // => 2
  20372. *
  20373. * // The `_.property` iteratee shorthand.
  20374. * _.findLastIndex(users, 'active');
  20375. * // => 0
  20376. */
  20377. function findLastIndex(array, predicate, fromIndex) {
  20378. var length = array == null ? 0 : array.length;
  20379. if (!length) {
  20380. return -1;
  20381. }
  20382. var index = length - 1;
  20383. if (fromIndex !== undefined) {
  20384. index = toInteger(fromIndex);
  20385. index = fromIndex < 0
  20386. ? nativeMax(length + index, 0)
  20387. : nativeMin(index, length - 1);
  20388. }
  20389. return baseFindIndex(array, getIteratee(predicate, 3), index, true);
  20390. }
  20391. /**
  20392. * Flattens `array` a single level deep.
  20393. *
  20394. * @static
  20395. * @memberOf _
  20396. * @since 0.1.0
  20397. * @category Array
  20398. * @param {Array} array The array to flatten.
  20399. * @returns {Array} Returns the new flattened array.
  20400. * @example
  20401. *
  20402. * _.flatten([1, [2, [3, [4]], 5]]);
  20403. * // => [1, 2, [3, [4]], 5]
  20404. */
  20405. function flatten(array) {
  20406. var length = array == null ? 0 : array.length;
  20407. return length ? baseFlatten(array, 1) : [];
  20408. }
  20409. /**
  20410. * Recursively flattens `array`.
  20411. *
  20412. * @static
  20413. * @memberOf _
  20414. * @since 3.0.0
  20415. * @category Array
  20416. * @param {Array} array The array to flatten.
  20417. * @returns {Array} Returns the new flattened array.
  20418. * @example
  20419. *
  20420. * _.flattenDeep([1, [2, [3, [4]], 5]]);
  20421. * // => [1, 2, 3, 4, 5]
  20422. */
  20423. function flattenDeep(array) {
  20424. var length = array == null ? 0 : array.length;
  20425. return length ? baseFlatten(array, INFINITY) : [];
  20426. }
  20427. /**
  20428. * Recursively flatten `array` up to `depth` times.
  20429. *
  20430. * @static
  20431. * @memberOf _
  20432. * @since 4.4.0
  20433. * @category Array
  20434. * @param {Array} array The array to flatten.
  20435. * @param {number} [depth=1] The maximum recursion depth.
  20436. * @returns {Array} Returns the new flattened array.
  20437. * @example
  20438. *
  20439. * var array = [1, [2, [3, [4]], 5]];
  20440. *
  20441. * _.flattenDepth(array, 1);
  20442. * // => [1, 2, [3, [4]], 5]
  20443. *
  20444. * _.flattenDepth(array, 2);
  20445. * // => [1, 2, 3, [4], 5]
  20446. */
  20447. function flattenDepth(array, depth) {
  20448. var length = array == null ? 0 : array.length;
  20449. if (!length) {
  20450. return [];
  20451. }
  20452. depth = depth === undefined ? 1 : toInteger(depth);
  20453. return baseFlatten(array, depth);
  20454. }
  20455. /**
  20456. * The inverse of `_.toPairs`; this method returns an object composed
  20457. * from key-value `pairs`.
  20458. *
  20459. * @static
  20460. * @memberOf _
  20461. * @since 4.0.0
  20462. * @category Array
  20463. * @param {Array} pairs The key-value pairs.
  20464. * @returns {Object} Returns the new object.
  20465. * @example
  20466. *
  20467. * _.fromPairs([['a', 1], ['b', 2]]);
  20468. * // => { 'a': 1, 'b': 2 }
  20469. */
  20470. function fromPairs(pairs) {
  20471. var index = -1,
  20472. length = pairs == null ? 0 : pairs.length,
  20473. result = {};
  20474. while (++index < length) {
  20475. var pair = pairs[index];
  20476. result[pair[0]] = pair[1];
  20477. }
  20478. return result;
  20479. }
  20480. /**
  20481. * Gets the first element of `array`.
  20482. *
  20483. * @static
  20484. * @memberOf _
  20485. * @since 0.1.0
  20486. * @alias first
  20487. * @category Array
  20488. * @param {Array} array The array to query.
  20489. * @returns {*} Returns the first element of `array`.
  20490. * @example
  20491. *
  20492. * _.head([1, 2, 3]);
  20493. * // => 1
  20494. *
  20495. * _.head([]);
  20496. * // => undefined
  20497. */
  20498. function head(array) {
  20499. return (array && array.length) ? array[0] : undefined;
  20500. }
  20501. /**
  20502. * Gets the index at which the first occurrence of `value` is found in `array`
  20503. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  20504. * for equality comparisons. If `fromIndex` is negative, it's used as the
  20505. * offset from the end of `array`.
  20506. *
  20507. * @static
  20508. * @memberOf _
  20509. * @since 0.1.0
  20510. * @category Array
  20511. * @param {Array} array The array to inspect.
  20512. * @param {*} value The value to search for.
  20513. * @param {number} [fromIndex=0] The index to search from.
  20514. * @returns {number} Returns the index of the matched value, else `-1`.
  20515. * @example
  20516. *
  20517. * _.indexOf([1, 2, 1, 2], 2);
  20518. * // => 1
  20519. *
  20520. * // Search from the `fromIndex`.
  20521. * _.indexOf([1, 2, 1, 2], 2, 2);
  20522. * // => 3
  20523. */
  20524. function indexOf(array, value, fromIndex) {
  20525. var length = array == null ? 0 : array.length;
  20526. if (!length) {
  20527. return -1;
  20528. }
  20529. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  20530. if (index < 0) {
  20531. index = nativeMax(length + index, 0);
  20532. }
  20533. return baseIndexOf(array, value, index);
  20534. }
  20535. /**
  20536. * Gets all but the last element of `array`.
  20537. *
  20538. * @static
  20539. * @memberOf _
  20540. * @since 0.1.0
  20541. * @category Array
  20542. * @param {Array} array The array to query.
  20543. * @returns {Array} Returns the slice of `array`.
  20544. * @example
  20545. *
  20546. * _.initial([1, 2, 3]);
  20547. * // => [1, 2]
  20548. */
  20549. function initial(array) {
  20550. var length = array == null ? 0 : array.length;
  20551. return length ? baseSlice(array, 0, -1) : [];
  20552. }
  20553. /**
  20554. * Creates an array of unique values that are included in all given arrays
  20555. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  20556. * for equality comparisons. The order and references of result values are
  20557. * determined by the first array.
  20558. *
  20559. * @static
  20560. * @memberOf _
  20561. * @since 0.1.0
  20562. * @category Array
  20563. * @param {...Array} [arrays] The arrays to inspect.
  20564. * @returns {Array} Returns the new array of intersecting values.
  20565. * @example
  20566. *
  20567. * _.intersection([2, 1], [2, 3]);
  20568. * // => [2]
  20569. */
  20570. var intersection = baseRest(function(arrays) {
  20571. var mapped = arrayMap(arrays, castArrayLikeObject);
  20572. return (mapped.length && mapped[0] === arrays[0])
  20573. ? baseIntersection(mapped)
  20574. : [];
  20575. });
  20576. /**
  20577. * This method is like `_.intersection` except that it accepts `iteratee`
  20578. * which is invoked for each element of each `arrays` to generate the criterion
  20579. * by which they're compared. The order and references of result values are
  20580. * determined by the first array. The iteratee is invoked with one argument:
  20581. * (value).
  20582. *
  20583. * @static
  20584. * @memberOf _
  20585. * @since 4.0.0
  20586. * @category Array
  20587. * @param {...Array} [arrays] The arrays to inspect.
  20588. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  20589. * @returns {Array} Returns the new array of intersecting values.
  20590. * @example
  20591. *
  20592. * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  20593. * // => [2.1]
  20594. *
  20595. * // The `_.property` iteratee shorthand.
  20596. * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  20597. * // => [{ 'x': 1 }]
  20598. */
  20599. var intersectionBy = baseRest(function(arrays) {
  20600. var iteratee = last(arrays),
  20601. mapped = arrayMap(arrays, castArrayLikeObject);
  20602. if (iteratee === last(mapped)) {
  20603. iteratee = undefined;
  20604. } else {
  20605. mapped.pop();
  20606. }
  20607. return (mapped.length && mapped[0] === arrays[0])
  20608. ? baseIntersection(mapped, getIteratee(iteratee, 2))
  20609. : [];
  20610. });
  20611. /**
  20612. * This method is like `_.intersection` except that it accepts `comparator`
  20613. * which is invoked to compare elements of `arrays`. The order and references
  20614. * of result values are determined by the first array. The comparator is
  20615. * invoked with two arguments: (arrVal, othVal).
  20616. *
  20617. * @static
  20618. * @memberOf _
  20619. * @since 4.0.0
  20620. * @category Array
  20621. * @param {...Array} [arrays] The arrays to inspect.
  20622. * @param {Function} [comparator] The comparator invoked per element.
  20623. * @returns {Array} Returns the new array of intersecting values.
  20624. * @example
  20625. *
  20626. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  20627. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  20628. *
  20629. * _.intersectionWith(objects, others, _.isEqual);
  20630. * // => [{ 'x': 1, 'y': 2 }]
  20631. */
  20632. var intersectionWith = baseRest(function(arrays) {
  20633. var comparator = last(arrays),
  20634. mapped = arrayMap(arrays, castArrayLikeObject);
  20635. comparator = typeof comparator == 'function' ? comparator : undefined;
  20636. if (comparator) {
  20637. mapped.pop();
  20638. }
  20639. return (mapped.length && mapped[0] === arrays[0])
  20640. ? baseIntersection(mapped, undefined, comparator)
  20641. : [];
  20642. });
  20643. /**
  20644. * Converts all elements in `array` into a string separated by `separator`.
  20645. *
  20646. * @static
  20647. * @memberOf _
  20648. * @since 4.0.0
  20649. * @category Array
  20650. * @param {Array} array The array to convert.
  20651. * @param {string} [separator=','] The element separator.
  20652. * @returns {string} Returns the joined string.
  20653. * @example
  20654. *
  20655. * _.join(['a', 'b', 'c'], '~');
  20656. * // => 'a~b~c'
  20657. */
  20658. function join(array, separator) {
  20659. return array == null ? '' : nativeJoin.call(array, separator);
  20660. }
  20661. /**
  20662. * Gets the last element of `array`.
  20663. *
  20664. * @static
  20665. * @memberOf _
  20666. * @since 0.1.0
  20667. * @category Array
  20668. * @param {Array} array The array to query.
  20669. * @returns {*} Returns the last element of `array`.
  20670. * @example
  20671. *
  20672. * _.last([1, 2, 3]);
  20673. * // => 3
  20674. */
  20675. function last(array) {
  20676. var length = array == null ? 0 : array.length;
  20677. return length ? array[length - 1] : undefined;
  20678. }
  20679. /**
  20680. * This method is like `_.indexOf` except that it iterates over elements of
  20681. * `array` from right to left.
  20682. *
  20683. * @static
  20684. * @memberOf _
  20685. * @since 0.1.0
  20686. * @category Array
  20687. * @param {Array} array The array to inspect.
  20688. * @param {*} value The value to search for.
  20689. * @param {number} [fromIndex=array.length-1] The index to search from.
  20690. * @returns {number} Returns the index of the matched value, else `-1`.
  20691. * @example
  20692. *
  20693. * _.lastIndexOf([1, 2, 1, 2], 2);
  20694. * // => 3
  20695. *
  20696. * // Search from the `fromIndex`.
  20697. * _.lastIndexOf([1, 2, 1, 2], 2, 2);
  20698. * // => 1
  20699. */
  20700. function lastIndexOf(array, value, fromIndex) {
  20701. var length = array == null ? 0 : array.length;
  20702. if (!length) {
  20703. return -1;
  20704. }
  20705. var index = length;
  20706. if (fromIndex !== undefined) {
  20707. index = toInteger(fromIndex);
  20708. index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
  20709. }
  20710. return value === value
  20711. ? strictLastIndexOf(array, value, index)
  20712. : baseFindIndex(array, baseIsNaN, index, true);
  20713. }
  20714. /**
  20715. * Gets the element at index `n` of `array`. If `n` is negative, the nth
  20716. * element from the end is returned.
  20717. *
  20718. * @static
  20719. * @memberOf _
  20720. * @since 4.11.0
  20721. * @category Array
  20722. * @param {Array} array The array to query.
  20723. * @param {number} [n=0] The index of the element to return.
  20724. * @returns {*} Returns the nth element of `array`.
  20725. * @example
  20726. *
  20727. * var array = ['a', 'b', 'c', 'd'];
  20728. *
  20729. * _.nth(array, 1);
  20730. * // => 'b'
  20731. *
  20732. * _.nth(array, -2);
  20733. * // => 'c';
  20734. */
  20735. function nth(array, n) {
  20736. return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
  20737. }
  20738. /**
  20739. * Removes all given values from `array` using
  20740. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  20741. * for equality comparisons.
  20742. *
  20743. * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
  20744. * to remove elements from an array by predicate.
  20745. *
  20746. * @static
  20747. * @memberOf _
  20748. * @since 2.0.0
  20749. * @category Array
  20750. * @param {Array} array The array to modify.
  20751. * @param {...*} [values] The values to remove.
  20752. * @returns {Array} Returns `array`.
  20753. * @example
  20754. *
  20755. * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  20756. *
  20757. * _.pull(array, 'a', 'c');
  20758. * console.log(array);
  20759. * // => ['b', 'b']
  20760. */
  20761. var pull = baseRest(pullAll);
  20762. /**
  20763. * This method is like `_.pull` except that it accepts an array of values to remove.
  20764. *
  20765. * **Note:** Unlike `_.difference`, this method mutates `array`.
  20766. *
  20767. * @static
  20768. * @memberOf _
  20769. * @since 4.0.0
  20770. * @category Array
  20771. * @param {Array} array The array to modify.
  20772. * @param {Array} values The values to remove.
  20773. * @returns {Array} Returns `array`.
  20774. * @example
  20775. *
  20776. * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  20777. *
  20778. * _.pullAll(array, ['a', 'c']);
  20779. * console.log(array);
  20780. * // => ['b', 'b']
  20781. */
  20782. function pullAll(array, values) {
  20783. return (array && array.length && values && values.length)
  20784. ? basePullAll(array, values)
  20785. : array;
  20786. }
  20787. /**
  20788. * This method is like `_.pullAll` except that it accepts `iteratee` which is
  20789. * invoked for each element of `array` and `values` to generate the criterion
  20790. * by which they're compared. The iteratee is invoked with one argument: (value).
  20791. *
  20792. * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
  20793. *
  20794. * @static
  20795. * @memberOf _
  20796. * @since 4.0.0
  20797. * @category Array
  20798. * @param {Array} array The array to modify.
  20799. * @param {Array} values The values to remove.
  20800. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  20801. * @returns {Array} Returns `array`.
  20802. * @example
  20803. *
  20804. * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
  20805. *
  20806. * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
  20807. * console.log(array);
  20808. * // => [{ 'x': 2 }]
  20809. */
  20810. function pullAllBy(array, values, iteratee) {
  20811. return (array && array.length && values && values.length)
  20812. ? basePullAll(array, values, getIteratee(iteratee, 2))
  20813. : array;
  20814. }
  20815. /**
  20816. * This method is like `_.pullAll` except that it accepts `comparator` which
  20817. * is invoked to compare elements of `array` to `values`. The comparator is
  20818. * invoked with two arguments: (arrVal, othVal).
  20819. *
  20820. * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
  20821. *
  20822. * @static
  20823. * @memberOf _
  20824. * @since 4.6.0
  20825. * @category Array
  20826. * @param {Array} array The array to modify.
  20827. * @param {Array} values The values to remove.
  20828. * @param {Function} [comparator] The comparator invoked per element.
  20829. * @returns {Array} Returns `array`.
  20830. * @example
  20831. *
  20832. * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
  20833. *
  20834. * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
  20835. * console.log(array);
  20836. * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
  20837. */
  20838. function pullAllWith(array, values, comparator) {
  20839. return (array && array.length && values && values.length)
  20840. ? basePullAll(array, values, undefined, comparator)
  20841. : array;
  20842. }
  20843. /**
  20844. * Removes elements from `array` corresponding to `indexes` and returns an
  20845. * array of removed elements.
  20846. *
  20847. * **Note:** Unlike `_.at`, this method mutates `array`.
  20848. *
  20849. * @static
  20850. * @memberOf _
  20851. * @since 3.0.0
  20852. * @category Array
  20853. * @param {Array} array The array to modify.
  20854. * @param {...(number|number[])} [indexes] The indexes of elements to remove.
  20855. * @returns {Array} Returns the new array of removed elements.
  20856. * @example
  20857. *
  20858. * var array = ['a', 'b', 'c', 'd'];
  20859. * var pulled = _.pullAt(array, [1, 3]);
  20860. *
  20861. * console.log(array);
  20862. * // => ['a', 'c']
  20863. *
  20864. * console.log(pulled);
  20865. * // => ['b', 'd']
  20866. */
  20867. var pullAt = flatRest(function(array, indexes) {
  20868. var length = array == null ? 0 : array.length,
  20869. result = baseAt(array, indexes);
  20870. basePullAt(array, arrayMap(indexes, function(index) {
  20871. return isIndex(index, length) ? +index : index;
  20872. }).sort(compareAscending));
  20873. return result;
  20874. });
  20875. /**
  20876. * Removes all elements from `array` that `predicate` returns truthy for
  20877. * and returns an array of the removed elements. The predicate is invoked
  20878. * with three arguments: (value, index, array).
  20879. *
  20880. * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
  20881. * to pull elements from an array by value.
  20882. *
  20883. * @static
  20884. * @memberOf _
  20885. * @since 2.0.0
  20886. * @category Array
  20887. * @param {Array} array The array to modify.
  20888. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  20889. * @returns {Array} Returns the new array of removed elements.
  20890. * @example
  20891. *
  20892. * var array = [1, 2, 3, 4];
  20893. * var evens = _.remove(array, function(n) {
  20894. * return n % 2 == 0;
  20895. * });
  20896. *
  20897. * console.log(array);
  20898. * // => [1, 3]
  20899. *
  20900. * console.log(evens);
  20901. * // => [2, 4]
  20902. */
  20903. function remove(array, predicate) {
  20904. var result = [];
  20905. if (!(array && array.length)) {
  20906. return result;
  20907. }
  20908. var index = -1,
  20909. indexes = [],
  20910. length = array.length;
  20911. predicate = getIteratee(predicate, 3);
  20912. while (++index < length) {
  20913. var value = array[index];
  20914. if (predicate(value, index, array)) {
  20915. result.push(value);
  20916. indexes.push(index);
  20917. }
  20918. }
  20919. basePullAt(array, indexes);
  20920. return result;
  20921. }
  20922. /**
  20923. * Reverses `array` so that the first element becomes the last, the second
  20924. * element becomes the second to last, and so on.
  20925. *
  20926. * **Note:** This method mutates `array` and is based on
  20927. * [`Array#reverse`](https://mdn.io/Array/reverse).
  20928. *
  20929. * @static
  20930. * @memberOf _
  20931. * @since 4.0.0
  20932. * @category Array
  20933. * @param {Array} array The array to modify.
  20934. * @returns {Array} Returns `array`.
  20935. * @example
  20936. *
  20937. * var array = [1, 2, 3];
  20938. *
  20939. * _.reverse(array);
  20940. * // => [3, 2, 1]
  20941. *
  20942. * console.log(array);
  20943. * // => [3, 2, 1]
  20944. */
  20945. function reverse(array) {
  20946. return array == null ? array : nativeReverse.call(array);
  20947. }
  20948. /**
  20949. * Creates a slice of `array` from `start` up to, but not including, `end`.
  20950. *
  20951. * **Note:** This method is used instead of
  20952. * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
  20953. * returned.
  20954. *
  20955. * @static
  20956. * @memberOf _
  20957. * @since 3.0.0
  20958. * @category Array
  20959. * @param {Array} array The array to slice.
  20960. * @param {number} [start=0] The start position.
  20961. * @param {number} [end=array.length] The end position.
  20962. * @returns {Array} Returns the slice of `array`.
  20963. */
  20964. function slice(array, start, end) {
  20965. var length = array == null ? 0 : array.length;
  20966. if (!length) {
  20967. return [];
  20968. }
  20969. if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
  20970. start = 0;
  20971. end = length;
  20972. }
  20973. else {
  20974. start = start == null ? 0 : toInteger(start);
  20975. end = end === undefined ? length : toInteger(end);
  20976. }
  20977. return baseSlice(array, start, end);
  20978. }
  20979. /**
  20980. * Uses a binary search to determine the lowest index at which `value`
  20981. * should be inserted into `array` in order to maintain its sort order.
  20982. *
  20983. * @static
  20984. * @memberOf _
  20985. * @since 0.1.0
  20986. * @category Array
  20987. * @param {Array} array The sorted array to inspect.
  20988. * @param {*} value The value to evaluate.
  20989. * @returns {number} Returns the index at which `value` should be inserted
  20990. * into `array`.
  20991. * @example
  20992. *
  20993. * _.sortedIndex([30, 50], 40);
  20994. * // => 1
  20995. */
  20996. function sortedIndex(array, value) {
  20997. return baseSortedIndex(array, value);
  20998. }
  20999. /**
  21000. * This method is like `_.sortedIndex` except that it accepts `iteratee`
  21001. * which is invoked for `value` and each element of `array` to compute their
  21002. * sort ranking. The iteratee is invoked with one argument: (value).
  21003. *
  21004. * @static
  21005. * @memberOf _
  21006. * @since 4.0.0
  21007. * @category Array
  21008. * @param {Array} array The sorted array to inspect.
  21009. * @param {*} value The value to evaluate.
  21010. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  21011. * @returns {number} Returns the index at which `value` should be inserted
  21012. * into `array`.
  21013. * @example
  21014. *
  21015. * var objects = [{ 'x': 4 }, { 'x': 5 }];
  21016. *
  21017. * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
  21018. * // => 0
  21019. *
  21020. * // The `_.property` iteratee shorthand.
  21021. * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
  21022. * // => 0
  21023. */
  21024. function sortedIndexBy(array, value, iteratee) {
  21025. return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
  21026. }
  21027. /**
  21028. * This method is like `_.indexOf` except that it performs a binary
  21029. * search on a sorted `array`.
  21030. *
  21031. * @static
  21032. * @memberOf _
  21033. * @since 4.0.0
  21034. * @category Array
  21035. * @param {Array} array The array to inspect.
  21036. * @param {*} value The value to search for.
  21037. * @returns {number} Returns the index of the matched value, else `-1`.
  21038. * @example
  21039. *
  21040. * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
  21041. * // => 1
  21042. */
  21043. function sortedIndexOf(array, value) {
  21044. var length = array == null ? 0 : array.length;
  21045. if (length) {
  21046. var index = baseSortedIndex(array, value);
  21047. if (index < length && eq(array[index], value)) {
  21048. return index;
  21049. }
  21050. }
  21051. return -1;
  21052. }
  21053. /**
  21054. * This method is like `_.sortedIndex` except that it returns the highest
  21055. * index at which `value` should be inserted into `array` in order to
  21056. * maintain its sort order.
  21057. *
  21058. * @static
  21059. * @memberOf _
  21060. * @since 3.0.0
  21061. * @category Array
  21062. * @param {Array} array The sorted array to inspect.
  21063. * @param {*} value The value to evaluate.
  21064. * @returns {number} Returns the index at which `value` should be inserted
  21065. * into `array`.
  21066. * @example
  21067. *
  21068. * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
  21069. * // => 4
  21070. */
  21071. function sortedLastIndex(array, value) {
  21072. return baseSortedIndex(array, value, true);
  21073. }
  21074. /**
  21075. * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
  21076. * which is invoked for `value` and each element of `array` to compute their
  21077. * sort ranking. The iteratee is invoked with one argument: (value).
  21078. *
  21079. * @static
  21080. * @memberOf _
  21081. * @since 4.0.0
  21082. * @category Array
  21083. * @param {Array} array The sorted array to inspect.
  21084. * @param {*} value The value to evaluate.
  21085. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  21086. * @returns {number} Returns the index at which `value` should be inserted
  21087. * into `array`.
  21088. * @example
  21089. *
  21090. * var objects = [{ 'x': 4 }, { 'x': 5 }];
  21091. *
  21092. * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
  21093. * // => 1
  21094. *
  21095. * // The `_.property` iteratee shorthand.
  21096. * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
  21097. * // => 1
  21098. */
  21099. function sortedLastIndexBy(array, value, iteratee) {
  21100. return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
  21101. }
  21102. /**
  21103. * This method is like `_.lastIndexOf` except that it performs a binary
  21104. * search on a sorted `array`.
  21105. *
  21106. * @static
  21107. * @memberOf _
  21108. * @since 4.0.0
  21109. * @category Array
  21110. * @param {Array} array The array to inspect.
  21111. * @param {*} value The value to search for.
  21112. * @returns {number} Returns the index of the matched value, else `-1`.
  21113. * @example
  21114. *
  21115. * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
  21116. * // => 3
  21117. */
  21118. function sortedLastIndexOf(array, value) {
  21119. var length = array == null ? 0 : array.length;
  21120. if (length) {
  21121. var index = baseSortedIndex(array, value, true) - 1;
  21122. if (eq(array[index], value)) {
  21123. return index;
  21124. }
  21125. }
  21126. return -1;
  21127. }
  21128. /**
  21129. * This method is like `_.uniq` except that it's designed and optimized
  21130. * for sorted arrays.
  21131. *
  21132. * @static
  21133. * @memberOf _
  21134. * @since 4.0.0
  21135. * @category Array
  21136. * @param {Array} array The array to inspect.
  21137. * @returns {Array} Returns the new duplicate free array.
  21138. * @example
  21139. *
  21140. * _.sortedUniq([1, 1, 2]);
  21141. * // => [1, 2]
  21142. */
  21143. function sortedUniq(array) {
  21144. return (array && array.length)
  21145. ? baseSortedUniq(array)
  21146. : [];
  21147. }
  21148. /**
  21149. * This method is like `_.uniqBy` except that it's designed and optimized
  21150. * for sorted arrays.
  21151. *
  21152. * @static
  21153. * @memberOf _
  21154. * @since 4.0.0
  21155. * @category Array
  21156. * @param {Array} array The array to inspect.
  21157. * @param {Function} [iteratee] The iteratee invoked per element.
  21158. * @returns {Array} Returns the new duplicate free array.
  21159. * @example
  21160. *
  21161. * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
  21162. * // => [1.1, 2.3]
  21163. */
  21164. function sortedUniqBy(array, iteratee) {
  21165. return (array && array.length)
  21166. ? baseSortedUniq(array, getIteratee(iteratee, 2))
  21167. : [];
  21168. }
  21169. /**
  21170. * Gets all but the first element of `array`.
  21171. *
  21172. * @static
  21173. * @memberOf _
  21174. * @since 4.0.0
  21175. * @category Array
  21176. * @param {Array} array The array to query.
  21177. * @returns {Array} Returns the slice of `array`.
  21178. * @example
  21179. *
  21180. * _.tail([1, 2, 3]);
  21181. * // => [2, 3]
  21182. */
  21183. function tail(array) {
  21184. var length = array == null ? 0 : array.length;
  21185. return length ? baseSlice(array, 1, length) : [];
  21186. }
  21187. /**
  21188. * Creates a slice of `array` with `n` elements taken from the beginning.
  21189. *
  21190. * @static
  21191. * @memberOf _
  21192. * @since 0.1.0
  21193. * @category Array
  21194. * @param {Array} array The array to query.
  21195. * @param {number} [n=1] The number of elements to take.
  21196. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  21197. * @returns {Array} Returns the slice of `array`.
  21198. * @example
  21199. *
  21200. * _.take([1, 2, 3]);
  21201. * // => [1]
  21202. *
  21203. * _.take([1, 2, 3], 2);
  21204. * // => [1, 2]
  21205. *
  21206. * _.take([1, 2, 3], 5);
  21207. * // => [1, 2, 3]
  21208. *
  21209. * _.take([1, 2, 3], 0);
  21210. * // => []
  21211. */
  21212. function take(array, n, guard) {
  21213. if (!(array && array.length)) {
  21214. return [];
  21215. }
  21216. n = (guard || n === undefined) ? 1 : toInteger(n);
  21217. return baseSlice(array, 0, n < 0 ? 0 : n);
  21218. }
  21219. /**
  21220. * Creates a slice of `array` with `n` elements taken from the end.
  21221. *
  21222. * @static
  21223. * @memberOf _
  21224. * @since 3.0.0
  21225. * @category Array
  21226. * @param {Array} array The array to query.
  21227. * @param {number} [n=1] The number of elements to take.
  21228. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  21229. * @returns {Array} Returns the slice of `array`.
  21230. * @example
  21231. *
  21232. * _.takeRight([1, 2, 3]);
  21233. * // => [3]
  21234. *
  21235. * _.takeRight([1, 2, 3], 2);
  21236. * // => [2, 3]
  21237. *
  21238. * _.takeRight([1, 2, 3], 5);
  21239. * // => [1, 2, 3]
  21240. *
  21241. * _.takeRight([1, 2, 3], 0);
  21242. * // => []
  21243. */
  21244. function takeRight(array, n, guard) {
  21245. var length = array == null ? 0 : array.length;
  21246. if (!length) {
  21247. return [];
  21248. }
  21249. n = (guard || n === undefined) ? 1 : toInteger(n);
  21250. n = length - n;
  21251. return baseSlice(array, n < 0 ? 0 : n, length);
  21252. }
  21253. /**
  21254. * Creates a slice of `array` with elements taken from the end. Elements are
  21255. * taken until `predicate` returns falsey. The predicate is invoked with
  21256. * three arguments: (value, index, array).
  21257. *
  21258. * @static
  21259. * @memberOf _
  21260. * @since 3.0.0
  21261. * @category Array
  21262. * @param {Array} array The array to query.
  21263. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  21264. * @returns {Array} Returns the slice of `array`.
  21265. * @example
  21266. *
  21267. * var users = [
  21268. * { 'user': 'barney', 'active': true },
  21269. * { 'user': 'fred', 'active': false },
  21270. * { 'user': 'pebbles', 'active': false }
  21271. * ];
  21272. *
  21273. * _.takeRightWhile(users, function(o) { return !o.active; });
  21274. * // => objects for ['fred', 'pebbles']
  21275. *
  21276. * // The `_.matches` iteratee shorthand.
  21277. * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
  21278. * // => objects for ['pebbles']
  21279. *
  21280. * // The `_.matchesProperty` iteratee shorthand.
  21281. * _.takeRightWhile(users, ['active', false]);
  21282. * // => objects for ['fred', 'pebbles']
  21283. *
  21284. * // The `_.property` iteratee shorthand.
  21285. * _.takeRightWhile(users, 'active');
  21286. * // => []
  21287. */
  21288. function takeRightWhile(array, predicate) {
  21289. return (array && array.length)
  21290. ? baseWhile(array, getIteratee(predicate, 3), false, true)
  21291. : [];
  21292. }
  21293. /**
  21294. * Creates a slice of `array` with elements taken from the beginning. Elements
  21295. * are taken until `predicate` returns falsey. The predicate is invoked with
  21296. * three arguments: (value, index, array).
  21297. *
  21298. * @static
  21299. * @memberOf _
  21300. * @since 3.0.0
  21301. * @category Array
  21302. * @param {Array} array The array to query.
  21303. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  21304. * @returns {Array} Returns the slice of `array`.
  21305. * @example
  21306. *
  21307. * var users = [
  21308. * { 'user': 'barney', 'active': false },
  21309. * { 'user': 'fred', 'active': false },
  21310. * { 'user': 'pebbles', 'active': true }
  21311. * ];
  21312. *
  21313. * _.takeWhile(users, function(o) { return !o.active; });
  21314. * // => objects for ['barney', 'fred']
  21315. *
  21316. * // The `_.matches` iteratee shorthand.
  21317. * _.takeWhile(users, { 'user': 'barney', 'active': false });
  21318. * // => objects for ['barney']
  21319. *
  21320. * // The `_.matchesProperty` iteratee shorthand.
  21321. * _.takeWhile(users, ['active', false]);
  21322. * // => objects for ['barney', 'fred']
  21323. *
  21324. * // The `_.property` iteratee shorthand.
  21325. * _.takeWhile(users, 'active');
  21326. * // => []
  21327. */
  21328. function takeWhile(array, predicate) {
  21329. return (array && array.length)
  21330. ? baseWhile(array, getIteratee(predicate, 3))
  21331. : [];
  21332. }
  21333. /**
  21334. * Creates an array of unique values, in order, from all given arrays using
  21335. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  21336. * for equality comparisons.
  21337. *
  21338. * @static
  21339. * @memberOf _
  21340. * @since 0.1.0
  21341. * @category Array
  21342. * @param {...Array} [arrays] The arrays to inspect.
  21343. * @returns {Array} Returns the new array of combined values.
  21344. * @example
  21345. *
  21346. * _.union([2], [1, 2]);
  21347. * // => [2, 1]
  21348. */
  21349. var union = baseRest(function(arrays) {
  21350. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
  21351. });
  21352. /**
  21353. * This method is like `_.union` except that it accepts `iteratee` which is
  21354. * invoked for each element of each `arrays` to generate the criterion by
  21355. * which uniqueness is computed. Result values are chosen from the first
  21356. * array in which the value occurs. The iteratee is invoked with one argument:
  21357. * (value).
  21358. *
  21359. * @static
  21360. * @memberOf _
  21361. * @since 4.0.0
  21362. * @category Array
  21363. * @param {...Array} [arrays] The arrays to inspect.
  21364. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  21365. * @returns {Array} Returns the new array of combined values.
  21366. * @example
  21367. *
  21368. * _.unionBy([2.1], [1.2, 2.3], Math.floor);
  21369. * // => [2.1, 1.2]
  21370. *
  21371. * // The `_.property` iteratee shorthand.
  21372. * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  21373. * // => [{ 'x': 1 }, { 'x': 2 }]
  21374. */
  21375. var unionBy = baseRest(function(arrays) {
  21376. var iteratee = last(arrays);
  21377. if (isArrayLikeObject(iteratee)) {
  21378. iteratee = undefined;
  21379. }
  21380. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
  21381. });
  21382. /**
  21383. * This method is like `_.union` except that it accepts `comparator` which
  21384. * is invoked to compare elements of `arrays`. Result values are chosen from
  21385. * the first array in which the value occurs. The comparator is invoked
  21386. * with two arguments: (arrVal, othVal).
  21387. *
  21388. * @static
  21389. * @memberOf _
  21390. * @since 4.0.0
  21391. * @category Array
  21392. * @param {...Array} [arrays] The arrays to inspect.
  21393. * @param {Function} [comparator] The comparator invoked per element.
  21394. * @returns {Array} Returns the new array of combined values.
  21395. * @example
  21396. *
  21397. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  21398. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  21399. *
  21400. * _.unionWith(objects, others, _.isEqual);
  21401. * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  21402. */
  21403. var unionWith = baseRest(function(arrays) {
  21404. var comparator = last(arrays);
  21405. comparator = typeof comparator == 'function' ? comparator : undefined;
  21406. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
  21407. });
  21408. /**
  21409. * Creates a duplicate-free version of an array, using
  21410. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  21411. * for equality comparisons, in which only the first occurrence of each element
  21412. * is kept. The order of result values is determined by the order they occur
  21413. * in the array.
  21414. *
  21415. * @static
  21416. * @memberOf _
  21417. * @since 0.1.0
  21418. * @category Array
  21419. * @param {Array} array The array to inspect.
  21420. * @returns {Array} Returns the new duplicate free array.
  21421. * @example
  21422. *
  21423. * _.uniq([2, 1, 2]);
  21424. * // => [2, 1]
  21425. */
  21426. function uniq(array) {
  21427. return (array && array.length) ? baseUniq(array) : [];
  21428. }
  21429. /**
  21430. * This method is like `_.uniq` except that it accepts `iteratee` which is
  21431. * invoked for each element in `array` to generate the criterion by which
  21432. * uniqueness is computed. The order of result values is determined by the
  21433. * order they occur in the array. The iteratee is invoked with one argument:
  21434. * (value).
  21435. *
  21436. * @static
  21437. * @memberOf _
  21438. * @since 4.0.0
  21439. * @category Array
  21440. * @param {Array} array The array to inspect.
  21441. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  21442. * @returns {Array} Returns the new duplicate free array.
  21443. * @example
  21444. *
  21445. * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
  21446. * // => [2.1, 1.2]
  21447. *
  21448. * // The `_.property` iteratee shorthand.
  21449. * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
  21450. * // => [{ 'x': 1 }, { 'x': 2 }]
  21451. */
  21452. function uniqBy(array, iteratee) {
  21453. return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
  21454. }
  21455. /**
  21456. * This method is like `_.uniq` except that it accepts `comparator` which
  21457. * is invoked to compare elements of `array`. The order of result values is
  21458. * determined by the order they occur in the array.The comparator is invoked
  21459. * with two arguments: (arrVal, othVal).
  21460. *
  21461. * @static
  21462. * @memberOf _
  21463. * @since 4.0.0
  21464. * @category Array
  21465. * @param {Array} array The array to inspect.
  21466. * @param {Function} [comparator] The comparator invoked per element.
  21467. * @returns {Array} Returns the new duplicate free array.
  21468. * @example
  21469. *
  21470. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
  21471. *
  21472. * _.uniqWith(objects, _.isEqual);
  21473. * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
  21474. */
  21475. function uniqWith(array, comparator) {
  21476. comparator = typeof comparator == 'function' ? comparator : undefined;
  21477. return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
  21478. }
  21479. /**
  21480. * This method is like `_.zip` except that it accepts an array of grouped
  21481. * elements and creates an array regrouping the elements to their pre-zip
  21482. * configuration.
  21483. *
  21484. * @static
  21485. * @memberOf _
  21486. * @since 1.2.0
  21487. * @category Array
  21488. * @param {Array} array The array of grouped elements to process.
  21489. * @returns {Array} Returns the new array of regrouped elements.
  21490. * @example
  21491. *
  21492. * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
  21493. * // => [['a', 1, true], ['b', 2, false]]
  21494. *
  21495. * _.unzip(zipped);
  21496. * // => [['a', 'b'], [1, 2], [true, false]]
  21497. */
  21498. function unzip(array) {
  21499. if (!(array && array.length)) {
  21500. return [];
  21501. }
  21502. var length = 0;
  21503. array = arrayFilter(array, function(group) {
  21504. if (isArrayLikeObject(group)) {
  21505. length = nativeMax(group.length, length);
  21506. return true;
  21507. }
  21508. });
  21509. return baseTimes(length, function(index) {
  21510. return arrayMap(array, baseProperty(index));
  21511. });
  21512. }
  21513. /**
  21514. * This method is like `_.unzip` except that it accepts `iteratee` to specify
  21515. * how regrouped values should be combined. The iteratee is invoked with the
  21516. * elements of each group: (...group).
  21517. *
  21518. * @static
  21519. * @memberOf _
  21520. * @since 3.8.0
  21521. * @category Array
  21522. * @param {Array} array The array of grouped elements to process.
  21523. * @param {Function} [iteratee=_.identity] The function to combine
  21524. * regrouped values.
  21525. * @returns {Array} Returns the new array of regrouped elements.
  21526. * @example
  21527. *
  21528. * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
  21529. * // => [[1, 10, 100], [2, 20, 200]]
  21530. *
  21531. * _.unzipWith(zipped, _.add);
  21532. * // => [3, 30, 300]
  21533. */
  21534. function unzipWith(array, iteratee) {
  21535. if (!(array && array.length)) {
  21536. return [];
  21537. }
  21538. var result = unzip(array);
  21539. if (iteratee == null) {
  21540. return result;
  21541. }
  21542. return arrayMap(result, function(group) {
  21543. return apply(iteratee, undefined, group);
  21544. });
  21545. }
  21546. /**
  21547. * Creates an array excluding all given values using
  21548. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  21549. * for equality comparisons.
  21550. *
  21551. * **Note:** Unlike `_.pull`, this method returns a new array.
  21552. *
  21553. * @static
  21554. * @memberOf _
  21555. * @since 0.1.0
  21556. * @category Array
  21557. * @param {Array} array The array to inspect.
  21558. * @param {...*} [values] The values to exclude.
  21559. * @returns {Array} Returns the new array of filtered values.
  21560. * @see _.difference, _.xor
  21561. * @example
  21562. *
  21563. * _.without([2, 1, 2, 3], 1, 2);
  21564. * // => [3]
  21565. */
  21566. var without = baseRest(function(array, values) {
  21567. return isArrayLikeObject(array)
  21568. ? baseDifference(array, values)
  21569. : [];
  21570. });
  21571. /**
  21572. * Creates an array of unique values that is the
  21573. * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
  21574. * of the given arrays. The order of result values is determined by the order
  21575. * they occur in the arrays.
  21576. *
  21577. * @static
  21578. * @memberOf _
  21579. * @since 2.4.0
  21580. * @category Array
  21581. * @param {...Array} [arrays] The arrays to inspect.
  21582. * @returns {Array} Returns the new array of filtered values.
  21583. * @see _.difference, _.without
  21584. * @example
  21585. *
  21586. * _.xor([2, 1], [2, 3]);
  21587. * // => [1, 3]
  21588. */
  21589. var xor = baseRest(function(arrays) {
  21590. return baseXor(arrayFilter(arrays, isArrayLikeObject));
  21591. });
  21592. /**
  21593. * This method is like `_.xor` except that it accepts `iteratee` which is
  21594. * invoked for each element of each `arrays` to generate the criterion by
  21595. * which by which they're compared. The order of result values is determined
  21596. * by the order they occur in the arrays. The iteratee is invoked with one
  21597. * argument: (value).
  21598. *
  21599. * @static
  21600. * @memberOf _
  21601. * @since 4.0.0
  21602. * @category Array
  21603. * @param {...Array} [arrays] The arrays to inspect.
  21604. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  21605. * @returns {Array} Returns the new array of filtered values.
  21606. * @example
  21607. *
  21608. * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  21609. * // => [1.2, 3.4]
  21610. *
  21611. * // The `_.property` iteratee shorthand.
  21612. * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  21613. * // => [{ 'x': 2 }]
  21614. */
  21615. var xorBy = baseRest(function(arrays) {
  21616. var iteratee = last(arrays);
  21617. if (isArrayLikeObject(iteratee)) {
  21618. iteratee = undefined;
  21619. }
  21620. return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
  21621. });
  21622. /**
  21623. * This method is like `_.xor` except that it accepts `comparator` which is
  21624. * invoked to compare elements of `arrays`. The order of result values is
  21625. * determined by the order they occur in the arrays. The comparator is invoked
  21626. * with two arguments: (arrVal, othVal).
  21627. *
  21628. * @static
  21629. * @memberOf _
  21630. * @since 4.0.0
  21631. * @category Array
  21632. * @param {...Array} [arrays] The arrays to inspect.
  21633. * @param {Function} [comparator] The comparator invoked per element.
  21634. * @returns {Array} Returns the new array of filtered values.
  21635. * @example
  21636. *
  21637. * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  21638. * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  21639. *
  21640. * _.xorWith(objects, others, _.isEqual);
  21641. * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  21642. */
  21643. var xorWith = baseRest(function(arrays) {
  21644. var comparator = last(arrays);
  21645. comparator = typeof comparator == 'function' ? comparator : undefined;
  21646. return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
  21647. });
  21648. /**
  21649. * Creates an array of grouped elements, the first of which contains the
  21650. * first elements of the given arrays, the second of which contains the
  21651. * second elements of the given arrays, and so on.
  21652. *
  21653. * @static
  21654. * @memberOf _
  21655. * @since 0.1.0
  21656. * @category Array
  21657. * @param {...Array} [arrays] The arrays to process.
  21658. * @returns {Array} Returns the new array of grouped elements.
  21659. * @example
  21660. *
  21661. * _.zip(['a', 'b'], [1, 2], [true, false]);
  21662. * // => [['a', 1, true], ['b', 2, false]]
  21663. */
  21664. var zip = baseRest(unzip);
  21665. /**
  21666. * This method is like `_.fromPairs` except that it accepts two arrays,
  21667. * one of property identifiers and one of corresponding values.
  21668. *
  21669. * @static
  21670. * @memberOf _
  21671. * @since 0.4.0
  21672. * @category Array
  21673. * @param {Array} [props=[]] The property identifiers.
  21674. * @param {Array} [values=[]] The property values.
  21675. * @returns {Object} Returns the new object.
  21676. * @example
  21677. *
  21678. * _.zipObject(['a', 'b'], [1, 2]);
  21679. * // => { 'a': 1, 'b': 2 }
  21680. */
  21681. function zipObject(props, values) {
  21682. return baseZipObject(props || [], values || [], assignValue);
  21683. }
  21684. /**
  21685. * This method is like `_.zipObject` except that it supports property paths.
  21686. *
  21687. * @static
  21688. * @memberOf _
  21689. * @since 4.1.0
  21690. * @category Array
  21691. * @param {Array} [props=[]] The property identifiers.
  21692. * @param {Array} [values=[]] The property values.
  21693. * @returns {Object} Returns the new object.
  21694. * @example
  21695. *
  21696. * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
  21697. * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
  21698. */
  21699. function zipObjectDeep(props, values) {
  21700. return baseZipObject(props || [], values || [], baseSet);
  21701. }
  21702. /**
  21703. * This method is like `_.zip` except that it accepts `iteratee` to specify
  21704. * how grouped values should be combined. The iteratee is invoked with the
  21705. * elements of each group: (...group).
  21706. *
  21707. * @static
  21708. * @memberOf _
  21709. * @since 3.8.0
  21710. * @category Array
  21711. * @param {...Array} [arrays] The arrays to process.
  21712. * @param {Function} [iteratee=_.identity] The function to combine
  21713. * grouped values.
  21714. * @returns {Array} Returns the new array of grouped elements.
  21715. * @example
  21716. *
  21717. * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
  21718. * return a + b + c;
  21719. * });
  21720. * // => [111, 222]
  21721. */
  21722. var zipWith = baseRest(function(arrays) {
  21723. var length = arrays.length,
  21724. iteratee = length > 1 ? arrays[length - 1] : undefined;
  21725. iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
  21726. return unzipWith(arrays, iteratee);
  21727. });
  21728. /*------------------------------------------------------------------------*/
  21729. /**
  21730. * Creates a `lodash` wrapper instance that wraps `value` with explicit method
  21731. * chain sequences enabled. The result of such sequences must be unwrapped
  21732. * with `_#value`.
  21733. *
  21734. * @static
  21735. * @memberOf _
  21736. * @since 1.3.0
  21737. * @category Seq
  21738. * @param {*} value The value to wrap.
  21739. * @returns {Object} Returns the new `lodash` wrapper instance.
  21740. * @example
  21741. *
  21742. * var users = [
  21743. * { 'user': 'barney', 'age': 36 },
  21744. * { 'user': 'fred', 'age': 40 },
  21745. * { 'user': 'pebbles', 'age': 1 }
  21746. * ];
  21747. *
  21748. * var youngest = _
  21749. * .chain(users)
  21750. * .sortBy('age')
  21751. * .map(function(o) {
  21752. * return o.user + ' is ' + o.age;
  21753. * })
  21754. * .head()
  21755. * .value();
  21756. * // => 'pebbles is 1'
  21757. */
  21758. function chain(value) {
  21759. var result = lodash(value);
  21760. result.__chain__ = true;
  21761. return result;
  21762. }
  21763. /**
  21764. * This method invokes `interceptor` and returns `value`. The interceptor
  21765. * is invoked with one argument; (value). The purpose of this method is to
  21766. * "tap into" a method chain sequence in order to modify intermediate results.
  21767. *
  21768. * @static
  21769. * @memberOf _
  21770. * @since 0.1.0
  21771. * @category Seq
  21772. * @param {*} value The value to provide to `interceptor`.
  21773. * @param {Function} interceptor The function to invoke.
  21774. * @returns {*} Returns `value`.
  21775. * @example
  21776. *
  21777. * _([1, 2, 3])
  21778. * .tap(function(array) {
  21779. * // Mutate input array.
  21780. * array.pop();
  21781. * })
  21782. * .reverse()
  21783. * .value();
  21784. * // => [2, 1]
  21785. */
  21786. function tap(value, interceptor) {
  21787. interceptor(value);
  21788. return value;
  21789. }
  21790. /**
  21791. * This method is like `_.tap` except that it returns the result of `interceptor`.
  21792. * The purpose of this method is to "pass thru" values replacing intermediate
  21793. * results in a method chain sequence.
  21794. *
  21795. * @static
  21796. * @memberOf _
  21797. * @since 3.0.0
  21798. * @category Seq
  21799. * @param {*} value The value to provide to `interceptor`.
  21800. * @param {Function} interceptor The function to invoke.
  21801. * @returns {*} Returns the result of `interceptor`.
  21802. * @example
  21803. *
  21804. * _(' abc ')
  21805. * .chain()
  21806. * .trim()
  21807. * .thru(function(value) {
  21808. * return [value];
  21809. * })
  21810. * .value();
  21811. * // => ['abc']
  21812. */
  21813. function thru(value, interceptor) {
  21814. return interceptor(value);
  21815. }
  21816. /**
  21817. * This method is the wrapper version of `_.at`.
  21818. *
  21819. * @name at
  21820. * @memberOf _
  21821. * @since 1.0.0
  21822. * @category Seq
  21823. * @param {...(string|string[])} [paths] The property paths to pick.
  21824. * @returns {Object} Returns the new `lodash` wrapper instance.
  21825. * @example
  21826. *
  21827. * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
  21828. *
  21829. * _(object).at(['a[0].b.c', 'a[1]']).value();
  21830. * // => [3, 4]
  21831. */
  21832. var wrapperAt = flatRest(function(paths) {
  21833. var length = paths.length,
  21834. start = length ? paths[0] : 0,
  21835. value = this.__wrapped__,
  21836. interceptor = function(object) { return baseAt(object, paths); };
  21837. if (length > 1 || this.__actions__.length ||
  21838. !(value instanceof LazyWrapper) || !isIndex(start)) {
  21839. return this.thru(interceptor);
  21840. }
  21841. value = value.slice(start, +start + (length ? 1 : 0));
  21842. value.__actions__.push({
  21843. 'func': thru,
  21844. 'args': [interceptor],
  21845. 'thisArg': undefined
  21846. });
  21847. return new LodashWrapper(value, this.__chain__).thru(function(array) {
  21848. if (length && !array.length) {
  21849. array.push(undefined);
  21850. }
  21851. return array;
  21852. });
  21853. });
  21854. /**
  21855. * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
  21856. *
  21857. * @name chain
  21858. * @memberOf _
  21859. * @since 0.1.0
  21860. * @category Seq
  21861. * @returns {Object} Returns the new `lodash` wrapper instance.
  21862. * @example
  21863. *
  21864. * var users = [
  21865. * { 'user': 'barney', 'age': 36 },
  21866. * { 'user': 'fred', 'age': 40 }
  21867. * ];
  21868. *
  21869. * // A sequence without explicit chaining.
  21870. * _(users).head();
  21871. * // => { 'user': 'barney', 'age': 36 }
  21872. *
  21873. * // A sequence with explicit chaining.
  21874. * _(users)
  21875. * .chain()
  21876. * .head()
  21877. * .pick('user')
  21878. * .value();
  21879. * // => { 'user': 'barney' }
  21880. */
  21881. function wrapperChain() {
  21882. return chain(this);
  21883. }
  21884. /**
  21885. * Executes the chain sequence and returns the wrapped result.
  21886. *
  21887. * @name commit
  21888. * @memberOf _
  21889. * @since 3.2.0
  21890. * @category Seq
  21891. * @returns {Object} Returns the new `lodash` wrapper instance.
  21892. * @example
  21893. *
  21894. * var array = [1, 2];
  21895. * var wrapped = _(array).push(3);
  21896. *
  21897. * console.log(array);
  21898. * // => [1, 2]
  21899. *
  21900. * wrapped = wrapped.commit();
  21901. * console.log(array);
  21902. * // => [1, 2, 3]
  21903. *
  21904. * wrapped.last();
  21905. * // => 3
  21906. *
  21907. * console.log(array);
  21908. * // => [1, 2, 3]
  21909. */
  21910. function wrapperCommit() {
  21911. return new LodashWrapper(this.value(), this.__chain__);
  21912. }
  21913. /**
  21914. * Gets the next value on a wrapped object following the
  21915. * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
  21916. *
  21917. * @name next
  21918. * @memberOf _
  21919. * @since 4.0.0
  21920. * @category Seq
  21921. * @returns {Object} Returns the next iterator value.
  21922. * @example
  21923. *
  21924. * var wrapped = _([1, 2]);
  21925. *
  21926. * wrapped.next();
  21927. * // => { 'done': false, 'value': 1 }
  21928. *
  21929. * wrapped.next();
  21930. * // => { 'done': false, 'value': 2 }
  21931. *
  21932. * wrapped.next();
  21933. * // => { 'done': true, 'value': undefined }
  21934. */
  21935. function wrapperNext() {
  21936. if (this.__values__ === undefined) {
  21937. this.__values__ = toArray(this.value());
  21938. }
  21939. var done = this.__index__ >= this.__values__.length,
  21940. value = done ? undefined : this.__values__[this.__index__++];
  21941. return { 'done': done, 'value': value };
  21942. }
  21943. /**
  21944. * Enables the wrapper to be iterable.
  21945. *
  21946. * @name Symbol.iterator
  21947. * @memberOf _
  21948. * @since 4.0.0
  21949. * @category Seq
  21950. * @returns {Object} Returns the wrapper object.
  21951. * @example
  21952. *
  21953. * var wrapped = _([1, 2]);
  21954. *
  21955. * wrapped[Symbol.iterator]() === wrapped;
  21956. * // => true
  21957. *
  21958. * Array.from(wrapped);
  21959. * // => [1, 2]
  21960. */
  21961. function wrapperToIterator() {
  21962. return this;
  21963. }
  21964. /**
  21965. * Creates a clone of the chain sequence planting `value` as the wrapped value.
  21966. *
  21967. * @name plant
  21968. * @memberOf _
  21969. * @since 3.2.0
  21970. * @category Seq
  21971. * @param {*} value The value to plant.
  21972. * @returns {Object} Returns the new `lodash` wrapper instance.
  21973. * @example
  21974. *
  21975. * function square(n) {
  21976. * return n * n;
  21977. * }
  21978. *
  21979. * var wrapped = _([1, 2]).map(square);
  21980. * var other = wrapped.plant([3, 4]);
  21981. *
  21982. * other.value();
  21983. * // => [9, 16]
  21984. *
  21985. * wrapped.value();
  21986. * // => [1, 4]
  21987. */
  21988. function wrapperPlant(value) {
  21989. var result,
  21990. parent = this;
  21991. while (parent instanceof baseLodash) {
  21992. var clone = wrapperClone(parent);
  21993. clone.__index__ = 0;
  21994. clone.__values__ = undefined;
  21995. if (result) {
  21996. previous.__wrapped__ = clone;
  21997. } else {
  21998. result = clone;
  21999. }
  22000. var previous = clone;
  22001. parent = parent.__wrapped__;
  22002. }
  22003. previous.__wrapped__ = value;
  22004. return result;
  22005. }
  22006. /**
  22007. * This method is the wrapper version of `_.reverse`.
  22008. *
  22009. * **Note:** This method mutates the wrapped array.
  22010. *
  22011. * @name reverse
  22012. * @memberOf _
  22013. * @since 0.1.0
  22014. * @category Seq
  22015. * @returns {Object} Returns the new `lodash` wrapper instance.
  22016. * @example
  22017. *
  22018. * var array = [1, 2, 3];
  22019. *
  22020. * _(array).reverse().value()
  22021. * // => [3, 2, 1]
  22022. *
  22023. * console.log(array);
  22024. * // => [3, 2, 1]
  22025. */
  22026. function wrapperReverse() {
  22027. var value = this.__wrapped__;
  22028. if (value instanceof LazyWrapper) {
  22029. var wrapped = value;
  22030. if (this.__actions__.length) {
  22031. wrapped = new LazyWrapper(this);
  22032. }
  22033. wrapped = wrapped.reverse();
  22034. wrapped.__actions__.push({
  22035. 'func': thru,
  22036. 'args': [reverse],
  22037. 'thisArg': undefined
  22038. });
  22039. return new LodashWrapper(wrapped, this.__chain__);
  22040. }
  22041. return this.thru(reverse);
  22042. }
  22043. /**
  22044. * Executes the chain sequence to resolve the unwrapped value.
  22045. *
  22046. * @name value
  22047. * @memberOf _
  22048. * @since 0.1.0
  22049. * @alias toJSON, valueOf
  22050. * @category Seq
  22051. * @returns {*} Returns the resolved unwrapped value.
  22052. * @example
  22053. *
  22054. * _([1, 2, 3]).value();
  22055. * // => [1, 2, 3]
  22056. */
  22057. function wrapperValue() {
  22058. return baseWrapperValue(this.__wrapped__, this.__actions__);
  22059. }
  22060. /*------------------------------------------------------------------------*/
  22061. /**
  22062. * Creates an object composed of keys generated from the results of running
  22063. * each element of `collection` thru `iteratee`. The corresponding value of
  22064. * each key is the number of times the key was returned by `iteratee`. The
  22065. * iteratee is invoked with one argument: (value).
  22066. *
  22067. * @static
  22068. * @memberOf _
  22069. * @since 0.5.0
  22070. * @category Collection
  22071. * @param {Array|Object} collection The collection to iterate over.
  22072. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  22073. * @returns {Object} Returns the composed aggregate object.
  22074. * @example
  22075. *
  22076. * _.countBy([6.1, 4.2, 6.3], Math.floor);
  22077. * // => { '4': 1, '6': 2 }
  22078. *
  22079. * // The `_.property` iteratee shorthand.
  22080. * _.countBy(['one', 'two', 'three'], 'length');
  22081. * // => { '3': 2, '5': 1 }
  22082. */
  22083. var countBy = createAggregator(function(result, value, key) {
  22084. if (hasOwnProperty.call(result, key)) {
  22085. ++result[key];
  22086. } else {
  22087. baseAssignValue(result, key, 1);
  22088. }
  22089. });
  22090. /**
  22091. * Checks if `predicate` returns truthy for **all** elements of `collection`.
  22092. * Iteration is stopped once `predicate` returns falsey. The predicate is
  22093. * invoked with three arguments: (value, index|key, collection).
  22094. *
  22095. * **Note:** This method returns `true` for
  22096. * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
  22097. * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
  22098. * elements of empty collections.
  22099. *
  22100. * @static
  22101. * @memberOf _
  22102. * @since 0.1.0
  22103. * @category Collection
  22104. * @param {Array|Object} collection The collection to iterate over.
  22105. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  22106. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  22107. * @returns {boolean} Returns `true` if all elements pass the predicate check,
  22108. * else `false`.
  22109. * @example
  22110. *
  22111. * _.every([true, 1, null, 'yes'], Boolean);
  22112. * // => false
  22113. *
  22114. * var users = [
  22115. * { 'user': 'barney', 'age': 36, 'active': false },
  22116. * { 'user': 'fred', 'age': 40, 'active': false }
  22117. * ];
  22118. *
  22119. * // The `_.matches` iteratee shorthand.
  22120. * _.every(users, { 'user': 'barney', 'active': false });
  22121. * // => false
  22122. *
  22123. * // The `_.matchesProperty` iteratee shorthand.
  22124. * _.every(users, ['active', false]);
  22125. * // => true
  22126. *
  22127. * // The `_.property` iteratee shorthand.
  22128. * _.every(users, 'active');
  22129. * // => false
  22130. */
  22131. function every(collection, predicate, guard) {
  22132. var func = isArray(collection) ? arrayEvery : baseEvery;
  22133. if (guard && isIterateeCall(collection, predicate, guard)) {
  22134. predicate = undefined;
  22135. }
  22136. return func(collection, getIteratee(predicate, 3));
  22137. }
  22138. /**
  22139. * Iterates over elements of `collection`, returning an array of all elements
  22140. * `predicate` returns truthy for. The predicate is invoked with three
  22141. * arguments: (value, index|key, collection).
  22142. *
  22143. * **Note:** Unlike `_.remove`, this method returns a new array.
  22144. *
  22145. * @static
  22146. * @memberOf _
  22147. * @since 0.1.0
  22148. * @category Collection
  22149. * @param {Array|Object} collection The collection to iterate over.
  22150. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  22151. * @returns {Array} Returns the new filtered array.
  22152. * @see _.reject
  22153. * @example
  22154. *
  22155. * var users = [
  22156. * { 'user': 'barney', 'age': 36, 'active': true },
  22157. * { 'user': 'fred', 'age': 40, 'active': false }
  22158. * ];
  22159. *
  22160. * _.filter(users, function(o) { return !o.active; });
  22161. * // => objects for ['fred']
  22162. *
  22163. * // The `_.matches` iteratee shorthand.
  22164. * _.filter(users, { 'age': 36, 'active': true });
  22165. * // => objects for ['barney']
  22166. *
  22167. * // The `_.matchesProperty` iteratee shorthand.
  22168. * _.filter(users, ['active', false]);
  22169. * // => objects for ['fred']
  22170. *
  22171. * // The `_.property` iteratee shorthand.
  22172. * _.filter(users, 'active');
  22173. * // => objects for ['barney']
  22174. */
  22175. function filter(collection, predicate) {
  22176. var func = isArray(collection) ? arrayFilter : baseFilter;
  22177. return func(collection, getIteratee(predicate, 3));
  22178. }
  22179. /**
  22180. * Iterates over elements of `collection`, returning the first element
  22181. * `predicate` returns truthy for. The predicate is invoked with three
  22182. * arguments: (value, index|key, collection).
  22183. *
  22184. * @static
  22185. * @memberOf _
  22186. * @since 0.1.0
  22187. * @category Collection
  22188. * @param {Array|Object} collection The collection to inspect.
  22189. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  22190. * @param {number} [fromIndex=0] The index to search from.
  22191. * @returns {*} Returns the matched element, else `undefined`.
  22192. * @example
  22193. *
  22194. * var users = [
  22195. * { 'user': 'barney', 'age': 36, 'active': true },
  22196. * { 'user': 'fred', 'age': 40, 'active': false },
  22197. * { 'user': 'pebbles', 'age': 1, 'active': true }
  22198. * ];
  22199. *
  22200. * _.find(users, function(o) { return o.age < 40; });
  22201. * // => object for 'barney'
  22202. *
  22203. * // The `_.matches` iteratee shorthand.
  22204. * _.find(users, { 'age': 1, 'active': true });
  22205. * // => object for 'pebbles'
  22206. *
  22207. * // The `_.matchesProperty` iteratee shorthand.
  22208. * _.find(users, ['active', false]);
  22209. * // => object for 'fred'
  22210. *
  22211. * // The `_.property` iteratee shorthand.
  22212. * _.find(users, 'active');
  22213. * // => object for 'barney'
  22214. */
  22215. var find = createFind(findIndex);
  22216. /**
  22217. * This method is like `_.find` except that it iterates over elements of
  22218. * `collection` from right to left.
  22219. *
  22220. * @static
  22221. * @memberOf _
  22222. * @since 2.0.0
  22223. * @category Collection
  22224. * @param {Array|Object} collection The collection to inspect.
  22225. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  22226. * @param {number} [fromIndex=collection.length-1] The index to search from.
  22227. * @returns {*} Returns the matched element, else `undefined`.
  22228. * @example
  22229. *
  22230. * _.findLast([1, 2, 3, 4], function(n) {
  22231. * return n % 2 == 1;
  22232. * });
  22233. * // => 3
  22234. */
  22235. var findLast = createFind(findLastIndex);
  22236. /**
  22237. * Creates a flattened array of values by running each element in `collection`
  22238. * thru `iteratee` and flattening the mapped results. The iteratee is invoked
  22239. * with three arguments: (value, index|key, collection).
  22240. *
  22241. * @static
  22242. * @memberOf _
  22243. * @since 4.0.0
  22244. * @category Collection
  22245. * @param {Array|Object} collection The collection to iterate over.
  22246. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  22247. * @returns {Array} Returns the new flattened array.
  22248. * @example
  22249. *
  22250. * function duplicate(n) {
  22251. * return [n, n];
  22252. * }
  22253. *
  22254. * _.flatMap([1, 2], duplicate);
  22255. * // => [1, 1, 2, 2]
  22256. */
  22257. function flatMap(collection, iteratee) {
  22258. return baseFlatten(map(collection, iteratee), 1);
  22259. }
  22260. /**
  22261. * This method is like `_.flatMap` except that it recursively flattens the
  22262. * mapped results.
  22263. *
  22264. * @static
  22265. * @memberOf _
  22266. * @since 4.7.0
  22267. * @category Collection
  22268. * @param {Array|Object} collection The collection to iterate over.
  22269. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  22270. * @returns {Array} Returns the new flattened array.
  22271. * @example
  22272. *
  22273. * function duplicate(n) {
  22274. * return [[[n, n]]];
  22275. * }
  22276. *
  22277. * _.flatMapDeep([1, 2], duplicate);
  22278. * // => [1, 1, 2, 2]
  22279. */
  22280. function flatMapDeep(collection, iteratee) {
  22281. return baseFlatten(map(collection, iteratee), INFINITY);
  22282. }
  22283. /**
  22284. * This method is like `_.flatMap` except that it recursively flattens the
  22285. * mapped results up to `depth` times.
  22286. *
  22287. * @static
  22288. * @memberOf _
  22289. * @since 4.7.0
  22290. * @category Collection
  22291. * @param {Array|Object} collection The collection to iterate over.
  22292. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  22293. * @param {number} [depth=1] The maximum recursion depth.
  22294. * @returns {Array} Returns the new flattened array.
  22295. * @example
  22296. *
  22297. * function duplicate(n) {
  22298. * return [[[n, n]]];
  22299. * }
  22300. *
  22301. * _.flatMapDepth([1, 2], duplicate, 2);
  22302. * // => [[1, 1], [2, 2]]
  22303. */
  22304. function flatMapDepth(collection, iteratee, depth) {
  22305. depth = depth === undefined ? 1 : toInteger(depth);
  22306. return baseFlatten(map(collection, iteratee), depth);
  22307. }
  22308. /**
  22309. * Iterates over elements of `collection` and invokes `iteratee` for each element.
  22310. * The iteratee is invoked with three arguments: (value, index|key, collection).
  22311. * Iteratee functions may exit iteration early by explicitly returning `false`.
  22312. *
  22313. * **Note:** As with other "Collections" methods, objects with a "length"
  22314. * property are iterated like arrays. To avoid this behavior use `_.forIn`
  22315. * or `_.forOwn` for object iteration.
  22316. *
  22317. * @static
  22318. * @memberOf _
  22319. * @since 0.1.0
  22320. * @alias each
  22321. * @category Collection
  22322. * @param {Array|Object} collection The collection to iterate over.
  22323. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  22324. * @returns {Array|Object} Returns `collection`.
  22325. * @see _.forEachRight
  22326. * @example
  22327. *
  22328. * _.forEach([1, 2], function(value) {
  22329. * console.log(value);
  22330. * });
  22331. * // => Logs `1` then `2`.
  22332. *
  22333. * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
  22334. * console.log(key);
  22335. * });
  22336. * // => Logs 'a' then 'b' (iteration order is not guaranteed).
  22337. */
  22338. function forEach(collection, iteratee) {
  22339. var func = isArray(collection) ? arrayEach : baseEach;
  22340. return func(collection, getIteratee(iteratee, 3));
  22341. }
  22342. /**
  22343. * This method is like `_.forEach` except that it iterates over elements of
  22344. * `collection` from right to left.
  22345. *
  22346. * @static
  22347. * @memberOf _
  22348. * @since 2.0.0
  22349. * @alias eachRight
  22350. * @category Collection
  22351. * @param {Array|Object} collection The collection to iterate over.
  22352. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  22353. * @returns {Array|Object} Returns `collection`.
  22354. * @see _.forEach
  22355. * @example
  22356. *
  22357. * _.forEachRight([1, 2], function(value) {
  22358. * console.log(value);
  22359. * });
  22360. * // => Logs `2` then `1`.
  22361. */
  22362. function forEachRight(collection, iteratee) {
  22363. var func = isArray(collection) ? arrayEachRight : baseEachRight;
  22364. return func(collection, getIteratee(iteratee, 3));
  22365. }
  22366. /**
  22367. * Creates an object composed of keys generated from the results of running
  22368. * each element of `collection` thru `iteratee`. The order of grouped values
  22369. * is determined by the order they occur in `collection`. The corresponding
  22370. * value of each key is an array of elements responsible for generating the
  22371. * key. The iteratee is invoked with one argument: (value).
  22372. *
  22373. * @static
  22374. * @memberOf _
  22375. * @since 0.1.0
  22376. * @category Collection
  22377. * @param {Array|Object} collection The collection to iterate over.
  22378. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  22379. * @returns {Object} Returns the composed aggregate object.
  22380. * @example
  22381. *
  22382. * _.groupBy([6.1, 4.2, 6.3], Math.floor);
  22383. * // => { '4': [4.2], '6': [6.1, 6.3] }
  22384. *
  22385. * // The `_.property` iteratee shorthand.
  22386. * _.groupBy(['one', 'two', 'three'], 'length');
  22387. * // => { '3': ['one', 'two'], '5': ['three'] }
  22388. */
  22389. var groupBy = createAggregator(function(result, value, key) {
  22390. if (hasOwnProperty.call(result, key)) {
  22391. result[key].push(value);
  22392. } else {
  22393. baseAssignValue(result, key, [value]);
  22394. }
  22395. });
  22396. /**
  22397. * Checks if `value` is in `collection`. If `collection` is a string, it's
  22398. * checked for a substring of `value`, otherwise
  22399. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  22400. * is used for equality comparisons. If `fromIndex` is negative, it's used as
  22401. * the offset from the end of `collection`.
  22402. *
  22403. * @static
  22404. * @memberOf _
  22405. * @since 0.1.0
  22406. * @category Collection
  22407. * @param {Array|Object|string} collection The collection to inspect.
  22408. * @param {*} value The value to search for.
  22409. * @param {number} [fromIndex=0] The index to search from.
  22410. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  22411. * @returns {boolean} Returns `true` if `value` is found, else `false`.
  22412. * @example
  22413. *
  22414. * _.includes([1, 2, 3], 1);
  22415. * // => true
  22416. *
  22417. * _.includes([1, 2, 3], 1, 2);
  22418. * // => false
  22419. *
  22420. * _.includes({ 'a': 1, 'b': 2 }, 1);
  22421. * // => true
  22422. *
  22423. * _.includes('abcd', 'bc');
  22424. * // => true
  22425. */
  22426. function includes(collection, value, fromIndex, guard) {
  22427. collection = isArrayLike(collection) ? collection : values(collection);
  22428. fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
  22429. var length = collection.length;
  22430. if (fromIndex < 0) {
  22431. fromIndex = nativeMax(length + fromIndex, 0);
  22432. }
  22433. return isString(collection)
  22434. ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
  22435. : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
  22436. }
  22437. /**
  22438. * Invokes the method at `path` of each element in `collection`, returning
  22439. * an array of the results of each invoked method. Any additional arguments
  22440. * are provided to each invoked method. If `path` is a function, it's invoked
  22441. * for, and `this` bound to, each element in `collection`.
  22442. *
  22443. * @static
  22444. * @memberOf _
  22445. * @since 4.0.0
  22446. * @category Collection
  22447. * @param {Array|Object} collection The collection to iterate over.
  22448. * @param {Array|Function|string} path The path of the method to invoke or
  22449. * the function invoked per iteration.
  22450. * @param {...*} [args] The arguments to invoke each method with.
  22451. * @returns {Array} Returns the array of results.
  22452. * @example
  22453. *
  22454. * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
  22455. * // => [[1, 5, 7], [1, 2, 3]]
  22456. *
  22457. * _.invokeMap([123, 456], String.prototype.split, '');
  22458. * // => [['1', '2', '3'], ['4', '5', '6']]
  22459. */
  22460. var invokeMap = baseRest(function(collection, path, args) {
  22461. var index = -1,
  22462. isFunc = typeof path == 'function',
  22463. result = isArrayLike(collection) ? Array(collection.length) : [];
  22464. baseEach(collection, function(value) {
  22465. result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
  22466. });
  22467. return result;
  22468. });
  22469. /**
  22470. * Creates an object composed of keys generated from the results of running
  22471. * each element of `collection` thru `iteratee`. The corresponding value of
  22472. * each key is the last element responsible for generating the key. The
  22473. * iteratee is invoked with one argument: (value).
  22474. *
  22475. * @static
  22476. * @memberOf _
  22477. * @since 4.0.0
  22478. * @category Collection
  22479. * @param {Array|Object} collection The collection to iterate over.
  22480. * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  22481. * @returns {Object} Returns the composed aggregate object.
  22482. * @example
  22483. *
  22484. * var array = [
  22485. * { 'dir': 'left', 'code': 97 },
  22486. * { 'dir': 'right', 'code': 100 }
  22487. * ];
  22488. *
  22489. * _.keyBy(array, function(o) {
  22490. * return String.fromCharCode(o.code);
  22491. * });
  22492. * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
  22493. *
  22494. * _.keyBy(array, 'dir');
  22495. * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
  22496. */
  22497. var keyBy = createAggregator(function(result, value, key) {
  22498. baseAssignValue(result, key, value);
  22499. });
  22500. /**
  22501. * Creates an array of values by running each element in `collection` thru
  22502. * `iteratee`. The iteratee is invoked with three arguments:
  22503. * (value, index|key, collection).
  22504. *
  22505. * Many lodash methods are guarded to work as iteratees for methods like
  22506. * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
  22507. *
  22508. * The guarded methods are:
  22509. * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
  22510. * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
  22511. * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
  22512. * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
  22513. *
  22514. * @static
  22515. * @memberOf _
  22516. * @since 0.1.0
  22517. * @category Collection
  22518. * @param {Array|Object} collection The collection to iterate over.
  22519. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  22520. * @returns {Array} Returns the new mapped array.
  22521. * @example
  22522. *
  22523. * function square(n) {
  22524. * return n * n;
  22525. * }
  22526. *
  22527. * _.map([4, 8], square);
  22528. * // => [16, 64]
  22529. *
  22530. * _.map({ 'a': 4, 'b': 8 }, square);
  22531. * // => [16, 64] (iteration order is not guaranteed)
  22532. *
  22533. * var users = [
  22534. * { 'user': 'barney' },
  22535. * { 'user': 'fred' }
  22536. * ];
  22537. *
  22538. * // The `_.property` iteratee shorthand.
  22539. * _.map(users, 'user');
  22540. * // => ['barney', 'fred']
  22541. */
  22542. function map(collection, iteratee) {
  22543. var func = isArray(collection) ? arrayMap : baseMap;
  22544. return func(collection, getIteratee(iteratee, 3));
  22545. }
  22546. /**
  22547. * This method is like `_.sortBy` except that it allows specifying the sort
  22548. * orders of the iteratees to sort by. If `orders` is unspecified, all values
  22549. * are sorted in ascending order. Otherwise, specify an order of "desc" for
  22550. * descending or "asc" for ascending sort order of corresponding values.
  22551. *
  22552. * @static
  22553. * @memberOf _
  22554. * @since 4.0.0
  22555. * @category Collection
  22556. * @param {Array|Object} collection The collection to iterate over.
  22557. * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
  22558. * The iteratees to sort by.
  22559. * @param {string[]} [orders] The sort orders of `iteratees`.
  22560. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  22561. * @returns {Array} Returns the new sorted array.
  22562. * @example
  22563. *
  22564. * var users = [
  22565. * { 'user': 'fred', 'age': 48 },
  22566. * { 'user': 'barney', 'age': 34 },
  22567. * { 'user': 'fred', 'age': 40 },
  22568. * { 'user': 'barney', 'age': 36 }
  22569. * ];
  22570. *
  22571. * // Sort by `user` in ascending order and by `age` in descending order.
  22572. * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
  22573. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
  22574. */
  22575. function orderBy(collection, iteratees, orders, guard) {
  22576. if (collection == null) {
  22577. return [];
  22578. }
  22579. if (!isArray(iteratees)) {
  22580. iteratees = iteratees == null ? [] : [iteratees];
  22581. }
  22582. orders = guard ? undefined : orders;
  22583. if (!isArray(orders)) {
  22584. orders = orders == null ? [] : [orders];
  22585. }
  22586. return baseOrderBy(collection, iteratees, orders);
  22587. }
  22588. /**
  22589. * Creates an array of elements split into two groups, the first of which
  22590. * contains elements `predicate` returns truthy for, the second of which
  22591. * contains elements `predicate` returns falsey for. The predicate is
  22592. * invoked with one argument: (value).
  22593. *
  22594. * @static
  22595. * @memberOf _
  22596. * @since 3.0.0
  22597. * @category Collection
  22598. * @param {Array|Object} collection The collection to iterate over.
  22599. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  22600. * @returns {Array} Returns the array of grouped elements.
  22601. * @example
  22602. *
  22603. * var users = [
  22604. * { 'user': 'barney', 'age': 36, 'active': false },
  22605. * { 'user': 'fred', 'age': 40, 'active': true },
  22606. * { 'user': 'pebbles', 'age': 1, 'active': false }
  22607. * ];
  22608. *
  22609. * _.partition(users, function(o) { return o.active; });
  22610. * // => objects for [['fred'], ['barney', 'pebbles']]
  22611. *
  22612. * // The `_.matches` iteratee shorthand.
  22613. * _.partition(users, { 'age': 1, 'active': false });
  22614. * // => objects for [['pebbles'], ['barney', 'fred']]
  22615. *
  22616. * // The `_.matchesProperty` iteratee shorthand.
  22617. * _.partition(users, ['active', false]);
  22618. * // => objects for [['barney', 'pebbles'], ['fred']]
  22619. *
  22620. * // The `_.property` iteratee shorthand.
  22621. * _.partition(users, 'active');
  22622. * // => objects for [['fred'], ['barney', 'pebbles']]
  22623. */
  22624. var partition = createAggregator(function(result, value, key) {
  22625. result[key ? 0 : 1].push(value);
  22626. }, function() { return [[], []]; });
  22627. /**
  22628. * Reduces `collection` to a value which is the accumulated result of running
  22629. * each element in `collection` thru `iteratee`, where each successive
  22630. * invocation is supplied the return value of the previous. If `accumulator`
  22631. * is not given, the first element of `collection` is used as the initial
  22632. * value. The iteratee is invoked with four arguments:
  22633. * (accumulator, value, index|key, collection).
  22634. *
  22635. * Many lodash methods are guarded to work as iteratees for methods like
  22636. * `_.reduce`, `_.reduceRight`, and `_.transform`.
  22637. *
  22638. * The guarded methods are:
  22639. * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
  22640. * and `sortBy`
  22641. *
  22642. * @static
  22643. * @memberOf _
  22644. * @since 0.1.0
  22645. * @category Collection
  22646. * @param {Array|Object} collection The collection to iterate over.
  22647. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  22648. * @param {*} [accumulator] The initial value.
  22649. * @returns {*} Returns the accumulated value.
  22650. * @see _.reduceRight
  22651. * @example
  22652. *
  22653. * _.reduce([1, 2], function(sum, n) {
  22654. * return sum + n;
  22655. * }, 0);
  22656. * // => 3
  22657. *
  22658. * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  22659. * (result[value] || (result[value] = [])).push(key);
  22660. * return result;
  22661. * }, {});
  22662. * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
  22663. */
  22664. function reduce(collection, iteratee, accumulator) {
  22665. var func = isArray(collection) ? arrayReduce : baseReduce,
  22666. initAccum = arguments.length < 3;
  22667. return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
  22668. }
  22669. /**
  22670. * This method is like `_.reduce` except that it iterates over elements of
  22671. * `collection` from right to left.
  22672. *
  22673. * @static
  22674. * @memberOf _
  22675. * @since 0.1.0
  22676. * @category Collection
  22677. * @param {Array|Object} collection The collection to iterate over.
  22678. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  22679. * @param {*} [accumulator] The initial value.
  22680. * @returns {*} Returns the accumulated value.
  22681. * @see _.reduce
  22682. * @example
  22683. *
  22684. * var array = [[0, 1], [2, 3], [4, 5]];
  22685. *
  22686. * _.reduceRight(array, function(flattened, other) {
  22687. * return flattened.concat(other);
  22688. * }, []);
  22689. * // => [4, 5, 2, 3, 0, 1]
  22690. */
  22691. function reduceRight(collection, iteratee, accumulator) {
  22692. var func = isArray(collection) ? arrayReduceRight : baseReduce,
  22693. initAccum = arguments.length < 3;
  22694. return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
  22695. }
  22696. /**
  22697. * The opposite of `_.filter`; this method returns the elements of `collection`
  22698. * that `predicate` does **not** return truthy for.
  22699. *
  22700. * @static
  22701. * @memberOf _
  22702. * @since 0.1.0
  22703. * @category Collection
  22704. * @param {Array|Object} collection The collection to iterate over.
  22705. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  22706. * @returns {Array} Returns the new filtered array.
  22707. * @see _.filter
  22708. * @example
  22709. *
  22710. * var users = [
  22711. * { 'user': 'barney', 'age': 36, 'active': false },
  22712. * { 'user': 'fred', 'age': 40, 'active': true }
  22713. * ];
  22714. *
  22715. * _.reject(users, function(o) { return !o.active; });
  22716. * // => objects for ['fred']
  22717. *
  22718. * // The `_.matches` iteratee shorthand.
  22719. * _.reject(users, { 'age': 40, 'active': true });
  22720. * // => objects for ['barney']
  22721. *
  22722. * // The `_.matchesProperty` iteratee shorthand.
  22723. * _.reject(users, ['active', false]);
  22724. * // => objects for ['fred']
  22725. *
  22726. * // The `_.property` iteratee shorthand.
  22727. * _.reject(users, 'active');
  22728. * // => objects for ['barney']
  22729. */
  22730. function reject(collection, predicate) {
  22731. var func = isArray(collection) ? arrayFilter : baseFilter;
  22732. return func(collection, negate(getIteratee(predicate, 3)));
  22733. }
  22734. /**
  22735. * Gets a random element from `collection`.
  22736. *
  22737. * @static
  22738. * @memberOf _
  22739. * @since 2.0.0
  22740. * @category Collection
  22741. * @param {Array|Object} collection The collection to sample.
  22742. * @returns {*} Returns the random element.
  22743. * @example
  22744. *
  22745. * _.sample([1, 2, 3, 4]);
  22746. * // => 2
  22747. */
  22748. function sample(collection) {
  22749. var func = isArray(collection) ? arraySample : baseSample;
  22750. return func(collection);
  22751. }
  22752. /**
  22753. * Gets `n` random elements at unique keys from `collection` up to the
  22754. * size of `collection`.
  22755. *
  22756. * @static
  22757. * @memberOf _
  22758. * @since 4.0.0
  22759. * @category Collection
  22760. * @param {Array|Object} collection The collection to sample.
  22761. * @param {number} [n=1] The number of elements to sample.
  22762. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  22763. * @returns {Array} Returns the random elements.
  22764. * @example
  22765. *
  22766. * _.sampleSize([1, 2, 3], 2);
  22767. * // => [3, 1]
  22768. *
  22769. * _.sampleSize([1, 2, 3], 4);
  22770. * // => [2, 3, 1]
  22771. */
  22772. function sampleSize(collection, n, guard) {
  22773. if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
  22774. n = 1;
  22775. } else {
  22776. n = toInteger(n);
  22777. }
  22778. var func = isArray(collection) ? arraySampleSize : baseSampleSize;
  22779. return func(collection, n);
  22780. }
  22781. /**
  22782. * Creates an array of shuffled values, using a version of the
  22783. * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
  22784. *
  22785. * @static
  22786. * @memberOf _
  22787. * @since 0.1.0
  22788. * @category Collection
  22789. * @param {Array|Object} collection The collection to shuffle.
  22790. * @returns {Array} Returns the new shuffled array.
  22791. * @example
  22792. *
  22793. * _.shuffle([1, 2, 3, 4]);
  22794. * // => [4, 1, 3, 2]
  22795. */
  22796. function shuffle(collection) {
  22797. var func = isArray(collection) ? arrayShuffle : baseShuffle;
  22798. return func(collection);
  22799. }
  22800. /**
  22801. * Gets the size of `collection` by returning its length for array-like
  22802. * values or the number of own enumerable string keyed properties for objects.
  22803. *
  22804. * @static
  22805. * @memberOf _
  22806. * @since 0.1.0
  22807. * @category Collection
  22808. * @param {Array|Object|string} collection The collection to inspect.
  22809. * @returns {number} Returns the collection size.
  22810. * @example
  22811. *
  22812. * _.size([1, 2, 3]);
  22813. * // => 3
  22814. *
  22815. * _.size({ 'a': 1, 'b': 2 });
  22816. * // => 2
  22817. *
  22818. * _.size('pebbles');
  22819. * // => 7
  22820. */
  22821. function size(collection) {
  22822. if (collection == null) {
  22823. return 0;
  22824. }
  22825. if (isArrayLike(collection)) {
  22826. return isString(collection) ? stringSize(collection) : collection.length;
  22827. }
  22828. var tag = getTag(collection);
  22829. if (tag == mapTag || tag == setTag) {
  22830. return collection.size;
  22831. }
  22832. return baseKeys(collection).length;
  22833. }
  22834. /**
  22835. * Checks if `predicate` returns truthy for **any** element of `collection`.
  22836. * Iteration is stopped once `predicate` returns truthy. The predicate is
  22837. * invoked with three arguments: (value, index|key, collection).
  22838. *
  22839. * @static
  22840. * @memberOf _
  22841. * @since 0.1.0
  22842. * @category Collection
  22843. * @param {Array|Object} collection The collection to iterate over.
  22844. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  22845. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  22846. * @returns {boolean} Returns `true` if any element passes the predicate check,
  22847. * else `false`.
  22848. * @example
  22849. *
  22850. * _.some([null, 0, 'yes', false], Boolean);
  22851. * // => true
  22852. *
  22853. * var users = [
  22854. * { 'user': 'barney', 'active': true },
  22855. * { 'user': 'fred', 'active': false }
  22856. * ];
  22857. *
  22858. * // The `_.matches` iteratee shorthand.
  22859. * _.some(users, { 'user': 'barney', 'active': false });
  22860. * // => false
  22861. *
  22862. * // The `_.matchesProperty` iteratee shorthand.
  22863. * _.some(users, ['active', false]);
  22864. * // => true
  22865. *
  22866. * // The `_.property` iteratee shorthand.
  22867. * _.some(users, 'active');
  22868. * // => true
  22869. */
  22870. function some(collection, predicate, guard) {
  22871. var func = isArray(collection) ? arraySome : baseSome;
  22872. if (guard && isIterateeCall(collection, predicate, guard)) {
  22873. predicate = undefined;
  22874. }
  22875. return func(collection, getIteratee(predicate, 3));
  22876. }
  22877. /**
  22878. * Creates an array of elements, sorted in ascending order by the results of
  22879. * running each element in a collection thru each iteratee. This method
  22880. * performs a stable sort, that is, it preserves the original sort order of
  22881. * equal elements. The iteratees are invoked with one argument: (value).
  22882. *
  22883. * @static
  22884. * @memberOf _
  22885. * @since 0.1.0
  22886. * @category Collection
  22887. * @param {Array|Object} collection The collection to iterate over.
  22888. * @param {...(Function|Function[])} [iteratees=[_.identity]]
  22889. * The iteratees to sort by.
  22890. * @returns {Array} Returns the new sorted array.
  22891. * @example
  22892. *
  22893. * var users = [
  22894. * { 'user': 'fred', 'age': 48 },
  22895. * { 'user': 'barney', 'age': 36 },
  22896. * { 'user': 'fred', 'age': 40 },
  22897. * { 'user': 'barney', 'age': 34 }
  22898. * ];
  22899. *
  22900. * _.sortBy(users, [function(o) { return o.user; }]);
  22901. * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
  22902. *
  22903. * _.sortBy(users, ['user', 'age']);
  22904. * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
  22905. */
  22906. var sortBy = baseRest(function(collection, iteratees) {
  22907. if (collection == null) {
  22908. return [];
  22909. }
  22910. var length = iteratees.length;
  22911. if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
  22912. iteratees = [];
  22913. } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
  22914. iteratees = [iteratees[0]];
  22915. }
  22916. return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
  22917. });
  22918. /*------------------------------------------------------------------------*/
  22919. /**
  22920. * Gets the timestamp of the number of milliseconds that have elapsed since
  22921. * the Unix epoch (1 January 1970 00:00:00 UTC).
  22922. *
  22923. * @static
  22924. * @memberOf _
  22925. * @since 2.4.0
  22926. * @category Date
  22927. * @returns {number} Returns the timestamp.
  22928. * @example
  22929. *
  22930. * _.defer(function(stamp) {
  22931. * console.log(_.now() - stamp);
  22932. * }, _.now());
  22933. * // => Logs the number of milliseconds it took for the deferred invocation.
  22934. */
  22935. var now = ctxNow || function() {
  22936. return root.Date.now();
  22937. };
  22938. /*------------------------------------------------------------------------*/
  22939. /**
  22940. * The opposite of `_.before`; this method creates a function that invokes
  22941. * `func` once it's called `n` or more times.
  22942. *
  22943. * @static
  22944. * @memberOf _
  22945. * @since 0.1.0
  22946. * @category Function
  22947. * @param {number} n The number of calls before `func` is invoked.
  22948. * @param {Function} func The function to restrict.
  22949. * @returns {Function} Returns the new restricted function.
  22950. * @example
  22951. *
  22952. * var saves = ['profile', 'settings'];
  22953. *
  22954. * var done = _.after(saves.length, function() {
  22955. * console.log('done saving!');
  22956. * });
  22957. *
  22958. * _.forEach(saves, function(type) {
  22959. * asyncSave({ 'type': type, 'complete': done });
  22960. * });
  22961. * // => Logs 'done saving!' after the two async saves have completed.
  22962. */
  22963. function after(n, func) {
  22964. if (typeof func != 'function') {
  22965. throw new TypeError(FUNC_ERROR_TEXT);
  22966. }
  22967. n = toInteger(n);
  22968. return function() {
  22969. if (--n < 1) {
  22970. return func.apply(this, arguments);
  22971. }
  22972. };
  22973. }
  22974. /**
  22975. * Creates a function that invokes `func`, with up to `n` arguments,
  22976. * ignoring any additional arguments.
  22977. *
  22978. * @static
  22979. * @memberOf _
  22980. * @since 3.0.0
  22981. * @category Function
  22982. * @param {Function} func The function to cap arguments for.
  22983. * @param {number} [n=func.length] The arity cap.
  22984. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  22985. * @returns {Function} Returns the new capped function.
  22986. * @example
  22987. *
  22988. * _.map(['6', '8', '10'], _.ary(parseInt, 1));
  22989. * // => [6, 8, 10]
  22990. */
  22991. function ary(func, n, guard) {
  22992. n = guard ? undefined : n;
  22993. n = (func && n == null) ? func.length : n;
  22994. return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
  22995. }
  22996. /**
  22997. * Creates a function that invokes `func`, with the `this` binding and arguments
  22998. * of the created function, while it's called less than `n` times. Subsequent
  22999. * calls to the created function return the result of the last `func` invocation.
  23000. *
  23001. * @static
  23002. * @memberOf _
  23003. * @since 3.0.0
  23004. * @category Function
  23005. * @param {number} n The number of calls at which `func` is no longer invoked.
  23006. * @param {Function} func The function to restrict.
  23007. * @returns {Function} Returns the new restricted function.
  23008. * @example
  23009. *
  23010. * jQuery(element).on('click', _.before(5, addContactToList));
  23011. * // => Allows adding up to 4 contacts to the list.
  23012. */
  23013. function before(n, func) {
  23014. var result;
  23015. if (typeof func != 'function') {
  23016. throw new TypeError(FUNC_ERROR_TEXT);
  23017. }
  23018. n = toInteger(n);
  23019. return function() {
  23020. if (--n > 0) {
  23021. result = func.apply(this, arguments);
  23022. }
  23023. if (n <= 1) {
  23024. func = undefined;
  23025. }
  23026. return result;
  23027. };
  23028. }
  23029. /**
  23030. * Creates a function that invokes `func` with the `this` binding of `thisArg`
  23031. * and `partials` prepended to the arguments it receives.
  23032. *
  23033. * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
  23034. * may be used as a placeholder for partially applied arguments.
  23035. *
  23036. * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
  23037. * property of bound functions.
  23038. *
  23039. * @static
  23040. * @memberOf _
  23041. * @since 0.1.0
  23042. * @category Function
  23043. * @param {Function} func The function to bind.
  23044. * @param {*} thisArg The `this` binding of `func`.
  23045. * @param {...*} [partials] The arguments to be partially applied.
  23046. * @returns {Function} Returns the new bound function.
  23047. * @example
  23048. *
  23049. * function greet(greeting, punctuation) {
  23050. * return greeting + ' ' + this.user + punctuation;
  23051. * }
  23052. *
  23053. * var object = { 'user': 'fred' };
  23054. *
  23055. * var bound = _.bind(greet, object, 'hi');
  23056. * bound('!');
  23057. * // => 'hi fred!'
  23058. *
  23059. * // Bound with placeholders.
  23060. * var bound = _.bind(greet, object, _, '!');
  23061. * bound('hi');
  23062. * // => 'hi fred!'
  23063. */
  23064. var bind = baseRest(function(func, thisArg, partials) {
  23065. var bitmask = WRAP_BIND_FLAG;
  23066. if (partials.length) {
  23067. var holders = replaceHolders(partials, getHolder(bind));
  23068. bitmask |= WRAP_PARTIAL_FLAG;
  23069. }
  23070. return createWrap(func, bitmask, thisArg, partials, holders);
  23071. });
  23072. /**
  23073. * Creates a function that invokes the method at `object[key]` with `partials`
  23074. * prepended to the arguments it receives.
  23075. *
  23076. * This method differs from `_.bind` by allowing bound functions to reference
  23077. * methods that may be redefined or don't yet exist. See
  23078. * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
  23079. * for more details.
  23080. *
  23081. * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
  23082. * builds, may be used as a placeholder for partially applied arguments.
  23083. *
  23084. * @static
  23085. * @memberOf _
  23086. * @since 0.10.0
  23087. * @category Function
  23088. * @param {Object} object The object to invoke the method on.
  23089. * @param {string} key The key of the method.
  23090. * @param {...*} [partials] The arguments to be partially applied.
  23091. * @returns {Function} Returns the new bound function.
  23092. * @example
  23093. *
  23094. * var object = {
  23095. * 'user': 'fred',
  23096. * 'greet': function(greeting, punctuation) {
  23097. * return greeting + ' ' + this.user + punctuation;
  23098. * }
  23099. * };
  23100. *
  23101. * var bound = _.bindKey(object, 'greet', 'hi');
  23102. * bound('!');
  23103. * // => 'hi fred!'
  23104. *
  23105. * object.greet = function(greeting, punctuation) {
  23106. * return greeting + 'ya ' + this.user + punctuation;
  23107. * };
  23108. *
  23109. * bound('!');
  23110. * // => 'hiya fred!'
  23111. *
  23112. * // Bound with placeholders.
  23113. * var bound = _.bindKey(object, 'greet', _, '!');
  23114. * bound('hi');
  23115. * // => 'hiya fred!'
  23116. */
  23117. var bindKey = baseRest(function(object, key, partials) {
  23118. var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
  23119. if (partials.length) {
  23120. var holders = replaceHolders(partials, getHolder(bindKey));
  23121. bitmask |= WRAP_PARTIAL_FLAG;
  23122. }
  23123. return createWrap(key, bitmask, object, partials, holders);
  23124. });
  23125. /**
  23126. * Creates a function that accepts arguments of `func` and either invokes
  23127. * `func` returning its result, if at least `arity` number of arguments have
  23128. * been provided, or returns a function that accepts the remaining `func`
  23129. * arguments, and so on. The arity of `func` may be specified if `func.length`
  23130. * is not sufficient.
  23131. *
  23132. * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
  23133. * may be used as a placeholder for provided arguments.
  23134. *
  23135. * **Note:** This method doesn't set the "length" property of curried functions.
  23136. *
  23137. * @static
  23138. * @memberOf _
  23139. * @since 2.0.0
  23140. * @category Function
  23141. * @param {Function} func The function to curry.
  23142. * @param {number} [arity=func.length] The arity of `func`.
  23143. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  23144. * @returns {Function} Returns the new curried function.
  23145. * @example
  23146. *
  23147. * var abc = function(a, b, c) {
  23148. * return [a, b, c];
  23149. * };
  23150. *
  23151. * var curried = _.curry(abc);
  23152. *
  23153. * curried(1)(2)(3);
  23154. * // => [1, 2, 3]
  23155. *
  23156. * curried(1, 2)(3);
  23157. * // => [1, 2, 3]
  23158. *
  23159. * curried(1, 2, 3);
  23160. * // => [1, 2, 3]
  23161. *
  23162. * // Curried with placeholders.
  23163. * curried(1)(_, 3)(2);
  23164. * // => [1, 2, 3]
  23165. */
  23166. function curry(func, arity, guard) {
  23167. arity = guard ? undefined : arity;
  23168. var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  23169. result.placeholder = curry.placeholder;
  23170. return result;
  23171. }
  23172. /**
  23173. * This method is like `_.curry` except that arguments are applied to `func`
  23174. * in the manner of `_.partialRight` instead of `_.partial`.
  23175. *
  23176. * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
  23177. * builds, may be used as a placeholder for provided arguments.
  23178. *
  23179. * **Note:** This method doesn't set the "length" property of curried functions.
  23180. *
  23181. * @static
  23182. * @memberOf _
  23183. * @since 3.0.0
  23184. * @category Function
  23185. * @param {Function} func The function to curry.
  23186. * @param {number} [arity=func.length] The arity of `func`.
  23187. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  23188. * @returns {Function} Returns the new curried function.
  23189. * @example
  23190. *
  23191. * var abc = function(a, b, c) {
  23192. * return [a, b, c];
  23193. * };
  23194. *
  23195. * var curried = _.curryRight(abc);
  23196. *
  23197. * curried(3)(2)(1);
  23198. * // => [1, 2, 3]
  23199. *
  23200. * curried(2, 3)(1);
  23201. * // => [1, 2, 3]
  23202. *
  23203. * curried(1, 2, 3);
  23204. * // => [1, 2, 3]
  23205. *
  23206. * // Curried with placeholders.
  23207. * curried(3)(1, _)(2);
  23208. * // => [1, 2, 3]
  23209. */
  23210. function curryRight(func, arity, guard) {
  23211. arity = guard ? undefined : arity;
  23212. var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  23213. result.placeholder = curryRight.placeholder;
  23214. return result;
  23215. }
  23216. /**
  23217. * Creates a debounced function that delays invoking `func` until after `wait`
  23218. * milliseconds have elapsed since the last time the debounced function was
  23219. * invoked. The debounced function comes with a `cancel` method to cancel
  23220. * delayed `func` invocations and a `flush` method to immediately invoke them.
  23221. * Provide `options` to indicate whether `func` should be invoked on the
  23222. * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
  23223. * with the last arguments provided to the debounced function. Subsequent
  23224. * calls to the debounced function return the result of the last `func`
  23225. * invocation.
  23226. *
  23227. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  23228. * invoked on the trailing edge of the timeout only if the debounced function
  23229. * is invoked more than once during the `wait` timeout.
  23230. *
  23231. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  23232. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  23233. *
  23234. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  23235. * for details over the differences between `_.debounce` and `_.throttle`.
  23236. *
  23237. * @static
  23238. * @memberOf _
  23239. * @since 0.1.0
  23240. * @category Function
  23241. * @param {Function} func The function to debounce.
  23242. * @param {number} [wait=0] The number of milliseconds to delay.
  23243. * @param {Object} [options={}] The options object.
  23244. * @param {boolean} [options.leading=false]
  23245. * Specify invoking on the leading edge of the timeout.
  23246. * @param {number} [options.maxWait]
  23247. * The maximum time `func` is allowed to be delayed before it's invoked.
  23248. * @param {boolean} [options.trailing=true]
  23249. * Specify invoking on the trailing edge of the timeout.
  23250. * @returns {Function} Returns the new debounced function.
  23251. * @example
  23252. *
  23253. * // Avoid costly calculations while the window size is in flux.
  23254. * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
  23255. *
  23256. * // Invoke `sendMail` when clicked, debouncing subsequent calls.
  23257. * jQuery(element).on('click', _.debounce(sendMail, 300, {
  23258. * 'leading': true,
  23259. * 'trailing': false
  23260. * }));
  23261. *
  23262. * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
  23263. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
  23264. * var source = new EventSource('/stream');
  23265. * jQuery(source).on('message', debounced);
  23266. *
  23267. * // Cancel the trailing debounced invocation.
  23268. * jQuery(window).on('popstate', debounced.cancel);
  23269. */
  23270. function debounce(func, wait, options) {
  23271. var lastArgs,
  23272. lastThis,
  23273. maxWait,
  23274. result,
  23275. timerId,
  23276. lastCallTime,
  23277. lastInvokeTime = 0,
  23278. leading = false,
  23279. maxing = false,
  23280. trailing = true;
  23281. if (typeof func != 'function') {
  23282. throw new TypeError(FUNC_ERROR_TEXT);
  23283. }
  23284. wait = toNumber(wait) || 0;
  23285. if (isObject(options)) {
  23286. leading = !!options.leading;
  23287. maxing = 'maxWait' in options;
  23288. maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
  23289. trailing = 'trailing' in options ? !!options.trailing : trailing;
  23290. }
  23291. function invokeFunc(time) {
  23292. var args = lastArgs,
  23293. thisArg = lastThis;
  23294. lastArgs = lastThis = undefined;
  23295. lastInvokeTime = time;
  23296. result = func.apply(thisArg, args);
  23297. return result;
  23298. }
  23299. function leadingEdge(time) {
  23300. // Reset any `maxWait` timer.
  23301. lastInvokeTime = time;
  23302. // Start the timer for the trailing edge.
  23303. timerId = setTimeout(timerExpired, wait);
  23304. // Invoke the leading edge.
  23305. return leading ? invokeFunc(time) : result;
  23306. }
  23307. function remainingWait(time) {
  23308. var timeSinceLastCall = time - lastCallTime,
  23309. timeSinceLastInvoke = time - lastInvokeTime,
  23310. timeWaiting = wait - timeSinceLastCall;
  23311. return maxing
  23312. ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
  23313. : timeWaiting;
  23314. }
  23315. function shouldInvoke(time) {
  23316. var timeSinceLastCall = time - lastCallTime,
  23317. timeSinceLastInvoke = time - lastInvokeTime;
  23318. // Either this is the first call, activity has stopped and we're at the
  23319. // trailing edge, the system time has gone backwards and we're treating
  23320. // it as the trailing edge, or we've hit the `maxWait` limit.
  23321. return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
  23322. (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
  23323. }
  23324. function timerExpired() {
  23325. var time = now();
  23326. if (shouldInvoke(time)) {
  23327. return trailingEdge(time);
  23328. }
  23329. // Restart the timer.
  23330. timerId = setTimeout(timerExpired, remainingWait(time));
  23331. }
  23332. function trailingEdge(time) {
  23333. timerId = undefined;
  23334. // Only invoke if we have `lastArgs` which means `func` has been
  23335. // debounced at least once.
  23336. if (trailing && lastArgs) {
  23337. return invokeFunc(time);
  23338. }
  23339. lastArgs = lastThis = undefined;
  23340. return result;
  23341. }
  23342. function cancel() {
  23343. if (timerId !== undefined) {
  23344. clearTimeout(timerId);
  23345. }
  23346. lastInvokeTime = 0;
  23347. lastArgs = lastCallTime = lastThis = timerId = undefined;
  23348. }
  23349. function flush() {
  23350. return timerId === undefined ? result : trailingEdge(now());
  23351. }
  23352. function debounced() {
  23353. var time = now(),
  23354. isInvoking = shouldInvoke(time);
  23355. lastArgs = arguments;
  23356. lastThis = this;
  23357. lastCallTime = time;
  23358. if (isInvoking) {
  23359. if (timerId === undefined) {
  23360. return leadingEdge(lastCallTime);
  23361. }
  23362. if (maxing) {
  23363. // Handle invocations in a tight loop.
  23364. timerId = setTimeout(timerExpired, wait);
  23365. return invokeFunc(lastCallTime);
  23366. }
  23367. }
  23368. if (timerId === undefined) {
  23369. timerId = setTimeout(timerExpired, wait);
  23370. }
  23371. return result;
  23372. }
  23373. debounced.cancel = cancel;
  23374. debounced.flush = flush;
  23375. return debounced;
  23376. }
  23377. /**
  23378. * Defers invoking the `func` until the current call stack has cleared. Any
  23379. * additional arguments are provided to `func` when it's invoked.
  23380. *
  23381. * @static
  23382. * @memberOf _
  23383. * @since 0.1.0
  23384. * @category Function
  23385. * @param {Function} func The function to defer.
  23386. * @param {...*} [args] The arguments to invoke `func` with.
  23387. * @returns {number} Returns the timer id.
  23388. * @example
  23389. *
  23390. * _.defer(function(text) {
  23391. * console.log(text);
  23392. * }, 'deferred');
  23393. * // => Logs 'deferred' after one millisecond.
  23394. */
  23395. var defer = baseRest(function(func, args) {
  23396. return baseDelay(func, 1, args);
  23397. });
  23398. /**
  23399. * Invokes `func` after `wait` milliseconds. Any additional arguments are
  23400. * provided to `func` when it's invoked.
  23401. *
  23402. * @static
  23403. * @memberOf _
  23404. * @since 0.1.0
  23405. * @category Function
  23406. * @param {Function} func The function to delay.
  23407. * @param {number} wait The number of milliseconds to delay invocation.
  23408. * @param {...*} [args] The arguments to invoke `func` with.
  23409. * @returns {number} Returns the timer id.
  23410. * @example
  23411. *
  23412. * _.delay(function(text) {
  23413. * console.log(text);
  23414. * }, 1000, 'later');
  23415. * // => Logs 'later' after one second.
  23416. */
  23417. var delay = baseRest(function(func, wait, args) {
  23418. return baseDelay(func, toNumber(wait) || 0, args);
  23419. });
  23420. /**
  23421. * Creates a function that invokes `func` with arguments reversed.
  23422. *
  23423. * @static
  23424. * @memberOf _
  23425. * @since 4.0.0
  23426. * @category Function
  23427. * @param {Function} func The function to flip arguments for.
  23428. * @returns {Function} Returns the new flipped function.
  23429. * @example
  23430. *
  23431. * var flipped = _.flip(function() {
  23432. * return _.toArray(arguments);
  23433. * });
  23434. *
  23435. * flipped('a', 'b', 'c', 'd');
  23436. * // => ['d', 'c', 'b', 'a']
  23437. */
  23438. function flip(func) {
  23439. return createWrap(func, WRAP_FLIP_FLAG);
  23440. }
  23441. /**
  23442. * Creates a function that memoizes the result of `func`. If `resolver` is
  23443. * provided, it determines the cache key for storing the result based on the
  23444. * arguments provided to the memoized function. By default, the first argument
  23445. * provided to the memoized function is used as the map cache key. The `func`
  23446. * is invoked with the `this` binding of the memoized function.
  23447. *
  23448. * **Note:** The cache is exposed as the `cache` property on the memoized
  23449. * function. Its creation may be customized by replacing the `_.memoize.Cache`
  23450. * constructor with one whose instances implement the
  23451. * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
  23452. * method interface of `clear`, `delete`, `get`, `has`, and `set`.
  23453. *
  23454. * @static
  23455. * @memberOf _
  23456. * @since 0.1.0
  23457. * @category Function
  23458. * @param {Function} func The function to have its output memoized.
  23459. * @param {Function} [resolver] The function to resolve the cache key.
  23460. * @returns {Function} Returns the new memoized function.
  23461. * @example
  23462. *
  23463. * var object = { 'a': 1, 'b': 2 };
  23464. * var other = { 'c': 3, 'd': 4 };
  23465. *
  23466. * var values = _.memoize(_.values);
  23467. * values(object);
  23468. * // => [1, 2]
  23469. *
  23470. * values(other);
  23471. * // => [3, 4]
  23472. *
  23473. * object.a = 2;
  23474. * values(object);
  23475. * // => [1, 2]
  23476. *
  23477. * // Modify the result cache.
  23478. * values.cache.set(object, ['a', 'b']);
  23479. * values(object);
  23480. * // => ['a', 'b']
  23481. *
  23482. * // Replace `_.memoize.Cache`.
  23483. * _.memoize.Cache = WeakMap;
  23484. */
  23485. function memoize(func, resolver) {
  23486. if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
  23487. throw new TypeError(FUNC_ERROR_TEXT);
  23488. }
  23489. var memoized = function() {
  23490. var args = arguments,
  23491. key = resolver ? resolver.apply(this, args) : args[0],
  23492. cache = memoized.cache;
  23493. if (cache.has(key)) {
  23494. return cache.get(key);
  23495. }
  23496. var result = func.apply(this, args);
  23497. memoized.cache = cache.set(key, result) || cache;
  23498. return result;
  23499. };
  23500. memoized.cache = new (memoize.Cache || MapCache);
  23501. return memoized;
  23502. }
  23503. // Expose `MapCache`.
  23504. memoize.Cache = MapCache;
  23505. /**
  23506. * Creates a function that negates the result of the predicate `func`. The
  23507. * `func` predicate is invoked with the `this` binding and arguments of the
  23508. * created function.
  23509. *
  23510. * @static
  23511. * @memberOf _
  23512. * @since 3.0.0
  23513. * @category Function
  23514. * @param {Function} predicate The predicate to negate.
  23515. * @returns {Function} Returns the new negated function.
  23516. * @example
  23517. *
  23518. * function isEven(n) {
  23519. * return n % 2 == 0;
  23520. * }
  23521. *
  23522. * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
  23523. * // => [1, 3, 5]
  23524. */
  23525. function negate(predicate) {
  23526. if (typeof predicate != 'function') {
  23527. throw new TypeError(FUNC_ERROR_TEXT);
  23528. }
  23529. return function() {
  23530. var args = arguments;
  23531. switch (args.length) {
  23532. case 0: return !predicate.call(this);
  23533. case 1: return !predicate.call(this, args[0]);
  23534. case 2: return !predicate.call(this, args[0], args[1]);
  23535. case 3: return !predicate.call(this, args[0], args[1], args[2]);
  23536. }
  23537. return !predicate.apply(this, args);
  23538. };
  23539. }
  23540. /**
  23541. * Creates a function that is restricted to invoking `func` once. Repeat calls
  23542. * to the function return the value of the first invocation. The `func` is
  23543. * invoked with the `this` binding and arguments of the created function.
  23544. *
  23545. * @static
  23546. * @memberOf _
  23547. * @since 0.1.0
  23548. * @category Function
  23549. * @param {Function} func The function to restrict.
  23550. * @returns {Function} Returns the new restricted function.
  23551. * @example
  23552. *
  23553. * var initialize = _.once(createApplication);
  23554. * initialize();
  23555. * initialize();
  23556. * // => `createApplication` is invoked once
  23557. */
  23558. function once(func) {
  23559. return before(2, func);
  23560. }
  23561. /**
  23562. * Creates a function that invokes `func` with its arguments transformed.
  23563. *
  23564. * @static
  23565. * @since 4.0.0
  23566. * @memberOf _
  23567. * @category Function
  23568. * @param {Function} func The function to wrap.
  23569. * @param {...(Function|Function[])} [transforms=[_.identity]]
  23570. * The argument transforms.
  23571. * @returns {Function} Returns the new function.
  23572. * @example
  23573. *
  23574. * function doubled(n) {
  23575. * return n * 2;
  23576. * }
  23577. *
  23578. * function square(n) {
  23579. * return n * n;
  23580. * }
  23581. *
  23582. * var func = _.overArgs(function(x, y) {
  23583. * return [x, y];
  23584. * }, [square, doubled]);
  23585. *
  23586. * func(9, 3);
  23587. * // => [81, 6]
  23588. *
  23589. * func(10, 5);
  23590. * // => [100, 10]
  23591. */
  23592. var overArgs = castRest(function(func, transforms) {
  23593. transforms = (transforms.length == 1 && isArray(transforms[0]))
  23594. ? arrayMap(transforms[0], baseUnary(getIteratee()))
  23595. : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
  23596. var funcsLength = transforms.length;
  23597. return baseRest(function(args) {
  23598. var index = -1,
  23599. length = nativeMin(args.length, funcsLength);
  23600. while (++index < length) {
  23601. args[index] = transforms[index].call(this, args[index]);
  23602. }
  23603. return apply(func, this, args);
  23604. });
  23605. });
  23606. /**
  23607. * Creates a function that invokes `func` with `partials` prepended to the
  23608. * arguments it receives. This method is like `_.bind` except it does **not**
  23609. * alter the `this` binding.
  23610. *
  23611. * The `_.partial.placeholder` value, which defaults to `_` in monolithic
  23612. * builds, may be used as a placeholder for partially applied arguments.
  23613. *
  23614. * **Note:** This method doesn't set the "length" property of partially
  23615. * applied functions.
  23616. *
  23617. * @static
  23618. * @memberOf _
  23619. * @since 0.2.0
  23620. * @category Function
  23621. * @param {Function} func The function to partially apply arguments to.
  23622. * @param {...*} [partials] The arguments to be partially applied.
  23623. * @returns {Function} Returns the new partially applied function.
  23624. * @example
  23625. *
  23626. * function greet(greeting, name) {
  23627. * return greeting + ' ' + name;
  23628. * }
  23629. *
  23630. * var sayHelloTo = _.partial(greet, 'hello');
  23631. * sayHelloTo('fred');
  23632. * // => 'hello fred'
  23633. *
  23634. * // Partially applied with placeholders.
  23635. * var greetFred = _.partial(greet, _, 'fred');
  23636. * greetFred('hi');
  23637. * // => 'hi fred'
  23638. */
  23639. var partial = baseRest(function(func, partials) {
  23640. var holders = replaceHolders(partials, getHolder(partial));
  23641. return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
  23642. });
  23643. /**
  23644. * This method is like `_.partial` except that partially applied arguments
  23645. * are appended to the arguments it receives.
  23646. *
  23647. * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
  23648. * builds, may be used as a placeholder for partially applied arguments.
  23649. *
  23650. * **Note:** This method doesn't set the "length" property of partially
  23651. * applied functions.
  23652. *
  23653. * @static
  23654. * @memberOf _
  23655. * @since 1.0.0
  23656. * @category Function
  23657. * @param {Function} func The function to partially apply arguments to.
  23658. * @param {...*} [partials] The arguments to be partially applied.
  23659. * @returns {Function} Returns the new partially applied function.
  23660. * @example
  23661. *
  23662. * function greet(greeting, name) {
  23663. * return greeting + ' ' + name;
  23664. * }
  23665. *
  23666. * var greetFred = _.partialRight(greet, 'fred');
  23667. * greetFred('hi');
  23668. * // => 'hi fred'
  23669. *
  23670. * // Partially applied with placeholders.
  23671. * var sayHelloTo = _.partialRight(greet, 'hello', _);
  23672. * sayHelloTo('fred');
  23673. * // => 'hello fred'
  23674. */
  23675. var partialRight = baseRest(function(func, partials) {
  23676. var holders = replaceHolders(partials, getHolder(partialRight));
  23677. return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
  23678. });
  23679. /**
  23680. * Creates a function that invokes `func` with arguments arranged according
  23681. * to the specified `indexes` where the argument value at the first index is
  23682. * provided as the first argument, the argument value at the second index is
  23683. * provided as the second argument, and so on.
  23684. *
  23685. * @static
  23686. * @memberOf _
  23687. * @since 3.0.0
  23688. * @category Function
  23689. * @param {Function} func The function to rearrange arguments for.
  23690. * @param {...(number|number[])} indexes The arranged argument indexes.
  23691. * @returns {Function} Returns the new function.
  23692. * @example
  23693. *
  23694. * var rearged = _.rearg(function(a, b, c) {
  23695. * return [a, b, c];
  23696. * }, [2, 0, 1]);
  23697. *
  23698. * rearged('b', 'c', 'a')
  23699. * // => ['a', 'b', 'c']
  23700. */
  23701. var rearg = flatRest(function(func, indexes) {
  23702. return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
  23703. });
  23704. /**
  23705. * Creates a function that invokes `func` with the `this` binding of the
  23706. * created function and arguments from `start` and beyond provided as
  23707. * an array.
  23708. *
  23709. * **Note:** This method is based on the
  23710. * [rest parameter](https://mdn.io/rest_parameters).
  23711. *
  23712. * @static
  23713. * @memberOf _
  23714. * @since 4.0.0
  23715. * @category Function
  23716. * @param {Function} func The function to apply a rest parameter to.
  23717. * @param {number} [start=func.length-1] The start position of the rest parameter.
  23718. * @returns {Function} Returns the new function.
  23719. * @example
  23720. *
  23721. * var say = _.rest(function(what, names) {
  23722. * return what + ' ' + _.initial(names).join(', ') +
  23723. * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
  23724. * });
  23725. *
  23726. * say('hello', 'fred', 'barney', 'pebbles');
  23727. * // => 'hello fred, barney, & pebbles'
  23728. */
  23729. function rest(func, start) {
  23730. if (typeof func != 'function') {
  23731. throw new TypeError(FUNC_ERROR_TEXT);
  23732. }
  23733. start = start === undefined ? start : toInteger(start);
  23734. return baseRest(func, start);
  23735. }
  23736. /**
  23737. * Creates a function that invokes `func` with the `this` binding of the
  23738. * create function and an array of arguments much like
  23739. * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
  23740. *
  23741. * **Note:** This method is based on the
  23742. * [spread operator](https://mdn.io/spread_operator).
  23743. *
  23744. * @static
  23745. * @memberOf _
  23746. * @since 3.2.0
  23747. * @category Function
  23748. * @param {Function} func The function to spread arguments over.
  23749. * @param {number} [start=0] The start position of the spread.
  23750. * @returns {Function} Returns the new function.
  23751. * @example
  23752. *
  23753. * var say = _.spread(function(who, what) {
  23754. * return who + ' says ' + what;
  23755. * });
  23756. *
  23757. * say(['fred', 'hello']);
  23758. * // => 'fred says hello'
  23759. *
  23760. * var numbers = Promise.all([
  23761. * Promise.resolve(40),
  23762. * Promise.resolve(36)
  23763. * ]);
  23764. *
  23765. * numbers.then(_.spread(function(x, y) {
  23766. * return x + y;
  23767. * }));
  23768. * // => a Promise of 76
  23769. */
  23770. function spread(func, start) {
  23771. if (typeof func != 'function') {
  23772. throw new TypeError(FUNC_ERROR_TEXT);
  23773. }
  23774. start = start == null ? 0 : nativeMax(toInteger(start), 0);
  23775. return baseRest(function(args) {
  23776. var array = args[start],
  23777. otherArgs = castSlice(args, 0, start);
  23778. if (array) {
  23779. arrayPush(otherArgs, array);
  23780. }
  23781. return apply(func, this, otherArgs);
  23782. });
  23783. }
  23784. /**
  23785. * Creates a throttled function that only invokes `func` at most once per
  23786. * every `wait` milliseconds. The throttled function comes with a `cancel`
  23787. * method to cancel delayed `func` invocations and a `flush` method to
  23788. * immediately invoke them. Provide `options` to indicate whether `func`
  23789. * should be invoked on the leading and/or trailing edge of the `wait`
  23790. * timeout. The `func` is invoked with the last arguments provided to the
  23791. * throttled function. Subsequent calls to the throttled function return the
  23792. * result of the last `func` invocation.
  23793. *
  23794. * **Note:** If `leading` and `trailing` options are `true`, `func` is
  23795. * invoked on the trailing edge of the timeout only if the throttled function
  23796. * is invoked more than once during the `wait` timeout.
  23797. *
  23798. * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  23799. * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  23800. *
  23801. * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  23802. * for details over the differences between `_.throttle` and `_.debounce`.
  23803. *
  23804. * @static
  23805. * @memberOf _
  23806. * @since 0.1.0
  23807. * @category Function
  23808. * @param {Function} func The function to throttle.
  23809. * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
  23810. * @param {Object} [options={}] The options object.
  23811. * @param {boolean} [options.leading=true]
  23812. * Specify invoking on the leading edge of the timeout.
  23813. * @param {boolean} [options.trailing=true]
  23814. * Specify invoking on the trailing edge of the timeout.
  23815. * @returns {Function} Returns the new throttled function.
  23816. * @example
  23817. *
  23818. * // Avoid excessively updating the position while scrolling.
  23819. * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
  23820. *
  23821. * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
  23822. * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
  23823. * jQuery(element).on('click', throttled);
  23824. *
  23825. * // Cancel the trailing throttled invocation.
  23826. * jQuery(window).on('popstate', throttled.cancel);
  23827. */
  23828. function throttle(func, wait, options) {
  23829. var leading = true,
  23830. trailing = true;
  23831. if (typeof func != 'function') {
  23832. throw new TypeError(FUNC_ERROR_TEXT);
  23833. }
  23834. if (isObject(options)) {
  23835. leading = 'leading' in options ? !!options.leading : leading;
  23836. trailing = 'trailing' in options ? !!options.trailing : trailing;
  23837. }
  23838. return debounce(func, wait, {
  23839. 'leading': leading,
  23840. 'maxWait': wait,
  23841. 'trailing': trailing
  23842. });
  23843. }
  23844. /**
  23845. * Creates a function that accepts up to one argument, ignoring any
  23846. * additional arguments.
  23847. *
  23848. * @static
  23849. * @memberOf _
  23850. * @since 4.0.0
  23851. * @category Function
  23852. * @param {Function} func The function to cap arguments for.
  23853. * @returns {Function} Returns the new capped function.
  23854. * @example
  23855. *
  23856. * _.map(['6', '8', '10'], _.unary(parseInt));
  23857. * // => [6, 8, 10]
  23858. */
  23859. function unary(func) {
  23860. return ary(func, 1);
  23861. }
  23862. /**
  23863. * Creates a function that provides `value` to `wrapper` as its first
  23864. * argument. Any additional arguments provided to the function are appended
  23865. * to those provided to the `wrapper`. The wrapper is invoked with the `this`
  23866. * binding of the created function.
  23867. *
  23868. * @static
  23869. * @memberOf _
  23870. * @since 0.1.0
  23871. * @category Function
  23872. * @param {*} value The value to wrap.
  23873. * @param {Function} [wrapper=identity] The wrapper function.
  23874. * @returns {Function} Returns the new function.
  23875. * @example
  23876. *
  23877. * var p = _.wrap(_.escape, function(func, text) {
  23878. * return '<p>' + func(text) + '</p>';
  23879. * });
  23880. *
  23881. * p('fred, barney, & pebbles');
  23882. * // => '<p>fred, barney, &amp; pebbles</p>'
  23883. */
  23884. function wrap(value, wrapper) {
  23885. return partial(castFunction(wrapper), value);
  23886. }
  23887. /*------------------------------------------------------------------------*/
  23888. /**
  23889. * Casts `value` as an array if it's not one.
  23890. *
  23891. * @static
  23892. * @memberOf _
  23893. * @since 4.4.0
  23894. * @category Lang
  23895. * @param {*} value The value to inspect.
  23896. * @returns {Array} Returns the cast array.
  23897. * @example
  23898. *
  23899. * _.castArray(1);
  23900. * // => [1]
  23901. *
  23902. * _.castArray({ 'a': 1 });
  23903. * // => [{ 'a': 1 }]
  23904. *
  23905. * _.castArray('abc');
  23906. * // => ['abc']
  23907. *
  23908. * _.castArray(null);
  23909. * // => [null]
  23910. *
  23911. * _.castArray(undefined);
  23912. * // => [undefined]
  23913. *
  23914. * _.castArray();
  23915. * // => []
  23916. *
  23917. * var array = [1, 2, 3];
  23918. * console.log(_.castArray(array) === array);
  23919. * // => true
  23920. */
  23921. function castArray() {
  23922. if (!arguments.length) {
  23923. return [];
  23924. }
  23925. var value = arguments[0];
  23926. return isArray(value) ? value : [value];
  23927. }
  23928. /**
  23929. * Creates a shallow clone of `value`.
  23930. *
  23931. * **Note:** This method is loosely based on the
  23932. * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
  23933. * and supports cloning arrays, array buffers, booleans, date objects, maps,
  23934. * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
  23935. * arrays. The own enumerable properties of `arguments` objects are cloned
  23936. * as plain objects. An empty object is returned for uncloneable values such
  23937. * as error objects, functions, DOM nodes, and WeakMaps.
  23938. *
  23939. * @static
  23940. * @memberOf _
  23941. * @since 0.1.0
  23942. * @category Lang
  23943. * @param {*} value The value to clone.
  23944. * @returns {*} Returns the cloned value.
  23945. * @see _.cloneDeep
  23946. * @example
  23947. *
  23948. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  23949. *
  23950. * var shallow = _.clone(objects);
  23951. * console.log(shallow[0] === objects[0]);
  23952. * // => true
  23953. */
  23954. function clone(value) {
  23955. return baseClone(value, CLONE_SYMBOLS_FLAG);
  23956. }
  23957. /**
  23958. * This method is like `_.clone` except that it accepts `customizer` which
  23959. * is invoked to produce the cloned value. If `customizer` returns `undefined`,
  23960. * cloning is handled by the method instead. The `customizer` is invoked with
  23961. * up to four arguments; (value [, index|key, object, stack]).
  23962. *
  23963. * @static
  23964. * @memberOf _
  23965. * @since 4.0.0
  23966. * @category Lang
  23967. * @param {*} value The value to clone.
  23968. * @param {Function} [customizer] The function to customize cloning.
  23969. * @returns {*} Returns the cloned value.
  23970. * @see _.cloneDeepWith
  23971. * @example
  23972. *
  23973. * function customizer(value) {
  23974. * if (_.isElement(value)) {
  23975. * return value.cloneNode(false);
  23976. * }
  23977. * }
  23978. *
  23979. * var el = _.cloneWith(document.body, customizer);
  23980. *
  23981. * console.log(el === document.body);
  23982. * // => false
  23983. * console.log(el.nodeName);
  23984. * // => 'BODY'
  23985. * console.log(el.childNodes.length);
  23986. * // => 0
  23987. */
  23988. function cloneWith(value, customizer) {
  23989. customizer = typeof customizer == 'function' ? customizer : undefined;
  23990. return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
  23991. }
  23992. /**
  23993. * This method is like `_.clone` except that it recursively clones `value`.
  23994. *
  23995. * @static
  23996. * @memberOf _
  23997. * @since 1.0.0
  23998. * @category Lang
  23999. * @param {*} value The value to recursively clone.
  24000. * @returns {*} Returns the deep cloned value.
  24001. * @see _.clone
  24002. * @example
  24003. *
  24004. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  24005. *
  24006. * var deep = _.cloneDeep(objects);
  24007. * console.log(deep[0] === objects[0]);
  24008. * // => false
  24009. */
  24010. function cloneDeep(value) {
  24011. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
  24012. }
  24013. /**
  24014. * This method is like `_.cloneWith` except that it recursively clones `value`.
  24015. *
  24016. * @static
  24017. * @memberOf _
  24018. * @since 4.0.0
  24019. * @category Lang
  24020. * @param {*} value The value to recursively clone.
  24021. * @param {Function} [customizer] The function to customize cloning.
  24022. * @returns {*} Returns the deep cloned value.
  24023. * @see _.cloneWith
  24024. * @example
  24025. *
  24026. * function customizer(value) {
  24027. * if (_.isElement(value)) {
  24028. * return value.cloneNode(true);
  24029. * }
  24030. * }
  24031. *
  24032. * var el = _.cloneDeepWith(document.body, customizer);
  24033. *
  24034. * console.log(el === document.body);
  24035. * // => false
  24036. * console.log(el.nodeName);
  24037. * // => 'BODY'
  24038. * console.log(el.childNodes.length);
  24039. * // => 20
  24040. */
  24041. function cloneDeepWith(value, customizer) {
  24042. customizer = typeof customizer == 'function' ? customizer : undefined;
  24043. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
  24044. }
  24045. /**
  24046. * Checks if `object` conforms to `source` by invoking the predicate
  24047. * properties of `source` with the corresponding property values of `object`.
  24048. *
  24049. * **Note:** This method is equivalent to `_.conforms` when `source` is
  24050. * partially applied.
  24051. *
  24052. * @static
  24053. * @memberOf _
  24054. * @since 4.14.0
  24055. * @category Lang
  24056. * @param {Object} object The object to inspect.
  24057. * @param {Object} source The object of property predicates to conform to.
  24058. * @returns {boolean} Returns `true` if `object` conforms, else `false`.
  24059. * @example
  24060. *
  24061. * var object = { 'a': 1, 'b': 2 };
  24062. *
  24063. * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
  24064. * // => true
  24065. *
  24066. * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
  24067. * // => false
  24068. */
  24069. function conformsTo(object, source) {
  24070. return source == null || baseConformsTo(object, source, keys(source));
  24071. }
  24072. /**
  24073. * Performs a
  24074. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  24075. * comparison between two values to determine if they are equivalent.
  24076. *
  24077. * @static
  24078. * @memberOf _
  24079. * @since 4.0.0
  24080. * @category Lang
  24081. * @param {*} value The value to compare.
  24082. * @param {*} other The other value to compare.
  24083. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  24084. * @example
  24085. *
  24086. * var object = { 'a': 1 };
  24087. * var other = { 'a': 1 };
  24088. *
  24089. * _.eq(object, object);
  24090. * // => true
  24091. *
  24092. * _.eq(object, other);
  24093. * // => false
  24094. *
  24095. * _.eq('a', 'a');
  24096. * // => true
  24097. *
  24098. * _.eq('a', Object('a'));
  24099. * // => false
  24100. *
  24101. * _.eq(NaN, NaN);
  24102. * // => true
  24103. */
  24104. function eq(value, other) {
  24105. return value === other || (value !== value && other !== other);
  24106. }
  24107. /**
  24108. * Checks if `value` is greater than `other`.
  24109. *
  24110. * @static
  24111. * @memberOf _
  24112. * @since 3.9.0
  24113. * @category Lang
  24114. * @param {*} value The value to compare.
  24115. * @param {*} other The other value to compare.
  24116. * @returns {boolean} Returns `true` if `value` is greater than `other`,
  24117. * else `false`.
  24118. * @see _.lt
  24119. * @example
  24120. *
  24121. * _.gt(3, 1);
  24122. * // => true
  24123. *
  24124. * _.gt(3, 3);
  24125. * // => false
  24126. *
  24127. * _.gt(1, 3);
  24128. * // => false
  24129. */
  24130. var gt = createRelationalOperation(baseGt);
  24131. /**
  24132. * Checks if `value` is greater than or equal to `other`.
  24133. *
  24134. * @static
  24135. * @memberOf _
  24136. * @since 3.9.0
  24137. * @category Lang
  24138. * @param {*} value The value to compare.
  24139. * @param {*} other The other value to compare.
  24140. * @returns {boolean} Returns `true` if `value` is greater than or equal to
  24141. * `other`, else `false`.
  24142. * @see _.lte
  24143. * @example
  24144. *
  24145. * _.gte(3, 1);
  24146. * // => true
  24147. *
  24148. * _.gte(3, 3);
  24149. * // => true
  24150. *
  24151. * _.gte(1, 3);
  24152. * // => false
  24153. */
  24154. var gte = createRelationalOperation(function(value, other) {
  24155. return value >= other;
  24156. });
  24157. /**
  24158. * Checks if `value` is likely an `arguments` object.
  24159. *
  24160. * @static
  24161. * @memberOf _
  24162. * @since 0.1.0
  24163. * @category Lang
  24164. * @param {*} value The value to check.
  24165. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  24166. * else `false`.
  24167. * @example
  24168. *
  24169. * _.isArguments(function() { return arguments; }());
  24170. * // => true
  24171. *
  24172. * _.isArguments([1, 2, 3]);
  24173. * // => false
  24174. */
  24175. var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  24176. return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
  24177. !propertyIsEnumerable.call(value, 'callee');
  24178. };
  24179. /**
  24180. * Checks if `value` is classified as an `Array` object.
  24181. *
  24182. * @static
  24183. * @memberOf _
  24184. * @since 0.1.0
  24185. * @category Lang
  24186. * @param {*} value The value to check.
  24187. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  24188. * @example
  24189. *
  24190. * _.isArray([1, 2, 3]);
  24191. * // => true
  24192. *
  24193. * _.isArray(document.body.children);
  24194. * // => false
  24195. *
  24196. * _.isArray('abc');
  24197. * // => false
  24198. *
  24199. * _.isArray(_.noop);
  24200. * // => false
  24201. */
  24202. var isArray = Array.isArray;
  24203. /**
  24204. * Checks if `value` is classified as an `ArrayBuffer` object.
  24205. *
  24206. * @static
  24207. * @memberOf _
  24208. * @since 4.3.0
  24209. * @category Lang
  24210. * @param {*} value The value to check.
  24211. * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
  24212. * @example
  24213. *
  24214. * _.isArrayBuffer(new ArrayBuffer(2));
  24215. * // => true
  24216. *
  24217. * _.isArrayBuffer(new Array(2));
  24218. * // => false
  24219. */
  24220. var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
  24221. /**
  24222. * Checks if `value` is array-like. A value is considered array-like if it's
  24223. * not a function and has a `value.length` that's an integer greater than or
  24224. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  24225. *
  24226. * @static
  24227. * @memberOf _
  24228. * @since 4.0.0
  24229. * @category Lang
  24230. * @param {*} value The value to check.
  24231. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  24232. * @example
  24233. *
  24234. * _.isArrayLike([1, 2, 3]);
  24235. * // => true
  24236. *
  24237. * _.isArrayLike(document.body.children);
  24238. * // => true
  24239. *
  24240. * _.isArrayLike('abc');
  24241. * // => true
  24242. *
  24243. * _.isArrayLike(_.noop);
  24244. * // => false
  24245. */
  24246. function isArrayLike(value) {
  24247. return value != null && isLength(value.length) && !isFunction(value);
  24248. }
  24249. /**
  24250. * This method is like `_.isArrayLike` except that it also checks if `value`
  24251. * is an object.
  24252. *
  24253. * @static
  24254. * @memberOf _
  24255. * @since 4.0.0
  24256. * @category Lang
  24257. * @param {*} value The value to check.
  24258. * @returns {boolean} Returns `true` if `value` is an array-like object,
  24259. * else `false`.
  24260. * @example
  24261. *
  24262. * _.isArrayLikeObject([1, 2, 3]);
  24263. * // => true
  24264. *
  24265. * _.isArrayLikeObject(document.body.children);
  24266. * // => true
  24267. *
  24268. * _.isArrayLikeObject('abc');
  24269. * // => false
  24270. *
  24271. * _.isArrayLikeObject(_.noop);
  24272. * // => false
  24273. */
  24274. function isArrayLikeObject(value) {
  24275. return isObjectLike(value) && isArrayLike(value);
  24276. }
  24277. /**
  24278. * Checks if `value` is classified as a boolean primitive or object.
  24279. *
  24280. * @static
  24281. * @memberOf _
  24282. * @since 0.1.0
  24283. * @category Lang
  24284. * @param {*} value The value to check.
  24285. * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
  24286. * @example
  24287. *
  24288. * _.isBoolean(false);
  24289. * // => true
  24290. *
  24291. * _.isBoolean(null);
  24292. * // => false
  24293. */
  24294. function isBoolean(value) {
  24295. return value === true || value === false ||
  24296. (isObjectLike(value) && baseGetTag(value) == boolTag);
  24297. }
  24298. /**
  24299. * Checks if `value` is a buffer.
  24300. *
  24301. * @static
  24302. * @memberOf _
  24303. * @since 4.3.0
  24304. * @category Lang
  24305. * @param {*} value The value to check.
  24306. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  24307. * @example
  24308. *
  24309. * _.isBuffer(new Buffer(2));
  24310. * // => true
  24311. *
  24312. * _.isBuffer(new Uint8Array(2));
  24313. * // => false
  24314. */
  24315. var isBuffer = nativeIsBuffer || stubFalse;
  24316. /**
  24317. * Checks if `value` is classified as a `Date` object.
  24318. *
  24319. * @static
  24320. * @memberOf _
  24321. * @since 0.1.0
  24322. * @category Lang
  24323. * @param {*} value The value to check.
  24324. * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
  24325. * @example
  24326. *
  24327. * _.isDate(new Date);
  24328. * // => true
  24329. *
  24330. * _.isDate('Mon April 23 2012');
  24331. * // => false
  24332. */
  24333. var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
  24334. /**
  24335. * Checks if `value` is likely a DOM element.
  24336. *
  24337. * @static
  24338. * @memberOf _
  24339. * @since 0.1.0
  24340. * @category Lang
  24341. * @param {*} value The value to check.
  24342. * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
  24343. * @example
  24344. *
  24345. * _.isElement(document.body);
  24346. * // => true
  24347. *
  24348. * _.isElement('<body>');
  24349. * // => false
  24350. */
  24351. function isElement(value) {
  24352. return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
  24353. }
  24354. /**
  24355. * Checks if `value` is an empty object, collection, map, or set.
  24356. *
  24357. * Objects are considered empty if they have no own enumerable string keyed
  24358. * properties.
  24359. *
  24360. * Array-like values such as `arguments` objects, arrays, buffers, strings, or
  24361. * jQuery-like collections are considered empty if they have a `length` of `0`.
  24362. * Similarly, maps and sets are considered empty if they have a `size` of `0`.
  24363. *
  24364. * @static
  24365. * @memberOf _
  24366. * @since 0.1.0
  24367. * @category Lang
  24368. * @param {*} value The value to check.
  24369. * @returns {boolean} Returns `true` if `value` is empty, else `false`.
  24370. * @example
  24371. *
  24372. * _.isEmpty(null);
  24373. * // => true
  24374. *
  24375. * _.isEmpty(true);
  24376. * // => true
  24377. *
  24378. * _.isEmpty(1);
  24379. * // => true
  24380. *
  24381. * _.isEmpty([1, 2, 3]);
  24382. * // => false
  24383. *
  24384. * _.isEmpty({ 'a': 1 });
  24385. * // => false
  24386. */
  24387. function isEmpty(value) {
  24388. if (value == null) {
  24389. return true;
  24390. }
  24391. if (isArrayLike(value) &&
  24392. (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
  24393. isBuffer(value) || isTypedArray(value) || isArguments(value))) {
  24394. return !value.length;
  24395. }
  24396. var tag = getTag(value);
  24397. if (tag == mapTag || tag == setTag) {
  24398. return !value.size;
  24399. }
  24400. if (isPrototype(value)) {
  24401. return !baseKeys(value).length;
  24402. }
  24403. for (var key in value) {
  24404. if (hasOwnProperty.call(value, key)) {
  24405. return false;
  24406. }
  24407. }
  24408. return true;
  24409. }
  24410. /**
  24411. * Performs a deep comparison between two values to determine if they are
  24412. * equivalent.
  24413. *
  24414. * **Note:** This method supports comparing arrays, array buffers, booleans,
  24415. * date objects, error objects, maps, numbers, `Object` objects, regexes,
  24416. * sets, strings, symbols, and typed arrays. `Object` objects are compared
  24417. * by their own, not inherited, enumerable properties. Functions and DOM
  24418. * nodes are compared by strict equality, i.e. `===`.
  24419. *
  24420. * @static
  24421. * @memberOf _
  24422. * @since 0.1.0
  24423. * @category Lang
  24424. * @param {*} value The value to compare.
  24425. * @param {*} other The other value to compare.
  24426. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  24427. * @example
  24428. *
  24429. * var object = { 'a': 1 };
  24430. * var other = { 'a': 1 };
  24431. *
  24432. * _.isEqual(object, other);
  24433. * // => true
  24434. *
  24435. * object === other;
  24436. * // => false
  24437. */
  24438. function isEqual(value, other) {
  24439. return baseIsEqual(value, other);
  24440. }
  24441. /**
  24442. * This method is like `_.isEqual` except that it accepts `customizer` which
  24443. * is invoked to compare values. If `customizer` returns `undefined`, comparisons
  24444. * are handled by the method instead. The `customizer` is invoked with up to
  24445. * six arguments: (objValue, othValue [, index|key, object, other, stack]).
  24446. *
  24447. * @static
  24448. * @memberOf _
  24449. * @since 4.0.0
  24450. * @category Lang
  24451. * @param {*} value The value to compare.
  24452. * @param {*} other The other value to compare.
  24453. * @param {Function} [customizer] The function to customize comparisons.
  24454. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  24455. * @example
  24456. *
  24457. * function isGreeting(value) {
  24458. * return /^h(?:i|ello)$/.test(value);
  24459. * }
  24460. *
  24461. * function customizer(objValue, othValue) {
  24462. * if (isGreeting(objValue) && isGreeting(othValue)) {
  24463. * return true;
  24464. * }
  24465. * }
  24466. *
  24467. * var array = ['hello', 'goodbye'];
  24468. * var other = ['hi', 'goodbye'];
  24469. *
  24470. * _.isEqualWith(array, other, customizer);
  24471. * // => true
  24472. */
  24473. function isEqualWith(value, other, customizer) {
  24474. customizer = typeof customizer == 'function' ? customizer : undefined;
  24475. var result = customizer ? customizer(value, other) : undefined;
  24476. return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
  24477. }
  24478. /**
  24479. * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
  24480. * `SyntaxError`, `TypeError`, or `URIError` object.
  24481. *
  24482. * @static
  24483. * @memberOf _
  24484. * @since 3.0.0
  24485. * @category Lang
  24486. * @param {*} value The value to check.
  24487. * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
  24488. * @example
  24489. *
  24490. * _.isError(new Error);
  24491. * // => true
  24492. *
  24493. * _.isError(Error);
  24494. * // => false
  24495. */
  24496. function isError(value) {
  24497. if (!isObjectLike(value)) {
  24498. return false;
  24499. }
  24500. var tag = baseGetTag(value);
  24501. return tag == errorTag || tag == domExcTag ||
  24502. (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
  24503. }
  24504. /**
  24505. * Checks if `value` is a finite primitive number.
  24506. *
  24507. * **Note:** This method is based on
  24508. * [`Number.isFinite`](https://mdn.io/Number/isFinite).
  24509. *
  24510. * @static
  24511. * @memberOf _
  24512. * @since 0.1.0
  24513. * @category Lang
  24514. * @param {*} value The value to check.
  24515. * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
  24516. * @example
  24517. *
  24518. * _.isFinite(3);
  24519. * // => true
  24520. *
  24521. * _.isFinite(Number.MIN_VALUE);
  24522. * // => true
  24523. *
  24524. * _.isFinite(Infinity);
  24525. * // => false
  24526. *
  24527. * _.isFinite('3');
  24528. * // => false
  24529. */
  24530. function isFinite(value) {
  24531. return typeof value == 'number' && nativeIsFinite(value);
  24532. }
  24533. /**
  24534. * Checks if `value` is classified as a `Function` object.
  24535. *
  24536. * @static
  24537. * @memberOf _
  24538. * @since 0.1.0
  24539. * @category Lang
  24540. * @param {*} value The value to check.
  24541. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  24542. * @example
  24543. *
  24544. * _.isFunction(_);
  24545. * // => true
  24546. *
  24547. * _.isFunction(/abc/);
  24548. * // => false
  24549. */
  24550. function isFunction(value) {
  24551. if (!isObject(value)) {
  24552. return false;
  24553. }
  24554. // The use of `Object#toString` avoids issues with the `typeof` operator
  24555. // in Safari 9 which returns 'object' for typed arrays and other constructors.
  24556. var tag = baseGetTag(value);
  24557. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  24558. }
  24559. /**
  24560. * Checks if `value` is an integer.
  24561. *
  24562. * **Note:** This method is based on
  24563. * [`Number.isInteger`](https://mdn.io/Number/isInteger).
  24564. *
  24565. * @static
  24566. * @memberOf _
  24567. * @since 4.0.0
  24568. * @category Lang
  24569. * @param {*} value The value to check.
  24570. * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
  24571. * @example
  24572. *
  24573. * _.isInteger(3);
  24574. * // => true
  24575. *
  24576. * _.isInteger(Number.MIN_VALUE);
  24577. * // => false
  24578. *
  24579. * _.isInteger(Infinity);
  24580. * // => false
  24581. *
  24582. * _.isInteger('3');
  24583. * // => false
  24584. */
  24585. function isInteger(value) {
  24586. return typeof value == 'number' && value == toInteger(value);
  24587. }
  24588. /**
  24589. * Checks if `value` is a valid array-like length.
  24590. *
  24591. * **Note:** This method is loosely based on
  24592. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  24593. *
  24594. * @static
  24595. * @memberOf _
  24596. * @since 4.0.0
  24597. * @category Lang
  24598. * @param {*} value The value to check.
  24599. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  24600. * @example
  24601. *
  24602. * _.isLength(3);
  24603. * // => true
  24604. *
  24605. * _.isLength(Number.MIN_VALUE);
  24606. * // => false
  24607. *
  24608. * _.isLength(Infinity);
  24609. * // => false
  24610. *
  24611. * _.isLength('3');
  24612. * // => false
  24613. */
  24614. function isLength(value) {
  24615. return typeof value == 'number' &&
  24616. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  24617. }
  24618. /**
  24619. * Checks if `value` is the
  24620. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  24621. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  24622. *
  24623. * @static
  24624. * @memberOf _
  24625. * @since 0.1.0
  24626. * @category Lang
  24627. * @param {*} value The value to check.
  24628. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  24629. * @example
  24630. *
  24631. * _.isObject({});
  24632. * // => true
  24633. *
  24634. * _.isObject([1, 2, 3]);
  24635. * // => true
  24636. *
  24637. * _.isObject(_.noop);
  24638. * // => true
  24639. *
  24640. * _.isObject(null);
  24641. * // => false
  24642. */
  24643. function isObject(value) {
  24644. var type = typeof value;
  24645. return value != null && (type == 'object' || type == 'function');
  24646. }
  24647. /**
  24648. * Checks if `value` is object-like. A value is object-like if it's not `null`
  24649. * and has a `typeof` result of "object".
  24650. *
  24651. * @static
  24652. * @memberOf _
  24653. * @since 4.0.0
  24654. * @category Lang
  24655. * @param {*} value The value to check.
  24656. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  24657. * @example
  24658. *
  24659. * _.isObjectLike({});
  24660. * // => true
  24661. *
  24662. * _.isObjectLike([1, 2, 3]);
  24663. * // => true
  24664. *
  24665. * _.isObjectLike(_.noop);
  24666. * // => false
  24667. *
  24668. * _.isObjectLike(null);
  24669. * // => false
  24670. */
  24671. function isObjectLike(value) {
  24672. return value != null && typeof value == 'object';
  24673. }
  24674. /**
  24675. * Checks if `value` is classified as a `Map` object.
  24676. *
  24677. * @static
  24678. * @memberOf _
  24679. * @since 4.3.0
  24680. * @category Lang
  24681. * @param {*} value The value to check.
  24682. * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  24683. * @example
  24684. *
  24685. * _.isMap(new Map);
  24686. * // => true
  24687. *
  24688. * _.isMap(new WeakMap);
  24689. * // => false
  24690. */
  24691. var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
  24692. /**
  24693. * Performs a partial deep comparison between `object` and `source` to
  24694. * determine if `object` contains equivalent property values.
  24695. *
  24696. * **Note:** This method is equivalent to `_.matches` when `source` is
  24697. * partially applied.
  24698. *
  24699. * Partial comparisons will match empty array and empty object `source`
  24700. * values against any array or object value, respectively. See `_.isEqual`
  24701. * for a list of supported value comparisons.
  24702. *
  24703. * @static
  24704. * @memberOf _
  24705. * @since 3.0.0
  24706. * @category Lang
  24707. * @param {Object} object The object to inspect.
  24708. * @param {Object} source The object of property values to match.
  24709. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  24710. * @example
  24711. *
  24712. * var object = { 'a': 1, 'b': 2 };
  24713. *
  24714. * _.isMatch(object, { 'b': 2 });
  24715. * // => true
  24716. *
  24717. * _.isMatch(object, { 'b': 1 });
  24718. * // => false
  24719. */
  24720. function isMatch(object, source) {
  24721. return object === source || baseIsMatch(object, source, getMatchData(source));
  24722. }
  24723. /**
  24724. * This method is like `_.isMatch` except that it accepts `customizer` which
  24725. * is invoked to compare values. If `customizer` returns `undefined`, comparisons
  24726. * are handled by the method instead. The `customizer` is invoked with five
  24727. * arguments: (objValue, srcValue, index|key, object, source).
  24728. *
  24729. * @static
  24730. * @memberOf _
  24731. * @since 4.0.0
  24732. * @category Lang
  24733. * @param {Object} object The object to inspect.
  24734. * @param {Object} source The object of property values to match.
  24735. * @param {Function} [customizer] The function to customize comparisons.
  24736. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  24737. * @example
  24738. *
  24739. * function isGreeting(value) {
  24740. * return /^h(?:i|ello)$/.test(value);
  24741. * }
  24742. *
  24743. * function customizer(objValue, srcValue) {
  24744. * if (isGreeting(objValue) && isGreeting(srcValue)) {
  24745. * return true;
  24746. * }
  24747. * }
  24748. *
  24749. * var object = { 'greeting': 'hello' };
  24750. * var source = { 'greeting': 'hi' };
  24751. *
  24752. * _.isMatchWith(object, source, customizer);
  24753. * // => true
  24754. */
  24755. function isMatchWith(object, source, customizer) {
  24756. customizer = typeof customizer == 'function' ? customizer : undefined;
  24757. return baseIsMatch(object, source, getMatchData(source), customizer);
  24758. }
  24759. /**
  24760. * Checks if `value` is `NaN`.
  24761. *
  24762. * **Note:** This method is based on
  24763. * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
  24764. * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
  24765. * `undefined` and other non-number values.
  24766. *
  24767. * @static
  24768. * @memberOf _
  24769. * @since 0.1.0
  24770. * @category Lang
  24771. * @param {*} value The value to check.
  24772. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  24773. * @example
  24774. *
  24775. * _.isNaN(NaN);
  24776. * // => true
  24777. *
  24778. * _.isNaN(new Number(NaN));
  24779. * // => true
  24780. *
  24781. * isNaN(undefined);
  24782. * // => true
  24783. *
  24784. * _.isNaN(undefined);
  24785. * // => false
  24786. */
  24787. function isNaN(value) {
  24788. // An `NaN` primitive is the only value that is not equal to itself.
  24789. // Perform the `toStringTag` check first to avoid errors with some
  24790. // ActiveX objects in IE.
  24791. return isNumber(value) && value != +value;
  24792. }
  24793. /**
  24794. * Checks if `value` is a pristine native function.
  24795. *
  24796. * **Note:** This method can't reliably detect native functions in the presence
  24797. * of the core-js package because core-js circumvents this kind of detection.
  24798. * Despite multiple requests, the core-js maintainer has made it clear: any
  24799. * attempt to fix the detection will be obstructed. As a result, we're left
  24800. * with little choice but to throw an error. Unfortunately, this also affects
  24801. * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
  24802. * which rely on core-js.
  24803. *
  24804. * @static
  24805. * @memberOf _
  24806. * @since 3.0.0
  24807. * @category Lang
  24808. * @param {*} value The value to check.
  24809. * @returns {boolean} Returns `true` if `value` is a native function,
  24810. * else `false`.
  24811. * @example
  24812. *
  24813. * _.isNative(Array.prototype.push);
  24814. * // => true
  24815. *
  24816. * _.isNative(_);
  24817. * // => false
  24818. */
  24819. function isNative(value) {
  24820. if (isMaskable(value)) {
  24821. throw new Error(CORE_ERROR_TEXT);
  24822. }
  24823. return baseIsNative(value);
  24824. }
  24825. /**
  24826. * Checks if `value` is `null`.
  24827. *
  24828. * @static
  24829. * @memberOf _
  24830. * @since 0.1.0
  24831. * @category Lang
  24832. * @param {*} value The value to check.
  24833. * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
  24834. * @example
  24835. *
  24836. * _.isNull(null);
  24837. * // => true
  24838. *
  24839. * _.isNull(void 0);
  24840. * // => false
  24841. */
  24842. function isNull(value) {
  24843. return value === null;
  24844. }
  24845. /**
  24846. * Checks if `value` is `null` or `undefined`.
  24847. *
  24848. * @static
  24849. * @memberOf _
  24850. * @since 4.0.0
  24851. * @category Lang
  24852. * @param {*} value The value to check.
  24853. * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
  24854. * @example
  24855. *
  24856. * _.isNil(null);
  24857. * // => true
  24858. *
  24859. * _.isNil(void 0);
  24860. * // => true
  24861. *
  24862. * _.isNil(NaN);
  24863. * // => false
  24864. */
  24865. function isNil(value) {
  24866. return value == null;
  24867. }
  24868. /**
  24869. * Checks if `value` is classified as a `Number` primitive or object.
  24870. *
  24871. * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
  24872. * classified as numbers, use the `_.isFinite` method.
  24873. *
  24874. * @static
  24875. * @memberOf _
  24876. * @since 0.1.0
  24877. * @category Lang
  24878. * @param {*} value The value to check.
  24879. * @returns {boolean} Returns `true` if `value` is a number, else `false`.
  24880. * @example
  24881. *
  24882. * _.isNumber(3);
  24883. * // => true
  24884. *
  24885. * _.isNumber(Number.MIN_VALUE);
  24886. * // => true
  24887. *
  24888. * _.isNumber(Infinity);
  24889. * // => true
  24890. *
  24891. * _.isNumber('3');
  24892. * // => false
  24893. */
  24894. function isNumber(value) {
  24895. return typeof value == 'number' ||
  24896. (isObjectLike(value) && baseGetTag(value) == numberTag);
  24897. }
  24898. /**
  24899. * Checks if `value` is a plain object, that is, an object created by the
  24900. * `Object` constructor or one with a `[[Prototype]]` of `null`.
  24901. *
  24902. * @static
  24903. * @memberOf _
  24904. * @since 0.8.0
  24905. * @category Lang
  24906. * @param {*} value The value to check.
  24907. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
  24908. * @example
  24909. *
  24910. * function Foo() {
  24911. * this.a = 1;
  24912. * }
  24913. *
  24914. * _.isPlainObject(new Foo);
  24915. * // => false
  24916. *
  24917. * _.isPlainObject([1, 2, 3]);
  24918. * // => false
  24919. *
  24920. * _.isPlainObject({ 'x': 0, 'y': 0 });
  24921. * // => true
  24922. *
  24923. * _.isPlainObject(Object.create(null));
  24924. * // => true
  24925. */
  24926. function isPlainObject(value) {
  24927. if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
  24928. return false;
  24929. }
  24930. var proto = getPrototype(value);
  24931. if (proto === null) {
  24932. return true;
  24933. }
  24934. var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
  24935. return typeof Ctor == 'function' && Ctor instanceof Ctor &&
  24936. funcToString.call(Ctor) == objectCtorString;
  24937. }
  24938. /**
  24939. * Checks if `value` is classified as a `RegExp` object.
  24940. *
  24941. * @static
  24942. * @memberOf _
  24943. * @since 0.1.0
  24944. * @category Lang
  24945. * @param {*} value The value to check.
  24946. * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  24947. * @example
  24948. *
  24949. * _.isRegExp(/abc/);
  24950. * // => true
  24951. *
  24952. * _.isRegExp('/abc/');
  24953. * // => false
  24954. */
  24955. var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
  24956. /**
  24957. * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
  24958. * double precision number which isn't the result of a rounded unsafe integer.
  24959. *
  24960. * **Note:** This method is based on
  24961. * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
  24962. *
  24963. * @static
  24964. * @memberOf _
  24965. * @since 4.0.0
  24966. * @category Lang
  24967. * @param {*} value The value to check.
  24968. * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
  24969. * @example
  24970. *
  24971. * _.isSafeInteger(3);
  24972. * // => true
  24973. *
  24974. * _.isSafeInteger(Number.MIN_VALUE);
  24975. * // => false
  24976. *
  24977. * _.isSafeInteger(Infinity);
  24978. * // => false
  24979. *
  24980. * _.isSafeInteger('3');
  24981. * // => false
  24982. */
  24983. function isSafeInteger(value) {
  24984. return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
  24985. }
  24986. /**
  24987. * Checks if `value` is classified as a `Set` object.
  24988. *
  24989. * @static
  24990. * @memberOf _
  24991. * @since 4.3.0
  24992. * @category Lang
  24993. * @param {*} value The value to check.
  24994. * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  24995. * @example
  24996. *
  24997. * _.isSet(new Set);
  24998. * // => true
  24999. *
  25000. * _.isSet(new WeakSet);
  25001. * // => false
  25002. */
  25003. var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
  25004. /**
  25005. * Checks if `value` is classified as a `String` primitive or object.
  25006. *
  25007. * @static
  25008. * @since 0.1.0
  25009. * @memberOf _
  25010. * @category Lang
  25011. * @param {*} value The value to check.
  25012. * @returns {boolean} Returns `true` if `value` is a string, else `false`.
  25013. * @example
  25014. *
  25015. * _.isString('abc');
  25016. * // => true
  25017. *
  25018. * _.isString(1);
  25019. * // => false
  25020. */
  25021. function isString(value) {
  25022. return typeof value == 'string' ||
  25023. (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
  25024. }
  25025. /**
  25026. * Checks if `value` is classified as a `Symbol` primitive or object.
  25027. *
  25028. * @static
  25029. * @memberOf _
  25030. * @since 4.0.0
  25031. * @category Lang
  25032. * @param {*} value The value to check.
  25033. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  25034. * @example
  25035. *
  25036. * _.isSymbol(Symbol.iterator);
  25037. * // => true
  25038. *
  25039. * _.isSymbol('abc');
  25040. * // => false
  25041. */
  25042. function isSymbol(value) {
  25043. return typeof value == 'symbol' ||
  25044. (isObjectLike(value) && baseGetTag(value) == symbolTag);
  25045. }
  25046. /**
  25047. * Checks if `value` is classified as a typed array.
  25048. *
  25049. * @static
  25050. * @memberOf _
  25051. * @since 3.0.0
  25052. * @category Lang
  25053. * @param {*} value The value to check.
  25054. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  25055. * @example
  25056. *
  25057. * _.isTypedArray(new Uint8Array);
  25058. * // => true
  25059. *
  25060. * _.isTypedArray([]);
  25061. * // => false
  25062. */
  25063. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  25064. /**
  25065. * Checks if `value` is `undefined`.
  25066. *
  25067. * @static
  25068. * @since 0.1.0
  25069. * @memberOf _
  25070. * @category Lang
  25071. * @param {*} value The value to check.
  25072. * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
  25073. * @example
  25074. *
  25075. * _.isUndefined(void 0);
  25076. * // => true
  25077. *
  25078. * _.isUndefined(null);
  25079. * // => false
  25080. */
  25081. function isUndefined(value) {
  25082. return value === undefined;
  25083. }
  25084. /**
  25085. * Checks if `value` is classified as a `WeakMap` object.
  25086. *
  25087. * @static
  25088. * @memberOf _
  25089. * @since 4.3.0
  25090. * @category Lang
  25091. * @param {*} value The value to check.
  25092. * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
  25093. * @example
  25094. *
  25095. * _.isWeakMap(new WeakMap);
  25096. * // => true
  25097. *
  25098. * _.isWeakMap(new Map);
  25099. * // => false
  25100. */
  25101. function isWeakMap(value) {
  25102. return isObjectLike(value) && getTag(value) == weakMapTag;
  25103. }
  25104. /**
  25105. * Checks if `value` is classified as a `WeakSet` object.
  25106. *
  25107. * @static
  25108. * @memberOf _
  25109. * @since 4.3.0
  25110. * @category Lang
  25111. * @param {*} value The value to check.
  25112. * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
  25113. * @example
  25114. *
  25115. * _.isWeakSet(new WeakSet);
  25116. * // => true
  25117. *
  25118. * _.isWeakSet(new Set);
  25119. * // => false
  25120. */
  25121. function isWeakSet(value) {
  25122. return isObjectLike(value) && baseGetTag(value) == weakSetTag;
  25123. }
  25124. /**
  25125. * Checks if `value` is less than `other`.
  25126. *
  25127. * @static
  25128. * @memberOf _
  25129. * @since 3.9.0
  25130. * @category Lang
  25131. * @param {*} value The value to compare.
  25132. * @param {*} other The other value to compare.
  25133. * @returns {boolean} Returns `true` if `value` is less than `other`,
  25134. * else `false`.
  25135. * @see _.gt
  25136. * @example
  25137. *
  25138. * _.lt(1, 3);
  25139. * // => true
  25140. *
  25141. * _.lt(3, 3);
  25142. * // => false
  25143. *
  25144. * _.lt(3, 1);
  25145. * // => false
  25146. */
  25147. var lt = createRelationalOperation(baseLt);
  25148. /**
  25149. * Checks if `value` is less than or equal to `other`.
  25150. *
  25151. * @static
  25152. * @memberOf _
  25153. * @since 3.9.0
  25154. * @category Lang
  25155. * @param {*} value The value to compare.
  25156. * @param {*} other The other value to compare.
  25157. * @returns {boolean} Returns `true` if `value` is less than or equal to
  25158. * `other`, else `false`.
  25159. * @see _.gte
  25160. * @example
  25161. *
  25162. * _.lte(1, 3);
  25163. * // => true
  25164. *
  25165. * _.lte(3, 3);
  25166. * // => true
  25167. *
  25168. * _.lte(3, 1);
  25169. * // => false
  25170. */
  25171. var lte = createRelationalOperation(function(value, other) {
  25172. return value <= other;
  25173. });
  25174. /**
  25175. * Converts `value` to an array.
  25176. *
  25177. * @static
  25178. * @since 0.1.0
  25179. * @memberOf _
  25180. * @category Lang
  25181. * @param {*} value The value to convert.
  25182. * @returns {Array} Returns the converted array.
  25183. * @example
  25184. *
  25185. * _.toArray({ 'a': 1, 'b': 2 });
  25186. * // => [1, 2]
  25187. *
  25188. * _.toArray('abc');
  25189. * // => ['a', 'b', 'c']
  25190. *
  25191. * _.toArray(1);
  25192. * // => []
  25193. *
  25194. * _.toArray(null);
  25195. * // => []
  25196. */
  25197. function toArray(value) {
  25198. if (!value) {
  25199. return [];
  25200. }
  25201. if (isArrayLike(value)) {
  25202. return isString(value) ? stringToArray(value) : copyArray(value);
  25203. }
  25204. if (symIterator && value[symIterator]) {
  25205. return iteratorToArray(value[symIterator]());
  25206. }
  25207. var tag = getTag(value),
  25208. func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
  25209. return func(value);
  25210. }
  25211. /**
  25212. * Converts `value` to a finite number.
  25213. *
  25214. * @static
  25215. * @memberOf _
  25216. * @since 4.12.0
  25217. * @category Lang
  25218. * @param {*} value The value to convert.
  25219. * @returns {number} Returns the converted number.
  25220. * @example
  25221. *
  25222. * _.toFinite(3.2);
  25223. * // => 3.2
  25224. *
  25225. * _.toFinite(Number.MIN_VALUE);
  25226. * // => 5e-324
  25227. *
  25228. * _.toFinite(Infinity);
  25229. * // => 1.7976931348623157e+308
  25230. *
  25231. * _.toFinite('3.2');
  25232. * // => 3.2
  25233. */
  25234. function toFinite(value) {
  25235. if (!value) {
  25236. return value === 0 ? value : 0;
  25237. }
  25238. value = toNumber(value);
  25239. if (value === INFINITY || value === -INFINITY) {
  25240. var sign = (value < 0 ? -1 : 1);
  25241. return sign * MAX_INTEGER;
  25242. }
  25243. return value === value ? value : 0;
  25244. }
  25245. /**
  25246. * Converts `value` to an integer.
  25247. *
  25248. * **Note:** This method is loosely based on
  25249. * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
  25250. *
  25251. * @static
  25252. * @memberOf _
  25253. * @since 4.0.0
  25254. * @category Lang
  25255. * @param {*} value The value to convert.
  25256. * @returns {number} Returns the converted integer.
  25257. * @example
  25258. *
  25259. * _.toInteger(3.2);
  25260. * // => 3
  25261. *
  25262. * _.toInteger(Number.MIN_VALUE);
  25263. * // => 0
  25264. *
  25265. * _.toInteger(Infinity);
  25266. * // => 1.7976931348623157e+308
  25267. *
  25268. * _.toInteger('3.2');
  25269. * // => 3
  25270. */
  25271. function toInteger(value) {
  25272. var result = toFinite(value),
  25273. remainder = result % 1;
  25274. return result === result ? (remainder ? result - remainder : result) : 0;
  25275. }
  25276. /**
  25277. * Converts `value` to an integer suitable for use as the length of an
  25278. * array-like object.
  25279. *
  25280. * **Note:** This method is based on
  25281. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  25282. *
  25283. * @static
  25284. * @memberOf _
  25285. * @since 4.0.0
  25286. * @category Lang
  25287. * @param {*} value The value to convert.
  25288. * @returns {number} Returns the converted integer.
  25289. * @example
  25290. *
  25291. * _.toLength(3.2);
  25292. * // => 3
  25293. *
  25294. * _.toLength(Number.MIN_VALUE);
  25295. * // => 0
  25296. *
  25297. * _.toLength(Infinity);
  25298. * // => 4294967295
  25299. *
  25300. * _.toLength('3.2');
  25301. * // => 3
  25302. */
  25303. function toLength(value) {
  25304. return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
  25305. }
  25306. /**
  25307. * Converts `value` to a number.
  25308. *
  25309. * @static
  25310. * @memberOf _
  25311. * @since 4.0.0
  25312. * @category Lang
  25313. * @param {*} value The value to process.
  25314. * @returns {number} Returns the number.
  25315. * @example
  25316. *
  25317. * _.toNumber(3.2);
  25318. * // => 3.2
  25319. *
  25320. * _.toNumber(Number.MIN_VALUE);
  25321. * // => 5e-324
  25322. *
  25323. * _.toNumber(Infinity);
  25324. * // => Infinity
  25325. *
  25326. * _.toNumber('3.2');
  25327. * // => 3.2
  25328. */
  25329. function toNumber(value) {
  25330. if (typeof value == 'number') {
  25331. return value;
  25332. }
  25333. if (isSymbol(value)) {
  25334. return NAN;
  25335. }
  25336. if (isObject(value)) {
  25337. var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
  25338. value = isObject(other) ? (other + '') : other;
  25339. }
  25340. if (typeof value != 'string') {
  25341. return value === 0 ? value : +value;
  25342. }
  25343. value = value.replace(reTrim, '');
  25344. var isBinary = reIsBinary.test(value);
  25345. return (isBinary || reIsOctal.test(value))
  25346. ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
  25347. : (reIsBadHex.test(value) ? NAN : +value);
  25348. }
  25349. /**
  25350. * Converts `value` to a plain object flattening inherited enumerable string
  25351. * keyed properties of `value` to own properties of the plain object.
  25352. *
  25353. * @static
  25354. * @memberOf _
  25355. * @since 3.0.0
  25356. * @category Lang
  25357. * @param {*} value The value to convert.
  25358. * @returns {Object} Returns the converted plain object.
  25359. * @example
  25360. *
  25361. * function Foo() {
  25362. * this.b = 2;
  25363. * }
  25364. *
  25365. * Foo.prototype.c = 3;
  25366. *
  25367. * _.assign({ 'a': 1 }, new Foo);
  25368. * // => { 'a': 1, 'b': 2 }
  25369. *
  25370. * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
  25371. * // => { 'a': 1, 'b': 2, 'c': 3 }
  25372. */
  25373. function toPlainObject(value) {
  25374. return copyObject(value, keysIn(value));
  25375. }
  25376. /**
  25377. * Converts `value` to a safe integer. A safe integer can be compared and
  25378. * represented correctly.
  25379. *
  25380. * @static
  25381. * @memberOf _
  25382. * @since 4.0.0
  25383. * @category Lang
  25384. * @param {*} value The value to convert.
  25385. * @returns {number} Returns the converted integer.
  25386. * @example
  25387. *
  25388. * _.toSafeInteger(3.2);
  25389. * // => 3
  25390. *
  25391. * _.toSafeInteger(Number.MIN_VALUE);
  25392. * // => 0
  25393. *
  25394. * _.toSafeInteger(Infinity);
  25395. * // => 9007199254740991
  25396. *
  25397. * _.toSafeInteger('3.2');
  25398. * // => 3
  25399. */
  25400. function toSafeInteger(value) {
  25401. return value
  25402. ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
  25403. : (value === 0 ? value : 0);
  25404. }
  25405. /**
  25406. * Converts `value` to a string. An empty string is returned for `null`
  25407. * and `undefined` values. The sign of `-0` is preserved.
  25408. *
  25409. * @static
  25410. * @memberOf _
  25411. * @since 4.0.0
  25412. * @category Lang
  25413. * @param {*} value The value to convert.
  25414. * @returns {string} Returns the converted string.
  25415. * @example
  25416. *
  25417. * _.toString(null);
  25418. * // => ''
  25419. *
  25420. * _.toString(-0);
  25421. * // => '-0'
  25422. *
  25423. * _.toString([1, 2, 3]);
  25424. * // => '1,2,3'
  25425. */
  25426. function toString(value) {
  25427. return value == null ? '' : baseToString(value);
  25428. }
  25429. /*------------------------------------------------------------------------*/
  25430. /**
  25431. * Assigns own enumerable string keyed properties of source objects to the
  25432. * destination object. Source objects are applied from left to right.
  25433. * Subsequent sources overwrite property assignments of previous sources.
  25434. *
  25435. * **Note:** This method mutates `object` and is loosely based on
  25436. * [`Object.assign`](https://mdn.io/Object/assign).
  25437. *
  25438. * @static
  25439. * @memberOf _
  25440. * @since 0.10.0
  25441. * @category Object
  25442. * @param {Object} object The destination object.
  25443. * @param {...Object} [sources] The source objects.
  25444. * @returns {Object} Returns `object`.
  25445. * @see _.assignIn
  25446. * @example
  25447. *
  25448. * function Foo() {
  25449. * this.a = 1;
  25450. * }
  25451. *
  25452. * function Bar() {
  25453. * this.c = 3;
  25454. * }
  25455. *
  25456. * Foo.prototype.b = 2;
  25457. * Bar.prototype.d = 4;
  25458. *
  25459. * _.assign({ 'a': 0 }, new Foo, new Bar);
  25460. * // => { 'a': 1, 'c': 3 }
  25461. */
  25462. var assign = createAssigner(function(object, source) {
  25463. if (isPrototype(source) || isArrayLike(source)) {
  25464. copyObject(source, keys(source), object);
  25465. return;
  25466. }
  25467. for (var key in source) {
  25468. if (hasOwnProperty.call(source, key)) {
  25469. assignValue(object, key, source[key]);
  25470. }
  25471. }
  25472. });
  25473. /**
  25474. * This method is like `_.assign` except that it iterates over own and
  25475. * inherited source properties.
  25476. *
  25477. * **Note:** This method mutates `object`.
  25478. *
  25479. * @static
  25480. * @memberOf _
  25481. * @since 4.0.0
  25482. * @alias extend
  25483. * @category Object
  25484. * @param {Object} object The destination object.
  25485. * @param {...Object} [sources] The source objects.
  25486. * @returns {Object} Returns `object`.
  25487. * @see _.assign
  25488. * @example
  25489. *
  25490. * function Foo() {
  25491. * this.a = 1;
  25492. * }
  25493. *
  25494. * function Bar() {
  25495. * this.c = 3;
  25496. * }
  25497. *
  25498. * Foo.prototype.b = 2;
  25499. * Bar.prototype.d = 4;
  25500. *
  25501. * _.assignIn({ 'a': 0 }, new Foo, new Bar);
  25502. * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
  25503. */
  25504. var assignIn = createAssigner(function(object, source) {
  25505. copyObject(source, keysIn(source), object);
  25506. });
  25507. /**
  25508. * This method is like `_.assignIn` except that it accepts `customizer`
  25509. * which is invoked to produce the assigned values. If `customizer` returns
  25510. * `undefined`, assignment is handled by the method instead. The `customizer`
  25511. * is invoked with five arguments: (objValue, srcValue, key, object, source).
  25512. *
  25513. * **Note:** This method mutates `object`.
  25514. *
  25515. * @static
  25516. * @memberOf _
  25517. * @since 4.0.0
  25518. * @alias extendWith
  25519. * @category Object
  25520. * @param {Object} object The destination object.
  25521. * @param {...Object} sources The source objects.
  25522. * @param {Function} [customizer] The function to customize assigned values.
  25523. * @returns {Object} Returns `object`.
  25524. * @see _.assignWith
  25525. * @example
  25526. *
  25527. * function customizer(objValue, srcValue) {
  25528. * return _.isUndefined(objValue) ? srcValue : objValue;
  25529. * }
  25530. *
  25531. * var defaults = _.partialRight(_.assignInWith, customizer);
  25532. *
  25533. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  25534. * // => { 'a': 1, 'b': 2 }
  25535. */
  25536. var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
  25537. copyObject(source, keysIn(source), object, customizer);
  25538. });
  25539. /**
  25540. * This method is like `_.assign` except that it accepts `customizer`
  25541. * which is invoked to produce the assigned values. If `customizer` returns
  25542. * `undefined`, assignment is handled by the method instead. The `customizer`
  25543. * is invoked with five arguments: (objValue, srcValue, key, object, source).
  25544. *
  25545. * **Note:** This method mutates `object`.
  25546. *
  25547. * @static
  25548. * @memberOf _
  25549. * @since 4.0.0
  25550. * @category Object
  25551. * @param {Object} object The destination object.
  25552. * @param {...Object} sources The source objects.
  25553. * @param {Function} [customizer] The function to customize assigned values.
  25554. * @returns {Object} Returns `object`.
  25555. * @see _.assignInWith
  25556. * @example
  25557. *
  25558. * function customizer(objValue, srcValue) {
  25559. * return _.isUndefined(objValue) ? srcValue : objValue;
  25560. * }
  25561. *
  25562. * var defaults = _.partialRight(_.assignWith, customizer);
  25563. *
  25564. * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  25565. * // => { 'a': 1, 'b': 2 }
  25566. */
  25567. var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
  25568. copyObject(source, keys(source), object, customizer);
  25569. });
  25570. /**
  25571. * Creates an array of values corresponding to `paths` of `object`.
  25572. *
  25573. * @static
  25574. * @memberOf _
  25575. * @since 1.0.0
  25576. * @category Object
  25577. * @param {Object} object The object to iterate over.
  25578. * @param {...(string|string[])} [paths] The property paths to pick.
  25579. * @returns {Array} Returns the picked values.
  25580. * @example
  25581. *
  25582. * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
  25583. *
  25584. * _.at(object, ['a[0].b.c', 'a[1]']);
  25585. * // => [3, 4]
  25586. */
  25587. var at = flatRest(baseAt);
  25588. /**
  25589. * Creates an object that inherits from the `prototype` object. If a
  25590. * `properties` object is given, its own enumerable string keyed properties
  25591. * are assigned to the created object.
  25592. *
  25593. * @static
  25594. * @memberOf _
  25595. * @since 2.3.0
  25596. * @category Object
  25597. * @param {Object} prototype The object to inherit from.
  25598. * @param {Object} [properties] The properties to assign to the object.
  25599. * @returns {Object} Returns the new object.
  25600. * @example
  25601. *
  25602. * function Shape() {
  25603. * this.x = 0;
  25604. * this.y = 0;
  25605. * }
  25606. *
  25607. * function Circle() {
  25608. * Shape.call(this);
  25609. * }
  25610. *
  25611. * Circle.prototype = _.create(Shape.prototype, {
  25612. * 'constructor': Circle
  25613. * });
  25614. *
  25615. * var circle = new Circle;
  25616. * circle instanceof Circle;
  25617. * // => true
  25618. *
  25619. * circle instanceof Shape;
  25620. * // => true
  25621. */
  25622. function create(prototype, properties) {
  25623. var result = baseCreate(prototype);
  25624. return properties == null ? result : baseAssign(result, properties);
  25625. }
  25626. /**
  25627. * Assigns own and inherited enumerable string keyed properties of source
  25628. * objects to the destination object for all destination properties that
  25629. * resolve to `undefined`. Source objects are applied from left to right.
  25630. * Once a property is set, additional values of the same property are ignored.
  25631. *
  25632. * **Note:** This method mutates `object`.
  25633. *
  25634. * @static
  25635. * @since 0.1.0
  25636. * @memberOf _
  25637. * @category Object
  25638. * @param {Object} object The destination object.
  25639. * @param {...Object} [sources] The source objects.
  25640. * @returns {Object} Returns `object`.
  25641. * @see _.defaultsDeep
  25642. * @example
  25643. *
  25644. * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  25645. * // => { 'a': 1, 'b': 2 }
  25646. */
  25647. var defaults = baseRest(function(object, sources) {
  25648. object = Object(object);
  25649. var index = -1;
  25650. var length = sources.length;
  25651. var guard = length > 2 ? sources[2] : undefined;
  25652. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  25653. length = 1;
  25654. }
  25655. while (++index < length) {
  25656. var source = sources[index];
  25657. var props = keysIn(source);
  25658. var propsIndex = -1;
  25659. var propsLength = props.length;
  25660. while (++propsIndex < propsLength) {
  25661. var key = props[propsIndex];
  25662. var value = object[key];
  25663. if (value === undefined ||
  25664. (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
  25665. object[key] = source[key];
  25666. }
  25667. }
  25668. }
  25669. return object;
  25670. });
  25671. /**
  25672. * This method is like `_.defaults` except that it recursively assigns
  25673. * default properties.
  25674. *
  25675. * **Note:** This method mutates `object`.
  25676. *
  25677. * @static
  25678. * @memberOf _
  25679. * @since 3.10.0
  25680. * @category Object
  25681. * @param {Object} object The destination object.
  25682. * @param {...Object} [sources] The source objects.
  25683. * @returns {Object} Returns `object`.
  25684. * @see _.defaults
  25685. * @example
  25686. *
  25687. * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
  25688. * // => { 'a': { 'b': 2, 'c': 3 } }
  25689. */
  25690. var defaultsDeep = baseRest(function(args) {
  25691. args.push(undefined, customDefaultsMerge);
  25692. return apply(mergeWith, undefined, args);
  25693. });
  25694. /**
  25695. * This method is like `_.find` except that it returns the key of the first
  25696. * element `predicate` returns truthy for instead of the element itself.
  25697. *
  25698. * @static
  25699. * @memberOf _
  25700. * @since 1.1.0
  25701. * @category Object
  25702. * @param {Object} object The object to inspect.
  25703. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  25704. * @returns {string|undefined} Returns the key of the matched element,
  25705. * else `undefined`.
  25706. * @example
  25707. *
  25708. * var users = {
  25709. * 'barney': { 'age': 36, 'active': true },
  25710. * 'fred': { 'age': 40, 'active': false },
  25711. * 'pebbles': { 'age': 1, 'active': true }
  25712. * };
  25713. *
  25714. * _.findKey(users, function(o) { return o.age < 40; });
  25715. * // => 'barney' (iteration order is not guaranteed)
  25716. *
  25717. * // The `_.matches` iteratee shorthand.
  25718. * _.findKey(users, { 'age': 1, 'active': true });
  25719. * // => 'pebbles'
  25720. *
  25721. * // The `_.matchesProperty` iteratee shorthand.
  25722. * _.findKey(users, ['active', false]);
  25723. * // => 'fred'
  25724. *
  25725. * // The `_.property` iteratee shorthand.
  25726. * _.findKey(users, 'active');
  25727. * // => 'barney'
  25728. */
  25729. function findKey(object, predicate) {
  25730. return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
  25731. }
  25732. /**
  25733. * This method is like `_.findKey` except that it iterates over elements of
  25734. * a collection in the opposite order.
  25735. *
  25736. * @static
  25737. * @memberOf _
  25738. * @since 2.0.0
  25739. * @category Object
  25740. * @param {Object} object The object to inspect.
  25741. * @param {Function} [predicate=_.identity] The function invoked per iteration.
  25742. * @returns {string|undefined} Returns the key of the matched element,
  25743. * else `undefined`.
  25744. * @example
  25745. *
  25746. * var users = {
  25747. * 'barney': { 'age': 36, 'active': true },
  25748. * 'fred': { 'age': 40, 'active': false },
  25749. * 'pebbles': { 'age': 1, 'active': true }
  25750. * };
  25751. *
  25752. * _.findLastKey(users, function(o) { return o.age < 40; });
  25753. * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
  25754. *
  25755. * // The `_.matches` iteratee shorthand.
  25756. * _.findLastKey(users, { 'age': 36, 'active': true });
  25757. * // => 'barney'
  25758. *
  25759. * // The `_.matchesProperty` iteratee shorthand.
  25760. * _.findLastKey(users, ['active', false]);
  25761. * // => 'fred'
  25762. *
  25763. * // The `_.property` iteratee shorthand.
  25764. * _.findLastKey(users, 'active');
  25765. * // => 'pebbles'
  25766. */
  25767. function findLastKey(object, predicate) {
  25768. return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
  25769. }
  25770. /**
  25771. * Iterates over own and inherited enumerable string keyed properties of an
  25772. * object and invokes `iteratee` for each property. The iteratee is invoked
  25773. * with three arguments: (value, key, object). Iteratee functions may exit
  25774. * iteration early by explicitly returning `false`.
  25775. *
  25776. * @static
  25777. * @memberOf _
  25778. * @since 0.3.0
  25779. * @category Object
  25780. * @param {Object} object The object to iterate over.
  25781. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  25782. * @returns {Object} Returns `object`.
  25783. * @see _.forInRight
  25784. * @example
  25785. *
  25786. * function Foo() {
  25787. * this.a = 1;
  25788. * this.b = 2;
  25789. * }
  25790. *
  25791. * Foo.prototype.c = 3;
  25792. *
  25793. * _.forIn(new Foo, function(value, key) {
  25794. * console.log(key);
  25795. * });
  25796. * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
  25797. */
  25798. function forIn(object, iteratee) {
  25799. return object == null
  25800. ? object
  25801. : baseFor(object, getIteratee(iteratee, 3), keysIn);
  25802. }
  25803. /**
  25804. * This method is like `_.forIn` except that it iterates over properties of
  25805. * `object` in the opposite order.
  25806. *
  25807. * @static
  25808. * @memberOf _
  25809. * @since 2.0.0
  25810. * @category Object
  25811. * @param {Object} object The object to iterate over.
  25812. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  25813. * @returns {Object} Returns `object`.
  25814. * @see _.forIn
  25815. * @example
  25816. *
  25817. * function Foo() {
  25818. * this.a = 1;
  25819. * this.b = 2;
  25820. * }
  25821. *
  25822. * Foo.prototype.c = 3;
  25823. *
  25824. * _.forInRight(new Foo, function(value, key) {
  25825. * console.log(key);
  25826. * });
  25827. * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
  25828. */
  25829. function forInRight(object, iteratee) {
  25830. return object == null
  25831. ? object
  25832. : baseForRight(object, getIteratee(iteratee, 3), keysIn);
  25833. }
  25834. /**
  25835. * Iterates over own enumerable string keyed properties of an object and
  25836. * invokes `iteratee` for each property. The iteratee is invoked with three
  25837. * arguments: (value, key, object). Iteratee functions may exit iteration
  25838. * early by explicitly returning `false`.
  25839. *
  25840. * @static
  25841. * @memberOf _
  25842. * @since 0.3.0
  25843. * @category Object
  25844. * @param {Object} object The object to iterate over.
  25845. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  25846. * @returns {Object} Returns `object`.
  25847. * @see _.forOwnRight
  25848. * @example
  25849. *
  25850. * function Foo() {
  25851. * this.a = 1;
  25852. * this.b = 2;
  25853. * }
  25854. *
  25855. * Foo.prototype.c = 3;
  25856. *
  25857. * _.forOwn(new Foo, function(value, key) {
  25858. * console.log(key);
  25859. * });
  25860. * // => Logs 'a' then 'b' (iteration order is not guaranteed).
  25861. */
  25862. function forOwn(object, iteratee) {
  25863. return object && baseForOwn(object, getIteratee(iteratee, 3));
  25864. }
  25865. /**
  25866. * This method is like `_.forOwn` except that it iterates over properties of
  25867. * `object` in the opposite order.
  25868. *
  25869. * @static
  25870. * @memberOf _
  25871. * @since 2.0.0
  25872. * @category Object
  25873. * @param {Object} object The object to iterate over.
  25874. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  25875. * @returns {Object} Returns `object`.
  25876. * @see _.forOwn
  25877. * @example
  25878. *
  25879. * function Foo() {
  25880. * this.a = 1;
  25881. * this.b = 2;
  25882. * }
  25883. *
  25884. * Foo.prototype.c = 3;
  25885. *
  25886. * _.forOwnRight(new Foo, function(value, key) {
  25887. * console.log(key);
  25888. * });
  25889. * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
  25890. */
  25891. function forOwnRight(object, iteratee) {
  25892. return object && baseForOwnRight(object, getIteratee(iteratee, 3));
  25893. }
  25894. /**
  25895. * Creates an array of function property names from own enumerable properties
  25896. * of `object`.
  25897. *
  25898. * @static
  25899. * @since 0.1.0
  25900. * @memberOf _
  25901. * @category Object
  25902. * @param {Object} object The object to inspect.
  25903. * @returns {Array} Returns the function names.
  25904. * @see _.functionsIn
  25905. * @example
  25906. *
  25907. * function Foo() {
  25908. * this.a = _.constant('a');
  25909. * this.b = _.constant('b');
  25910. * }
  25911. *
  25912. * Foo.prototype.c = _.constant('c');
  25913. *
  25914. * _.functions(new Foo);
  25915. * // => ['a', 'b']
  25916. */
  25917. function functions(object) {
  25918. return object == null ? [] : baseFunctions(object, keys(object));
  25919. }
  25920. /**
  25921. * Creates an array of function property names from own and inherited
  25922. * enumerable properties of `object`.
  25923. *
  25924. * @static
  25925. * @memberOf _
  25926. * @since 4.0.0
  25927. * @category Object
  25928. * @param {Object} object The object to inspect.
  25929. * @returns {Array} Returns the function names.
  25930. * @see _.functions
  25931. * @example
  25932. *
  25933. * function Foo() {
  25934. * this.a = _.constant('a');
  25935. * this.b = _.constant('b');
  25936. * }
  25937. *
  25938. * Foo.prototype.c = _.constant('c');
  25939. *
  25940. * _.functionsIn(new Foo);
  25941. * // => ['a', 'b', 'c']
  25942. */
  25943. function functionsIn(object) {
  25944. return object == null ? [] : baseFunctions(object, keysIn(object));
  25945. }
  25946. /**
  25947. * Gets the value at `path` of `object`. If the resolved value is
  25948. * `undefined`, the `defaultValue` is returned in its place.
  25949. *
  25950. * @static
  25951. * @memberOf _
  25952. * @since 3.7.0
  25953. * @category Object
  25954. * @param {Object} object The object to query.
  25955. * @param {Array|string} path The path of the property to get.
  25956. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  25957. * @returns {*} Returns the resolved value.
  25958. * @example
  25959. *
  25960. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  25961. *
  25962. * _.get(object, 'a[0].b.c');
  25963. * // => 3
  25964. *
  25965. * _.get(object, ['a', '0', 'b', 'c']);
  25966. * // => 3
  25967. *
  25968. * _.get(object, 'a.b.c', 'default');
  25969. * // => 'default'
  25970. */
  25971. function get(object, path, defaultValue) {
  25972. var result = object == null ? undefined : baseGet(object, path);
  25973. return result === undefined ? defaultValue : result;
  25974. }
  25975. /**
  25976. * Checks if `path` is a direct property of `object`.
  25977. *
  25978. * @static
  25979. * @since 0.1.0
  25980. * @memberOf _
  25981. * @category Object
  25982. * @param {Object} object The object to query.
  25983. * @param {Array|string} path The path to check.
  25984. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  25985. * @example
  25986. *
  25987. * var object = { 'a': { 'b': 2 } };
  25988. * var other = _.create({ 'a': _.create({ 'b': 2 }) });
  25989. *
  25990. * _.has(object, 'a');
  25991. * // => true
  25992. *
  25993. * _.has(object, 'a.b');
  25994. * // => true
  25995. *
  25996. * _.has(object, ['a', 'b']);
  25997. * // => true
  25998. *
  25999. * _.has(other, 'a');
  26000. * // => false
  26001. */
  26002. function has(object, path) {
  26003. return object != null && hasPath(object, path, baseHas);
  26004. }
  26005. /**
  26006. * Checks if `path` is a direct or inherited property of `object`.
  26007. *
  26008. * @static
  26009. * @memberOf _
  26010. * @since 4.0.0
  26011. * @category Object
  26012. * @param {Object} object The object to query.
  26013. * @param {Array|string} path The path to check.
  26014. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  26015. * @example
  26016. *
  26017. * var object = _.create({ 'a': _.create({ 'b': 2 }) });
  26018. *
  26019. * _.hasIn(object, 'a');
  26020. * // => true
  26021. *
  26022. * _.hasIn(object, 'a.b');
  26023. * // => true
  26024. *
  26025. * _.hasIn(object, ['a', 'b']);
  26026. * // => true
  26027. *
  26028. * _.hasIn(object, 'b');
  26029. * // => false
  26030. */
  26031. function hasIn(object, path) {
  26032. return object != null && hasPath(object, path, baseHasIn);
  26033. }
  26034. /**
  26035. * Creates an object composed of the inverted keys and values of `object`.
  26036. * If `object` contains duplicate values, subsequent values overwrite
  26037. * property assignments of previous values.
  26038. *
  26039. * @static
  26040. * @memberOf _
  26041. * @since 0.7.0
  26042. * @category Object
  26043. * @param {Object} object The object to invert.
  26044. * @returns {Object} Returns the new inverted object.
  26045. * @example
  26046. *
  26047. * var object = { 'a': 1, 'b': 2, 'c': 1 };
  26048. *
  26049. * _.invert(object);
  26050. * // => { '1': 'c', '2': 'b' }
  26051. */
  26052. var invert = createInverter(function(result, value, key) {
  26053. if (value != null &&
  26054. typeof value.toString != 'function') {
  26055. value = nativeObjectToString.call(value);
  26056. }
  26057. result[value] = key;
  26058. }, constant(identity));
  26059. /**
  26060. * This method is like `_.invert` except that the inverted object is generated
  26061. * from the results of running each element of `object` thru `iteratee`. The
  26062. * corresponding inverted value of each inverted key is an array of keys
  26063. * responsible for generating the inverted value. The iteratee is invoked
  26064. * with one argument: (value).
  26065. *
  26066. * @static
  26067. * @memberOf _
  26068. * @since 4.1.0
  26069. * @category Object
  26070. * @param {Object} object The object to invert.
  26071. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  26072. * @returns {Object} Returns the new inverted object.
  26073. * @example
  26074. *
  26075. * var object = { 'a': 1, 'b': 2, 'c': 1 };
  26076. *
  26077. * _.invertBy(object);
  26078. * // => { '1': ['a', 'c'], '2': ['b'] }
  26079. *
  26080. * _.invertBy(object, function(value) {
  26081. * return 'group' + value;
  26082. * });
  26083. * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
  26084. */
  26085. var invertBy = createInverter(function(result, value, key) {
  26086. if (value != null &&
  26087. typeof value.toString != 'function') {
  26088. value = nativeObjectToString.call(value);
  26089. }
  26090. if (hasOwnProperty.call(result, value)) {
  26091. result[value].push(key);
  26092. } else {
  26093. result[value] = [key];
  26094. }
  26095. }, getIteratee);
  26096. /**
  26097. * Invokes the method at `path` of `object`.
  26098. *
  26099. * @static
  26100. * @memberOf _
  26101. * @since 4.0.0
  26102. * @category Object
  26103. * @param {Object} object The object to query.
  26104. * @param {Array|string} path The path of the method to invoke.
  26105. * @param {...*} [args] The arguments to invoke the method with.
  26106. * @returns {*} Returns the result of the invoked method.
  26107. * @example
  26108. *
  26109. * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
  26110. *
  26111. * _.invoke(object, 'a[0].b.c.slice', 1, 3);
  26112. * // => [2, 3]
  26113. */
  26114. var invoke = baseRest(baseInvoke);
  26115. /**
  26116. * Creates an array of the own enumerable property names of `object`.
  26117. *
  26118. * **Note:** Non-object values are coerced to objects. See the
  26119. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  26120. * for more details.
  26121. *
  26122. * @static
  26123. * @since 0.1.0
  26124. * @memberOf _
  26125. * @category Object
  26126. * @param {Object} object The object to query.
  26127. * @returns {Array} Returns the array of property names.
  26128. * @example
  26129. *
  26130. * function Foo() {
  26131. * this.a = 1;
  26132. * this.b = 2;
  26133. * }
  26134. *
  26135. * Foo.prototype.c = 3;
  26136. *
  26137. * _.keys(new Foo);
  26138. * // => ['a', 'b'] (iteration order is not guaranteed)
  26139. *
  26140. * _.keys('hi');
  26141. * // => ['0', '1']
  26142. */
  26143. function keys(object) {
  26144. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  26145. }
  26146. /**
  26147. * Creates an array of the own and inherited enumerable property names of `object`.
  26148. *
  26149. * **Note:** Non-object values are coerced to objects.
  26150. *
  26151. * @static
  26152. * @memberOf _
  26153. * @since 3.0.0
  26154. * @category Object
  26155. * @param {Object} object The object to query.
  26156. * @returns {Array} Returns the array of property names.
  26157. * @example
  26158. *
  26159. * function Foo() {
  26160. * this.a = 1;
  26161. * this.b = 2;
  26162. * }
  26163. *
  26164. * Foo.prototype.c = 3;
  26165. *
  26166. * _.keysIn(new Foo);
  26167. * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
  26168. */
  26169. function keysIn(object) {
  26170. return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
  26171. }
  26172. /**
  26173. * The opposite of `_.mapValues`; this method creates an object with the
  26174. * same values as `object` and keys generated by running each own enumerable
  26175. * string keyed property of `object` thru `iteratee`. The iteratee is invoked
  26176. * with three arguments: (value, key, object).
  26177. *
  26178. * @static
  26179. * @memberOf _
  26180. * @since 3.8.0
  26181. * @category Object
  26182. * @param {Object} object The object to iterate over.
  26183. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  26184. * @returns {Object} Returns the new mapped object.
  26185. * @see _.mapValues
  26186. * @example
  26187. *
  26188. * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
  26189. * return key + value;
  26190. * });
  26191. * // => { 'a1': 1, 'b2': 2 }
  26192. */
  26193. function mapKeys(object, iteratee) {
  26194. var result = {};
  26195. iteratee = getIteratee(iteratee, 3);
  26196. baseForOwn(object, function(value, key, object) {
  26197. baseAssignValue(result, iteratee(value, key, object), value);
  26198. });
  26199. return result;
  26200. }
  26201. /**
  26202. * Creates an object with the same keys as `object` and values generated
  26203. * by running each own enumerable string keyed property of `object` thru
  26204. * `iteratee`. The iteratee is invoked with three arguments:
  26205. * (value, key, object).
  26206. *
  26207. * @static
  26208. * @memberOf _
  26209. * @since 2.4.0
  26210. * @category Object
  26211. * @param {Object} object The object to iterate over.
  26212. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  26213. * @returns {Object} Returns the new mapped object.
  26214. * @see _.mapKeys
  26215. * @example
  26216. *
  26217. * var users = {
  26218. * 'fred': { 'user': 'fred', 'age': 40 },
  26219. * 'pebbles': { 'user': 'pebbles', 'age': 1 }
  26220. * };
  26221. *
  26222. * _.mapValues(users, function(o) { return o.age; });
  26223. * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
  26224. *
  26225. * // The `_.property` iteratee shorthand.
  26226. * _.mapValues(users, 'age');
  26227. * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
  26228. */
  26229. function mapValues(object, iteratee) {
  26230. var result = {};
  26231. iteratee = getIteratee(iteratee, 3);
  26232. baseForOwn(object, function(value, key, object) {
  26233. baseAssignValue(result, key, iteratee(value, key, object));
  26234. });
  26235. return result;
  26236. }
  26237. /**
  26238. * This method is like `_.assign` except that it recursively merges own and
  26239. * inherited enumerable string keyed properties of source objects into the
  26240. * destination object. Source properties that resolve to `undefined` are
  26241. * skipped if a destination value exists. Array and plain object properties
  26242. * are merged recursively. Other objects and value types are overridden by
  26243. * assignment. Source objects are applied from left to right. Subsequent
  26244. * sources overwrite property assignments of previous sources.
  26245. *
  26246. * **Note:** This method mutates `object`.
  26247. *
  26248. * @static
  26249. * @memberOf _
  26250. * @since 0.5.0
  26251. * @category Object
  26252. * @param {Object} object The destination object.
  26253. * @param {...Object} [sources] The source objects.
  26254. * @returns {Object} Returns `object`.
  26255. * @example
  26256. *
  26257. * var object = {
  26258. * 'a': [{ 'b': 2 }, { 'd': 4 }]
  26259. * };
  26260. *
  26261. * var other = {
  26262. * 'a': [{ 'c': 3 }, { 'e': 5 }]
  26263. * };
  26264. *
  26265. * _.merge(object, other);
  26266. * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
  26267. */
  26268. var merge = createAssigner(function(object, source, srcIndex) {
  26269. baseMerge(object, source, srcIndex);
  26270. });
  26271. /**
  26272. * This method is like `_.merge` except that it accepts `customizer` which
  26273. * is invoked to produce the merged values of the destination and source
  26274. * properties. If `customizer` returns `undefined`, merging is handled by the
  26275. * method instead. The `customizer` is invoked with six arguments:
  26276. * (objValue, srcValue, key, object, source, stack).
  26277. *
  26278. * **Note:** This method mutates `object`.
  26279. *
  26280. * @static
  26281. * @memberOf _
  26282. * @since 4.0.0
  26283. * @category Object
  26284. * @param {Object} object The destination object.
  26285. * @param {...Object} sources The source objects.
  26286. * @param {Function} customizer The function to customize assigned values.
  26287. * @returns {Object} Returns `object`.
  26288. * @example
  26289. *
  26290. * function customizer(objValue, srcValue) {
  26291. * if (_.isArray(objValue)) {
  26292. * return objValue.concat(srcValue);
  26293. * }
  26294. * }
  26295. *
  26296. * var object = { 'a': [1], 'b': [2] };
  26297. * var other = { 'a': [3], 'b': [4] };
  26298. *
  26299. * _.mergeWith(object, other, customizer);
  26300. * // => { 'a': [1, 3], 'b': [2, 4] }
  26301. */
  26302. var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
  26303. baseMerge(object, source, srcIndex, customizer);
  26304. });
  26305. /**
  26306. * The opposite of `_.pick`; this method creates an object composed of the
  26307. * own and inherited enumerable property paths of `object` that are not omitted.
  26308. *
  26309. * **Note:** This method is considerably slower than `_.pick`.
  26310. *
  26311. * @static
  26312. * @since 0.1.0
  26313. * @memberOf _
  26314. * @category Object
  26315. * @param {Object} object The source object.
  26316. * @param {...(string|string[])} [paths] The property paths to omit.
  26317. * @returns {Object} Returns the new object.
  26318. * @example
  26319. *
  26320. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  26321. *
  26322. * _.omit(object, ['a', 'c']);
  26323. * // => { 'b': '2' }
  26324. */
  26325. var omit = flatRest(function(object, paths) {
  26326. var result = {};
  26327. if (object == null) {
  26328. return result;
  26329. }
  26330. var isDeep = false;
  26331. paths = arrayMap(paths, function(path) {
  26332. path = castPath(path, object);
  26333. isDeep || (isDeep = path.length > 1);
  26334. return path;
  26335. });
  26336. copyObject(object, getAllKeysIn(object), result);
  26337. if (isDeep) {
  26338. result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
  26339. }
  26340. var length = paths.length;
  26341. while (length--) {
  26342. baseUnset(result, paths[length]);
  26343. }
  26344. return result;
  26345. });
  26346. /**
  26347. * The opposite of `_.pickBy`; this method creates an object composed of
  26348. * the own and inherited enumerable string keyed properties of `object` that
  26349. * `predicate` doesn't return truthy for. The predicate is invoked with two
  26350. * arguments: (value, key).
  26351. *
  26352. * @static
  26353. * @memberOf _
  26354. * @since 4.0.0
  26355. * @category Object
  26356. * @param {Object} object The source object.
  26357. * @param {Function} [predicate=_.identity] The function invoked per property.
  26358. * @returns {Object} Returns the new object.
  26359. * @example
  26360. *
  26361. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  26362. *
  26363. * _.omitBy(object, _.isNumber);
  26364. * // => { 'b': '2' }
  26365. */
  26366. function omitBy(object, predicate) {
  26367. return pickBy(object, negate(getIteratee(predicate)));
  26368. }
  26369. /**
  26370. * Creates an object composed of the picked `object` properties.
  26371. *
  26372. * @static
  26373. * @since 0.1.0
  26374. * @memberOf _
  26375. * @category Object
  26376. * @param {Object} object The source object.
  26377. * @param {...(string|string[])} [paths] The property paths to pick.
  26378. * @returns {Object} Returns the new object.
  26379. * @example
  26380. *
  26381. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  26382. *
  26383. * _.pick(object, ['a', 'c']);
  26384. * // => { 'a': 1, 'c': 3 }
  26385. */
  26386. var pick = flatRest(function(object, paths) {
  26387. return object == null ? {} : basePick(object, paths);
  26388. });
  26389. /**
  26390. * Creates an object composed of the `object` properties `predicate` returns
  26391. * truthy for. The predicate is invoked with two arguments: (value, key).
  26392. *
  26393. * @static
  26394. * @memberOf _
  26395. * @since 4.0.0
  26396. * @category Object
  26397. * @param {Object} object The source object.
  26398. * @param {Function} [predicate=_.identity] The function invoked per property.
  26399. * @returns {Object} Returns the new object.
  26400. * @example
  26401. *
  26402. * var object = { 'a': 1, 'b': '2', 'c': 3 };
  26403. *
  26404. * _.pickBy(object, _.isNumber);
  26405. * // => { 'a': 1, 'c': 3 }
  26406. */
  26407. function pickBy(object, predicate) {
  26408. if (object == null) {
  26409. return {};
  26410. }
  26411. var props = arrayMap(getAllKeysIn(object), function(prop) {
  26412. return [prop];
  26413. });
  26414. predicate = getIteratee(predicate);
  26415. return basePickBy(object, props, function(value, path) {
  26416. return predicate(value, path[0]);
  26417. });
  26418. }
  26419. /**
  26420. * This method is like `_.get` except that if the resolved value is a
  26421. * function it's invoked with the `this` binding of its parent object and
  26422. * its result is returned.
  26423. *
  26424. * @static
  26425. * @since 0.1.0
  26426. * @memberOf _
  26427. * @category Object
  26428. * @param {Object} object The object to query.
  26429. * @param {Array|string} path The path of the property to resolve.
  26430. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  26431. * @returns {*} Returns the resolved value.
  26432. * @example
  26433. *
  26434. * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
  26435. *
  26436. * _.result(object, 'a[0].b.c1');
  26437. * // => 3
  26438. *
  26439. * _.result(object, 'a[0].b.c2');
  26440. * // => 4
  26441. *
  26442. * _.result(object, 'a[0].b.c3', 'default');
  26443. * // => 'default'
  26444. *
  26445. * _.result(object, 'a[0].b.c3', _.constant('default'));
  26446. * // => 'default'
  26447. */
  26448. function result(object, path, defaultValue) {
  26449. path = castPath(path, object);
  26450. var index = -1,
  26451. length = path.length;
  26452. // Ensure the loop is entered when path is empty.
  26453. if (!length) {
  26454. length = 1;
  26455. object = undefined;
  26456. }
  26457. while (++index < length) {
  26458. var value = object == null ? undefined : object[toKey(path[index])];
  26459. if (value === undefined) {
  26460. index = length;
  26461. value = defaultValue;
  26462. }
  26463. object = isFunction(value) ? value.call(object) : value;
  26464. }
  26465. return object;
  26466. }
  26467. /**
  26468. * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
  26469. * it's created. Arrays are created for missing index properties while objects
  26470. * are created for all other missing properties. Use `_.setWith` to customize
  26471. * `path` creation.
  26472. *
  26473. * **Note:** This method mutates `object`.
  26474. *
  26475. * @static
  26476. * @memberOf _
  26477. * @since 3.7.0
  26478. * @category Object
  26479. * @param {Object} object The object to modify.
  26480. * @param {Array|string} path The path of the property to set.
  26481. * @param {*} value The value to set.
  26482. * @returns {Object} Returns `object`.
  26483. * @example
  26484. *
  26485. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  26486. *
  26487. * _.set(object, 'a[0].b.c', 4);
  26488. * console.log(object.a[0].b.c);
  26489. * // => 4
  26490. *
  26491. * _.set(object, ['x', '0', 'y', 'z'], 5);
  26492. * console.log(object.x[0].y.z);
  26493. * // => 5
  26494. */
  26495. function set(object, path, value) {
  26496. return object == null ? object : baseSet(object, path, value);
  26497. }
  26498. /**
  26499. * This method is like `_.set` except that it accepts `customizer` which is
  26500. * invoked to produce the objects of `path`. If `customizer` returns `undefined`
  26501. * path creation is handled by the method instead. The `customizer` is invoked
  26502. * with three arguments: (nsValue, key, nsObject).
  26503. *
  26504. * **Note:** This method mutates `object`.
  26505. *
  26506. * @static
  26507. * @memberOf _
  26508. * @since 4.0.0
  26509. * @category Object
  26510. * @param {Object} object The object to modify.
  26511. * @param {Array|string} path The path of the property to set.
  26512. * @param {*} value The value to set.
  26513. * @param {Function} [customizer] The function to customize assigned values.
  26514. * @returns {Object} Returns `object`.
  26515. * @example
  26516. *
  26517. * var object = {};
  26518. *
  26519. * _.setWith(object, '[0][1]', 'a', Object);
  26520. * // => { '0': { '1': 'a' } }
  26521. */
  26522. function setWith(object, path, value, customizer) {
  26523. customizer = typeof customizer == 'function' ? customizer : undefined;
  26524. return object == null ? object : baseSet(object, path, value, customizer);
  26525. }
  26526. /**
  26527. * Creates an array of own enumerable string keyed-value pairs for `object`
  26528. * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
  26529. * entries are returned.
  26530. *
  26531. * @static
  26532. * @memberOf _
  26533. * @since 4.0.0
  26534. * @alias entries
  26535. * @category Object
  26536. * @param {Object} object The object to query.
  26537. * @returns {Array} Returns the key-value pairs.
  26538. * @example
  26539. *
  26540. * function Foo() {
  26541. * this.a = 1;
  26542. * this.b = 2;
  26543. * }
  26544. *
  26545. * Foo.prototype.c = 3;
  26546. *
  26547. * _.toPairs(new Foo);
  26548. * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
  26549. */
  26550. var toPairs = createToPairs(keys);
  26551. /**
  26552. * Creates an array of own and inherited enumerable string keyed-value pairs
  26553. * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
  26554. * or set, its entries are returned.
  26555. *
  26556. * @static
  26557. * @memberOf _
  26558. * @since 4.0.0
  26559. * @alias entriesIn
  26560. * @category Object
  26561. * @param {Object} object The object to query.
  26562. * @returns {Array} Returns the key-value pairs.
  26563. * @example
  26564. *
  26565. * function Foo() {
  26566. * this.a = 1;
  26567. * this.b = 2;
  26568. * }
  26569. *
  26570. * Foo.prototype.c = 3;
  26571. *
  26572. * _.toPairsIn(new Foo);
  26573. * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
  26574. */
  26575. var toPairsIn = createToPairs(keysIn);
  26576. /**
  26577. * An alternative to `_.reduce`; this method transforms `object` to a new
  26578. * `accumulator` object which is the result of running each of its own
  26579. * enumerable string keyed properties thru `iteratee`, with each invocation
  26580. * potentially mutating the `accumulator` object. If `accumulator` is not
  26581. * provided, a new object with the same `[[Prototype]]` will be used. The
  26582. * iteratee is invoked with four arguments: (accumulator, value, key, object).
  26583. * Iteratee functions may exit iteration early by explicitly returning `false`.
  26584. *
  26585. * @static
  26586. * @memberOf _
  26587. * @since 1.3.0
  26588. * @category Object
  26589. * @param {Object} object The object to iterate over.
  26590. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  26591. * @param {*} [accumulator] The custom accumulator value.
  26592. * @returns {*} Returns the accumulated value.
  26593. * @example
  26594. *
  26595. * _.transform([2, 3, 4], function(result, n) {
  26596. * result.push(n *= n);
  26597. * return n % 2 == 0;
  26598. * }, []);
  26599. * // => [4, 9]
  26600. *
  26601. * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  26602. * (result[value] || (result[value] = [])).push(key);
  26603. * }, {});
  26604. * // => { '1': ['a', 'c'], '2': ['b'] }
  26605. */
  26606. function transform(object, iteratee, accumulator) {
  26607. var isArr = isArray(object),
  26608. isArrLike = isArr || isBuffer(object) || isTypedArray(object);
  26609. iteratee = getIteratee(iteratee, 4);
  26610. if (accumulator == null) {
  26611. var Ctor = object && object.constructor;
  26612. if (isArrLike) {
  26613. accumulator = isArr ? new Ctor : [];
  26614. }
  26615. else if (isObject(object)) {
  26616. accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
  26617. }
  26618. else {
  26619. accumulator = {};
  26620. }
  26621. }
  26622. (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
  26623. return iteratee(accumulator, value, index, object);
  26624. });
  26625. return accumulator;
  26626. }
  26627. /**
  26628. * Removes the property at `path` of `object`.
  26629. *
  26630. * **Note:** This method mutates `object`.
  26631. *
  26632. * @static
  26633. * @memberOf _
  26634. * @since 4.0.0
  26635. * @category Object
  26636. * @param {Object} object The object to modify.
  26637. * @param {Array|string} path The path of the property to unset.
  26638. * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  26639. * @example
  26640. *
  26641. * var object = { 'a': [{ 'b': { 'c': 7 } }] };
  26642. * _.unset(object, 'a[0].b.c');
  26643. * // => true
  26644. *
  26645. * console.log(object);
  26646. * // => { 'a': [{ 'b': {} }] };
  26647. *
  26648. * _.unset(object, ['a', '0', 'b', 'c']);
  26649. * // => true
  26650. *
  26651. * console.log(object);
  26652. * // => { 'a': [{ 'b': {} }] };
  26653. */
  26654. function unset(object, path) {
  26655. return object == null ? true : baseUnset(object, path);
  26656. }
  26657. /**
  26658. * This method is like `_.set` except that accepts `updater` to produce the
  26659. * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
  26660. * is invoked with one argument: (value).
  26661. *
  26662. * **Note:** This method mutates `object`.
  26663. *
  26664. * @static
  26665. * @memberOf _
  26666. * @since 4.6.0
  26667. * @category Object
  26668. * @param {Object} object The object to modify.
  26669. * @param {Array|string} path The path of the property to set.
  26670. * @param {Function} updater The function to produce the updated value.
  26671. * @returns {Object} Returns `object`.
  26672. * @example
  26673. *
  26674. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  26675. *
  26676. * _.update(object, 'a[0].b.c', function(n) { return n * n; });
  26677. * console.log(object.a[0].b.c);
  26678. * // => 9
  26679. *
  26680. * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
  26681. * console.log(object.x[0].y.z);
  26682. * // => 0
  26683. */
  26684. function update(object, path, updater) {
  26685. return object == null ? object : baseUpdate(object, path, castFunction(updater));
  26686. }
  26687. /**
  26688. * This method is like `_.update` except that it accepts `customizer` which is
  26689. * invoked to produce the objects of `path`. If `customizer` returns `undefined`
  26690. * path creation is handled by the method instead. The `customizer` is invoked
  26691. * with three arguments: (nsValue, key, nsObject).
  26692. *
  26693. * **Note:** This method mutates `object`.
  26694. *
  26695. * @static
  26696. * @memberOf _
  26697. * @since 4.6.0
  26698. * @category Object
  26699. * @param {Object} object The object to modify.
  26700. * @param {Array|string} path The path of the property to set.
  26701. * @param {Function} updater The function to produce the updated value.
  26702. * @param {Function} [customizer] The function to customize assigned values.
  26703. * @returns {Object} Returns `object`.
  26704. * @example
  26705. *
  26706. * var object = {};
  26707. *
  26708. * _.updateWith(object, '[0][1]', _.constant('a'), Object);
  26709. * // => { '0': { '1': 'a' } }
  26710. */
  26711. function updateWith(object, path, updater, customizer) {
  26712. customizer = typeof customizer == 'function' ? customizer : undefined;
  26713. return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
  26714. }
  26715. /**
  26716. * Creates an array of the own enumerable string keyed property values of `object`.
  26717. *
  26718. * **Note:** Non-object values are coerced to objects.
  26719. *
  26720. * @static
  26721. * @since 0.1.0
  26722. * @memberOf _
  26723. * @category Object
  26724. * @param {Object} object The object to query.
  26725. * @returns {Array} Returns the array of property values.
  26726. * @example
  26727. *
  26728. * function Foo() {
  26729. * this.a = 1;
  26730. * this.b = 2;
  26731. * }
  26732. *
  26733. * Foo.prototype.c = 3;
  26734. *
  26735. * _.values(new Foo);
  26736. * // => [1, 2] (iteration order is not guaranteed)
  26737. *
  26738. * _.values('hi');
  26739. * // => ['h', 'i']
  26740. */
  26741. function values(object) {
  26742. return object == null ? [] : baseValues(object, keys(object));
  26743. }
  26744. /**
  26745. * Creates an array of the own and inherited enumerable string keyed property
  26746. * values of `object`.
  26747. *
  26748. * **Note:** Non-object values are coerced to objects.
  26749. *
  26750. * @static
  26751. * @memberOf _
  26752. * @since 3.0.0
  26753. * @category Object
  26754. * @param {Object} object The object to query.
  26755. * @returns {Array} Returns the array of property values.
  26756. * @example
  26757. *
  26758. * function Foo() {
  26759. * this.a = 1;
  26760. * this.b = 2;
  26761. * }
  26762. *
  26763. * Foo.prototype.c = 3;
  26764. *
  26765. * _.valuesIn(new Foo);
  26766. * // => [1, 2, 3] (iteration order is not guaranteed)
  26767. */
  26768. function valuesIn(object) {
  26769. return object == null ? [] : baseValues(object, keysIn(object));
  26770. }
  26771. /*------------------------------------------------------------------------*/
  26772. /**
  26773. * Clamps `number` within the inclusive `lower` and `upper` bounds.
  26774. *
  26775. * @static
  26776. * @memberOf _
  26777. * @since 4.0.0
  26778. * @category Number
  26779. * @param {number} number The number to clamp.
  26780. * @param {number} [lower] The lower bound.
  26781. * @param {number} upper The upper bound.
  26782. * @returns {number} Returns the clamped number.
  26783. * @example
  26784. *
  26785. * _.clamp(-10, -5, 5);
  26786. * // => -5
  26787. *
  26788. * _.clamp(10, -5, 5);
  26789. * // => 5
  26790. */
  26791. function clamp(number, lower, upper) {
  26792. if (upper === undefined) {
  26793. upper = lower;
  26794. lower = undefined;
  26795. }
  26796. if (upper !== undefined) {
  26797. upper = toNumber(upper);
  26798. upper = upper === upper ? upper : 0;
  26799. }
  26800. if (lower !== undefined) {
  26801. lower = toNumber(lower);
  26802. lower = lower === lower ? lower : 0;
  26803. }
  26804. return baseClamp(toNumber(number), lower, upper);
  26805. }
  26806. /**
  26807. * Checks if `n` is between `start` and up to, but not including, `end`. If
  26808. * `end` is not specified, it's set to `start` with `start` then set to `0`.
  26809. * If `start` is greater than `end` the params are swapped to support
  26810. * negative ranges.
  26811. *
  26812. * @static
  26813. * @memberOf _
  26814. * @since 3.3.0
  26815. * @category Number
  26816. * @param {number} number The number to check.
  26817. * @param {number} [start=0] The start of the range.
  26818. * @param {number} end The end of the range.
  26819. * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
  26820. * @see _.range, _.rangeRight
  26821. * @example
  26822. *
  26823. * _.inRange(3, 2, 4);
  26824. * // => true
  26825. *
  26826. * _.inRange(4, 8);
  26827. * // => true
  26828. *
  26829. * _.inRange(4, 2);
  26830. * // => false
  26831. *
  26832. * _.inRange(2, 2);
  26833. * // => false
  26834. *
  26835. * _.inRange(1.2, 2);
  26836. * // => true
  26837. *
  26838. * _.inRange(5.2, 4);
  26839. * // => false
  26840. *
  26841. * _.inRange(-3, -2, -6);
  26842. * // => true
  26843. */
  26844. function inRange(number, start, end) {
  26845. start = toFinite(start);
  26846. if (end === undefined) {
  26847. end = start;
  26848. start = 0;
  26849. } else {
  26850. end = toFinite(end);
  26851. }
  26852. number = toNumber(number);
  26853. return baseInRange(number, start, end);
  26854. }
  26855. /**
  26856. * Produces a random number between the inclusive `lower` and `upper` bounds.
  26857. * If only one argument is provided a number between `0` and the given number
  26858. * is returned. If `floating` is `true`, or either `lower` or `upper` are
  26859. * floats, a floating-point number is returned instead of an integer.
  26860. *
  26861. * **Note:** JavaScript follows the IEEE-754 standard for resolving
  26862. * floating-point values which can produce unexpected results.
  26863. *
  26864. * @static
  26865. * @memberOf _
  26866. * @since 0.7.0
  26867. * @category Number
  26868. * @param {number} [lower=0] The lower bound.
  26869. * @param {number} [upper=1] The upper bound.
  26870. * @param {boolean} [floating] Specify returning a floating-point number.
  26871. * @returns {number} Returns the random number.
  26872. * @example
  26873. *
  26874. * _.random(0, 5);
  26875. * // => an integer between 0 and 5
  26876. *
  26877. * _.random(5);
  26878. * // => also an integer between 0 and 5
  26879. *
  26880. * _.random(5, true);
  26881. * // => a floating-point number between 0 and 5
  26882. *
  26883. * _.random(1.2, 5.2);
  26884. * // => a floating-point number between 1.2 and 5.2
  26885. */
  26886. function random(lower, upper, floating) {
  26887. if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
  26888. upper = floating = undefined;
  26889. }
  26890. if (floating === undefined) {
  26891. if (typeof upper == 'boolean') {
  26892. floating = upper;
  26893. upper = undefined;
  26894. }
  26895. else if (typeof lower == 'boolean') {
  26896. floating = lower;
  26897. lower = undefined;
  26898. }
  26899. }
  26900. if (lower === undefined && upper === undefined) {
  26901. lower = 0;
  26902. upper = 1;
  26903. }
  26904. else {
  26905. lower = toFinite(lower);
  26906. if (upper === undefined) {
  26907. upper = lower;
  26908. lower = 0;
  26909. } else {
  26910. upper = toFinite(upper);
  26911. }
  26912. }
  26913. if (lower > upper) {
  26914. var temp = lower;
  26915. lower = upper;
  26916. upper = temp;
  26917. }
  26918. if (floating || lower % 1 || upper % 1) {
  26919. var rand = nativeRandom();
  26920. return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
  26921. }
  26922. return baseRandom(lower, upper);
  26923. }
  26924. /*------------------------------------------------------------------------*/
  26925. /**
  26926. * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
  26927. *
  26928. * @static
  26929. * @memberOf _
  26930. * @since 3.0.0
  26931. * @category String
  26932. * @param {string} [string=''] The string to convert.
  26933. * @returns {string} Returns the camel cased string.
  26934. * @example
  26935. *
  26936. * _.camelCase('Foo Bar');
  26937. * // => 'fooBar'
  26938. *
  26939. * _.camelCase('--foo-bar--');
  26940. * // => 'fooBar'
  26941. *
  26942. * _.camelCase('__FOO_BAR__');
  26943. * // => 'fooBar'
  26944. */
  26945. var camelCase = createCompounder(function(result, word, index) {
  26946. word = word.toLowerCase();
  26947. return result + (index ? capitalize(word) : word);
  26948. });
  26949. /**
  26950. * Converts the first character of `string` to upper case and the remaining
  26951. * to lower case.
  26952. *
  26953. * @static
  26954. * @memberOf _
  26955. * @since 3.0.0
  26956. * @category String
  26957. * @param {string} [string=''] The string to capitalize.
  26958. * @returns {string} Returns the capitalized string.
  26959. * @example
  26960. *
  26961. * _.capitalize('FRED');
  26962. * // => 'Fred'
  26963. */
  26964. function capitalize(string) {
  26965. return upperFirst(toString(string).toLowerCase());
  26966. }
  26967. /**
  26968. * Deburrs `string` by converting
  26969. * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
  26970. * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
  26971. * letters to basic Latin letters and removing
  26972. * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
  26973. *
  26974. * @static
  26975. * @memberOf _
  26976. * @since 3.0.0
  26977. * @category String
  26978. * @param {string} [string=''] The string to deburr.
  26979. * @returns {string} Returns the deburred string.
  26980. * @example
  26981. *
  26982. * _.deburr('déjà vu');
  26983. * // => 'deja vu'
  26984. */
  26985. function deburr(string) {
  26986. string = toString(string);
  26987. return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
  26988. }
  26989. /**
  26990. * Checks if `string` ends with the given target string.
  26991. *
  26992. * @static
  26993. * @memberOf _
  26994. * @since 3.0.0
  26995. * @category String
  26996. * @param {string} [string=''] The string to inspect.
  26997. * @param {string} [target] The string to search for.
  26998. * @param {number} [position=string.length] The position to search up to.
  26999. * @returns {boolean} Returns `true` if `string` ends with `target`,
  27000. * else `false`.
  27001. * @example
  27002. *
  27003. * _.endsWith('abc', 'c');
  27004. * // => true
  27005. *
  27006. * _.endsWith('abc', 'b');
  27007. * // => false
  27008. *
  27009. * _.endsWith('abc', 'b', 2);
  27010. * // => true
  27011. */
  27012. function endsWith(string, target, position) {
  27013. string = toString(string);
  27014. target = baseToString(target);
  27015. var length = string.length;
  27016. position = position === undefined
  27017. ? length
  27018. : baseClamp(toInteger(position), 0, length);
  27019. var end = position;
  27020. position -= target.length;
  27021. return position >= 0 && string.slice(position, end) == target;
  27022. }
  27023. /**
  27024. * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
  27025. * corresponding HTML entities.
  27026. *
  27027. * **Note:** No other characters are escaped. To escape additional
  27028. * characters use a third-party library like [_he_](https://mths.be/he).
  27029. *
  27030. * Though the ">" character is escaped for symmetry, characters like
  27031. * ">" and "/" don't need escaping in HTML and have no special meaning
  27032. * unless they're part of a tag or unquoted attribute value. See
  27033. * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
  27034. * (under "semi-related fun fact") for more details.
  27035. *
  27036. * When working with HTML you should always
  27037. * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
  27038. * XSS vectors.
  27039. *
  27040. * @static
  27041. * @since 0.1.0
  27042. * @memberOf _
  27043. * @category String
  27044. * @param {string} [string=''] The string to escape.
  27045. * @returns {string} Returns the escaped string.
  27046. * @example
  27047. *
  27048. * _.escape('fred, barney, & pebbles');
  27049. * // => 'fred, barney, &amp; pebbles'
  27050. */
  27051. function escape(string) {
  27052. string = toString(string);
  27053. return (string && reHasUnescapedHtml.test(string))
  27054. ? string.replace(reUnescapedHtml, escapeHtmlChar)
  27055. : string;
  27056. }
  27057. /**
  27058. * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
  27059. * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
  27060. *
  27061. * @static
  27062. * @memberOf _
  27063. * @since 3.0.0
  27064. * @category String
  27065. * @param {string} [string=''] The string to escape.
  27066. * @returns {string} Returns the escaped string.
  27067. * @example
  27068. *
  27069. * _.escapeRegExp('[lodash](https://lodash.com/)');
  27070. * // => '\[lodash\]\(https://lodash\.com/\)'
  27071. */
  27072. function escapeRegExp(string) {
  27073. string = toString(string);
  27074. return (string && reHasRegExpChar.test(string))
  27075. ? string.replace(reRegExpChar, '\\$&')
  27076. : string;
  27077. }
  27078. /**
  27079. * Converts `string` to
  27080. * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
  27081. *
  27082. * @static
  27083. * @memberOf _
  27084. * @since 3.0.0
  27085. * @category String
  27086. * @param {string} [string=''] The string to convert.
  27087. * @returns {string} Returns the kebab cased string.
  27088. * @example
  27089. *
  27090. * _.kebabCase('Foo Bar');
  27091. * // => 'foo-bar'
  27092. *
  27093. * _.kebabCase('fooBar');
  27094. * // => 'foo-bar'
  27095. *
  27096. * _.kebabCase('__FOO_BAR__');
  27097. * // => 'foo-bar'
  27098. */
  27099. var kebabCase = createCompounder(function(result, word, index) {
  27100. return result + (index ? '-' : '') + word.toLowerCase();
  27101. });
  27102. /**
  27103. * Converts `string`, as space separated words, to lower case.
  27104. *
  27105. * @static
  27106. * @memberOf _
  27107. * @since 4.0.0
  27108. * @category String
  27109. * @param {string} [string=''] The string to convert.
  27110. * @returns {string} Returns the lower cased string.
  27111. * @example
  27112. *
  27113. * _.lowerCase('--Foo-Bar--');
  27114. * // => 'foo bar'
  27115. *
  27116. * _.lowerCase('fooBar');
  27117. * // => 'foo bar'
  27118. *
  27119. * _.lowerCase('__FOO_BAR__');
  27120. * // => 'foo bar'
  27121. */
  27122. var lowerCase = createCompounder(function(result, word, index) {
  27123. return result + (index ? ' ' : '') + word.toLowerCase();
  27124. });
  27125. /**
  27126. * Converts the first character of `string` to lower case.
  27127. *
  27128. * @static
  27129. * @memberOf _
  27130. * @since 4.0.0
  27131. * @category String
  27132. * @param {string} [string=''] The string to convert.
  27133. * @returns {string} Returns the converted string.
  27134. * @example
  27135. *
  27136. * _.lowerFirst('Fred');
  27137. * // => 'fred'
  27138. *
  27139. * _.lowerFirst('FRED');
  27140. * // => 'fRED'
  27141. */
  27142. var lowerFirst = createCaseFirst('toLowerCase');
  27143. /**
  27144. * Pads `string` on the left and right sides if it's shorter than `length`.
  27145. * Padding characters are truncated if they can't be evenly divided by `length`.
  27146. *
  27147. * @static
  27148. * @memberOf _
  27149. * @since 3.0.0
  27150. * @category String
  27151. * @param {string} [string=''] The string to pad.
  27152. * @param {number} [length=0] The padding length.
  27153. * @param {string} [chars=' '] The string used as padding.
  27154. * @returns {string} Returns the padded string.
  27155. * @example
  27156. *
  27157. * _.pad('abc', 8);
  27158. * // => ' abc '
  27159. *
  27160. * _.pad('abc', 8, '_-');
  27161. * // => '_-abc_-_'
  27162. *
  27163. * _.pad('abc', 3);
  27164. * // => 'abc'
  27165. */
  27166. function pad(string, length, chars) {
  27167. string = toString(string);
  27168. length = toInteger(length);
  27169. var strLength = length ? stringSize(string) : 0;
  27170. if (!length || strLength >= length) {
  27171. return string;
  27172. }
  27173. var mid = (length - strLength) / 2;
  27174. return (
  27175. createPadding(nativeFloor(mid), chars) +
  27176. string +
  27177. createPadding(nativeCeil(mid), chars)
  27178. );
  27179. }
  27180. /**
  27181. * Pads `string` on the right side if it's shorter than `length`. Padding
  27182. * characters are truncated if they exceed `length`.
  27183. *
  27184. * @static
  27185. * @memberOf _
  27186. * @since 4.0.0
  27187. * @category String
  27188. * @param {string} [string=''] The string to pad.
  27189. * @param {number} [length=0] The padding length.
  27190. * @param {string} [chars=' '] The string used as padding.
  27191. * @returns {string} Returns the padded string.
  27192. * @example
  27193. *
  27194. * _.padEnd('abc', 6);
  27195. * // => 'abc '
  27196. *
  27197. * _.padEnd('abc', 6, '_-');
  27198. * // => 'abc_-_'
  27199. *
  27200. * _.padEnd('abc', 3);
  27201. * // => 'abc'
  27202. */
  27203. function padEnd(string, length, chars) {
  27204. string = toString(string);
  27205. length = toInteger(length);
  27206. var strLength = length ? stringSize(string) : 0;
  27207. return (length && strLength < length)
  27208. ? (string + createPadding(length - strLength, chars))
  27209. : string;
  27210. }
  27211. /**
  27212. * Pads `string` on the left side if it's shorter than `length`. Padding
  27213. * characters are truncated if they exceed `length`.
  27214. *
  27215. * @static
  27216. * @memberOf _
  27217. * @since 4.0.0
  27218. * @category String
  27219. * @param {string} [string=''] The string to pad.
  27220. * @param {number} [length=0] The padding length.
  27221. * @param {string} [chars=' '] The string used as padding.
  27222. * @returns {string} Returns the padded string.
  27223. * @example
  27224. *
  27225. * _.padStart('abc', 6);
  27226. * // => ' abc'
  27227. *
  27228. * _.padStart('abc', 6, '_-');
  27229. * // => '_-_abc'
  27230. *
  27231. * _.padStart('abc', 3);
  27232. * // => 'abc'
  27233. */
  27234. function padStart(string, length, chars) {
  27235. string = toString(string);
  27236. length = toInteger(length);
  27237. var strLength = length ? stringSize(string) : 0;
  27238. return (length && strLength < length)
  27239. ? (createPadding(length - strLength, chars) + string)
  27240. : string;
  27241. }
  27242. /**
  27243. * Converts `string` to an integer of the specified radix. If `radix` is
  27244. * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
  27245. * hexadecimal, in which case a `radix` of `16` is used.
  27246. *
  27247. * **Note:** This method aligns with the
  27248. * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
  27249. *
  27250. * @static
  27251. * @memberOf _
  27252. * @since 1.1.0
  27253. * @category String
  27254. * @param {string} string The string to convert.
  27255. * @param {number} [radix=10] The radix to interpret `value` by.
  27256. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  27257. * @returns {number} Returns the converted integer.
  27258. * @example
  27259. *
  27260. * _.parseInt('08');
  27261. * // => 8
  27262. *
  27263. * _.map(['6', '08', '10'], _.parseInt);
  27264. * // => [6, 8, 10]
  27265. */
  27266. function parseInt(string, radix, guard) {
  27267. if (guard || radix == null) {
  27268. radix = 0;
  27269. } else if (radix) {
  27270. radix = +radix;
  27271. }
  27272. return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
  27273. }
  27274. /**
  27275. * Repeats the given string `n` times.
  27276. *
  27277. * @static
  27278. * @memberOf _
  27279. * @since 3.0.0
  27280. * @category String
  27281. * @param {string} [string=''] The string to repeat.
  27282. * @param {number} [n=1] The number of times to repeat the string.
  27283. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  27284. * @returns {string} Returns the repeated string.
  27285. * @example
  27286. *
  27287. * _.repeat('*', 3);
  27288. * // => '***'
  27289. *
  27290. * _.repeat('abc', 2);
  27291. * // => 'abcabc'
  27292. *
  27293. * _.repeat('abc', 0);
  27294. * // => ''
  27295. */
  27296. function repeat(string, n, guard) {
  27297. if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
  27298. n = 1;
  27299. } else {
  27300. n = toInteger(n);
  27301. }
  27302. return baseRepeat(toString(string), n);
  27303. }
  27304. /**
  27305. * Replaces matches for `pattern` in `string` with `replacement`.
  27306. *
  27307. * **Note:** This method is based on
  27308. * [`String#replace`](https://mdn.io/String/replace).
  27309. *
  27310. * @static
  27311. * @memberOf _
  27312. * @since 4.0.0
  27313. * @category String
  27314. * @param {string} [string=''] The string to modify.
  27315. * @param {RegExp|string} pattern The pattern to replace.
  27316. * @param {Function|string} replacement The match replacement.
  27317. * @returns {string} Returns the modified string.
  27318. * @example
  27319. *
  27320. * _.replace('Hi Fred', 'Fred', 'Barney');
  27321. * // => 'Hi Barney'
  27322. */
  27323. function replace() {
  27324. var args = arguments,
  27325. string = toString(args[0]);
  27326. return args.length < 3 ? string : string.replace(args[1], args[2]);
  27327. }
  27328. /**
  27329. * Converts `string` to
  27330. * [snake case](https://en.wikipedia.org/wiki/Snake_case).
  27331. *
  27332. * @static
  27333. * @memberOf _
  27334. * @since 3.0.0
  27335. * @category String
  27336. * @param {string} [string=''] The string to convert.
  27337. * @returns {string} Returns the snake cased string.
  27338. * @example
  27339. *
  27340. * _.snakeCase('Foo Bar');
  27341. * // => 'foo_bar'
  27342. *
  27343. * _.snakeCase('fooBar');
  27344. * // => 'foo_bar'
  27345. *
  27346. * _.snakeCase('--FOO-BAR--');
  27347. * // => 'foo_bar'
  27348. */
  27349. var snakeCase = createCompounder(function(result, word, index) {
  27350. return result + (index ? '_' : '') + word.toLowerCase();
  27351. });
  27352. /**
  27353. * Splits `string` by `separator`.
  27354. *
  27355. * **Note:** This method is based on
  27356. * [`String#split`](https://mdn.io/String/split).
  27357. *
  27358. * @static
  27359. * @memberOf _
  27360. * @since 4.0.0
  27361. * @category String
  27362. * @param {string} [string=''] The string to split.
  27363. * @param {RegExp|string} separator The separator pattern to split by.
  27364. * @param {number} [limit] The length to truncate results to.
  27365. * @returns {Array} Returns the string segments.
  27366. * @example
  27367. *
  27368. * _.split('a-b-c', '-', 2);
  27369. * // => ['a', 'b']
  27370. */
  27371. function split(string, separator, limit) {
  27372. if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
  27373. separator = limit = undefined;
  27374. }
  27375. limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
  27376. if (!limit) {
  27377. return [];
  27378. }
  27379. string = toString(string);
  27380. if (string && (
  27381. typeof separator == 'string' ||
  27382. (separator != null && !isRegExp(separator))
  27383. )) {
  27384. separator = baseToString(separator);
  27385. if (!separator && hasUnicode(string)) {
  27386. return castSlice(stringToArray(string), 0, limit);
  27387. }
  27388. }
  27389. return string.split(separator, limit);
  27390. }
  27391. /**
  27392. * Converts `string` to
  27393. * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
  27394. *
  27395. * @static
  27396. * @memberOf _
  27397. * @since 3.1.0
  27398. * @category String
  27399. * @param {string} [string=''] The string to convert.
  27400. * @returns {string} Returns the start cased string.
  27401. * @example
  27402. *
  27403. * _.startCase('--foo-bar--');
  27404. * // => 'Foo Bar'
  27405. *
  27406. * _.startCase('fooBar');
  27407. * // => 'Foo Bar'
  27408. *
  27409. * _.startCase('__FOO_BAR__');
  27410. * // => 'FOO BAR'
  27411. */
  27412. var startCase = createCompounder(function(result, word, index) {
  27413. return result + (index ? ' ' : '') + upperFirst(word);
  27414. });
  27415. /**
  27416. * Checks if `string` starts with the given target string.
  27417. *
  27418. * @static
  27419. * @memberOf _
  27420. * @since 3.0.0
  27421. * @category String
  27422. * @param {string} [string=''] The string to inspect.
  27423. * @param {string} [target] The string to search for.
  27424. * @param {number} [position=0] The position to search from.
  27425. * @returns {boolean} Returns `true` if `string` starts with `target`,
  27426. * else `false`.
  27427. * @example
  27428. *
  27429. * _.startsWith('abc', 'a');
  27430. * // => true
  27431. *
  27432. * _.startsWith('abc', 'b');
  27433. * // => false
  27434. *
  27435. * _.startsWith('abc', 'b', 1);
  27436. * // => true
  27437. */
  27438. function startsWith(string, target, position) {
  27439. string = toString(string);
  27440. position = position == null
  27441. ? 0
  27442. : baseClamp(toInteger(position), 0, string.length);
  27443. target = baseToString(target);
  27444. return string.slice(position, position + target.length) == target;
  27445. }
  27446. /**
  27447. * Creates a compiled template function that can interpolate data properties
  27448. * in "interpolate" delimiters, HTML-escape interpolated data properties in
  27449. * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
  27450. * properties may be accessed as free variables in the template. If a setting
  27451. * object is given, it takes precedence over `_.templateSettings` values.
  27452. *
  27453. * **Note:** In the development build `_.template` utilizes
  27454. * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
  27455. * for easier debugging.
  27456. *
  27457. * For more information on precompiling templates see
  27458. * [lodash's custom builds documentation](https://lodash.com/custom-builds).
  27459. *
  27460. * For more information on Chrome extension sandboxes see
  27461. * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
  27462. *
  27463. * @static
  27464. * @since 0.1.0
  27465. * @memberOf _
  27466. * @category String
  27467. * @param {string} [string=''] The template string.
  27468. * @param {Object} [options={}] The options object.
  27469. * @param {RegExp} [options.escape=_.templateSettings.escape]
  27470. * The HTML "escape" delimiter.
  27471. * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
  27472. * The "evaluate" delimiter.
  27473. * @param {Object} [options.imports=_.templateSettings.imports]
  27474. * An object to import into the template as free variables.
  27475. * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
  27476. * The "interpolate" delimiter.
  27477. * @param {string} [options.sourceURL='lodash.templateSources[n]']
  27478. * The sourceURL of the compiled template.
  27479. * @param {string} [options.variable='obj']
  27480. * The data object variable name.
  27481. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  27482. * @returns {Function} Returns the compiled template function.
  27483. * @example
  27484. *
  27485. * // Use the "interpolate" delimiter to create a compiled template.
  27486. * var compiled = _.template('hello <%= user %>!');
  27487. * compiled({ 'user': 'fred' });
  27488. * // => 'hello fred!'
  27489. *
  27490. * // Use the HTML "escape" delimiter to escape data property values.
  27491. * var compiled = _.template('<b><%- value %></b>');
  27492. * compiled({ 'value': '<script>' });
  27493. * // => '<b>&lt;script&gt;</b>'
  27494. *
  27495. * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
  27496. * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
  27497. * compiled({ 'users': ['fred', 'barney'] });
  27498. * // => '<li>fred</li><li>barney</li>'
  27499. *
  27500. * // Use the internal `print` function in "evaluate" delimiters.
  27501. * var compiled = _.template('<% print("hello " + user); %>!');
  27502. * compiled({ 'user': 'barney' });
  27503. * // => 'hello barney!'
  27504. *
  27505. * // Use the ES template literal delimiter as an "interpolate" delimiter.
  27506. * // Disable support by replacing the "interpolate" delimiter.
  27507. * var compiled = _.template('hello ${ user }!');
  27508. * compiled({ 'user': 'pebbles' });
  27509. * // => 'hello pebbles!'
  27510. *
  27511. * // Use backslashes to treat delimiters as plain text.
  27512. * var compiled = _.template('<%= "\\<%- value %\\>" %>');
  27513. * compiled({ 'value': 'ignored' });
  27514. * // => '<%- value %>'
  27515. *
  27516. * // Use the `imports` option to import `jQuery` as `jq`.
  27517. * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
  27518. * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
  27519. * compiled({ 'users': ['fred', 'barney'] });
  27520. * // => '<li>fred</li><li>barney</li>'
  27521. *
  27522. * // Use the `sourceURL` option to specify a custom sourceURL for the template.
  27523. * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
  27524. * compiled(data);
  27525. * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
  27526. *
  27527. * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
  27528. * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
  27529. * compiled.source;
  27530. * // => function(data) {
  27531. * // var __t, __p = '';
  27532. * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
  27533. * // return __p;
  27534. * // }
  27535. *
  27536. * // Use custom template delimiters.
  27537. * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
  27538. * var compiled = _.template('hello {{ user }}!');
  27539. * compiled({ 'user': 'mustache' });
  27540. * // => 'hello mustache!'
  27541. *
  27542. * // Use the `source` property to inline compiled templates for meaningful
  27543. * // line numbers in error messages and stack traces.
  27544. * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
  27545. * var JST = {\
  27546. * "main": ' + _.template(mainText).source + '\
  27547. * };\
  27548. * ');
  27549. */
  27550. function template(string, options, guard) {
  27551. // Based on John Resig's `tmpl` implementation
  27552. // (http://ejohn.org/blog/javascript-micro-templating/)
  27553. // and Laura Doktorova's doT.js (https://github.com/olado/doT).
  27554. var settings = lodash.templateSettings;
  27555. if (guard && isIterateeCall(string, options, guard)) {
  27556. options = undefined;
  27557. }
  27558. string = toString(string);
  27559. options = assignInWith({}, options, settings, customDefaultsAssignIn);
  27560. var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
  27561. importsKeys = keys(imports),
  27562. importsValues = baseValues(imports, importsKeys);
  27563. var isEscaping,
  27564. isEvaluating,
  27565. index = 0,
  27566. interpolate = options.interpolate || reNoMatch,
  27567. source = "__p += '";
  27568. // Compile the regexp to match each delimiter.
  27569. var reDelimiters = RegExp(
  27570. (options.escape || reNoMatch).source + '|' +
  27571. interpolate.source + '|' +
  27572. (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
  27573. (options.evaluate || reNoMatch).source + '|$'
  27574. , 'g');
  27575. // Use a sourceURL for easier debugging.
  27576. var sourceURL = '//# sourceURL=' +
  27577. ('sourceURL' in options
  27578. ? options.sourceURL
  27579. : ('lodash.templateSources[' + (++templateCounter) + ']')
  27580. ) + '\n';
  27581. string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
  27582. interpolateValue || (interpolateValue = esTemplateValue);
  27583. // Escape characters that can't be included in string literals.
  27584. source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
  27585. // Replace delimiters with snippets.
  27586. if (escapeValue) {
  27587. isEscaping = true;
  27588. source += "' +\n__e(" + escapeValue + ") +\n'";
  27589. }
  27590. if (evaluateValue) {
  27591. isEvaluating = true;
  27592. source += "';\n" + evaluateValue + ";\n__p += '";
  27593. }
  27594. if (interpolateValue) {
  27595. source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
  27596. }
  27597. index = offset + match.length;
  27598. // The JS engine embedded in Adobe products needs `match` returned in
  27599. // order to produce the correct `offset` value.
  27600. return match;
  27601. });
  27602. source += "';\n";
  27603. // If `variable` is not specified wrap a with-statement around the generated
  27604. // code to add the data object to the top of the scope chain.
  27605. var variable = options.variable;
  27606. if (!variable) {
  27607. source = 'with (obj) {\n' + source + '\n}\n';
  27608. }
  27609. // Cleanup code by stripping empty strings.
  27610. source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
  27611. .replace(reEmptyStringMiddle, '$1')
  27612. .replace(reEmptyStringTrailing, '$1;');
  27613. // Frame code as the function body.
  27614. source = 'function(' + (variable || 'obj') + ') {\n' +
  27615. (variable
  27616. ? ''
  27617. : 'obj || (obj = {});\n'
  27618. ) +
  27619. "var __t, __p = ''" +
  27620. (isEscaping
  27621. ? ', __e = _.escape'
  27622. : ''
  27623. ) +
  27624. (isEvaluating
  27625. ? ', __j = Array.prototype.join;\n' +
  27626. "function print() { __p += __j.call(arguments, '') }\n"
  27627. : ';\n'
  27628. ) +
  27629. source +
  27630. 'return __p\n}';
  27631. var result = attempt(function() {
  27632. return Function(importsKeys, sourceURL + 'return ' + source)
  27633. .apply(undefined, importsValues);
  27634. });
  27635. // Provide the compiled function's source by its `toString` method or
  27636. // the `source` property as a convenience for inlining compiled templates.
  27637. result.source = source;
  27638. if (isError(result)) {
  27639. throw result;
  27640. }
  27641. return result;
  27642. }
  27643. /**
  27644. * Converts `string`, as a whole, to lower case just like
  27645. * [String#toLowerCase](https://mdn.io/toLowerCase).
  27646. *
  27647. * @static
  27648. * @memberOf _
  27649. * @since 4.0.0
  27650. * @category String
  27651. * @param {string} [string=''] The string to convert.
  27652. * @returns {string} Returns the lower cased string.
  27653. * @example
  27654. *
  27655. * _.toLower('--Foo-Bar--');
  27656. * // => '--foo-bar--'
  27657. *
  27658. * _.toLower('fooBar');
  27659. * // => 'foobar'
  27660. *
  27661. * _.toLower('__FOO_BAR__');
  27662. * // => '__foo_bar__'
  27663. */
  27664. function toLower(value) {
  27665. return toString(value).toLowerCase();
  27666. }
  27667. /**
  27668. * Converts `string`, as a whole, to upper case just like
  27669. * [String#toUpperCase](https://mdn.io/toUpperCase).
  27670. *
  27671. * @static
  27672. * @memberOf _
  27673. * @since 4.0.0
  27674. * @category String
  27675. * @param {string} [string=''] The string to convert.
  27676. * @returns {string} Returns the upper cased string.
  27677. * @example
  27678. *
  27679. * _.toUpper('--foo-bar--');
  27680. * // => '--FOO-BAR--'
  27681. *
  27682. * _.toUpper('fooBar');
  27683. * // => 'FOOBAR'
  27684. *
  27685. * _.toUpper('__foo_bar__');
  27686. * // => '__FOO_BAR__'
  27687. */
  27688. function toUpper(value) {
  27689. return toString(value).toUpperCase();
  27690. }
  27691. /**
  27692. * Removes leading and trailing whitespace or specified characters from `string`.
  27693. *
  27694. * @static
  27695. * @memberOf _
  27696. * @since 3.0.0
  27697. * @category String
  27698. * @param {string} [string=''] The string to trim.
  27699. * @param {string} [chars=whitespace] The characters to trim.
  27700. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  27701. * @returns {string} Returns the trimmed string.
  27702. * @example
  27703. *
  27704. * _.trim(' abc ');
  27705. * // => 'abc'
  27706. *
  27707. * _.trim('-_-abc-_-', '_-');
  27708. * // => 'abc'
  27709. *
  27710. * _.map([' foo ', ' bar '], _.trim);
  27711. * // => ['foo', 'bar']
  27712. */
  27713. function trim(string, chars, guard) {
  27714. string = toString(string);
  27715. if (string && (guard || chars === undefined)) {
  27716. return string.replace(reTrim, '');
  27717. }
  27718. if (!string || !(chars = baseToString(chars))) {
  27719. return string;
  27720. }
  27721. var strSymbols = stringToArray(string),
  27722. chrSymbols = stringToArray(chars),
  27723. start = charsStartIndex(strSymbols, chrSymbols),
  27724. end = charsEndIndex(strSymbols, chrSymbols) + 1;
  27725. return castSlice(strSymbols, start, end).join('');
  27726. }
  27727. /**
  27728. * Removes trailing whitespace or specified characters from `string`.
  27729. *
  27730. * @static
  27731. * @memberOf _
  27732. * @since 4.0.0
  27733. * @category String
  27734. * @param {string} [string=''] The string to trim.
  27735. * @param {string} [chars=whitespace] The characters to trim.
  27736. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  27737. * @returns {string} Returns the trimmed string.
  27738. * @example
  27739. *
  27740. * _.trimEnd(' abc ');
  27741. * // => ' abc'
  27742. *
  27743. * _.trimEnd('-_-abc-_-', '_-');
  27744. * // => '-_-abc'
  27745. */
  27746. function trimEnd(string, chars, guard) {
  27747. string = toString(string);
  27748. if (string && (guard || chars === undefined)) {
  27749. return string.replace(reTrimEnd, '');
  27750. }
  27751. if (!string || !(chars = baseToString(chars))) {
  27752. return string;
  27753. }
  27754. var strSymbols = stringToArray(string),
  27755. end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
  27756. return castSlice(strSymbols, 0, end).join('');
  27757. }
  27758. /**
  27759. * Removes leading whitespace or specified characters from `string`.
  27760. *
  27761. * @static
  27762. * @memberOf _
  27763. * @since 4.0.0
  27764. * @category String
  27765. * @param {string} [string=''] The string to trim.
  27766. * @param {string} [chars=whitespace] The characters to trim.
  27767. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  27768. * @returns {string} Returns the trimmed string.
  27769. * @example
  27770. *
  27771. * _.trimStart(' abc ');
  27772. * // => 'abc '
  27773. *
  27774. * _.trimStart('-_-abc-_-', '_-');
  27775. * // => 'abc-_-'
  27776. */
  27777. function trimStart(string, chars, guard) {
  27778. string = toString(string);
  27779. if (string && (guard || chars === undefined)) {
  27780. return string.replace(reTrimStart, '');
  27781. }
  27782. if (!string || !(chars = baseToString(chars))) {
  27783. return string;
  27784. }
  27785. var strSymbols = stringToArray(string),
  27786. start = charsStartIndex(strSymbols, stringToArray(chars));
  27787. return castSlice(strSymbols, start).join('');
  27788. }
  27789. /**
  27790. * Truncates `string` if it's longer than the given maximum string length.
  27791. * The last characters of the truncated string are replaced with the omission
  27792. * string which defaults to "...".
  27793. *
  27794. * @static
  27795. * @memberOf _
  27796. * @since 4.0.0
  27797. * @category String
  27798. * @param {string} [string=''] The string to truncate.
  27799. * @param {Object} [options={}] The options object.
  27800. * @param {number} [options.length=30] The maximum string length.
  27801. * @param {string} [options.omission='...'] The string to indicate text is omitted.
  27802. * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
  27803. * @returns {string} Returns the truncated string.
  27804. * @example
  27805. *
  27806. * _.truncate('hi-diddly-ho there, neighborino');
  27807. * // => 'hi-diddly-ho there, neighbo...'
  27808. *
  27809. * _.truncate('hi-diddly-ho there, neighborino', {
  27810. * 'length': 24,
  27811. * 'separator': ' '
  27812. * });
  27813. * // => 'hi-diddly-ho there,...'
  27814. *
  27815. * _.truncate('hi-diddly-ho there, neighborino', {
  27816. * 'length': 24,
  27817. * 'separator': /,? +/
  27818. * });
  27819. * // => 'hi-diddly-ho there...'
  27820. *
  27821. * _.truncate('hi-diddly-ho there, neighborino', {
  27822. * 'omission': ' [...]'
  27823. * });
  27824. * // => 'hi-diddly-ho there, neig [...]'
  27825. */
  27826. function truncate(string, options) {
  27827. var length = DEFAULT_TRUNC_LENGTH,
  27828. omission = DEFAULT_TRUNC_OMISSION;
  27829. if (isObject(options)) {
  27830. var separator = 'separator' in options ? options.separator : separator;
  27831. length = 'length' in options ? toInteger(options.length) : length;
  27832. omission = 'omission' in options ? baseToString(options.omission) : omission;
  27833. }
  27834. string = toString(string);
  27835. var strLength = string.length;
  27836. if (hasUnicode(string)) {
  27837. var strSymbols = stringToArray(string);
  27838. strLength = strSymbols.length;
  27839. }
  27840. if (length >= strLength) {
  27841. return string;
  27842. }
  27843. var end = length - stringSize(omission);
  27844. if (end < 1) {
  27845. return omission;
  27846. }
  27847. var result = strSymbols
  27848. ? castSlice(strSymbols, 0, end).join('')
  27849. : string.slice(0, end);
  27850. if (separator === undefined) {
  27851. return result + omission;
  27852. }
  27853. if (strSymbols) {
  27854. end += (result.length - end);
  27855. }
  27856. if (isRegExp(separator)) {
  27857. if (string.slice(end).search(separator)) {
  27858. var match,
  27859. substring = result;
  27860. if (!separator.global) {
  27861. separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
  27862. }
  27863. separator.lastIndex = 0;
  27864. while ((match = separator.exec(substring))) {
  27865. var newEnd = match.index;
  27866. }
  27867. result = result.slice(0, newEnd === undefined ? end : newEnd);
  27868. }
  27869. } else if (string.indexOf(baseToString(separator), end) != end) {
  27870. var index = result.lastIndexOf(separator);
  27871. if (index > -1) {
  27872. result = result.slice(0, index);
  27873. }
  27874. }
  27875. return result + omission;
  27876. }
  27877. /**
  27878. * The inverse of `_.escape`; this method converts the HTML entities
  27879. * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
  27880. * their corresponding characters.
  27881. *
  27882. * **Note:** No other HTML entities are unescaped. To unescape additional
  27883. * HTML entities use a third-party library like [_he_](https://mths.be/he).
  27884. *
  27885. * @static
  27886. * @memberOf _
  27887. * @since 0.6.0
  27888. * @category String
  27889. * @param {string} [string=''] The string to unescape.
  27890. * @returns {string} Returns the unescaped string.
  27891. * @example
  27892. *
  27893. * _.unescape('fred, barney, &amp; pebbles');
  27894. * // => 'fred, barney, & pebbles'
  27895. */
  27896. function unescape(string) {
  27897. string = toString(string);
  27898. return (string && reHasEscapedHtml.test(string))
  27899. ? string.replace(reEscapedHtml, unescapeHtmlChar)
  27900. : string;
  27901. }
  27902. /**
  27903. * Converts `string`, as space separated words, to upper case.
  27904. *
  27905. * @static
  27906. * @memberOf _
  27907. * @since 4.0.0
  27908. * @category String
  27909. * @param {string} [string=''] The string to convert.
  27910. * @returns {string} Returns the upper cased string.
  27911. * @example
  27912. *
  27913. * _.upperCase('--foo-bar');
  27914. * // => 'FOO BAR'
  27915. *
  27916. * _.upperCase('fooBar');
  27917. * // => 'FOO BAR'
  27918. *
  27919. * _.upperCase('__foo_bar__');
  27920. * // => 'FOO BAR'
  27921. */
  27922. var upperCase = createCompounder(function(result, word, index) {
  27923. return result + (index ? ' ' : '') + word.toUpperCase();
  27924. });
  27925. /**
  27926. * Converts the first character of `string` to upper case.
  27927. *
  27928. * @static
  27929. * @memberOf _
  27930. * @since 4.0.0
  27931. * @category String
  27932. * @param {string} [string=''] The string to convert.
  27933. * @returns {string} Returns the converted string.
  27934. * @example
  27935. *
  27936. * _.upperFirst('fred');
  27937. * // => 'Fred'
  27938. *
  27939. * _.upperFirst('FRED');
  27940. * // => 'FRED'
  27941. */
  27942. var upperFirst = createCaseFirst('toUpperCase');
  27943. /**
  27944. * Splits `string` into an array of its words.
  27945. *
  27946. * @static
  27947. * @memberOf _
  27948. * @since 3.0.0
  27949. * @category String
  27950. * @param {string} [string=''] The string to inspect.
  27951. * @param {RegExp|string} [pattern] The pattern to match words.
  27952. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  27953. * @returns {Array} Returns the words of `string`.
  27954. * @example
  27955. *
  27956. * _.words('fred, barney, & pebbles');
  27957. * // => ['fred', 'barney', 'pebbles']
  27958. *
  27959. * _.words('fred, barney, & pebbles', /[^, ]+/g);
  27960. * // => ['fred', 'barney', '&', 'pebbles']
  27961. */
  27962. function words(string, pattern, guard) {
  27963. string = toString(string);
  27964. pattern = guard ? undefined : pattern;
  27965. if (pattern === undefined) {
  27966. return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
  27967. }
  27968. return string.match(pattern) || [];
  27969. }
  27970. /*------------------------------------------------------------------------*/
  27971. /**
  27972. * Attempts to invoke `func`, returning either the result or the caught error
  27973. * object. Any additional arguments are provided to `func` when it's invoked.
  27974. *
  27975. * @static
  27976. * @memberOf _
  27977. * @since 3.0.0
  27978. * @category Util
  27979. * @param {Function} func The function to attempt.
  27980. * @param {...*} [args] The arguments to invoke `func` with.
  27981. * @returns {*} Returns the `func` result or error object.
  27982. * @example
  27983. *
  27984. * // Avoid throwing errors for invalid selectors.
  27985. * var elements = _.attempt(function(selector) {
  27986. * return document.querySelectorAll(selector);
  27987. * }, '>_>');
  27988. *
  27989. * if (_.isError(elements)) {
  27990. * elements = [];
  27991. * }
  27992. */
  27993. var attempt = baseRest(function(func, args) {
  27994. try {
  27995. return apply(func, undefined, args);
  27996. } catch (e) {
  27997. return isError(e) ? e : new Error(e);
  27998. }
  27999. });
  28000. /**
  28001. * Binds methods of an object to the object itself, overwriting the existing
  28002. * method.
  28003. *
  28004. * **Note:** This method doesn't set the "length" property of bound functions.
  28005. *
  28006. * @static
  28007. * @since 0.1.0
  28008. * @memberOf _
  28009. * @category Util
  28010. * @param {Object} object The object to bind and assign the bound methods to.
  28011. * @param {...(string|string[])} methodNames The object method names to bind.
  28012. * @returns {Object} Returns `object`.
  28013. * @example
  28014. *
  28015. * var view = {
  28016. * 'label': 'docs',
  28017. * 'click': function() {
  28018. * console.log('clicked ' + this.label);
  28019. * }
  28020. * };
  28021. *
  28022. * _.bindAll(view, ['click']);
  28023. * jQuery(element).on('click', view.click);
  28024. * // => Logs 'clicked docs' when clicked.
  28025. */
  28026. var bindAll = flatRest(function(object, methodNames) {
  28027. arrayEach(methodNames, function(key) {
  28028. key = toKey(key);
  28029. baseAssignValue(object, key, bind(object[key], object));
  28030. });
  28031. return object;
  28032. });
  28033. /**
  28034. * Creates a function that iterates over `pairs` and invokes the corresponding
  28035. * function of the first predicate to return truthy. The predicate-function
  28036. * pairs are invoked with the `this` binding and arguments of the created
  28037. * function.
  28038. *
  28039. * @static
  28040. * @memberOf _
  28041. * @since 4.0.0
  28042. * @category Util
  28043. * @param {Array} pairs The predicate-function pairs.
  28044. * @returns {Function} Returns the new composite function.
  28045. * @example
  28046. *
  28047. * var func = _.cond([
  28048. * [_.matches({ 'a': 1 }), _.constant('matches A')],
  28049. * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
  28050. * [_.stubTrue, _.constant('no match')]
  28051. * ]);
  28052. *
  28053. * func({ 'a': 1, 'b': 2 });
  28054. * // => 'matches A'
  28055. *
  28056. * func({ 'a': 0, 'b': 1 });
  28057. * // => 'matches B'
  28058. *
  28059. * func({ 'a': '1', 'b': '2' });
  28060. * // => 'no match'
  28061. */
  28062. function cond(pairs) {
  28063. var length = pairs == null ? 0 : pairs.length,
  28064. toIteratee = getIteratee();
  28065. pairs = !length ? [] : arrayMap(pairs, function(pair) {
  28066. if (typeof pair[1] != 'function') {
  28067. throw new TypeError(FUNC_ERROR_TEXT);
  28068. }
  28069. return [toIteratee(pair[0]), pair[1]];
  28070. });
  28071. return baseRest(function(args) {
  28072. var index = -1;
  28073. while (++index < length) {
  28074. var pair = pairs[index];
  28075. if (apply(pair[0], this, args)) {
  28076. return apply(pair[1], this, args);
  28077. }
  28078. }
  28079. });
  28080. }
  28081. /**
  28082. * Creates a function that invokes the predicate properties of `source` with
  28083. * the corresponding property values of a given object, returning `true` if
  28084. * all predicates return truthy, else `false`.
  28085. *
  28086. * **Note:** The created function is equivalent to `_.conformsTo` with
  28087. * `source` partially applied.
  28088. *
  28089. * @static
  28090. * @memberOf _
  28091. * @since 4.0.0
  28092. * @category Util
  28093. * @param {Object} source The object of property predicates to conform to.
  28094. * @returns {Function} Returns the new spec function.
  28095. * @example
  28096. *
  28097. * var objects = [
  28098. * { 'a': 2, 'b': 1 },
  28099. * { 'a': 1, 'b': 2 }
  28100. * ];
  28101. *
  28102. * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
  28103. * // => [{ 'a': 1, 'b': 2 }]
  28104. */
  28105. function conforms(source) {
  28106. return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
  28107. }
  28108. /**
  28109. * Creates a function that returns `value`.
  28110. *
  28111. * @static
  28112. * @memberOf _
  28113. * @since 2.4.0
  28114. * @category Util
  28115. * @param {*} value The value to return from the new function.
  28116. * @returns {Function} Returns the new constant function.
  28117. * @example
  28118. *
  28119. * var objects = _.times(2, _.constant({ 'a': 1 }));
  28120. *
  28121. * console.log(objects);
  28122. * // => [{ 'a': 1 }, { 'a': 1 }]
  28123. *
  28124. * console.log(objects[0] === objects[1]);
  28125. * // => true
  28126. */
  28127. function constant(value) {
  28128. return function() {
  28129. return value;
  28130. };
  28131. }
  28132. /**
  28133. * Checks `value` to determine whether a default value should be returned in
  28134. * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
  28135. * or `undefined`.
  28136. *
  28137. * @static
  28138. * @memberOf _
  28139. * @since 4.14.0
  28140. * @category Util
  28141. * @param {*} value The value to check.
  28142. * @param {*} defaultValue The default value.
  28143. * @returns {*} Returns the resolved value.
  28144. * @example
  28145. *
  28146. * _.defaultTo(1, 10);
  28147. * // => 1
  28148. *
  28149. * _.defaultTo(undefined, 10);
  28150. * // => 10
  28151. */
  28152. function defaultTo(value, defaultValue) {
  28153. return (value == null || value !== value) ? defaultValue : value;
  28154. }
  28155. /**
  28156. * Creates a function that returns the result of invoking the given functions
  28157. * with the `this` binding of the created function, where each successive
  28158. * invocation is supplied the return value of the previous.
  28159. *
  28160. * @static
  28161. * @memberOf _
  28162. * @since 3.0.0
  28163. * @category Util
  28164. * @param {...(Function|Function[])} [funcs] The functions to invoke.
  28165. * @returns {Function} Returns the new composite function.
  28166. * @see _.flowRight
  28167. * @example
  28168. *
  28169. * function square(n) {
  28170. * return n * n;
  28171. * }
  28172. *
  28173. * var addSquare = _.flow([_.add, square]);
  28174. * addSquare(1, 2);
  28175. * // => 9
  28176. */
  28177. var flow = createFlow();
  28178. /**
  28179. * This method is like `_.flow` except that it creates a function that
  28180. * invokes the given functions from right to left.
  28181. *
  28182. * @static
  28183. * @since 3.0.0
  28184. * @memberOf _
  28185. * @category Util
  28186. * @param {...(Function|Function[])} [funcs] The functions to invoke.
  28187. * @returns {Function} Returns the new composite function.
  28188. * @see _.flow
  28189. * @example
  28190. *
  28191. * function square(n) {
  28192. * return n * n;
  28193. * }
  28194. *
  28195. * var addSquare = _.flowRight([square, _.add]);
  28196. * addSquare(1, 2);
  28197. * // => 9
  28198. */
  28199. var flowRight = createFlow(true);
  28200. /**
  28201. * This method returns the first argument it receives.
  28202. *
  28203. * @static
  28204. * @since 0.1.0
  28205. * @memberOf _
  28206. * @category Util
  28207. * @param {*} value Any value.
  28208. * @returns {*} Returns `value`.
  28209. * @example
  28210. *
  28211. * var object = { 'a': 1 };
  28212. *
  28213. * console.log(_.identity(object) === object);
  28214. * // => true
  28215. */
  28216. function identity(value) {
  28217. return value;
  28218. }
  28219. /**
  28220. * Creates a function that invokes `func` with the arguments of the created
  28221. * function. If `func` is a property name, the created function returns the
  28222. * property value for a given element. If `func` is an array or object, the
  28223. * created function returns `true` for elements that contain the equivalent
  28224. * source properties, otherwise it returns `false`.
  28225. *
  28226. * @static
  28227. * @since 4.0.0
  28228. * @memberOf _
  28229. * @category Util
  28230. * @param {*} [func=_.identity] The value to convert to a callback.
  28231. * @returns {Function} Returns the callback.
  28232. * @example
  28233. *
  28234. * var users = [
  28235. * { 'user': 'barney', 'age': 36, 'active': true },
  28236. * { 'user': 'fred', 'age': 40, 'active': false }
  28237. * ];
  28238. *
  28239. * // The `_.matches` iteratee shorthand.
  28240. * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
  28241. * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
  28242. *
  28243. * // The `_.matchesProperty` iteratee shorthand.
  28244. * _.filter(users, _.iteratee(['user', 'fred']));
  28245. * // => [{ 'user': 'fred', 'age': 40 }]
  28246. *
  28247. * // The `_.property` iteratee shorthand.
  28248. * _.map(users, _.iteratee('user'));
  28249. * // => ['barney', 'fred']
  28250. *
  28251. * // Create custom iteratee shorthands.
  28252. * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
  28253. * return !_.isRegExp(func) ? iteratee(func) : function(string) {
  28254. * return func.test(string);
  28255. * };
  28256. * });
  28257. *
  28258. * _.filter(['abc', 'def'], /ef/);
  28259. * // => ['def']
  28260. */
  28261. function iteratee(func) {
  28262. return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
  28263. }
  28264. /**
  28265. * Creates a function that performs a partial deep comparison between a given
  28266. * object and `source`, returning `true` if the given object has equivalent
  28267. * property values, else `false`.
  28268. *
  28269. * **Note:** The created function is equivalent to `_.isMatch` with `source`
  28270. * partially applied.
  28271. *
  28272. * Partial comparisons will match empty array and empty object `source`
  28273. * values against any array or object value, respectively. See `_.isEqual`
  28274. * for a list of supported value comparisons.
  28275. *
  28276. * @static
  28277. * @memberOf _
  28278. * @since 3.0.0
  28279. * @category Util
  28280. * @param {Object} source The object of property values to match.
  28281. * @returns {Function} Returns the new spec function.
  28282. * @example
  28283. *
  28284. * var objects = [
  28285. * { 'a': 1, 'b': 2, 'c': 3 },
  28286. * { 'a': 4, 'b': 5, 'c': 6 }
  28287. * ];
  28288. *
  28289. * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
  28290. * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
  28291. */
  28292. function matches(source) {
  28293. return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
  28294. }
  28295. /**
  28296. * Creates a function that performs a partial deep comparison between the
  28297. * value at `path` of a given object to `srcValue`, returning `true` if the
  28298. * object value is equivalent, else `false`.
  28299. *
  28300. * **Note:** Partial comparisons will match empty array and empty object
  28301. * `srcValue` values against any array or object value, respectively. See
  28302. * `_.isEqual` for a list of supported value comparisons.
  28303. *
  28304. * @static
  28305. * @memberOf _
  28306. * @since 3.2.0
  28307. * @category Util
  28308. * @param {Array|string} path The path of the property to get.
  28309. * @param {*} srcValue The value to match.
  28310. * @returns {Function} Returns the new spec function.
  28311. * @example
  28312. *
  28313. * var objects = [
  28314. * { 'a': 1, 'b': 2, 'c': 3 },
  28315. * { 'a': 4, 'b': 5, 'c': 6 }
  28316. * ];
  28317. *
  28318. * _.find(objects, _.matchesProperty('a', 4));
  28319. * // => { 'a': 4, 'b': 5, 'c': 6 }
  28320. */
  28321. function matchesProperty(path, srcValue) {
  28322. return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
  28323. }
  28324. /**
  28325. * Creates a function that invokes the method at `path` of a given object.
  28326. * Any additional arguments are provided to the invoked method.
  28327. *
  28328. * @static
  28329. * @memberOf _
  28330. * @since 3.7.0
  28331. * @category Util
  28332. * @param {Array|string} path The path of the method to invoke.
  28333. * @param {...*} [args] The arguments to invoke the method with.
  28334. * @returns {Function} Returns the new invoker function.
  28335. * @example
  28336. *
  28337. * var objects = [
  28338. * { 'a': { 'b': _.constant(2) } },
  28339. * { 'a': { 'b': _.constant(1) } }
  28340. * ];
  28341. *
  28342. * _.map(objects, _.method('a.b'));
  28343. * // => [2, 1]
  28344. *
  28345. * _.map(objects, _.method(['a', 'b']));
  28346. * // => [2, 1]
  28347. */
  28348. var method = baseRest(function(path, args) {
  28349. return function(object) {
  28350. return baseInvoke(object, path, args);
  28351. };
  28352. });
  28353. /**
  28354. * The opposite of `_.method`; this method creates a function that invokes
  28355. * the method at a given path of `object`. Any additional arguments are
  28356. * provided to the invoked method.
  28357. *
  28358. * @static
  28359. * @memberOf _
  28360. * @since 3.7.0
  28361. * @category Util
  28362. * @param {Object} object The object to query.
  28363. * @param {...*} [args] The arguments to invoke the method with.
  28364. * @returns {Function} Returns the new invoker function.
  28365. * @example
  28366. *
  28367. * var array = _.times(3, _.constant),
  28368. * object = { 'a': array, 'b': array, 'c': array };
  28369. *
  28370. * _.map(['a[2]', 'c[0]'], _.methodOf(object));
  28371. * // => [2, 0]
  28372. *
  28373. * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
  28374. * // => [2, 0]
  28375. */
  28376. var methodOf = baseRest(function(object, args) {
  28377. return function(path) {
  28378. return baseInvoke(object, path, args);
  28379. };
  28380. });
  28381. /**
  28382. * Adds all own enumerable string keyed function properties of a source
  28383. * object to the destination object. If `object` is a function, then methods
  28384. * are added to its prototype as well.
  28385. *
  28386. * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
  28387. * avoid conflicts caused by modifying the original.
  28388. *
  28389. * @static
  28390. * @since 0.1.0
  28391. * @memberOf _
  28392. * @category Util
  28393. * @param {Function|Object} [object=lodash] The destination object.
  28394. * @param {Object} source The object of functions to add.
  28395. * @param {Object} [options={}] The options object.
  28396. * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
  28397. * @returns {Function|Object} Returns `object`.
  28398. * @example
  28399. *
  28400. * function vowels(string) {
  28401. * return _.filter(string, function(v) {
  28402. * return /[aeiou]/i.test(v);
  28403. * });
  28404. * }
  28405. *
  28406. * _.mixin({ 'vowels': vowels });
  28407. * _.vowels('fred');
  28408. * // => ['e']
  28409. *
  28410. * _('fred').vowels().value();
  28411. * // => ['e']
  28412. *
  28413. * _.mixin({ 'vowels': vowels }, { 'chain': false });
  28414. * _('fred').vowels();
  28415. * // => ['e']
  28416. */
  28417. function mixin(object, source, options) {
  28418. var props = keys(source),
  28419. methodNames = baseFunctions(source, props);
  28420. if (options == null &&
  28421. !(isObject(source) && (methodNames.length || !props.length))) {
  28422. options = source;
  28423. source = object;
  28424. object = this;
  28425. methodNames = baseFunctions(source, keys(source));
  28426. }
  28427. var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
  28428. isFunc = isFunction(object);
  28429. arrayEach(methodNames, function(methodName) {
  28430. var func = source[methodName];
  28431. object[methodName] = func;
  28432. if (isFunc) {
  28433. object.prototype[methodName] = function() {
  28434. var chainAll = this.__chain__;
  28435. if (chain || chainAll) {
  28436. var result = object(this.__wrapped__),
  28437. actions = result.__actions__ = copyArray(this.__actions__);
  28438. actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
  28439. result.__chain__ = chainAll;
  28440. return result;
  28441. }
  28442. return func.apply(object, arrayPush([this.value()], arguments));
  28443. };
  28444. }
  28445. });
  28446. return object;
  28447. }
  28448. /**
  28449. * Reverts the `_` variable to its previous value and returns a reference to
  28450. * the `lodash` function.
  28451. *
  28452. * @static
  28453. * @since 0.1.0
  28454. * @memberOf _
  28455. * @category Util
  28456. * @returns {Function} Returns the `lodash` function.
  28457. * @example
  28458. *
  28459. * var lodash = _.noConflict();
  28460. */
  28461. function noConflict() {
  28462. if (root._ === this) {
  28463. root._ = oldDash;
  28464. }
  28465. return this;
  28466. }
  28467. /**
  28468. * This method returns `undefined`.
  28469. *
  28470. * @static
  28471. * @memberOf _
  28472. * @since 2.3.0
  28473. * @category Util
  28474. * @example
  28475. *
  28476. * _.times(2, _.noop);
  28477. * // => [undefined, undefined]
  28478. */
  28479. function noop() {
  28480. // No operation performed.
  28481. }
  28482. /**
  28483. * Creates a function that gets the argument at index `n`. If `n` is negative,
  28484. * the nth argument from the end is returned.
  28485. *
  28486. * @static
  28487. * @memberOf _
  28488. * @since 4.0.0
  28489. * @category Util
  28490. * @param {number} [n=0] The index of the argument to return.
  28491. * @returns {Function} Returns the new pass-thru function.
  28492. * @example
  28493. *
  28494. * var func = _.nthArg(1);
  28495. * func('a', 'b', 'c', 'd');
  28496. * // => 'b'
  28497. *
  28498. * var func = _.nthArg(-2);
  28499. * func('a', 'b', 'c', 'd');
  28500. * // => 'c'
  28501. */
  28502. function nthArg(n) {
  28503. n = toInteger(n);
  28504. return baseRest(function(args) {
  28505. return baseNth(args, n);
  28506. });
  28507. }
  28508. /**
  28509. * Creates a function that invokes `iteratees` with the arguments it receives
  28510. * and returns their results.
  28511. *
  28512. * @static
  28513. * @memberOf _
  28514. * @since 4.0.0
  28515. * @category Util
  28516. * @param {...(Function|Function[])} [iteratees=[_.identity]]
  28517. * The iteratees to invoke.
  28518. * @returns {Function} Returns the new function.
  28519. * @example
  28520. *
  28521. * var func = _.over([Math.max, Math.min]);
  28522. *
  28523. * func(1, 2, 3, 4);
  28524. * // => [4, 1]
  28525. */
  28526. var over = createOver(arrayMap);
  28527. /**
  28528. * Creates a function that checks if **all** of the `predicates` return
  28529. * truthy when invoked with the arguments it receives.
  28530. *
  28531. * @static
  28532. * @memberOf _
  28533. * @since 4.0.0
  28534. * @category Util
  28535. * @param {...(Function|Function[])} [predicates=[_.identity]]
  28536. * The predicates to check.
  28537. * @returns {Function} Returns the new function.
  28538. * @example
  28539. *
  28540. * var func = _.overEvery([Boolean, isFinite]);
  28541. *
  28542. * func('1');
  28543. * // => true
  28544. *
  28545. * func(null);
  28546. * // => false
  28547. *
  28548. * func(NaN);
  28549. * // => false
  28550. */
  28551. var overEvery = createOver(arrayEvery);
  28552. /**
  28553. * Creates a function that checks if **any** of the `predicates` return
  28554. * truthy when invoked with the arguments it receives.
  28555. *
  28556. * @static
  28557. * @memberOf _
  28558. * @since 4.0.0
  28559. * @category Util
  28560. * @param {...(Function|Function[])} [predicates=[_.identity]]
  28561. * The predicates to check.
  28562. * @returns {Function} Returns the new function.
  28563. * @example
  28564. *
  28565. * var func = _.overSome([Boolean, isFinite]);
  28566. *
  28567. * func('1');
  28568. * // => true
  28569. *
  28570. * func(null);
  28571. * // => true
  28572. *
  28573. * func(NaN);
  28574. * // => false
  28575. */
  28576. var overSome = createOver(arraySome);
  28577. /**
  28578. * Creates a function that returns the value at `path` of a given object.
  28579. *
  28580. * @static
  28581. * @memberOf _
  28582. * @since 2.4.0
  28583. * @category Util
  28584. * @param {Array|string} path The path of the property to get.
  28585. * @returns {Function} Returns the new accessor function.
  28586. * @example
  28587. *
  28588. * var objects = [
  28589. * { 'a': { 'b': 2 } },
  28590. * { 'a': { 'b': 1 } }
  28591. * ];
  28592. *
  28593. * _.map(objects, _.property('a.b'));
  28594. * // => [2, 1]
  28595. *
  28596. * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
  28597. * // => [1, 2]
  28598. */
  28599. function property(path) {
  28600. return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
  28601. }
  28602. /**
  28603. * The opposite of `_.property`; this method creates a function that returns
  28604. * the value at a given path of `object`.
  28605. *
  28606. * @static
  28607. * @memberOf _
  28608. * @since 3.0.0
  28609. * @category Util
  28610. * @param {Object} object The object to query.
  28611. * @returns {Function} Returns the new accessor function.
  28612. * @example
  28613. *
  28614. * var array = [0, 1, 2],
  28615. * object = { 'a': array, 'b': array, 'c': array };
  28616. *
  28617. * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
  28618. * // => [2, 0]
  28619. *
  28620. * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
  28621. * // => [2, 0]
  28622. */
  28623. function propertyOf(object) {
  28624. return function(path) {
  28625. return object == null ? undefined : baseGet(object, path);
  28626. };
  28627. }
  28628. /**
  28629. * Creates an array of numbers (positive and/or negative) progressing from
  28630. * `start` up to, but not including, `end`. A step of `-1` is used if a negative
  28631. * `start` is specified without an `end` or `step`. If `end` is not specified,
  28632. * it's set to `start` with `start` then set to `0`.
  28633. *
  28634. * **Note:** JavaScript follows the IEEE-754 standard for resolving
  28635. * floating-point values which can produce unexpected results.
  28636. *
  28637. * @static
  28638. * @since 0.1.0
  28639. * @memberOf _
  28640. * @category Util
  28641. * @param {number} [start=0] The start of the range.
  28642. * @param {number} end The end of the range.
  28643. * @param {number} [step=1] The value to increment or decrement by.
  28644. * @returns {Array} Returns the range of numbers.
  28645. * @see _.inRange, _.rangeRight
  28646. * @example
  28647. *
  28648. * _.range(4);
  28649. * // => [0, 1, 2, 3]
  28650. *
  28651. * _.range(-4);
  28652. * // => [0, -1, -2, -3]
  28653. *
  28654. * _.range(1, 5);
  28655. * // => [1, 2, 3, 4]
  28656. *
  28657. * _.range(0, 20, 5);
  28658. * // => [0, 5, 10, 15]
  28659. *
  28660. * _.range(0, -4, -1);
  28661. * // => [0, -1, -2, -3]
  28662. *
  28663. * _.range(1, 4, 0);
  28664. * // => [1, 1, 1]
  28665. *
  28666. * _.range(0);
  28667. * // => []
  28668. */
  28669. var range = createRange();
  28670. /**
  28671. * This method is like `_.range` except that it populates values in
  28672. * descending order.
  28673. *
  28674. * @static
  28675. * @memberOf _
  28676. * @since 4.0.0
  28677. * @category Util
  28678. * @param {number} [start=0] The start of the range.
  28679. * @param {number} end The end of the range.
  28680. * @param {number} [step=1] The value to increment or decrement by.
  28681. * @returns {Array} Returns the range of numbers.
  28682. * @see _.inRange, _.range
  28683. * @example
  28684. *
  28685. * _.rangeRight(4);
  28686. * // => [3, 2, 1, 0]
  28687. *
  28688. * _.rangeRight(-4);
  28689. * // => [-3, -2, -1, 0]
  28690. *
  28691. * _.rangeRight(1, 5);
  28692. * // => [4, 3, 2, 1]
  28693. *
  28694. * _.rangeRight(0, 20, 5);
  28695. * // => [15, 10, 5, 0]
  28696. *
  28697. * _.rangeRight(0, -4, -1);
  28698. * // => [-3, -2, -1, 0]
  28699. *
  28700. * _.rangeRight(1, 4, 0);
  28701. * // => [1, 1, 1]
  28702. *
  28703. * _.rangeRight(0);
  28704. * // => []
  28705. */
  28706. var rangeRight = createRange(true);
  28707. /**
  28708. * This method returns a new empty array.
  28709. *
  28710. * @static
  28711. * @memberOf _
  28712. * @since 4.13.0
  28713. * @category Util
  28714. * @returns {Array} Returns the new empty array.
  28715. * @example
  28716. *
  28717. * var arrays = _.times(2, _.stubArray);
  28718. *
  28719. * console.log(arrays);
  28720. * // => [[], []]
  28721. *
  28722. * console.log(arrays[0] === arrays[1]);
  28723. * // => false
  28724. */
  28725. function stubArray() {
  28726. return [];
  28727. }
  28728. /**
  28729. * This method returns `false`.
  28730. *
  28731. * @static
  28732. * @memberOf _
  28733. * @since 4.13.0
  28734. * @category Util
  28735. * @returns {boolean} Returns `false`.
  28736. * @example
  28737. *
  28738. * _.times(2, _.stubFalse);
  28739. * // => [false, false]
  28740. */
  28741. function stubFalse() {
  28742. return false;
  28743. }
  28744. /**
  28745. * This method returns a new empty object.
  28746. *
  28747. * @static
  28748. * @memberOf _
  28749. * @since 4.13.0
  28750. * @category Util
  28751. * @returns {Object} Returns the new empty object.
  28752. * @example
  28753. *
  28754. * var objects = _.times(2, _.stubObject);
  28755. *
  28756. * console.log(objects);
  28757. * // => [{}, {}]
  28758. *
  28759. * console.log(objects[0] === objects[1]);
  28760. * // => false
  28761. */
  28762. function stubObject() {
  28763. return {};
  28764. }
  28765. /**
  28766. * This method returns an empty string.
  28767. *
  28768. * @static
  28769. * @memberOf _
  28770. * @since 4.13.0
  28771. * @category Util
  28772. * @returns {string} Returns the empty string.
  28773. * @example
  28774. *
  28775. * _.times(2, _.stubString);
  28776. * // => ['', '']
  28777. */
  28778. function stubString() {
  28779. return '';
  28780. }
  28781. /**
  28782. * This method returns `true`.
  28783. *
  28784. * @static
  28785. * @memberOf _
  28786. * @since 4.13.0
  28787. * @category Util
  28788. * @returns {boolean} Returns `true`.
  28789. * @example
  28790. *
  28791. * _.times(2, _.stubTrue);
  28792. * // => [true, true]
  28793. */
  28794. function stubTrue() {
  28795. return true;
  28796. }
  28797. /**
  28798. * Invokes the iteratee `n` times, returning an array of the results of
  28799. * each invocation. The iteratee is invoked with one argument; (index).
  28800. *
  28801. * @static
  28802. * @since 0.1.0
  28803. * @memberOf _
  28804. * @category Util
  28805. * @param {number} n The number of times to invoke `iteratee`.
  28806. * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  28807. * @returns {Array} Returns the array of results.
  28808. * @example
  28809. *
  28810. * _.times(3, String);
  28811. * // => ['0', '1', '2']
  28812. *
  28813. * _.times(4, _.constant(0));
  28814. * // => [0, 0, 0, 0]
  28815. */
  28816. function times(n, iteratee) {
  28817. n = toInteger(n);
  28818. if (n < 1 || n > MAX_SAFE_INTEGER) {
  28819. return [];
  28820. }
  28821. var index = MAX_ARRAY_LENGTH,
  28822. length = nativeMin(n, MAX_ARRAY_LENGTH);
  28823. iteratee = getIteratee(iteratee);
  28824. n -= MAX_ARRAY_LENGTH;
  28825. var result = baseTimes(length, iteratee);
  28826. while (++index < n) {
  28827. iteratee(index);
  28828. }
  28829. return result;
  28830. }
  28831. /**
  28832. * Converts `value` to a property path array.
  28833. *
  28834. * @static
  28835. * @memberOf _
  28836. * @since 4.0.0
  28837. * @category Util
  28838. * @param {*} value The value to convert.
  28839. * @returns {Array} Returns the new property path array.
  28840. * @example
  28841. *
  28842. * _.toPath('a.b.c');
  28843. * // => ['a', 'b', 'c']
  28844. *
  28845. * _.toPath('a[0].b.c');
  28846. * // => ['a', '0', 'b', 'c']
  28847. */
  28848. function toPath(value) {
  28849. if (isArray(value)) {
  28850. return arrayMap(value, toKey);
  28851. }
  28852. return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
  28853. }
  28854. /**
  28855. * Generates a unique ID. If `prefix` is given, the ID is appended to it.
  28856. *
  28857. * @static
  28858. * @since 0.1.0
  28859. * @memberOf _
  28860. * @category Util
  28861. * @param {string} [prefix=''] The value to prefix the ID with.
  28862. * @returns {string} Returns the unique ID.
  28863. * @example
  28864. *
  28865. * _.uniqueId('contact_');
  28866. * // => 'contact_104'
  28867. *
  28868. * _.uniqueId();
  28869. * // => '105'
  28870. */
  28871. function uniqueId(prefix) {
  28872. var id = ++idCounter;
  28873. return toString(prefix) + id;
  28874. }
  28875. /*------------------------------------------------------------------------*/
  28876. /**
  28877. * Adds two numbers.
  28878. *
  28879. * @static
  28880. * @memberOf _
  28881. * @since 3.4.0
  28882. * @category Math
  28883. * @param {number} augend The first number in an addition.
  28884. * @param {number} addend The second number in an addition.
  28885. * @returns {number} Returns the total.
  28886. * @example
  28887. *
  28888. * _.add(6, 4);
  28889. * // => 10
  28890. */
  28891. var add = createMathOperation(function(augend, addend) {
  28892. return augend + addend;
  28893. }, 0);
  28894. /**
  28895. * Computes `number` rounded up to `precision`.
  28896. *
  28897. * @static
  28898. * @memberOf _
  28899. * @since 3.10.0
  28900. * @category Math
  28901. * @param {number} number The number to round up.
  28902. * @param {number} [precision=0] The precision to round up to.
  28903. * @returns {number} Returns the rounded up number.
  28904. * @example
  28905. *
  28906. * _.ceil(4.006);
  28907. * // => 5
  28908. *
  28909. * _.ceil(6.004, 2);
  28910. * // => 6.01
  28911. *
  28912. * _.ceil(6040, -2);
  28913. * // => 6100
  28914. */
  28915. var ceil = createRound('ceil');
  28916. /**
  28917. * Divide two numbers.
  28918. *
  28919. * @static
  28920. * @memberOf _
  28921. * @since 4.7.0
  28922. * @category Math
  28923. * @param {number} dividend The first number in a division.
  28924. * @param {number} divisor The second number in a division.
  28925. * @returns {number} Returns the quotient.
  28926. * @example
  28927. *
  28928. * _.divide(6, 4);
  28929. * // => 1.5
  28930. */
  28931. var divide = createMathOperation(function(dividend, divisor) {
  28932. return dividend / divisor;
  28933. }, 1);
  28934. /**
  28935. * Computes `number` rounded down to `precision`.
  28936. *
  28937. * @static
  28938. * @memberOf _
  28939. * @since 3.10.0
  28940. * @category Math
  28941. * @param {number} number The number to round down.
  28942. * @param {number} [precision=0] The precision to round down to.
  28943. * @returns {number} Returns the rounded down number.
  28944. * @example
  28945. *
  28946. * _.floor(4.006);
  28947. * // => 4
  28948. *
  28949. * _.floor(0.046, 2);
  28950. * // => 0.04
  28951. *
  28952. * _.floor(4060, -2);
  28953. * // => 4000
  28954. */
  28955. var floor = createRound('floor');
  28956. /**
  28957. * Computes the maximum value of `array`. If `array` is empty or falsey,
  28958. * `undefined` is returned.
  28959. *
  28960. * @static
  28961. * @since 0.1.0
  28962. * @memberOf _
  28963. * @category Math
  28964. * @param {Array} array The array to iterate over.
  28965. * @returns {*} Returns the maximum value.
  28966. * @example
  28967. *
  28968. * _.max([4, 2, 8, 6]);
  28969. * // => 8
  28970. *
  28971. * _.max([]);
  28972. * // => undefined
  28973. */
  28974. function max(array) {
  28975. return (array && array.length)
  28976. ? baseExtremum(array, identity, baseGt)
  28977. : undefined;
  28978. }
  28979. /**
  28980. * This method is like `_.max` except that it accepts `iteratee` which is
  28981. * invoked for each element in `array` to generate the criterion by which
  28982. * the value is ranked. The iteratee is invoked with one argument: (value).
  28983. *
  28984. * @static
  28985. * @memberOf _
  28986. * @since 4.0.0
  28987. * @category Math
  28988. * @param {Array} array The array to iterate over.
  28989. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  28990. * @returns {*} Returns the maximum value.
  28991. * @example
  28992. *
  28993. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  28994. *
  28995. * _.maxBy(objects, function(o) { return o.n; });
  28996. * // => { 'n': 2 }
  28997. *
  28998. * // The `_.property` iteratee shorthand.
  28999. * _.maxBy(objects, 'n');
  29000. * // => { 'n': 2 }
  29001. */
  29002. function maxBy(array, iteratee) {
  29003. return (array && array.length)
  29004. ? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
  29005. : undefined;
  29006. }
  29007. /**
  29008. * Computes the mean of the values in `array`.
  29009. *
  29010. * @static
  29011. * @memberOf _
  29012. * @since 4.0.0
  29013. * @category Math
  29014. * @param {Array} array The array to iterate over.
  29015. * @returns {number} Returns the mean.
  29016. * @example
  29017. *
  29018. * _.mean([4, 2, 8, 6]);
  29019. * // => 5
  29020. */
  29021. function mean(array) {
  29022. return baseMean(array, identity);
  29023. }
  29024. /**
  29025. * This method is like `_.mean` except that it accepts `iteratee` which is
  29026. * invoked for each element in `array` to generate the value to be averaged.
  29027. * The iteratee is invoked with one argument: (value).
  29028. *
  29029. * @static
  29030. * @memberOf _
  29031. * @since 4.7.0
  29032. * @category Math
  29033. * @param {Array} array The array to iterate over.
  29034. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  29035. * @returns {number} Returns the mean.
  29036. * @example
  29037. *
  29038. * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
  29039. *
  29040. * _.meanBy(objects, function(o) { return o.n; });
  29041. * // => 5
  29042. *
  29043. * // The `_.property` iteratee shorthand.
  29044. * _.meanBy(objects, 'n');
  29045. * // => 5
  29046. */
  29047. function meanBy(array, iteratee) {
  29048. return baseMean(array, getIteratee(iteratee, 2));
  29049. }
  29050. /**
  29051. * Computes the minimum value of `array`. If `array` is empty or falsey,
  29052. * `undefined` is returned.
  29053. *
  29054. * @static
  29055. * @since 0.1.0
  29056. * @memberOf _
  29057. * @category Math
  29058. * @param {Array} array The array to iterate over.
  29059. * @returns {*} Returns the minimum value.
  29060. * @example
  29061. *
  29062. * _.min([4, 2, 8, 6]);
  29063. * // => 2
  29064. *
  29065. * _.min([]);
  29066. * // => undefined
  29067. */
  29068. function min(array) {
  29069. return (array && array.length)
  29070. ? baseExtremum(array, identity, baseLt)
  29071. : undefined;
  29072. }
  29073. /**
  29074. * This method is like `_.min` except that it accepts `iteratee` which is
  29075. * invoked for each element in `array` to generate the criterion by which
  29076. * the value is ranked. The iteratee is invoked with one argument: (value).
  29077. *
  29078. * @static
  29079. * @memberOf _
  29080. * @since 4.0.0
  29081. * @category Math
  29082. * @param {Array} array The array to iterate over.
  29083. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  29084. * @returns {*} Returns the minimum value.
  29085. * @example
  29086. *
  29087. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  29088. *
  29089. * _.minBy(objects, function(o) { return o.n; });
  29090. * // => { 'n': 1 }
  29091. *
  29092. * // The `_.property` iteratee shorthand.
  29093. * _.minBy(objects, 'n');
  29094. * // => { 'n': 1 }
  29095. */
  29096. function minBy(array, iteratee) {
  29097. return (array && array.length)
  29098. ? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
  29099. : undefined;
  29100. }
  29101. /**
  29102. * Multiply two numbers.
  29103. *
  29104. * @static
  29105. * @memberOf _
  29106. * @since 4.7.0
  29107. * @category Math
  29108. * @param {number} multiplier The first number in a multiplication.
  29109. * @param {number} multiplicand The second number in a multiplication.
  29110. * @returns {number} Returns the product.
  29111. * @example
  29112. *
  29113. * _.multiply(6, 4);
  29114. * // => 24
  29115. */
  29116. var multiply = createMathOperation(function(multiplier, multiplicand) {
  29117. return multiplier * multiplicand;
  29118. }, 1);
  29119. /**
  29120. * Computes `number` rounded to `precision`.
  29121. *
  29122. * @static
  29123. * @memberOf _
  29124. * @since 3.10.0
  29125. * @category Math
  29126. * @param {number} number The number to round.
  29127. * @param {number} [precision=0] The precision to round to.
  29128. * @returns {number} Returns the rounded number.
  29129. * @example
  29130. *
  29131. * _.round(4.006);
  29132. * // => 4
  29133. *
  29134. * _.round(4.006, 2);
  29135. * // => 4.01
  29136. *
  29137. * _.round(4060, -2);
  29138. * // => 4100
  29139. */
  29140. var round = createRound('round');
  29141. /**
  29142. * Subtract two numbers.
  29143. *
  29144. * @static
  29145. * @memberOf _
  29146. * @since 4.0.0
  29147. * @category Math
  29148. * @param {number} minuend The first number in a subtraction.
  29149. * @param {number} subtrahend The second number in a subtraction.
  29150. * @returns {number} Returns the difference.
  29151. * @example
  29152. *
  29153. * _.subtract(6, 4);
  29154. * // => 2
  29155. */
  29156. var subtract = createMathOperation(function(minuend, subtrahend) {
  29157. return minuend - subtrahend;
  29158. }, 0);
  29159. /**
  29160. * Computes the sum of the values in `array`.
  29161. *
  29162. * @static
  29163. * @memberOf _
  29164. * @since 3.4.0
  29165. * @category Math
  29166. * @param {Array} array The array to iterate over.
  29167. * @returns {number} Returns the sum.
  29168. * @example
  29169. *
  29170. * _.sum([4, 2, 8, 6]);
  29171. * // => 20
  29172. */
  29173. function sum(array) {
  29174. return (array && array.length)
  29175. ? baseSum(array, identity)
  29176. : 0;
  29177. }
  29178. /**
  29179. * This method is like `_.sum` except that it accepts `iteratee` which is
  29180. * invoked for each element in `array` to generate the value to be summed.
  29181. * The iteratee is invoked with one argument: (value).
  29182. *
  29183. * @static
  29184. * @memberOf _
  29185. * @since 4.0.0
  29186. * @category Math
  29187. * @param {Array} array The array to iterate over.
  29188. * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  29189. * @returns {number} Returns the sum.
  29190. * @example
  29191. *
  29192. * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
  29193. *
  29194. * _.sumBy(objects, function(o) { return o.n; });
  29195. * // => 20
  29196. *
  29197. * // The `_.property` iteratee shorthand.
  29198. * _.sumBy(objects, 'n');
  29199. * // => 20
  29200. */
  29201. function sumBy(array, iteratee) {
  29202. return (array && array.length)
  29203. ? baseSum(array, getIteratee(iteratee, 2))
  29204. : 0;
  29205. }
  29206. /*------------------------------------------------------------------------*/
  29207. // Add methods that return wrapped values in chain sequences.
  29208. lodash.after = after;
  29209. lodash.ary = ary;
  29210. lodash.assign = assign;
  29211. lodash.assignIn = assignIn;
  29212. lodash.assignInWith = assignInWith;
  29213. lodash.assignWith = assignWith;
  29214. lodash.at = at;
  29215. lodash.before = before;
  29216. lodash.bind = bind;
  29217. lodash.bindAll = bindAll;
  29218. lodash.bindKey = bindKey;
  29219. lodash.castArray = castArray;
  29220. lodash.chain = chain;
  29221. lodash.chunk = chunk;
  29222. lodash.compact = compact;
  29223. lodash.concat = concat;
  29224. lodash.cond = cond;
  29225. lodash.conforms = conforms;
  29226. lodash.constant = constant;
  29227. lodash.countBy = countBy;
  29228. lodash.create = create;
  29229. lodash.curry = curry;
  29230. lodash.curryRight = curryRight;
  29231. lodash.debounce = debounce;
  29232. lodash.defaults = defaults;
  29233. lodash.defaultsDeep = defaultsDeep;
  29234. lodash.defer = defer;
  29235. lodash.delay = delay;
  29236. lodash.difference = difference;
  29237. lodash.differenceBy = differenceBy;
  29238. lodash.differenceWith = differenceWith;
  29239. lodash.drop = drop;
  29240. lodash.dropRight = dropRight;
  29241. lodash.dropRightWhile = dropRightWhile;
  29242. lodash.dropWhile = dropWhile;
  29243. lodash.fill = fill;
  29244. lodash.filter = filter;
  29245. lodash.flatMap = flatMap;
  29246. lodash.flatMapDeep = flatMapDeep;
  29247. lodash.flatMapDepth = flatMapDepth;
  29248. lodash.flatten = flatten;
  29249. lodash.flattenDeep = flattenDeep;
  29250. lodash.flattenDepth = flattenDepth;
  29251. lodash.flip = flip;
  29252. lodash.flow = flow;
  29253. lodash.flowRight = flowRight;
  29254. lodash.fromPairs = fromPairs;
  29255. lodash.functions = functions;
  29256. lodash.functionsIn = functionsIn;
  29257. lodash.groupBy = groupBy;
  29258. lodash.initial = initial;
  29259. lodash.intersection = intersection;
  29260. lodash.intersectionBy = intersectionBy;
  29261. lodash.intersectionWith = intersectionWith;
  29262. lodash.invert = invert;
  29263. lodash.invertBy = invertBy;
  29264. lodash.invokeMap = invokeMap;
  29265. lodash.iteratee = iteratee;
  29266. lodash.keyBy = keyBy;
  29267. lodash.keys = keys;
  29268. lodash.keysIn = keysIn;
  29269. lodash.map = map;
  29270. lodash.mapKeys = mapKeys;
  29271. lodash.mapValues = mapValues;
  29272. lodash.matches = matches;
  29273. lodash.matchesProperty = matchesProperty;
  29274. lodash.memoize = memoize;
  29275. lodash.merge = merge;
  29276. lodash.mergeWith = mergeWith;
  29277. lodash.method = method;
  29278. lodash.methodOf = methodOf;
  29279. lodash.mixin = mixin;
  29280. lodash.negate = negate;
  29281. lodash.nthArg = nthArg;
  29282. lodash.omit = omit;
  29283. lodash.omitBy = omitBy;
  29284. lodash.once = once;
  29285. lodash.orderBy = orderBy;
  29286. lodash.over = over;
  29287. lodash.overArgs = overArgs;
  29288. lodash.overEvery = overEvery;
  29289. lodash.overSome = overSome;
  29290. lodash.partial = partial;
  29291. lodash.partialRight = partialRight;
  29292. lodash.partition = partition;
  29293. lodash.pick = pick;
  29294. lodash.pickBy = pickBy;
  29295. lodash.property = property;
  29296. lodash.propertyOf = propertyOf;
  29297. lodash.pull = pull;
  29298. lodash.pullAll = pullAll;
  29299. lodash.pullAllBy = pullAllBy;
  29300. lodash.pullAllWith = pullAllWith;
  29301. lodash.pullAt = pullAt;
  29302. lodash.range = range;
  29303. lodash.rangeRight = rangeRight;
  29304. lodash.rearg = rearg;
  29305. lodash.reject = reject;
  29306. lodash.remove = remove;
  29307. lodash.rest = rest;
  29308. lodash.reverse = reverse;
  29309. lodash.sampleSize = sampleSize;
  29310. lodash.set = set;
  29311. lodash.setWith = setWith;
  29312. lodash.shuffle = shuffle;
  29313. lodash.slice = slice;
  29314. lodash.sortBy = sortBy;
  29315. lodash.sortedUniq = sortedUniq;
  29316. lodash.sortedUniqBy = sortedUniqBy;
  29317. lodash.split = split;
  29318. lodash.spread = spread;
  29319. lodash.tail = tail;
  29320. lodash.take = take;
  29321. lodash.takeRight = takeRight;
  29322. lodash.takeRightWhile = takeRightWhile;
  29323. lodash.takeWhile = takeWhile;
  29324. lodash.tap = tap;
  29325. lodash.throttle = throttle;
  29326. lodash.thru = thru;
  29327. lodash.toArray = toArray;
  29328. lodash.toPairs = toPairs;
  29329. lodash.toPairsIn = toPairsIn;
  29330. lodash.toPath = toPath;
  29331. lodash.toPlainObject = toPlainObject;
  29332. lodash.transform = transform;
  29333. lodash.unary = unary;
  29334. lodash.union = union;
  29335. lodash.unionBy = unionBy;
  29336. lodash.unionWith = unionWith;
  29337. lodash.uniq = uniq;
  29338. lodash.uniqBy = uniqBy;
  29339. lodash.uniqWith = uniqWith;
  29340. lodash.unset = unset;
  29341. lodash.unzip = unzip;
  29342. lodash.unzipWith = unzipWith;
  29343. lodash.update = update;
  29344. lodash.updateWith = updateWith;
  29345. lodash.values = values;
  29346. lodash.valuesIn = valuesIn;
  29347. lodash.without = without;
  29348. lodash.words = words;
  29349. lodash.wrap = wrap;
  29350. lodash.xor = xor;
  29351. lodash.xorBy = xorBy;
  29352. lodash.xorWith = xorWith;
  29353. lodash.zip = zip;
  29354. lodash.zipObject = zipObject;
  29355. lodash.zipObjectDeep = zipObjectDeep;
  29356. lodash.zipWith = zipWith;
  29357. // Add aliases.
  29358. lodash.entries = toPairs;
  29359. lodash.entriesIn = toPairsIn;
  29360. lodash.extend = assignIn;
  29361. lodash.extendWith = assignInWith;
  29362. // Add methods to `lodash.prototype`.
  29363. mixin(lodash, lodash);
  29364. /*------------------------------------------------------------------------*/
  29365. // Add methods that return unwrapped values in chain sequences.
  29366. lodash.add = add;
  29367. lodash.attempt = attempt;
  29368. lodash.camelCase = camelCase;
  29369. lodash.capitalize = capitalize;
  29370. lodash.ceil = ceil;
  29371. lodash.clamp = clamp;
  29372. lodash.clone = clone;
  29373. lodash.cloneDeep = cloneDeep;
  29374. lodash.cloneDeepWith = cloneDeepWith;
  29375. lodash.cloneWith = cloneWith;
  29376. lodash.conformsTo = conformsTo;
  29377. lodash.deburr = deburr;
  29378. lodash.defaultTo = defaultTo;
  29379. lodash.divide = divide;
  29380. lodash.endsWith = endsWith;
  29381. lodash.eq = eq;
  29382. lodash.escape = escape;
  29383. lodash.escapeRegExp = escapeRegExp;
  29384. lodash.every = every;
  29385. lodash.find = find;
  29386. lodash.findIndex = findIndex;
  29387. lodash.findKey = findKey;
  29388. lodash.findLast = findLast;
  29389. lodash.findLastIndex = findLastIndex;
  29390. lodash.findLastKey = findLastKey;
  29391. lodash.floor = floor;
  29392. lodash.forEach = forEach;
  29393. lodash.forEachRight = forEachRight;
  29394. lodash.forIn = forIn;
  29395. lodash.forInRight = forInRight;
  29396. lodash.forOwn = forOwn;
  29397. lodash.forOwnRight = forOwnRight;
  29398. lodash.get = get;
  29399. lodash.gt = gt;
  29400. lodash.gte = gte;
  29401. lodash.has = has;
  29402. lodash.hasIn = hasIn;
  29403. lodash.head = head;
  29404. lodash.identity = identity;
  29405. lodash.includes = includes;
  29406. lodash.indexOf = indexOf;
  29407. lodash.inRange = inRange;
  29408. lodash.invoke = invoke;
  29409. lodash.isArguments = isArguments;
  29410. lodash.isArray = isArray;
  29411. lodash.isArrayBuffer = isArrayBuffer;
  29412. lodash.isArrayLike = isArrayLike;
  29413. lodash.isArrayLikeObject = isArrayLikeObject;
  29414. lodash.isBoolean = isBoolean;
  29415. lodash.isBuffer = isBuffer;
  29416. lodash.isDate = isDate;
  29417. lodash.isElement = isElement;
  29418. lodash.isEmpty = isEmpty;
  29419. lodash.isEqual = isEqual;
  29420. lodash.isEqualWith = isEqualWith;
  29421. lodash.isError = isError;
  29422. lodash.isFinite = isFinite;
  29423. lodash.isFunction = isFunction;
  29424. lodash.isInteger = isInteger;
  29425. lodash.isLength = isLength;
  29426. lodash.isMap = isMap;
  29427. lodash.isMatch = isMatch;
  29428. lodash.isMatchWith = isMatchWith;
  29429. lodash.isNaN = isNaN;
  29430. lodash.isNative = isNative;
  29431. lodash.isNil = isNil;
  29432. lodash.isNull = isNull;
  29433. lodash.isNumber = isNumber;
  29434. lodash.isObject = isObject;
  29435. lodash.isObjectLike = isObjectLike;
  29436. lodash.isPlainObject = isPlainObject;
  29437. lodash.isRegExp = isRegExp;
  29438. lodash.isSafeInteger = isSafeInteger;
  29439. lodash.isSet = isSet;
  29440. lodash.isString = isString;
  29441. lodash.isSymbol = isSymbol;
  29442. lodash.isTypedArray = isTypedArray;
  29443. lodash.isUndefined = isUndefined;
  29444. lodash.isWeakMap = isWeakMap;
  29445. lodash.isWeakSet = isWeakSet;
  29446. lodash.join = join;
  29447. lodash.kebabCase = kebabCase;
  29448. lodash.last = last;
  29449. lodash.lastIndexOf = lastIndexOf;
  29450. lodash.lowerCase = lowerCase;
  29451. lodash.lowerFirst = lowerFirst;
  29452. lodash.lt = lt;
  29453. lodash.lte = lte;
  29454. lodash.max = max;
  29455. lodash.maxBy = maxBy;
  29456. lodash.mean = mean;
  29457. lodash.meanBy = meanBy;
  29458. lodash.min = min;
  29459. lodash.minBy = minBy;
  29460. lodash.stubArray = stubArray;
  29461. lodash.stubFalse = stubFalse;
  29462. lodash.stubObject = stubObject;
  29463. lodash.stubString = stubString;
  29464. lodash.stubTrue = stubTrue;
  29465. lodash.multiply = multiply;
  29466. lodash.nth = nth;
  29467. lodash.noConflict = noConflict;
  29468. lodash.noop = noop;
  29469. lodash.now = now;
  29470. lodash.pad = pad;
  29471. lodash.padEnd = padEnd;
  29472. lodash.padStart = padStart;
  29473. lodash.parseInt = parseInt;
  29474. lodash.random = random;
  29475. lodash.reduce = reduce;
  29476. lodash.reduceRight = reduceRight;
  29477. lodash.repeat = repeat;
  29478. lodash.replace = replace;
  29479. lodash.result = result;
  29480. lodash.round = round;
  29481. lodash.runInContext = runInContext;
  29482. lodash.sample = sample;
  29483. lodash.size = size;
  29484. lodash.snakeCase = snakeCase;
  29485. lodash.some = some;
  29486. lodash.sortedIndex = sortedIndex;
  29487. lodash.sortedIndexBy = sortedIndexBy;
  29488. lodash.sortedIndexOf = sortedIndexOf;
  29489. lodash.sortedLastIndex = sortedLastIndex;
  29490. lodash.sortedLastIndexBy = sortedLastIndexBy;
  29491. lodash.sortedLastIndexOf = sortedLastIndexOf;
  29492. lodash.startCase = startCase;
  29493. lodash.startsWith = startsWith;
  29494. lodash.subtract = subtract;
  29495. lodash.sum = sum;
  29496. lodash.sumBy = sumBy;
  29497. lodash.template = template;
  29498. lodash.times = times;
  29499. lodash.toFinite = toFinite;
  29500. lodash.toInteger = toInteger;
  29501. lodash.toLength = toLength;
  29502. lodash.toLower = toLower;
  29503. lodash.toNumber = toNumber;
  29504. lodash.toSafeInteger = toSafeInteger;
  29505. lodash.toString = toString;
  29506. lodash.toUpper = toUpper;
  29507. lodash.trim = trim;
  29508. lodash.trimEnd = trimEnd;
  29509. lodash.trimStart = trimStart;
  29510. lodash.truncate = truncate;
  29511. lodash.unescape = unescape;
  29512. lodash.uniqueId = uniqueId;
  29513. lodash.upperCase = upperCase;
  29514. lodash.upperFirst = upperFirst;
  29515. // Add aliases.
  29516. lodash.each = forEach;
  29517. lodash.eachRight = forEachRight;
  29518. lodash.first = head;
  29519. mixin(lodash, (function() {
  29520. var source = {};
  29521. baseForOwn(lodash, function(func, methodName) {
  29522. if (!hasOwnProperty.call(lodash.prototype, methodName)) {
  29523. source[methodName] = func;
  29524. }
  29525. });
  29526. return source;
  29527. }()), { 'chain': false });
  29528. /*------------------------------------------------------------------------*/
  29529. /**
  29530. * The semantic version number.
  29531. *
  29532. * @static
  29533. * @memberOf _
  29534. * @type {string}
  29535. */
  29536. lodash.VERSION = VERSION;
  29537. // Assign default placeholders.
  29538. arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
  29539. lodash[methodName].placeholder = lodash;
  29540. });
  29541. // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
  29542. arrayEach(['drop', 'take'], function(methodName, index) {
  29543. LazyWrapper.prototype[methodName] = function(n) {
  29544. n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
  29545. var result = (this.__filtered__ && !index)
  29546. ? new LazyWrapper(this)
  29547. : this.clone();
  29548. if (result.__filtered__) {
  29549. result.__takeCount__ = nativeMin(n, result.__takeCount__);
  29550. } else {
  29551. result.__views__.push({
  29552. 'size': nativeMin(n, MAX_ARRAY_LENGTH),
  29553. 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
  29554. });
  29555. }
  29556. return result;
  29557. };
  29558. LazyWrapper.prototype[methodName + 'Right'] = function(n) {
  29559. return this.reverse()[methodName](n).reverse();
  29560. };
  29561. });
  29562. // Add `LazyWrapper` methods that accept an `iteratee` value.
  29563. arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
  29564. var type = index + 1,
  29565. isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
  29566. LazyWrapper.prototype[methodName] = function(iteratee) {
  29567. var result = this.clone();
  29568. result.__iteratees__.push({
  29569. 'iteratee': getIteratee(iteratee, 3),
  29570. 'type': type
  29571. });
  29572. result.__filtered__ = result.__filtered__ || isFilter;
  29573. return result;
  29574. };
  29575. });
  29576. // Add `LazyWrapper` methods for `_.head` and `_.last`.
  29577. arrayEach(['head', 'last'], function(methodName, index) {
  29578. var takeName = 'take' + (index ? 'Right' : '');
  29579. LazyWrapper.prototype[methodName] = function() {
  29580. return this[takeName](1).value()[0];
  29581. };
  29582. });
  29583. // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
  29584. arrayEach(['initial', 'tail'], function(methodName, index) {
  29585. var dropName = 'drop' + (index ? '' : 'Right');
  29586. LazyWrapper.prototype[methodName] = function() {
  29587. return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
  29588. };
  29589. });
  29590. LazyWrapper.prototype.compact = function() {
  29591. return this.filter(identity);
  29592. };
  29593. LazyWrapper.prototype.find = function(predicate) {
  29594. return this.filter(predicate).head();
  29595. };
  29596. LazyWrapper.prototype.findLast = function(predicate) {
  29597. return this.reverse().find(predicate);
  29598. };
  29599. LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
  29600. if (typeof path == 'function') {
  29601. return new LazyWrapper(this);
  29602. }
  29603. return this.map(function(value) {
  29604. return baseInvoke(value, path, args);
  29605. });
  29606. });
  29607. LazyWrapper.prototype.reject = function(predicate) {
  29608. return this.filter(negate(getIteratee(predicate)));
  29609. };
  29610. LazyWrapper.prototype.slice = function(start, end) {
  29611. start = toInteger(start);
  29612. var result = this;
  29613. if (result.__filtered__ && (start > 0 || end < 0)) {
  29614. return new LazyWrapper(result);
  29615. }
  29616. if (start < 0) {
  29617. result = result.takeRight(-start);
  29618. } else if (start) {
  29619. result = result.drop(start);
  29620. }
  29621. if (end !== undefined) {
  29622. end = toInteger(end);
  29623. result = end < 0 ? result.dropRight(-end) : result.take(end - start);
  29624. }
  29625. return result;
  29626. };
  29627. LazyWrapper.prototype.takeRightWhile = function(predicate) {
  29628. return this.reverse().takeWhile(predicate).reverse();
  29629. };
  29630. LazyWrapper.prototype.toArray = function() {
  29631. return this.take(MAX_ARRAY_LENGTH);
  29632. };
  29633. // Add `LazyWrapper` methods to `lodash.prototype`.
  29634. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  29635. var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
  29636. isTaker = /^(?:head|last)$/.test(methodName),
  29637. lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
  29638. retUnwrapped = isTaker || /^find/.test(methodName);
  29639. if (!lodashFunc) {
  29640. return;
  29641. }
  29642. lodash.prototype[methodName] = function() {
  29643. var value = this.__wrapped__,
  29644. args = isTaker ? [1] : arguments,
  29645. isLazy = value instanceof LazyWrapper,
  29646. iteratee = args[0],
  29647. useLazy = isLazy || isArray(value);
  29648. var interceptor = function(value) {
  29649. var result = lodashFunc.apply(lodash, arrayPush([value], args));
  29650. return (isTaker && chainAll) ? result[0] : result;
  29651. };
  29652. if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
  29653. // Avoid lazy use if the iteratee has a "length" value other than `1`.
  29654. isLazy = useLazy = false;
  29655. }
  29656. var chainAll = this.__chain__,
  29657. isHybrid = !!this.__actions__.length,
  29658. isUnwrapped = retUnwrapped && !chainAll,
  29659. onlyLazy = isLazy && !isHybrid;
  29660. if (!retUnwrapped && useLazy) {
  29661. value = onlyLazy ? value : new LazyWrapper(this);
  29662. var result = func.apply(value, args);
  29663. result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
  29664. return new LodashWrapper(result, chainAll);
  29665. }
  29666. if (isUnwrapped && onlyLazy) {
  29667. return func.apply(this, args);
  29668. }
  29669. result = this.thru(interceptor);
  29670. return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
  29671. };
  29672. });
  29673. // Add `Array` methods to `lodash.prototype`.
  29674. arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
  29675. var func = arrayProto[methodName],
  29676. chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
  29677. retUnwrapped = /^(?:pop|shift)$/.test(methodName);
  29678. lodash.prototype[methodName] = function() {
  29679. var args = arguments;
  29680. if (retUnwrapped && !this.__chain__) {
  29681. var value = this.value();
  29682. return func.apply(isArray(value) ? value : [], args);
  29683. }
  29684. return this[chainName](function(value) {
  29685. return func.apply(isArray(value) ? value : [], args);
  29686. });
  29687. };
  29688. });
  29689. // Map minified method names to their real names.
  29690. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  29691. var lodashFunc = lodash[methodName];
  29692. if (lodashFunc) {
  29693. var key = (lodashFunc.name + ''),
  29694. names = realNames[key] || (realNames[key] = []);
  29695. names.push({ 'name': methodName, 'func': lodashFunc });
  29696. }
  29697. });
  29698. realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
  29699. 'name': 'wrapper',
  29700. 'func': undefined
  29701. }];
  29702. // Add methods to `LazyWrapper`.
  29703. LazyWrapper.prototype.clone = lazyClone;
  29704. LazyWrapper.prototype.reverse = lazyReverse;
  29705. LazyWrapper.prototype.value = lazyValue;
  29706. // Add chain sequence methods to the `lodash` wrapper.
  29707. lodash.prototype.at = wrapperAt;
  29708. lodash.prototype.chain = wrapperChain;
  29709. lodash.prototype.commit = wrapperCommit;
  29710. lodash.prototype.next = wrapperNext;
  29711. lodash.prototype.plant = wrapperPlant;
  29712. lodash.prototype.reverse = wrapperReverse;
  29713. lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
  29714. // Add lazy aliases.
  29715. lodash.prototype.first = lodash.prototype.head;
  29716. if (symIterator) {
  29717. lodash.prototype[symIterator] = wrapperToIterator;
  29718. }
  29719. return lodash;
  29720. });
  29721. /*--------------------------------------------------------------------------*/
  29722. // Export lodash.
  29723. var _ = runInContext();
  29724. // Some AMD build optimizers, like r.js, check for condition patterns like:
  29725. if (true) {
  29726. // Expose Lodash on the global object to prevent errors when Lodash is
  29727. // loaded by a script tag in the presence of an AMD loader.
  29728. // See http://requirejs.org/docs/errors.html#mismatch for more details.
  29729. // Use `_.noConflict` to remove Lodash from the global object.
  29730. root._ = _;
  29731. // Define as an anonymous module so, through path mapping, it can be
  29732. // referenced as the "underscore" module.
  29733. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
  29734. return _;
  29735. }).call(exports, __webpack_require__, exports, module),
  29736. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  29737. }
  29738. // Check for `exports` after `define` in case a build optimizer adds it.
  29739. else {}
  29740. }.call(this));
  29741. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
  29742. /***/ }),
  29743. /***/ "./node_modules/lodash/toString.js":
  29744. /*!*****************************************!*\
  29745. !*** ./node_modules/lodash/toString.js ***!
  29746. \*****************************************/
  29747. /*! no static exports found */
  29748. /***/ (function(module, exports, __webpack_require__) {
  29749. var baseToString = __webpack_require__(/*! ./_baseToString */ "./node_modules/lodash/_baseToString.js");
  29750. /**
  29751. * Converts `value` to a string. An empty string is returned for `null`
  29752. * and `undefined` values. The sign of `-0` is preserved.
  29753. *
  29754. * @static
  29755. * @memberOf _
  29756. * @since 4.0.0
  29757. * @category Lang
  29758. * @param {*} value The value to convert.
  29759. * @returns {string} Returns the converted string.
  29760. * @example
  29761. *
  29762. * _.toString(null);
  29763. * // => ''
  29764. *
  29765. * _.toString(-0);
  29766. * // => '-0'
  29767. *
  29768. * _.toString([1, 2, 3]);
  29769. * // => '1,2,3'
  29770. */
  29771. function toString(value) {
  29772. return value == null ? '' : baseToString(value);
  29773. }
  29774. module.exports = toString;
  29775. /***/ }),
  29776. /***/ "./node_modules/moment/locale sync recursive ^\\.\\/.*$":
  29777. /*!**************************************************!*\
  29778. !*** ./node_modules/moment/locale sync ^\.\/.*$ ***!
  29779. \**************************************************/
  29780. /*! no static exports found */
  29781. /***/ (function(module, exports, __webpack_require__) {
  29782. var map = {
  29783. "./af": "./node_modules/moment/locale/af.js",
  29784. "./af.js": "./node_modules/moment/locale/af.js",
  29785. "./ar": "./node_modules/moment/locale/ar.js",
  29786. "./ar-dz": "./node_modules/moment/locale/ar-dz.js",
  29787. "./ar-dz.js": "./node_modules/moment/locale/ar-dz.js",
  29788. "./ar-kw": "./node_modules/moment/locale/ar-kw.js",
  29789. "./ar-kw.js": "./node_modules/moment/locale/ar-kw.js",
  29790. "./ar-ly": "./node_modules/moment/locale/ar-ly.js",
  29791. "./ar-ly.js": "./node_modules/moment/locale/ar-ly.js",
  29792. "./ar-ma": "./node_modules/moment/locale/ar-ma.js",
  29793. "./ar-ma.js": "./node_modules/moment/locale/ar-ma.js",
  29794. "./ar-sa": "./node_modules/moment/locale/ar-sa.js",
  29795. "./ar-sa.js": "./node_modules/moment/locale/ar-sa.js",
  29796. "./ar-tn": "./node_modules/moment/locale/ar-tn.js",
  29797. "./ar-tn.js": "./node_modules/moment/locale/ar-tn.js",
  29798. "./ar.js": "./node_modules/moment/locale/ar.js",
  29799. "./az": "./node_modules/moment/locale/az.js",
  29800. "./az.js": "./node_modules/moment/locale/az.js",
  29801. "./be": "./node_modules/moment/locale/be.js",
  29802. "./be.js": "./node_modules/moment/locale/be.js",
  29803. "./bg": "./node_modules/moment/locale/bg.js",
  29804. "./bg.js": "./node_modules/moment/locale/bg.js",
  29805. "./bm": "./node_modules/moment/locale/bm.js",
  29806. "./bm.js": "./node_modules/moment/locale/bm.js",
  29807. "./bn": "./node_modules/moment/locale/bn.js",
  29808. "./bn.js": "./node_modules/moment/locale/bn.js",
  29809. "./bo": "./node_modules/moment/locale/bo.js",
  29810. "./bo.js": "./node_modules/moment/locale/bo.js",
  29811. "./br": "./node_modules/moment/locale/br.js",
  29812. "./br.js": "./node_modules/moment/locale/br.js",
  29813. "./bs": "./node_modules/moment/locale/bs.js",
  29814. "./bs.js": "./node_modules/moment/locale/bs.js",
  29815. "./ca": "./node_modules/moment/locale/ca.js",
  29816. "./ca.js": "./node_modules/moment/locale/ca.js",
  29817. "./cs": "./node_modules/moment/locale/cs.js",
  29818. "./cs.js": "./node_modules/moment/locale/cs.js",
  29819. "./cv": "./node_modules/moment/locale/cv.js",
  29820. "./cv.js": "./node_modules/moment/locale/cv.js",
  29821. "./cy": "./node_modules/moment/locale/cy.js",
  29822. "./cy.js": "./node_modules/moment/locale/cy.js",
  29823. "./da": "./node_modules/moment/locale/da.js",
  29824. "./da.js": "./node_modules/moment/locale/da.js",
  29825. "./de": "./node_modules/moment/locale/de.js",
  29826. "./de-at": "./node_modules/moment/locale/de-at.js",
  29827. "./de-at.js": "./node_modules/moment/locale/de-at.js",
  29828. "./de-ch": "./node_modules/moment/locale/de-ch.js",
  29829. "./de-ch.js": "./node_modules/moment/locale/de-ch.js",
  29830. "./de.js": "./node_modules/moment/locale/de.js",
  29831. "./dv": "./node_modules/moment/locale/dv.js",
  29832. "./dv.js": "./node_modules/moment/locale/dv.js",
  29833. "./el": "./node_modules/moment/locale/el.js",
  29834. "./el.js": "./node_modules/moment/locale/el.js",
  29835. "./en-au": "./node_modules/moment/locale/en-au.js",
  29836. "./en-au.js": "./node_modules/moment/locale/en-au.js",
  29837. "./en-ca": "./node_modules/moment/locale/en-ca.js",
  29838. "./en-ca.js": "./node_modules/moment/locale/en-ca.js",
  29839. "./en-gb": "./node_modules/moment/locale/en-gb.js",
  29840. "./en-gb.js": "./node_modules/moment/locale/en-gb.js",
  29841. "./en-ie": "./node_modules/moment/locale/en-ie.js",
  29842. "./en-ie.js": "./node_modules/moment/locale/en-ie.js",
  29843. "./en-nz": "./node_modules/moment/locale/en-nz.js",
  29844. "./en-nz.js": "./node_modules/moment/locale/en-nz.js",
  29845. "./eo": "./node_modules/moment/locale/eo.js",
  29846. "./eo.js": "./node_modules/moment/locale/eo.js",
  29847. "./es": "./node_modules/moment/locale/es.js",
  29848. "./es-do": "./node_modules/moment/locale/es-do.js",
  29849. "./es-do.js": "./node_modules/moment/locale/es-do.js",
  29850. "./es-us": "./node_modules/moment/locale/es-us.js",
  29851. "./es-us.js": "./node_modules/moment/locale/es-us.js",
  29852. "./es.js": "./node_modules/moment/locale/es.js",
  29853. "./et": "./node_modules/moment/locale/et.js",
  29854. "./et.js": "./node_modules/moment/locale/et.js",
  29855. "./eu": "./node_modules/moment/locale/eu.js",
  29856. "./eu.js": "./node_modules/moment/locale/eu.js",
  29857. "./fa": "./node_modules/moment/locale/fa.js",
  29858. "./fa.js": "./node_modules/moment/locale/fa.js",
  29859. "./fi": "./node_modules/moment/locale/fi.js",
  29860. "./fi.js": "./node_modules/moment/locale/fi.js",
  29861. "./fo": "./node_modules/moment/locale/fo.js",
  29862. "./fo.js": "./node_modules/moment/locale/fo.js",
  29863. "./fr": "./node_modules/moment/locale/fr.js",
  29864. "./fr-ca": "./node_modules/moment/locale/fr-ca.js",
  29865. "./fr-ca.js": "./node_modules/moment/locale/fr-ca.js",
  29866. "./fr-ch": "./node_modules/moment/locale/fr-ch.js",
  29867. "./fr-ch.js": "./node_modules/moment/locale/fr-ch.js",
  29868. "./fr.js": "./node_modules/moment/locale/fr.js",
  29869. "./fy": "./node_modules/moment/locale/fy.js",
  29870. "./fy.js": "./node_modules/moment/locale/fy.js",
  29871. "./gd": "./node_modules/moment/locale/gd.js",
  29872. "./gd.js": "./node_modules/moment/locale/gd.js",
  29873. "./gl": "./node_modules/moment/locale/gl.js",
  29874. "./gl.js": "./node_modules/moment/locale/gl.js",
  29875. "./gom-latn": "./node_modules/moment/locale/gom-latn.js",
  29876. "./gom-latn.js": "./node_modules/moment/locale/gom-latn.js",
  29877. "./gu": "./node_modules/moment/locale/gu.js",
  29878. "./gu.js": "./node_modules/moment/locale/gu.js",
  29879. "./he": "./node_modules/moment/locale/he.js",
  29880. "./he.js": "./node_modules/moment/locale/he.js",
  29881. "./hi": "./node_modules/moment/locale/hi.js",
  29882. "./hi.js": "./node_modules/moment/locale/hi.js",
  29883. "./hr": "./node_modules/moment/locale/hr.js",
  29884. "./hr.js": "./node_modules/moment/locale/hr.js",
  29885. "./hu": "./node_modules/moment/locale/hu.js",
  29886. "./hu.js": "./node_modules/moment/locale/hu.js",
  29887. "./hy-am": "./node_modules/moment/locale/hy-am.js",
  29888. "./hy-am.js": "./node_modules/moment/locale/hy-am.js",
  29889. "./id": "./node_modules/moment/locale/id.js",
  29890. "./id.js": "./node_modules/moment/locale/id.js",
  29891. "./is": "./node_modules/moment/locale/is.js",
  29892. "./is.js": "./node_modules/moment/locale/is.js",
  29893. "./it": "./node_modules/moment/locale/it.js",
  29894. "./it.js": "./node_modules/moment/locale/it.js",
  29895. "./ja": "./node_modules/moment/locale/ja.js",
  29896. "./ja.js": "./node_modules/moment/locale/ja.js",
  29897. "./jv": "./node_modules/moment/locale/jv.js",
  29898. "./jv.js": "./node_modules/moment/locale/jv.js",
  29899. "./ka": "./node_modules/moment/locale/ka.js",
  29900. "./ka.js": "./node_modules/moment/locale/ka.js",
  29901. "./kk": "./node_modules/moment/locale/kk.js",
  29902. "./kk.js": "./node_modules/moment/locale/kk.js",
  29903. "./km": "./node_modules/moment/locale/km.js",
  29904. "./km.js": "./node_modules/moment/locale/km.js",
  29905. "./kn": "./node_modules/moment/locale/kn.js",
  29906. "./kn.js": "./node_modules/moment/locale/kn.js",
  29907. "./ko": "./node_modules/moment/locale/ko.js",
  29908. "./ko.js": "./node_modules/moment/locale/ko.js",
  29909. "./ky": "./node_modules/moment/locale/ky.js",
  29910. "./ky.js": "./node_modules/moment/locale/ky.js",
  29911. "./lb": "./node_modules/moment/locale/lb.js",
  29912. "./lb.js": "./node_modules/moment/locale/lb.js",
  29913. "./lo": "./node_modules/moment/locale/lo.js",
  29914. "./lo.js": "./node_modules/moment/locale/lo.js",
  29915. "./lt": "./node_modules/moment/locale/lt.js",
  29916. "./lt.js": "./node_modules/moment/locale/lt.js",
  29917. "./lv": "./node_modules/moment/locale/lv.js",
  29918. "./lv.js": "./node_modules/moment/locale/lv.js",
  29919. "./me": "./node_modules/moment/locale/me.js",
  29920. "./me.js": "./node_modules/moment/locale/me.js",
  29921. "./mi": "./node_modules/moment/locale/mi.js",
  29922. "./mi.js": "./node_modules/moment/locale/mi.js",
  29923. "./mk": "./node_modules/moment/locale/mk.js",
  29924. "./mk.js": "./node_modules/moment/locale/mk.js",
  29925. "./ml": "./node_modules/moment/locale/ml.js",
  29926. "./ml.js": "./node_modules/moment/locale/ml.js",
  29927. "./mr": "./node_modules/moment/locale/mr.js",
  29928. "./mr.js": "./node_modules/moment/locale/mr.js",
  29929. "./ms": "./node_modules/moment/locale/ms.js",
  29930. "./ms-my": "./node_modules/moment/locale/ms-my.js",
  29931. "./ms-my.js": "./node_modules/moment/locale/ms-my.js",
  29932. "./ms.js": "./node_modules/moment/locale/ms.js",
  29933. "./my": "./node_modules/moment/locale/my.js",
  29934. "./my.js": "./node_modules/moment/locale/my.js",
  29935. "./nb": "./node_modules/moment/locale/nb.js",
  29936. "./nb.js": "./node_modules/moment/locale/nb.js",
  29937. "./ne": "./node_modules/moment/locale/ne.js",
  29938. "./ne.js": "./node_modules/moment/locale/ne.js",
  29939. "./nl": "./node_modules/moment/locale/nl.js",
  29940. "./nl-be": "./node_modules/moment/locale/nl-be.js",
  29941. "./nl-be.js": "./node_modules/moment/locale/nl-be.js",
  29942. "./nl.js": "./node_modules/moment/locale/nl.js",
  29943. "./nn": "./node_modules/moment/locale/nn.js",
  29944. "./nn.js": "./node_modules/moment/locale/nn.js",
  29945. "./pa-in": "./node_modules/moment/locale/pa-in.js",
  29946. "./pa-in.js": "./node_modules/moment/locale/pa-in.js",
  29947. "./pl": "./node_modules/moment/locale/pl.js",
  29948. "./pl.js": "./node_modules/moment/locale/pl.js",
  29949. "./pt": "./node_modules/moment/locale/pt.js",
  29950. "./pt-br": "./node_modules/moment/locale/pt-br.js",
  29951. "./pt-br.js": "./node_modules/moment/locale/pt-br.js",
  29952. "./pt.js": "./node_modules/moment/locale/pt.js",
  29953. "./ro": "./node_modules/moment/locale/ro.js",
  29954. "./ro.js": "./node_modules/moment/locale/ro.js",
  29955. "./ru": "./node_modules/moment/locale/ru.js",
  29956. "./ru.js": "./node_modules/moment/locale/ru.js",
  29957. "./sd": "./node_modules/moment/locale/sd.js",
  29958. "./sd.js": "./node_modules/moment/locale/sd.js",
  29959. "./se": "./node_modules/moment/locale/se.js",
  29960. "./se.js": "./node_modules/moment/locale/se.js",
  29961. "./si": "./node_modules/moment/locale/si.js",
  29962. "./si.js": "./node_modules/moment/locale/si.js",
  29963. "./sk": "./node_modules/moment/locale/sk.js",
  29964. "./sk.js": "./node_modules/moment/locale/sk.js",
  29965. "./sl": "./node_modules/moment/locale/sl.js",
  29966. "./sl.js": "./node_modules/moment/locale/sl.js",
  29967. "./sq": "./node_modules/moment/locale/sq.js",
  29968. "./sq.js": "./node_modules/moment/locale/sq.js",
  29969. "./sr": "./node_modules/moment/locale/sr.js",
  29970. "./sr-cyrl": "./node_modules/moment/locale/sr-cyrl.js",
  29971. "./sr-cyrl.js": "./node_modules/moment/locale/sr-cyrl.js",
  29972. "./sr.js": "./node_modules/moment/locale/sr.js",
  29973. "./ss": "./node_modules/moment/locale/ss.js",
  29974. "./ss.js": "./node_modules/moment/locale/ss.js",
  29975. "./sv": "./node_modules/moment/locale/sv.js",
  29976. "./sv.js": "./node_modules/moment/locale/sv.js",
  29977. "./sw": "./node_modules/moment/locale/sw.js",
  29978. "./sw.js": "./node_modules/moment/locale/sw.js",
  29979. "./ta": "./node_modules/moment/locale/ta.js",
  29980. "./ta.js": "./node_modules/moment/locale/ta.js",
  29981. "./te": "./node_modules/moment/locale/te.js",
  29982. "./te.js": "./node_modules/moment/locale/te.js",
  29983. "./tet": "./node_modules/moment/locale/tet.js",
  29984. "./tet.js": "./node_modules/moment/locale/tet.js",
  29985. "./th": "./node_modules/moment/locale/th.js",
  29986. "./th.js": "./node_modules/moment/locale/th.js",
  29987. "./tl-ph": "./node_modules/moment/locale/tl-ph.js",
  29988. "./tl-ph.js": "./node_modules/moment/locale/tl-ph.js",
  29989. "./tlh": "./node_modules/moment/locale/tlh.js",
  29990. "./tlh.js": "./node_modules/moment/locale/tlh.js",
  29991. "./tr": "./node_modules/moment/locale/tr.js",
  29992. "./tr.js": "./node_modules/moment/locale/tr.js",
  29993. "./tzl": "./node_modules/moment/locale/tzl.js",
  29994. "./tzl.js": "./node_modules/moment/locale/tzl.js",
  29995. "./tzm": "./node_modules/moment/locale/tzm.js",
  29996. "./tzm-latn": "./node_modules/moment/locale/tzm-latn.js",
  29997. "./tzm-latn.js": "./node_modules/moment/locale/tzm-latn.js",
  29998. "./tzm.js": "./node_modules/moment/locale/tzm.js",
  29999. "./uk": "./node_modules/moment/locale/uk.js",
  30000. "./uk.js": "./node_modules/moment/locale/uk.js",
  30001. "./ur": "./node_modules/moment/locale/ur.js",
  30002. "./ur.js": "./node_modules/moment/locale/ur.js",
  30003. "./uz": "./node_modules/moment/locale/uz.js",
  30004. "./uz-latn": "./node_modules/moment/locale/uz-latn.js",
  30005. "./uz-latn.js": "./node_modules/moment/locale/uz-latn.js",
  30006. "./uz.js": "./node_modules/moment/locale/uz.js",
  30007. "./vi": "./node_modules/moment/locale/vi.js",
  30008. "./vi.js": "./node_modules/moment/locale/vi.js",
  30009. "./x-pseudo": "./node_modules/moment/locale/x-pseudo.js",
  30010. "./x-pseudo.js": "./node_modules/moment/locale/x-pseudo.js",
  30011. "./yo": "./node_modules/moment/locale/yo.js",
  30012. "./yo.js": "./node_modules/moment/locale/yo.js",
  30013. "./zh-cn": "./node_modules/moment/locale/zh-cn.js",
  30014. "./zh-cn.js": "./node_modules/moment/locale/zh-cn.js",
  30015. "./zh-hk": "./node_modules/moment/locale/zh-hk.js",
  30016. "./zh-hk.js": "./node_modules/moment/locale/zh-hk.js",
  30017. "./zh-tw": "./node_modules/moment/locale/zh-tw.js",
  30018. "./zh-tw.js": "./node_modules/moment/locale/zh-tw.js"
  30019. };
  30020. function webpackContext(req) {
  30021. var id = webpackContextResolve(req);
  30022. return __webpack_require__(id);
  30023. }
  30024. function webpackContextResolve(req) {
  30025. var id = map[req];
  30026. if(!(id + 1)) { // check for number or string
  30027. var e = new Error("Cannot find module '" + req + "'");
  30028. e.code = 'MODULE_NOT_FOUND';
  30029. throw e;
  30030. }
  30031. return id;
  30032. }
  30033. webpackContext.keys = function webpackContextKeys() {
  30034. return Object.keys(map);
  30035. };
  30036. webpackContext.resolve = webpackContextResolve;
  30037. module.exports = webpackContext;
  30038. webpackContext.id = "./node_modules/moment/locale sync recursive ^\\.\\/.*$";
  30039. /***/ }),
  30040. /***/ "./node_modules/moment/locale/af.js":
  30041. /*!******************************************!*\
  30042. !*** ./node_modules/moment/locale/af.js ***!
  30043. \******************************************/
  30044. /*! no static exports found */
  30045. /***/ (function(module, exports, __webpack_require__) {
  30046. //! moment.js locale configuration
  30047. //! locale : Afrikaans [af]
  30048. //! author : Werner Mollentze : https://github.com/wernerm
  30049. ;(function (global, factory) {
  30050. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  30051. undefined
  30052. }(this, (function (moment) { 'use strict';
  30053. var af = moment.defineLocale('af', {
  30054. months : 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'),
  30055. monthsShort : 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),
  30056. weekdays : 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'),
  30057. weekdaysShort : 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),
  30058. weekdaysMin : 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),
  30059. meridiemParse: /vm|nm/i,
  30060. isPM : function (input) {
  30061. return /^nm$/i.test(input);
  30062. },
  30063. meridiem : function (hours, minutes, isLower) {
  30064. if (hours < 12) {
  30065. return isLower ? 'vm' : 'VM';
  30066. } else {
  30067. return isLower ? 'nm' : 'NM';
  30068. }
  30069. },
  30070. longDateFormat : {
  30071. LT : 'HH:mm',
  30072. LTS : 'HH:mm:ss',
  30073. L : 'DD/MM/YYYY',
  30074. LL : 'D MMMM YYYY',
  30075. LLL : 'D MMMM YYYY HH:mm',
  30076. LLLL : 'dddd, D MMMM YYYY HH:mm'
  30077. },
  30078. calendar : {
  30079. sameDay : '[Vandag om] LT',
  30080. nextDay : '[Môre om] LT',
  30081. nextWeek : 'dddd [om] LT',
  30082. lastDay : '[Gister om] LT',
  30083. lastWeek : '[Laas] dddd [om] LT',
  30084. sameElse : 'L'
  30085. },
  30086. relativeTime : {
  30087. future : 'oor %s',
  30088. past : '%s gelede',
  30089. s : '\'n paar sekondes',
  30090. m : '\'n minuut',
  30091. mm : '%d minute',
  30092. h : '\'n uur',
  30093. hh : '%d ure',
  30094. d : '\'n dag',
  30095. dd : '%d dae',
  30096. M : '\'n maand',
  30097. MM : '%d maande',
  30098. y : '\'n jaar',
  30099. yy : '%d jaar'
  30100. },
  30101. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  30102. ordinal : function (number) {
  30103. return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter
  30104. },
  30105. week : {
  30106. dow : 1, // Maandag is die eerste dag van die week.
  30107. doy : 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
  30108. }
  30109. });
  30110. return af;
  30111. })));
  30112. /***/ }),
  30113. /***/ "./node_modules/moment/locale/ar-dz.js":
  30114. /*!*********************************************!*\
  30115. !*** ./node_modules/moment/locale/ar-dz.js ***!
  30116. \*********************************************/
  30117. /*! no static exports found */
  30118. /***/ (function(module, exports, __webpack_require__) {
  30119. //! moment.js locale configuration
  30120. //! locale : Arabic (Algeria) [ar-dz]
  30121. //! author : Noureddine LOUAHEDJ : https://github.com/noureddineme
  30122. ;(function (global, factory) {
  30123. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  30124. undefined
  30125. }(this, (function (moment) { 'use strict';
  30126. var arDz = moment.defineLocale('ar-dz', {
  30127. months : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
  30128. monthsShort : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
  30129. weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  30130. weekdaysShort : 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
  30131. weekdaysMin : 'أح_إث_ثلا_أر_خم_جم_سب'.split('_'),
  30132. weekdaysParseExact : true,
  30133. longDateFormat : {
  30134. LT : 'HH:mm',
  30135. LTS : 'HH:mm:ss',
  30136. L : 'DD/MM/YYYY',
  30137. LL : 'D MMMM YYYY',
  30138. LLL : 'D MMMM YYYY HH:mm',
  30139. LLLL : 'dddd D MMMM YYYY HH:mm'
  30140. },
  30141. calendar : {
  30142. sameDay: '[اليوم على الساعة] LT',
  30143. nextDay: '[غدا على الساعة] LT',
  30144. nextWeek: 'dddd [على الساعة] LT',
  30145. lastDay: '[أمس على الساعة] LT',
  30146. lastWeek: 'dddd [على الساعة] LT',
  30147. sameElse: 'L'
  30148. },
  30149. relativeTime : {
  30150. future : 'في %s',
  30151. past : 'منذ %s',
  30152. s : 'ثوان',
  30153. m : 'دقيقة',
  30154. mm : '%d دقائق',
  30155. h : 'ساعة',
  30156. hh : '%d ساعات',
  30157. d : 'يوم',
  30158. dd : '%d أيام',
  30159. M : 'شهر',
  30160. MM : '%d أشهر',
  30161. y : 'سنة',
  30162. yy : '%d سنوات'
  30163. },
  30164. week : {
  30165. dow : 0, // Sunday is the first day of the week.
  30166. doy : 4 // The week that contains Jan 1st is the first week of the year.
  30167. }
  30168. });
  30169. return arDz;
  30170. })));
  30171. /***/ }),
  30172. /***/ "./node_modules/moment/locale/ar-kw.js":
  30173. /*!*********************************************!*\
  30174. !*** ./node_modules/moment/locale/ar-kw.js ***!
  30175. \*********************************************/
  30176. /*! no static exports found */
  30177. /***/ (function(module, exports, __webpack_require__) {
  30178. //! moment.js locale configuration
  30179. //! locale : Arabic (Kuwait) [ar-kw]
  30180. //! author : Nusret Parlak: https://github.com/nusretparlak
  30181. ;(function (global, factory) {
  30182. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  30183. undefined
  30184. }(this, (function (moment) { 'use strict';
  30185. var arKw = moment.defineLocale('ar-kw', {
  30186. months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
  30187. monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
  30188. weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  30189. weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
  30190. weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  30191. weekdaysParseExact : true,
  30192. longDateFormat : {
  30193. LT : 'HH:mm',
  30194. LTS : 'HH:mm:ss',
  30195. L : 'DD/MM/YYYY',
  30196. LL : 'D MMMM YYYY',
  30197. LLL : 'D MMMM YYYY HH:mm',
  30198. LLLL : 'dddd D MMMM YYYY HH:mm'
  30199. },
  30200. calendar : {
  30201. sameDay: '[اليوم على الساعة] LT',
  30202. nextDay: '[غدا على الساعة] LT',
  30203. nextWeek: 'dddd [على الساعة] LT',
  30204. lastDay: '[أمس على الساعة] LT',
  30205. lastWeek: 'dddd [على الساعة] LT',
  30206. sameElse: 'L'
  30207. },
  30208. relativeTime : {
  30209. future : 'في %s',
  30210. past : 'منذ %s',
  30211. s : 'ثوان',
  30212. m : 'دقيقة',
  30213. mm : '%d دقائق',
  30214. h : 'ساعة',
  30215. hh : '%d ساعات',
  30216. d : 'يوم',
  30217. dd : '%d أيام',
  30218. M : 'شهر',
  30219. MM : '%d أشهر',
  30220. y : 'سنة',
  30221. yy : '%d سنوات'
  30222. },
  30223. week : {
  30224. dow : 0, // Sunday is the first day of the week.
  30225. doy : 12 // The week that contains Jan 1st is the first week of the year.
  30226. }
  30227. });
  30228. return arKw;
  30229. })));
  30230. /***/ }),
  30231. /***/ "./node_modules/moment/locale/ar-ly.js":
  30232. /*!*********************************************!*\
  30233. !*** ./node_modules/moment/locale/ar-ly.js ***!
  30234. \*********************************************/
  30235. /*! no static exports found */
  30236. /***/ (function(module, exports, __webpack_require__) {
  30237. //! moment.js locale configuration
  30238. //! locale : Arabic (Lybia) [ar-ly]
  30239. //! author : Ali Hmer: https://github.com/kikoanis
  30240. ;(function (global, factory) {
  30241. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  30242. undefined
  30243. }(this, (function (moment) { 'use strict';
  30244. var symbolMap = {
  30245. '1': '1',
  30246. '2': '2',
  30247. '3': '3',
  30248. '4': '4',
  30249. '5': '5',
  30250. '6': '6',
  30251. '7': '7',
  30252. '8': '8',
  30253. '9': '9',
  30254. '0': '0'
  30255. };
  30256. var pluralForm = function (n) {
  30257. return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;
  30258. };
  30259. var plurals = {
  30260. s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],
  30261. m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],
  30262. h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],
  30263. d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],
  30264. M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],
  30265. y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']
  30266. };
  30267. var pluralize = function (u) {
  30268. return function (number, withoutSuffix, string, isFuture) {
  30269. var f = pluralForm(number),
  30270. str = plurals[u][pluralForm(number)];
  30271. if (f === 2) {
  30272. str = str[withoutSuffix ? 0 : 1];
  30273. }
  30274. return str.replace(/%d/i, number);
  30275. };
  30276. };
  30277. var months = [
  30278. 'يناير',
  30279. 'فبراير',
  30280. 'مارس',
  30281. 'أبريل',
  30282. 'مايو',
  30283. 'يونيو',
  30284. 'يوليو',
  30285. 'أغسطس',
  30286. 'سبتمبر',
  30287. 'أكتوبر',
  30288. 'نوفمبر',
  30289. 'ديسمبر'
  30290. ];
  30291. var arLy = moment.defineLocale('ar-ly', {
  30292. months : months,
  30293. monthsShort : months,
  30294. weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  30295. weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  30296. weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  30297. weekdaysParseExact : true,
  30298. longDateFormat : {
  30299. LT : 'HH:mm',
  30300. LTS : 'HH:mm:ss',
  30301. L : 'D/\u200FM/\u200FYYYY',
  30302. LL : 'D MMMM YYYY',
  30303. LLL : 'D MMMM YYYY HH:mm',
  30304. LLLL : 'dddd D MMMM YYYY HH:mm'
  30305. },
  30306. meridiemParse: /ص|م/,
  30307. isPM : function (input) {
  30308. return 'م' === input;
  30309. },
  30310. meridiem : function (hour, minute, isLower) {
  30311. if (hour < 12) {
  30312. return 'ص';
  30313. } else {
  30314. return 'م';
  30315. }
  30316. },
  30317. calendar : {
  30318. sameDay: '[اليوم عند الساعة] LT',
  30319. nextDay: '[غدًا عند الساعة] LT',
  30320. nextWeek: 'dddd [عند الساعة] LT',
  30321. lastDay: '[أمس عند الساعة] LT',
  30322. lastWeek: 'dddd [عند الساعة] LT',
  30323. sameElse: 'L'
  30324. },
  30325. relativeTime : {
  30326. future : 'بعد %s',
  30327. past : 'منذ %s',
  30328. s : pluralize('s'),
  30329. m : pluralize('m'),
  30330. mm : pluralize('m'),
  30331. h : pluralize('h'),
  30332. hh : pluralize('h'),
  30333. d : pluralize('d'),
  30334. dd : pluralize('d'),
  30335. M : pluralize('M'),
  30336. MM : pluralize('M'),
  30337. y : pluralize('y'),
  30338. yy : pluralize('y')
  30339. },
  30340. preparse: function (string) {
  30341. return string.replace(/،/g, ',');
  30342. },
  30343. postformat: function (string) {
  30344. return string.replace(/\d/g, function (match) {
  30345. return symbolMap[match];
  30346. }).replace(/,/g, '،');
  30347. },
  30348. week : {
  30349. dow : 6, // Saturday is the first day of the week.
  30350. doy : 12 // The week that contains Jan 1st is the first week of the year.
  30351. }
  30352. });
  30353. return arLy;
  30354. })));
  30355. /***/ }),
  30356. /***/ "./node_modules/moment/locale/ar-ma.js":
  30357. /*!*********************************************!*\
  30358. !*** ./node_modules/moment/locale/ar-ma.js ***!
  30359. \*********************************************/
  30360. /*! no static exports found */
  30361. /***/ (function(module, exports, __webpack_require__) {
  30362. //! moment.js locale configuration
  30363. //! locale : Arabic (Morocco) [ar-ma]
  30364. //! author : ElFadili Yassine : https://github.com/ElFadiliY
  30365. //! author : Abdel Said : https://github.com/abdelsaid
  30366. ;(function (global, factory) {
  30367. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  30368. undefined
  30369. }(this, (function (moment) { 'use strict';
  30370. var arMa = moment.defineLocale('ar-ma', {
  30371. months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
  30372. monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'),
  30373. weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  30374. weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),
  30375. weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  30376. weekdaysParseExact : true,
  30377. longDateFormat : {
  30378. LT : 'HH:mm',
  30379. LTS : 'HH:mm:ss',
  30380. L : 'DD/MM/YYYY',
  30381. LL : 'D MMMM YYYY',
  30382. LLL : 'D MMMM YYYY HH:mm',
  30383. LLLL : 'dddd D MMMM YYYY HH:mm'
  30384. },
  30385. calendar : {
  30386. sameDay: '[اليوم على الساعة] LT',
  30387. nextDay: '[غدا على الساعة] LT',
  30388. nextWeek: 'dddd [على الساعة] LT',
  30389. lastDay: '[أمس على الساعة] LT',
  30390. lastWeek: 'dddd [على الساعة] LT',
  30391. sameElse: 'L'
  30392. },
  30393. relativeTime : {
  30394. future : 'في %s',
  30395. past : 'منذ %s',
  30396. s : 'ثوان',
  30397. m : 'دقيقة',
  30398. mm : '%d دقائق',
  30399. h : 'ساعة',
  30400. hh : '%d ساعات',
  30401. d : 'يوم',
  30402. dd : '%d أيام',
  30403. M : 'شهر',
  30404. MM : '%d أشهر',
  30405. y : 'سنة',
  30406. yy : '%d سنوات'
  30407. },
  30408. week : {
  30409. dow : 6, // Saturday is the first day of the week.
  30410. doy : 12 // The week that contains Jan 1st is the first week of the year.
  30411. }
  30412. });
  30413. return arMa;
  30414. })));
  30415. /***/ }),
  30416. /***/ "./node_modules/moment/locale/ar-sa.js":
  30417. /*!*********************************************!*\
  30418. !*** ./node_modules/moment/locale/ar-sa.js ***!
  30419. \*********************************************/
  30420. /*! no static exports found */
  30421. /***/ (function(module, exports, __webpack_require__) {
  30422. //! moment.js locale configuration
  30423. //! locale : Arabic (Saudi Arabia) [ar-sa]
  30424. //! author : Suhail Alkowaileet : https://github.com/xsoh
  30425. ;(function (global, factory) {
  30426. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  30427. undefined
  30428. }(this, (function (moment) { 'use strict';
  30429. var symbolMap = {
  30430. '1': '١',
  30431. '2': '٢',
  30432. '3': '٣',
  30433. '4': '٤',
  30434. '5': '٥',
  30435. '6': '٦',
  30436. '7': '٧',
  30437. '8': '٨',
  30438. '9': '٩',
  30439. '0': '٠'
  30440. };
  30441. var numberMap = {
  30442. '١': '1',
  30443. '٢': '2',
  30444. '٣': '3',
  30445. '٤': '4',
  30446. '٥': '5',
  30447. '٦': '6',
  30448. '٧': '7',
  30449. '٨': '8',
  30450. '٩': '9',
  30451. '٠': '0'
  30452. };
  30453. var arSa = moment.defineLocale('ar-sa', {
  30454. months : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
  30455. monthsShort : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
  30456. weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  30457. weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  30458. weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  30459. weekdaysParseExact : true,
  30460. longDateFormat : {
  30461. LT : 'HH:mm',
  30462. LTS : 'HH:mm:ss',
  30463. L : 'DD/MM/YYYY',
  30464. LL : 'D MMMM YYYY',
  30465. LLL : 'D MMMM YYYY HH:mm',
  30466. LLLL : 'dddd D MMMM YYYY HH:mm'
  30467. },
  30468. meridiemParse: /ص|م/,
  30469. isPM : function (input) {
  30470. return 'م' === input;
  30471. },
  30472. meridiem : function (hour, minute, isLower) {
  30473. if (hour < 12) {
  30474. return 'ص';
  30475. } else {
  30476. return 'م';
  30477. }
  30478. },
  30479. calendar : {
  30480. sameDay: '[اليوم على الساعة] LT',
  30481. nextDay: '[غدا على الساعة] LT',
  30482. nextWeek: 'dddd [على الساعة] LT',
  30483. lastDay: '[أمس على الساعة] LT',
  30484. lastWeek: 'dddd [على الساعة] LT',
  30485. sameElse: 'L'
  30486. },
  30487. relativeTime : {
  30488. future : 'في %s',
  30489. past : 'منذ %s',
  30490. s : 'ثوان',
  30491. m : 'دقيقة',
  30492. mm : '%d دقائق',
  30493. h : 'ساعة',
  30494. hh : '%d ساعات',
  30495. d : 'يوم',
  30496. dd : '%d أيام',
  30497. M : 'شهر',
  30498. MM : '%d أشهر',
  30499. y : 'سنة',
  30500. yy : '%d سنوات'
  30501. },
  30502. preparse: function (string) {
  30503. return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
  30504. return numberMap[match];
  30505. }).replace(/،/g, ',');
  30506. },
  30507. postformat: function (string) {
  30508. return string.replace(/\d/g, function (match) {
  30509. return symbolMap[match];
  30510. }).replace(/,/g, '،');
  30511. },
  30512. week : {
  30513. dow : 0, // Sunday is the first day of the week.
  30514. doy : 6 // The week that contains Jan 1st is the first week of the year.
  30515. }
  30516. });
  30517. return arSa;
  30518. })));
  30519. /***/ }),
  30520. /***/ "./node_modules/moment/locale/ar-tn.js":
  30521. /*!*********************************************!*\
  30522. !*** ./node_modules/moment/locale/ar-tn.js ***!
  30523. \*********************************************/
  30524. /*! no static exports found */
  30525. /***/ (function(module, exports, __webpack_require__) {
  30526. //! moment.js locale configuration
  30527. //! locale : Arabic (Tunisia) [ar-tn]
  30528. //! author : Nader Toukabri : https://github.com/naderio
  30529. ;(function (global, factory) {
  30530. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  30531. undefined
  30532. }(this, (function (moment) { 'use strict';
  30533. var arTn = moment.defineLocale('ar-tn', {
  30534. months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
  30535. monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'),
  30536. weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  30537. weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  30538. weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  30539. weekdaysParseExact : true,
  30540. longDateFormat: {
  30541. LT: 'HH:mm',
  30542. LTS: 'HH:mm:ss',
  30543. L: 'DD/MM/YYYY',
  30544. LL: 'D MMMM YYYY',
  30545. LLL: 'D MMMM YYYY HH:mm',
  30546. LLLL: 'dddd D MMMM YYYY HH:mm'
  30547. },
  30548. calendar: {
  30549. sameDay: '[اليوم على الساعة] LT',
  30550. nextDay: '[غدا على الساعة] LT',
  30551. nextWeek: 'dddd [على الساعة] LT',
  30552. lastDay: '[أمس على الساعة] LT',
  30553. lastWeek: 'dddd [على الساعة] LT',
  30554. sameElse: 'L'
  30555. },
  30556. relativeTime: {
  30557. future: 'في %s',
  30558. past: 'منذ %s',
  30559. s: 'ثوان',
  30560. m: 'دقيقة',
  30561. mm: '%d دقائق',
  30562. h: 'ساعة',
  30563. hh: '%d ساعات',
  30564. d: 'يوم',
  30565. dd: '%d أيام',
  30566. M: 'شهر',
  30567. MM: '%d أشهر',
  30568. y: 'سنة',
  30569. yy: '%d سنوات'
  30570. },
  30571. week: {
  30572. dow: 1, // Monday is the first day of the week.
  30573. doy: 4 // The week that contains Jan 4th is the first week of the year.
  30574. }
  30575. });
  30576. return arTn;
  30577. })));
  30578. /***/ }),
  30579. /***/ "./node_modules/moment/locale/ar.js":
  30580. /*!******************************************!*\
  30581. !*** ./node_modules/moment/locale/ar.js ***!
  30582. \******************************************/
  30583. /*! no static exports found */
  30584. /***/ (function(module, exports, __webpack_require__) {
  30585. //! moment.js locale configuration
  30586. //! locale : Arabic [ar]
  30587. //! author : Abdel Said: https://github.com/abdelsaid
  30588. //! author : Ahmed Elkhatib
  30589. //! author : forabi https://github.com/forabi
  30590. ;(function (global, factory) {
  30591. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  30592. undefined
  30593. }(this, (function (moment) { 'use strict';
  30594. var symbolMap = {
  30595. '1': '١',
  30596. '2': '٢',
  30597. '3': '٣',
  30598. '4': '٤',
  30599. '5': '٥',
  30600. '6': '٦',
  30601. '7': '٧',
  30602. '8': '٨',
  30603. '9': '٩',
  30604. '0': '٠'
  30605. };
  30606. var numberMap = {
  30607. '١': '1',
  30608. '٢': '2',
  30609. '٣': '3',
  30610. '٤': '4',
  30611. '٥': '5',
  30612. '٦': '6',
  30613. '٧': '7',
  30614. '٨': '8',
  30615. '٩': '9',
  30616. '٠': '0'
  30617. };
  30618. var pluralForm = function (n) {
  30619. return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;
  30620. };
  30621. var plurals = {
  30622. s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'],
  30623. m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'],
  30624. h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'],
  30625. d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'],
  30626. M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'],
  30627. y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام']
  30628. };
  30629. var pluralize = function (u) {
  30630. return function (number, withoutSuffix, string, isFuture) {
  30631. var f = pluralForm(number),
  30632. str = plurals[u][pluralForm(number)];
  30633. if (f === 2) {
  30634. str = str[withoutSuffix ? 0 : 1];
  30635. }
  30636. return str.replace(/%d/i, number);
  30637. };
  30638. };
  30639. var months = [
  30640. 'كانون الثاني يناير',
  30641. 'شباط فبراير',
  30642. 'آذار مارس',
  30643. 'نيسان أبريل',
  30644. 'أيار مايو',
  30645. 'حزيران يونيو',
  30646. 'تموز يوليو',
  30647. 'آب أغسطس',
  30648. 'أيلول سبتمبر',
  30649. 'تشرين الأول أكتوبر',
  30650. 'تشرين الثاني نوفمبر',
  30651. 'كانون الأول ديسمبر'
  30652. ];
  30653. var ar = moment.defineLocale('ar', {
  30654. months : months,
  30655. monthsShort : months,
  30656. weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),
  30657. weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),
  30658. weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'),
  30659. weekdaysParseExact : true,
  30660. longDateFormat : {
  30661. LT : 'HH:mm',
  30662. LTS : 'HH:mm:ss',
  30663. L : 'D/\u200FM/\u200FYYYY',
  30664. LL : 'D MMMM YYYY',
  30665. LLL : 'D MMMM YYYY HH:mm',
  30666. LLLL : 'dddd D MMMM YYYY HH:mm'
  30667. },
  30668. meridiemParse: /ص|م/,
  30669. isPM : function (input) {
  30670. return 'م' === input;
  30671. },
  30672. meridiem : function (hour, minute, isLower) {
  30673. if (hour < 12) {
  30674. return 'ص';
  30675. } else {
  30676. return 'م';
  30677. }
  30678. },
  30679. calendar : {
  30680. sameDay: '[اليوم عند الساعة] LT',
  30681. nextDay: '[غدًا عند الساعة] LT',
  30682. nextWeek: 'dddd [عند الساعة] LT',
  30683. lastDay: '[أمس عند الساعة] LT',
  30684. lastWeek: 'dddd [عند الساعة] LT',
  30685. sameElse: 'L'
  30686. },
  30687. relativeTime : {
  30688. future : 'بعد %s',
  30689. past : 'منذ %s',
  30690. s : pluralize('s'),
  30691. m : pluralize('m'),
  30692. mm : pluralize('m'),
  30693. h : pluralize('h'),
  30694. hh : pluralize('h'),
  30695. d : pluralize('d'),
  30696. dd : pluralize('d'),
  30697. M : pluralize('M'),
  30698. MM : pluralize('M'),
  30699. y : pluralize('y'),
  30700. yy : pluralize('y')
  30701. },
  30702. preparse: function (string) {
  30703. return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {
  30704. return numberMap[match];
  30705. }).replace(/،/g, ',');
  30706. },
  30707. postformat: function (string) {
  30708. return string.replace(/\d/g, function (match) {
  30709. return symbolMap[match];
  30710. }).replace(/,/g, '،');
  30711. },
  30712. week : {
  30713. dow : 6, // Saturday is the first day of the week.
  30714. doy : 12 // The week that contains Jan 1st is the first week of the year.
  30715. }
  30716. });
  30717. return ar;
  30718. })));
  30719. /***/ }),
  30720. /***/ "./node_modules/moment/locale/az.js":
  30721. /*!******************************************!*\
  30722. !*** ./node_modules/moment/locale/az.js ***!
  30723. \******************************************/
  30724. /*! no static exports found */
  30725. /***/ (function(module, exports, __webpack_require__) {
  30726. //! moment.js locale configuration
  30727. //! locale : Azerbaijani [az]
  30728. //! author : topchiyev : https://github.com/topchiyev
  30729. ;(function (global, factory) {
  30730. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  30731. undefined
  30732. }(this, (function (moment) { 'use strict';
  30733. var suffixes = {
  30734. 1: '-inci',
  30735. 5: '-inci',
  30736. 8: '-inci',
  30737. 70: '-inci',
  30738. 80: '-inci',
  30739. 2: '-nci',
  30740. 7: '-nci',
  30741. 20: '-nci',
  30742. 50: '-nci',
  30743. 3: '-üncü',
  30744. 4: '-üncü',
  30745. 100: '-üncü',
  30746. 6: '-ncı',
  30747. 9: '-uncu',
  30748. 10: '-uncu',
  30749. 30: '-uncu',
  30750. 60: '-ıncı',
  30751. 90: '-ıncı'
  30752. };
  30753. var az = moment.defineLocale('az', {
  30754. months : 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split('_'),
  30755. monthsShort : 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),
  30756. weekdays : 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split('_'),
  30757. weekdaysShort : 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),
  30758. weekdaysMin : 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),
  30759. weekdaysParseExact : true,
  30760. longDateFormat : {
  30761. LT : 'HH:mm',
  30762. LTS : 'HH:mm:ss',
  30763. L : 'DD.MM.YYYY',
  30764. LL : 'D MMMM YYYY',
  30765. LLL : 'D MMMM YYYY HH:mm',
  30766. LLLL : 'dddd, D MMMM YYYY HH:mm'
  30767. },
  30768. calendar : {
  30769. sameDay : '[bugün saat] LT',
  30770. nextDay : '[sabah saat] LT',
  30771. nextWeek : '[gələn həftə] dddd [saat] LT',
  30772. lastDay : '[dünən] LT',
  30773. lastWeek : '[keçən həftə] dddd [saat] LT',
  30774. sameElse : 'L'
  30775. },
  30776. relativeTime : {
  30777. future : '%s sonra',
  30778. past : '%s əvvəl',
  30779. s : 'birneçə saniyyə',
  30780. m : 'bir dəqiqə',
  30781. mm : '%d dəqiqə',
  30782. h : 'bir saat',
  30783. hh : '%d saat',
  30784. d : 'bir gün',
  30785. dd : '%d gün',
  30786. M : 'bir ay',
  30787. MM : '%d ay',
  30788. y : 'bir il',
  30789. yy : '%d il'
  30790. },
  30791. meridiemParse: /gecə|səhər|gündüz|axşam/,
  30792. isPM : function (input) {
  30793. return /^(gündüz|axşam)$/.test(input);
  30794. },
  30795. meridiem : function (hour, minute, isLower) {
  30796. if (hour < 4) {
  30797. return 'gecə';
  30798. } else if (hour < 12) {
  30799. return 'səhər';
  30800. } else if (hour < 17) {
  30801. return 'gündüz';
  30802. } else {
  30803. return 'axşam';
  30804. }
  30805. },
  30806. dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,
  30807. ordinal : function (number) {
  30808. if (number === 0) { // special case for zero
  30809. return number + '-ıncı';
  30810. }
  30811. var a = number % 10,
  30812. b = number % 100 - a,
  30813. c = number >= 100 ? 100 : null;
  30814. return number + (suffixes[a] || suffixes[b] || suffixes[c]);
  30815. },
  30816. week : {
  30817. dow : 1, // Monday is the first day of the week.
  30818. doy : 7 // The week that contains Jan 1st is the first week of the year.
  30819. }
  30820. });
  30821. return az;
  30822. })));
  30823. /***/ }),
  30824. /***/ "./node_modules/moment/locale/be.js":
  30825. /*!******************************************!*\
  30826. !*** ./node_modules/moment/locale/be.js ***!
  30827. \******************************************/
  30828. /*! no static exports found */
  30829. /***/ (function(module, exports, __webpack_require__) {
  30830. //! moment.js locale configuration
  30831. //! locale : Belarusian [be]
  30832. //! author : Dmitry Demidov : https://github.com/demidov91
  30833. //! author: Praleska: http://praleska.pro/
  30834. //! Author : Menelion Elensúle : https://github.com/Oire
  30835. ;(function (global, factory) {
  30836. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  30837. undefined
  30838. }(this, (function (moment) { 'use strict';
  30839. function plural(word, num) {
  30840. var forms = word.split('_');
  30841. 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]);
  30842. }
  30843. function relativeTimeWithPlural(number, withoutSuffix, key) {
  30844. var format = {
  30845. 'mm': withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',
  30846. 'hh': withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',
  30847. 'dd': 'дзень_дні_дзён',
  30848. 'MM': 'месяц_месяцы_месяцаў',
  30849. 'yy': 'год_гады_гадоў'
  30850. };
  30851. if (key === 'm') {
  30852. return withoutSuffix ? 'хвіліна' : 'хвіліну';
  30853. }
  30854. else if (key === 'h') {
  30855. return withoutSuffix ? 'гадзіна' : 'гадзіну';
  30856. }
  30857. else {
  30858. return number + ' ' + plural(format[key], +number);
  30859. }
  30860. }
  30861. var be = moment.defineLocale('be', {
  30862. months : {
  30863. format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_'),
  30864. standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split('_')
  30865. },
  30866. monthsShort : 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),
  30867. weekdays : {
  30868. format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'),
  30869. standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'),
  30870. isFormat: /\[ ?[Вв] ?(?:мінулую|наступную)? ?\] ?dddd/
  30871. },
  30872. weekdaysShort : 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
  30873. weekdaysMin : 'нд_пн_ат_ср_чц_пт_сб'.split('_'),
  30874. longDateFormat : {
  30875. LT : 'HH:mm',
  30876. LTS : 'HH:mm:ss',
  30877. L : 'DD.MM.YYYY',
  30878. LL : 'D MMMM YYYY г.',
  30879. LLL : 'D MMMM YYYY г., HH:mm',
  30880. LLLL : 'dddd, D MMMM YYYY г., HH:mm'
  30881. },
  30882. calendar : {
  30883. sameDay: '[Сёння ў] LT',
  30884. nextDay: '[Заўтра ў] LT',
  30885. lastDay: '[Учора ў] LT',
  30886. nextWeek: function () {
  30887. return '[У] dddd [ў] LT';
  30888. },
  30889. lastWeek: function () {
  30890. switch (this.day()) {
  30891. case 0:
  30892. case 3:
  30893. case 5:
  30894. case 6:
  30895. return '[У мінулую] dddd [ў] LT';
  30896. case 1:
  30897. case 2:
  30898. case 4:
  30899. return '[У мінулы] dddd [ў] LT';
  30900. }
  30901. },
  30902. sameElse: 'L'
  30903. },
  30904. relativeTime : {
  30905. future : 'праз %s',
  30906. past : '%s таму',
  30907. s : 'некалькі секунд',
  30908. m : relativeTimeWithPlural,
  30909. mm : relativeTimeWithPlural,
  30910. h : relativeTimeWithPlural,
  30911. hh : relativeTimeWithPlural,
  30912. d : 'дзень',
  30913. dd : relativeTimeWithPlural,
  30914. M : 'месяц',
  30915. MM : relativeTimeWithPlural,
  30916. y : 'год',
  30917. yy : relativeTimeWithPlural
  30918. },
  30919. meridiemParse: /ночы|раніцы|дня|вечара/,
  30920. isPM : function (input) {
  30921. return /^(дня|вечара)$/.test(input);
  30922. },
  30923. meridiem : function (hour, minute, isLower) {
  30924. if (hour < 4) {
  30925. return 'ночы';
  30926. } else if (hour < 12) {
  30927. return 'раніцы';
  30928. } else if (hour < 17) {
  30929. return 'дня';
  30930. } else {
  30931. return 'вечара';
  30932. }
  30933. },
  30934. dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/,
  30935. ordinal: function (number, period) {
  30936. switch (period) {
  30937. case 'M':
  30938. case 'd':
  30939. case 'DDD':
  30940. case 'w':
  30941. case 'W':
  30942. return (number % 10 === 2 || number % 10 === 3) && (number % 100 !== 12 && number % 100 !== 13) ? number + '-і' : number + '-ы';
  30943. case 'D':
  30944. return number + '-га';
  30945. default:
  30946. return number;
  30947. }
  30948. },
  30949. week : {
  30950. dow : 1, // Monday is the first day of the week.
  30951. doy : 7 // The week that contains Jan 1st is the first week of the year.
  30952. }
  30953. });
  30954. return be;
  30955. })));
  30956. /***/ }),
  30957. /***/ "./node_modules/moment/locale/bg.js":
  30958. /*!******************************************!*\
  30959. !*** ./node_modules/moment/locale/bg.js ***!
  30960. \******************************************/
  30961. /*! no static exports found */
  30962. /***/ (function(module, exports, __webpack_require__) {
  30963. //! moment.js locale configuration
  30964. //! locale : Bulgarian [bg]
  30965. //! author : Krasen Borisov : https://github.com/kraz
  30966. ;(function (global, factory) {
  30967. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  30968. undefined
  30969. }(this, (function (moment) { 'use strict';
  30970. var bg = moment.defineLocale('bg', {
  30971. months : 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'),
  30972. monthsShort : 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
  30973. weekdays : 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'),
  30974. weekdaysShort : 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
  30975. weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  30976. longDateFormat : {
  30977. LT : 'H:mm',
  30978. LTS : 'H:mm:ss',
  30979. L : 'D.MM.YYYY',
  30980. LL : 'D MMMM YYYY',
  30981. LLL : 'D MMMM YYYY H:mm',
  30982. LLLL : 'dddd, D MMMM YYYY H:mm'
  30983. },
  30984. calendar : {
  30985. sameDay : '[Днес в] LT',
  30986. nextDay : '[Утре в] LT',
  30987. nextWeek : 'dddd [в] LT',
  30988. lastDay : '[Вчера в] LT',
  30989. lastWeek : function () {
  30990. switch (this.day()) {
  30991. case 0:
  30992. case 3:
  30993. case 6:
  30994. return '[В изминалата] dddd [в] LT';
  30995. case 1:
  30996. case 2:
  30997. case 4:
  30998. case 5:
  30999. return '[В изминалия] dddd [в] LT';
  31000. }
  31001. },
  31002. sameElse : 'L'
  31003. },
  31004. relativeTime : {
  31005. future : 'след %s',
  31006. past : 'преди %s',
  31007. s : 'няколко секунди',
  31008. m : 'минута',
  31009. mm : '%d минути',
  31010. h : 'час',
  31011. hh : '%d часа',
  31012. d : 'ден',
  31013. dd : '%d дни',
  31014. M : 'месец',
  31015. MM : '%d месеца',
  31016. y : 'година',
  31017. yy : '%d години'
  31018. },
  31019. dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
  31020. ordinal : function (number) {
  31021. var lastDigit = number % 10,
  31022. last2Digits = number % 100;
  31023. if (number === 0) {
  31024. return number + '-ев';
  31025. } else if (last2Digits === 0) {
  31026. return number + '-ен';
  31027. } else if (last2Digits > 10 && last2Digits < 20) {
  31028. return number + '-ти';
  31029. } else if (lastDigit === 1) {
  31030. return number + '-ви';
  31031. } else if (lastDigit === 2) {
  31032. return number + '-ри';
  31033. } else if (lastDigit === 7 || lastDigit === 8) {
  31034. return number + '-ми';
  31035. } else {
  31036. return number + '-ти';
  31037. }
  31038. },
  31039. week : {
  31040. dow : 1, // Monday is the first day of the week.
  31041. doy : 7 // The week that contains Jan 1st is the first week of the year.
  31042. }
  31043. });
  31044. return bg;
  31045. })));
  31046. /***/ }),
  31047. /***/ "./node_modules/moment/locale/bm.js":
  31048. /*!******************************************!*\
  31049. !*** ./node_modules/moment/locale/bm.js ***!
  31050. \******************************************/
  31051. /*! no static exports found */
  31052. /***/ (function(module, exports, __webpack_require__) {
  31053. //! moment.js locale configuration
  31054. //! locale : Bambara [bm]
  31055. //! author : Estelle Comment : https://github.com/estellecomment
  31056. ;(function (global, factory) {
  31057. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  31058. undefined
  31059. }(this, (function (moment) { 'use strict';
  31060. // Language contact person : Abdoufata Kane : https://github.com/abdoufata
  31061. var bm = moment.defineLocale('bm', {
  31062. months : 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split('_'),
  31063. monthsShort : 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),
  31064. weekdays : 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),
  31065. weekdaysShort : 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),
  31066. weekdaysMin : 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),
  31067. longDateFormat : {
  31068. LT : 'HH:mm',
  31069. LTS : 'HH:mm:ss',
  31070. L : 'DD/MM/YYYY',
  31071. LL : 'MMMM [tile] D [san] YYYY',
  31072. LLL : 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',
  31073. LLLL : 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm'
  31074. },
  31075. calendar : {
  31076. sameDay : '[Bi lɛrɛ] LT',
  31077. nextDay : '[Sini lɛrɛ] LT',
  31078. nextWeek : 'dddd [don lɛrɛ] LT',
  31079. lastDay : '[Kunu lɛrɛ] LT',
  31080. lastWeek : 'dddd [tɛmɛnen lɛrɛ] LT',
  31081. sameElse : 'L'
  31082. },
  31083. relativeTime : {
  31084. future : '%s kɔnɔ',
  31085. past : 'a bɛ %s bɔ',
  31086. s : 'sanga dama dama',
  31087. m : 'miniti kelen',
  31088. mm : 'miniti %d',
  31089. h : 'lɛrɛ kelen',
  31090. hh : 'lɛrɛ %d',
  31091. d : 'tile kelen',
  31092. dd : 'tile %d',
  31093. M : 'kalo kelen',
  31094. MM : 'kalo %d',
  31095. y : 'san kelen',
  31096. yy : 'san %d'
  31097. },
  31098. week : {
  31099. dow : 1, // Monday is the first day of the week.
  31100. doy : 4 // The week that contains Jan 4th is the first week of the year.
  31101. }
  31102. });
  31103. return bm;
  31104. })));
  31105. /***/ }),
  31106. /***/ "./node_modules/moment/locale/bn.js":
  31107. /*!******************************************!*\
  31108. !*** ./node_modules/moment/locale/bn.js ***!
  31109. \******************************************/
  31110. /*! no static exports found */
  31111. /***/ (function(module, exports, __webpack_require__) {
  31112. //! moment.js locale configuration
  31113. //! locale : Bengali [bn]
  31114. //! author : Kaushik Gandhi : https://github.com/kaushikgandhi
  31115. ;(function (global, factory) {
  31116. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  31117. undefined
  31118. }(this, (function (moment) { 'use strict';
  31119. var symbolMap = {
  31120. '1': '১',
  31121. '2': '২',
  31122. '3': '৩',
  31123. '4': '৪',
  31124. '5': '৫',
  31125. '6': '৬',
  31126. '7': '৭',
  31127. '8': '৮',
  31128. '9': '৯',
  31129. '0': '০'
  31130. };
  31131. var numberMap = {
  31132. '১': '1',
  31133. '২': '2',
  31134. '৩': '3',
  31135. '৪': '4',
  31136. '৫': '5',
  31137. '৬': '6',
  31138. '৭': '7',
  31139. '৮': '8',
  31140. '৯': '9',
  31141. '০': '0'
  31142. };
  31143. var bn = moment.defineLocale('bn', {
  31144. months : 'জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'),
  31145. monthsShort : 'জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'),
  31146. weekdays : 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'),
  31147. weekdaysShort : 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
  31148. weekdaysMin : 'রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি'.split('_'),
  31149. longDateFormat : {
  31150. LT : 'A h:mm সময়',
  31151. LTS : 'A h:mm:ss সময়',
  31152. L : 'DD/MM/YYYY',
  31153. LL : 'D MMMM YYYY',
  31154. LLL : 'D MMMM YYYY, A h:mm সময়',
  31155. LLLL : 'dddd, D MMMM YYYY, A h:mm সময়'
  31156. },
  31157. calendar : {
  31158. sameDay : '[আজ] LT',
  31159. nextDay : '[আগামীকাল] LT',
  31160. nextWeek : 'dddd, LT',
  31161. lastDay : '[গতকাল] LT',
  31162. lastWeek : '[গত] dddd, LT',
  31163. sameElse : 'L'
  31164. },
  31165. relativeTime : {
  31166. future : '%s পরে',
  31167. past : '%s আগে',
  31168. s : 'কয়েক সেকেন্ড',
  31169. m : 'এক মিনিট',
  31170. mm : '%d মিনিট',
  31171. h : 'এক ঘন্টা',
  31172. hh : '%d ঘন্টা',
  31173. d : 'এক দিন',
  31174. dd : '%d দিন',
  31175. M : 'এক মাস',
  31176. MM : '%d মাস',
  31177. y : 'এক বছর',
  31178. yy : '%d বছর'
  31179. },
  31180. preparse: function (string) {
  31181. return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {
  31182. return numberMap[match];
  31183. });
  31184. },
  31185. postformat: function (string) {
  31186. return string.replace(/\d/g, function (match) {
  31187. return symbolMap[match];
  31188. });
  31189. },
  31190. meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,
  31191. meridiemHour : function (hour, meridiem) {
  31192. if (hour === 12) {
  31193. hour = 0;
  31194. }
  31195. if ((meridiem === 'রাত' && hour >= 4) ||
  31196. (meridiem === 'দুপুর' && hour < 5) ||
  31197. meridiem === 'বিকাল') {
  31198. return hour + 12;
  31199. } else {
  31200. return hour;
  31201. }
  31202. },
  31203. meridiem : function (hour, minute, isLower) {
  31204. if (hour < 4) {
  31205. return 'রাত';
  31206. } else if (hour < 10) {
  31207. return 'সকাল';
  31208. } else if (hour < 17) {
  31209. return 'দুপুর';
  31210. } else if (hour < 20) {
  31211. return 'বিকাল';
  31212. } else {
  31213. return 'রাত';
  31214. }
  31215. },
  31216. week : {
  31217. dow : 0, // Sunday is the first day of the week.
  31218. doy : 6 // The week that contains Jan 1st is the first week of the year.
  31219. }
  31220. });
  31221. return bn;
  31222. })));
  31223. /***/ }),
  31224. /***/ "./node_modules/moment/locale/bo.js":
  31225. /*!******************************************!*\
  31226. !*** ./node_modules/moment/locale/bo.js ***!
  31227. \******************************************/
  31228. /*! no static exports found */
  31229. /***/ (function(module, exports, __webpack_require__) {
  31230. //! moment.js locale configuration
  31231. //! locale : Tibetan [bo]
  31232. //! author : Thupten N. Chakrishar : https://github.com/vajradog
  31233. ;(function (global, factory) {
  31234. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  31235. undefined
  31236. }(this, (function (moment) { 'use strict';
  31237. var symbolMap = {
  31238. '1': '༡',
  31239. '2': '༢',
  31240. '3': '༣',
  31241. '4': '༤',
  31242. '5': '༥',
  31243. '6': '༦',
  31244. '7': '༧',
  31245. '8': '༨',
  31246. '9': '༩',
  31247. '0': '༠'
  31248. };
  31249. var numberMap = {
  31250. '༡': '1',
  31251. '༢': '2',
  31252. '༣': '3',
  31253. '༤': '4',
  31254. '༥': '5',
  31255. '༦': '6',
  31256. '༧': '7',
  31257. '༨': '8',
  31258. '༩': '9',
  31259. '༠': '0'
  31260. };
  31261. var bo = moment.defineLocale('bo', {
  31262. months : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),
  31263. monthsShort : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'),
  31264. weekdays : 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split('_'),
  31265. weekdaysShort : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),
  31266. weekdaysMin : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'),
  31267. longDateFormat : {
  31268. LT : 'A h:mm',
  31269. LTS : 'A h:mm:ss',
  31270. L : 'DD/MM/YYYY',
  31271. LL : 'D MMMM YYYY',
  31272. LLL : 'D MMMM YYYY, A h:mm',
  31273. LLLL : 'dddd, D MMMM YYYY, A h:mm'
  31274. },
  31275. calendar : {
  31276. sameDay : '[དི་རིང] LT',
  31277. nextDay : '[སང་ཉིན] LT',
  31278. nextWeek : '[བདུན་ཕྲག་རྗེས་མ], LT',
  31279. lastDay : '[ཁ་སང] LT',
  31280. lastWeek : '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',
  31281. sameElse : 'L'
  31282. },
  31283. relativeTime : {
  31284. future : '%s ལ་',
  31285. past : '%s སྔན་ལ',
  31286. s : 'ལམ་སང',
  31287. m : 'སྐར་མ་གཅིག',
  31288. mm : '%d སྐར་མ',
  31289. h : 'ཆུ་ཚོད་གཅིག',
  31290. hh : '%d ཆུ་ཚོད',
  31291. d : 'ཉིན་གཅིག',
  31292. dd : '%d ཉིན་',
  31293. M : 'ཟླ་བ་གཅིག',
  31294. MM : '%d ཟླ་བ',
  31295. y : 'ལོ་གཅིག',
  31296. yy : '%d ལོ'
  31297. },
  31298. preparse: function (string) {
  31299. return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {
  31300. return numberMap[match];
  31301. });
  31302. },
  31303. postformat: function (string) {
  31304. return string.replace(/\d/g, function (match) {
  31305. return symbolMap[match];
  31306. });
  31307. },
  31308. meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,
  31309. meridiemHour : function (hour, meridiem) {
  31310. if (hour === 12) {
  31311. hour = 0;
  31312. }
  31313. if ((meridiem === 'མཚན་མོ' && hour >= 4) ||
  31314. (meridiem === 'ཉིན་གུང' && hour < 5) ||
  31315. meridiem === 'དགོང་དག') {
  31316. return hour + 12;
  31317. } else {
  31318. return hour;
  31319. }
  31320. },
  31321. meridiem : function (hour, minute, isLower) {
  31322. if (hour < 4) {
  31323. return 'མཚན་མོ';
  31324. } else if (hour < 10) {
  31325. return 'ཞོགས་ཀས';
  31326. } else if (hour < 17) {
  31327. return 'ཉིན་གུང';
  31328. } else if (hour < 20) {
  31329. return 'དགོང་དག';
  31330. } else {
  31331. return 'མཚན་མོ';
  31332. }
  31333. },
  31334. week : {
  31335. dow : 0, // Sunday is the first day of the week.
  31336. doy : 6 // The week that contains Jan 1st is the first week of the year.
  31337. }
  31338. });
  31339. return bo;
  31340. })));
  31341. /***/ }),
  31342. /***/ "./node_modules/moment/locale/br.js":
  31343. /*!******************************************!*\
  31344. !*** ./node_modules/moment/locale/br.js ***!
  31345. \******************************************/
  31346. /*! no static exports found */
  31347. /***/ (function(module, exports, __webpack_require__) {
  31348. //! moment.js locale configuration
  31349. //! locale : Breton [br]
  31350. //! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou
  31351. ;(function (global, factory) {
  31352. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  31353. undefined
  31354. }(this, (function (moment) { 'use strict';
  31355. function relativeTimeWithMutation(number, withoutSuffix, key) {
  31356. var format = {
  31357. 'mm': 'munutenn',
  31358. 'MM': 'miz',
  31359. 'dd': 'devezh'
  31360. };
  31361. return number + ' ' + mutation(format[key], number);
  31362. }
  31363. function specialMutationForYears(number) {
  31364. switch (lastNumber(number)) {
  31365. case 1:
  31366. case 3:
  31367. case 4:
  31368. case 5:
  31369. case 9:
  31370. return number + ' bloaz';
  31371. default:
  31372. return number + ' vloaz';
  31373. }
  31374. }
  31375. function lastNumber(number) {
  31376. if (number > 9) {
  31377. return lastNumber(number % 10);
  31378. }
  31379. return number;
  31380. }
  31381. function mutation(text, number) {
  31382. if (number === 2) {
  31383. return softMutation(text);
  31384. }
  31385. return text;
  31386. }
  31387. function softMutation(text) {
  31388. var mutationTable = {
  31389. 'm': 'v',
  31390. 'b': 'v',
  31391. 'd': 'z'
  31392. };
  31393. if (mutationTable[text.charAt(0)] === undefined) {
  31394. return text;
  31395. }
  31396. return mutationTable[text.charAt(0)] + text.substring(1);
  31397. }
  31398. var br = moment.defineLocale('br', {
  31399. months : 'Genver_C\'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'),
  31400. monthsShort : 'Gen_C\'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),
  31401. weekdays : 'Sul_Lun_Meurzh_Merc\'her_Yaou_Gwener_Sadorn'.split('_'),
  31402. weekdaysShort : 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),
  31403. weekdaysMin : 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),
  31404. weekdaysParseExact : true,
  31405. longDateFormat : {
  31406. LT : 'h[e]mm A',
  31407. LTS : 'h[e]mm:ss A',
  31408. L : 'DD/MM/YYYY',
  31409. LL : 'D [a viz] MMMM YYYY',
  31410. LLL : 'D [a viz] MMMM YYYY h[e]mm A',
  31411. LLLL : 'dddd, D [a viz] MMMM YYYY h[e]mm A'
  31412. },
  31413. calendar : {
  31414. sameDay : '[Hiziv da] LT',
  31415. nextDay : '[Warc\'hoazh da] LT',
  31416. nextWeek : 'dddd [da] LT',
  31417. lastDay : '[Dec\'h da] LT',
  31418. lastWeek : 'dddd [paset da] LT',
  31419. sameElse : 'L'
  31420. },
  31421. relativeTime : {
  31422. future : 'a-benn %s',
  31423. past : '%s \'zo',
  31424. s : 'un nebeud segondennoù',
  31425. m : 'ur vunutenn',
  31426. mm : relativeTimeWithMutation,
  31427. h : 'un eur',
  31428. hh : '%d eur',
  31429. d : 'un devezh',
  31430. dd : relativeTimeWithMutation,
  31431. M : 'ur miz',
  31432. MM : relativeTimeWithMutation,
  31433. y : 'ur bloaz',
  31434. yy : specialMutationForYears
  31435. },
  31436. dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/,
  31437. ordinal : function (number) {
  31438. var output = (number === 1) ? 'añ' : 'vet';
  31439. return number + output;
  31440. },
  31441. week : {
  31442. dow : 1, // Monday is the first day of the week.
  31443. doy : 4 // The week that contains Jan 4th is the first week of the year.
  31444. }
  31445. });
  31446. return br;
  31447. })));
  31448. /***/ }),
  31449. /***/ "./node_modules/moment/locale/bs.js":
  31450. /*!******************************************!*\
  31451. !*** ./node_modules/moment/locale/bs.js ***!
  31452. \******************************************/
  31453. /*! no static exports found */
  31454. /***/ (function(module, exports, __webpack_require__) {
  31455. //! moment.js locale configuration
  31456. //! locale : Bosnian [bs]
  31457. //! author : Nedim Cholich : https://github.com/frontyard
  31458. //! based on (hr) translation by Bojan Marković
  31459. ;(function (global, factory) {
  31460. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  31461. undefined
  31462. }(this, (function (moment) { 'use strict';
  31463. function translate(number, withoutSuffix, key) {
  31464. var result = number + ' ';
  31465. switch (key) {
  31466. case 'm':
  31467. return withoutSuffix ? 'jedna minuta' : 'jedne minute';
  31468. case 'mm':
  31469. if (number === 1) {
  31470. result += 'minuta';
  31471. } else if (number === 2 || number === 3 || number === 4) {
  31472. result += 'minute';
  31473. } else {
  31474. result += 'minuta';
  31475. }
  31476. return result;
  31477. case 'h':
  31478. return withoutSuffix ? 'jedan sat' : 'jednog sata';
  31479. case 'hh':
  31480. if (number === 1) {
  31481. result += 'sat';
  31482. } else if (number === 2 || number === 3 || number === 4) {
  31483. result += 'sata';
  31484. } else {
  31485. result += 'sati';
  31486. }
  31487. return result;
  31488. case 'dd':
  31489. if (number === 1) {
  31490. result += 'dan';
  31491. } else {
  31492. result += 'dana';
  31493. }
  31494. return result;
  31495. case 'MM':
  31496. if (number === 1) {
  31497. result += 'mjesec';
  31498. } else if (number === 2 || number === 3 || number === 4) {
  31499. result += 'mjeseca';
  31500. } else {
  31501. result += 'mjeseci';
  31502. }
  31503. return result;
  31504. case 'yy':
  31505. if (number === 1) {
  31506. result += 'godina';
  31507. } else if (number === 2 || number === 3 || number === 4) {
  31508. result += 'godine';
  31509. } else {
  31510. result += 'godina';
  31511. }
  31512. return result;
  31513. }
  31514. }
  31515. var bs = moment.defineLocale('bs', {
  31516. months : 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'),
  31517. monthsShort : 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'),
  31518. monthsParseExact: true,
  31519. weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),
  31520. weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
  31521. weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'),
  31522. weekdaysParseExact : true,
  31523. longDateFormat : {
  31524. LT : 'H:mm',
  31525. LTS : 'H:mm:ss',
  31526. L : 'DD.MM.YYYY',
  31527. LL : 'D. MMMM YYYY',
  31528. LLL : 'D. MMMM YYYY H:mm',
  31529. LLLL : 'dddd, D. MMMM YYYY H:mm'
  31530. },
  31531. calendar : {
  31532. sameDay : '[danas u] LT',
  31533. nextDay : '[sutra u] LT',
  31534. nextWeek : function () {
  31535. switch (this.day()) {
  31536. case 0:
  31537. return '[u] [nedjelju] [u] LT';
  31538. case 3:
  31539. return '[u] [srijedu] [u] LT';
  31540. case 6:
  31541. return '[u] [subotu] [u] LT';
  31542. case 1:
  31543. case 2:
  31544. case 4:
  31545. case 5:
  31546. return '[u] dddd [u] LT';
  31547. }
  31548. },
  31549. lastDay : '[jučer u] LT',
  31550. lastWeek : function () {
  31551. switch (this.day()) {
  31552. case 0:
  31553. case 3:
  31554. return '[prošlu] dddd [u] LT';
  31555. case 6:
  31556. return '[prošle] [subote] [u] LT';
  31557. case 1:
  31558. case 2:
  31559. case 4:
  31560. case 5:
  31561. return '[prošli] dddd [u] LT';
  31562. }
  31563. },
  31564. sameElse : 'L'
  31565. },
  31566. relativeTime : {
  31567. future : 'za %s',
  31568. past : 'prije %s',
  31569. s : 'par sekundi',
  31570. m : translate,
  31571. mm : translate,
  31572. h : translate,
  31573. hh : translate,
  31574. d : 'dan',
  31575. dd : translate,
  31576. M : 'mjesec',
  31577. MM : translate,
  31578. y : 'godinu',
  31579. yy : translate
  31580. },
  31581. dayOfMonthOrdinalParse: /\d{1,2}\./,
  31582. ordinal : '%d.',
  31583. week : {
  31584. dow : 1, // Monday is the first day of the week.
  31585. doy : 7 // The week that contains Jan 1st is the first week of the year.
  31586. }
  31587. });
  31588. return bs;
  31589. })));
  31590. /***/ }),
  31591. /***/ "./node_modules/moment/locale/ca.js":
  31592. /*!******************************************!*\
  31593. !*** ./node_modules/moment/locale/ca.js ***!
  31594. \******************************************/
  31595. /*! no static exports found */
  31596. /***/ (function(module, exports, __webpack_require__) {
  31597. //! moment.js locale configuration
  31598. //! locale : Catalan [ca]
  31599. //! author : Juan G. Hurtado : https://github.com/juanghurtado
  31600. ;(function (global, factory) {
  31601. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  31602. undefined
  31603. }(this, (function (moment) { 'use strict';
  31604. var ca = moment.defineLocale('ca', {
  31605. months : {
  31606. standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'),
  31607. format: 'de gener_de febrer_de març_d\'abril_de maig_de juny_de juliol_d\'agost_de setembre_d\'octubre_de novembre_de desembre'.split('_'),
  31608. isFormat: /D[oD]?(\s)+MMMM/
  31609. },
  31610. monthsShort : 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split('_'),
  31611. monthsParseExact : true,
  31612. weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'),
  31613. weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),
  31614. weekdaysMin : 'dg_dl_dt_dc_dj_dv_ds'.split('_'),
  31615. weekdaysParseExact : true,
  31616. longDateFormat : {
  31617. LT : 'H:mm',
  31618. LTS : 'H:mm:ss',
  31619. L : 'DD/MM/YYYY',
  31620. LL : 'D MMMM [de] YYYY',
  31621. ll : 'D MMM YYYY',
  31622. LLL : 'D MMMM [de] YYYY [a les] H:mm',
  31623. lll : 'D MMM YYYY, H:mm',
  31624. LLLL : 'dddd D MMMM [de] YYYY [a les] H:mm',
  31625. llll : 'ddd D MMM YYYY, H:mm'
  31626. },
  31627. calendar : {
  31628. sameDay : function () {
  31629. return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  31630. },
  31631. nextDay : function () {
  31632. return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  31633. },
  31634. nextWeek : function () {
  31635. return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  31636. },
  31637. lastDay : function () {
  31638. return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  31639. },
  31640. lastWeek : function () {
  31641. return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
  31642. },
  31643. sameElse : 'L'
  31644. },
  31645. relativeTime : {
  31646. future : 'd\'aquí %s',
  31647. past : 'fa %s',
  31648. s : 'uns segons',
  31649. m : 'un minut',
  31650. mm : '%d minuts',
  31651. h : 'una hora',
  31652. hh : '%d hores',
  31653. d : 'un dia',
  31654. dd : '%d dies',
  31655. M : 'un mes',
  31656. MM : '%d mesos',
  31657. y : 'un any',
  31658. yy : '%d anys'
  31659. },
  31660. dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/,
  31661. ordinal : function (number, period) {
  31662. var output = (number === 1) ? 'r' :
  31663. (number === 2) ? 'n' :
  31664. (number === 3) ? 'r' :
  31665. (number === 4) ? 't' : 'è';
  31666. if (period === 'w' || period === 'W') {
  31667. output = 'a';
  31668. }
  31669. return number + output;
  31670. },
  31671. week : {
  31672. dow : 1, // Monday is the first day of the week.
  31673. doy : 4 // The week that contains Jan 4th is the first week of the year.
  31674. }
  31675. });
  31676. return ca;
  31677. })));
  31678. /***/ }),
  31679. /***/ "./node_modules/moment/locale/cs.js":
  31680. /*!******************************************!*\
  31681. !*** ./node_modules/moment/locale/cs.js ***!
  31682. \******************************************/
  31683. /*! no static exports found */
  31684. /***/ (function(module, exports, __webpack_require__) {
  31685. //! moment.js locale configuration
  31686. //! locale : Czech [cs]
  31687. //! author : petrbela : https://github.com/petrbela
  31688. ;(function (global, factory) {
  31689. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  31690. undefined
  31691. }(this, (function (moment) { 'use strict';
  31692. var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_');
  31693. var monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_');
  31694. function plural(n) {
  31695. return (n > 1) && (n < 5) && (~~(n / 10) !== 1);
  31696. }
  31697. function translate(number, withoutSuffix, key, isFuture) {
  31698. var result = number + ' ';
  31699. switch (key) {
  31700. case 's': // a few seconds / in a few seconds / a few seconds ago
  31701. return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami';
  31702. case 'm': // a minute / in a minute / a minute ago
  31703. return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou');
  31704. case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
  31705. if (withoutSuffix || isFuture) {
  31706. return result + (plural(number) ? 'minuty' : 'minut');
  31707. } else {
  31708. return result + 'minutami';
  31709. }
  31710. break;
  31711. case 'h': // an hour / in an hour / an hour ago
  31712. return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
  31713. case 'hh': // 9 hours / in 9 hours / 9 hours ago
  31714. if (withoutSuffix || isFuture) {
  31715. return result + (plural(number) ? 'hodiny' : 'hodin');
  31716. } else {
  31717. return result + 'hodinami';
  31718. }
  31719. break;
  31720. case 'd': // a day / in a day / a day ago
  31721. return (withoutSuffix || isFuture) ? 'den' : 'dnem';
  31722. case 'dd': // 9 days / in 9 days / 9 days ago
  31723. if (withoutSuffix || isFuture) {
  31724. return result + (plural(number) ? 'dny' : 'dní');
  31725. } else {
  31726. return result + 'dny';
  31727. }
  31728. break;
  31729. case 'M': // a month / in a month / a month ago
  31730. return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem';
  31731. case 'MM': // 9 months / in 9 months / 9 months ago
  31732. if (withoutSuffix || isFuture) {
  31733. return result + (plural(number) ? 'měsíce' : 'měsíců');
  31734. } else {
  31735. return result + 'měsíci';
  31736. }
  31737. break;
  31738. case 'y': // a year / in a year / a year ago
  31739. return (withoutSuffix || isFuture) ? 'rok' : 'rokem';
  31740. case 'yy': // 9 years / in 9 years / 9 years ago
  31741. if (withoutSuffix || isFuture) {
  31742. return result + (plural(number) ? 'roky' : 'let');
  31743. } else {
  31744. return result + 'lety';
  31745. }
  31746. break;
  31747. }
  31748. }
  31749. var cs = moment.defineLocale('cs', {
  31750. months : months,
  31751. monthsShort : monthsShort,
  31752. monthsParse : (function (months, monthsShort) {
  31753. var i, _monthsParse = [];
  31754. for (i = 0; i < 12; i++) {
  31755. // use custom parser to solve problem with July (červenec)
  31756. _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');
  31757. }
  31758. return _monthsParse;
  31759. }(months, monthsShort)),
  31760. shortMonthsParse : (function (monthsShort) {
  31761. var i, _shortMonthsParse = [];
  31762. for (i = 0; i < 12; i++) {
  31763. _shortMonthsParse[i] = new RegExp('^' + monthsShort[i] + '$', 'i');
  31764. }
  31765. return _shortMonthsParse;
  31766. }(monthsShort)),
  31767. longMonthsParse : (function (months) {
  31768. var i, _longMonthsParse = [];
  31769. for (i = 0; i < 12; i++) {
  31770. _longMonthsParse[i] = new RegExp('^' + months[i] + '$', 'i');
  31771. }
  31772. return _longMonthsParse;
  31773. }(months)),
  31774. weekdays : 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),
  31775. weekdaysShort : 'ne_po_út_st_čt_pá_so'.split('_'),
  31776. weekdaysMin : 'ne_po_út_st_čt_pá_so'.split('_'),
  31777. longDateFormat : {
  31778. LT: 'H:mm',
  31779. LTS : 'H:mm:ss',
  31780. L : 'DD.MM.YYYY',
  31781. LL : 'D. MMMM YYYY',
  31782. LLL : 'D. MMMM YYYY H:mm',
  31783. LLLL : 'dddd D. MMMM YYYY H:mm',
  31784. l : 'D. M. YYYY'
  31785. },
  31786. calendar : {
  31787. sameDay: '[dnes v] LT',
  31788. nextDay: '[zítra v] LT',
  31789. nextWeek: function () {
  31790. switch (this.day()) {
  31791. case 0:
  31792. return '[v neděli v] LT';
  31793. case 1:
  31794. case 2:
  31795. return '[v] dddd [v] LT';
  31796. case 3:
  31797. return '[ve středu v] LT';
  31798. case 4:
  31799. return '[ve čtvrtek v] LT';
  31800. case 5:
  31801. return '[v pátek v] LT';
  31802. case 6:
  31803. return '[v sobotu v] LT';
  31804. }
  31805. },
  31806. lastDay: '[včera v] LT',
  31807. lastWeek: function () {
  31808. switch (this.day()) {
  31809. case 0:
  31810. return '[minulou neděli v] LT';
  31811. case 1:
  31812. case 2:
  31813. return '[minulé] dddd [v] LT';
  31814. case 3:
  31815. return '[minulou středu v] LT';
  31816. case 4:
  31817. case 5:
  31818. return '[minulý] dddd [v] LT';
  31819. case 6:
  31820. return '[minulou sobotu v] LT';
  31821. }
  31822. },
  31823. sameElse: 'L'
  31824. },
  31825. relativeTime : {
  31826. future : 'za %s',
  31827. past : 'před %s',
  31828. s : translate,
  31829. m : translate,
  31830. mm : translate,
  31831. h : translate,
  31832. hh : translate,
  31833. d : translate,
  31834. dd : translate,
  31835. M : translate,
  31836. MM : translate,
  31837. y : translate,
  31838. yy : translate
  31839. },
  31840. dayOfMonthOrdinalParse : /\d{1,2}\./,
  31841. ordinal : '%d.',
  31842. week : {
  31843. dow : 1, // Monday is the first day of the week.
  31844. doy : 4 // The week that contains Jan 4th is the first week of the year.
  31845. }
  31846. });
  31847. return cs;
  31848. })));
  31849. /***/ }),
  31850. /***/ "./node_modules/moment/locale/cv.js":
  31851. /*!******************************************!*\
  31852. !*** ./node_modules/moment/locale/cv.js ***!
  31853. \******************************************/
  31854. /*! no static exports found */
  31855. /***/ (function(module, exports, __webpack_require__) {
  31856. //! moment.js locale configuration
  31857. //! locale : Chuvash [cv]
  31858. //! author : Anatoly Mironov : https://github.com/mirontoli
  31859. ;(function (global, factory) {
  31860. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  31861. undefined
  31862. }(this, (function (moment) { 'use strict';
  31863. var cv = moment.defineLocale('cv', {
  31864. months : 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'),
  31865. monthsShort : 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),
  31866. weekdays : 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'),
  31867. weekdaysShort : 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),
  31868. weekdaysMin : 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),
  31869. longDateFormat : {
  31870. LT : 'HH:mm',
  31871. LTS : 'HH:mm:ss',
  31872. L : 'DD-MM-YYYY',
  31873. LL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',
  31874. LLL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',
  31875. LLLL : 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm'
  31876. },
  31877. calendar : {
  31878. sameDay: '[Паян] LT [сехетре]',
  31879. nextDay: '[Ыран] LT [сехетре]',
  31880. lastDay: '[Ӗнер] LT [сехетре]',
  31881. nextWeek: '[Ҫитес] dddd LT [сехетре]',
  31882. lastWeek: '[Иртнӗ] dddd LT [сехетре]',
  31883. sameElse: 'L'
  31884. },
  31885. relativeTime : {
  31886. future : function (output) {
  31887. var affix = /сехет$/i.exec(output) ? 'рен' : /ҫул$/i.exec(output) ? 'тан' : 'ран';
  31888. return output + affix;
  31889. },
  31890. past : '%s каялла',
  31891. s : 'пӗр-ик ҫеккунт',
  31892. m : 'пӗр минут',
  31893. mm : '%d минут',
  31894. h : 'пӗр сехет',
  31895. hh : '%d сехет',
  31896. d : 'пӗр кун',
  31897. dd : '%d кун',
  31898. M : 'пӗр уйӑх',
  31899. MM : '%d уйӑх',
  31900. y : 'пӗр ҫул',
  31901. yy : '%d ҫул'
  31902. },
  31903. dayOfMonthOrdinalParse: /\d{1,2}-мӗш/,
  31904. ordinal : '%d-мӗш',
  31905. week : {
  31906. dow : 1, // Monday is the first day of the week.
  31907. doy : 7 // The week that contains Jan 1st is the first week of the year.
  31908. }
  31909. });
  31910. return cv;
  31911. })));
  31912. /***/ }),
  31913. /***/ "./node_modules/moment/locale/cy.js":
  31914. /*!******************************************!*\
  31915. !*** ./node_modules/moment/locale/cy.js ***!
  31916. \******************************************/
  31917. /*! no static exports found */
  31918. /***/ (function(module, exports, __webpack_require__) {
  31919. //! moment.js locale configuration
  31920. //! locale : Welsh [cy]
  31921. //! author : Robert Allen : https://github.com/robgallen
  31922. //! author : https://github.com/ryangreaves
  31923. ;(function (global, factory) {
  31924. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  31925. undefined
  31926. }(this, (function (moment) { 'use strict';
  31927. var cy = moment.defineLocale('cy', {
  31928. months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'),
  31929. monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'),
  31930. weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'),
  31931. weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
  31932. weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
  31933. weekdaysParseExact : true,
  31934. // time formats are the same as en-gb
  31935. longDateFormat: {
  31936. LT: 'HH:mm',
  31937. LTS : 'HH:mm:ss',
  31938. L: 'DD/MM/YYYY',
  31939. LL: 'D MMMM YYYY',
  31940. LLL: 'D MMMM YYYY HH:mm',
  31941. LLLL: 'dddd, D MMMM YYYY HH:mm'
  31942. },
  31943. calendar: {
  31944. sameDay: '[Heddiw am] LT',
  31945. nextDay: '[Yfory am] LT',
  31946. nextWeek: 'dddd [am] LT',
  31947. lastDay: '[Ddoe am] LT',
  31948. lastWeek: 'dddd [diwethaf am] LT',
  31949. sameElse: 'L'
  31950. },
  31951. relativeTime: {
  31952. future: 'mewn %s',
  31953. past: '%s yn ôl',
  31954. s: 'ychydig eiliadau',
  31955. m: 'munud',
  31956. mm: '%d munud',
  31957. h: 'awr',
  31958. hh: '%d awr',
  31959. d: 'diwrnod',
  31960. dd: '%d diwrnod',
  31961. M: 'mis',
  31962. MM: '%d mis',
  31963. y: 'blwyddyn',
  31964. yy: '%d flynedd'
  31965. },
  31966. dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
  31967. // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
  31968. ordinal: function (number) {
  31969. var b = number,
  31970. output = '',
  31971. lookup = [
  31972. '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed
  31973. 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed
  31974. ];
  31975. if (b > 20) {
  31976. if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
  31977. output = 'fed'; // not 30ain, 70ain or 90ain
  31978. } else {
  31979. output = 'ain';
  31980. }
  31981. } else if (b > 0) {
  31982. output = lookup[b];
  31983. }
  31984. return number + output;
  31985. },
  31986. week : {
  31987. dow : 1, // Monday is the first day of the week.
  31988. doy : 4 // The week that contains Jan 4th is the first week of the year.
  31989. }
  31990. });
  31991. return cy;
  31992. })));
  31993. /***/ }),
  31994. /***/ "./node_modules/moment/locale/da.js":
  31995. /*!******************************************!*\
  31996. !*** ./node_modules/moment/locale/da.js ***!
  31997. \******************************************/
  31998. /*! no static exports found */
  31999. /***/ (function(module, exports, __webpack_require__) {
  32000. //! moment.js locale configuration
  32001. //! locale : Danish [da]
  32002. //! author : Ulrik Nielsen : https://github.com/mrbase
  32003. ;(function (global, factory) {
  32004. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  32005. undefined
  32006. }(this, (function (moment) { 'use strict';
  32007. var da = moment.defineLocale('da', {
  32008. months : 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'),
  32009. monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
  32010. weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
  32011. weekdaysShort : 'søn_man_tir_ons_tor_fre_lør'.split('_'),
  32012. weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'),
  32013. longDateFormat : {
  32014. LT : 'HH:mm',
  32015. LTS : 'HH:mm:ss',
  32016. L : 'DD.MM.YYYY',
  32017. LL : 'D. MMMM YYYY',
  32018. LLL : 'D. MMMM YYYY HH:mm',
  32019. LLLL : 'dddd [d.] D. MMMM YYYY [kl.] HH:mm'
  32020. },
  32021. calendar : {
  32022. sameDay : '[i dag kl.] LT',
  32023. nextDay : '[i morgen kl.] LT',
  32024. nextWeek : 'på dddd [kl.] LT',
  32025. lastDay : '[i går kl.] LT',
  32026. lastWeek : '[i] dddd[s kl.] LT',
  32027. sameElse : 'L'
  32028. },
  32029. relativeTime : {
  32030. future : 'om %s',
  32031. past : '%s siden',
  32032. s : 'få sekunder',
  32033. m : 'et minut',
  32034. mm : '%d minutter',
  32035. h : 'en time',
  32036. hh : '%d timer',
  32037. d : 'en dag',
  32038. dd : '%d dage',
  32039. M : 'en måned',
  32040. MM : '%d måneder',
  32041. y : 'et år',
  32042. yy : '%d år'
  32043. },
  32044. dayOfMonthOrdinalParse: /\d{1,2}\./,
  32045. ordinal : '%d.',
  32046. week : {
  32047. dow : 1, // Monday is the first day of the week.
  32048. doy : 4 // The week that contains Jan 4th is the first week of the year.
  32049. }
  32050. });
  32051. return da;
  32052. })));
  32053. /***/ }),
  32054. /***/ "./node_modules/moment/locale/de-at.js":
  32055. /*!*********************************************!*\
  32056. !*** ./node_modules/moment/locale/de-at.js ***!
  32057. \*********************************************/
  32058. /*! no static exports found */
  32059. /***/ (function(module, exports, __webpack_require__) {
  32060. //! moment.js locale configuration
  32061. //! locale : German (Austria) [de-at]
  32062. //! author : lluchs : https://github.com/lluchs
  32063. //! author: Menelion Elensúle: https://github.com/Oire
  32064. //! author : Martin Groller : https://github.com/MadMG
  32065. //! author : Mikolaj Dadela : https://github.com/mik01aj
  32066. ;(function (global, factory) {
  32067. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  32068. undefined
  32069. }(this, (function (moment) { 'use strict';
  32070. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  32071. var format = {
  32072. 'm': ['eine Minute', 'einer Minute'],
  32073. 'h': ['eine Stunde', 'einer Stunde'],
  32074. 'd': ['ein Tag', 'einem Tag'],
  32075. 'dd': [number + ' Tage', number + ' Tagen'],
  32076. 'M': ['ein Monat', 'einem Monat'],
  32077. 'MM': [number + ' Monate', number + ' Monaten'],
  32078. 'y': ['ein Jahr', 'einem Jahr'],
  32079. 'yy': [number + ' Jahre', number + ' Jahren']
  32080. };
  32081. return withoutSuffix ? format[key][0] : format[key][1];
  32082. }
  32083. var deAt = moment.defineLocale('de-at', {
  32084. months : 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
  32085. monthsShort : 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
  32086. monthsParseExact : true,
  32087. weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
  32088. weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
  32089. weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  32090. weekdaysParseExact : true,
  32091. longDateFormat : {
  32092. LT: 'HH:mm',
  32093. LTS: 'HH:mm:ss',
  32094. L : 'DD.MM.YYYY',
  32095. LL : 'D. MMMM YYYY',
  32096. LLL : 'D. MMMM YYYY HH:mm',
  32097. LLLL : 'dddd, D. MMMM YYYY HH:mm'
  32098. },
  32099. calendar : {
  32100. sameDay: '[heute um] LT [Uhr]',
  32101. sameElse: 'L',
  32102. nextDay: '[morgen um] LT [Uhr]',
  32103. nextWeek: 'dddd [um] LT [Uhr]',
  32104. lastDay: '[gestern um] LT [Uhr]',
  32105. lastWeek: '[letzten] dddd [um] LT [Uhr]'
  32106. },
  32107. relativeTime : {
  32108. future : 'in %s',
  32109. past : 'vor %s',
  32110. s : 'ein paar Sekunden',
  32111. m : processRelativeTime,
  32112. mm : '%d Minuten',
  32113. h : processRelativeTime,
  32114. hh : '%d Stunden',
  32115. d : processRelativeTime,
  32116. dd : processRelativeTime,
  32117. M : processRelativeTime,
  32118. MM : processRelativeTime,
  32119. y : processRelativeTime,
  32120. yy : processRelativeTime
  32121. },
  32122. dayOfMonthOrdinalParse: /\d{1,2}\./,
  32123. ordinal : '%d.',
  32124. week : {
  32125. dow : 1, // Monday is the first day of the week.
  32126. doy : 4 // The week that contains Jan 4th is the first week of the year.
  32127. }
  32128. });
  32129. return deAt;
  32130. })));
  32131. /***/ }),
  32132. /***/ "./node_modules/moment/locale/de-ch.js":
  32133. /*!*********************************************!*\
  32134. !*** ./node_modules/moment/locale/de-ch.js ***!
  32135. \*********************************************/
  32136. /*! no static exports found */
  32137. /***/ (function(module, exports, __webpack_require__) {
  32138. //! moment.js locale configuration
  32139. //! locale : German (Switzerland) [de-ch]
  32140. //! author : sschueller : https://github.com/sschueller
  32141. ;(function (global, factory) {
  32142. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  32143. undefined
  32144. }(this, (function (moment) { 'use strict';
  32145. // based on: https://www.bk.admin.ch/dokumentation/sprachen/04915/05016/index.html?lang=de#
  32146. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  32147. var format = {
  32148. 'm': ['eine Minute', 'einer Minute'],
  32149. 'h': ['eine Stunde', 'einer Stunde'],
  32150. 'd': ['ein Tag', 'einem Tag'],
  32151. 'dd': [number + ' Tage', number + ' Tagen'],
  32152. 'M': ['ein Monat', 'einem Monat'],
  32153. 'MM': [number + ' Monate', number + ' Monaten'],
  32154. 'y': ['ein Jahr', 'einem Jahr'],
  32155. 'yy': [number + ' Jahre', number + ' Jahren']
  32156. };
  32157. return withoutSuffix ? format[key][0] : format[key][1];
  32158. }
  32159. var deCh = moment.defineLocale('de-ch', {
  32160. months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
  32161. monthsShort : 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
  32162. monthsParseExact : true,
  32163. weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
  32164. weekdaysShort : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  32165. weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  32166. weekdaysParseExact : true,
  32167. longDateFormat : {
  32168. LT: 'HH.mm',
  32169. LTS: 'HH.mm.ss',
  32170. L : 'DD.MM.YYYY',
  32171. LL : 'D. MMMM YYYY',
  32172. LLL : 'D. MMMM YYYY HH.mm',
  32173. LLLL : 'dddd, D. MMMM YYYY HH.mm'
  32174. },
  32175. calendar : {
  32176. sameDay: '[heute um] LT [Uhr]',
  32177. sameElse: 'L',
  32178. nextDay: '[morgen um] LT [Uhr]',
  32179. nextWeek: 'dddd [um] LT [Uhr]',
  32180. lastDay: '[gestern um] LT [Uhr]',
  32181. lastWeek: '[letzten] dddd [um] LT [Uhr]'
  32182. },
  32183. relativeTime : {
  32184. future : 'in %s',
  32185. past : 'vor %s',
  32186. s : 'ein paar Sekunden',
  32187. m : processRelativeTime,
  32188. mm : '%d Minuten',
  32189. h : processRelativeTime,
  32190. hh : '%d Stunden',
  32191. d : processRelativeTime,
  32192. dd : processRelativeTime,
  32193. M : processRelativeTime,
  32194. MM : processRelativeTime,
  32195. y : processRelativeTime,
  32196. yy : processRelativeTime
  32197. },
  32198. dayOfMonthOrdinalParse: /\d{1,2}\./,
  32199. ordinal : '%d.',
  32200. week : {
  32201. dow : 1, // Monday is the first day of the week.
  32202. doy : 4 // The week that contains Jan 4th is the first week of the year.
  32203. }
  32204. });
  32205. return deCh;
  32206. })));
  32207. /***/ }),
  32208. /***/ "./node_modules/moment/locale/de.js":
  32209. /*!******************************************!*\
  32210. !*** ./node_modules/moment/locale/de.js ***!
  32211. \******************************************/
  32212. /*! no static exports found */
  32213. /***/ (function(module, exports, __webpack_require__) {
  32214. //! moment.js locale configuration
  32215. //! locale : German [de]
  32216. //! author : lluchs : https://github.com/lluchs
  32217. //! author: Menelion Elensúle: https://github.com/Oire
  32218. //! author : Mikolaj Dadela : https://github.com/mik01aj
  32219. ;(function (global, factory) {
  32220. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  32221. undefined
  32222. }(this, (function (moment) { 'use strict';
  32223. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  32224. var format = {
  32225. 'm': ['eine Minute', 'einer Minute'],
  32226. 'h': ['eine Stunde', 'einer Stunde'],
  32227. 'd': ['ein Tag', 'einem Tag'],
  32228. 'dd': [number + ' Tage', number + ' Tagen'],
  32229. 'M': ['ein Monat', 'einem Monat'],
  32230. 'MM': [number + ' Monate', number + ' Monaten'],
  32231. 'y': ['ein Jahr', 'einem Jahr'],
  32232. 'yy': [number + ' Jahre', number + ' Jahren']
  32233. };
  32234. return withoutSuffix ? format[key][0] : format[key][1];
  32235. }
  32236. var de = moment.defineLocale('de', {
  32237. months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
  32238. monthsShort : 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
  32239. monthsParseExact : true,
  32240. weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'),
  32241. weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
  32242. weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
  32243. weekdaysParseExact : true,
  32244. longDateFormat : {
  32245. LT: 'HH:mm',
  32246. LTS: 'HH:mm:ss',
  32247. L : 'DD.MM.YYYY',
  32248. LL : 'D. MMMM YYYY',
  32249. LLL : 'D. MMMM YYYY HH:mm',
  32250. LLLL : 'dddd, D. MMMM YYYY HH:mm'
  32251. },
  32252. calendar : {
  32253. sameDay: '[heute um] LT [Uhr]',
  32254. sameElse: 'L',
  32255. nextDay: '[morgen um] LT [Uhr]',
  32256. nextWeek: 'dddd [um] LT [Uhr]',
  32257. lastDay: '[gestern um] LT [Uhr]',
  32258. lastWeek: '[letzten] dddd [um] LT [Uhr]'
  32259. },
  32260. relativeTime : {
  32261. future : 'in %s',
  32262. past : 'vor %s',
  32263. s : 'ein paar Sekunden',
  32264. m : processRelativeTime,
  32265. mm : '%d Minuten',
  32266. h : processRelativeTime,
  32267. hh : '%d Stunden',
  32268. d : processRelativeTime,
  32269. dd : processRelativeTime,
  32270. M : processRelativeTime,
  32271. MM : processRelativeTime,
  32272. y : processRelativeTime,
  32273. yy : processRelativeTime
  32274. },
  32275. dayOfMonthOrdinalParse: /\d{1,2}\./,
  32276. ordinal : '%d.',
  32277. week : {
  32278. dow : 1, // Monday is the first day of the week.
  32279. doy : 4 // The week that contains Jan 4th is the first week of the year.
  32280. }
  32281. });
  32282. return de;
  32283. })));
  32284. /***/ }),
  32285. /***/ "./node_modules/moment/locale/dv.js":
  32286. /*!******************************************!*\
  32287. !*** ./node_modules/moment/locale/dv.js ***!
  32288. \******************************************/
  32289. /*! no static exports found */
  32290. /***/ (function(module, exports, __webpack_require__) {
  32291. //! moment.js locale configuration
  32292. //! locale : Maldivian [dv]
  32293. //! author : Jawish Hameed : https://github.com/jawish
  32294. ;(function (global, factory) {
  32295. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  32296. undefined
  32297. }(this, (function (moment) { 'use strict';
  32298. var months = [
  32299. 'ޖެނުއަރީ',
  32300. 'ފެބްރުއަރީ',
  32301. 'މާރިޗު',
  32302. 'އޭޕްރީލު',
  32303. 'މޭ',
  32304. 'ޖޫން',
  32305. 'ޖުލައި',
  32306. 'އޯގަސްޓު',
  32307. 'ސެޕްޓެމްބަރު',
  32308. 'އޮކްޓޯބަރު',
  32309. 'ނޮވެމްބަރު',
  32310. 'ޑިސެމްބަރު'
  32311. ];
  32312. var weekdays = [
  32313. 'އާދިއްތަ',
  32314. 'ހޯމަ',
  32315. 'އަންގާރަ',
  32316. 'ބުދަ',
  32317. 'ބުރާސްފަތި',
  32318. 'ހުކުރު',
  32319. 'ހޮނިހިރު'
  32320. ];
  32321. var dv = moment.defineLocale('dv', {
  32322. months : months,
  32323. monthsShort : months,
  32324. weekdays : weekdays,
  32325. weekdaysShort : weekdays,
  32326. weekdaysMin : 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),
  32327. longDateFormat : {
  32328. LT : 'HH:mm',
  32329. LTS : 'HH:mm:ss',
  32330. L : 'D/M/YYYY',
  32331. LL : 'D MMMM YYYY',
  32332. LLL : 'D MMMM YYYY HH:mm',
  32333. LLLL : 'dddd D MMMM YYYY HH:mm'
  32334. },
  32335. meridiemParse: /މކ|މފ/,
  32336. isPM : function (input) {
  32337. return 'މފ' === input;
  32338. },
  32339. meridiem : function (hour, minute, isLower) {
  32340. if (hour < 12) {
  32341. return 'މކ';
  32342. } else {
  32343. return 'މފ';
  32344. }
  32345. },
  32346. calendar : {
  32347. sameDay : '[މިއަދު] LT',
  32348. nextDay : '[މާދަމާ] LT',
  32349. nextWeek : 'dddd LT',
  32350. lastDay : '[އިއްޔެ] LT',
  32351. lastWeek : '[ފާއިތުވި] dddd LT',
  32352. sameElse : 'L'
  32353. },
  32354. relativeTime : {
  32355. future : 'ތެރޭގައި %s',
  32356. past : 'ކުރިން %s',
  32357. s : 'ސިކުންތުކޮޅެއް',
  32358. m : 'މިނިޓެއް',
  32359. mm : 'މިނިޓު %d',
  32360. h : 'ގަޑިއިރެއް',
  32361. hh : 'ގަޑިއިރު %d',
  32362. d : 'ދުވަހެއް',
  32363. dd : 'ދުވަސް %d',
  32364. M : 'މަހެއް',
  32365. MM : 'މަސް %d',
  32366. y : 'އަހަރެއް',
  32367. yy : 'އަހަރު %d'
  32368. },
  32369. preparse: function (string) {
  32370. return string.replace(/،/g, ',');
  32371. },
  32372. postformat: function (string) {
  32373. return string.replace(/,/g, '،');
  32374. },
  32375. week : {
  32376. dow : 7, // Sunday is the first day of the week.
  32377. doy : 12 // The week that contains Jan 1st is the first week of the year.
  32378. }
  32379. });
  32380. return dv;
  32381. })));
  32382. /***/ }),
  32383. /***/ "./node_modules/moment/locale/el.js":
  32384. /*!******************************************!*\
  32385. !*** ./node_modules/moment/locale/el.js ***!
  32386. \******************************************/
  32387. /*! no static exports found */
  32388. /***/ (function(module, exports, __webpack_require__) {
  32389. //! moment.js locale configuration
  32390. //! locale : Greek [el]
  32391. //! author : Aggelos Karalias : https://github.com/mehiel
  32392. ;(function (global, factory) {
  32393. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  32394. undefined
  32395. }(this, (function (moment) { 'use strict';
  32396. function isFunction(input) {
  32397. return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
  32398. }
  32399. var el = moment.defineLocale('el', {
  32400. monthsNominativeEl : 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'),
  32401. monthsGenitiveEl : 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'),
  32402. months : function (momentToFormat, format) {
  32403. if (!momentToFormat) {
  32404. return this._monthsNominativeEl;
  32405. } else if (typeof format === 'string' && /D/.test(format.substring(0, format.indexOf('MMMM')))) { // if there is a day number before 'MMMM'
  32406. return this._monthsGenitiveEl[momentToFormat.month()];
  32407. } else {
  32408. return this._monthsNominativeEl[momentToFormat.month()];
  32409. }
  32410. },
  32411. monthsShort : 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),
  32412. weekdays : 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split('_'),
  32413. weekdaysShort : 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),
  32414. weekdaysMin : 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),
  32415. meridiem : function (hours, minutes, isLower) {
  32416. if (hours > 11) {
  32417. return isLower ? 'μμ' : 'ΜΜ';
  32418. } else {
  32419. return isLower ? 'πμ' : 'ΠΜ';
  32420. }
  32421. },
  32422. isPM : function (input) {
  32423. return ((input + '').toLowerCase()[0] === 'μ');
  32424. },
  32425. meridiemParse : /[ΠΜ]\.?Μ?\.?/i,
  32426. longDateFormat : {
  32427. LT : 'h:mm A',
  32428. LTS : 'h:mm:ss A',
  32429. L : 'DD/MM/YYYY',
  32430. LL : 'D MMMM YYYY',
  32431. LLL : 'D MMMM YYYY h:mm A',
  32432. LLLL : 'dddd, D MMMM YYYY h:mm A'
  32433. },
  32434. calendarEl : {
  32435. sameDay : '[Σήμερα {}] LT',
  32436. nextDay : '[Αύριο {}] LT',
  32437. nextWeek : 'dddd [{}] LT',
  32438. lastDay : '[Χθες {}] LT',
  32439. lastWeek : function () {
  32440. switch (this.day()) {
  32441. case 6:
  32442. return '[το προηγούμενο] dddd [{}] LT';
  32443. default:
  32444. return '[την προηγούμενη] dddd [{}] LT';
  32445. }
  32446. },
  32447. sameElse : 'L'
  32448. },
  32449. calendar : function (key, mom) {
  32450. var output = this._calendarEl[key],
  32451. hours = mom && mom.hours();
  32452. if (isFunction(output)) {
  32453. output = output.apply(mom);
  32454. }
  32455. return output.replace('{}', (hours % 12 === 1 ? 'στη' : 'στις'));
  32456. },
  32457. relativeTime : {
  32458. future : 'σε %s',
  32459. past : '%s πριν',
  32460. s : 'λίγα δευτερόλεπτα',
  32461. m : 'ένα λεπτό',
  32462. mm : '%d λεπτά',
  32463. h : 'μία ώρα',
  32464. hh : '%d ώρες',
  32465. d : 'μία μέρα',
  32466. dd : '%d μέρες',
  32467. M : 'ένας μήνας',
  32468. MM : '%d μήνες',
  32469. y : 'ένας χρόνος',
  32470. yy : '%d χρόνια'
  32471. },
  32472. dayOfMonthOrdinalParse: /\d{1,2}η/,
  32473. ordinal: '%dη',
  32474. week : {
  32475. dow : 1, // Monday is the first day of the week.
  32476. doy : 4 // The week that contains Jan 4st is the first week of the year.
  32477. }
  32478. });
  32479. return el;
  32480. })));
  32481. /***/ }),
  32482. /***/ "./node_modules/moment/locale/en-au.js":
  32483. /*!*********************************************!*\
  32484. !*** ./node_modules/moment/locale/en-au.js ***!
  32485. \*********************************************/
  32486. /*! no static exports found */
  32487. /***/ (function(module, exports, __webpack_require__) {
  32488. //! moment.js locale configuration
  32489. //! locale : English (Australia) [en-au]
  32490. //! author : Jared Morse : https://github.com/jarcoal
  32491. ;(function (global, factory) {
  32492. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  32493. undefined
  32494. }(this, (function (moment) { 'use strict';
  32495. var enAu = moment.defineLocale('en-au', {
  32496. months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
  32497. monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  32498. weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
  32499. weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  32500. weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  32501. longDateFormat : {
  32502. LT : 'h:mm A',
  32503. LTS : 'h:mm:ss A',
  32504. L : 'DD/MM/YYYY',
  32505. LL : 'D MMMM YYYY',
  32506. LLL : 'D MMMM YYYY h:mm A',
  32507. LLLL : 'dddd, D MMMM YYYY h:mm A'
  32508. },
  32509. calendar : {
  32510. sameDay : '[Today at] LT',
  32511. nextDay : '[Tomorrow at] LT',
  32512. nextWeek : 'dddd [at] LT',
  32513. lastDay : '[Yesterday at] LT',
  32514. lastWeek : '[Last] dddd [at] LT',
  32515. sameElse : 'L'
  32516. },
  32517. relativeTime : {
  32518. future : 'in %s',
  32519. past : '%s ago',
  32520. s : 'a few seconds',
  32521. m : 'a minute',
  32522. mm : '%d minutes',
  32523. h : 'an hour',
  32524. hh : '%d hours',
  32525. d : 'a day',
  32526. dd : '%d days',
  32527. M : 'a month',
  32528. MM : '%d months',
  32529. y : 'a year',
  32530. yy : '%d years'
  32531. },
  32532. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  32533. ordinal : function (number) {
  32534. var b = number % 10,
  32535. output = (~~(number % 100 / 10) === 1) ? 'th' :
  32536. (b === 1) ? 'st' :
  32537. (b === 2) ? 'nd' :
  32538. (b === 3) ? 'rd' : 'th';
  32539. return number + output;
  32540. },
  32541. week : {
  32542. dow : 1, // Monday is the first day of the week.
  32543. doy : 4 // The week that contains Jan 4th is the first week of the year.
  32544. }
  32545. });
  32546. return enAu;
  32547. })));
  32548. /***/ }),
  32549. /***/ "./node_modules/moment/locale/en-ca.js":
  32550. /*!*********************************************!*\
  32551. !*** ./node_modules/moment/locale/en-ca.js ***!
  32552. \*********************************************/
  32553. /*! no static exports found */
  32554. /***/ (function(module, exports, __webpack_require__) {
  32555. //! moment.js locale configuration
  32556. //! locale : English (Canada) [en-ca]
  32557. //! author : Jonathan Abourbih : https://github.com/jonbca
  32558. ;(function (global, factory) {
  32559. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  32560. undefined
  32561. }(this, (function (moment) { 'use strict';
  32562. var enCa = moment.defineLocale('en-ca', {
  32563. months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
  32564. monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  32565. weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
  32566. weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  32567. weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  32568. longDateFormat : {
  32569. LT : 'h:mm A',
  32570. LTS : 'h:mm:ss A',
  32571. L : 'YYYY-MM-DD',
  32572. LL : 'MMMM D, YYYY',
  32573. LLL : 'MMMM D, YYYY h:mm A',
  32574. LLLL : 'dddd, MMMM D, YYYY h:mm A'
  32575. },
  32576. calendar : {
  32577. sameDay : '[Today at] LT',
  32578. nextDay : '[Tomorrow at] LT',
  32579. nextWeek : 'dddd [at] LT',
  32580. lastDay : '[Yesterday at] LT',
  32581. lastWeek : '[Last] dddd [at] LT',
  32582. sameElse : 'L'
  32583. },
  32584. relativeTime : {
  32585. future : 'in %s',
  32586. past : '%s ago',
  32587. s : 'a few seconds',
  32588. m : 'a minute',
  32589. mm : '%d minutes',
  32590. h : 'an hour',
  32591. hh : '%d hours',
  32592. d : 'a day',
  32593. dd : '%d days',
  32594. M : 'a month',
  32595. MM : '%d months',
  32596. y : 'a year',
  32597. yy : '%d years'
  32598. },
  32599. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  32600. ordinal : function (number) {
  32601. var b = number % 10,
  32602. output = (~~(number % 100 / 10) === 1) ? 'th' :
  32603. (b === 1) ? 'st' :
  32604. (b === 2) ? 'nd' :
  32605. (b === 3) ? 'rd' : 'th';
  32606. return number + output;
  32607. }
  32608. });
  32609. return enCa;
  32610. })));
  32611. /***/ }),
  32612. /***/ "./node_modules/moment/locale/en-gb.js":
  32613. /*!*********************************************!*\
  32614. !*** ./node_modules/moment/locale/en-gb.js ***!
  32615. \*********************************************/
  32616. /*! no static exports found */
  32617. /***/ (function(module, exports, __webpack_require__) {
  32618. //! moment.js locale configuration
  32619. //! locale : English (United Kingdom) [en-gb]
  32620. //! author : Chris Gedrim : https://github.com/chrisgedrim
  32621. ;(function (global, factory) {
  32622. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  32623. undefined
  32624. }(this, (function (moment) { 'use strict';
  32625. var enGb = moment.defineLocale('en-gb', {
  32626. months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
  32627. monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  32628. weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
  32629. weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  32630. weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  32631. longDateFormat : {
  32632. LT : 'HH:mm',
  32633. LTS : 'HH:mm:ss',
  32634. L : 'DD/MM/YYYY',
  32635. LL : 'D MMMM YYYY',
  32636. LLL : 'D MMMM YYYY HH:mm',
  32637. LLLL : 'dddd, D MMMM YYYY HH:mm'
  32638. },
  32639. calendar : {
  32640. sameDay : '[Today at] LT',
  32641. nextDay : '[Tomorrow at] LT',
  32642. nextWeek : 'dddd [at] LT',
  32643. lastDay : '[Yesterday at] LT',
  32644. lastWeek : '[Last] dddd [at] LT',
  32645. sameElse : 'L'
  32646. },
  32647. relativeTime : {
  32648. future : 'in %s',
  32649. past : '%s ago',
  32650. s : 'a few seconds',
  32651. m : 'a minute',
  32652. mm : '%d minutes',
  32653. h : 'an hour',
  32654. hh : '%d hours',
  32655. d : 'a day',
  32656. dd : '%d days',
  32657. M : 'a month',
  32658. MM : '%d months',
  32659. y : 'a year',
  32660. yy : '%d years'
  32661. },
  32662. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  32663. ordinal : function (number) {
  32664. var b = number % 10,
  32665. output = (~~(number % 100 / 10) === 1) ? 'th' :
  32666. (b === 1) ? 'st' :
  32667. (b === 2) ? 'nd' :
  32668. (b === 3) ? 'rd' : 'th';
  32669. return number + output;
  32670. },
  32671. week : {
  32672. dow : 1, // Monday is the first day of the week.
  32673. doy : 4 // The week that contains Jan 4th is the first week of the year.
  32674. }
  32675. });
  32676. return enGb;
  32677. })));
  32678. /***/ }),
  32679. /***/ "./node_modules/moment/locale/en-ie.js":
  32680. /*!*********************************************!*\
  32681. !*** ./node_modules/moment/locale/en-ie.js ***!
  32682. \*********************************************/
  32683. /*! no static exports found */
  32684. /***/ (function(module, exports, __webpack_require__) {
  32685. //! moment.js locale configuration
  32686. //! locale : English (Ireland) [en-ie]
  32687. //! author : Chris Cartlidge : https://github.com/chriscartlidge
  32688. ;(function (global, factory) {
  32689. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  32690. undefined
  32691. }(this, (function (moment) { 'use strict';
  32692. var enIe = moment.defineLocale('en-ie', {
  32693. months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
  32694. monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  32695. weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
  32696. weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  32697. weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  32698. longDateFormat : {
  32699. LT : 'HH:mm',
  32700. LTS : 'HH:mm:ss',
  32701. L : 'DD-MM-YYYY',
  32702. LL : 'D MMMM YYYY',
  32703. LLL : 'D MMMM YYYY HH:mm',
  32704. LLLL : 'dddd D MMMM YYYY HH:mm'
  32705. },
  32706. calendar : {
  32707. sameDay : '[Today at] LT',
  32708. nextDay : '[Tomorrow at] LT',
  32709. nextWeek : 'dddd [at] LT',
  32710. lastDay : '[Yesterday at] LT',
  32711. lastWeek : '[Last] dddd [at] LT',
  32712. sameElse : 'L'
  32713. },
  32714. relativeTime : {
  32715. future : 'in %s',
  32716. past : '%s ago',
  32717. s : 'a few seconds',
  32718. m : 'a minute',
  32719. mm : '%d minutes',
  32720. h : 'an hour',
  32721. hh : '%d hours',
  32722. d : 'a day',
  32723. dd : '%d days',
  32724. M : 'a month',
  32725. MM : '%d months',
  32726. y : 'a year',
  32727. yy : '%d years'
  32728. },
  32729. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  32730. ordinal : function (number) {
  32731. var b = number % 10,
  32732. output = (~~(number % 100 / 10) === 1) ? 'th' :
  32733. (b === 1) ? 'st' :
  32734. (b === 2) ? 'nd' :
  32735. (b === 3) ? 'rd' : 'th';
  32736. return number + output;
  32737. },
  32738. week : {
  32739. dow : 1, // Monday is the first day of the week.
  32740. doy : 4 // The week that contains Jan 4th is the first week of the year.
  32741. }
  32742. });
  32743. return enIe;
  32744. })));
  32745. /***/ }),
  32746. /***/ "./node_modules/moment/locale/en-nz.js":
  32747. /*!*********************************************!*\
  32748. !*** ./node_modules/moment/locale/en-nz.js ***!
  32749. \*********************************************/
  32750. /*! no static exports found */
  32751. /***/ (function(module, exports, __webpack_require__) {
  32752. //! moment.js locale configuration
  32753. //! locale : English (New Zealand) [en-nz]
  32754. //! author : Luke McGregor : https://github.com/lukemcgregor
  32755. ;(function (global, factory) {
  32756. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  32757. undefined
  32758. }(this, (function (moment) { 'use strict';
  32759. var enNz = moment.defineLocale('en-nz', {
  32760. months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
  32761. monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
  32762. weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
  32763. weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
  32764. weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
  32765. longDateFormat : {
  32766. LT : 'h:mm A',
  32767. LTS : 'h:mm:ss A',
  32768. L : 'DD/MM/YYYY',
  32769. LL : 'D MMMM YYYY',
  32770. LLL : 'D MMMM YYYY h:mm A',
  32771. LLLL : 'dddd, D MMMM YYYY h:mm A'
  32772. },
  32773. calendar : {
  32774. sameDay : '[Today at] LT',
  32775. nextDay : '[Tomorrow at] LT',
  32776. nextWeek : 'dddd [at] LT',
  32777. lastDay : '[Yesterday at] LT',
  32778. lastWeek : '[Last] dddd [at] LT',
  32779. sameElse : 'L'
  32780. },
  32781. relativeTime : {
  32782. future : 'in %s',
  32783. past : '%s ago',
  32784. s : 'a few seconds',
  32785. m : 'a minute',
  32786. mm : '%d minutes',
  32787. h : 'an hour',
  32788. hh : '%d hours',
  32789. d : 'a day',
  32790. dd : '%d days',
  32791. M : 'a month',
  32792. MM : '%d months',
  32793. y : 'a year',
  32794. yy : '%d years'
  32795. },
  32796. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  32797. ordinal : function (number) {
  32798. var b = number % 10,
  32799. output = (~~(number % 100 / 10) === 1) ? 'th' :
  32800. (b === 1) ? 'st' :
  32801. (b === 2) ? 'nd' :
  32802. (b === 3) ? 'rd' : 'th';
  32803. return number + output;
  32804. },
  32805. week : {
  32806. dow : 1, // Monday is the first day of the week.
  32807. doy : 4 // The week that contains Jan 4th is the first week of the year.
  32808. }
  32809. });
  32810. return enNz;
  32811. })));
  32812. /***/ }),
  32813. /***/ "./node_modules/moment/locale/eo.js":
  32814. /*!******************************************!*\
  32815. !*** ./node_modules/moment/locale/eo.js ***!
  32816. \******************************************/
  32817. /*! no static exports found */
  32818. /***/ (function(module, exports, __webpack_require__) {
  32819. //! moment.js locale configuration
  32820. //! locale : Esperanto [eo]
  32821. //! author : Colin Dean : https://github.com/colindean
  32822. //! author : Mia Nordentoft Imperatori : https://github.com/miestasmia
  32823. //! comment : miestasmia corrected the translation by colindean
  32824. ;(function (global, factory) {
  32825. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  32826. undefined
  32827. }(this, (function (moment) { 'use strict';
  32828. var eo = moment.defineLocale('eo', {
  32829. months : 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'),
  32830. monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec'.split('_'),
  32831. weekdays : 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),
  32832. weekdaysShort : 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),
  32833. weekdaysMin : 'di_lu_ma_me_ĵa_ve_sa'.split('_'),
  32834. longDateFormat : {
  32835. LT : 'HH:mm',
  32836. LTS : 'HH:mm:ss',
  32837. L : 'YYYY-MM-DD',
  32838. LL : 'D[-a de] MMMM, YYYY',
  32839. LLL : 'D[-a de] MMMM, YYYY HH:mm',
  32840. LLLL : 'dddd, [la] D[-a de] MMMM, YYYY HH:mm'
  32841. },
  32842. meridiemParse: /[ap]\.t\.m/i,
  32843. isPM: function (input) {
  32844. return input.charAt(0).toLowerCase() === 'p';
  32845. },
  32846. meridiem : function (hours, minutes, isLower) {
  32847. if (hours > 11) {
  32848. return isLower ? 'p.t.m.' : 'P.T.M.';
  32849. } else {
  32850. return isLower ? 'a.t.m.' : 'A.T.M.';
  32851. }
  32852. },
  32853. calendar : {
  32854. sameDay : '[Hodiaŭ je] LT',
  32855. nextDay : '[Morgaŭ je] LT',
  32856. nextWeek : 'dddd [je] LT',
  32857. lastDay : '[Hieraŭ je] LT',
  32858. lastWeek : '[pasinta] dddd [je] LT',
  32859. sameElse : 'L'
  32860. },
  32861. relativeTime : {
  32862. future : 'post %s',
  32863. past : 'antaŭ %s',
  32864. s : 'sekundoj',
  32865. m : 'minuto',
  32866. mm : '%d minutoj',
  32867. h : 'horo',
  32868. hh : '%d horoj',
  32869. d : 'tago',//ne 'diurno', ĉar estas uzita por proksimumo
  32870. dd : '%d tagoj',
  32871. M : 'monato',
  32872. MM : '%d monatoj',
  32873. y : 'jaro',
  32874. yy : '%d jaroj'
  32875. },
  32876. dayOfMonthOrdinalParse: /\d{1,2}a/,
  32877. ordinal : '%da',
  32878. week : {
  32879. dow : 1, // Monday is the first day of the week.
  32880. doy : 7 // The week that contains Jan 1st is the first week of the year.
  32881. }
  32882. });
  32883. return eo;
  32884. })));
  32885. /***/ }),
  32886. /***/ "./node_modules/moment/locale/es-do.js":
  32887. /*!*********************************************!*\
  32888. !*** ./node_modules/moment/locale/es-do.js ***!
  32889. \*********************************************/
  32890. /*! no static exports found */
  32891. /***/ (function(module, exports, __webpack_require__) {
  32892. //! moment.js locale configuration
  32893. //! locale : Spanish (Dominican Republic) [es-do]
  32894. ;(function (global, factory) {
  32895. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  32896. undefined
  32897. }(this, (function (moment) { 'use strict';
  32898. var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
  32899. var monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
  32900. var monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i];
  32901. var monthsRegex = /^(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;
  32902. var esDo = moment.defineLocale('es-do', {
  32903. months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
  32904. monthsShort : function (m, format) {
  32905. if (!m) {
  32906. return monthsShortDot;
  32907. } else if (/-MMM-/.test(format)) {
  32908. return monthsShort[m.month()];
  32909. } else {
  32910. return monthsShortDot[m.month()];
  32911. }
  32912. },
  32913. monthsRegex: monthsRegex,
  32914. monthsShortRegex: monthsRegex,
  32915. monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  32916. monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  32917. monthsParse: monthsParse,
  32918. longMonthsParse: monthsParse,
  32919. shortMonthsParse: monthsParse,
  32920. weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  32921. weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  32922. weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  32923. weekdaysParseExact : true,
  32924. longDateFormat : {
  32925. LT : 'h:mm A',
  32926. LTS : 'h:mm:ss A',
  32927. L : 'DD/MM/YYYY',
  32928. LL : 'D [de] MMMM [de] YYYY',
  32929. LLL : 'D [de] MMMM [de] YYYY h:mm A',
  32930. LLLL : 'dddd, D [de] MMMM [de] YYYY h:mm A'
  32931. },
  32932. calendar : {
  32933. sameDay : function () {
  32934. return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  32935. },
  32936. nextDay : function () {
  32937. return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  32938. },
  32939. nextWeek : function () {
  32940. return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  32941. },
  32942. lastDay : function () {
  32943. return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  32944. },
  32945. lastWeek : function () {
  32946. return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  32947. },
  32948. sameElse : 'L'
  32949. },
  32950. relativeTime : {
  32951. future : 'en %s',
  32952. past : 'hace %s',
  32953. s : 'unos segundos',
  32954. m : 'un minuto',
  32955. mm : '%d minutos',
  32956. h : 'una hora',
  32957. hh : '%d horas',
  32958. d : 'un día',
  32959. dd : '%d días',
  32960. M : 'un mes',
  32961. MM : '%d meses',
  32962. y : 'un año',
  32963. yy : '%d años'
  32964. },
  32965. dayOfMonthOrdinalParse : /\d{1,2}º/,
  32966. ordinal : '%dº',
  32967. week : {
  32968. dow : 1, // Monday is the first day of the week.
  32969. doy : 4 // The week that contains Jan 4th is the first week of the year.
  32970. }
  32971. });
  32972. return esDo;
  32973. })));
  32974. /***/ }),
  32975. /***/ "./node_modules/moment/locale/es-us.js":
  32976. /*!*********************************************!*\
  32977. !*** ./node_modules/moment/locale/es-us.js ***!
  32978. \*********************************************/
  32979. /*! no static exports found */
  32980. /***/ (function(module, exports, __webpack_require__) {
  32981. //! moment.js locale configuration
  32982. //! locale : Spanish (United States) [es-us]
  32983. //! author : bustta : https://github.com/bustta
  32984. ;(function (global, factory) {
  32985. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  32986. undefined
  32987. }(this, (function (moment) { 'use strict';
  32988. var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
  32989. var monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
  32990. var esUs = moment.defineLocale('es-us', {
  32991. months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
  32992. monthsShort : function (m, format) {
  32993. if (!m) {
  32994. return monthsShortDot;
  32995. } else if (/-MMM-/.test(format)) {
  32996. return monthsShort[m.month()];
  32997. } else {
  32998. return monthsShortDot[m.month()];
  32999. }
  33000. },
  33001. monthsParseExact : true,
  33002. weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  33003. weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  33004. weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  33005. weekdaysParseExact : true,
  33006. longDateFormat : {
  33007. LT : 'H:mm',
  33008. LTS : 'H:mm:ss',
  33009. L : 'MM/DD/YYYY',
  33010. LL : 'MMMM [de] D [de] YYYY',
  33011. LLL : 'MMMM [de] D [de] YYYY H:mm',
  33012. LLLL : 'dddd, MMMM [de] D [de] YYYY H:mm'
  33013. },
  33014. calendar : {
  33015. sameDay : function () {
  33016. return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  33017. },
  33018. nextDay : function () {
  33019. return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  33020. },
  33021. nextWeek : function () {
  33022. return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  33023. },
  33024. lastDay : function () {
  33025. return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  33026. },
  33027. lastWeek : function () {
  33028. return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  33029. },
  33030. sameElse : 'L'
  33031. },
  33032. relativeTime : {
  33033. future : 'en %s',
  33034. past : 'hace %s',
  33035. s : 'unos segundos',
  33036. m : 'un minuto',
  33037. mm : '%d minutos',
  33038. h : 'una hora',
  33039. hh : '%d horas',
  33040. d : 'un día',
  33041. dd : '%d días',
  33042. M : 'un mes',
  33043. MM : '%d meses',
  33044. y : 'un año',
  33045. yy : '%d años'
  33046. },
  33047. dayOfMonthOrdinalParse : /\d{1,2}º/,
  33048. ordinal : '%dº',
  33049. week : {
  33050. dow : 0, // Sunday is the first day of the week.
  33051. doy : 6 // The week that contains Jan 1st is the first week of the year.
  33052. }
  33053. });
  33054. return esUs;
  33055. })));
  33056. /***/ }),
  33057. /***/ "./node_modules/moment/locale/es.js":
  33058. /*!******************************************!*\
  33059. !*** ./node_modules/moment/locale/es.js ***!
  33060. \******************************************/
  33061. /*! no static exports found */
  33062. /***/ (function(module, exports, __webpack_require__) {
  33063. //! moment.js locale configuration
  33064. //! locale : Spanish [es]
  33065. //! author : Julio Napurí : https://github.com/julionc
  33066. ;(function (global, factory) {
  33067. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  33068. undefined
  33069. }(this, (function (moment) { 'use strict';
  33070. var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_');
  33071. var monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_');
  33072. var monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i];
  33073. var monthsRegex = /^(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;
  33074. var es = moment.defineLocale('es', {
  33075. months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
  33076. monthsShort : function (m, format) {
  33077. if (!m) {
  33078. return monthsShortDot;
  33079. } else if (/-MMM-/.test(format)) {
  33080. return monthsShort[m.month()];
  33081. } else {
  33082. return monthsShortDot[m.month()];
  33083. }
  33084. },
  33085. monthsRegex : monthsRegex,
  33086. monthsShortRegex : monthsRegex,
  33087. monthsStrictRegex : /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
  33088. monthsShortStrictRegex : /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,
  33089. monthsParse : monthsParse,
  33090. longMonthsParse : monthsParse,
  33091. shortMonthsParse : monthsParse,
  33092. weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
  33093. weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
  33094. weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'),
  33095. weekdaysParseExact : true,
  33096. longDateFormat : {
  33097. LT : 'H:mm',
  33098. LTS : 'H:mm:ss',
  33099. L : 'DD/MM/YYYY',
  33100. LL : 'D [de] MMMM [de] YYYY',
  33101. LLL : 'D [de] MMMM [de] YYYY H:mm',
  33102. LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm'
  33103. },
  33104. calendar : {
  33105. sameDay : function () {
  33106. return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  33107. },
  33108. nextDay : function () {
  33109. return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  33110. },
  33111. nextWeek : function () {
  33112. return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  33113. },
  33114. lastDay : function () {
  33115. return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  33116. },
  33117. lastWeek : function () {
  33118. return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
  33119. },
  33120. sameElse : 'L'
  33121. },
  33122. relativeTime : {
  33123. future : 'en %s',
  33124. past : 'hace %s',
  33125. s : 'unos segundos',
  33126. m : 'un minuto',
  33127. mm : '%d minutos',
  33128. h : 'una hora',
  33129. hh : '%d horas',
  33130. d : 'un día',
  33131. dd : '%d días',
  33132. M : 'un mes',
  33133. MM : '%d meses',
  33134. y : 'un año',
  33135. yy : '%d años'
  33136. },
  33137. dayOfMonthOrdinalParse : /\d{1,2}º/,
  33138. ordinal : '%dº',
  33139. week : {
  33140. dow : 1, // Monday is the first day of the week.
  33141. doy : 4 // The week that contains Jan 4th is the first week of the year.
  33142. }
  33143. });
  33144. return es;
  33145. })));
  33146. /***/ }),
  33147. /***/ "./node_modules/moment/locale/et.js":
  33148. /*!******************************************!*\
  33149. !*** ./node_modules/moment/locale/et.js ***!
  33150. \******************************************/
  33151. /*! no static exports found */
  33152. /***/ (function(module, exports, __webpack_require__) {
  33153. //! moment.js locale configuration
  33154. //! locale : Estonian [et]
  33155. //! author : Henry Kehlmann : https://github.com/madhenry
  33156. //! improvements : Illimar Tambek : https://github.com/ragulka
  33157. ;(function (global, factory) {
  33158. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  33159. undefined
  33160. }(this, (function (moment) { 'use strict';
  33161. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  33162. var format = {
  33163. 's' : ['mõne sekundi', 'mõni sekund', 'paar sekundit'],
  33164. 'm' : ['ühe minuti', 'üks minut'],
  33165. 'mm': [number + ' minuti', number + ' minutit'],
  33166. 'h' : ['ühe tunni', 'tund aega', 'üks tund'],
  33167. 'hh': [number + ' tunni', number + ' tundi'],
  33168. 'd' : ['ühe päeva', 'üks päev'],
  33169. 'M' : ['kuu aja', 'kuu aega', 'üks kuu'],
  33170. 'MM': [number + ' kuu', number + ' kuud'],
  33171. 'y' : ['ühe aasta', 'aasta', 'üks aasta'],
  33172. 'yy': [number + ' aasta', number + ' aastat']
  33173. };
  33174. if (withoutSuffix) {
  33175. return format[key][2] ? format[key][2] : format[key][1];
  33176. }
  33177. return isFuture ? format[key][0] : format[key][1];
  33178. }
  33179. var et = moment.defineLocale('et', {
  33180. months : 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'),
  33181. monthsShort : 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),
  33182. weekdays : 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'),
  33183. weekdaysShort : 'P_E_T_K_N_R_L'.split('_'),
  33184. weekdaysMin : 'P_E_T_K_N_R_L'.split('_'),
  33185. longDateFormat : {
  33186. LT : 'H:mm',
  33187. LTS : 'H:mm:ss',
  33188. L : 'DD.MM.YYYY',
  33189. LL : 'D. MMMM YYYY',
  33190. LLL : 'D. MMMM YYYY H:mm',
  33191. LLLL : 'dddd, D. MMMM YYYY H:mm'
  33192. },
  33193. calendar : {
  33194. sameDay : '[Täna,] LT',
  33195. nextDay : '[Homme,] LT',
  33196. nextWeek : '[Järgmine] dddd LT',
  33197. lastDay : '[Eile,] LT',
  33198. lastWeek : '[Eelmine] dddd LT',
  33199. sameElse : 'L'
  33200. },
  33201. relativeTime : {
  33202. future : '%s pärast',
  33203. past : '%s tagasi',
  33204. s : processRelativeTime,
  33205. m : processRelativeTime,
  33206. mm : processRelativeTime,
  33207. h : processRelativeTime,
  33208. hh : processRelativeTime,
  33209. d : processRelativeTime,
  33210. dd : '%d päeva',
  33211. M : processRelativeTime,
  33212. MM : processRelativeTime,
  33213. y : processRelativeTime,
  33214. yy : processRelativeTime
  33215. },
  33216. dayOfMonthOrdinalParse: /\d{1,2}\./,
  33217. ordinal : '%d.',
  33218. week : {
  33219. dow : 1, // Monday is the first day of the week.
  33220. doy : 4 // The week that contains Jan 4th is the first week of the year.
  33221. }
  33222. });
  33223. return et;
  33224. })));
  33225. /***/ }),
  33226. /***/ "./node_modules/moment/locale/eu.js":
  33227. /*!******************************************!*\
  33228. !*** ./node_modules/moment/locale/eu.js ***!
  33229. \******************************************/
  33230. /*! no static exports found */
  33231. /***/ (function(module, exports, __webpack_require__) {
  33232. //! moment.js locale configuration
  33233. //! locale : Basque [eu]
  33234. //! author : Eneko Illarramendi : https://github.com/eillarra
  33235. ;(function (global, factory) {
  33236. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  33237. undefined
  33238. }(this, (function (moment) { 'use strict';
  33239. var eu = moment.defineLocale('eu', {
  33240. months : 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'),
  33241. monthsShort : 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'),
  33242. monthsParseExact : true,
  33243. weekdays : 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'),
  33244. weekdaysShort : 'ig._al._ar._az._og._ol._lr.'.split('_'),
  33245. weekdaysMin : 'ig_al_ar_az_og_ol_lr'.split('_'),
  33246. weekdaysParseExact : true,
  33247. longDateFormat : {
  33248. LT : 'HH:mm',
  33249. LTS : 'HH:mm:ss',
  33250. L : 'YYYY-MM-DD',
  33251. LL : 'YYYY[ko] MMMM[ren] D[a]',
  33252. LLL : 'YYYY[ko] MMMM[ren] D[a] HH:mm',
  33253. LLLL : 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',
  33254. l : 'YYYY-M-D',
  33255. ll : 'YYYY[ko] MMM D[a]',
  33256. lll : 'YYYY[ko] MMM D[a] HH:mm',
  33257. llll : 'ddd, YYYY[ko] MMM D[a] HH:mm'
  33258. },
  33259. calendar : {
  33260. sameDay : '[gaur] LT[etan]',
  33261. nextDay : '[bihar] LT[etan]',
  33262. nextWeek : 'dddd LT[etan]',
  33263. lastDay : '[atzo] LT[etan]',
  33264. lastWeek : '[aurreko] dddd LT[etan]',
  33265. sameElse : 'L'
  33266. },
  33267. relativeTime : {
  33268. future : '%s barru',
  33269. past : 'duela %s',
  33270. s : 'segundo batzuk',
  33271. m : 'minutu bat',
  33272. mm : '%d minutu',
  33273. h : 'ordu bat',
  33274. hh : '%d ordu',
  33275. d : 'egun bat',
  33276. dd : '%d egun',
  33277. M : 'hilabete bat',
  33278. MM : '%d hilabete',
  33279. y : 'urte bat',
  33280. yy : '%d urte'
  33281. },
  33282. dayOfMonthOrdinalParse: /\d{1,2}\./,
  33283. ordinal : '%d.',
  33284. week : {
  33285. dow : 1, // Monday is the first day of the week.
  33286. doy : 7 // The week that contains Jan 1st is the first week of the year.
  33287. }
  33288. });
  33289. return eu;
  33290. })));
  33291. /***/ }),
  33292. /***/ "./node_modules/moment/locale/fa.js":
  33293. /*!******************************************!*\
  33294. !*** ./node_modules/moment/locale/fa.js ***!
  33295. \******************************************/
  33296. /*! no static exports found */
  33297. /***/ (function(module, exports, __webpack_require__) {
  33298. //! moment.js locale configuration
  33299. //! locale : Persian [fa]
  33300. //! author : Ebrahim Byagowi : https://github.com/ebraminio
  33301. ;(function (global, factory) {
  33302. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  33303. undefined
  33304. }(this, (function (moment) { 'use strict';
  33305. var symbolMap = {
  33306. '1': '۱',
  33307. '2': '۲',
  33308. '3': '۳',
  33309. '4': '۴',
  33310. '5': '۵',
  33311. '6': '۶',
  33312. '7': '۷',
  33313. '8': '۸',
  33314. '9': '۹',
  33315. '0': '۰'
  33316. };
  33317. var numberMap = {
  33318. '۱': '1',
  33319. '۲': '2',
  33320. '۳': '3',
  33321. '۴': '4',
  33322. '۵': '5',
  33323. '۶': '6',
  33324. '۷': '7',
  33325. '۸': '8',
  33326. '۹': '9',
  33327. '۰': '0'
  33328. };
  33329. var fa = moment.defineLocale('fa', {
  33330. months : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),
  33331. monthsShort : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),
  33332. weekdays : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'),
  33333. weekdaysShort : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'),
  33334. weekdaysMin : 'ی_د_س_چ_پ_ج_ش'.split('_'),
  33335. weekdaysParseExact : true,
  33336. longDateFormat : {
  33337. LT : 'HH:mm',
  33338. LTS : 'HH:mm:ss',
  33339. L : 'DD/MM/YYYY',
  33340. LL : 'D MMMM YYYY',
  33341. LLL : 'D MMMM YYYY HH:mm',
  33342. LLLL : 'dddd, D MMMM YYYY HH:mm'
  33343. },
  33344. meridiemParse: /قبل از ظهر|بعد از ظهر/,
  33345. isPM: function (input) {
  33346. return /بعد از ظهر/.test(input);
  33347. },
  33348. meridiem : function (hour, minute, isLower) {
  33349. if (hour < 12) {
  33350. return 'قبل از ظهر';
  33351. } else {
  33352. return 'بعد از ظهر';
  33353. }
  33354. },
  33355. calendar : {
  33356. sameDay : '[امروز ساعت] LT',
  33357. nextDay : '[فردا ساعت] LT',
  33358. nextWeek : 'dddd [ساعت] LT',
  33359. lastDay : '[دیروز ساعت] LT',
  33360. lastWeek : 'dddd [پیش] [ساعت] LT',
  33361. sameElse : 'L'
  33362. },
  33363. relativeTime : {
  33364. future : 'در %s',
  33365. past : '%s پیش',
  33366. s : 'چند ثانیه',
  33367. m : 'یک دقیقه',
  33368. mm : '%d دقیقه',
  33369. h : 'یک ساعت',
  33370. hh : '%d ساعت',
  33371. d : 'یک روز',
  33372. dd : '%d روز',
  33373. M : 'یک ماه',
  33374. MM : '%d ماه',
  33375. y : 'یک سال',
  33376. yy : '%d سال'
  33377. },
  33378. preparse: function (string) {
  33379. return string.replace(/[۰-۹]/g, function (match) {
  33380. return numberMap[match];
  33381. }).replace(/،/g, ',');
  33382. },
  33383. postformat: function (string) {
  33384. return string.replace(/\d/g, function (match) {
  33385. return symbolMap[match];
  33386. }).replace(/,/g, '،');
  33387. },
  33388. dayOfMonthOrdinalParse: /\d{1,2}م/,
  33389. ordinal : '%dم',
  33390. week : {
  33391. dow : 6, // Saturday is the first day of the week.
  33392. doy : 12 // The week that contains Jan 1st is the first week of the year.
  33393. }
  33394. });
  33395. return fa;
  33396. })));
  33397. /***/ }),
  33398. /***/ "./node_modules/moment/locale/fi.js":
  33399. /*!******************************************!*\
  33400. !*** ./node_modules/moment/locale/fi.js ***!
  33401. \******************************************/
  33402. /*! no static exports found */
  33403. /***/ (function(module, exports, __webpack_require__) {
  33404. //! moment.js locale configuration
  33405. //! locale : Finnish [fi]
  33406. //! author : Tarmo Aidantausta : https://github.com/bleadof
  33407. ;(function (global, factory) {
  33408. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  33409. undefined
  33410. }(this, (function (moment) { 'use strict';
  33411. var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' ');
  33412. var numbersFuture = [
  33413. 'nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden',
  33414. numbersPast[7], numbersPast[8], numbersPast[9]
  33415. ];
  33416. function translate(number, withoutSuffix, key, isFuture) {
  33417. var result = '';
  33418. switch (key) {
  33419. case 's':
  33420. return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
  33421. case 'm':
  33422. return isFuture ? 'minuutin' : 'minuutti';
  33423. case 'mm':
  33424. result = isFuture ? 'minuutin' : 'minuuttia';
  33425. break;
  33426. case 'h':
  33427. return isFuture ? 'tunnin' : 'tunti';
  33428. case 'hh':
  33429. result = isFuture ? 'tunnin' : 'tuntia';
  33430. break;
  33431. case 'd':
  33432. return isFuture ? 'päivän' : 'päivä';
  33433. case 'dd':
  33434. result = isFuture ? 'päivän' : 'päivää';
  33435. break;
  33436. case 'M':
  33437. return isFuture ? 'kuukauden' : 'kuukausi';
  33438. case 'MM':
  33439. result = isFuture ? 'kuukauden' : 'kuukautta';
  33440. break;
  33441. case 'y':
  33442. return isFuture ? 'vuoden' : 'vuosi';
  33443. case 'yy':
  33444. result = isFuture ? 'vuoden' : 'vuotta';
  33445. break;
  33446. }
  33447. result = verbalNumber(number, isFuture) + ' ' + result;
  33448. return result;
  33449. }
  33450. function verbalNumber(number, isFuture) {
  33451. return number < 10 ? (isFuture ? numbersFuture[number] : numbersPast[number]) : number;
  33452. }
  33453. var fi = moment.defineLocale('fi', {
  33454. months : 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'),
  33455. monthsShort : 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'),
  33456. weekdays : 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'),
  33457. weekdaysShort : 'su_ma_ti_ke_to_pe_la'.split('_'),
  33458. weekdaysMin : 'su_ma_ti_ke_to_pe_la'.split('_'),
  33459. longDateFormat : {
  33460. LT : 'HH.mm',
  33461. LTS : 'HH.mm.ss',
  33462. L : 'DD.MM.YYYY',
  33463. LL : 'Do MMMM[ta] YYYY',
  33464. LLL : 'Do MMMM[ta] YYYY, [klo] HH.mm',
  33465. LLLL : 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',
  33466. l : 'D.M.YYYY',
  33467. ll : 'Do MMM YYYY',
  33468. lll : 'Do MMM YYYY, [klo] HH.mm',
  33469. llll : 'ddd, Do MMM YYYY, [klo] HH.mm'
  33470. },
  33471. calendar : {
  33472. sameDay : '[tänään] [klo] LT',
  33473. nextDay : '[huomenna] [klo] LT',
  33474. nextWeek : 'dddd [klo] LT',
  33475. lastDay : '[eilen] [klo] LT',
  33476. lastWeek : '[viime] dddd[na] [klo] LT',
  33477. sameElse : 'L'
  33478. },
  33479. relativeTime : {
  33480. future : '%s päästä',
  33481. past : '%s sitten',
  33482. s : translate,
  33483. m : translate,
  33484. mm : translate,
  33485. h : translate,
  33486. hh : translate,
  33487. d : translate,
  33488. dd : translate,
  33489. M : translate,
  33490. MM : translate,
  33491. y : translate,
  33492. yy : translate
  33493. },
  33494. dayOfMonthOrdinalParse: /\d{1,2}\./,
  33495. ordinal : '%d.',
  33496. week : {
  33497. dow : 1, // Monday is the first day of the week.
  33498. doy : 4 // The week that contains Jan 4th is the first week of the year.
  33499. }
  33500. });
  33501. return fi;
  33502. })));
  33503. /***/ }),
  33504. /***/ "./node_modules/moment/locale/fo.js":
  33505. /*!******************************************!*\
  33506. !*** ./node_modules/moment/locale/fo.js ***!
  33507. \******************************************/
  33508. /*! no static exports found */
  33509. /***/ (function(module, exports, __webpack_require__) {
  33510. //! moment.js locale configuration
  33511. //! locale : Faroese [fo]
  33512. //! author : Ragnar Johannesen : https://github.com/ragnar123
  33513. ;(function (global, factory) {
  33514. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  33515. undefined
  33516. }(this, (function (moment) { 'use strict';
  33517. var fo = moment.defineLocale('fo', {
  33518. months : 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
  33519. monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
  33520. weekdays : 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'),
  33521. weekdaysShort : 'sun_mán_týs_mik_hós_frí_ley'.split('_'),
  33522. weekdaysMin : 'su_má_tý_mi_hó_fr_le'.split('_'),
  33523. longDateFormat : {
  33524. LT : 'HH:mm',
  33525. LTS : 'HH:mm:ss',
  33526. L : 'DD/MM/YYYY',
  33527. LL : 'D MMMM YYYY',
  33528. LLL : 'D MMMM YYYY HH:mm',
  33529. LLLL : 'dddd D. MMMM, YYYY HH:mm'
  33530. },
  33531. calendar : {
  33532. sameDay : '[Í dag kl.] LT',
  33533. nextDay : '[Í morgin kl.] LT',
  33534. nextWeek : 'dddd [kl.] LT',
  33535. lastDay : '[Í gjár kl.] LT',
  33536. lastWeek : '[síðstu] dddd [kl] LT',
  33537. sameElse : 'L'
  33538. },
  33539. relativeTime : {
  33540. future : 'um %s',
  33541. past : '%s síðani',
  33542. s : 'fá sekund',
  33543. m : 'ein minutt',
  33544. mm : '%d minuttir',
  33545. h : 'ein tími',
  33546. hh : '%d tímar',
  33547. d : 'ein dagur',
  33548. dd : '%d dagar',
  33549. M : 'ein mánaði',
  33550. MM : '%d mánaðir',
  33551. y : 'eitt ár',
  33552. yy : '%d ár'
  33553. },
  33554. dayOfMonthOrdinalParse: /\d{1,2}\./,
  33555. ordinal : '%d.',
  33556. week : {
  33557. dow : 1, // Monday is the first day of the week.
  33558. doy : 4 // The week that contains Jan 4th is the first week of the year.
  33559. }
  33560. });
  33561. return fo;
  33562. })));
  33563. /***/ }),
  33564. /***/ "./node_modules/moment/locale/fr-ca.js":
  33565. /*!*********************************************!*\
  33566. !*** ./node_modules/moment/locale/fr-ca.js ***!
  33567. \*********************************************/
  33568. /*! no static exports found */
  33569. /***/ (function(module, exports, __webpack_require__) {
  33570. //! moment.js locale configuration
  33571. //! locale : French (Canada) [fr-ca]
  33572. //! author : Jonathan Abourbih : https://github.com/jonbca
  33573. ;(function (global, factory) {
  33574. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  33575. undefined
  33576. }(this, (function (moment) { 'use strict';
  33577. var frCa = moment.defineLocale('fr-ca', {
  33578. months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
  33579. monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
  33580. monthsParseExact : true,
  33581. weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
  33582. weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
  33583. weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),
  33584. weekdaysParseExact : true,
  33585. longDateFormat : {
  33586. LT : 'HH:mm',
  33587. LTS : 'HH:mm:ss',
  33588. L : 'YYYY-MM-DD',
  33589. LL : 'D MMMM YYYY',
  33590. LLL : 'D MMMM YYYY HH:mm',
  33591. LLLL : 'dddd D MMMM YYYY HH:mm'
  33592. },
  33593. calendar : {
  33594. sameDay : '[Aujourd’hui à] LT',
  33595. nextDay : '[Demain à] LT',
  33596. nextWeek : 'dddd [à] LT',
  33597. lastDay : '[Hier à] LT',
  33598. lastWeek : 'dddd [dernier à] LT',
  33599. sameElse : 'L'
  33600. },
  33601. relativeTime : {
  33602. future : 'dans %s',
  33603. past : 'il y a %s',
  33604. s : 'quelques secondes',
  33605. m : 'une minute',
  33606. mm : '%d minutes',
  33607. h : 'une heure',
  33608. hh : '%d heures',
  33609. d : 'un jour',
  33610. dd : '%d jours',
  33611. M : 'un mois',
  33612. MM : '%d mois',
  33613. y : 'un an',
  33614. yy : '%d ans'
  33615. },
  33616. dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
  33617. ordinal : function (number, period) {
  33618. switch (period) {
  33619. // Words with masculine grammatical gender: mois, trimestre, jour
  33620. default:
  33621. case 'M':
  33622. case 'Q':
  33623. case 'D':
  33624. case 'DDD':
  33625. case 'd':
  33626. return number + (number === 1 ? 'er' : 'e');
  33627. // Words with feminine grammatical gender: semaine
  33628. case 'w':
  33629. case 'W':
  33630. return number + (number === 1 ? 're' : 'e');
  33631. }
  33632. }
  33633. });
  33634. return frCa;
  33635. })));
  33636. /***/ }),
  33637. /***/ "./node_modules/moment/locale/fr-ch.js":
  33638. /*!*********************************************!*\
  33639. !*** ./node_modules/moment/locale/fr-ch.js ***!
  33640. \*********************************************/
  33641. /*! no static exports found */
  33642. /***/ (function(module, exports, __webpack_require__) {
  33643. //! moment.js locale configuration
  33644. //! locale : French (Switzerland) [fr-ch]
  33645. //! author : Gaspard Bucher : https://github.com/gaspard
  33646. ;(function (global, factory) {
  33647. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  33648. undefined
  33649. }(this, (function (moment) { 'use strict';
  33650. var frCh = moment.defineLocale('fr-ch', {
  33651. months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
  33652. monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
  33653. monthsParseExact : true,
  33654. weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
  33655. weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
  33656. weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),
  33657. weekdaysParseExact : true,
  33658. longDateFormat : {
  33659. LT : 'HH:mm',
  33660. LTS : 'HH:mm:ss',
  33661. L : 'DD.MM.YYYY',
  33662. LL : 'D MMMM YYYY',
  33663. LLL : 'D MMMM YYYY HH:mm',
  33664. LLLL : 'dddd D MMMM YYYY HH:mm'
  33665. },
  33666. calendar : {
  33667. sameDay : '[Aujourd’hui à] LT',
  33668. nextDay : '[Demain à] LT',
  33669. nextWeek : 'dddd [à] LT',
  33670. lastDay : '[Hier à] LT',
  33671. lastWeek : 'dddd [dernier à] LT',
  33672. sameElse : 'L'
  33673. },
  33674. relativeTime : {
  33675. future : 'dans %s',
  33676. past : 'il y a %s',
  33677. s : 'quelques secondes',
  33678. m : 'une minute',
  33679. mm : '%d minutes',
  33680. h : 'une heure',
  33681. hh : '%d heures',
  33682. d : 'un jour',
  33683. dd : '%d jours',
  33684. M : 'un mois',
  33685. MM : '%d mois',
  33686. y : 'un an',
  33687. yy : '%d ans'
  33688. },
  33689. dayOfMonthOrdinalParse: /\d{1,2}(er|e)/,
  33690. ordinal : function (number, period) {
  33691. switch (period) {
  33692. // Words with masculine grammatical gender: mois, trimestre, jour
  33693. default:
  33694. case 'M':
  33695. case 'Q':
  33696. case 'D':
  33697. case 'DDD':
  33698. case 'd':
  33699. return number + (number === 1 ? 'er' : 'e');
  33700. // Words with feminine grammatical gender: semaine
  33701. case 'w':
  33702. case 'W':
  33703. return number + (number === 1 ? 're' : 'e');
  33704. }
  33705. },
  33706. week : {
  33707. dow : 1, // Monday is the first day of the week.
  33708. doy : 4 // The week that contains Jan 4th is the first week of the year.
  33709. }
  33710. });
  33711. return frCh;
  33712. })));
  33713. /***/ }),
  33714. /***/ "./node_modules/moment/locale/fr.js":
  33715. /*!******************************************!*\
  33716. !*** ./node_modules/moment/locale/fr.js ***!
  33717. \******************************************/
  33718. /*! no static exports found */
  33719. /***/ (function(module, exports, __webpack_require__) {
  33720. //! moment.js locale configuration
  33721. //! locale : French [fr]
  33722. //! author : John Fischer : https://github.com/jfroffice
  33723. ;(function (global, factory) {
  33724. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  33725. undefined
  33726. }(this, (function (moment) { 'use strict';
  33727. var fr = moment.defineLocale('fr', {
  33728. months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'),
  33729. monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'),
  33730. monthsParseExact : true,
  33731. weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
  33732. weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
  33733. weekdaysMin : 'Di_Lu_Ma_Me_Je_Ve_Sa'.split('_'),
  33734. weekdaysParseExact : true,
  33735. longDateFormat : {
  33736. LT : 'HH:mm',
  33737. LTS : 'HH:mm:ss',
  33738. L : 'DD/MM/YYYY',
  33739. LL : 'D MMMM YYYY',
  33740. LLL : 'D MMMM YYYY HH:mm',
  33741. LLLL : 'dddd D MMMM YYYY HH:mm'
  33742. },
  33743. calendar : {
  33744. sameDay : '[Aujourd’hui à] LT',
  33745. nextDay : '[Demain à] LT',
  33746. nextWeek : 'dddd [à] LT',
  33747. lastDay : '[Hier à] LT',
  33748. lastWeek : 'dddd [dernier à] LT',
  33749. sameElse : 'L'
  33750. },
  33751. relativeTime : {
  33752. future : 'dans %s',
  33753. past : 'il y a %s',
  33754. s : 'quelques secondes',
  33755. m : 'une minute',
  33756. mm : '%d minutes',
  33757. h : 'une heure',
  33758. hh : '%d heures',
  33759. d : 'un jour',
  33760. dd : '%d jours',
  33761. M : 'un mois',
  33762. MM : '%d mois',
  33763. y : 'un an',
  33764. yy : '%d ans'
  33765. },
  33766. dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
  33767. ordinal : function (number, period) {
  33768. switch (period) {
  33769. // TODO: Return 'e' when day of month > 1. Move this case inside
  33770. // block for masculine words below.
  33771. // See https://github.com/moment/moment/issues/3375
  33772. case 'D':
  33773. return number + (number === 1 ? 'er' : '');
  33774. // Words with masculine grammatical gender: mois, trimestre, jour
  33775. default:
  33776. case 'M':
  33777. case 'Q':
  33778. case 'DDD':
  33779. case 'd':
  33780. return number + (number === 1 ? 'er' : 'e');
  33781. // Words with feminine grammatical gender: semaine
  33782. case 'w':
  33783. case 'W':
  33784. return number + (number === 1 ? 're' : 'e');
  33785. }
  33786. },
  33787. week : {
  33788. dow : 1, // Monday is the first day of the week.
  33789. doy : 4 // The week that contains Jan 4th is the first week of the year.
  33790. }
  33791. });
  33792. return fr;
  33793. })));
  33794. /***/ }),
  33795. /***/ "./node_modules/moment/locale/fy.js":
  33796. /*!******************************************!*\
  33797. !*** ./node_modules/moment/locale/fy.js ***!
  33798. \******************************************/
  33799. /*! no static exports found */
  33800. /***/ (function(module, exports, __webpack_require__) {
  33801. //! moment.js locale configuration
  33802. //! locale : Frisian [fy]
  33803. //! author : Robin van der Vliet : https://github.com/robin0van0der0v
  33804. ;(function (global, factory) {
  33805. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  33806. undefined
  33807. }(this, (function (moment) { 'use strict';
  33808. var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_');
  33809. var monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');
  33810. var fy = moment.defineLocale('fy', {
  33811. months : 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'),
  33812. monthsShort : function (m, format) {
  33813. if (!m) {
  33814. return monthsShortWithDots;
  33815. } else if (/-MMM-/.test(format)) {
  33816. return monthsShortWithoutDots[m.month()];
  33817. } else {
  33818. return monthsShortWithDots[m.month()];
  33819. }
  33820. },
  33821. monthsParseExact : true,
  33822. weekdays : 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split('_'),
  33823. weekdaysShort : 'si._mo._ti._wo._to._fr._so.'.split('_'),
  33824. weekdaysMin : 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),
  33825. weekdaysParseExact : true,
  33826. longDateFormat : {
  33827. LT : 'HH:mm',
  33828. LTS : 'HH:mm:ss',
  33829. L : 'DD-MM-YYYY',
  33830. LL : 'D MMMM YYYY',
  33831. LLL : 'D MMMM YYYY HH:mm',
  33832. LLLL : 'dddd D MMMM YYYY HH:mm'
  33833. },
  33834. calendar : {
  33835. sameDay: '[hjoed om] LT',
  33836. nextDay: '[moarn om] LT',
  33837. nextWeek: 'dddd [om] LT',
  33838. lastDay: '[juster om] LT',
  33839. lastWeek: '[ôfrûne] dddd [om] LT',
  33840. sameElse: 'L'
  33841. },
  33842. relativeTime : {
  33843. future : 'oer %s',
  33844. past : '%s lyn',
  33845. s : 'in pear sekonden',
  33846. m : 'ien minút',
  33847. mm : '%d minuten',
  33848. h : 'ien oere',
  33849. hh : '%d oeren',
  33850. d : 'ien dei',
  33851. dd : '%d dagen',
  33852. M : 'ien moanne',
  33853. MM : '%d moannen',
  33854. y : 'ien jier',
  33855. yy : '%d jierren'
  33856. },
  33857. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  33858. ordinal : function (number) {
  33859. return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
  33860. },
  33861. week : {
  33862. dow : 1, // Monday is the first day of the week.
  33863. doy : 4 // The week that contains Jan 4th is the first week of the year.
  33864. }
  33865. });
  33866. return fy;
  33867. })));
  33868. /***/ }),
  33869. /***/ "./node_modules/moment/locale/gd.js":
  33870. /*!******************************************!*\
  33871. !*** ./node_modules/moment/locale/gd.js ***!
  33872. \******************************************/
  33873. /*! no static exports found */
  33874. /***/ (function(module, exports, __webpack_require__) {
  33875. //! moment.js locale configuration
  33876. //! locale : Scottish Gaelic [gd]
  33877. //! author : Jon Ashdown : https://github.com/jonashdown
  33878. ;(function (global, factory) {
  33879. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  33880. undefined
  33881. }(this, (function (moment) { 'use strict';
  33882. var months = [
  33883. 'Am Faoilleach', 'An Gearran', 'Am Màrt', 'An Giblean', 'An Cèitean', 'An t-Ògmhios', 'An t-Iuchar', 'An Lùnastal', 'An t-Sultain', 'An Dàmhair', 'An t-Samhain', 'An Dùbhlachd'
  33884. ];
  33885. var monthsShort = ['Faoi', 'Gear', 'Màrt', 'Gibl', 'Cèit', 'Ògmh', 'Iuch', 'Lùn', 'Sult', 'Dàmh', 'Samh', 'Dùbh'];
  33886. var weekdays = ['Didòmhnaich', 'Diluain', 'Dimàirt', 'Diciadain', 'Diardaoin', 'Dihaoine', 'Disathairne'];
  33887. var weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'];
  33888. var weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];
  33889. var gd = moment.defineLocale('gd', {
  33890. months : months,
  33891. monthsShort : monthsShort,
  33892. monthsParseExact : true,
  33893. weekdays : weekdays,
  33894. weekdaysShort : weekdaysShort,
  33895. weekdaysMin : weekdaysMin,
  33896. longDateFormat : {
  33897. LT : 'HH:mm',
  33898. LTS : 'HH:mm:ss',
  33899. L : 'DD/MM/YYYY',
  33900. LL : 'D MMMM YYYY',
  33901. LLL : 'D MMMM YYYY HH:mm',
  33902. LLLL : 'dddd, D MMMM YYYY HH:mm'
  33903. },
  33904. calendar : {
  33905. sameDay : '[An-diugh aig] LT',
  33906. nextDay : '[A-màireach aig] LT',
  33907. nextWeek : 'dddd [aig] LT',
  33908. lastDay : '[An-dè aig] LT',
  33909. lastWeek : 'dddd [seo chaidh] [aig] LT',
  33910. sameElse : 'L'
  33911. },
  33912. relativeTime : {
  33913. future : 'ann an %s',
  33914. past : 'bho chionn %s',
  33915. s : 'beagan diogan',
  33916. m : 'mionaid',
  33917. mm : '%d mionaidean',
  33918. h : 'uair',
  33919. hh : '%d uairean',
  33920. d : 'latha',
  33921. dd : '%d latha',
  33922. M : 'mìos',
  33923. MM : '%d mìosan',
  33924. y : 'bliadhna',
  33925. yy : '%d bliadhna'
  33926. },
  33927. dayOfMonthOrdinalParse : /\d{1,2}(d|na|mh)/,
  33928. ordinal : function (number) {
  33929. var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';
  33930. return number + output;
  33931. },
  33932. week : {
  33933. dow : 1, // Monday is the first day of the week.
  33934. doy : 4 // The week that contains Jan 4th is the first week of the year.
  33935. }
  33936. });
  33937. return gd;
  33938. })));
  33939. /***/ }),
  33940. /***/ "./node_modules/moment/locale/gl.js":
  33941. /*!******************************************!*\
  33942. !*** ./node_modules/moment/locale/gl.js ***!
  33943. \******************************************/
  33944. /*! no static exports found */
  33945. /***/ (function(module, exports, __webpack_require__) {
  33946. //! moment.js locale configuration
  33947. //! locale : Galician [gl]
  33948. //! author : Juan G. Hurtado : https://github.com/juanghurtado
  33949. ;(function (global, factory) {
  33950. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  33951. undefined
  33952. }(this, (function (moment) { 'use strict';
  33953. var gl = moment.defineLocale('gl', {
  33954. months : 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'),
  33955. monthsShort : 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split('_'),
  33956. monthsParseExact: true,
  33957. weekdays : 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),
  33958. weekdaysShort : 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),
  33959. weekdaysMin : 'do_lu_ma_mé_xo_ve_sá'.split('_'),
  33960. weekdaysParseExact : true,
  33961. longDateFormat : {
  33962. LT : 'H:mm',
  33963. LTS : 'H:mm:ss',
  33964. L : 'DD/MM/YYYY',
  33965. LL : 'D [de] MMMM [de] YYYY',
  33966. LLL : 'D [de] MMMM [de] YYYY H:mm',
  33967. LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm'
  33968. },
  33969. calendar : {
  33970. sameDay : function () {
  33971. return '[hoxe ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT';
  33972. },
  33973. nextDay : function () {
  33974. return '[mañá ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT';
  33975. },
  33976. nextWeek : function () {
  33977. return 'dddd [' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';
  33978. },
  33979. lastDay : function () {
  33980. return '[onte ' + ((this.hours() !== 1) ? 'á' : 'a') + '] LT';
  33981. },
  33982. lastWeek : function () {
  33983. return '[o] dddd [pasado ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';
  33984. },
  33985. sameElse : 'L'
  33986. },
  33987. relativeTime : {
  33988. future : function (str) {
  33989. if (str.indexOf('un') === 0) {
  33990. return 'n' + str;
  33991. }
  33992. return 'en ' + str;
  33993. },
  33994. past : 'hai %s',
  33995. s : 'uns segundos',
  33996. m : 'un minuto',
  33997. mm : '%d minutos',
  33998. h : 'unha hora',
  33999. hh : '%d horas',
  34000. d : 'un día',
  34001. dd : '%d días',
  34002. M : 'un mes',
  34003. MM : '%d meses',
  34004. y : 'un ano',
  34005. yy : '%d anos'
  34006. },
  34007. dayOfMonthOrdinalParse : /\d{1,2}º/,
  34008. ordinal : '%dº',
  34009. week : {
  34010. dow : 1, // Monday is the first day of the week.
  34011. doy : 4 // The week that contains Jan 4th is the first week of the year.
  34012. }
  34013. });
  34014. return gl;
  34015. })));
  34016. /***/ }),
  34017. /***/ "./node_modules/moment/locale/gom-latn.js":
  34018. /*!************************************************!*\
  34019. !*** ./node_modules/moment/locale/gom-latn.js ***!
  34020. \************************************************/
  34021. /*! no static exports found */
  34022. /***/ (function(module, exports, __webpack_require__) {
  34023. //! moment.js locale configuration
  34024. //! locale : Konkani Latin script [gom-latn]
  34025. //! author : The Discoverer : https://github.com/WikiDiscoverer
  34026. ;(function (global, factory) {
  34027. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  34028. undefined
  34029. }(this, (function (moment) { 'use strict';
  34030. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  34031. var format = {
  34032. 's': ['thodde secondanim', 'thodde second'],
  34033. 'm': ['eka mintan', 'ek minute'],
  34034. 'mm': [number + ' mintanim', number + ' mintam'],
  34035. 'h': ['eka horan', 'ek hor'],
  34036. 'hh': [number + ' horanim', number + ' hor'],
  34037. 'd': ['eka disan', 'ek dis'],
  34038. 'dd': [number + ' disanim', number + ' dis'],
  34039. 'M': ['eka mhoinean', 'ek mhoino'],
  34040. 'MM': [number + ' mhoineanim', number + ' mhoine'],
  34041. 'y': ['eka vorsan', 'ek voros'],
  34042. 'yy': [number + ' vorsanim', number + ' vorsam']
  34043. };
  34044. return withoutSuffix ? format[key][0] : format[key][1];
  34045. }
  34046. var gomLatn = moment.defineLocale('gom-latn', {
  34047. months : 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split('_'),
  34048. monthsShort : 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),
  34049. monthsParseExact : true,
  34050. weekdays : 'Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son\'var'.split('_'),
  34051. weekdaysShort : 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
  34052. weekdaysMin : 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
  34053. weekdaysParseExact : true,
  34054. longDateFormat : {
  34055. LT : 'A h:mm [vazta]',
  34056. LTS : 'A h:mm:ss [vazta]',
  34057. L : 'DD-MM-YYYY',
  34058. LL : 'D MMMM YYYY',
  34059. LLL : 'D MMMM YYYY A h:mm [vazta]',
  34060. LLLL : 'dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]',
  34061. llll: 'ddd, D MMM YYYY, A h:mm [vazta]'
  34062. },
  34063. calendar : {
  34064. sameDay: '[Aiz] LT',
  34065. nextDay: '[Faleam] LT',
  34066. nextWeek: '[Ieta to] dddd[,] LT',
  34067. lastDay: '[Kal] LT',
  34068. lastWeek: '[Fatlo] dddd[,] LT',
  34069. sameElse: 'L'
  34070. },
  34071. relativeTime : {
  34072. future : '%s',
  34073. past : '%s adim',
  34074. s : processRelativeTime,
  34075. m : processRelativeTime,
  34076. mm : processRelativeTime,
  34077. h : processRelativeTime,
  34078. hh : processRelativeTime,
  34079. d : processRelativeTime,
  34080. dd : processRelativeTime,
  34081. M : processRelativeTime,
  34082. MM : processRelativeTime,
  34083. y : processRelativeTime,
  34084. yy : processRelativeTime
  34085. },
  34086. dayOfMonthOrdinalParse : /\d{1,2}(er)/,
  34087. ordinal : function (number, period) {
  34088. switch (period) {
  34089. // the ordinal 'er' only applies to day of the month
  34090. case 'D':
  34091. return number + 'er';
  34092. default:
  34093. case 'M':
  34094. case 'Q':
  34095. case 'DDD':
  34096. case 'd':
  34097. case 'w':
  34098. case 'W':
  34099. return number;
  34100. }
  34101. },
  34102. week : {
  34103. dow : 1, // Monday is the first day of the week.
  34104. doy : 4 // The week that contains Jan 4th is the first week of the year.
  34105. },
  34106. meridiemParse: /rati|sokalli|donparam|sanje/,
  34107. meridiemHour : function (hour, meridiem) {
  34108. if (hour === 12) {
  34109. hour = 0;
  34110. }
  34111. if (meridiem === 'rati') {
  34112. return hour < 4 ? hour : hour + 12;
  34113. } else if (meridiem === 'sokalli') {
  34114. return hour;
  34115. } else if (meridiem === 'donparam') {
  34116. return hour > 12 ? hour : hour + 12;
  34117. } else if (meridiem === 'sanje') {
  34118. return hour + 12;
  34119. }
  34120. },
  34121. meridiem : function (hour, minute, isLower) {
  34122. if (hour < 4) {
  34123. return 'rati';
  34124. } else if (hour < 12) {
  34125. return 'sokalli';
  34126. } else if (hour < 16) {
  34127. return 'donparam';
  34128. } else if (hour < 20) {
  34129. return 'sanje';
  34130. } else {
  34131. return 'rati';
  34132. }
  34133. }
  34134. });
  34135. return gomLatn;
  34136. })));
  34137. /***/ }),
  34138. /***/ "./node_modules/moment/locale/gu.js":
  34139. /*!******************************************!*\
  34140. !*** ./node_modules/moment/locale/gu.js ***!
  34141. \******************************************/
  34142. /*! no static exports found */
  34143. /***/ (function(module, exports, __webpack_require__) {
  34144. //! moment.js locale configuration
  34145. //! locale : Gujarati [gu]
  34146. //! author : Kaushik Thanki : https://github.com/Kaushik1987
  34147. ;(function (global, factory) {
  34148. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  34149. undefined
  34150. }(this, (function (moment) { 'use strict';
  34151. var symbolMap = {
  34152. '1': '૧',
  34153. '2': '૨',
  34154. '3': '૩',
  34155. '4': '૪',
  34156. '5': '૫',
  34157. '6': '૬',
  34158. '7': '૭',
  34159. '8': '૮',
  34160. '9': '૯',
  34161. '0': '૦'
  34162. };
  34163. var numberMap = {
  34164. '૧': '1',
  34165. '૨': '2',
  34166. '૩': '3',
  34167. '૪': '4',
  34168. '૫': '5',
  34169. '૬': '6',
  34170. '૭': '7',
  34171. '૮': '8',
  34172. '૯': '9',
  34173. '૦': '0'
  34174. };
  34175. var gu = moment.defineLocale('gu', {
  34176. months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split('_'),
  34177. monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split('_'),
  34178. monthsParseExact: true,
  34179. weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split('_'),
  34180. weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),
  34181. weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),
  34182. longDateFormat: {
  34183. LT: 'A h:mm વાગ્યે',
  34184. LTS: 'A h:mm:ss વાગ્યે',
  34185. L: 'DD/MM/YYYY',
  34186. LL: 'D MMMM YYYY',
  34187. LLL: 'D MMMM YYYY, A h:mm વાગ્યે',
  34188. LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે'
  34189. },
  34190. calendar: {
  34191. sameDay: '[આજ] LT',
  34192. nextDay: '[કાલે] LT',
  34193. nextWeek: 'dddd, LT',
  34194. lastDay: '[ગઇકાલે] LT',
  34195. lastWeek: '[પાછલા] dddd, LT',
  34196. sameElse: 'L'
  34197. },
  34198. relativeTime: {
  34199. future: '%s મા',
  34200. past: '%s પેહલા',
  34201. s: 'અમુક પળો',
  34202. m: 'એક મિનિટ',
  34203. mm: '%d મિનિટ',
  34204. h: 'એક કલાક',
  34205. hh: '%d કલાક',
  34206. d: 'એક દિવસ',
  34207. dd: '%d દિવસ',
  34208. M: 'એક મહિનો',
  34209. MM: '%d મહિનો',
  34210. y: 'એક વર્ષ',
  34211. yy: '%d વર્ષ'
  34212. },
  34213. preparse: function (string) {
  34214. return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {
  34215. return numberMap[match];
  34216. });
  34217. },
  34218. postformat: function (string) {
  34219. return string.replace(/\d/g, function (match) {
  34220. return symbolMap[match];
  34221. });
  34222. },
  34223. // Gujarati notation for meridiems are quite fuzzy in practice. While there exists
  34224. // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.
  34225. meridiemParse: /રાત|બપોર|સવાર|સાંજ/,
  34226. meridiemHour: function (hour, meridiem) {
  34227. if (hour === 12) {
  34228. hour = 0;
  34229. }
  34230. if (meridiem === 'રાત') {
  34231. return hour < 4 ? hour : hour + 12;
  34232. } else if (meridiem === 'સવાર') {
  34233. return hour;
  34234. } else if (meridiem === 'બપોર') {
  34235. return hour >= 10 ? hour : hour + 12;
  34236. } else if (meridiem === 'સાંજ') {
  34237. return hour + 12;
  34238. }
  34239. },
  34240. meridiem: function (hour, minute, isLower) {
  34241. if (hour < 4) {
  34242. return 'રાત';
  34243. } else if (hour < 10) {
  34244. return 'સવાર';
  34245. } else if (hour < 17) {
  34246. return 'બપોર';
  34247. } else if (hour < 20) {
  34248. return 'સાંજ';
  34249. } else {
  34250. return 'રાત';
  34251. }
  34252. },
  34253. week: {
  34254. dow: 0, // Sunday is the first day of the week.
  34255. doy: 6 // The week that contains Jan 1st is the first week of the year.
  34256. }
  34257. });
  34258. return gu;
  34259. })));
  34260. /***/ }),
  34261. /***/ "./node_modules/moment/locale/he.js":
  34262. /*!******************************************!*\
  34263. !*** ./node_modules/moment/locale/he.js ***!
  34264. \******************************************/
  34265. /*! no static exports found */
  34266. /***/ (function(module, exports, __webpack_require__) {
  34267. //! moment.js locale configuration
  34268. //! locale : Hebrew [he]
  34269. //! author : Tomer Cohen : https://github.com/tomer
  34270. //! author : Moshe Simantov : https://github.com/DevelopmentIL
  34271. //! author : Tal Ater : https://github.com/TalAter
  34272. ;(function (global, factory) {
  34273. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  34274. undefined
  34275. }(this, (function (moment) { 'use strict';
  34276. var he = moment.defineLocale('he', {
  34277. months : 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'),
  34278. monthsShort : 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),
  34279. weekdays : 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),
  34280. weekdaysShort : 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),
  34281. weekdaysMin : 'א_ב_ג_ד_ה_ו_ש'.split('_'),
  34282. longDateFormat : {
  34283. LT : 'HH:mm',
  34284. LTS : 'HH:mm:ss',
  34285. L : 'DD/MM/YYYY',
  34286. LL : 'D [ב]MMMM YYYY',
  34287. LLL : 'D [ב]MMMM YYYY HH:mm',
  34288. LLLL : 'dddd, D [ב]MMMM YYYY HH:mm',
  34289. l : 'D/M/YYYY',
  34290. ll : 'D MMM YYYY',
  34291. lll : 'D MMM YYYY HH:mm',
  34292. llll : 'ddd, D MMM YYYY HH:mm'
  34293. },
  34294. calendar : {
  34295. sameDay : '[היום ב־]LT',
  34296. nextDay : '[מחר ב־]LT',
  34297. nextWeek : 'dddd [בשעה] LT',
  34298. lastDay : '[אתמול ב־]LT',
  34299. lastWeek : '[ביום] dddd [האחרון בשעה] LT',
  34300. sameElse : 'L'
  34301. },
  34302. relativeTime : {
  34303. future : 'בעוד %s',
  34304. past : 'לפני %s',
  34305. s : 'מספר שניות',
  34306. m : 'דקה',
  34307. mm : '%d דקות',
  34308. h : 'שעה',
  34309. hh : function (number) {
  34310. if (number === 2) {
  34311. return 'שעתיים';
  34312. }
  34313. return number + ' שעות';
  34314. },
  34315. d : 'יום',
  34316. dd : function (number) {
  34317. if (number === 2) {
  34318. return 'יומיים';
  34319. }
  34320. return number + ' ימים';
  34321. },
  34322. M : 'חודש',
  34323. MM : function (number) {
  34324. if (number === 2) {
  34325. return 'חודשיים';
  34326. }
  34327. return number + ' חודשים';
  34328. },
  34329. y : 'שנה',
  34330. yy : function (number) {
  34331. if (number === 2) {
  34332. return 'שנתיים';
  34333. } else if (number % 10 === 0 && number !== 10) {
  34334. return number + ' שנה';
  34335. }
  34336. return number + ' שנים';
  34337. }
  34338. },
  34339. meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,
  34340. isPM : function (input) {
  34341. return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input);
  34342. },
  34343. meridiem : function (hour, minute, isLower) {
  34344. if (hour < 5) {
  34345. return 'לפנות בוקר';
  34346. } else if (hour < 10) {
  34347. return 'בבוקר';
  34348. } else if (hour < 12) {
  34349. return isLower ? 'לפנה"צ' : 'לפני הצהריים';
  34350. } else if (hour < 18) {
  34351. return isLower ? 'אחה"צ' : 'אחרי הצהריים';
  34352. } else {
  34353. return 'בערב';
  34354. }
  34355. }
  34356. });
  34357. return he;
  34358. })));
  34359. /***/ }),
  34360. /***/ "./node_modules/moment/locale/hi.js":
  34361. /*!******************************************!*\
  34362. !*** ./node_modules/moment/locale/hi.js ***!
  34363. \******************************************/
  34364. /*! no static exports found */
  34365. /***/ (function(module, exports, __webpack_require__) {
  34366. //! moment.js locale configuration
  34367. //! locale : Hindi [hi]
  34368. //! author : Mayank Singhal : https://github.com/mayanksinghal
  34369. ;(function (global, factory) {
  34370. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  34371. undefined
  34372. }(this, (function (moment) { 'use strict';
  34373. var symbolMap = {
  34374. '1': '१',
  34375. '2': '२',
  34376. '3': '३',
  34377. '4': '४',
  34378. '5': '५',
  34379. '6': '६',
  34380. '7': '७',
  34381. '8': '८',
  34382. '9': '९',
  34383. '0': '०'
  34384. };
  34385. var numberMap = {
  34386. '१': '1',
  34387. '२': '2',
  34388. '३': '3',
  34389. '४': '4',
  34390. '५': '5',
  34391. '६': '6',
  34392. '७': '7',
  34393. '८': '8',
  34394. '९': '9',
  34395. '०': '0'
  34396. };
  34397. var hi = moment.defineLocale('hi', {
  34398. months : 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'),
  34399. monthsShort : 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
  34400. monthsParseExact: true,
  34401. weekdays : 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
  34402. weekdaysShort : 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
  34403. weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'),
  34404. longDateFormat : {
  34405. LT : 'A h:mm बजे',
  34406. LTS : 'A h:mm:ss बजे',
  34407. L : 'DD/MM/YYYY',
  34408. LL : 'D MMMM YYYY',
  34409. LLL : 'D MMMM YYYY, A h:mm बजे',
  34410. LLLL : 'dddd, D MMMM YYYY, A h:mm बजे'
  34411. },
  34412. calendar : {
  34413. sameDay : '[आज] LT',
  34414. nextDay : '[कल] LT',
  34415. nextWeek : 'dddd, LT',
  34416. lastDay : '[कल] LT',
  34417. lastWeek : '[पिछले] dddd, LT',
  34418. sameElse : 'L'
  34419. },
  34420. relativeTime : {
  34421. future : '%s में',
  34422. past : '%s पहले',
  34423. s : 'कुछ ही क्षण',
  34424. m : 'एक मिनट',
  34425. mm : '%d मिनट',
  34426. h : 'एक घंटा',
  34427. hh : '%d घंटे',
  34428. d : 'एक दिन',
  34429. dd : '%d दिन',
  34430. M : 'एक महीने',
  34431. MM : '%d महीने',
  34432. y : 'एक वर्ष',
  34433. yy : '%d वर्ष'
  34434. },
  34435. preparse: function (string) {
  34436. return string.replace(/[१२३४५६७८९०]/g, function (match) {
  34437. return numberMap[match];
  34438. });
  34439. },
  34440. postformat: function (string) {
  34441. return string.replace(/\d/g, function (match) {
  34442. return symbolMap[match];
  34443. });
  34444. },
  34445. // Hindi notation for meridiems are quite fuzzy in practice. While there exists
  34446. // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
  34447. meridiemParse: /रात|सुबह|दोपहर|शाम/,
  34448. meridiemHour : function (hour, meridiem) {
  34449. if (hour === 12) {
  34450. hour = 0;
  34451. }
  34452. if (meridiem === 'रात') {
  34453. return hour < 4 ? hour : hour + 12;
  34454. } else if (meridiem === 'सुबह') {
  34455. return hour;
  34456. } else if (meridiem === 'दोपहर') {
  34457. return hour >= 10 ? hour : hour + 12;
  34458. } else if (meridiem === 'शाम') {
  34459. return hour + 12;
  34460. }
  34461. },
  34462. meridiem : function (hour, minute, isLower) {
  34463. if (hour < 4) {
  34464. return 'रात';
  34465. } else if (hour < 10) {
  34466. return 'सुबह';
  34467. } else if (hour < 17) {
  34468. return 'दोपहर';
  34469. } else if (hour < 20) {
  34470. return 'शाम';
  34471. } else {
  34472. return 'रात';
  34473. }
  34474. },
  34475. week : {
  34476. dow : 0, // Sunday is the first day of the week.
  34477. doy : 6 // The week that contains Jan 1st is the first week of the year.
  34478. }
  34479. });
  34480. return hi;
  34481. })));
  34482. /***/ }),
  34483. /***/ "./node_modules/moment/locale/hr.js":
  34484. /*!******************************************!*\
  34485. !*** ./node_modules/moment/locale/hr.js ***!
  34486. \******************************************/
  34487. /*! no static exports found */
  34488. /***/ (function(module, exports, __webpack_require__) {
  34489. //! moment.js locale configuration
  34490. //! locale : Croatian [hr]
  34491. //! author : Bojan Marković : https://github.com/bmarkovic
  34492. ;(function (global, factory) {
  34493. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  34494. undefined
  34495. }(this, (function (moment) { 'use strict';
  34496. function translate(number, withoutSuffix, key) {
  34497. var result = number + ' ';
  34498. switch (key) {
  34499. case 'm':
  34500. return withoutSuffix ? 'jedna minuta' : 'jedne minute';
  34501. case 'mm':
  34502. if (number === 1) {
  34503. result += 'minuta';
  34504. } else if (number === 2 || number === 3 || number === 4) {
  34505. result += 'minute';
  34506. } else {
  34507. result += 'minuta';
  34508. }
  34509. return result;
  34510. case 'h':
  34511. return withoutSuffix ? 'jedan sat' : 'jednog sata';
  34512. case 'hh':
  34513. if (number === 1) {
  34514. result += 'sat';
  34515. } else if (number === 2 || number === 3 || number === 4) {
  34516. result += 'sata';
  34517. } else {
  34518. result += 'sati';
  34519. }
  34520. return result;
  34521. case 'dd':
  34522. if (number === 1) {
  34523. result += 'dan';
  34524. } else {
  34525. result += 'dana';
  34526. }
  34527. return result;
  34528. case 'MM':
  34529. if (number === 1) {
  34530. result += 'mjesec';
  34531. } else if (number === 2 || number === 3 || number === 4) {
  34532. result += 'mjeseca';
  34533. } else {
  34534. result += 'mjeseci';
  34535. }
  34536. return result;
  34537. case 'yy':
  34538. if (number === 1) {
  34539. result += 'godina';
  34540. } else if (number === 2 || number === 3 || number === 4) {
  34541. result += 'godine';
  34542. } else {
  34543. result += 'godina';
  34544. }
  34545. return result;
  34546. }
  34547. }
  34548. var hr = moment.defineLocale('hr', {
  34549. months : {
  34550. format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'),
  34551. standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_')
  34552. },
  34553. monthsShort : 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'),
  34554. monthsParseExact: true,
  34555. weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),
  34556. weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
  34557. weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'),
  34558. weekdaysParseExact : true,
  34559. longDateFormat : {
  34560. LT : 'H:mm',
  34561. LTS : 'H:mm:ss',
  34562. L : 'DD.MM.YYYY',
  34563. LL : 'D. MMMM YYYY',
  34564. LLL : 'D. MMMM YYYY H:mm',
  34565. LLLL : 'dddd, D. MMMM YYYY H:mm'
  34566. },
  34567. calendar : {
  34568. sameDay : '[danas u] LT',
  34569. nextDay : '[sutra u] LT',
  34570. nextWeek : function () {
  34571. switch (this.day()) {
  34572. case 0:
  34573. return '[u] [nedjelju] [u] LT';
  34574. case 3:
  34575. return '[u] [srijedu] [u] LT';
  34576. case 6:
  34577. return '[u] [subotu] [u] LT';
  34578. case 1:
  34579. case 2:
  34580. case 4:
  34581. case 5:
  34582. return '[u] dddd [u] LT';
  34583. }
  34584. },
  34585. lastDay : '[jučer u] LT',
  34586. lastWeek : function () {
  34587. switch (this.day()) {
  34588. case 0:
  34589. case 3:
  34590. return '[prošlu] dddd [u] LT';
  34591. case 6:
  34592. return '[prošle] [subote] [u] LT';
  34593. case 1:
  34594. case 2:
  34595. case 4:
  34596. case 5:
  34597. return '[prošli] dddd [u] LT';
  34598. }
  34599. },
  34600. sameElse : 'L'
  34601. },
  34602. relativeTime : {
  34603. future : 'za %s',
  34604. past : 'prije %s',
  34605. s : 'par sekundi',
  34606. m : translate,
  34607. mm : translate,
  34608. h : translate,
  34609. hh : translate,
  34610. d : 'dan',
  34611. dd : translate,
  34612. M : 'mjesec',
  34613. MM : translate,
  34614. y : 'godinu',
  34615. yy : translate
  34616. },
  34617. dayOfMonthOrdinalParse: /\d{1,2}\./,
  34618. ordinal : '%d.',
  34619. week : {
  34620. dow : 1, // Monday is the first day of the week.
  34621. doy : 7 // The week that contains Jan 1st is the first week of the year.
  34622. }
  34623. });
  34624. return hr;
  34625. })));
  34626. /***/ }),
  34627. /***/ "./node_modules/moment/locale/hu.js":
  34628. /*!******************************************!*\
  34629. !*** ./node_modules/moment/locale/hu.js ***!
  34630. \******************************************/
  34631. /*! no static exports found */
  34632. /***/ (function(module, exports, __webpack_require__) {
  34633. //! moment.js locale configuration
  34634. //! locale : Hungarian [hu]
  34635. //! author : Adam Brunner : https://github.com/adambrunner
  34636. ;(function (global, factory) {
  34637. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  34638. undefined
  34639. }(this, (function (moment) { 'use strict';
  34640. var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
  34641. function translate(number, withoutSuffix, key, isFuture) {
  34642. var num = number;
  34643. switch (key) {
  34644. case 's':
  34645. return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
  34646. case 'm':
  34647. return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
  34648. case 'mm':
  34649. return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
  34650. case 'h':
  34651. return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
  34652. case 'hh':
  34653. return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
  34654. case 'd':
  34655. return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
  34656. case 'dd':
  34657. return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
  34658. case 'M':
  34659. return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
  34660. case 'MM':
  34661. return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
  34662. case 'y':
  34663. return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
  34664. case 'yy':
  34665. return num + (isFuture || withoutSuffix ? ' év' : ' éve');
  34666. }
  34667. return '';
  34668. }
  34669. function week(isFuture) {
  34670. return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]';
  34671. }
  34672. var hu = moment.defineLocale('hu', {
  34673. months : 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'),
  34674. monthsShort : 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'),
  34675. weekdays : 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),
  34676. weekdaysShort : 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),
  34677. weekdaysMin : 'v_h_k_sze_cs_p_szo'.split('_'),
  34678. longDateFormat : {
  34679. LT : 'H:mm',
  34680. LTS : 'H:mm:ss',
  34681. L : 'YYYY.MM.DD.',
  34682. LL : 'YYYY. MMMM D.',
  34683. LLL : 'YYYY. MMMM D. H:mm',
  34684. LLLL : 'YYYY. MMMM D., dddd H:mm'
  34685. },
  34686. meridiemParse: /de|du/i,
  34687. isPM: function (input) {
  34688. return input.charAt(1).toLowerCase() === 'u';
  34689. },
  34690. meridiem : function (hours, minutes, isLower) {
  34691. if (hours < 12) {
  34692. return isLower === true ? 'de' : 'DE';
  34693. } else {
  34694. return isLower === true ? 'du' : 'DU';
  34695. }
  34696. },
  34697. calendar : {
  34698. sameDay : '[ma] LT[-kor]',
  34699. nextDay : '[holnap] LT[-kor]',
  34700. nextWeek : function () {
  34701. return week.call(this, true);
  34702. },
  34703. lastDay : '[tegnap] LT[-kor]',
  34704. lastWeek : function () {
  34705. return week.call(this, false);
  34706. },
  34707. sameElse : 'L'
  34708. },
  34709. relativeTime : {
  34710. future : '%s múlva',
  34711. past : '%s',
  34712. s : translate,
  34713. m : translate,
  34714. mm : translate,
  34715. h : translate,
  34716. hh : translate,
  34717. d : translate,
  34718. dd : translate,
  34719. M : translate,
  34720. MM : translate,
  34721. y : translate,
  34722. yy : translate
  34723. },
  34724. dayOfMonthOrdinalParse: /\d{1,2}\./,
  34725. ordinal : '%d.',
  34726. week : {
  34727. dow : 1, // Monday is the first day of the week.
  34728. doy : 4 // The week that contains Jan 4th is the first week of the year.
  34729. }
  34730. });
  34731. return hu;
  34732. })));
  34733. /***/ }),
  34734. /***/ "./node_modules/moment/locale/hy-am.js":
  34735. /*!*********************************************!*\
  34736. !*** ./node_modules/moment/locale/hy-am.js ***!
  34737. \*********************************************/
  34738. /*! no static exports found */
  34739. /***/ (function(module, exports, __webpack_require__) {
  34740. //! moment.js locale configuration
  34741. //! locale : Armenian [hy-am]
  34742. //! author : Armendarabyan : https://github.com/armendarabyan
  34743. ;(function (global, factory) {
  34744. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  34745. undefined
  34746. }(this, (function (moment) { 'use strict';
  34747. var hyAm = moment.defineLocale('hy-am', {
  34748. months : {
  34749. format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_'),
  34750. standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_')
  34751. },
  34752. monthsShort : 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),
  34753. weekdays : 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_'),
  34754. weekdaysShort : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
  34755. weekdaysMin : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),
  34756. longDateFormat : {
  34757. LT : 'HH:mm',
  34758. LTS : 'HH:mm:ss',
  34759. L : 'DD.MM.YYYY',
  34760. LL : 'D MMMM YYYY թ.',
  34761. LLL : 'D MMMM YYYY թ., HH:mm',
  34762. LLLL : 'dddd, D MMMM YYYY թ., HH:mm'
  34763. },
  34764. calendar : {
  34765. sameDay: '[այսօր] LT',
  34766. nextDay: '[վաղը] LT',
  34767. lastDay: '[երեկ] LT',
  34768. nextWeek: function () {
  34769. return 'dddd [օրը ժամը] LT';
  34770. },
  34771. lastWeek: function () {
  34772. return '[անցած] dddd [օրը ժամը] LT';
  34773. },
  34774. sameElse: 'L'
  34775. },
  34776. relativeTime : {
  34777. future : '%s հետո',
  34778. past : '%s առաջ',
  34779. s : 'մի քանի վայրկյան',
  34780. m : 'րոպե',
  34781. mm : '%d րոպե',
  34782. h : 'ժամ',
  34783. hh : '%d ժամ',
  34784. d : 'օր',
  34785. dd : '%d օր',
  34786. M : 'ամիս',
  34787. MM : '%d ամիս',
  34788. y : 'տարի',
  34789. yy : '%d տարի'
  34790. },
  34791. meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,
  34792. isPM: function (input) {
  34793. return /^(ցերեկվա|երեկոյան)$/.test(input);
  34794. },
  34795. meridiem : function (hour) {
  34796. if (hour < 4) {
  34797. return 'գիշերվա';
  34798. } else if (hour < 12) {
  34799. return 'առավոտվա';
  34800. } else if (hour < 17) {
  34801. return 'ցերեկվա';
  34802. } else {
  34803. return 'երեկոյան';
  34804. }
  34805. },
  34806. dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/,
  34807. ordinal: function (number, period) {
  34808. switch (period) {
  34809. case 'DDD':
  34810. case 'w':
  34811. case 'W':
  34812. case 'DDDo':
  34813. if (number === 1) {
  34814. return number + '-ին';
  34815. }
  34816. return number + '-րդ';
  34817. default:
  34818. return number;
  34819. }
  34820. },
  34821. week : {
  34822. dow : 1, // Monday is the first day of the week.
  34823. doy : 7 // The week that contains Jan 1st is the first week of the year.
  34824. }
  34825. });
  34826. return hyAm;
  34827. })));
  34828. /***/ }),
  34829. /***/ "./node_modules/moment/locale/id.js":
  34830. /*!******************************************!*\
  34831. !*** ./node_modules/moment/locale/id.js ***!
  34832. \******************************************/
  34833. /*! no static exports found */
  34834. /***/ (function(module, exports, __webpack_require__) {
  34835. //! moment.js locale configuration
  34836. //! locale : Indonesian [id]
  34837. //! author : Mohammad Satrio Utomo : https://github.com/tyok
  34838. //! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan
  34839. ;(function (global, factory) {
  34840. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  34841. undefined
  34842. }(this, (function (moment) { 'use strict';
  34843. var id = moment.defineLocale('id', {
  34844. months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'),
  34845. monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des'.split('_'),
  34846. weekdays : 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),
  34847. weekdaysShort : 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),
  34848. weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),
  34849. longDateFormat : {
  34850. LT : 'HH.mm',
  34851. LTS : 'HH.mm.ss',
  34852. L : 'DD/MM/YYYY',
  34853. LL : 'D MMMM YYYY',
  34854. LLL : 'D MMMM YYYY [pukul] HH.mm',
  34855. LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'
  34856. },
  34857. meridiemParse: /pagi|siang|sore|malam/,
  34858. meridiemHour : function (hour, meridiem) {
  34859. if (hour === 12) {
  34860. hour = 0;
  34861. }
  34862. if (meridiem === 'pagi') {
  34863. return hour;
  34864. } else if (meridiem === 'siang') {
  34865. return hour >= 11 ? hour : hour + 12;
  34866. } else if (meridiem === 'sore' || meridiem === 'malam') {
  34867. return hour + 12;
  34868. }
  34869. },
  34870. meridiem : function (hours, minutes, isLower) {
  34871. if (hours < 11) {
  34872. return 'pagi';
  34873. } else if (hours < 15) {
  34874. return 'siang';
  34875. } else if (hours < 19) {
  34876. return 'sore';
  34877. } else {
  34878. return 'malam';
  34879. }
  34880. },
  34881. calendar : {
  34882. sameDay : '[Hari ini pukul] LT',
  34883. nextDay : '[Besok pukul] LT',
  34884. nextWeek : 'dddd [pukul] LT',
  34885. lastDay : '[Kemarin pukul] LT',
  34886. lastWeek : 'dddd [lalu pukul] LT',
  34887. sameElse : 'L'
  34888. },
  34889. relativeTime : {
  34890. future : 'dalam %s',
  34891. past : '%s yang lalu',
  34892. s : 'beberapa detik',
  34893. m : 'semenit',
  34894. mm : '%d menit',
  34895. h : 'sejam',
  34896. hh : '%d jam',
  34897. d : 'sehari',
  34898. dd : '%d hari',
  34899. M : 'sebulan',
  34900. MM : '%d bulan',
  34901. y : 'setahun',
  34902. yy : '%d tahun'
  34903. },
  34904. week : {
  34905. dow : 1, // Monday is the first day of the week.
  34906. doy : 7 // The week that contains Jan 1st is the first week of the year.
  34907. }
  34908. });
  34909. return id;
  34910. })));
  34911. /***/ }),
  34912. /***/ "./node_modules/moment/locale/is.js":
  34913. /*!******************************************!*\
  34914. !*** ./node_modules/moment/locale/is.js ***!
  34915. \******************************************/
  34916. /*! no static exports found */
  34917. /***/ (function(module, exports, __webpack_require__) {
  34918. //! moment.js locale configuration
  34919. //! locale : Icelandic [is]
  34920. //! author : Hinrik Örn Sigurðsson : https://github.com/hinrik
  34921. ;(function (global, factory) {
  34922. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  34923. undefined
  34924. }(this, (function (moment) { 'use strict';
  34925. function plural(n) {
  34926. if (n % 100 === 11) {
  34927. return true;
  34928. } else if (n % 10 === 1) {
  34929. return false;
  34930. }
  34931. return true;
  34932. }
  34933. function translate(number, withoutSuffix, key, isFuture) {
  34934. var result = number + ' ';
  34935. switch (key) {
  34936. case 's':
  34937. return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum';
  34938. case 'm':
  34939. return withoutSuffix ? 'mínúta' : 'mínútu';
  34940. case 'mm':
  34941. if (plural(number)) {
  34942. return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum');
  34943. } else if (withoutSuffix) {
  34944. return result + 'mínúta';
  34945. }
  34946. return result + 'mínútu';
  34947. case 'hh':
  34948. if (plural(number)) {
  34949. return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum');
  34950. }
  34951. return result + 'klukkustund';
  34952. case 'd':
  34953. if (withoutSuffix) {
  34954. return 'dagur';
  34955. }
  34956. return isFuture ? 'dag' : 'degi';
  34957. case 'dd':
  34958. if (plural(number)) {
  34959. if (withoutSuffix) {
  34960. return result + 'dagar';
  34961. }
  34962. return result + (isFuture ? 'daga' : 'dögum');
  34963. } else if (withoutSuffix) {
  34964. return result + 'dagur';
  34965. }
  34966. return result + (isFuture ? 'dag' : 'degi');
  34967. case 'M':
  34968. if (withoutSuffix) {
  34969. return 'mánuður';
  34970. }
  34971. return isFuture ? 'mánuð' : 'mánuði';
  34972. case 'MM':
  34973. if (plural(number)) {
  34974. if (withoutSuffix) {
  34975. return result + 'mánuðir';
  34976. }
  34977. return result + (isFuture ? 'mánuði' : 'mánuðum');
  34978. } else if (withoutSuffix) {
  34979. return result + 'mánuður';
  34980. }
  34981. return result + (isFuture ? 'mánuð' : 'mánuði');
  34982. case 'y':
  34983. return withoutSuffix || isFuture ? 'ár' : 'ári';
  34984. case 'yy':
  34985. if (plural(number)) {
  34986. return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
  34987. }
  34988. return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
  34989. }
  34990. }
  34991. var is = moment.defineLocale('is', {
  34992. months : 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split('_'),
  34993. monthsShort : 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),
  34994. weekdays : 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split('_'),
  34995. weekdaysShort : 'sun_mán_þri_mið_fim_fös_lau'.split('_'),
  34996. weekdaysMin : 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),
  34997. longDateFormat : {
  34998. LT : 'H:mm',
  34999. LTS : 'H:mm:ss',
  35000. L : 'DD.MM.YYYY',
  35001. LL : 'D. MMMM YYYY',
  35002. LLL : 'D. MMMM YYYY [kl.] H:mm',
  35003. LLLL : 'dddd, D. MMMM YYYY [kl.] H:mm'
  35004. },
  35005. calendar : {
  35006. sameDay : '[í dag kl.] LT',
  35007. nextDay : '[á morgun kl.] LT',
  35008. nextWeek : 'dddd [kl.] LT',
  35009. lastDay : '[í gær kl.] LT',
  35010. lastWeek : '[síðasta] dddd [kl.] LT',
  35011. sameElse : 'L'
  35012. },
  35013. relativeTime : {
  35014. future : 'eftir %s',
  35015. past : 'fyrir %s síðan',
  35016. s : translate,
  35017. m : translate,
  35018. mm : translate,
  35019. h : 'klukkustund',
  35020. hh : translate,
  35021. d : translate,
  35022. dd : translate,
  35023. M : translate,
  35024. MM : translate,
  35025. y : translate,
  35026. yy : translate
  35027. },
  35028. dayOfMonthOrdinalParse: /\d{1,2}\./,
  35029. ordinal : '%d.',
  35030. week : {
  35031. dow : 1, // Monday is the first day of the week.
  35032. doy : 4 // The week that contains Jan 4th is the first week of the year.
  35033. }
  35034. });
  35035. return is;
  35036. })));
  35037. /***/ }),
  35038. /***/ "./node_modules/moment/locale/it.js":
  35039. /*!******************************************!*\
  35040. !*** ./node_modules/moment/locale/it.js ***!
  35041. \******************************************/
  35042. /*! no static exports found */
  35043. /***/ (function(module, exports, __webpack_require__) {
  35044. //! moment.js locale configuration
  35045. //! locale : Italian [it]
  35046. //! author : Lorenzo : https://github.com/aliem
  35047. //! author: Mattia Larentis: https://github.com/nostalgiaz
  35048. ;(function (global, factory) {
  35049. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  35050. undefined
  35051. }(this, (function (moment) { 'use strict';
  35052. var it = moment.defineLocale('it', {
  35053. months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'),
  35054. monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),
  35055. weekdays : 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'),
  35056. weekdaysShort : 'dom_lun_mar_mer_gio_ven_sab'.split('_'),
  35057. weekdaysMin : 'do_lu_ma_me_gi_ve_sa'.split('_'),
  35058. longDateFormat : {
  35059. LT : 'HH:mm',
  35060. LTS : 'HH:mm:ss',
  35061. L : 'DD/MM/YYYY',
  35062. LL : 'D MMMM YYYY',
  35063. LLL : 'D MMMM YYYY HH:mm',
  35064. LLLL : 'dddd, D MMMM YYYY HH:mm'
  35065. },
  35066. calendar : {
  35067. sameDay: '[Oggi alle] LT',
  35068. nextDay: '[Domani alle] LT',
  35069. nextWeek: 'dddd [alle] LT',
  35070. lastDay: '[Ieri alle] LT',
  35071. lastWeek: function () {
  35072. switch (this.day()) {
  35073. case 0:
  35074. return '[la scorsa] dddd [alle] LT';
  35075. default:
  35076. return '[lo scorso] dddd [alle] LT';
  35077. }
  35078. },
  35079. sameElse: 'L'
  35080. },
  35081. relativeTime : {
  35082. future : function (s) {
  35083. return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s;
  35084. },
  35085. past : '%s fa',
  35086. s : 'alcuni secondi',
  35087. m : 'un minuto',
  35088. mm : '%d minuti',
  35089. h : 'un\'ora',
  35090. hh : '%d ore',
  35091. d : 'un giorno',
  35092. dd : '%d giorni',
  35093. M : 'un mese',
  35094. MM : '%d mesi',
  35095. y : 'un anno',
  35096. yy : '%d anni'
  35097. },
  35098. dayOfMonthOrdinalParse : /\d{1,2}º/,
  35099. ordinal: '%dº',
  35100. week : {
  35101. dow : 1, // Monday is the first day of the week.
  35102. doy : 4 // The week that contains Jan 4th is the first week of the year.
  35103. }
  35104. });
  35105. return it;
  35106. })));
  35107. /***/ }),
  35108. /***/ "./node_modules/moment/locale/ja.js":
  35109. /*!******************************************!*\
  35110. !*** ./node_modules/moment/locale/ja.js ***!
  35111. \******************************************/
  35112. /*! no static exports found */
  35113. /***/ (function(module, exports, __webpack_require__) {
  35114. //! moment.js locale configuration
  35115. //! locale : Japanese [ja]
  35116. //! author : LI Long : https://github.com/baryon
  35117. ;(function (global, factory) {
  35118. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  35119. undefined
  35120. }(this, (function (moment) { 'use strict';
  35121. var ja = moment.defineLocale('ja', {
  35122. months : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  35123. monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  35124. weekdays : '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),
  35125. weekdaysShort : '日_月_火_水_木_金_土'.split('_'),
  35126. weekdaysMin : '日_月_火_水_木_金_土'.split('_'),
  35127. longDateFormat : {
  35128. LT : 'HH:mm',
  35129. LTS : 'HH:mm:ss',
  35130. L : 'YYYY/MM/DD',
  35131. LL : 'YYYY年M月D日',
  35132. LLL : 'YYYY年M月D日 HH:mm',
  35133. LLLL : 'YYYY年M月D日 HH:mm dddd',
  35134. l : 'YYYY/MM/DD',
  35135. ll : 'YYYY年M月D日',
  35136. lll : 'YYYY年M月D日 HH:mm',
  35137. llll : 'YYYY年M月D日 HH:mm dddd'
  35138. },
  35139. meridiemParse: /午前|午後/i,
  35140. isPM : function (input) {
  35141. return input === '午後';
  35142. },
  35143. meridiem : function (hour, minute, isLower) {
  35144. if (hour < 12) {
  35145. return '午前';
  35146. } else {
  35147. return '午後';
  35148. }
  35149. },
  35150. calendar : {
  35151. sameDay : '[今日] LT',
  35152. nextDay : '[明日] LT',
  35153. nextWeek : '[来週]dddd LT',
  35154. lastDay : '[昨日] LT',
  35155. lastWeek : '[前週]dddd LT',
  35156. sameElse : 'L'
  35157. },
  35158. dayOfMonthOrdinalParse : /\d{1,2}日/,
  35159. ordinal : function (number, period) {
  35160. switch (period) {
  35161. case 'd':
  35162. case 'D':
  35163. case 'DDD':
  35164. return number + '日';
  35165. default:
  35166. return number;
  35167. }
  35168. },
  35169. relativeTime : {
  35170. future : '%s後',
  35171. past : '%s前',
  35172. s : '数秒',
  35173. m : '1分',
  35174. mm : '%d分',
  35175. h : '1時間',
  35176. hh : '%d時間',
  35177. d : '1日',
  35178. dd : '%d日',
  35179. M : '1ヶ月',
  35180. MM : '%dヶ月',
  35181. y : '1年',
  35182. yy : '%d年'
  35183. }
  35184. });
  35185. return ja;
  35186. })));
  35187. /***/ }),
  35188. /***/ "./node_modules/moment/locale/jv.js":
  35189. /*!******************************************!*\
  35190. !*** ./node_modules/moment/locale/jv.js ***!
  35191. \******************************************/
  35192. /*! no static exports found */
  35193. /***/ (function(module, exports, __webpack_require__) {
  35194. //! moment.js locale configuration
  35195. //! locale : Javanese [jv]
  35196. //! author : Rony Lantip : https://github.com/lantip
  35197. //! reference: http://jv.wikipedia.org/wiki/Basa_Jawa
  35198. ;(function (global, factory) {
  35199. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  35200. undefined
  35201. }(this, (function (moment) { 'use strict';
  35202. var jv = moment.defineLocale('jv', {
  35203. months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split('_'),
  35204. monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),
  35205. weekdays : 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),
  35206. weekdaysShort : 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),
  35207. weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),
  35208. longDateFormat : {
  35209. LT : 'HH.mm',
  35210. LTS : 'HH.mm.ss',
  35211. L : 'DD/MM/YYYY',
  35212. LL : 'D MMMM YYYY',
  35213. LLL : 'D MMMM YYYY [pukul] HH.mm',
  35214. LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'
  35215. },
  35216. meridiemParse: /enjing|siyang|sonten|ndalu/,
  35217. meridiemHour : function (hour, meridiem) {
  35218. if (hour === 12) {
  35219. hour = 0;
  35220. }
  35221. if (meridiem === 'enjing') {
  35222. return hour;
  35223. } else if (meridiem === 'siyang') {
  35224. return hour >= 11 ? hour : hour + 12;
  35225. } else if (meridiem === 'sonten' || meridiem === 'ndalu') {
  35226. return hour + 12;
  35227. }
  35228. },
  35229. meridiem : function (hours, minutes, isLower) {
  35230. if (hours < 11) {
  35231. return 'enjing';
  35232. } else if (hours < 15) {
  35233. return 'siyang';
  35234. } else if (hours < 19) {
  35235. return 'sonten';
  35236. } else {
  35237. return 'ndalu';
  35238. }
  35239. },
  35240. calendar : {
  35241. sameDay : '[Dinten puniko pukul] LT',
  35242. nextDay : '[Mbenjang pukul] LT',
  35243. nextWeek : 'dddd [pukul] LT',
  35244. lastDay : '[Kala wingi pukul] LT',
  35245. lastWeek : 'dddd [kepengker pukul] LT',
  35246. sameElse : 'L'
  35247. },
  35248. relativeTime : {
  35249. future : 'wonten ing %s',
  35250. past : '%s ingkang kepengker',
  35251. s : 'sawetawis detik',
  35252. m : 'setunggal menit',
  35253. mm : '%d menit',
  35254. h : 'setunggal jam',
  35255. hh : '%d jam',
  35256. d : 'sedinten',
  35257. dd : '%d dinten',
  35258. M : 'sewulan',
  35259. MM : '%d wulan',
  35260. y : 'setaun',
  35261. yy : '%d taun'
  35262. },
  35263. week : {
  35264. dow : 1, // Monday is the first day of the week.
  35265. doy : 7 // The week that contains Jan 1st is the first week of the year.
  35266. }
  35267. });
  35268. return jv;
  35269. })));
  35270. /***/ }),
  35271. /***/ "./node_modules/moment/locale/ka.js":
  35272. /*!******************************************!*\
  35273. !*** ./node_modules/moment/locale/ka.js ***!
  35274. \******************************************/
  35275. /*! no static exports found */
  35276. /***/ (function(module, exports, __webpack_require__) {
  35277. //! moment.js locale configuration
  35278. //! locale : Georgian [ka]
  35279. //! author : Irakli Janiashvili : https://github.com/irakli-janiashvili
  35280. ;(function (global, factory) {
  35281. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  35282. undefined
  35283. }(this, (function (moment) { 'use strict';
  35284. var ka = moment.defineLocale('ka', {
  35285. months : {
  35286. standalone: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'),
  35287. format: 'იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს'.split('_')
  35288. },
  35289. monthsShort : 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),
  35290. weekdays : {
  35291. standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'),
  35292. format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_'),
  35293. isFormat: /(წინა|შემდეგ)/
  35294. },
  35295. weekdaysShort : 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),
  35296. weekdaysMin : 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),
  35297. longDateFormat : {
  35298. LT : 'h:mm A',
  35299. LTS : 'h:mm:ss A',
  35300. L : 'DD/MM/YYYY',
  35301. LL : 'D MMMM YYYY',
  35302. LLL : 'D MMMM YYYY h:mm A',
  35303. LLLL : 'dddd, D MMMM YYYY h:mm A'
  35304. },
  35305. calendar : {
  35306. sameDay : '[დღეს] LT[-ზე]',
  35307. nextDay : '[ხვალ] LT[-ზე]',
  35308. lastDay : '[გუშინ] LT[-ზე]',
  35309. nextWeek : '[შემდეგ] dddd LT[-ზე]',
  35310. lastWeek : '[წინა] dddd LT-ზე',
  35311. sameElse : 'L'
  35312. },
  35313. relativeTime : {
  35314. future : function (s) {
  35315. return (/(წამი|წუთი|საათი|წელი)/).test(s) ?
  35316. s.replace(/ი$/, 'ში') :
  35317. s + 'ში';
  35318. },
  35319. past : function (s) {
  35320. if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) {
  35321. return s.replace(/(ი|ე)$/, 'ის უკან');
  35322. }
  35323. if ((/წელი/).test(s)) {
  35324. return s.replace(/წელი$/, 'წლის უკან');
  35325. }
  35326. },
  35327. s : 'რამდენიმე წამი',
  35328. m : 'წუთი',
  35329. mm : '%d წუთი',
  35330. h : 'საათი',
  35331. hh : '%d საათი',
  35332. d : 'დღე',
  35333. dd : '%d დღე',
  35334. M : 'თვე',
  35335. MM : '%d თვე',
  35336. y : 'წელი',
  35337. yy : '%d წელი'
  35338. },
  35339. dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,
  35340. ordinal : function (number) {
  35341. if (number === 0) {
  35342. return number;
  35343. }
  35344. if (number === 1) {
  35345. return number + '-ლი';
  35346. }
  35347. if ((number < 20) || (number <= 100 && (number % 20 === 0)) || (number % 100 === 0)) {
  35348. return 'მე-' + number;
  35349. }
  35350. return number + '-ე';
  35351. },
  35352. week : {
  35353. dow : 1,
  35354. doy : 7
  35355. }
  35356. });
  35357. return ka;
  35358. })));
  35359. /***/ }),
  35360. /***/ "./node_modules/moment/locale/kk.js":
  35361. /*!******************************************!*\
  35362. !*** ./node_modules/moment/locale/kk.js ***!
  35363. \******************************************/
  35364. /*! no static exports found */
  35365. /***/ (function(module, exports, __webpack_require__) {
  35366. //! moment.js locale configuration
  35367. //! locale : Kazakh [kk]
  35368. //! authors : Nurlan Rakhimzhanov : https://github.com/nurlan
  35369. ;(function (global, factory) {
  35370. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  35371. undefined
  35372. }(this, (function (moment) { 'use strict';
  35373. var suffixes = {
  35374. 0: '-ші',
  35375. 1: '-ші',
  35376. 2: '-ші',
  35377. 3: '-ші',
  35378. 4: '-ші',
  35379. 5: '-ші',
  35380. 6: '-шы',
  35381. 7: '-ші',
  35382. 8: '-ші',
  35383. 9: '-шы',
  35384. 10: '-шы',
  35385. 20: '-шы',
  35386. 30: '-шы',
  35387. 40: '-шы',
  35388. 50: '-ші',
  35389. 60: '-шы',
  35390. 70: '-ші',
  35391. 80: '-ші',
  35392. 90: '-шы',
  35393. 100: '-ші'
  35394. };
  35395. var kk = moment.defineLocale('kk', {
  35396. months : 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split('_'),
  35397. monthsShort : 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),
  35398. weekdays : 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split('_'),
  35399. weekdaysShort : 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),
  35400. weekdaysMin : 'жк_дй_сй_ср_бй_жм_сн'.split('_'),
  35401. longDateFormat : {
  35402. LT : 'HH:mm',
  35403. LTS : 'HH:mm:ss',
  35404. L : 'DD.MM.YYYY',
  35405. LL : 'D MMMM YYYY',
  35406. LLL : 'D MMMM YYYY HH:mm',
  35407. LLLL : 'dddd, D MMMM YYYY HH:mm'
  35408. },
  35409. calendar : {
  35410. sameDay : '[Бүгін сағат] LT',
  35411. nextDay : '[Ертең сағат] LT',
  35412. nextWeek : 'dddd [сағат] LT',
  35413. lastDay : '[Кеше сағат] LT',
  35414. lastWeek : '[Өткен аптаның] dddd [сағат] LT',
  35415. sameElse : 'L'
  35416. },
  35417. relativeTime : {
  35418. future : '%s ішінде',
  35419. past : '%s бұрын',
  35420. s : 'бірнеше секунд',
  35421. m : 'бір минут',
  35422. mm : '%d минут',
  35423. h : 'бір сағат',
  35424. hh : '%d сағат',
  35425. d : 'бір күн',
  35426. dd : '%d күн',
  35427. M : 'бір ай',
  35428. MM : '%d ай',
  35429. y : 'бір жыл',
  35430. yy : '%d жыл'
  35431. },
  35432. dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/,
  35433. ordinal : function (number) {
  35434. var a = number % 10,
  35435. b = number >= 100 ? 100 : null;
  35436. return number + (suffixes[number] || suffixes[a] || suffixes[b]);
  35437. },
  35438. week : {
  35439. dow : 1, // Monday is the first day of the week.
  35440. doy : 7 // The week that contains Jan 1st is the first week of the year.
  35441. }
  35442. });
  35443. return kk;
  35444. })));
  35445. /***/ }),
  35446. /***/ "./node_modules/moment/locale/km.js":
  35447. /*!******************************************!*\
  35448. !*** ./node_modules/moment/locale/km.js ***!
  35449. \******************************************/
  35450. /*! no static exports found */
  35451. /***/ (function(module, exports, __webpack_require__) {
  35452. //! moment.js locale configuration
  35453. //! locale : Cambodian [km]
  35454. //! author : Kruy Vanna : https://github.com/kruyvanna
  35455. ;(function (global, factory) {
  35456. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  35457. undefined
  35458. }(this, (function (moment) { 'use strict';
  35459. var km = moment.defineLocale('km', {
  35460. months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),
  35461. monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'),
  35462. weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
  35463. weekdaysShort: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
  35464. weekdaysMin: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),
  35465. longDateFormat: {
  35466. LT: 'HH:mm',
  35467. LTS : 'HH:mm:ss',
  35468. L: 'DD/MM/YYYY',
  35469. LL: 'D MMMM YYYY',
  35470. LLL: 'D MMMM YYYY HH:mm',
  35471. LLLL: 'dddd, D MMMM YYYY HH:mm'
  35472. },
  35473. calendar: {
  35474. sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',
  35475. nextDay: '[ស្អែក ម៉ោង] LT',
  35476. nextWeek: 'dddd [ម៉ោង] LT',
  35477. lastDay: '[ម្សិលមិញ ម៉ោង] LT',
  35478. lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',
  35479. sameElse: 'L'
  35480. },
  35481. relativeTime: {
  35482. future: '%sទៀត',
  35483. past: '%sមុន',
  35484. s: 'ប៉ុន្មានវិនាទី',
  35485. m: 'មួយនាទី',
  35486. mm: '%d នាទី',
  35487. h: 'មួយម៉ោង',
  35488. hh: '%d ម៉ោង',
  35489. d: 'មួយថ្ងៃ',
  35490. dd: '%d ថ្ងៃ',
  35491. M: 'មួយខែ',
  35492. MM: '%d ខែ',
  35493. y: 'មួយឆ្នាំ',
  35494. yy: '%d ឆ្នាំ'
  35495. },
  35496. week: {
  35497. dow: 1, // Monday is the first day of the week.
  35498. doy: 4 // The week that contains Jan 4th is the first week of the year.
  35499. }
  35500. });
  35501. return km;
  35502. })));
  35503. /***/ }),
  35504. /***/ "./node_modules/moment/locale/kn.js":
  35505. /*!******************************************!*\
  35506. !*** ./node_modules/moment/locale/kn.js ***!
  35507. \******************************************/
  35508. /*! no static exports found */
  35509. /***/ (function(module, exports, __webpack_require__) {
  35510. //! moment.js locale configuration
  35511. //! locale : Kannada [kn]
  35512. //! author : Rajeev Naik : https://github.com/rajeevnaikte
  35513. ;(function (global, factory) {
  35514. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  35515. undefined
  35516. }(this, (function (moment) { 'use strict';
  35517. var symbolMap = {
  35518. '1': '೧',
  35519. '2': '೨',
  35520. '3': '೩',
  35521. '4': '೪',
  35522. '5': '೫',
  35523. '6': '೬',
  35524. '7': '೭',
  35525. '8': '೮',
  35526. '9': '೯',
  35527. '0': '೦'
  35528. };
  35529. var numberMap = {
  35530. '೧': '1',
  35531. '೨': '2',
  35532. '೩': '3',
  35533. '೪': '4',
  35534. '೫': '5',
  35535. '೬': '6',
  35536. '೭': '7',
  35537. '೮': '8',
  35538. '೯': '9',
  35539. '೦': '0'
  35540. };
  35541. var kn = moment.defineLocale('kn', {
  35542. months : 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split('_'),
  35543. monthsShort : 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬ_ಅಕ್ಟೋಬ_ನವೆಂಬ_ಡಿಸೆಂಬ'.split('_'),
  35544. monthsParseExact: true,
  35545. weekdays : 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split('_'),
  35546. weekdaysShort : 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),
  35547. weekdaysMin : 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),
  35548. longDateFormat : {
  35549. LT : 'A h:mm',
  35550. LTS : 'A h:mm:ss',
  35551. L : 'DD/MM/YYYY',
  35552. LL : 'D MMMM YYYY',
  35553. LLL : 'D MMMM YYYY, A h:mm',
  35554. LLLL : 'dddd, D MMMM YYYY, A h:mm'
  35555. },
  35556. calendar : {
  35557. sameDay : '[ಇಂದು] LT',
  35558. nextDay : '[ನಾಳೆ] LT',
  35559. nextWeek : 'dddd, LT',
  35560. lastDay : '[ನಿನ್ನೆ] LT',
  35561. lastWeek : '[ಕೊನೆಯ] dddd, LT',
  35562. sameElse : 'L'
  35563. },
  35564. relativeTime : {
  35565. future : '%s ನಂತರ',
  35566. past : '%s ಹಿಂದೆ',
  35567. s : 'ಕೆಲವು ಕ್ಷಣಗಳು',
  35568. m : 'ಒಂದು ನಿಮಿಷ',
  35569. mm : '%d ನಿಮಿಷ',
  35570. h : 'ಒಂದು ಗಂಟೆ',
  35571. hh : '%d ಗಂಟೆ',
  35572. d : 'ಒಂದು ದಿನ',
  35573. dd : '%d ದಿನ',
  35574. M : 'ಒಂದು ತಿಂಗಳು',
  35575. MM : '%d ತಿಂಗಳು',
  35576. y : 'ಒಂದು ವರ್ಷ',
  35577. yy : '%d ವರ್ಷ'
  35578. },
  35579. preparse: function (string) {
  35580. return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {
  35581. return numberMap[match];
  35582. });
  35583. },
  35584. postformat: function (string) {
  35585. return string.replace(/\d/g, function (match) {
  35586. return symbolMap[match];
  35587. });
  35588. },
  35589. meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,
  35590. meridiemHour : function (hour, meridiem) {
  35591. if (hour === 12) {
  35592. hour = 0;
  35593. }
  35594. if (meridiem === 'ರಾತ್ರಿ') {
  35595. return hour < 4 ? hour : hour + 12;
  35596. } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {
  35597. return hour;
  35598. } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {
  35599. return hour >= 10 ? hour : hour + 12;
  35600. } else if (meridiem === 'ಸಂಜೆ') {
  35601. return hour + 12;
  35602. }
  35603. },
  35604. meridiem : function (hour, minute, isLower) {
  35605. if (hour < 4) {
  35606. return 'ರಾತ್ರಿ';
  35607. } else if (hour < 10) {
  35608. return 'ಬೆಳಿಗ್ಗೆ';
  35609. } else if (hour < 17) {
  35610. return 'ಮಧ್ಯಾಹ್ನ';
  35611. } else if (hour < 20) {
  35612. return 'ಸಂಜೆ';
  35613. } else {
  35614. return 'ರಾತ್ರಿ';
  35615. }
  35616. },
  35617. dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/,
  35618. ordinal : function (number) {
  35619. return number + 'ನೇ';
  35620. },
  35621. week : {
  35622. dow : 0, // Sunday is the first day of the week.
  35623. doy : 6 // The week that contains Jan 1st is the first week of the year.
  35624. }
  35625. });
  35626. return kn;
  35627. })));
  35628. /***/ }),
  35629. /***/ "./node_modules/moment/locale/ko.js":
  35630. /*!******************************************!*\
  35631. !*** ./node_modules/moment/locale/ko.js ***!
  35632. \******************************************/
  35633. /*! no static exports found */
  35634. /***/ (function(module, exports, __webpack_require__) {
  35635. //! moment.js locale configuration
  35636. //! locale : Korean [ko]
  35637. //! author : Kyungwook, Park : https://github.com/kyungw00k
  35638. //! author : Jeeeyul Lee <jeeeyul@gmail.com>
  35639. ;(function (global, factory) {
  35640. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  35641. undefined
  35642. }(this, (function (moment) { 'use strict';
  35643. var ko = moment.defineLocale('ko', {
  35644. months : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
  35645. monthsShort : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
  35646. weekdays : '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
  35647. weekdaysShort : '일_월_화_수_목_금_토'.split('_'),
  35648. weekdaysMin : '일_월_화_수_목_금_토'.split('_'),
  35649. longDateFormat : {
  35650. LT : 'A h:mm',
  35651. LTS : 'A h:mm:ss',
  35652. L : 'YYYY.MM.DD',
  35653. LL : 'YYYY년 MMMM D일',
  35654. LLL : 'YYYY년 MMMM D일 A h:mm',
  35655. LLLL : 'YYYY년 MMMM D일 dddd A h:mm',
  35656. l : 'YYYY.MM.DD',
  35657. ll : 'YYYY년 MMMM D일',
  35658. lll : 'YYYY년 MMMM D일 A h:mm',
  35659. llll : 'YYYY년 MMMM D일 dddd A h:mm'
  35660. },
  35661. calendar : {
  35662. sameDay : '오늘 LT',
  35663. nextDay : '내일 LT',
  35664. nextWeek : 'dddd LT',
  35665. lastDay : '어제 LT',
  35666. lastWeek : '지난주 dddd LT',
  35667. sameElse : 'L'
  35668. },
  35669. relativeTime : {
  35670. future : '%s 후',
  35671. past : '%s 전',
  35672. s : '몇 초',
  35673. ss : '%d초',
  35674. m : '1분',
  35675. mm : '%d분',
  35676. h : '한 시간',
  35677. hh : '%d시간',
  35678. d : '하루',
  35679. dd : '%d일',
  35680. M : '한 달',
  35681. MM : '%d달',
  35682. y : '일 년',
  35683. yy : '%d년'
  35684. },
  35685. dayOfMonthOrdinalParse : /\d{1,2}(일|월|주)/,
  35686. ordinal : function (number, period) {
  35687. switch (period) {
  35688. case 'd':
  35689. case 'D':
  35690. case 'DDD':
  35691. return number + '일';
  35692. case 'M':
  35693. return number + '월';
  35694. case 'w':
  35695. case 'W':
  35696. return number + '주';
  35697. default:
  35698. return number;
  35699. }
  35700. },
  35701. meridiemParse : /오전|오후/,
  35702. isPM : function (token) {
  35703. return token === '오후';
  35704. },
  35705. meridiem : function (hour, minute, isUpper) {
  35706. return hour < 12 ? '오전' : '오후';
  35707. }
  35708. });
  35709. return ko;
  35710. })));
  35711. /***/ }),
  35712. /***/ "./node_modules/moment/locale/ky.js":
  35713. /*!******************************************!*\
  35714. !*** ./node_modules/moment/locale/ky.js ***!
  35715. \******************************************/
  35716. /*! no static exports found */
  35717. /***/ (function(module, exports, __webpack_require__) {
  35718. //! moment.js locale configuration
  35719. //! locale : Kyrgyz [ky]
  35720. //! author : Chyngyz Arystan uulu : https://github.com/chyngyz
  35721. ;(function (global, factory) {
  35722. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  35723. undefined
  35724. }(this, (function (moment) { 'use strict';
  35725. var suffixes = {
  35726. 0: '-чү',
  35727. 1: '-чи',
  35728. 2: '-чи',
  35729. 3: '-чү',
  35730. 4: '-чү',
  35731. 5: '-чи',
  35732. 6: '-чы',
  35733. 7: '-чи',
  35734. 8: '-чи',
  35735. 9: '-чу',
  35736. 10: '-чу',
  35737. 20: '-чы',
  35738. 30: '-чу',
  35739. 40: '-чы',
  35740. 50: '-чү',
  35741. 60: '-чы',
  35742. 70: '-чи',
  35743. 80: '-чи',
  35744. 90: '-чу',
  35745. 100: '-чү'
  35746. };
  35747. var ky = moment.defineLocale('ky', {
  35748. months : 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'),
  35749. monthsShort : 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'),
  35750. weekdays : 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split('_'),
  35751. weekdaysShort : 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),
  35752. weekdaysMin : 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),
  35753. longDateFormat : {
  35754. LT : 'HH:mm',
  35755. LTS : 'HH:mm:ss',
  35756. L : 'DD.MM.YYYY',
  35757. LL : 'D MMMM YYYY',
  35758. LLL : 'D MMMM YYYY HH:mm',
  35759. LLLL : 'dddd, D MMMM YYYY HH:mm'
  35760. },
  35761. calendar : {
  35762. sameDay : '[Бүгүн саат] LT',
  35763. nextDay : '[Эртең саат] LT',
  35764. nextWeek : 'dddd [саат] LT',
  35765. lastDay : '[Кече саат] LT',
  35766. lastWeek : '[Өткен аптанын] dddd [күнү] [саат] LT',
  35767. sameElse : 'L'
  35768. },
  35769. relativeTime : {
  35770. future : '%s ичинде',
  35771. past : '%s мурун',
  35772. s : 'бирнече секунд',
  35773. m : 'бир мүнөт',
  35774. mm : '%d мүнөт',
  35775. h : 'бир саат',
  35776. hh : '%d саат',
  35777. d : 'бир күн',
  35778. dd : '%d күн',
  35779. M : 'бир ай',
  35780. MM : '%d ай',
  35781. y : 'бир жыл',
  35782. yy : '%d жыл'
  35783. },
  35784. dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/,
  35785. ordinal : function (number) {
  35786. var a = number % 10,
  35787. b = number >= 100 ? 100 : null;
  35788. return number + (suffixes[number] || suffixes[a] || suffixes[b]);
  35789. },
  35790. week : {
  35791. dow : 1, // Monday is the first day of the week.
  35792. doy : 7 // The week that contains Jan 1st is the first week of the year.
  35793. }
  35794. });
  35795. return ky;
  35796. })));
  35797. /***/ }),
  35798. /***/ "./node_modules/moment/locale/lb.js":
  35799. /*!******************************************!*\
  35800. !*** ./node_modules/moment/locale/lb.js ***!
  35801. \******************************************/
  35802. /*! no static exports found */
  35803. /***/ (function(module, exports, __webpack_require__) {
  35804. //! moment.js locale configuration
  35805. //! locale : Luxembourgish [lb]
  35806. //! author : mweimerskirch : https://github.com/mweimerskirch
  35807. //! author : David Raison : https://github.com/kwisatz
  35808. ;(function (global, factory) {
  35809. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  35810. undefined
  35811. }(this, (function (moment) { 'use strict';
  35812. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  35813. var format = {
  35814. 'm': ['eng Minutt', 'enger Minutt'],
  35815. 'h': ['eng Stonn', 'enger Stonn'],
  35816. 'd': ['een Dag', 'engem Dag'],
  35817. 'M': ['ee Mount', 'engem Mount'],
  35818. 'y': ['ee Joer', 'engem Joer']
  35819. };
  35820. return withoutSuffix ? format[key][0] : format[key][1];
  35821. }
  35822. function processFutureTime(string) {
  35823. var number = string.substr(0, string.indexOf(' '));
  35824. if (eifelerRegelAppliesToNumber(number)) {
  35825. return 'a ' + string;
  35826. }
  35827. return 'an ' + string;
  35828. }
  35829. function processPastTime(string) {
  35830. var number = string.substr(0, string.indexOf(' '));
  35831. if (eifelerRegelAppliesToNumber(number)) {
  35832. return 'viru ' + string;
  35833. }
  35834. return 'virun ' + string;
  35835. }
  35836. /**
  35837. * Returns true if the word before the given number loses the '-n' ending.
  35838. * e.g. 'an 10 Deeg' but 'a 5 Deeg'
  35839. *
  35840. * @param number {integer}
  35841. * @returns {boolean}
  35842. */
  35843. function eifelerRegelAppliesToNumber(number) {
  35844. number = parseInt(number, 10);
  35845. if (isNaN(number)) {
  35846. return false;
  35847. }
  35848. if (number < 0) {
  35849. // Negative Number --> always true
  35850. return true;
  35851. } else if (number < 10) {
  35852. // Only 1 digit
  35853. if (4 <= number && number <= 7) {
  35854. return true;
  35855. }
  35856. return false;
  35857. } else if (number < 100) {
  35858. // 2 digits
  35859. var lastDigit = number % 10, firstDigit = number / 10;
  35860. if (lastDigit === 0) {
  35861. return eifelerRegelAppliesToNumber(firstDigit);
  35862. }
  35863. return eifelerRegelAppliesToNumber(lastDigit);
  35864. } else if (number < 10000) {
  35865. // 3 or 4 digits --> recursively check first digit
  35866. while (number >= 10) {
  35867. number = number / 10;
  35868. }
  35869. return eifelerRegelAppliesToNumber(number);
  35870. } else {
  35871. // Anything larger than 4 digits: recursively check first n-3 digits
  35872. number = number / 1000;
  35873. return eifelerRegelAppliesToNumber(number);
  35874. }
  35875. }
  35876. var lb = moment.defineLocale('lb', {
  35877. months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'),
  35878. monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'),
  35879. monthsParseExact : true,
  35880. weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'),
  35881. weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),
  35882. weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),
  35883. weekdaysParseExact : true,
  35884. longDateFormat: {
  35885. LT: 'H:mm [Auer]',
  35886. LTS: 'H:mm:ss [Auer]',
  35887. L: 'DD.MM.YYYY',
  35888. LL: 'D. MMMM YYYY',
  35889. LLL: 'D. MMMM YYYY H:mm [Auer]',
  35890. LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]'
  35891. },
  35892. calendar: {
  35893. sameDay: '[Haut um] LT',
  35894. sameElse: 'L',
  35895. nextDay: '[Muer um] LT',
  35896. nextWeek: 'dddd [um] LT',
  35897. lastDay: '[Gëschter um] LT',
  35898. lastWeek: function () {
  35899. // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule
  35900. switch (this.day()) {
  35901. case 2:
  35902. case 4:
  35903. return '[Leschten] dddd [um] LT';
  35904. default:
  35905. return '[Leschte] dddd [um] LT';
  35906. }
  35907. }
  35908. },
  35909. relativeTime : {
  35910. future : processFutureTime,
  35911. past : processPastTime,
  35912. s : 'e puer Sekonnen',
  35913. m : processRelativeTime,
  35914. mm : '%d Minutten',
  35915. h : processRelativeTime,
  35916. hh : '%d Stonnen',
  35917. d : processRelativeTime,
  35918. dd : '%d Deeg',
  35919. M : processRelativeTime,
  35920. MM : '%d Méint',
  35921. y : processRelativeTime,
  35922. yy : '%d Joer'
  35923. },
  35924. dayOfMonthOrdinalParse: /\d{1,2}\./,
  35925. ordinal: '%d.',
  35926. week: {
  35927. dow: 1, // Monday is the first day of the week.
  35928. doy: 4 // The week that contains Jan 4th is the first week of the year.
  35929. }
  35930. });
  35931. return lb;
  35932. })));
  35933. /***/ }),
  35934. /***/ "./node_modules/moment/locale/lo.js":
  35935. /*!******************************************!*\
  35936. !*** ./node_modules/moment/locale/lo.js ***!
  35937. \******************************************/
  35938. /*! no static exports found */
  35939. /***/ (function(module, exports, __webpack_require__) {
  35940. //! moment.js locale configuration
  35941. //! locale : Lao [lo]
  35942. //! author : Ryan Hart : https://github.com/ryanhart2
  35943. ;(function (global, factory) {
  35944. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  35945. undefined
  35946. }(this, (function (moment) { 'use strict';
  35947. var lo = moment.defineLocale('lo', {
  35948. months : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),
  35949. monthsShort : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'),
  35950. weekdays : 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
  35951. weekdaysShort : 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),
  35952. weekdaysMin : 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),
  35953. weekdaysParseExact : true,
  35954. longDateFormat : {
  35955. LT : 'HH:mm',
  35956. LTS : 'HH:mm:ss',
  35957. L : 'DD/MM/YYYY',
  35958. LL : 'D MMMM YYYY',
  35959. LLL : 'D MMMM YYYY HH:mm',
  35960. LLLL : 'ວັນdddd D MMMM YYYY HH:mm'
  35961. },
  35962. meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,
  35963. isPM: function (input) {
  35964. return input === 'ຕອນແລງ';
  35965. },
  35966. meridiem : function (hour, minute, isLower) {
  35967. if (hour < 12) {
  35968. return 'ຕອນເຊົ້າ';
  35969. } else {
  35970. return 'ຕອນແລງ';
  35971. }
  35972. },
  35973. calendar : {
  35974. sameDay : '[ມື້ນີ້ເວລາ] LT',
  35975. nextDay : '[ມື້ອື່ນເວລາ] LT',
  35976. nextWeek : '[ວັນ]dddd[ໜ້າເວລາ] LT',
  35977. lastDay : '[ມື້ວານນີ້ເວລາ] LT',
  35978. lastWeek : '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',
  35979. sameElse : 'L'
  35980. },
  35981. relativeTime : {
  35982. future : 'ອີກ %s',
  35983. past : '%sຜ່ານມາ',
  35984. s : 'ບໍ່ເທົ່າໃດວິນາທີ',
  35985. m : '1 ນາທີ',
  35986. mm : '%d ນາທີ',
  35987. h : '1 ຊົ່ວໂມງ',
  35988. hh : '%d ຊົ່ວໂມງ',
  35989. d : '1 ມື້',
  35990. dd : '%d ມື້',
  35991. M : '1 ເດືອນ',
  35992. MM : '%d ເດືອນ',
  35993. y : '1 ປີ',
  35994. yy : '%d ປີ'
  35995. },
  35996. dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/,
  35997. ordinal : function (number) {
  35998. return 'ທີ່' + number;
  35999. }
  36000. });
  36001. return lo;
  36002. })));
  36003. /***/ }),
  36004. /***/ "./node_modules/moment/locale/lt.js":
  36005. /*!******************************************!*\
  36006. !*** ./node_modules/moment/locale/lt.js ***!
  36007. \******************************************/
  36008. /*! no static exports found */
  36009. /***/ (function(module, exports, __webpack_require__) {
  36010. //! moment.js locale configuration
  36011. //! locale : Lithuanian [lt]
  36012. //! author : Mindaugas Mozūras : https://github.com/mmozuras
  36013. ;(function (global, factory) {
  36014. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  36015. undefined
  36016. }(this, (function (moment) { 'use strict';
  36017. var units = {
  36018. 'm' : 'minutė_minutės_minutę',
  36019. 'mm': 'minutės_minučių_minutes',
  36020. 'h' : 'valanda_valandos_valandą',
  36021. 'hh': 'valandos_valandų_valandas',
  36022. 'd' : 'diena_dienos_dieną',
  36023. 'dd': 'dienos_dienų_dienas',
  36024. 'M' : 'mėnuo_mėnesio_mėnesį',
  36025. 'MM': 'mėnesiai_mėnesių_mėnesius',
  36026. 'y' : 'metai_metų_metus',
  36027. 'yy': 'metai_metų_metus'
  36028. };
  36029. function translateSeconds(number, withoutSuffix, key, isFuture) {
  36030. if (withoutSuffix) {
  36031. return 'kelios sekundės';
  36032. } else {
  36033. return isFuture ? 'kelių sekundžių' : 'kelias sekundes';
  36034. }
  36035. }
  36036. function translateSingular(number, withoutSuffix, key, isFuture) {
  36037. return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]);
  36038. }
  36039. function special(number) {
  36040. return number % 10 === 0 || (number > 10 && number < 20);
  36041. }
  36042. function forms(key) {
  36043. return units[key].split('_');
  36044. }
  36045. function translate(number, withoutSuffix, key, isFuture) {
  36046. var result = number + ' ';
  36047. if (number === 1) {
  36048. return result + translateSingular(number, withoutSuffix, key[0], isFuture);
  36049. } else if (withoutSuffix) {
  36050. return result + (special(number) ? forms(key)[1] : forms(key)[0]);
  36051. } else {
  36052. if (isFuture) {
  36053. return result + forms(key)[1];
  36054. } else {
  36055. return result + (special(number) ? forms(key)[1] : forms(key)[2]);
  36056. }
  36057. }
  36058. }
  36059. var lt = moment.defineLocale('lt', {
  36060. months : {
  36061. format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'),
  36062. standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'),
  36063. isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/
  36064. },
  36065. monthsShort : 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),
  36066. weekdays : {
  36067. format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'),
  36068. standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'),
  36069. isFormat: /dddd HH:mm/
  36070. },
  36071. weekdaysShort : 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),
  36072. weekdaysMin : 'S_P_A_T_K_Pn_Š'.split('_'),
  36073. weekdaysParseExact : true,
  36074. longDateFormat : {
  36075. LT : 'HH:mm',
  36076. LTS : 'HH:mm:ss',
  36077. L : 'YYYY-MM-DD',
  36078. LL : 'YYYY [m.] MMMM D [d.]',
  36079. LLL : 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
  36080. LLLL : 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',
  36081. l : 'YYYY-MM-DD',
  36082. ll : 'YYYY [m.] MMMM D [d.]',
  36083. lll : 'YYYY [m.] MMMM D [d.], HH:mm [val.]',
  36084. llll : 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]'
  36085. },
  36086. calendar : {
  36087. sameDay : '[Šiandien] LT',
  36088. nextDay : '[Rytoj] LT',
  36089. nextWeek : 'dddd LT',
  36090. lastDay : '[Vakar] LT',
  36091. lastWeek : '[Praėjusį] dddd LT',
  36092. sameElse : 'L'
  36093. },
  36094. relativeTime : {
  36095. future : 'po %s',
  36096. past : 'prieš %s',
  36097. s : translateSeconds,
  36098. m : translateSingular,
  36099. mm : translate,
  36100. h : translateSingular,
  36101. hh : translate,
  36102. d : translateSingular,
  36103. dd : translate,
  36104. M : translateSingular,
  36105. MM : translate,
  36106. y : translateSingular,
  36107. yy : translate
  36108. },
  36109. dayOfMonthOrdinalParse: /\d{1,2}-oji/,
  36110. ordinal : function (number) {
  36111. return number + '-oji';
  36112. },
  36113. week : {
  36114. dow : 1, // Monday is the first day of the week.
  36115. doy : 4 // The week that contains Jan 4th is the first week of the year.
  36116. }
  36117. });
  36118. return lt;
  36119. })));
  36120. /***/ }),
  36121. /***/ "./node_modules/moment/locale/lv.js":
  36122. /*!******************************************!*\
  36123. !*** ./node_modules/moment/locale/lv.js ***!
  36124. \******************************************/
  36125. /*! no static exports found */
  36126. /***/ (function(module, exports, __webpack_require__) {
  36127. //! moment.js locale configuration
  36128. //! locale : Latvian [lv]
  36129. //! author : Kristaps Karlsons : https://github.com/skakri
  36130. //! author : Jānis Elmeris : https://github.com/JanisE
  36131. ;(function (global, factory) {
  36132. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  36133. undefined
  36134. }(this, (function (moment) { 'use strict';
  36135. var units = {
  36136. 'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),
  36137. 'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),
  36138. 'h': 'stundas_stundām_stunda_stundas'.split('_'),
  36139. 'hh': 'stundas_stundām_stunda_stundas'.split('_'),
  36140. 'd': 'dienas_dienām_diena_dienas'.split('_'),
  36141. 'dd': 'dienas_dienām_diena_dienas'.split('_'),
  36142. 'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
  36143. 'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
  36144. 'y': 'gada_gadiem_gads_gadi'.split('_'),
  36145. 'yy': 'gada_gadiem_gads_gadi'.split('_')
  36146. };
  36147. /**
  36148. * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
  36149. */
  36150. function format(forms, number, withoutSuffix) {
  36151. if (withoutSuffix) {
  36152. // E.g. "21 minūte", "3 minūtes".
  36153. return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];
  36154. } else {
  36155. // E.g. "21 minūtes" as in "pēc 21 minūtes".
  36156. // E.g. "3 minūtēm" as in "pēc 3 minūtēm".
  36157. return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];
  36158. }
  36159. }
  36160. function relativeTimeWithPlural(number, withoutSuffix, key) {
  36161. return number + ' ' + format(units[key], number, withoutSuffix);
  36162. }
  36163. function relativeTimeWithSingular(number, withoutSuffix, key) {
  36164. return format(units[key], number, withoutSuffix);
  36165. }
  36166. function relativeSeconds(number, withoutSuffix) {
  36167. return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
  36168. }
  36169. var lv = moment.defineLocale('lv', {
  36170. months : 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'),
  36171. monthsShort : 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
  36172. weekdays : 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'),
  36173. weekdaysShort : 'Sv_P_O_T_C_Pk_S'.split('_'),
  36174. weekdaysMin : 'Sv_P_O_T_C_Pk_S'.split('_'),
  36175. weekdaysParseExact : true,
  36176. longDateFormat : {
  36177. LT : 'HH:mm',
  36178. LTS : 'HH:mm:ss',
  36179. L : 'DD.MM.YYYY.',
  36180. LL : 'YYYY. [gada] D. MMMM',
  36181. LLL : 'YYYY. [gada] D. MMMM, HH:mm',
  36182. LLLL : 'YYYY. [gada] D. MMMM, dddd, HH:mm'
  36183. },
  36184. calendar : {
  36185. sameDay : '[Šodien pulksten] LT',
  36186. nextDay : '[Rīt pulksten] LT',
  36187. nextWeek : 'dddd [pulksten] LT',
  36188. lastDay : '[Vakar pulksten] LT',
  36189. lastWeek : '[Pagājušā] dddd [pulksten] LT',
  36190. sameElse : 'L'
  36191. },
  36192. relativeTime : {
  36193. future : 'pēc %s',
  36194. past : 'pirms %s',
  36195. s : relativeSeconds,
  36196. m : relativeTimeWithSingular,
  36197. mm : relativeTimeWithPlural,
  36198. h : relativeTimeWithSingular,
  36199. hh : relativeTimeWithPlural,
  36200. d : relativeTimeWithSingular,
  36201. dd : relativeTimeWithPlural,
  36202. M : relativeTimeWithSingular,
  36203. MM : relativeTimeWithPlural,
  36204. y : relativeTimeWithSingular,
  36205. yy : relativeTimeWithPlural
  36206. },
  36207. dayOfMonthOrdinalParse: /\d{1,2}\./,
  36208. ordinal : '%d.',
  36209. week : {
  36210. dow : 1, // Monday is the first day of the week.
  36211. doy : 4 // The week that contains Jan 4th is the first week of the year.
  36212. }
  36213. });
  36214. return lv;
  36215. })));
  36216. /***/ }),
  36217. /***/ "./node_modules/moment/locale/me.js":
  36218. /*!******************************************!*\
  36219. !*** ./node_modules/moment/locale/me.js ***!
  36220. \******************************************/
  36221. /*! no static exports found */
  36222. /***/ (function(module, exports, __webpack_require__) {
  36223. //! moment.js locale configuration
  36224. //! locale : Montenegrin [me]
  36225. //! author : Miodrag Nikač <miodrag@restartit.me> : https://github.com/miodragnikac
  36226. ;(function (global, factory) {
  36227. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  36228. undefined
  36229. }(this, (function (moment) { 'use strict';
  36230. var translator = {
  36231. words: { //Different grammatical cases
  36232. m: ['jedan minut', 'jednog minuta'],
  36233. mm: ['minut', 'minuta', 'minuta'],
  36234. h: ['jedan sat', 'jednog sata'],
  36235. hh: ['sat', 'sata', 'sati'],
  36236. dd: ['dan', 'dana', 'dana'],
  36237. MM: ['mjesec', 'mjeseca', 'mjeseci'],
  36238. yy: ['godina', 'godine', 'godina']
  36239. },
  36240. correctGrammaticalCase: function (number, wordKey) {
  36241. return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);
  36242. },
  36243. translate: function (number, withoutSuffix, key) {
  36244. var wordKey = translator.words[key];
  36245. if (key.length === 1) {
  36246. return withoutSuffix ? wordKey[0] : wordKey[1];
  36247. } else {
  36248. return number + ' ' + translator.correctGrammaticalCase(number, wordKey);
  36249. }
  36250. }
  36251. };
  36252. var me = moment.defineLocale('me', {
  36253. months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),
  36254. monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
  36255. monthsParseExact : true,
  36256. weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'),
  36257. weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),
  36258. weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
  36259. weekdaysParseExact : true,
  36260. longDateFormat: {
  36261. LT: 'H:mm',
  36262. LTS : 'H:mm:ss',
  36263. L: 'DD.MM.YYYY',
  36264. LL: 'D. MMMM YYYY',
  36265. LLL: 'D. MMMM YYYY H:mm',
  36266. LLLL: 'dddd, D. MMMM YYYY H:mm'
  36267. },
  36268. calendar: {
  36269. sameDay: '[danas u] LT',
  36270. nextDay: '[sjutra u] LT',
  36271. nextWeek: function () {
  36272. switch (this.day()) {
  36273. case 0:
  36274. return '[u] [nedjelju] [u] LT';
  36275. case 3:
  36276. return '[u] [srijedu] [u] LT';
  36277. case 6:
  36278. return '[u] [subotu] [u] LT';
  36279. case 1:
  36280. case 2:
  36281. case 4:
  36282. case 5:
  36283. return '[u] dddd [u] LT';
  36284. }
  36285. },
  36286. lastDay : '[juče u] LT',
  36287. lastWeek : function () {
  36288. var lastWeekDays = [
  36289. '[prošle] [nedjelje] [u] LT',
  36290. '[prošlog] [ponedjeljka] [u] LT',
  36291. '[prošlog] [utorka] [u] LT',
  36292. '[prošle] [srijede] [u] LT',
  36293. '[prošlog] [četvrtka] [u] LT',
  36294. '[prošlog] [petka] [u] LT',
  36295. '[prošle] [subote] [u] LT'
  36296. ];
  36297. return lastWeekDays[this.day()];
  36298. },
  36299. sameElse : 'L'
  36300. },
  36301. relativeTime : {
  36302. future : 'za %s',
  36303. past : 'prije %s',
  36304. s : 'nekoliko sekundi',
  36305. m : translator.translate,
  36306. mm : translator.translate,
  36307. h : translator.translate,
  36308. hh : translator.translate,
  36309. d : 'dan',
  36310. dd : translator.translate,
  36311. M : 'mjesec',
  36312. MM : translator.translate,
  36313. y : 'godinu',
  36314. yy : translator.translate
  36315. },
  36316. dayOfMonthOrdinalParse: /\d{1,2}\./,
  36317. ordinal : '%d.',
  36318. week : {
  36319. dow : 1, // Monday is the first day of the week.
  36320. doy : 7 // The week that contains Jan 1st is the first week of the year.
  36321. }
  36322. });
  36323. return me;
  36324. })));
  36325. /***/ }),
  36326. /***/ "./node_modules/moment/locale/mi.js":
  36327. /*!******************************************!*\
  36328. !*** ./node_modules/moment/locale/mi.js ***!
  36329. \******************************************/
  36330. /*! no static exports found */
  36331. /***/ (function(module, exports, __webpack_require__) {
  36332. //! moment.js locale configuration
  36333. //! locale : Maori [mi]
  36334. //! author : John Corrigan <robbiecloset@gmail.com> : https://github.com/johnideal
  36335. ;(function (global, factory) {
  36336. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  36337. undefined
  36338. }(this, (function (moment) { 'use strict';
  36339. var mi = moment.defineLocale('mi', {
  36340. months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split('_'),
  36341. monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split('_'),
  36342. monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
  36343. monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
  36344. monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,
  36345. monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,
  36346. weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),
  36347. weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
  36348. weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),
  36349. longDateFormat: {
  36350. LT: 'HH:mm',
  36351. LTS: 'HH:mm:ss',
  36352. L: 'DD/MM/YYYY',
  36353. LL: 'D MMMM YYYY',
  36354. LLL: 'D MMMM YYYY [i] HH:mm',
  36355. LLLL: 'dddd, D MMMM YYYY [i] HH:mm'
  36356. },
  36357. calendar: {
  36358. sameDay: '[i teie mahana, i] LT',
  36359. nextDay: '[apopo i] LT',
  36360. nextWeek: 'dddd [i] LT',
  36361. lastDay: '[inanahi i] LT',
  36362. lastWeek: 'dddd [whakamutunga i] LT',
  36363. sameElse: 'L'
  36364. },
  36365. relativeTime: {
  36366. future: 'i roto i %s',
  36367. past: '%s i mua',
  36368. s: 'te hēkona ruarua',
  36369. m: 'he meneti',
  36370. mm: '%d meneti',
  36371. h: 'te haora',
  36372. hh: '%d haora',
  36373. d: 'he ra',
  36374. dd: '%d ra',
  36375. M: 'he marama',
  36376. MM: '%d marama',
  36377. y: 'he tau',
  36378. yy: '%d tau'
  36379. },
  36380. dayOfMonthOrdinalParse: /\d{1,2}º/,
  36381. ordinal: '%dº',
  36382. week : {
  36383. dow : 1, // Monday is the first day of the week.
  36384. doy : 4 // The week that contains Jan 4th is the first week of the year.
  36385. }
  36386. });
  36387. return mi;
  36388. })));
  36389. /***/ }),
  36390. /***/ "./node_modules/moment/locale/mk.js":
  36391. /*!******************************************!*\
  36392. !*** ./node_modules/moment/locale/mk.js ***!
  36393. \******************************************/
  36394. /*! no static exports found */
  36395. /***/ (function(module, exports, __webpack_require__) {
  36396. //! moment.js locale configuration
  36397. //! locale : Macedonian [mk]
  36398. //! author : Borislav Mickov : https://github.com/B0k0
  36399. ;(function (global, factory) {
  36400. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  36401. undefined
  36402. }(this, (function (moment) { 'use strict';
  36403. var mk = moment.defineLocale('mk', {
  36404. months : 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split('_'),
  36405. monthsShort : 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),
  36406. weekdays : 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split('_'),
  36407. weekdaysShort : 'нед_пон_вто_сре_чет_пет_саб'.split('_'),
  36408. weekdaysMin : 'нe_пo_вт_ср_че_пе_сa'.split('_'),
  36409. longDateFormat : {
  36410. LT : 'H:mm',
  36411. LTS : 'H:mm:ss',
  36412. L : 'D.MM.YYYY',
  36413. LL : 'D MMMM YYYY',
  36414. LLL : 'D MMMM YYYY H:mm',
  36415. LLLL : 'dddd, D MMMM YYYY H:mm'
  36416. },
  36417. calendar : {
  36418. sameDay : '[Денес во] LT',
  36419. nextDay : '[Утре во] LT',
  36420. nextWeek : '[Во] dddd [во] LT',
  36421. lastDay : '[Вчера во] LT',
  36422. lastWeek : function () {
  36423. switch (this.day()) {
  36424. case 0:
  36425. case 3:
  36426. case 6:
  36427. return '[Изминатата] dddd [во] LT';
  36428. case 1:
  36429. case 2:
  36430. case 4:
  36431. case 5:
  36432. return '[Изминатиот] dddd [во] LT';
  36433. }
  36434. },
  36435. sameElse : 'L'
  36436. },
  36437. relativeTime : {
  36438. future : 'после %s',
  36439. past : 'пред %s',
  36440. s : 'неколку секунди',
  36441. m : 'минута',
  36442. mm : '%d минути',
  36443. h : 'час',
  36444. hh : '%d часа',
  36445. d : 'ден',
  36446. dd : '%d дена',
  36447. M : 'месец',
  36448. MM : '%d месеци',
  36449. y : 'година',
  36450. yy : '%d години'
  36451. },
  36452. dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
  36453. ordinal : function (number) {
  36454. var lastDigit = number % 10,
  36455. last2Digits = number % 100;
  36456. if (number === 0) {
  36457. return number + '-ев';
  36458. } else if (last2Digits === 0) {
  36459. return number + '-ен';
  36460. } else if (last2Digits > 10 && last2Digits < 20) {
  36461. return number + '-ти';
  36462. } else if (lastDigit === 1) {
  36463. return number + '-ви';
  36464. } else if (lastDigit === 2) {
  36465. return number + '-ри';
  36466. } else if (lastDigit === 7 || lastDigit === 8) {
  36467. return number + '-ми';
  36468. } else {
  36469. return number + '-ти';
  36470. }
  36471. },
  36472. week : {
  36473. dow : 1, // Monday is the first day of the week.
  36474. doy : 7 // The week that contains Jan 1st is the first week of the year.
  36475. }
  36476. });
  36477. return mk;
  36478. })));
  36479. /***/ }),
  36480. /***/ "./node_modules/moment/locale/ml.js":
  36481. /*!******************************************!*\
  36482. !*** ./node_modules/moment/locale/ml.js ***!
  36483. \******************************************/
  36484. /*! no static exports found */
  36485. /***/ (function(module, exports, __webpack_require__) {
  36486. //! moment.js locale configuration
  36487. //! locale : Malayalam [ml]
  36488. //! author : Floyd Pink : https://github.com/floydpink
  36489. ;(function (global, factory) {
  36490. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  36491. undefined
  36492. }(this, (function (moment) { 'use strict';
  36493. var ml = moment.defineLocale('ml', {
  36494. months : 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split('_'),
  36495. monthsShort : 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split('_'),
  36496. monthsParseExact : true,
  36497. weekdays : 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split('_'),
  36498. weekdaysShort : 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),
  36499. weekdaysMin : 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),
  36500. longDateFormat : {
  36501. LT : 'A h:mm -നു',
  36502. LTS : 'A h:mm:ss -നു',
  36503. L : 'DD/MM/YYYY',
  36504. LL : 'D MMMM YYYY',
  36505. LLL : 'D MMMM YYYY, A h:mm -നു',
  36506. LLLL : 'dddd, D MMMM YYYY, A h:mm -നു'
  36507. },
  36508. calendar : {
  36509. sameDay : '[ഇന്ന്] LT',
  36510. nextDay : '[നാളെ] LT',
  36511. nextWeek : 'dddd, LT',
  36512. lastDay : '[ഇന്നലെ] LT',
  36513. lastWeek : '[കഴിഞ്ഞ] dddd, LT',
  36514. sameElse : 'L'
  36515. },
  36516. relativeTime : {
  36517. future : '%s കഴിഞ്ഞ്',
  36518. past : '%s മുൻപ്',
  36519. s : 'അൽപ നിമിഷങ്ങൾ',
  36520. m : 'ഒരു മിനിറ്റ്',
  36521. mm : '%d മിനിറ്റ്',
  36522. h : 'ഒരു മണിക്കൂർ',
  36523. hh : '%d മണിക്കൂർ',
  36524. d : 'ഒരു ദിവസം',
  36525. dd : '%d ദിവസം',
  36526. M : 'ഒരു മാസം',
  36527. MM : '%d മാസം',
  36528. y : 'ഒരു വർഷം',
  36529. yy : '%d വർഷം'
  36530. },
  36531. meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,
  36532. meridiemHour : function (hour, meridiem) {
  36533. if (hour === 12) {
  36534. hour = 0;
  36535. }
  36536. if ((meridiem === 'രാത്രി' && hour >= 4) ||
  36537. meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||
  36538. meridiem === 'വൈകുന്നേരം') {
  36539. return hour + 12;
  36540. } else {
  36541. return hour;
  36542. }
  36543. },
  36544. meridiem : function (hour, minute, isLower) {
  36545. if (hour < 4) {
  36546. return 'രാത്രി';
  36547. } else if (hour < 12) {
  36548. return 'രാവിലെ';
  36549. } else if (hour < 17) {
  36550. return 'ഉച്ച കഴിഞ്ഞ്';
  36551. } else if (hour < 20) {
  36552. return 'വൈകുന്നേരം';
  36553. } else {
  36554. return 'രാത്രി';
  36555. }
  36556. }
  36557. });
  36558. return ml;
  36559. })));
  36560. /***/ }),
  36561. /***/ "./node_modules/moment/locale/mr.js":
  36562. /*!******************************************!*\
  36563. !*** ./node_modules/moment/locale/mr.js ***!
  36564. \******************************************/
  36565. /*! no static exports found */
  36566. /***/ (function(module, exports, __webpack_require__) {
  36567. //! moment.js locale configuration
  36568. //! locale : Marathi [mr]
  36569. //! author : Harshad Kale : https://github.com/kalehv
  36570. //! author : Vivek Athalye : https://github.com/vnathalye
  36571. ;(function (global, factory) {
  36572. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  36573. undefined
  36574. }(this, (function (moment) { 'use strict';
  36575. var symbolMap = {
  36576. '1': '१',
  36577. '2': '२',
  36578. '3': '३',
  36579. '4': '४',
  36580. '5': '५',
  36581. '6': '६',
  36582. '7': '७',
  36583. '8': '८',
  36584. '9': '९',
  36585. '0': '०'
  36586. };
  36587. var numberMap = {
  36588. '१': '1',
  36589. '२': '2',
  36590. '३': '3',
  36591. '४': '4',
  36592. '५': '5',
  36593. '६': '6',
  36594. '७': '7',
  36595. '८': '8',
  36596. '९': '9',
  36597. '०': '0'
  36598. };
  36599. function relativeTimeMr(number, withoutSuffix, string, isFuture)
  36600. {
  36601. var output = '';
  36602. if (withoutSuffix) {
  36603. switch (string) {
  36604. case 's': output = 'काही सेकंद'; break;
  36605. case 'm': output = 'एक मिनिट'; break;
  36606. case 'mm': output = '%d मिनिटे'; break;
  36607. case 'h': output = 'एक तास'; break;
  36608. case 'hh': output = '%d तास'; break;
  36609. case 'd': output = 'एक दिवस'; break;
  36610. case 'dd': output = '%d दिवस'; break;
  36611. case 'M': output = 'एक महिना'; break;
  36612. case 'MM': output = '%d महिने'; break;
  36613. case 'y': output = 'एक वर्ष'; break;
  36614. case 'yy': output = '%d वर्षे'; break;
  36615. }
  36616. }
  36617. else {
  36618. switch (string) {
  36619. case 's': output = 'काही सेकंदां'; break;
  36620. case 'm': output = 'एका मिनिटा'; break;
  36621. case 'mm': output = '%d मिनिटां'; break;
  36622. case 'h': output = 'एका तासा'; break;
  36623. case 'hh': output = '%d तासां'; break;
  36624. case 'd': output = 'एका दिवसा'; break;
  36625. case 'dd': output = '%d दिवसां'; break;
  36626. case 'M': output = 'एका महिन्या'; break;
  36627. case 'MM': output = '%d महिन्यां'; break;
  36628. case 'y': output = 'एका वर्षा'; break;
  36629. case 'yy': output = '%d वर्षां'; break;
  36630. }
  36631. }
  36632. return output.replace(/%d/i, number);
  36633. }
  36634. var mr = moment.defineLocale('mr', {
  36635. months : 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split('_'),
  36636. monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'),
  36637. monthsParseExact : true,
  36638. weekdays : 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
  36639. weekdaysShort : 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),
  36640. weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'),
  36641. longDateFormat : {
  36642. LT : 'A h:mm वाजता',
  36643. LTS : 'A h:mm:ss वाजता',
  36644. L : 'DD/MM/YYYY',
  36645. LL : 'D MMMM YYYY',
  36646. LLL : 'D MMMM YYYY, A h:mm वाजता',
  36647. LLLL : 'dddd, D MMMM YYYY, A h:mm वाजता'
  36648. },
  36649. calendar : {
  36650. sameDay : '[आज] LT',
  36651. nextDay : '[उद्या] LT',
  36652. nextWeek : 'dddd, LT',
  36653. lastDay : '[काल] LT',
  36654. lastWeek: '[मागील] dddd, LT',
  36655. sameElse : 'L'
  36656. },
  36657. relativeTime : {
  36658. future: '%sमध्ये',
  36659. past: '%sपूर्वी',
  36660. s: relativeTimeMr,
  36661. m: relativeTimeMr,
  36662. mm: relativeTimeMr,
  36663. h: relativeTimeMr,
  36664. hh: relativeTimeMr,
  36665. d: relativeTimeMr,
  36666. dd: relativeTimeMr,
  36667. M: relativeTimeMr,
  36668. MM: relativeTimeMr,
  36669. y: relativeTimeMr,
  36670. yy: relativeTimeMr
  36671. },
  36672. preparse: function (string) {
  36673. return string.replace(/[१२३४५६७८९०]/g, function (match) {
  36674. return numberMap[match];
  36675. });
  36676. },
  36677. postformat: function (string) {
  36678. return string.replace(/\d/g, function (match) {
  36679. return symbolMap[match];
  36680. });
  36681. },
  36682. meridiemParse: /रात्री|सकाळी|दुपारी|सायंकाळी/,
  36683. meridiemHour : function (hour, meridiem) {
  36684. if (hour === 12) {
  36685. hour = 0;
  36686. }
  36687. if (meridiem === 'रात्री') {
  36688. return hour < 4 ? hour : hour + 12;
  36689. } else if (meridiem === 'सकाळी') {
  36690. return hour;
  36691. } else if (meridiem === 'दुपारी') {
  36692. return hour >= 10 ? hour : hour + 12;
  36693. } else if (meridiem === 'सायंकाळी') {
  36694. return hour + 12;
  36695. }
  36696. },
  36697. meridiem: function (hour, minute, isLower) {
  36698. if (hour < 4) {
  36699. return 'रात्री';
  36700. } else if (hour < 10) {
  36701. return 'सकाळी';
  36702. } else if (hour < 17) {
  36703. return 'दुपारी';
  36704. } else if (hour < 20) {
  36705. return 'सायंकाळी';
  36706. } else {
  36707. return 'रात्री';
  36708. }
  36709. },
  36710. week : {
  36711. dow : 0, // Sunday is the first day of the week.
  36712. doy : 6 // The week that contains Jan 1st is the first week of the year.
  36713. }
  36714. });
  36715. return mr;
  36716. })));
  36717. /***/ }),
  36718. /***/ "./node_modules/moment/locale/ms-my.js":
  36719. /*!*********************************************!*\
  36720. !*** ./node_modules/moment/locale/ms-my.js ***!
  36721. \*********************************************/
  36722. /*! no static exports found */
  36723. /***/ (function(module, exports, __webpack_require__) {
  36724. //! moment.js locale configuration
  36725. //! locale : Malay [ms-my]
  36726. //! note : DEPRECATED, the correct one is [ms]
  36727. //! author : Weldan Jamili : https://github.com/weldan
  36728. ;(function (global, factory) {
  36729. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  36730. undefined
  36731. }(this, (function (moment) { 'use strict';
  36732. var msMy = moment.defineLocale('ms-my', {
  36733. months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),
  36734. monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
  36735. weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
  36736. weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
  36737. weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
  36738. longDateFormat : {
  36739. LT : 'HH.mm',
  36740. LTS : 'HH.mm.ss',
  36741. L : 'DD/MM/YYYY',
  36742. LL : 'D MMMM YYYY',
  36743. LLL : 'D MMMM YYYY [pukul] HH.mm',
  36744. LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'
  36745. },
  36746. meridiemParse: /pagi|tengahari|petang|malam/,
  36747. meridiemHour: function (hour, meridiem) {
  36748. if (hour === 12) {
  36749. hour = 0;
  36750. }
  36751. if (meridiem === 'pagi') {
  36752. return hour;
  36753. } else if (meridiem === 'tengahari') {
  36754. return hour >= 11 ? hour : hour + 12;
  36755. } else if (meridiem === 'petang' || meridiem === 'malam') {
  36756. return hour + 12;
  36757. }
  36758. },
  36759. meridiem : function (hours, minutes, isLower) {
  36760. if (hours < 11) {
  36761. return 'pagi';
  36762. } else if (hours < 15) {
  36763. return 'tengahari';
  36764. } else if (hours < 19) {
  36765. return 'petang';
  36766. } else {
  36767. return 'malam';
  36768. }
  36769. },
  36770. calendar : {
  36771. sameDay : '[Hari ini pukul] LT',
  36772. nextDay : '[Esok pukul] LT',
  36773. nextWeek : 'dddd [pukul] LT',
  36774. lastDay : '[Kelmarin pukul] LT',
  36775. lastWeek : 'dddd [lepas pukul] LT',
  36776. sameElse : 'L'
  36777. },
  36778. relativeTime : {
  36779. future : 'dalam %s',
  36780. past : '%s yang lepas',
  36781. s : 'beberapa saat',
  36782. m : 'seminit',
  36783. mm : '%d minit',
  36784. h : 'sejam',
  36785. hh : '%d jam',
  36786. d : 'sehari',
  36787. dd : '%d hari',
  36788. M : 'sebulan',
  36789. MM : '%d bulan',
  36790. y : 'setahun',
  36791. yy : '%d tahun'
  36792. },
  36793. week : {
  36794. dow : 1, // Monday is the first day of the week.
  36795. doy : 7 // The week that contains Jan 1st is the first week of the year.
  36796. }
  36797. });
  36798. return msMy;
  36799. })));
  36800. /***/ }),
  36801. /***/ "./node_modules/moment/locale/ms.js":
  36802. /*!******************************************!*\
  36803. !*** ./node_modules/moment/locale/ms.js ***!
  36804. \******************************************/
  36805. /*! no static exports found */
  36806. /***/ (function(module, exports, __webpack_require__) {
  36807. //! moment.js locale configuration
  36808. //! locale : Malay [ms]
  36809. //! author : Weldan Jamili : https://github.com/weldan
  36810. ;(function (global, factory) {
  36811. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  36812. undefined
  36813. }(this, (function (moment) { 'use strict';
  36814. var ms = moment.defineLocale('ms', {
  36815. months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'),
  36816. monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),
  36817. weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),
  36818. weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),
  36819. weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),
  36820. longDateFormat : {
  36821. LT : 'HH.mm',
  36822. LTS : 'HH.mm.ss',
  36823. L : 'DD/MM/YYYY',
  36824. LL : 'D MMMM YYYY',
  36825. LLL : 'D MMMM YYYY [pukul] HH.mm',
  36826. LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm'
  36827. },
  36828. meridiemParse: /pagi|tengahari|petang|malam/,
  36829. meridiemHour: function (hour, meridiem) {
  36830. if (hour === 12) {
  36831. hour = 0;
  36832. }
  36833. if (meridiem === 'pagi') {
  36834. return hour;
  36835. } else if (meridiem === 'tengahari') {
  36836. return hour >= 11 ? hour : hour + 12;
  36837. } else if (meridiem === 'petang' || meridiem === 'malam') {
  36838. return hour + 12;
  36839. }
  36840. },
  36841. meridiem : function (hours, minutes, isLower) {
  36842. if (hours < 11) {
  36843. return 'pagi';
  36844. } else if (hours < 15) {
  36845. return 'tengahari';
  36846. } else if (hours < 19) {
  36847. return 'petang';
  36848. } else {
  36849. return 'malam';
  36850. }
  36851. },
  36852. calendar : {
  36853. sameDay : '[Hari ini pukul] LT',
  36854. nextDay : '[Esok pukul] LT',
  36855. nextWeek : 'dddd [pukul] LT',
  36856. lastDay : '[Kelmarin pukul] LT',
  36857. lastWeek : 'dddd [lepas pukul] LT',
  36858. sameElse : 'L'
  36859. },
  36860. relativeTime : {
  36861. future : 'dalam %s',
  36862. past : '%s yang lepas',
  36863. s : 'beberapa saat',
  36864. m : 'seminit',
  36865. mm : '%d minit',
  36866. h : 'sejam',
  36867. hh : '%d jam',
  36868. d : 'sehari',
  36869. dd : '%d hari',
  36870. M : 'sebulan',
  36871. MM : '%d bulan',
  36872. y : 'setahun',
  36873. yy : '%d tahun'
  36874. },
  36875. week : {
  36876. dow : 1, // Monday is the first day of the week.
  36877. doy : 7 // The week that contains Jan 1st is the first week of the year.
  36878. }
  36879. });
  36880. return ms;
  36881. })));
  36882. /***/ }),
  36883. /***/ "./node_modules/moment/locale/my.js":
  36884. /*!******************************************!*\
  36885. !*** ./node_modules/moment/locale/my.js ***!
  36886. \******************************************/
  36887. /*! no static exports found */
  36888. /***/ (function(module, exports, __webpack_require__) {
  36889. //! moment.js locale configuration
  36890. //! locale : Burmese [my]
  36891. //! author : Squar team, mysquar.com
  36892. //! author : David Rossellat : https://github.com/gholadr
  36893. //! author : Tin Aung Lin : https://github.com/thanyawzinmin
  36894. ;(function (global, factory) {
  36895. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  36896. undefined
  36897. }(this, (function (moment) { 'use strict';
  36898. var symbolMap = {
  36899. '1': '၁',
  36900. '2': '၂',
  36901. '3': '၃',
  36902. '4': '၄',
  36903. '5': '၅',
  36904. '6': '၆',
  36905. '7': '၇',
  36906. '8': '၈',
  36907. '9': '၉',
  36908. '0': '၀'
  36909. };
  36910. var numberMap = {
  36911. '၁': '1',
  36912. '၂': '2',
  36913. '၃': '3',
  36914. '၄': '4',
  36915. '၅': '5',
  36916. '၆': '6',
  36917. '၇': '7',
  36918. '၈': '8',
  36919. '၉': '9',
  36920. '၀': '0'
  36921. };
  36922. var my = moment.defineLocale('my', {
  36923. months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'),
  36924. monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),
  36925. weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split('_'),
  36926. weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
  36927. weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),
  36928. longDateFormat: {
  36929. LT: 'HH:mm',
  36930. LTS: 'HH:mm:ss',
  36931. L: 'DD/MM/YYYY',
  36932. LL: 'D MMMM YYYY',
  36933. LLL: 'D MMMM YYYY HH:mm',
  36934. LLLL: 'dddd D MMMM YYYY HH:mm'
  36935. },
  36936. calendar: {
  36937. sameDay: '[ယနေ.] LT [မှာ]',
  36938. nextDay: '[မနက်ဖြန်] LT [မှာ]',
  36939. nextWeek: 'dddd LT [မှာ]',
  36940. lastDay: '[မနေ.က] LT [မှာ]',
  36941. lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',
  36942. sameElse: 'L'
  36943. },
  36944. relativeTime: {
  36945. future: 'လာမည့် %s မှာ',
  36946. past: 'လွန်ခဲ့သော %s က',
  36947. s: 'စက္ကန်.အနည်းငယ်',
  36948. m: 'တစ်မိနစ်',
  36949. mm: '%d မိနစ်',
  36950. h: 'တစ်နာရီ',
  36951. hh: '%d နာရီ',
  36952. d: 'တစ်ရက်',
  36953. dd: '%d ရက်',
  36954. M: 'တစ်လ',
  36955. MM: '%d လ',
  36956. y: 'တစ်နှစ်',
  36957. yy: '%d နှစ်'
  36958. },
  36959. preparse: function (string) {
  36960. return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {
  36961. return numberMap[match];
  36962. });
  36963. },
  36964. postformat: function (string) {
  36965. return string.replace(/\d/g, function (match) {
  36966. return symbolMap[match];
  36967. });
  36968. },
  36969. week: {
  36970. dow: 1, // Monday is the first day of the week.
  36971. doy: 4 // The week that contains Jan 1st is the first week of the year.
  36972. }
  36973. });
  36974. return my;
  36975. })));
  36976. /***/ }),
  36977. /***/ "./node_modules/moment/locale/nb.js":
  36978. /*!******************************************!*\
  36979. !*** ./node_modules/moment/locale/nb.js ***!
  36980. \******************************************/
  36981. /*! no static exports found */
  36982. /***/ (function(module, exports, __webpack_require__) {
  36983. //! moment.js locale configuration
  36984. //! locale : Norwegian Bokmål [nb]
  36985. //! authors : Espen Hovlandsdal : https://github.com/rexxars
  36986. //! Sigurd Gartmann : https://github.com/sigurdga
  36987. ;(function (global, factory) {
  36988. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  36989. undefined
  36990. }(this, (function (moment) { 'use strict';
  36991. var nb = moment.defineLocale('nb', {
  36992. months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
  36993. monthsShort : 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),
  36994. monthsParseExact : true,
  36995. weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),
  36996. weekdaysShort : 'sø._ma._ti._on._to._fr._lø.'.split('_'),
  36997. weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'),
  36998. weekdaysParseExact : true,
  36999. longDateFormat : {
  37000. LT : 'HH:mm',
  37001. LTS : 'HH:mm:ss',
  37002. L : 'DD.MM.YYYY',
  37003. LL : 'D. MMMM YYYY',
  37004. LLL : 'D. MMMM YYYY [kl.] HH:mm',
  37005. LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm'
  37006. },
  37007. calendar : {
  37008. sameDay: '[i dag kl.] LT',
  37009. nextDay: '[i morgen kl.] LT',
  37010. nextWeek: 'dddd [kl.] LT',
  37011. lastDay: '[i går kl.] LT',
  37012. lastWeek: '[forrige] dddd [kl.] LT',
  37013. sameElse: 'L'
  37014. },
  37015. relativeTime : {
  37016. future : 'om %s',
  37017. past : '%s siden',
  37018. s : 'noen sekunder',
  37019. m : 'ett minutt',
  37020. mm : '%d minutter',
  37021. h : 'en time',
  37022. hh : '%d timer',
  37023. d : 'en dag',
  37024. dd : '%d dager',
  37025. M : 'en måned',
  37026. MM : '%d måneder',
  37027. y : 'ett år',
  37028. yy : '%d år'
  37029. },
  37030. dayOfMonthOrdinalParse: /\d{1,2}\./,
  37031. ordinal : '%d.',
  37032. week : {
  37033. dow : 1, // Monday is the first day of the week.
  37034. doy : 4 // The week that contains Jan 4th is the first week of the year.
  37035. }
  37036. });
  37037. return nb;
  37038. })));
  37039. /***/ }),
  37040. /***/ "./node_modules/moment/locale/ne.js":
  37041. /*!******************************************!*\
  37042. !*** ./node_modules/moment/locale/ne.js ***!
  37043. \******************************************/
  37044. /*! no static exports found */
  37045. /***/ (function(module, exports, __webpack_require__) {
  37046. //! moment.js locale configuration
  37047. //! locale : Nepalese [ne]
  37048. //! author : suvash : https://github.com/suvash
  37049. ;(function (global, factory) {
  37050. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  37051. undefined
  37052. }(this, (function (moment) { 'use strict';
  37053. var symbolMap = {
  37054. '1': '१',
  37055. '2': '२',
  37056. '3': '३',
  37057. '4': '४',
  37058. '5': '५',
  37059. '6': '६',
  37060. '7': '७',
  37061. '8': '८',
  37062. '9': '९',
  37063. '0': '०'
  37064. };
  37065. var numberMap = {
  37066. '१': '1',
  37067. '२': '2',
  37068. '३': '3',
  37069. '४': '4',
  37070. '५': '5',
  37071. '६': '6',
  37072. '७': '7',
  37073. '८': '8',
  37074. '९': '9',
  37075. '०': '0'
  37076. };
  37077. var ne = moment.defineLocale('ne', {
  37078. months : 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split('_'),
  37079. monthsShort : 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split('_'),
  37080. monthsParseExact : true,
  37081. weekdays : 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split('_'),
  37082. weekdaysShort : 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),
  37083. weekdaysMin : 'आ._सो._मं._बु._बि._शु._श.'.split('_'),
  37084. weekdaysParseExact : true,
  37085. longDateFormat : {
  37086. LT : 'Aको h:mm बजे',
  37087. LTS : 'Aको h:mm:ss बजे',
  37088. L : 'DD/MM/YYYY',
  37089. LL : 'D MMMM YYYY',
  37090. LLL : 'D MMMM YYYY, Aको h:mm बजे',
  37091. LLLL : 'dddd, D MMMM YYYY, Aको h:mm बजे'
  37092. },
  37093. preparse: function (string) {
  37094. return string.replace(/[१२३४५६७८९०]/g, function (match) {
  37095. return numberMap[match];
  37096. });
  37097. },
  37098. postformat: function (string) {
  37099. return string.replace(/\d/g, function (match) {
  37100. return symbolMap[match];
  37101. });
  37102. },
  37103. meridiemParse: /राति|बिहान|दिउँसो|साँझ/,
  37104. meridiemHour : function (hour, meridiem) {
  37105. if (hour === 12) {
  37106. hour = 0;
  37107. }
  37108. if (meridiem === 'राति') {
  37109. return hour < 4 ? hour : hour + 12;
  37110. } else if (meridiem === 'बिहान') {
  37111. return hour;
  37112. } else if (meridiem === 'दिउँसो') {
  37113. return hour >= 10 ? hour : hour + 12;
  37114. } else if (meridiem === 'साँझ') {
  37115. return hour + 12;
  37116. }
  37117. },
  37118. meridiem : function (hour, minute, isLower) {
  37119. if (hour < 3) {
  37120. return 'राति';
  37121. } else if (hour < 12) {
  37122. return 'बिहान';
  37123. } else if (hour < 16) {
  37124. return 'दिउँसो';
  37125. } else if (hour < 20) {
  37126. return 'साँझ';
  37127. } else {
  37128. return 'राति';
  37129. }
  37130. },
  37131. calendar : {
  37132. sameDay : '[आज] LT',
  37133. nextDay : '[भोलि] LT',
  37134. nextWeek : '[आउँदो] dddd[,] LT',
  37135. lastDay : '[हिजो] LT',
  37136. lastWeek : '[गएको] dddd[,] LT',
  37137. sameElse : 'L'
  37138. },
  37139. relativeTime : {
  37140. future : '%sमा',
  37141. past : '%s अगाडि',
  37142. s : 'केही क्षण',
  37143. m : 'एक मिनेट',
  37144. mm : '%d मिनेट',
  37145. h : 'एक घण्टा',
  37146. hh : '%d घण्टा',
  37147. d : 'एक दिन',
  37148. dd : '%d दिन',
  37149. M : 'एक महिना',
  37150. MM : '%d महिना',
  37151. y : 'एक बर्ष',
  37152. yy : '%d बर्ष'
  37153. },
  37154. week : {
  37155. dow : 0, // Sunday is the first day of the week.
  37156. doy : 6 // The week that contains Jan 1st is the first week of the year.
  37157. }
  37158. });
  37159. return ne;
  37160. })));
  37161. /***/ }),
  37162. /***/ "./node_modules/moment/locale/nl-be.js":
  37163. /*!*********************************************!*\
  37164. !*** ./node_modules/moment/locale/nl-be.js ***!
  37165. \*********************************************/
  37166. /*! no static exports found */
  37167. /***/ (function(module, exports, __webpack_require__) {
  37168. //! moment.js locale configuration
  37169. //! locale : Dutch (Belgium) [nl-be]
  37170. //! author : Joris Röling : https://github.com/jorisroling
  37171. //! author : Jacob Middag : https://github.com/middagj
  37172. ;(function (global, factory) {
  37173. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  37174. undefined
  37175. }(this, (function (moment) { 'use strict';
  37176. var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');
  37177. var monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');
  37178. var monthsParse = [/^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];
  37179. var monthsRegex = /^(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;
  37180. var nlBe = moment.defineLocale('nl-be', {
  37181. months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
  37182. monthsShort : function (m, format) {
  37183. if (!m) {
  37184. return monthsShortWithDots;
  37185. } else if (/-MMM-/.test(format)) {
  37186. return monthsShortWithoutDots[m.month()];
  37187. } else {
  37188. return monthsShortWithDots[m.month()];
  37189. }
  37190. },
  37191. monthsRegex: monthsRegex,
  37192. monthsShortRegex: monthsRegex,
  37193. monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,
  37194. monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
  37195. monthsParse : monthsParse,
  37196. longMonthsParse : monthsParse,
  37197. shortMonthsParse : monthsParse,
  37198. weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
  37199. weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'),
  37200. weekdaysMin : 'zo_ma_di_wo_do_vr_za'.split('_'),
  37201. weekdaysParseExact : true,
  37202. longDateFormat : {
  37203. LT : 'HH:mm',
  37204. LTS : 'HH:mm:ss',
  37205. L : 'DD/MM/YYYY',
  37206. LL : 'D MMMM YYYY',
  37207. LLL : 'D MMMM YYYY HH:mm',
  37208. LLLL : 'dddd D MMMM YYYY HH:mm'
  37209. },
  37210. calendar : {
  37211. sameDay: '[vandaag om] LT',
  37212. nextDay: '[morgen om] LT',
  37213. nextWeek: 'dddd [om] LT',
  37214. lastDay: '[gisteren om] LT',
  37215. lastWeek: '[afgelopen] dddd [om] LT',
  37216. sameElse: 'L'
  37217. },
  37218. relativeTime : {
  37219. future : 'over %s',
  37220. past : '%s geleden',
  37221. s : 'een paar seconden',
  37222. m : 'één minuut',
  37223. mm : '%d minuten',
  37224. h : 'één uur',
  37225. hh : '%d uur',
  37226. d : 'één dag',
  37227. dd : '%d dagen',
  37228. M : 'één maand',
  37229. MM : '%d maanden',
  37230. y : 'één jaar',
  37231. yy : '%d jaar'
  37232. },
  37233. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  37234. ordinal : function (number) {
  37235. return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
  37236. },
  37237. week : {
  37238. dow : 1, // Monday is the first day of the week.
  37239. doy : 4 // The week that contains Jan 4th is the first week of the year.
  37240. }
  37241. });
  37242. return nlBe;
  37243. })));
  37244. /***/ }),
  37245. /***/ "./node_modules/moment/locale/nl.js":
  37246. /*!******************************************!*\
  37247. !*** ./node_modules/moment/locale/nl.js ***!
  37248. \******************************************/
  37249. /*! no static exports found */
  37250. /***/ (function(module, exports, __webpack_require__) {
  37251. //! moment.js locale configuration
  37252. //! locale : Dutch [nl]
  37253. //! author : Joris Röling : https://github.com/jorisroling
  37254. //! author : Jacob Middag : https://github.com/middagj
  37255. ;(function (global, factory) {
  37256. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  37257. undefined
  37258. }(this, (function (moment) { 'use strict';
  37259. var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_');
  37260. var monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_');
  37261. var monthsParse = [/^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];
  37262. var monthsRegex = /^(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;
  37263. var nl = moment.defineLocale('nl', {
  37264. months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
  37265. monthsShort : function (m, format) {
  37266. if (!m) {
  37267. return monthsShortWithDots;
  37268. } else if (/-MMM-/.test(format)) {
  37269. return monthsShortWithoutDots[m.month()];
  37270. } else {
  37271. return monthsShortWithDots[m.month()];
  37272. }
  37273. },
  37274. monthsRegex: monthsRegex,
  37275. monthsShortRegex: monthsRegex,
  37276. monthsStrictRegex: /^(januari|februari|maart|mei|ju[nl]i|april|augustus|september|oktober|november|december)/i,
  37277. monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,
  37278. monthsParse : monthsParse,
  37279. longMonthsParse : monthsParse,
  37280. shortMonthsParse : monthsParse,
  37281. weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),
  37282. weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'),
  37283. weekdaysMin : 'zo_ma_di_wo_do_vr_za'.split('_'),
  37284. weekdaysParseExact : true,
  37285. longDateFormat : {
  37286. LT : 'HH:mm',
  37287. LTS : 'HH:mm:ss',
  37288. L : 'DD-MM-YYYY',
  37289. LL : 'D MMMM YYYY',
  37290. LLL : 'D MMMM YYYY HH:mm',
  37291. LLLL : 'dddd D MMMM YYYY HH:mm'
  37292. },
  37293. calendar : {
  37294. sameDay: '[vandaag om] LT',
  37295. nextDay: '[morgen om] LT',
  37296. nextWeek: 'dddd [om] LT',
  37297. lastDay: '[gisteren om] LT',
  37298. lastWeek: '[afgelopen] dddd [om] LT',
  37299. sameElse: 'L'
  37300. },
  37301. relativeTime : {
  37302. future : 'over %s',
  37303. past : '%s geleden',
  37304. s : 'een paar seconden',
  37305. m : 'één minuut',
  37306. mm : '%d minuten',
  37307. h : 'één uur',
  37308. hh : '%d uur',
  37309. d : 'één dag',
  37310. dd : '%d dagen',
  37311. M : 'één maand',
  37312. MM : '%d maanden',
  37313. y : 'één jaar',
  37314. yy : '%d jaar'
  37315. },
  37316. dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/,
  37317. ordinal : function (number) {
  37318. return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
  37319. },
  37320. week : {
  37321. dow : 1, // Monday is the first day of the week.
  37322. doy : 4 // The week that contains Jan 4th is the first week of the year.
  37323. }
  37324. });
  37325. return nl;
  37326. })));
  37327. /***/ }),
  37328. /***/ "./node_modules/moment/locale/nn.js":
  37329. /*!******************************************!*\
  37330. !*** ./node_modules/moment/locale/nn.js ***!
  37331. \******************************************/
  37332. /*! no static exports found */
  37333. /***/ (function(module, exports, __webpack_require__) {
  37334. //! moment.js locale configuration
  37335. //! locale : Nynorsk [nn]
  37336. //! author : https://github.com/mechuwind
  37337. ;(function (global, factory) {
  37338. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  37339. undefined
  37340. }(this, (function (moment) { 'use strict';
  37341. var nn = moment.defineLocale('nn', {
  37342. months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'),
  37343. monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),
  37344. weekdays : 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),
  37345. weekdaysShort : 'sun_mån_tys_ons_tor_fre_lau'.split('_'),
  37346. weekdaysMin : 'su_må_ty_on_to_fr_lø'.split('_'),
  37347. longDateFormat : {
  37348. LT : 'HH:mm',
  37349. LTS : 'HH:mm:ss',
  37350. L : 'DD.MM.YYYY',
  37351. LL : 'D. MMMM YYYY',
  37352. LLL : 'D. MMMM YYYY [kl.] H:mm',
  37353. LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm'
  37354. },
  37355. calendar : {
  37356. sameDay: '[I dag klokka] LT',
  37357. nextDay: '[I morgon klokka] LT',
  37358. nextWeek: 'dddd [klokka] LT',
  37359. lastDay: '[I går klokka] LT',
  37360. lastWeek: '[Føregåande] dddd [klokka] LT',
  37361. sameElse: 'L'
  37362. },
  37363. relativeTime : {
  37364. future : 'om %s',
  37365. past : '%s sidan',
  37366. s : 'nokre sekund',
  37367. m : 'eit minutt',
  37368. mm : '%d minutt',
  37369. h : 'ein time',
  37370. hh : '%d timar',
  37371. d : 'ein dag',
  37372. dd : '%d dagar',
  37373. M : 'ein månad',
  37374. MM : '%d månader',
  37375. y : 'eit år',
  37376. yy : '%d år'
  37377. },
  37378. dayOfMonthOrdinalParse: /\d{1,2}\./,
  37379. ordinal : '%d.',
  37380. week : {
  37381. dow : 1, // Monday is the first day of the week.
  37382. doy : 4 // The week that contains Jan 4th is the first week of the year.
  37383. }
  37384. });
  37385. return nn;
  37386. })));
  37387. /***/ }),
  37388. /***/ "./node_modules/moment/locale/pa-in.js":
  37389. /*!*********************************************!*\
  37390. !*** ./node_modules/moment/locale/pa-in.js ***!
  37391. \*********************************************/
  37392. /*! no static exports found */
  37393. /***/ (function(module, exports, __webpack_require__) {
  37394. //! moment.js locale configuration
  37395. //! locale : Punjabi (India) [pa-in]
  37396. //! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit
  37397. ;(function (global, factory) {
  37398. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  37399. undefined
  37400. }(this, (function (moment) { 'use strict';
  37401. var symbolMap = {
  37402. '1': '੧',
  37403. '2': '੨',
  37404. '3': '੩',
  37405. '4': '੪',
  37406. '5': '੫',
  37407. '6': '੬',
  37408. '7': '੭',
  37409. '8': '੮',
  37410. '9': '੯',
  37411. '0': '੦'
  37412. };
  37413. var numberMap = {
  37414. '੧': '1',
  37415. '੨': '2',
  37416. '੩': '3',
  37417. '੪': '4',
  37418. '੫': '5',
  37419. '੬': '6',
  37420. '੭': '7',
  37421. '੮': '8',
  37422. '੯': '9',
  37423. '੦': '0'
  37424. };
  37425. var paIn = moment.defineLocale('pa-in', {
  37426. // There are months name as per Nanakshahi Calender but they are not used as rigidly in modern Punjabi.
  37427. months : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),
  37428. monthsShort : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),
  37429. weekdays : 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split('_'),
  37430. weekdaysShort : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
  37431. weekdaysMin : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
  37432. longDateFormat : {
  37433. LT : 'A h:mm ਵਜੇ',
  37434. LTS : 'A h:mm:ss ਵਜੇ',
  37435. L : 'DD/MM/YYYY',
  37436. LL : 'D MMMM YYYY',
  37437. LLL : 'D MMMM YYYY, A h:mm ਵਜੇ',
  37438. LLLL : 'dddd, D MMMM YYYY, A h:mm ਵਜੇ'
  37439. },
  37440. calendar : {
  37441. sameDay : '[ਅਜ] LT',
  37442. nextDay : '[ਕਲ] LT',
  37443. nextWeek : 'dddd, LT',
  37444. lastDay : '[ਕਲ] LT',
  37445. lastWeek : '[ਪਿਛਲੇ] dddd, LT',
  37446. sameElse : 'L'
  37447. },
  37448. relativeTime : {
  37449. future : '%s ਵਿੱਚ',
  37450. past : '%s ਪਿਛਲੇ',
  37451. s : 'ਕੁਝ ਸਕਿੰਟ',
  37452. m : 'ਇਕ ਮਿੰਟ',
  37453. mm : '%d ਮਿੰਟ',
  37454. h : 'ਇੱਕ ਘੰਟਾ',
  37455. hh : '%d ਘੰਟੇ',
  37456. d : 'ਇੱਕ ਦਿਨ',
  37457. dd : '%d ਦਿਨ',
  37458. M : 'ਇੱਕ ਮਹੀਨਾ',
  37459. MM : '%d ਮਹੀਨੇ',
  37460. y : 'ਇੱਕ ਸਾਲ',
  37461. yy : '%d ਸਾਲ'
  37462. },
  37463. preparse: function (string) {
  37464. return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {
  37465. return numberMap[match];
  37466. });
  37467. },
  37468. postformat: function (string) {
  37469. return string.replace(/\d/g, function (match) {
  37470. return symbolMap[match];
  37471. });
  37472. },
  37473. // Punjabi notation for meridiems are quite fuzzy in practice. While there exists
  37474. // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.
  37475. meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,
  37476. meridiemHour : function (hour, meridiem) {
  37477. if (hour === 12) {
  37478. hour = 0;
  37479. }
  37480. if (meridiem === 'ਰਾਤ') {
  37481. return hour < 4 ? hour : hour + 12;
  37482. } else if (meridiem === 'ਸਵੇਰ') {
  37483. return hour;
  37484. } else if (meridiem === 'ਦੁਪਹਿਰ') {
  37485. return hour >= 10 ? hour : hour + 12;
  37486. } else if (meridiem === 'ਸ਼ਾਮ') {
  37487. return hour + 12;
  37488. }
  37489. },
  37490. meridiem : function (hour, minute, isLower) {
  37491. if (hour < 4) {
  37492. return 'ਰਾਤ';
  37493. } else if (hour < 10) {
  37494. return 'ਸਵੇਰ';
  37495. } else if (hour < 17) {
  37496. return 'ਦੁਪਹਿਰ';
  37497. } else if (hour < 20) {
  37498. return 'ਸ਼ਾਮ';
  37499. } else {
  37500. return 'ਰਾਤ';
  37501. }
  37502. },
  37503. week : {
  37504. dow : 0, // Sunday is the first day of the week.
  37505. doy : 6 // The week that contains Jan 1st is the first week of the year.
  37506. }
  37507. });
  37508. return paIn;
  37509. })));
  37510. /***/ }),
  37511. /***/ "./node_modules/moment/locale/pl.js":
  37512. /*!******************************************!*\
  37513. !*** ./node_modules/moment/locale/pl.js ***!
  37514. \******************************************/
  37515. /*! no static exports found */
  37516. /***/ (function(module, exports, __webpack_require__) {
  37517. //! moment.js locale configuration
  37518. //! locale : Polish [pl]
  37519. //! author : Rafal Hirsz : https://github.com/evoL
  37520. ;(function (global, factory) {
  37521. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  37522. undefined
  37523. }(this, (function (moment) { 'use strict';
  37524. var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_');
  37525. var monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_');
  37526. function plural(n) {
  37527. return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1);
  37528. }
  37529. function translate(number, withoutSuffix, key) {
  37530. var result = number + ' ';
  37531. switch (key) {
  37532. case 'm':
  37533. return withoutSuffix ? 'minuta' : 'minutę';
  37534. case 'mm':
  37535. return result + (plural(number) ? 'minuty' : 'minut');
  37536. case 'h':
  37537. return withoutSuffix ? 'godzina' : 'godzinę';
  37538. case 'hh':
  37539. return result + (plural(number) ? 'godziny' : 'godzin');
  37540. case 'MM':
  37541. return result + (plural(number) ? 'miesiące' : 'miesięcy');
  37542. case 'yy':
  37543. return result + (plural(number) ? 'lata' : 'lat');
  37544. }
  37545. }
  37546. var pl = moment.defineLocale('pl', {
  37547. months : function (momentToFormat, format) {
  37548. if (!momentToFormat) {
  37549. return monthsNominative;
  37550. } else if (format === '') {
  37551. // Hack: if format empty we know this is used to generate
  37552. // RegExp by moment. Give then back both valid forms of months
  37553. // in RegExp ready format.
  37554. return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')';
  37555. } else if (/D MMMM/.test(format)) {
  37556. return monthsSubjective[momentToFormat.month()];
  37557. } else {
  37558. return monthsNominative[momentToFormat.month()];
  37559. }
  37560. },
  37561. monthsShort : 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),
  37562. weekdays : 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),
  37563. weekdaysShort : 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),
  37564. weekdaysMin : 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),
  37565. longDateFormat : {
  37566. LT : 'HH:mm',
  37567. LTS : 'HH:mm:ss',
  37568. L : 'DD.MM.YYYY',
  37569. LL : 'D MMMM YYYY',
  37570. LLL : 'D MMMM YYYY HH:mm',
  37571. LLLL : 'dddd, D MMMM YYYY HH:mm'
  37572. },
  37573. calendar : {
  37574. sameDay: '[Dziś o] LT',
  37575. nextDay: '[Jutro o] LT',
  37576. nextWeek: function () {
  37577. switch (this.day()) {
  37578. case 0:
  37579. return '[W niedzielę o] LT';
  37580. case 2:
  37581. return '[We wtorek o] LT';
  37582. case 3:
  37583. return '[W środę o] LT';
  37584. case 6:
  37585. return '[W sobotę o] LT';
  37586. default:
  37587. return '[W] dddd [o] LT';
  37588. }
  37589. },
  37590. lastDay: '[Wczoraj o] LT',
  37591. lastWeek: function () {
  37592. switch (this.day()) {
  37593. case 0:
  37594. return '[W zeszłą niedzielę o] LT';
  37595. case 3:
  37596. return '[W zeszłą środę o] LT';
  37597. case 6:
  37598. return '[W zeszłą sobotę o] LT';
  37599. default:
  37600. return '[W zeszły] dddd [o] LT';
  37601. }
  37602. },
  37603. sameElse: 'L'
  37604. },
  37605. relativeTime : {
  37606. future : 'za %s',
  37607. past : '%s temu',
  37608. s : 'kilka sekund',
  37609. m : translate,
  37610. mm : translate,
  37611. h : translate,
  37612. hh : translate,
  37613. d : '1 dzień',
  37614. dd : '%d dni',
  37615. M : 'miesiąc',
  37616. MM : translate,
  37617. y : 'rok',
  37618. yy : translate
  37619. },
  37620. dayOfMonthOrdinalParse: /\d{1,2}\./,
  37621. ordinal : '%d.',
  37622. week : {
  37623. dow : 1, // Monday is the first day of the week.
  37624. doy : 4 // The week that contains Jan 4th is the first week of the year.
  37625. }
  37626. });
  37627. return pl;
  37628. })));
  37629. /***/ }),
  37630. /***/ "./node_modules/moment/locale/pt-br.js":
  37631. /*!*********************************************!*\
  37632. !*** ./node_modules/moment/locale/pt-br.js ***!
  37633. \*********************************************/
  37634. /*! no static exports found */
  37635. /***/ (function(module, exports, __webpack_require__) {
  37636. //! moment.js locale configuration
  37637. //! locale : Portuguese (Brazil) [pt-br]
  37638. //! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
  37639. ;(function (global, factory) {
  37640. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  37641. undefined
  37642. }(this, (function (moment) { 'use strict';
  37643. var ptBr = moment.defineLocale('pt-br', {
  37644. months : 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'),
  37645. monthsShort : 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
  37646. weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),
  37647. weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
  37648. weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
  37649. weekdaysParseExact : true,
  37650. longDateFormat : {
  37651. LT : 'HH:mm',
  37652. LTS : 'HH:mm:ss',
  37653. L : 'DD/MM/YYYY',
  37654. LL : 'D [de] MMMM [de] YYYY',
  37655. LLL : 'D [de] MMMM [de] YYYY [às] HH:mm',
  37656. LLLL : 'dddd, D [de] MMMM [de] YYYY [às] HH:mm'
  37657. },
  37658. calendar : {
  37659. sameDay: '[Hoje às] LT',
  37660. nextDay: '[Amanhã às] LT',
  37661. nextWeek: 'dddd [às] LT',
  37662. lastDay: '[Ontem às] LT',
  37663. lastWeek: function () {
  37664. return (this.day() === 0 || this.day() === 6) ?
  37665. '[Último] dddd [às] LT' : // Saturday + Sunday
  37666. '[Última] dddd [às] LT'; // Monday - Friday
  37667. },
  37668. sameElse: 'L'
  37669. },
  37670. relativeTime : {
  37671. future : 'em %s',
  37672. past : '%s atrás',
  37673. s : 'poucos segundos',
  37674. ss : '%d segundos',
  37675. m : 'um minuto',
  37676. mm : '%d minutos',
  37677. h : 'uma hora',
  37678. hh : '%d horas',
  37679. d : 'um dia',
  37680. dd : '%d dias',
  37681. M : 'um mês',
  37682. MM : '%d meses',
  37683. y : 'um ano',
  37684. yy : '%d anos'
  37685. },
  37686. dayOfMonthOrdinalParse: /\d{1,2}º/,
  37687. ordinal : '%dº'
  37688. });
  37689. return ptBr;
  37690. })));
  37691. /***/ }),
  37692. /***/ "./node_modules/moment/locale/pt.js":
  37693. /*!******************************************!*\
  37694. !*** ./node_modules/moment/locale/pt.js ***!
  37695. \******************************************/
  37696. /*! no static exports found */
  37697. /***/ (function(module, exports, __webpack_require__) {
  37698. //! moment.js locale configuration
  37699. //! locale : Portuguese [pt]
  37700. //! author : Jefferson : https://github.com/jalex79
  37701. ;(function (global, factory) {
  37702. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  37703. undefined
  37704. }(this, (function (moment) { 'use strict';
  37705. var pt = moment.defineLocale('pt', {
  37706. months : 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'),
  37707. monthsShort : 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),
  37708. weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'),
  37709. weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),
  37710. weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),
  37711. weekdaysParseExact : true,
  37712. longDateFormat : {
  37713. LT : 'HH:mm',
  37714. LTS : 'HH:mm:ss',
  37715. L : 'DD/MM/YYYY',
  37716. LL : 'D [de] MMMM [de] YYYY',
  37717. LLL : 'D [de] MMMM [de] YYYY HH:mm',
  37718. LLLL : 'dddd, D [de] MMMM [de] YYYY HH:mm'
  37719. },
  37720. calendar : {
  37721. sameDay: '[Hoje às] LT',
  37722. nextDay: '[Amanhã às] LT',
  37723. nextWeek: 'dddd [às] LT',
  37724. lastDay: '[Ontem às] LT',
  37725. lastWeek: function () {
  37726. return (this.day() === 0 || this.day() === 6) ?
  37727. '[Último] dddd [às] LT' : // Saturday + Sunday
  37728. '[Última] dddd [às] LT'; // Monday - Friday
  37729. },
  37730. sameElse: 'L'
  37731. },
  37732. relativeTime : {
  37733. future : 'em %s',
  37734. past : 'há %s',
  37735. s : 'segundos',
  37736. m : 'um minuto',
  37737. mm : '%d minutos',
  37738. h : 'uma hora',
  37739. hh : '%d horas',
  37740. d : 'um dia',
  37741. dd : '%d dias',
  37742. M : 'um mês',
  37743. MM : '%d meses',
  37744. y : 'um ano',
  37745. yy : '%d anos'
  37746. },
  37747. dayOfMonthOrdinalParse: /\d{1,2}º/,
  37748. ordinal : '%dº',
  37749. week : {
  37750. dow : 1, // Monday is the first day of the week.
  37751. doy : 4 // The week that contains Jan 4th is the first week of the year.
  37752. }
  37753. });
  37754. return pt;
  37755. })));
  37756. /***/ }),
  37757. /***/ "./node_modules/moment/locale/ro.js":
  37758. /*!******************************************!*\
  37759. !*** ./node_modules/moment/locale/ro.js ***!
  37760. \******************************************/
  37761. /*! no static exports found */
  37762. /***/ (function(module, exports, __webpack_require__) {
  37763. //! moment.js locale configuration
  37764. //! locale : Romanian [ro]
  37765. //! author : Vlad Gurdiga : https://github.com/gurdiga
  37766. //! author : Valentin Agachi : https://github.com/avaly
  37767. ;(function (global, factory) {
  37768. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  37769. undefined
  37770. }(this, (function (moment) { 'use strict';
  37771. function relativeTimeWithPlural(number, withoutSuffix, key) {
  37772. var format = {
  37773. 'mm': 'minute',
  37774. 'hh': 'ore',
  37775. 'dd': 'zile',
  37776. 'MM': 'luni',
  37777. 'yy': 'ani'
  37778. },
  37779. separator = ' ';
  37780. if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
  37781. separator = ' de ';
  37782. }
  37783. return number + separator + format[key];
  37784. }
  37785. var ro = moment.defineLocale('ro', {
  37786. months : 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'),
  37787. monthsShort : 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'),
  37788. monthsParseExact: true,
  37789. weekdays : 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
  37790. weekdaysShort : 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
  37791. weekdaysMin : 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
  37792. longDateFormat : {
  37793. LT : 'H:mm',
  37794. LTS : 'H:mm:ss',
  37795. L : 'DD.MM.YYYY',
  37796. LL : 'D MMMM YYYY',
  37797. LLL : 'D MMMM YYYY H:mm',
  37798. LLLL : 'dddd, D MMMM YYYY H:mm'
  37799. },
  37800. calendar : {
  37801. sameDay: '[azi la] LT',
  37802. nextDay: '[mâine la] LT',
  37803. nextWeek: 'dddd [la] LT',
  37804. lastDay: '[ieri la] LT',
  37805. lastWeek: '[fosta] dddd [la] LT',
  37806. sameElse: 'L'
  37807. },
  37808. relativeTime : {
  37809. future : 'peste %s',
  37810. past : '%s în urmă',
  37811. s : 'câteva secunde',
  37812. m : 'un minut',
  37813. mm : relativeTimeWithPlural,
  37814. h : 'o oră',
  37815. hh : relativeTimeWithPlural,
  37816. d : 'o zi',
  37817. dd : relativeTimeWithPlural,
  37818. M : 'o lună',
  37819. MM : relativeTimeWithPlural,
  37820. y : 'un an',
  37821. yy : relativeTimeWithPlural
  37822. },
  37823. week : {
  37824. dow : 1, // Monday is the first day of the week.
  37825. doy : 7 // The week that contains Jan 1st is the first week of the year.
  37826. }
  37827. });
  37828. return ro;
  37829. })));
  37830. /***/ }),
  37831. /***/ "./node_modules/moment/locale/ru.js":
  37832. /*!******************************************!*\
  37833. !*** ./node_modules/moment/locale/ru.js ***!
  37834. \******************************************/
  37835. /*! no static exports found */
  37836. /***/ (function(module, exports, __webpack_require__) {
  37837. //! moment.js locale configuration
  37838. //! locale : Russian [ru]
  37839. //! author : Viktorminator : https://github.com/Viktorminator
  37840. //! Author : Menelion Elensúle : https://github.com/Oire
  37841. //! author : Коренберг Марк : https://github.com/socketpair
  37842. ;(function (global, factory) {
  37843. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  37844. undefined
  37845. }(this, (function (moment) { 'use strict';
  37846. function plural(word, num) {
  37847. var forms = word.split('_');
  37848. 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]);
  37849. }
  37850. function relativeTimeWithPlural(number, withoutSuffix, key) {
  37851. var format = {
  37852. 'mm': withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
  37853. 'hh': 'час_часа_часов',
  37854. 'dd': 'день_дня_дней',
  37855. 'MM': 'месяц_месяца_месяцев',
  37856. 'yy': 'год_года_лет'
  37857. };
  37858. if (key === 'm') {
  37859. return withoutSuffix ? 'минута' : 'минуту';
  37860. }
  37861. else {
  37862. return number + ' ' + plural(format[key], +number);
  37863. }
  37864. }
  37865. var monthsParse = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i];
  37866. // http://new.gramota.ru/spravka/rules/139-prop : § 103
  37867. // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
  37868. // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
  37869. var ru = moment.defineLocale('ru', {
  37870. months : {
  37871. format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'),
  37872. standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_')
  37873. },
  37874. monthsShort : {
  37875. // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку ?
  37876. format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'),
  37877. standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_')
  37878. },
  37879. weekdays : {
  37880. standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),
  37881. format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'),
  37882. isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/
  37883. },
  37884. weekdaysShort : 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
  37885. weekdaysMin : 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
  37886. monthsParse : monthsParse,
  37887. longMonthsParse : monthsParse,
  37888. shortMonthsParse : monthsParse,
  37889. // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
  37890. monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
  37891. // копия предыдущего
  37892. monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
  37893. // полные названия с падежами
  37894. monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
  37895. // Выражение, которое соотвествует только сокращённым формам
  37896. monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
  37897. longDateFormat : {
  37898. LT : 'HH:mm',
  37899. LTS : 'HH:mm:ss',
  37900. L : 'DD.MM.YYYY',
  37901. LL : 'D MMMM YYYY г.',
  37902. LLL : 'D MMMM YYYY г., HH:mm',
  37903. LLLL : 'dddd, D MMMM YYYY г., HH:mm'
  37904. },
  37905. calendar : {
  37906. sameDay: '[Сегодня в] LT',
  37907. nextDay: '[Завтра в] LT',
  37908. lastDay: '[Вчера в] LT',
  37909. nextWeek: function (now) {
  37910. if (now.week() !== this.week()) {
  37911. switch (this.day()) {
  37912. case 0:
  37913. return '[В следующее] dddd [в] LT';
  37914. case 1:
  37915. case 2:
  37916. case 4:
  37917. return '[В следующий] dddd [в] LT';
  37918. case 3:
  37919. case 5:
  37920. case 6:
  37921. return '[В следующую] dddd [в] LT';
  37922. }
  37923. } else {
  37924. if (this.day() === 2) {
  37925. return '[Во] dddd [в] LT';
  37926. } else {
  37927. return '[В] dddd [в] LT';
  37928. }
  37929. }
  37930. },
  37931. lastWeek: function (now) {
  37932. if (now.week() !== this.week()) {
  37933. switch (this.day()) {
  37934. case 0:
  37935. return '[В прошлое] dddd [в] LT';
  37936. case 1:
  37937. case 2:
  37938. case 4:
  37939. return '[В прошлый] dddd [в] LT';
  37940. case 3:
  37941. case 5:
  37942. case 6:
  37943. return '[В прошлую] dddd [в] LT';
  37944. }
  37945. } else {
  37946. if (this.day() === 2) {
  37947. return '[Во] dddd [в] LT';
  37948. } else {
  37949. return '[В] dddd [в] LT';
  37950. }
  37951. }
  37952. },
  37953. sameElse: 'L'
  37954. },
  37955. relativeTime : {
  37956. future : 'через %s',
  37957. past : '%s назад',
  37958. s : 'несколько секунд',
  37959. m : relativeTimeWithPlural,
  37960. mm : relativeTimeWithPlural,
  37961. h : 'час',
  37962. hh : relativeTimeWithPlural,
  37963. d : 'день',
  37964. dd : relativeTimeWithPlural,
  37965. M : 'месяц',
  37966. MM : relativeTimeWithPlural,
  37967. y : 'год',
  37968. yy : relativeTimeWithPlural
  37969. },
  37970. meridiemParse: /ночи|утра|дня|вечера/i,
  37971. isPM : function (input) {
  37972. return /^(дня|вечера)$/.test(input);
  37973. },
  37974. meridiem : function (hour, minute, isLower) {
  37975. if (hour < 4) {
  37976. return 'ночи';
  37977. } else if (hour < 12) {
  37978. return 'утра';
  37979. } else if (hour < 17) {
  37980. return 'дня';
  37981. } else {
  37982. return 'вечера';
  37983. }
  37984. },
  37985. dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
  37986. ordinal: function (number, period) {
  37987. switch (period) {
  37988. case 'M':
  37989. case 'd':
  37990. case 'DDD':
  37991. return number + '-й';
  37992. case 'D':
  37993. return number + '-го';
  37994. case 'w':
  37995. case 'W':
  37996. return number + '-я';
  37997. default:
  37998. return number;
  37999. }
  38000. },
  38001. week : {
  38002. dow : 1, // Monday is the first day of the week.
  38003. doy : 4 // The week that contains Jan 4th is the first week of the year.
  38004. }
  38005. });
  38006. return ru;
  38007. })));
  38008. /***/ }),
  38009. /***/ "./node_modules/moment/locale/sd.js":
  38010. /*!******************************************!*\
  38011. !*** ./node_modules/moment/locale/sd.js ***!
  38012. \******************************************/
  38013. /*! no static exports found */
  38014. /***/ (function(module, exports, __webpack_require__) {
  38015. //! moment.js locale configuration
  38016. //! locale : Sindhi [sd]
  38017. //! author : Narain Sagar : https://github.com/narainsagar
  38018. ;(function (global, factory) {
  38019. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  38020. undefined
  38021. }(this, (function (moment) { 'use strict';
  38022. var months = [
  38023. 'جنوري',
  38024. 'فيبروري',
  38025. 'مارچ',
  38026. 'اپريل',
  38027. 'مئي',
  38028. 'جون',
  38029. 'جولاءِ',
  38030. 'آگسٽ',
  38031. 'سيپٽمبر',
  38032. 'آڪٽوبر',
  38033. 'نومبر',
  38034. 'ڊسمبر'
  38035. ];
  38036. var days = [
  38037. 'آچر',
  38038. 'سومر',
  38039. 'اڱارو',
  38040. 'اربع',
  38041. 'خميس',
  38042. 'جمع',
  38043. 'ڇنڇر'
  38044. ];
  38045. var sd = moment.defineLocale('sd', {
  38046. months : months,
  38047. monthsShort : months,
  38048. weekdays : days,
  38049. weekdaysShort : days,
  38050. weekdaysMin : days,
  38051. longDateFormat : {
  38052. LT : 'HH:mm',
  38053. LTS : 'HH:mm:ss',
  38054. L : 'DD/MM/YYYY',
  38055. LL : 'D MMMM YYYY',
  38056. LLL : 'D MMMM YYYY HH:mm',
  38057. LLLL : 'dddd، D MMMM YYYY HH:mm'
  38058. },
  38059. meridiemParse: /صبح|شام/,
  38060. isPM : function (input) {
  38061. return 'شام' === input;
  38062. },
  38063. meridiem : function (hour, minute, isLower) {
  38064. if (hour < 12) {
  38065. return 'صبح';
  38066. }
  38067. return 'شام';
  38068. },
  38069. calendar : {
  38070. sameDay : '[اڄ] LT',
  38071. nextDay : '[سڀاڻي] LT',
  38072. nextWeek : 'dddd [اڳين هفتي تي] LT',
  38073. lastDay : '[ڪالهه] LT',
  38074. lastWeek : '[گزريل هفتي] dddd [تي] LT',
  38075. sameElse : 'L'
  38076. },
  38077. relativeTime : {
  38078. future : '%s پوء',
  38079. past : '%s اڳ',
  38080. s : 'چند سيڪنڊ',
  38081. m : 'هڪ منٽ',
  38082. mm : '%d منٽ',
  38083. h : 'هڪ ڪلاڪ',
  38084. hh : '%d ڪلاڪ',
  38085. d : 'هڪ ڏينهن',
  38086. dd : '%d ڏينهن',
  38087. M : 'هڪ مهينو',
  38088. MM : '%d مهينا',
  38089. y : 'هڪ سال',
  38090. yy : '%d سال'
  38091. },
  38092. preparse: function (string) {
  38093. return string.replace(/،/g, ',');
  38094. },
  38095. postformat: function (string) {
  38096. return string.replace(/,/g, '،');
  38097. },
  38098. week : {
  38099. dow : 1, // Monday is the first day of the week.
  38100. doy : 4 // The week that contains Jan 4th is the first week of the year.
  38101. }
  38102. });
  38103. return sd;
  38104. })));
  38105. /***/ }),
  38106. /***/ "./node_modules/moment/locale/se.js":
  38107. /*!******************************************!*\
  38108. !*** ./node_modules/moment/locale/se.js ***!
  38109. \******************************************/
  38110. /*! no static exports found */
  38111. /***/ (function(module, exports, __webpack_require__) {
  38112. //! moment.js locale configuration
  38113. //! locale : Northern Sami [se]
  38114. //! authors : Bård Rolstad Henriksen : https://github.com/karamell
  38115. ;(function (global, factory) {
  38116. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  38117. undefined
  38118. }(this, (function (moment) { 'use strict';
  38119. var se = moment.defineLocale('se', {
  38120. months : 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split('_'),
  38121. monthsShort : 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),
  38122. weekdays : 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split('_'),
  38123. weekdaysShort : 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),
  38124. weekdaysMin : 's_v_m_g_d_b_L'.split('_'),
  38125. longDateFormat : {
  38126. LT : 'HH:mm',
  38127. LTS : 'HH:mm:ss',
  38128. L : 'DD.MM.YYYY',
  38129. LL : 'MMMM D. [b.] YYYY',
  38130. LLL : 'MMMM D. [b.] YYYY [ti.] HH:mm',
  38131. LLLL : 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm'
  38132. },
  38133. calendar : {
  38134. sameDay: '[otne ti] LT',
  38135. nextDay: '[ihttin ti] LT',
  38136. nextWeek: 'dddd [ti] LT',
  38137. lastDay: '[ikte ti] LT',
  38138. lastWeek: '[ovddit] dddd [ti] LT',
  38139. sameElse: 'L'
  38140. },
  38141. relativeTime : {
  38142. future : '%s geažes',
  38143. past : 'maŋit %s',
  38144. s : 'moadde sekunddat',
  38145. m : 'okta minuhta',
  38146. mm : '%d minuhtat',
  38147. h : 'okta diimmu',
  38148. hh : '%d diimmut',
  38149. d : 'okta beaivi',
  38150. dd : '%d beaivvit',
  38151. M : 'okta mánnu',
  38152. MM : '%d mánut',
  38153. y : 'okta jahki',
  38154. yy : '%d jagit'
  38155. },
  38156. dayOfMonthOrdinalParse: /\d{1,2}\./,
  38157. ordinal : '%d.',
  38158. week : {
  38159. dow : 1, // Monday is the first day of the week.
  38160. doy : 4 // The week that contains Jan 4th is the first week of the year.
  38161. }
  38162. });
  38163. return se;
  38164. })));
  38165. /***/ }),
  38166. /***/ "./node_modules/moment/locale/si.js":
  38167. /*!******************************************!*\
  38168. !*** ./node_modules/moment/locale/si.js ***!
  38169. \******************************************/
  38170. /*! no static exports found */
  38171. /***/ (function(module, exports, __webpack_require__) {
  38172. //! moment.js locale configuration
  38173. //! locale : Sinhalese [si]
  38174. //! author : Sampath Sitinamaluwa : https://github.com/sampathsris
  38175. ;(function (global, factory) {
  38176. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  38177. undefined
  38178. }(this, (function (moment) { 'use strict';
  38179. /*jshint -W100*/
  38180. var si = moment.defineLocale('si', {
  38181. months : 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split('_'),
  38182. monthsShort : 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split('_'),
  38183. weekdays : 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split('_'),
  38184. weekdaysShort : 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),
  38185. weekdaysMin : 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),
  38186. weekdaysParseExact : true,
  38187. longDateFormat : {
  38188. LT : 'a h:mm',
  38189. LTS : 'a h:mm:ss',
  38190. L : 'YYYY/MM/DD',
  38191. LL : 'YYYY MMMM D',
  38192. LLL : 'YYYY MMMM D, a h:mm',
  38193. LLLL : 'YYYY MMMM D [වැනි] dddd, a h:mm:ss'
  38194. },
  38195. calendar : {
  38196. sameDay : '[අද] LT[ට]',
  38197. nextDay : '[හෙට] LT[ට]',
  38198. nextWeek : 'dddd LT[ට]',
  38199. lastDay : '[ඊයේ] LT[ට]',
  38200. lastWeek : '[පසුගිය] dddd LT[ට]',
  38201. sameElse : 'L'
  38202. },
  38203. relativeTime : {
  38204. future : '%sකින්',
  38205. past : '%sකට පෙර',
  38206. s : 'තත්පර කිහිපය',
  38207. m : 'මිනිත්තුව',
  38208. mm : 'මිනිත්තු %d',
  38209. h : 'පැය',
  38210. hh : 'පැය %d',
  38211. d : 'දිනය',
  38212. dd : 'දින %d',
  38213. M : 'මාසය',
  38214. MM : 'මාස %d',
  38215. y : 'වසර',
  38216. yy : 'වසර %d'
  38217. },
  38218. dayOfMonthOrdinalParse: /\d{1,2} වැනි/,
  38219. ordinal : function (number) {
  38220. return number + ' වැනි';
  38221. },
  38222. meridiemParse : /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,
  38223. isPM : function (input) {
  38224. return input === 'ප.ව.' || input === 'පස් වරු';
  38225. },
  38226. meridiem : function (hours, minutes, isLower) {
  38227. if (hours > 11) {
  38228. return isLower ? 'ප.ව.' : 'පස් වරු';
  38229. } else {
  38230. return isLower ? 'පෙ.ව.' : 'පෙර වරු';
  38231. }
  38232. }
  38233. });
  38234. return si;
  38235. })));
  38236. /***/ }),
  38237. /***/ "./node_modules/moment/locale/sk.js":
  38238. /*!******************************************!*\
  38239. !*** ./node_modules/moment/locale/sk.js ***!
  38240. \******************************************/
  38241. /*! no static exports found */
  38242. /***/ (function(module, exports, __webpack_require__) {
  38243. //! moment.js locale configuration
  38244. //! locale : Slovak [sk]
  38245. //! author : Martin Minka : https://github.com/k2s
  38246. //! based on work of petrbela : https://github.com/petrbela
  38247. ;(function (global, factory) {
  38248. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  38249. undefined
  38250. }(this, (function (moment) { 'use strict';
  38251. var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_');
  38252. var monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');
  38253. function plural(n) {
  38254. return (n > 1) && (n < 5);
  38255. }
  38256. function translate(number, withoutSuffix, key, isFuture) {
  38257. var result = number + ' ';
  38258. switch (key) {
  38259. case 's': // a few seconds / in a few seconds / a few seconds ago
  38260. return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';
  38261. case 'm': // a minute / in a minute / a minute ago
  38262. return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou');
  38263. case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
  38264. if (withoutSuffix || isFuture) {
  38265. return result + (plural(number) ? 'minúty' : 'minút');
  38266. } else {
  38267. return result + 'minútami';
  38268. }
  38269. break;
  38270. case 'h': // an hour / in an hour / an hour ago
  38271. return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
  38272. case 'hh': // 9 hours / in 9 hours / 9 hours ago
  38273. if (withoutSuffix || isFuture) {
  38274. return result + (plural(number) ? 'hodiny' : 'hodín');
  38275. } else {
  38276. return result + 'hodinami';
  38277. }
  38278. break;
  38279. case 'd': // a day / in a day / a day ago
  38280. return (withoutSuffix || isFuture) ? 'deň' : 'dňom';
  38281. case 'dd': // 9 days / in 9 days / 9 days ago
  38282. if (withoutSuffix || isFuture) {
  38283. return result + (plural(number) ? 'dni' : 'dní');
  38284. } else {
  38285. return result + 'dňami';
  38286. }
  38287. break;
  38288. case 'M': // a month / in a month / a month ago
  38289. return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom';
  38290. case 'MM': // 9 months / in 9 months / 9 months ago
  38291. if (withoutSuffix || isFuture) {
  38292. return result + (plural(number) ? 'mesiace' : 'mesiacov');
  38293. } else {
  38294. return result + 'mesiacmi';
  38295. }
  38296. break;
  38297. case 'y': // a year / in a year / a year ago
  38298. return (withoutSuffix || isFuture) ? 'rok' : 'rokom';
  38299. case 'yy': // 9 years / in 9 years / 9 years ago
  38300. if (withoutSuffix || isFuture) {
  38301. return result + (plural(number) ? 'roky' : 'rokov');
  38302. } else {
  38303. return result + 'rokmi';
  38304. }
  38305. break;
  38306. }
  38307. }
  38308. var sk = moment.defineLocale('sk', {
  38309. months : months,
  38310. monthsShort : monthsShort,
  38311. weekdays : 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),
  38312. weekdaysShort : 'ne_po_ut_st_št_pi_so'.split('_'),
  38313. weekdaysMin : 'ne_po_ut_st_št_pi_so'.split('_'),
  38314. longDateFormat : {
  38315. LT: 'H:mm',
  38316. LTS : 'H:mm:ss',
  38317. L : 'DD.MM.YYYY',
  38318. LL : 'D. MMMM YYYY',
  38319. LLL : 'D. MMMM YYYY H:mm',
  38320. LLLL : 'dddd D. MMMM YYYY H:mm'
  38321. },
  38322. calendar : {
  38323. sameDay: '[dnes o] LT',
  38324. nextDay: '[zajtra o] LT',
  38325. nextWeek: function () {
  38326. switch (this.day()) {
  38327. case 0:
  38328. return '[v nedeľu o] LT';
  38329. case 1:
  38330. case 2:
  38331. return '[v] dddd [o] LT';
  38332. case 3:
  38333. return '[v stredu o] LT';
  38334. case 4:
  38335. return '[vo štvrtok o] LT';
  38336. case 5:
  38337. return '[v piatok o] LT';
  38338. case 6:
  38339. return '[v sobotu o] LT';
  38340. }
  38341. },
  38342. lastDay: '[včera o] LT',
  38343. lastWeek: function () {
  38344. switch (this.day()) {
  38345. case 0:
  38346. return '[minulú nedeľu o] LT';
  38347. case 1:
  38348. case 2:
  38349. return '[minulý] dddd [o] LT';
  38350. case 3:
  38351. return '[minulú stredu o] LT';
  38352. case 4:
  38353. case 5:
  38354. return '[minulý] dddd [o] LT';
  38355. case 6:
  38356. return '[minulú sobotu o] LT';
  38357. }
  38358. },
  38359. sameElse: 'L'
  38360. },
  38361. relativeTime : {
  38362. future : 'za %s',
  38363. past : 'pred %s',
  38364. s : translate,
  38365. m : translate,
  38366. mm : translate,
  38367. h : translate,
  38368. hh : translate,
  38369. d : translate,
  38370. dd : translate,
  38371. M : translate,
  38372. MM : translate,
  38373. y : translate,
  38374. yy : translate
  38375. },
  38376. dayOfMonthOrdinalParse: /\d{1,2}\./,
  38377. ordinal : '%d.',
  38378. week : {
  38379. dow : 1, // Monday is the first day of the week.
  38380. doy : 4 // The week that contains Jan 4th is the first week of the year.
  38381. }
  38382. });
  38383. return sk;
  38384. })));
  38385. /***/ }),
  38386. /***/ "./node_modules/moment/locale/sl.js":
  38387. /*!******************************************!*\
  38388. !*** ./node_modules/moment/locale/sl.js ***!
  38389. \******************************************/
  38390. /*! no static exports found */
  38391. /***/ (function(module, exports, __webpack_require__) {
  38392. //! moment.js locale configuration
  38393. //! locale : Slovenian [sl]
  38394. //! author : Robert Sedovšek : https://github.com/sedovsek
  38395. ;(function (global, factory) {
  38396. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  38397. undefined
  38398. }(this, (function (moment) { 'use strict';
  38399. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  38400. var result = number + ' ';
  38401. switch (key) {
  38402. case 's':
  38403. return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami';
  38404. case 'm':
  38405. return withoutSuffix ? 'ena minuta' : 'eno minuto';
  38406. case 'mm':
  38407. if (number === 1) {
  38408. result += withoutSuffix ? 'minuta' : 'minuto';
  38409. } else if (number === 2) {
  38410. result += withoutSuffix || isFuture ? 'minuti' : 'minutama';
  38411. } else if (number < 5) {
  38412. result += withoutSuffix || isFuture ? 'minute' : 'minutami';
  38413. } else {
  38414. result += withoutSuffix || isFuture ? 'minut' : 'minutami';
  38415. }
  38416. return result;
  38417. case 'h':
  38418. return withoutSuffix ? 'ena ura' : 'eno uro';
  38419. case 'hh':
  38420. if (number === 1) {
  38421. result += withoutSuffix ? 'ura' : 'uro';
  38422. } else if (number === 2) {
  38423. result += withoutSuffix || isFuture ? 'uri' : 'urama';
  38424. } else if (number < 5) {
  38425. result += withoutSuffix || isFuture ? 'ure' : 'urami';
  38426. } else {
  38427. result += withoutSuffix || isFuture ? 'ur' : 'urami';
  38428. }
  38429. return result;
  38430. case 'd':
  38431. return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';
  38432. case 'dd':
  38433. if (number === 1) {
  38434. result += withoutSuffix || isFuture ? 'dan' : 'dnem';
  38435. } else if (number === 2) {
  38436. result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';
  38437. } else {
  38438. result += withoutSuffix || isFuture ? 'dni' : 'dnevi';
  38439. }
  38440. return result;
  38441. case 'M':
  38442. return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';
  38443. case 'MM':
  38444. if (number === 1) {
  38445. result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';
  38446. } else if (number === 2) {
  38447. result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';
  38448. } else if (number < 5) {
  38449. result += withoutSuffix || isFuture ? 'mesece' : 'meseci';
  38450. } else {
  38451. result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';
  38452. }
  38453. return result;
  38454. case 'y':
  38455. return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';
  38456. case 'yy':
  38457. if (number === 1) {
  38458. result += withoutSuffix || isFuture ? 'leto' : 'letom';
  38459. } else if (number === 2) {
  38460. result += withoutSuffix || isFuture ? 'leti' : 'letoma';
  38461. } else if (number < 5) {
  38462. result += withoutSuffix || isFuture ? 'leta' : 'leti';
  38463. } else {
  38464. result += withoutSuffix || isFuture ? 'let' : 'leti';
  38465. }
  38466. return result;
  38467. }
  38468. }
  38469. var sl = moment.defineLocale('sl', {
  38470. months : 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'),
  38471. monthsShort : 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'),
  38472. monthsParseExact: true,
  38473. weekdays : 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),
  38474. weekdaysShort : 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),
  38475. weekdaysMin : 'ne_po_to_sr_če_pe_so'.split('_'),
  38476. weekdaysParseExact : true,
  38477. longDateFormat : {
  38478. LT : 'H:mm',
  38479. LTS : 'H:mm:ss',
  38480. L : 'DD.MM.YYYY',
  38481. LL : 'D. MMMM YYYY',
  38482. LLL : 'D. MMMM YYYY H:mm',
  38483. LLLL : 'dddd, D. MMMM YYYY H:mm'
  38484. },
  38485. calendar : {
  38486. sameDay : '[danes ob] LT',
  38487. nextDay : '[jutri ob] LT',
  38488. nextWeek : function () {
  38489. switch (this.day()) {
  38490. case 0:
  38491. return '[v] [nedeljo] [ob] LT';
  38492. case 3:
  38493. return '[v] [sredo] [ob] LT';
  38494. case 6:
  38495. return '[v] [soboto] [ob] LT';
  38496. case 1:
  38497. case 2:
  38498. case 4:
  38499. case 5:
  38500. return '[v] dddd [ob] LT';
  38501. }
  38502. },
  38503. lastDay : '[včeraj ob] LT',
  38504. lastWeek : function () {
  38505. switch (this.day()) {
  38506. case 0:
  38507. return '[prejšnjo] [nedeljo] [ob] LT';
  38508. case 3:
  38509. return '[prejšnjo] [sredo] [ob] LT';
  38510. case 6:
  38511. return '[prejšnjo] [soboto] [ob] LT';
  38512. case 1:
  38513. case 2:
  38514. case 4:
  38515. case 5:
  38516. return '[prejšnji] dddd [ob] LT';
  38517. }
  38518. },
  38519. sameElse : 'L'
  38520. },
  38521. relativeTime : {
  38522. future : 'čez %s',
  38523. past : 'pred %s',
  38524. s : processRelativeTime,
  38525. m : processRelativeTime,
  38526. mm : processRelativeTime,
  38527. h : processRelativeTime,
  38528. hh : processRelativeTime,
  38529. d : processRelativeTime,
  38530. dd : processRelativeTime,
  38531. M : processRelativeTime,
  38532. MM : processRelativeTime,
  38533. y : processRelativeTime,
  38534. yy : processRelativeTime
  38535. },
  38536. dayOfMonthOrdinalParse: /\d{1,2}\./,
  38537. ordinal : '%d.',
  38538. week : {
  38539. dow : 1, // Monday is the first day of the week.
  38540. doy : 7 // The week that contains Jan 1st is the first week of the year.
  38541. }
  38542. });
  38543. return sl;
  38544. })));
  38545. /***/ }),
  38546. /***/ "./node_modules/moment/locale/sq.js":
  38547. /*!******************************************!*\
  38548. !*** ./node_modules/moment/locale/sq.js ***!
  38549. \******************************************/
  38550. /*! no static exports found */
  38551. /***/ (function(module, exports, __webpack_require__) {
  38552. //! moment.js locale configuration
  38553. //! locale : Albanian [sq]
  38554. //! author : Flakërim Ismani : https://github.com/flakerimi
  38555. //! author : Menelion Elensúle : https://github.com/Oire
  38556. //! author : Oerd Cukalla : https://github.com/oerd
  38557. ;(function (global, factory) {
  38558. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  38559. undefined
  38560. }(this, (function (moment) { 'use strict';
  38561. var sq = moment.defineLocale('sq', {
  38562. months : 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split('_'),
  38563. monthsShort : 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),
  38564. weekdays : 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split('_'),
  38565. weekdaysShort : 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),
  38566. weekdaysMin : 'D_H_Ma_Më_E_P_Sh'.split('_'),
  38567. weekdaysParseExact : true,
  38568. meridiemParse: /PD|MD/,
  38569. isPM: function (input) {
  38570. return input.charAt(0) === 'M';
  38571. },
  38572. meridiem : function (hours, minutes, isLower) {
  38573. return hours < 12 ? 'PD' : 'MD';
  38574. },
  38575. longDateFormat : {
  38576. LT : 'HH:mm',
  38577. LTS : 'HH:mm:ss',
  38578. L : 'DD/MM/YYYY',
  38579. LL : 'D MMMM YYYY',
  38580. LLL : 'D MMMM YYYY HH:mm',
  38581. LLLL : 'dddd, D MMMM YYYY HH:mm'
  38582. },
  38583. calendar : {
  38584. sameDay : '[Sot në] LT',
  38585. nextDay : '[Nesër në] LT',
  38586. nextWeek : 'dddd [në] LT',
  38587. lastDay : '[Dje në] LT',
  38588. lastWeek : 'dddd [e kaluar në] LT',
  38589. sameElse : 'L'
  38590. },
  38591. relativeTime : {
  38592. future : 'në %s',
  38593. past : '%s më parë',
  38594. s : 'disa sekonda',
  38595. m : 'një minutë',
  38596. mm : '%d minuta',
  38597. h : 'një orë',
  38598. hh : '%d orë',
  38599. d : 'një ditë',
  38600. dd : '%d ditë',
  38601. M : 'një muaj',
  38602. MM : '%d muaj',
  38603. y : 'një vit',
  38604. yy : '%d vite'
  38605. },
  38606. dayOfMonthOrdinalParse: /\d{1,2}\./,
  38607. ordinal : '%d.',
  38608. week : {
  38609. dow : 1, // Monday is the first day of the week.
  38610. doy : 4 // The week that contains Jan 4th is the first week of the year.
  38611. }
  38612. });
  38613. return sq;
  38614. })));
  38615. /***/ }),
  38616. /***/ "./node_modules/moment/locale/sr-cyrl.js":
  38617. /*!***********************************************!*\
  38618. !*** ./node_modules/moment/locale/sr-cyrl.js ***!
  38619. \***********************************************/
  38620. /*! no static exports found */
  38621. /***/ (function(module, exports, __webpack_require__) {
  38622. //! moment.js locale configuration
  38623. //! locale : Serbian Cyrillic [sr-cyrl]
  38624. //! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
  38625. ;(function (global, factory) {
  38626. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  38627. undefined
  38628. }(this, (function (moment) { 'use strict';
  38629. var translator = {
  38630. words: { //Different grammatical cases
  38631. m: ['један минут', 'једне минуте'],
  38632. mm: ['минут', 'минуте', 'минута'],
  38633. h: ['један сат', 'једног сата'],
  38634. hh: ['сат', 'сата', 'сати'],
  38635. dd: ['дан', 'дана', 'дана'],
  38636. MM: ['месец', 'месеца', 'месеци'],
  38637. yy: ['година', 'године', 'година']
  38638. },
  38639. correctGrammaticalCase: function (number, wordKey) {
  38640. return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);
  38641. },
  38642. translate: function (number, withoutSuffix, key) {
  38643. var wordKey = translator.words[key];
  38644. if (key.length === 1) {
  38645. return withoutSuffix ? wordKey[0] : wordKey[1];
  38646. } else {
  38647. return number + ' ' + translator.correctGrammaticalCase(number, wordKey);
  38648. }
  38649. }
  38650. };
  38651. var srCyrl = moment.defineLocale('sr-cyrl', {
  38652. months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split('_'),
  38653. monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),
  38654. monthsParseExact: true,
  38655. weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),
  38656. weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),
  38657. weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),
  38658. weekdaysParseExact : true,
  38659. longDateFormat: {
  38660. LT: 'H:mm',
  38661. LTS : 'H:mm:ss',
  38662. L: 'DD.MM.YYYY',
  38663. LL: 'D. MMMM YYYY',
  38664. LLL: 'D. MMMM YYYY H:mm',
  38665. LLLL: 'dddd, D. MMMM YYYY H:mm'
  38666. },
  38667. calendar: {
  38668. sameDay: '[данас у] LT',
  38669. nextDay: '[сутра у] LT',
  38670. nextWeek: function () {
  38671. switch (this.day()) {
  38672. case 0:
  38673. return '[у] [недељу] [у] LT';
  38674. case 3:
  38675. return '[у] [среду] [у] LT';
  38676. case 6:
  38677. return '[у] [суботу] [у] LT';
  38678. case 1:
  38679. case 2:
  38680. case 4:
  38681. case 5:
  38682. return '[у] dddd [у] LT';
  38683. }
  38684. },
  38685. lastDay : '[јуче у] LT',
  38686. lastWeek : function () {
  38687. var lastWeekDays = [
  38688. '[прошле] [недеље] [у] LT',
  38689. '[прошлог] [понедељка] [у] LT',
  38690. '[прошлог] [уторка] [у] LT',
  38691. '[прошле] [среде] [у] LT',
  38692. '[прошлог] [четвртка] [у] LT',
  38693. '[прошлог] [петка] [у] LT',
  38694. '[прошле] [суботе] [у] LT'
  38695. ];
  38696. return lastWeekDays[this.day()];
  38697. },
  38698. sameElse : 'L'
  38699. },
  38700. relativeTime : {
  38701. future : 'за %s',
  38702. past : 'пре %s',
  38703. s : 'неколико секунди',
  38704. m : translator.translate,
  38705. mm : translator.translate,
  38706. h : translator.translate,
  38707. hh : translator.translate,
  38708. d : 'дан',
  38709. dd : translator.translate,
  38710. M : 'месец',
  38711. MM : translator.translate,
  38712. y : 'годину',
  38713. yy : translator.translate
  38714. },
  38715. dayOfMonthOrdinalParse: /\d{1,2}\./,
  38716. ordinal : '%d.',
  38717. week : {
  38718. dow : 1, // Monday is the first day of the week.
  38719. doy : 7 // The week that contains Jan 1st is the first week of the year.
  38720. }
  38721. });
  38722. return srCyrl;
  38723. })));
  38724. /***/ }),
  38725. /***/ "./node_modules/moment/locale/sr.js":
  38726. /*!******************************************!*\
  38727. !*** ./node_modules/moment/locale/sr.js ***!
  38728. \******************************************/
  38729. /*! no static exports found */
  38730. /***/ (function(module, exports, __webpack_require__) {
  38731. //! moment.js locale configuration
  38732. //! locale : Serbian [sr]
  38733. //! author : Milan Janačković<milanjanackovic@gmail.com> : https://github.com/milan-j
  38734. ;(function (global, factory) {
  38735. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  38736. undefined
  38737. }(this, (function (moment) { 'use strict';
  38738. var translator = {
  38739. words: { //Different grammatical cases
  38740. m: ['jedan minut', 'jedne minute'],
  38741. mm: ['minut', 'minute', 'minuta'],
  38742. h: ['jedan sat', 'jednog sata'],
  38743. hh: ['sat', 'sata', 'sati'],
  38744. dd: ['dan', 'dana', 'dana'],
  38745. MM: ['mesec', 'meseca', 'meseci'],
  38746. yy: ['godina', 'godine', 'godina']
  38747. },
  38748. correctGrammaticalCase: function (number, wordKey) {
  38749. return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]);
  38750. },
  38751. translate: function (number, withoutSuffix, key) {
  38752. var wordKey = translator.words[key];
  38753. if (key.length === 1) {
  38754. return withoutSuffix ? wordKey[0] : wordKey[1];
  38755. } else {
  38756. return number + ' ' + translator.correctGrammaticalCase(number, wordKey);
  38757. }
  38758. }
  38759. };
  38760. var sr = moment.defineLocale('sr', {
  38761. months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'),
  38762. monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),
  38763. monthsParseExact: true,
  38764. weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split('_'),
  38765. weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),
  38766. weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),
  38767. weekdaysParseExact : true,
  38768. longDateFormat: {
  38769. LT: 'H:mm',
  38770. LTS : 'H:mm:ss',
  38771. L: 'DD.MM.YYYY',
  38772. LL: 'D. MMMM YYYY',
  38773. LLL: 'D. MMMM YYYY H:mm',
  38774. LLLL: 'dddd, D. MMMM YYYY H:mm'
  38775. },
  38776. calendar: {
  38777. sameDay: '[danas u] LT',
  38778. nextDay: '[sutra u] LT',
  38779. nextWeek: function () {
  38780. switch (this.day()) {
  38781. case 0:
  38782. return '[u] [nedelju] [u] LT';
  38783. case 3:
  38784. return '[u] [sredu] [u] LT';
  38785. case 6:
  38786. return '[u] [subotu] [u] LT';
  38787. case 1:
  38788. case 2:
  38789. case 4:
  38790. case 5:
  38791. return '[u] dddd [u] LT';
  38792. }
  38793. },
  38794. lastDay : '[juče u] LT',
  38795. lastWeek : function () {
  38796. var lastWeekDays = [
  38797. '[prošle] [nedelje] [u] LT',
  38798. '[prošlog] [ponedeljka] [u] LT',
  38799. '[prošlog] [utorka] [u] LT',
  38800. '[prošle] [srede] [u] LT',
  38801. '[prošlog] [četvrtka] [u] LT',
  38802. '[prošlog] [petka] [u] LT',
  38803. '[prošle] [subote] [u] LT'
  38804. ];
  38805. return lastWeekDays[this.day()];
  38806. },
  38807. sameElse : 'L'
  38808. },
  38809. relativeTime : {
  38810. future : 'za %s',
  38811. past : 'pre %s',
  38812. s : 'nekoliko sekundi',
  38813. m : translator.translate,
  38814. mm : translator.translate,
  38815. h : translator.translate,
  38816. hh : translator.translate,
  38817. d : 'dan',
  38818. dd : translator.translate,
  38819. M : 'mesec',
  38820. MM : translator.translate,
  38821. y : 'godinu',
  38822. yy : translator.translate
  38823. },
  38824. dayOfMonthOrdinalParse: /\d{1,2}\./,
  38825. ordinal : '%d.',
  38826. week : {
  38827. dow : 1, // Monday is the first day of the week.
  38828. doy : 7 // The week that contains Jan 1st is the first week of the year.
  38829. }
  38830. });
  38831. return sr;
  38832. })));
  38833. /***/ }),
  38834. /***/ "./node_modules/moment/locale/ss.js":
  38835. /*!******************************************!*\
  38836. !*** ./node_modules/moment/locale/ss.js ***!
  38837. \******************************************/
  38838. /*! no static exports found */
  38839. /***/ (function(module, exports, __webpack_require__) {
  38840. //! moment.js locale configuration
  38841. //! locale : siSwati [ss]
  38842. //! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies
  38843. ;(function (global, factory) {
  38844. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  38845. undefined
  38846. }(this, (function (moment) { 'use strict';
  38847. var ss = moment.defineLocale('ss', {
  38848. months : "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split('_'),
  38849. monthsShort : 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),
  38850. weekdays : 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split('_'),
  38851. weekdaysShort : 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),
  38852. weekdaysMin : 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),
  38853. weekdaysParseExact : true,
  38854. longDateFormat : {
  38855. LT : 'h:mm A',
  38856. LTS : 'h:mm:ss A',
  38857. L : 'DD/MM/YYYY',
  38858. LL : 'D MMMM YYYY',
  38859. LLL : 'D MMMM YYYY h:mm A',
  38860. LLLL : 'dddd, D MMMM YYYY h:mm A'
  38861. },
  38862. calendar : {
  38863. sameDay : '[Namuhla nga] LT',
  38864. nextDay : '[Kusasa nga] LT',
  38865. nextWeek : 'dddd [nga] LT',
  38866. lastDay : '[Itolo nga] LT',
  38867. lastWeek : 'dddd [leliphelile] [nga] LT',
  38868. sameElse : 'L'
  38869. },
  38870. relativeTime : {
  38871. future : 'nga %s',
  38872. past : 'wenteka nga %s',
  38873. s : 'emizuzwana lomcane',
  38874. m : 'umzuzu',
  38875. mm : '%d emizuzu',
  38876. h : 'lihora',
  38877. hh : '%d emahora',
  38878. d : 'lilanga',
  38879. dd : '%d emalanga',
  38880. M : 'inyanga',
  38881. MM : '%d tinyanga',
  38882. y : 'umnyaka',
  38883. yy : '%d iminyaka'
  38884. },
  38885. meridiemParse: /ekuseni|emini|entsambama|ebusuku/,
  38886. meridiem : function (hours, minutes, isLower) {
  38887. if (hours < 11) {
  38888. return 'ekuseni';
  38889. } else if (hours < 15) {
  38890. return 'emini';
  38891. } else if (hours < 19) {
  38892. return 'entsambama';
  38893. } else {
  38894. return 'ebusuku';
  38895. }
  38896. },
  38897. meridiemHour : function (hour, meridiem) {
  38898. if (hour === 12) {
  38899. hour = 0;
  38900. }
  38901. if (meridiem === 'ekuseni') {
  38902. return hour;
  38903. } else if (meridiem === 'emini') {
  38904. return hour >= 11 ? hour : hour + 12;
  38905. } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {
  38906. if (hour === 0) {
  38907. return 0;
  38908. }
  38909. return hour + 12;
  38910. }
  38911. },
  38912. dayOfMonthOrdinalParse: /\d{1,2}/,
  38913. ordinal : '%d',
  38914. week : {
  38915. dow : 1, // Monday is the first day of the week.
  38916. doy : 4 // The week that contains Jan 4th is the first week of the year.
  38917. }
  38918. });
  38919. return ss;
  38920. })));
  38921. /***/ }),
  38922. /***/ "./node_modules/moment/locale/sv.js":
  38923. /*!******************************************!*\
  38924. !*** ./node_modules/moment/locale/sv.js ***!
  38925. \******************************************/
  38926. /*! no static exports found */
  38927. /***/ (function(module, exports, __webpack_require__) {
  38928. //! moment.js locale configuration
  38929. //! locale : Swedish [sv]
  38930. //! author : Jens Alm : https://github.com/ulmus
  38931. ;(function (global, factory) {
  38932. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  38933. undefined
  38934. }(this, (function (moment) { 'use strict';
  38935. var sv = moment.defineLocale('sv', {
  38936. months : 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'),
  38937. monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),
  38938. weekdays : 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),
  38939. weekdaysShort : 'sön_mån_tis_ons_tor_fre_lör'.split('_'),
  38940. weekdaysMin : 'sö_må_ti_on_to_fr_lö'.split('_'),
  38941. longDateFormat : {
  38942. LT : 'HH:mm',
  38943. LTS : 'HH:mm:ss',
  38944. L : 'YYYY-MM-DD',
  38945. LL : 'D MMMM YYYY',
  38946. LLL : 'D MMMM YYYY [kl.] HH:mm',
  38947. LLLL : 'dddd D MMMM YYYY [kl.] HH:mm',
  38948. lll : 'D MMM YYYY HH:mm',
  38949. llll : 'ddd D MMM YYYY HH:mm'
  38950. },
  38951. calendar : {
  38952. sameDay: '[Idag] LT',
  38953. nextDay: '[Imorgon] LT',
  38954. lastDay: '[Igår] LT',
  38955. nextWeek: '[På] dddd LT',
  38956. lastWeek: '[I] dddd[s] LT',
  38957. sameElse: 'L'
  38958. },
  38959. relativeTime : {
  38960. future : 'om %s',
  38961. past : 'för %s sedan',
  38962. s : 'några sekunder',
  38963. m : 'en minut',
  38964. mm : '%d minuter',
  38965. h : 'en timme',
  38966. hh : '%d timmar',
  38967. d : 'en dag',
  38968. dd : '%d dagar',
  38969. M : 'en månad',
  38970. MM : '%d månader',
  38971. y : 'ett år',
  38972. yy : '%d år'
  38973. },
  38974. dayOfMonthOrdinalParse: /\d{1,2}(e|a)/,
  38975. ordinal : function (number) {
  38976. var b = number % 10,
  38977. output = (~~(number % 100 / 10) === 1) ? 'e' :
  38978. (b === 1) ? 'a' :
  38979. (b === 2) ? 'a' :
  38980. (b === 3) ? 'e' : 'e';
  38981. return number + output;
  38982. },
  38983. week : {
  38984. dow : 1, // Monday is the first day of the week.
  38985. doy : 4 // The week that contains Jan 4th is the first week of the year.
  38986. }
  38987. });
  38988. return sv;
  38989. })));
  38990. /***/ }),
  38991. /***/ "./node_modules/moment/locale/sw.js":
  38992. /*!******************************************!*\
  38993. !*** ./node_modules/moment/locale/sw.js ***!
  38994. \******************************************/
  38995. /*! no static exports found */
  38996. /***/ (function(module, exports, __webpack_require__) {
  38997. //! moment.js locale configuration
  38998. //! locale : Swahili [sw]
  38999. //! author : Fahad Kassim : https://github.com/fadsel
  39000. ;(function (global, factory) {
  39001. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  39002. undefined
  39003. }(this, (function (moment) { 'use strict';
  39004. var sw = moment.defineLocale('sw', {
  39005. months : 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'),
  39006. monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),
  39007. weekdays : 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'),
  39008. weekdaysShort : 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),
  39009. weekdaysMin : 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),
  39010. weekdaysParseExact : true,
  39011. longDateFormat : {
  39012. LT : 'HH:mm',
  39013. LTS : 'HH:mm:ss',
  39014. L : 'DD.MM.YYYY',
  39015. LL : 'D MMMM YYYY',
  39016. LLL : 'D MMMM YYYY HH:mm',
  39017. LLLL : 'dddd, D MMMM YYYY HH:mm'
  39018. },
  39019. calendar : {
  39020. sameDay : '[leo saa] LT',
  39021. nextDay : '[kesho saa] LT',
  39022. nextWeek : '[wiki ijayo] dddd [saat] LT',
  39023. lastDay : '[jana] LT',
  39024. lastWeek : '[wiki iliyopita] dddd [saat] LT',
  39025. sameElse : 'L'
  39026. },
  39027. relativeTime : {
  39028. future : '%s baadaye',
  39029. past : 'tokea %s',
  39030. s : 'hivi punde',
  39031. m : 'dakika moja',
  39032. mm : 'dakika %d',
  39033. h : 'saa limoja',
  39034. hh : 'masaa %d',
  39035. d : 'siku moja',
  39036. dd : 'masiku %d',
  39037. M : 'mwezi mmoja',
  39038. MM : 'miezi %d',
  39039. y : 'mwaka mmoja',
  39040. yy : 'miaka %d'
  39041. },
  39042. week : {
  39043. dow : 1, // Monday is the first day of the week.
  39044. doy : 7 // The week that contains Jan 1st is the first week of the year.
  39045. }
  39046. });
  39047. return sw;
  39048. })));
  39049. /***/ }),
  39050. /***/ "./node_modules/moment/locale/ta.js":
  39051. /*!******************************************!*\
  39052. !*** ./node_modules/moment/locale/ta.js ***!
  39053. \******************************************/
  39054. /*! no static exports found */
  39055. /***/ (function(module, exports, __webpack_require__) {
  39056. //! moment.js locale configuration
  39057. //! locale : Tamil [ta]
  39058. //! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404
  39059. ;(function (global, factory) {
  39060. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  39061. undefined
  39062. }(this, (function (moment) { 'use strict';
  39063. var symbolMap = {
  39064. '1': '௧',
  39065. '2': '௨',
  39066. '3': '௩',
  39067. '4': '௪',
  39068. '5': '௫',
  39069. '6': '௬',
  39070. '7': '௭',
  39071. '8': '௮',
  39072. '9': '௯',
  39073. '0': '௦'
  39074. };
  39075. var numberMap = {
  39076. '௧': '1',
  39077. '௨': '2',
  39078. '௩': '3',
  39079. '௪': '4',
  39080. '௫': '5',
  39081. '௬': '6',
  39082. '௭': '7',
  39083. '௮': '8',
  39084. '௯': '9',
  39085. '௦': '0'
  39086. };
  39087. var ta = moment.defineLocale('ta', {
  39088. months : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),
  39089. monthsShort : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),
  39090. weekdays : 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split('_'),
  39091. weekdaysShort : 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split('_'),
  39092. weekdaysMin : 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),
  39093. longDateFormat : {
  39094. LT : 'HH:mm',
  39095. LTS : 'HH:mm:ss',
  39096. L : 'DD/MM/YYYY',
  39097. LL : 'D MMMM YYYY',
  39098. LLL : 'D MMMM YYYY, HH:mm',
  39099. LLLL : 'dddd, D MMMM YYYY, HH:mm'
  39100. },
  39101. calendar : {
  39102. sameDay : '[இன்று] LT',
  39103. nextDay : '[நாளை] LT',
  39104. nextWeek : 'dddd, LT',
  39105. lastDay : '[நேற்று] LT',
  39106. lastWeek : '[கடந்த வாரம்] dddd, LT',
  39107. sameElse : 'L'
  39108. },
  39109. relativeTime : {
  39110. future : '%s இல்',
  39111. past : '%s முன்',
  39112. s : 'ஒரு சில விநாடிகள்',
  39113. m : 'ஒரு நிமிடம்',
  39114. mm : '%d நிமிடங்கள்',
  39115. h : 'ஒரு மணி நேரம்',
  39116. hh : '%d மணி நேரம்',
  39117. d : 'ஒரு நாள்',
  39118. dd : '%d நாட்கள்',
  39119. M : 'ஒரு மாதம்',
  39120. MM : '%d மாதங்கள்',
  39121. y : 'ஒரு வருடம்',
  39122. yy : '%d ஆண்டுகள்'
  39123. },
  39124. dayOfMonthOrdinalParse: /\d{1,2}வது/,
  39125. ordinal : function (number) {
  39126. return number + 'வது';
  39127. },
  39128. preparse: function (string) {
  39129. return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {
  39130. return numberMap[match];
  39131. });
  39132. },
  39133. postformat: function (string) {
  39134. return string.replace(/\d/g, function (match) {
  39135. return symbolMap[match];
  39136. });
  39137. },
  39138. // refer http://ta.wikipedia.org/s/1er1
  39139. meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,
  39140. meridiem : function (hour, minute, isLower) {
  39141. if (hour < 2) {
  39142. return ' யாமம்';
  39143. } else if (hour < 6) {
  39144. return ' வைகறை'; // வைகறை
  39145. } else if (hour < 10) {
  39146. return ' காலை'; // காலை
  39147. } else if (hour < 14) {
  39148. return ' நண்பகல்'; // நண்பகல்
  39149. } else if (hour < 18) {
  39150. return ' எற்பாடு'; // எற்பாடு
  39151. } else if (hour < 22) {
  39152. return ' மாலை'; // மாலை
  39153. } else {
  39154. return ' யாமம்';
  39155. }
  39156. },
  39157. meridiemHour : function (hour, meridiem) {
  39158. if (hour === 12) {
  39159. hour = 0;
  39160. }
  39161. if (meridiem === 'யாமம்') {
  39162. return hour < 2 ? hour : hour + 12;
  39163. } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {
  39164. return hour;
  39165. } else if (meridiem === 'நண்பகல்') {
  39166. return hour >= 10 ? hour : hour + 12;
  39167. } else {
  39168. return hour + 12;
  39169. }
  39170. },
  39171. week : {
  39172. dow : 0, // Sunday is the first day of the week.
  39173. doy : 6 // The week that contains Jan 1st is the first week of the year.
  39174. }
  39175. });
  39176. return ta;
  39177. })));
  39178. /***/ }),
  39179. /***/ "./node_modules/moment/locale/te.js":
  39180. /*!******************************************!*\
  39181. !*** ./node_modules/moment/locale/te.js ***!
  39182. \******************************************/
  39183. /*! no static exports found */
  39184. /***/ (function(module, exports, __webpack_require__) {
  39185. //! moment.js locale configuration
  39186. //! locale : Telugu [te]
  39187. //! author : Krishna Chaitanya Thota : https://github.com/kcthota
  39188. ;(function (global, factory) {
  39189. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  39190. undefined
  39191. }(this, (function (moment) { 'use strict';
  39192. var te = moment.defineLocale('te', {
  39193. months : 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జూలై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split('_'),
  39194. monthsShort : 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జూలై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split('_'),
  39195. monthsParseExact : true,
  39196. weekdays : 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split('_'),
  39197. weekdaysShort : 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),
  39198. weekdaysMin : 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),
  39199. longDateFormat : {
  39200. LT : 'A h:mm',
  39201. LTS : 'A h:mm:ss',
  39202. L : 'DD/MM/YYYY',
  39203. LL : 'D MMMM YYYY',
  39204. LLL : 'D MMMM YYYY, A h:mm',
  39205. LLLL : 'dddd, D MMMM YYYY, A h:mm'
  39206. },
  39207. calendar : {
  39208. sameDay : '[నేడు] LT',
  39209. nextDay : '[రేపు] LT',
  39210. nextWeek : 'dddd, LT',
  39211. lastDay : '[నిన్న] LT',
  39212. lastWeek : '[గత] dddd, LT',
  39213. sameElse : 'L'
  39214. },
  39215. relativeTime : {
  39216. future : '%s లో',
  39217. past : '%s క్రితం',
  39218. s : 'కొన్ని క్షణాలు',
  39219. m : 'ఒక నిమిషం',
  39220. mm : '%d నిమిషాలు',
  39221. h : 'ఒక గంట',
  39222. hh : '%d గంటలు',
  39223. d : 'ఒక రోజు',
  39224. dd : '%d రోజులు',
  39225. M : 'ఒక నెల',
  39226. MM : '%d నెలలు',
  39227. y : 'ఒక సంవత్సరం',
  39228. yy : '%d సంవత్సరాలు'
  39229. },
  39230. dayOfMonthOrdinalParse : /\d{1,2}వ/,
  39231. ordinal : '%dవ',
  39232. meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,
  39233. meridiemHour : function (hour, meridiem) {
  39234. if (hour === 12) {
  39235. hour = 0;
  39236. }
  39237. if (meridiem === 'రాత్రి') {
  39238. return hour < 4 ? hour : hour + 12;
  39239. } else if (meridiem === 'ఉదయం') {
  39240. return hour;
  39241. } else if (meridiem === 'మధ్యాహ్నం') {
  39242. return hour >= 10 ? hour : hour + 12;
  39243. } else if (meridiem === 'సాయంత్రం') {
  39244. return hour + 12;
  39245. }
  39246. },
  39247. meridiem : function (hour, minute, isLower) {
  39248. if (hour < 4) {
  39249. return 'రాత్రి';
  39250. } else if (hour < 10) {
  39251. return 'ఉదయం';
  39252. } else if (hour < 17) {
  39253. return 'మధ్యాహ్నం';
  39254. } else if (hour < 20) {
  39255. return 'సాయంత్రం';
  39256. } else {
  39257. return 'రాత్రి';
  39258. }
  39259. },
  39260. week : {
  39261. dow : 0, // Sunday is the first day of the week.
  39262. doy : 6 // The week that contains Jan 1st is the first week of the year.
  39263. }
  39264. });
  39265. return te;
  39266. })));
  39267. /***/ }),
  39268. /***/ "./node_modules/moment/locale/tet.js":
  39269. /*!*******************************************!*\
  39270. !*** ./node_modules/moment/locale/tet.js ***!
  39271. \*******************************************/
  39272. /*! no static exports found */
  39273. /***/ (function(module, exports, __webpack_require__) {
  39274. //! moment.js locale configuration
  39275. //! locale : Tetun Dili (East Timor) [tet]
  39276. //! author : Joshua Brooks : https://github.com/joshbrooks
  39277. //! author : Onorio De J. Afonso : https://github.com/marobo
  39278. ;(function (global, factory) {
  39279. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  39280. undefined
  39281. }(this, (function (moment) { 'use strict';
  39282. var tet = moment.defineLocale('tet', {
  39283. months : 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juniu_Juliu_Augustu_Setembru_Outubru_Novembru_Dezembru'.split('_'),
  39284. monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Aug_Set_Out_Nov_Dez'.split('_'),
  39285. weekdays : 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sexta_Sabadu'.split('_'),
  39286. weekdaysShort : 'Dom_Seg_Ters_Kua_Kint_Sext_Sab'.split('_'),
  39287. weekdaysMin : 'Do_Seg_Te_Ku_Ki_Sex_Sa'.split('_'),
  39288. longDateFormat : {
  39289. LT : 'HH:mm',
  39290. LTS : 'HH:mm:ss',
  39291. L : 'DD/MM/YYYY',
  39292. LL : 'D MMMM YYYY',
  39293. LLL : 'D MMMM YYYY HH:mm',
  39294. LLLL : 'dddd, D MMMM YYYY HH:mm'
  39295. },
  39296. calendar : {
  39297. sameDay: '[Ohin iha] LT',
  39298. nextDay: '[Aban iha] LT',
  39299. nextWeek: 'dddd [iha] LT',
  39300. lastDay: '[Horiseik iha] LT',
  39301. lastWeek: 'dddd [semana kotuk] [iha] LT',
  39302. sameElse: 'L'
  39303. },
  39304. relativeTime : {
  39305. future : 'iha %s',
  39306. past : '%s liuba',
  39307. s : 'minutu balun',
  39308. m : 'minutu ida',
  39309. mm : 'minutus %d',
  39310. h : 'horas ida',
  39311. hh : 'horas %d',
  39312. d : 'loron ida',
  39313. dd : 'loron %d',
  39314. M : 'fulan ida',
  39315. MM : 'fulan %d',
  39316. y : 'tinan ida',
  39317. yy : 'tinan %d'
  39318. },
  39319. dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
  39320. ordinal : function (number) {
  39321. var b = number % 10,
  39322. output = (~~(number % 100 / 10) === 1) ? 'th' :
  39323. (b === 1) ? 'st' :
  39324. (b === 2) ? 'nd' :
  39325. (b === 3) ? 'rd' : 'th';
  39326. return number + output;
  39327. },
  39328. week : {
  39329. dow : 1, // Monday is the first day of the week.
  39330. doy : 4 // The week that contains Jan 4th is the first week of the year.
  39331. }
  39332. });
  39333. return tet;
  39334. })));
  39335. /***/ }),
  39336. /***/ "./node_modules/moment/locale/th.js":
  39337. /*!******************************************!*\
  39338. !*** ./node_modules/moment/locale/th.js ***!
  39339. \******************************************/
  39340. /*! no static exports found */
  39341. /***/ (function(module, exports, __webpack_require__) {
  39342. //! moment.js locale configuration
  39343. //! locale : Thai [th]
  39344. //! author : Kridsada Thanabulpong : https://github.com/sirn
  39345. ;(function (global, factory) {
  39346. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  39347. undefined
  39348. }(this, (function (moment) { 'use strict';
  39349. var th = moment.defineLocale('th', {
  39350. months : 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'),
  39351. monthsShort : 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'),
  39352. monthsParseExact: true,
  39353. weekdays : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),
  39354. weekdaysShort : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference
  39355. weekdaysMin : 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),
  39356. weekdaysParseExact : true,
  39357. longDateFormat : {
  39358. LT : 'H:mm',
  39359. LTS : 'H:mm:ss',
  39360. L : 'DD/MM/YYYY',
  39361. LL : 'D MMMM YYYY',
  39362. LLL : 'D MMMM YYYY เวลา H:mm',
  39363. LLLL : 'วันddddที่ D MMMM YYYY เวลา H:mm'
  39364. },
  39365. meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,
  39366. isPM: function (input) {
  39367. return input === 'หลังเที่ยง';
  39368. },
  39369. meridiem : function (hour, minute, isLower) {
  39370. if (hour < 12) {
  39371. return 'ก่อนเที่ยง';
  39372. } else {
  39373. return 'หลังเที่ยง';
  39374. }
  39375. },
  39376. calendar : {
  39377. sameDay : '[วันนี้ เวลา] LT',
  39378. nextDay : '[พรุ่งนี้ เวลา] LT',
  39379. nextWeek : 'dddd[หน้า เวลา] LT',
  39380. lastDay : '[เมื่อวานนี้ เวลา] LT',
  39381. lastWeek : '[วัน]dddd[ที่แล้ว เวลา] LT',
  39382. sameElse : 'L'
  39383. },
  39384. relativeTime : {
  39385. future : 'อีก %s',
  39386. past : '%sที่แล้ว',
  39387. s : 'ไม่กี่วินาที',
  39388. m : '1 นาที',
  39389. mm : '%d นาที',
  39390. h : '1 ชั่วโมง',
  39391. hh : '%d ชั่วโมง',
  39392. d : '1 วัน',
  39393. dd : '%d วัน',
  39394. M : '1 เดือน',
  39395. MM : '%d เดือน',
  39396. y : '1 ปี',
  39397. yy : '%d ปี'
  39398. }
  39399. });
  39400. return th;
  39401. })));
  39402. /***/ }),
  39403. /***/ "./node_modules/moment/locale/tl-ph.js":
  39404. /*!*********************************************!*\
  39405. !*** ./node_modules/moment/locale/tl-ph.js ***!
  39406. \*********************************************/
  39407. /*! no static exports found */
  39408. /***/ (function(module, exports, __webpack_require__) {
  39409. //! moment.js locale configuration
  39410. //! locale : Tagalog (Philippines) [tl-ph]
  39411. //! author : Dan Hagman : https://github.com/hagmandan
  39412. ;(function (global, factory) {
  39413. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  39414. undefined
  39415. }(this, (function (moment) { 'use strict';
  39416. var tlPh = moment.defineLocale('tl-ph', {
  39417. months : 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'),
  39418. monthsShort : 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),
  39419. weekdays : 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'),
  39420. weekdaysShort : 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),
  39421. weekdaysMin : 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),
  39422. longDateFormat : {
  39423. LT : 'HH:mm',
  39424. LTS : 'HH:mm:ss',
  39425. L : 'MM/D/YYYY',
  39426. LL : 'MMMM D, YYYY',
  39427. LLL : 'MMMM D, YYYY HH:mm',
  39428. LLLL : 'dddd, MMMM DD, YYYY HH:mm'
  39429. },
  39430. calendar : {
  39431. sameDay: 'LT [ngayong araw]',
  39432. nextDay: '[Bukas ng] LT',
  39433. nextWeek: 'LT [sa susunod na] dddd',
  39434. lastDay: 'LT [kahapon]',
  39435. lastWeek: 'LT [noong nakaraang] dddd',
  39436. sameElse: 'L'
  39437. },
  39438. relativeTime : {
  39439. future : 'sa loob ng %s',
  39440. past : '%s ang nakalipas',
  39441. s : 'ilang segundo',
  39442. m : 'isang minuto',
  39443. mm : '%d minuto',
  39444. h : 'isang oras',
  39445. hh : '%d oras',
  39446. d : 'isang araw',
  39447. dd : '%d araw',
  39448. M : 'isang buwan',
  39449. MM : '%d buwan',
  39450. y : 'isang taon',
  39451. yy : '%d taon'
  39452. },
  39453. dayOfMonthOrdinalParse: /\d{1,2}/,
  39454. ordinal : function (number) {
  39455. return number;
  39456. },
  39457. week : {
  39458. dow : 1, // Monday is the first day of the week.
  39459. doy : 4 // The week that contains Jan 4th is the first week of the year.
  39460. }
  39461. });
  39462. return tlPh;
  39463. })));
  39464. /***/ }),
  39465. /***/ "./node_modules/moment/locale/tlh.js":
  39466. /*!*******************************************!*\
  39467. !*** ./node_modules/moment/locale/tlh.js ***!
  39468. \*******************************************/
  39469. /*! no static exports found */
  39470. /***/ (function(module, exports, __webpack_require__) {
  39471. //! moment.js locale configuration
  39472. //! locale : Klingon [tlh]
  39473. //! author : Dominika Kruk : https://github.com/amaranthrose
  39474. ;(function (global, factory) {
  39475. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  39476. undefined
  39477. }(this, (function (moment) { 'use strict';
  39478. var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');
  39479. function translateFuture(output) {
  39480. var time = output;
  39481. time = (output.indexOf('jaj') !== -1) ?
  39482. time.slice(0, -3) + 'leS' :
  39483. (output.indexOf('jar') !== -1) ?
  39484. time.slice(0, -3) + 'waQ' :
  39485. (output.indexOf('DIS') !== -1) ?
  39486. time.slice(0, -3) + 'nem' :
  39487. time + ' pIq';
  39488. return time;
  39489. }
  39490. function translatePast(output) {
  39491. var time = output;
  39492. time = (output.indexOf('jaj') !== -1) ?
  39493. time.slice(0, -3) + 'Hu’' :
  39494. (output.indexOf('jar') !== -1) ?
  39495. time.slice(0, -3) + 'wen' :
  39496. (output.indexOf('DIS') !== -1) ?
  39497. time.slice(0, -3) + 'ben' :
  39498. time + ' ret';
  39499. return time;
  39500. }
  39501. function translate(number, withoutSuffix, string, isFuture) {
  39502. var numberNoun = numberAsNoun(number);
  39503. switch (string) {
  39504. case 'mm':
  39505. return numberNoun + ' tup';
  39506. case 'hh':
  39507. return numberNoun + ' rep';
  39508. case 'dd':
  39509. return numberNoun + ' jaj';
  39510. case 'MM':
  39511. return numberNoun + ' jar';
  39512. case 'yy':
  39513. return numberNoun + ' DIS';
  39514. }
  39515. }
  39516. function numberAsNoun(number) {
  39517. var hundred = Math.floor((number % 1000) / 100),
  39518. ten = Math.floor((number % 100) / 10),
  39519. one = number % 10,
  39520. word = '';
  39521. if (hundred > 0) {
  39522. word += numbersNouns[hundred] + 'vatlh';
  39523. }
  39524. if (ten > 0) {
  39525. word += ((word !== '') ? ' ' : '') + numbersNouns[ten] + 'maH';
  39526. }
  39527. if (one > 0) {
  39528. word += ((word !== '') ? ' ' : '') + numbersNouns[one];
  39529. }
  39530. return (word === '') ? 'pagh' : word;
  39531. }
  39532. var tlh = moment.defineLocale('tlh', {
  39533. months : 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split('_'),
  39534. monthsShort : 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split('_'),
  39535. monthsParseExact : true,
  39536. weekdays : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
  39537. weekdaysShort : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
  39538. weekdaysMin : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
  39539. longDateFormat : {
  39540. LT : 'HH:mm',
  39541. LTS : 'HH:mm:ss',
  39542. L : 'DD.MM.YYYY',
  39543. LL : 'D MMMM YYYY',
  39544. LLL : 'D MMMM YYYY HH:mm',
  39545. LLLL : 'dddd, D MMMM YYYY HH:mm'
  39546. },
  39547. calendar : {
  39548. sameDay: '[DaHjaj] LT',
  39549. nextDay: '[wa’leS] LT',
  39550. nextWeek: 'LLL',
  39551. lastDay: '[wa’Hu’] LT',
  39552. lastWeek: 'LLL',
  39553. sameElse: 'L'
  39554. },
  39555. relativeTime : {
  39556. future : translateFuture,
  39557. past : translatePast,
  39558. s : 'puS lup',
  39559. m : 'wa’ tup',
  39560. mm : translate,
  39561. h : 'wa’ rep',
  39562. hh : translate,
  39563. d : 'wa’ jaj',
  39564. dd : translate,
  39565. M : 'wa’ jar',
  39566. MM : translate,
  39567. y : 'wa’ DIS',
  39568. yy : translate
  39569. },
  39570. dayOfMonthOrdinalParse: /\d{1,2}\./,
  39571. ordinal : '%d.',
  39572. week : {
  39573. dow : 1, // Monday is the first day of the week.
  39574. doy : 4 // The week that contains Jan 4th is the first week of the year.
  39575. }
  39576. });
  39577. return tlh;
  39578. })));
  39579. /***/ }),
  39580. /***/ "./node_modules/moment/locale/tr.js":
  39581. /*!******************************************!*\
  39582. !*** ./node_modules/moment/locale/tr.js ***!
  39583. \******************************************/
  39584. /*! no static exports found */
  39585. /***/ (function(module, exports, __webpack_require__) {
  39586. //! moment.js locale configuration
  39587. //! locale : Turkish [tr]
  39588. //! authors : Erhan Gundogan : https://github.com/erhangundogan,
  39589. //! Burak Yiğit Kaya: https://github.com/BYK
  39590. ;(function (global, factory) {
  39591. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  39592. undefined
  39593. }(this, (function (moment) { 'use strict';
  39594. var suffixes = {
  39595. 1: '\'inci',
  39596. 5: '\'inci',
  39597. 8: '\'inci',
  39598. 70: '\'inci',
  39599. 80: '\'inci',
  39600. 2: '\'nci',
  39601. 7: '\'nci',
  39602. 20: '\'nci',
  39603. 50: '\'nci',
  39604. 3: '\'üncü',
  39605. 4: '\'üncü',
  39606. 100: '\'üncü',
  39607. 6: '\'ncı',
  39608. 9: '\'uncu',
  39609. 10: '\'uncu',
  39610. 30: '\'uncu',
  39611. 60: '\'ıncı',
  39612. 90: '\'ıncı'
  39613. };
  39614. var tr = moment.defineLocale('tr', {
  39615. months : 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),
  39616. monthsShort : 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
  39617. weekdays : 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),
  39618. weekdaysShort : 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),
  39619. weekdaysMin : 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
  39620. longDateFormat : {
  39621. LT : 'HH:mm',
  39622. LTS : 'HH:mm:ss',
  39623. L : 'DD.MM.YYYY',
  39624. LL : 'D MMMM YYYY',
  39625. LLL : 'D MMMM YYYY HH:mm',
  39626. LLLL : 'dddd, D MMMM YYYY HH:mm'
  39627. },
  39628. calendar : {
  39629. sameDay : '[bugün saat] LT',
  39630. nextDay : '[yarın saat] LT',
  39631. nextWeek : '[gelecek] dddd [saat] LT',
  39632. lastDay : '[dün] LT',
  39633. lastWeek : '[geçen] dddd [saat] LT',
  39634. sameElse : 'L'
  39635. },
  39636. relativeTime : {
  39637. future : '%s sonra',
  39638. past : '%s önce',
  39639. s : 'birkaç saniye',
  39640. m : 'bir dakika',
  39641. mm : '%d dakika',
  39642. h : 'bir saat',
  39643. hh : '%d saat',
  39644. d : 'bir gün',
  39645. dd : '%d gün',
  39646. M : 'bir ay',
  39647. MM : '%d ay',
  39648. y : 'bir yıl',
  39649. yy : '%d yıl'
  39650. },
  39651. dayOfMonthOrdinalParse: /\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,
  39652. ordinal : function (number) {
  39653. if (number === 0) { // special case for zero
  39654. return number + '\'ıncı';
  39655. }
  39656. var a = number % 10,
  39657. b = number % 100 - a,
  39658. c = number >= 100 ? 100 : null;
  39659. return number + (suffixes[a] || suffixes[b] || suffixes[c]);
  39660. },
  39661. week : {
  39662. dow : 1, // Monday is the first day of the week.
  39663. doy : 7 // The week that contains Jan 1st is the first week of the year.
  39664. }
  39665. });
  39666. return tr;
  39667. })));
  39668. /***/ }),
  39669. /***/ "./node_modules/moment/locale/tzl.js":
  39670. /*!*******************************************!*\
  39671. !*** ./node_modules/moment/locale/tzl.js ***!
  39672. \*******************************************/
  39673. /*! no static exports found */
  39674. /***/ (function(module, exports, __webpack_require__) {
  39675. //! moment.js locale configuration
  39676. //! locale : Talossan [tzl]
  39677. //! author : Robin van der Vliet : https://github.com/robin0van0der0v
  39678. //! author : Iustì Canun
  39679. ;(function (global, factory) {
  39680. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  39681. undefined
  39682. }(this, (function (moment) { 'use strict';
  39683. // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.
  39684. // This is currently too difficult (maybe even impossible) to add.
  39685. var tzl = moment.defineLocale('tzl', {
  39686. months : 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split('_'),
  39687. monthsShort : 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),
  39688. weekdays : 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),
  39689. weekdaysShort : 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),
  39690. weekdaysMin : 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),
  39691. longDateFormat : {
  39692. LT : 'HH.mm',
  39693. LTS : 'HH.mm.ss',
  39694. L : 'DD.MM.YYYY',
  39695. LL : 'D. MMMM [dallas] YYYY',
  39696. LLL : 'D. MMMM [dallas] YYYY HH.mm',
  39697. LLLL : 'dddd, [li] D. MMMM [dallas] YYYY HH.mm'
  39698. },
  39699. meridiemParse: /d\'o|d\'a/i,
  39700. isPM : function (input) {
  39701. return 'd\'o' === input.toLowerCase();
  39702. },
  39703. meridiem : function (hours, minutes, isLower) {
  39704. if (hours > 11) {
  39705. return isLower ? 'd\'o' : 'D\'O';
  39706. } else {
  39707. return isLower ? 'd\'a' : 'D\'A';
  39708. }
  39709. },
  39710. calendar : {
  39711. sameDay : '[oxhi à] LT',
  39712. nextDay : '[demà à] LT',
  39713. nextWeek : 'dddd [à] LT',
  39714. lastDay : '[ieiri à] LT',
  39715. lastWeek : '[sür el] dddd [lasteu à] LT',
  39716. sameElse : 'L'
  39717. },
  39718. relativeTime : {
  39719. future : 'osprei %s',
  39720. past : 'ja%s',
  39721. s : processRelativeTime,
  39722. m : processRelativeTime,
  39723. mm : processRelativeTime,
  39724. h : processRelativeTime,
  39725. hh : processRelativeTime,
  39726. d : processRelativeTime,
  39727. dd : processRelativeTime,
  39728. M : processRelativeTime,
  39729. MM : processRelativeTime,
  39730. y : processRelativeTime,
  39731. yy : processRelativeTime
  39732. },
  39733. dayOfMonthOrdinalParse: /\d{1,2}\./,
  39734. ordinal : '%d.',
  39735. week : {
  39736. dow : 1, // Monday is the first day of the week.
  39737. doy : 4 // The week that contains Jan 4th is the first week of the year.
  39738. }
  39739. });
  39740. function processRelativeTime(number, withoutSuffix, key, isFuture) {
  39741. var format = {
  39742. 's': ['viensas secunds', '\'iensas secunds'],
  39743. 'm': ['\'n míut', '\'iens míut'],
  39744. 'mm': [number + ' míuts', '' + number + ' míuts'],
  39745. 'h': ['\'n þora', '\'iensa þora'],
  39746. 'hh': [number + ' þoras', '' + number + ' þoras'],
  39747. 'd': ['\'n ziua', '\'iensa ziua'],
  39748. 'dd': [number + ' ziuas', '' + number + ' ziuas'],
  39749. 'M': ['\'n mes', '\'iens mes'],
  39750. 'MM': [number + ' mesen', '' + number + ' mesen'],
  39751. 'y': ['\'n ar', '\'iens ar'],
  39752. 'yy': [number + ' ars', '' + number + ' ars']
  39753. };
  39754. return isFuture ? format[key][0] : (withoutSuffix ? format[key][0] : format[key][1]);
  39755. }
  39756. return tzl;
  39757. })));
  39758. /***/ }),
  39759. /***/ "./node_modules/moment/locale/tzm-latn.js":
  39760. /*!************************************************!*\
  39761. !*** ./node_modules/moment/locale/tzm-latn.js ***!
  39762. \************************************************/
  39763. /*! no static exports found */
  39764. /***/ (function(module, exports, __webpack_require__) {
  39765. //! moment.js locale configuration
  39766. //! locale : Central Atlas Tamazight Latin [tzm-latn]
  39767. //! author : Abdel Said : https://github.com/abdelsaid
  39768. ;(function (global, factory) {
  39769. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  39770. undefined
  39771. }(this, (function (moment) { 'use strict';
  39772. var tzmLatn = moment.defineLocale('tzm-latn', {
  39773. months : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),
  39774. monthsShort : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),
  39775. weekdays : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
  39776. weekdaysShort : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
  39777. weekdaysMin : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
  39778. longDateFormat : {
  39779. LT : 'HH:mm',
  39780. LTS : 'HH:mm:ss',
  39781. L : 'DD/MM/YYYY',
  39782. LL : 'D MMMM YYYY',
  39783. LLL : 'D MMMM YYYY HH:mm',
  39784. LLLL : 'dddd D MMMM YYYY HH:mm'
  39785. },
  39786. calendar : {
  39787. sameDay: '[asdkh g] LT',
  39788. nextDay: '[aska g] LT',
  39789. nextWeek: 'dddd [g] LT',
  39790. lastDay: '[assant g] LT',
  39791. lastWeek: 'dddd [g] LT',
  39792. sameElse: 'L'
  39793. },
  39794. relativeTime : {
  39795. future : 'dadkh s yan %s',
  39796. past : 'yan %s',
  39797. s : 'imik',
  39798. m : 'minuḍ',
  39799. mm : '%d minuḍ',
  39800. h : 'saɛa',
  39801. hh : '%d tassaɛin',
  39802. d : 'ass',
  39803. dd : '%d ossan',
  39804. M : 'ayowr',
  39805. MM : '%d iyyirn',
  39806. y : 'asgas',
  39807. yy : '%d isgasn'
  39808. },
  39809. week : {
  39810. dow : 6, // Saturday is the first day of the week.
  39811. doy : 12 // The week that contains Jan 1st is the first week of the year.
  39812. }
  39813. });
  39814. return tzmLatn;
  39815. })));
  39816. /***/ }),
  39817. /***/ "./node_modules/moment/locale/tzm.js":
  39818. /*!*******************************************!*\
  39819. !*** ./node_modules/moment/locale/tzm.js ***!
  39820. \*******************************************/
  39821. /*! no static exports found */
  39822. /***/ (function(module, exports, __webpack_require__) {
  39823. //! moment.js locale configuration
  39824. //! locale : Central Atlas Tamazight [tzm]
  39825. //! author : Abdel Said : https://github.com/abdelsaid
  39826. ;(function (global, factory) {
  39827. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  39828. undefined
  39829. }(this, (function (moment) { 'use strict';
  39830. var tzm = moment.defineLocale('tzm', {
  39831. months : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),
  39832. monthsShort : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'),
  39833. weekdays : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
  39834. weekdaysShort : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
  39835. weekdaysMin : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),
  39836. longDateFormat : {
  39837. LT : 'HH:mm',
  39838. LTS: 'HH:mm:ss',
  39839. L : 'DD/MM/YYYY',
  39840. LL : 'D MMMM YYYY',
  39841. LLL : 'D MMMM YYYY HH:mm',
  39842. LLLL : 'dddd D MMMM YYYY HH:mm'
  39843. },
  39844. calendar : {
  39845. sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',
  39846. nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',
  39847. nextWeek: 'dddd [ⴴ] LT',
  39848. lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
  39849. lastWeek: 'dddd [ⴴ] LT',
  39850. sameElse: 'L'
  39851. },
  39852. relativeTime : {
  39853. future : 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',
  39854. past : 'ⵢⴰⵏ %s',
  39855. s : 'ⵉⵎⵉⴽ',
  39856. m : 'ⵎⵉⵏⵓⴺ',
  39857. mm : '%d ⵎⵉⵏⵓⴺ',
  39858. h : 'ⵙⴰⵄⴰ',
  39859. hh : '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',
  39860. d : 'ⴰⵙⵙ',
  39861. dd : '%d oⵙⵙⴰⵏ',
  39862. M : 'ⴰⵢoⵓⵔ',
  39863. MM : '%d ⵉⵢⵢⵉⵔⵏ',
  39864. y : 'ⴰⵙⴳⴰⵙ',
  39865. yy : '%d ⵉⵙⴳⴰⵙⵏ'
  39866. },
  39867. week : {
  39868. dow : 6, // Saturday is the first day of the week.
  39869. doy : 12 // The week that contains Jan 1st is the first week of the year.
  39870. }
  39871. });
  39872. return tzm;
  39873. })));
  39874. /***/ }),
  39875. /***/ "./node_modules/moment/locale/uk.js":
  39876. /*!******************************************!*\
  39877. !*** ./node_modules/moment/locale/uk.js ***!
  39878. \******************************************/
  39879. /*! no static exports found */
  39880. /***/ (function(module, exports, __webpack_require__) {
  39881. //! moment.js locale configuration
  39882. //! locale : Ukrainian [uk]
  39883. //! author : zemlanin : https://github.com/zemlanin
  39884. //! Author : Menelion Elensúle : https://github.com/Oire
  39885. ;(function (global, factory) {
  39886. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  39887. undefined
  39888. }(this, (function (moment) { 'use strict';
  39889. function plural(word, num) {
  39890. var forms = word.split('_');
  39891. 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]);
  39892. }
  39893. function relativeTimeWithPlural(number, withoutSuffix, key) {
  39894. var format = {
  39895. 'mm': withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',
  39896. 'hh': withoutSuffix ? 'година_години_годин' : 'годину_години_годин',
  39897. 'dd': 'день_дні_днів',
  39898. 'MM': 'місяць_місяці_місяців',
  39899. 'yy': 'рік_роки_років'
  39900. };
  39901. if (key === 'm') {
  39902. return withoutSuffix ? 'хвилина' : 'хвилину';
  39903. }
  39904. else if (key === 'h') {
  39905. return withoutSuffix ? 'година' : 'годину';
  39906. }
  39907. else {
  39908. return number + ' ' + plural(format[key], +number);
  39909. }
  39910. }
  39911. function weekdaysCaseReplace(m, format) {
  39912. var weekdays = {
  39913. 'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),
  39914. 'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),
  39915. 'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')
  39916. };
  39917. if (!m) {
  39918. return weekdays['nominative'];
  39919. }
  39920. var nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ?
  39921. 'accusative' :
  39922. ((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ?
  39923. 'genitive' :
  39924. 'nominative');
  39925. return weekdays[nounCase][m.day()];
  39926. }
  39927. function processHoursFunction(str) {
  39928. return function () {
  39929. return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
  39930. };
  39931. }
  39932. var uk = moment.defineLocale('uk', {
  39933. months : {
  39934. 'format': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'),
  39935. 'standalone': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_')
  39936. },
  39937. monthsShort : 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'),
  39938. weekdays : weekdaysCaseReplace,
  39939. weekdaysShort : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  39940. weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
  39941. longDateFormat : {
  39942. LT : 'HH:mm',
  39943. LTS : 'HH:mm:ss',
  39944. L : 'DD.MM.YYYY',
  39945. LL : 'D MMMM YYYY р.',
  39946. LLL : 'D MMMM YYYY р., HH:mm',
  39947. LLLL : 'dddd, D MMMM YYYY р., HH:mm'
  39948. },
  39949. calendar : {
  39950. sameDay: processHoursFunction('[Сьогодні '),
  39951. nextDay: processHoursFunction('[Завтра '),
  39952. lastDay: processHoursFunction('[Вчора '),
  39953. nextWeek: processHoursFunction('[У] dddd ['),
  39954. lastWeek: function () {
  39955. switch (this.day()) {
  39956. case 0:
  39957. case 3:
  39958. case 5:
  39959. case 6:
  39960. return processHoursFunction('[Минулої] dddd [').call(this);
  39961. case 1:
  39962. case 2:
  39963. case 4:
  39964. return processHoursFunction('[Минулого] dddd [').call(this);
  39965. }
  39966. },
  39967. sameElse: 'L'
  39968. },
  39969. relativeTime : {
  39970. future : 'за %s',
  39971. past : '%s тому',
  39972. s : 'декілька секунд',
  39973. m : relativeTimeWithPlural,
  39974. mm : relativeTimeWithPlural,
  39975. h : 'годину',
  39976. hh : relativeTimeWithPlural,
  39977. d : 'день',
  39978. dd : relativeTimeWithPlural,
  39979. M : 'місяць',
  39980. MM : relativeTimeWithPlural,
  39981. y : 'рік',
  39982. yy : relativeTimeWithPlural
  39983. },
  39984. // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason
  39985. meridiemParse: /ночі|ранку|дня|вечора/,
  39986. isPM: function (input) {
  39987. return /^(дня|вечора)$/.test(input);
  39988. },
  39989. meridiem : function (hour, minute, isLower) {
  39990. if (hour < 4) {
  39991. return 'ночі';
  39992. } else if (hour < 12) {
  39993. return 'ранку';
  39994. } else if (hour < 17) {
  39995. return 'дня';
  39996. } else {
  39997. return 'вечора';
  39998. }
  39999. },
  40000. dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/,
  40001. ordinal: function (number, period) {
  40002. switch (period) {
  40003. case 'M':
  40004. case 'd':
  40005. case 'DDD':
  40006. case 'w':
  40007. case 'W':
  40008. return number + '-й';
  40009. case 'D':
  40010. return number + '-го';
  40011. default:
  40012. return number;
  40013. }
  40014. },
  40015. week : {
  40016. dow : 1, // Monday is the first day of the week.
  40017. doy : 7 // The week that contains Jan 1st is the first week of the year.
  40018. }
  40019. });
  40020. return uk;
  40021. })));
  40022. /***/ }),
  40023. /***/ "./node_modules/moment/locale/ur.js":
  40024. /*!******************************************!*\
  40025. !*** ./node_modules/moment/locale/ur.js ***!
  40026. \******************************************/
  40027. /*! no static exports found */
  40028. /***/ (function(module, exports, __webpack_require__) {
  40029. //! moment.js locale configuration
  40030. //! locale : Urdu [ur]
  40031. //! author : Sawood Alam : https://github.com/ibnesayeed
  40032. //! author : Zack : https://github.com/ZackVision
  40033. ;(function (global, factory) {
  40034. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  40035. undefined
  40036. }(this, (function (moment) { 'use strict';
  40037. var months = [
  40038. 'جنوری',
  40039. 'فروری',
  40040. 'مارچ',
  40041. 'اپریل',
  40042. 'مئی',
  40043. 'جون',
  40044. 'جولائی',
  40045. 'اگست',
  40046. 'ستمبر',
  40047. 'اکتوبر',
  40048. 'نومبر',
  40049. 'دسمبر'
  40050. ];
  40051. var days = [
  40052. 'اتوار',
  40053. 'پیر',
  40054. 'منگل',
  40055. 'بدھ',
  40056. 'جمعرات',
  40057. 'جمعہ',
  40058. 'ہفتہ'
  40059. ];
  40060. var ur = moment.defineLocale('ur', {
  40061. months : months,
  40062. monthsShort : months,
  40063. weekdays : days,
  40064. weekdaysShort : days,
  40065. weekdaysMin : days,
  40066. longDateFormat : {
  40067. LT : 'HH:mm',
  40068. LTS : 'HH:mm:ss',
  40069. L : 'DD/MM/YYYY',
  40070. LL : 'D MMMM YYYY',
  40071. LLL : 'D MMMM YYYY HH:mm',
  40072. LLLL : 'dddd، D MMMM YYYY HH:mm'
  40073. },
  40074. meridiemParse: /صبح|شام/,
  40075. isPM : function (input) {
  40076. return 'شام' === input;
  40077. },
  40078. meridiem : function (hour, minute, isLower) {
  40079. if (hour < 12) {
  40080. return 'صبح';
  40081. }
  40082. return 'شام';
  40083. },
  40084. calendar : {
  40085. sameDay : '[آج بوقت] LT',
  40086. nextDay : '[کل بوقت] LT',
  40087. nextWeek : 'dddd [بوقت] LT',
  40088. lastDay : '[گذشتہ روز بوقت] LT',
  40089. lastWeek : '[گذشتہ] dddd [بوقت] LT',
  40090. sameElse : 'L'
  40091. },
  40092. relativeTime : {
  40093. future : '%s بعد',
  40094. past : '%s قبل',
  40095. s : 'چند سیکنڈ',
  40096. m : 'ایک منٹ',
  40097. mm : '%d منٹ',
  40098. h : 'ایک گھنٹہ',
  40099. hh : '%d گھنٹے',
  40100. d : 'ایک دن',
  40101. dd : '%d دن',
  40102. M : 'ایک ماہ',
  40103. MM : '%d ماہ',
  40104. y : 'ایک سال',
  40105. yy : '%d سال'
  40106. },
  40107. preparse: function (string) {
  40108. return string.replace(/،/g, ',');
  40109. },
  40110. postformat: function (string) {
  40111. return string.replace(/,/g, '،');
  40112. },
  40113. week : {
  40114. dow : 1, // Monday is the first day of the week.
  40115. doy : 4 // The week that contains Jan 4th is the first week of the year.
  40116. }
  40117. });
  40118. return ur;
  40119. })));
  40120. /***/ }),
  40121. /***/ "./node_modules/moment/locale/uz-latn.js":
  40122. /*!***********************************************!*\
  40123. !*** ./node_modules/moment/locale/uz-latn.js ***!
  40124. \***********************************************/
  40125. /*! no static exports found */
  40126. /***/ (function(module, exports, __webpack_require__) {
  40127. //! moment.js locale configuration
  40128. //! locale : Uzbek Latin [uz-latn]
  40129. //! author : Rasulbek Mirzayev : github.com/Rasulbeeek
  40130. ;(function (global, factory) {
  40131. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  40132. undefined
  40133. }(this, (function (moment) { 'use strict';
  40134. var uzLatn = moment.defineLocale('uz-latn', {
  40135. months : 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split('_'),
  40136. monthsShort : 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),
  40137. weekdays : 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split('_'),
  40138. weekdaysShort : 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),
  40139. weekdaysMin : 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),
  40140. longDateFormat : {
  40141. LT : 'HH:mm',
  40142. LTS : 'HH:mm:ss',
  40143. L : 'DD/MM/YYYY',
  40144. LL : 'D MMMM YYYY',
  40145. LLL : 'D MMMM YYYY HH:mm',
  40146. LLLL : 'D MMMM YYYY, dddd HH:mm'
  40147. },
  40148. calendar : {
  40149. sameDay : '[Bugun soat] LT [da]',
  40150. nextDay : '[Ertaga] LT [da]',
  40151. nextWeek : 'dddd [kuni soat] LT [da]',
  40152. lastDay : '[Kecha soat] LT [da]',
  40153. lastWeek : '[O\'tgan] dddd [kuni soat] LT [da]',
  40154. sameElse : 'L'
  40155. },
  40156. relativeTime : {
  40157. future : 'Yaqin %s ichida',
  40158. past : 'Bir necha %s oldin',
  40159. s : 'soniya',
  40160. m : 'bir daqiqa',
  40161. mm : '%d daqiqa',
  40162. h : 'bir soat',
  40163. hh : '%d soat',
  40164. d : 'bir kun',
  40165. dd : '%d kun',
  40166. M : 'bir oy',
  40167. MM : '%d oy',
  40168. y : 'bir yil',
  40169. yy : '%d yil'
  40170. },
  40171. week : {
  40172. dow : 1, // Monday is the first day of the week.
  40173. doy : 7 // The week that contains Jan 1st is the first week of the year.
  40174. }
  40175. });
  40176. return uzLatn;
  40177. })));
  40178. /***/ }),
  40179. /***/ "./node_modules/moment/locale/uz.js":
  40180. /*!******************************************!*\
  40181. !*** ./node_modules/moment/locale/uz.js ***!
  40182. \******************************************/
  40183. /*! no static exports found */
  40184. /***/ (function(module, exports, __webpack_require__) {
  40185. //! moment.js locale configuration
  40186. //! locale : Uzbek [uz]
  40187. //! author : Sardor Muminov : https://github.com/muminoff
  40188. ;(function (global, factory) {
  40189. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  40190. undefined
  40191. }(this, (function (moment) { 'use strict';
  40192. var uz = moment.defineLocale('uz', {
  40193. months : 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'),
  40194. monthsShort : 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),
  40195. weekdays : 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),
  40196. weekdaysShort : 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),
  40197. weekdaysMin : 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),
  40198. longDateFormat : {
  40199. LT : 'HH:mm',
  40200. LTS : 'HH:mm:ss',
  40201. L : 'DD/MM/YYYY',
  40202. LL : 'D MMMM YYYY',
  40203. LLL : 'D MMMM YYYY HH:mm',
  40204. LLLL : 'D MMMM YYYY, dddd HH:mm'
  40205. },
  40206. calendar : {
  40207. sameDay : '[Бугун соат] LT [да]',
  40208. nextDay : '[Эртага] LT [да]',
  40209. nextWeek : 'dddd [куни соат] LT [да]',
  40210. lastDay : '[Кеча соат] LT [да]',
  40211. lastWeek : '[Утган] dddd [куни соат] LT [да]',
  40212. sameElse : 'L'
  40213. },
  40214. relativeTime : {
  40215. future : 'Якин %s ичида',
  40216. past : 'Бир неча %s олдин',
  40217. s : 'фурсат',
  40218. m : 'бир дакика',
  40219. mm : '%d дакика',
  40220. h : 'бир соат',
  40221. hh : '%d соат',
  40222. d : 'бир кун',
  40223. dd : '%d кун',
  40224. M : 'бир ой',
  40225. MM : '%d ой',
  40226. y : 'бир йил',
  40227. yy : '%d йил'
  40228. },
  40229. week : {
  40230. dow : 1, // Monday is the first day of the week.
  40231. doy : 7 // The week that contains Jan 4th is the first week of the year.
  40232. }
  40233. });
  40234. return uz;
  40235. })));
  40236. /***/ }),
  40237. /***/ "./node_modules/moment/locale/vi.js":
  40238. /*!******************************************!*\
  40239. !*** ./node_modules/moment/locale/vi.js ***!
  40240. \******************************************/
  40241. /*! no static exports found */
  40242. /***/ (function(module, exports, __webpack_require__) {
  40243. //! moment.js locale configuration
  40244. //! locale : Vietnamese [vi]
  40245. //! author : Bang Nguyen : https://github.com/bangnk
  40246. ;(function (global, factory) {
  40247. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  40248. undefined
  40249. }(this, (function (moment) { 'use strict';
  40250. var vi = moment.defineLocale('vi', {
  40251. 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('_'),
  40252. monthsShort : 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'),
  40253. monthsParseExact : true,
  40254. weekdays : 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'),
  40255. weekdaysShort : 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
  40256. weekdaysMin : 'CN_T2_T3_T4_T5_T6_T7'.split('_'),
  40257. weekdaysParseExact : true,
  40258. meridiemParse: /sa|ch/i,
  40259. isPM : function (input) {
  40260. return /^ch$/i.test(input);
  40261. },
  40262. meridiem : function (hours, minutes, isLower) {
  40263. if (hours < 12) {
  40264. return isLower ? 'sa' : 'SA';
  40265. } else {
  40266. return isLower ? 'ch' : 'CH';
  40267. }
  40268. },
  40269. longDateFormat : {
  40270. LT : 'HH:mm',
  40271. LTS : 'HH:mm:ss',
  40272. L : 'DD/MM/YYYY',
  40273. LL : 'D MMMM [năm] YYYY',
  40274. LLL : 'D MMMM [năm] YYYY HH:mm',
  40275. LLLL : 'dddd, D MMMM [năm] YYYY HH:mm',
  40276. l : 'DD/M/YYYY',
  40277. ll : 'D MMM YYYY',
  40278. lll : 'D MMM YYYY HH:mm',
  40279. llll : 'ddd, D MMM YYYY HH:mm'
  40280. },
  40281. calendar : {
  40282. sameDay: '[Hôm nay lúc] LT',
  40283. nextDay: '[Ngày mai lúc] LT',
  40284. nextWeek: 'dddd [tuần tới lúc] LT',
  40285. lastDay: '[Hôm qua lúc] LT',
  40286. lastWeek: 'dddd [tuần rồi lúc] LT',
  40287. sameElse: 'L'
  40288. },
  40289. relativeTime : {
  40290. future : '%s tới',
  40291. past : '%s trước',
  40292. s : 'vài giây',
  40293. m : 'một phút',
  40294. mm : '%d phút',
  40295. h : 'một giờ',
  40296. hh : '%d giờ',
  40297. d : 'một ngày',
  40298. dd : '%d ngày',
  40299. M : 'một tháng',
  40300. MM : '%d tháng',
  40301. y : 'một năm',
  40302. yy : '%d năm'
  40303. },
  40304. dayOfMonthOrdinalParse: /\d{1,2}/,
  40305. ordinal : function (number) {
  40306. return number;
  40307. },
  40308. week : {
  40309. dow : 1, // Monday is the first day of the week.
  40310. doy : 4 // The week that contains Jan 4th is the first week of the year.
  40311. }
  40312. });
  40313. return vi;
  40314. })));
  40315. /***/ }),
  40316. /***/ "./node_modules/moment/locale/x-pseudo.js":
  40317. /*!************************************************!*\
  40318. !*** ./node_modules/moment/locale/x-pseudo.js ***!
  40319. \************************************************/
  40320. /*! no static exports found */
  40321. /***/ (function(module, exports, __webpack_require__) {
  40322. //! moment.js locale configuration
  40323. //! locale : Pseudo [x-pseudo]
  40324. //! author : Andrew Hood : https://github.com/andrewhood125
  40325. ;(function (global, factory) {
  40326. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  40327. undefined
  40328. }(this, (function (moment) { 'use strict';
  40329. var xPseudo = moment.defineLocale('x-pseudo', {
  40330. months : 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split('_'),
  40331. monthsShort : 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split('_'),
  40332. monthsParseExact : true,
  40333. weekdays : 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split('_'),
  40334. weekdaysShort : 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),
  40335. weekdaysMin : 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),
  40336. weekdaysParseExact : true,
  40337. longDateFormat : {
  40338. LT : 'HH:mm',
  40339. L : 'DD/MM/YYYY',
  40340. LL : 'D MMMM YYYY',
  40341. LLL : 'D MMMM YYYY HH:mm',
  40342. LLLL : 'dddd, D MMMM YYYY HH:mm'
  40343. },
  40344. calendar : {
  40345. sameDay : '[T~ódá~ý át] LT',
  40346. nextDay : '[T~ómó~rró~w át] LT',
  40347. nextWeek : 'dddd [át] LT',
  40348. lastDay : '[Ý~ést~érdá~ý át] LT',
  40349. lastWeek : '[L~ást] dddd [át] LT',
  40350. sameElse : 'L'
  40351. },
  40352. relativeTime : {
  40353. future : 'í~ñ %s',
  40354. past : '%s á~gó',
  40355. s : 'á ~féw ~sécó~ñds',
  40356. m : 'á ~míñ~úté',
  40357. mm : '%d m~íñú~tés',
  40358. h : 'á~ñ hó~úr',
  40359. hh : '%d h~óúrs',
  40360. d : 'á ~dáý',
  40361. dd : '%d d~áýs',
  40362. M : 'á ~móñ~th',
  40363. MM : '%d m~óñt~hs',
  40364. y : 'á ~ýéár',
  40365. yy : '%d ý~éárs'
  40366. },
  40367. dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
  40368. ordinal : function (number) {
  40369. var b = number % 10,
  40370. output = (~~(number % 100 / 10) === 1) ? 'th' :
  40371. (b === 1) ? 'st' :
  40372. (b === 2) ? 'nd' :
  40373. (b === 3) ? 'rd' : 'th';
  40374. return number + output;
  40375. },
  40376. week : {
  40377. dow : 1, // Monday is the first day of the week.
  40378. doy : 4 // The week that contains Jan 4th is the first week of the year.
  40379. }
  40380. });
  40381. return xPseudo;
  40382. })));
  40383. /***/ }),
  40384. /***/ "./node_modules/moment/locale/yo.js":
  40385. /*!******************************************!*\
  40386. !*** ./node_modules/moment/locale/yo.js ***!
  40387. \******************************************/
  40388. /*! no static exports found */
  40389. /***/ (function(module, exports, __webpack_require__) {
  40390. //! moment.js locale configuration
  40391. //! locale : Yoruba Nigeria [yo]
  40392. //! author : Atolagbe Abisoye : https://github.com/andela-batolagbe
  40393. ;(function (global, factory) {
  40394. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  40395. undefined
  40396. }(this, (function (moment) { 'use strict';
  40397. var yo = moment.defineLocale('yo', {
  40398. months : 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split('_'),
  40399. monthsShort : 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),
  40400. weekdays : 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),
  40401. weekdaysShort : 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),
  40402. weekdaysMin : 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),
  40403. longDateFormat : {
  40404. LT : 'h:mm A',
  40405. LTS : 'h:mm:ss A',
  40406. L : 'DD/MM/YYYY',
  40407. LL : 'D MMMM YYYY',
  40408. LLL : 'D MMMM YYYY h:mm A',
  40409. LLLL : 'dddd, D MMMM YYYY h:mm A'
  40410. },
  40411. calendar : {
  40412. sameDay : '[Ònì ni] LT',
  40413. nextDay : '[Ọ̀la ni] LT',
  40414. nextWeek : 'dddd [Ọsẹ̀ tón\'bọ] [ni] LT',
  40415. lastDay : '[Àna ni] LT',
  40416. lastWeek : 'dddd [Ọsẹ̀ tólọ́] [ni] LT',
  40417. sameElse : 'L'
  40418. },
  40419. relativeTime : {
  40420. future : 'ní %s',
  40421. past : '%s kọjá',
  40422. s : 'ìsẹjú aayá die',
  40423. m : 'ìsẹjú kan',
  40424. mm : 'ìsẹjú %d',
  40425. h : 'wákati kan',
  40426. hh : 'wákati %d',
  40427. d : 'ọjọ́ kan',
  40428. dd : 'ọjọ́ %d',
  40429. M : 'osù kan',
  40430. MM : 'osù %d',
  40431. y : 'ọdún kan',
  40432. yy : 'ọdún %d'
  40433. },
  40434. dayOfMonthOrdinalParse : /ọjọ́\s\d{1,2}/,
  40435. ordinal : 'ọjọ́ %d',
  40436. week : {
  40437. dow : 1, // Monday is the first day of the week.
  40438. doy : 4 // The week that contains Jan 4th is the first week of the year.
  40439. }
  40440. });
  40441. return yo;
  40442. })));
  40443. /***/ }),
  40444. /***/ "./node_modules/moment/locale/zh-cn.js":
  40445. /*!*********************************************!*\
  40446. !*** ./node_modules/moment/locale/zh-cn.js ***!
  40447. \*********************************************/
  40448. /*! no static exports found */
  40449. /***/ (function(module, exports, __webpack_require__) {
  40450. //! moment.js locale configuration
  40451. //! locale : Chinese (China) [zh-cn]
  40452. //! author : suupic : https://github.com/suupic
  40453. //! author : Zeno Zeng : https://github.com/zenozeng
  40454. ;(function (global, factory) {
  40455. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  40456. undefined
  40457. }(this, (function (moment) { 'use strict';
  40458. var zhCn = moment.defineLocale('zh-cn', {
  40459. months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
  40460. monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  40461. weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  40462. weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'),
  40463. weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
  40464. longDateFormat : {
  40465. LT : 'HH:mm',
  40466. LTS : 'HH:mm:ss',
  40467. L : 'YYYY年MMMD日',
  40468. LL : 'YYYY年MMMD日',
  40469. LLL : 'YYYY年MMMD日Ah点mm分',
  40470. LLLL : 'YYYY年MMMD日ddddAh点mm分',
  40471. l : 'YYYY年MMMD日',
  40472. ll : 'YYYY年MMMD日',
  40473. lll : 'YYYY年MMMD日 HH:mm',
  40474. llll : 'YYYY年MMMD日dddd HH:mm'
  40475. },
  40476. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  40477. meridiemHour: function (hour, meridiem) {
  40478. if (hour === 12) {
  40479. hour = 0;
  40480. }
  40481. if (meridiem === '凌晨' || meridiem === '早上' ||
  40482. meridiem === '上午') {
  40483. return hour;
  40484. } else if (meridiem === '下午' || meridiem === '晚上') {
  40485. return hour + 12;
  40486. } else {
  40487. // '中午'
  40488. return hour >= 11 ? hour : hour + 12;
  40489. }
  40490. },
  40491. meridiem : function (hour, minute, isLower) {
  40492. var hm = hour * 100 + minute;
  40493. if (hm < 600) {
  40494. return '凌晨';
  40495. } else if (hm < 900) {
  40496. return '早上';
  40497. } else if (hm < 1130) {
  40498. return '上午';
  40499. } else if (hm < 1230) {
  40500. return '中午';
  40501. } else if (hm < 1800) {
  40502. return '下午';
  40503. } else {
  40504. return '晚上';
  40505. }
  40506. },
  40507. calendar : {
  40508. sameDay : '[今天]LT',
  40509. nextDay : '[明天]LT',
  40510. nextWeek : '[下]ddddLT',
  40511. lastDay : '[昨天]LT',
  40512. lastWeek : '[上]ddddLT',
  40513. sameElse : 'L'
  40514. },
  40515. dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
  40516. ordinal : function (number, period) {
  40517. switch (period) {
  40518. case 'd':
  40519. case 'D':
  40520. case 'DDD':
  40521. return number + '日';
  40522. case 'M':
  40523. return number + '月';
  40524. case 'w':
  40525. case 'W':
  40526. return number + '周';
  40527. default:
  40528. return number;
  40529. }
  40530. },
  40531. relativeTime : {
  40532. future : '%s内',
  40533. past : '%s前',
  40534. s : '几秒',
  40535. m : '1 分钟',
  40536. mm : '%d 分钟',
  40537. h : '1 小时',
  40538. hh : '%d 小时',
  40539. d : '1 天',
  40540. dd : '%d 天',
  40541. M : '1 个月',
  40542. MM : '%d 个月',
  40543. y : '1 年',
  40544. yy : '%d 年'
  40545. },
  40546. week : {
  40547. // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
  40548. dow : 1, // Monday is the first day of the week.
  40549. doy : 4 // The week that contains Jan 4th is the first week of the year.
  40550. }
  40551. });
  40552. return zhCn;
  40553. })));
  40554. /***/ }),
  40555. /***/ "./node_modules/moment/locale/zh-hk.js":
  40556. /*!*********************************************!*\
  40557. !*** ./node_modules/moment/locale/zh-hk.js ***!
  40558. \*********************************************/
  40559. /*! no static exports found */
  40560. /***/ (function(module, exports, __webpack_require__) {
  40561. //! moment.js locale configuration
  40562. //! locale : Chinese (Hong Kong) [zh-hk]
  40563. //! author : Ben : https://github.com/ben-lin
  40564. //! author : Chris Lam : https://github.com/hehachris
  40565. //! author : Konstantin : https://github.com/skfd
  40566. ;(function (global, factory) {
  40567. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  40568. undefined
  40569. }(this, (function (moment) { 'use strict';
  40570. var zhHk = moment.defineLocale('zh-hk', {
  40571. months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
  40572. monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  40573. weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  40574. weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),
  40575. weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
  40576. longDateFormat : {
  40577. LT : 'HH:mm',
  40578. LTS : 'HH:mm:ss',
  40579. L : 'YYYY年MMMD日',
  40580. LL : 'YYYY年MMMD日',
  40581. LLL : 'YYYY年MMMD日 HH:mm',
  40582. LLLL : 'YYYY年MMMD日dddd HH:mm',
  40583. l : 'YYYY年MMMD日',
  40584. ll : 'YYYY年MMMD日',
  40585. lll : 'YYYY年MMMD日 HH:mm',
  40586. llll : 'YYYY年MMMD日dddd HH:mm'
  40587. },
  40588. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  40589. meridiemHour : function (hour, meridiem) {
  40590. if (hour === 12) {
  40591. hour = 0;
  40592. }
  40593. if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
  40594. return hour;
  40595. } else if (meridiem === '中午') {
  40596. return hour >= 11 ? hour : hour + 12;
  40597. } else if (meridiem === '下午' || meridiem === '晚上') {
  40598. return hour + 12;
  40599. }
  40600. },
  40601. meridiem : function (hour, minute, isLower) {
  40602. var hm = hour * 100 + minute;
  40603. if (hm < 600) {
  40604. return '凌晨';
  40605. } else if (hm < 900) {
  40606. return '早上';
  40607. } else if (hm < 1130) {
  40608. return '上午';
  40609. } else if (hm < 1230) {
  40610. return '中午';
  40611. } else if (hm < 1800) {
  40612. return '下午';
  40613. } else {
  40614. return '晚上';
  40615. }
  40616. },
  40617. calendar : {
  40618. sameDay : '[今天]LT',
  40619. nextDay : '[明天]LT',
  40620. nextWeek : '[下]ddddLT',
  40621. lastDay : '[昨天]LT',
  40622. lastWeek : '[上]ddddLT',
  40623. sameElse : 'L'
  40624. },
  40625. dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
  40626. ordinal : function (number, period) {
  40627. switch (period) {
  40628. case 'd' :
  40629. case 'D' :
  40630. case 'DDD' :
  40631. return number + '日';
  40632. case 'M' :
  40633. return number + '月';
  40634. case 'w' :
  40635. case 'W' :
  40636. return number + '週';
  40637. default :
  40638. return number;
  40639. }
  40640. },
  40641. relativeTime : {
  40642. future : '%s內',
  40643. past : '%s前',
  40644. s : '幾秒',
  40645. m : '1 分鐘',
  40646. mm : '%d 分鐘',
  40647. h : '1 小時',
  40648. hh : '%d 小時',
  40649. d : '1 天',
  40650. dd : '%d 天',
  40651. M : '1 個月',
  40652. MM : '%d 個月',
  40653. y : '1 年',
  40654. yy : '%d 年'
  40655. }
  40656. });
  40657. return zhHk;
  40658. })));
  40659. /***/ }),
  40660. /***/ "./node_modules/moment/locale/zh-tw.js":
  40661. /*!*********************************************!*\
  40662. !*** ./node_modules/moment/locale/zh-tw.js ***!
  40663. \*********************************************/
  40664. /*! no static exports found */
  40665. /***/ (function(module, exports, __webpack_require__) {
  40666. //! moment.js locale configuration
  40667. //! locale : Chinese (Taiwan) [zh-tw]
  40668. //! author : Ben : https://github.com/ben-lin
  40669. //! author : Chris Lam : https://github.com/hehachris
  40670. ;(function (global, factory) {
  40671. true ? factory(__webpack_require__(/*! ../moment */ "./node_modules/moment/moment.js")) :
  40672. undefined
  40673. }(this, (function (moment) { 'use strict';
  40674. var zhTw = moment.defineLocale('zh-tw', {
  40675. months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
  40676. monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
  40677. weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
  40678. weekdaysShort : '週日_週一_週二_週三_週四_週五_週六'.split('_'),
  40679. weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
  40680. longDateFormat : {
  40681. LT : 'HH:mm',
  40682. LTS : 'HH:mm:ss',
  40683. L : 'YYYY年MMMD日',
  40684. LL : 'YYYY年MMMD日',
  40685. LLL : 'YYYY年MMMD日 HH:mm',
  40686. LLLL : 'YYYY年MMMD日dddd HH:mm',
  40687. l : 'YYYY年MMMD日',
  40688. ll : 'YYYY年MMMD日',
  40689. lll : 'YYYY年MMMD日 HH:mm',
  40690. llll : 'YYYY年MMMD日dddd HH:mm'
  40691. },
  40692. meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
  40693. meridiemHour : function (hour, meridiem) {
  40694. if (hour === 12) {
  40695. hour = 0;
  40696. }
  40697. if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
  40698. return hour;
  40699. } else if (meridiem === '中午') {
  40700. return hour >= 11 ? hour : hour + 12;
  40701. } else if (meridiem === '下午' || meridiem === '晚上') {
  40702. return hour + 12;
  40703. }
  40704. },
  40705. meridiem : function (hour, minute, isLower) {
  40706. var hm = hour * 100 + minute;
  40707. if (hm < 600) {
  40708. return '凌晨';
  40709. } else if (hm < 900) {
  40710. return '早上';
  40711. } else if (hm < 1130) {
  40712. return '上午';
  40713. } else if (hm < 1230) {
  40714. return '中午';
  40715. } else if (hm < 1800) {
  40716. return '下午';
  40717. } else {
  40718. return '晚上';
  40719. }
  40720. },
  40721. calendar : {
  40722. sameDay : '[今天]LT',
  40723. nextDay : '[明天]LT',
  40724. nextWeek : '[下]ddddLT',
  40725. lastDay : '[昨天]LT',
  40726. lastWeek : '[上]ddddLT',
  40727. sameElse : 'L'
  40728. },
  40729. dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/,
  40730. ordinal : function (number, period) {
  40731. switch (period) {
  40732. case 'd' :
  40733. case 'D' :
  40734. case 'DDD' :
  40735. return number + '日';
  40736. case 'M' :
  40737. return number + '月';
  40738. case 'w' :
  40739. case 'W' :
  40740. return number + '週';
  40741. default :
  40742. return number;
  40743. }
  40744. },
  40745. relativeTime : {
  40746. future : '%s內',
  40747. past : '%s前',
  40748. s : '幾秒',
  40749. m : '1 分鐘',
  40750. mm : '%d 分鐘',
  40751. h : '1 小時',
  40752. hh : '%d 小時',
  40753. d : '1 天',
  40754. dd : '%d 天',
  40755. M : '1 個月',
  40756. MM : '%d 個月',
  40757. y : '1 年',
  40758. yy : '%d 年'
  40759. }
  40760. });
  40761. return zhTw;
  40762. })));
  40763. /***/ }),
  40764. /***/ "./node_modules/moment/moment.js":
  40765. /*!***************************************!*\
  40766. !*** ./node_modules/moment/moment.js ***!
  40767. \***************************************/
  40768. /*! no static exports found */
  40769. /***/ (function(module, exports, __webpack_require__) {
  40770. /* WEBPACK VAR INJECTION */(function(module) {var require;//! moment.js
  40771. //! version : 2.19.4
  40772. //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
  40773. //! license : MIT
  40774. //! momentjs.com
  40775. ;(function (global, factory) {
  40776. true ? module.exports = factory() :
  40777. undefined
  40778. }(this, (function () { 'use strict';
  40779. var hookCallback;
  40780. function hooks () {
  40781. return hookCallback.apply(null, arguments);
  40782. }
  40783. // This is done to register the method called with moment()
  40784. // without creating circular dependencies.
  40785. function setHookCallback (callback) {
  40786. hookCallback = callback;
  40787. }
  40788. function isArray(input) {
  40789. return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';
  40790. }
  40791. function isObject(input) {
  40792. // IE8 will treat undefined and null as object if it wasn't for
  40793. // input != null
  40794. return input != null && Object.prototype.toString.call(input) === '[object Object]';
  40795. }
  40796. function isObjectEmpty(obj) {
  40797. if (Object.getOwnPropertyNames) {
  40798. return (Object.getOwnPropertyNames(obj).length === 0);
  40799. } else {
  40800. var k;
  40801. for (k in obj) {
  40802. if (obj.hasOwnProperty(k)) {
  40803. return false;
  40804. }
  40805. }
  40806. return true;
  40807. }
  40808. }
  40809. function isUndefined(input) {
  40810. return input === void 0;
  40811. }
  40812. function isNumber(input) {
  40813. return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]';
  40814. }
  40815. function isDate(input) {
  40816. return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';
  40817. }
  40818. function map(arr, fn) {
  40819. var res = [], i;
  40820. for (i = 0; i < arr.length; ++i) {
  40821. res.push(fn(arr[i], i));
  40822. }
  40823. return res;
  40824. }
  40825. function hasOwnProp(a, b) {
  40826. return Object.prototype.hasOwnProperty.call(a, b);
  40827. }
  40828. function extend(a, b) {
  40829. for (var i in b) {
  40830. if (hasOwnProp(b, i)) {
  40831. a[i] = b[i];
  40832. }
  40833. }
  40834. if (hasOwnProp(b, 'toString')) {
  40835. a.toString = b.toString;
  40836. }
  40837. if (hasOwnProp(b, 'valueOf')) {
  40838. a.valueOf = b.valueOf;
  40839. }
  40840. return a;
  40841. }
  40842. function createUTC (input, format, locale, strict) {
  40843. return createLocalOrUTC(input, format, locale, strict, true).utc();
  40844. }
  40845. function defaultParsingFlags() {
  40846. // We need to deep clone this object.
  40847. return {
  40848. empty : false,
  40849. unusedTokens : [],
  40850. unusedInput : [],
  40851. overflow : -2,
  40852. charsLeftOver : 0,
  40853. nullInput : false,
  40854. invalidMonth : null,
  40855. invalidFormat : false,
  40856. userInvalidated : false,
  40857. iso : false,
  40858. parsedDateParts : [],
  40859. meridiem : null,
  40860. rfc2822 : false,
  40861. weekdayMismatch : false
  40862. };
  40863. }
  40864. function getParsingFlags(m) {
  40865. if (m._pf == null) {
  40866. m._pf = defaultParsingFlags();
  40867. }
  40868. return m._pf;
  40869. }
  40870. var some;
  40871. if (Array.prototype.some) {
  40872. some = Array.prototype.some;
  40873. } else {
  40874. some = function (fun) {
  40875. var t = Object(this);
  40876. var len = t.length >>> 0;
  40877. for (var i = 0; i < len; i++) {
  40878. if (i in t && fun.call(this, t[i], i, t)) {
  40879. return true;
  40880. }
  40881. }
  40882. return false;
  40883. };
  40884. }
  40885. function isValid(m) {
  40886. if (m._isValid == null) {
  40887. var flags = getParsingFlags(m);
  40888. var parsedParts = some.call(flags.parsedDateParts, function (i) {
  40889. return i != null;
  40890. });
  40891. var isNowValid = !isNaN(m._d.getTime()) &&
  40892. flags.overflow < 0 &&
  40893. !flags.empty &&
  40894. !flags.invalidMonth &&
  40895. !flags.invalidWeekday &&
  40896. !flags.weekdayMismatch &&
  40897. !flags.nullInput &&
  40898. !flags.invalidFormat &&
  40899. !flags.userInvalidated &&
  40900. (!flags.meridiem || (flags.meridiem && parsedParts));
  40901. if (m._strict) {
  40902. isNowValid = isNowValid &&
  40903. flags.charsLeftOver === 0 &&
  40904. flags.unusedTokens.length === 0 &&
  40905. flags.bigHour === undefined;
  40906. }
  40907. if (Object.isFrozen == null || !Object.isFrozen(m)) {
  40908. m._isValid = isNowValid;
  40909. }
  40910. else {
  40911. return isNowValid;
  40912. }
  40913. }
  40914. return m._isValid;
  40915. }
  40916. function createInvalid (flags) {
  40917. var m = createUTC(NaN);
  40918. if (flags != null) {
  40919. extend(getParsingFlags(m), flags);
  40920. }
  40921. else {
  40922. getParsingFlags(m).userInvalidated = true;
  40923. }
  40924. return m;
  40925. }
  40926. // Plugins that add properties should also add the key here (null value),
  40927. // so we can properly clone ourselves.
  40928. var momentProperties = hooks.momentProperties = [];
  40929. function copyConfig(to, from) {
  40930. var i, prop, val;
  40931. if (!isUndefined(from._isAMomentObject)) {
  40932. to._isAMomentObject = from._isAMomentObject;
  40933. }
  40934. if (!isUndefined(from._i)) {
  40935. to._i = from._i;
  40936. }
  40937. if (!isUndefined(from._f)) {
  40938. to._f = from._f;
  40939. }
  40940. if (!isUndefined(from._l)) {
  40941. to._l = from._l;
  40942. }
  40943. if (!isUndefined(from._strict)) {
  40944. to._strict = from._strict;
  40945. }
  40946. if (!isUndefined(from._tzm)) {
  40947. to._tzm = from._tzm;
  40948. }
  40949. if (!isUndefined(from._isUTC)) {
  40950. to._isUTC = from._isUTC;
  40951. }
  40952. if (!isUndefined(from._offset)) {
  40953. to._offset = from._offset;
  40954. }
  40955. if (!isUndefined(from._pf)) {
  40956. to._pf = getParsingFlags(from);
  40957. }
  40958. if (!isUndefined(from._locale)) {
  40959. to._locale = from._locale;
  40960. }
  40961. if (momentProperties.length > 0) {
  40962. for (i = 0; i < momentProperties.length; i++) {
  40963. prop = momentProperties[i];
  40964. val = from[prop];
  40965. if (!isUndefined(val)) {
  40966. to[prop] = val;
  40967. }
  40968. }
  40969. }
  40970. return to;
  40971. }
  40972. var updateInProgress = false;
  40973. // Moment prototype object
  40974. function Moment(config) {
  40975. copyConfig(this, config);
  40976. this._d = new Date(config._d != null ? config._d.getTime() : NaN);
  40977. if (!this.isValid()) {
  40978. this._d = new Date(NaN);
  40979. }
  40980. // Prevent infinite loop in case updateOffset creates new moment
  40981. // objects.
  40982. if (updateInProgress === false) {
  40983. updateInProgress = true;
  40984. hooks.updateOffset(this);
  40985. updateInProgress = false;
  40986. }
  40987. }
  40988. function isMoment (obj) {
  40989. return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);
  40990. }
  40991. function absFloor (number) {
  40992. if (number < 0) {
  40993. // -0 -> 0
  40994. return Math.ceil(number) || 0;
  40995. } else {
  40996. return Math.floor(number);
  40997. }
  40998. }
  40999. function toInt(argumentForCoercion) {
  41000. var coercedNumber = +argumentForCoercion,
  41001. value = 0;
  41002. if (coercedNumber !== 0 && isFinite(coercedNumber)) {
  41003. value = absFloor(coercedNumber);
  41004. }
  41005. return value;
  41006. }
  41007. // compare two arrays, return the number of differences
  41008. function compareArrays(array1, array2, dontConvert) {
  41009. var len = Math.min(array1.length, array2.length),
  41010. lengthDiff = Math.abs(array1.length - array2.length),
  41011. diffs = 0,
  41012. i;
  41013. for (i = 0; i < len; i++) {
  41014. if ((dontConvert && array1[i] !== array2[i]) ||
  41015. (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
  41016. diffs++;
  41017. }
  41018. }
  41019. return diffs + lengthDiff;
  41020. }
  41021. function warn(msg) {
  41022. if (hooks.suppressDeprecationWarnings === false &&
  41023. (typeof console !== 'undefined') && console.warn) {
  41024. console.warn('Deprecation warning: ' + msg);
  41025. }
  41026. }
  41027. function deprecate(msg, fn) {
  41028. var firstTime = true;
  41029. return extend(function () {
  41030. if (hooks.deprecationHandler != null) {
  41031. hooks.deprecationHandler(null, msg);
  41032. }
  41033. if (firstTime) {
  41034. var args = [];
  41035. var arg;
  41036. for (var i = 0; i < arguments.length; i++) {
  41037. arg = '';
  41038. if (typeof arguments[i] === 'object') {
  41039. arg += '\n[' + i + '] ';
  41040. for (var key in arguments[0]) {
  41041. arg += key + ': ' + arguments[0][key] + ', ';
  41042. }
  41043. arg = arg.slice(0, -2); // Remove trailing comma and space
  41044. } else {
  41045. arg = arguments[i];
  41046. }
  41047. args.push(arg);
  41048. }
  41049. warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack);
  41050. firstTime = false;
  41051. }
  41052. return fn.apply(this, arguments);
  41053. }, fn);
  41054. }
  41055. var deprecations = {};
  41056. function deprecateSimple(name, msg) {
  41057. if (hooks.deprecationHandler != null) {
  41058. hooks.deprecationHandler(name, msg);
  41059. }
  41060. if (!deprecations[name]) {
  41061. warn(msg);
  41062. deprecations[name] = true;
  41063. }
  41064. }
  41065. hooks.suppressDeprecationWarnings = false;
  41066. hooks.deprecationHandler = null;
  41067. function isFunction(input) {
  41068. return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
  41069. }
  41070. function set (config) {
  41071. var prop, i;
  41072. for (i in config) {
  41073. prop = config[i];
  41074. if (isFunction(prop)) {
  41075. this[i] = prop;
  41076. } else {
  41077. this['_' + i] = prop;
  41078. }
  41079. }
  41080. this._config = config;
  41081. // Lenient ordinal parsing accepts just a number in addition to
  41082. // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
  41083. // TODO: Remove "ordinalParse" fallback in next major release.
  41084. this._dayOfMonthOrdinalParseLenient = new RegExp(
  41085. (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
  41086. '|' + (/\d{1,2}/).source);
  41087. }
  41088. function mergeConfigs(parentConfig, childConfig) {
  41089. var res = extend({}, parentConfig), prop;
  41090. for (prop in childConfig) {
  41091. if (hasOwnProp(childConfig, prop)) {
  41092. if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
  41093. res[prop] = {};
  41094. extend(res[prop], parentConfig[prop]);
  41095. extend(res[prop], childConfig[prop]);
  41096. } else if (childConfig[prop] != null) {
  41097. res[prop] = childConfig[prop];
  41098. } else {
  41099. delete res[prop];
  41100. }
  41101. }
  41102. }
  41103. for (prop in parentConfig) {
  41104. if (hasOwnProp(parentConfig, prop) &&
  41105. !hasOwnProp(childConfig, prop) &&
  41106. isObject(parentConfig[prop])) {
  41107. // make sure changes to properties don't modify parent config
  41108. res[prop] = extend({}, res[prop]);
  41109. }
  41110. }
  41111. return res;
  41112. }
  41113. function Locale(config) {
  41114. if (config != null) {
  41115. this.set(config);
  41116. }
  41117. }
  41118. var keys;
  41119. if (Object.keys) {
  41120. keys = Object.keys;
  41121. } else {
  41122. keys = function (obj) {
  41123. var i, res = [];
  41124. for (i in obj) {
  41125. if (hasOwnProp(obj, i)) {
  41126. res.push(i);
  41127. }
  41128. }
  41129. return res;
  41130. };
  41131. }
  41132. var defaultCalendar = {
  41133. sameDay : '[Today at] LT',
  41134. nextDay : '[Tomorrow at] LT',
  41135. nextWeek : 'dddd [at] LT',
  41136. lastDay : '[Yesterday at] LT',
  41137. lastWeek : '[Last] dddd [at] LT',
  41138. sameElse : 'L'
  41139. };
  41140. function calendar (key, mom, now) {
  41141. var output = this._calendar[key] || this._calendar['sameElse'];
  41142. return isFunction(output) ? output.call(mom, now) : output;
  41143. }
  41144. var defaultLongDateFormat = {
  41145. LTS : 'h:mm:ss A',
  41146. LT : 'h:mm A',
  41147. L : 'MM/DD/YYYY',
  41148. LL : 'MMMM D, YYYY',
  41149. LLL : 'MMMM D, YYYY h:mm A',
  41150. LLLL : 'dddd, MMMM D, YYYY h:mm A'
  41151. };
  41152. function longDateFormat (key) {
  41153. var format = this._longDateFormat[key],
  41154. formatUpper = this._longDateFormat[key.toUpperCase()];
  41155. if (format || !formatUpper) {
  41156. return format;
  41157. }
  41158. this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {
  41159. return val.slice(1);
  41160. });
  41161. return this._longDateFormat[key];
  41162. }
  41163. var defaultInvalidDate = 'Invalid date';
  41164. function invalidDate () {
  41165. return this._invalidDate;
  41166. }
  41167. var defaultOrdinal = '%d';
  41168. var defaultDayOfMonthOrdinalParse = /\d{1,2}/;
  41169. function ordinal (number) {
  41170. return this._ordinal.replace('%d', number);
  41171. }
  41172. var defaultRelativeTime = {
  41173. future : 'in %s',
  41174. past : '%s ago',
  41175. s : 'a few seconds',
  41176. ss : '%d seconds',
  41177. m : 'a minute',
  41178. mm : '%d minutes',
  41179. h : 'an hour',
  41180. hh : '%d hours',
  41181. d : 'a day',
  41182. dd : '%d days',
  41183. M : 'a month',
  41184. MM : '%d months',
  41185. y : 'a year',
  41186. yy : '%d years'
  41187. };
  41188. function relativeTime (number, withoutSuffix, string, isFuture) {
  41189. var output = this._relativeTime[string];
  41190. return (isFunction(output)) ?
  41191. output(number, withoutSuffix, string, isFuture) :
  41192. output.replace(/%d/i, number);
  41193. }
  41194. function pastFuture (diff, output) {
  41195. var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
  41196. return isFunction(format) ? format(output) : format.replace(/%s/i, output);
  41197. }
  41198. var aliases = {};
  41199. function addUnitAlias (unit, shorthand) {
  41200. var lowerCase = unit.toLowerCase();
  41201. aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
  41202. }
  41203. function normalizeUnits(units) {
  41204. return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;
  41205. }
  41206. function normalizeObjectUnits(inputObject) {
  41207. var normalizedInput = {},
  41208. normalizedProp,
  41209. prop;
  41210. for (prop in inputObject) {
  41211. if (hasOwnProp(inputObject, prop)) {
  41212. normalizedProp = normalizeUnits(prop);
  41213. if (normalizedProp) {
  41214. normalizedInput[normalizedProp] = inputObject[prop];
  41215. }
  41216. }
  41217. }
  41218. return normalizedInput;
  41219. }
  41220. var priorities = {};
  41221. function addUnitPriority(unit, priority) {
  41222. priorities[unit] = priority;
  41223. }
  41224. function getPrioritizedUnits(unitsObj) {
  41225. var units = [];
  41226. for (var u in unitsObj) {
  41227. units.push({unit: u, priority: priorities[u]});
  41228. }
  41229. units.sort(function (a, b) {
  41230. return a.priority - b.priority;
  41231. });
  41232. return units;
  41233. }
  41234. function zeroFill(number, targetLength, forceSign) {
  41235. var absNumber = '' + Math.abs(number),
  41236. zerosToFill = targetLength - absNumber.length,
  41237. sign = number >= 0;
  41238. return (sign ? (forceSign ? '+' : '') : '-') +
  41239. Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
  41240. }
  41241. var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;
  41242. var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;
  41243. var formatFunctions = {};
  41244. var formatTokenFunctions = {};
  41245. // token: 'M'
  41246. // padded: ['MM', 2]
  41247. // ordinal: 'Mo'
  41248. // callback: function () { this.month() + 1 }
  41249. function addFormatToken (token, padded, ordinal, callback) {
  41250. var func = callback;
  41251. if (typeof callback === 'string') {
  41252. func = function () {
  41253. return this[callback]();
  41254. };
  41255. }
  41256. if (token) {
  41257. formatTokenFunctions[token] = func;
  41258. }
  41259. if (padded) {
  41260. formatTokenFunctions[padded[0]] = function () {
  41261. return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
  41262. };
  41263. }
  41264. if (ordinal) {
  41265. formatTokenFunctions[ordinal] = function () {
  41266. return this.localeData().ordinal(func.apply(this, arguments), token);
  41267. };
  41268. }
  41269. }
  41270. function removeFormattingTokens(input) {
  41271. if (input.match(/\[[\s\S]/)) {
  41272. return input.replace(/^\[|\]$/g, '');
  41273. }
  41274. return input.replace(/\\/g, '');
  41275. }
  41276. function makeFormatFunction(format) {
  41277. var array = format.match(formattingTokens), i, length;
  41278. for (i = 0, length = array.length; i < length; i++) {
  41279. if (formatTokenFunctions[array[i]]) {
  41280. array[i] = formatTokenFunctions[array[i]];
  41281. } else {
  41282. array[i] = removeFormattingTokens(array[i]);
  41283. }
  41284. }
  41285. return function (mom) {
  41286. var output = '', i;
  41287. for (i = 0; i < length; i++) {
  41288. output += isFunction(array[i]) ? array[i].call(mom, format) : array[i];
  41289. }
  41290. return output;
  41291. };
  41292. }
  41293. // format date using native date object
  41294. function formatMoment(m, format) {
  41295. if (!m.isValid()) {
  41296. return m.localeData().invalidDate();
  41297. }
  41298. format = expandFormat(format, m.localeData());
  41299. formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);
  41300. return formatFunctions[format](m);
  41301. }
  41302. function expandFormat(format, locale) {
  41303. var i = 5;
  41304. function replaceLongDateFormatTokens(input) {
  41305. return locale.longDateFormat(input) || input;
  41306. }
  41307. localFormattingTokens.lastIndex = 0;
  41308. while (i >= 0 && localFormattingTokens.test(format)) {
  41309. format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
  41310. localFormattingTokens.lastIndex = 0;
  41311. i -= 1;
  41312. }
  41313. return format;
  41314. }
  41315. var match1 = /\d/; // 0 - 9
  41316. var match2 = /\d\d/; // 00 - 99
  41317. var match3 = /\d{3}/; // 000 - 999
  41318. var match4 = /\d{4}/; // 0000 - 9999
  41319. var match6 = /[+-]?\d{6}/; // -999999 - 999999
  41320. var match1to2 = /\d\d?/; // 0 - 99
  41321. var match3to4 = /\d\d\d\d?/; // 999 - 9999
  41322. var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999
  41323. var match1to3 = /\d{1,3}/; // 0 - 999
  41324. var match1to4 = /\d{1,4}/; // 0 - 9999
  41325. var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999
  41326. var matchUnsigned = /\d+/; // 0 - inf
  41327. var matchSigned = /[+-]?\d+/; // -inf - inf
  41328. var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z
  41329. var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z
  41330. var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123
  41331. // any word (or two) characters or numbers including two/three word month in arabic.
  41332. // includes scottish gaelic two word and hyphenated months
  41333. var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;
  41334. var regexes = {};
  41335. function addRegexToken (token, regex, strictRegex) {
  41336. regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {
  41337. return (isStrict && strictRegex) ? strictRegex : regex;
  41338. };
  41339. }
  41340. function getParseRegexForToken (token, config) {
  41341. if (!hasOwnProp(regexes, token)) {
  41342. return new RegExp(unescapeFormat(token));
  41343. }
  41344. return regexes[token](config._strict, config._locale);
  41345. }
  41346. // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
  41347. function unescapeFormat(s) {
  41348. return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
  41349. return p1 || p2 || p3 || p4;
  41350. }));
  41351. }
  41352. function regexEscape(s) {
  41353. return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
  41354. }
  41355. var tokens = {};
  41356. function addParseToken (token, callback) {
  41357. var i, func = callback;
  41358. if (typeof token === 'string') {
  41359. token = [token];
  41360. }
  41361. if (isNumber(callback)) {
  41362. func = function (input, array) {
  41363. array[callback] = toInt(input);
  41364. };
  41365. }
  41366. for (i = 0; i < token.length; i++) {
  41367. tokens[token[i]] = func;
  41368. }
  41369. }
  41370. function addWeekParseToken (token, callback) {
  41371. addParseToken(token, function (input, array, config, token) {
  41372. config._w = config._w || {};
  41373. callback(input, config._w, config, token);
  41374. });
  41375. }
  41376. function addTimeToArrayFromToken(token, input, config) {
  41377. if (input != null && hasOwnProp(tokens, token)) {
  41378. tokens[token](input, config._a, config, token);
  41379. }
  41380. }
  41381. var YEAR = 0;
  41382. var MONTH = 1;
  41383. var DATE = 2;
  41384. var HOUR = 3;
  41385. var MINUTE = 4;
  41386. var SECOND = 5;
  41387. var MILLISECOND = 6;
  41388. var WEEK = 7;
  41389. var WEEKDAY = 8;
  41390. // FORMATTING
  41391. addFormatToken('Y', 0, 0, function () {
  41392. var y = this.year();
  41393. return y <= 9999 ? '' + y : '+' + y;
  41394. });
  41395. addFormatToken(0, ['YY', 2], 0, function () {
  41396. return this.year() % 100;
  41397. });
  41398. addFormatToken(0, ['YYYY', 4], 0, 'year');
  41399. addFormatToken(0, ['YYYYY', 5], 0, 'year');
  41400. addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
  41401. // ALIASES
  41402. addUnitAlias('year', 'y');
  41403. // PRIORITIES
  41404. addUnitPriority('year', 1);
  41405. // PARSING
  41406. addRegexToken('Y', matchSigned);
  41407. addRegexToken('YY', match1to2, match2);
  41408. addRegexToken('YYYY', match1to4, match4);
  41409. addRegexToken('YYYYY', match1to6, match6);
  41410. addRegexToken('YYYYYY', match1to6, match6);
  41411. addParseToken(['YYYYY', 'YYYYYY'], YEAR);
  41412. addParseToken('YYYY', function (input, array) {
  41413. array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
  41414. });
  41415. addParseToken('YY', function (input, array) {
  41416. array[YEAR] = hooks.parseTwoDigitYear(input);
  41417. });
  41418. addParseToken('Y', function (input, array) {
  41419. array[YEAR] = parseInt(input, 10);
  41420. });
  41421. // HELPERS
  41422. function daysInYear(year) {
  41423. return isLeapYear(year) ? 366 : 365;
  41424. }
  41425. function isLeapYear(year) {
  41426. return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
  41427. }
  41428. // HOOKS
  41429. hooks.parseTwoDigitYear = function (input) {
  41430. return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
  41431. };
  41432. // MOMENTS
  41433. var getSetYear = makeGetSet('FullYear', true);
  41434. function getIsLeapYear () {
  41435. return isLeapYear(this.year());
  41436. }
  41437. function makeGetSet (unit, keepTime) {
  41438. return function (value) {
  41439. if (value != null) {
  41440. set$1(this, unit, value);
  41441. hooks.updateOffset(this, keepTime);
  41442. return this;
  41443. } else {
  41444. return get(this, unit);
  41445. }
  41446. };
  41447. }
  41448. function get (mom, unit) {
  41449. return mom.isValid() ?
  41450. mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;
  41451. }
  41452. function set$1 (mom, unit, value) {
  41453. if (mom.isValid() && !isNaN(value)) {
  41454. if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {
  41455. mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));
  41456. }
  41457. else {
  41458. mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
  41459. }
  41460. }
  41461. }
  41462. // MOMENTS
  41463. function stringGet (units) {
  41464. units = normalizeUnits(units);
  41465. if (isFunction(this[units])) {
  41466. return this[units]();
  41467. }
  41468. return this;
  41469. }
  41470. function stringSet (units, value) {
  41471. if (typeof units === 'object') {
  41472. units = normalizeObjectUnits(units);
  41473. var prioritized = getPrioritizedUnits(units);
  41474. for (var i = 0; i < prioritized.length; i++) {
  41475. this[prioritized[i].unit](units[prioritized[i].unit]);
  41476. }
  41477. } else {
  41478. units = normalizeUnits(units);
  41479. if (isFunction(this[units])) {
  41480. return this[units](value);
  41481. }
  41482. }
  41483. return this;
  41484. }
  41485. function mod(n, x) {
  41486. return ((n % x) + x) % x;
  41487. }
  41488. var indexOf;
  41489. if (Array.prototype.indexOf) {
  41490. indexOf = Array.prototype.indexOf;
  41491. } else {
  41492. indexOf = function (o) {
  41493. // I know
  41494. var i;
  41495. for (i = 0; i < this.length; ++i) {
  41496. if (this[i] === o) {
  41497. return i;
  41498. }
  41499. }
  41500. return -1;
  41501. };
  41502. }
  41503. function daysInMonth(year, month) {
  41504. if (isNaN(year) || isNaN(month)) {
  41505. return NaN;
  41506. }
  41507. var modMonth = mod(month, 12);
  41508. year += (month - modMonth) / 12;
  41509. return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2);
  41510. }
  41511. // FORMATTING
  41512. addFormatToken('M', ['MM', 2], 'Mo', function () {
  41513. return this.month() + 1;
  41514. });
  41515. addFormatToken('MMM', 0, 0, function (format) {
  41516. return this.localeData().monthsShort(this, format);
  41517. });
  41518. addFormatToken('MMMM', 0, 0, function (format) {
  41519. return this.localeData().months(this, format);
  41520. });
  41521. // ALIASES
  41522. addUnitAlias('month', 'M');
  41523. // PRIORITY
  41524. addUnitPriority('month', 8);
  41525. // PARSING
  41526. addRegexToken('M', match1to2);
  41527. addRegexToken('MM', match1to2, match2);
  41528. addRegexToken('MMM', function (isStrict, locale) {
  41529. return locale.monthsShortRegex(isStrict);
  41530. });
  41531. addRegexToken('MMMM', function (isStrict, locale) {
  41532. return locale.monthsRegex(isStrict);
  41533. });
  41534. addParseToken(['M', 'MM'], function (input, array) {
  41535. array[MONTH] = toInt(input) - 1;
  41536. });
  41537. addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
  41538. var month = config._locale.monthsParse(input, token, config._strict);
  41539. // if we didn't find a month name, mark the date as invalid.
  41540. if (month != null) {
  41541. array[MONTH] = month;
  41542. } else {
  41543. getParsingFlags(config).invalidMonth = input;
  41544. }
  41545. });
  41546. // LOCALES
  41547. var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/;
  41548. var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
  41549. function localeMonths (m, format) {
  41550. if (!m) {
  41551. return isArray(this._months) ? this._months :
  41552. this._months['standalone'];
  41553. }
  41554. return isArray(this._months) ? this._months[m.month()] :
  41555. this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()];
  41556. }
  41557. var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
  41558. function localeMonthsShort (m, format) {
  41559. if (!m) {
  41560. return isArray(this._monthsShort) ? this._monthsShort :
  41561. this._monthsShort['standalone'];
  41562. }
  41563. return isArray(this._monthsShort) ? this._monthsShort[m.month()] :
  41564. this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
  41565. }
  41566. function handleStrictParse(monthName, format, strict) {
  41567. var i, ii, mom, llc = monthName.toLocaleLowerCase();
  41568. if (!this._monthsParse) {
  41569. // this is not used
  41570. this._monthsParse = [];
  41571. this._longMonthsParse = [];
  41572. this._shortMonthsParse = [];
  41573. for (i = 0; i < 12; ++i) {
  41574. mom = createUTC([2000, i]);
  41575. this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase();
  41576. this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
  41577. }
  41578. }
  41579. if (strict) {
  41580. if (format === 'MMM') {
  41581. ii = indexOf.call(this._shortMonthsParse, llc);
  41582. return ii !== -1 ? ii : null;
  41583. } else {
  41584. ii = indexOf.call(this._longMonthsParse, llc);
  41585. return ii !== -1 ? ii : null;
  41586. }
  41587. } else {
  41588. if (format === 'MMM') {
  41589. ii = indexOf.call(this._shortMonthsParse, llc);
  41590. if (ii !== -1) {
  41591. return ii;
  41592. }
  41593. ii = indexOf.call(this._longMonthsParse, llc);
  41594. return ii !== -1 ? ii : null;
  41595. } else {
  41596. ii = indexOf.call(this._longMonthsParse, llc);
  41597. if (ii !== -1) {
  41598. return ii;
  41599. }
  41600. ii = indexOf.call(this._shortMonthsParse, llc);
  41601. return ii !== -1 ? ii : null;
  41602. }
  41603. }
  41604. }
  41605. function localeMonthsParse (monthName, format, strict) {
  41606. var i, mom, regex;
  41607. if (this._monthsParseExact) {
  41608. return handleStrictParse.call(this, monthName, format, strict);
  41609. }
  41610. if (!this._monthsParse) {
  41611. this._monthsParse = [];
  41612. this._longMonthsParse = [];
  41613. this._shortMonthsParse = [];
  41614. }
  41615. // TODO: add sorting
  41616. // Sorting makes sure if one month (or abbr) is a prefix of another
  41617. // see sorting in computeMonthsParse
  41618. for (i = 0; i < 12; i++) {
  41619. // make the regex if we don't have it already
  41620. mom = createUTC([2000, i]);
  41621. if (strict && !this._longMonthsParse[i]) {
  41622. this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');
  41623. this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');
  41624. }
  41625. if (!strict && !this._monthsParse[i]) {
  41626. regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
  41627. this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
  41628. }
  41629. // test the regex
  41630. if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {
  41631. return i;
  41632. } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {
  41633. return i;
  41634. } else if (!strict && this._monthsParse[i].test(monthName)) {
  41635. return i;
  41636. }
  41637. }
  41638. }
  41639. // MOMENTS
  41640. function setMonth (mom, value) {
  41641. var dayOfMonth;
  41642. if (!mom.isValid()) {
  41643. // No op
  41644. return mom;
  41645. }
  41646. if (typeof value === 'string') {
  41647. if (/^\d+$/.test(value)) {
  41648. value = toInt(value);
  41649. } else {
  41650. value = mom.localeData().monthsParse(value);
  41651. // TODO: Another silent failure?
  41652. if (!isNumber(value)) {
  41653. return mom;
  41654. }
  41655. }
  41656. }
  41657. dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
  41658. mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
  41659. return mom;
  41660. }
  41661. function getSetMonth (value) {
  41662. if (value != null) {
  41663. setMonth(this, value);
  41664. hooks.updateOffset(this, true);
  41665. return this;
  41666. } else {
  41667. return get(this, 'Month');
  41668. }
  41669. }
  41670. function getDaysInMonth () {
  41671. return daysInMonth(this.year(), this.month());
  41672. }
  41673. var defaultMonthsShortRegex = matchWord;
  41674. function monthsShortRegex (isStrict) {
  41675. if (this._monthsParseExact) {
  41676. if (!hasOwnProp(this, '_monthsRegex')) {
  41677. computeMonthsParse.call(this);
  41678. }
  41679. if (isStrict) {
  41680. return this._monthsShortStrictRegex;
  41681. } else {
  41682. return this._monthsShortRegex;
  41683. }
  41684. } else {
  41685. if (!hasOwnProp(this, '_monthsShortRegex')) {
  41686. this._monthsShortRegex = defaultMonthsShortRegex;
  41687. }
  41688. return this._monthsShortStrictRegex && isStrict ?
  41689. this._monthsShortStrictRegex : this._monthsShortRegex;
  41690. }
  41691. }
  41692. var defaultMonthsRegex = matchWord;
  41693. function monthsRegex (isStrict) {
  41694. if (this._monthsParseExact) {
  41695. if (!hasOwnProp(this, '_monthsRegex')) {
  41696. computeMonthsParse.call(this);
  41697. }
  41698. if (isStrict) {
  41699. return this._monthsStrictRegex;
  41700. } else {
  41701. return this._monthsRegex;
  41702. }
  41703. } else {
  41704. if (!hasOwnProp(this, '_monthsRegex')) {
  41705. this._monthsRegex = defaultMonthsRegex;
  41706. }
  41707. return this._monthsStrictRegex && isStrict ?
  41708. this._monthsStrictRegex : this._monthsRegex;
  41709. }
  41710. }
  41711. function computeMonthsParse () {
  41712. function cmpLenRev(a, b) {
  41713. return b.length - a.length;
  41714. }
  41715. var shortPieces = [], longPieces = [], mixedPieces = [],
  41716. i, mom;
  41717. for (i = 0; i < 12; i++) {
  41718. // make the regex if we don't have it already
  41719. mom = createUTC([2000, i]);
  41720. shortPieces.push(this.monthsShort(mom, ''));
  41721. longPieces.push(this.months(mom, ''));
  41722. mixedPieces.push(this.months(mom, ''));
  41723. mixedPieces.push(this.monthsShort(mom, ''));
  41724. }
  41725. // Sorting makes sure if one month (or abbr) is a prefix of another it
  41726. // will match the longer piece.
  41727. shortPieces.sort(cmpLenRev);
  41728. longPieces.sort(cmpLenRev);
  41729. mixedPieces.sort(cmpLenRev);
  41730. for (i = 0; i < 12; i++) {
  41731. shortPieces[i] = regexEscape(shortPieces[i]);
  41732. longPieces[i] = regexEscape(longPieces[i]);
  41733. }
  41734. for (i = 0; i < 24; i++) {
  41735. mixedPieces[i] = regexEscape(mixedPieces[i]);
  41736. }
  41737. this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
  41738. this._monthsShortRegex = this._monthsRegex;
  41739. this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
  41740. this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
  41741. }
  41742. function createDate (y, m, d, h, M, s, ms) {
  41743. // can't just apply() to create a date:
  41744. // https://stackoverflow.com/q/181348
  41745. var date = new Date(y, m, d, h, M, s, ms);
  41746. // the date constructor remaps years 0-99 to 1900-1999
  41747. if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
  41748. date.setFullYear(y);
  41749. }
  41750. return date;
  41751. }
  41752. function createUTCDate (y) {
  41753. var date = new Date(Date.UTC.apply(null, arguments));
  41754. // the Date.UTC function remaps years 0-99 to 1900-1999
  41755. if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
  41756. date.setUTCFullYear(y);
  41757. }
  41758. return date;
  41759. }
  41760. // start-of-first-week - start-of-year
  41761. function firstWeekOffset(year, dow, doy) {
  41762. var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
  41763. fwd = 7 + dow - doy,
  41764. // first-week day local weekday -- which local weekday is fwd
  41765. fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
  41766. return -fwdlw + fwd - 1;
  41767. }
  41768. // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
  41769. function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
  41770. var localWeekday = (7 + weekday - dow) % 7,
  41771. weekOffset = firstWeekOffset(year, dow, doy),
  41772. dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
  41773. resYear, resDayOfYear;
  41774. if (dayOfYear <= 0) {
  41775. resYear = year - 1;
  41776. resDayOfYear = daysInYear(resYear) + dayOfYear;
  41777. } else if (dayOfYear > daysInYear(year)) {
  41778. resYear = year + 1;
  41779. resDayOfYear = dayOfYear - daysInYear(year);
  41780. } else {
  41781. resYear = year;
  41782. resDayOfYear = dayOfYear;
  41783. }
  41784. return {
  41785. year: resYear,
  41786. dayOfYear: resDayOfYear
  41787. };
  41788. }
  41789. function weekOfYear(mom, dow, doy) {
  41790. var weekOffset = firstWeekOffset(mom.year(), dow, doy),
  41791. week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
  41792. resWeek, resYear;
  41793. if (week < 1) {
  41794. resYear = mom.year() - 1;
  41795. resWeek = week + weeksInYear(resYear, dow, doy);
  41796. } else if (week > weeksInYear(mom.year(), dow, doy)) {
  41797. resWeek = week - weeksInYear(mom.year(), dow, doy);
  41798. resYear = mom.year() + 1;
  41799. } else {
  41800. resYear = mom.year();
  41801. resWeek = week;
  41802. }
  41803. return {
  41804. week: resWeek,
  41805. year: resYear
  41806. };
  41807. }
  41808. function weeksInYear(year, dow, doy) {
  41809. var weekOffset = firstWeekOffset(year, dow, doy),
  41810. weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
  41811. return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
  41812. }
  41813. // FORMATTING
  41814. addFormatToken('w', ['ww', 2], 'wo', 'week');
  41815. addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
  41816. // ALIASES
  41817. addUnitAlias('week', 'w');
  41818. addUnitAlias('isoWeek', 'W');
  41819. // PRIORITIES
  41820. addUnitPriority('week', 5);
  41821. addUnitPriority('isoWeek', 5);
  41822. // PARSING
  41823. addRegexToken('w', match1to2);
  41824. addRegexToken('ww', match1to2, match2);
  41825. addRegexToken('W', match1to2);
  41826. addRegexToken('WW', match1to2, match2);
  41827. addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {
  41828. week[token.substr(0, 1)] = toInt(input);
  41829. });
  41830. // HELPERS
  41831. // LOCALES
  41832. function localeWeek (mom) {
  41833. return weekOfYear(mom, this._week.dow, this._week.doy).week;
  41834. }
  41835. var defaultLocaleWeek = {
  41836. dow : 0, // Sunday is the first day of the week.
  41837. doy : 6 // The week that contains Jan 1st is the first week of the year.
  41838. };
  41839. function localeFirstDayOfWeek () {
  41840. return this._week.dow;
  41841. }
  41842. function localeFirstDayOfYear () {
  41843. return this._week.doy;
  41844. }
  41845. // MOMENTS
  41846. function getSetWeek (input) {
  41847. var week = this.localeData().week(this);
  41848. return input == null ? week : this.add((input - week) * 7, 'd');
  41849. }
  41850. function getSetISOWeek (input) {
  41851. var week = weekOfYear(this, 1, 4).week;
  41852. return input == null ? week : this.add((input - week) * 7, 'd');
  41853. }
  41854. // FORMATTING
  41855. addFormatToken('d', 0, 'do', 'day');
  41856. addFormatToken('dd', 0, 0, function (format) {
  41857. return this.localeData().weekdaysMin(this, format);
  41858. });
  41859. addFormatToken('ddd', 0, 0, function (format) {
  41860. return this.localeData().weekdaysShort(this, format);
  41861. });
  41862. addFormatToken('dddd', 0, 0, function (format) {
  41863. return this.localeData().weekdays(this, format);
  41864. });
  41865. addFormatToken('e', 0, 0, 'weekday');
  41866. addFormatToken('E', 0, 0, 'isoWeekday');
  41867. // ALIASES
  41868. addUnitAlias('day', 'd');
  41869. addUnitAlias('weekday', 'e');
  41870. addUnitAlias('isoWeekday', 'E');
  41871. // PRIORITY
  41872. addUnitPriority('day', 11);
  41873. addUnitPriority('weekday', 11);
  41874. addUnitPriority('isoWeekday', 11);
  41875. // PARSING
  41876. addRegexToken('d', match1to2);
  41877. addRegexToken('e', match1to2);
  41878. addRegexToken('E', match1to2);
  41879. addRegexToken('dd', function (isStrict, locale) {
  41880. return locale.weekdaysMinRegex(isStrict);
  41881. });
  41882. addRegexToken('ddd', function (isStrict, locale) {
  41883. return locale.weekdaysShortRegex(isStrict);
  41884. });
  41885. addRegexToken('dddd', function (isStrict, locale) {
  41886. return locale.weekdaysRegex(isStrict);
  41887. });
  41888. addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
  41889. var weekday = config._locale.weekdaysParse(input, token, config._strict);
  41890. // if we didn't get a weekday name, mark the date as invalid
  41891. if (weekday != null) {
  41892. week.d = weekday;
  41893. } else {
  41894. getParsingFlags(config).invalidWeekday = input;
  41895. }
  41896. });
  41897. addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
  41898. week[token] = toInt(input);
  41899. });
  41900. // HELPERS
  41901. function parseWeekday(input, locale) {
  41902. if (typeof input !== 'string') {
  41903. return input;
  41904. }
  41905. if (!isNaN(input)) {
  41906. return parseInt(input, 10);
  41907. }
  41908. input = locale.weekdaysParse(input);
  41909. if (typeof input === 'number') {
  41910. return input;
  41911. }
  41912. return null;
  41913. }
  41914. function parseIsoWeekday(input, locale) {
  41915. if (typeof input === 'string') {
  41916. return locale.weekdaysParse(input) % 7 || 7;
  41917. }
  41918. return isNaN(input) ? null : input;
  41919. }
  41920. // LOCALES
  41921. var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
  41922. function localeWeekdays (m, format) {
  41923. if (!m) {
  41924. return isArray(this._weekdays) ? this._weekdays :
  41925. this._weekdays['standalone'];
  41926. }
  41927. return isArray(this._weekdays) ? this._weekdays[m.day()] :
  41928. this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];
  41929. }
  41930. var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');
  41931. function localeWeekdaysShort (m) {
  41932. return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort;
  41933. }
  41934. var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');
  41935. function localeWeekdaysMin (m) {
  41936. return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin;
  41937. }
  41938. function handleStrictParse$1(weekdayName, format, strict) {
  41939. var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
  41940. if (!this._weekdaysParse) {
  41941. this._weekdaysParse = [];
  41942. this._shortWeekdaysParse = [];
  41943. this._minWeekdaysParse = [];
  41944. for (i = 0; i < 7; ++i) {
  41945. mom = createUTC([2000, 1]).day(i);
  41946. this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase();
  41947. this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase();
  41948. this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
  41949. }
  41950. }
  41951. if (strict) {
  41952. if (format === 'dddd') {
  41953. ii = indexOf.call(this._weekdaysParse, llc);
  41954. return ii !== -1 ? ii : null;
  41955. } else if (format === 'ddd') {
  41956. ii = indexOf.call(this._shortWeekdaysParse, llc);
  41957. return ii !== -1 ? ii : null;
  41958. } else {
  41959. ii = indexOf.call(this._minWeekdaysParse, llc);
  41960. return ii !== -1 ? ii : null;
  41961. }
  41962. } else {
  41963. if (format === 'dddd') {
  41964. ii = indexOf.call(this._weekdaysParse, llc);
  41965. if (ii !== -1) {
  41966. return ii;
  41967. }
  41968. ii = indexOf.call(this._shortWeekdaysParse, llc);
  41969. if (ii !== -1) {
  41970. return ii;
  41971. }
  41972. ii = indexOf.call(this._minWeekdaysParse, llc);
  41973. return ii !== -1 ? ii : null;
  41974. } else if (format === 'ddd') {
  41975. ii = indexOf.call(this._shortWeekdaysParse, llc);
  41976. if (ii !== -1) {
  41977. return ii;
  41978. }
  41979. ii = indexOf.call(this._weekdaysParse, llc);
  41980. if (ii !== -1) {
  41981. return ii;
  41982. }
  41983. ii = indexOf.call(this._minWeekdaysParse, llc);
  41984. return ii !== -1 ? ii : null;
  41985. } else {
  41986. ii = indexOf.call(this._minWeekdaysParse, llc);
  41987. if (ii !== -1) {
  41988. return ii;
  41989. }
  41990. ii = indexOf.call(this._weekdaysParse, llc);
  41991. if (ii !== -1) {
  41992. return ii;
  41993. }
  41994. ii = indexOf.call(this._shortWeekdaysParse, llc);
  41995. return ii !== -1 ? ii : null;
  41996. }
  41997. }
  41998. }
  41999. function localeWeekdaysParse (weekdayName, format, strict) {
  42000. var i, mom, regex;
  42001. if (this._weekdaysParseExact) {
  42002. return handleStrictParse$1.call(this, weekdayName, format, strict);
  42003. }
  42004. if (!this._weekdaysParse) {
  42005. this._weekdaysParse = [];
  42006. this._minWeekdaysParse = [];
  42007. this._shortWeekdaysParse = [];
  42008. this._fullWeekdaysParse = [];
  42009. }
  42010. for (i = 0; i < 7; i++) {
  42011. // make the regex if we don't have it already
  42012. mom = createUTC([2000, 1]).day(i);
  42013. if (strict && !this._fullWeekdaysParse[i]) {
  42014. this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i');
  42015. this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i');
  42016. this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i');
  42017. }
  42018. if (!this._weekdaysParse[i]) {
  42019. regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
  42020. this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
  42021. }
  42022. // test the regex
  42023. if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {
  42024. return i;
  42025. } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {
  42026. return i;
  42027. } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {
  42028. return i;
  42029. } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
  42030. return i;
  42031. }
  42032. }
  42033. }
  42034. // MOMENTS
  42035. function getSetDayOfWeek (input) {
  42036. if (!this.isValid()) {
  42037. return input != null ? this : NaN;
  42038. }
  42039. var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
  42040. if (input != null) {
  42041. input = parseWeekday(input, this.localeData());
  42042. return this.add(input - day, 'd');
  42043. } else {
  42044. return day;
  42045. }
  42046. }
  42047. function getSetLocaleDayOfWeek (input) {
  42048. if (!this.isValid()) {
  42049. return input != null ? this : NaN;
  42050. }
  42051. var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
  42052. return input == null ? weekday : this.add(input - weekday, 'd');
  42053. }
  42054. function getSetISODayOfWeek (input) {
  42055. if (!this.isValid()) {
  42056. return input != null ? this : NaN;
  42057. }
  42058. // behaves the same as moment#day except
  42059. // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
  42060. // as a setter, sunday should belong to the previous week.
  42061. if (input != null) {
  42062. var weekday = parseIsoWeekday(input, this.localeData());
  42063. return this.day(this.day() % 7 ? weekday : weekday - 7);
  42064. } else {
  42065. return this.day() || 7;
  42066. }
  42067. }
  42068. var defaultWeekdaysRegex = matchWord;
  42069. function weekdaysRegex (isStrict) {
  42070. if (this._weekdaysParseExact) {
  42071. if (!hasOwnProp(this, '_weekdaysRegex')) {
  42072. computeWeekdaysParse.call(this);
  42073. }
  42074. if (isStrict) {
  42075. return this._weekdaysStrictRegex;
  42076. } else {
  42077. return this._weekdaysRegex;
  42078. }
  42079. } else {
  42080. if (!hasOwnProp(this, '_weekdaysRegex')) {
  42081. this._weekdaysRegex = defaultWeekdaysRegex;
  42082. }
  42083. return this._weekdaysStrictRegex && isStrict ?
  42084. this._weekdaysStrictRegex : this._weekdaysRegex;
  42085. }
  42086. }
  42087. var defaultWeekdaysShortRegex = matchWord;
  42088. function weekdaysShortRegex (isStrict) {
  42089. if (this._weekdaysParseExact) {
  42090. if (!hasOwnProp(this, '_weekdaysRegex')) {
  42091. computeWeekdaysParse.call(this);
  42092. }
  42093. if (isStrict) {
  42094. return this._weekdaysShortStrictRegex;
  42095. } else {
  42096. return this._weekdaysShortRegex;
  42097. }
  42098. } else {
  42099. if (!hasOwnProp(this, '_weekdaysShortRegex')) {
  42100. this._weekdaysShortRegex = defaultWeekdaysShortRegex;
  42101. }
  42102. return this._weekdaysShortStrictRegex && isStrict ?
  42103. this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
  42104. }
  42105. }
  42106. var defaultWeekdaysMinRegex = matchWord;
  42107. function weekdaysMinRegex (isStrict) {
  42108. if (this._weekdaysParseExact) {
  42109. if (!hasOwnProp(this, '_weekdaysRegex')) {
  42110. computeWeekdaysParse.call(this);
  42111. }
  42112. if (isStrict) {
  42113. return this._weekdaysMinStrictRegex;
  42114. } else {
  42115. return this._weekdaysMinRegex;
  42116. }
  42117. } else {
  42118. if (!hasOwnProp(this, '_weekdaysMinRegex')) {
  42119. this._weekdaysMinRegex = defaultWeekdaysMinRegex;
  42120. }
  42121. return this._weekdaysMinStrictRegex && isStrict ?
  42122. this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
  42123. }
  42124. }
  42125. function computeWeekdaysParse () {
  42126. function cmpLenRev(a, b) {
  42127. return b.length - a.length;
  42128. }
  42129. var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [],
  42130. i, mom, minp, shortp, longp;
  42131. for (i = 0; i < 7; i++) {
  42132. // make the regex if we don't have it already
  42133. mom = createUTC([2000, 1]).day(i);
  42134. minp = this.weekdaysMin(mom, '');
  42135. shortp = this.weekdaysShort(mom, '');
  42136. longp = this.weekdays(mom, '');
  42137. minPieces.push(minp);
  42138. shortPieces.push(shortp);
  42139. longPieces.push(longp);
  42140. mixedPieces.push(minp);
  42141. mixedPieces.push(shortp);
  42142. mixedPieces.push(longp);
  42143. }
  42144. // Sorting makes sure if one weekday (or abbr) is a prefix of another it
  42145. // will match the longer piece.
  42146. minPieces.sort(cmpLenRev);
  42147. shortPieces.sort(cmpLenRev);
  42148. longPieces.sort(cmpLenRev);
  42149. mixedPieces.sort(cmpLenRev);
  42150. for (i = 0; i < 7; i++) {
  42151. shortPieces[i] = regexEscape(shortPieces[i]);
  42152. longPieces[i] = regexEscape(longPieces[i]);
  42153. mixedPieces[i] = regexEscape(mixedPieces[i]);
  42154. }
  42155. this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
  42156. this._weekdaysShortRegex = this._weekdaysRegex;
  42157. this._weekdaysMinRegex = this._weekdaysRegex;
  42158. this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
  42159. this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
  42160. this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i');
  42161. }
  42162. // FORMATTING
  42163. function hFormat() {
  42164. return this.hours() % 12 || 12;
  42165. }
  42166. function kFormat() {
  42167. return this.hours() || 24;
  42168. }
  42169. addFormatToken('H', ['HH', 2], 0, 'hour');
  42170. addFormatToken('h', ['hh', 2], 0, hFormat);
  42171. addFormatToken('k', ['kk', 2], 0, kFormat);
  42172. addFormatToken('hmm', 0, 0, function () {
  42173. return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
  42174. });
  42175. addFormatToken('hmmss', 0, 0, function () {
  42176. return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +
  42177. zeroFill(this.seconds(), 2);
  42178. });
  42179. addFormatToken('Hmm', 0, 0, function () {
  42180. return '' + this.hours() + zeroFill(this.minutes(), 2);
  42181. });
  42182. addFormatToken('Hmmss', 0, 0, function () {
  42183. return '' + this.hours() + zeroFill(this.minutes(), 2) +
  42184. zeroFill(this.seconds(), 2);
  42185. });
  42186. function meridiem (token, lowercase) {
  42187. addFormatToken(token, 0, 0, function () {
  42188. return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);
  42189. });
  42190. }
  42191. meridiem('a', true);
  42192. meridiem('A', false);
  42193. // ALIASES
  42194. addUnitAlias('hour', 'h');
  42195. // PRIORITY
  42196. addUnitPriority('hour', 13);
  42197. // PARSING
  42198. function matchMeridiem (isStrict, locale) {
  42199. return locale._meridiemParse;
  42200. }
  42201. addRegexToken('a', matchMeridiem);
  42202. addRegexToken('A', matchMeridiem);
  42203. addRegexToken('H', match1to2);
  42204. addRegexToken('h', match1to2);
  42205. addRegexToken('k', match1to2);
  42206. addRegexToken('HH', match1to2, match2);
  42207. addRegexToken('hh', match1to2, match2);
  42208. addRegexToken('kk', match1to2, match2);
  42209. addRegexToken('hmm', match3to4);
  42210. addRegexToken('hmmss', match5to6);
  42211. addRegexToken('Hmm', match3to4);
  42212. addRegexToken('Hmmss', match5to6);
  42213. addParseToken(['H', 'HH'], HOUR);
  42214. addParseToken(['k', 'kk'], function (input, array, config) {
  42215. var kInput = toInt(input);
  42216. array[HOUR] = kInput === 24 ? 0 : kInput;
  42217. });
  42218. addParseToken(['a', 'A'], function (input, array, config) {
  42219. config._isPm = config._locale.isPM(input);
  42220. config._meridiem = input;
  42221. });
  42222. addParseToken(['h', 'hh'], function (input, array, config) {
  42223. array[HOUR] = toInt(input);
  42224. getParsingFlags(config).bigHour = true;
  42225. });
  42226. addParseToken('hmm', function (input, array, config) {
  42227. var pos = input.length - 2;
  42228. array[HOUR] = toInt(input.substr(0, pos));
  42229. array[MINUTE] = toInt(input.substr(pos));
  42230. getParsingFlags(config).bigHour = true;
  42231. });
  42232. addParseToken('hmmss', function (input, array, config) {
  42233. var pos1 = input.length - 4;
  42234. var pos2 = input.length - 2;
  42235. array[HOUR] = toInt(input.substr(0, pos1));
  42236. array[MINUTE] = toInt(input.substr(pos1, 2));
  42237. array[SECOND] = toInt(input.substr(pos2));
  42238. getParsingFlags(config).bigHour = true;
  42239. });
  42240. addParseToken('Hmm', function (input, array, config) {
  42241. var pos = input.length - 2;
  42242. array[HOUR] = toInt(input.substr(0, pos));
  42243. array[MINUTE] = toInt(input.substr(pos));
  42244. });
  42245. addParseToken('Hmmss', function (input, array, config) {
  42246. var pos1 = input.length - 4;
  42247. var pos2 = input.length - 2;
  42248. array[HOUR] = toInt(input.substr(0, pos1));
  42249. array[MINUTE] = toInt(input.substr(pos1, 2));
  42250. array[SECOND] = toInt(input.substr(pos2));
  42251. });
  42252. // LOCALES
  42253. function localeIsPM (input) {
  42254. // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
  42255. // Using charAt should be more compatible.
  42256. return ((input + '').toLowerCase().charAt(0) === 'p');
  42257. }
  42258. var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;
  42259. function localeMeridiem (hours, minutes, isLower) {
  42260. if (hours > 11) {
  42261. return isLower ? 'pm' : 'PM';
  42262. } else {
  42263. return isLower ? 'am' : 'AM';
  42264. }
  42265. }
  42266. // MOMENTS
  42267. // Setting the hour should keep the time, because the user explicitly
  42268. // specified which hour he wants. So trying to maintain the same hour (in
  42269. // a new timezone) makes sense. Adding/subtracting hours does not follow
  42270. // this rule.
  42271. var getSetHour = makeGetSet('Hours', true);
  42272. // months
  42273. // week
  42274. // weekdays
  42275. // meridiem
  42276. var baseConfig = {
  42277. calendar: defaultCalendar,
  42278. longDateFormat: defaultLongDateFormat,
  42279. invalidDate: defaultInvalidDate,
  42280. ordinal: defaultOrdinal,
  42281. dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
  42282. relativeTime: defaultRelativeTime,
  42283. months: defaultLocaleMonths,
  42284. monthsShort: defaultLocaleMonthsShort,
  42285. week: defaultLocaleWeek,
  42286. weekdays: defaultLocaleWeekdays,
  42287. weekdaysMin: defaultLocaleWeekdaysMin,
  42288. weekdaysShort: defaultLocaleWeekdaysShort,
  42289. meridiemParse: defaultLocaleMeridiemParse
  42290. };
  42291. // internal storage for locale config files
  42292. var locales = {};
  42293. var localeFamilies = {};
  42294. var globalLocale;
  42295. function normalizeLocale(key) {
  42296. return key ? key.toLowerCase().replace('_', '-') : key;
  42297. }
  42298. // pick the locale from the array
  42299. // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
  42300. // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
  42301. function chooseLocale(names) {
  42302. var i = 0, j, next, locale, split;
  42303. while (i < names.length) {
  42304. split = normalizeLocale(names[i]).split('-');
  42305. j = split.length;
  42306. next = normalizeLocale(names[i + 1]);
  42307. next = next ? next.split('-') : null;
  42308. while (j > 0) {
  42309. locale = loadLocale(split.slice(0, j).join('-'));
  42310. if (locale) {
  42311. return locale;
  42312. }
  42313. if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
  42314. //the next array item is better than a shallower substring of this one
  42315. break;
  42316. }
  42317. j--;
  42318. }
  42319. i++;
  42320. }
  42321. return null;
  42322. }
  42323. function loadLocale(name) {
  42324. var oldLocale = null;
  42325. // TODO: Find a better way to register and load all the locales in Node
  42326. if (!locales[name] && (typeof module !== 'undefined') &&
  42327. module && module.exports) {
  42328. try {
  42329. oldLocale = globalLocale._abbr;
  42330. var aliasedRequire = require;
  42331. __webpack_require__("./node_modules/moment/locale sync recursive ^\\.\\/.*$")("./" + name);
  42332. getSetGlobalLocale(oldLocale);
  42333. } catch (e) {}
  42334. }
  42335. return locales[name];
  42336. }
  42337. // This function will load locale and then set the global locale. If
  42338. // no arguments are passed in, it will simply return the current global
  42339. // locale key.
  42340. function getSetGlobalLocale (key, values) {
  42341. var data;
  42342. if (key) {
  42343. if (isUndefined(values)) {
  42344. data = getLocale(key);
  42345. }
  42346. else {
  42347. data = defineLocale(key, values);
  42348. }
  42349. if (data) {
  42350. // moment.duration._locale = moment._locale = data;
  42351. globalLocale = data;
  42352. }
  42353. }
  42354. return globalLocale._abbr;
  42355. }
  42356. function defineLocale (name, config) {
  42357. if (config !== null) {
  42358. var parentConfig = baseConfig;
  42359. config.abbr = name;
  42360. if (locales[name] != null) {
  42361. deprecateSimple('defineLocaleOverride',
  42362. 'use moment.updateLocale(localeName, config) to change ' +
  42363. 'an existing locale. moment.defineLocale(localeName, ' +
  42364. 'config) should only be used for creating a new locale ' +
  42365. 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.');
  42366. parentConfig = locales[name]._config;
  42367. } else if (config.parentLocale != null) {
  42368. if (locales[config.parentLocale] != null) {
  42369. parentConfig = locales[config.parentLocale]._config;
  42370. } else {
  42371. if (!localeFamilies[config.parentLocale]) {
  42372. localeFamilies[config.parentLocale] = [];
  42373. }
  42374. localeFamilies[config.parentLocale].push({
  42375. name: name,
  42376. config: config
  42377. });
  42378. return null;
  42379. }
  42380. }
  42381. locales[name] = new Locale(mergeConfigs(parentConfig, config));
  42382. if (localeFamilies[name]) {
  42383. localeFamilies[name].forEach(function (x) {
  42384. defineLocale(x.name, x.config);
  42385. });
  42386. }
  42387. // backwards compat for now: also set the locale
  42388. // make sure we set the locale AFTER all child locales have been
  42389. // created, so we won't end up with the child locale set.
  42390. getSetGlobalLocale(name);
  42391. return locales[name];
  42392. } else {
  42393. // useful for testing
  42394. delete locales[name];
  42395. return null;
  42396. }
  42397. }
  42398. function updateLocale(name, config) {
  42399. if (config != null) {
  42400. var locale, tmpLocale, parentConfig = baseConfig;
  42401. // MERGE
  42402. tmpLocale = loadLocale(name);
  42403. if (tmpLocale != null) {
  42404. parentConfig = tmpLocale._config;
  42405. }
  42406. config = mergeConfigs(parentConfig, config);
  42407. locale = new Locale(config);
  42408. locale.parentLocale = locales[name];
  42409. locales[name] = locale;
  42410. // backwards compat for now: also set the locale
  42411. getSetGlobalLocale(name);
  42412. } else {
  42413. // pass null for config to unupdate, useful for tests
  42414. if (locales[name] != null) {
  42415. if (locales[name].parentLocale != null) {
  42416. locales[name] = locales[name].parentLocale;
  42417. } else if (locales[name] != null) {
  42418. delete locales[name];
  42419. }
  42420. }
  42421. }
  42422. return locales[name];
  42423. }
  42424. // returns locale data
  42425. function getLocale (key) {
  42426. var locale;
  42427. if (key && key._locale && key._locale._abbr) {
  42428. key = key._locale._abbr;
  42429. }
  42430. if (!key) {
  42431. return globalLocale;
  42432. }
  42433. if (!isArray(key)) {
  42434. //short-circuit everything else
  42435. locale = loadLocale(key);
  42436. if (locale) {
  42437. return locale;
  42438. }
  42439. key = [key];
  42440. }
  42441. return chooseLocale(key);
  42442. }
  42443. function listLocales() {
  42444. return keys(locales);
  42445. }
  42446. function checkOverflow (m) {
  42447. var overflow;
  42448. var a = m._a;
  42449. if (a && getParsingFlags(m).overflow === -2) {
  42450. overflow =
  42451. a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
  42452. a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
  42453. a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
  42454. a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
  42455. a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
  42456. a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
  42457. -1;
  42458. if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
  42459. overflow = DATE;
  42460. }
  42461. if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
  42462. overflow = WEEK;
  42463. }
  42464. if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
  42465. overflow = WEEKDAY;
  42466. }
  42467. getParsingFlags(m).overflow = overflow;
  42468. }
  42469. return m;
  42470. }
  42471. // Pick the first defined of two or three arguments.
  42472. function defaults(a, b, c) {
  42473. if (a != null) {
  42474. return a;
  42475. }
  42476. if (b != null) {
  42477. return b;
  42478. }
  42479. return c;
  42480. }
  42481. function currentDateArray(config) {
  42482. // hooks is actually the exported moment object
  42483. var nowValue = new Date(hooks.now());
  42484. if (config._useUTC) {
  42485. return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];
  42486. }
  42487. return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
  42488. }
  42489. // convert an array to a date.
  42490. // the array should mirror the parameters below
  42491. // note: all values past the year are optional and will default to the lowest possible value.
  42492. // [year, month, day , hour, minute, second, millisecond]
  42493. function configFromArray (config) {
  42494. var i, date, input = [], currentDate, expectedWeekday, yearToUse;
  42495. if (config._d) {
  42496. return;
  42497. }
  42498. currentDate = currentDateArray(config);
  42499. //compute day of the year from weeks and weekdays
  42500. if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
  42501. dayOfYearFromWeekInfo(config);
  42502. }
  42503. //if the day of the year is set, figure out what it is
  42504. if (config._dayOfYear != null) {
  42505. yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
  42506. if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) {
  42507. getParsingFlags(config)._overflowDayOfYear = true;
  42508. }
  42509. date = createUTCDate(yearToUse, 0, config._dayOfYear);
  42510. config._a[MONTH] = date.getUTCMonth();
  42511. config._a[DATE] = date.getUTCDate();
  42512. }
  42513. // Default to current date.
  42514. // * if no year, month, day of month are given, default to today
  42515. // * if day of month is given, default month and year
  42516. // * if month is given, default only year
  42517. // * if year is given, don't default anything
  42518. for (i = 0; i < 3 && config._a[i] == null; ++i) {
  42519. config._a[i] = input[i] = currentDate[i];
  42520. }
  42521. // Zero out whatever was not defaulted, including time
  42522. for (; i < 7; i++) {
  42523. config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
  42524. }
  42525. // Check for 24:00:00.000
  42526. if (config._a[HOUR] === 24 &&
  42527. config._a[MINUTE] === 0 &&
  42528. config._a[SECOND] === 0 &&
  42529. config._a[MILLISECOND] === 0) {
  42530. config._nextDay = true;
  42531. config._a[HOUR] = 0;
  42532. }
  42533. config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
  42534. expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();
  42535. // Apply timezone offset from input. The actual utcOffset can be changed
  42536. // with parseZone.
  42537. if (config._tzm != null) {
  42538. config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
  42539. }
  42540. if (config._nextDay) {
  42541. config._a[HOUR] = 24;
  42542. }
  42543. // check for mismatching day of week
  42544. if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) {
  42545. getParsingFlags(config).weekdayMismatch = true;
  42546. }
  42547. }
  42548. function dayOfYearFromWeekInfo(config) {
  42549. var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;
  42550. w = config._w;
  42551. if (w.GG != null || w.W != null || w.E != null) {
  42552. dow = 1;
  42553. doy = 4;
  42554. // TODO: We need to take the current isoWeekYear, but that depends on
  42555. // how we interpret now (local, utc, fixed offset). So create
  42556. // a now version of current config (take local/utc/offset flags, and
  42557. // create now).
  42558. weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year);
  42559. week = defaults(w.W, 1);
  42560. weekday = defaults(w.E, 1);
  42561. if (weekday < 1 || weekday > 7) {
  42562. weekdayOverflow = true;
  42563. }
  42564. } else {
  42565. dow = config._locale._week.dow;
  42566. doy = config._locale._week.doy;
  42567. var curWeek = weekOfYear(createLocal(), dow, doy);
  42568. weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
  42569. // Default to current week.
  42570. week = defaults(w.w, curWeek.week);
  42571. if (w.d != null) {
  42572. // weekday -- low day numbers are considered next week
  42573. weekday = w.d;
  42574. if (weekday < 0 || weekday > 6) {
  42575. weekdayOverflow = true;
  42576. }
  42577. } else if (w.e != null) {
  42578. // local weekday -- counting starts from begining of week
  42579. weekday = w.e + dow;
  42580. if (w.e < 0 || w.e > 6) {
  42581. weekdayOverflow = true;
  42582. }
  42583. } else {
  42584. // default to begining of week
  42585. weekday = dow;
  42586. }
  42587. }
  42588. if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
  42589. getParsingFlags(config)._overflowWeeks = true;
  42590. } else if (weekdayOverflow != null) {
  42591. getParsingFlags(config)._overflowWeekday = true;
  42592. } else {
  42593. temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
  42594. config._a[YEAR] = temp.year;
  42595. config._dayOfYear = temp.dayOfYear;
  42596. }
  42597. }
  42598. // iso 8601 regex
  42599. // 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)
  42600. var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/;
  42601. var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/;
  42602. var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/;
  42603. var isoDates = [
  42604. ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
  42605. ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
  42606. ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
  42607. ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
  42608. ['YYYY-DDD', /\d{4}-\d{3}/],
  42609. ['YYYY-MM', /\d{4}-\d\d/, false],
  42610. ['YYYYYYMMDD', /[+-]\d{10}/],
  42611. ['YYYYMMDD', /\d{8}/],
  42612. // YYYYMM is NOT allowed by the standard
  42613. ['GGGG[W]WWE', /\d{4}W\d{3}/],
  42614. ['GGGG[W]WW', /\d{4}W\d{2}/, false],
  42615. ['YYYYDDD', /\d{7}/]
  42616. ];
  42617. // iso time formats and regexes
  42618. var isoTimes = [
  42619. ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
  42620. ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
  42621. ['HH:mm:ss', /\d\d:\d\d:\d\d/],
  42622. ['HH:mm', /\d\d:\d\d/],
  42623. ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
  42624. ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
  42625. ['HHmmss', /\d\d\d\d\d\d/],
  42626. ['HHmm', /\d\d\d\d/],
  42627. ['HH', /\d\d/]
  42628. ];
  42629. var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i;
  42630. // date from iso format
  42631. function configFromISO(config) {
  42632. var i, l,
  42633. string = config._i,
  42634. match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
  42635. allowTime, dateFormat, timeFormat, tzFormat;
  42636. if (match) {
  42637. getParsingFlags(config).iso = true;
  42638. for (i = 0, l = isoDates.length; i < l; i++) {
  42639. if (isoDates[i][1].exec(match[1])) {
  42640. dateFormat = isoDates[i][0];
  42641. allowTime = isoDates[i][2] !== false;
  42642. break;
  42643. }
  42644. }
  42645. if (dateFormat == null) {
  42646. config._isValid = false;
  42647. return;
  42648. }
  42649. if (match[3]) {
  42650. for (i = 0, l = isoTimes.length; i < l; i++) {
  42651. if (isoTimes[i][1].exec(match[3])) {
  42652. // match[2] should be 'T' or space
  42653. timeFormat = (match[2] || ' ') + isoTimes[i][0];
  42654. break;
  42655. }
  42656. }
  42657. if (timeFormat == null) {
  42658. config._isValid = false;
  42659. return;
  42660. }
  42661. }
  42662. if (!allowTime && timeFormat != null) {
  42663. config._isValid = false;
  42664. return;
  42665. }
  42666. if (match[4]) {
  42667. if (tzRegex.exec(match[4])) {
  42668. tzFormat = 'Z';
  42669. } else {
  42670. config._isValid = false;
  42671. return;
  42672. }
  42673. }
  42674. config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
  42675. configFromStringAndFormat(config);
  42676. } else {
  42677. config._isValid = false;
  42678. }
  42679. }
  42680. // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
  42681. var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;
  42682. function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
  42683. var result = [
  42684. untruncateYear(yearStr),
  42685. defaultLocaleMonthsShort.indexOf(monthStr),
  42686. parseInt(dayStr, 10),
  42687. parseInt(hourStr, 10),
  42688. parseInt(minuteStr, 10)
  42689. ];
  42690. if (secondStr) {
  42691. result.push(parseInt(secondStr, 10));
  42692. }
  42693. return result;
  42694. }
  42695. function untruncateYear(yearStr) {
  42696. var year = parseInt(yearStr, 10);
  42697. if (year <= 49) {
  42698. return 2000 + year;
  42699. } else if (year <= 999) {
  42700. return 1900 + year;
  42701. }
  42702. return year;
  42703. }
  42704. function preprocessRFC2822(s) {
  42705. // Remove comments and folding whitespace and replace multiple-spaces with a single space
  42706. return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').trim();
  42707. }
  42708. function checkWeekday(weekdayStr, parsedInput, config) {
  42709. if (weekdayStr) {
  42710. // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check.
  42711. var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
  42712. weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay();
  42713. if (weekdayProvided !== weekdayActual) {
  42714. getParsingFlags(config).weekdayMismatch = true;
  42715. config._isValid = false;
  42716. return false;
  42717. }
  42718. }
  42719. return true;
  42720. }
  42721. var obsOffsets = {
  42722. UT: 0,
  42723. GMT: 0,
  42724. EDT: -4 * 60,
  42725. EST: -5 * 60,
  42726. CDT: -5 * 60,
  42727. CST: -6 * 60,
  42728. MDT: -6 * 60,
  42729. MST: -7 * 60,
  42730. PDT: -7 * 60,
  42731. PST: -8 * 60
  42732. };
  42733. function calculateOffset(obsOffset, militaryOffset, numOffset) {
  42734. if (obsOffset) {
  42735. return obsOffsets[obsOffset];
  42736. } else if (militaryOffset) {
  42737. // the only allowed military tz is Z
  42738. return 0;
  42739. } else {
  42740. var hm = parseInt(numOffset, 10);
  42741. var m = hm % 100, h = (hm - m) / 100;
  42742. return h * 60 + m;
  42743. }
  42744. }
  42745. // date and time from ref 2822 format
  42746. function configFromRFC2822(config) {
  42747. var match = rfc2822.exec(preprocessRFC2822(config._i));
  42748. if (match) {
  42749. var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]);
  42750. if (!checkWeekday(match[1], parsedArray, config)) {
  42751. return;
  42752. }
  42753. config._a = parsedArray;
  42754. config._tzm = calculateOffset(match[8], match[9], match[10]);
  42755. config._d = createUTCDate.apply(null, config._a);
  42756. config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
  42757. getParsingFlags(config).rfc2822 = true;
  42758. } else {
  42759. config._isValid = false;
  42760. }
  42761. }
  42762. // date from iso format or fallback
  42763. function configFromString(config) {
  42764. var matched = aspNetJsonRegex.exec(config._i);
  42765. if (matched !== null) {
  42766. config._d = new Date(+matched[1]);
  42767. return;
  42768. }
  42769. configFromISO(config);
  42770. if (config._isValid === false) {
  42771. delete config._isValid;
  42772. } else {
  42773. return;
  42774. }
  42775. configFromRFC2822(config);
  42776. if (config._isValid === false) {
  42777. delete config._isValid;
  42778. } else {
  42779. return;
  42780. }
  42781. // Final attempt, use Input Fallback
  42782. hooks.createFromInputFallback(config);
  42783. }
  42784. hooks.createFromInputFallback = deprecate(
  42785. 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
  42786. 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
  42787. 'discouraged and will be removed in an upcoming major release. Please refer to ' +
  42788. 'http://momentjs.com/guides/#/warnings/js-date/ for more info.',
  42789. function (config) {
  42790. config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
  42791. }
  42792. );
  42793. // constant that refers to the ISO standard
  42794. hooks.ISO_8601 = function () {};
  42795. // constant that refers to the RFC 2822 form
  42796. hooks.RFC_2822 = function () {};
  42797. // date from string and format string
  42798. function configFromStringAndFormat(config) {
  42799. // TODO: Move this to another part of the creation flow to prevent circular deps
  42800. if (config._f === hooks.ISO_8601) {
  42801. configFromISO(config);
  42802. return;
  42803. }
  42804. if (config._f === hooks.RFC_2822) {
  42805. configFromRFC2822(config);
  42806. return;
  42807. }
  42808. config._a = [];
  42809. getParsingFlags(config).empty = true;
  42810. // This array is used to make a Date, either with `new Date` or `Date.UTC`
  42811. var string = '' + config._i,
  42812. i, parsedInput, tokens, token, skipped,
  42813. stringLength = string.length,
  42814. totalParsedInputLength = 0;
  42815. tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
  42816. for (i = 0; i < tokens.length; i++) {
  42817. token = tokens[i];
  42818. parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
  42819. // console.log('token', token, 'parsedInput', parsedInput,
  42820. // 'regex', getParseRegexForToken(token, config));
  42821. if (parsedInput) {
  42822. skipped = string.substr(0, string.indexOf(parsedInput));
  42823. if (skipped.length > 0) {
  42824. getParsingFlags(config).unusedInput.push(skipped);
  42825. }
  42826. string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
  42827. totalParsedInputLength += parsedInput.length;
  42828. }
  42829. // don't parse if it's not a known token
  42830. if (formatTokenFunctions[token]) {
  42831. if (parsedInput) {
  42832. getParsingFlags(config).empty = false;
  42833. }
  42834. else {
  42835. getParsingFlags(config).unusedTokens.push(token);
  42836. }
  42837. addTimeToArrayFromToken(token, parsedInput, config);
  42838. }
  42839. else if (config._strict && !parsedInput) {
  42840. getParsingFlags(config).unusedTokens.push(token);
  42841. }
  42842. }
  42843. // add remaining unparsed input length to the string
  42844. getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;
  42845. if (string.length > 0) {
  42846. getParsingFlags(config).unusedInput.push(string);
  42847. }
  42848. // clear _12h flag if hour is <= 12
  42849. if (config._a[HOUR] <= 12 &&
  42850. getParsingFlags(config).bigHour === true &&
  42851. config._a[HOUR] > 0) {
  42852. getParsingFlags(config).bigHour = undefined;
  42853. }
  42854. getParsingFlags(config).parsedDateParts = config._a.slice(0);
  42855. getParsingFlags(config).meridiem = config._meridiem;
  42856. // handle meridiem
  42857. config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
  42858. configFromArray(config);
  42859. checkOverflow(config);
  42860. }
  42861. function meridiemFixWrap (locale, hour, meridiem) {
  42862. var isPm;
  42863. if (meridiem == null) {
  42864. // nothing to do
  42865. return hour;
  42866. }
  42867. if (locale.meridiemHour != null) {
  42868. return locale.meridiemHour(hour, meridiem);
  42869. } else if (locale.isPM != null) {
  42870. // Fallback
  42871. isPm = locale.isPM(meridiem);
  42872. if (isPm && hour < 12) {
  42873. hour += 12;
  42874. }
  42875. if (!isPm && hour === 12) {
  42876. hour = 0;
  42877. }
  42878. return hour;
  42879. } else {
  42880. // this is not supposed to happen
  42881. return hour;
  42882. }
  42883. }
  42884. // date from string and array of format strings
  42885. function configFromStringAndArray(config) {
  42886. var tempConfig,
  42887. bestMoment,
  42888. scoreToBeat,
  42889. i,
  42890. currentScore;
  42891. if (config._f.length === 0) {
  42892. getParsingFlags(config).invalidFormat = true;
  42893. config._d = new Date(NaN);
  42894. return;
  42895. }
  42896. for (i = 0; i < config._f.length; i++) {
  42897. currentScore = 0;
  42898. tempConfig = copyConfig({}, config);
  42899. if (config._useUTC != null) {
  42900. tempConfig._useUTC = config._useUTC;
  42901. }
  42902. tempConfig._f = config._f[i];
  42903. configFromStringAndFormat(tempConfig);
  42904. if (!isValid(tempConfig)) {
  42905. continue;
  42906. }
  42907. // if there is any input that was not parsed add a penalty for that format
  42908. currentScore += getParsingFlags(tempConfig).charsLeftOver;
  42909. //or tokens
  42910. currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
  42911. getParsingFlags(tempConfig).score = currentScore;
  42912. if (scoreToBeat == null || currentScore < scoreToBeat) {
  42913. scoreToBeat = currentScore;
  42914. bestMoment = tempConfig;
  42915. }
  42916. }
  42917. extend(config, bestMoment || tempConfig);
  42918. }
  42919. function configFromObject(config) {
  42920. if (config._d) {
  42921. return;
  42922. }
  42923. var i = normalizeObjectUnits(config._i);
  42924. config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {
  42925. return obj && parseInt(obj, 10);
  42926. });
  42927. configFromArray(config);
  42928. }
  42929. function createFromConfig (config) {
  42930. var res = new Moment(checkOverflow(prepareConfig(config)));
  42931. if (res._nextDay) {
  42932. // Adding is smart enough around DST
  42933. res.add(1, 'd');
  42934. res._nextDay = undefined;
  42935. }
  42936. return res;
  42937. }
  42938. function prepareConfig (config) {
  42939. var input = config._i,
  42940. format = config._f;
  42941. config._locale = config._locale || getLocale(config._l);
  42942. if (input === null || (format === undefined && input === '')) {
  42943. return createInvalid({nullInput: true});
  42944. }
  42945. if (typeof input === 'string') {
  42946. config._i = input = config._locale.preparse(input);
  42947. }
  42948. if (isMoment(input)) {
  42949. return new Moment(checkOverflow(input));
  42950. } else if (isDate(input)) {
  42951. config._d = input;
  42952. } else if (isArray(format)) {
  42953. configFromStringAndArray(config);
  42954. } else if (format) {
  42955. configFromStringAndFormat(config);
  42956. } else {
  42957. configFromInput(config);
  42958. }
  42959. if (!isValid(config)) {
  42960. config._d = null;
  42961. }
  42962. return config;
  42963. }
  42964. function configFromInput(config) {
  42965. var input = config._i;
  42966. if (isUndefined(input)) {
  42967. config._d = new Date(hooks.now());
  42968. } else if (isDate(input)) {
  42969. config._d = new Date(input.valueOf());
  42970. } else if (typeof input === 'string') {
  42971. configFromString(config);
  42972. } else if (isArray(input)) {
  42973. config._a = map(input.slice(0), function (obj) {
  42974. return parseInt(obj, 10);
  42975. });
  42976. configFromArray(config);
  42977. } else if (isObject(input)) {
  42978. configFromObject(config);
  42979. } else if (isNumber(input)) {
  42980. // from milliseconds
  42981. config._d = new Date(input);
  42982. } else {
  42983. hooks.createFromInputFallback(config);
  42984. }
  42985. }
  42986. function createLocalOrUTC (input, format, locale, strict, isUTC) {
  42987. var c = {};
  42988. if (locale === true || locale === false) {
  42989. strict = locale;
  42990. locale = undefined;
  42991. }
  42992. if ((isObject(input) && isObjectEmpty(input)) ||
  42993. (isArray(input) && input.length === 0)) {
  42994. input = undefined;
  42995. }
  42996. // object construction must be done this way.
  42997. // https://github.com/moment/moment/issues/1423
  42998. c._isAMomentObject = true;
  42999. c._useUTC = c._isUTC = isUTC;
  43000. c._l = locale;
  43001. c._i = input;
  43002. c._f = format;
  43003. c._strict = strict;
  43004. return createFromConfig(c);
  43005. }
  43006. function createLocal (input, format, locale, strict) {
  43007. return createLocalOrUTC(input, format, locale, strict, false);
  43008. }
  43009. var prototypeMin = deprecate(
  43010. 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
  43011. function () {
  43012. var other = createLocal.apply(null, arguments);
  43013. if (this.isValid() && other.isValid()) {
  43014. return other < this ? this : other;
  43015. } else {
  43016. return createInvalid();
  43017. }
  43018. }
  43019. );
  43020. var prototypeMax = deprecate(
  43021. 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
  43022. function () {
  43023. var other = createLocal.apply(null, arguments);
  43024. if (this.isValid() && other.isValid()) {
  43025. return other > this ? this : other;
  43026. } else {
  43027. return createInvalid();
  43028. }
  43029. }
  43030. );
  43031. // Pick a moment m from moments so that m[fn](other) is true for all
  43032. // other. This relies on the function fn to be transitive.
  43033. //
  43034. // moments should either be an array of moment objects or an array, whose
  43035. // first element is an array of moment objects.
  43036. function pickBy(fn, moments) {
  43037. var res, i;
  43038. if (moments.length === 1 && isArray(moments[0])) {
  43039. moments = moments[0];
  43040. }
  43041. if (!moments.length) {
  43042. return createLocal();
  43043. }
  43044. res = moments[0];
  43045. for (i = 1; i < moments.length; ++i) {
  43046. if (!moments[i].isValid() || moments[i][fn](res)) {
  43047. res = moments[i];
  43048. }
  43049. }
  43050. return res;
  43051. }
  43052. // TODO: Use [].sort instead?
  43053. function min () {
  43054. var args = [].slice.call(arguments, 0);
  43055. return pickBy('isBefore', args);
  43056. }
  43057. function max () {
  43058. var args = [].slice.call(arguments, 0);
  43059. return pickBy('isAfter', args);
  43060. }
  43061. var now = function () {
  43062. return Date.now ? Date.now() : +(new Date());
  43063. };
  43064. var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond'];
  43065. function isDurationValid(m) {
  43066. for (var key in m) {
  43067. if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
  43068. return false;
  43069. }
  43070. }
  43071. var unitHasDecimal = false;
  43072. for (var i = 0; i < ordering.length; ++i) {
  43073. if (m[ordering[i]]) {
  43074. if (unitHasDecimal) {
  43075. return false; // only allow non-integers for smallest unit
  43076. }
  43077. if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
  43078. unitHasDecimal = true;
  43079. }
  43080. }
  43081. }
  43082. return true;
  43083. }
  43084. function isValid$1() {
  43085. return this._isValid;
  43086. }
  43087. function createInvalid$1() {
  43088. return createDuration(NaN);
  43089. }
  43090. function Duration (duration) {
  43091. var normalizedInput = normalizeObjectUnits(duration),
  43092. years = normalizedInput.year || 0,
  43093. quarters = normalizedInput.quarter || 0,
  43094. months = normalizedInput.month || 0,
  43095. weeks = normalizedInput.week || 0,
  43096. days = normalizedInput.day || 0,
  43097. hours = normalizedInput.hour || 0,
  43098. minutes = normalizedInput.minute || 0,
  43099. seconds = normalizedInput.second || 0,
  43100. milliseconds = normalizedInput.millisecond || 0;
  43101. this._isValid = isDurationValid(normalizedInput);
  43102. // representation for dateAddRemove
  43103. this._milliseconds = +milliseconds +
  43104. seconds * 1e3 + // 1000
  43105. minutes * 6e4 + // 1000 * 60
  43106. hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
  43107. // Because of dateAddRemove treats 24 hours as different from a
  43108. // day when working around DST, we need to store them separately
  43109. this._days = +days +
  43110. weeks * 7;
  43111. // It is impossible to translate months into days without knowing
  43112. // which months you are are talking about, so we have to store
  43113. // it separately.
  43114. this._months = +months +
  43115. quarters * 3 +
  43116. years * 12;
  43117. this._data = {};
  43118. this._locale = getLocale();
  43119. this._bubble();
  43120. }
  43121. function isDuration (obj) {
  43122. return obj instanceof Duration;
  43123. }
  43124. function absRound (number) {
  43125. if (number < 0) {
  43126. return Math.round(-1 * number) * -1;
  43127. } else {
  43128. return Math.round(number);
  43129. }
  43130. }
  43131. // FORMATTING
  43132. function offset (token, separator) {
  43133. addFormatToken(token, 0, 0, function () {
  43134. var offset = this.utcOffset();
  43135. var sign = '+';
  43136. if (offset < 0) {
  43137. offset = -offset;
  43138. sign = '-';
  43139. }
  43140. return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);
  43141. });
  43142. }
  43143. offset('Z', ':');
  43144. offset('ZZ', '');
  43145. // PARSING
  43146. addRegexToken('Z', matchShortOffset);
  43147. addRegexToken('ZZ', matchShortOffset);
  43148. addParseToken(['Z', 'ZZ'], function (input, array, config) {
  43149. config._useUTC = true;
  43150. config._tzm = offsetFromString(matchShortOffset, input);
  43151. });
  43152. // HELPERS
  43153. // timezone chunker
  43154. // '+10:00' > ['10', '00']
  43155. // '-1530' > ['-15', '30']
  43156. var chunkOffset = /([\+\-]|\d\d)/gi;
  43157. function offsetFromString(matcher, string) {
  43158. var matches = (string || '').match(matcher);
  43159. if (matches === null) {
  43160. return null;
  43161. }
  43162. var chunk = matches[matches.length - 1] || [];
  43163. var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
  43164. var minutes = +(parts[1] * 60) + toInt(parts[2]);
  43165. return minutes === 0 ?
  43166. 0 :
  43167. parts[0] === '+' ? minutes : -minutes;
  43168. }
  43169. // Return a moment from input, that is local/utc/zone equivalent to model.
  43170. function cloneWithOffset(input, model) {
  43171. var res, diff;
  43172. if (model._isUTC) {
  43173. res = model.clone();
  43174. diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();
  43175. // Use low-level api, because this fn is low-level api.
  43176. res._d.setTime(res._d.valueOf() + diff);
  43177. hooks.updateOffset(res, false);
  43178. return res;
  43179. } else {
  43180. return createLocal(input).local();
  43181. }
  43182. }
  43183. function getDateOffset (m) {
  43184. // On Firefox.24 Date#getTimezoneOffset returns a floating point.
  43185. // https://github.com/moment/moment/pull/1871
  43186. return -Math.round(m._d.getTimezoneOffset() / 15) * 15;
  43187. }
  43188. // HOOKS
  43189. // This function will be called whenever a moment is mutated.
  43190. // It is intended to keep the offset in sync with the timezone.
  43191. hooks.updateOffset = function () {};
  43192. // MOMENTS
  43193. // keepLocalTime = true means only change the timezone, without
  43194. // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
  43195. // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
  43196. // +0200, so we adjust the time as needed, to be valid.
  43197. //
  43198. // Keeping the time actually adds/subtracts (one hour)
  43199. // from the actual represented time. That is why we call updateOffset
  43200. // a second time. In case it wants us to change the offset again
  43201. // _changeInProgress == true case, then we have to adjust, because
  43202. // there is no such time in the given timezone.
  43203. function getSetOffset (input, keepLocalTime, keepMinutes) {
  43204. var offset = this._offset || 0,
  43205. localAdjust;
  43206. if (!this.isValid()) {
  43207. return input != null ? this : NaN;
  43208. }
  43209. if (input != null) {
  43210. if (typeof input === 'string') {
  43211. input = offsetFromString(matchShortOffset, input);
  43212. if (input === null) {
  43213. return this;
  43214. }
  43215. } else if (Math.abs(input) < 16 && !keepMinutes) {
  43216. input = input * 60;
  43217. }
  43218. if (!this._isUTC && keepLocalTime) {
  43219. localAdjust = getDateOffset(this);
  43220. }
  43221. this._offset = input;
  43222. this._isUTC = true;
  43223. if (localAdjust != null) {
  43224. this.add(localAdjust, 'm');
  43225. }
  43226. if (offset !== input) {
  43227. if (!keepLocalTime || this._changeInProgress) {
  43228. addSubtract(this, createDuration(input - offset, 'm'), 1, false);
  43229. } else if (!this._changeInProgress) {
  43230. this._changeInProgress = true;
  43231. hooks.updateOffset(this, true);
  43232. this._changeInProgress = null;
  43233. }
  43234. }
  43235. return this;
  43236. } else {
  43237. return this._isUTC ? offset : getDateOffset(this);
  43238. }
  43239. }
  43240. function getSetZone (input, keepLocalTime) {
  43241. if (input != null) {
  43242. if (typeof input !== 'string') {
  43243. input = -input;
  43244. }
  43245. this.utcOffset(input, keepLocalTime);
  43246. return this;
  43247. } else {
  43248. return -this.utcOffset();
  43249. }
  43250. }
  43251. function setOffsetToUTC (keepLocalTime) {
  43252. return this.utcOffset(0, keepLocalTime);
  43253. }
  43254. function setOffsetToLocal (keepLocalTime) {
  43255. if (this._isUTC) {
  43256. this.utcOffset(0, keepLocalTime);
  43257. this._isUTC = false;
  43258. if (keepLocalTime) {
  43259. this.subtract(getDateOffset(this), 'm');
  43260. }
  43261. }
  43262. return this;
  43263. }
  43264. function setOffsetToParsedOffset () {
  43265. if (this._tzm != null) {
  43266. this.utcOffset(this._tzm, false, true);
  43267. } else if (typeof this._i === 'string') {
  43268. var tZone = offsetFromString(matchOffset, this._i);
  43269. if (tZone != null) {
  43270. this.utcOffset(tZone);
  43271. }
  43272. else {
  43273. this.utcOffset(0, true);
  43274. }
  43275. }
  43276. return this;
  43277. }
  43278. function hasAlignedHourOffset (input) {
  43279. if (!this.isValid()) {
  43280. return false;
  43281. }
  43282. input = input ? createLocal(input).utcOffset() : 0;
  43283. return (this.utcOffset() - input) % 60 === 0;
  43284. }
  43285. function isDaylightSavingTime () {
  43286. return (
  43287. this.utcOffset() > this.clone().month(0).utcOffset() ||
  43288. this.utcOffset() > this.clone().month(5).utcOffset()
  43289. );
  43290. }
  43291. function isDaylightSavingTimeShifted () {
  43292. if (!isUndefined(this._isDSTShifted)) {
  43293. return this._isDSTShifted;
  43294. }
  43295. var c = {};
  43296. copyConfig(c, this);
  43297. c = prepareConfig(c);
  43298. if (c._a) {
  43299. var other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
  43300. this._isDSTShifted = this.isValid() &&
  43301. compareArrays(c._a, other.toArray()) > 0;
  43302. } else {
  43303. this._isDSTShifted = false;
  43304. }
  43305. return this._isDSTShifted;
  43306. }
  43307. function isLocal () {
  43308. return this.isValid() ? !this._isUTC : false;
  43309. }
  43310. function isUtcOffset () {
  43311. return this.isValid() ? this._isUTC : false;
  43312. }
  43313. function isUtc () {
  43314. return this.isValid() ? this._isUTC && this._offset === 0 : false;
  43315. }
  43316. // ASP.NET json date format regex
  43317. var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/;
  43318. // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
  43319. // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
  43320. // and further modified to allow for strings containing both week and day
  43321. var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
  43322. function createDuration (input, key) {
  43323. var duration = input,
  43324. // matching against regexp is expensive, do it on demand
  43325. match = null,
  43326. sign,
  43327. ret,
  43328. diffRes;
  43329. if (isDuration(input)) {
  43330. duration = {
  43331. ms : input._milliseconds,
  43332. d : input._days,
  43333. M : input._months
  43334. };
  43335. } else if (isNumber(input)) {
  43336. duration = {};
  43337. if (key) {
  43338. duration[key] = input;
  43339. } else {
  43340. duration.milliseconds = input;
  43341. }
  43342. } else if (!!(match = aspNetRegex.exec(input))) {
  43343. sign = (match[1] === '-') ? -1 : 1;
  43344. duration = {
  43345. y : 0,
  43346. d : toInt(match[DATE]) * sign,
  43347. h : toInt(match[HOUR]) * sign,
  43348. m : toInt(match[MINUTE]) * sign,
  43349. s : toInt(match[SECOND]) * sign,
  43350. ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match
  43351. };
  43352. } else if (!!(match = isoRegex.exec(input))) {
  43353. sign = (match[1] === '-') ? -1 : (match[1] === '+') ? 1 : 1;
  43354. duration = {
  43355. y : parseIso(match[2], sign),
  43356. M : parseIso(match[3], sign),
  43357. w : parseIso(match[4], sign),
  43358. d : parseIso(match[5], sign),
  43359. h : parseIso(match[6], sign),
  43360. m : parseIso(match[7], sign),
  43361. s : parseIso(match[8], sign)
  43362. };
  43363. } else if (duration == null) {// checks for null or undefined
  43364. duration = {};
  43365. } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {
  43366. diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to));
  43367. duration = {};
  43368. duration.ms = diffRes.milliseconds;
  43369. duration.M = diffRes.months;
  43370. }
  43371. ret = new Duration(duration);
  43372. if (isDuration(input) && hasOwnProp(input, '_locale')) {
  43373. ret._locale = input._locale;
  43374. }
  43375. return ret;
  43376. }
  43377. createDuration.fn = Duration.prototype;
  43378. createDuration.invalid = createInvalid$1;
  43379. function parseIso (inp, sign) {
  43380. // We'd normally use ~~inp for this, but unfortunately it also
  43381. // converts floats to ints.
  43382. // inp may be undefined, so careful calling replace on it.
  43383. var res = inp && parseFloat(inp.replace(',', '.'));
  43384. // apply sign while we're at it
  43385. return (isNaN(res) ? 0 : res) * sign;
  43386. }
  43387. function positiveMomentsDifference(base, other) {
  43388. var res = {milliseconds: 0, months: 0};
  43389. res.months = other.month() - base.month() +
  43390. (other.year() - base.year()) * 12;
  43391. if (base.clone().add(res.months, 'M').isAfter(other)) {
  43392. --res.months;
  43393. }
  43394. res.milliseconds = +other - +(base.clone().add(res.months, 'M'));
  43395. return res;
  43396. }
  43397. function momentsDifference(base, other) {
  43398. var res;
  43399. if (!(base.isValid() && other.isValid())) {
  43400. return {milliseconds: 0, months: 0};
  43401. }
  43402. other = cloneWithOffset(other, base);
  43403. if (base.isBefore(other)) {
  43404. res = positiveMomentsDifference(base, other);
  43405. } else {
  43406. res = positiveMomentsDifference(other, base);
  43407. res.milliseconds = -res.milliseconds;
  43408. res.months = -res.months;
  43409. }
  43410. return res;
  43411. }
  43412. // TODO: remove 'name' arg after deprecation is removed
  43413. function createAdder(direction, name) {
  43414. return function (val, period) {
  43415. var dur, tmp;
  43416. //invert the arguments, but complain about it
  43417. if (period !== null && !isNaN(+period)) {
  43418. deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' +
  43419. 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.');
  43420. tmp = val; val = period; period = tmp;
  43421. }
  43422. val = typeof val === 'string' ? +val : val;
  43423. dur = createDuration(val, period);
  43424. addSubtract(this, dur, direction);
  43425. return this;
  43426. };
  43427. }
  43428. function addSubtract (mom, duration, isAdding, updateOffset) {
  43429. var milliseconds = duration._milliseconds,
  43430. days = absRound(duration._days),
  43431. months = absRound(duration._months);
  43432. if (!mom.isValid()) {
  43433. // No op
  43434. return;
  43435. }
  43436. updateOffset = updateOffset == null ? true : updateOffset;
  43437. if (months) {
  43438. setMonth(mom, get(mom, 'Month') + months * isAdding);
  43439. }
  43440. if (days) {
  43441. set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
  43442. }
  43443. if (milliseconds) {
  43444. mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
  43445. }
  43446. if (updateOffset) {
  43447. hooks.updateOffset(mom, days || months);
  43448. }
  43449. }
  43450. var add = createAdder(1, 'add');
  43451. var subtract = createAdder(-1, 'subtract');
  43452. function getCalendarFormat(myMoment, now) {
  43453. var diff = myMoment.diff(now, 'days', true);
  43454. return diff < -6 ? 'sameElse' :
  43455. diff < -1 ? 'lastWeek' :
  43456. diff < 0 ? 'lastDay' :
  43457. diff < 1 ? 'sameDay' :
  43458. diff < 2 ? 'nextDay' :
  43459. diff < 7 ? 'nextWeek' : 'sameElse';
  43460. }
  43461. function calendar$1 (time, formats) {
  43462. // We want to compare the start of today, vs this.
  43463. // Getting start-of-today depends on whether we're local/utc/offset or not.
  43464. var now = time || createLocal(),
  43465. sod = cloneWithOffset(now, this).startOf('day'),
  43466. format = hooks.calendarFormat(this, sod) || 'sameElse';
  43467. var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]);
  43468. return this.format(output || this.localeData().calendar(format, this, createLocal(now)));
  43469. }
  43470. function clone () {
  43471. return new Moment(this);
  43472. }
  43473. function isAfter (input, units) {
  43474. var localInput = isMoment(input) ? input : createLocal(input);
  43475. if (!(this.isValid() && localInput.isValid())) {
  43476. return false;
  43477. }
  43478. units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
  43479. if (units === 'millisecond') {
  43480. return this.valueOf() > localInput.valueOf();
  43481. } else {
  43482. return localInput.valueOf() < this.clone().startOf(units).valueOf();
  43483. }
  43484. }
  43485. function isBefore (input, units) {
  43486. var localInput = isMoment(input) ? input : createLocal(input);
  43487. if (!(this.isValid() && localInput.isValid())) {
  43488. return false;
  43489. }
  43490. units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
  43491. if (units === 'millisecond') {
  43492. return this.valueOf() < localInput.valueOf();
  43493. } else {
  43494. return this.clone().endOf(units).valueOf() < localInput.valueOf();
  43495. }
  43496. }
  43497. function isBetween (from, to, units, inclusivity) {
  43498. inclusivity = inclusivity || '()';
  43499. return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) &&
  43500. (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units));
  43501. }
  43502. function isSame (input, units) {
  43503. var localInput = isMoment(input) ? input : createLocal(input),
  43504. inputMs;
  43505. if (!(this.isValid() && localInput.isValid())) {
  43506. return false;
  43507. }
  43508. units = normalizeUnits(units || 'millisecond');
  43509. if (units === 'millisecond') {
  43510. return this.valueOf() === localInput.valueOf();
  43511. } else {
  43512. inputMs = localInput.valueOf();
  43513. return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();
  43514. }
  43515. }
  43516. function isSameOrAfter (input, units) {
  43517. return this.isSame(input, units) || this.isAfter(input,units);
  43518. }
  43519. function isSameOrBefore (input, units) {
  43520. return this.isSame(input, units) || this.isBefore(input,units);
  43521. }
  43522. function diff (input, units, asFloat) {
  43523. var that,
  43524. zoneDelta,
  43525. delta, output;
  43526. if (!this.isValid()) {
  43527. return NaN;
  43528. }
  43529. that = cloneWithOffset(input, this);
  43530. if (!that.isValid()) {
  43531. return NaN;
  43532. }
  43533. zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
  43534. units = normalizeUnits(units);
  43535. switch (units) {
  43536. case 'year': output = monthDiff(this, that) / 12; break;
  43537. case 'month': output = monthDiff(this, that); break;
  43538. case 'quarter': output = monthDiff(this, that) / 3; break;
  43539. case 'second': output = (this - that) / 1e3; break; // 1000
  43540. case 'minute': output = (this - that) / 6e4; break; // 1000 * 60
  43541. case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60
  43542. case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst
  43543. case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst
  43544. default: output = this - that;
  43545. }
  43546. return asFloat ? output : absFloor(output);
  43547. }
  43548. function monthDiff (a, b) {
  43549. // difference in months
  43550. var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),
  43551. // b is in (anchor - 1 month, anchor + 1 month)
  43552. anchor = a.clone().add(wholeMonthDiff, 'months'),
  43553. anchor2, adjust;
  43554. if (b - anchor < 0) {
  43555. anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
  43556. // linear across the month
  43557. adjust = (b - anchor) / (anchor - anchor2);
  43558. } else {
  43559. anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
  43560. // linear across the month
  43561. adjust = (b - anchor) / (anchor2 - anchor);
  43562. }
  43563. //check for negative zero, return zero if negative zero
  43564. return -(wholeMonthDiff + adjust) || 0;
  43565. }
  43566. hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
  43567. hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
  43568. function toString () {
  43569. return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
  43570. }
  43571. function toISOString() {
  43572. if (!this.isValid()) {
  43573. return null;
  43574. }
  43575. var m = this.clone().utc();
  43576. if (m.year() < 0 || m.year() > 9999) {
  43577. return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
  43578. }
  43579. if (isFunction(Date.prototype.toISOString)) {
  43580. // native implementation is ~50x faster, use it when we can
  43581. return this.toDate().toISOString();
  43582. }
  43583. return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
  43584. }
  43585. /**
  43586. * Return a human readable representation of a moment that can
  43587. * also be evaluated to get a new moment which is the same
  43588. *
  43589. * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
  43590. */
  43591. function inspect () {
  43592. if (!this.isValid()) {
  43593. return 'moment.invalid(/* ' + this._i + ' */)';
  43594. }
  43595. var func = 'moment';
  43596. var zone = '';
  43597. if (!this.isLocal()) {
  43598. func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
  43599. zone = 'Z';
  43600. }
  43601. var prefix = '[' + func + '("]';
  43602. var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY';
  43603. var datetime = '-MM-DD[T]HH:mm:ss.SSS';
  43604. var suffix = zone + '[")]';
  43605. return this.format(prefix + year + datetime + suffix);
  43606. }
  43607. function format (inputString) {
  43608. if (!inputString) {
  43609. inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;
  43610. }
  43611. var output = formatMoment(this, inputString);
  43612. return this.localeData().postformat(output);
  43613. }
  43614. function from (time, withoutSuffix) {
  43615. if (this.isValid() &&
  43616. ((isMoment(time) && time.isValid()) ||
  43617. createLocal(time).isValid())) {
  43618. return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
  43619. } else {
  43620. return this.localeData().invalidDate();
  43621. }
  43622. }
  43623. function fromNow (withoutSuffix) {
  43624. return this.from(createLocal(), withoutSuffix);
  43625. }
  43626. function to (time, withoutSuffix) {
  43627. if (this.isValid() &&
  43628. ((isMoment(time) && time.isValid()) ||
  43629. createLocal(time).isValid())) {
  43630. return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);
  43631. } else {
  43632. return this.localeData().invalidDate();
  43633. }
  43634. }
  43635. function toNow (withoutSuffix) {
  43636. return this.to(createLocal(), withoutSuffix);
  43637. }
  43638. // If passed a locale key, it will set the locale for this
  43639. // instance. Otherwise, it will return the locale configuration
  43640. // variables for this instance.
  43641. function locale (key) {
  43642. var newLocaleData;
  43643. if (key === undefined) {
  43644. return this._locale._abbr;
  43645. } else {
  43646. newLocaleData = getLocale(key);
  43647. if (newLocaleData != null) {
  43648. this._locale = newLocaleData;
  43649. }
  43650. return this;
  43651. }
  43652. }
  43653. var lang = deprecate(
  43654. 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
  43655. function (key) {
  43656. if (key === undefined) {
  43657. return this.localeData();
  43658. } else {
  43659. return this.locale(key);
  43660. }
  43661. }
  43662. );
  43663. function localeData () {
  43664. return this._locale;
  43665. }
  43666. function startOf (units) {
  43667. units = normalizeUnits(units);
  43668. // the following switch intentionally omits break keywords
  43669. // to utilize falling through the cases.
  43670. switch (units) {
  43671. case 'year':
  43672. this.month(0);
  43673. /* falls through */
  43674. case 'quarter':
  43675. case 'month':
  43676. this.date(1);
  43677. /* falls through */
  43678. case 'week':
  43679. case 'isoWeek':
  43680. case 'day':
  43681. case 'date':
  43682. this.hours(0);
  43683. /* falls through */
  43684. case 'hour':
  43685. this.minutes(0);
  43686. /* falls through */
  43687. case 'minute':
  43688. this.seconds(0);
  43689. /* falls through */
  43690. case 'second':
  43691. this.milliseconds(0);
  43692. }
  43693. // weeks are a special case
  43694. if (units === 'week') {
  43695. this.weekday(0);
  43696. }
  43697. if (units === 'isoWeek') {
  43698. this.isoWeekday(1);
  43699. }
  43700. // quarters are also special
  43701. if (units === 'quarter') {
  43702. this.month(Math.floor(this.month() / 3) * 3);
  43703. }
  43704. return this;
  43705. }
  43706. function endOf (units) {
  43707. units = normalizeUnits(units);
  43708. if (units === undefined || units === 'millisecond') {
  43709. return this;
  43710. }
  43711. // 'date' is an alias for 'day', so it should be considered as such.
  43712. if (units === 'date') {
  43713. units = 'day';
  43714. }
  43715. return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
  43716. }
  43717. function valueOf () {
  43718. return this._d.valueOf() - ((this._offset || 0) * 60000);
  43719. }
  43720. function unix () {
  43721. return Math.floor(this.valueOf() / 1000);
  43722. }
  43723. function toDate () {
  43724. return new Date(this.valueOf());
  43725. }
  43726. function toArray () {
  43727. var m = this;
  43728. return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];
  43729. }
  43730. function toObject () {
  43731. var m = this;
  43732. return {
  43733. years: m.year(),
  43734. months: m.month(),
  43735. date: m.date(),
  43736. hours: m.hours(),
  43737. minutes: m.minutes(),
  43738. seconds: m.seconds(),
  43739. milliseconds: m.milliseconds()
  43740. };
  43741. }
  43742. function toJSON () {
  43743. // new Date(NaN).toJSON() === null
  43744. return this.isValid() ? this.toISOString() : null;
  43745. }
  43746. function isValid$2 () {
  43747. return isValid(this);
  43748. }
  43749. function parsingFlags () {
  43750. return extend({}, getParsingFlags(this));
  43751. }
  43752. function invalidAt () {
  43753. return getParsingFlags(this).overflow;
  43754. }
  43755. function creationData() {
  43756. return {
  43757. input: this._i,
  43758. format: this._f,
  43759. locale: this._locale,
  43760. isUTC: this._isUTC,
  43761. strict: this._strict
  43762. };
  43763. }
  43764. // FORMATTING
  43765. addFormatToken(0, ['gg', 2], 0, function () {
  43766. return this.weekYear() % 100;
  43767. });
  43768. addFormatToken(0, ['GG', 2], 0, function () {
  43769. return this.isoWeekYear() % 100;
  43770. });
  43771. function addWeekYearFormatToken (token, getter) {
  43772. addFormatToken(0, [token, token.length], 0, getter);
  43773. }
  43774. addWeekYearFormatToken('gggg', 'weekYear');
  43775. addWeekYearFormatToken('ggggg', 'weekYear');
  43776. addWeekYearFormatToken('GGGG', 'isoWeekYear');
  43777. addWeekYearFormatToken('GGGGG', 'isoWeekYear');
  43778. // ALIASES
  43779. addUnitAlias('weekYear', 'gg');
  43780. addUnitAlias('isoWeekYear', 'GG');
  43781. // PRIORITY
  43782. addUnitPriority('weekYear', 1);
  43783. addUnitPriority('isoWeekYear', 1);
  43784. // PARSING
  43785. addRegexToken('G', matchSigned);
  43786. addRegexToken('g', matchSigned);
  43787. addRegexToken('GG', match1to2, match2);
  43788. addRegexToken('gg', match1to2, match2);
  43789. addRegexToken('GGGG', match1to4, match4);
  43790. addRegexToken('gggg', match1to4, match4);
  43791. addRegexToken('GGGGG', match1to6, match6);
  43792. addRegexToken('ggggg', match1to6, match6);
  43793. addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {
  43794. week[token.substr(0, 2)] = toInt(input);
  43795. });
  43796. addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
  43797. week[token] = hooks.parseTwoDigitYear(input);
  43798. });
  43799. // MOMENTS
  43800. function getSetWeekYear (input) {
  43801. return getSetWeekYearHelper.call(this,
  43802. input,
  43803. this.week(),
  43804. this.weekday(),
  43805. this.localeData()._week.dow,
  43806. this.localeData()._week.doy);
  43807. }
  43808. function getSetISOWeekYear (input) {
  43809. return getSetWeekYearHelper.call(this,
  43810. input, this.isoWeek(), this.isoWeekday(), 1, 4);
  43811. }
  43812. function getISOWeeksInYear () {
  43813. return weeksInYear(this.year(), 1, 4);
  43814. }
  43815. function getWeeksInYear () {
  43816. var weekInfo = this.localeData()._week;
  43817. return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
  43818. }
  43819. function getSetWeekYearHelper(input, week, weekday, dow, doy) {
  43820. var weeksTarget;
  43821. if (input == null) {
  43822. return weekOfYear(this, dow, doy).year;
  43823. } else {
  43824. weeksTarget = weeksInYear(input, dow, doy);
  43825. if (week > weeksTarget) {
  43826. week = weeksTarget;
  43827. }
  43828. return setWeekAll.call(this, input, week, weekday, dow, doy);
  43829. }
  43830. }
  43831. function setWeekAll(weekYear, week, weekday, dow, doy) {
  43832. var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
  43833. date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
  43834. this.year(date.getUTCFullYear());
  43835. this.month(date.getUTCMonth());
  43836. this.date(date.getUTCDate());
  43837. return this;
  43838. }
  43839. // FORMATTING
  43840. addFormatToken('Q', 0, 'Qo', 'quarter');
  43841. // ALIASES
  43842. addUnitAlias('quarter', 'Q');
  43843. // PRIORITY
  43844. addUnitPriority('quarter', 7);
  43845. // PARSING
  43846. addRegexToken('Q', match1);
  43847. addParseToken('Q', function (input, array) {
  43848. array[MONTH] = (toInt(input) - 1) * 3;
  43849. });
  43850. // MOMENTS
  43851. function getSetQuarter (input) {
  43852. return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
  43853. }
  43854. // FORMATTING
  43855. addFormatToken('D', ['DD', 2], 'Do', 'date');
  43856. // ALIASES
  43857. addUnitAlias('date', 'D');
  43858. // PRIOROITY
  43859. addUnitPriority('date', 9);
  43860. // PARSING
  43861. addRegexToken('D', match1to2);
  43862. addRegexToken('DD', match1to2, match2);
  43863. addRegexToken('Do', function (isStrict, locale) {
  43864. // TODO: Remove "ordinalParse" fallback in next major release.
  43865. return isStrict ?
  43866. (locale._dayOfMonthOrdinalParse || locale._ordinalParse) :
  43867. locale._dayOfMonthOrdinalParseLenient;
  43868. });
  43869. addParseToken(['D', 'DD'], DATE);
  43870. addParseToken('Do', function (input, array) {
  43871. array[DATE] = toInt(input.match(match1to2)[0]);
  43872. });
  43873. // MOMENTS
  43874. var getSetDayOfMonth = makeGetSet('Date', true);
  43875. // FORMATTING
  43876. addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
  43877. // ALIASES
  43878. addUnitAlias('dayOfYear', 'DDD');
  43879. // PRIORITY
  43880. addUnitPriority('dayOfYear', 4);
  43881. // PARSING
  43882. addRegexToken('DDD', match1to3);
  43883. addRegexToken('DDDD', match3);
  43884. addParseToken(['DDD', 'DDDD'], function (input, array, config) {
  43885. config._dayOfYear = toInt(input);
  43886. });
  43887. // HELPERS
  43888. // MOMENTS
  43889. function getSetDayOfYear (input) {
  43890. var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;
  43891. return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
  43892. }
  43893. // FORMATTING
  43894. addFormatToken('m', ['mm', 2], 0, 'minute');
  43895. // ALIASES
  43896. addUnitAlias('minute', 'm');
  43897. // PRIORITY
  43898. addUnitPriority('minute', 14);
  43899. // PARSING
  43900. addRegexToken('m', match1to2);
  43901. addRegexToken('mm', match1to2, match2);
  43902. addParseToken(['m', 'mm'], MINUTE);
  43903. // MOMENTS
  43904. var getSetMinute = makeGetSet('Minutes', false);
  43905. // FORMATTING
  43906. addFormatToken('s', ['ss', 2], 0, 'second');
  43907. // ALIASES
  43908. addUnitAlias('second', 's');
  43909. // PRIORITY
  43910. addUnitPriority('second', 15);
  43911. // PARSING
  43912. addRegexToken('s', match1to2);
  43913. addRegexToken('ss', match1to2, match2);
  43914. addParseToken(['s', 'ss'], SECOND);
  43915. // MOMENTS
  43916. var getSetSecond = makeGetSet('Seconds', false);
  43917. // FORMATTING
  43918. addFormatToken('S', 0, 0, function () {
  43919. return ~~(this.millisecond() / 100);
  43920. });
  43921. addFormatToken(0, ['SS', 2], 0, function () {
  43922. return ~~(this.millisecond() / 10);
  43923. });
  43924. addFormatToken(0, ['SSS', 3], 0, 'millisecond');
  43925. addFormatToken(0, ['SSSS', 4], 0, function () {
  43926. return this.millisecond() * 10;
  43927. });
  43928. addFormatToken(0, ['SSSSS', 5], 0, function () {
  43929. return this.millisecond() * 100;
  43930. });
  43931. addFormatToken(0, ['SSSSSS', 6], 0, function () {
  43932. return this.millisecond() * 1000;
  43933. });
  43934. addFormatToken(0, ['SSSSSSS', 7], 0, function () {
  43935. return this.millisecond() * 10000;
  43936. });
  43937. addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
  43938. return this.millisecond() * 100000;
  43939. });
  43940. addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
  43941. return this.millisecond() * 1000000;
  43942. });
  43943. // ALIASES
  43944. addUnitAlias('millisecond', 'ms');
  43945. // PRIORITY
  43946. addUnitPriority('millisecond', 16);
  43947. // PARSING
  43948. addRegexToken('S', match1to3, match1);
  43949. addRegexToken('SS', match1to3, match2);
  43950. addRegexToken('SSS', match1to3, match3);
  43951. var token;
  43952. for (token = 'SSSS'; token.length <= 9; token += 'S') {
  43953. addRegexToken(token, matchUnsigned);
  43954. }
  43955. function parseMs(input, array) {
  43956. array[MILLISECOND] = toInt(('0.' + input) * 1000);
  43957. }
  43958. for (token = 'S'; token.length <= 9; token += 'S') {
  43959. addParseToken(token, parseMs);
  43960. }
  43961. // MOMENTS
  43962. var getSetMillisecond = makeGetSet('Milliseconds', false);
  43963. // FORMATTING
  43964. addFormatToken('z', 0, 0, 'zoneAbbr');
  43965. addFormatToken('zz', 0, 0, 'zoneName');
  43966. // MOMENTS
  43967. function getZoneAbbr () {
  43968. return this._isUTC ? 'UTC' : '';
  43969. }
  43970. function getZoneName () {
  43971. return this._isUTC ? 'Coordinated Universal Time' : '';
  43972. }
  43973. var proto = Moment.prototype;
  43974. proto.add = add;
  43975. proto.calendar = calendar$1;
  43976. proto.clone = clone;
  43977. proto.diff = diff;
  43978. proto.endOf = endOf;
  43979. proto.format = format;
  43980. proto.from = from;
  43981. proto.fromNow = fromNow;
  43982. proto.to = to;
  43983. proto.toNow = toNow;
  43984. proto.get = stringGet;
  43985. proto.invalidAt = invalidAt;
  43986. proto.isAfter = isAfter;
  43987. proto.isBefore = isBefore;
  43988. proto.isBetween = isBetween;
  43989. proto.isSame = isSame;
  43990. proto.isSameOrAfter = isSameOrAfter;
  43991. proto.isSameOrBefore = isSameOrBefore;
  43992. proto.isValid = isValid$2;
  43993. proto.lang = lang;
  43994. proto.locale = locale;
  43995. proto.localeData = localeData;
  43996. proto.max = prototypeMax;
  43997. proto.min = prototypeMin;
  43998. proto.parsingFlags = parsingFlags;
  43999. proto.set = stringSet;
  44000. proto.startOf = startOf;
  44001. proto.subtract = subtract;
  44002. proto.toArray = toArray;
  44003. proto.toObject = toObject;
  44004. proto.toDate = toDate;
  44005. proto.toISOString = toISOString;
  44006. proto.inspect = inspect;
  44007. proto.toJSON = toJSON;
  44008. proto.toString = toString;
  44009. proto.unix = unix;
  44010. proto.valueOf = valueOf;
  44011. proto.creationData = creationData;
  44012. // Year
  44013. proto.year = getSetYear;
  44014. proto.isLeapYear = getIsLeapYear;
  44015. // Week Year
  44016. proto.weekYear = getSetWeekYear;
  44017. proto.isoWeekYear = getSetISOWeekYear;
  44018. // Quarter
  44019. proto.quarter = proto.quarters = getSetQuarter;
  44020. // Month
  44021. proto.month = getSetMonth;
  44022. proto.daysInMonth = getDaysInMonth;
  44023. // Week
  44024. proto.week = proto.weeks = getSetWeek;
  44025. proto.isoWeek = proto.isoWeeks = getSetISOWeek;
  44026. proto.weeksInYear = getWeeksInYear;
  44027. proto.isoWeeksInYear = getISOWeeksInYear;
  44028. // Day
  44029. proto.date = getSetDayOfMonth;
  44030. proto.day = proto.days = getSetDayOfWeek;
  44031. proto.weekday = getSetLocaleDayOfWeek;
  44032. proto.isoWeekday = getSetISODayOfWeek;
  44033. proto.dayOfYear = getSetDayOfYear;
  44034. // Hour
  44035. proto.hour = proto.hours = getSetHour;
  44036. // Minute
  44037. proto.minute = proto.minutes = getSetMinute;
  44038. // Second
  44039. proto.second = proto.seconds = getSetSecond;
  44040. // Millisecond
  44041. proto.millisecond = proto.milliseconds = getSetMillisecond;
  44042. // Offset
  44043. proto.utcOffset = getSetOffset;
  44044. proto.utc = setOffsetToUTC;
  44045. proto.local = setOffsetToLocal;
  44046. proto.parseZone = setOffsetToParsedOffset;
  44047. proto.hasAlignedHourOffset = hasAlignedHourOffset;
  44048. proto.isDST = isDaylightSavingTime;
  44049. proto.isLocal = isLocal;
  44050. proto.isUtcOffset = isUtcOffset;
  44051. proto.isUtc = isUtc;
  44052. proto.isUTC = isUtc;
  44053. // Timezone
  44054. proto.zoneAbbr = getZoneAbbr;
  44055. proto.zoneName = getZoneName;
  44056. // Deprecations
  44057. proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);
  44058. proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);
  44059. proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);
  44060. proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone);
  44061. proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted);
  44062. function createUnix (input) {
  44063. return createLocal(input * 1000);
  44064. }
  44065. function createInZone () {
  44066. return createLocal.apply(null, arguments).parseZone();
  44067. }
  44068. function preParsePostFormat (string) {
  44069. return string;
  44070. }
  44071. var proto$1 = Locale.prototype;
  44072. proto$1.calendar = calendar;
  44073. proto$1.longDateFormat = longDateFormat;
  44074. proto$1.invalidDate = invalidDate;
  44075. proto$1.ordinal = ordinal;
  44076. proto$1.preparse = preParsePostFormat;
  44077. proto$1.postformat = preParsePostFormat;
  44078. proto$1.relativeTime = relativeTime;
  44079. proto$1.pastFuture = pastFuture;
  44080. proto$1.set = set;
  44081. // Month
  44082. proto$1.months = localeMonths;
  44083. proto$1.monthsShort = localeMonthsShort;
  44084. proto$1.monthsParse = localeMonthsParse;
  44085. proto$1.monthsRegex = monthsRegex;
  44086. proto$1.monthsShortRegex = monthsShortRegex;
  44087. // Week
  44088. proto$1.week = localeWeek;
  44089. proto$1.firstDayOfYear = localeFirstDayOfYear;
  44090. proto$1.firstDayOfWeek = localeFirstDayOfWeek;
  44091. // Day of Week
  44092. proto$1.weekdays = localeWeekdays;
  44093. proto$1.weekdaysMin = localeWeekdaysMin;
  44094. proto$1.weekdaysShort = localeWeekdaysShort;
  44095. proto$1.weekdaysParse = localeWeekdaysParse;
  44096. proto$1.weekdaysRegex = weekdaysRegex;
  44097. proto$1.weekdaysShortRegex = weekdaysShortRegex;
  44098. proto$1.weekdaysMinRegex = weekdaysMinRegex;
  44099. // Hours
  44100. proto$1.isPM = localeIsPM;
  44101. proto$1.meridiem = localeMeridiem;
  44102. function get$1 (format, index, field, setter) {
  44103. var locale = getLocale();
  44104. var utc = createUTC().set(setter, index);
  44105. return locale[field](utc, format);
  44106. }
  44107. function listMonthsImpl (format, index, field) {
  44108. if (isNumber(format)) {
  44109. index = format;
  44110. format = undefined;
  44111. }
  44112. format = format || '';
  44113. if (index != null) {
  44114. return get$1(format, index, field, 'month');
  44115. }
  44116. var i;
  44117. var out = [];
  44118. for (i = 0; i < 12; i++) {
  44119. out[i] = get$1(format, i, field, 'month');
  44120. }
  44121. return out;
  44122. }
  44123. // ()
  44124. // (5)
  44125. // (fmt, 5)
  44126. // (fmt)
  44127. // (true)
  44128. // (true, 5)
  44129. // (true, fmt, 5)
  44130. // (true, fmt)
  44131. function listWeekdaysImpl (localeSorted, format, index, field) {
  44132. if (typeof localeSorted === 'boolean') {
  44133. if (isNumber(format)) {
  44134. index = format;
  44135. format = undefined;
  44136. }
  44137. format = format || '';
  44138. } else {
  44139. format = localeSorted;
  44140. index = format;
  44141. localeSorted = false;
  44142. if (isNumber(format)) {
  44143. index = format;
  44144. format = undefined;
  44145. }
  44146. format = format || '';
  44147. }
  44148. var locale = getLocale(),
  44149. shift = localeSorted ? locale._week.dow : 0;
  44150. if (index != null) {
  44151. return get$1(format, (index + shift) % 7, field, 'day');
  44152. }
  44153. var i;
  44154. var out = [];
  44155. for (i = 0; i < 7; i++) {
  44156. out[i] = get$1(format, (i + shift) % 7, field, 'day');
  44157. }
  44158. return out;
  44159. }
  44160. function listMonths (format, index) {
  44161. return listMonthsImpl(format, index, 'months');
  44162. }
  44163. function listMonthsShort (format, index) {
  44164. return listMonthsImpl(format, index, 'monthsShort');
  44165. }
  44166. function listWeekdays (localeSorted, format, index) {
  44167. return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
  44168. }
  44169. function listWeekdaysShort (localeSorted, format, index) {
  44170. return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
  44171. }
  44172. function listWeekdaysMin (localeSorted, format, index) {
  44173. return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
  44174. }
  44175. getSetGlobalLocale('en', {
  44176. dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
  44177. ordinal : function (number) {
  44178. var b = number % 10,
  44179. output = (toInt(number % 100 / 10) === 1) ? 'th' :
  44180. (b === 1) ? 'st' :
  44181. (b === 2) ? 'nd' :
  44182. (b === 3) ? 'rd' : 'th';
  44183. return number + output;
  44184. }
  44185. });
  44186. // Side effect imports
  44187. hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale);
  44188. hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale);
  44189. var mathAbs = Math.abs;
  44190. function abs () {
  44191. var data = this._data;
  44192. this._milliseconds = mathAbs(this._milliseconds);
  44193. this._days = mathAbs(this._days);
  44194. this._months = mathAbs(this._months);
  44195. data.milliseconds = mathAbs(data.milliseconds);
  44196. data.seconds = mathAbs(data.seconds);
  44197. data.minutes = mathAbs(data.minutes);
  44198. data.hours = mathAbs(data.hours);
  44199. data.months = mathAbs(data.months);
  44200. data.years = mathAbs(data.years);
  44201. return this;
  44202. }
  44203. function addSubtract$1 (duration, input, value, direction) {
  44204. var other = createDuration(input, value);
  44205. duration._milliseconds += direction * other._milliseconds;
  44206. duration._days += direction * other._days;
  44207. duration._months += direction * other._months;
  44208. return duration._bubble();
  44209. }
  44210. // supports only 2.0-style add(1, 's') or add(duration)
  44211. function add$1 (input, value) {
  44212. return addSubtract$1(this, input, value, 1);
  44213. }
  44214. // supports only 2.0-style subtract(1, 's') or subtract(duration)
  44215. function subtract$1 (input, value) {
  44216. return addSubtract$1(this, input, value, -1);
  44217. }
  44218. function absCeil (number) {
  44219. if (number < 0) {
  44220. return Math.floor(number);
  44221. } else {
  44222. return Math.ceil(number);
  44223. }
  44224. }
  44225. function bubble () {
  44226. var milliseconds = this._milliseconds;
  44227. var days = this._days;
  44228. var months = this._months;
  44229. var data = this._data;
  44230. var seconds, minutes, hours, years, monthsFromDays;
  44231. // if we have a mix of positive and negative values, bubble down first
  44232. // check: https://github.com/moment/moment/issues/2166
  44233. if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
  44234. (milliseconds <= 0 && days <= 0 && months <= 0))) {
  44235. milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
  44236. days = 0;
  44237. months = 0;
  44238. }
  44239. // The following code bubbles up values, see the tests for
  44240. // examples of what that means.
  44241. data.milliseconds = milliseconds % 1000;
  44242. seconds = absFloor(milliseconds / 1000);
  44243. data.seconds = seconds % 60;
  44244. minutes = absFloor(seconds / 60);
  44245. data.minutes = minutes % 60;
  44246. hours = absFloor(minutes / 60);
  44247. data.hours = hours % 24;
  44248. days += absFloor(hours / 24);
  44249. // convert days to months
  44250. monthsFromDays = absFloor(daysToMonths(days));
  44251. months += monthsFromDays;
  44252. days -= absCeil(monthsToDays(monthsFromDays));
  44253. // 12 months -> 1 year
  44254. years = absFloor(months / 12);
  44255. months %= 12;
  44256. data.days = days;
  44257. data.months = months;
  44258. data.years = years;
  44259. return this;
  44260. }
  44261. function daysToMonths (days) {
  44262. // 400 years have 146097 days (taking into account leap year rules)
  44263. // 400 years have 12 months === 4800
  44264. return days * 4800 / 146097;
  44265. }
  44266. function monthsToDays (months) {
  44267. // the reverse of daysToMonths
  44268. return months * 146097 / 4800;
  44269. }
  44270. function as (units) {
  44271. if (!this.isValid()) {
  44272. return NaN;
  44273. }
  44274. var days;
  44275. var months;
  44276. var milliseconds = this._milliseconds;
  44277. units = normalizeUnits(units);
  44278. if (units === 'month' || units === 'year') {
  44279. days = this._days + milliseconds / 864e5;
  44280. months = this._months + daysToMonths(days);
  44281. return units === 'month' ? months : months / 12;
  44282. } else {
  44283. // handle milliseconds separately because of floating point math errors (issue #1867)
  44284. days = this._days + Math.round(monthsToDays(this._months));
  44285. switch (units) {
  44286. case 'week' : return days / 7 + milliseconds / 6048e5;
  44287. case 'day' : return days + milliseconds / 864e5;
  44288. case 'hour' : return days * 24 + milliseconds / 36e5;
  44289. case 'minute' : return days * 1440 + milliseconds / 6e4;
  44290. case 'second' : return days * 86400 + milliseconds / 1000;
  44291. // Math.floor prevents floating point math errors here
  44292. case 'millisecond': return Math.floor(days * 864e5) + milliseconds;
  44293. default: throw new Error('Unknown unit ' + units);
  44294. }
  44295. }
  44296. }
  44297. // TODO: Use this.as('ms')?
  44298. function valueOf$1 () {
  44299. if (!this.isValid()) {
  44300. return NaN;
  44301. }
  44302. return (
  44303. this._milliseconds +
  44304. this._days * 864e5 +
  44305. (this._months % 12) * 2592e6 +
  44306. toInt(this._months / 12) * 31536e6
  44307. );
  44308. }
  44309. function makeAs (alias) {
  44310. return function () {
  44311. return this.as(alias);
  44312. };
  44313. }
  44314. var asMilliseconds = makeAs('ms');
  44315. var asSeconds = makeAs('s');
  44316. var asMinutes = makeAs('m');
  44317. var asHours = makeAs('h');
  44318. var asDays = makeAs('d');
  44319. var asWeeks = makeAs('w');
  44320. var asMonths = makeAs('M');
  44321. var asYears = makeAs('y');
  44322. function clone$1 () {
  44323. return createDuration(this);
  44324. }
  44325. function get$2 (units) {
  44326. units = normalizeUnits(units);
  44327. return this.isValid() ? this[units + 's']() : NaN;
  44328. }
  44329. function makeGetter(name) {
  44330. return function () {
  44331. return this.isValid() ? this._data[name] : NaN;
  44332. };
  44333. }
  44334. var milliseconds = makeGetter('milliseconds');
  44335. var seconds = makeGetter('seconds');
  44336. var minutes = makeGetter('minutes');
  44337. var hours = makeGetter('hours');
  44338. var days = makeGetter('days');
  44339. var months = makeGetter('months');
  44340. var years = makeGetter('years');
  44341. function weeks () {
  44342. return absFloor(this.days() / 7);
  44343. }
  44344. var round = Math.round;
  44345. var thresholds = {
  44346. ss: 44, // a few seconds to seconds
  44347. s : 45, // seconds to minute
  44348. m : 45, // minutes to hour
  44349. h : 22, // hours to day
  44350. d : 26, // days to month
  44351. M : 11 // months to year
  44352. };
  44353. // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
  44354. function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
  44355. return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
  44356. }
  44357. function relativeTime$1 (posNegDuration, withoutSuffix, locale) {
  44358. var duration = createDuration(posNegDuration).abs();
  44359. var seconds = round(duration.as('s'));
  44360. var minutes = round(duration.as('m'));
  44361. var hours = round(duration.as('h'));
  44362. var days = round(duration.as('d'));
  44363. var months = round(duration.as('M'));
  44364. var years = round(duration.as('y'));
  44365. var a = seconds <= thresholds.ss && ['s', seconds] ||
  44366. seconds < thresholds.s && ['ss', seconds] ||
  44367. minutes <= 1 && ['m'] ||
  44368. minutes < thresholds.m && ['mm', minutes] ||
  44369. hours <= 1 && ['h'] ||
  44370. hours < thresholds.h && ['hh', hours] ||
  44371. days <= 1 && ['d'] ||
  44372. days < thresholds.d && ['dd', days] ||
  44373. months <= 1 && ['M'] ||
  44374. months < thresholds.M && ['MM', months] ||
  44375. years <= 1 && ['y'] || ['yy', years];
  44376. a[2] = withoutSuffix;
  44377. a[3] = +posNegDuration > 0;
  44378. a[4] = locale;
  44379. return substituteTimeAgo.apply(null, a);
  44380. }
  44381. // This function allows you to set the rounding function for relative time strings
  44382. function getSetRelativeTimeRounding (roundingFunction) {
  44383. if (roundingFunction === undefined) {
  44384. return round;
  44385. }
  44386. if (typeof(roundingFunction) === 'function') {
  44387. round = roundingFunction;
  44388. return true;
  44389. }
  44390. return false;
  44391. }
  44392. // This function allows you to set a threshold for relative time strings
  44393. function getSetRelativeTimeThreshold (threshold, limit) {
  44394. if (thresholds[threshold] === undefined) {
  44395. return false;
  44396. }
  44397. if (limit === undefined) {
  44398. return thresholds[threshold];
  44399. }
  44400. thresholds[threshold] = limit;
  44401. if (threshold === 's') {
  44402. thresholds.ss = limit - 1;
  44403. }
  44404. return true;
  44405. }
  44406. function humanize (withSuffix) {
  44407. if (!this.isValid()) {
  44408. return this.localeData().invalidDate();
  44409. }
  44410. var locale = this.localeData();
  44411. var output = relativeTime$1(this, !withSuffix, locale);
  44412. if (withSuffix) {
  44413. output = locale.pastFuture(+this, output);
  44414. }
  44415. return locale.postformat(output);
  44416. }
  44417. var abs$1 = Math.abs;
  44418. function sign(x) {
  44419. return ((x > 0) - (x < 0)) || +x;
  44420. }
  44421. function toISOString$1() {
  44422. // for ISO strings we do not use the normal bubbling rules:
  44423. // * milliseconds bubble up until they become hours
  44424. // * days do not bubble at all
  44425. // * months bubble up until they become years
  44426. // This is because there is no context-free conversion between hours and days
  44427. // (think of clock changes)
  44428. // and also not between days and months (28-31 days per month)
  44429. if (!this.isValid()) {
  44430. return this.localeData().invalidDate();
  44431. }
  44432. var seconds = abs$1(this._milliseconds) / 1000;
  44433. var days = abs$1(this._days);
  44434. var months = abs$1(this._months);
  44435. var minutes, hours, years;
  44436. // 3600 seconds -> 60 minutes -> 1 hour
  44437. minutes = absFloor(seconds / 60);
  44438. hours = absFloor(minutes / 60);
  44439. seconds %= 60;
  44440. minutes %= 60;
  44441. // 12 months -> 1 year
  44442. years = absFloor(months / 12);
  44443. months %= 12;
  44444. // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
  44445. var Y = years;
  44446. var M = months;
  44447. var D = days;
  44448. var h = hours;
  44449. var m = minutes;
  44450. var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
  44451. var total = this.asSeconds();
  44452. if (!total) {
  44453. // this is the same as C#'s (Noda) and python (isodate)...
  44454. // but not other JS (goog.date)
  44455. return 'P0D';
  44456. }
  44457. var totalSign = total < 0 ? '-' : '';
  44458. var ymSign = sign(this._months) !== sign(total) ? '-' : '';
  44459. var daysSign = sign(this._days) !== sign(total) ? '-' : '';
  44460. var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
  44461. return totalSign + 'P' +
  44462. (Y ? ymSign + Y + 'Y' : '') +
  44463. (M ? ymSign + M + 'M' : '') +
  44464. (D ? daysSign + D + 'D' : '') +
  44465. ((h || m || s) ? 'T' : '') +
  44466. (h ? hmsSign + h + 'H' : '') +
  44467. (m ? hmsSign + m + 'M' : '') +
  44468. (s ? hmsSign + s + 'S' : '');
  44469. }
  44470. var proto$2 = Duration.prototype;
  44471. proto$2.isValid = isValid$1;
  44472. proto$2.abs = abs;
  44473. proto$2.add = add$1;
  44474. proto$2.subtract = subtract$1;
  44475. proto$2.as = as;
  44476. proto$2.asMilliseconds = asMilliseconds;
  44477. proto$2.asSeconds = asSeconds;
  44478. proto$2.asMinutes = asMinutes;
  44479. proto$2.asHours = asHours;
  44480. proto$2.asDays = asDays;
  44481. proto$2.asWeeks = asWeeks;
  44482. proto$2.asMonths = asMonths;
  44483. proto$2.asYears = asYears;
  44484. proto$2.valueOf = valueOf$1;
  44485. proto$2._bubble = bubble;
  44486. proto$2.clone = clone$1;
  44487. proto$2.get = get$2;
  44488. proto$2.milliseconds = milliseconds;
  44489. proto$2.seconds = seconds;
  44490. proto$2.minutes = minutes;
  44491. proto$2.hours = hours;
  44492. proto$2.days = days;
  44493. proto$2.weeks = weeks;
  44494. proto$2.months = months;
  44495. proto$2.years = years;
  44496. proto$2.humanize = humanize;
  44497. proto$2.toISOString = toISOString$1;
  44498. proto$2.toString = toISOString$1;
  44499. proto$2.toJSON = toISOString$1;
  44500. proto$2.locale = locale;
  44501. proto$2.localeData = localeData;
  44502. // Deprecations
  44503. proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1);
  44504. proto$2.lang = lang;
  44505. // Side effect imports
  44506. // FORMATTING
  44507. addFormatToken('X', 0, 0, 'unix');
  44508. addFormatToken('x', 0, 0, 'valueOf');
  44509. // PARSING
  44510. addRegexToken('x', matchSigned);
  44511. addRegexToken('X', matchTimestamp);
  44512. addParseToken('X', function (input, array, config) {
  44513. config._d = new Date(parseFloat(input, 10) * 1000);
  44514. });
  44515. addParseToken('x', function (input, array, config) {
  44516. config._d = new Date(toInt(input));
  44517. });
  44518. // Side effect imports
  44519. hooks.version = '2.19.4';
  44520. setHookCallback(createLocal);
  44521. hooks.fn = proto;
  44522. hooks.min = min;
  44523. hooks.max = max;
  44524. hooks.now = now;
  44525. hooks.utc = createUTC;
  44526. hooks.unix = createUnix;
  44527. hooks.months = listMonths;
  44528. hooks.isDate = isDate;
  44529. hooks.locale = getSetGlobalLocale;
  44530. hooks.invalid = createInvalid;
  44531. hooks.duration = createDuration;
  44532. hooks.isMoment = isMoment;
  44533. hooks.weekdays = listWeekdays;
  44534. hooks.parseZone = createInZone;
  44535. hooks.localeData = getLocale;
  44536. hooks.isDuration = isDuration;
  44537. hooks.monthsShort = listMonthsShort;
  44538. hooks.weekdaysMin = listWeekdaysMin;
  44539. hooks.defineLocale = defineLocale;
  44540. hooks.updateLocale = updateLocale;
  44541. hooks.locales = listLocales;
  44542. hooks.weekdaysShort = listWeekdaysShort;
  44543. hooks.normalizeUnits = normalizeUnits;
  44544. hooks.relativeTimeRounding = getSetRelativeTimeRounding;
  44545. hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
  44546. hooks.calendarFormat = getCalendarFormat;
  44547. hooks.prototype = proto;
  44548. return hooks;
  44549. })));
  44550. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module)))
  44551. /***/ }),
  44552. /***/ "./node_modules/pluggable.js/dist/pluggable.js":
  44553. /*!*****************************************************!*\
  44554. !*** ./node_modules/pluggable.js/dist/pluggable.js ***!
  44555. \*****************************************************/
  44556. /*! no static exports found */
  44557. /***/ (function(module, exports, __webpack_require__) {
  44558. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
  44559. if (true) {
  44560. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, __webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  44561. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  44562. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  44563. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  44564. } else { var mod; }
  44565. })(this, function (exports, _lodash) {
  44566. 'use strict';
  44567. Object.defineProperty(exports, "__esModule", {
  44568. value: true
  44569. });
  44570. exports.enable = undefined;
  44571. var _ = _interopRequireWildcard(_lodash);
  44572. function _interopRequireWildcard(obj) {
  44573. if (obj && obj.__esModule) {
  44574. return obj;
  44575. } else {
  44576. var newObj = {};
  44577. if (obj != null) {
  44578. for (var key in obj) {
  44579. if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
  44580. }
  44581. }
  44582. newObj.default = obj;
  44583. return newObj;
  44584. }
  44585. }
  44586. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
  44587. return typeof obj;
  44588. } : function (obj) {
  44589. return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  44590. };
  44591. // The `PluginSocket` class contains the plugin architecture, and gets
  44592. // created whenever `pluggable.enable(obj);` is called on the object
  44593. // that you want to make pluggable.
  44594. // You can also see it as the thing into which the plugins are plugged.
  44595. // It takes two parameters, first, the object being made pluggable, and
  44596. // then the name by which the pluggable object may be referenced on the
  44597. // __super__ object (inside overrides).
  44598. function PluginSocket(plugged, name) {
  44599. this.name = name;
  44600. this.plugged = plugged;
  44601. if (typeof this.plugged.__super__ === 'undefined') {
  44602. this.plugged.__super__ = {};
  44603. } else if (typeof this.plugged.__super__ === 'string') {
  44604. this.plugged.__super__ = { '__string__': this.plugged.__super__ };
  44605. }
  44606. this.plugged.__super__[name] = this.plugged;
  44607. this.plugins = {};
  44608. this.initialized_plugins = [];
  44609. }
  44610. // Now we add methods to the PluginSocket by adding them to its
  44611. // prototype.
  44612. _.extend(PluginSocket.prototype, {
  44613. // `wrappedOverride` creates a partially applied wrapper function
  44614. // that makes sure to set the proper super method when the
  44615. // overriding method is called. This is done to enable
  44616. // chaining of plugin methods, all the way up to the
  44617. // original method.
  44618. wrappedOverride: function wrappedOverride(key, value, super_method, default_super) {
  44619. if (typeof super_method === "function") {
  44620. if (typeof this.__super__ === "undefined") {
  44621. /* We're not on the context of the plugged object.
  44622. * This can happen when the overridden method is called via
  44623. * an event handler or when it's a constructor.
  44624. *
  44625. * In this case, we simply tack on the __super__ obj.
  44626. */
  44627. this.__super__ = default_super;
  44628. }
  44629. this.__super__[key] = super_method.bind(this);
  44630. }
  44631. return value.apply(this, _.drop(arguments, 4));
  44632. },
  44633. // `_overrideAttribute` overrides an attribute on the original object
  44634. // (the thing being plugged into).
  44635. //
  44636. // If the attribute being overridden is a function, then the original
  44637. // function will still be available via the `__super__` attribute.
  44638. //
  44639. // If the same function is being overridden multiple times, then
  44640. // the original function will be available at the end of a chain of
  44641. // functions, starting from the most recent override, all the way
  44642. // back to the original function, each being referenced by the
  44643. // previous' __super__ attribute.
  44644. //
  44645. // For example:
  44646. //
  44647. // `plugin2.MyFunc.__super__.myFunc => plugin1.MyFunc.__super__.myFunc => original.myFunc`
  44648. _overrideAttribute: function _overrideAttribute(key, plugin) {
  44649. var value = plugin.overrides[key];
  44650. if (typeof value === "function") {
  44651. var default_super = {};
  44652. default_super[this.name] = this.plugged;
  44653. var wrapped_function = _.partial(this.wrappedOverride, key, value, this.plugged[key], default_super);
  44654. this.plugged[key] = wrapped_function;
  44655. } else {
  44656. this.plugged[key] = value;
  44657. }
  44658. },
  44659. _extendObject: function _extendObject(obj, attributes) {
  44660. if (!obj.prototype.__super__) {
  44661. obj.prototype.__super__ = {};
  44662. obj.prototype.__super__[this.name] = this.plugged;
  44663. }
  44664. var that = this;
  44665. _.each(attributes, function (value, key) {
  44666. if (key === 'events') {
  44667. obj.prototype[key] = _.extend(value, obj.prototype[key]);
  44668. } else if (typeof value === 'function') {
  44669. // We create a partially applied wrapper function, that
  44670. // makes sure to set the proper super method when the
  44671. // overriding method is called. This is done to enable
  44672. // chaining of plugin methods, all the way up to the
  44673. // original method.
  44674. var default_super = {};
  44675. default_super[that.name] = that.plugged;
  44676. var wrapped_function = _.partial(that.wrappedOverride, key, value, obj.prototype[key], default_super);
  44677. obj.prototype[key] = wrapped_function;
  44678. } else {
  44679. obj.prototype[key] = value;
  44680. }
  44681. });
  44682. },
  44683. // Plugins can specify dependencies (by means of the
  44684. // `dependencies` list attribute) which refers to dependencies
  44685. // which will be initialized first, before the plugin itself gets initialized.
  44686. //
  44687. // If `strict_plugin_dependencies` is set to `false` (on the object being
  44688. // made pluggable), then no error will be thrown if any of these plugins aren't
  44689. // available.
  44690. loadPluginDependencies: function loadPluginDependencies(plugin) {
  44691. var _this = this;
  44692. _.each(plugin.dependencies, function (name) {
  44693. var dep = _this.plugins[name];
  44694. if (dep) {
  44695. if (_.includes(dep.dependencies, plugin.__name__)) {
  44696. /* FIXME: circular dependency checking is only one level deep. */
  44697. throw "Found a circular dependency between the plugins \"" + plugin.__name__ + "\" and \"" + name + "\"";
  44698. }
  44699. _this.initializePlugin(dep);
  44700. } else {
  44701. _this.throwUndefinedDependencyError("Could not find dependency \"" + name + "\" " + "for the plugin \"" + plugin.__name__ + "\". " + "If it's needed, make sure it's loaded by require.js");
  44702. }
  44703. });
  44704. },
  44705. throwUndefinedDependencyError: function throwUndefinedDependencyError(msg) {
  44706. if (this.plugged.strict_plugin_dependencies) {
  44707. throw msg;
  44708. } else {
  44709. console.log(msg);
  44710. return;
  44711. }
  44712. },
  44713. // `applyOverrides` is called by initializePlugin. It applies any
  44714. // and all overrides of methods or Backbone views and models that
  44715. // are defined on any of the plugins.
  44716. applyOverrides: function applyOverrides(plugin) {
  44717. var _this2 = this;
  44718. _.each(Object.keys(plugin.overrides || {}), function (key) {
  44719. var override = plugin.overrides[key];
  44720. if ((typeof override === 'undefined' ? 'undefined' : _typeof(override)) === "object") {
  44721. if (typeof _this2.plugged[key] === 'undefined') {
  44722. _this2.throwUndefinedDependencyError("Error: Plugin \"" + plugin.__name__ + "\" tried to override " + key + " but it's not found.");
  44723. } else {
  44724. _this2._extendObject(_this2.plugged[key], override);
  44725. }
  44726. } else {
  44727. _this2._overrideAttribute(key, plugin);
  44728. }
  44729. });
  44730. },
  44731. // `initializePlugin` applies the overrides (if any) defined on all
  44732. // the registered plugins and then calls the initialize method of the plugin
  44733. initializePlugin: function initializePlugin(plugin) {
  44734. if (!_.includes(_.keys(this.allowed_plugins), plugin.__name__)) {
  44735. /* Don't initialize disallowed plugins. */
  44736. return;
  44737. }
  44738. if (_.includes(this.initialized_plugins, plugin.__name__)) {
  44739. /* Don't initialize plugins twice, otherwise we get
  44740. * infinite recursion in overridden methods.
  44741. */
  44742. return;
  44743. }
  44744. if (_.isBoolean(plugin.enabled) && plugin.enabled || _.isFunction(plugin.enabled) && plugin.enabled(this.plugged) || _.isNil(plugin.enabled)) {
  44745. _.extend(plugin, this.properties);
  44746. if (plugin.dependencies) {
  44747. this.loadPluginDependencies(plugin);
  44748. }
  44749. this.applyOverrides(plugin);
  44750. if (typeof plugin.initialize === "function") {
  44751. plugin.initialize.bind(plugin)(this);
  44752. }
  44753. this.initialized_plugins.push(plugin.__name__);
  44754. }
  44755. },
  44756. // `registerPlugin` registers (or inserts, if you'd like) a plugin,
  44757. // by adding it to the `plugins` map on the PluginSocket instance.
  44758. registerPlugin: function registerPlugin(name, plugin) {
  44759. if (name in this.plugins) {
  44760. throw new Error('Error: Plugin name ' + name + ' is already taken');
  44761. }
  44762. plugin.__name__ = name;
  44763. this.plugins[name] = plugin;
  44764. },
  44765. // `initializePlugins` should get called once all plugins have been
  44766. // registered. It will then iterate through all the plugins, calling
  44767. // `initializePlugin` for each.
  44768. // The passed in properties variable is an object with attributes and methods
  44769. // which will be attached to the plugins.
  44770. initializePlugins: function initializePlugins() {
  44771. var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  44772. var whitelist = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  44773. var blacklist = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  44774. if (!_.size(this.plugins)) {
  44775. return;
  44776. }
  44777. this.properties = properties;
  44778. this.allowed_plugins = _.pickBy(this.plugins, function (plugin, key) {
  44779. return (!whitelist.length || whitelist.length && _.includes(whitelist, key)) && !_.includes(blacklist, key);
  44780. });
  44781. _.each(_.values(this.allowed_plugins), this.initializePlugin.bind(this));
  44782. }
  44783. });
  44784. function enable(object, name, attrname) {
  44785. // Call the `enable` method to make an object pluggable
  44786. //
  44787. // It takes three parameters:
  44788. // - `object`: The object that gets made pluggable.
  44789. // - `name`: The string name by which the now pluggable object
  44790. // may be referenced on the __super__ obj (in overrides).
  44791. // The default value is "plugged".
  44792. // - `attrname`: The string name of the attribute on the now
  44793. // pluggable object, which refers to the PluginSocket instance
  44794. // that gets created.
  44795. if (typeof attrname === "undefined") {
  44796. attrname = "pluginSocket";
  44797. }
  44798. if (typeof name === 'undefined') {
  44799. name = 'plugged';
  44800. }
  44801. var ref = {};
  44802. ref[attrname] = new PluginSocket(object, name);
  44803. return _.extend(object, ref);
  44804. }
  44805. exports.enable = enable;
  44806. exports.default = {
  44807. enable: enable
  44808. };
  44809. });
  44810. //# sourceMappingURL=pluggable.js.map
  44811. /***/ }),
  44812. /***/ "./node_modules/process/browser.js":
  44813. /*!*****************************************!*\
  44814. !*** ./node_modules/process/browser.js ***!
  44815. \*****************************************/
  44816. /*! no static exports found */
  44817. /***/ (function(module, exports) {
  44818. // shim for using process in browser
  44819. var process = module.exports = {};
  44820. // cached from whatever global is present so that test runners that stub it
  44821. // don't break things. But we need to wrap it in a try catch in case it is
  44822. // wrapped in strict mode code which doesn't define any globals. It's inside a
  44823. // function because try/catches deoptimize in certain engines.
  44824. var cachedSetTimeout;
  44825. var cachedClearTimeout;
  44826. function defaultSetTimout() {
  44827. throw new Error('setTimeout has not been defined');
  44828. }
  44829. function defaultClearTimeout () {
  44830. throw new Error('clearTimeout has not been defined');
  44831. }
  44832. (function () {
  44833. try {
  44834. if (typeof setTimeout === 'function') {
  44835. cachedSetTimeout = setTimeout;
  44836. } else {
  44837. cachedSetTimeout = defaultSetTimout;
  44838. }
  44839. } catch (e) {
  44840. cachedSetTimeout = defaultSetTimout;
  44841. }
  44842. try {
  44843. if (typeof clearTimeout === 'function') {
  44844. cachedClearTimeout = clearTimeout;
  44845. } else {
  44846. cachedClearTimeout = defaultClearTimeout;
  44847. }
  44848. } catch (e) {
  44849. cachedClearTimeout = defaultClearTimeout;
  44850. }
  44851. } ())
  44852. function runTimeout(fun) {
  44853. if (cachedSetTimeout === setTimeout) {
  44854. //normal enviroments in sane situations
  44855. return setTimeout(fun, 0);
  44856. }
  44857. // if setTimeout wasn't available but was latter defined
  44858. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  44859. cachedSetTimeout = setTimeout;
  44860. return setTimeout(fun, 0);
  44861. }
  44862. try {
  44863. // when when somebody has screwed with setTimeout but no I.E. maddness
  44864. return cachedSetTimeout(fun, 0);
  44865. } catch(e){
  44866. try {
  44867. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  44868. return cachedSetTimeout.call(null, fun, 0);
  44869. } catch(e){
  44870. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  44871. return cachedSetTimeout.call(this, fun, 0);
  44872. }
  44873. }
  44874. }
  44875. function runClearTimeout(marker) {
  44876. if (cachedClearTimeout === clearTimeout) {
  44877. //normal enviroments in sane situations
  44878. return clearTimeout(marker);
  44879. }
  44880. // if clearTimeout wasn't available but was latter defined
  44881. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  44882. cachedClearTimeout = clearTimeout;
  44883. return clearTimeout(marker);
  44884. }
  44885. try {
  44886. // when when somebody has screwed with setTimeout but no I.E. maddness
  44887. return cachedClearTimeout(marker);
  44888. } catch (e){
  44889. try {
  44890. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  44891. return cachedClearTimeout.call(null, marker);
  44892. } catch (e){
  44893. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  44894. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  44895. return cachedClearTimeout.call(this, marker);
  44896. }
  44897. }
  44898. }
  44899. var queue = [];
  44900. var draining = false;
  44901. var currentQueue;
  44902. var queueIndex = -1;
  44903. function cleanUpNextTick() {
  44904. if (!draining || !currentQueue) {
  44905. return;
  44906. }
  44907. draining = false;
  44908. if (currentQueue.length) {
  44909. queue = currentQueue.concat(queue);
  44910. } else {
  44911. queueIndex = -1;
  44912. }
  44913. if (queue.length) {
  44914. drainQueue();
  44915. }
  44916. }
  44917. function drainQueue() {
  44918. if (draining) {
  44919. return;
  44920. }
  44921. var timeout = runTimeout(cleanUpNextTick);
  44922. draining = true;
  44923. var len = queue.length;
  44924. while(len) {
  44925. currentQueue = queue;
  44926. queue = [];
  44927. while (++queueIndex < len) {
  44928. if (currentQueue) {
  44929. currentQueue[queueIndex].run();
  44930. }
  44931. }
  44932. queueIndex = -1;
  44933. len = queue.length;
  44934. }
  44935. currentQueue = null;
  44936. draining = false;
  44937. runClearTimeout(timeout);
  44938. }
  44939. process.nextTick = function (fun) {
  44940. var args = new Array(arguments.length - 1);
  44941. if (arguments.length > 1) {
  44942. for (var i = 1; i < arguments.length; i++) {
  44943. args[i - 1] = arguments[i];
  44944. }
  44945. }
  44946. queue.push(new Item(fun, args));
  44947. if (queue.length === 1 && !draining) {
  44948. runTimeout(drainQueue);
  44949. }
  44950. };
  44951. // v8 likes predictible objects
  44952. function Item(fun, array) {
  44953. this.fun = fun;
  44954. this.array = array;
  44955. }
  44956. Item.prototype.run = function () {
  44957. this.fun.apply(null, this.array);
  44958. };
  44959. process.title = 'browser';
  44960. process.browser = true;
  44961. process.env = {};
  44962. process.argv = [];
  44963. process.version = ''; // empty string to avoid regexp issues
  44964. process.versions = {};
  44965. function noop() {}
  44966. process.on = noop;
  44967. process.addListener = noop;
  44968. process.once = noop;
  44969. process.off = noop;
  44970. process.removeListener = noop;
  44971. process.removeAllListeners = noop;
  44972. process.emit = noop;
  44973. process.prependListener = noop;
  44974. process.prependOnceListener = noop;
  44975. process.listeners = function (name) { return [] }
  44976. process.binding = function (name) {
  44977. throw new Error('process.binding is not supported');
  44978. };
  44979. process.cwd = function () { return '/' };
  44980. process.chdir = function (dir) {
  44981. throw new Error('process.chdir is not supported');
  44982. };
  44983. process.umask = function() { return 0; };
  44984. /***/ }),
  44985. /***/ "./node_modules/sizzle/dist/sizzle.js":
  44986. /*!********************************************!*\
  44987. !*** ./node_modules/sizzle/dist/sizzle.js ***!
  44988. \********************************************/
  44989. /*! no static exports found */
  44990. /***/ (function(module, exports, __webpack_require__) {
  44991. var __WEBPACK_AMD_DEFINE_RESULT__;/*!
  44992. * Sizzle CSS Selector Engine v2.3.3
  44993. * https://sizzlejs.com/
  44994. *
  44995. * Copyright jQuery Foundation and other contributors
  44996. * Released under the MIT license
  44997. * http://jquery.org/license
  44998. *
  44999. * Date: 2016-08-08
  45000. */
  45001. (function( window ) {
  45002. var i,
  45003. support,
  45004. Expr,
  45005. getText,
  45006. isXML,
  45007. tokenize,
  45008. compile,
  45009. select,
  45010. outermostContext,
  45011. sortInput,
  45012. hasDuplicate,
  45013. // Local document vars
  45014. setDocument,
  45015. document,
  45016. docElem,
  45017. documentIsHTML,
  45018. rbuggyQSA,
  45019. rbuggyMatches,
  45020. matches,
  45021. contains,
  45022. // Instance-specific data
  45023. expando = "sizzle" + 1 * new Date(),
  45024. preferredDoc = window.document,
  45025. dirruns = 0,
  45026. done = 0,
  45027. classCache = createCache(),
  45028. tokenCache = createCache(),
  45029. compilerCache = createCache(),
  45030. sortOrder = function( a, b ) {
  45031. if ( a === b ) {
  45032. hasDuplicate = true;
  45033. }
  45034. return 0;
  45035. },
  45036. // Instance methods
  45037. hasOwn = ({}).hasOwnProperty,
  45038. arr = [],
  45039. pop = arr.pop,
  45040. push_native = arr.push,
  45041. push = arr.push,
  45042. slice = arr.slice,
  45043. // Use a stripped-down indexOf as it's faster than native
  45044. // https://jsperf.com/thor-indexof-vs-for/5
  45045. indexOf = function( list, elem ) {
  45046. var i = 0,
  45047. len = list.length;
  45048. for ( ; i < len; i++ ) {
  45049. if ( list[i] === elem ) {
  45050. return i;
  45051. }
  45052. }
  45053. return -1;
  45054. },
  45055. booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
  45056. // Regular expressions
  45057. // http://www.w3.org/TR/css3-selectors/#whitespace
  45058. whitespace = "[\\x20\\t\\r\\n\\f]",
  45059. // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
  45060. identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+",
  45061. // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
  45062. attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
  45063. // Operator (capture 2)
  45064. "*([*^$|!~]?=)" + whitespace +
  45065. // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
  45066. "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
  45067. "*\\]",
  45068. pseudos = ":(" + identifier + ")(?:\\((" +
  45069. // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
  45070. // 1. quoted (capture 3; capture 4 or capture 5)
  45071. "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
  45072. // 2. simple (capture 6)
  45073. "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
  45074. // 3. anything else (capture 2)
  45075. ".*" +
  45076. ")\\)|)",
  45077. // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
  45078. rwhitespace = new RegExp( whitespace + "+", "g" ),
  45079. rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
  45080. rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
  45081. rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
  45082. rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
  45083. rpseudo = new RegExp( pseudos ),
  45084. ridentifier = new RegExp( "^" + identifier + "$" ),
  45085. matchExpr = {
  45086. "ID": new RegExp( "^#(" + identifier + ")" ),
  45087. "CLASS": new RegExp( "^\\.(" + identifier + ")" ),
  45088. "TAG": new RegExp( "^(" + identifier + "|[*])" ),
  45089. "ATTR": new RegExp( "^" + attributes ),
  45090. "PSEUDO": new RegExp( "^" + pseudos ),
  45091. "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
  45092. "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
  45093. "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
  45094. "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
  45095. // For use in libraries implementing .is()
  45096. // We use this for POS matching in `select`
  45097. "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
  45098. whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
  45099. },
  45100. rinputs = /^(?:input|select|textarea|button)$/i,
  45101. rheader = /^h\d$/i,
  45102. rnative = /^[^{]+\{\s*\[native \w/,
  45103. // Easily-parseable/retrievable ID or TAG or CLASS selectors
  45104. rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
  45105. rsibling = /[+~]/,
  45106. // CSS escapes
  45107. // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
  45108. runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
  45109. funescape = function( _, escaped, escapedWhitespace ) {
  45110. var high = "0x" + escaped - 0x10000;
  45111. // NaN means non-codepoint
  45112. // Support: Firefox<24
  45113. // Workaround erroneous numeric interpretation of +"0x"
  45114. return high !== high || escapedWhitespace ?
  45115. escaped :
  45116. high < 0 ?
  45117. // BMP codepoint
  45118. String.fromCharCode( high + 0x10000 ) :
  45119. // Supplemental Plane codepoint (surrogate pair)
  45120. String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
  45121. },
  45122. // CSS string/identifier serialization
  45123. // https://drafts.csswg.org/cssom/#common-serializing-idioms
  45124. rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,
  45125. fcssescape = function( ch, asCodePoint ) {
  45126. if ( asCodePoint ) {
  45127. // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
  45128. if ( ch === "\0" ) {
  45129. return "\uFFFD";
  45130. }
  45131. // Control characters and (dependent upon position) numbers get escaped as code points
  45132. return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " ";
  45133. }
  45134. // Other potentially-special ASCII characters get backslash-escaped
  45135. return "\\" + ch;
  45136. },
  45137. // Used for iframes
  45138. // See setDocument()
  45139. // Removing the function wrapper causes a "Permission Denied"
  45140. // error in IE
  45141. unloadHandler = function() {
  45142. setDocument();
  45143. },
  45144. disabledAncestor = addCombinator(
  45145. function( elem ) {
  45146. return elem.disabled === true && ("form" in elem || "label" in elem);
  45147. },
  45148. { dir: "parentNode", next: "legend" }
  45149. );
  45150. // Optimize for push.apply( _, NodeList )
  45151. try {
  45152. push.apply(
  45153. (arr = slice.call( preferredDoc.childNodes )),
  45154. preferredDoc.childNodes
  45155. );
  45156. // Support: Android<4.0
  45157. // Detect silently failing push.apply
  45158. arr[ preferredDoc.childNodes.length ].nodeType;
  45159. } catch ( e ) {
  45160. push = { apply: arr.length ?
  45161. // Leverage slice if possible
  45162. function( target, els ) {
  45163. push_native.apply( target, slice.call(els) );
  45164. } :
  45165. // Support: IE<9
  45166. // Otherwise append directly
  45167. function( target, els ) {
  45168. var j = target.length,
  45169. i = 0;
  45170. // Can't trust NodeList.length
  45171. while ( (target[j++] = els[i++]) ) {}
  45172. target.length = j - 1;
  45173. }
  45174. };
  45175. }
  45176. function Sizzle( selector, context, results, seed ) {
  45177. var m, i, elem, nid, match, groups, newSelector,
  45178. newContext = context && context.ownerDocument,
  45179. // nodeType defaults to 9, since context defaults to document
  45180. nodeType = context ? context.nodeType : 9;
  45181. results = results || [];
  45182. // Return early from calls with invalid selector or context
  45183. if ( typeof selector !== "string" || !selector ||
  45184. nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
  45185. return results;
  45186. }
  45187. // Try to shortcut find operations (as opposed to filters) in HTML documents
  45188. if ( !seed ) {
  45189. if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
  45190. setDocument( context );
  45191. }
  45192. context = context || document;
  45193. if ( documentIsHTML ) {
  45194. // If the selector is sufficiently simple, try using a "get*By*" DOM method
  45195. // (excepting DocumentFragment context, where the methods don't exist)
  45196. if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
  45197. // ID selector
  45198. if ( (m = match[1]) ) {
  45199. // Document context
  45200. if ( nodeType === 9 ) {
  45201. if ( (elem = context.getElementById( m )) ) {
  45202. // Support: IE, Opera, Webkit
  45203. // TODO: identify versions
  45204. // getElementById can match elements by name instead of ID
  45205. if ( elem.id === m ) {
  45206. results.push( elem );
  45207. return results;
  45208. }
  45209. } else {
  45210. return results;
  45211. }
  45212. // Element context
  45213. } else {
  45214. // Support: IE, Opera, Webkit
  45215. // TODO: identify versions
  45216. // getElementById can match elements by name instead of ID
  45217. if ( newContext && (elem = newContext.getElementById( m )) &&
  45218. contains( context, elem ) &&
  45219. elem.id === m ) {
  45220. results.push( elem );
  45221. return results;
  45222. }
  45223. }
  45224. // Type selector
  45225. } else if ( match[2] ) {
  45226. push.apply( results, context.getElementsByTagName( selector ) );
  45227. return results;
  45228. // Class selector
  45229. } else if ( (m = match[3]) && support.getElementsByClassName &&
  45230. context.getElementsByClassName ) {
  45231. push.apply( results, context.getElementsByClassName( m ) );
  45232. return results;
  45233. }
  45234. }
  45235. // Take advantage of querySelectorAll
  45236. if ( support.qsa &&
  45237. !compilerCache[ selector + " " ] &&
  45238. (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
  45239. if ( nodeType !== 1 ) {
  45240. newContext = context;
  45241. newSelector = selector;
  45242. // qSA looks outside Element context, which is not what we want
  45243. // Thanks to Andrew Dupont for this workaround technique
  45244. // Support: IE <=8
  45245. // Exclude object elements
  45246. } else if ( context.nodeName.toLowerCase() !== "object" ) {
  45247. // Capture the context ID, setting it first if necessary
  45248. if ( (nid = context.getAttribute( "id" )) ) {
  45249. nid = nid.replace( rcssescape, fcssescape );
  45250. } else {
  45251. context.setAttribute( "id", (nid = expando) );
  45252. }
  45253. // Prefix every selector in the list
  45254. groups = tokenize( selector );
  45255. i = groups.length;
  45256. while ( i-- ) {
  45257. groups[i] = "#" + nid + " " + toSelector( groups[i] );
  45258. }
  45259. newSelector = groups.join( "," );
  45260. // Expand context for sibling selectors
  45261. newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
  45262. context;
  45263. }
  45264. if ( newSelector ) {
  45265. try {
  45266. push.apply( results,
  45267. newContext.querySelectorAll( newSelector )
  45268. );
  45269. return results;
  45270. } catch ( qsaError ) {
  45271. } finally {
  45272. if ( nid === expando ) {
  45273. context.removeAttribute( "id" );
  45274. }
  45275. }
  45276. }
  45277. }
  45278. }
  45279. }
  45280. // All others
  45281. return select( selector.replace( rtrim, "$1" ), context, results, seed );
  45282. }
  45283. /**
  45284. * Create key-value caches of limited size
  45285. * @returns {function(string, object)} Returns the Object data after storing it on itself with
  45286. * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
  45287. * deleting the oldest entry
  45288. */
  45289. function createCache() {
  45290. var keys = [];
  45291. function cache( key, value ) {
  45292. // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
  45293. if ( keys.push( key + " " ) > Expr.cacheLength ) {
  45294. // Only keep the most recent entries
  45295. delete cache[ keys.shift() ];
  45296. }
  45297. return (cache[ key + " " ] = value);
  45298. }
  45299. return cache;
  45300. }
  45301. /**
  45302. * Mark a function for special use by Sizzle
  45303. * @param {Function} fn The function to mark
  45304. */
  45305. function markFunction( fn ) {
  45306. fn[ expando ] = true;
  45307. return fn;
  45308. }
  45309. /**
  45310. * Support testing using an element
  45311. * @param {Function} fn Passed the created element and returns a boolean result
  45312. */
  45313. function assert( fn ) {
  45314. var el = document.createElement("fieldset");
  45315. try {
  45316. return !!fn( el );
  45317. } catch (e) {
  45318. return false;
  45319. } finally {
  45320. // Remove from its parent by default
  45321. if ( el.parentNode ) {
  45322. el.parentNode.removeChild( el );
  45323. }
  45324. // release memory in IE
  45325. el = null;
  45326. }
  45327. }
  45328. /**
  45329. * Adds the same handler for all of the specified attrs
  45330. * @param {String} attrs Pipe-separated list of attributes
  45331. * @param {Function} handler The method that will be applied
  45332. */
  45333. function addHandle( attrs, handler ) {
  45334. var arr = attrs.split("|"),
  45335. i = arr.length;
  45336. while ( i-- ) {
  45337. Expr.attrHandle[ arr[i] ] = handler;
  45338. }
  45339. }
  45340. /**
  45341. * Checks document order of two siblings
  45342. * @param {Element} a
  45343. * @param {Element} b
  45344. * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
  45345. */
  45346. function siblingCheck( a, b ) {
  45347. var cur = b && a,
  45348. diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
  45349. a.sourceIndex - b.sourceIndex;
  45350. // Use IE sourceIndex if available on both nodes
  45351. if ( diff ) {
  45352. return diff;
  45353. }
  45354. // Check if b follows a
  45355. if ( cur ) {
  45356. while ( (cur = cur.nextSibling) ) {
  45357. if ( cur === b ) {
  45358. return -1;
  45359. }
  45360. }
  45361. }
  45362. return a ? 1 : -1;
  45363. }
  45364. /**
  45365. * Returns a function to use in pseudos for input types
  45366. * @param {String} type
  45367. */
  45368. function createInputPseudo( type ) {
  45369. return function( elem ) {
  45370. var name = elem.nodeName.toLowerCase();
  45371. return name === "input" && elem.type === type;
  45372. };
  45373. }
  45374. /**
  45375. * Returns a function to use in pseudos for buttons
  45376. * @param {String} type
  45377. */
  45378. function createButtonPseudo( type ) {
  45379. return function( elem ) {
  45380. var name = elem.nodeName.toLowerCase();
  45381. return (name === "input" || name === "button") && elem.type === type;
  45382. };
  45383. }
  45384. /**
  45385. * Returns a function to use in pseudos for :enabled/:disabled
  45386. * @param {Boolean} disabled true for :disabled; false for :enabled
  45387. */
  45388. function createDisabledPseudo( disabled ) {
  45389. // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
  45390. return function( elem ) {
  45391. // Only certain elements can match :enabled or :disabled
  45392. // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
  45393. // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
  45394. if ( "form" in elem ) {
  45395. // Check for inherited disabledness on relevant non-disabled elements:
  45396. // * listed form-associated elements in a disabled fieldset
  45397. // https://html.spec.whatwg.org/multipage/forms.html#category-listed
  45398. // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
  45399. // * option elements in a disabled optgroup
  45400. // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
  45401. // All such elements have a "form" property.
  45402. if ( elem.parentNode && elem.disabled === false ) {
  45403. // Option elements defer to a parent optgroup if present
  45404. if ( "label" in elem ) {
  45405. if ( "label" in elem.parentNode ) {
  45406. return elem.parentNode.disabled === disabled;
  45407. } else {
  45408. return elem.disabled === disabled;
  45409. }
  45410. }
  45411. // Support: IE 6 - 11
  45412. // Use the isDisabled shortcut property to check for disabled fieldset ancestors
  45413. return elem.isDisabled === disabled ||
  45414. // Where there is no isDisabled, check manually
  45415. /* jshint -W018 */
  45416. elem.isDisabled !== !disabled &&
  45417. disabledAncestor( elem ) === disabled;
  45418. }
  45419. return elem.disabled === disabled;
  45420. // Try to winnow out elements that can't be disabled before trusting the disabled property.
  45421. // Some victims get caught in our net (label, legend, menu, track), but it shouldn't
  45422. // even exist on them, let alone have a boolean value.
  45423. } else if ( "label" in elem ) {
  45424. return elem.disabled === disabled;
  45425. }
  45426. // Remaining elements are neither :enabled nor :disabled
  45427. return false;
  45428. };
  45429. }
  45430. /**
  45431. * Returns a function to use in pseudos for positionals
  45432. * @param {Function} fn
  45433. */
  45434. function createPositionalPseudo( fn ) {
  45435. return markFunction(function( argument ) {
  45436. argument = +argument;
  45437. return markFunction(function( seed, matches ) {
  45438. var j,
  45439. matchIndexes = fn( [], seed.length, argument ),
  45440. i = matchIndexes.length;
  45441. // Match elements found at the specified indexes
  45442. while ( i-- ) {
  45443. if ( seed[ (j = matchIndexes[i]) ] ) {
  45444. seed[j] = !(matches[j] = seed[j]);
  45445. }
  45446. }
  45447. });
  45448. });
  45449. }
  45450. /**
  45451. * Checks a node for validity as a Sizzle context
  45452. * @param {Element|Object=} context
  45453. * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
  45454. */
  45455. function testContext( context ) {
  45456. return context && typeof context.getElementsByTagName !== "undefined" && context;
  45457. }
  45458. // Expose support vars for convenience
  45459. support = Sizzle.support = {};
  45460. /**
  45461. * Detects XML nodes
  45462. * @param {Element|Object} elem An element or a document
  45463. * @returns {Boolean} True iff elem is a non-HTML XML node
  45464. */
  45465. isXML = Sizzle.isXML = function( elem ) {
  45466. // documentElement is verified for cases where it doesn't yet exist
  45467. // (such as loading iframes in IE - #4833)
  45468. var documentElement = elem && (elem.ownerDocument || elem).documentElement;
  45469. return documentElement ? documentElement.nodeName !== "HTML" : false;
  45470. };
  45471. /**
  45472. * Sets document-related variables once based on the current document
  45473. * @param {Element|Object} [doc] An element or document object to use to set the document
  45474. * @returns {Object} Returns the current document
  45475. */
  45476. setDocument = Sizzle.setDocument = function( node ) {
  45477. var hasCompare, subWindow,
  45478. doc = node ? node.ownerDocument || node : preferredDoc;
  45479. // Return early if doc is invalid or already selected
  45480. if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
  45481. return document;
  45482. }
  45483. // Update global variables
  45484. document = doc;
  45485. docElem = document.documentElement;
  45486. documentIsHTML = !isXML( document );
  45487. // Support: IE 9-11, Edge
  45488. // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
  45489. if ( preferredDoc !== document &&
  45490. (subWindow = document.defaultView) && subWindow.top !== subWindow ) {
  45491. // Support: IE 11, Edge
  45492. if ( subWindow.addEventListener ) {
  45493. subWindow.addEventListener( "unload", unloadHandler, false );
  45494. // Support: IE 9 - 10 only
  45495. } else if ( subWindow.attachEvent ) {
  45496. subWindow.attachEvent( "onunload", unloadHandler );
  45497. }
  45498. }
  45499. /* Attributes
  45500. ---------------------------------------------------------------------- */
  45501. // Support: IE<8
  45502. // Verify that getAttribute really returns attributes and not properties
  45503. // (excepting IE8 booleans)
  45504. support.attributes = assert(function( el ) {
  45505. el.className = "i";
  45506. return !el.getAttribute("className");
  45507. });
  45508. /* getElement(s)By*
  45509. ---------------------------------------------------------------------- */
  45510. // Check if getElementsByTagName("*") returns only elements
  45511. support.getElementsByTagName = assert(function( el ) {
  45512. el.appendChild( document.createComment("") );
  45513. return !el.getElementsByTagName("*").length;
  45514. });
  45515. // Support: IE<9
  45516. support.getElementsByClassName = rnative.test( document.getElementsByClassName );
  45517. // Support: IE<10
  45518. // Check if getElementById returns elements by name
  45519. // The broken getElementById methods don't pick up programmatically-set names,
  45520. // so use a roundabout getElementsByName test
  45521. support.getById = assert(function( el ) {
  45522. docElem.appendChild( el ).id = expando;
  45523. return !document.getElementsByName || !document.getElementsByName( expando ).length;
  45524. });
  45525. // ID filter and find
  45526. if ( support.getById ) {
  45527. Expr.filter["ID"] = function( id ) {
  45528. var attrId = id.replace( runescape, funescape );
  45529. return function( elem ) {
  45530. return elem.getAttribute("id") === attrId;
  45531. };
  45532. };
  45533. Expr.find["ID"] = function( id, context ) {
  45534. if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
  45535. var elem = context.getElementById( id );
  45536. return elem ? [ elem ] : [];
  45537. }
  45538. };
  45539. } else {
  45540. Expr.filter["ID"] = function( id ) {
  45541. var attrId = id.replace( runescape, funescape );
  45542. return function( elem ) {
  45543. var node = typeof elem.getAttributeNode !== "undefined" &&
  45544. elem.getAttributeNode("id");
  45545. return node && node.value === attrId;
  45546. };
  45547. };
  45548. // Support: IE 6 - 7 only
  45549. // getElementById is not reliable as a find shortcut
  45550. Expr.find["ID"] = function( id, context ) {
  45551. if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
  45552. var node, i, elems,
  45553. elem = context.getElementById( id );
  45554. if ( elem ) {
  45555. // Verify the id attribute
  45556. node = elem.getAttributeNode("id");
  45557. if ( node && node.value === id ) {
  45558. return [ elem ];
  45559. }
  45560. // Fall back on getElementsByName
  45561. elems = context.getElementsByName( id );
  45562. i = 0;
  45563. while ( (elem = elems[i++]) ) {
  45564. node = elem.getAttributeNode("id");
  45565. if ( node && node.value === id ) {
  45566. return [ elem ];
  45567. }
  45568. }
  45569. }
  45570. return [];
  45571. }
  45572. };
  45573. }
  45574. // Tag
  45575. Expr.find["TAG"] = support.getElementsByTagName ?
  45576. function( tag, context ) {
  45577. if ( typeof context.getElementsByTagName !== "undefined" ) {
  45578. return context.getElementsByTagName( tag );
  45579. // DocumentFragment nodes don't have gEBTN
  45580. } else if ( support.qsa ) {
  45581. return context.querySelectorAll( tag );
  45582. }
  45583. } :
  45584. function( tag, context ) {
  45585. var elem,
  45586. tmp = [],
  45587. i = 0,
  45588. // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
  45589. results = context.getElementsByTagName( tag );
  45590. // Filter out possible comments
  45591. if ( tag === "*" ) {
  45592. while ( (elem = results[i++]) ) {
  45593. if ( elem.nodeType === 1 ) {
  45594. tmp.push( elem );
  45595. }
  45596. }
  45597. return tmp;
  45598. }
  45599. return results;
  45600. };
  45601. // Class
  45602. Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
  45603. if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
  45604. return context.getElementsByClassName( className );
  45605. }
  45606. };
  45607. /* QSA/matchesSelector
  45608. ---------------------------------------------------------------------- */
  45609. // QSA and matchesSelector support
  45610. // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
  45611. rbuggyMatches = [];
  45612. // qSa(:focus) reports false when true (Chrome 21)
  45613. // We allow this because of a bug in IE8/9 that throws an error
  45614. // whenever `document.activeElement` is accessed on an iframe
  45615. // So, we allow :focus to pass through QSA all the time to avoid the IE error
  45616. // See https://bugs.jquery.com/ticket/13378
  45617. rbuggyQSA = [];
  45618. if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
  45619. // Build QSA regex
  45620. // Regex strategy adopted from Diego Perini
  45621. assert(function( el ) {
  45622. // Select is set to empty string on purpose
  45623. // This is to test IE's treatment of not explicitly
  45624. // setting a boolean content attribute,
  45625. // since its presence should be enough
  45626. // https://bugs.jquery.com/ticket/12359
  45627. docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" +
  45628. "<select id='" + expando + "-\r\\' msallowcapture=''>" +
  45629. "<option selected=''></option></select>";
  45630. // Support: IE8, Opera 11-12.16
  45631. // Nothing should be selected when empty strings follow ^= or $= or *=
  45632. // The test attribute must be unknown in Opera but "safe" for WinRT
  45633. // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
  45634. if ( el.querySelectorAll("[msallowcapture^='']").length ) {
  45635. rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
  45636. }
  45637. // Support: IE8
  45638. // Boolean attributes and "value" are not treated correctly
  45639. if ( !el.querySelectorAll("[selected]").length ) {
  45640. rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
  45641. }
  45642. // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
  45643. if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
  45644. rbuggyQSA.push("~=");
  45645. }
  45646. // Webkit/Opera - :checked should return selected option elements
  45647. // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
  45648. // IE8 throws error here and will not see later tests
  45649. if ( !el.querySelectorAll(":checked").length ) {
  45650. rbuggyQSA.push(":checked");
  45651. }
  45652. // Support: Safari 8+, iOS 8+
  45653. // https://bugs.webkit.org/show_bug.cgi?id=136851
  45654. // In-page `selector#id sibling-combinator selector` fails
  45655. if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) {
  45656. rbuggyQSA.push(".#.+[+~]");
  45657. }
  45658. });
  45659. assert(function( el ) {
  45660. el.innerHTML = "<a href='' disabled='disabled'></a>" +
  45661. "<select disabled='disabled'><option/></select>";
  45662. // Support: Windows 8 Native Apps
  45663. // The type and name attributes are restricted during .innerHTML assignment
  45664. var input = document.createElement("input");
  45665. input.setAttribute( "type", "hidden" );
  45666. el.appendChild( input ).setAttribute( "name", "D" );
  45667. // Support: IE8
  45668. // Enforce case-sensitivity of name attribute
  45669. if ( el.querySelectorAll("[name=d]").length ) {
  45670. rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
  45671. }
  45672. // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
  45673. // IE8 throws error here and will not see later tests
  45674. if ( el.querySelectorAll(":enabled").length !== 2 ) {
  45675. rbuggyQSA.push( ":enabled", ":disabled" );
  45676. }
  45677. // Support: IE9-11+
  45678. // IE's :disabled selector does not pick up the children of disabled fieldsets
  45679. docElem.appendChild( el ).disabled = true;
  45680. if ( el.querySelectorAll(":disabled").length !== 2 ) {
  45681. rbuggyQSA.push( ":enabled", ":disabled" );
  45682. }
  45683. // Opera 10-11 does not throw on post-comma invalid pseudos
  45684. el.querySelectorAll("*,:x");
  45685. rbuggyQSA.push(",.*:");
  45686. });
  45687. }
  45688. if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
  45689. docElem.webkitMatchesSelector ||
  45690. docElem.mozMatchesSelector ||
  45691. docElem.oMatchesSelector ||
  45692. docElem.msMatchesSelector) )) ) {
  45693. assert(function( el ) {
  45694. // Check to see if it's possible to do matchesSelector
  45695. // on a disconnected node (IE 9)
  45696. support.disconnectedMatch = matches.call( el, "*" );
  45697. // This should fail with an exception
  45698. // Gecko does not error, returns false instead
  45699. matches.call( el, "[s!='']:x" );
  45700. rbuggyMatches.push( "!=", pseudos );
  45701. });
  45702. }
  45703. rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
  45704. rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
  45705. /* Contains
  45706. ---------------------------------------------------------------------- */
  45707. hasCompare = rnative.test( docElem.compareDocumentPosition );
  45708. // Element contains another
  45709. // Purposefully self-exclusive
  45710. // As in, an element does not contain itself
  45711. contains = hasCompare || rnative.test( docElem.contains ) ?
  45712. function( a, b ) {
  45713. var adown = a.nodeType === 9 ? a.documentElement : a,
  45714. bup = b && b.parentNode;
  45715. return a === bup || !!( bup && bup.nodeType === 1 && (
  45716. adown.contains ?
  45717. adown.contains( bup ) :
  45718. a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
  45719. ));
  45720. } :
  45721. function( a, b ) {
  45722. if ( b ) {
  45723. while ( (b = b.parentNode) ) {
  45724. if ( b === a ) {
  45725. return true;
  45726. }
  45727. }
  45728. }
  45729. return false;
  45730. };
  45731. /* Sorting
  45732. ---------------------------------------------------------------------- */
  45733. // Document order sorting
  45734. sortOrder = hasCompare ?
  45735. function( a, b ) {
  45736. // Flag for duplicate removal
  45737. if ( a === b ) {
  45738. hasDuplicate = true;
  45739. return 0;
  45740. }
  45741. // Sort on method existence if only one input has compareDocumentPosition
  45742. var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
  45743. if ( compare ) {
  45744. return compare;
  45745. }
  45746. // Calculate position if both inputs belong to the same document
  45747. compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
  45748. a.compareDocumentPosition( b ) :
  45749. // Otherwise we know they are disconnected
  45750. 1;
  45751. // Disconnected nodes
  45752. if ( compare & 1 ||
  45753. (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
  45754. // Choose the first element that is related to our preferred document
  45755. if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
  45756. return -1;
  45757. }
  45758. if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
  45759. return 1;
  45760. }
  45761. // Maintain original order
  45762. return sortInput ?
  45763. ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
  45764. 0;
  45765. }
  45766. return compare & 4 ? -1 : 1;
  45767. } :
  45768. function( a, b ) {
  45769. // Exit early if the nodes are identical
  45770. if ( a === b ) {
  45771. hasDuplicate = true;
  45772. return 0;
  45773. }
  45774. var cur,
  45775. i = 0,
  45776. aup = a.parentNode,
  45777. bup = b.parentNode,
  45778. ap = [ a ],
  45779. bp = [ b ];
  45780. // Parentless nodes are either documents or disconnected
  45781. if ( !aup || !bup ) {
  45782. return a === document ? -1 :
  45783. b === document ? 1 :
  45784. aup ? -1 :
  45785. bup ? 1 :
  45786. sortInput ?
  45787. ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
  45788. 0;
  45789. // If the nodes are siblings, we can do a quick check
  45790. } else if ( aup === bup ) {
  45791. return siblingCheck( a, b );
  45792. }
  45793. // Otherwise we need full lists of their ancestors for comparison
  45794. cur = a;
  45795. while ( (cur = cur.parentNode) ) {
  45796. ap.unshift( cur );
  45797. }
  45798. cur = b;
  45799. while ( (cur = cur.parentNode) ) {
  45800. bp.unshift( cur );
  45801. }
  45802. // Walk down the tree looking for a discrepancy
  45803. while ( ap[i] === bp[i] ) {
  45804. i++;
  45805. }
  45806. return i ?
  45807. // Do a sibling check if the nodes have a common ancestor
  45808. siblingCheck( ap[i], bp[i] ) :
  45809. // Otherwise nodes in our document sort first
  45810. ap[i] === preferredDoc ? -1 :
  45811. bp[i] === preferredDoc ? 1 :
  45812. 0;
  45813. };
  45814. return document;
  45815. };
  45816. Sizzle.matches = function( expr, elements ) {
  45817. return Sizzle( expr, null, null, elements );
  45818. };
  45819. Sizzle.matchesSelector = function( elem, expr ) {
  45820. // Set document vars if needed
  45821. if ( ( elem.ownerDocument || elem ) !== document ) {
  45822. setDocument( elem );
  45823. }
  45824. // Make sure that attribute selectors are quoted
  45825. expr = expr.replace( rattributeQuotes, "='$1']" );
  45826. if ( support.matchesSelector && documentIsHTML &&
  45827. !compilerCache[ expr + " " ] &&
  45828. ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
  45829. ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
  45830. try {
  45831. var ret = matches.call( elem, expr );
  45832. // IE 9's matchesSelector returns false on disconnected nodes
  45833. if ( ret || support.disconnectedMatch ||
  45834. // As well, disconnected nodes are said to be in a document
  45835. // fragment in IE 9
  45836. elem.document && elem.document.nodeType !== 11 ) {
  45837. return ret;
  45838. }
  45839. } catch (e) {}
  45840. }
  45841. return Sizzle( expr, document, null, [ elem ] ).length > 0;
  45842. };
  45843. Sizzle.contains = function( context, elem ) {
  45844. // Set document vars if needed
  45845. if ( ( context.ownerDocument || context ) !== document ) {
  45846. setDocument( context );
  45847. }
  45848. return contains( context, elem );
  45849. };
  45850. Sizzle.attr = function( elem, name ) {
  45851. // Set document vars if needed
  45852. if ( ( elem.ownerDocument || elem ) !== document ) {
  45853. setDocument( elem );
  45854. }
  45855. var fn = Expr.attrHandle[ name.toLowerCase() ],
  45856. // Don't get fooled by Object.prototype properties (jQuery #13807)
  45857. val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
  45858. fn( elem, name, !documentIsHTML ) :
  45859. undefined;
  45860. return val !== undefined ?
  45861. val :
  45862. support.attributes || !documentIsHTML ?
  45863. elem.getAttribute( name ) :
  45864. (val = elem.getAttributeNode(name)) && val.specified ?
  45865. val.value :
  45866. null;
  45867. };
  45868. Sizzle.escape = function( sel ) {
  45869. return (sel + "").replace( rcssescape, fcssescape );
  45870. };
  45871. Sizzle.error = function( msg ) {
  45872. throw new Error( "Syntax error, unrecognized expression: " + msg );
  45873. };
  45874. /**
  45875. * Document sorting and removing duplicates
  45876. * @param {ArrayLike} results
  45877. */
  45878. Sizzle.uniqueSort = function( results ) {
  45879. var elem,
  45880. duplicates = [],
  45881. j = 0,
  45882. i = 0;
  45883. // Unless we *know* we can detect duplicates, assume their presence
  45884. hasDuplicate = !support.detectDuplicates;
  45885. sortInput = !support.sortStable && results.slice( 0 );
  45886. results.sort( sortOrder );
  45887. if ( hasDuplicate ) {
  45888. while ( (elem = results[i++]) ) {
  45889. if ( elem === results[ i ] ) {
  45890. j = duplicates.push( i );
  45891. }
  45892. }
  45893. while ( j-- ) {
  45894. results.splice( duplicates[ j ], 1 );
  45895. }
  45896. }
  45897. // Clear input after sorting to release objects
  45898. // See https://github.com/jquery/sizzle/pull/225
  45899. sortInput = null;
  45900. return results;
  45901. };
  45902. /**
  45903. * Utility function for retrieving the text value of an array of DOM nodes
  45904. * @param {Array|Element} elem
  45905. */
  45906. getText = Sizzle.getText = function( elem ) {
  45907. var node,
  45908. ret = "",
  45909. i = 0,
  45910. nodeType = elem.nodeType;
  45911. if ( !nodeType ) {
  45912. // If no nodeType, this is expected to be an array
  45913. while ( (node = elem[i++]) ) {
  45914. // Do not traverse comment nodes
  45915. ret += getText( node );
  45916. }
  45917. } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
  45918. // Use textContent for elements
  45919. // innerText usage removed for consistency of new lines (jQuery #11153)
  45920. if ( typeof elem.textContent === "string" ) {
  45921. return elem.textContent;
  45922. } else {
  45923. // Traverse its children
  45924. for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
  45925. ret += getText( elem );
  45926. }
  45927. }
  45928. } else if ( nodeType === 3 || nodeType === 4 ) {
  45929. return elem.nodeValue;
  45930. }
  45931. // Do not include comment or processing instruction nodes
  45932. return ret;
  45933. };
  45934. Expr = Sizzle.selectors = {
  45935. // Can be adjusted by the user
  45936. cacheLength: 50,
  45937. createPseudo: markFunction,
  45938. match: matchExpr,
  45939. attrHandle: {},
  45940. find: {},
  45941. relative: {
  45942. ">": { dir: "parentNode", first: true },
  45943. " ": { dir: "parentNode" },
  45944. "+": { dir: "previousSibling", first: true },
  45945. "~": { dir: "previousSibling" }
  45946. },
  45947. preFilter: {
  45948. "ATTR": function( match ) {
  45949. match[1] = match[1].replace( runescape, funescape );
  45950. // Move the given value to match[3] whether quoted or unquoted
  45951. match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
  45952. if ( match[2] === "~=" ) {
  45953. match[3] = " " + match[3] + " ";
  45954. }
  45955. return match.slice( 0, 4 );
  45956. },
  45957. "CHILD": function( match ) {
  45958. /* matches from matchExpr["CHILD"]
  45959. 1 type (only|nth|...)
  45960. 2 what (child|of-type)
  45961. 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
  45962. 4 xn-component of xn+y argument ([+-]?\d*n|)
  45963. 5 sign of xn-component
  45964. 6 x of xn-component
  45965. 7 sign of y-component
  45966. 8 y of y-component
  45967. */
  45968. match[1] = match[1].toLowerCase();
  45969. if ( match[1].slice( 0, 3 ) === "nth" ) {
  45970. // nth-* requires argument
  45971. if ( !match[3] ) {
  45972. Sizzle.error( match[0] );
  45973. }
  45974. // numeric x and y parameters for Expr.filter.CHILD
  45975. // remember that false/true cast respectively to 0/1
  45976. match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
  45977. match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
  45978. // other types prohibit arguments
  45979. } else if ( match[3] ) {
  45980. Sizzle.error( match[0] );
  45981. }
  45982. return match;
  45983. },
  45984. "PSEUDO": function( match ) {
  45985. var excess,
  45986. unquoted = !match[6] && match[2];
  45987. if ( matchExpr["CHILD"].test( match[0] ) ) {
  45988. return null;
  45989. }
  45990. // Accept quoted arguments as-is
  45991. if ( match[3] ) {
  45992. match[2] = match[4] || match[5] || "";
  45993. // Strip excess characters from unquoted arguments
  45994. } else if ( unquoted && rpseudo.test( unquoted ) &&
  45995. // Get excess from tokenize (recursively)
  45996. (excess = tokenize( unquoted, true )) &&
  45997. // advance to the next closing parenthesis
  45998. (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
  45999. // excess is a negative index
  46000. match[0] = match[0].slice( 0, excess );
  46001. match[2] = unquoted.slice( 0, excess );
  46002. }
  46003. // Return only captures needed by the pseudo filter method (type and argument)
  46004. return match.slice( 0, 3 );
  46005. }
  46006. },
  46007. filter: {
  46008. "TAG": function( nodeNameSelector ) {
  46009. var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
  46010. return nodeNameSelector === "*" ?
  46011. function() { return true; } :
  46012. function( elem ) {
  46013. return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
  46014. };
  46015. },
  46016. "CLASS": function( className ) {
  46017. var pattern = classCache[ className + " " ];
  46018. return pattern ||
  46019. (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
  46020. classCache( className, function( elem ) {
  46021. return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
  46022. });
  46023. },
  46024. "ATTR": function( name, operator, check ) {
  46025. return function( elem ) {
  46026. var result = Sizzle.attr( elem, name );
  46027. if ( result == null ) {
  46028. return operator === "!=";
  46029. }
  46030. if ( !operator ) {
  46031. return true;
  46032. }
  46033. result += "";
  46034. return operator === "=" ? result === check :
  46035. operator === "!=" ? result !== check :
  46036. operator === "^=" ? check && result.indexOf( check ) === 0 :
  46037. operator === "*=" ? check && result.indexOf( check ) > -1 :
  46038. operator === "$=" ? check && result.slice( -check.length ) === check :
  46039. operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
  46040. operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
  46041. false;
  46042. };
  46043. },
  46044. "CHILD": function( type, what, argument, first, last ) {
  46045. var simple = type.slice( 0, 3 ) !== "nth",
  46046. forward = type.slice( -4 ) !== "last",
  46047. ofType = what === "of-type";
  46048. return first === 1 && last === 0 ?
  46049. // Shortcut for :nth-*(n)
  46050. function( elem ) {
  46051. return !!elem.parentNode;
  46052. } :
  46053. function( elem, context, xml ) {
  46054. var cache, uniqueCache, outerCache, node, nodeIndex, start,
  46055. dir = simple !== forward ? "nextSibling" : "previousSibling",
  46056. parent = elem.parentNode,
  46057. name = ofType && elem.nodeName.toLowerCase(),
  46058. useCache = !xml && !ofType,
  46059. diff = false;
  46060. if ( parent ) {
  46061. // :(first|last|only)-(child|of-type)
  46062. if ( simple ) {
  46063. while ( dir ) {
  46064. node = elem;
  46065. while ( (node = node[ dir ]) ) {
  46066. if ( ofType ?
  46067. node.nodeName.toLowerCase() === name :
  46068. node.nodeType === 1 ) {
  46069. return false;
  46070. }
  46071. }
  46072. // Reverse direction for :only-* (if we haven't yet done so)
  46073. start = dir = type === "only" && !start && "nextSibling";
  46074. }
  46075. return true;
  46076. }
  46077. start = [ forward ? parent.firstChild : parent.lastChild ];
  46078. // non-xml :nth-child(...) stores cache data on `parent`
  46079. if ( forward && useCache ) {
  46080. // Seek `elem` from a previously-cached index
  46081. // ...in a gzip-friendly way
  46082. node = parent;
  46083. outerCache = node[ expando ] || (node[ expando ] = {});
  46084. // Support: IE <9 only
  46085. // Defend against cloned attroperties (jQuery gh-1709)
  46086. uniqueCache = outerCache[ node.uniqueID ] ||
  46087. (outerCache[ node.uniqueID ] = {});
  46088. cache = uniqueCache[ type ] || [];
  46089. nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
  46090. diff = nodeIndex && cache[ 2 ];
  46091. node = nodeIndex && parent.childNodes[ nodeIndex ];
  46092. while ( (node = ++nodeIndex && node && node[ dir ] ||
  46093. // Fallback to seeking `elem` from the start
  46094. (diff = nodeIndex = 0) || start.pop()) ) {
  46095. // When found, cache indexes on `parent` and break
  46096. if ( node.nodeType === 1 && ++diff && node === elem ) {
  46097. uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
  46098. break;
  46099. }
  46100. }
  46101. } else {
  46102. // Use previously-cached element index if available
  46103. if ( useCache ) {
  46104. // ...in a gzip-friendly way
  46105. node = elem;
  46106. outerCache = node[ expando ] || (node[ expando ] = {});
  46107. // Support: IE <9 only
  46108. // Defend against cloned attroperties (jQuery gh-1709)
  46109. uniqueCache = outerCache[ node.uniqueID ] ||
  46110. (outerCache[ node.uniqueID ] = {});
  46111. cache = uniqueCache[ type ] || [];
  46112. nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
  46113. diff = nodeIndex;
  46114. }
  46115. // xml :nth-child(...)
  46116. // or :nth-last-child(...) or :nth(-last)?-of-type(...)
  46117. if ( diff === false ) {
  46118. // Use the same loop as above to seek `elem` from the start
  46119. while ( (node = ++nodeIndex && node && node[ dir ] ||
  46120. (diff = nodeIndex = 0) || start.pop()) ) {
  46121. if ( ( ofType ?
  46122. node.nodeName.toLowerCase() === name :
  46123. node.nodeType === 1 ) &&
  46124. ++diff ) {
  46125. // Cache the index of each encountered element
  46126. if ( useCache ) {
  46127. outerCache = node[ expando ] || (node[ expando ] = {});
  46128. // Support: IE <9 only
  46129. // Defend against cloned attroperties (jQuery gh-1709)
  46130. uniqueCache = outerCache[ node.uniqueID ] ||
  46131. (outerCache[ node.uniqueID ] = {});
  46132. uniqueCache[ type ] = [ dirruns, diff ];
  46133. }
  46134. if ( node === elem ) {
  46135. break;
  46136. }
  46137. }
  46138. }
  46139. }
  46140. }
  46141. // Incorporate the offset, then check against cycle size
  46142. diff -= last;
  46143. return diff === first || ( diff % first === 0 && diff / first >= 0 );
  46144. }
  46145. };
  46146. },
  46147. "PSEUDO": function( pseudo, argument ) {
  46148. // pseudo-class names are case-insensitive
  46149. // http://www.w3.org/TR/selectors/#pseudo-classes
  46150. // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
  46151. // Remember that setFilters inherits from pseudos
  46152. var args,
  46153. fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
  46154. Sizzle.error( "unsupported pseudo: " + pseudo );
  46155. // The user may use createPseudo to indicate that
  46156. // arguments are needed to create the filter function
  46157. // just as Sizzle does
  46158. if ( fn[ expando ] ) {
  46159. return fn( argument );
  46160. }
  46161. // But maintain support for old signatures
  46162. if ( fn.length > 1 ) {
  46163. args = [ pseudo, pseudo, "", argument ];
  46164. return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
  46165. markFunction(function( seed, matches ) {
  46166. var idx,
  46167. matched = fn( seed, argument ),
  46168. i = matched.length;
  46169. while ( i-- ) {
  46170. idx = indexOf( seed, matched[i] );
  46171. seed[ idx ] = !( matches[ idx ] = matched[i] );
  46172. }
  46173. }) :
  46174. function( elem ) {
  46175. return fn( elem, 0, args );
  46176. };
  46177. }
  46178. return fn;
  46179. }
  46180. },
  46181. pseudos: {
  46182. // Potentially complex pseudos
  46183. "not": markFunction(function( selector ) {
  46184. // Trim the selector passed to compile
  46185. // to avoid treating leading and trailing
  46186. // spaces as combinators
  46187. var input = [],
  46188. results = [],
  46189. matcher = compile( selector.replace( rtrim, "$1" ) );
  46190. return matcher[ expando ] ?
  46191. markFunction(function( seed, matches, context, xml ) {
  46192. var elem,
  46193. unmatched = matcher( seed, null, xml, [] ),
  46194. i = seed.length;
  46195. // Match elements unmatched by `matcher`
  46196. while ( i-- ) {
  46197. if ( (elem = unmatched[i]) ) {
  46198. seed[i] = !(matches[i] = elem);
  46199. }
  46200. }
  46201. }) :
  46202. function( elem, context, xml ) {
  46203. input[0] = elem;
  46204. matcher( input, null, xml, results );
  46205. // Don't keep the element (issue #299)
  46206. input[0] = null;
  46207. return !results.pop();
  46208. };
  46209. }),
  46210. "has": markFunction(function( selector ) {
  46211. return function( elem ) {
  46212. return Sizzle( selector, elem ).length > 0;
  46213. };
  46214. }),
  46215. "contains": markFunction(function( text ) {
  46216. text = text.replace( runescape, funescape );
  46217. return function( elem ) {
  46218. return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
  46219. };
  46220. }),
  46221. // "Whether an element is represented by a :lang() selector
  46222. // is based solely on the element's language value
  46223. // being equal to the identifier C,
  46224. // or beginning with the identifier C immediately followed by "-".
  46225. // The matching of C against the element's language value is performed case-insensitively.
  46226. // The identifier C does not have to be a valid language name."
  46227. // http://www.w3.org/TR/selectors/#lang-pseudo
  46228. "lang": markFunction( function( lang ) {
  46229. // lang value must be a valid identifier
  46230. if ( !ridentifier.test(lang || "") ) {
  46231. Sizzle.error( "unsupported lang: " + lang );
  46232. }
  46233. lang = lang.replace( runescape, funescape ).toLowerCase();
  46234. return function( elem ) {
  46235. var elemLang;
  46236. do {
  46237. if ( (elemLang = documentIsHTML ?
  46238. elem.lang :
  46239. elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
  46240. elemLang = elemLang.toLowerCase();
  46241. return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
  46242. }
  46243. } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
  46244. return false;
  46245. };
  46246. }),
  46247. // Miscellaneous
  46248. "target": function( elem ) {
  46249. var hash = window.location && window.location.hash;
  46250. return hash && hash.slice( 1 ) === elem.id;
  46251. },
  46252. "root": function( elem ) {
  46253. return elem === docElem;
  46254. },
  46255. "focus": function( elem ) {
  46256. return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
  46257. },
  46258. // Boolean properties
  46259. "enabled": createDisabledPseudo( false ),
  46260. "disabled": createDisabledPseudo( true ),
  46261. "checked": function( elem ) {
  46262. // In CSS3, :checked should return both checked and selected elements
  46263. // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
  46264. var nodeName = elem.nodeName.toLowerCase();
  46265. return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
  46266. },
  46267. "selected": function( elem ) {
  46268. // Accessing this property makes selected-by-default
  46269. // options in Safari work properly
  46270. if ( elem.parentNode ) {
  46271. elem.parentNode.selectedIndex;
  46272. }
  46273. return elem.selected === true;
  46274. },
  46275. // Contents
  46276. "empty": function( elem ) {
  46277. // http://www.w3.org/TR/selectors/#empty-pseudo
  46278. // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
  46279. // but not by others (comment: 8; processing instruction: 7; etc.)
  46280. // nodeType < 6 works because attributes (2) do not appear as children
  46281. for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
  46282. if ( elem.nodeType < 6 ) {
  46283. return false;
  46284. }
  46285. }
  46286. return true;
  46287. },
  46288. "parent": function( elem ) {
  46289. return !Expr.pseudos["empty"]( elem );
  46290. },
  46291. // Element/input types
  46292. "header": function( elem ) {
  46293. return rheader.test( elem.nodeName );
  46294. },
  46295. "input": function( elem ) {
  46296. return rinputs.test( elem.nodeName );
  46297. },
  46298. "button": function( elem ) {
  46299. var name = elem.nodeName.toLowerCase();
  46300. return name === "input" && elem.type === "button" || name === "button";
  46301. },
  46302. "text": function( elem ) {
  46303. var attr;
  46304. return elem.nodeName.toLowerCase() === "input" &&
  46305. elem.type === "text" &&
  46306. // Support: IE<8
  46307. // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
  46308. ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
  46309. },
  46310. // Position-in-collection
  46311. "first": createPositionalPseudo(function() {
  46312. return [ 0 ];
  46313. }),
  46314. "last": createPositionalPseudo(function( matchIndexes, length ) {
  46315. return [ length - 1 ];
  46316. }),
  46317. "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
  46318. return [ argument < 0 ? argument + length : argument ];
  46319. }),
  46320. "even": createPositionalPseudo(function( matchIndexes, length ) {
  46321. var i = 0;
  46322. for ( ; i < length; i += 2 ) {
  46323. matchIndexes.push( i );
  46324. }
  46325. return matchIndexes;
  46326. }),
  46327. "odd": createPositionalPseudo(function( matchIndexes, length ) {
  46328. var i = 1;
  46329. for ( ; i < length; i += 2 ) {
  46330. matchIndexes.push( i );
  46331. }
  46332. return matchIndexes;
  46333. }),
  46334. "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
  46335. var i = argument < 0 ? argument + length : argument;
  46336. for ( ; --i >= 0; ) {
  46337. matchIndexes.push( i );
  46338. }
  46339. return matchIndexes;
  46340. }),
  46341. "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
  46342. var i = argument < 0 ? argument + length : argument;
  46343. for ( ; ++i < length; ) {
  46344. matchIndexes.push( i );
  46345. }
  46346. return matchIndexes;
  46347. })
  46348. }
  46349. };
  46350. Expr.pseudos["nth"] = Expr.pseudos["eq"];
  46351. // Add button/input type pseudos
  46352. for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
  46353. Expr.pseudos[ i ] = createInputPseudo( i );
  46354. }
  46355. for ( i in { submit: true, reset: true } ) {
  46356. Expr.pseudos[ i ] = createButtonPseudo( i );
  46357. }
  46358. // Easy API for creating new setFilters
  46359. function setFilters() {}
  46360. setFilters.prototype = Expr.filters = Expr.pseudos;
  46361. Expr.setFilters = new setFilters();
  46362. tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
  46363. var matched, match, tokens, type,
  46364. soFar, groups, preFilters,
  46365. cached = tokenCache[ selector + " " ];
  46366. if ( cached ) {
  46367. return parseOnly ? 0 : cached.slice( 0 );
  46368. }
  46369. soFar = selector;
  46370. groups = [];
  46371. preFilters = Expr.preFilter;
  46372. while ( soFar ) {
  46373. // Comma and first run
  46374. if ( !matched || (match = rcomma.exec( soFar )) ) {
  46375. if ( match ) {
  46376. // Don't consume trailing commas as valid
  46377. soFar = soFar.slice( match[0].length ) || soFar;
  46378. }
  46379. groups.push( (tokens = []) );
  46380. }
  46381. matched = false;
  46382. // Combinators
  46383. if ( (match = rcombinators.exec( soFar )) ) {
  46384. matched = match.shift();
  46385. tokens.push({
  46386. value: matched,
  46387. // Cast descendant combinators to space
  46388. type: match[0].replace( rtrim, " " )
  46389. });
  46390. soFar = soFar.slice( matched.length );
  46391. }
  46392. // Filters
  46393. for ( type in Expr.filter ) {
  46394. if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
  46395. (match = preFilters[ type ]( match ))) ) {
  46396. matched = match.shift();
  46397. tokens.push({
  46398. value: matched,
  46399. type: type,
  46400. matches: match
  46401. });
  46402. soFar = soFar.slice( matched.length );
  46403. }
  46404. }
  46405. if ( !matched ) {
  46406. break;
  46407. }
  46408. }
  46409. // Return the length of the invalid excess
  46410. // if we're just parsing
  46411. // Otherwise, throw an error or return tokens
  46412. return parseOnly ?
  46413. soFar.length :
  46414. soFar ?
  46415. Sizzle.error( selector ) :
  46416. // Cache the tokens
  46417. tokenCache( selector, groups ).slice( 0 );
  46418. };
  46419. function toSelector( tokens ) {
  46420. var i = 0,
  46421. len = tokens.length,
  46422. selector = "";
  46423. for ( ; i < len; i++ ) {
  46424. selector += tokens[i].value;
  46425. }
  46426. return selector;
  46427. }
  46428. function addCombinator( matcher, combinator, base ) {
  46429. var dir = combinator.dir,
  46430. skip = combinator.next,
  46431. key = skip || dir,
  46432. checkNonElements = base && key === "parentNode",
  46433. doneName = done++;
  46434. return combinator.first ?
  46435. // Check against closest ancestor/preceding element
  46436. function( elem, context, xml ) {
  46437. while ( (elem = elem[ dir ]) ) {
  46438. if ( elem.nodeType === 1 || checkNonElements ) {
  46439. return matcher( elem, context, xml );
  46440. }
  46441. }
  46442. return false;
  46443. } :
  46444. // Check against all ancestor/preceding elements
  46445. function( elem, context, xml ) {
  46446. var oldCache, uniqueCache, outerCache,
  46447. newCache = [ dirruns, doneName ];
  46448. // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
  46449. if ( xml ) {
  46450. while ( (elem = elem[ dir ]) ) {
  46451. if ( elem.nodeType === 1 || checkNonElements ) {
  46452. if ( matcher( elem, context, xml ) ) {
  46453. return true;
  46454. }
  46455. }
  46456. }
  46457. } else {
  46458. while ( (elem = elem[ dir ]) ) {
  46459. if ( elem.nodeType === 1 || checkNonElements ) {
  46460. outerCache = elem[ expando ] || (elem[ expando ] = {});
  46461. // Support: IE <9 only
  46462. // Defend against cloned attroperties (jQuery gh-1709)
  46463. uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});
  46464. if ( skip && skip === elem.nodeName.toLowerCase() ) {
  46465. elem = elem[ dir ] || elem;
  46466. } else if ( (oldCache = uniqueCache[ key ]) &&
  46467. oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
  46468. // Assign to newCache so results back-propagate to previous elements
  46469. return (newCache[ 2 ] = oldCache[ 2 ]);
  46470. } else {
  46471. // Reuse newcache so results back-propagate to previous elements
  46472. uniqueCache[ key ] = newCache;
  46473. // A match means we're done; a fail means we have to keep checking
  46474. if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
  46475. return true;
  46476. }
  46477. }
  46478. }
  46479. }
  46480. }
  46481. return false;
  46482. };
  46483. }
  46484. function elementMatcher( matchers ) {
  46485. return matchers.length > 1 ?
  46486. function( elem, context, xml ) {
  46487. var i = matchers.length;
  46488. while ( i-- ) {
  46489. if ( !matchers[i]( elem, context, xml ) ) {
  46490. return false;
  46491. }
  46492. }
  46493. return true;
  46494. } :
  46495. matchers[0];
  46496. }
  46497. function multipleContexts( selector, contexts, results ) {
  46498. var i = 0,
  46499. len = contexts.length;
  46500. for ( ; i < len; i++ ) {
  46501. Sizzle( selector, contexts[i], results );
  46502. }
  46503. return results;
  46504. }
  46505. function condense( unmatched, map, filter, context, xml ) {
  46506. var elem,
  46507. newUnmatched = [],
  46508. i = 0,
  46509. len = unmatched.length,
  46510. mapped = map != null;
  46511. for ( ; i < len; i++ ) {
  46512. if ( (elem = unmatched[i]) ) {
  46513. if ( !filter || filter( elem, context, xml ) ) {
  46514. newUnmatched.push( elem );
  46515. if ( mapped ) {
  46516. map.push( i );
  46517. }
  46518. }
  46519. }
  46520. }
  46521. return newUnmatched;
  46522. }
  46523. function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
  46524. if ( postFilter && !postFilter[ expando ] ) {
  46525. postFilter = setMatcher( postFilter );
  46526. }
  46527. if ( postFinder && !postFinder[ expando ] ) {
  46528. postFinder = setMatcher( postFinder, postSelector );
  46529. }
  46530. return markFunction(function( seed, results, context, xml ) {
  46531. var temp, i, elem,
  46532. preMap = [],
  46533. postMap = [],
  46534. preexisting = results.length,
  46535. // Get initial elements from seed or context
  46536. elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
  46537. // Prefilter to get matcher input, preserving a map for seed-results synchronization
  46538. matcherIn = preFilter && ( seed || !selector ) ?
  46539. condense( elems, preMap, preFilter, context, xml ) :
  46540. elems,
  46541. matcherOut = matcher ?
  46542. // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
  46543. postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
  46544. // ...intermediate processing is necessary
  46545. [] :
  46546. // ...otherwise use results directly
  46547. results :
  46548. matcherIn;
  46549. // Find primary matches
  46550. if ( matcher ) {
  46551. matcher( matcherIn, matcherOut, context, xml );
  46552. }
  46553. // Apply postFilter
  46554. if ( postFilter ) {
  46555. temp = condense( matcherOut, postMap );
  46556. postFilter( temp, [], context, xml );
  46557. // Un-match failing elements by moving them back to matcherIn
  46558. i = temp.length;
  46559. while ( i-- ) {
  46560. if ( (elem = temp[i]) ) {
  46561. matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
  46562. }
  46563. }
  46564. }
  46565. if ( seed ) {
  46566. if ( postFinder || preFilter ) {
  46567. if ( postFinder ) {
  46568. // Get the final matcherOut by condensing this intermediate into postFinder contexts
  46569. temp = [];
  46570. i = matcherOut.length;
  46571. while ( i-- ) {
  46572. if ( (elem = matcherOut[i]) ) {
  46573. // Restore matcherIn since elem is not yet a final match
  46574. temp.push( (matcherIn[i] = elem) );
  46575. }
  46576. }
  46577. postFinder( null, (matcherOut = []), temp, xml );
  46578. }
  46579. // Move matched elements from seed to results to keep them synchronized
  46580. i = matcherOut.length;
  46581. while ( i-- ) {
  46582. if ( (elem = matcherOut[i]) &&
  46583. (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
  46584. seed[temp] = !(results[temp] = elem);
  46585. }
  46586. }
  46587. }
  46588. // Add elements to results, through postFinder if defined
  46589. } else {
  46590. matcherOut = condense(
  46591. matcherOut === results ?
  46592. matcherOut.splice( preexisting, matcherOut.length ) :
  46593. matcherOut
  46594. );
  46595. if ( postFinder ) {
  46596. postFinder( null, results, matcherOut, xml );
  46597. } else {
  46598. push.apply( results, matcherOut );
  46599. }
  46600. }
  46601. });
  46602. }
  46603. function matcherFromTokens( tokens ) {
  46604. var checkContext, matcher, j,
  46605. len = tokens.length,
  46606. leadingRelative = Expr.relative[ tokens[0].type ],
  46607. implicitRelative = leadingRelative || Expr.relative[" "],
  46608. i = leadingRelative ? 1 : 0,
  46609. // The foundational matcher ensures that elements are reachable from top-level context(s)
  46610. matchContext = addCombinator( function( elem ) {
  46611. return elem === checkContext;
  46612. }, implicitRelative, true ),
  46613. matchAnyContext = addCombinator( function( elem ) {
  46614. return indexOf( checkContext, elem ) > -1;
  46615. }, implicitRelative, true ),
  46616. matchers = [ function( elem, context, xml ) {
  46617. var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
  46618. (checkContext = context).nodeType ?
  46619. matchContext( elem, context, xml ) :
  46620. matchAnyContext( elem, context, xml ) );
  46621. // Avoid hanging onto element (issue #299)
  46622. checkContext = null;
  46623. return ret;
  46624. } ];
  46625. for ( ; i < len; i++ ) {
  46626. if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
  46627. matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
  46628. } else {
  46629. matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
  46630. // Return special upon seeing a positional matcher
  46631. if ( matcher[ expando ] ) {
  46632. // Find the next relative operator (if any) for proper handling
  46633. j = ++i;
  46634. for ( ; j < len; j++ ) {
  46635. if ( Expr.relative[ tokens[j].type ] ) {
  46636. break;
  46637. }
  46638. }
  46639. return setMatcher(
  46640. i > 1 && elementMatcher( matchers ),
  46641. i > 1 && toSelector(
  46642. // If the preceding token was a descendant combinator, insert an implicit any-element `*`
  46643. tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
  46644. ).replace( rtrim, "$1" ),
  46645. matcher,
  46646. i < j && matcherFromTokens( tokens.slice( i, j ) ),
  46647. j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
  46648. j < len && toSelector( tokens )
  46649. );
  46650. }
  46651. matchers.push( matcher );
  46652. }
  46653. }
  46654. return elementMatcher( matchers );
  46655. }
  46656. function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
  46657. var bySet = setMatchers.length > 0,
  46658. byElement = elementMatchers.length > 0,
  46659. superMatcher = function( seed, context, xml, results, outermost ) {
  46660. var elem, j, matcher,
  46661. matchedCount = 0,
  46662. i = "0",
  46663. unmatched = seed && [],
  46664. setMatched = [],
  46665. contextBackup = outermostContext,
  46666. // We must always have either seed elements or outermost context
  46667. elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
  46668. // Use integer dirruns iff this is the outermost matcher
  46669. dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
  46670. len = elems.length;
  46671. if ( outermost ) {
  46672. outermostContext = context === document || context || outermost;
  46673. }
  46674. // Add elements passing elementMatchers directly to results
  46675. // Support: IE<9, Safari
  46676. // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
  46677. for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
  46678. if ( byElement && elem ) {
  46679. j = 0;
  46680. if ( !context && elem.ownerDocument !== document ) {
  46681. setDocument( elem );
  46682. xml = !documentIsHTML;
  46683. }
  46684. while ( (matcher = elementMatchers[j++]) ) {
  46685. if ( matcher( elem, context || document, xml) ) {
  46686. results.push( elem );
  46687. break;
  46688. }
  46689. }
  46690. if ( outermost ) {
  46691. dirruns = dirrunsUnique;
  46692. }
  46693. }
  46694. // Track unmatched elements for set filters
  46695. if ( bySet ) {
  46696. // They will have gone through all possible matchers
  46697. if ( (elem = !matcher && elem) ) {
  46698. matchedCount--;
  46699. }
  46700. // Lengthen the array for every element, matched or not
  46701. if ( seed ) {
  46702. unmatched.push( elem );
  46703. }
  46704. }
  46705. }
  46706. // `i` is now the count of elements visited above, and adding it to `matchedCount`
  46707. // makes the latter nonnegative.
  46708. matchedCount += i;
  46709. // Apply set filters to unmatched elements
  46710. // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
  46711. // equals `i`), unless we didn't visit _any_ elements in the above loop because we have
  46712. // no element matchers and no seed.
  46713. // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
  46714. // case, which will result in a "00" `matchedCount` that differs from `i` but is also
  46715. // numerically zero.
  46716. if ( bySet && i !== matchedCount ) {
  46717. j = 0;
  46718. while ( (matcher = setMatchers[j++]) ) {
  46719. matcher( unmatched, setMatched, context, xml );
  46720. }
  46721. if ( seed ) {
  46722. // Reintegrate element matches to eliminate the need for sorting
  46723. if ( matchedCount > 0 ) {
  46724. while ( i-- ) {
  46725. if ( !(unmatched[i] || setMatched[i]) ) {
  46726. setMatched[i] = pop.call( results );
  46727. }
  46728. }
  46729. }
  46730. // Discard index placeholder values to get only actual matches
  46731. setMatched = condense( setMatched );
  46732. }
  46733. // Add matches to results
  46734. push.apply( results, setMatched );
  46735. // Seedless set matches succeeding multiple successful matchers stipulate sorting
  46736. if ( outermost && !seed && setMatched.length > 0 &&
  46737. ( matchedCount + setMatchers.length ) > 1 ) {
  46738. Sizzle.uniqueSort( results );
  46739. }
  46740. }
  46741. // Override manipulation of globals by nested matchers
  46742. if ( outermost ) {
  46743. dirruns = dirrunsUnique;
  46744. outermostContext = contextBackup;
  46745. }
  46746. return unmatched;
  46747. };
  46748. return bySet ?
  46749. markFunction( superMatcher ) :
  46750. superMatcher;
  46751. }
  46752. compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
  46753. var i,
  46754. setMatchers = [],
  46755. elementMatchers = [],
  46756. cached = compilerCache[ selector + " " ];
  46757. if ( !cached ) {
  46758. // Generate a function of recursive functions that can be used to check each element
  46759. if ( !match ) {
  46760. match = tokenize( selector );
  46761. }
  46762. i = match.length;
  46763. while ( i-- ) {
  46764. cached = matcherFromTokens( match[i] );
  46765. if ( cached[ expando ] ) {
  46766. setMatchers.push( cached );
  46767. } else {
  46768. elementMatchers.push( cached );
  46769. }
  46770. }
  46771. // Cache the compiled function
  46772. cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
  46773. // Save selector and tokenization
  46774. cached.selector = selector;
  46775. }
  46776. return cached;
  46777. };
  46778. /**
  46779. * A low-level selection function that works with Sizzle's compiled
  46780. * selector functions
  46781. * @param {String|Function} selector A selector or a pre-compiled
  46782. * selector function built with Sizzle.compile
  46783. * @param {Element} context
  46784. * @param {Array} [results]
  46785. * @param {Array} [seed] A set of elements to match against
  46786. */
  46787. select = Sizzle.select = function( selector, context, results, seed ) {
  46788. var i, tokens, token, type, find,
  46789. compiled = typeof selector === "function" && selector,
  46790. match = !seed && tokenize( (selector = compiled.selector || selector) );
  46791. results = results || [];
  46792. // Try to minimize operations if there is only one selector in the list and no seed
  46793. // (the latter of which guarantees us context)
  46794. if ( match.length === 1 ) {
  46795. // Reduce context if the leading compound selector is an ID
  46796. tokens = match[0] = match[0].slice( 0 );
  46797. if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
  46798. context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) {
  46799. context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
  46800. if ( !context ) {
  46801. return results;
  46802. // Precompiled matchers will still verify ancestry, so step up a level
  46803. } else if ( compiled ) {
  46804. context = context.parentNode;
  46805. }
  46806. selector = selector.slice( tokens.shift().value.length );
  46807. }
  46808. // Fetch a seed set for right-to-left matching
  46809. i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
  46810. while ( i-- ) {
  46811. token = tokens[i];
  46812. // Abort if we hit a combinator
  46813. if ( Expr.relative[ (type = token.type) ] ) {
  46814. break;
  46815. }
  46816. if ( (find = Expr.find[ type ]) ) {
  46817. // Search, expanding context for leading sibling combinators
  46818. if ( (seed = find(
  46819. token.matches[0].replace( runescape, funescape ),
  46820. rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
  46821. )) ) {
  46822. // If seed is empty or no tokens remain, we can return early
  46823. tokens.splice( i, 1 );
  46824. selector = seed.length && toSelector( tokens );
  46825. if ( !selector ) {
  46826. push.apply( results, seed );
  46827. return results;
  46828. }
  46829. break;
  46830. }
  46831. }
  46832. }
  46833. }
  46834. // Compile and execute a filtering function if one is not provided
  46835. // Provide `match` to avoid retokenization if we modified the selector above
  46836. ( compiled || compile( selector, match ) )(
  46837. seed,
  46838. context,
  46839. !documentIsHTML,
  46840. results,
  46841. !context || rsibling.test( selector ) && testContext( context.parentNode ) || context
  46842. );
  46843. return results;
  46844. };
  46845. // One-time assignments
  46846. // Sort stability
  46847. support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
  46848. // Support: Chrome 14-35+
  46849. // Always assume duplicates if they aren't passed to the comparison function
  46850. support.detectDuplicates = !!hasDuplicate;
  46851. // Initialize against the default document
  46852. setDocument();
  46853. // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
  46854. // Detached nodes confoundingly follow *each other*
  46855. support.sortDetached = assert(function( el ) {
  46856. // Should return 1, but returns 4 (following)
  46857. return el.compareDocumentPosition( document.createElement("fieldset") ) & 1;
  46858. });
  46859. // Support: IE<8
  46860. // Prevent attribute/property "interpolation"
  46861. // https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
  46862. if ( !assert(function( el ) {
  46863. el.innerHTML = "<a href='#'></a>";
  46864. return el.firstChild.getAttribute("href") === "#" ;
  46865. }) ) {
  46866. addHandle( "type|href|height|width", function( elem, name, isXML ) {
  46867. if ( !isXML ) {
  46868. return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
  46869. }
  46870. });
  46871. }
  46872. // Support: IE<9
  46873. // Use defaultValue in place of getAttribute("value")
  46874. if ( !support.attributes || !assert(function( el ) {
  46875. el.innerHTML = "<input/>";
  46876. el.firstChild.setAttribute( "value", "" );
  46877. return el.firstChild.getAttribute( "value" ) === "";
  46878. }) ) {
  46879. addHandle( "value", function( elem, name, isXML ) {
  46880. if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
  46881. return elem.defaultValue;
  46882. }
  46883. });
  46884. }
  46885. // Support: IE<9
  46886. // Use getAttributeNode to fetch booleans when getAttribute lies
  46887. if ( !assert(function( el ) {
  46888. return el.getAttribute("disabled") == null;
  46889. }) ) {
  46890. addHandle( booleans, function( elem, name, isXML ) {
  46891. var val;
  46892. if ( !isXML ) {
  46893. return elem[ name ] === true ? name.toLowerCase() :
  46894. (val = elem.getAttributeNode( name )) && val.specified ?
  46895. val.value :
  46896. null;
  46897. }
  46898. });
  46899. }
  46900. // EXPOSE
  46901. var _sizzle = window.Sizzle;
  46902. Sizzle.noConflict = function() {
  46903. if ( window.Sizzle === Sizzle ) {
  46904. window.Sizzle = _sizzle;
  46905. }
  46906. return Sizzle;
  46907. };
  46908. if ( true ) {
  46909. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { return Sizzle; }).call(exports, __webpack_require__, exports, module),
  46910. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  46911. // Sizzle requires that there be a global window in Common-JS like environments
  46912. } else {}
  46913. // EXPOSE
  46914. })( window );
  46915. /***/ }),
  46916. /***/ "./node_modules/snabbdom/dist/snabbdom-attributes.js":
  46917. /*!***********************************************************!*\
  46918. !*** ./node_modules/snabbdom/dist/snabbdom-attributes.js ***!
  46919. \***********************************************************/
  46920. /*! no static exports found */
  46921. /***/ (function(module, exports, __webpack_require__) {
  46922. var require;var require;(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  46923. "use strict";
  46924. Object.defineProperty(exports, "__esModule", { value: true });
  46925. var booleanAttrs = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "compact", "controls", "declare",
  46926. "default", "defaultchecked", "defaultmuted", "defaultselected", "defer", "disabled", "draggable",
  46927. "enabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "itemscope", "loop", "multiple",
  46928. "muted", "nohref", "noresize", "noshade", "novalidate", "nowrap", "open", "pauseonexit", "readonly",
  46929. "required", "reversed", "scoped", "seamless", "selected", "sortable", "spellcheck", "translate",
  46930. "truespeed", "typemustmatch", "visible"];
  46931. var xlinkNS = 'http://www.w3.org/1999/xlink';
  46932. var xmlNS = 'http://www.w3.org/XML/1998/namespace';
  46933. var colonChar = 58;
  46934. var xChar = 120;
  46935. var booleanAttrsDict = Object.create(null);
  46936. for (var i = 0, len = booleanAttrs.length; i < len; i++) {
  46937. booleanAttrsDict[booleanAttrs[i]] = true;
  46938. }
  46939. function updateAttrs(oldVnode, vnode) {
  46940. var key, elm = vnode.elm, oldAttrs = oldVnode.data.attrs, attrs = vnode.data.attrs;
  46941. if (!oldAttrs && !attrs)
  46942. return;
  46943. if (oldAttrs === attrs)
  46944. return;
  46945. oldAttrs = oldAttrs || {};
  46946. attrs = attrs || {};
  46947. // update modified attributes, add new attributes
  46948. for (key in attrs) {
  46949. var cur = attrs[key];
  46950. var old = oldAttrs[key];
  46951. if (old !== cur) {
  46952. if (booleanAttrsDict[key]) {
  46953. if (cur) {
  46954. elm.setAttribute(key, "");
  46955. }
  46956. else {
  46957. elm.removeAttribute(key);
  46958. }
  46959. }
  46960. else {
  46961. if (key.charCodeAt(0) !== xChar) {
  46962. elm.setAttribute(key, cur);
  46963. }
  46964. else if (key.charCodeAt(3) === colonChar) {
  46965. // Assume xml namespace
  46966. elm.setAttributeNS(xmlNS, key, cur);
  46967. }
  46968. else if (key.charCodeAt(5) === colonChar) {
  46969. // Assume xlink namespace
  46970. elm.setAttributeNS(xlinkNS, key, cur);
  46971. }
  46972. else {
  46973. elm.setAttribute(key, cur);
  46974. }
  46975. }
  46976. }
  46977. }
  46978. // remove removed attributes
  46979. // use `in` operator since the previous `for` iteration uses it (.i.e. add even attributes with undefined value)
  46980. // the other option is to remove all attributes with value == undefined
  46981. for (key in oldAttrs) {
  46982. if (!(key in attrs)) {
  46983. elm.removeAttribute(key);
  46984. }
  46985. }
  46986. }
  46987. exports.attributesModule = { create: updateAttrs, update: updateAttrs };
  46988. exports.default = exports.attributesModule;
  46989. },{}]},{},[1])(1)
  46990. });
  46991. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy8ucmVnaXN0cnkubnBtanMub3JnL2Jyb3dzZXItcGFjay82LjAuMi9ub2RlX21vZHVsZXMvYnJvd3Nlci1wYWNrL19wcmVsdWRlLmpzIiwibW9kdWxlcy9hdHRyaWJ1dGVzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBO0FDQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIihmdW5jdGlvbiBlKHQsbixyKXtmdW5jdGlvbiBzKG8sdSl7aWYoIW5bb10pe2lmKCF0W29dKXt2YXIgYT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2lmKCF1JiZhKXJldHVybiBhKG8sITApO2lmKGkpcmV0dXJuIGkobywhMCk7dmFyIGY9bmV3IEVycm9yKFwiQ2Fubm90IGZpbmQgbW9kdWxlICdcIitvK1wiJ1wiKTt0aHJvdyBmLmNvZGU9XCJNT0RVTEVfTk9UX0ZPVU5EXCIsZn12YXIgbD1uW29dPXtleHBvcnRzOnt9fTt0W29dWzBdLmNhbGwobC5leHBvcnRzLGZ1bmN0aW9uKGUpe3ZhciBuPXRbb11bMV1bZV07cmV0dXJuIHMobj9uOmUpfSxsLGwuZXhwb3J0cyxlLHQsbixyKX1yZXR1cm4gbltvXS5leHBvcnRzfXZhciBpPXR5cGVvZiByZXF1aXJlPT1cImZ1bmN0aW9uXCImJnJlcXVpcmU7Zm9yKHZhciBvPTA7bzxyLmxlbmd0aDtvKyspcyhyW29dKTtyZXR1cm4gc30pIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG52YXIgYm9vbGVhbkF0dHJzID0gW1wiYWxsb3dmdWxsc2NyZWVuXCIsIFwiYXN5bmNcIiwgXCJhdXRvZm9jdXNcIiwgXCJhdXRvcGxheVwiLCBcImNoZWNrZWRcIiwgXCJjb21wYWN0XCIsIFwiY29udHJvbHNcIiwgXCJkZWNsYXJlXCIsXG4gICAgXCJkZWZhdWx0XCIsIFwiZGVmYXVsdGNoZWNrZWRcIiwgXCJkZWZhdWx0bXV0ZWRcIiwgXCJkZWZhdWx0c2VsZWN0ZWRcIiwgXCJkZWZlclwiLCBcImRpc2FibGVkXCIsIFwiZHJhZ2dhYmxlXCIsXG4gICAgXCJlbmFibGVkXCIsIFwiZm9ybW5vdmFsaWRhdGVcIiwgXCJoaWRkZW5cIiwgXCJpbmRldGVybWluYXRlXCIsIFwiaW5lcnRcIiwgXCJpc21hcFwiLCBcIml0ZW1zY29wZVwiLCBcImxvb3BcIiwgXCJtdWx0aXBsZVwiLFxuICAgIFwibXV0ZWRcIiwgXCJub2hyZWZcIiwgXCJub3Jlc2l6ZVwiLCBcIm5vc2hhZGVcIiwgXCJub3ZhbGlkYXRlXCIsIFwibm93cmFwXCIsIFwib3BlblwiLCBcInBhdXNlb25leGl0XCIsIFwicmVhZG9ubHlcIixcbiAgICBcInJlcXVpcmVkXCIsIFwicmV2ZXJzZWRcIiwgXCJzY29wZWRcIiwgXCJzZWFtbGVzc1wiLCBcInNlbGVjdGVkXCIsIFwic29ydGFibGVcIiwgXCJzcGVsbGNoZWNrXCIsIFwidHJhbnNsYXRlXCIsXG4gICAgXCJ0cnVlc3BlZWRcIiwgXCJ0eXBlbXVzdG1hdGNoXCIsIFwidmlzaWJsZVwiXTtcbnZhciB4bGlua05TID0gJ2h0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsnO1xudmFyIHhtbE5TID0gJ2h0dHA6Ly93d3cudzMub3JnL1hNTC8xOTk4L25hbWVzcGFjZSc7XG52YXIgY29sb25DaGFyID0gNTg7XG52YXIgeENoYXIgPSAxMjA7XG52YXIgYm9vbGVhbkF0dHJzRGljdCA9IE9iamVjdC5jcmVhdGUobnVsbCk7XG5mb3IgKHZhciBpID0gMCwgbGVuID0gYm9vbGVhbkF0dHJzLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7XG4gICAgYm9vbGVhbkF0dHJzRGljdFtib29sZWFuQXR0cnNbaV1dID0gdHJ1ZTtcbn1cbmZ1bmN0aW9uIHVwZGF0ZUF0dHJzKG9sZFZub2RlLCB2bm9kZSkge1xuICAgIHZhciBrZXksIGVsbSA9IHZub2RlLmVsbSwgb2xkQXR0cnMgPSBvbGRWbm9kZS5kYXRhLmF0dHJzLCBhdHRycyA9IHZub2RlLmRhdGEuYXR0cnM7XG4gICAgaWYgKCFvbGRBdHRycyAmJiAhYXR0cnMpXG4gICAgICAgIHJldHVybjtcbiAgICBpZiAob2xkQXR0cnMgPT09IGF0dHJzKVxuICAgICAgICByZXR1cm47XG4gICAgb2xkQXR0cnMgPSBvbGRBdHRycyB8fCB7fTtcbiAgICBhdHRycyA9IGF0dHJzIHx8IHt9O1xuICAgIC8vIHVwZGF0ZSBtb2RpZmllZCBhdHRyaWJ1dGVzLCBhZGQgbmV3IGF0dHJpYnV0ZXNcbiAgICBmb3IgKGtleSBpbiBhdHRycykge1xuICAgICAgICB2YXIgY3VyID0gYXR0cnNba2V5XTtcbiAgICAgICAgdmFyIG9sZCA9IG9sZEF0dHJzW2tleV07XG4gICAgICAgIGlmIChvbGQgIT09IGN1cikge1xuICAgICAgICAgICAgaWYgKGJvb2xlYW5BdHRyc0RpY3Rba2V5XSkge1xuICAgICAgICAgICAgICAgIGlmIChjdXIpIHtcbiAgICAgICAgICAgICAgICAgICAgZWxtLnNldEF0dHJpYnV0ZShrZXksIFwiXCIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZWxtLnJlbW92ZUF0dHJpYnV0ZShrZXkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChrZXkuY2hhckNvZGVBdCgwKSAhPT0geENoYXIpIHtcbiAgICAgICAgICAgICAgICAgICAgZWxtLnNldEF0dHJpYnV0ZShrZXksIGN1cik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGtleS5jaGFyQ29kZUF0KDMpID09PSBjb2xvbkNoYXIpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gQXNzdW1lIHhtbCBuYW1lc3BhY2VcbiAgICAgICAgICAgICAgICAgICAgZWxtLnNldEF0dHJpYnV0ZU5TKHhtbE5TLCBrZXksIGN1cik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGtleS5jaGFyQ29kZUF0KDUpID09PSBjb2xvbkNoYXIpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gQXNzdW1lIHhsaW5rIG5hbWVzcGFjZVxuICAgICAgICAgICAgICAgICAgICBlbG0uc2V0QXR0cmlidXRlTlMoeGxpbmtOUywga2V5LCBjdXIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZWxtLnNldEF0dHJpYnV0ZShrZXksIGN1cik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIC8vIHJlbW92ZSByZW1vdmVkIGF0dHJpYnV0ZXNcbiAgICAvLyB1c2UgYGluYCBvcGVyYXRvciBzaW5jZSB0aGUgcHJldmlvdXMgYGZvcmAgaXRlcmF0aW9uIHVzZXMgaXQgKC5pLmUuIGFkZCBldmVuIGF0dHJpYnV0ZXMgd2l0aCB1bmRlZmluZWQgdmFsdWUpXG4gICAgLy8gdGhlIG90aGVyIG9wdGlvbiBpcyB0byByZW1vdmUgYWxsIGF0dHJpYnV0ZXMgd2l0aCB2YWx1ZSA9PSB1bmRlZmluZWRcbiAgICBmb3IgKGtleSBpbiBvbGRBdHRycykge1xuICAgICAgICBpZiAoIShrZXkgaW4gYXR0cnMpKSB7XG4gICAgICAgICAgICBlbG0ucmVtb3ZlQXR0cmlidXRlKGtleSk7XG4gICAgICAgIH1cbiAgICB9XG59XG5leHBvcnRzLmF0dHJpYnV0ZXNNb2R1bGUgPSB7IGNyZWF0ZTogdXBkYXRlQXR0cnMsIHVwZGF0ZTogdXBkYXRlQXR0cnMgfTtcbmV4cG9ydHMuZGVmYXVsdCA9IGV4cG9ydHMuYXR0cmlidXRlc01vZHVsZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWF0dHJpYnV0ZXMuanMubWFwIl19
  46992. /***/ }),
  46993. /***/ "./node_modules/snabbdom/dist/snabbdom-class.js":
  46994. /*!******************************************************!*\
  46995. !*** ./node_modules/snabbdom/dist/snabbdom-class.js ***!
  46996. \******************************************************/
  46997. /*! no static exports found */
  46998. /***/ (function(module, exports, __webpack_require__) {
  46999. var require;var require;(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  47000. "use strict";
  47001. Object.defineProperty(exports, "__esModule", { value: true });
  47002. function updateClass(oldVnode, vnode) {
  47003. var cur, name, elm = vnode.elm, oldClass = oldVnode.data.class, klass = vnode.data.class;
  47004. if (!oldClass && !klass)
  47005. return;
  47006. if (oldClass === klass)
  47007. return;
  47008. oldClass = oldClass || {};
  47009. klass = klass || {};
  47010. for (name in oldClass) {
  47011. if (!klass[name]) {
  47012. elm.classList.remove(name);
  47013. }
  47014. }
  47015. for (name in klass) {
  47016. cur = klass[name];
  47017. if (cur !== oldClass[name]) {
  47018. elm.classList[cur ? 'add' : 'remove'](name);
  47019. }
  47020. }
  47021. }
  47022. exports.classModule = { create: updateClass, update: updateClass };
  47023. exports.default = exports.classModule;
  47024. },{}]},{},[1])(1)
  47025. });
  47026. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy8ucmVnaXN0cnkubnBtanMub3JnL2Jyb3dzZXItcGFjay82LjAuMi9ub2RlX21vZHVsZXMvYnJvd3Nlci1wYWNrL19wcmVsdWRlLmpzIiwibW9kdWxlcy9jbGFzcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQ0FBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIoZnVuY3Rpb24gZSh0LG4scil7ZnVuY3Rpb24gcyhvLHUpe2lmKCFuW29dKXtpZighdFtvXSl7dmFyIGE9dHlwZW9mIHJlcXVpcmU9PVwiZnVuY3Rpb25cIiYmcmVxdWlyZTtpZighdSYmYSlyZXR1cm4gYShvLCEwKTtpZihpKXJldHVybiBpKG8sITApO3ZhciBmPW5ldyBFcnJvcihcIkNhbm5vdCBmaW5kIG1vZHVsZSAnXCIrbytcIidcIik7dGhyb3cgZi5jb2RlPVwiTU9EVUxFX05PVF9GT1VORFwiLGZ9dmFyIGw9bltvXT17ZXhwb3J0czp7fX07dFtvXVswXS5jYWxsKGwuZXhwb3J0cyxmdW5jdGlvbihlKXt2YXIgbj10W29dWzFdW2VdO3JldHVybiBzKG4/bjplKX0sbCxsLmV4cG9ydHMsZSx0LG4scil9cmV0dXJuIG5bb10uZXhwb3J0c312YXIgaT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2Zvcih2YXIgbz0wO288ci5sZW5ndGg7bysrKXMocltvXSk7cmV0dXJuIHN9KSIsIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xuZnVuY3Rpb24gdXBkYXRlQ2xhc3Mob2xkVm5vZGUsIHZub2RlKSB7XG4gICAgdmFyIGN1ciwgbmFtZSwgZWxtID0gdm5vZGUuZWxtLCBvbGRDbGFzcyA9IG9sZFZub2RlLmRhdGEuY2xhc3MsIGtsYXNzID0gdm5vZGUuZGF0YS5jbGFzcztcbiAgICBpZiAoIW9sZENsYXNzICYmICFrbGFzcylcbiAgICAgICAgcmV0dXJuO1xuICAgIGlmIChvbGRDbGFzcyA9PT0ga2xhc3MpXG4gICAgICAgIHJldHVybjtcbiAgICBvbGRDbGFzcyA9IG9sZENsYXNzIHx8IHt9O1xuICAgIGtsYXNzID0ga2xhc3MgfHwge307XG4gICAgZm9yIChuYW1lIGluIG9sZENsYXNzKSB7XG4gICAgICAgIGlmICgha2xhc3NbbmFtZV0pIHtcbiAgICAgICAgICAgIGVsbS5jbGFzc0xpc3QucmVtb3ZlKG5hbWUpO1xuICAgICAgICB9XG4gICAgfVxuICAgIGZvciAobmFtZSBpbiBrbGFzcykge1xuICAgICAgICBjdXIgPSBrbGFzc1tuYW1lXTtcbiAgICAgICAgaWYgKGN1ciAhPT0gb2xkQ2xhc3NbbmFtZV0pIHtcbiAgICAgICAgICAgIGVsbS5jbGFzc0xpc3RbY3VyID8gJ2FkZCcgOiAncmVtb3ZlJ10obmFtZSk7XG4gICAgICAgIH1cbiAgICB9XG59XG5leHBvcnRzLmNsYXNzTW9kdWxlID0geyBjcmVhdGU6IHVwZGF0ZUNsYXNzLCB1cGRhdGU6IHVwZGF0ZUNsYXNzIH07XG5leHBvcnRzLmRlZmF1bHQgPSBleHBvcnRzLmNsYXNzTW9kdWxlO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2xhc3MuanMubWFwIl19
  47027. /***/ }),
  47028. /***/ "./node_modules/snabbdom/dist/snabbdom-dataset.js":
  47029. /*!********************************************************!*\
  47030. !*** ./node_modules/snabbdom/dist/snabbdom-dataset.js ***!
  47031. \********************************************************/
  47032. /*! no static exports found */
  47033. /***/ (function(module, exports, __webpack_require__) {
  47034. var require;var require;(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  47035. "use strict";
  47036. Object.defineProperty(exports, "__esModule", { value: true });
  47037. var CAPS_REGEX = /[A-Z]/g;
  47038. function updateDataset(oldVnode, vnode) {
  47039. var elm = vnode.elm, oldDataset = oldVnode.data.dataset, dataset = vnode.data.dataset, key;
  47040. if (!oldDataset && !dataset)
  47041. return;
  47042. if (oldDataset === dataset)
  47043. return;
  47044. oldDataset = oldDataset || {};
  47045. dataset = dataset || {};
  47046. var d = elm.dataset;
  47047. for (key in oldDataset) {
  47048. if (!dataset[key]) {
  47049. if (d) {
  47050. if (key in d) {
  47051. delete d[key];
  47052. }
  47053. }
  47054. else {
  47055. elm.removeAttribute('data-' + key.replace(CAPS_REGEX, '-$&').toLowerCase());
  47056. }
  47057. }
  47058. }
  47059. for (key in dataset) {
  47060. if (oldDataset[key] !== dataset[key]) {
  47061. if (d) {
  47062. d[key] = dataset[key];
  47063. }
  47064. else {
  47065. elm.setAttribute('data-' + key.replace(CAPS_REGEX, '-$&').toLowerCase(), dataset[key]);
  47066. }
  47067. }
  47068. }
  47069. }
  47070. exports.datasetModule = { create: updateDataset, update: updateDataset };
  47071. exports.default = exports.datasetModule;
  47072. },{}]},{},[1])(1)
  47073. });
  47074. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJtb2R1bGVzL2RhdGFzZXQuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7QUNBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIoZnVuY3Rpb24gZSh0LG4scil7ZnVuY3Rpb24gcyhvLHUpe2lmKCFuW29dKXtpZighdFtvXSl7dmFyIGE9dHlwZW9mIHJlcXVpcmU9PVwiZnVuY3Rpb25cIiYmcmVxdWlyZTtpZighdSYmYSlyZXR1cm4gYShvLCEwKTtpZihpKXJldHVybiBpKG8sITApO3ZhciBmPW5ldyBFcnJvcihcIkNhbm5vdCBmaW5kIG1vZHVsZSAnXCIrbytcIidcIik7dGhyb3cgZi5jb2RlPVwiTU9EVUxFX05PVF9GT1VORFwiLGZ9dmFyIGw9bltvXT17ZXhwb3J0czp7fX07dFtvXVswXS5jYWxsKGwuZXhwb3J0cyxmdW5jdGlvbihlKXt2YXIgbj10W29dWzFdW2VdO3JldHVybiBzKG4/bjplKX0sbCxsLmV4cG9ydHMsZSx0LG4scil9cmV0dXJuIG5bb10uZXhwb3J0c312YXIgaT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2Zvcih2YXIgbz0wO288ci5sZW5ndGg7bysrKXMocltvXSk7cmV0dXJuIHN9KSIsIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIENBUFNfUkVHRVggPSAvW0EtWl0vZztcbmZ1bmN0aW9uIHVwZGF0ZURhdGFzZXQob2xkVm5vZGUsIHZub2RlKSB7XG4gICAgdmFyIGVsbSA9IHZub2RlLmVsbSwgb2xkRGF0YXNldCA9IG9sZFZub2RlLmRhdGEuZGF0YXNldCwgZGF0YXNldCA9IHZub2RlLmRhdGEuZGF0YXNldCwga2V5O1xuICAgIGlmICghb2xkRGF0YXNldCAmJiAhZGF0YXNldClcbiAgICAgICAgcmV0dXJuO1xuICAgIGlmIChvbGREYXRhc2V0ID09PSBkYXRhc2V0KVxuICAgICAgICByZXR1cm47XG4gICAgb2xkRGF0YXNldCA9IG9sZERhdGFzZXQgfHwge307XG4gICAgZGF0YXNldCA9IGRhdGFzZXQgfHwge307XG4gICAgdmFyIGQgPSBlbG0uZGF0YXNldDtcbiAgICBmb3IgKGtleSBpbiBvbGREYXRhc2V0KSB7XG4gICAgICAgIGlmICghZGF0YXNldFtrZXldKSB7XG4gICAgICAgICAgICBpZiAoZCkge1xuICAgICAgICAgICAgICAgIGlmIChrZXkgaW4gZCkge1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgZFtrZXldO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGVsbS5yZW1vdmVBdHRyaWJ1dGUoJ2RhdGEtJyArIGtleS5yZXBsYWNlKENBUFNfUkVHRVgsICctJCYnKS50b0xvd2VyQ2FzZSgpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBmb3IgKGtleSBpbiBkYXRhc2V0KSB7XG4gICAgICAgIGlmIChvbGREYXRhc2V0W2tleV0gIT09IGRhdGFzZXRba2V5XSkge1xuICAgICAgICAgICAgaWYgKGQpIHtcbiAgICAgICAgICAgICAgICBkW2tleV0gPSBkYXRhc2V0W2tleV07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBlbG0uc2V0QXR0cmlidXRlKCdkYXRhLScgKyBrZXkucmVwbGFjZShDQVBTX1JFR0VYLCAnLSQmJykudG9Mb3dlckNhc2UoKSwgZGF0YXNldFtrZXldKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbn1cbmV4cG9ydHMuZGF0YXNldE1vZHVsZSA9IHsgY3JlYXRlOiB1cGRhdGVEYXRhc2V0LCB1cGRhdGU6IHVwZGF0ZURhdGFzZXQgfTtcbmV4cG9ydHMuZGVmYXVsdCA9IGV4cG9ydHMuZGF0YXNldE1vZHVsZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWRhdGFzZXQuanMubWFwIl19
  47075. /***/ }),
  47076. /***/ "./node_modules/snabbdom/dist/snabbdom-props.js":
  47077. /*!******************************************************!*\
  47078. !*** ./node_modules/snabbdom/dist/snabbdom-props.js ***!
  47079. \******************************************************/
  47080. /*! no static exports found */
  47081. /***/ (function(module, exports, __webpack_require__) {
  47082. var require;var require;(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  47083. "use strict";
  47084. Object.defineProperty(exports, "__esModule", { value: true });
  47085. function updateProps(oldVnode, vnode) {
  47086. var key, cur, old, elm = vnode.elm, oldProps = oldVnode.data.props, props = vnode.data.props;
  47087. if (!oldProps && !props)
  47088. return;
  47089. if (oldProps === props)
  47090. return;
  47091. oldProps = oldProps || {};
  47092. props = props || {};
  47093. for (key in oldProps) {
  47094. if (!props[key]) {
  47095. delete elm[key];
  47096. }
  47097. }
  47098. for (key in props) {
  47099. cur = props[key];
  47100. old = oldProps[key];
  47101. if (old !== cur && (key !== 'value' || elm[key] !== cur)) {
  47102. elm[key] = cur;
  47103. }
  47104. }
  47105. }
  47106. exports.propsModule = { create: updateProps, update: updateProps };
  47107. exports.default = exports.propsModule;
  47108. },{}]},{},[1])(1)
  47109. });
  47110. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy8ucmVnaXN0cnkubnBtanMub3JnL2Jyb3dzZXItcGFjay82LjAuMi9ub2RlX21vZHVsZXMvYnJvd3Nlci1wYWNrL19wcmVsdWRlLmpzIiwibW9kdWxlcy9wcm9wcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQ0FBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIihmdW5jdGlvbiBlKHQsbixyKXtmdW5jdGlvbiBzKG8sdSl7aWYoIW5bb10pe2lmKCF0W29dKXt2YXIgYT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2lmKCF1JiZhKXJldHVybiBhKG8sITApO2lmKGkpcmV0dXJuIGkobywhMCk7dmFyIGY9bmV3IEVycm9yKFwiQ2Fubm90IGZpbmQgbW9kdWxlICdcIitvK1wiJ1wiKTt0aHJvdyBmLmNvZGU9XCJNT0RVTEVfTk9UX0ZPVU5EXCIsZn12YXIgbD1uW29dPXtleHBvcnRzOnt9fTt0W29dWzBdLmNhbGwobC5leHBvcnRzLGZ1bmN0aW9uKGUpe3ZhciBuPXRbb11bMV1bZV07cmV0dXJuIHMobj9uOmUpfSxsLGwuZXhwb3J0cyxlLHQsbixyKX1yZXR1cm4gbltvXS5leHBvcnRzfXZhciBpPXR5cGVvZiByZXF1aXJlPT1cImZ1bmN0aW9uXCImJnJlcXVpcmU7Zm9yKHZhciBvPTA7bzxyLmxlbmd0aDtvKyspcyhyW29dKTtyZXR1cm4gc30pIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG5mdW5jdGlvbiB1cGRhdGVQcm9wcyhvbGRWbm9kZSwgdm5vZGUpIHtcbiAgICB2YXIga2V5LCBjdXIsIG9sZCwgZWxtID0gdm5vZGUuZWxtLCBvbGRQcm9wcyA9IG9sZFZub2RlLmRhdGEucHJvcHMsIHByb3BzID0gdm5vZGUuZGF0YS5wcm9wcztcbiAgICBpZiAoIW9sZFByb3BzICYmICFwcm9wcylcbiAgICAgICAgcmV0dXJuO1xuICAgIGlmIChvbGRQcm9wcyA9PT0gcHJvcHMpXG4gICAgICAgIHJldHVybjtcbiAgICBvbGRQcm9wcyA9IG9sZFByb3BzIHx8IHt9O1xuICAgIHByb3BzID0gcHJvcHMgfHwge307XG4gICAgZm9yIChrZXkgaW4gb2xkUHJvcHMpIHtcbiAgICAgICAgaWYgKCFwcm9wc1trZXldKSB7XG4gICAgICAgICAgICBkZWxldGUgZWxtW2tleV07XG4gICAgICAgIH1cbiAgICB9XG4gICAgZm9yIChrZXkgaW4gcHJvcHMpIHtcbiAgICAgICAgY3VyID0gcHJvcHNba2V5XTtcbiAgICAgICAgb2xkID0gb2xkUHJvcHNba2V5XTtcbiAgICAgICAgaWYgKG9sZCAhPT0gY3VyICYmIChrZXkgIT09ICd2YWx1ZScgfHwgZWxtW2tleV0gIT09IGN1cikpIHtcbiAgICAgICAgICAgIGVsbVtrZXldID0gY3VyO1xuICAgICAgICB9XG4gICAgfVxufVxuZXhwb3J0cy5wcm9wc01vZHVsZSA9IHsgY3JlYXRlOiB1cGRhdGVQcm9wcywgdXBkYXRlOiB1cGRhdGVQcm9wcyB9O1xuZXhwb3J0cy5kZWZhdWx0ID0gZXhwb3J0cy5wcm9wc01vZHVsZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXByb3BzLmpzLm1hcCJdfQ==
  47111. /***/ }),
  47112. /***/ "./node_modules/snabbdom/dist/snabbdom-style.js":
  47113. /*!******************************************************!*\
  47114. !*** ./node_modules/snabbdom/dist/snabbdom-style.js ***!
  47115. \******************************************************/
  47116. /*! no static exports found */
  47117. /***/ (function(module, exports, __webpack_require__) {
  47118. var require;var require;(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  47119. "use strict";
  47120. Object.defineProperty(exports, "__esModule", { value: true });
  47121. var raf = (typeof window !== 'undefined' && window.requestAnimationFrame) || setTimeout;
  47122. var nextFrame = function (fn) { raf(function () { raf(fn); }); };
  47123. function setNextFrame(obj, prop, val) {
  47124. nextFrame(function () { obj[prop] = val; });
  47125. }
  47126. function updateStyle(oldVnode, vnode) {
  47127. var cur, name, elm = vnode.elm, oldStyle = oldVnode.data.style, style = vnode.data.style;
  47128. if (!oldStyle && !style)
  47129. return;
  47130. if (oldStyle === style)
  47131. return;
  47132. oldStyle = oldStyle || {};
  47133. style = style || {};
  47134. var oldHasDel = 'delayed' in oldStyle;
  47135. for (name in oldStyle) {
  47136. if (!style[name]) {
  47137. if (name[0] === '-' && name[1] === '-') {
  47138. elm.style.removeProperty(name);
  47139. }
  47140. else {
  47141. elm.style[name] = '';
  47142. }
  47143. }
  47144. }
  47145. for (name in style) {
  47146. cur = style[name];
  47147. if (name === 'delayed' && style.delayed) {
  47148. for (var name2 in style.delayed) {
  47149. cur = style.delayed[name2];
  47150. if (!oldHasDel || cur !== oldStyle.delayed[name2]) {
  47151. setNextFrame(elm.style, name2, cur);
  47152. }
  47153. }
  47154. }
  47155. else if (name !== 'remove' && cur !== oldStyle[name]) {
  47156. if (name[0] === '-' && name[1] === '-') {
  47157. elm.style.setProperty(name, cur);
  47158. }
  47159. else {
  47160. elm.style[name] = cur;
  47161. }
  47162. }
  47163. }
  47164. }
  47165. function applyDestroyStyle(vnode) {
  47166. var style, name, elm = vnode.elm, s = vnode.data.style;
  47167. if (!s || !(style = s.destroy))
  47168. return;
  47169. for (name in style) {
  47170. elm.style[name] = style[name];
  47171. }
  47172. }
  47173. function applyRemoveStyle(vnode, rm) {
  47174. var s = vnode.data.style;
  47175. if (!s || !s.remove) {
  47176. rm();
  47177. return;
  47178. }
  47179. var name, elm = vnode.elm, i = 0, compStyle, style = s.remove, amount = 0, applied = [];
  47180. for (name in style) {
  47181. applied.push(name);
  47182. elm.style[name] = style[name];
  47183. }
  47184. compStyle = getComputedStyle(elm);
  47185. var props = compStyle['transition-property'].split(', ');
  47186. for (; i < props.length; ++i) {
  47187. if (applied.indexOf(props[i]) !== -1)
  47188. amount++;
  47189. }
  47190. elm.addEventListener('transitionend', function (ev) {
  47191. if (ev.target === elm)
  47192. --amount;
  47193. if (amount === 0)
  47194. rm();
  47195. });
  47196. }
  47197. exports.styleModule = {
  47198. create: updateStyle,
  47199. update: updateStyle,
  47200. destroy: applyDestroyStyle,
  47201. remove: applyRemoveStyle
  47202. };
  47203. exports.default = exports.styleModule;
  47204. },{}]},{},[1])(1)
  47205. });
  47206. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy8ucmVnaXN0cnkubnBtanMub3JnL2Jyb3dzZXItcGFjay82LjAuMi9ub2RlX21vZHVsZXMvYnJvd3Nlci1wYWNrL19wcmVsdWRlLmpzIiwibW9kdWxlcy9zdHlsZS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQ0FBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIihmdW5jdGlvbiBlKHQsbixyKXtmdW5jdGlvbiBzKG8sdSl7aWYoIW5bb10pe2lmKCF0W29dKXt2YXIgYT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2lmKCF1JiZhKXJldHVybiBhKG8sITApO2lmKGkpcmV0dXJuIGkobywhMCk7dmFyIGY9bmV3IEVycm9yKFwiQ2Fubm90IGZpbmQgbW9kdWxlICdcIitvK1wiJ1wiKTt0aHJvdyBmLmNvZGU9XCJNT0RVTEVfTk9UX0ZPVU5EXCIsZn12YXIgbD1uW29dPXtleHBvcnRzOnt9fTt0W29dWzBdLmNhbGwobC5leHBvcnRzLGZ1bmN0aW9uKGUpe3ZhciBuPXRbb11bMV1bZV07cmV0dXJuIHMobj9uOmUpfSxsLGwuZXhwb3J0cyxlLHQsbixyKX1yZXR1cm4gbltvXS5leHBvcnRzfXZhciBpPXR5cGVvZiByZXF1aXJlPT1cImZ1bmN0aW9uXCImJnJlcXVpcmU7Zm9yKHZhciBvPTA7bzxyLmxlbmd0aDtvKyspcyhyW29dKTtyZXR1cm4gc30pIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG52YXIgcmFmID0gKHR5cGVvZiB3aW5kb3cgIT09ICd1bmRlZmluZWQnICYmIHdpbmRvdy5yZXF1ZXN0QW5pbWF0aW9uRnJhbWUpIHx8IHNldFRpbWVvdXQ7XG52YXIgbmV4dEZyYW1lID0gZnVuY3Rpb24gKGZuKSB7IHJhZihmdW5jdGlvbiAoKSB7IHJhZihmbik7IH0pOyB9O1xuZnVuY3Rpb24gc2V0TmV4dEZyYW1lKG9iaiwgcHJvcCwgdmFsKSB7XG4gICAgbmV4dEZyYW1lKGZ1bmN0aW9uICgpIHsgb2JqW3Byb3BdID0gdmFsOyB9KTtcbn1cbmZ1bmN0aW9uIHVwZGF0ZVN0eWxlKG9sZFZub2RlLCB2bm9kZSkge1xuICAgIHZhciBjdXIsIG5hbWUsIGVsbSA9IHZub2RlLmVsbSwgb2xkU3R5bGUgPSBvbGRWbm9kZS5kYXRhLnN0eWxlLCBzdHlsZSA9IHZub2RlLmRhdGEuc3R5bGU7XG4gICAgaWYgKCFvbGRTdHlsZSAmJiAhc3R5bGUpXG4gICAgICAgIHJldHVybjtcbiAgICBpZiAob2xkU3R5bGUgPT09IHN0eWxlKVxuICAgICAgICByZXR1cm47XG4gICAgb2xkU3R5bGUgPSBvbGRTdHlsZSB8fCB7fTtcbiAgICBzdHlsZSA9IHN0eWxlIHx8IHt9O1xuICAgIHZhciBvbGRIYXNEZWwgPSAnZGVsYXllZCcgaW4gb2xkU3R5bGU7XG4gICAgZm9yIChuYW1lIGluIG9sZFN0eWxlKSB7XG4gICAgICAgIGlmICghc3R5bGVbbmFtZV0pIHtcbiAgICAgICAgICAgIGlmIChuYW1lWzBdID09PSAnLScgJiYgbmFtZVsxXSA9PT0gJy0nKSB7XG4gICAgICAgICAgICAgICAgZWxtLnN0eWxlLnJlbW92ZVByb3BlcnR5KG5hbWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgZWxtLnN0eWxlW25hbWVdID0gJyc7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgZm9yIChuYW1lIGluIHN0eWxlKSB7XG4gICAgICAgIGN1ciA9IHN0eWxlW25hbWVdO1xuICAgICAgICBpZiAobmFtZSA9PT0gJ2RlbGF5ZWQnICYmIHN0eWxlLmRlbGF5ZWQpIHtcbiAgICAgICAgICAgIGZvciAodmFyIG5hbWUyIGluIHN0eWxlLmRlbGF5ZWQpIHtcbiAgICAgICAgICAgICAgICBjdXIgPSBzdHlsZS5kZWxheWVkW25hbWUyXTtcbiAgICAgICAgICAgICAgICBpZiAoIW9sZEhhc0RlbCB8fCBjdXIgIT09IG9sZFN0eWxlLmRlbGF5ZWRbbmFtZTJdKSB7XG4gICAgICAgICAgICAgICAgICAgIHNldE5leHRGcmFtZShlbG0uc3R5bGUsIG5hbWUyLCBjdXIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChuYW1lICE9PSAncmVtb3ZlJyAmJiBjdXIgIT09IG9sZFN0eWxlW25hbWVdKSB7XG4gICAgICAgICAgICBpZiAobmFtZVswXSA9PT0gJy0nICYmIG5hbWVbMV0gPT09ICctJykge1xuICAgICAgICAgICAgICAgIGVsbS5zdHlsZS5zZXRQcm9wZXJ0eShuYW1lLCBjdXIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgZWxtLnN0eWxlW25hbWVdID0gY3VyO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxufVxuZnVuY3Rpb24gYXBwbHlEZXN0cm95U3R5bGUodm5vZGUpIHtcbiAgICB2YXIgc3R5bGUsIG5hbWUsIGVsbSA9IHZub2RlLmVsbSwgcyA9IHZub2RlLmRhdGEuc3R5bGU7XG4gICAgaWYgKCFzIHx8ICEoc3R5bGUgPSBzLmRlc3Ryb3kpKVxuICAgICAgICByZXR1cm47XG4gICAgZm9yIChuYW1lIGluIHN0eWxlKSB7XG4gICAgICAgIGVsbS5zdHlsZVtuYW1lXSA9IHN0eWxlW25hbWVdO1xuICAgIH1cbn1cbmZ1bmN0aW9uIGFwcGx5UmVtb3ZlU3R5bGUodm5vZGUsIHJtKSB7XG4gICAgdmFyIHMgPSB2bm9kZS5kYXRhLnN0eWxlO1xuICAgIGlmICghcyB8fCAhcy5yZW1vdmUpIHtcbiAgICAgICAgcm0oKTtcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cbiAgICB2YXIgbmFtZSwgZWxtID0gdm5vZGUuZWxtLCBpID0gMCwgY29tcFN0eWxlLCBzdHlsZSA9IHMucmVtb3ZlLCBhbW91bnQgPSAwLCBhcHBsaWVkID0gW107XG4gICAgZm9yIChuYW1lIGluIHN0eWxlKSB7XG4gICAgICAgIGFwcGxpZWQucHVzaChuYW1lKTtcbiAgICAgICAgZWxtLnN0eWxlW25hbWVdID0gc3R5bGVbbmFtZV07XG4gICAgfVxuICAgIGNvbXBTdHlsZSA9IGdldENvbXB1dGVkU3R5bGUoZWxtKTtcbiAgICB2YXIgcHJvcHMgPSBjb21wU3R5bGVbJ3RyYW5zaXRpb24tcHJvcGVydHknXS5zcGxpdCgnLCAnKTtcbiAgICBmb3IgKDsgaSA8IHByb3BzLmxlbmd0aDsgKytpKSB7XG4gICAgICAgIGlmIChhcHBsaWVkLmluZGV4T2YocHJvcHNbaV0pICE9PSAtMSlcbiAgICAgICAgICAgIGFtb3VudCsrO1xuICAgIH1cbiAgICBlbG0uYWRkRXZlbnRMaXN0ZW5lcigndHJhbnNpdGlvbmVuZCcsIGZ1bmN0aW9uIChldikge1xuICAgICAgICBpZiAoZXYudGFyZ2V0ID09PSBlbG0pXG4gICAgICAgICAgICAtLWFtb3VudDtcbiAgICAgICAgaWYgKGFtb3VudCA9PT0gMClcbiAgICAgICAgICAgIHJtKCk7XG4gICAgfSk7XG59XG5leHBvcnRzLnN0eWxlTW9kdWxlID0ge1xuICAgIGNyZWF0ZTogdXBkYXRlU3R5bGUsXG4gICAgdXBkYXRlOiB1cGRhdGVTdHlsZSxcbiAgICBkZXN0cm95OiBhcHBseURlc3Ryb3lTdHlsZSxcbiAgICByZW1vdmU6IGFwcGx5UmVtb3ZlU3R5bGVcbn07XG5leHBvcnRzLmRlZmF1bHQgPSBleHBvcnRzLnN0eWxlTW9kdWxlO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9c3R5bGUuanMubWFwIl19
  47207. /***/ }),
  47208. /***/ "./node_modules/snabbdom/dist/snabbdom.js":
  47209. /*!************************************************!*\
  47210. !*** ./node_modules/snabbdom/dist/snabbdom.js ***!
  47211. \************************************************/
  47212. /*! no static exports found */
  47213. /***/ (function(module, exports, __webpack_require__) {
  47214. var require;var require;(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  47215. "use strict";
  47216. Object.defineProperty(exports, "__esModule", { value: true });
  47217. var vnode_1 = require("./vnode");
  47218. var is = require("./is");
  47219. function addNS(data, children, sel) {
  47220. data.ns = 'http://www.w3.org/2000/svg';
  47221. if (sel !== 'foreignObject' && children !== undefined) {
  47222. for (var i = 0; i < children.length; ++i) {
  47223. var childData = children[i].data;
  47224. if (childData !== undefined) {
  47225. addNS(childData, children[i].children, children[i].sel);
  47226. }
  47227. }
  47228. }
  47229. }
  47230. function h(sel, b, c) {
  47231. var data = {}, children, text, i;
  47232. if (c !== undefined) {
  47233. data = b;
  47234. if (is.array(c)) {
  47235. children = c;
  47236. }
  47237. else if (is.primitive(c)) {
  47238. text = c;
  47239. }
  47240. else if (c && c.sel) {
  47241. children = [c];
  47242. }
  47243. }
  47244. else if (b !== undefined) {
  47245. if (is.array(b)) {
  47246. children = b;
  47247. }
  47248. else if (is.primitive(b)) {
  47249. text = b;
  47250. }
  47251. else if (b && b.sel) {
  47252. children = [b];
  47253. }
  47254. else {
  47255. data = b;
  47256. }
  47257. }
  47258. if (is.array(children)) {
  47259. for (i = 0; i < children.length; ++i) {
  47260. if (is.primitive(children[i]))
  47261. children[i] = vnode_1.vnode(undefined, undefined, undefined, children[i]);
  47262. }
  47263. }
  47264. if (sel[0] === 's' && sel[1] === 'v' && sel[2] === 'g' &&
  47265. (sel.length === 3 || sel[3] === '.' || sel[3] === '#')) {
  47266. addNS(data, children, sel);
  47267. }
  47268. return vnode_1.vnode(sel, data, children, text, undefined);
  47269. }
  47270. exports.h = h;
  47271. ;
  47272. exports.default = h;
  47273. },{"./is":3,"./vnode":6}],2:[function(require,module,exports){
  47274. "use strict";
  47275. Object.defineProperty(exports, "__esModule", { value: true });
  47276. function createElement(tagName) {
  47277. return document.createElement(tagName);
  47278. }
  47279. function createElementNS(namespaceURI, qualifiedName) {
  47280. return document.createElementNS(namespaceURI, qualifiedName);
  47281. }
  47282. function createTextNode(text) {
  47283. return document.createTextNode(text);
  47284. }
  47285. function createComment(text) {
  47286. return document.createComment(text);
  47287. }
  47288. function insertBefore(parentNode, newNode, referenceNode) {
  47289. parentNode.insertBefore(newNode, referenceNode);
  47290. }
  47291. function removeChild(node, child) {
  47292. node.removeChild(child);
  47293. }
  47294. function appendChild(node, child) {
  47295. node.appendChild(child);
  47296. }
  47297. function parentNode(node) {
  47298. return node.parentNode;
  47299. }
  47300. function nextSibling(node) {
  47301. return node.nextSibling;
  47302. }
  47303. function tagName(elm) {
  47304. return elm.tagName;
  47305. }
  47306. function setTextContent(node, text) {
  47307. node.textContent = text;
  47308. }
  47309. function getTextContent(node) {
  47310. return node.textContent;
  47311. }
  47312. function isElement(node) {
  47313. return node.nodeType === 1;
  47314. }
  47315. function isText(node) {
  47316. return node.nodeType === 3;
  47317. }
  47318. function isComment(node) {
  47319. return node.nodeType === 8;
  47320. }
  47321. exports.htmlDomApi = {
  47322. createElement: createElement,
  47323. createElementNS: createElementNS,
  47324. createTextNode: createTextNode,
  47325. createComment: createComment,
  47326. insertBefore: insertBefore,
  47327. removeChild: removeChild,
  47328. appendChild: appendChild,
  47329. parentNode: parentNode,
  47330. nextSibling: nextSibling,
  47331. tagName: tagName,
  47332. setTextContent: setTextContent,
  47333. getTextContent: getTextContent,
  47334. isElement: isElement,
  47335. isText: isText,
  47336. isComment: isComment,
  47337. };
  47338. exports.default = exports.htmlDomApi;
  47339. },{}],3:[function(require,module,exports){
  47340. "use strict";
  47341. Object.defineProperty(exports, "__esModule", { value: true });
  47342. exports.array = Array.isArray;
  47343. function primitive(s) {
  47344. return typeof s === 'string' || typeof s === 'number';
  47345. }
  47346. exports.primitive = primitive;
  47347. },{}],4:[function(require,module,exports){
  47348. "use strict";
  47349. Object.defineProperty(exports, "__esModule", { value: true });
  47350. var vnode_1 = require("./vnode");
  47351. var is = require("./is");
  47352. var htmldomapi_1 = require("./htmldomapi");
  47353. function isUndef(s) { return s === undefined; }
  47354. function isDef(s) { return s !== undefined; }
  47355. var emptyNode = vnode_1.default('', {}, [], undefined, undefined);
  47356. function sameVnode(vnode1, vnode2) {
  47357. return vnode1.key === vnode2.key && vnode1.sel === vnode2.sel;
  47358. }
  47359. function isVnode(vnode) {
  47360. return vnode.sel !== undefined;
  47361. }
  47362. function createKeyToOldIdx(children, beginIdx, endIdx) {
  47363. var i, map = {}, key, ch;
  47364. for (i = beginIdx; i <= endIdx; ++i) {
  47365. ch = children[i];
  47366. if (ch != null) {
  47367. key = ch.key;
  47368. if (key !== undefined)
  47369. map[key] = i;
  47370. }
  47371. }
  47372. return map;
  47373. }
  47374. var hooks = ['create', 'update', 'remove', 'destroy', 'pre', 'post'];
  47375. var h_1 = require("./h");
  47376. exports.h = h_1.h;
  47377. var thunk_1 = require("./thunk");
  47378. exports.thunk = thunk_1.thunk;
  47379. function init(modules, domApi) {
  47380. var i, j, cbs = {};
  47381. var api = domApi !== undefined ? domApi : htmldomapi_1.default;
  47382. for (i = 0; i < hooks.length; ++i) {
  47383. cbs[hooks[i]] = [];
  47384. for (j = 0; j < modules.length; ++j) {
  47385. var hook = modules[j][hooks[i]];
  47386. if (hook !== undefined) {
  47387. cbs[hooks[i]].push(hook);
  47388. }
  47389. }
  47390. }
  47391. function emptyNodeAt(elm) {
  47392. var id = elm.id ? '#' + elm.id : '';
  47393. var c = elm.className ? '.' + elm.className.split(' ').join('.') : '';
  47394. return vnode_1.default(api.tagName(elm).toLowerCase() + id + c, {}, [], undefined, elm);
  47395. }
  47396. function createRmCb(childElm, listeners) {
  47397. return function rmCb() {
  47398. if (--listeners === 0) {
  47399. var parent_1 = api.parentNode(childElm);
  47400. api.removeChild(parent_1, childElm);
  47401. }
  47402. };
  47403. }
  47404. function createElm(vnode, insertedVnodeQueue) {
  47405. var i, data = vnode.data;
  47406. if (data !== undefined) {
  47407. if (isDef(i = data.hook) && isDef(i = i.init)) {
  47408. i(vnode);
  47409. data = vnode.data;
  47410. }
  47411. }
  47412. var children = vnode.children, sel = vnode.sel;
  47413. if (sel === '!') {
  47414. if (isUndef(vnode.text)) {
  47415. vnode.text = '';
  47416. }
  47417. vnode.elm = api.createComment(vnode.text);
  47418. }
  47419. else if (sel !== undefined) {
  47420. // Parse selector
  47421. var hashIdx = sel.indexOf('#');
  47422. var dotIdx = sel.indexOf('.', hashIdx);
  47423. var hash = hashIdx > 0 ? hashIdx : sel.length;
  47424. var dot = dotIdx > 0 ? dotIdx : sel.length;
  47425. var tag = hashIdx !== -1 || dotIdx !== -1 ? sel.slice(0, Math.min(hash, dot)) : sel;
  47426. var elm = vnode.elm = isDef(data) && isDef(i = data.ns) ? api.createElementNS(i, tag)
  47427. : api.createElement(tag);
  47428. if (hash < dot)
  47429. elm.setAttribute('id', sel.slice(hash + 1, dot));
  47430. if (dotIdx > 0)
  47431. elm.setAttribute('class', sel.slice(dot + 1).replace(/\./g, ' '));
  47432. for (i = 0; i < cbs.create.length; ++i)
  47433. cbs.create[i](emptyNode, vnode);
  47434. if (is.array(children)) {
  47435. for (i = 0; i < children.length; ++i) {
  47436. var ch = children[i];
  47437. if (ch != null) {
  47438. api.appendChild(elm, createElm(ch, insertedVnodeQueue));
  47439. }
  47440. }
  47441. }
  47442. else if (is.primitive(vnode.text)) {
  47443. api.appendChild(elm, api.createTextNode(vnode.text));
  47444. }
  47445. i = vnode.data.hook; // Reuse variable
  47446. if (isDef(i)) {
  47447. if (i.create)
  47448. i.create(emptyNode, vnode);
  47449. if (i.insert)
  47450. insertedVnodeQueue.push(vnode);
  47451. }
  47452. }
  47453. else {
  47454. vnode.elm = api.createTextNode(vnode.text);
  47455. }
  47456. return vnode.elm;
  47457. }
  47458. function addVnodes(parentElm, before, vnodes, startIdx, endIdx, insertedVnodeQueue) {
  47459. for (; startIdx <= endIdx; ++startIdx) {
  47460. var ch = vnodes[startIdx];
  47461. if (ch != null) {
  47462. api.insertBefore(parentElm, createElm(ch, insertedVnodeQueue), before);
  47463. }
  47464. }
  47465. }
  47466. function invokeDestroyHook(vnode) {
  47467. var i, j, data = vnode.data;
  47468. if (data !== undefined) {
  47469. if (isDef(i = data.hook) && isDef(i = i.destroy))
  47470. i(vnode);
  47471. for (i = 0; i < cbs.destroy.length; ++i)
  47472. cbs.destroy[i](vnode);
  47473. if (vnode.children !== undefined) {
  47474. for (j = 0; j < vnode.children.length; ++j) {
  47475. i = vnode.children[j];
  47476. if (i != null && typeof i !== "string") {
  47477. invokeDestroyHook(i);
  47478. }
  47479. }
  47480. }
  47481. }
  47482. }
  47483. function removeVnodes(parentElm, vnodes, startIdx, endIdx) {
  47484. for (; startIdx <= endIdx; ++startIdx) {
  47485. var i_1 = void 0, listeners = void 0, rm = void 0, ch = vnodes[startIdx];
  47486. if (ch != null) {
  47487. if (isDef(ch.sel)) {
  47488. invokeDestroyHook(ch);
  47489. listeners = cbs.remove.length + 1;
  47490. rm = createRmCb(ch.elm, listeners);
  47491. for (i_1 = 0; i_1 < cbs.remove.length; ++i_1)
  47492. cbs.remove[i_1](ch, rm);
  47493. if (isDef(i_1 = ch.data) && isDef(i_1 = i_1.hook) && isDef(i_1 = i_1.remove)) {
  47494. i_1(ch, rm);
  47495. }
  47496. else {
  47497. rm();
  47498. }
  47499. }
  47500. else {
  47501. api.removeChild(parentElm, ch.elm);
  47502. }
  47503. }
  47504. }
  47505. }
  47506. function updateChildren(parentElm, oldCh, newCh, insertedVnodeQueue) {
  47507. var oldStartIdx = 0, newStartIdx = 0;
  47508. var oldEndIdx = oldCh.length - 1;
  47509. var oldStartVnode = oldCh[0];
  47510. var oldEndVnode = oldCh[oldEndIdx];
  47511. var newEndIdx = newCh.length - 1;
  47512. var newStartVnode = newCh[0];
  47513. var newEndVnode = newCh[newEndIdx];
  47514. var oldKeyToIdx;
  47515. var idxInOld;
  47516. var elmToMove;
  47517. var before;
  47518. while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
  47519. if (oldStartVnode == null) {
  47520. oldStartVnode = oldCh[++oldStartIdx]; // Vnode might have been moved left
  47521. }
  47522. else if (oldEndVnode == null) {
  47523. oldEndVnode = oldCh[--oldEndIdx];
  47524. }
  47525. else if (newStartVnode == null) {
  47526. newStartVnode = newCh[++newStartIdx];
  47527. }
  47528. else if (newEndVnode == null) {
  47529. newEndVnode = newCh[--newEndIdx];
  47530. }
  47531. else if (sameVnode(oldStartVnode, newStartVnode)) {
  47532. patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue);
  47533. oldStartVnode = oldCh[++oldStartIdx];
  47534. newStartVnode = newCh[++newStartIdx];
  47535. }
  47536. else if (sameVnode(oldEndVnode, newEndVnode)) {
  47537. patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue);
  47538. oldEndVnode = oldCh[--oldEndIdx];
  47539. newEndVnode = newCh[--newEndIdx];
  47540. }
  47541. else if (sameVnode(oldStartVnode, newEndVnode)) {
  47542. patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue);
  47543. api.insertBefore(parentElm, oldStartVnode.elm, api.nextSibling(oldEndVnode.elm));
  47544. oldStartVnode = oldCh[++oldStartIdx];
  47545. newEndVnode = newCh[--newEndIdx];
  47546. }
  47547. else if (sameVnode(oldEndVnode, newStartVnode)) {
  47548. patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue);
  47549. api.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm);
  47550. oldEndVnode = oldCh[--oldEndIdx];
  47551. newStartVnode = newCh[++newStartIdx];
  47552. }
  47553. else {
  47554. if (oldKeyToIdx === undefined) {
  47555. oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx);
  47556. }
  47557. idxInOld = oldKeyToIdx[newStartVnode.key];
  47558. if (isUndef(idxInOld)) {
  47559. api.insertBefore(parentElm, createElm(newStartVnode, insertedVnodeQueue), oldStartVnode.elm);
  47560. newStartVnode = newCh[++newStartIdx];
  47561. }
  47562. else {
  47563. elmToMove = oldCh[idxInOld];
  47564. if (elmToMove.sel !== newStartVnode.sel) {
  47565. api.insertBefore(parentElm, createElm(newStartVnode, insertedVnodeQueue), oldStartVnode.elm);
  47566. }
  47567. else {
  47568. patchVnode(elmToMove, newStartVnode, insertedVnodeQueue);
  47569. oldCh[idxInOld] = undefined;
  47570. api.insertBefore(parentElm, elmToMove.elm, oldStartVnode.elm);
  47571. }
  47572. newStartVnode = newCh[++newStartIdx];
  47573. }
  47574. }
  47575. }
  47576. if (oldStartIdx > oldEndIdx) {
  47577. before = newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].elm;
  47578. addVnodes(parentElm, before, newCh, newStartIdx, newEndIdx, insertedVnodeQueue);
  47579. }
  47580. else if (newStartIdx > newEndIdx) {
  47581. removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx);
  47582. }
  47583. }
  47584. function patchVnode(oldVnode, vnode, insertedVnodeQueue) {
  47585. var i, hook;
  47586. if (isDef(i = vnode.data) && isDef(hook = i.hook) && isDef(i = hook.prepatch)) {
  47587. i(oldVnode, vnode);
  47588. }
  47589. var elm = vnode.elm = oldVnode.elm;
  47590. var oldCh = oldVnode.children;
  47591. var ch = vnode.children;
  47592. if (oldVnode === vnode)
  47593. return;
  47594. if (vnode.data !== undefined) {
  47595. for (i = 0; i < cbs.update.length; ++i)
  47596. cbs.update[i](oldVnode, vnode);
  47597. i = vnode.data.hook;
  47598. if (isDef(i) && isDef(i = i.update))
  47599. i(oldVnode, vnode);
  47600. }
  47601. if (isUndef(vnode.text)) {
  47602. if (isDef(oldCh) && isDef(ch)) {
  47603. if (oldCh !== ch)
  47604. updateChildren(elm, oldCh, ch, insertedVnodeQueue);
  47605. }
  47606. else if (isDef(ch)) {
  47607. if (isDef(oldVnode.text))
  47608. api.setTextContent(elm, '');
  47609. addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue);
  47610. }
  47611. else if (isDef(oldCh)) {
  47612. removeVnodes(elm, oldCh, 0, oldCh.length - 1);
  47613. }
  47614. else if (isDef(oldVnode.text)) {
  47615. api.setTextContent(elm, '');
  47616. }
  47617. }
  47618. else if (oldVnode.text !== vnode.text) {
  47619. api.setTextContent(elm, vnode.text);
  47620. }
  47621. if (isDef(hook) && isDef(i = hook.postpatch)) {
  47622. i(oldVnode, vnode);
  47623. }
  47624. }
  47625. return function patch(oldVnode, vnode) {
  47626. var i, elm, parent;
  47627. var insertedVnodeQueue = [];
  47628. for (i = 0; i < cbs.pre.length; ++i)
  47629. cbs.pre[i]();
  47630. if (!isVnode(oldVnode)) {
  47631. oldVnode = emptyNodeAt(oldVnode);
  47632. }
  47633. if (sameVnode(oldVnode, vnode)) {
  47634. patchVnode(oldVnode, vnode, insertedVnodeQueue);
  47635. }
  47636. else {
  47637. elm = oldVnode.elm;
  47638. parent = api.parentNode(elm);
  47639. createElm(vnode, insertedVnodeQueue);
  47640. if (parent !== null) {
  47641. api.insertBefore(parent, vnode.elm, api.nextSibling(elm));
  47642. removeVnodes(parent, [oldVnode], 0, 0);
  47643. }
  47644. }
  47645. for (i = 0; i < insertedVnodeQueue.length; ++i) {
  47646. insertedVnodeQueue[i].data.hook.insert(insertedVnodeQueue[i]);
  47647. }
  47648. for (i = 0; i < cbs.post.length; ++i)
  47649. cbs.post[i]();
  47650. return vnode;
  47651. };
  47652. }
  47653. exports.init = init;
  47654. },{"./h":1,"./htmldomapi":2,"./is":3,"./thunk":5,"./vnode":6}],5:[function(require,module,exports){
  47655. "use strict";
  47656. Object.defineProperty(exports, "__esModule", { value: true });
  47657. var h_1 = require("./h");
  47658. function copyToThunk(vnode, thunk) {
  47659. thunk.elm = vnode.elm;
  47660. vnode.data.fn = thunk.data.fn;
  47661. vnode.data.args = thunk.data.args;
  47662. thunk.data = vnode.data;
  47663. thunk.children = vnode.children;
  47664. thunk.text = vnode.text;
  47665. thunk.elm = vnode.elm;
  47666. }
  47667. function init(thunk) {
  47668. var cur = thunk.data;
  47669. var vnode = cur.fn.apply(undefined, cur.args);
  47670. copyToThunk(vnode, thunk);
  47671. }
  47672. function prepatch(oldVnode, thunk) {
  47673. var i, old = oldVnode.data, cur = thunk.data;
  47674. var oldArgs = old.args, args = cur.args;
  47675. if (old.fn !== cur.fn || oldArgs.length !== args.length) {
  47676. copyToThunk(cur.fn.apply(undefined, args), thunk);
  47677. return;
  47678. }
  47679. for (i = 0; i < args.length; ++i) {
  47680. if (oldArgs[i] !== args[i]) {
  47681. copyToThunk(cur.fn.apply(undefined, args), thunk);
  47682. return;
  47683. }
  47684. }
  47685. copyToThunk(oldVnode, thunk);
  47686. }
  47687. exports.thunk = function thunk(sel, key, fn, args) {
  47688. if (args === undefined) {
  47689. args = fn;
  47690. fn = key;
  47691. key = undefined;
  47692. }
  47693. return h_1.h(sel, {
  47694. key: key,
  47695. hook: { init: init, prepatch: prepatch },
  47696. fn: fn,
  47697. args: args
  47698. });
  47699. };
  47700. exports.default = exports.thunk;
  47701. },{"./h":1}],6:[function(require,module,exports){
  47702. "use strict";
  47703. Object.defineProperty(exports, "__esModule", { value: true });
  47704. function vnode(sel, data, children, text, elm) {
  47705. var key = data === undefined ? undefined : data.key;
  47706. return { sel: sel, data: data, children: children,
  47707. text: text, elm: elm, key: key };
  47708. }
  47709. exports.vnode = vnode;
  47710. exports.default = vnode;
  47711. },{}]},{},[4])(4)
  47712. });
  47713. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy8ucmVnaXN0cnkubnBtanMub3JnL2Jyb3dzZXItcGFjay82LjAuMi9ub2RlX21vZHVsZXMvYnJvd3Nlci1wYWNrL19wcmVsdWRlLmpzIiwiaC5qcyIsImh0bWxkb21hcGkuanMiLCJpcy5qcyIsInNuYWJiZG9tLmpzIiwidGh1bmsuanMiLCJ2bm9kZS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQ0FBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FDMURBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUNqRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUNQQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUNsVEE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUM5Q0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIihmdW5jdGlvbiBlKHQsbixyKXtmdW5jdGlvbiBzKG8sdSl7aWYoIW5bb10pe2lmKCF0W29dKXt2YXIgYT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2lmKCF1JiZhKXJldHVybiBhKG8sITApO2lmKGkpcmV0dXJuIGkobywhMCk7dmFyIGY9bmV3IEVycm9yKFwiQ2Fubm90IGZpbmQgbW9kdWxlICdcIitvK1wiJ1wiKTt0aHJvdyBmLmNvZGU9XCJNT0RVTEVfTk9UX0ZPVU5EXCIsZn12YXIgbD1uW29dPXtleHBvcnRzOnt9fTt0W29dWzBdLmNhbGwobC5leHBvcnRzLGZ1bmN0aW9uKGUpe3ZhciBuPXRbb11bMV1bZV07cmV0dXJuIHMobj9uOmUpfSxsLGwuZXhwb3J0cyxlLHQsbixyKX1yZXR1cm4gbltvXS5leHBvcnRzfXZhciBpPXR5cGVvZiByZXF1aXJlPT1cImZ1bmN0aW9uXCImJnJlcXVpcmU7Zm9yKHZhciBvPTA7bzxyLmxlbmd0aDtvKyspcyhyW29dKTtyZXR1cm4gc30pIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG52YXIgdm5vZGVfMSA9IHJlcXVpcmUoXCIuL3Zub2RlXCIpO1xudmFyIGlzID0gcmVxdWlyZShcIi4vaXNcIik7XG5mdW5jdGlvbiBhZGROUyhkYXRhLCBjaGlsZHJlbiwgc2VsKSB7XG4gICAgZGF0YS5ucyA9ICdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc7XG4gICAgaWYgKHNlbCAhPT0gJ2ZvcmVpZ25PYmplY3QnICYmIGNoaWxkcmVuICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGlsZHJlbi5sZW5ndGg7ICsraSkge1xuICAgICAgICAgICAgdmFyIGNoaWxkRGF0YSA9IGNoaWxkcmVuW2ldLmRhdGE7XG4gICAgICAgICAgICBpZiAoY2hpbGREYXRhICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICBhZGROUyhjaGlsZERhdGEsIGNoaWxkcmVuW2ldLmNoaWxkcmVuLCBjaGlsZHJlbltpXS5zZWwpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxufVxuZnVuY3Rpb24gaChzZWwsIGIsIGMpIHtcbiAgICB2YXIgZGF0YSA9IHt9LCBjaGlsZHJlbiwgdGV4dCwgaTtcbiAgICBpZiAoYyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIGRhdGEgPSBiO1xuICAgICAgICBpZiAoaXMuYXJyYXkoYykpIHtcbiAgICAgICAgICAgIGNoaWxkcmVuID0gYztcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChpcy5wcmltaXRpdmUoYykpIHtcbiAgICAgICAgICAgIHRleHQgPSBjO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGMgJiYgYy5zZWwpIHtcbiAgICAgICAgICAgIGNoaWxkcmVuID0gW2NdO1xuICAgICAgICB9XG4gICAgfVxuICAgIGVsc2UgaWYgKGIgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICBpZiAoaXMuYXJyYXkoYikpIHtcbiAgICAgICAgICAgIGNoaWxkcmVuID0gYjtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChpcy5wcmltaXRpdmUoYikpIHtcbiAgICAgICAgICAgIHRleHQgPSBiO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGIgJiYgYi5zZWwpIHtcbiAgICAgICAgICAgIGNoaWxkcmVuID0gW2JdO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgZGF0YSA9IGI7XG4gICAgICAgIH1cbiAgICB9XG4gICAgaWYgKGlzLmFycmF5KGNoaWxkcmVuKSkge1xuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgY2hpbGRyZW4ubGVuZ3RoOyArK2kpIHtcbiAgICAgICAgICAgIGlmIChpcy5wcmltaXRpdmUoY2hpbGRyZW5baV0pKVxuICAgICAgICAgICAgICAgIGNoaWxkcmVuW2ldID0gdm5vZGVfMS52bm9kZSh1bmRlZmluZWQsIHVuZGVmaW5lZCwgdW5kZWZpbmVkLCBjaGlsZHJlbltpXSk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgaWYgKHNlbFswXSA9PT0gJ3MnICYmIHNlbFsxXSA9PT0gJ3YnICYmIHNlbFsyXSA9PT0gJ2cnICYmXG4gICAgICAgIChzZWwubGVuZ3RoID09PSAzIHx8IHNlbFszXSA9PT0gJy4nIHx8IHNlbFszXSA9PT0gJyMnKSkge1xuICAgICAgICBhZGROUyhkYXRhLCBjaGlsZHJlbiwgc2VsKTtcbiAgICB9XG4gICAgcmV0dXJuIHZub2RlXzEudm5vZGUoc2VsLCBkYXRhLCBjaGlsZHJlbiwgdGV4dCwgdW5kZWZpbmVkKTtcbn1cbmV4cG9ydHMuaCA9IGg7XG47XG5leHBvcnRzLmRlZmF1bHQgPSBoO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9aC5qcy5tYXAiLCJcInVzZSBzdHJpY3RcIjtcbk9iamVjdC5kZWZpbmVQcm9wZXJ0eShleHBvcnRzLCBcIl9fZXNNb2R1bGVcIiwgeyB2YWx1ZTogdHJ1ZSB9KTtcbmZ1bmN0aW9uIGNyZWF0ZUVsZW1lbnQodGFnTmFtZSkge1xuICAgIHJldHVybiBkb2N1bWVudC5jcmVhdGVFbGVtZW50KHRhZ05hbWUpO1xufVxuZnVuY3Rpb24gY3JlYXRlRWxlbWVudE5TKG5hbWVzcGFjZVVSSSwgcXVhbGlmaWVkTmFtZSkge1xuICAgIHJldHVybiBkb2N1bWVudC5jcmVhdGVFbGVtZW50TlMobmFtZXNwYWNlVVJJLCBxdWFsaWZpZWROYW1lKTtcbn1cbmZ1bmN0aW9uIGNyZWF0ZVRleHROb2RlKHRleHQpIHtcbiAgICByZXR1cm4gZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUodGV4dCk7XG59XG5mdW5jdGlvbiBjcmVhdGVDb21tZW50KHRleHQpIHtcbiAgICByZXR1cm4gZG9jdW1lbnQuY3JlYXRlQ29tbWVudCh0ZXh0KTtcbn1cbmZ1bmN0aW9uIGluc2VydEJlZm9yZShwYXJlbnROb2RlLCBuZXdOb2RlLCByZWZlcmVuY2VOb2RlKSB7XG4gICAgcGFyZW50Tm9kZS5pbnNlcnRCZWZvcmUobmV3Tm9kZSwgcmVmZXJlbmNlTm9kZSk7XG59XG5mdW5jdGlvbiByZW1vdmVDaGlsZChub2RlLCBjaGlsZCkge1xuICAgIG5vZGUucmVtb3ZlQ2hpbGQoY2hpbGQpO1xufVxuZnVuY3Rpb24gYXBwZW5kQ2hpbGQobm9kZSwgY2hpbGQpIHtcbiAgICBub2RlLmFwcGVuZENoaWxkKGNoaWxkKTtcbn1cbmZ1bmN0aW9uIHBhcmVudE5vZGUobm9kZSkge1xuICAgIHJldHVybiBub2RlLnBhcmVudE5vZGU7XG59XG5mdW5jdGlvbiBuZXh0U2libGluZyhub2RlKSB7XG4gICAgcmV0dXJuIG5vZGUubmV4dFNpYmxpbmc7XG59XG5mdW5jdGlvbiB0YWdOYW1lKGVsbSkge1xuICAgIHJldHVybiBlbG0udGFnTmFtZTtcbn1cbmZ1bmN0aW9uIHNldFRleHRDb250ZW50KG5vZGUsIHRleHQpIHtcbiAgICBub2RlLnRleHRDb250ZW50ID0gdGV4dDtcbn1cbmZ1bmN0aW9uIGdldFRleHRDb250ZW50KG5vZGUpIHtcbiAgICByZXR1cm4gbm9kZS50ZXh0Q29udGVudDtcbn1cbmZ1bmN0aW9uIGlzRWxlbWVudChub2RlKSB7XG4gICAgcmV0dXJuIG5vZGUubm9kZVR5cGUgPT09IDE7XG59XG5mdW5jdGlvbiBpc1RleHQobm9kZSkge1xuICAgIHJldHVybiBub2RlLm5vZGVUeXBlID09PSAzO1xufVxuZnVuY3Rpb24gaXNDb21tZW50KG5vZGUpIHtcbiAgICByZXR1cm4gbm9kZS5ub2RlVHlwZSA9PT0gODtcbn1cbmV4cG9ydHMuaHRtbERvbUFwaSA9IHtcbiAgICBjcmVhdGVFbGVtZW50OiBjcmVhdGVFbGVtZW50LFxuICAgIGNyZWF0ZUVsZW1lbnROUzogY3JlYXRlRWxlbWVudE5TLFxuICAgIGNyZWF0ZVRleHROb2RlOiBjcmVhdGVUZXh0Tm9kZSxcbiAgICBjcmVhdGVDb21tZW50OiBjcmVhdGVDb21tZW50LFxuICAgIGluc2VydEJlZm9yZTogaW5zZXJ0QmVmb3JlLFxuICAgIHJlbW92ZUNoaWxkOiByZW1vdmVDaGlsZCxcbiAgICBhcHBlbmRDaGlsZDogYXBwZW5kQ2hpbGQsXG4gICAgcGFyZW50Tm9kZTogcGFyZW50Tm9kZSxcbiAgICBuZXh0U2libGluZzogbmV4dFNpYmxpbmcsXG4gICAgdGFnTmFtZTogdGFnTmFtZSxcbiAgICBzZXRUZXh0Q29udGVudDogc2V0VGV4dENvbnRlbnQsXG4gICAgZ2V0VGV4dENvbnRlbnQ6IGdldFRleHRDb250ZW50LFxuICAgIGlzRWxlbWVudDogaXNFbGVtZW50LFxuICAgIGlzVGV4dDogaXNUZXh0LFxuICAgIGlzQ29tbWVudDogaXNDb21tZW50LFxufTtcbmV4cG9ydHMuZGVmYXVsdCA9IGV4cG9ydHMuaHRtbERvbUFwaTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWh0bWxkb21hcGkuanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG5leHBvcnRzLmFycmF5ID0gQXJyYXkuaXNBcnJheTtcbmZ1bmN0aW9uIHByaW1pdGl2ZShzKSB7XG4gICAgcmV0dXJuIHR5cGVvZiBzID09PSAnc3RyaW5nJyB8fCB0eXBlb2YgcyA9PT0gJ251bWJlcic7XG59XG5leHBvcnRzLnByaW1pdGl2ZSA9IHByaW1pdGl2ZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPWlzLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIHZub2RlXzEgPSByZXF1aXJlKFwiLi92bm9kZVwiKTtcbnZhciBpcyA9IHJlcXVpcmUoXCIuL2lzXCIpO1xudmFyIGh0bWxkb21hcGlfMSA9IHJlcXVpcmUoXCIuL2h0bWxkb21hcGlcIik7XG5mdW5jdGlvbiBpc1VuZGVmKHMpIHsgcmV0dXJuIHMgPT09IHVuZGVmaW5lZDsgfVxuZnVuY3Rpb24gaXNEZWYocykgeyByZXR1cm4gcyAhPT0gdW5kZWZpbmVkOyB9XG52YXIgZW1wdHlOb2RlID0gdm5vZGVfMS5kZWZhdWx0KCcnLCB7fSwgW10sIHVuZGVmaW5lZCwgdW5kZWZpbmVkKTtcbmZ1bmN0aW9uIHNhbWVWbm9kZSh2bm9kZTEsIHZub2RlMikge1xuICAgIHJldHVybiB2bm9kZTEua2V5ID09PSB2bm9kZTIua2V5ICYmIHZub2RlMS5zZWwgPT09IHZub2RlMi5zZWw7XG59XG5mdW5jdGlvbiBpc1Zub2RlKHZub2RlKSB7XG4gICAgcmV0dXJuIHZub2RlLnNlbCAhPT0gdW5kZWZpbmVkO1xufVxuZnVuY3Rpb24gY3JlYXRlS2V5VG9PbGRJZHgoY2hpbGRyZW4sIGJlZ2luSWR4LCBlbmRJZHgpIHtcbiAgICB2YXIgaSwgbWFwID0ge30sIGtleSwgY2g7XG4gICAgZm9yIChpID0gYmVnaW5JZHg7IGkgPD0gZW5kSWR4OyArK2kpIHtcbiAgICAgICAgY2ggPSBjaGlsZHJlbltpXTtcbiAgICAgICAgaWYgKGNoICE9IG51bGwpIHtcbiAgICAgICAgICAgIGtleSA9IGNoLmtleTtcbiAgICAgICAgICAgIGlmIChrZXkgIT09IHVuZGVmaW5lZClcbiAgICAgICAgICAgICAgICBtYXBba2V5XSA9IGk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIG1hcDtcbn1cbnZhciBob29rcyA9IFsnY3JlYXRlJywgJ3VwZGF0ZScsICdyZW1vdmUnLCAnZGVzdHJveScsICdwcmUnLCAncG9zdCddO1xudmFyIGhfMSA9IHJlcXVpcmUoXCIuL2hcIik7XG5leHBvcnRzLmggPSBoXzEuaDtcbnZhciB0aHVua18xID0gcmVxdWlyZShcIi4vdGh1bmtcIik7XG5leHBvcnRzLnRodW5rID0gdGh1bmtfMS50aHVuaztcbmZ1bmN0aW9uIGluaXQobW9kdWxlcywgZG9tQXBpKSB7XG4gICAgdmFyIGksIGosIGNicyA9IHt9O1xuICAgIHZhciBhcGkgPSBkb21BcGkgIT09IHVuZGVmaW5lZCA/IGRvbUFwaSA6IGh0bWxkb21hcGlfMS5kZWZhdWx0O1xuICAgIGZvciAoaSA9IDA7IGkgPCBob29rcy5sZW5ndGg7ICsraSkge1xuICAgICAgICBjYnNbaG9va3NbaV1dID0gW107XG4gICAgICAgIGZvciAoaiA9IDA7IGogPCBtb2R1bGVzLmxlbmd0aDsgKytqKSB7XG4gICAgICAgICAgICB2YXIgaG9vayA9IG1vZHVsZXNbal1baG9va3NbaV1dO1xuICAgICAgICAgICAgaWYgKGhvb2sgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIGNic1tob29rc1tpXV0ucHVzaChob29rKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBmdW5jdGlvbiBlbXB0eU5vZGVBdChlbG0pIHtcbiAgICAgICAgdmFyIGlkID0gZWxtLmlkID8gJyMnICsgZWxtLmlkIDogJyc7XG4gICAgICAgIHZhciBjID0gZWxtLmNsYXNzTmFtZSA/ICcuJyArIGVsbS5jbGFzc05hbWUuc3BsaXQoJyAnKS5qb2luKCcuJykgOiAnJztcbiAgICAgICAgcmV0dXJuIHZub2RlXzEuZGVmYXVsdChhcGkudGFnTmFtZShlbG0pLnRvTG93ZXJDYXNlKCkgKyBpZCArIGMsIHt9LCBbXSwgdW5kZWZpbmVkLCBlbG0pO1xuICAgIH1cbiAgICBmdW5jdGlvbiBjcmVhdGVSbUNiKGNoaWxkRWxtLCBsaXN0ZW5lcnMpIHtcbiAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIHJtQ2IoKSB7XG4gICAgICAgICAgICBpZiAoLS1saXN0ZW5lcnMgPT09IDApIHtcbiAgICAgICAgICAgICAgICB2YXIgcGFyZW50XzEgPSBhcGkucGFyZW50Tm9kZShjaGlsZEVsbSk7XG4gICAgICAgICAgICAgICAgYXBpLnJlbW92ZUNoaWxkKHBhcmVudF8xLCBjaGlsZEVsbSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfVxuICAgIGZ1bmN0aW9uIGNyZWF0ZUVsbSh2bm9kZSwgaW5zZXJ0ZWRWbm9kZVF1ZXVlKSB7XG4gICAgICAgIHZhciBpLCBkYXRhID0gdm5vZGUuZGF0YTtcbiAgICAgICAgaWYgKGRhdGEgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgaWYgKGlzRGVmKGkgPSBkYXRhLmhvb2spICYmIGlzRGVmKGkgPSBpLmluaXQpKSB7XG4gICAgICAgICAgICAgICAgaSh2bm9kZSk7XG4gICAgICAgICAgICAgICAgZGF0YSA9IHZub2RlLmRhdGE7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgdmFyIGNoaWxkcmVuID0gdm5vZGUuY2hpbGRyZW4sIHNlbCA9IHZub2RlLnNlbDtcbiAgICAgICAgaWYgKHNlbCA9PT0gJyEnKSB7XG4gICAgICAgICAgICBpZiAoaXNVbmRlZih2bm9kZS50ZXh0KSkge1xuICAgICAgICAgICAgICAgIHZub2RlLnRleHQgPSAnJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZub2RlLmVsbSA9IGFwaS5jcmVhdGVDb21tZW50KHZub2RlLnRleHQpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKHNlbCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAvLyBQYXJzZSBzZWxlY3RvclxuICAgICAgICAgICAgdmFyIGhhc2hJZHggPSBzZWwuaW5kZXhPZignIycpO1xuICAgICAgICAgICAgdmFyIGRvdElkeCA9IHNlbC5pbmRleE9mKCcuJywgaGFzaElkeCk7XG4gICAgICAgICAgICB2YXIgaGFzaCA9IGhhc2hJZHggPiAwID8gaGFzaElkeCA6IHNlbC5sZW5ndGg7XG4gICAgICAgICAgICB2YXIgZG90ID0gZG90SWR4ID4gMCA/IGRvdElkeCA6IHNlbC5sZW5ndGg7XG4gICAgICAgICAgICB2YXIgdGFnID0gaGFzaElkeCAhPT0gLTEgfHwgZG90SWR4ICE9PSAtMSA/IHNlbC5zbGljZSgwLCBNYXRoLm1pbihoYXNoLCBkb3QpKSA6IHNlbDtcbiAgICAgICAgICAgIHZhciBlbG0gPSB2bm9kZS5lbG0gPSBpc0RlZihkYXRhKSAmJiBpc0RlZihpID0gZGF0YS5ucykgPyBhcGkuY3JlYXRlRWxlbWVudE5TKGksIHRhZylcbiAgICAgICAgICAgICAgICA6IGFwaS5jcmVhdGVFbGVtZW50KHRhZyk7XG4gICAgICAgICAgICBpZiAoaGFzaCA8IGRvdClcbiAgICAgICAgICAgICAgICBlbG0uc2V0QXR0cmlidXRlKCdpZCcsIHNlbC5zbGljZShoYXNoICsgMSwgZG90KSk7XG4gICAgICAgICAgICBpZiAoZG90SWR4ID4gMClcbiAgICAgICAgICAgICAgICBlbG0uc2V0QXR0cmlidXRlKCdjbGFzcycsIHNlbC5zbGljZShkb3QgKyAxKS5yZXBsYWNlKC9cXC4vZywgJyAnKSk7XG4gICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgY2JzLmNyZWF0ZS5sZW5ndGg7ICsraSlcbiAgICAgICAgICAgICAgICBjYnMuY3JlYXRlW2ldKGVtcHR5Tm9kZSwgdm5vZGUpO1xuICAgICAgICAgICAgaWYgKGlzLmFycmF5KGNoaWxkcmVuKSkge1xuICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBjaGlsZHJlbi5sZW5ndGg7ICsraSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgY2ggPSBjaGlsZHJlbltpXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNoICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFwaS5hcHBlbmRDaGlsZChlbG0sIGNyZWF0ZUVsbShjaCwgaW5zZXJ0ZWRWbm9kZVF1ZXVlKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChpcy5wcmltaXRpdmUodm5vZGUudGV4dCkpIHtcbiAgICAgICAgICAgICAgICBhcGkuYXBwZW5kQ2hpbGQoZWxtLCBhcGkuY3JlYXRlVGV4dE5vZGUodm5vZGUudGV4dCkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaSA9IHZub2RlLmRhdGEuaG9vazsgLy8gUmV1c2UgdmFyaWFibGVcbiAgICAgICAgICAgIGlmIChpc0RlZihpKSkge1xuICAgICAgICAgICAgICAgIGlmIChpLmNyZWF0ZSlcbiAgICAgICAgICAgICAgICAgICAgaS5jcmVhdGUoZW1wdHlOb2RlLCB2bm9kZSk7XG4gICAgICAgICAgICAgICAgaWYgKGkuaW5zZXJ0KVxuICAgICAgICAgICAgICAgICAgICBpbnNlcnRlZFZub2RlUXVldWUucHVzaCh2bm9kZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB2bm9kZS5lbG0gPSBhcGkuY3JlYXRlVGV4dE5vZGUodm5vZGUudGV4dCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHZub2RlLmVsbTtcbiAgICB9XG4gICAgZnVuY3Rpb24gYWRkVm5vZGVzKHBhcmVudEVsbSwgYmVmb3JlLCB2bm9kZXMsIHN0YXJ0SWR4LCBlbmRJZHgsIGluc2VydGVkVm5vZGVRdWV1ZSkge1xuICAgICAgICBmb3IgKDsgc3RhcnRJZHggPD0gZW5kSWR4OyArK3N0YXJ0SWR4KSB7XG4gICAgICAgICAgICB2YXIgY2ggPSB2bm9kZXNbc3RhcnRJZHhdO1xuICAgICAgICAgICAgaWYgKGNoICE9IG51bGwpIHtcbiAgICAgICAgICAgICAgICBhcGkuaW5zZXJ0QmVmb3JlKHBhcmVudEVsbSwgY3JlYXRlRWxtKGNoLCBpbnNlcnRlZFZub2RlUXVldWUpLCBiZWZvcmUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIGZ1bmN0aW9uIGludm9rZURlc3Ryb3lIb29rKHZub2RlKSB7XG4gICAgICAgIHZhciBpLCBqLCBkYXRhID0gdm5vZGUuZGF0YTtcbiAgICAgICAgaWYgKGRhdGEgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgaWYgKGlzRGVmKGkgPSBkYXRhLmhvb2spICYmIGlzRGVmKGkgPSBpLmRlc3Ryb3kpKVxuICAgICAgICAgICAgICAgIGkodm5vZGUpO1xuICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGNicy5kZXN0cm95Lmxlbmd0aDsgKytpKVxuICAgICAgICAgICAgICAgIGNicy5kZXN0cm95W2ldKHZub2RlKTtcbiAgICAgICAgICAgIGlmICh2bm9kZS5jaGlsZHJlbiAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IHZub2RlLmNoaWxkcmVuLmxlbmd0aDsgKytqKSB7XG4gICAgICAgICAgICAgICAgICAgIGkgPSB2bm9kZS5jaGlsZHJlbltqXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGkgIT0gbnVsbCAmJiB0eXBlb2YgaSAhPT0gXCJzdHJpbmdcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaW52b2tlRGVzdHJveUhvb2soaSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgZnVuY3Rpb24gcmVtb3ZlVm5vZGVzKHBhcmVudEVsbSwgdm5vZGVzLCBzdGFydElkeCwgZW5kSWR4KSB7XG4gICAgICAgIGZvciAoOyBzdGFydElkeCA8PSBlbmRJZHg7ICsrc3RhcnRJZHgpIHtcbiAgICAgICAgICAgIHZhciBpXzEgPSB2b2lkIDAsIGxpc3RlbmVycyA9IHZvaWQgMCwgcm0gPSB2b2lkIDAsIGNoID0gdm5vZGVzW3N0YXJ0SWR4XTtcbiAgICAgICAgICAgIGlmIChjaCAhPSBudWxsKSB7XG4gICAgICAgICAgICAgICAgaWYgKGlzRGVmKGNoLnNlbCkpIHtcbiAgICAgICAgICAgICAgICAgICAgaW52b2tlRGVzdHJveUhvb2soY2gpO1xuICAgICAgICAgICAgICAgICAgICBsaXN0ZW5lcnMgPSBjYnMucmVtb3ZlLmxlbmd0aCArIDE7XG4gICAgICAgICAgICAgICAgICAgIHJtID0gY3JlYXRlUm1DYihjaC5lbG0sIGxpc3RlbmVycyk7XG4gICAgICAgICAgICAgICAgICAgIGZvciAoaV8xID0gMDsgaV8xIDwgY2JzLnJlbW92ZS5sZW5ndGg7ICsraV8xKVxuICAgICAgICAgICAgICAgICAgICAgICAgY2JzLnJlbW92ZVtpXzFdKGNoLCBybSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpc0RlZihpXzEgPSBjaC5kYXRhKSAmJiBpc0RlZihpXzEgPSBpXzEuaG9vaykgJiYgaXNEZWYoaV8xID0gaV8xLnJlbW92ZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlfMShjaCwgcm0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgcm0oKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgYXBpLnJlbW92ZUNoaWxkKHBhcmVudEVsbSwgY2guZWxtKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgZnVuY3Rpb24gdXBkYXRlQ2hpbGRyZW4ocGFyZW50RWxtLCBvbGRDaCwgbmV3Q2gsIGluc2VydGVkVm5vZGVRdWV1ZSkge1xuICAgICAgICB2YXIgb2xkU3RhcnRJZHggPSAwLCBuZXdTdGFydElkeCA9IDA7XG4gICAgICAgIHZhciBvbGRFbmRJZHggPSBvbGRDaC5sZW5ndGggLSAxO1xuICAgICAgICB2YXIgb2xkU3RhcnRWbm9kZSA9IG9sZENoWzBdO1xuICAgICAgICB2YXIgb2xkRW5kVm5vZGUgPSBvbGRDaFtvbGRFbmRJZHhdO1xuICAgICAgICB2YXIgbmV3RW5kSWR4ID0gbmV3Q2gubGVuZ3RoIC0gMTtcbiAgICAgICAgdmFyIG5ld1N0YXJ0Vm5vZGUgPSBuZXdDaFswXTtcbiAgICAgICAgdmFyIG5ld0VuZFZub2RlID0gbmV3Q2hbbmV3RW5kSWR4XTtcbiAgICAgICAgdmFyIG9sZEtleVRvSWR4O1xuICAgICAgICB2YXIgaWR4SW5PbGQ7XG4gICAgICAgIHZhciBlbG1Ub01vdmU7XG4gICAgICAgIHZhciBiZWZvcmU7XG4gICAgICAgIHdoaWxlIChvbGRTdGFydElkeCA8PSBvbGRFbmRJZHggJiYgbmV3U3RhcnRJZHggPD0gbmV3RW5kSWR4KSB7XG4gICAgICAgICAgICBpZiAob2xkU3RhcnRWbm9kZSA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgb2xkU3RhcnRWbm9kZSA9IG9sZENoWysrb2xkU3RhcnRJZHhdOyAvLyBWbm9kZSBtaWdodCBoYXZlIGJlZW4gbW92ZWQgbGVmdFxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAob2xkRW5kVm5vZGUgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIG9sZEVuZFZub2RlID0gb2xkQ2hbLS1vbGRFbmRJZHhdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAobmV3U3RhcnRWbm9kZSA9PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgbmV3U3RhcnRWbm9kZSA9IG5ld0NoWysrbmV3U3RhcnRJZHhdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAobmV3RW5kVm5vZGUgPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIG5ld0VuZFZub2RlID0gbmV3Q2hbLS1uZXdFbmRJZHhdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoc2FtZVZub2RlKG9sZFN0YXJ0Vm5vZGUsIG5ld1N0YXJ0Vm5vZGUpKSB7XG4gICAgICAgICAgICAgICAgcGF0Y2hWbm9kZShvbGRTdGFydFZub2RlLCBuZXdTdGFydFZub2RlLCBpbnNlcnRlZFZub2RlUXVldWUpO1xuICAgICAgICAgICAgICAgIG9sZFN0YXJ0Vm5vZGUgPSBvbGRDaFsrK29sZFN0YXJ0SWR4XTtcbiAgICAgICAgICAgICAgICBuZXdTdGFydFZub2RlID0gbmV3Q2hbKytuZXdTdGFydElkeF07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChzYW1lVm5vZGUob2xkRW5kVm5vZGUsIG5ld0VuZFZub2RlKSkge1xuICAgICAgICAgICAgICAgIHBhdGNoVm5vZGUob2xkRW5kVm5vZGUsIG5ld0VuZFZub2RlLCBpbnNlcnRlZFZub2RlUXVldWUpO1xuICAgICAgICAgICAgICAgIG9sZEVuZFZub2RlID0gb2xkQ2hbLS1vbGRFbmRJZHhdO1xuICAgICAgICAgICAgICAgIG5ld0VuZFZub2RlID0gbmV3Q2hbLS1uZXdFbmRJZHhdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoc2FtZVZub2RlKG9sZFN0YXJ0Vm5vZGUsIG5ld0VuZFZub2RlKSkge1xuICAgICAgICAgICAgICAgIHBhdGNoVm5vZGUob2xkU3RhcnRWbm9kZSwgbmV3RW5kVm5vZGUsIGluc2VydGVkVm5vZGVRdWV1ZSk7XG4gICAgICAgICAgICAgICAgYXBpLmluc2VydEJlZm9yZShwYXJlbnRFbG0sIG9sZFN0YXJ0Vm5vZGUuZWxtLCBhcGkubmV4dFNpYmxpbmcob2xkRW5kVm5vZGUuZWxtKSk7XG4gICAgICAgICAgICAgICAgb2xkU3RhcnRWbm9kZSA9IG9sZENoWysrb2xkU3RhcnRJZHhdO1xuICAgICAgICAgICAgICAgIG5ld0VuZFZub2RlID0gbmV3Q2hbLS1uZXdFbmRJZHhdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoc2FtZVZub2RlKG9sZEVuZFZub2RlLCBuZXdTdGFydFZub2RlKSkge1xuICAgICAgICAgICAgICAgIHBhdGNoVm5vZGUob2xkRW5kVm5vZGUsIG5ld1N0YXJ0Vm5vZGUsIGluc2VydGVkVm5vZGVRdWV1ZSk7XG4gICAgICAgICAgICAgICAgYXBpLmluc2VydEJlZm9yZShwYXJlbnRFbG0sIG9sZEVuZFZub2RlLmVsbSwgb2xkU3RhcnRWbm9kZS5lbG0pO1xuICAgICAgICAgICAgICAgIG9sZEVuZFZub2RlID0gb2xkQ2hbLS1vbGRFbmRJZHhdO1xuICAgICAgICAgICAgICAgIG5ld1N0YXJ0Vm5vZGUgPSBuZXdDaFsrK25ld1N0YXJ0SWR4XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChvbGRLZXlUb0lkeCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgIG9sZEtleVRvSWR4ID0gY3JlYXRlS2V5VG9PbGRJZHgob2xkQ2gsIG9sZFN0YXJ0SWR4LCBvbGRFbmRJZHgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZHhJbk9sZCA9IG9sZEtleVRvSWR4W25ld1N0YXJ0Vm5vZGUua2V5XTtcbiAgICAgICAgICAgICAgICBpZiAoaXNVbmRlZihpZHhJbk9sZCkpIHtcbiAgICAgICAgICAgICAgICAgICAgYXBpLmluc2VydEJlZm9yZShwYXJlbnRFbG0sIGNyZWF0ZUVsbShuZXdTdGFydFZub2RlLCBpbnNlcnRlZFZub2RlUXVldWUpLCBvbGRTdGFydFZub2RlLmVsbSk7XG4gICAgICAgICAgICAgICAgICAgIG5ld1N0YXJ0Vm5vZGUgPSBuZXdDaFsrK25ld1N0YXJ0SWR4XTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGVsbVRvTW92ZSA9IG9sZENoW2lkeEluT2xkXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVsbVRvTW92ZS5zZWwgIT09IG5ld1N0YXJ0Vm5vZGUuc2VsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhcGkuaW5zZXJ0QmVmb3JlKHBhcmVudEVsbSwgY3JlYXRlRWxtKG5ld1N0YXJ0Vm5vZGUsIGluc2VydGVkVm5vZGVRdWV1ZSksIG9sZFN0YXJ0Vm5vZGUuZWxtKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhdGNoVm5vZGUoZWxtVG9Nb3ZlLCBuZXdTdGFydFZub2RlLCBpbnNlcnRlZFZub2RlUXVldWUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgb2xkQ2hbaWR4SW5PbGRdID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgICAgICAgICAgYXBpLmluc2VydEJlZm9yZShwYXJlbnRFbG0sIGVsbVRvTW92ZS5lbG0sIG9sZFN0YXJ0Vm5vZGUuZWxtKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBuZXdTdGFydFZub2RlID0gbmV3Q2hbKytuZXdTdGFydElkeF07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmIChvbGRTdGFydElkeCA+IG9sZEVuZElkeCkge1xuICAgICAgICAgICAgYmVmb3JlID0gbmV3Q2hbbmV3RW5kSWR4ICsgMV0gPT0gbnVsbCA/IG51bGwgOiBuZXdDaFtuZXdFbmRJZHggKyAxXS5lbG07XG4gICAgICAgICAgICBhZGRWbm9kZXMocGFyZW50RWxtLCBiZWZvcmUsIG5ld0NoLCBuZXdTdGFydElkeCwgbmV3RW5kSWR4LCBpbnNlcnRlZFZub2RlUXVldWUpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKG5ld1N0YXJ0SWR4ID4gbmV3RW5kSWR4KSB7XG4gICAgICAgICAgICByZW1vdmVWbm9kZXMocGFyZW50RWxtLCBvbGRDaCwgb2xkU3RhcnRJZHgsIG9sZEVuZElkeCk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgZnVuY3Rpb24gcGF0Y2hWbm9kZShvbGRWbm9kZSwgdm5vZGUsIGluc2VydGVkVm5vZGVRdWV1ZSkge1xuICAgICAgICB2YXIgaSwgaG9vaztcbiAgICAgICAgaWYgKGlzRGVmKGkgPSB2bm9kZS5kYXRhKSAmJiBpc0RlZihob29rID0gaS5ob29rKSAmJiBpc0RlZihpID0gaG9vay5wcmVwYXRjaCkpIHtcbiAgICAgICAgICAgIGkob2xkVm5vZGUsIHZub2RlKTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgZWxtID0gdm5vZGUuZWxtID0gb2xkVm5vZGUuZWxtO1xuICAgICAgICB2YXIgb2xkQ2ggPSBvbGRWbm9kZS5jaGlsZHJlbjtcbiAgICAgICAgdmFyIGNoID0gdm5vZGUuY2hpbGRyZW47XG4gICAgICAgIGlmIChvbGRWbm9kZSA9PT0gdm5vZGUpXG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIGlmICh2bm9kZS5kYXRhICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBjYnMudXBkYXRlLmxlbmd0aDsgKytpKVxuICAgICAgICAgICAgICAgIGNicy51cGRhdGVbaV0ob2xkVm5vZGUsIHZub2RlKTtcbiAgICAgICAgICAgIGkgPSB2bm9kZS5kYXRhLmhvb2s7XG4gICAgICAgICAgICBpZiAoaXNEZWYoaSkgJiYgaXNEZWYoaSA9IGkudXBkYXRlKSlcbiAgICAgICAgICAgICAgICBpKG9sZFZub2RlLCB2bm9kZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGlzVW5kZWYodm5vZGUudGV4dCkpIHtcbiAgICAgICAgICAgIGlmIChpc0RlZihvbGRDaCkgJiYgaXNEZWYoY2gpKSB7XG4gICAgICAgICAgICAgICAgaWYgKG9sZENoICE9PSBjaClcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlQ2hpbGRyZW4oZWxtLCBvbGRDaCwgY2gsIGluc2VydGVkVm5vZGVRdWV1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChpc0RlZihjaCkpIHtcbiAgICAgICAgICAgICAgICBpZiAoaXNEZWYob2xkVm5vZGUudGV4dCkpXG4gICAgICAgICAgICAgICAgICAgIGFwaS5zZXRUZXh0Q29udGVudChlbG0sICcnKTtcbiAgICAgICAgICAgICAgICBhZGRWbm9kZXMoZWxtLCBudWxsLCBjaCwgMCwgY2gubGVuZ3RoIC0gMSwgaW5zZXJ0ZWRWbm9kZVF1ZXVlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGlzRGVmKG9sZENoKSkge1xuICAgICAgICAgICAgICAgIHJlbW92ZVZub2RlcyhlbG0sIG9sZENoLCAwLCBvbGRDaC5sZW5ndGggLSAxKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKGlzRGVmKG9sZFZub2RlLnRleHQpKSB7XG4gICAgICAgICAgICAgICAgYXBpLnNldFRleHRDb250ZW50KGVsbSwgJycpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKG9sZFZub2RlLnRleHQgIT09IHZub2RlLnRleHQpIHtcbiAgICAgICAgICAgIGFwaS5zZXRUZXh0Q29udGVudChlbG0sIHZub2RlLnRleHQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChpc0RlZihob29rKSAmJiBpc0RlZihpID0gaG9vay5wb3N0cGF0Y2gpKSB7XG4gICAgICAgICAgICBpKG9sZFZub2RlLCB2bm9kZSk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIGZ1bmN0aW9uIHBhdGNoKG9sZFZub2RlLCB2bm9kZSkge1xuICAgICAgICB2YXIgaSwgZWxtLCBwYXJlbnQ7XG4gICAgICAgIHZhciBpbnNlcnRlZFZub2RlUXVldWUgPSBbXTtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGNicy5wcmUubGVuZ3RoOyArK2kpXG4gICAgICAgICAgICBjYnMucHJlW2ldKCk7XG4gICAgICAgIGlmICghaXNWbm9kZShvbGRWbm9kZSkpIHtcbiAgICAgICAgICAgIG9sZFZub2RlID0gZW1wdHlOb2RlQXQob2xkVm5vZGUpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChzYW1lVm5vZGUob2xkVm5vZGUsIHZub2RlKSkge1xuICAgICAgICAgICAgcGF0Y2hWbm9kZShvbGRWbm9kZSwgdm5vZGUsIGluc2VydGVkVm5vZGVRdWV1ZSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBlbG0gPSBvbGRWbm9kZS5lbG07XG4gICAgICAgICAgICBwYXJlbnQgPSBhcGkucGFyZW50Tm9kZShlbG0pO1xuICAgICAgICAgICAgY3JlYXRlRWxtKHZub2RlLCBpbnNlcnRlZFZub2RlUXVldWUpO1xuICAgICAgICAgICAgaWYgKHBhcmVudCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIGFwaS5pbnNlcnRCZWZvcmUocGFyZW50LCB2bm9kZS5lbG0sIGFwaS5uZXh0U2libGluZyhlbG0pKTtcbiAgICAgICAgICAgICAgICByZW1vdmVWbm9kZXMocGFyZW50LCBbb2xkVm5vZGVdLCAwLCAwKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBmb3IgKGkgPSAwOyBpIDwgaW5zZXJ0ZWRWbm9kZVF1ZXVlLmxlbmd0aDsgKytpKSB7XG4gICAgICAgICAgICBpbnNlcnRlZFZub2RlUXVldWVbaV0uZGF0YS5ob29rLmluc2VydChpbnNlcnRlZFZub2RlUXVldWVbaV0pO1xuICAgICAgICB9XG4gICAgICAgIGZvciAoaSA9IDA7IGkgPCBjYnMucG9zdC5sZW5ndGg7ICsraSlcbiAgICAgICAgICAgIGNicy5wb3N0W2ldKCk7XG4gICAgICAgIHJldHVybiB2bm9kZTtcbiAgICB9O1xufVxuZXhwb3J0cy5pbml0ID0gaW5pdDtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXNuYWJiZG9tLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIGhfMSA9IHJlcXVpcmUoXCIuL2hcIik7XG5mdW5jdGlvbiBjb3B5VG9UaHVuayh2bm9kZSwgdGh1bmspIHtcbiAgICB0aHVuay5lbG0gPSB2bm9kZS5lbG07XG4gICAgdm5vZGUuZGF0YS5mbiA9IHRodW5rLmRhdGEuZm47XG4gICAgdm5vZGUuZGF0YS5hcmdzID0gdGh1bmsuZGF0YS5hcmdzO1xuICAgIHRodW5rLmRhdGEgPSB2bm9kZS5kYXRhO1xuICAgIHRodW5rLmNoaWxkcmVuID0gdm5vZGUuY2hpbGRyZW47XG4gICAgdGh1bmsudGV4dCA9IHZub2RlLnRleHQ7XG4gICAgdGh1bmsuZWxtID0gdm5vZGUuZWxtO1xufVxuZnVuY3Rpb24gaW5pdCh0aHVuaykge1xuICAgIHZhciBjdXIgPSB0aHVuay5kYXRhO1xuICAgIHZhciB2bm9kZSA9IGN1ci5mbi5hcHBseSh1bmRlZmluZWQsIGN1ci5hcmdzKTtcbiAgICBjb3B5VG9UaHVuayh2bm9kZSwgdGh1bmspO1xufVxuZnVuY3Rpb24gcHJlcGF0Y2gob2xkVm5vZGUsIHRodW5rKSB7XG4gICAgdmFyIGksIG9sZCA9IG9sZFZub2RlLmRhdGEsIGN1ciA9IHRodW5rLmRhdGE7XG4gICAgdmFyIG9sZEFyZ3MgPSBvbGQuYXJncywgYXJncyA9IGN1ci5hcmdzO1xuICAgIGlmIChvbGQuZm4gIT09IGN1ci5mbiB8fCBvbGRBcmdzLmxlbmd0aCAhPT0gYXJncy5sZW5ndGgpIHtcbiAgICAgICAgY29weVRvVGh1bmsoY3VyLmZuLmFwcGx5KHVuZGVmaW5lZCwgYXJncyksIHRodW5rKTtcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cbiAgICBmb3IgKGkgPSAwOyBpIDwgYXJncy5sZW5ndGg7ICsraSkge1xuICAgICAgICBpZiAob2xkQXJnc1tpXSAhPT0gYXJnc1tpXSkge1xuICAgICAgICAgICAgY29weVRvVGh1bmsoY3VyLmZuLmFwcGx5KHVuZGVmaW5lZCwgYXJncyksIHRodW5rKTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgIH1cbiAgICBjb3B5VG9UaHVuayhvbGRWbm9kZSwgdGh1bmspO1xufVxuZXhwb3J0cy50aHVuayA9IGZ1bmN0aW9uIHRodW5rKHNlbCwga2V5LCBmbiwgYXJncykge1xuICAgIGlmIChhcmdzID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgYXJncyA9IGZuO1xuICAgICAgICBmbiA9IGtleTtcbiAgICAgICAga2V5ID0gdW5kZWZpbmVkO1xuICAgIH1cbiAgICByZXR1cm4gaF8xLmgoc2VsLCB7XG4gICAgICAgIGtleToga2V5LFxuICAgICAgICBob29rOiB7IGluaXQ6IGluaXQsIHByZXBhdGNoOiBwcmVwYXRjaCB9LFxuICAgICAgICBmbjogZm4sXG4gICAgICAgIGFyZ3M6IGFyZ3NcbiAgICB9KTtcbn07XG5leHBvcnRzLmRlZmF1bHQgPSBleHBvcnRzLnRodW5rO1xuLy8jIHNvdXJjZU1hcHBpbmdVUkw9dGh1bmsuanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG5mdW5jdGlvbiB2bm9kZShzZWwsIGRhdGEsIGNoaWxkcmVuLCB0ZXh0LCBlbG0pIHtcbiAgICB2YXIga2V5ID0gZGF0YSA9PT0gdW5kZWZpbmVkID8gdW5kZWZpbmVkIDogZGF0YS5rZXk7XG4gICAgcmV0dXJuIHsgc2VsOiBzZWwsIGRhdGE6IGRhdGEsIGNoaWxkcmVuOiBjaGlsZHJlbixcbiAgICAgICAgdGV4dDogdGV4dCwgZWxtOiBlbG0sIGtleToga2V5IH07XG59XG5leHBvcnRzLnZub2RlID0gdm5vZGU7XG5leHBvcnRzLmRlZmF1bHQgPSB2bm9kZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXZub2RlLmpzLm1hcCJdfQ==
  47714. /***/ }),
  47715. /***/ "./node_modules/snabbdom/dist/tovnode.js":
  47716. /*!***********************************************!*\
  47717. !*** ./node_modules/snabbdom/dist/tovnode.js ***!
  47718. \***********************************************/
  47719. /*! no static exports found */
  47720. /***/ (function(module, exports, __webpack_require__) {
  47721. var require;var require;(function(f){if(true){module.exports=f()}else { var g; }})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  47722. "use strict";
  47723. Object.defineProperty(exports, "__esModule", { value: true });
  47724. function createElement(tagName) {
  47725. return document.createElement(tagName);
  47726. }
  47727. function createElementNS(namespaceURI, qualifiedName) {
  47728. return document.createElementNS(namespaceURI, qualifiedName);
  47729. }
  47730. function createTextNode(text) {
  47731. return document.createTextNode(text);
  47732. }
  47733. function createComment(text) {
  47734. return document.createComment(text);
  47735. }
  47736. function insertBefore(parentNode, newNode, referenceNode) {
  47737. parentNode.insertBefore(newNode, referenceNode);
  47738. }
  47739. function removeChild(node, child) {
  47740. node.removeChild(child);
  47741. }
  47742. function appendChild(node, child) {
  47743. node.appendChild(child);
  47744. }
  47745. function parentNode(node) {
  47746. return node.parentNode;
  47747. }
  47748. function nextSibling(node) {
  47749. return node.nextSibling;
  47750. }
  47751. function tagName(elm) {
  47752. return elm.tagName;
  47753. }
  47754. function setTextContent(node, text) {
  47755. node.textContent = text;
  47756. }
  47757. function getTextContent(node) {
  47758. return node.textContent;
  47759. }
  47760. function isElement(node) {
  47761. return node.nodeType === 1;
  47762. }
  47763. function isText(node) {
  47764. return node.nodeType === 3;
  47765. }
  47766. function isComment(node) {
  47767. return node.nodeType === 8;
  47768. }
  47769. exports.htmlDomApi = {
  47770. createElement: createElement,
  47771. createElementNS: createElementNS,
  47772. createTextNode: createTextNode,
  47773. createComment: createComment,
  47774. insertBefore: insertBefore,
  47775. removeChild: removeChild,
  47776. appendChild: appendChild,
  47777. parentNode: parentNode,
  47778. nextSibling: nextSibling,
  47779. tagName: tagName,
  47780. setTextContent: setTextContent,
  47781. getTextContent: getTextContent,
  47782. isElement: isElement,
  47783. isText: isText,
  47784. isComment: isComment,
  47785. };
  47786. exports.default = exports.htmlDomApi;
  47787. },{}],2:[function(require,module,exports){
  47788. "use strict";
  47789. Object.defineProperty(exports, "__esModule", { value: true });
  47790. var vnode_1 = require("./vnode");
  47791. var htmldomapi_1 = require("./htmldomapi");
  47792. function toVNode(node, domApi) {
  47793. var api = domApi !== undefined ? domApi : htmldomapi_1.default;
  47794. var text;
  47795. if (api.isElement(node)) {
  47796. var id = node.id ? '#' + node.id : '';
  47797. var cn = node.getAttribute('class');
  47798. var c = cn ? '.' + cn.split(' ').join('.') : '';
  47799. var sel = api.tagName(node).toLowerCase() + id + c;
  47800. var attrs = {};
  47801. var children = [];
  47802. var name_1;
  47803. var i = void 0, n = void 0;
  47804. var elmAttrs = node.attributes;
  47805. var elmChildren = node.childNodes;
  47806. for (i = 0, n = elmAttrs.length; i < n; i++) {
  47807. name_1 = elmAttrs[i].nodeName;
  47808. if (name_1 !== 'id' && name_1 !== 'class') {
  47809. attrs[name_1] = elmAttrs[i].nodeValue;
  47810. }
  47811. }
  47812. for (i = 0, n = elmChildren.length; i < n; i++) {
  47813. children.push(toVNode(elmChildren[i]));
  47814. }
  47815. return vnode_1.default(sel, { attrs: attrs }, children, undefined, node);
  47816. }
  47817. else if (api.isText(node)) {
  47818. text = api.getTextContent(node);
  47819. return vnode_1.default(undefined, undefined, undefined, text, node);
  47820. }
  47821. else if (api.isComment(node)) {
  47822. text = api.getTextContent(node);
  47823. return vnode_1.default('!', {}, [], text, node);
  47824. }
  47825. else {
  47826. return vnode_1.default('', {}, [], undefined, undefined);
  47827. }
  47828. }
  47829. exports.toVNode = toVNode;
  47830. exports.default = toVNode;
  47831. },{"./htmldomapi":1,"./vnode":3}],3:[function(require,module,exports){
  47832. "use strict";
  47833. Object.defineProperty(exports, "__esModule", { value: true });
  47834. function vnode(sel, data, children, text, elm) {
  47835. var key = data === undefined ? undefined : data.key;
  47836. return { sel: sel, data: data, children: children,
  47837. text: text, elm: elm, key: key };
  47838. }
  47839. exports.vnode = vnode;
  47840. exports.default = vnode;
  47841. },{}]},{},[2])(2)
  47842. });
  47843. //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy8ucmVnaXN0cnkubnBtanMub3JnL2Jyb3dzZXItcGFjay82LjAuMi9ub2RlX21vZHVsZXMvYnJvd3Nlci1wYWNrL19wcmVsdWRlLmpzIiwiaHRtbGRvbWFwaS5qcyIsInRvdm5vZGUuanMiLCJ2bm9kZS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQ0FBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUNqRUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QUMzQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIihmdW5jdGlvbiBlKHQsbixyKXtmdW5jdGlvbiBzKG8sdSl7aWYoIW5bb10pe2lmKCF0W29dKXt2YXIgYT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2lmKCF1JiZhKXJldHVybiBhKG8sITApO2lmKGkpcmV0dXJuIGkobywhMCk7dmFyIGY9bmV3IEVycm9yKFwiQ2Fubm90IGZpbmQgbW9kdWxlICdcIitvK1wiJ1wiKTt0aHJvdyBmLmNvZGU9XCJNT0RVTEVfTk9UX0ZPVU5EXCIsZn12YXIgbD1uW29dPXtleHBvcnRzOnt9fTt0W29dWzBdLmNhbGwobC5leHBvcnRzLGZ1bmN0aW9uKGUpe3ZhciBuPXRbb11bMV1bZV07cmV0dXJuIHMobj9uOmUpfSxsLGwuZXhwb3J0cyxlLHQsbixyKX1yZXR1cm4gbltvXS5leHBvcnRzfXZhciBpPXR5cGVvZiByZXF1aXJlPT1cImZ1bmN0aW9uXCImJnJlcXVpcmU7Zm9yKHZhciBvPTA7bzxyLmxlbmd0aDtvKyspcyhyW29dKTtyZXR1cm4gc30pIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG5mdW5jdGlvbiBjcmVhdGVFbGVtZW50KHRhZ05hbWUpIHtcbiAgICByZXR1cm4gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCh0YWdOYW1lKTtcbn1cbmZ1bmN0aW9uIGNyZWF0ZUVsZW1lbnROUyhuYW1lc3BhY2VVUkksIHF1YWxpZmllZE5hbWUpIHtcbiAgICByZXR1cm4gZG9jdW1lbnQuY3JlYXRlRWxlbWVudE5TKG5hbWVzcGFjZVVSSSwgcXVhbGlmaWVkTmFtZSk7XG59XG5mdW5jdGlvbiBjcmVhdGVUZXh0Tm9kZSh0ZXh0KSB7XG4gICAgcmV0dXJuIGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKHRleHQpO1xufVxuZnVuY3Rpb24gY3JlYXRlQ29tbWVudCh0ZXh0KSB7XG4gICAgcmV0dXJuIGRvY3VtZW50LmNyZWF0ZUNvbW1lbnQodGV4dCk7XG59XG5mdW5jdGlvbiBpbnNlcnRCZWZvcmUocGFyZW50Tm9kZSwgbmV3Tm9kZSwgcmVmZXJlbmNlTm9kZSkge1xuICAgIHBhcmVudE5vZGUuaW5zZXJ0QmVmb3JlKG5ld05vZGUsIHJlZmVyZW5jZU5vZGUpO1xufVxuZnVuY3Rpb24gcmVtb3ZlQ2hpbGQobm9kZSwgY2hpbGQpIHtcbiAgICBub2RlLnJlbW92ZUNoaWxkKGNoaWxkKTtcbn1cbmZ1bmN0aW9uIGFwcGVuZENoaWxkKG5vZGUsIGNoaWxkKSB7XG4gICAgbm9kZS5hcHBlbmRDaGlsZChjaGlsZCk7XG59XG5mdW5jdGlvbiBwYXJlbnROb2RlKG5vZGUpIHtcbiAgICByZXR1cm4gbm9kZS5wYXJlbnROb2RlO1xufVxuZnVuY3Rpb24gbmV4dFNpYmxpbmcobm9kZSkge1xuICAgIHJldHVybiBub2RlLm5leHRTaWJsaW5nO1xufVxuZnVuY3Rpb24gdGFnTmFtZShlbG0pIHtcbiAgICByZXR1cm4gZWxtLnRhZ05hbWU7XG59XG5mdW5jdGlvbiBzZXRUZXh0Q29udGVudChub2RlLCB0ZXh0KSB7XG4gICAgbm9kZS50ZXh0Q29udGVudCA9IHRleHQ7XG59XG5mdW5jdGlvbiBnZXRUZXh0Q29udGVudChub2RlKSB7XG4gICAgcmV0dXJuIG5vZGUudGV4dENvbnRlbnQ7XG59XG5mdW5jdGlvbiBpc0VsZW1lbnQobm9kZSkge1xuICAgIHJldHVybiBub2RlLm5vZGVUeXBlID09PSAxO1xufVxuZnVuY3Rpb24gaXNUZXh0KG5vZGUpIHtcbiAgICByZXR1cm4gbm9kZS5ub2RlVHlwZSA9PT0gMztcbn1cbmZ1bmN0aW9uIGlzQ29tbWVudChub2RlKSB7XG4gICAgcmV0dXJuIG5vZGUubm9kZVR5cGUgPT09IDg7XG59XG5leHBvcnRzLmh0bWxEb21BcGkgPSB7XG4gICAgY3JlYXRlRWxlbWVudDogY3JlYXRlRWxlbWVudCxcbiAgICBjcmVhdGVFbGVtZW50TlM6IGNyZWF0ZUVsZW1lbnROUyxcbiAgICBjcmVhdGVUZXh0Tm9kZTogY3JlYXRlVGV4dE5vZGUsXG4gICAgY3JlYXRlQ29tbWVudDogY3JlYXRlQ29tbWVudCxcbiAgICBpbnNlcnRCZWZvcmU6IGluc2VydEJlZm9yZSxcbiAgICByZW1vdmVDaGlsZDogcmVtb3ZlQ2hpbGQsXG4gICAgYXBwZW5kQ2hpbGQ6IGFwcGVuZENoaWxkLFxuICAgIHBhcmVudE5vZGU6IHBhcmVudE5vZGUsXG4gICAgbmV4dFNpYmxpbmc6IG5leHRTaWJsaW5nLFxuICAgIHRhZ05hbWU6IHRhZ05hbWUsXG4gICAgc2V0VGV4dENvbnRlbnQ6IHNldFRleHRDb250ZW50LFxuICAgIGdldFRleHRDb250ZW50OiBnZXRUZXh0Q29udGVudCxcbiAgICBpc0VsZW1lbnQ6IGlzRWxlbWVudCxcbiAgICBpc1RleHQ6IGlzVGV4dCxcbiAgICBpc0NvbW1lbnQ6IGlzQ29tbWVudCxcbn07XG5leHBvcnRzLmRlZmF1bHQgPSBleHBvcnRzLmh0bWxEb21BcGk7XG4vLyMgc291cmNlTWFwcGluZ1VSTD1odG1sZG9tYXBpLmpzLm1hcCIsIlwidXNlIHN0cmljdFwiO1xuT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsIFwiX19lc01vZHVsZVwiLCB7IHZhbHVlOiB0cnVlIH0pO1xudmFyIHZub2RlXzEgPSByZXF1aXJlKFwiLi92bm9kZVwiKTtcbnZhciBodG1sZG9tYXBpXzEgPSByZXF1aXJlKFwiLi9odG1sZG9tYXBpXCIpO1xuZnVuY3Rpb24gdG9WTm9kZShub2RlLCBkb21BcGkpIHtcbiAgICB2YXIgYXBpID0gZG9tQXBpICE9PSB1bmRlZmluZWQgPyBkb21BcGkgOiBodG1sZG9tYXBpXzEuZGVmYXVsdDtcbiAgICB2YXIgdGV4dDtcbiAgICBpZiAoYXBpLmlzRWxlbWVudChub2RlKSkge1xuICAgICAgICB2YXIgaWQgPSBub2RlLmlkID8gJyMnICsgbm9kZS5pZCA6ICcnO1xuICAgICAgICB2YXIgY24gPSBub2RlLmdldEF0dHJpYnV0ZSgnY2xhc3MnKTtcbiAgICAgICAgdmFyIGMgPSBjbiA/ICcuJyArIGNuLnNwbGl0KCcgJykuam9pbignLicpIDogJyc7XG4gICAgICAgIHZhciBzZWwgPSBhcGkudGFnTmFtZShub2RlKS50b0xvd2VyQ2FzZSgpICsgaWQgKyBjO1xuICAgICAgICB2YXIgYXR0cnMgPSB7fTtcbiAgICAgICAgdmFyIGNoaWxkcmVuID0gW107XG4gICAgICAgIHZhciBuYW1lXzE7XG4gICAgICAgIHZhciBpID0gdm9pZCAwLCBuID0gdm9pZCAwO1xuICAgICAgICB2YXIgZWxtQXR0cnMgPSBub2RlLmF0dHJpYnV0ZXM7XG4gICAgICAgIHZhciBlbG1DaGlsZHJlbiA9IG5vZGUuY2hpbGROb2RlcztcbiAgICAgICAgZm9yIChpID0gMCwgbiA9IGVsbUF0dHJzLmxlbmd0aDsgaSA8IG47IGkrKykge1xuICAgICAgICAgICAgbmFtZV8xID0gZWxtQXR0cnNbaV0ubm9kZU5hbWU7XG4gICAgICAgICAgICBpZiAobmFtZV8xICE9PSAnaWQnICYmIG5hbWVfMSAhPT0gJ2NsYXNzJykge1xuICAgICAgICAgICAgICAgIGF0dHJzW25hbWVfMV0gPSBlbG1BdHRyc1tpXS5ub2RlVmFsdWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZm9yIChpID0gMCwgbiA9IGVsbUNoaWxkcmVuLmxlbmd0aDsgaSA8IG47IGkrKykge1xuICAgICAgICAgICAgY2hpbGRyZW4ucHVzaCh0b1ZOb2RlKGVsbUNoaWxkcmVuW2ldKSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHZub2RlXzEuZGVmYXVsdChzZWwsIHsgYXR0cnM6IGF0dHJzIH0sIGNoaWxkcmVuLCB1bmRlZmluZWQsIG5vZGUpO1xuICAgIH1cbiAgICBlbHNlIGlmIChhcGkuaXNUZXh0KG5vZGUpKSB7XG4gICAgICAgIHRleHQgPSBhcGkuZ2V0VGV4dENvbnRlbnQobm9kZSk7XG4gICAgICAgIHJldHVybiB2bm9kZV8xLmRlZmF1bHQodW5kZWZpbmVkLCB1bmRlZmluZWQsIHVuZGVmaW5lZCwgdGV4dCwgbm9kZSk7XG4gICAgfVxuICAgIGVsc2UgaWYgKGFwaS5pc0NvbW1lbnQobm9kZSkpIHtcbiAgICAgICAgdGV4dCA9IGFwaS5nZXRUZXh0Q29udGVudChub2RlKTtcbiAgICAgICAgcmV0dXJuIHZub2RlXzEuZGVmYXVsdCgnIScsIHt9LCBbXSwgdGV4dCwgbm9kZSk7XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgICByZXR1cm4gdm5vZGVfMS5kZWZhdWx0KCcnLCB7fSwgW10sIHVuZGVmaW5lZCwgdW5kZWZpbmVkKTtcbiAgICB9XG59XG5leHBvcnRzLnRvVk5vZGUgPSB0b1ZOb2RlO1xuZXhwb3J0cy5kZWZhdWx0ID0gdG9WTm9kZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXRvdm5vZGUuanMubWFwIiwiXCJ1c2Ugc3RyaWN0XCI7XG5PYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgXCJfX2VzTW9kdWxlXCIsIHsgdmFsdWU6IHRydWUgfSk7XG5mdW5jdGlvbiB2bm9kZShzZWwsIGRhdGEsIGNoaWxkcmVuLCB0ZXh0LCBlbG0pIHtcbiAgICB2YXIga2V5ID0gZGF0YSA9PT0gdW5kZWZpbmVkID8gdW5kZWZpbmVkIDogZGF0YS5rZXk7XG4gICAgcmV0dXJuIHsgc2VsOiBzZWwsIGRhdGE6IGRhdGEsIGNoaWxkcmVuOiBjaGlsZHJlbixcbiAgICAgICAgdGV4dDogdGV4dCwgZWxtOiBlbG0sIGtleToga2V5IH07XG59XG5leHBvcnRzLnZub2RlID0gdm5vZGU7XG5leHBvcnRzLmRlZmF1bHQgPSB2bm9kZTtcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPXZub2RlLmpzLm1hcCJdfQ==
  47844. /***/ }),
  47845. /***/ "./node_modules/strophejs-plugin-ping/strophe.ping.js":
  47846. /*!************************************************************!*\
  47847. !*** ./node_modules/strophejs-plugin-ping/strophe.ping.js ***!
  47848. \************************************************************/
  47849. /*! no static exports found */
  47850. /***/ (function(module, exports, __webpack_require__) {
  47851. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*
  47852. * Based on Ping Strophejs plugins (https://github.com/metajack/strophejs-plugins/tree/master/ping)
  47853. * This plugin is distributed under the terms of the MIT licence.
  47854. * Please see the LICENCE file for details.
  47855. *
  47856. * Copyright (c) Markus Kohlhase, 2010
  47857. * Refactored by Pavel Lang, 2011
  47858. * AMD Support added by Thierry
  47859. */
  47860. /**
  47861. * File: strophe.ping.js
  47862. * A Strophe plugin for XMPP Ping ( http://xmpp.org/extensions/xep-0199.html )
  47863. */
  47864. (function (root, factory) {
  47865. if (true) {
  47866. // AMD. Register as an anonymous module.
  47867. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
  47868. __webpack_require__(/*! strophe */ "../strophejs/dist/strophe.js")
  47869. ], __WEBPACK_AMD_DEFINE_RESULT__ = (function (Strophe) {
  47870. factory(
  47871. Strophe.Strophe,
  47872. Strophe.$build,
  47873. Strophe.$iq ,
  47874. Strophe.$msg,
  47875. Strophe.$pres
  47876. );
  47877. return Strophe;
  47878. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  47879. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  47880. } else {}
  47881. }(this, function (Strophe, $build, $iq, $msg, $pres) {
  47882. Strophe.addConnectionPlugin('ping', {
  47883. _c: null,
  47884. // called by the Strophe.Connection constructor
  47885. init: function(conn) {
  47886. this._c = conn;
  47887. Strophe.addNamespace('PING', "urn:xmpp:ping");
  47888. },
  47889. /**
  47890. * Function: ping
  47891. *
  47892. * Parameters:
  47893. * (String) to - The JID you want to ping
  47894. * (Function) success - Callback function on success
  47895. * (Function) error - Callback function on error
  47896. * (Integer) timeout - Timeout in milliseconds
  47897. */
  47898. ping: function(jid, success, error, timeout) {
  47899. var id = this._c.getUniqueId('ping');
  47900. var iq = $iq({type: 'get', to: jid, id: id}).c(
  47901. 'ping', {xmlns: Strophe.NS.PING});
  47902. this._c.sendIQ(iq, success, error, timeout);
  47903. },
  47904. /**
  47905. * Function: pong
  47906. *
  47907. * Parameters:
  47908. * (Object) ping - The ping stanza from the server.
  47909. */
  47910. pong: function(ping) {
  47911. var from = ping.getAttribute('from');
  47912. var id = ping.getAttribute('id');
  47913. var iq = $iq({type: 'result', to: from,id: id});
  47914. this._c.sendIQ(iq);
  47915. },
  47916. /**
  47917. * Function: addPingHandler
  47918. *
  47919. * Parameters:
  47920. * (Function) handler - Ping handler
  47921. *
  47922. * Returns:
  47923. * A reference to the handler that can be used to remove it.
  47924. */
  47925. addPingHandler: function(handler) {
  47926. return this._c.addHandler(handler, Strophe.NS.PING, "iq", "get");
  47927. }
  47928. });
  47929. }));
  47930. /***/ }),
  47931. /***/ "./node_modules/strophejs-plugin-rsm/strophe.rsm.js":
  47932. /*!**********************************************************!*\
  47933. !*** ./node_modules/strophejs-plugin-rsm/strophe.rsm.js ***!
  47934. \**********************************************************/
  47935. /*! no static exports found */
  47936. /***/ (function(module, exports, __webpack_require__) {
  47937. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// http://xmpp.org/extensions/xep-0059.html
  47938. (function (root, factory) {
  47939. if (true) {
  47940. // AMD. Register as an anonymous module.
  47941. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [
  47942. __webpack_require__(/*! strophe */ "../strophejs/dist/strophe.js")
  47943. ], __WEBPACK_AMD_DEFINE_RESULT__ = (function (Strophe) {
  47944. factory(
  47945. Strophe.Strophe,
  47946. Strophe.$build,
  47947. Strophe.$iq ,
  47948. Strophe.$msg,
  47949. Strophe.$pres
  47950. );
  47951. return Strophe;
  47952. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  47953. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  47954. } else {}
  47955. }(this, function (Strophe, $build, $iq, $msg, $pres) {
  47956. Strophe.addNamespace('RSM', 'http://jabber.org/protocol/rsm');
  47957. Strophe.RSM = function(options) {
  47958. this.attribs = ['max', 'first', 'last', 'after', 'before', 'index', 'count'];
  47959. if (typeof options.xml != 'undefined') {
  47960. this.fromXMLElement(options.xml);
  47961. } else {
  47962. for (var ii = 0; ii < this.attribs.length; ii++) {
  47963. var attrib = this.attribs[ii];
  47964. this[attrib] = options[attrib];
  47965. }
  47966. }
  47967. };
  47968. Strophe.RSM.prototype = {
  47969. toXML: function() {
  47970. var xml = $build('set', {xmlns: Strophe.NS.RSM});
  47971. for (var ii = 0; ii < this.attribs.length; ii++) {
  47972. var attrib = this.attribs[ii];
  47973. if (typeof this[attrib] != 'undefined') {
  47974. xml = xml.c(attrib).t(this[attrib].toString()).up();
  47975. }
  47976. }
  47977. return xml.tree();
  47978. },
  47979. next: function(max) {
  47980. var newSet = new Strophe.RSM({max: max, after: this.last});
  47981. return newSet;
  47982. },
  47983. previous: function(max) {
  47984. var newSet = new Strophe.RSM({max: max, before: this.first});
  47985. return newSet;
  47986. },
  47987. fromXMLElement: function(xmlElement) {
  47988. for (var ii = 0; ii < this.attribs.length; ii++) {
  47989. var attrib = this.attribs[ii];
  47990. var elem = xmlElement.getElementsByTagName(attrib)[0];
  47991. if (typeof elem != 'undefined' && elem !== null) {
  47992. this[attrib] = Strophe.getText(elem);
  47993. if (attrib == 'first') {
  47994. this.index = elem.getAttribute('index');
  47995. }
  47996. }
  47997. }
  47998. }
  47999. };
  48000. }));
  48001. /***/ }),
  48002. /***/ "./node_modules/twemoji/2/esm.js":
  48003. /*!***************************************!*\
  48004. !*** ./node_modules/twemoji/2/esm.js ***!
  48005. \***************************************/
  48006. /*! exports provided: default */
  48007. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  48008. "use strict";
  48009. __webpack_require__.r(__webpack_exports__);
  48010. /*! Copyright Twitter Inc. and other contributors. Licensed under MIT */
  48011. var twemoji=function(){"use strict";var twemoji={base:"https://twemoji.maxcdn.com/2/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:fromCodePoint,toCodePoint:toCodePoint},onerror:function onerror(){if(this.parentNode){this.parentNode.replaceChild(createText(this.alt,false),this)}},parse:parse,replace:replace,test:test},escaper={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},re=/(?:\ud83d[\udc68\udc69])(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddb0-\uddb3])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f)|[\u0023\u002a\u0030-\u0039]\ufe0f?\u20e3|(?:[\u00a9\u00ae\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\uddb5\uddb6\uddb8\uddb9\uddd1-\udddd]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a-\udc6d\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\udeeb\udeec\udef4-\udef9]|\ud83e[\udd10-\udd17\udd1d\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd40-\udd45\udd47-\udd70\udd73-\udd76\udd7a\udd7c-\udda2\uddb4\uddb7\uddc0-\uddc2\uddd0\uddde-\uddff]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g,UFE0Fg=/\uFE0F/g,U200D=String.fromCharCode(8205),rescaper=/[&<>'"]/g,shouldntBeParsed=/^(?:iframe|noframes|noscript|script|select|style|textarea)$/,fromCharCode=String.fromCharCode;return twemoji;function createText(text,clean){return document.createTextNode(clean?text.replace(UFE0Fg,""):text)}function escapeHTML(s){return s.replace(rescaper,replacer)}function defaultImageSrcGenerator(icon,options){return"".concat(options.base,options.size,"/",icon,options.ext)}function grabAllTextNodes(node,allText){var childNodes=node.childNodes,length=childNodes.length,subnode,nodeType;while(length--){subnode=childNodes[length];nodeType=subnode.nodeType;if(nodeType===3){allText.push(subnode)}else if(nodeType===1&&!("ownerSVGElement"in subnode)&&!shouldntBeParsed.test(subnode.nodeName.toLowerCase())){grabAllTextNodes(subnode,allText)}}return allText}function grabTheRightIcon(rawText){return toCodePoint(rawText.indexOf(U200D)<0?rawText.replace(UFE0Fg,""):rawText)}function parseNode(node,options){var allText=grabAllTextNodes(node,[]),length=allText.length,attrib,attrname,modified,fragment,subnode,text,match,i,index,img,rawText,iconId,src;while(length--){modified=false;fragment=document.createDocumentFragment();subnode=allText[length];text=subnode.nodeValue;i=0;while(match=re.exec(text)){index=match.index;if(index!==i){fragment.appendChild(createText(text.slice(i,index),true))}rawText=match[0];iconId=grabTheRightIcon(rawText);i=index+rawText.length;src=options.callback(iconId,options);if(iconId&&src){img=new Image;img.onerror=options.onerror;img.setAttribute("draggable","false");attrib=options.attributes(rawText,iconId);for(attrname in attrib){if(attrib.hasOwnProperty(attrname)&&attrname.indexOf("on")!==0&&!img.hasAttribute(attrname)){img.setAttribute(attrname,attrib[attrname])}}img.className=options.className;img.alt=rawText;img.src=src;modified=true;fragment.appendChild(img)}if(!img)fragment.appendChild(createText(rawText,false));img=null}if(modified){if(i<text.length){fragment.appendChild(createText(text.slice(i),true))}subnode.parentNode.replaceChild(fragment,subnode)}}return node}function parseString(str,options){return replace(str,function(rawText){var ret=rawText,iconId=grabTheRightIcon(rawText),src=options.callback(iconId,options),attrib,attrname;if(iconId&&src){ret="<img ".concat('class="',options.className,'" ','draggable="false" ','alt="',rawText,'"',' src="',src,'"');attrib=options.attributes(rawText,iconId);for(attrname in attrib){if(attrib.hasOwnProperty(attrname)&&attrname.indexOf("on")!==0&&ret.indexOf(" "+attrname+"=")===-1){ret=ret.concat(" ",attrname,'="',escapeHTML(attrib[attrname]),'"')}}ret=ret.concat("/>")}return ret})}function replacer(m){return escaper[m]}function returnNull(){return null}function toSizeSquaredAsset(value){return typeof value==="number"?value+"x"+value:value}function fromCodePoint(codepoint){var code=typeof codepoint==="string"?parseInt(codepoint,16):codepoint;if(code<65536){return fromCharCode(code)}code-=65536;return fromCharCode(55296+(code>>10),56320+(code&1023))}function parse(what,how){if(!how||typeof how==="function"){how={callback:how}}return(typeof what==="string"?parseString:parseNode)(what,{callback:how.callback||defaultImageSrcGenerator,attributes:typeof how.attributes==="function"?how.attributes:returnNull,base:typeof how.base==="string"?how.base:twemoji.base,ext:how.ext||twemoji.ext,size:how.folder||toSizeSquaredAsset(how.size||twemoji.size),className:how.className||twemoji.className,onerror:how.onerror||twemoji.onerror})}function replace(text,callback){return String(text).replace(re,callback)}function test(text){re.lastIndex=0;var result=re.test(text);re.lastIndex=0;return result}function toCodePoint(unicodeSurrogates,sep){var r=[],c=0,p=0,i=0;while(i<unicodeSurrogates.length){c=unicodeSurrogates.charCodeAt(i++);if(p){r.push((65536+(p-55296<<10)+(c-56320)).toString(16));p=0}else if(55296<=c&&c<=56319){p=c}else{r.push(c.toString(16))}}return r.join(sep||"-")}}();
  48012. /* harmony default export */ __webpack_exports__["default"] = (twemoji);
  48013. /***/ }),
  48014. /***/ "./node_modules/urijs/src/IPv6.js":
  48015. /*!****************************************!*\
  48016. !*** ./node_modules/urijs/src/IPv6.js ***!
  48017. \****************************************/
  48018. /*! no static exports found */
  48019. /***/ (function(module, exports, __webpack_require__) {
  48020. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
  48021. * URI.js - Mutating URLs
  48022. * IPv6 Support
  48023. *
  48024. * Version: 1.19.1
  48025. *
  48026. * Author: Rodney Rehm
  48027. * Web: http://medialize.github.io/URI.js/
  48028. *
  48029. * Licensed under
  48030. * MIT License http://www.opensource.org/licenses/mit-license
  48031. *
  48032. */
  48033. (function (root, factory) {
  48034. 'use strict';
  48035. // https://github.com/umdjs/umd/blob/master/returnExports.js
  48036. if (typeof module === 'object' && module.exports) {
  48037. // Node
  48038. module.exports = factory();
  48039. } else if (true) {
  48040. // AMD. Register as an anonymous module.
  48041. !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  48042. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  48043. (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
  48044. __WEBPACK_AMD_DEFINE_FACTORY__),
  48045. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  48046. } else {}
  48047. }(this, function (root) {
  48048. 'use strict';
  48049. /*
  48050. var _in = "fe80:0000:0000:0000:0204:61ff:fe9d:f156";
  48051. var _out = IPv6.best(_in);
  48052. var _expected = "fe80::204:61ff:fe9d:f156";
  48053. console.log(_in, _out, _expected, _out === _expected);
  48054. */
  48055. // save current IPv6 variable, if any
  48056. var _IPv6 = root && root.IPv6;
  48057. function bestPresentation(address) {
  48058. // based on:
  48059. // Javascript to test an IPv6 address for proper format, and to
  48060. // present the "best text representation" according to IETF Draft RFC at
  48061. // http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-04
  48062. // 8 Feb 2010 Rich Brown, Dartware, LLC
  48063. // Please feel free to use this code as long as you provide a link to
  48064. // http://www.intermapper.com
  48065. // http://intermapper.com/support/tools/IPV6-Validator.aspx
  48066. // http://download.dartware.com/thirdparty/ipv6validator.js
  48067. var _address = address.toLowerCase();
  48068. var segments = _address.split(':');
  48069. var length = segments.length;
  48070. var total = 8;
  48071. // trim colons (:: or ::a:b:c… or …a:b:c::)
  48072. if (segments[0] === '' && segments[1] === '' && segments[2] === '') {
  48073. // must have been ::
  48074. // remove first two items
  48075. segments.shift();
  48076. segments.shift();
  48077. } else if (segments[0] === '' && segments[1] === '') {
  48078. // must have been ::xxxx
  48079. // remove the first item
  48080. segments.shift();
  48081. } else if (segments[length - 1] === '' && segments[length - 2] === '') {
  48082. // must have been xxxx::
  48083. segments.pop();
  48084. }
  48085. length = segments.length;
  48086. // adjust total segments for IPv4 trailer
  48087. if (segments[length - 1].indexOf('.') !== -1) {
  48088. // found a "." which means IPv4
  48089. total = 7;
  48090. }
  48091. // fill empty segments them with "0000"
  48092. var pos;
  48093. for (pos = 0; pos < length; pos++) {
  48094. if (segments[pos] === '') {
  48095. break;
  48096. }
  48097. }
  48098. if (pos < total) {
  48099. segments.splice(pos, 1, '0000');
  48100. while (segments.length < total) {
  48101. segments.splice(pos, 0, '0000');
  48102. }
  48103. }
  48104. // strip leading zeros
  48105. var _segments;
  48106. for (var i = 0; i < total; i++) {
  48107. _segments = segments[i].split('');
  48108. for (var j = 0; j < 3 ; j++) {
  48109. if (_segments[0] === '0' && _segments.length > 1) {
  48110. _segments.splice(0,1);
  48111. } else {
  48112. break;
  48113. }
  48114. }
  48115. segments[i] = _segments.join('');
  48116. }
  48117. // find longest sequence of zeroes and coalesce them into one segment
  48118. var best = -1;
  48119. var _best = 0;
  48120. var _current = 0;
  48121. var current = -1;
  48122. var inzeroes = false;
  48123. // i; already declared
  48124. for (i = 0; i < total; i++) {
  48125. if (inzeroes) {
  48126. if (segments[i] === '0') {
  48127. _current += 1;
  48128. } else {
  48129. inzeroes = false;
  48130. if (_current > _best) {
  48131. best = current;
  48132. _best = _current;
  48133. }
  48134. }
  48135. } else {
  48136. if (segments[i] === '0') {
  48137. inzeroes = true;
  48138. current = i;
  48139. _current = 1;
  48140. }
  48141. }
  48142. }
  48143. if (_current > _best) {
  48144. best = current;
  48145. _best = _current;
  48146. }
  48147. if (_best > 1) {
  48148. segments.splice(best, _best, '');
  48149. }
  48150. length = segments.length;
  48151. // assemble remaining segments
  48152. var result = '';
  48153. if (segments[0] === '') {
  48154. result = ':';
  48155. }
  48156. for (i = 0; i < length; i++) {
  48157. result += segments[i];
  48158. if (i === length - 1) {
  48159. break;
  48160. }
  48161. result += ':';
  48162. }
  48163. if (segments[length - 1] === '') {
  48164. result += ':';
  48165. }
  48166. return result;
  48167. }
  48168. function noConflict() {
  48169. /*jshint validthis: true */
  48170. if (root.IPv6 === this) {
  48171. root.IPv6 = _IPv6;
  48172. }
  48173. return this;
  48174. }
  48175. return {
  48176. best: bestPresentation,
  48177. noConflict: noConflict
  48178. };
  48179. }));
  48180. /***/ }),
  48181. /***/ "./node_modules/urijs/src/SecondLevelDomains.js":
  48182. /*!******************************************************!*\
  48183. !*** ./node_modules/urijs/src/SecondLevelDomains.js ***!
  48184. \******************************************************/
  48185. /*! no static exports found */
  48186. /***/ (function(module, exports, __webpack_require__) {
  48187. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
  48188. * URI.js - Mutating URLs
  48189. * Second Level Domain (SLD) Support
  48190. *
  48191. * Version: 1.19.1
  48192. *
  48193. * Author: Rodney Rehm
  48194. * Web: http://medialize.github.io/URI.js/
  48195. *
  48196. * Licensed under
  48197. * MIT License http://www.opensource.org/licenses/mit-license
  48198. *
  48199. */
  48200. (function (root, factory) {
  48201. 'use strict';
  48202. // https://github.com/umdjs/umd/blob/master/returnExports.js
  48203. if (typeof module === 'object' && module.exports) {
  48204. // Node
  48205. module.exports = factory();
  48206. } else if (true) {
  48207. // AMD. Register as an anonymous module.
  48208. !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  48209. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  48210. (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
  48211. __WEBPACK_AMD_DEFINE_FACTORY__),
  48212. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  48213. } else {}
  48214. }(this, function (root) {
  48215. 'use strict';
  48216. // save current SecondLevelDomains variable, if any
  48217. var _SecondLevelDomains = root && root.SecondLevelDomains;
  48218. var SLD = {
  48219. // list of known Second Level Domains
  48220. // converted list of SLDs from https://github.com/gavingmiller/second-level-domains
  48221. // ----
  48222. // publicsuffix.org is more current and actually used by a couple of browsers internally.
  48223. // downside is it also contains domains like "dyndns.org" - which is fine for the security
  48224. // issues browser have to deal with (SOP for cookies, etc) - but is way overboard for URI.js
  48225. // ----
  48226. list: {
  48227. 'ac':' com gov mil net org ',
  48228. 'ae':' ac co gov mil name net org pro sch ',
  48229. 'af':' com edu gov net org ',
  48230. 'al':' com edu gov mil net org ',
  48231. 'ao':' co ed gv it og pb ',
  48232. 'ar':' com edu gob gov int mil net org tur ',
  48233. 'at':' ac co gv or ',
  48234. 'au':' asn com csiro edu gov id net org ',
  48235. 'ba':' co com edu gov mil net org rs unbi unmo unsa untz unze ',
  48236. 'bb':' biz co com edu gov info net org store tv ',
  48237. 'bh':' biz cc com edu gov info net org ',
  48238. 'bn':' com edu gov net org ',
  48239. 'bo':' com edu gob gov int mil net org tv ',
  48240. 'br':' adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ',
  48241. 'bs':' com edu gov net org ',
  48242. 'bz':' du et om ov rg ',
  48243. 'ca':' ab bc mb nb nf nl ns nt nu on pe qc sk yk ',
  48244. 'ck':' biz co edu gen gov info net org ',
  48245. 'cn':' ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ',
  48246. 'co':' com edu gov mil net nom org ',
  48247. 'cr':' ac c co ed fi go or sa ',
  48248. 'cy':' ac biz com ekloges gov ltd name net org parliament press pro tm ',
  48249. 'do':' art com edu gob gov mil net org sld web ',
  48250. 'dz':' art asso com edu gov net org pol ',
  48251. 'ec':' com edu fin gov info med mil net org pro ',
  48252. 'eg':' com edu eun gov mil name net org sci ',
  48253. 'er':' com edu gov ind mil net org rochest w ',
  48254. 'es':' com edu gob nom org ',
  48255. 'et':' biz com edu gov info name net org ',
  48256. 'fj':' ac biz com info mil name net org pro ',
  48257. 'fk':' ac co gov net nom org ',
  48258. 'fr':' asso com f gouv nom prd presse tm ',
  48259. 'gg':' co net org ',
  48260. 'gh':' com edu gov mil org ',
  48261. 'gn':' ac com gov net org ',
  48262. 'gr':' com edu gov mil net org ',
  48263. 'gt':' com edu gob ind mil net org ',
  48264. 'gu':' com edu gov net org ',
  48265. 'hk':' com edu gov idv net org ',
  48266. 'hu':' 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ',
  48267. 'id':' ac co go mil net or sch web ',
  48268. 'il':' ac co gov idf k12 muni net org ',
  48269. 'in':' ac co edu ernet firm gen gov i ind mil net nic org res ',
  48270. 'iq':' com edu gov i mil net org ',
  48271. 'ir':' ac co dnssec gov i id net org sch ',
  48272. 'it':' edu gov ',
  48273. 'je':' co net org ',
  48274. 'jo':' com edu gov mil name net org sch ',
  48275. 'jp':' ac ad co ed go gr lg ne or ',
  48276. 'ke':' ac co go info me mobi ne or sc ',
  48277. 'kh':' com edu gov mil net org per ',
  48278. 'ki':' biz com de edu gov info mob net org tel ',
  48279. 'km':' asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ',
  48280. 'kn':' edu gov net org ',
  48281. 'kr':' ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ',
  48282. 'kw':' com edu gov net org ',
  48283. 'ky':' com edu gov net org ',
  48284. 'kz':' com edu gov mil net org ',
  48285. 'lb':' com edu gov net org ',
  48286. 'lk':' assn com edu gov grp hotel int ltd net ngo org sch soc web ',
  48287. 'lr':' com edu gov net org ',
  48288. 'lv':' asn com conf edu gov id mil net org ',
  48289. 'ly':' com edu gov id med net org plc sch ',
  48290. 'ma':' ac co gov m net org press ',
  48291. 'mc':' asso tm ',
  48292. 'me':' ac co edu gov its net org priv ',
  48293. 'mg':' com edu gov mil nom org prd tm ',
  48294. 'mk':' com edu gov inf name net org pro ',
  48295. 'ml':' com edu gov net org presse ',
  48296. 'mn':' edu gov org ',
  48297. 'mo':' com edu gov net org ',
  48298. 'mt':' com edu gov net org ',
  48299. 'mv':' aero biz com coop edu gov info int mil museum name net org pro ',
  48300. 'mw':' ac co com coop edu gov int museum net org ',
  48301. 'mx':' com edu gob net org ',
  48302. 'my':' com edu gov mil name net org sch ',
  48303. 'nf':' arts com firm info net other per rec store web ',
  48304. 'ng':' biz com edu gov mil mobi name net org sch ',
  48305. 'ni':' ac co com edu gob mil net nom org ',
  48306. 'np':' com edu gov mil net org ',
  48307. 'nr':' biz com edu gov info net org ',
  48308. 'om':' ac biz co com edu gov med mil museum net org pro sch ',
  48309. 'pe':' com edu gob mil net nom org sld ',
  48310. 'ph':' com edu gov i mil net ngo org ',
  48311. 'pk':' biz com edu fam gob gok gon gop gos gov net org web ',
  48312. 'pl':' art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ',
  48313. 'pr':' ac biz com edu est gov info isla name net org pro prof ',
  48314. 'ps':' com edu gov net org plo sec ',
  48315. 'pw':' belau co ed go ne or ',
  48316. 'ro':' arts com firm info nom nt org rec store tm www ',
  48317. 'rs':' ac co edu gov in org ',
  48318. 'sb':' com edu gov net org ',
  48319. 'sc':' com edu gov net org ',
  48320. 'sh':' co com edu gov net nom org ',
  48321. 'sl':' com edu gov net org ',
  48322. 'st':' co com consulado edu embaixada gov mil net org principe saotome store ',
  48323. 'sv':' com edu gob org red ',
  48324. 'sz':' ac co org ',
  48325. 'tr':' av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ',
  48326. 'tt':' aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ',
  48327. 'tw':' club com ebiz edu game gov idv mil net org ',
  48328. 'mu':' ac co com gov net or org ',
  48329. 'mz':' ac co edu gov org ',
  48330. 'na':' co com ',
  48331. 'nz':' ac co cri geek gen govt health iwi maori mil net org parliament school ',
  48332. 'pa':' abo ac com edu gob ing med net nom org sld ',
  48333. 'pt':' com edu gov int net nome org publ ',
  48334. 'py':' com edu gov mil net org ',
  48335. 'qa':' com edu gov mil net org ',
  48336. 're':' asso com nom ',
  48337. 'ru':' ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ',
  48338. 'rw':' ac co com edu gouv gov int mil net ',
  48339. 'sa':' com edu gov med net org pub sch ',
  48340. 'sd':' com edu gov info med net org tv ',
  48341. 'se':' a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ',
  48342. 'sg':' com edu gov idn net org per ',
  48343. 'sn':' art com edu gouv org perso univ ',
  48344. 'sy':' com edu gov mil net news org ',
  48345. 'th':' ac co go in mi net or ',
  48346. 'tj':' ac biz co com edu go gov info int mil name net nic org test web ',
  48347. 'tn':' agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ',
  48348. 'tz':' ac co go ne or ',
  48349. 'ua':' biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ',
  48350. 'ug':' ac co go ne or org sc ',
  48351. 'uk':' ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ',
  48352. 'us':' dni fed isa kids nsn ',
  48353. 'uy':' com edu gub mil net org ',
  48354. 've':' co com edu gob info mil net org web ',
  48355. 'vi':' co com k12 net org ',
  48356. 'vn':' ac biz com edu gov health info int name net org pro ',
  48357. 'ye':' co com gov ltd me net org plc ',
  48358. 'yu':' ac co edu gov org ',
  48359. 'za':' ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ',
  48360. 'zm':' ac co com edu gov net org sch ',
  48361. // https://en.wikipedia.org/wiki/CentralNic#Second-level_domains
  48362. 'com': 'ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ',
  48363. 'net': 'gb jp se uk ',
  48364. 'org': 'ae',
  48365. 'de': 'com '
  48366. },
  48367. // gorhill 2013-10-25: Using indexOf() instead Regexp(). Significant boost
  48368. // in both performance and memory footprint. No initialization required.
  48369. // http://jsperf.com/uri-js-sld-regex-vs-binary-search/4
  48370. // Following methods use lastIndexOf() rather than array.split() in order
  48371. // to avoid any memory allocations.
  48372. has: function(domain) {
  48373. var tldOffset = domain.lastIndexOf('.');
  48374. if (tldOffset <= 0 || tldOffset >= (domain.length-1)) {
  48375. return false;
  48376. }
  48377. var sldOffset = domain.lastIndexOf('.', tldOffset-1);
  48378. if (sldOffset <= 0 || sldOffset >= (tldOffset-1)) {
  48379. return false;
  48380. }
  48381. var sldList = SLD.list[domain.slice(tldOffset+1)];
  48382. if (!sldList) {
  48383. return false;
  48384. }
  48385. return sldList.indexOf(' ' + domain.slice(sldOffset+1, tldOffset) + ' ') >= 0;
  48386. },
  48387. is: function(domain) {
  48388. var tldOffset = domain.lastIndexOf('.');
  48389. if (tldOffset <= 0 || tldOffset >= (domain.length-1)) {
  48390. return false;
  48391. }
  48392. var sldOffset = domain.lastIndexOf('.', tldOffset-1);
  48393. if (sldOffset >= 0) {
  48394. return false;
  48395. }
  48396. var sldList = SLD.list[domain.slice(tldOffset+1)];
  48397. if (!sldList) {
  48398. return false;
  48399. }
  48400. return sldList.indexOf(' ' + domain.slice(0, tldOffset) + ' ') >= 0;
  48401. },
  48402. get: function(domain) {
  48403. var tldOffset = domain.lastIndexOf('.');
  48404. if (tldOffset <= 0 || tldOffset >= (domain.length-1)) {
  48405. return null;
  48406. }
  48407. var sldOffset = domain.lastIndexOf('.', tldOffset-1);
  48408. if (sldOffset <= 0 || sldOffset >= (tldOffset-1)) {
  48409. return null;
  48410. }
  48411. var sldList = SLD.list[domain.slice(tldOffset+1)];
  48412. if (!sldList) {
  48413. return null;
  48414. }
  48415. if (sldList.indexOf(' ' + domain.slice(sldOffset+1, tldOffset) + ' ') < 0) {
  48416. return null;
  48417. }
  48418. return domain.slice(sldOffset+1);
  48419. },
  48420. noConflict: function(){
  48421. if (root.SecondLevelDomains === this) {
  48422. root.SecondLevelDomains = _SecondLevelDomains;
  48423. }
  48424. return this;
  48425. }
  48426. };
  48427. return SLD;
  48428. }));
  48429. /***/ }),
  48430. /***/ "./node_modules/urijs/src/URI.js":
  48431. /*!***************************************!*\
  48432. !*** ./node_modules/urijs/src/URI.js ***!
  48433. \***************************************/
  48434. /*! no static exports found */
  48435. /***/ (function(module, exports, __webpack_require__) {
  48436. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
  48437. * URI.js - Mutating URLs
  48438. *
  48439. * Version: 1.19.1
  48440. *
  48441. * Author: Rodney Rehm
  48442. * Web: http://medialize.github.io/URI.js/
  48443. *
  48444. * Licensed under
  48445. * MIT License http://www.opensource.org/licenses/mit-license
  48446. *
  48447. */
  48448. (function (root, factory) {
  48449. 'use strict';
  48450. // https://github.com/umdjs/umd/blob/master/returnExports.js
  48451. if (typeof module === 'object' && module.exports) {
  48452. // Node
  48453. module.exports = factory(__webpack_require__(/*! ./punycode */ "./node_modules/urijs/src/punycode.js"), __webpack_require__(/*! ./IPv6 */ "./node_modules/urijs/src/IPv6.js"), __webpack_require__(/*! ./SecondLevelDomains */ "./node_modules/urijs/src/SecondLevelDomains.js"));
  48454. } else if (true) {
  48455. // AMD. Register as an anonymous module.
  48456. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ./punycode */ "./node_modules/urijs/src/punycode.js"), __webpack_require__(/*! ./IPv6 */ "./node_modules/urijs/src/IPv6.js"), __webpack_require__(/*! ./SecondLevelDomains */ "./node_modules/urijs/src/SecondLevelDomains.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  48457. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  48458. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  48459. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  48460. } else {}
  48461. }(this, function (punycode, IPv6, SLD, root) {
  48462. 'use strict';
  48463. /*global location, escape, unescape */
  48464. // FIXME: v2.0.0 renamce non-camelCase properties to uppercase
  48465. /*jshint camelcase: false */
  48466. // save current URI variable, if any
  48467. var _URI = root && root.URI;
  48468. function URI(url, base) {
  48469. var _urlSupplied = arguments.length >= 1;
  48470. var _baseSupplied = arguments.length >= 2;
  48471. // Allow instantiation without the 'new' keyword
  48472. if (!(this instanceof URI)) {
  48473. if (_urlSupplied) {
  48474. if (_baseSupplied) {
  48475. return new URI(url, base);
  48476. }
  48477. return new URI(url);
  48478. }
  48479. return new URI();
  48480. }
  48481. if (url === undefined) {
  48482. if (_urlSupplied) {
  48483. throw new TypeError('undefined is not a valid argument for URI');
  48484. }
  48485. if (typeof location !== 'undefined') {
  48486. url = location.href + '';
  48487. } else {
  48488. url = '';
  48489. }
  48490. }
  48491. if (url === null) {
  48492. if (_urlSupplied) {
  48493. throw new TypeError('null is not a valid argument for URI');
  48494. }
  48495. }
  48496. this.href(url);
  48497. // resolve to base according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#constructor
  48498. if (base !== undefined) {
  48499. return this.absoluteTo(base);
  48500. }
  48501. return this;
  48502. }
  48503. function isInteger(value) {
  48504. return /^[0-9]+$/.test(value);
  48505. }
  48506. URI.version = '1.19.1';
  48507. var p = URI.prototype;
  48508. var hasOwn = Object.prototype.hasOwnProperty;
  48509. function escapeRegEx(string) {
  48510. // https://github.com/medialize/URI.js/commit/85ac21783c11f8ccab06106dba9735a31a86924d#commitcomment-821963
  48511. return string.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
  48512. }
  48513. function getType(value) {
  48514. // IE8 doesn't return [Object Undefined] but [Object Object] for undefined value
  48515. if (value === undefined) {
  48516. return 'Undefined';
  48517. }
  48518. return String(Object.prototype.toString.call(value)).slice(8, -1);
  48519. }
  48520. function isArray(obj) {
  48521. return getType(obj) === 'Array';
  48522. }
  48523. function filterArrayValues(data, value) {
  48524. var lookup = {};
  48525. var i, length;
  48526. if (getType(value) === 'RegExp') {
  48527. lookup = null;
  48528. } else if (isArray(value)) {
  48529. for (i = 0, length = value.length; i < length; i++) {
  48530. lookup[value[i]] = true;
  48531. }
  48532. } else {
  48533. lookup[value] = true;
  48534. }
  48535. for (i = 0, length = data.length; i < length; i++) {
  48536. /*jshint laxbreak: true */
  48537. var _match = lookup && lookup[data[i]] !== undefined
  48538. || !lookup && value.test(data[i]);
  48539. /*jshint laxbreak: false */
  48540. if (_match) {
  48541. data.splice(i, 1);
  48542. length--;
  48543. i--;
  48544. }
  48545. }
  48546. return data;
  48547. }
  48548. function arrayContains(list, value) {
  48549. var i, length;
  48550. // value may be string, number, array, regexp
  48551. if (isArray(value)) {
  48552. // Note: this can be optimized to O(n) (instead of current O(m * n))
  48553. for (i = 0, length = value.length; i < length; i++) {
  48554. if (!arrayContains(list, value[i])) {
  48555. return false;
  48556. }
  48557. }
  48558. return true;
  48559. }
  48560. var _type = getType(value);
  48561. for (i = 0, length = list.length; i < length; i++) {
  48562. if (_type === 'RegExp') {
  48563. if (typeof list[i] === 'string' && list[i].match(value)) {
  48564. return true;
  48565. }
  48566. } else if (list[i] === value) {
  48567. return true;
  48568. }
  48569. }
  48570. return false;
  48571. }
  48572. function arraysEqual(one, two) {
  48573. if (!isArray(one) || !isArray(two)) {
  48574. return false;
  48575. }
  48576. // arrays can't be equal if they have different amount of content
  48577. if (one.length !== two.length) {
  48578. return false;
  48579. }
  48580. one.sort();
  48581. two.sort();
  48582. for (var i = 0, l = one.length; i < l; i++) {
  48583. if (one[i] !== two[i]) {
  48584. return false;
  48585. }
  48586. }
  48587. return true;
  48588. }
  48589. function trimSlashes(text) {
  48590. var trim_expression = /^\/+|\/+$/g;
  48591. return text.replace(trim_expression, '');
  48592. }
  48593. URI._parts = function() {
  48594. return {
  48595. protocol: null,
  48596. username: null,
  48597. password: null,
  48598. hostname: null,
  48599. urn: null,
  48600. port: null,
  48601. path: null,
  48602. query: null,
  48603. fragment: null,
  48604. // state
  48605. preventInvalidHostname: URI.preventInvalidHostname,
  48606. duplicateQueryParameters: URI.duplicateQueryParameters,
  48607. escapeQuerySpace: URI.escapeQuerySpace
  48608. };
  48609. };
  48610. // state: throw on invalid hostname
  48611. // see https://github.com/medialize/URI.js/pull/345
  48612. // and https://github.com/medialize/URI.js/issues/354
  48613. URI.preventInvalidHostname = false;
  48614. // state: allow duplicate query parameters (a=1&a=1)
  48615. URI.duplicateQueryParameters = false;
  48616. // state: replaces + with %20 (space in query strings)
  48617. URI.escapeQuerySpace = true;
  48618. // static properties
  48619. URI.protocol_expression = /^[a-z][a-z0-9.+-]*$/i;
  48620. URI.idn_expression = /[^a-z0-9\._-]/i;
  48621. URI.punycode_expression = /(xn--)/i;
  48622. // well, 333.444.555.666 matches, but it sure ain't no IPv4 - do we care?
  48623. URI.ip4_expression = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;
  48624. // credits to Rich Brown
  48625. // source: http://forums.intermapper.com/viewtopic.php?p=1096#1096
  48626. // specification: http://www.ietf.org/rfc/rfc4291.txt
  48627. URI.ip6_expression = /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;
  48628. // expression used is "gruber revised" (@gruber v2) determined to be the
  48629. // best solution in a regex-golf we did a couple of ages ago at
  48630. // * http://mathiasbynens.be/demo/url-regex
  48631. // * http://rodneyrehm.de/t/url-regex.html
  48632. URI.find_uri_expression = /\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig;
  48633. URI.findUri = {
  48634. // valid "scheme://" or "www."
  48635. start: /\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,
  48636. // everything up to the next whitespace
  48637. end: /[\s\r\n]|$/,
  48638. // trim trailing punctuation captured by end RegExp
  48639. trim: /[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,
  48640. // balanced parens inclusion (), [], {}, <>
  48641. parens: /(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g,
  48642. };
  48643. // http://www.iana.org/assignments/uri-schemes.html
  48644. // http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers#Well-known_ports
  48645. URI.defaultPorts = {
  48646. http: '80',
  48647. https: '443',
  48648. ftp: '21',
  48649. gopher: '70',
  48650. ws: '80',
  48651. wss: '443'
  48652. };
  48653. // list of protocols which always require a hostname
  48654. URI.hostProtocols = [
  48655. 'http',
  48656. 'https'
  48657. ];
  48658. // allowed hostname characters according to RFC 3986
  48659. // ALPHA DIGIT "-" "." "_" "~" "!" "$" "&" "'" "(" ")" "*" "+" "," ";" "=" %encoded
  48660. // I've never seen a (non-IDN) hostname other than: ALPHA DIGIT . - _
  48661. URI.invalid_hostname_characters = /[^a-zA-Z0-9\.\-:_]/;
  48662. // map DOM Elements to their URI attribute
  48663. URI.domAttributes = {
  48664. 'a': 'href',
  48665. 'blockquote': 'cite',
  48666. 'link': 'href',
  48667. 'base': 'href',
  48668. 'script': 'src',
  48669. 'form': 'action',
  48670. 'img': 'src',
  48671. 'area': 'href',
  48672. 'iframe': 'src',
  48673. 'embed': 'src',
  48674. 'source': 'src',
  48675. 'track': 'src',
  48676. 'input': 'src', // but only if type="image"
  48677. 'audio': 'src',
  48678. 'video': 'src'
  48679. };
  48680. URI.getDomAttribute = function(node) {
  48681. if (!node || !node.nodeName) {
  48682. return undefined;
  48683. }
  48684. var nodeName = node.nodeName.toLowerCase();
  48685. // <input> should only expose src for type="image"
  48686. if (nodeName === 'input' && node.type !== 'image') {
  48687. return undefined;
  48688. }
  48689. return URI.domAttributes[nodeName];
  48690. };
  48691. function escapeForDumbFirefox36(value) {
  48692. // https://github.com/medialize/URI.js/issues/91
  48693. return escape(value);
  48694. }
  48695. // encoding / decoding according to RFC3986
  48696. function strictEncodeURIComponent(string) {
  48697. // see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/encodeURIComponent
  48698. return encodeURIComponent(string)
  48699. .replace(/[!'()*]/g, escapeForDumbFirefox36)
  48700. .replace(/\*/g, '%2A');
  48701. }
  48702. URI.encode = strictEncodeURIComponent;
  48703. URI.decode = decodeURIComponent;
  48704. URI.iso8859 = function() {
  48705. URI.encode = escape;
  48706. URI.decode = unescape;
  48707. };
  48708. URI.unicode = function() {
  48709. URI.encode = strictEncodeURIComponent;
  48710. URI.decode = decodeURIComponent;
  48711. };
  48712. URI.characters = {
  48713. pathname: {
  48714. encode: {
  48715. // RFC3986 2.1: For consistency, URI producers and normalizers should
  48716. // use uppercase hexadecimal digits for all percent-encodings.
  48717. expression: /%(24|26|2B|2C|3B|3D|3A|40)/ig,
  48718. map: {
  48719. // -._~!'()*
  48720. '%24': '$',
  48721. '%26': '&',
  48722. '%2B': '+',
  48723. '%2C': ',',
  48724. '%3B': ';',
  48725. '%3D': '=',
  48726. '%3A': ':',
  48727. '%40': '@'
  48728. }
  48729. },
  48730. decode: {
  48731. expression: /[\/\?#]/g,
  48732. map: {
  48733. '/': '%2F',
  48734. '?': '%3F',
  48735. '#': '%23'
  48736. }
  48737. }
  48738. },
  48739. reserved: {
  48740. encode: {
  48741. // RFC3986 2.1: For consistency, URI producers and normalizers should
  48742. // use uppercase hexadecimal digits for all percent-encodings.
  48743. expression: /%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,
  48744. map: {
  48745. // gen-delims
  48746. '%3A': ':',
  48747. '%2F': '/',
  48748. '%3F': '?',
  48749. '%23': '#',
  48750. '%5B': '[',
  48751. '%5D': ']',
  48752. '%40': '@',
  48753. // sub-delims
  48754. '%21': '!',
  48755. '%24': '$',
  48756. '%26': '&',
  48757. '%27': '\'',
  48758. '%28': '(',
  48759. '%29': ')',
  48760. '%2A': '*',
  48761. '%2B': '+',
  48762. '%2C': ',',
  48763. '%3B': ';',
  48764. '%3D': '='
  48765. }
  48766. }
  48767. },
  48768. urnpath: {
  48769. // The characters under `encode` are the characters called out by RFC 2141 as being acceptable
  48770. // for usage in a URN. RFC2141 also calls out "-", ".", and "_" as acceptable characters, but
  48771. // these aren't encoded by encodeURIComponent, so we don't have to call them out here. Also
  48772. // note that the colon character is not featured in the encoding map; this is because URI.js
  48773. // gives the colons in URNs semantic meaning as the delimiters of path segements, and so it
  48774. // should not appear unencoded in a segment itself.
  48775. // See also the note above about RFC3986 and capitalalized hex digits.
  48776. encode: {
  48777. expression: /%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,
  48778. map: {
  48779. '%21': '!',
  48780. '%24': '$',
  48781. '%27': '\'',
  48782. '%28': '(',
  48783. '%29': ')',
  48784. '%2A': '*',
  48785. '%2B': '+',
  48786. '%2C': ',',
  48787. '%3B': ';',
  48788. '%3D': '=',
  48789. '%40': '@'
  48790. }
  48791. },
  48792. // These characters are the characters called out by RFC2141 as "reserved" characters that
  48793. // should never appear in a URN, plus the colon character (see note above).
  48794. decode: {
  48795. expression: /[\/\?#:]/g,
  48796. map: {
  48797. '/': '%2F',
  48798. '?': '%3F',
  48799. '#': '%23',
  48800. ':': '%3A'
  48801. }
  48802. }
  48803. }
  48804. };
  48805. URI.encodeQuery = function(string, escapeQuerySpace) {
  48806. var escaped = URI.encode(string + '');
  48807. if (escapeQuerySpace === undefined) {
  48808. escapeQuerySpace = URI.escapeQuerySpace;
  48809. }
  48810. return escapeQuerySpace ? escaped.replace(/%20/g, '+') : escaped;
  48811. };
  48812. URI.decodeQuery = function(string, escapeQuerySpace) {
  48813. string += '';
  48814. if (escapeQuerySpace === undefined) {
  48815. escapeQuerySpace = URI.escapeQuerySpace;
  48816. }
  48817. try {
  48818. return URI.decode(escapeQuerySpace ? string.replace(/\+/g, '%20') : string);
  48819. } catch(e) {
  48820. // we're not going to mess with weird encodings,
  48821. // give up and return the undecoded original string
  48822. // see https://github.com/medialize/URI.js/issues/87
  48823. // see https://github.com/medialize/URI.js/issues/92
  48824. return string;
  48825. }
  48826. };
  48827. // generate encode/decode path functions
  48828. var _parts = {'encode':'encode', 'decode':'decode'};
  48829. var _part;
  48830. var generateAccessor = function(_group, _part) {
  48831. return function(string) {
  48832. try {
  48833. return URI[_part](string + '').replace(URI.characters[_group][_part].expression, function(c) {
  48834. return URI.characters[_group][_part].map[c];
  48835. });
  48836. } catch (e) {
  48837. // we're not going to mess with weird encodings,
  48838. // give up and return the undecoded original string
  48839. // see https://github.com/medialize/URI.js/issues/87
  48840. // see https://github.com/medialize/URI.js/issues/92
  48841. return string;
  48842. }
  48843. };
  48844. };
  48845. for (_part in _parts) {
  48846. URI[_part + 'PathSegment'] = generateAccessor('pathname', _parts[_part]);
  48847. URI[_part + 'UrnPathSegment'] = generateAccessor('urnpath', _parts[_part]);
  48848. }
  48849. var generateSegmentedPathFunction = function(_sep, _codingFuncName, _innerCodingFuncName) {
  48850. return function(string) {
  48851. // Why pass in names of functions, rather than the function objects themselves? The
  48852. // definitions of some functions (but in particular, URI.decode) will occasionally change due
  48853. // to URI.js having ISO8859 and Unicode modes. Passing in the name and getting it will ensure
  48854. // that the functions we use here are "fresh".
  48855. var actualCodingFunc;
  48856. if (!_innerCodingFuncName) {
  48857. actualCodingFunc = URI[_codingFuncName];
  48858. } else {
  48859. actualCodingFunc = function(string) {
  48860. return URI[_codingFuncName](URI[_innerCodingFuncName](string));
  48861. };
  48862. }
  48863. var segments = (string + '').split(_sep);
  48864. for (var i = 0, length = segments.length; i < length; i++) {
  48865. segments[i] = actualCodingFunc(segments[i]);
  48866. }
  48867. return segments.join(_sep);
  48868. };
  48869. };
  48870. // This takes place outside the above loop because we don't want, e.g., encodeUrnPath functions.
  48871. URI.decodePath = generateSegmentedPathFunction('/', 'decodePathSegment');
  48872. URI.decodeUrnPath = generateSegmentedPathFunction(':', 'decodeUrnPathSegment');
  48873. URI.recodePath = generateSegmentedPathFunction('/', 'encodePathSegment', 'decode');
  48874. URI.recodeUrnPath = generateSegmentedPathFunction(':', 'encodeUrnPathSegment', 'decode');
  48875. URI.encodeReserved = generateAccessor('reserved', 'encode');
  48876. URI.parse = function(string, parts) {
  48877. var pos;
  48878. if (!parts) {
  48879. parts = {
  48880. preventInvalidHostname: URI.preventInvalidHostname
  48881. };
  48882. }
  48883. // [protocol"://"[username[":"password]"@"]hostname[":"port]"/"?][path]["?"querystring]["#"fragment]
  48884. // extract fragment
  48885. pos = string.indexOf('#');
  48886. if (pos > -1) {
  48887. // escaping?
  48888. parts.fragment = string.substring(pos + 1) || null;
  48889. string = string.substring(0, pos);
  48890. }
  48891. // extract query
  48892. pos = string.indexOf('?');
  48893. if (pos > -1) {
  48894. // escaping?
  48895. parts.query = string.substring(pos + 1) || null;
  48896. string = string.substring(0, pos);
  48897. }
  48898. // extract protocol
  48899. if (string.substring(0, 2) === '//') {
  48900. // relative-scheme
  48901. parts.protocol = null;
  48902. string = string.substring(2);
  48903. // extract "user:pass@host:port"
  48904. string = URI.parseAuthority(string, parts);
  48905. } else {
  48906. pos = string.indexOf(':');
  48907. if (pos > -1) {
  48908. parts.protocol = string.substring(0, pos) || null;
  48909. if (parts.protocol && !parts.protocol.match(URI.protocol_expression)) {
  48910. // : may be within the path
  48911. parts.protocol = undefined;
  48912. } else if (string.substring(pos + 1, pos + 3) === '//') {
  48913. string = string.substring(pos + 3);
  48914. // extract "user:pass@host:port"
  48915. string = URI.parseAuthority(string, parts);
  48916. } else {
  48917. string = string.substring(pos + 1);
  48918. parts.urn = true;
  48919. }
  48920. }
  48921. }
  48922. // what's left must be the path
  48923. parts.path = string;
  48924. // and we're done
  48925. return parts;
  48926. };
  48927. URI.parseHost = function(string, parts) {
  48928. if (!string) {
  48929. string = '';
  48930. }
  48931. // Copy chrome, IE, opera backslash-handling behavior.
  48932. // Back slashes before the query string get converted to forward slashes
  48933. // See: https://github.com/joyent/node/blob/386fd24f49b0e9d1a8a076592a404168faeecc34/lib/url.js#L115-L124
  48934. // See: https://code.google.com/p/chromium/issues/detail?id=25916
  48935. // https://github.com/medialize/URI.js/pull/233
  48936. string = string.replace(/\\/g, '/');
  48937. // extract host:port
  48938. var pos = string.indexOf('/');
  48939. var bracketPos;
  48940. var t;
  48941. if (pos === -1) {
  48942. pos = string.length;
  48943. }
  48944. if (string.charAt(0) === '[') {
  48945. // IPv6 host - http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-04#section-6
  48946. // I claim most client software breaks on IPv6 anyways. To simplify things, URI only accepts
  48947. // IPv6+port in the format [2001:db8::1]:80 (for the time being)
  48948. bracketPos = string.indexOf(']');
  48949. parts.hostname = string.substring(1, bracketPos) || null;
  48950. parts.port = string.substring(bracketPos + 2, pos) || null;
  48951. if (parts.port === '/') {
  48952. parts.port = null;
  48953. }
  48954. } else {
  48955. var firstColon = string.indexOf(':');
  48956. var firstSlash = string.indexOf('/');
  48957. var nextColon = string.indexOf(':', firstColon + 1);
  48958. if (nextColon !== -1 && (firstSlash === -1 || nextColon < firstSlash)) {
  48959. // IPv6 host contains multiple colons - but no port
  48960. // this notation is actually not allowed by RFC 3986, but we're a liberal parser
  48961. parts.hostname = string.substring(0, pos) || null;
  48962. parts.port = null;
  48963. } else {
  48964. t = string.substring(0, pos).split(':');
  48965. parts.hostname = t[0] || null;
  48966. parts.port = t[1] || null;
  48967. }
  48968. }
  48969. if (parts.hostname && string.substring(pos).charAt(0) !== '/') {
  48970. pos++;
  48971. string = '/' + string;
  48972. }
  48973. if (parts.preventInvalidHostname) {
  48974. URI.ensureValidHostname(parts.hostname, parts.protocol);
  48975. }
  48976. if (parts.port) {
  48977. URI.ensureValidPort(parts.port);
  48978. }
  48979. return string.substring(pos) || '/';
  48980. };
  48981. URI.parseAuthority = function(string, parts) {
  48982. string = URI.parseUserinfo(string, parts);
  48983. return URI.parseHost(string, parts);
  48984. };
  48985. URI.parseUserinfo = function(string, parts) {
  48986. // extract username:password
  48987. var firstSlash = string.indexOf('/');
  48988. var pos = string.lastIndexOf('@', firstSlash > -1 ? firstSlash : string.length - 1);
  48989. var t;
  48990. // authority@ must come before /path
  48991. if (pos > -1 && (firstSlash === -1 || pos < firstSlash)) {
  48992. t = string.substring(0, pos).split(':');
  48993. parts.username = t[0] ? URI.decode(t[0]) : null;
  48994. t.shift();
  48995. parts.password = t[0] ? URI.decode(t.join(':')) : null;
  48996. string = string.substring(pos + 1);
  48997. } else {
  48998. parts.username = null;
  48999. parts.password = null;
  49000. }
  49001. return string;
  49002. };
  49003. URI.parseQuery = function(string, escapeQuerySpace) {
  49004. if (!string) {
  49005. return {};
  49006. }
  49007. // throw out the funky business - "?"[name"="value"&"]+
  49008. string = string.replace(/&+/g, '&').replace(/^\?*&*|&+$/g, '');
  49009. if (!string) {
  49010. return {};
  49011. }
  49012. var items = {};
  49013. var splits = string.split('&');
  49014. var length = splits.length;
  49015. var v, name, value;
  49016. for (var i = 0; i < length; i++) {
  49017. v = splits[i].split('=');
  49018. name = URI.decodeQuery(v.shift(), escapeQuerySpace);
  49019. // no "=" is null according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#collect-url-parameters
  49020. value = v.length ? URI.decodeQuery(v.join('='), escapeQuerySpace) : null;
  49021. if (hasOwn.call(items, name)) {
  49022. if (typeof items[name] === 'string' || items[name] === null) {
  49023. items[name] = [items[name]];
  49024. }
  49025. items[name].push(value);
  49026. } else {
  49027. items[name] = value;
  49028. }
  49029. }
  49030. return items;
  49031. };
  49032. URI.build = function(parts) {
  49033. var t = '';
  49034. if (parts.protocol) {
  49035. t += parts.protocol + ':';
  49036. }
  49037. if (!parts.urn && (t || parts.hostname)) {
  49038. t += '//';
  49039. }
  49040. t += (URI.buildAuthority(parts) || '');
  49041. if (typeof parts.path === 'string') {
  49042. if (parts.path.charAt(0) !== '/' && typeof parts.hostname === 'string') {
  49043. t += '/';
  49044. }
  49045. t += parts.path;
  49046. }
  49047. if (typeof parts.query === 'string' && parts.query) {
  49048. t += '?' + parts.query;
  49049. }
  49050. if (typeof parts.fragment === 'string' && parts.fragment) {
  49051. t += '#' + parts.fragment;
  49052. }
  49053. return t;
  49054. };
  49055. URI.buildHost = function(parts) {
  49056. var t = '';
  49057. if (!parts.hostname) {
  49058. return '';
  49059. } else if (URI.ip6_expression.test(parts.hostname)) {
  49060. t += '[' + parts.hostname + ']';
  49061. } else {
  49062. t += parts.hostname;
  49063. }
  49064. if (parts.port) {
  49065. t += ':' + parts.port;
  49066. }
  49067. return t;
  49068. };
  49069. URI.buildAuthority = function(parts) {
  49070. return URI.buildUserinfo(parts) + URI.buildHost(parts);
  49071. };
  49072. URI.buildUserinfo = function(parts) {
  49073. var t = '';
  49074. if (parts.username) {
  49075. t += URI.encode(parts.username);
  49076. }
  49077. if (parts.password) {
  49078. t += ':' + URI.encode(parts.password);
  49079. }
  49080. if (t) {
  49081. t += '@';
  49082. }
  49083. return t;
  49084. };
  49085. URI.buildQuery = function(data, duplicateQueryParameters, escapeQuerySpace) {
  49086. // according to http://tools.ietf.org/html/rfc3986 or http://labs.apache.org/webarch/uri/rfc/rfc3986.html
  49087. // being »-._~!$&'()*+,;=:@/?« %HEX and alnum are allowed
  49088. // the RFC explicitly states ?/foo being a valid use case, no mention of parameter syntax!
  49089. // URI.js treats the query string as being application/x-www-form-urlencoded
  49090. // see http://www.w3.org/TR/REC-html40/interact/forms.html#form-content-type
  49091. var t = '';
  49092. var unique, key, i, length;
  49093. for (key in data) {
  49094. if (hasOwn.call(data, key) && key) {
  49095. if (isArray(data[key])) {
  49096. unique = {};
  49097. for (i = 0, length = data[key].length; i < length; i++) {
  49098. if (data[key][i] !== undefined && unique[data[key][i] + ''] === undefined) {
  49099. t += '&' + URI.buildQueryParameter(key, data[key][i], escapeQuerySpace);
  49100. if (duplicateQueryParameters !== true) {
  49101. unique[data[key][i] + ''] = true;
  49102. }
  49103. }
  49104. }
  49105. } else if (data[key] !== undefined) {
  49106. t += '&' + URI.buildQueryParameter(key, data[key], escapeQuerySpace);
  49107. }
  49108. }
  49109. }
  49110. return t.substring(1);
  49111. };
  49112. URI.buildQueryParameter = function(name, value, escapeQuerySpace) {
  49113. // http://www.w3.org/TR/REC-html40/interact/forms.html#form-content-type -- application/x-www-form-urlencoded
  49114. // don't append "=" for null values, according to http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#url-parameter-serialization
  49115. return URI.encodeQuery(name, escapeQuerySpace) + (value !== null ? '=' + URI.encodeQuery(value, escapeQuerySpace) : '');
  49116. };
  49117. URI.addQuery = function(data, name, value) {
  49118. if (typeof name === 'object') {
  49119. for (var key in name) {
  49120. if (hasOwn.call(name, key)) {
  49121. URI.addQuery(data, key, name[key]);
  49122. }
  49123. }
  49124. } else if (typeof name === 'string') {
  49125. if (data[name] === undefined) {
  49126. data[name] = value;
  49127. return;
  49128. } else if (typeof data[name] === 'string') {
  49129. data[name] = [data[name]];
  49130. }
  49131. if (!isArray(value)) {
  49132. value = [value];
  49133. }
  49134. data[name] = (data[name] || []).concat(value);
  49135. } else {
  49136. throw new TypeError('URI.addQuery() accepts an object, string as the name parameter');
  49137. }
  49138. };
  49139. URI.setQuery = function(data, name, value) {
  49140. if (typeof name === 'object') {
  49141. for (var key in name) {
  49142. if (hasOwn.call(name, key)) {
  49143. URI.setQuery(data, key, name[key]);
  49144. }
  49145. }
  49146. } else if (typeof name === 'string') {
  49147. data[name] = value === undefined ? null : value;
  49148. } else {
  49149. throw new TypeError('URI.setQuery() accepts an object, string as the name parameter');
  49150. }
  49151. };
  49152. URI.removeQuery = function(data, name, value) {
  49153. var i, length, key;
  49154. if (isArray(name)) {
  49155. for (i = 0, length = name.length; i < length; i++) {
  49156. data[name[i]] = undefined;
  49157. }
  49158. } else if (getType(name) === 'RegExp') {
  49159. for (key in data) {
  49160. if (name.test(key)) {
  49161. data[key] = undefined;
  49162. }
  49163. }
  49164. } else if (typeof name === 'object') {
  49165. for (key in name) {
  49166. if (hasOwn.call(name, key)) {
  49167. URI.removeQuery(data, key, name[key]);
  49168. }
  49169. }
  49170. } else if (typeof name === 'string') {
  49171. if (value !== undefined) {
  49172. if (getType(value) === 'RegExp') {
  49173. if (!isArray(data[name]) && value.test(data[name])) {
  49174. data[name] = undefined;
  49175. } else {
  49176. data[name] = filterArrayValues(data[name], value);
  49177. }
  49178. } else if (data[name] === String(value) && (!isArray(value) || value.length === 1)) {
  49179. data[name] = undefined;
  49180. } else if (isArray(data[name])) {
  49181. data[name] = filterArrayValues(data[name], value);
  49182. }
  49183. } else {
  49184. data[name] = undefined;
  49185. }
  49186. } else {
  49187. throw new TypeError('URI.removeQuery() accepts an object, string, RegExp as the first parameter');
  49188. }
  49189. };
  49190. URI.hasQuery = function(data, name, value, withinArray) {
  49191. switch (getType(name)) {
  49192. case 'String':
  49193. // Nothing to do here
  49194. break;
  49195. case 'RegExp':
  49196. for (var key in data) {
  49197. if (hasOwn.call(data, key)) {
  49198. if (name.test(key) && (value === undefined || URI.hasQuery(data, key, value))) {
  49199. return true;
  49200. }
  49201. }
  49202. }
  49203. return false;
  49204. case 'Object':
  49205. for (var _key in name) {
  49206. if (hasOwn.call(name, _key)) {
  49207. if (!URI.hasQuery(data, _key, name[_key])) {
  49208. return false;
  49209. }
  49210. }
  49211. }
  49212. return true;
  49213. default:
  49214. throw new TypeError('URI.hasQuery() accepts a string, regular expression or object as the name parameter');
  49215. }
  49216. switch (getType(value)) {
  49217. case 'Undefined':
  49218. // true if exists (but may be empty)
  49219. return name in data; // data[name] !== undefined;
  49220. case 'Boolean':
  49221. // true if exists and non-empty
  49222. var _booly = Boolean(isArray(data[name]) ? data[name].length : data[name]);
  49223. return value === _booly;
  49224. case 'Function':
  49225. // allow complex comparison
  49226. return !!value(data[name], name, data);
  49227. case 'Array':
  49228. if (!isArray(data[name])) {
  49229. return false;
  49230. }
  49231. var op = withinArray ? arrayContains : arraysEqual;
  49232. return op(data[name], value);
  49233. case 'RegExp':
  49234. if (!isArray(data[name])) {
  49235. return Boolean(data[name] && data[name].match(value));
  49236. }
  49237. if (!withinArray) {
  49238. return false;
  49239. }
  49240. return arrayContains(data[name], value);
  49241. case 'Number':
  49242. value = String(value);
  49243. /* falls through */
  49244. case 'String':
  49245. if (!isArray(data[name])) {
  49246. return data[name] === value;
  49247. }
  49248. if (!withinArray) {
  49249. return false;
  49250. }
  49251. return arrayContains(data[name], value);
  49252. default:
  49253. throw new TypeError('URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter');
  49254. }
  49255. };
  49256. URI.joinPaths = function() {
  49257. var input = [];
  49258. var segments = [];
  49259. var nonEmptySegments = 0;
  49260. for (var i = 0; i < arguments.length; i++) {
  49261. var url = new URI(arguments[i]);
  49262. input.push(url);
  49263. var _segments = url.segment();
  49264. for (var s = 0; s < _segments.length; s++) {
  49265. if (typeof _segments[s] === 'string') {
  49266. segments.push(_segments[s]);
  49267. }
  49268. if (_segments[s]) {
  49269. nonEmptySegments++;
  49270. }
  49271. }
  49272. }
  49273. if (!segments.length || !nonEmptySegments) {
  49274. return new URI('');
  49275. }
  49276. var uri = new URI('').segment(segments);
  49277. if (input[0].path() === '' || input[0].path().slice(0, 1) === '/') {
  49278. uri.path('/' + uri.path());
  49279. }
  49280. return uri.normalize();
  49281. };
  49282. URI.commonPath = function(one, two) {
  49283. var length = Math.min(one.length, two.length);
  49284. var pos;
  49285. // find first non-matching character
  49286. for (pos = 0; pos < length; pos++) {
  49287. if (one.charAt(pos) !== two.charAt(pos)) {
  49288. pos--;
  49289. break;
  49290. }
  49291. }
  49292. if (pos < 1) {
  49293. return one.charAt(0) === two.charAt(0) && one.charAt(0) === '/' ? '/' : '';
  49294. }
  49295. // revert to last /
  49296. if (one.charAt(pos) !== '/' || two.charAt(pos) !== '/') {
  49297. pos = one.substring(0, pos).lastIndexOf('/');
  49298. }
  49299. return one.substring(0, pos + 1);
  49300. };
  49301. URI.withinString = function(string, callback, options) {
  49302. options || (options = {});
  49303. var _start = options.start || URI.findUri.start;
  49304. var _end = options.end || URI.findUri.end;
  49305. var _trim = options.trim || URI.findUri.trim;
  49306. var _parens = options.parens || URI.findUri.parens;
  49307. var _attributeOpen = /[a-z0-9-]=["']?$/i;
  49308. _start.lastIndex = 0;
  49309. while (true) {
  49310. var match = _start.exec(string);
  49311. if (!match) {
  49312. break;
  49313. }
  49314. var start = match.index;
  49315. if (options.ignoreHtml) {
  49316. // attribut(e=["']?$)
  49317. var attributeOpen = string.slice(Math.max(start - 3, 0), start);
  49318. if (attributeOpen && _attributeOpen.test(attributeOpen)) {
  49319. continue;
  49320. }
  49321. }
  49322. var end = start + string.slice(start).search(_end);
  49323. var slice = string.slice(start, end);
  49324. // make sure we include well balanced parens
  49325. var parensEnd = -1;
  49326. while (true) {
  49327. var parensMatch = _parens.exec(slice);
  49328. if (!parensMatch) {
  49329. break;
  49330. }
  49331. var parensMatchEnd = parensMatch.index + parensMatch[0].length;
  49332. parensEnd = Math.max(parensEnd, parensMatchEnd);
  49333. }
  49334. if (parensEnd > -1) {
  49335. slice = slice.slice(0, parensEnd) + slice.slice(parensEnd).replace(_trim, '');
  49336. } else {
  49337. slice = slice.replace(_trim, '');
  49338. }
  49339. if (slice.length <= match[0].length) {
  49340. // the extract only contains the starting marker of a URI,
  49341. // e.g. "www" or "http://"
  49342. continue;
  49343. }
  49344. if (options.ignore && options.ignore.test(slice)) {
  49345. continue;
  49346. }
  49347. end = start + slice.length;
  49348. var result = callback(slice, start, end, string);
  49349. if (result === undefined) {
  49350. _start.lastIndex = end;
  49351. continue;
  49352. }
  49353. result = String(result);
  49354. string = string.slice(0, start) + result + string.slice(end);
  49355. _start.lastIndex = start + result.length;
  49356. }
  49357. _start.lastIndex = 0;
  49358. return string;
  49359. };
  49360. URI.ensureValidHostname = function(v, protocol) {
  49361. // Theoretically URIs allow percent-encoding in Hostnames (according to RFC 3986)
  49362. // they are not part of DNS and therefore ignored by URI.js
  49363. var hasHostname = !!v; // not null and not an empty string
  49364. var hasProtocol = !!protocol;
  49365. var rejectEmptyHostname = false;
  49366. if (hasProtocol) {
  49367. rejectEmptyHostname = arrayContains(URI.hostProtocols, protocol);
  49368. }
  49369. if (rejectEmptyHostname && !hasHostname) {
  49370. throw new TypeError('Hostname cannot be empty, if protocol is ' + protocol);
  49371. } else if (v && v.match(URI.invalid_hostname_characters)) {
  49372. // test punycode
  49373. if (!punycode) {
  49374. throw new TypeError('Hostname "' + v + '" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');
  49375. }
  49376. if (punycode.toASCII(v).match(URI.invalid_hostname_characters)) {
  49377. throw new TypeError('Hostname "' + v + '" contains characters other than [A-Z0-9.-:_]');
  49378. }
  49379. }
  49380. };
  49381. URI.ensureValidPort = function (v) {
  49382. if (!v) {
  49383. return;
  49384. }
  49385. var port = Number(v);
  49386. if (isInteger(port) && (port > 0) && (port < 65536)) {
  49387. return;
  49388. }
  49389. throw new TypeError('Port "' + v + '" is not a valid port');
  49390. };
  49391. // noConflict
  49392. URI.noConflict = function(removeAll) {
  49393. if (removeAll) {
  49394. var unconflicted = {
  49395. URI: this.noConflict()
  49396. };
  49397. if (root.URITemplate && typeof root.URITemplate.noConflict === 'function') {
  49398. unconflicted.URITemplate = root.URITemplate.noConflict();
  49399. }
  49400. if (root.IPv6 && typeof root.IPv6.noConflict === 'function') {
  49401. unconflicted.IPv6 = root.IPv6.noConflict();
  49402. }
  49403. if (root.SecondLevelDomains && typeof root.SecondLevelDomains.noConflict === 'function') {
  49404. unconflicted.SecondLevelDomains = root.SecondLevelDomains.noConflict();
  49405. }
  49406. return unconflicted;
  49407. } else if (root.URI === this) {
  49408. root.URI = _URI;
  49409. }
  49410. return this;
  49411. };
  49412. p.build = function(deferBuild) {
  49413. if (deferBuild === true) {
  49414. this._deferred_build = true;
  49415. } else if (deferBuild === undefined || this._deferred_build) {
  49416. this._string = URI.build(this._parts);
  49417. this._deferred_build = false;
  49418. }
  49419. return this;
  49420. };
  49421. p.clone = function() {
  49422. return new URI(this);
  49423. };
  49424. p.valueOf = p.toString = function() {
  49425. return this.build(false)._string;
  49426. };
  49427. function generateSimpleAccessor(_part){
  49428. return function(v, build) {
  49429. if (v === undefined) {
  49430. return this._parts[_part] || '';
  49431. } else {
  49432. this._parts[_part] = v || null;
  49433. this.build(!build);
  49434. return this;
  49435. }
  49436. };
  49437. }
  49438. function generatePrefixAccessor(_part, _key){
  49439. return function(v, build) {
  49440. if (v === undefined) {
  49441. return this._parts[_part] || '';
  49442. } else {
  49443. if (v !== null) {
  49444. v = v + '';
  49445. if (v.charAt(0) === _key) {
  49446. v = v.substring(1);
  49447. }
  49448. }
  49449. this._parts[_part] = v;
  49450. this.build(!build);
  49451. return this;
  49452. }
  49453. };
  49454. }
  49455. p.protocol = generateSimpleAccessor('protocol');
  49456. p.username = generateSimpleAccessor('username');
  49457. p.password = generateSimpleAccessor('password');
  49458. p.hostname = generateSimpleAccessor('hostname');
  49459. p.port = generateSimpleAccessor('port');
  49460. p.query = generatePrefixAccessor('query', '?');
  49461. p.fragment = generatePrefixAccessor('fragment', '#');
  49462. p.search = function(v, build) {
  49463. var t = this.query(v, build);
  49464. return typeof t === 'string' && t.length ? ('?' + t) : t;
  49465. };
  49466. p.hash = function(v, build) {
  49467. var t = this.fragment(v, build);
  49468. return typeof t === 'string' && t.length ? ('#' + t) : t;
  49469. };
  49470. p.pathname = function(v, build) {
  49471. if (v === undefined || v === true) {
  49472. var res = this._parts.path || (this._parts.hostname ? '/' : '');
  49473. return v ? (this._parts.urn ? URI.decodeUrnPath : URI.decodePath)(res) : res;
  49474. } else {
  49475. if (this._parts.urn) {
  49476. this._parts.path = v ? URI.recodeUrnPath(v) : '';
  49477. } else {
  49478. this._parts.path = v ? URI.recodePath(v) : '/';
  49479. }
  49480. this.build(!build);
  49481. return this;
  49482. }
  49483. };
  49484. p.path = p.pathname;
  49485. p.href = function(href, build) {
  49486. var key;
  49487. if (href === undefined) {
  49488. return this.toString();
  49489. }
  49490. this._string = '';
  49491. this._parts = URI._parts();
  49492. var _URI = href instanceof URI;
  49493. var _object = typeof href === 'object' && (href.hostname || href.path || href.pathname);
  49494. if (href.nodeName) {
  49495. var attribute = URI.getDomAttribute(href);
  49496. href = href[attribute] || '';
  49497. _object = false;
  49498. }
  49499. // window.location is reported to be an object, but it's not the sort
  49500. // of object we're looking for:
  49501. // * location.protocol ends with a colon
  49502. // * location.query != object.search
  49503. // * location.hash != object.fragment
  49504. // simply serializing the unknown object should do the trick
  49505. // (for location, not for everything...)
  49506. if (!_URI && _object && href.pathname !== undefined) {
  49507. href = href.toString();
  49508. }
  49509. if (typeof href === 'string' || href instanceof String) {
  49510. this._parts = URI.parse(String(href), this._parts);
  49511. } else if (_URI || _object) {
  49512. var src = _URI ? href._parts : href;
  49513. for (key in src) {
  49514. if (key === 'query') { continue; }
  49515. if (hasOwn.call(this._parts, key)) {
  49516. this._parts[key] = src[key];
  49517. }
  49518. }
  49519. if (src.query) {
  49520. this.query(src.query, false);
  49521. }
  49522. } else {
  49523. throw new TypeError('invalid input');
  49524. }
  49525. this.build(!build);
  49526. return this;
  49527. };
  49528. // identification accessors
  49529. p.is = function(what) {
  49530. var ip = false;
  49531. var ip4 = false;
  49532. var ip6 = false;
  49533. var name = false;
  49534. var sld = false;
  49535. var idn = false;
  49536. var punycode = false;
  49537. var relative = !this._parts.urn;
  49538. if (this._parts.hostname) {
  49539. relative = false;
  49540. ip4 = URI.ip4_expression.test(this._parts.hostname);
  49541. ip6 = URI.ip6_expression.test(this._parts.hostname);
  49542. ip = ip4 || ip6;
  49543. name = !ip;
  49544. sld = name && SLD && SLD.has(this._parts.hostname);
  49545. idn = name && URI.idn_expression.test(this._parts.hostname);
  49546. punycode = name && URI.punycode_expression.test(this._parts.hostname);
  49547. }
  49548. switch (what.toLowerCase()) {
  49549. case 'relative':
  49550. return relative;
  49551. case 'absolute':
  49552. return !relative;
  49553. // hostname identification
  49554. case 'domain':
  49555. case 'name':
  49556. return name;
  49557. case 'sld':
  49558. return sld;
  49559. case 'ip':
  49560. return ip;
  49561. case 'ip4':
  49562. case 'ipv4':
  49563. case 'inet4':
  49564. return ip4;
  49565. case 'ip6':
  49566. case 'ipv6':
  49567. case 'inet6':
  49568. return ip6;
  49569. case 'idn':
  49570. return idn;
  49571. case 'url':
  49572. return !this._parts.urn;
  49573. case 'urn':
  49574. return !!this._parts.urn;
  49575. case 'punycode':
  49576. return punycode;
  49577. }
  49578. return null;
  49579. };
  49580. // component specific input validation
  49581. var _protocol = p.protocol;
  49582. var _port = p.port;
  49583. var _hostname = p.hostname;
  49584. p.protocol = function(v, build) {
  49585. if (v) {
  49586. // accept trailing ://
  49587. v = v.replace(/:(\/\/)?$/, '');
  49588. if (!v.match(URI.protocol_expression)) {
  49589. throw new TypeError('Protocol "' + v + '" contains characters other than [A-Z0-9.+-] or doesn\'t start with [A-Z]');
  49590. }
  49591. }
  49592. return _protocol.call(this, v, build);
  49593. };
  49594. p.scheme = p.protocol;
  49595. p.port = function(v, build) {
  49596. if (this._parts.urn) {
  49597. return v === undefined ? '' : this;
  49598. }
  49599. if (v !== undefined) {
  49600. if (v === 0) {
  49601. v = null;
  49602. }
  49603. if (v) {
  49604. v += '';
  49605. if (v.charAt(0) === ':') {
  49606. v = v.substring(1);
  49607. }
  49608. URI.ensureValidPort(v);
  49609. }
  49610. }
  49611. return _port.call(this, v, build);
  49612. };
  49613. p.hostname = function(v, build) {
  49614. if (this._parts.urn) {
  49615. return v === undefined ? '' : this;
  49616. }
  49617. if (v !== undefined) {
  49618. var x = { preventInvalidHostname: this._parts.preventInvalidHostname };
  49619. var res = URI.parseHost(v, x);
  49620. if (res !== '/') {
  49621. throw new TypeError('Hostname "' + v + '" contains characters other than [A-Z0-9.-]');
  49622. }
  49623. v = x.hostname;
  49624. if (this._parts.preventInvalidHostname) {
  49625. URI.ensureValidHostname(v, this._parts.protocol);
  49626. }
  49627. }
  49628. return _hostname.call(this, v, build);
  49629. };
  49630. // compound accessors
  49631. p.origin = function(v, build) {
  49632. if (this._parts.urn) {
  49633. return v === undefined ? '' : this;
  49634. }
  49635. if (v === undefined) {
  49636. var protocol = this.protocol();
  49637. var authority = this.authority();
  49638. if (!authority) {
  49639. return '';
  49640. }
  49641. return (protocol ? protocol + '://' : '') + this.authority();
  49642. } else {
  49643. var origin = URI(v);
  49644. this
  49645. .protocol(origin.protocol())
  49646. .authority(origin.authority())
  49647. .build(!build);
  49648. return this;
  49649. }
  49650. };
  49651. p.host = function(v, build) {
  49652. if (this._parts.urn) {
  49653. return v === undefined ? '' : this;
  49654. }
  49655. if (v === undefined) {
  49656. return this._parts.hostname ? URI.buildHost(this._parts) : '';
  49657. } else {
  49658. var res = URI.parseHost(v, this._parts);
  49659. if (res !== '/') {
  49660. throw new TypeError('Hostname "' + v + '" contains characters other than [A-Z0-9.-]');
  49661. }
  49662. this.build(!build);
  49663. return this;
  49664. }
  49665. };
  49666. p.authority = function(v, build) {
  49667. if (this._parts.urn) {
  49668. return v === undefined ? '' : this;
  49669. }
  49670. if (v === undefined) {
  49671. return this._parts.hostname ? URI.buildAuthority(this._parts) : '';
  49672. } else {
  49673. var res = URI.parseAuthority(v, this._parts);
  49674. if (res !== '/') {
  49675. throw new TypeError('Hostname "' + v + '" contains characters other than [A-Z0-9.-]');
  49676. }
  49677. this.build(!build);
  49678. return this;
  49679. }
  49680. };
  49681. p.userinfo = function(v, build) {
  49682. if (this._parts.urn) {
  49683. return v === undefined ? '' : this;
  49684. }
  49685. if (v === undefined) {
  49686. var t = URI.buildUserinfo(this._parts);
  49687. return t ? t.substring(0, t.length -1) : t;
  49688. } else {
  49689. if (v[v.length-1] !== '@') {
  49690. v += '@';
  49691. }
  49692. URI.parseUserinfo(v, this._parts);
  49693. this.build(!build);
  49694. return this;
  49695. }
  49696. };
  49697. p.resource = function(v, build) {
  49698. var parts;
  49699. if (v === undefined) {
  49700. return this.path() + this.search() + this.hash();
  49701. }
  49702. parts = URI.parse(v);
  49703. this._parts.path = parts.path;
  49704. this._parts.query = parts.query;
  49705. this._parts.fragment = parts.fragment;
  49706. this.build(!build);
  49707. return this;
  49708. };
  49709. // fraction accessors
  49710. p.subdomain = function(v, build) {
  49711. if (this._parts.urn) {
  49712. return v === undefined ? '' : this;
  49713. }
  49714. // convenience, return "www" from "www.example.org"
  49715. if (v === undefined) {
  49716. if (!this._parts.hostname || this.is('IP')) {
  49717. return '';
  49718. }
  49719. // grab domain and add another segment
  49720. var end = this._parts.hostname.length - this.domain().length - 1;
  49721. return this._parts.hostname.substring(0, end) || '';
  49722. } else {
  49723. var e = this._parts.hostname.length - this.domain().length;
  49724. var sub = this._parts.hostname.substring(0, e);
  49725. var replace = new RegExp('^' + escapeRegEx(sub));
  49726. if (v && v.charAt(v.length - 1) !== '.') {
  49727. v += '.';
  49728. }
  49729. if (v.indexOf(':') !== -1) {
  49730. throw new TypeError('Domains cannot contain colons');
  49731. }
  49732. if (v) {
  49733. URI.ensureValidHostname(v, this._parts.protocol);
  49734. }
  49735. this._parts.hostname = this._parts.hostname.replace(replace, v);
  49736. this.build(!build);
  49737. return this;
  49738. }
  49739. };
  49740. p.domain = function(v, build) {
  49741. if (this._parts.urn) {
  49742. return v === undefined ? '' : this;
  49743. }
  49744. if (typeof v === 'boolean') {
  49745. build = v;
  49746. v = undefined;
  49747. }
  49748. // convenience, return "example.org" from "www.example.org"
  49749. if (v === undefined) {
  49750. if (!this._parts.hostname || this.is('IP')) {
  49751. return '';
  49752. }
  49753. // if hostname consists of 1 or 2 segments, it must be the domain
  49754. var t = this._parts.hostname.match(/\./g);
  49755. if (t && t.length < 2) {
  49756. return this._parts.hostname;
  49757. }
  49758. // grab tld and add another segment
  49759. var end = this._parts.hostname.length - this.tld(build).length - 1;
  49760. end = this._parts.hostname.lastIndexOf('.', end -1) + 1;
  49761. return this._parts.hostname.substring(end) || '';
  49762. } else {
  49763. if (!v) {
  49764. throw new TypeError('cannot set domain empty');
  49765. }
  49766. if (v.indexOf(':') !== -1) {
  49767. throw new TypeError('Domains cannot contain colons');
  49768. }
  49769. URI.ensureValidHostname(v, this._parts.protocol);
  49770. if (!this._parts.hostname || this.is('IP')) {
  49771. this._parts.hostname = v;
  49772. } else {
  49773. var replace = new RegExp(escapeRegEx(this.domain()) + '$');
  49774. this._parts.hostname = this._parts.hostname.replace(replace, v);
  49775. }
  49776. this.build(!build);
  49777. return this;
  49778. }
  49779. };
  49780. p.tld = function(v, build) {
  49781. if (this._parts.urn) {
  49782. return v === undefined ? '' : this;
  49783. }
  49784. if (typeof v === 'boolean') {
  49785. build = v;
  49786. v = undefined;
  49787. }
  49788. // return "org" from "www.example.org"
  49789. if (v === undefined) {
  49790. if (!this._parts.hostname || this.is('IP')) {
  49791. return '';
  49792. }
  49793. var pos = this._parts.hostname.lastIndexOf('.');
  49794. var tld = this._parts.hostname.substring(pos + 1);
  49795. if (build !== true && SLD && SLD.list[tld.toLowerCase()]) {
  49796. return SLD.get(this._parts.hostname) || tld;
  49797. }
  49798. return tld;
  49799. } else {
  49800. var replace;
  49801. if (!v) {
  49802. throw new TypeError('cannot set TLD empty');
  49803. } else if (v.match(/[^a-zA-Z0-9-]/)) {
  49804. if (SLD && SLD.is(v)) {
  49805. replace = new RegExp(escapeRegEx(this.tld()) + '$');
  49806. this._parts.hostname = this._parts.hostname.replace(replace, v);
  49807. } else {
  49808. throw new TypeError('TLD "' + v + '" contains characters other than [A-Z0-9]');
  49809. }
  49810. } else if (!this._parts.hostname || this.is('IP')) {
  49811. throw new ReferenceError('cannot set TLD on non-domain host');
  49812. } else {
  49813. replace = new RegExp(escapeRegEx(this.tld()) + '$');
  49814. this._parts.hostname = this._parts.hostname.replace(replace, v);
  49815. }
  49816. this.build(!build);
  49817. return this;
  49818. }
  49819. };
  49820. p.directory = function(v, build) {
  49821. if (this._parts.urn) {
  49822. return v === undefined ? '' : this;
  49823. }
  49824. if (v === undefined || v === true) {
  49825. if (!this._parts.path && !this._parts.hostname) {
  49826. return '';
  49827. }
  49828. if (this._parts.path === '/') {
  49829. return '/';
  49830. }
  49831. var end = this._parts.path.length - this.filename().length - 1;
  49832. var res = this._parts.path.substring(0, end) || (this._parts.hostname ? '/' : '');
  49833. return v ? URI.decodePath(res) : res;
  49834. } else {
  49835. var e = this._parts.path.length - this.filename().length;
  49836. var directory = this._parts.path.substring(0, e);
  49837. var replace = new RegExp('^' + escapeRegEx(directory));
  49838. // fully qualifier directories begin with a slash
  49839. if (!this.is('relative')) {
  49840. if (!v) {
  49841. v = '/';
  49842. }
  49843. if (v.charAt(0) !== '/') {
  49844. v = '/' + v;
  49845. }
  49846. }
  49847. // directories always end with a slash
  49848. if (v && v.charAt(v.length - 1) !== '/') {
  49849. v += '/';
  49850. }
  49851. v = URI.recodePath(v);
  49852. this._parts.path = this._parts.path.replace(replace, v);
  49853. this.build(!build);
  49854. return this;
  49855. }
  49856. };
  49857. p.filename = function(v, build) {
  49858. if (this._parts.urn) {
  49859. return v === undefined ? '' : this;
  49860. }
  49861. if (typeof v !== 'string') {
  49862. if (!this._parts.path || this._parts.path === '/') {
  49863. return '';
  49864. }
  49865. var pos = this._parts.path.lastIndexOf('/');
  49866. var res = this._parts.path.substring(pos+1);
  49867. return v ? URI.decodePathSegment(res) : res;
  49868. } else {
  49869. var mutatedDirectory = false;
  49870. if (v.charAt(0) === '/') {
  49871. v = v.substring(1);
  49872. }
  49873. if (v.match(/\.?\//)) {
  49874. mutatedDirectory = true;
  49875. }
  49876. var replace = new RegExp(escapeRegEx(this.filename()) + '$');
  49877. v = URI.recodePath(v);
  49878. this._parts.path = this._parts.path.replace(replace, v);
  49879. if (mutatedDirectory) {
  49880. this.normalizePath(build);
  49881. } else {
  49882. this.build(!build);
  49883. }
  49884. return this;
  49885. }
  49886. };
  49887. p.suffix = function(v, build) {
  49888. if (this._parts.urn) {
  49889. return v === undefined ? '' : this;
  49890. }
  49891. if (v === undefined || v === true) {
  49892. if (!this._parts.path || this._parts.path === '/') {
  49893. return '';
  49894. }
  49895. var filename = this.filename();
  49896. var pos = filename.lastIndexOf('.');
  49897. var s, res;
  49898. if (pos === -1) {
  49899. return '';
  49900. }
  49901. // suffix may only contain alnum characters (yup, I made this up.)
  49902. s = filename.substring(pos+1);
  49903. res = (/^[a-z0-9%]+$/i).test(s) ? s : '';
  49904. return v ? URI.decodePathSegment(res) : res;
  49905. } else {
  49906. if (v.charAt(0) === '.') {
  49907. v = v.substring(1);
  49908. }
  49909. var suffix = this.suffix();
  49910. var replace;
  49911. if (!suffix) {
  49912. if (!v) {
  49913. return this;
  49914. }
  49915. this._parts.path += '.' + URI.recodePath(v);
  49916. } else if (!v) {
  49917. replace = new RegExp(escapeRegEx('.' + suffix) + '$');
  49918. } else {
  49919. replace = new RegExp(escapeRegEx(suffix) + '$');
  49920. }
  49921. if (replace) {
  49922. v = URI.recodePath(v);
  49923. this._parts.path = this._parts.path.replace(replace, v);
  49924. }
  49925. this.build(!build);
  49926. return this;
  49927. }
  49928. };
  49929. p.segment = function(segment, v, build) {
  49930. var separator = this._parts.urn ? ':' : '/';
  49931. var path = this.path();
  49932. var absolute = path.substring(0, 1) === '/';
  49933. var segments = path.split(separator);
  49934. if (segment !== undefined && typeof segment !== 'number') {
  49935. build = v;
  49936. v = segment;
  49937. segment = undefined;
  49938. }
  49939. if (segment !== undefined && typeof segment !== 'number') {
  49940. throw new Error('Bad segment "' + segment + '", must be 0-based integer');
  49941. }
  49942. if (absolute) {
  49943. segments.shift();
  49944. }
  49945. if (segment < 0) {
  49946. // allow negative indexes to address from the end
  49947. segment = Math.max(segments.length + segment, 0);
  49948. }
  49949. if (v === undefined) {
  49950. /*jshint laxbreak: true */
  49951. return segment === undefined
  49952. ? segments
  49953. : segments[segment];
  49954. /*jshint laxbreak: false */
  49955. } else if (segment === null || segments[segment] === undefined) {
  49956. if (isArray(v)) {
  49957. segments = [];
  49958. // collapse empty elements within array
  49959. for (var i=0, l=v.length; i < l; i++) {
  49960. if (!v[i].length && (!segments.length || !segments[segments.length -1].length)) {
  49961. continue;
  49962. }
  49963. if (segments.length && !segments[segments.length -1].length) {
  49964. segments.pop();
  49965. }
  49966. segments.push(trimSlashes(v[i]));
  49967. }
  49968. } else if (v || typeof v === 'string') {
  49969. v = trimSlashes(v);
  49970. if (segments[segments.length -1] === '') {
  49971. // empty trailing elements have to be overwritten
  49972. // to prevent results such as /foo//bar
  49973. segments[segments.length -1] = v;
  49974. } else {
  49975. segments.push(v);
  49976. }
  49977. }
  49978. } else {
  49979. if (v) {
  49980. segments[segment] = trimSlashes(v);
  49981. } else {
  49982. segments.splice(segment, 1);
  49983. }
  49984. }
  49985. if (absolute) {
  49986. segments.unshift('');
  49987. }
  49988. return this.path(segments.join(separator), build);
  49989. };
  49990. p.segmentCoded = function(segment, v, build) {
  49991. var segments, i, l;
  49992. if (typeof segment !== 'number') {
  49993. build = v;
  49994. v = segment;
  49995. segment = undefined;
  49996. }
  49997. if (v === undefined) {
  49998. segments = this.segment(segment, v, build);
  49999. if (!isArray(segments)) {
  50000. segments = segments !== undefined ? URI.decode(segments) : undefined;
  50001. } else {
  50002. for (i = 0, l = segments.length; i < l; i++) {
  50003. segments[i] = URI.decode(segments[i]);
  50004. }
  50005. }
  50006. return segments;
  50007. }
  50008. if (!isArray(v)) {
  50009. v = (typeof v === 'string' || v instanceof String) ? URI.encode(v) : v;
  50010. } else {
  50011. for (i = 0, l = v.length; i < l; i++) {
  50012. v[i] = URI.encode(v[i]);
  50013. }
  50014. }
  50015. return this.segment(segment, v, build);
  50016. };
  50017. // mutating query string
  50018. var q = p.query;
  50019. p.query = function(v, build) {
  50020. if (v === true) {
  50021. return URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
  50022. } else if (typeof v === 'function') {
  50023. var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
  50024. var result = v.call(this, data);
  50025. this._parts.query = URI.buildQuery(result || data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);
  50026. this.build(!build);
  50027. return this;
  50028. } else if (v !== undefined && typeof v !== 'string') {
  50029. this._parts.query = URI.buildQuery(v, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);
  50030. this.build(!build);
  50031. return this;
  50032. } else {
  50033. return q.call(this, v, build);
  50034. }
  50035. };
  50036. p.setQuery = function(name, value, build) {
  50037. var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
  50038. if (typeof name === 'string' || name instanceof String) {
  50039. data[name] = value !== undefined ? value : null;
  50040. } else if (typeof name === 'object') {
  50041. for (var key in name) {
  50042. if (hasOwn.call(name, key)) {
  50043. data[key] = name[key];
  50044. }
  50045. }
  50046. } else {
  50047. throw new TypeError('URI.addQuery() accepts an object, string as the name parameter');
  50048. }
  50049. this._parts.query = URI.buildQuery(data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);
  50050. if (typeof name !== 'string') {
  50051. build = value;
  50052. }
  50053. this.build(!build);
  50054. return this;
  50055. };
  50056. p.addQuery = function(name, value, build) {
  50057. var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
  50058. URI.addQuery(data, name, value === undefined ? null : value);
  50059. this._parts.query = URI.buildQuery(data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);
  50060. if (typeof name !== 'string') {
  50061. build = value;
  50062. }
  50063. this.build(!build);
  50064. return this;
  50065. };
  50066. p.removeQuery = function(name, value, build) {
  50067. var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
  50068. URI.removeQuery(data, name, value);
  50069. this._parts.query = URI.buildQuery(data, this._parts.duplicateQueryParameters, this._parts.escapeQuerySpace);
  50070. if (typeof name !== 'string') {
  50071. build = value;
  50072. }
  50073. this.build(!build);
  50074. return this;
  50075. };
  50076. p.hasQuery = function(name, value, withinArray) {
  50077. var data = URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace);
  50078. return URI.hasQuery(data, name, value, withinArray);
  50079. };
  50080. p.setSearch = p.setQuery;
  50081. p.addSearch = p.addQuery;
  50082. p.removeSearch = p.removeQuery;
  50083. p.hasSearch = p.hasQuery;
  50084. // sanitizing URLs
  50085. p.normalize = function() {
  50086. if (this._parts.urn) {
  50087. return this
  50088. .normalizeProtocol(false)
  50089. .normalizePath(false)
  50090. .normalizeQuery(false)
  50091. .normalizeFragment(false)
  50092. .build();
  50093. }
  50094. return this
  50095. .normalizeProtocol(false)
  50096. .normalizeHostname(false)
  50097. .normalizePort(false)
  50098. .normalizePath(false)
  50099. .normalizeQuery(false)
  50100. .normalizeFragment(false)
  50101. .build();
  50102. };
  50103. p.normalizeProtocol = function(build) {
  50104. if (typeof this._parts.protocol === 'string') {
  50105. this._parts.protocol = this._parts.protocol.toLowerCase();
  50106. this.build(!build);
  50107. }
  50108. return this;
  50109. };
  50110. p.normalizeHostname = function(build) {
  50111. if (this._parts.hostname) {
  50112. if (this.is('IDN') && punycode) {
  50113. this._parts.hostname = punycode.toASCII(this._parts.hostname);
  50114. } else if (this.is('IPv6') && IPv6) {
  50115. this._parts.hostname = IPv6.best(this._parts.hostname);
  50116. }
  50117. this._parts.hostname = this._parts.hostname.toLowerCase();
  50118. this.build(!build);
  50119. }
  50120. return this;
  50121. };
  50122. p.normalizePort = function(build) {
  50123. // remove port of it's the protocol's default
  50124. if (typeof this._parts.protocol === 'string' && this._parts.port === URI.defaultPorts[this._parts.protocol]) {
  50125. this._parts.port = null;
  50126. this.build(!build);
  50127. }
  50128. return this;
  50129. };
  50130. p.normalizePath = function(build) {
  50131. var _path = this._parts.path;
  50132. if (!_path) {
  50133. return this;
  50134. }
  50135. if (this._parts.urn) {
  50136. this._parts.path = URI.recodeUrnPath(this._parts.path);
  50137. this.build(!build);
  50138. return this;
  50139. }
  50140. if (this._parts.path === '/') {
  50141. return this;
  50142. }
  50143. _path = URI.recodePath(_path);
  50144. var _was_relative;
  50145. var _leadingParents = '';
  50146. var _parent, _pos;
  50147. // handle relative paths
  50148. if (_path.charAt(0) !== '/') {
  50149. _was_relative = true;
  50150. _path = '/' + _path;
  50151. }
  50152. // handle relative files (as opposed to directories)
  50153. if (_path.slice(-3) === '/..' || _path.slice(-2) === '/.') {
  50154. _path += '/';
  50155. }
  50156. // resolve simples
  50157. _path = _path
  50158. .replace(/(\/(\.\/)+)|(\/\.$)/g, '/')
  50159. .replace(/\/{2,}/g, '/');
  50160. // remember leading parents
  50161. if (_was_relative) {
  50162. _leadingParents = _path.substring(1).match(/^(\.\.\/)+/) || '';
  50163. if (_leadingParents) {
  50164. _leadingParents = _leadingParents[0];
  50165. }
  50166. }
  50167. // resolve parents
  50168. while (true) {
  50169. _parent = _path.search(/\/\.\.(\/|$)/);
  50170. if (_parent === -1) {
  50171. // no more ../ to resolve
  50172. break;
  50173. } else if (_parent === 0) {
  50174. // top level cannot be relative, skip it
  50175. _path = _path.substring(3);
  50176. continue;
  50177. }
  50178. _pos = _path.substring(0, _parent).lastIndexOf('/');
  50179. if (_pos === -1) {
  50180. _pos = _parent;
  50181. }
  50182. _path = _path.substring(0, _pos) + _path.substring(_parent + 3);
  50183. }
  50184. // revert to relative
  50185. if (_was_relative && this.is('relative')) {
  50186. _path = _leadingParents + _path.substring(1);
  50187. }
  50188. this._parts.path = _path;
  50189. this.build(!build);
  50190. return this;
  50191. };
  50192. p.normalizePathname = p.normalizePath;
  50193. p.normalizeQuery = function(build) {
  50194. if (typeof this._parts.query === 'string') {
  50195. if (!this._parts.query.length) {
  50196. this._parts.query = null;
  50197. } else {
  50198. this.query(URI.parseQuery(this._parts.query, this._parts.escapeQuerySpace));
  50199. }
  50200. this.build(!build);
  50201. }
  50202. return this;
  50203. };
  50204. p.normalizeFragment = function(build) {
  50205. if (!this._parts.fragment) {
  50206. this._parts.fragment = null;
  50207. this.build(!build);
  50208. }
  50209. return this;
  50210. };
  50211. p.normalizeSearch = p.normalizeQuery;
  50212. p.normalizeHash = p.normalizeFragment;
  50213. p.iso8859 = function() {
  50214. // expect unicode input, iso8859 output
  50215. var e = URI.encode;
  50216. var d = URI.decode;
  50217. URI.encode = escape;
  50218. URI.decode = decodeURIComponent;
  50219. try {
  50220. this.normalize();
  50221. } finally {
  50222. URI.encode = e;
  50223. URI.decode = d;
  50224. }
  50225. return this;
  50226. };
  50227. p.unicode = function() {
  50228. // expect iso8859 input, unicode output
  50229. var e = URI.encode;
  50230. var d = URI.decode;
  50231. URI.encode = strictEncodeURIComponent;
  50232. URI.decode = unescape;
  50233. try {
  50234. this.normalize();
  50235. } finally {
  50236. URI.encode = e;
  50237. URI.decode = d;
  50238. }
  50239. return this;
  50240. };
  50241. p.readable = function() {
  50242. var uri = this.clone();
  50243. // removing username, password, because they shouldn't be displayed according to RFC 3986
  50244. uri.username('').password('').normalize();
  50245. var t = '';
  50246. if (uri._parts.protocol) {
  50247. t += uri._parts.protocol + '://';
  50248. }
  50249. if (uri._parts.hostname) {
  50250. if (uri.is('punycode') && punycode) {
  50251. t += punycode.toUnicode(uri._parts.hostname);
  50252. if (uri._parts.port) {
  50253. t += ':' + uri._parts.port;
  50254. }
  50255. } else {
  50256. t += uri.host();
  50257. }
  50258. }
  50259. if (uri._parts.hostname && uri._parts.path && uri._parts.path.charAt(0) !== '/') {
  50260. t += '/';
  50261. }
  50262. t += uri.path(true);
  50263. if (uri._parts.query) {
  50264. var q = '';
  50265. for (var i = 0, qp = uri._parts.query.split('&'), l = qp.length; i < l; i++) {
  50266. var kv = (qp[i] || '').split('=');
  50267. q += '&' + URI.decodeQuery(kv[0], this._parts.escapeQuerySpace)
  50268. .replace(/&/g, '%26');
  50269. if (kv[1] !== undefined) {
  50270. q += '=' + URI.decodeQuery(kv[1], this._parts.escapeQuerySpace)
  50271. .replace(/&/g, '%26');
  50272. }
  50273. }
  50274. t += '?' + q.substring(1);
  50275. }
  50276. t += URI.decodeQuery(uri.hash(), true);
  50277. return t;
  50278. };
  50279. // resolving relative and absolute URLs
  50280. p.absoluteTo = function(base) {
  50281. var resolved = this.clone();
  50282. var properties = ['protocol', 'username', 'password', 'hostname', 'port'];
  50283. var basedir, i, p;
  50284. if (this._parts.urn) {
  50285. throw new Error('URNs do not have any generally defined hierarchical components');
  50286. }
  50287. if (!(base instanceof URI)) {
  50288. base = new URI(base);
  50289. }
  50290. if (resolved._parts.protocol) {
  50291. // Directly returns even if this._parts.hostname is empty.
  50292. return resolved;
  50293. } else {
  50294. resolved._parts.protocol = base._parts.protocol;
  50295. }
  50296. if (this._parts.hostname) {
  50297. return resolved;
  50298. }
  50299. for (i = 0; (p = properties[i]); i++) {
  50300. resolved._parts[p] = base._parts[p];
  50301. }
  50302. if (!resolved._parts.path) {
  50303. resolved._parts.path = base._parts.path;
  50304. if (!resolved._parts.query) {
  50305. resolved._parts.query = base._parts.query;
  50306. }
  50307. } else {
  50308. if (resolved._parts.path.substring(-2) === '..') {
  50309. resolved._parts.path += '/';
  50310. }
  50311. if (resolved.path().charAt(0) !== '/') {
  50312. basedir = base.directory();
  50313. basedir = basedir ? basedir : base.path().indexOf('/') === 0 ? '/' : '';
  50314. resolved._parts.path = (basedir ? (basedir + '/') : '') + resolved._parts.path;
  50315. resolved.normalizePath();
  50316. }
  50317. }
  50318. resolved.build();
  50319. return resolved;
  50320. };
  50321. p.relativeTo = function(base) {
  50322. var relative = this.clone().normalize();
  50323. var relativeParts, baseParts, common, relativePath, basePath;
  50324. if (relative._parts.urn) {
  50325. throw new Error('URNs do not have any generally defined hierarchical components');
  50326. }
  50327. base = new URI(base).normalize();
  50328. relativeParts = relative._parts;
  50329. baseParts = base._parts;
  50330. relativePath = relative.path();
  50331. basePath = base.path();
  50332. if (relativePath.charAt(0) !== '/') {
  50333. throw new Error('URI is already relative');
  50334. }
  50335. if (basePath.charAt(0) !== '/') {
  50336. throw new Error('Cannot calculate a URI relative to another relative URI');
  50337. }
  50338. if (relativeParts.protocol === baseParts.protocol) {
  50339. relativeParts.protocol = null;
  50340. }
  50341. if (relativeParts.username !== baseParts.username || relativeParts.password !== baseParts.password) {
  50342. return relative.build();
  50343. }
  50344. if (relativeParts.protocol !== null || relativeParts.username !== null || relativeParts.password !== null) {
  50345. return relative.build();
  50346. }
  50347. if (relativeParts.hostname === baseParts.hostname && relativeParts.port === baseParts.port) {
  50348. relativeParts.hostname = null;
  50349. relativeParts.port = null;
  50350. } else {
  50351. return relative.build();
  50352. }
  50353. if (relativePath === basePath) {
  50354. relativeParts.path = '';
  50355. return relative.build();
  50356. }
  50357. // determine common sub path
  50358. common = URI.commonPath(relativePath, basePath);
  50359. // If the paths have nothing in common, return a relative URL with the absolute path.
  50360. if (!common) {
  50361. return relative.build();
  50362. }
  50363. var parents = baseParts.path
  50364. .substring(common.length)
  50365. .replace(/[^\/]*$/, '')
  50366. .replace(/.*?\//g, '../');
  50367. relativeParts.path = (parents + relativeParts.path.substring(common.length)) || './';
  50368. return relative.build();
  50369. };
  50370. // comparing URIs
  50371. p.equals = function(uri) {
  50372. var one = this.clone();
  50373. var two = new URI(uri);
  50374. var one_map = {};
  50375. var two_map = {};
  50376. var checked = {};
  50377. var one_query, two_query, key;
  50378. one.normalize();
  50379. two.normalize();
  50380. // exact match
  50381. if (one.toString() === two.toString()) {
  50382. return true;
  50383. }
  50384. // extract query string
  50385. one_query = one.query();
  50386. two_query = two.query();
  50387. one.query('');
  50388. two.query('');
  50389. // definitely not equal if not even non-query parts match
  50390. if (one.toString() !== two.toString()) {
  50391. return false;
  50392. }
  50393. // query parameters have the same length, even if they're permuted
  50394. if (one_query.length !== two_query.length) {
  50395. return false;
  50396. }
  50397. one_map = URI.parseQuery(one_query, this._parts.escapeQuerySpace);
  50398. two_map = URI.parseQuery(two_query, this._parts.escapeQuerySpace);
  50399. for (key in one_map) {
  50400. if (hasOwn.call(one_map, key)) {
  50401. if (!isArray(one_map[key])) {
  50402. if (one_map[key] !== two_map[key]) {
  50403. return false;
  50404. }
  50405. } else if (!arraysEqual(one_map[key], two_map[key])) {
  50406. return false;
  50407. }
  50408. checked[key] = true;
  50409. }
  50410. }
  50411. for (key in two_map) {
  50412. if (hasOwn.call(two_map, key)) {
  50413. if (!checked[key]) {
  50414. // two contains a parameter not present in one
  50415. return false;
  50416. }
  50417. }
  50418. }
  50419. return true;
  50420. };
  50421. // state
  50422. p.preventInvalidHostname = function(v) {
  50423. this._parts.preventInvalidHostname = !!v;
  50424. return this;
  50425. };
  50426. p.duplicateQueryParameters = function(v) {
  50427. this._parts.duplicateQueryParameters = !!v;
  50428. return this;
  50429. };
  50430. p.escapeQuerySpace = function(v) {
  50431. this._parts.escapeQuerySpace = !!v;
  50432. return this;
  50433. };
  50434. return URI;
  50435. }));
  50436. /***/ }),
  50437. /***/ "./node_modules/urijs/src/punycode.js":
  50438. /*!********************************************!*\
  50439. !*** ./node_modules/urijs/src/punycode.js ***!
  50440. \********************************************/
  50441. /*! no static exports found */
  50442. /***/ (function(module, exports, __webpack_require__) {
  50443. /* WEBPACK VAR INJECTION */(function(module, global) {var __WEBPACK_AMD_DEFINE_RESULT__;/*! https://mths.be/punycode v1.4.0 by @mathias */
  50444. ;(function(root) {
  50445. /** Detect free variables */
  50446. var freeExports = typeof exports == 'object' && exports &&
  50447. !exports.nodeType && exports;
  50448. var freeModule = typeof module == 'object' && module &&
  50449. !module.nodeType && module;
  50450. var freeGlobal = typeof global == 'object' && global;
  50451. if (
  50452. freeGlobal.global === freeGlobal ||
  50453. freeGlobal.window === freeGlobal ||
  50454. freeGlobal.self === freeGlobal
  50455. ) {
  50456. root = freeGlobal;
  50457. }
  50458. /**
  50459. * The `punycode` object.
  50460. * @name punycode
  50461. * @type Object
  50462. */
  50463. var punycode,
  50464. /** Highest positive signed 32-bit float value */
  50465. maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
  50466. /** Bootstring parameters */
  50467. base = 36,
  50468. tMin = 1,
  50469. tMax = 26,
  50470. skew = 38,
  50471. damp = 700,
  50472. initialBias = 72,
  50473. initialN = 128, // 0x80
  50474. delimiter = '-', // '\x2D'
  50475. /** Regular expressions */
  50476. regexPunycode = /^xn--/,
  50477. regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
  50478. regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
  50479. /** Error messages */
  50480. errors = {
  50481. 'overflow': 'Overflow: input needs wider integers to process',
  50482. 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
  50483. 'invalid-input': 'Invalid input'
  50484. },
  50485. /** Convenience shortcuts */
  50486. baseMinusTMin = base - tMin,
  50487. floor = Math.floor,
  50488. stringFromCharCode = String.fromCharCode,
  50489. /** Temporary variable */
  50490. key;
  50491. /*--------------------------------------------------------------------------*/
  50492. /**
  50493. * A generic error utility function.
  50494. * @private
  50495. * @param {String} type The error type.
  50496. * @returns {Error} Throws a `RangeError` with the applicable error message.
  50497. */
  50498. function error(type) {
  50499. throw new RangeError(errors[type]);
  50500. }
  50501. /**
  50502. * A generic `Array#map` utility function.
  50503. * @private
  50504. * @param {Array} array The array to iterate over.
  50505. * @param {Function} callback The function that gets called for every array
  50506. * item.
  50507. * @returns {Array} A new array of values returned by the callback function.
  50508. */
  50509. function map(array, fn) {
  50510. var length = array.length;
  50511. var result = [];
  50512. while (length--) {
  50513. result[length] = fn(array[length]);
  50514. }
  50515. return result;
  50516. }
  50517. /**
  50518. * A simple `Array#map`-like wrapper to work with domain name strings or email
  50519. * addresses.
  50520. * @private
  50521. * @param {String} domain The domain name or email address.
  50522. * @param {Function} callback The function that gets called for every
  50523. * character.
  50524. * @returns {Array} A new string of characters returned by the callback
  50525. * function.
  50526. */
  50527. function mapDomain(string, fn) {
  50528. var parts = string.split('@');
  50529. var result = '';
  50530. if (parts.length > 1) {
  50531. // In email addresses, only the domain name should be punycoded. Leave
  50532. // the local part (i.e. everything up to `@`) intact.
  50533. result = parts[0] + '@';
  50534. string = parts[1];
  50535. }
  50536. // Avoid `split(regex)` for IE8 compatibility. See #17.
  50537. string = string.replace(regexSeparators, '\x2E');
  50538. var labels = string.split('.');
  50539. var encoded = map(labels, fn).join('.');
  50540. return result + encoded;
  50541. }
  50542. /**
  50543. * Creates an array containing the numeric code points of each Unicode
  50544. * character in the string. While JavaScript uses UCS-2 internally,
  50545. * this function will convert a pair of surrogate halves (each of which
  50546. * UCS-2 exposes as separate characters) into a single code point,
  50547. * matching UTF-16.
  50548. * @see `punycode.ucs2.encode`
  50549. * @see <https://mathiasbynens.be/notes/javascript-encoding>
  50550. * @memberOf punycode.ucs2
  50551. * @name decode
  50552. * @param {String} string The Unicode input string (UCS-2).
  50553. * @returns {Array} The new array of code points.
  50554. */
  50555. function ucs2decode(string) {
  50556. var output = [],
  50557. counter = 0,
  50558. length = string.length,
  50559. value,
  50560. extra;
  50561. while (counter < length) {
  50562. value = string.charCodeAt(counter++);
  50563. if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
  50564. // high surrogate, and there is a next character
  50565. extra = string.charCodeAt(counter++);
  50566. if ((extra & 0xFC00) == 0xDC00) { // low surrogate
  50567. output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
  50568. } else {
  50569. // unmatched surrogate; only append this code unit, in case the next
  50570. // code unit is the high surrogate of a surrogate pair
  50571. output.push(value);
  50572. counter--;
  50573. }
  50574. } else {
  50575. output.push(value);
  50576. }
  50577. }
  50578. return output;
  50579. }
  50580. /**
  50581. * Creates a string based on an array of numeric code points.
  50582. * @see `punycode.ucs2.decode`
  50583. * @memberOf punycode.ucs2
  50584. * @name encode
  50585. * @param {Array} codePoints The array of numeric code points.
  50586. * @returns {String} The new Unicode string (UCS-2).
  50587. */
  50588. function ucs2encode(array) {
  50589. return map(array, function(value) {
  50590. var output = '';
  50591. if (value > 0xFFFF) {
  50592. value -= 0x10000;
  50593. output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
  50594. value = 0xDC00 | value & 0x3FF;
  50595. }
  50596. output += stringFromCharCode(value);
  50597. return output;
  50598. }).join('');
  50599. }
  50600. /**
  50601. * Converts a basic code point into a digit/integer.
  50602. * @see `digitToBasic()`
  50603. * @private
  50604. * @param {Number} codePoint The basic numeric code point value.
  50605. * @returns {Number} The numeric value of a basic code point (for use in
  50606. * representing integers) in the range `0` to `base - 1`, or `base` if
  50607. * the code point does not represent a value.
  50608. */
  50609. function basicToDigit(codePoint) {
  50610. if (codePoint - 48 < 10) {
  50611. return codePoint - 22;
  50612. }
  50613. if (codePoint - 65 < 26) {
  50614. return codePoint - 65;
  50615. }
  50616. if (codePoint - 97 < 26) {
  50617. return codePoint - 97;
  50618. }
  50619. return base;
  50620. }
  50621. /**
  50622. * Converts a digit/integer into a basic code point.
  50623. * @see `basicToDigit()`
  50624. * @private
  50625. * @param {Number} digit The numeric value of a basic code point.
  50626. * @returns {Number} The basic code point whose value (when used for
  50627. * representing integers) is `digit`, which needs to be in the range
  50628. * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
  50629. * used; else, the lowercase form is used. The behavior is undefined
  50630. * if `flag` is non-zero and `digit` has no uppercase form.
  50631. */
  50632. function digitToBasic(digit, flag) {
  50633. // 0..25 map to ASCII a..z or A..Z
  50634. // 26..35 map to ASCII 0..9
  50635. return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
  50636. }
  50637. /**
  50638. * Bias adaptation function as per section 3.4 of RFC 3492.
  50639. * https://tools.ietf.org/html/rfc3492#section-3.4
  50640. * @private
  50641. */
  50642. function adapt(delta, numPoints, firstTime) {
  50643. var k = 0;
  50644. delta = firstTime ? floor(delta / damp) : delta >> 1;
  50645. delta += floor(delta / numPoints);
  50646. for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
  50647. delta = floor(delta / baseMinusTMin);
  50648. }
  50649. return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
  50650. }
  50651. /**
  50652. * Converts a Punycode string of ASCII-only symbols to a string of Unicode
  50653. * symbols.
  50654. * @memberOf punycode
  50655. * @param {String} input The Punycode string of ASCII-only symbols.
  50656. * @returns {String} The resulting string of Unicode symbols.
  50657. */
  50658. function decode(input) {
  50659. // Don't use UCS-2
  50660. var output = [],
  50661. inputLength = input.length,
  50662. out,
  50663. i = 0,
  50664. n = initialN,
  50665. bias = initialBias,
  50666. basic,
  50667. j,
  50668. index,
  50669. oldi,
  50670. w,
  50671. k,
  50672. digit,
  50673. t,
  50674. /** Cached calculation results */
  50675. baseMinusT;
  50676. // Handle the basic code points: let `basic` be the number of input code
  50677. // points before the last delimiter, or `0` if there is none, then copy
  50678. // the first basic code points to the output.
  50679. basic = input.lastIndexOf(delimiter);
  50680. if (basic < 0) {
  50681. basic = 0;
  50682. }
  50683. for (j = 0; j < basic; ++j) {
  50684. // if it's not a basic code point
  50685. if (input.charCodeAt(j) >= 0x80) {
  50686. error('not-basic');
  50687. }
  50688. output.push(input.charCodeAt(j));
  50689. }
  50690. // Main decoding loop: start just after the last delimiter if any basic code
  50691. // points were copied; start at the beginning otherwise.
  50692. for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
  50693. // `index` is the index of the next character to be consumed.
  50694. // Decode a generalized variable-length integer into `delta`,
  50695. // which gets added to `i`. The overflow checking is easier
  50696. // if we increase `i` as we go, then subtract off its starting
  50697. // value at the end to obtain `delta`.
  50698. for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
  50699. if (index >= inputLength) {
  50700. error('invalid-input');
  50701. }
  50702. digit = basicToDigit(input.charCodeAt(index++));
  50703. if (digit >= base || digit > floor((maxInt - i) / w)) {
  50704. error('overflow');
  50705. }
  50706. i += digit * w;
  50707. t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
  50708. if (digit < t) {
  50709. break;
  50710. }
  50711. baseMinusT = base - t;
  50712. if (w > floor(maxInt / baseMinusT)) {
  50713. error('overflow');
  50714. }
  50715. w *= baseMinusT;
  50716. }
  50717. out = output.length + 1;
  50718. bias = adapt(i - oldi, out, oldi == 0);
  50719. // `i` was supposed to wrap around from `out` to `0`,
  50720. // incrementing `n` each time, so we'll fix that now:
  50721. if (floor(i / out) > maxInt - n) {
  50722. error('overflow');
  50723. }
  50724. n += floor(i / out);
  50725. i %= out;
  50726. // Insert `n` at position `i` of the output
  50727. output.splice(i++, 0, n);
  50728. }
  50729. return ucs2encode(output);
  50730. }
  50731. /**
  50732. * Converts a string of Unicode symbols (e.g. a domain name label) to a
  50733. * Punycode string of ASCII-only symbols.
  50734. * @memberOf punycode
  50735. * @param {String} input The string of Unicode symbols.
  50736. * @returns {String} The resulting Punycode string of ASCII-only symbols.
  50737. */
  50738. function encode(input) {
  50739. var n,
  50740. delta,
  50741. handledCPCount,
  50742. basicLength,
  50743. bias,
  50744. j,
  50745. m,
  50746. q,
  50747. k,
  50748. t,
  50749. currentValue,
  50750. output = [],
  50751. /** `inputLength` will hold the number of code points in `input`. */
  50752. inputLength,
  50753. /** Cached calculation results */
  50754. handledCPCountPlusOne,
  50755. baseMinusT,
  50756. qMinusT;
  50757. // Convert the input in UCS-2 to Unicode
  50758. input = ucs2decode(input);
  50759. // Cache the length
  50760. inputLength = input.length;
  50761. // Initialize the state
  50762. n = initialN;
  50763. delta = 0;
  50764. bias = initialBias;
  50765. // Handle the basic code points
  50766. for (j = 0; j < inputLength; ++j) {
  50767. currentValue = input[j];
  50768. if (currentValue < 0x80) {
  50769. output.push(stringFromCharCode(currentValue));
  50770. }
  50771. }
  50772. handledCPCount = basicLength = output.length;
  50773. // `handledCPCount` is the number of code points that have been handled;
  50774. // `basicLength` is the number of basic code points.
  50775. // Finish the basic string - if it is not empty - with a delimiter
  50776. if (basicLength) {
  50777. output.push(delimiter);
  50778. }
  50779. // Main encoding loop:
  50780. while (handledCPCount < inputLength) {
  50781. // All non-basic code points < n have been handled already. Find the next
  50782. // larger one:
  50783. for (m = maxInt, j = 0; j < inputLength; ++j) {
  50784. currentValue = input[j];
  50785. if (currentValue >= n && currentValue < m) {
  50786. m = currentValue;
  50787. }
  50788. }
  50789. // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
  50790. // but guard against overflow
  50791. handledCPCountPlusOne = handledCPCount + 1;
  50792. if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
  50793. error('overflow');
  50794. }
  50795. delta += (m - n) * handledCPCountPlusOne;
  50796. n = m;
  50797. for (j = 0; j < inputLength; ++j) {
  50798. currentValue = input[j];
  50799. if (currentValue < n && ++delta > maxInt) {
  50800. error('overflow');
  50801. }
  50802. if (currentValue == n) {
  50803. // Represent delta as a generalized variable-length integer
  50804. for (q = delta, k = base; /* no condition */; k += base) {
  50805. t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
  50806. if (q < t) {
  50807. break;
  50808. }
  50809. qMinusT = q - t;
  50810. baseMinusT = base - t;
  50811. output.push(
  50812. stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
  50813. );
  50814. q = floor(qMinusT / baseMinusT);
  50815. }
  50816. output.push(stringFromCharCode(digitToBasic(q, 0)));
  50817. bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
  50818. delta = 0;
  50819. ++handledCPCount;
  50820. }
  50821. }
  50822. ++delta;
  50823. ++n;
  50824. }
  50825. return output.join('');
  50826. }
  50827. /**
  50828. * Converts a Punycode string representing a domain name or an email address
  50829. * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
  50830. * it doesn't matter if you call it on a string that has already been
  50831. * converted to Unicode.
  50832. * @memberOf punycode
  50833. * @param {String} input The Punycoded domain name or email address to
  50834. * convert to Unicode.
  50835. * @returns {String} The Unicode representation of the given Punycode
  50836. * string.
  50837. */
  50838. function toUnicode(input) {
  50839. return mapDomain(input, function(string) {
  50840. return regexPunycode.test(string)
  50841. ? decode(string.slice(4).toLowerCase())
  50842. : string;
  50843. });
  50844. }
  50845. /**
  50846. * Converts a Unicode string representing a domain name or an email address to
  50847. * Punycode. Only the non-ASCII parts of the domain name will be converted,
  50848. * i.e. it doesn't matter if you call it with a domain that's already in
  50849. * ASCII.
  50850. * @memberOf punycode
  50851. * @param {String} input The domain name or email address to convert, as a
  50852. * Unicode string.
  50853. * @returns {String} The Punycode representation of the given domain name or
  50854. * email address.
  50855. */
  50856. function toASCII(input) {
  50857. return mapDomain(input, function(string) {
  50858. return regexNonASCII.test(string)
  50859. ? 'xn--' + encode(string)
  50860. : string;
  50861. });
  50862. }
  50863. /*--------------------------------------------------------------------------*/
  50864. /** Define the public API */
  50865. punycode = {
  50866. /**
  50867. * A string representing the current Punycode.js version number.
  50868. * @memberOf punycode
  50869. * @type String
  50870. */
  50871. 'version': '1.3.2',
  50872. /**
  50873. * An object of methods to convert from JavaScript's internal character
  50874. * representation (UCS-2) to Unicode code points, and back.
  50875. * @see <https://mathiasbynens.be/notes/javascript-encoding>
  50876. * @memberOf punycode
  50877. * @type Object
  50878. */
  50879. 'ucs2': {
  50880. 'decode': ucs2decode,
  50881. 'encode': ucs2encode
  50882. },
  50883. 'decode': decode,
  50884. 'encode': encode,
  50885. 'toASCII': toASCII,
  50886. 'toUnicode': toUnicode
  50887. };
  50888. /** Expose `punycode` */
  50889. // Some AMD build optimizers, like r.js, check for specific condition patterns
  50890. // like the following:
  50891. if (
  50892. true
  50893. ) {
  50894. !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
  50895. return punycode;
  50896. }).call(exports, __webpack_require__, exports, module),
  50897. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  50898. } else {}
  50899. }(this));
  50900. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/module.js */ "./node_modules/webpack/buildin/module.js")(module), __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))
  50901. /***/ }),
  50902. /***/ "./node_modules/webpack/buildin/global.js":
  50903. /*!***********************************!*\
  50904. !*** (webpack)/buildin/global.js ***!
  50905. \***********************************/
  50906. /*! no static exports found */
  50907. /***/ (function(module, exports) {
  50908. var g;
  50909. // This works in non-strict mode
  50910. g = (function() {
  50911. return this;
  50912. })();
  50913. try {
  50914. // This works if eval is allowed (see CSP)
  50915. g = g || Function("return this")() || (1, eval)("this");
  50916. } catch (e) {
  50917. // This works if the window reference is available
  50918. if (typeof window === "object") g = window;
  50919. }
  50920. // g can still be undefined, but nothing to do about it...
  50921. // We return undefined, instead of nothing here, so it's
  50922. // easier to handle this case. if(!global) { ...}
  50923. module.exports = g;
  50924. /***/ }),
  50925. /***/ "./node_modules/webpack/buildin/module.js":
  50926. /*!***********************************!*\
  50927. !*** (webpack)/buildin/module.js ***!
  50928. \***********************************/
  50929. /*! no static exports found */
  50930. /***/ (function(module, exports) {
  50931. module.exports = function(module) {
  50932. if (!module.webpackPolyfill) {
  50933. module.deprecate = function() {};
  50934. module.paths = [];
  50935. // module.parent = undefined by default
  50936. if (!module.children) module.children = [];
  50937. Object.defineProperty(module, "loaded", {
  50938. enumerable: true,
  50939. get: function() {
  50940. return module.l;
  50941. }
  50942. });
  50943. Object.defineProperty(module, "id", {
  50944. enumerable: true,
  50945. get: function() {
  50946. return module.i;
  50947. }
  50948. });
  50949. module.webpackPolyfill = 1;
  50950. }
  50951. return module;
  50952. };
  50953. /***/ }),
  50954. /***/ "./node_modules/xss/dist/xss.js":
  50955. /*!**************************************!*\
  50956. !*** ./node_modules/xss/dist/xss.js ***!
  50957. \**************************************/
  50958. /*! no static exports found */
  50959. /***/ (function(module, exports, __webpack_require__) {
  50960. var require;var require;(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  50961. /**
  50962. * default settings
  50963. *
  50964. * @author Zongmin Lei<leizongmin@gmail.com>
  50965. */
  50966. var FilterCSS = require("cssfilter").FilterCSS;
  50967. var getDefaultCSSWhiteList = require("cssfilter").getDefaultWhiteList;
  50968. var _ = require("./util");
  50969. function getDefaultWhiteList() {
  50970. return {
  50971. a: ["target", "href", "title"],
  50972. abbr: ["title"],
  50973. address: [],
  50974. area: ["shape", "coords", "href", "alt"],
  50975. article: [],
  50976. aside: [],
  50977. audio: ["autoplay", "controls", "loop", "preload", "src"],
  50978. b: [],
  50979. bdi: ["dir"],
  50980. bdo: ["dir"],
  50981. big: [],
  50982. blockquote: ["cite"],
  50983. br: [],
  50984. caption: [],
  50985. center: [],
  50986. cite: [],
  50987. code: [],
  50988. col: ["align", "valign", "span", "width"],
  50989. colgroup: ["align", "valign", "span", "width"],
  50990. dd: [],
  50991. del: ["datetime"],
  50992. details: ["open"],
  50993. div: [],
  50994. dl: [],
  50995. dt: [],
  50996. em: [],
  50997. font: ["color", "size", "face"],
  50998. footer: [],
  50999. h1: [],
  51000. h2: [],
  51001. h3: [],
  51002. h4: [],
  51003. h5: [],
  51004. h6: [],
  51005. header: [],
  51006. hr: [],
  51007. i: [],
  51008. img: ["src", "alt", "title", "width", "height"],
  51009. ins: ["datetime"],
  51010. li: [],
  51011. mark: [],
  51012. nav: [],
  51013. ol: [],
  51014. p: [],
  51015. pre: [],
  51016. s: [],
  51017. section: [],
  51018. small: [],
  51019. span: [],
  51020. sub: [],
  51021. sup: [],
  51022. strong: [],
  51023. table: ["width", "border", "align", "valign"],
  51024. tbody: ["align", "valign"],
  51025. td: ["width", "rowspan", "colspan", "align", "valign"],
  51026. tfoot: ["align", "valign"],
  51027. th: ["width", "rowspan", "colspan", "align", "valign"],
  51028. thead: ["align", "valign"],
  51029. tr: ["rowspan", "align", "valign"],
  51030. tt: [],
  51031. u: [],
  51032. ul: [],
  51033. video: ["autoplay", "controls", "loop", "preload", "src", "height", "width"]
  51034. };
  51035. }
  51036. var defaultCSSFilter = new FilterCSS();
  51037. /**
  51038. * default onTag function
  51039. *
  51040. * @param {String} tag
  51041. * @param {String} html
  51042. * @param {Object} options
  51043. * @return {String}
  51044. */
  51045. function onTag(tag, html, options) {
  51046. // do nothing
  51047. }
  51048. /**
  51049. * default onIgnoreTag function
  51050. *
  51051. * @param {String} tag
  51052. * @param {String} html
  51053. * @param {Object} options
  51054. * @return {String}
  51055. */
  51056. function onIgnoreTag(tag, html, options) {
  51057. // do nothing
  51058. }
  51059. /**
  51060. * default onTagAttr function
  51061. *
  51062. * @param {String} tag
  51063. * @param {String} name
  51064. * @param {String} value
  51065. * @return {String}
  51066. */
  51067. function onTagAttr(tag, name, value) {
  51068. // do nothing
  51069. }
  51070. /**
  51071. * default onIgnoreTagAttr function
  51072. *
  51073. * @param {String} tag
  51074. * @param {String} name
  51075. * @param {String} value
  51076. * @return {String}
  51077. */
  51078. function onIgnoreTagAttr(tag, name, value) {
  51079. // do nothing
  51080. }
  51081. /**
  51082. * default escapeHtml function
  51083. *
  51084. * @param {String} html
  51085. */
  51086. function escapeHtml(html) {
  51087. return html.replace(REGEXP_LT, "&lt;").replace(REGEXP_GT, "&gt;");
  51088. }
  51089. /**
  51090. * default safeAttrValue function
  51091. *
  51092. * @param {String} tag
  51093. * @param {String} name
  51094. * @param {String} value
  51095. * @param {Object} cssFilter
  51096. * @return {String}
  51097. */
  51098. function safeAttrValue(tag, name, value, cssFilter) {
  51099. // unescape attribute value firstly
  51100. value = friendlyAttrValue(value);
  51101. if (name === "href" || name === "src") {
  51102. // filter `href` and `src` attribute
  51103. // only allow the value that starts with `http://` | `https://` | `mailto:` | `/` | `#`
  51104. value = _.trim(value);
  51105. if (value === "#") return "#";
  51106. if (
  51107. !(
  51108. value.substr(0, 7) === "http://" ||
  51109. value.substr(0, 8) === "https://" ||
  51110. value.substr(0, 7) === "mailto:" ||
  51111. value.substr(0, 4) === "tel:" ||
  51112. value[0] === "#" ||
  51113. value[0] === "/"
  51114. )
  51115. ) {
  51116. return "";
  51117. }
  51118. } else if (name === "background") {
  51119. // filter `background` attribute (maybe no use)
  51120. // `javascript:`
  51121. REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;
  51122. if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {
  51123. return "";
  51124. }
  51125. } else if (name === "style") {
  51126. // `expression()`
  51127. REGEXP_DEFAULT_ON_TAG_ATTR_7.lastIndex = 0;
  51128. if (REGEXP_DEFAULT_ON_TAG_ATTR_7.test(value)) {
  51129. return "";
  51130. }
  51131. // `url()`
  51132. REGEXP_DEFAULT_ON_TAG_ATTR_8.lastIndex = 0;
  51133. if (REGEXP_DEFAULT_ON_TAG_ATTR_8.test(value)) {
  51134. REGEXP_DEFAULT_ON_TAG_ATTR_4.lastIndex = 0;
  51135. if (REGEXP_DEFAULT_ON_TAG_ATTR_4.test(value)) {
  51136. return "";
  51137. }
  51138. }
  51139. if (cssFilter !== false) {
  51140. cssFilter = cssFilter || defaultCSSFilter;
  51141. value = cssFilter.process(value);
  51142. }
  51143. }
  51144. // escape `<>"` before returns
  51145. value = escapeAttrValue(value);
  51146. return value;
  51147. }
  51148. // RegExp list
  51149. var REGEXP_LT = /</g;
  51150. var REGEXP_GT = />/g;
  51151. var REGEXP_QUOTE = /"/g;
  51152. var REGEXP_QUOTE_2 = /&quot;/g;
  51153. var REGEXP_ATTR_VALUE_1 = /&#([a-zA-Z0-9]*);?/gim;
  51154. var REGEXP_ATTR_VALUE_COLON = /&colon;?/gim;
  51155. var REGEXP_ATTR_VALUE_NEWLINE = /&newline;?/gim;
  51156. var REGEXP_DEFAULT_ON_TAG_ATTR_3 = /\/\*|\*\//gm;
  51157. var REGEXP_DEFAULT_ON_TAG_ATTR_4 = /((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi;
  51158. var REGEXP_DEFAULT_ON_TAG_ATTR_5 = /^[\s"'`]*(d\s*a\s*t\s*a\s*)\:/gi;
  51159. var REGEXP_DEFAULT_ON_TAG_ATTR_6 = /^[\s"'`]*(d\s*a\s*t\s*a\s*)\:\s*image\//gi;
  51160. var REGEXP_DEFAULT_ON_TAG_ATTR_7 = /e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi;
  51161. var REGEXP_DEFAULT_ON_TAG_ATTR_8 = /u\s*r\s*l\s*\(.*/gi;
  51162. /**
  51163. * escape doube quote
  51164. *
  51165. * @param {String} str
  51166. * @return {String} str
  51167. */
  51168. function escapeQuote(str) {
  51169. return str.replace(REGEXP_QUOTE, "&quot;");
  51170. }
  51171. /**
  51172. * unescape double quote
  51173. *
  51174. * @param {String} str
  51175. * @return {String} str
  51176. */
  51177. function unescapeQuote(str) {
  51178. return str.replace(REGEXP_QUOTE_2, '"');
  51179. }
  51180. /**
  51181. * escape html entities
  51182. *
  51183. * @param {String} str
  51184. * @return {String}
  51185. */
  51186. function escapeHtmlEntities(str) {
  51187. return str.replace(REGEXP_ATTR_VALUE_1, function replaceUnicode(str, code) {
  51188. return code[0] === "x" || code[0] === "X"
  51189. ? String.fromCharCode(parseInt(code.substr(1), 16))
  51190. : String.fromCharCode(parseInt(code, 10));
  51191. });
  51192. }
  51193. /**
  51194. * escape html5 new danger entities
  51195. *
  51196. * @param {String} str
  51197. * @return {String}
  51198. */
  51199. function escapeDangerHtml5Entities(str) {
  51200. return str
  51201. .replace(REGEXP_ATTR_VALUE_COLON, ":")
  51202. .replace(REGEXP_ATTR_VALUE_NEWLINE, " ");
  51203. }
  51204. /**
  51205. * clear nonprintable characters
  51206. *
  51207. * @param {String} str
  51208. * @return {String}
  51209. */
  51210. function clearNonPrintableCharacter(str) {
  51211. var str2 = "";
  51212. for (var i = 0, len = str.length; i < len; i++) {
  51213. str2 += str.charCodeAt(i) < 32 ? " " : str.charAt(i);
  51214. }
  51215. return _.trim(str2);
  51216. }
  51217. /**
  51218. * get friendly attribute value
  51219. *
  51220. * @param {String} str
  51221. * @return {String}
  51222. */
  51223. function friendlyAttrValue(str) {
  51224. str = unescapeQuote(str);
  51225. str = escapeHtmlEntities(str);
  51226. str = escapeDangerHtml5Entities(str);
  51227. str = clearNonPrintableCharacter(str);
  51228. return str;
  51229. }
  51230. /**
  51231. * unescape attribute value
  51232. *
  51233. * @param {String} str
  51234. * @return {String}
  51235. */
  51236. function escapeAttrValue(str) {
  51237. str = escapeQuote(str);
  51238. str = escapeHtml(str);
  51239. return str;
  51240. }
  51241. /**
  51242. * `onIgnoreTag` function for removing all the tags that are not in whitelist
  51243. */
  51244. function onIgnoreTagStripAll() {
  51245. return "";
  51246. }
  51247. /**
  51248. * remove tag body
  51249. * specify a `tags` list, if the tag is not in the `tags` list then process by the specify function (optional)
  51250. *
  51251. * @param {array} tags
  51252. * @param {function} next
  51253. */
  51254. function StripTagBody(tags, next) {
  51255. if (typeof next !== "function") {
  51256. next = function() {};
  51257. }
  51258. var isRemoveAllTag = !Array.isArray(tags);
  51259. function isRemoveTag(tag) {
  51260. if (isRemoveAllTag) return true;
  51261. return _.indexOf(tags, tag) !== -1;
  51262. }
  51263. var removeList = [];
  51264. var posStart = false;
  51265. return {
  51266. onIgnoreTag: function(tag, html, options) {
  51267. if (isRemoveTag(tag)) {
  51268. if (options.isClosing) {
  51269. var ret = "[/removed]";
  51270. var end = options.position + ret.length;
  51271. removeList.push([
  51272. posStart !== false ? posStart : options.position,
  51273. end
  51274. ]);
  51275. posStart = false;
  51276. return ret;
  51277. } else {
  51278. if (!posStart) {
  51279. posStart = options.position;
  51280. }
  51281. return "[removed]";
  51282. }
  51283. } else {
  51284. return next(tag, html, options);
  51285. }
  51286. },
  51287. remove: function(html) {
  51288. var rethtml = "";
  51289. var lastPos = 0;
  51290. _.forEach(removeList, function(pos) {
  51291. rethtml += html.slice(lastPos, pos[0]);
  51292. lastPos = pos[1];
  51293. });
  51294. rethtml += html.slice(lastPos);
  51295. return rethtml;
  51296. }
  51297. };
  51298. }
  51299. /**
  51300. * remove html comments
  51301. *
  51302. * @param {String} html
  51303. * @return {String}
  51304. */
  51305. function stripCommentTag(html) {
  51306. return html.replace(STRIP_COMMENT_TAG_REGEXP, "");
  51307. }
  51308. var STRIP_COMMENT_TAG_REGEXP = /<!--[\s\S]*?-->/g;
  51309. /**
  51310. * remove invisible characters
  51311. *
  51312. * @param {String} html
  51313. * @return {String}
  51314. */
  51315. function stripBlankChar(html) {
  51316. var chars = html.split("");
  51317. chars = chars.filter(function(char) {
  51318. var c = char.charCodeAt(0);
  51319. if (c === 127) return false;
  51320. if (c <= 31) {
  51321. if (c === 10 || c === 13) return true;
  51322. return false;
  51323. }
  51324. return true;
  51325. });
  51326. return chars.join("");
  51327. }
  51328. exports.whiteList = getDefaultWhiteList();
  51329. exports.getDefaultWhiteList = getDefaultWhiteList;
  51330. exports.onTag = onTag;
  51331. exports.onIgnoreTag = onIgnoreTag;
  51332. exports.onTagAttr = onTagAttr;
  51333. exports.onIgnoreTagAttr = onIgnoreTagAttr;
  51334. exports.safeAttrValue = safeAttrValue;
  51335. exports.escapeHtml = escapeHtml;
  51336. exports.escapeQuote = escapeQuote;
  51337. exports.unescapeQuote = unescapeQuote;
  51338. exports.escapeHtmlEntities = escapeHtmlEntities;
  51339. exports.escapeDangerHtml5Entities = escapeDangerHtml5Entities;
  51340. exports.clearNonPrintableCharacter = clearNonPrintableCharacter;
  51341. exports.friendlyAttrValue = friendlyAttrValue;
  51342. exports.escapeAttrValue = escapeAttrValue;
  51343. exports.onIgnoreTagStripAll = onIgnoreTagStripAll;
  51344. exports.StripTagBody = StripTagBody;
  51345. exports.stripCommentTag = stripCommentTag;
  51346. exports.stripBlankChar = stripBlankChar;
  51347. exports.cssFilter = defaultCSSFilter;
  51348. exports.getDefaultCSSWhiteList = getDefaultCSSWhiteList;
  51349. },{"./util":4,"cssfilter":8}],2:[function(require,module,exports){
  51350. /**
  51351. * xss
  51352. *
  51353. * @author Zongmin Lei<leizongmin@gmail.com>
  51354. */
  51355. var DEFAULT = require("./default");
  51356. var parser = require("./parser");
  51357. var FilterXSS = require("./xss");
  51358. /**
  51359. * filter xss function
  51360. *
  51361. * @param {String} html
  51362. * @param {Object} options { whiteList, onTag, onTagAttr, onIgnoreTag, onIgnoreTagAttr, safeAttrValue, escapeHtml }
  51363. * @return {String}
  51364. */
  51365. function filterXSS(html, options) {
  51366. var xss = new FilterXSS(options);
  51367. return xss.process(html);
  51368. }
  51369. exports = module.exports = filterXSS;
  51370. exports.FilterXSS = FilterXSS;
  51371. for (var i in DEFAULT) exports[i] = DEFAULT[i];
  51372. for (var i in parser) exports[i] = parser[i];
  51373. // using `xss` on the browser, output `filterXSS` to the globals
  51374. if (typeof window !== "undefined") {
  51375. window.filterXSS = module.exports;
  51376. }
  51377. },{"./default":1,"./parser":3,"./xss":5}],3:[function(require,module,exports){
  51378. /**
  51379. * Simple HTML Parser
  51380. *
  51381. * @author Zongmin Lei<leizongmin@gmail.com>
  51382. */
  51383. var _ = require("./util");
  51384. /**
  51385. * get tag name
  51386. *
  51387. * @param {String} html e.g. '<a hef="#">'
  51388. * @return {String}
  51389. */
  51390. function getTagName(html) {
  51391. var i = _.spaceIndex(html);
  51392. if (i === -1) {
  51393. var tagName = html.slice(1, -1);
  51394. } else {
  51395. var tagName = html.slice(1, i + 1);
  51396. }
  51397. tagName = _.trim(tagName).toLowerCase();
  51398. if (tagName.slice(0, 1) === "/") tagName = tagName.slice(1);
  51399. if (tagName.slice(-1) === "/") tagName = tagName.slice(0, -1);
  51400. return tagName;
  51401. }
  51402. /**
  51403. * is close tag?
  51404. *
  51405. * @param {String} html 如:'<a hef="#">'
  51406. * @return {Boolean}
  51407. */
  51408. function isClosing(html) {
  51409. return html.slice(0, 2) === "</";
  51410. }
  51411. /**
  51412. * parse input html and returns processed html
  51413. *
  51414. * @param {String} html
  51415. * @param {Function} onTag e.g. function (sourcePosition, position, tag, html, isClosing)
  51416. * @param {Function} escapeHtml
  51417. * @return {String}
  51418. */
  51419. function parseTag(html, onTag, escapeHtml) {
  51420. "user strict";
  51421. var rethtml = "";
  51422. var lastPos = 0;
  51423. var tagStart = false;
  51424. var quoteStart = false;
  51425. var currentPos = 0;
  51426. var len = html.length;
  51427. var currentTagName = "";
  51428. var currentHtml = "";
  51429. for (currentPos = 0; currentPos < len; currentPos++) {
  51430. var c = html.charAt(currentPos);
  51431. if (tagStart === false) {
  51432. if (c === "<") {
  51433. tagStart = currentPos;
  51434. continue;
  51435. }
  51436. } else {
  51437. if (quoteStart === false) {
  51438. if (c === "<") {
  51439. rethtml += escapeHtml(html.slice(lastPos, currentPos));
  51440. tagStart = currentPos;
  51441. lastPos = currentPos;
  51442. continue;
  51443. }
  51444. if (c === ">") {
  51445. rethtml += escapeHtml(html.slice(lastPos, tagStart));
  51446. currentHtml = html.slice(tagStart, currentPos + 1);
  51447. currentTagName = getTagName(currentHtml);
  51448. rethtml += onTag(
  51449. tagStart,
  51450. rethtml.length,
  51451. currentTagName,
  51452. currentHtml,
  51453. isClosing(currentHtml)
  51454. );
  51455. lastPos = currentPos + 1;
  51456. tagStart = false;
  51457. continue;
  51458. }
  51459. if ((c === '"' || c === "'") && html.charAt(currentPos - 1) === "=") {
  51460. quoteStart = c;
  51461. continue;
  51462. }
  51463. } else {
  51464. if (c === quoteStart) {
  51465. quoteStart = false;
  51466. continue;
  51467. }
  51468. }
  51469. }
  51470. }
  51471. if (lastPos < html.length) {
  51472. rethtml += escapeHtml(html.substr(lastPos));
  51473. }
  51474. return rethtml;
  51475. }
  51476. var REGEXP_ILLEGAL_ATTR_NAME = /[^a-zA-Z0-9_:\.\-]/gim;
  51477. /**
  51478. * parse input attributes and returns processed attributes
  51479. *
  51480. * @param {String} html e.g. `href="#" target="_blank"`
  51481. * @param {Function} onAttr e.g. `function (name, value)`
  51482. * @return {String}
  51483. */
  51484. function parseAttr(html, onAttr) {
  51485. "user strict";
  51486. var lastPos = 0;
  51487. var retAttrs = [];
  51488. var tmpName = false;
  51489. var len = html.length;
  51490. function addAttr(name, value) {
  51491. name = _.trim(name);
  51492. name = name.replace(REGEXP_ILLEGAL_ATTR_NAME, "").toLowerCase();
  51493. if (name.length < 1) return;
  51494. var ret = onAttr(name, value || "");
  51495. if (ret) retAttrs.push(ret);
  51496. }
  51497. // 逐个分析字符
  51498. for (var i = 0; i < len; i++) {
  51499. var c = html.charAt(i);
  51500. var v, j;
  51501. if (tmpName === false && c === "=") {
  51502. tmpName = html.slice(lastPos, i);
  51503. lastPos = i + 1;
  51504. continue;
  51505. }
  51506. if (tmpName !== false) {
  51507. if (
  51508. i === lastPos &&
  51509. (c === '"' || c === "'") &&
  51510. html.charAt(i - 1) === "="
  51511. ) {
  51512. j = html.indexOf(c, i + 1);
  51513. if (j === -1) {
  51514. break;
  51515. } else {
  51516. v = _.trim(html.slice(lastPos + 1, j));
  51517. addAttr(tmpName, v);
  51518. tmpName = false;
  51519. i = j;
  51520. lastPos = i + 1;
  51521. continue;
  51522. }
  51523. }
  51524. }
  51525. if (/\s|\n|\t/.test(c)) {
  51526. html = html.replace(/\s|\n|\t/g, " ");
  51527. if (tmpName === false) {
  51528. j = findNextEqual(html, i);
  51529. if (j === -1) {
  51530. v = _.trim(html.slice(lastPos, i));
  51531. addAttr(v);
  51532. tmpName = false;
  51533. lastPos = i + 1;
  51534. continue;
  51535. } else {
  51536. i = j - 1;
  51537. continue;
  51538. }
  51539. } else {
  51540. j = findBeforeEqual(html, i - 1);
  51541. if (j === -1) {
  51542. v = _.trim(html.slice(lastPos, i));
  51543. v = stripQuoteWrap(v);
  51544. addAttr(tmpName, v);
  51545. tmpName = false;
  51546. lastPos = i + 1;
  51547. continue;
  51548. } else {
  51549. continue;
  51550. }
  51551. }
  51552. }
  51553. }
  51554. if (lastPos < html.length) {
  51555. if (tmpName === false) {
  51556. addAttr(html.slice(lastPos));
  51557. } else {
  51558. addAttr(tmpName, stripQuoteWrap(_.trim(html.slice(lastPos))));
  51559. }
  51560. }
  51561. return _.trim(retAttrs.join(" "));
  51562. }
  51563. function findNextEqual(str, i) {
  51564. for (; i < str.length; i++) {
  51565. var c = str[i];
  51566. if (c === " ") continue;
  51567. if (c === "=") return i;
  51568. return -1;
  51569. }
  51570. }
  51571. function findBeforeEqual(str, i) {
  51572. for (; i > 0; i--) {
  51573. var c = str[i];
  51574. if (c === " ") continue;
  51575. if (c === "=") return i;
  51576. return -1;
  51577. }
  51578. }
  51579. function isQuoteWrapString(text) {
  51580. if (
  51581. (text[0] === '"' && text[text.length - 1] === '"') ||
  51582. (text[0] === "'" && text[text.length - 1] === "'")
  51583. ) {
  51584. return true;
  51585. } else {
  51586. return false;
  51587. }
  51588. }
  51589. function stripQuoteWrap(text) {
  51590. if (isQuoteWrapString(text)) {
  51591. return text.substr(1, text.length - 2);
  51592. } else {
  51593. return text;
  51594. }
  51595. }
  51596. exports.parseTag = parseTag;
  51597. exports.parseAttr = parseAttr;
  51598. },{"./util":4}],4:[function(require,module,exports){
  51599. module.exports = {
  51600. indexOf: function(arr, item) {
  51601. var i, j;
  51602. if (Array.prototype.indexOf) {
  51603. return arr.indexOf(item);
  51604. }
  51605. for (i = 0, j = arr.length; i < j; i++) {
  51606. if (arr[i] === item) {
  51607. return i;
  51608. }
  51609. }
  51610. return -1;
  51611. },
  51612. forEach: function(arr, fn, scope) {
  51613. var i, j;
  51614. if (Array.prototype.forEach) {
  51615. return arr.forEach(fn, scope);
  51616. }
  51617. for (i = 0, j = arr.length; i < j; i++) {
  51618. fn.call(scope, arr[i], i, arr);
  51619. }
  51620. },
  51621. trim: function(str) {
  51622. if (String.prototype.trim) {
  51623. return str.trim();
  51624. }
  51625. return str.replace(/(^\s*)|(\s*$)/g, "");
  51626. },
  51627. spaceIndex: function(str) {
  51628. var reg = /\s|\n|\t/;
  51629. var match = reg.exec(str);
  51630. return match ? match.index : -1;
  51631. }
  51632. };
  51633. },{}],5:[function(require,module,exports){
  51634. /**
  51635. * filter xss
  51636. *
  51637. * @author Zongmin Lei<leizongmin@gmail.com>
  51638. */
  51639. var FilterCSS = require("cssfilter").FilterCSS;
  51640. var DEFAULT = require("./default");
  51641. var parser = require("./parser");
  51642. var parseTag = parser.parseTag;
  51643. var parseAttr = parser.parseAttr;
  51644. var _ = require("./util");
  51645. /**
  51646. * returns `true` if the input value is `undefined` or `null`
  51647. *
  51648. * @param {Object} obj
  51649. * @return {Boolean}
  51650. */
  51651. function isNull(obj) {
  51652. return obj === undefined || obj === null;
  51653. }
  51654. /**
  51655. * get attributes for a tag
  51656. *
  51657. * @param {String} html
  51658. * @return {Object}
  51659. * - {String} html
  51660. * - {Boolean} closing
  51661. */
  51662. function getAttrs(html) {
  51663. var i = _.spaceIndex(html);
  51664. if (i === -1) {
  51665. return {
  51666. html: "",
  51667. closing: html[html.length - 2] === "/"
  51668. };
  51669. }
  51670. html = _.trim(html.slice(i + 1, -1));
  51671. var isClosing = html[html.length - 1] === "/";
  51672. if (isClosing) html = _.trim(html.slice(0, -1));
  51673. return {
  51674. html: html,
  51675. closing: isClosing
  51676. };
  51677. }
  51678. /**
  51679. * shallow copy
  51680. *
  51681. * @param {Object} obj
  51682. * @return {Object}
  51683. */
  51684. function shallowCopyObject(obj) {
  51685. var ret = {};
  51686. for (var i in obj) {
  51687. ret[i] = obj[i];
  51688. }
  51689. return ret;
  51690. }
  51691. /**
  51692. * FilterXSS class
  51693. *
  51694. * @param {Object} options
  51695. * whiteList, onTag, onTagAttr, onIgnoreTag,
  51696. * onIgnoreTagAttr, safeAttrValue, escapeHtml
  51697. * stripIgnoreTagBody, allowCommentTag, stripBlankChar
  51698. * css{whiteList, onAttr, onIgnoreAttr} `css=false` means don't use `cssfilter`
  51699. */
  51700. function FilterXSS(options) {
  51701. options = shallowCopyObject(options || {});
  51702. if (options.stripIgnoreTag) {
  51703. if (options.onIgnoreTag) {
  51704. console.error(
  51705. 'Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'
  51706. );
  51707. }
  51708. options.onIgnoreTag = DEFAULT.onIgnoreTagStripAll;
  51709. }
  51710. options.whiteList = options.whiteList || DEFAULT.whiteList;
  51711. options.onTag = options.onTag || DEFAULT.onTag;
  51712. options.onTagAttr = options.onTagAttr || DEFAULT.onTagAttr;
  51713. options.onIgnoreTag = options.onIgnoreTag || DEFAULT.onIgnoreTag;
  51714. options.onIgnoreTagAttr = options.onIgnoreTagAttr || DEFAULT.onIgnoreTagAttr;
  51715. options.safeAttrValue = options.safeAttrValue || DEFAULT.safeAttrValue;
  51716. options.escapeHtml = options.escapeHtml || DEFAULT.escapeHtml;
  51717. this.options = options;
  51718. if (options.css === false) {
  51719. this.cssFilter = false;
  51720. } else {
  51721. options.css = options.css || {};
  51722. this.cssFilter = new FilterCSS(options.css);
  51723. }
  51724. }
  51725. /**
  51726. * start process and returns result
  51727. *
  51728. * @param {String} html
  51729. * @return {String}
  51730. */
  51731. FilterXSS.prototype.process = function(html) {
  51732. // compatible with the input
  51733. html = html || "";
  51734. html = html.toString();
  51735. if (!html) return "";
  51736. var me = this;
  51737. var options = me.options;
  51738. var whiteList = options.whiteList;
  51739. var onTag = options.onTag;
  51740. var onIgnoreTag = options.onIgnoreTag;
  51741. var onTagAttr = options.onTagAttr;
  51742. var onIgnoreTagAttr = options.onIgnoreTagAttr;
  51743. var safeAttrValue = options.safeAttrValue;
  51744. var escapeHtml = options.escapeHtml;
  51745. var cssFilter = me.cssFilter;
  51746. // remove invisible characters
  51747. if (options.stripBlankChar) {
  51748. html = DEFAULT.stripBlankChar(html);
  51749. }
  51750. // remove html comments
  51751. if (!options.allowCommentTag) {
  51752. html = DEFAULT.stripCommentTag(html);
  51753. }
  51754. // if enable stripIgnoreTagBody
  51755. var stripIgnoreTagBody = false;
  51756. if (options.stripIgnoreTagBody) {
  51757. var stripIgnoreTagBody = DEFAULT.StripTagBody(
  51758. options.stripIgnoreTagBody,
  51759. onIgnoreTag
  51760. );
  51761. onIgnoreTag = stripIgnoreTagBody.onIgnoreTag;
  51762. }
  51763. var retHtml = parseTag(
  51764. html,
  51765. function(sourcePosition, position, tag, html, isClosing) {
  51766. var info = {
  51767. sourcePosition: sourcePosition,
  51768. position: position,
  51769. isClosing: isClosing,
  51770. isWhite: whiteList.hasOwnProperty(tag)
  51771. };
  51772. // call `onTag()`
  51773. var ret = onTag(tag, html, info);
  51774. if (!isNull(ret)) return ret;
  51775. if (info.isWhite) {
  51776. if (info.isClosing) {
  51777. return "</" + tag + ">";
  51778. }
  51779. var attrs = getAttrs(html);
  51780. var whiteAttrList = whiteList[tag];
  51781. var attrsHtml = parseAttr(attrs.html, function(name, value) {
  51782. // call `onTagAttr()`
  51783. var isWhiteAttr = _.indexOf(whiteAttrList, name) !== -1;
  51784. var ret = onTagAttr(tag, name, value, isWhiteAttr);
  51785. if (!isNull(ret)) return ret;
  51786. if (isWhiteAttr) {
  51787. // call `safeAttrValue()`
  51788. value = safeAttrValue(tag, name, value, cssFilter);
  51789. if (value) {
  51790. return name + '="' + value + '"';
  51791. } else {
  51792. return name;
  51793. }
  51794. } else {
  51795. // call `onIgnoreTagAttr()`
  51796. var ret = onIgnoreTagAttr(tag, name, value, isWhiteAttr);
  51797. if (!isNull(ret)) return ret;
  51798. return;
  51799. }
  51800. });
  51801. // build new tag html
  51802. var html = "<" + tag;
  51803. if (attrsHtml) html += " " + attrsHtml;
  51804. if (attrs.closing) html += " /";
  51805. html += ">";
  51806. return html;
  51807. } else {
  51808. // call `onIgnoreTag()`
  51809. var ret = onIgnoreTag(tag, html, info);
  51810. if (!isNull(ret)) return ret;
  51811. return escapeHtml(html);
  51812. }
  51813. },
  51814. escapeHtml
  51815. );
  51816. // if enable stripIgnoreTagBody
  51817. if (stripIgnoreTagBody) {
  51818. retHtml = stripIgnoreTagBody.remove(retHtml);
  51819. }
  51820. return retHtml;
  51821. };
  51822. module.exports = FilterXSS;
  51823. },{"./default":1,"./parser":3,"./util":4,"cssfilter":8}],6:[function(require,module,exports){
  51824. /**
  51825. * cssfilter
  51826. *
  51827. * @author 老雷<leizongmin@gmail.com>
  51828. */
  51829. var DEFAULT = require('./default');
  51830. var parseStyle = require('./parser');
  51831. var _ = require('./util');
  51832. /**
  51833. * 返回值是否为空
  51834. *
  51835. * @param {Object} obj
  51836. * @return {Boolean}
  51837. */
  51838. function isNull (obj) {
  51839. return (obj === undefined || obj === null);
  51840. }
  51841. /**
  51842. * 浅拷贝对象
  51843. *
  51844. * @param {Object} obj
  51845. * @return {Object}
  51846. */
  51847. function shallowCopyObject (obj) {
  51848. var ret = {};
  51849. for (var i in obj) {
  51850. ret[i] = obj[i];
  51851. }
  51852. return ret;
  51853. }
  51854. /**
  51855. * 创建CSS过滤器
  51856. *
  51857. * @param {Object} options
  51858. * - {Object} whiteList
  51859. * - {Function} onAttr
  51860. * - {Function} onIgnoreAttr
  51861. * - {Function} safeAttrValue
  51862. */
  51863. function FilterCSS (options) {
  51864. options = shallowCopyObject(options || {});
  51865. options.whiteList = options.whiteList || DEFAULT.whiteList;
  51866. options.onAttr = options.onAttr || DEFAULT.onAttr;
  51867. options.onIgnoreAttr = options.onIgnoreAttr || DEFAULT.onIgnoreAttr;
  51868. options.safeAttrValue = options.safeAttrValue || DEFAULT.safeAttrValue;
  51869. this.options = options;
  51870. }
  51871. FilterCSS.prototype.process = function (css) {
  51872. // 兼容各种奇葩输入
  51873. css = css || '';
  51874. css = css.toString();
  51875. if (!css) return '';
  51876. var me = this;
  51877. var options = me.options;
  51878. var whiteList = options.whiteList;
  51879. var onAttr = options.onAttr;
  51880. var onIgnoreAttr = options.onIgnoreAttr;
  51881. var safeAttrValue = options.safeAttrValue;
  51882. var retCSS = parseStyle(css, function (sourcePosition, position, name, value, source) {
  51883. var check = whiteList[name];
  51884. var isWhite = false;
  51885. if (check === true) isWhite = check;
  51886. else if (typeof check === 'function') isWhite = check(value);
  51887. else if (check instanceof RegExp) isWhite = check.test(value);
  51888. if (isWhite !== true) isWhite = false;
  51889. // 如果过滤后 value 为空则直接忽略
  51890. value = safeAttrValue(name, value);
  51891. if (!value) return;
  51892. var opts = {
  51893. position: position,
  51894. sourcePosition: sourcePosition,
  51895. source: source,
  51896. isWhite: isWhite
  51897. };
  51898. if (isWhite) {
  51899. var ret = onAttr(name, value, opts);
  51900. if (isNull(ret)) {
  51901. return name + ':' + value;
  51902. } else {
  51903. return ret;
  51904. }
  51905. } else {
  51906. var ret = onIgnoreAttr(name, value, opts);
  51907. if (!isNull(ret)) {
  51908. return ret;
  51909. }
  51910. }
  51911. });
  51912. return retCSS;
  51913. };
  51914. module.exports = FilterCSS;
  51915. },{"./default":7,"./parser":9,"./util":10}],7:[function(require,module,exports){
  51916. /**
  51917. * cssfilter
  51918. *
  51919. * @author 老雷<leizongmin@gmail.com>
  51920. */
  51921. function getDefaultWhiteList () {
  51922. // 白名单值说明:
  51923. // true: 允许该属性
  51924. // Function: function (val) { } 返回true表示允许该属性,其他值均表示不允许
  51925. // RegExp: regexp.test(val) 返回true表示允许该属性,其他值均表示不允许
  51926. // 除上面列出的值外均表示不允许
  51927. var whiteList = {};
  51928. whiteList['align-content'] = false; // default: auto
  51929. whiteList['align-items'] = false; // default: auto
  51930. whiteList['align-self'] = false; // default: auto
  51931. whiteList['alignment-adjust'] = false; // default: auto
  51932. whiteList['alignment-baseline'] = false; // default: baseline
  51933. whiteList['all'] = false; // default: depending on individual properties
  51934. whiteList['anchor-point'] = false; // default: none
  51935. whiteList['animation'] = false; // default: depending on individual properties
  51936. whiteList['animation-delay'] = false; // default: 0
  51937. whiteList['animation-direction'] = false; // default: normal
  51938. whiteList['animation-duration'] = false; // default: 0
  51939. whiteList['animation-fill-mode'] = false; // default: none
  51940. whiteList['animation-iteration-count'] = false; // default: 1
  51941. whiteList['animation-name'] = false; // default: none
  51942. whiteList['animation-play-state'] = false; // default: running
  51943. whiteList['animation-timing-function'] = false; // default: ease
  51944. whiteList['azimuth'] = false; // default: center
  51945. whiteList['backface-visibility'] = false; // default: visible
  51946. whiteList['background'] = true; // default: depending on individual properties
  51947. whiteList['background-attachment'] = true; // default: scroll
  51948. whiteList['background-clip'] = true; // default: border-box
  51949. whiteList['background-color'] = true; // default: transparent
  51950. whiteList['background-image'] = true; // default: none
  51951. whiteList['background-origin'] = true; // default: padding-box
  51952. whiteList['background-position'] = true; // default: 0% 0%
  51953. whiteList['background-repeat'] = true; // default: repeat
  51954. whiteList['background-size'] = true; // default: auto
  51955. whiteList['baseline-shift'] = false; // default: baseline
  51956. whiteList['binding'] = false; // default: none
  51957. whiteList['bleed'] = false; // default: 6pt
  51958. whiteList['bookmark-label'] = false; // default: content()
  51959. whiteList['bookmark-level'] = false; // default: none
  51960. whiteList['bookmark-state'] = false; // default: open
  51961. whiteList['border'] = true; // default: depending on individual properties
  51962. whiteList['border-bottom'] = true; // default: depending on individual properties
  51963. whiteList['border-bottom-color'] = true; // default: current color
  51964. whiteList['border-bottom-left-radius'] = true; // default: 0
  51965. whiteList['border-bottom-right-radius'] = true; // default: 0
  51966. whiteList['border-bottom-style'] = true; // default: none
  51967. whiteList['border-bottom-width'] = true; // default: medium
  51968. whiteList['border-collapse'] = true; // default: separate
  51969. whiteList['border-color'] = true; // default: depending on individual properties
  51970. whiteList['border-image'] = true; // default: none
  51971. whiteList['border-image-outset'] = true; // default: 0
  51972. whiteList['border-image-repeat'] = true; // default: stretch
  51973. whiteList['border-image-slice'] = true; // default: 100%
  51974. whiteList['border-image-source'] = true; // default: none
  51975. whiteList['border-image-width'] = true; // default: 1
  51976. whiteList['border-left'] = true; // default: depending on individual properties
  51977. whiteList['border-left-color'] = true; // default: current color
  51978. whiteList['border-left-style'] = true; // default: none
  51979. whiteList['border-left-width'] = true; // default: medium
  51980. whiteList['border-radius'] = true; // default: 0
  51981. whiteList['border-right'] = true; // default: depending on individual properties
  51982. whiteList['border-right-color'] = true; // default: current color
  51983. whiteList['border-right-style'] = true; // default: none
  51984. whiteList['border-right-width'] = true; // default: medium
  51985. whiteList['border-spacing'] = true; // default: 0
  51986. whiteList['border-style'] = true; // default: depending on individual properties
  51987. whiteList['border-top'] = true; // default: depending on individual properties
  51988. whiteList['border-top-color'] = true; // default: current color
  51989. whiteList['border-top-left-radius'] = true; // default: 0
  51990. whiteList['border-top-right-radius'] = true; // default: 0
  51991. whiteList['border-top-style'] = true; // default: none
  51992. whiteList['border-top-width'] = true; // default: medium
  51993. whiteList['border-width'] = true; // default: depending on individual properties
  51994. whiteList['bottom'] = false; // default: auto
  51995. whiteList['box-decoration-break'] = true; // default: slice
  51996. whiteList['box-shadow'] = true; // default: none
  51997. whiteList['box-sizing'] = true; // default: content-box
  51998. whiteList['box-snap'] = true; // default: none
  51999. whiteList['box-suppress'] = true; // default: show
  52000. whiteList['break-after'] = true; // default: auto
  52001. whiteList['break-before'] = true; // default: auto
  52002. whiteList['break-inside'] = true; // default: auto
  52003. whiteList['caption-side'] = false; // default: top
  52004. whiteList['chains'] = false; // default: none
  52005. whiteList['clear'] = true; // default: none
  52006. whiteList['clip'] = false; // default: auto
  52007. whiteList['clip-path'] = false; // default: none
  52008. whiteList['clip-rule'] = false; // default: nonzero
  52009. whiteList['color'] = true; // default: implementation dependent
  52010. whiteList['color-interpolation-filters'] = true; // default: auto
  52011. whiteList['column-count'] = false; // default: auto
  52012. whiteList['column-fill'] = false; // default: balance
  52013. whiteList['column-gap'] = false; // default: normal
  52014. whiteList['column-rule'] = false; // default: depending on individual properties
  52015. whiteList['column-rule-color'] = false; // default: current color
  52016. whiteList['column-rule-style'] = false; // default: medium
  52017. whiteList['column-rule-width'] = false; // default: medium
  52018. whiteList['column-span'] = false; // default: none
  52019. whiteList['column-width'] = false; // default: auto
  52020. whiteList['columns'] = false; // default: depending on individual properties
  52021. whiteList['contain'] = false; // default: none
  52022. whiteList['content'] = false; // default: normal
  52023. whiteList['counter-increment'] = false; // default: none
  52024. whiteList['counter-reset'] = false; // default: none
  52025. whiteList['counter-set'] = false; // default: none
  52026. whiteList['crop'] = false; // default: auto
  52027. whiteList['cue'] = false; // default: depending on individual properties
  52028. whiteList['cue-after'] = false; // default: none
  52029. whiteList['cue-before'] = false; // default: none
  52030. whiteList['cursor'] = false; // default: auto
  52031. whiteList['direction'] = false; // default: ltr
  52032. whiteList['display'] = true; // default: depending on individual properties
  52033. whiteList['display-inside'] = true; // default: auto
  52034. whiteList['display-list'] = true; // default: none
  52035. whiteList['display-outside'] = true; // default: inline-level
  52036. whiteList['dominant-baseline'] = false; // default: auto
  52037. whiteList['elevation'] = false; // default: level
  52038. whiteList['empty-cells'] = false; // default: show
  52039. whiteList['filter'] = false; // default: none
  52040. whiteList['flex'] = false; // default: depending on individual properties
  52041. whiteList['flex-basis'] = false; // default: auto
  52042. whiteList['flex-direction'] = false; // default: row
  52043. whiteList['flex-flow'] = false; // default: depending on individual properties
  52044. whiteList['flex-grow'] = false; // default: 0
  52045. whiteList['flex-shrink'] = false; // default: 1
  52046. whiteList['flex-wrap'] = false; // default: nowrap
  52047. whiteList['float'] = false; // default: none
  52048. whiteList['float-offset'] = false; // default: 0 0
  52049. whiteList['flood-color'] = false; // default: black
  52050. whiteList['flood-opacity'] = false; // default: 1
  52051. whiteList['flow-from'] = false; // default: none
  52052. whiteList['flow-into'] = false; // default: none
  52053. whiteList['font'] = true; // default: depending on individual properties
  52054. whiteList['font-family'] = true; // default: implementation dependent
  52055. whiteList['font-feature-settings'] = true; // default: normal
  52056. whiteList['font-kerning'] = true; // default: auto
  52057. whiteList['font-language-override'] = true; // default: normal
  52058. whiteList['font-size'] = true; // default: medium
  52059. whiteList['font-size-adjust'] = true; // default: none
  52060. whiteList['font-stretch'] = true; // default: normal
  52061. whiteList['font-style'] = true; // default: normal
  52062. whiteList['font-synthesis'] = true; // default: weight style
  52063. whiteList['font-variant'] = true; // default: normal
  52064. whiteList['font-variant-alternates'] = true; // default: normal
  52065. whiteList['font-variant-caps'] = true; // default: normal
  52066. whiteList['font-variant-east-asian'] = true; // default: normal
  52067. whiteList['font-variant-ligatures'] = true; // default: normal
  52068. whiteList['font-variant-numeric'] = true; // default: normal
  52069. whiteList['font-variant-position'] = true; // default: normal
  52070. whiteList['font-weight'] = true; // default: normal
  52071. whiteList['grid'] = false; // default: depending on individual properties
  52072. whiteList['grid-area'] = false; // default: depending on individual properties
  52073. whiteList['grid-auto-columns'] = false; // default: auto
  52074. whiteList['grid-auto-flow'] = false; // default: none
  52075. whiteList['grid-auto-rows'] = false; // default: auto
  52076. whiteList['grid-column'] = false; // default: depending on individual properties
  52077. whiteList['grid-column-end'] = false; // default: auto
  52078. whiteList['grid-column-start'] = false; // default: auto
  52079. whiteList['grid-row'] = false; // default: depending on individual properties
  52080. whiteList['grid-row-end'] = false; // default: auto
  52081. whiteList['grid-row-start'] = false; // default: auto
  52082. whiteList['grid-template'] = false; // default: depending on individual properties
  52083. whiteList['grid-template-areas'] = false; // default: none
  52084. whiteList['grid-template-columns'] = false; // default: none
  52085. whiteList['grid-template-rows'] = false; // default: none
  52086. whiteList['hanging-punctuation'] = false; // default: none
  52087. whiteList['height'] = true; // default: auto
  52088. whiteList['hyphens'] = false; // default: manual
  52089. whiteList['icon'] = false; // default: auto
  52090. whiteList['image-orientation'] = false; // default: auto
  52091. whiteList['image-resolution'] = false; // default: normal
  52092. whiteList['ime-mode'] = false; // default: auto
  52093. whiteList['initial-letters'] = false; // default: normal
  52094. whiteList['inline-box-align'] = false; // default: last
  52095. whiteList['justify-content'] = false; // default: auto
  52096. whiteList['justify-items'] = false; // default: auto
  52097. whiteList['justify-self'] = false; // default: auto
  52098. whiteList['left'] = false; // default: auto
  52099. whiteList['letter-spacing'] = true; // default: normal
  52100. whiteList['lighting-color'] = true; // default: white
  52101. whiteList['line-box-contain'] = false; // default: block inline replaced
  52102. whiteList['line-break'] = false; // default: auto
  52103. whiteList['line-grid'] = false; // default: match-parent
  52104. whiteList['line-height'] = false; // default: normal
  52105. whiteList['line-snap'] = false; // default: none
  52106. whiteList['line-stacking'] = false; // default: depending on individual properties
  52107. whiteList['line-stacking-ruby'] = false; // default: exclude-ruby
  52108. whiteList['line-stacking-shift'] = false; // default: consider-shifts
  52109. whiteList['line-stacking-strategy'] = false; // default: inline-line-height
  52110. whiteList['list-style'] = true; // default: depending on individual properties
  52111. whiteList['list-style-image'] = true; // default: none
  52112. whiteList['list-style-position'] = true; // default: outside
  52113. whiteList['list-style-type'] = true; // default: disc
  52114. whiteList['margin'] = true; // default: depending on individual properties
  52115. whiteList['margin-bottom'] = true; // default: 0
  52116. whiteList['margin-left'] = true; // default: 0
  52117. whiteList['margin-right'] = true; // default: 0
  52118. whiteList['margin-top'] = true; // default: 0
  52119. whiteList['marker-offset'] = false; // default: auto
  52120. whiteList['marker-side'] = false; // default: list-item
  52121. whiteList['marks'] = false; // default: none
  52122. whiteList['mask'] = false; // default: border-box
  52123. whiteList['mask-box'] = false; // default: see individual properties
  52124. whiteList['mask-box-outset'] = false; // default: 0
  52125. whiteList['mask-box-repeat'] = false; // default: stretch
  52126. whiteList['mask-box-slice'] = false; // default: 0 fill
  52127. whiteList['mask-box-source'] = false; // default: none
  52128. whiteList['mask-box-width'] = false; // default: auto
  52129. whiteList['mask-clip'] = false; // default: border-box
  52130. whiteList['mask-image'] = false; // default: none
  52131. whiteList['mask-origin'] = false; // default: border-box
  52132. whiteList['mask-position'] = false; // default: center
  52133. whiteList['mask-repeat'] = false; // default: no-repeat
  52134. whiteList['mask-size'] = false; // default: border-box
  52135. whiteList['mask-source-type'] = false; // default: auto
  52136. whiteList['mask-type'] = false; // default: luminance
  52137. whiteList['max-height'] = true; // default: none
  52138. whiteList['max-lines'] = false; // default: none
  52139. whiteList['max-width'] = true; // default: none
  52140. whiteList['min-height'] = true; // default: 0
  52141. whiteList['min-width'] = true; // default: 0
  52142. whiteList['move-to'] = false; // default: normal
  52143. whiteList['nav-down'] = false; // default: auto
  52144. whiteList['nav-index'] = false; // default: auto
  52145. whiteList['nav-left'] = false; // default: auto
  52146. whiteList['nav-right'] = false; // default: auto
  52147. whiteList['nav-up'] = false; // default: auto
  52148. whiteList['object-fit'] = false; // default: fill
  52149. whiteList['object-position'] = false; // default: 50% 50%
  52150. whiteList['opacity'] = false; // default: 1
  52151. whiteList['order'] = false; // default: 0
  52152. whiteList['orphans'] = false; // default: 2
  52153. whiteList['outline'] = false; // default: depending on individual properties
  52154. whiteList['outline-color'] = false; // default: invert
  52155. whiteList['outline-offset'] = false; // default: 0
  52156. whiteList['outline-style'] = false; // default: none
  52157. whiteList['outline-width'] = false; // default: medium
  52158. whiteList['overflow'] = false; // default: depending on individual properties
  52159. whiteList['overflow-wrap'] = false; // default: normal
  52160. whiteList['overflow-x'] = false; // default: visible
  52161. whiteList['overflow-y'] = false; // default: visible
  52162. whiteList['padding'] = true; // default: depending on individual properties
  52163. whiteList['padding-bottom'] = true; // default: 0
  52164. whiteList['padding-left'] = true; // default: 0
  52165. whiteList['padding-right'] = true; // default: 0
  52166. whiteList['padding-top'] = true; // default: 0
  52167. whiteList['page'] = false; // default: auto
  52168. whiteList['page-break-after'] = false; // default: auto
  52169. whiteList['page-break-before'] = false; // default: auto
  52170. whiteList['page-break-inside'] = false; // default: auto
  52171. whiteList['page-policy'] = false; // default: start
  52172. whiteList['pause'] = false; // default: implementation dependent
  52173. whiteList['pause-after'] = false; // default: implementation dependent
  52174. whiteList['pause-before'] = false; // default: implementation dependent
  52175. whiteList['perspective'] = false; // default: none
  52176. whiteList['perspective-origin'] = false; // default: 50% 50%
  52177. whiteList['pitch'] = false; // default: medium
  52178. whiteList['pitch-range'] = false; // default: 50
  52179. whiteList['play-during'] = false; // default: auto
  52180. whiteList['position'] = false; // default: static
  52181. whiteList['presentation-level'] = false; // default: 0
  52182. whiteList['quotes'] = false; // default: text
  52183. whiteList['region-fragment'] = false; // default: auto
  52184. whiteList['resize'] = false; // default: none
  52185. whiteList['rest'] = false; // default: depending on individual properties
  52186. whiteList['rest-after'] = false; // default: none
  52187. whiteList['rest-before'] = false; // default: none
  52188. whiteList['richness'] = false; // default: 50
  52189. whiteList['right'] = false; // default: auto
  52190. whiteList['rotation'] = false; // default: 0
  52191. whiteList['rotation-point'] = false; // default: 50% 50%
  52192. whiteList['ruby-align'] = false; // default: auto
  52193. whiteList['ruby-merge'] = false; // default: separate
  52194. whiteList['ruby-position'] = false; // default: before
  52195. whiteList['shape-image-threshold'] = false; // default: 0.0
  52196. whiteList['shape-outside'] = false; // default: none
  52197. whiteList['shape-margin'] = false; // default: 0
  52198. whiteList['size'] = false; // default: auto
  52199. whiteList['speak'] = false; // default: auto
  52200. whiteList['speak-as'] = false; // default: normal
  52201. whiteList['speak-header'] = false; // default: once
  52202. whiteList['speak-numeral'] = false; // default: continuous
  52203. whiteList['speak-punctuation'] = false; // default: none
  52204. whiteList['speech-rate'] = false; // default: medium
  52205. whiteList['stress'] = false; // default: 50
  52206. whiteList['string-set'] = false; // default: none
  52207. whiteList['tab-size'] = false; // default: 8
  52208. whiteList['table-layout'] = false; // default: auto
  52209. whiteList['text-align'] = true; // default: start
  52210. whiteList['text-align-last'] = true; // default: auto
  52211. whiteList['text-combine-upright'] = true; // default: none
  52212. whiteList['text-decoration'] = true; // default: none
  52213. whiteList['text-decoration-color'] = true; // default: currentColor
  52214. whiteList['text-decoration-line'] = true; // default: none
  52215. whiteList['text-decoration-skip'] = true; // default: objects
  52216. whiteList['text-decoration-style'] = true; // default: solid
  52217. whiteList['text-emphasis'] = true; // default: depending on individual properties
  52218. whiteList['text-emphasis-color'] = true; // default: currentColor
  52219. whiteList['text-emphasis-position'] = true; // default: over right
  52220. whiteList['text-emphasis-style'] = true; // default: none
  52221. whiteList['text-height'] = true; // default: auto
  52222. whiteList['text-indent'] = true; // default: 0
  52223. whiteList['text-justify'] = true; // default: auto
  52224. whiteList['text-orientation'] = true; // default: mixed
  52225. whiteList['text-overflow'] = true; // default: clip
  52226. whiteList['text-shadow'] = true; // default: none
  52227. whiteList['text-space-collapse'] = true; // default: collapse
  52228. whiteList['text-transform'] = true; // default: none
  52229. whiteList['text-underline-position'] = true; // default: auto
  52230. whiteList['text-wrap'] = true; // default: normal
  52231. whiteList['top'] = false; // default: auto
  52232. whiteList['transform'] = false; // default: none
  52233. whiteList['transform-origin'] = false; // default: 50% 50% 0
  52234. whiteList['transform-style'] = false; // default: flat
  52235. whiteList['transition'] = false; // default: depending on individual properties
  52236. whiteList['transition-delay'] = false; // default: 0s
  52237. whiteList['transition-duration'] = false; // default: 0s
  52238. whiteList['transition-property'] = false; // default: all
  52239. whiteList['transition-timing-function'] = false; // default: ease
  52240. whiteList['unicode-bidi'] = false; // default: normal
  52241. whiteList['vertical-align'] = false; // default: baseline
  52242. whiteList['visibility'] = false; // default: visible
  52243. whiteList['voice-balance'] = false; // default: center
  52244. whiteList['voice-duration'] = false; // default: auto
  52245. whiteList['voice-family'] = false; // default: implementation dependent
  52246. whiteList['voice-pitch'] = false; // default: medium
  52247. whiteList['voice-range'] = false; // default: medium
  52248. whiteList['voice-rate'] = false; // default: normal
  52249. whiteList['voice-stress'] = false; // default: normal
  52250. whiteList['voice-volume'] = false; // default: medium
  52251. whiteList['volume'] = false; // default: medium
  52252. whiteList['white-space'] = false; // default: normal
  52253. whiteList['widows'] = false; // default: 2
  52254. whiteList['width'] = true; // default: auto
  52255. whiteList['will-change'] = false; // default: auto
  52256. whiteList['word-break'] = true; // default: normal
  52257. whiteList['word-spacing'] = true; // default: normal
  52258. whiteList['word-wrap'] = true; // default: normal
  52259. whiteList['wrap-flow'] = false; // default: auto
  52260. whiteList['wrap-through'] = false; // default: wrap
  52261. whiteList['writing-mode'] = false; // default: horizontal-tb
  52262. whiteList['z-index'] = false; // default: auto
  52263. return whiteList;
  52264. }
  52265. /**
  52266. * 匹配到白名单上的一个属性时
  52267. *
  52268. * @param {String} name
  52269. * @param {String} value
  52270. * @param {Object} options
  52271. * @return {String}
  52272. */
  52273. function onAttr (name, value, options) {
  52274. // do nothing
  52275. }
  52276. /**
  52277. * 匹配到不在白名单上的一个属性时
  52278. *
  52279. * @param {String} name
  52280. * @param {String} value
  52281. * @param {Object} options
  52282. * @return {String}
  52283. */
  52284. function onIgnoreAttr (name, value, options) {
  52285. // do nothing
  52286. }
  52287. var REGEXP_URL_JAVASCRIPT = /javascript\s*\:/img;
  52288. /**
  52289. * 过滤属性值
  52290. *
  52291. * @param {String} name
  52292. * @param {String} value
  52293. * @return {String}
  52294. */
  52295. function safeAttrValue(name, value) {
  52296. if (REGEXP_URL_JAVASCRIPT.test(value)) return '';
  52297. return value;
  52298. }
  52299. exports.whiteList = getDefaultWhiteList();
  52300. exports.getDefaultWhiteList = getDefaultWhiteList;
  52301. exports.onAttr = onAttr;
  52302. exports.onIgnoreAttr = onIgnoreAttr;
  52303. exports.safeAttrValue = safeAttrValue;
  52304. },{}],8:[function(require,module,exports){
  52305. /**
  52306. * cssfilter
  52307. *
  52308. * @author 老雷<leizongmin@gmail.com>
  52309. */
  52310. var DEFAULT = require('./default');
  52311. var FilterCSS = require('./css');
  52312. /**
  52313. * XSS过滤
  52314. *
  52315. * @param {String} css 要过滤的CSS代码
  52316. * @param {Object} options 选项:whiteList, onAttr, onIgnoreAttr
  52317. * @return {String}
  52318. */
  52319. function filterCSS (html, options) {
  52320. var xss = new FilterCSS(options);
  52321. return xss.process(html);
  52322. }
  52323. // 输出
  52324. exports = module.exports = filterCSS;
  52325. exports.FilterCSS = FilterCSS;
  52326. for (var i in DEFAULT) exports[i] = DEFAULT[i];
  52327. // 在浏览器端使用
  52328. if (typeof window !== 'undefined') {
  52329. window.filterCSS = module.exports;
  52330. }
  52331. },{"./css":6,"./default":7}],9:[function(require,module,exports){
  52332. /**
  52333. * cssfilter
  52334. *
  52335. * @author 老雷<leizongmin@gmail.com>
  52336. */
  52337. var _ = require('./util');
  52338. /**
  52339. * 解析style
  52340. *
  52341. * @param {String} css
  52342. * @param {Function} onAttr 处理属性的函数
  52343. * 参数格式: function (sourcePosition, position, name, value, source)
  52344. * @return {String}
  52345. */
  52346. function parseStyle (css, onAttr) {
  52347. css = _.trimRight(css);
  52348. if (css[css.length - 1] !== ';') css += ';';
  52349. var cssLength = css.length;
  52350. var isParenthesisOpen = false;
  52351. var lastPos = 0;
  52352. var i = 0;
  52353. var retCSS = '';
  52354. function addNewAttr () {
  52355. // 如果没有正常的闭合圆括号,则直接忽略当前属性
  52356. if (!isParenthesisOpen) {
  52357. var source = _.trim(css.slice(lastPos, i));
  52358. var j = source.indexOf(':');
  52359. if (j !== -1) {
  52360. var name = _.trim(source.slice(0, j));
  52361. var value = _.trim(source.slice(j + 1));
  52362. // 必须有属性名称
  52363. if (name) {
  52364. var ret = onAttr(lastPos, retCSS.length, name, value, source);
  52365. if (ret) retCSS += ret + '; ';
  52366. }
  52367. }
  52368. }
  52369. lastPos = i + 1;
  52370. }
  52371. for (; i < cssLength; i++) {
  52372. var c = css[i];
  52373. if (c === '/' && css[i + 1] === '*') {
  52374. // 备注开始
  52375. var j = css.indexOf('*/', i + 2);
  52376. // 如果没有正常的备注结束,则后面的部分全部跳过
  52377. if (j === -1) break;
  52378. // 直接将当前位置调到备注结尾,并且初始化状态
  52379. i = j + 1;
  52380. lastPos = i + 1;
  52381. isParenthesisOpen = false;
  52382. } else if (c === '(') {
  52383. isParenthesisOpen = true;
  52384. } else if (c === ')') {
  52385. isParenthesisOpen = false;
  52386. } else if (c === ';') {
  52387. if (isParenthesisOpen) {
  52388. // 在圆括号里面,忽略
  52389. } else {
  52390. addNewAttr();
  52391. }
  52392. } else if (c === '\n') {
  52393. addNewAttr();
  52394. }
  52395. }
  52396. return _.trim(retCSS);
  52397. }
  52398. module.exports = parseStyle;
  52399. },{"./util":10}],10:[function(require,module,exports){
  52400. module.exports = {
  52401. indexOf: function (arr, item) {
  52402. var i, j;
  52403. if (Array.prototype.indexOf) {
  52404. return arr.indexOf(item);
  52405. }
  52406. for (i = 0, j = arr.length; i < j; i++) {
  52407. if (arr[i] === item) {
  52408. return i;
  52409. }
  52410. }
  52411. return -1;
  52412. },
  52413. forEach: function (arr, fn, scope) {
  52414. var i, j;
  52415. if (Array.prototype.forEach) {
  52416. return arr.forEach(fn, scope);
  52417. }
  52418. for (i = 0, j = arr.length; i < j; i++) {
  52419. fn.call(scope, arr[i], i, arr);
  52420. }
  52421. },
  52422. trim: function (str) {
  52423. if (String.prototype.trim) {
  52424. return str.trim();
  52425. }
  52426. return str.replace(/(^\s*)|(\s*$)/g, '');
  52427. },
  52428. trimRight: function (str) {
  52429. if (String.prototype.trimRight) {
  52430. return str.trimRight();
  52431. }
  52432. return str.replace(/(\s*$)/g, '');
  52433. }
  52434. };
  52435. },{}]},{},[2]);
  52436. /*** EXPORTS FROM exports-loader ***/
  52437. exports["filterXSS"] = (filterXSS);
  52438. exports["filterCSS"] = (filterCSS);
  52439. /***/ }),
  52440. /***/ "./src/backbone.noconflict.js":
  52441. /*!************************************!*\
  52442. !*** ./src/backbone.noconflict.js ***!
  52443. \************************************/
  52444. /*! no static exports found */
  52445. /***/ (function(module, exports, __webpack_require__) {
  52446. "use strict";
  52447. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  52448. /*global define */
  52449. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! backbone */ "./node_modules/backbone/backbone.js")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (Backbone) {
  52450. return Backbone.noConflict();
  52451. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  52452. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  52453. /***/ }),
  52454. /***/ "./src/converse-autocomplete.js":
  52455. /*!**************************************!*\
  52456. !*** ./src/converse-autocomplete.js ***!
  52457. \**************************************/
  52458. /*! no static exports found */
  52459. /***/ (function(module, exports, __webpack_require__) {
  52460. "use strict";
  52461. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  52462. // Converse.js
  52463. // http://conversejs.org
  52464. //
  52465. // Copyright (c) 2013-2018, the Converse.js developers
  52466. // Licensed under the Mozilla Public License (MPLv2)
  52467. // This plugin started as a fork of Lea Verou's Awesomplete
  52468. // https://leaverou.github.io/awesomplete/
  52469. (function (root, factory) {
  52470. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  52471. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  52472. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  52473. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  52474. })(void 0, function (converse) {
  52475. const _converse$env = converse.env,
  52476. _ = _converse$env._,
  52477. Backbone = _converse$env.Backbone,
  52478. u = converse.env.utils;
  52479. converse.plugins.add("converse-autocomplete", {
  52480. initialize() {
  52481. const _converse = this._converse;
  52482. _converse.FILTER_CONTAINS = function (text, input) {
  52483. return RegExp(helpers.regExpEscape(input.trim()), "i").test(text);
  52484. };
  52485. _converse.FILTER_STARTSWITH = function (text, input) {
  52486. return RegExp("^" + helpers.regExpEscape(input.trim()), "i").test(text);
  52487. };
  52488. const SORT_BYLENGTH = function SORT_BYLENGTH(a, b) {
  52489. if (a.length !== b.length) {
  52490. return a.length - b.length;
  52491. }
  52492. return a < b ? -1 : 1;
  52493. };
  52494. const ITEM = (text, input) => {
  52495. input = input.trim();
  52496. const element = document.createElement("li");
  52497. element.setAttribute("aria-selected", "false");
  52498. const regex = new RegExp("(" + input + ")", "ig");
  52499. const parts = input ? text.split(regex) : [text];
  52500. parts.forEach(txt => {
  52501. if (input && txt.match(regex)) {
  52502. const match = document.createElement("mark");
  52503. match.textContent = txt;
  52504. element.appendChild(match);
  52505. } else {
  52506. element.appendChild(document.createTextNode(txt));
  52507. }
  52508. });
  52509. return element;
  52510. };
  52511. class AutoComplete {
  52512. constructor(el, config = {}) {
  52513. this.is_opened = false;
  52514. if (u.hasClass('.suggestion-box', el)) {
  52515. this.container = el;
  52516. } else {
  52517. this.container = el.querySelector('.suggestion-box');
  52518. }
  52519. this.input = this.container.querySelector('.suggestion-box__input');
  52520. this.input.setAttribute("autocomplete", "off");
  52521. this.input.setAttribute("aria-autocomplete", "list");
  52522. this.ul = this.container.querySelector('.suggestion-box__results');
  52523. this.status = this.container.querySelector('.suggestion-box__additions');
  52524. _.assignIn(this, {
  52525. 'match_current_word': false,
  52526. // Match only the current word, otherwise all input is matched
  52527. 'match_on_tab': false,
  52528. // Whether matching should only start when tab's pressed
  52529. 'trigger_on_at': false,
  52530. // Whether @ should trigger autocomplete
  52531. 'min_chars': 2,
  52532. 'max_items': 10,
  52533. 'auto_evaluate': true,
  52534. 'auto_first': false,
  52535. 'data': _.identity,
  52536. 'filter': _converse.FILTER_CONTAINS,
  52537. 'sort': config.sort === false ? false : SORT_BYLENGTH,
  52538. 'item': ITEM
  52539. }, config);
  52540. this.index = -1;
  52541. this.bindEvents();
  52542. if (this.input.hasAttribute("list")) {
  52543. this.list = "#" + this.input.getAttribute("list");
  52544. this.input.removeAttribute("list");
  52545. } else {
  52546. this.list = this.input.getAttribute("data-list") || config.list || [];
  52547. }
  52548. }
  52549. bindEvents() {
  52550. // Bind events
  52551. const input = {
  52552. "blur": () => this.close({
  52553. 'reason': 'blur'
  52554. })
  52555. };
  52556. if (this.auto_evaluate) {
  52557. input["input"] = () => this.evaluate();
  52558. }
  52559. this._events = {
  52560. 'input': input,
  52561. 'form': {
  52562. "submit": () => this.close({
  52563. 'reason': 'submit'
  52564. })
  52565. },
  52566. 'ul': {
  52567. "mousedown": ev => this.onMouseDown(ev),
  52568. "mouseover": ev => this.onMouseOver(ev)
  52569. }
  52570. };
  52571. helpers.bind(this.input, this._events.input);
  52572. helpers.bind(this.input.form, this._events.form);
  52573. helpers.bind(this.ul, this._events.ul);
  52574. }
  52575. set list(list) {
  52576. if (Array.isArray(list) || typeof list === "function") {
  52577. this._list = list;
  52578. } else if (typeof list === "string" && _.includes(list, ",")) {
  52579. this._list = list.split(/\s*,\s*/);
  52580. } else {
  52581. // Element or CSS selector
  52582. list = helpers.getElement(list);
  52583. if (list && list.children) {
  52584. const items = [];
  52585. slice.apply(list.children).forEach(function (el) {
  52586. if (!el.disabled) {
  52587. const text = el.textContent.trim(),
  52588. value = el.value || text,
  52589. label = el.label || text;
  52590. if (value !== "") {
  52591. items.push({
  52592. label: label,
  52593. value: value
  52594. });
  52595. }
  52596. }
  52597. });
  52598. this._list = items;
  52599. }
  52600. }
  52601. if (document.activeElement === this.input) {
  52602. this.evaluate();
  52603. }
  52604. }
  52605. get selected() {
  52606. return this.index > -1;
  52607. }
  52608. get opened() {
  52609. return this.is_opened;
  52610. }
  52611. close(o) {
  52612. if (!this.opened) {
  52613. return;
  52614. }
  52615. this.ul.setAttribute("hidden", "");
  52616. this.is_opened = false;
  52617. this.index = -1;
  52618. this.trigger("suggestion-box-close", o || {});
  52619. }
  52620. insertValue(suggestion) {
  52621. let value;
  52622. if (this.match_current_word) {
  52623. u.replaceCurrentWord(this.input, suggestion.value);
  52624. } else {
  52625. this.input.value = suggestion.value;
  52626. }
  52627. }
  52628. open() {
  52629. this.ul.removeAttribute("hidden");
  52630. this.is_opened = true;
  52631. if (this.auto_first && this.index === -1) {
  52632. this.goto(0);
  52633. }
  52634. this.trigger("suggestion-box-open");
  52635. }
  52636. destroy() {
  52637. //remove events from the input and its form
  52638. helpers.unbind(this.input, this._events.input);
  52639. helpers.unbind(this.input.form, this._events.form); //move the input out of the suggestion-box container and remove the container and its children
  52640. const parentNode = this.container.parentNode;
  52641. parentNode.insertBefore(this.input, this.container);
  52642. parentNode.removeChild(this.container); //remove autocomplete and aria-autocomplete attributes
  52643. this.input.removeAttribute("autocomplete");
  52644. this.input.removeAttribute("aria-autocomplete");
  52645. }
  52646. next() {
  52647. const count = this.ul.children.length;
  52648. this.goto(this.index < count - 1 ? this.index + 1 : count ? 0 : -1);
  52649. }
  52650. previous() {
  52651. const count = this.ul.children.length,
  52652. pos = this.index - 1;
  52653. this.goto(this.selected && pos !== -1 ? pos : count - 1);
  52654. }
  52655. goto(i) {
  52656. // Should not be used directly, highlights specific item without any checks!
  52657. const list = this.ul.children;
  52658. if (this.selected) {
  52659. list[this.index].setAttribute("aria-selected", "false");
  52660. }
  52661. this.index = i;
  52662. if (i > -1 && list.length > 0) {
  52663. list[i].setAttribute("aria-selected", "true");
  52664. list[i].focus();
  52665. this.status.textContent = list[i].textContent; // scroll to highlighted element in case parent's height is fixed
  52666. this.ul.scrollTop = list[i].offsetTop - this.ul.clientHeight + list[i].clientHeight;
  52667. this.trigger("suggestion-box-highlight", {
  52668. 'text': this.suggestions[this.index]
  52669. });
  52670. }
  52671. }
  52672. select(selected, origin) {
  52673. if (selected) {
  52674. this.index = u.siblingIndex(selected);
  52675. } else {
  52676. selected = this.ul.children[this.index];
  52677. }
  52678. if (selected) {
  52679. const suggestion = this.suggestions[this.index];
  52680. this.insertValue(suggestion);
  52681. this.close({
  52682. 'reason': 'select'
  52683. });
  52684. this.auto_completing = false;
  52685. this.trigger("suggestion-box-selectcomplete", {
  52686. 'text': suggestion
  52687. });
  52688. }
  52689. }
  52690. onMouseOver(ev) {
  52691. const li = u.ancestor(ev.target, 'li');
  52692. if (li) {
  52693. this.goto(Array.prototype.slice.call(this.ul.children).indexOf(li));
  52694. }
  52695. }
  52696. onMouseDown(ev) {
  52697. if (ev.button !== 0) {
  52698. return; // Only select on left click
  52699. }
  52700. const li = u.ancestor(ev.target, 'li');
  52701. if (li) {
  52702. ev.preventDefault();
  52703. this.select(li, ev.target);
  52704. }
  52705. }
  52706. keyPressed(ev) {
  52707. if (this.opened) {
  52708. if (_.includes([_converse.keycodes.ENTER, _converse.keycodes.TAB], ev.keyCode) && this.selected) {
  52709. ev.preventDefault();
  52710. ev.stopPropagation();
  52711. this.select();
  52712. return true;
  52713. } else if (ev.keyCode === _converse.keycodes.ESCAPE) {
  52714. this.close({
  52715. 'reason': 'esc'
  52716. });
  52717. return true;
  52718. } else if (_.includes([_converse.keycodes.UP_ARROW, _converse.keycodes.DOWN_ARROW], ev.keyCode)) {
  52719. ev.preventDefault();
  52720. ev.stopPropagation();
  52721. this[ev.keyCode === _converse.keycodes.UP_ARROW ? "previous" : "next"]();
  52722. return true;
  52723. }
  52724. }
  52725. if (_.includes([_converse.keycodes.SHIFT, _converse.keycodes.META, _converse.keycodes.META_RIGHT, _converse.keycodes.ESCAPE, _converse.keycodes.ALT], ev.keyCode)) {
  52726. return;
  52727. }
  52728. if (this.match_on_tab && ev.keyCode === _converse.keycodes.TAB) {
  52729. ev.preventDefault();
  52730. this.auto_completing = true;
  52731. } else if (this.trigger_on_at && ev.keyCode === _converse.keycodes.AT) {
  52732. this.auto_completing = true;
  52733. }
  52734. }
  52735. evaluate(ev) {
  52736. const arrow_pressed = ev.keyCode === _converse.keycodes.UP_ARROW || ev.keyCode === _converse.keycodes.DOWN_ARROW;
  52737. if (!this.auto_completing || this.selected && arrow_pressed) {
  52738. return;
  52739. }
  52740. const list = typeof this._list === "function" ? this._list() : this._list;
  52741. if (list.length === 0) {
  52742. return;
  52743. }
  52744. let value = this.match_current_word ? u.getCurrentWord(this.input) : this.input.value;
  52745. let ignore_min_chars = false;
  52746. if (this.trigger_on_at && value.startsWith('@')) {
  52747. ignore_min_chars = true;
  52748. value = value.slice('1');
  52749. }
  52750. if (value.length >= this.min_chars || ignore_min_chars) {
  52751. this.index = -1; // Populate list with options that match
  52752. this.ul.innerHTML = "";
  52753. this.suggestions = list.map(item => new Suggestion(this.data(item, value))).filter(item => this.filter(item, value));
  52754. if (this.sort !== false) {
  52755. this.suggestions = this.suggestions.sort(this.sort);
  52756. }
  52757. this.suggestions = this.suggestions.slice(0, this.max_items);
  52758. this.suggestions.forEach(text => this.ul.appendChild(this.item(text, value)));
  52759. if (this.ul.children.length === 0) {
  52760. this.close({
  52761. 'reason': 'nomatches'
  52762. });
  52763. } else {
  52764. this.open();
  52765. }
  52766. } else {
  52767. this.close({
  52768. 'reason': 'nomatches'
  52769. });
  52770. this.auto_completing = false;
  52771. }
  52772. }
  52773. } // Make it an event emitter
  52774. _.extend(AutoComplete.prototype, Backbone.Events); // Private functions
  52775. function Suggestion(data) {
  52776. const o = Array.isArray(data) ? {
  52777. label: data[0],
  52778. value: data[1]
  52779. } : typeof data === "object" && "label" in data && "value" in data ? data : {
  52780. label: data,
  52781. value: data
  52782. };
  52783. this.label = o.label || o.value;
  52784. this.value = o.value;
  52785. }
  52786. Object.defineProperty(Suggestion.prototype = Object.create(String.prototype), "length", {
  52787. get: function get() {
  52788. return this.label.length;
  52789. }
  52790. });
  52791. Suggestion.prototype.toString = Suggestion.prototype.valueOf = function () {
  52792. return "" + this.label;
  52793. }; // Helpers
  52794. var slice = Array.prototype.slice;
  52795. const helpers = {
  52796. getElement(expr, el) {
  52797. return typeof expr === "string" ? (el || document).querySelector(expr) : expr || null;
  52798. },
  52799. bind(element, o) {
  52800. if (element) {
  52801. for (var event in o) {
  52802. if (!Object.prototype.hasOwnProperty.call(o, event)) {
  52803. continue;
  52804. }
  52805. const callback = o[event];
  52806. event.split(/\s+/).forEach(event => element.addEventListener(event, callback));
  52807. }
  52808. }
  52809. },
  52810. unbind(element, o) {
  52811. if (element) {
  52812. for (var event in o) {
  52813. if (!Object.prototype.hasOwnProperty.call(o, event)) {
  52814. continue;
  52815. }
  52816. const callback = o[event];
  52817. event.split(/\s+/).forEach(event => element.removeEventListener(event, callback));
  52818. }
  52819. }
  52820. },
  52821. regExpEscape(s) {
  52822. return s.replace(/[-\\^$*+?.()|[\]{}]/g, "\\$&");
  52823. }
  52824. };
  52825. _converse.AutoComplete = AutoComplete;
  52826. }
  52827. });
  52828. });
  52829. /***/ }),
  52830. /***/ "./src/converse-bookmarks.js":
  52831. /*!***********************************!*\
  52832. !*** ./src/converse-bookmarks.js ***!
  52833. \***********************************/
  52834. /*! no static exports found */
  52835. /***/ (function(module, exports, __webpack_require__) {
  52836. "use strict";
  52837. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  52838. // Converse.js (A browser based XMPP chat client)
  52839. // http://conversejs.org
  52840. //
  52841. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  52842. // Licensed under the Mozilla Public License (MPLv2)
  52843. //
  52844. /*global define */
  52845. /* This is a Converse.js plugin which add support for bookmarks specified
  52846. * in XEP-0048.
  52847. */
  52848. (function (root, factory) {
  52849. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! converse-muc */ "./src/converse-muc.js"), __webpack_require__(/*! templates/chatroom_bookmark_form.html */ "./src/templates/chatroom_bookmark_form.html"), __webpack_require__(/*! templates/chatroom_bookmark_toggle.html */ "./src/templates/chatroom_bookmark_toggle.html"), __webpack_require__(/*! templates/bookmark.html */ "./src/templates/bookmark.html"), __webpack_require__(/*! templates/bookmarks_list.html */ "./src/templates/bookmarks_list.html")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  52850. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  52851. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  52852. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  52853. })(void 0, function (converse, muc, tpl_chatroom_bookmark_form, tpl_chatroom_bookmark_toggle, tpl_bookmark, tpl_bookmarks_list) {
  52854. const _converse$env = converse.env,
  52855. Backbone = _converse$env.Backbone,
  52856. Promise = _converse$env.Promise,
  52857. Strophe = _converse$env.Strophe,
  52858. $iq = _converse$env.$iq,
  52859. b64_sha1 = _converse$env.b64_sha1,
  52860. sizzle = _converse$env.sizzle,
  52861. _ = _converse$env._;
  52862. const u = converse.env.utils;
  52863. converse.plugins.add('converse-bookmarks', {
  52864. /* Plugin dependencies are other plugins which might be
  52865. * overridden or relied upon, and therefore need to be loaded before
  52866. * this plugin.
  52867. *
  52868. * If the setting "strict_plugin_dependencies" is set to true,
  52869. * an error will be raised if the plugin is not found. By default it's
  52870. * false, which means these plugins are only loaded opportunistically.
  52871. *
  52872. * NB: These plugins need to have already been loaded via require.js.
  52873. */
  52874. dependencies: ["converse-chatboxes", "converse-muc", "converse-muc-views"],
  52875. overrides: {
  52876. // Overrides mentioned here will be picked up by converse.js's
  52877. // plugin architecture they will replace existing methods on the
  52878. // relevant objects or classes.
  52879. //
  52880. // New functions which don't exist yet can also be added.
  52881. ChatRoomView: {
  52882. events: {
  52883. 'click .toggle-bookmark': 'toggleBookmark'
  52884. },
  52885. initialize() {
  52886. this.__super__.initialize.apply(this, arguments);
  52887. this.model.on('change:bookmarked', this.onBookmarked, this);
  52888. this.setBookmarkState();
  52889. },
  52890. renderBookmarkToggle() {
  52891. if (this.el.querySelector('.chat-head .toggle-bookmark')) {
  52892. return;
  52893. }
  52894. const _converse = this.__super__._converse,
  52895. __ = _converse.__;
  52896. const bookmark_button = tpl_chatroom_bookmark_toggle(_.assignIn(this.model.toJSON(), {
  52897. info_toggle_bookmark: __('Bookmark this groupchat'),
  52898. bookmarked: this.model.get('bookmarked')
  52899. }));
  52900. const close_button = this.el.querySelector('.close-chatbox-button');
  52901. close_button.insertAdjacentHTML('afterend', bookmark_button);
  52902. },
  52903. renderHeading() {
  52904. this.__super__.renderHeading.apply(this, arguments);
  52905. const _converse = this.__super__._converse;
  52906. if (_converse.allow_bookmarks) {
  52907. _converse.checkBookmarksSupport().then(supported => {
  52908. if (supported) {
  52909. this.renderBookmarkToggle();
  52910. }
  52911. }).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  52912. }
  52913. },
  52914. checkForReservedNick() {
  52915. /* Check if the user has a bookmark with a saved nickanme
  52916. * for this groupchat, and if so use it.
  52917. * Otherwise delegate to the super method.
  52918. */
  52919. const _converse = this.__super__._converse;
  52920. if (_.isUndefined(_converse.bookmarks) || !_converse.allow_bookmarks) {
  52921. return this.__super__.checkForReservedNick.apply(this, arguments);
  52922. }
  52923. const model = _converse.bookmarks.findWhere({
  52924. 'jid': this.model.get('jid')
  52925. });
  52926. if (!_.isUndefined(model) && model.get('nick')) {
  52927. this.join(model.get('nick'));
  52928. } else {
  52929. return this.__super__.checkForReservedNick.apply(this, arguments);
  52930. }
  52931. },
  52932. onBookmarked() {
  52933. const icon = this.el.querySelector('.toggle-bookmark');
  52934. if (_.isNull(icon)) {
  52935. return;
  52936. }
  52937. if (this.model.get('bookmarked')) {
  52938. icon.classList.add('button-on');
  52939. } else {
  52940. icon.classList.remove('button-on');
  52941. }
  52942. },
  52943. setBookmarkState() {
  52944. /* Set whether the groupchat is bookmarked or not.
  52945. */
  52946. const _converse = this.__super__._converse;
  52947. if (!_.isUndefined(_converse.bookmarks)) {
  52948. const models = _converse.bookmarks.where({
  52949. 'jid': this.model.get('jid')
  52950. });
  52951. if (!models.length) {
  52952. this.model.save('bookmarked', false);
  52953. } else {
  52954. this.model.save('bookmarked', true);
  52955. }
  52956. }
  52957. },
  52958. renderBookmarkForm() {
  52959. const _converse = this.__super__._converse,
  52960. __ = _converse.__,
  52961. body = this.el.querySelector('.chatroom-body');
  52962. _.each(body.children, child => child.classList.add('hidden'));
  52963. _.each(body.querySelectorAll('.chatroom-form-container'), u.removeElement);
  52964. body.insertAdjacentHTML('beforeend', tpl_chatroom_bookmark_form({
  52965. 'default_nick': this.model.get('nick'),
  52966. 'heading': __('Bookmark this groupchat'),
  52967. 'label_autojoin': __('Would you like this groupchat to be automatically joined upon startup?'),
  52968. 'label_cancel': __('Cancel'),
  52969. 'label_name': __('The name for this bookmark:'),
  52970. 'label_nick': __('What should your nickname for this groupchat be?'),
  52971. 'label_submit': __('Save'),
  52972. 'name': this.model.get('name')
  52973. }));
  52974. const form = body.querySelector('form.chatroom-form');
  52975. form.addEventListener('submit', ev => this.onBookmarkFormSubmitted(ev));
  52976. form.querySelector('.button-cancel').addEventListener('click', () => this.closeForm());
  52977. },
  52978. onBookmarkFormSubmitted(ev) {
  52979. ev.preventDefault();
  52980. const _converse = this.__super__._converse;
  52981. _converse.bookmarks.createBookmark({
  52982. 'jid': this.model.get('jid'),
  52983. 'autojoin': _.get(ev.target.querySelector('input[name="autojoin"]'), 'checked') || false,
  52984. 'name': _.get(ev.target.querySelector('input[name=name]'), 'value'),
  52985. 'nick': _.get(ev.target.querySelector('input[name=nick]'), 'value')
  52986. });
  52987. u.removeElement(this.el.querySelector('div.chatroom-form-container'));
  52988. this.renderAfterTransition();
  52989. },
  52990. toggleBookmark(ev) {
  52991. if (ev) {
  52992. ev.preventDefault();
  52993. ev.stopPropagation();
  52994. }
  52995. const _converse = this.__super__._converse;
  52996. const models = _converse.bookmarks.where({
  52997. 'jid': this.model.get('jid')
  52998. });
  52999. if (!models.length) {
  53000. this.renderBookmarkForm();
  53001. } else {
  53002. _.forEach(models, function (model) {
  53003. model.destroy();
  53004. });
  53005. this.el.querySelector('.toggle-bookmark').classList.remove('button-on');
  53006. }
  53007. }
  53008. }
  53009. },
  53010. initialize() {
  53011. /* The initialize function gets called as soon as the plugin is
  53012. * loaded by converse.js's plugin machinery.
  53013. */
  53014. const _converse = this._converse,
  53015. __ = _converse.__; // Configuration values for this plugin
  53016. // ====================================
  53017. // Refer to docs/source/configuration.rst for explanations of these
  53018. // configuration settings.
  53019. _converse.api.settings.update({
  53020. allow_bookmarks: true,
  53021. allow_public_bookmarks: false,
  53022. hide_open_bookmarks: true
  53023. }); // Promises exposed by this plugin
  53024. _converse.api.promises.add('bookmarksInitialized'); // Pure functions on the _converse object
  53025. _.extend(_converse, {
  53026. removeBookmarkViaEvent(ev) {
  53027. /* Remove a bookmark as determined by the passed in
  53028. * event.
  53029. */
  53030. ev.preventDefault();
  53031. const name = ev.target.getAttribute('data-bookmark-name');
  53032. const jid = ev.target.getAttribute('data-room-jid');
  53033. if (confirm(__("Are you sure you want to remove the bookmark \"%1$s\"?", name))) {
  53034. _.invokeMap(_converse.bookmarks.where({
  53035. 'jid': jid
  53036. }), Backbone.Model.prototype.destroy);
  53037. }
  53038. },
  53039. addBookmarkViaEvent(ev) {
  53040. /* Add a bookmark as determined by the passed in
  53041. * event.
  53042. */
  53043. ev.preventDefault();
  53044. const jid = ev.target.getAttribute('data-room-jid');
  53045. const chatroom = _converse.api.rooms.open(jid, {
  53046. 'bring_to_foreground': true
  53047. });
  53048. _converse.chatboxviews.get(jid).renderBookmarkForm();
  53049. }
  53050. });
  53051. _converse.Bookmark = Backbone.Model;
  53052. _converse.Bookmarks = Backbone.Collection.extend({
  53053. model: _converse.Bookmark,
  53054. comparator: item => item.get('name').toLowerCase(),
  53055. initialize() {
  53056. this.on('add', _.flow(this.openBookmarkedRoom, this.markRoomAsBookmarked));
  53057. this.on('remove', this.markRoomAsUnbookmarked, this);
  53058. this.on('remove', this.sendBookmarkStanza, this);
  53059. const storage = _converse.config.get('storage'),
  53060. cache_key = `converse.room-bookmarks${_converse.bare_jid}`;
  53061. this.fetched_flag = b64_sha1(cache_key + 'fetched');
  53062. this.browserStorage = new Backbone.BrowserStorage[storage](b64_sha1(cache_key));
  53063. },
  53064. openBookmarkedRoom(bookmark) {
  53065. if (bookmark.get('autojoin')) {
  53066. const groupchat = _converse.api.rooms.create(bookmark.get('jid'), bookmark.get('nick'));
  53067. if (!groupchat.get('hidden')) {
  53068. groupchat.trigger('show');
  53069. }
  53070. }
  53071. return bookmark;
  53072. },
  53073. fetchBookmarks() {
  53074. const deferred = u.getResolveablePromise();
  53075. if (this.browserStorage.records.length > 0) {
  53076. this.fetch({
  53077. 'success': _.bind(this.onCachedBookmarksFetched, this, deferred),
  53078. 'error': _.bind(this.onCachedBookmarksFetched, this, deferred)
  53079. });
  53080. } else if (!window.sessionStorage.getItem(this.fetched_flag)) {
  53081. // There aren't any cached bookmarks and the
  53082. // `fetched_flag` is off, so we query the XMPP server.
  53083. // If nothing is returned from the XMPP server, we set
  53084. // the `fetched_flag` to avoid calling the server again.
  53085. this.fetchBookmarksFromServer(deferred);
  53086. } else {
  53087. deferred.resolve();
  53088. }
  53089. return deferred;
  53090. },
  53091. onCachedBookmarksFetched(deferred) {
  53092. return deferred.resolve();
  53093. },
  53094. createBookmark(options) {
  53095. this.create(options);
  53096. this.sendBookmarkStanza().catch(iq => this.onBookmarkError(iq, options));
  53097. },
  53098. sendBookmarkStanza() {
  53099. const stanza = $iq({
  53100. 'type': 'set',
  53101. 'from': _converse.connection.jid
  53102. }).c('pubsub', {
  53103. 'xmlns': Strophe.NS.PUBSUB
  53104. }).c('publish', {
  53105. 'node': 'storage:bookmarks'
  53106. }).c('item', {
  53107. 'id': 'current'
  53108. }).c('storage', {
  53109. 'xmlns': 'storage:bookmarks'
  53110. });
  53111. this.each(model => {
  53112. stanza.c('conference', {
  53113. 'name': model.get('name'),
  53114. 'autojoin': model.get('autojoin'),
  53115. 'jid': model.get('jid')
  53116. }).c('nick').t(model.get('nick')).up().up();
  53117. });
  53118. stanza.up().up().up();
  53119. stanza.c('publish-options').c('x', {
  53120. 'xmlns': Strophe.NS.XFORM,
  53121. 'type': 'submit'
  53122. }).c('field', {
  53123. 'var': 'FORM_TYPE',
  53124. 'type': 'hidden'
  53125. }).c('value').t('http://jabber.org/protocol/pubsub#publish-options').up().up().c('field', {
  53126. 'var': 'pubsub#persist_items'
  53127. }).c('value').t('true').up().up().c('field', {
  53128. 'var': 'pubsub#access_model'
  53129. }).c('value').t('whitelist');
  53130. return _converse.api.sendIQ(stanza);
  53131. },
  53132. onBookmarkError(iq, options) {
  53133. _converse.log("Error while trying to add bookmark", Strophe.LogLevel.ERROR);
  53134. _converse.log(iq);
  53135. _converse.api.alert.show(Strophe.LogLevel.ERROR, __('Error'), [__("Sorry, something went wrong while trying to save your bookmark.")]);
  53136. this.findWhere({
  53137. 'jid': options.jid
  53138. }).destroy();
  53139. },
  53140. fetchBookmarksFromServer(deferred) {
  53141. const stanza = $iq({
  53142. 'from': _converse.connection.jid,
  53143. 'type': 'get'
  53144. }).c('pubsub', {
  53145. 'xmlns': Strophe.NS.PUBSUB
  53146. }).c('items', {
  53147. 'node': 'storage:bookmarks'
  53148. });
  53149. _converse.api.sendIQ(stanza).then(iq => this.onBookmarksReceived(deferred, iq)).catch(iq => this.onBookmarksReceivedError(deferred, iq));
  53150. },
  53151. markRoomAsBookmarked(bookmark) {
  53152. const groupchat = _converse.chatboxes.get(bookmark.get('jid'));
  53153. if (!_.isUndefined(groupchat)) {
  53154. groupchat.save('bookmarked', true);
  53155. }
  53156. },
  53157. markRoomAsUnbookmarked(bookmark) {
  53158. const groupchat = _converse.chatboxes.get(bookmark.get('jid'));
  53159. if (!_.isUndefined(groupchat)) {
  53160. groupchat.save('bookmarked', false);
  53161. }
  53162. },
  53163. createBookmarksFromStanza(stanza) {
  53164. const bookmarks = sizzle('items[node="storage:bookmarks"] ' + 'item#current ' + 'storage[xmlns="storage:bookmarks"] ' + 'conference', stanza);
  53165. _.forEach(bookmarks, bookmark => {
  53166. const jid = bookmark.getAttribute('jid');
  53167. this.create({
  53168. 'jid': jid,
  53169. 'name': bookmark.getAttribute('name') || jid,
  53170. 'autojoin': bookmark.getAttribute('autojoin') === 'true',
  53171. 'nick': _.get(bookmark.querySelector('nick'), 'textContent')
  53172. });
  53173. });
  53174. },
  53175. onBookmarksReceived(deferred, iq) {
  53176. this.createBookmarksFromStanza(iq);
  53177. if (!_.isUndefined(deferred)) {
  53178. return deferred.resolve();
  53179. }
  53180. },
  53181. onBookmarksReceivedError(deferred, iq) {
  53182. window.sessionStorage.setItem(this.fetched_flag, true);
  53183. _converse.log('Error while fetching bookmarks', Strophe.LogLevel.WARN);
  53184. _converse.log(iq.outerHTML, Strophe.LogLevel.DEBUG);
  53185. if (!_.isNil(deferred)) {
  53186. if (iq.querySelector('error[type="cancel"] item-not-found')) {
  53187. // Not an exception, the user simply doesn't have
  53188. // any bookmarks.
  53189. return deferred.resolve();
  53190. } else {
  53191. return deferred.reject(new Error("Could not fetch bookmarks"));
  53192. }
  53193. }
  53194. }
  53195. });
  53196. _converse.BookmarksList = Backbone.Model.extend({
  53197. defaults: {
  53198. "toggle-state": _converse.OPENED
  53199. }
  53200. });
  53201. _converse.BookmarkView = Backbone.VDOMView.extend({
  53202. toHTML() {
  53203. return tpl_bookmark({
  53204. 'hidden': _converse.hide_open_bookmarks && _converse.chatboxes.where({
  53205. 'jid': this.model.get('jid')
  53206. }).length,
  53207. 'bookmarked': true,
  53208. 'info_leave_room': __('Leave this groupchat'),
  53209. 'info_remove': __('Remove this bookmark'),
  53210. 'info_remove_bookmark': __('Unbookmark this groupchat'),
  53211. 'info_title': __('Show more information on this groupchat'),
  53212. 'jid': this.model.get('jid'),
  53213. 'name': Strophe.xmlunescape(this.model.get('name')),
  53214. 'open_title': __('Click to open this groupchat')
  53215. });
  53216. }
  53217. });
  53218. _converse.BookmarksView = Backbone.OrderedListView.extend({
  53219. tagName: 'div',
  53220. className: 'bookmarks-list list-container rooms-list-container',
  53221. events: {
  53222. 'click .add-bookmark': 'addBookmark',
  53223. 'click .bookmarks-toggle': 'toggleBookmarksList',
  53224. 'click .remove-bookmark': 'removeBookmark',
  53225. 'click .open-room': 'openRoom'
  53226. },
  53227. listSelector: '.rooms-list',
  53228. ItemView: _converse.BookmarkView,
  53229. subviewIndex: 'jid',
  53230. initialize() {
  53231. Backbone.OrderedListView.prototype.initialize.apply(this, arguments);
  53232. this.model.on('add', this.showOrHide, this);
  53233. this.model.on('remove', this.showOrHide, this);
  53234. _converse.chatboxes.on('add', this.renderBookmarkListElement, this);
  53235. _converse.chatboxes.on('remove', this.renderBookmarkListElement, this);
  53236. const storage = _converse.config.get('storage'),
  53237. id = b64_sha1(`converse.room-bookmarks${_converse.bare_jid}-list-model`);
  53238. this.list_model = new _converse.BookmarksList({
  53239. 'id': id
  53240. });
  53241. this.list_model.browserStorage = new Backbone.BrowserStorage[storage](id);
  53242. this.list_model.fetch();
  53243. this.render();
  53244. this.sortAndPositionAllItems();
  53245. },
  53246. render() {
  53247. this.el.innerHTML = tpl_bookmarks_list({
  53248. 'toggle_state': this.list_model.get('toggle-state'),
  53249. 'desc_bookmarks': __('Click to toggle the bookmarks list'),
  53250. 'label_bookmarks': __('Bookmarks'),
  53251. '_converse': _converse
  53252. });
  53253. this.showOrHide();
  53254. this.insertIntoControlBox();
  53255. return this;
  53256. },
  53257. insertIntoControlBox() {
  53258. const controlboxview = _converse.chatboxviews.get('controlbox');
  53259. if (!_.isUndefined(controlboxview) && !u.rootContains(_converse.root, this.el)) {
  53260. const el = controlboxview.el.querySelector('.bookmarks-list');
  53261. if (!_.isNull(el)) {
  53262. el.parentNode.replaceChild(this.el, el);
  53263. }
  53264. }
  53265. },
  53266. openRoom(ev) {
  53267. ev.preventDefault();
  53268. const name = ev.target.textContent;
  53269. const jid = ev.target.getAttribute('data-room-jid');
  53270. const data = {
  53271. 'name': name || Strophe.unescapeNode(Strophe.getNodeFromJid(jid)) || jid
  53272. };
  53273. _converse.api.rooms.open(jid, data);
  53274. },
  53275. removeBookmark: _converse.removeBookmarkViaEvent,
  53276. addBookmark: _converse.addBookmarkViaEvent,
  53277. renderBookmarkListElement(chatbox) {
  53278. const bookmarkview = this.get(chatbox.get('jid'));
  53279. if (_.isNil(bookmarkview)) {
  53280. // A chat box has been closed, but we don't have a
  53281. // bookmark for it, so nothing further to do here.
  53282. return;
  53283. }
  53284. bookmarkview.render();
  53285. this.showOrHide();
  53286. },
  53287. showOrHide(item) {
  53288. if (_converse.hide_open_bookmarks) {
  53289. const bookmarks = this.model.filter(bookmark => !_converse.chatboxes.get(bookmark.get('jid')));
  53290. if (!bookmarks.length) {
  53291. u.hideElement(this.el);
  53292. return;
  53293. }
  53294. }
  53295. if (this.model.models.length) {
  53296. u.showElement(this.el);
  53297. }
  53298. },
  53299. toggleBookmarksList(ev) {
  53300. if (ev && ev.preventDefault) {
  53301. ev.preventDefault();
  53302. }
  53303. const icon_el = ev.target.querySelector('.fa');
  53304. if (u.hasClass('fa-caret-down', icon_el)) {
  53305. u.slideIn(this.el.querySelector('.bookmarks'));
  53306. this.list_model.save({
  53307. 'toggle-state': _converse.CLOSED
  53308. });
  53309. icon_el.classList.remove("fa-caret-down");
  53310. icon_el.classList.add("fa-caret-right");
  53311. } else {
  53312. icon_el.classList.remove("fa-caret-right");
  53313. icon_el.classList.add("fa-caret-down");
  53314. u.slideOut(this.el.querySelector('.bookmarks'));
  53315. this.list_model.save({
  53316. 'toggle-state': _converse.OPENED
  53317. });
  53318. }
  53319. }
  53320. });
  53321. _converse.checkBookmarksSupport = function () {
  53322. return new Promise((resolve, reject) => {
  53323. Promise.all([_converse.api.disco.getIdentity('pubsub', 'pep', _converse.bare_jid), _converse.api.disco.supports(Strophe.NS.PUBSUB + '#publish-options', _converse.bare_jid)]).then(args => {
  53324. resolve(args[0] && (args[1].length || _converse.allow_public_bookmarks));
  53325. }).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  53326. }).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  53327. };
  53328. const initBookmarks = function initBookmarks() {
  53329. if (!_converse.allow_bookmarks) {
  53330. return;
  53331. }
  53332. _converse.checkBookmarksSupport().then(supported => {
  53333. if (supported) {
  53334. _converse.bookmarks = new _converse.Bookmarks();
  53335. _converse.bookmarksview = new _converse.BookmarksView({
  53336. 'model': _converse.bookmarks
  53337. });
  53338. _converse.bookmarks.fetchBookmarks().catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL)).then(() => _converse.emit('bookmarksInitialized'));
  53339. } else {
  53340. _converse.emit('bookmarksInitialized');
  53341. }
  53342. });
  53343. };
  53344. u.onMultipleEvents([{
  53345. 'object': _converse,
  53346. 'event': 'chatBoxesFetched'
  53347. }, {
  53348. 'object': _converse,
  53349. 'event': 'roomsPanelRendered'
  53350. }], initBookmarks);
  53351. _converse.on('clearSession', () => {
  53352. if (!_.isUndefined(_converse.bookmarks)) {
  53353. _converse.bookmarks.browserStorage._clear();
  53354. window.sessionStorage.removeItem(_converse.bookmarks.fetched_flag);
  53355. }
  53356. });
  53357. _converse.on('reconnected', initBookmarks);
  53358. _converse.on('connected', () => {
  53359. // Add a handler for bookmarks pushed from other connected clients
  53360. // (from the same user obviously)
  53361. _converse.connection.addHandler(message => {
  53362. if (sizzle('event[xmlns="' + Strophe.NS.PUBSUB + '#event"] items[node="storage:bookmarks"]', message).length) {
  53363. _converse.api.waitUntil('bookmarksInitialized').then(() => _converse.bookmarks.createBookmarksFromStanza(message)).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  53364. }
  53365. }, null, 'message', 'headline', null, _converse.bare_jid);
  53366. });
  53367. }
  53368. });
  53369. });
  53370. /***/ }),
  53371. /***/ "./src/converse-caps.js":
  53372. /*!******************************!*\
  53373. !*** ./src/converse-caps.js ***!
  53374. \******************************/
  53375. /*! no static exports found */
  53376. /***/ (function(module, exports, __webpack_require__) {
  53377. "use strict";
  53378. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  53379. // Converse.js
  53380. // http://conversejs.org
  53381. //
  53382. // Copyright (c) 2013-2018, the Converse.js developers
  53383. // Licensed under the Mozilla Public License (MPLv2)
  53384. (function (root, factory) {
  53385. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  53386. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  53387. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  53388. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  53389. })(void 0, function (converse) {
  53390. const _converse$env = converse.env,
  53391. Strophe = _converse$env.Strophe,
  53392. $build = _converse$env.$build,
  53393. _ = _converse$env._,
  53394. b64_sha1 = _converse$env.b64_sha1;
  53395. Strophe.addNamespace('CAPS', "http://jabber.org/protocol/caps");
  53396. function propertySort(array, property) {
  53397. return array.sort((a, b) => {
  53398. return a[property] > b[property] ? -1 : 1;
  53399. });
  53400. }
  53401. function generateVerificationString(_converse) {
  53402. const identities = _converse.api.disco.own.identities.get(),
  53403. features = _converse.api.disco.own.features.get();
  53404. if (identities.length > 1) {
  53405. propertySort(identities, "category");
  53406. propertySort(identities, "type");
  53407. propertySort(identities, "lang");
  53408. }
  53409. let S = _.reduce(identities, (result, id) => `${result}${id.category}/${id.type}/${_.get(id, 'lang', '')}/${id.name}<`, "");
  53410. features.sort();
  53411. S = _.reduce(features, (result, feature) => `${result}${feature}<`, S);
  53412. return b64_sha1(S);
  53413. }
  53414. function createCapsNode(_converse) {
  53415. return $build("c", {
  53416. 'xmlns': Strophe.NS.CAPS,
  53417. 'hash': "sha-1",
  53418. 'node': "https://conversejs.org",
  53419. 'ver': generateVerificationString(_converse)
  53420. }).nodeTree;
  53421. }
  53422. converse.plugins.add('converse-caps', {
  53423. overrides: {
  53424. // Overrides mentioned here will be picked up by converse.js's
  53425. // plugin architecture they will replace existing methods on the
  53426. // relevant objects or classes.
  53427. XMPPStatus: {
  53428. constructPresence() {
  53429. const presence = this.__super__.constructPresence.apply(this, arguments);
  53430. presence.root().cnode(createCapsNode(this.__super__._converse));
  53431. return presence;
  53432. }
  53433. }
  53434. }
  53435. });
  53436. });
  53437. /***/ }),
  53438. /***/ "./src/converse-chatboxes.js":
  53439. /*!***********************************!*\
  53440. !*** ./src/converse-chatboxes.js ***!
  53441. \***********************************/
  53442. /*! no static exports found */
  53443. /***/ (function(module, exports, __webpack_require__) {
  53444. "use strict";
  53445. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  53446. // Converse.js
  53447. // http://conversejs.org
  53448. //
  53449. // Copyright (c) 2012-2018, the Converse.js developers
  53450. // Licensed under the Mozilla Public License (MPLv2)
  53451. (function (root, factory) {
  53452. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! filesize */ "./node_modules/filesize/lib/filesize.js"), __webpack_require__(/*! utils/form */ "./src/utils/form.js"), __webpack_require__(/*! utils/emoji */ "./src/utils/emoji.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  53453. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  53454. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  53455. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  53456. })(void 0, function (converse, filesize) {
  53457. "use strict";
  53458. const _converse$env = converse.env,
  53459. $msg = _converse$env.$msg,
  53460. Backbone = _converse$env.Backbone,
  53461. Promise = _converse$env.Promise,
  53462. Strophe = _converse$env.Strophe,
  53463. b64_sha1 = _converse$env.b64_sha1,
  53464. moment = _converse$env.moment,
  53465. sizzle = _converse$env.sizzle,
  53466. utils = _converse$env.utils,
  53467. _ = _converse$env._;
  53468. const u = converse.env.utils;
  53469. Strophe.addNamespace('MESSAGE_CORRECT', 'urn:xmpp:message-correct:0');
  53470. Strophe.addNamespace('REFERENCE', 'urn:xmpp:reference:0');
  53471. converse.plugins.add('converse-chatboxes', {
  53472. dependencies: ["converse-roster", "converse-vcard"],
  53473. initialize() {
  53474. /* The initialize function gets called as soon as the plugin is
  53475. * loaded by converse.js's plugin machinery.
  53476. */
  53477. const _converse = this._converse,
  53478. __ = _converse.__; // Configuration values for this plugin
  53479. // ====================================
  53480. // Refer to docs/source/configuration.rst for explanations of these
  53481. // configuration settings.
  53482. _converse.api.settings.update({
  53483. 'auto_join_private_chats': [],
  53484. 'filter_by_resource': false,
  53485. 'forward_messages': false,
  53486. 'send_chat_state_notifications': true
  53487. });
  53488. _converse.api.promises.add(['chatBoxesFetched', 'chatBoxesInitialized', 'privateChatsAutoJoined']);
  53489. function openChat(jid) {
  53490. if (!utils.isValidJID(jid)) {
  53491. return _converse.log(`Invalid JID "${jid}" provided in URL fragment`, Strophe.LogLevel.WARN);
  53492. }
  53493. _converse.api.chats.open(jid);
  53494. }
  53495. _converse.router.route('converse/chat?jid=:jid', openChat);
  53496. _converse.Message = Backbone.Model.extend({
  53497. defaults() {
  53498. return {
  53499. 'msgid': _converse.connection.getUniqueId(),
  53500. 'time': moment().format()
  53501. };
  53502. },
  53503. initialize() {
  53504. this.setVCard();
  53505. if (this.get('file')) {
  53506. this.on('change:put', this.uploadFile, this);
  53507. if (!_.includes([_converse.SUCCESS, _converse.FAILURE], this.get('upload'))) {
  53508. this.getRequestSlotURL();
  53509. }
  53510. }
  53511. if (this.isOnlyChatStateNotification()) {
  53512. window.setTimeout(this.destroy.bind(this), 20000);
  53513. }
  53514. },
  53515. getVCardForChatroomOccupant() {
  53516. const chatbox = this.collection.chatbox,
  53517. nick = Strophe.getResourceFromJid(this.get('from'));
  53518. if (chatbox.get('nick') === nick) {
  53519. return _converse.xmppstatus.vcard;
  53520. } else {
  53521. let vcard;
  53522. if (this.get('vcard_jid')) {
  53523. vcard = _converse.vcards.findWhere({
  53524. 'jid': this.get('vcard_jid')
  53525. });
  53526. }
  53527. if (!vcard) {
  53528. let jid;
  53529. const occupant = chatbox.occupants.findWhere({
  53530. 'nick': nick
  53531. });
  53532. if (occupant && occupant.get('jid')) {
  53533. jid = occupant.get('jid');
  53534. this.save({
  53535. 'vcard_jid': jid
  53536. }, {
  53537. 'silent': true
  53538. });
  53539. } else {
  53540. jid = this.get('from');
  53541. }
  53542. vcard = _converse.vcards.findWhere({
  53543. 'jid': jid
  53544. }) || _converse.vcards.create({
  53545. 'jid': jid
  53546. });
  53547. }
  53548. return vcard;
  53549. }
  53550. },
  53551. setVCard() {
  53552. if (this.get('type') === 'error') {
  53553. return;
  53554. } else if (this.get('type') === 'groupchat') {
  53555. this.vcard = this.getVCardForChatroomOccupant();
  53556. } else {
  53557. const jid = this.get('from');
  53558. this.vcard = _converse.vcards.findWhere({
  53559. 'jid': jid
  53560. }) || _converse.vcards.create({
  53561. 'jid': jid
  53562. });
  53563. }
  53564. },
  53565. isOnlyChatStateNotification() {
  53566. return u.isOnlyChatStateNotification(this);
  53567. },
  53568. getDisplayName() {
  53569. if (this.get('type') === 'groupchat') {
  53570. return this.get('nick');
  53571. } else {
  53572. return this.vcard.get('fullname') || this.get('from');
  53573. }
  53574. },
  53575. sendSlotRequestStanza() {
  53576. /* Send out an IQ stanza to request a file upload slot.
  53577. *
  53578. * https://xmpp.org/extensions/xep-0363.html#request
  53579. */
  53580. const file = this.get('file');
  53581. return new Promise((resolve, reject) => {
  53582. const iq = converse.env.$iq({
  53583. 'from': _converse.jid,
  53584. 'to': this.get('slot_request_url'),
  53585. 'type': 'get'
  53586. }).c('request', {
  53587. 'xmlns': Strophe.NS.HTTPUPLOAD,
  53588. 'filename': file.name,
  53589. 'size': file.size,
  53590. 'content-type': file.type
  53591. });
  53592. _converse.connection.sendIQ(iq, resolve, reject);
  53593. });
  53594. },
  53595. getRequestSlotURL() {
  53596. this.sendSlotRequestStanza().then(stanza => {
  53597. const slot = stanza.querySelector('slot');
  53598. if (slot) {
  53599. this.save({
  53600. 'get': slot.querySelector('get').getAttribute('url'),
  53601. 'put': slot.querySelector('put').getAttribute('url')
  53602. });
  53603. } else {
  53604. return this.save({
  53605. 'type': 'error',
  53606. 'message': __("Sorry, could not determine file upload URL.")
  53607. });
  53608. }
  53609. }).catch(e => {
  53610. _converse.log(e, Strophe.LogLevel.ERROR);
  53611. return this.save({
  53612. 'type': 'error',
  53613. 'message': __("Sorry, could not determine upload URL.")
  53614. });
  53615. });
  53616. },
  53617. uploadFile() {
  53618. const xhr = new XMLHttpRequest();
  53619. xhr.onreadystatechange = () => {
  53620. if (xhr.readyState === XMLHttpRequest.DONE) {
  53621. _converse.log("Status: " + xhr.status, Strophe.LogLevel.INFO);
  53622. if (xhr.status === 200 || xhr.status === 201) {
  53623. this.save({
  53624. 'upload': _converse.SUCCESS,
  53625. 'oob_url': this.get('get'),
  53626. 'message': this.get('get')
  53627. });
  53628. } else {
  53629. xhr.onerror();
  53630. }
  53631. }
  53632. };
  53633. xhr.upload.addEventListener("progress", evt => {
  53634. if (evt.lengthComputable) {
  53635. this.set('progress', evt.loaded / evt.total);
  53636. }
  53637. }, false);
  53638. xhr.onerror = () => {
  53639. let message;
  53640. if (xhr.responseText) {
  53641. message = __('Sorry, could not succesfully upload your file. Your server’s response: "%1$s"', xhr.responseText);
  53642. } else {
  53643. message = __('Sorry, could not succesfully upload your file.');
  53644. }
  53645. this.save({
  53646. 'type': 'error',
  53647. 'upload': _converse.FAILURE,
  53648. 'message': message
  53649. });
  53650. };
  53651. xhr.open('PUT', this.get('put'), true);
  53652. xhr.setRequestHeader("Content-type", this.get('file').type);
  53653. xhr.send(this.get('file'));
  53654. }
  53655. });
  53656. _converse.Messages = Backbone.Collection.extend({
  53657. model: _converse.Message,
  53658. comparator: 'time'
  53659. });
  53660. _converse.ChatBox = _converse.ModelWithVCardAndPresence.extend({
  53661. defaults() {
  53662. return {
  53663. 'bookmarked': false,
  53664. 'chat_state': undefined,
  53665. 'num_unread': 0,
  53666. 'type': _converse.PRIVATE_CHAT_TYPE,
  53667. 'message_type': 'chat',
  53668. 'url': '',
  53669. 'hidden': _.includes(['mobile', 'fullscreen'], _converse.view_mode)
  53670. };
  53671. },
  53672. initialize() {
  53673. _converse.ModelWithVCardAndPresence.prototype.initialize.apply(this, arguments);
  53674. _converse.api.waitUntil('rosterContactsFetched').then(() => {
  53675. this.addRelatedContact(_converse.roster.findWhere({
  53676. 'jid': this.get('jid')
  53677. }));
  53678. });
  53679. this.messages = new _converse.Messages();
  53680. const storage = _converse.config.get('storage');
  53681. this.messages.browserStorage = new Backbone.BrowserStorage[storage](b64_sha1(`converse.messages${this.get('jid')}${_converse.bare_jid}`));
  53682. this.messages.chatbox = this;
  53683. this.messages.on('change:upload', message => {
  53684. if (message.get('upload') === _converse.SUCCESS) {
  53685. this.sendMessageStanza(this.createMessageStanza(message));
  53686. }
  53687. });
  53688. this.on('change:chat_state', this.sendChatState, this);
  53689. this.save({
  53690. // The chat_state will be set to ACTIVE once the chat box is opened
  53691. // and we listen for change:chat_state, so shouldn't set it to ACTIVE here.
  53692. 'box_id': b64_sha1(this.get('jid')),
  53693. 'time_opened': this.get('time_opened') || moment().valueOf(),
  53694. 'user_id': Strophe.getNodeFromJid(this.get('jid'))
  53695. });
  53696. },
  53697. addRelatedContact(contact) {
  53698. if (!_.isUndefined(contact)) {
  53699. this.contact = contact;
  53700. this.trigger('contactAdded', contact);
  53701. }
  53702. },
  53703. getDisplayName() {
  53704. return this.vcard.get('fullname') || this.get('jid');
  53705. },
  53706. handleMessageCorrection(stanza) {
  53707. const replace = sizzle(`replace[xmlns="${Strophe.NS.MESSAGE_CORRECT}"]`, stanza).pop();
  53708. if (replace) {
  53709. const msgid = replace && replace.getAttribute('id') || stanza.getAttribute('id'),
  53710. message = msgid && this.messages.findWhere({
  53711. msgid
  53712. });
  53713. if (!message) {
  53714. // XXX: Looks like we received a correction for a
  53715. // non-existing message, probably due to MAM.
  53716. // Not clear what can be done about this... we'll
  53717. // just create it as a separate message for now.
  53718. return false;
  53719. }
  53720. const older_versions = message.get('older_versions') || [];
  53721. older_versions.push(message.get('message'));
  53722. message.save({
  53723. 'message': _converse.chatboxes.getMessageBody(stanza),
  53724. 'references': this.getReferencesFromStanza(stanza),
  53725. 'older_versions': older_versions,
  53726. 'edited': true
  53727. });
  53728. return true;
  53729. }
  53730. return false;
  53731. },
  53732. createMessageStanza(message) {
  53733. /* Given a _converse.Message Backbone.Model, return the XML
  53734. * stanza that represents it.
  53735. *
  53736. * Parameters:
  53737. * (Object) message - The Backbone.Model representing the message
  53738. */
  53739. const stanza = $msg({
  53740. 'from': _converse.connection.jid,
  53741. 'to': this.get('jid'),
  53742. 'type': this.get('message_type'),
  53743. 'id': message.get('edited') && _converse.connection.getUniqueId() || message.get('msgid')
  53744. }).c('body').t(message.get('message')).up().c(_converse.ACTIVE, {
  53745. 'xmlns': Strophe.NS.CHATSTATES
  53746. }).up();
  53747. if (message.get('is_spoiler')) {
  53748. if (message.get('spoiler_hint')) {
  53749. stanza.c('spoiler', {
  53750. 'xmlns': Strophe.NS.SPOILER
  53751. }, message.get('spoiler_hint')).up();
  53752. } else {
  53753. stanza.c('spoiler', {
  53754. 'xmlns': Strophe.NS.SPOILER
  53755. }).up();
  53756. }
  53757. }
  53758. (message.get('references') || []).forEach(reference => {
  53759. const attrs = {
  53760. 'xmlns': Strophe.NS.REFERENCE,
  53761. 'begin': reference.begin,
  53762. 'end': reference.end,
  53763. 'type': reference.type
  53764. };
  53765. if (reference.uri) {
  53766. attrs.uri = reference.uri;
  53767. }
  53768. stanza.c('reference', attrs).up();
  53769. });
  53770. if (message.get('file')) {
  53771. stanza.c('x', {
  53772. 'xmlns': Strophe.NS.OUTOFBAND
  53773. }).c('url').t(message.get('message')).up();
  53774. }
  53775. if (message.get('edited')) {
  53776. stanza.c('replace', {
  53777. 'xmlns': Strophe.NS.MESSAGE_CORRECT,
  53778. 'id': message.get('msgid')
  53779. }).up();
  53780. }
  53781. return stanza;
  53782. },
  53783. sendMessageStanza(stanza) {
  53784. _converse.connection.send(stanza);
  53785. if (_converse.forward_messages) {
  53786. // Forward the message, so that other connected resources are also aware of it.
  53787. _converse.connection.send($msg({
  53788. 'to': _converse.bare_jid,
  53789. 'type': this.get('message_type')
  53790. }).c('forwarded', {
  53791. 'xmlns': Strophe.NS.FORWARD
  53792. }).c('delay', {
  53793. 'xmns': Strophe.NS.DELAY,
  53794. 'stamp': moment().format()
  53795. }).up().cnode(stanza.tree()));
  53796. }
  53797. },
  53798. getOutgoingMessageAttributes(text, spoiler_hint) {
  53799. const is_spoiler = this.get('composing_spoiler');
  53800. return _.extend(this.toJSON(), {
  53801. 'id': _converse.connection.getUniqueId(),
  53802. 'fullname': _converse.xmppstatus.get('fullname'),
  53803. 'from': _converse.bare_jid,
  53804. 'sender': 'me',
  53805. 'time': moment().format(),
  53806. 'message': text ? u.httpToGeoUri(u.shortnameToUnicode(text), _converse) : undefined,
  53807. 'is_spoiler': is_spoiler,
  53808. 'spoiler_hint': is_spoiler ? spoiler_hint : undefined,
  53809. 'type': this.get('message_type')
  53810. });
  53811. },
  53812. sendMessage(attrs) {
  53813. /* Responsible for sending off a text message.
  53814. *
  53815. * Parameters:
  53816. * (Message) message - The chat message
  53817. */
  53818. let message = this.messages.findWhere('correcting');
  53819. if (message) {
  53820. const older_versions = message.get('older_versions') || [];
  53821. older_versions.push(message.get('message'));
  53822. message.save({
  53823. 'correcting': false,
  53824. 'edited': true,
  53825. 'message': attrs.message,
  53826. 'older_versions': older_versions,
  53827. 'references': attrs.references
  53828. });
  53829. } else {
  53830. message = this.messages.create(attrs);
  53831. }
  53832. return this.sendMessageStanza(this.createMessageStanza(message));
  53833. },
  53834. sendChatState() {
  53835. /* Sends a message with the status of the user in this chat session
  53836. * as taken from the 'chat_state' attribute of the chat box.
  53837. * See XEP-0085 Chat State Notifications.
  53838. */
  53839. if (_converse.send_chat_state_notifications) {
  53840. _converse.connection.send($msg({
  53841. 'to': this.get('jid'),
  53842. 'type': 'chat'
  53843. }).c(this.get('chat_state'), {
  53844. 'xmlns': Strophe.NS.CHATSTATES
  53845. }).up().c('no-store', {
  53846. 'xmlns': Strophe.NS.HINTS
  53847. }).up().c('no-permanent-store', {
  53848. 'xmlns': Strophe.NS.HINTS
  53849. }));
  53850. }
  53851. },
  53852. sendFiles(files) {
  53853. _converse.api.disco.supports(Strophe.NS.HTTPUPLOAD, _converse.domain).then(result => {
  53854. const item = result.pop(),
  53855. data = item.dataforms.where({
  53856. 'FORM_TYPE': {
  53857. 'value': Strophe.NS.HTTPUPLOAD,
  53858. 'type': "hidden"
  53859. }
  53860. }).pop(),
  53861. max_file_size = window.parseInt(_.get(data, 'attributes.max-file-size.value')),
  53862. slot_request_url = _.get(item, 'id');
  53863. if (!slot_request_url) {
  53864. this.messages.create({
  53865. 'message': __("Sorry, looks like file upload is not supported by your server."),
  53866. 'type': 'error'
  53867. });
  53868. return;
  53869. }
  53870. _.each(files, file => {
  53871. if (!window.isNaN(max_file_size) && window.parseInt(file.size) > max_file_size) {
  53872. return this.messages.create({
  53873. 'message': __('The size of your file, %1$s, exceeds the maximum allowed by your server, which is %2$s.', file.name, filesize(max_file_size)),
  53874. 'type': 'error'
  53875. });
  53876. } else {
  53877. this.messages.create(_.extend(this.getOutgoingMessageAttributes(), {
  53878. 'file': file,
  53879. 'progress': 0,
  53880. 'slot_request_url': slot_request_url
  53881. }));
  53882. }
  53883. });
  53884. }).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  53885. },
  53886. getReferencesFromStanza(stanza) {
  53887. const text = _.propertyOf(stanza.querySelector('body'))('textContent');
  53888. return sizzle(`reference[xmlns="${Strophe.NS.REFERENCE}"]`, stanza).map(ref => {
  53889. const begin = ref.getAttribute('begin'),
  53890. end = ref.getAttribute('end');
  53891. return {
  53892. 'begin': begin,
  53893. 'end': end,
  53894. 'type': ref.getAttribute('type'),
  53895. 'value': text.slice(begin, end),
  53896. 'uri': ref.getAttribute('uri')
  53897. };
  53898. });
  53899. },
  53900. getMessageAttributesFromStanza(stanza, original_stanza) {
  53901. /* Parses a passed in message stanza and returns an object
  53902. * of attributes.
  53903. *
  53904. * Parameters:
  53905. * (XMLElement) stanza - The message stanza
  53906. * (XMLElement) delay - The <delay> node from the
  53907. * stanza, if there was one.
  53908. * (XMLElement) original_stanza - The original stanza,
  53909. * that contains the message stanza, if it was
  53910. * contained, otherwise it's the message stanza itself.
  53911. */
  53912. const archive = sizzle(`result[xmlns="${Strophe.NS.MAM}"]`, original_stanza).pop(),
  53913. spoiler = sizzle(`spoiler[xmlns="${Strophe.NS.SPOILER}"]`, original_stanza).pop(),
  53914. delay = sizzle(`delay[xmlns="${Strophe.NS.DELAY}"]`, original_stanza).pop(),
  53915. chat_state = stanza.getElementsByTagName(_converse.COMPOSING).length && _converse.COMPOSING || stanza.getElementsByTagName(_converse.PAUSED).length && _converse.PAUSED || stanza.getElementsByTagName(_converse.INACTIVE).length && _converse.INACTIVE || stanza.getElementsByTagName(_converse.ACTIVE).length && _converse.ACTIVE || stanza.getElementsByTagName(_converse.GONE).length && _converse.GONE;
  53916. const attrs = {
  53917. 'chat_state': chat_state,
  53918. 'is_archived': !_.isNil(archive),
  53919. 'is_delayed': !_.isNil(delay),
  53920. 'is_spoiler': !_.isNil(spoiler),
  53921. 'message': _converse.chatboxes.getMessageBody(stanza) || undefined,
  53922. 'references': this.getReferencesFromStanza(stanza),
  53923. 'msgid': stanza.getAttribute('id'),
  53924. 'time': delay ? delay.getAttribute('stamp') : moment().format(),
  53925. 'type': stanza.getAttribute('type')
  53926. };
  53927. if (attrs.type === 'groupchat') {
  53928. attrs.from = stanza.getAttribute('from');
  53929. attrs.nick = Strophe.unescapeNode(Strophe.getResourceFromJid(attrs.from));
  53930. attrs.sender = attrs.nick === this.get('nick') ? 'me' : 'them';
  53931. } else {
  53932. attrs.from = Strophe.getBareJidFromJid(stanza.getAttribute('from'));
  53933. if (attrs.from === _converse.bare_jid) {
  53934. attrs.sender = 'me';
  53935. attrs.fullname = _converse.xmppstatus.get('fullname');
  53936. } else {
  53937. attrs.sender = 'them';
  53938. attrs.fullname = this.get('fullname');
  53939. }
  53940. }
  53941. _.each(sizzle(`x[xmlns="${Strophe.NS.OUTOFBAND}"]`, stanza), xform => {
  53942. attrs['oob_url'] = xform.querySelector('url').textContent;
  53943. attrs['oob_desc'] = xform.querySelector('url').textContent;
  53944. });
  53945. if (spoiler) {
  53946. attrs.spoiler_hint = spoiler.textContent.length > 0 ? spoiler.textContent : '';
  53947. }
  53948. return attrs;
  53949. },
  53950. createMessage(message, original_stanza) {
  53951. /* Create a Backbone.Message object inside this chat box
  53952. * based on the identified message stanza.
  53953. */
  53954. const that = this;
  53955. function _create(attrs) {
  53956. const is_csn = u.isOnlyChatStateNotification(attrs);
  53957. if (is_csn && (attrs.is_delayed || attrs.type === 'groupchat' && Strophe.getResourceFromJid(attrs.from) == that.get('nick'))) {
  53958. // XXX: MUC leakage
  53959. // No need showing delayed or our own CSN messages
  53960. return;
  53961. } else if (!is_csn && !attrs.file && !attrs.message && !attrs.oob_url && attrs.type !== 'error') {
  53962. // TODO: handle <subject> messages (currently being done by ChatRoom)
  53963. return;
  53964. } else {
  53965. return that.messages.create(attrs);
  53966. }
  53967. }
  53968. const result = this.getMessageAttributesFromStanza(message, original_stanza);
  53969. if (typeof result.then === "function") {
  53970. return new Promise((resolve, reject) => result.then(attrs => resolve(_create(attrs))));
  53971. } else {
  53972. const message = _create(result);
  53973. return Promise.resolve(message);
  53974. }
  53975. },
  53976. isHidden() {
  53977. /* Returns a boolean to indicate whether a newly received
  53978. * message will be visible to the user or not.
  53979. */
  53980. return this.get('hidden') || this.get('minimized') || this.isScrolledUp() || _converse.windowState === 'hidden';
  53981. },
  53982. incrementUnreadMsgCounter(message) {
  53983. /* Given a newly received message, update the unread counter if
  53984. * necessary.
  53985. */
  53986. if (!message) {
  53987. return;
  53988. }
  53989. if (_.isNil(message.get('message'))) {
  53990. return;
  53991. }
  53992. if (utils.isNewMessage(message) && this.isHidden()) {
  53993. this.save({
  53994. 'num_unread': this.get('num_unread') + 1
  53995. });
  53996. _converse.incrementMsgCounter();
  53997. }
  53998. },
  53999. clearUnreadMsgCounter() {
  54000. u.safeSave(this, {
  54001. 'num_unread': 0
  54002. });
  54003. },
  54004. isScrolledUp() {
  54005. return this.get('scrolled', true);
  54006. }
  54007. });
  54008. _converse.ChatBoxes = Backbone.Collection.extend({
  54009. comparator: 'time_opened',
  54010. model(attrs, options) {
  54011. return new _converse.ChatBox(attrs, options);
  54012. },
  54013. registerMessageHandler() {
  54014. _converse.connection.addHandler(stanza => {
  54015. this.onMessage(stanza);
  54016. return true;
  54017. }, null, 'message', 'chat');
  54018. _converse.connection.addHandler(stanza => {
  54019. this.onErrorMessage(stanza);
  54020. return true;
  54021. }, null, 'message', 'error');
  54022. },
  54023. chatBoxMayBeShown(chatbox) {
  54024. return true;
  54025. },
  54026. onChatBoxesFetched(collection) {
  54027. /* Show chat boxes upon receiving them from sessionStorage */
  54028. collection.each(chatbox => {
  54029. if (this.chatBoxMayBeShown(chatbox)) {
  54030. chatbox.trigger('show');
  54031. }
  54032. });
  54033. _converse.emit('chatBoxesFetched');
  54034. },
  54035. onConnected() {
  54036. this.browserStorage = new Backbone.BrowserStorage.session(`converse.chatboxes-${_converse.bare_jid}`);
  54037. this.registerMessageHandler();
  54038. this.fetch({
  54039. 'add': true,
  54040. 'success': this.onChatBoxesFetched.bind(this)
  54041. });
  54042. },
  54043. onErrorMessage(message) {
  54044. /* Handler method for all incoming error message stanzas
  54045. */
  54046. const from_jid = Strophe.getBareJidFromJid(message.getAttribute('from'));
  54047. if (utils.isSameBareJID(from_jid, _converse.bare_jid)) {
  54048. return true;
  54049. }
  54050. const chatbox = this.getChatBox(from_jid);
  54051. if (!chatbox) {
  54052. return true;
  54053. }
  54054. chatbox.createMessage(message, message);
  54055. return true;
  54056. },
  54057. getMessageBody(stanza) {
  54058. /* Given a message stanza, return the text contained in its body.
  54059. */
  54060. const type = stanza.getAttribute('type');
  54061. if (type === 'error') {
  54062. const error = stanza.querySelector('error');
  54063. return _.propertyOf(error.querySelector('text'))('textContent') || __('Sorry, an error occurred:') + ' ' + error.innerHTML;
  54064. } else {
  54065. return _.propertyOf(stanza.querySelector('body'))('textContent');
  54066. }
  54067. },
  54068. onMessage(stanza) {
  54069. /* Handler method for all incoming single-user chat "message"
  54070. * stanzas.
  54071. *
  54072. * Parameters:
  54073. * (XMLElement) stanza - The incoming message stanza
  54074. */
  54075. let to_jid = stanza.getAttribute('to');
  54076. const to_resource = Strophe.getResourceFromJid(to_jid);
  54077. if (_converse.filter_by_resource && to_resource && to_resource !== _converse.resource) {
  54078. _converse.log(`onMessage: Ignoring incoming message intended for a different resource: ${to_jid}`, Strophe.LogLevel.INFO);
  54079. return true;
  54080. } else if (utils.isHeadlineMessage(_converse, stanza)) {
  54081. // XXX: Ideally we wouldn't have to check for headline
  54082. // messages, but Prosody sends headline messages with the
  54083. // wrong type ('chat'), so we need to filter them out here.
  54084. _converse.log(`onMessage: Ignoring incoming headline message sent with type 'chat' from JID: ${stanza.getAttribute('from')}`, Strophe.LogLevel.INFO);
  54085. return true;
  54086. }
  54087. let from_jid = stanza.getAttribute('from');
  54088. const forwarded = stanza.querySelector('forwarded'),
  54089. original_stanza = stanza;
  54090. if (!_.isNull(forwarded)) {
  54091. const forwarded_message = forwarded.querySelector('message'),
  54092. forwarded_from = forwarded_message.getAttribute('from'),
  54093. is_carbon = !_.isNull(stanza.querySelector(`received[xmlns="${Strophe.NS.CARBONS}"]`));
  54094. if (is_carbon && Strophe.getBareJidFromJid(forwarded_from) !== from_jid) {
  54095. // Prevent message forging via carbons
  54096. // https://xmpp.org/extensions/xep-0280.html#security
  54097. return true;
  54098. }
  54099. stanza = forwarded_message;
  54100. from_jid = stanza.getAttribute('from');
  54101. to_jid = stanza.getAttribute('to');
  54102. }
  54103. const from_bare_jid = Strophe.getBareJidFromJid(from_jid),
  54104. from_resource = Strophe.getResourceFromJid(from_jid),
  54105. is_me = from_bare_jid === _converse.bare_jid;
  54106. let contact_jid;
  54107. if (is_me) {
  54108. // I am the sender, so this must be a forwarded message...
  54109. if (_.isNull(to_jid)) {
  54110. return _converse.log(`Don't know how to handle message stanza without 'to' attribute. ${stanza.outerHTML}`, Strophe.LogLevel.ERROR);
  54111. }
  54112. contact_jid = Strophe.getBareJidFromJid(to_jid);
  54113. } else {
  54114. contact_jid = from_bare_jid;
  54115. } // Get chat box, but only create a new one when the message has a body.
  54116. const attrs = {
  54117. 'fullname': _.get(_converse.api.contacts.get(contact_jid), 'attributes.fullname')
  54118. };
  54119. const chatbox = this.getChatBox(contact_jid, attrs, !_.isNull(stanza.querySelector('body')));
  54120. if (chatbox && !chatbox.handleMessageCorrection(stanza)) {
  54121. const msgid = stanza.getAttribute('id'),
  54122. message = msgid && chatbox.messages.findWhere({
  54123. msgid
  54124. });
  54125. if (!message) {
  54126. // Only create the message when we're sure it's not a duplicate
  54127. chatbox.createMessage(stanza, original_stanza).then(msg => chatbox.incrementUnreadMsgCounter(msg)).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  54128. }
  54129. }
  54130. _converse.emit('message', {
  54131. 'stanza': original_stanza,
  54132. 'chatbox': chatbox
  54133. });
  54134. return true;
  54135. },
  54136. getChatBox(jid, attrs = {}, create) {
  54137. /* Returns a chat box or optionally return a newly
  54138. * created one if one doesn't exist.
  54139. *
  54140. * Parameters:
  54141. * (String) jid - The JID of the user whose chat box we want
  54142. * (Boolean) create - Should a new chat box be created if none exists?
  54143. * (Object) attrs - Optional chat box atributes.
  54144. */
  54145. if (_.isObject(jid)) {
  54146. create = attrs;
  54147. attrs = jid;
  54148. jid = attrs.jid;
  54149. }
  54150. jid = Strophe.getBareJidFromJid(jid.toLowerCase());
  54151. let chatbox = this.get(Strophe.getBareJidFromJid(jid));
  54152. if (!chatbox && create) {
  54153. _.extend(attrs, {
  54154. 'jid': jid,
  54155. 'id': jid
  54156. });
  54157. chatbox = this.create(attrs, {
  54158. 'error'(model, response) {
  54159. _converse.log(response.responseText);
  54160. }
  54161. });
  54162. }
  54163. return chatbox;
  54164. }
  54165. });
  54166. function autoJoinChats() {
  54167. /* Automatically join private chats, based on the
  54168. * "auto_join_private_chats" configuration setting.
  54169. */
  54170. _.each(_converse.auto_join_private_chats, function (jid) {
  54171. if (_converse.chatboxes.where({
  54172. 'jid': jid
  54173. }).length) {
  54174. return;
  54175. }
  54176. if (_.isString(jid)) {
  54177. _converse.api.chats.open(jid);
  54178. } else {
  54179. _converse.log('Invalid jid criteria specified for "auto_join_private_chats"', Strophe.LogLevel.ERROR);
  54180. }
  54181. });
  54182. _converse.emit('privateChatsAutoJoined');
  54183. }
  54184. /************************ BEGIN Event Handlers ************************/
  54185. _converse.on('chatBoxesFetched', autoJoinChats);
  54186. _converse.api.waitUntil('rosterContactsFetched').then(() => {
  54187. _converse.roster.on('add', contact => {
  54188. /* When a new contact is added, check if we already have a
  54189. * chatbox open for it, and if so attach it to the chatbox.
  54190. */
  54191. const chatbox = _converse.chatboxes.findWhere({
  54192. 'jid': contact.get('jid')
  54193. });
  54194. if (chatbox) {
  54195. chatbox.addRelatedContact(contact);
  54196. }
  54197. });
  54198. });
  54199. _converse.on('addClientFeatures', () => {
  54200. _converse.api.disco.own.features.add(Strophe.NS.MESSAGE_CORRECT);
  54201. _converse.api.disco.own.features.add(Strophe.NS.HTTPUPLOAD);
  54202. _converse.api.disco.own.features.add(Strophe.NS.OUTOFBAND);
  54203. });
  54204. _converse.api.listen.on('pluginsInitialized', () => {
  54205. _converse.chatboxes = new _converse.ChatBoxes();
  54206. _converse.emit('chatBoxesInitialized');
  54207. });
  54208. _converse.api.listen.on('presencesInitialized', () => _converse.chatboxes.onConnected());
  54209. /************************ END Event Handlers ************************/
  54210. /************************ BEGIN API ************************/
  54211. _.extend(_converse.api, {
  54212. /**
  54213. * The "chats" namespace (used for one-on-one chats)
  54214. *
  54215. * @namespace _converse.api.chats
  54216. * @memberOf _converse.api
  54217. */
  54218. 'chats': {
  54219. /**
  54220. * @method _converse.api.chats.create
  54221. * @param {string|string[]} jid|jids An jid or array of jids
  54222. * @param {object} attrs An object containing configuration attributes.
  54223. */
  54224. 'create'(jids, attrs) {
  54225. if (_.isUndefined(jids)) {
  54226. _converse.log("chats.create: You need to provide at least one JID", Strophe.LogLevel.ERROR);
  54227. return null;
  54228. }
  54229. if (_.isString(jids)) {
  54230. if (attrs && !_.get(attrs, 'fullname')) {
  54231. attrs.fullname = _.get(_converse.api.contacts.get(jids), 'attributes.fullname');
  54232. }
  54233. const chatbox = _converse.chatboxes.getChatBox(jids, attrs, true);
  54234. if (_.isNil(chatbox)) {
  54235. _converse.log("Could not open chatbox for JID: " + jids, Strophe.LogLevel.ERROR);
  54236. return;
  54237. }
  54238. return chatbox;
  54239. }
  54240. return _.map(jids, jid => {
  54241. attrs.fullname = _.get(_converse.api.contacts.get(jid), 'attributes.fullname');
  54242. return _converse.chatboxes.getChatBox(jid, attrs, true).trigger('show');
  54243. });
  54244. },
  54245. /**
  54246. * Opens a new one-on-one chat.
  54247. *
  54248. * @method _converse.api.chats.open
  54249. * @param {String|string[]} name - e.g. 'buddy@example.com' or ['buddy1@example.com', 'buddy2@example.com']
  54250. * @returns {Promise} Promise which resolves with the Backbone.Model representing the chat.
  54251. *
  54252. * @example
  54253. * // To open a single chat, provide the JID of the contact you're chatting with in that chat:
  54254. * converse.plugins.add('myplugin', {
  54255. * initialize: function() {
  54256. * var _converse = this._converse;
  54257. * // Note, buddy@example.org must be in your contacts roster!
  54258. * _converse.api.chats.open('buddy@example.com').then((chat) => {
  54259. * // Now you can do something with the chat model
  54260. * });
  54261. * }
  54262. * });
  54263. *
  54264. * @example
  54265. * // To open an array of chats, provide an array of JIDs:
  54266. * converse.plugins.add('myplugin', {
  54267. * initialize: function () {
  54268. * var _converse = this._converse;
  54269. * // Note, these users must first be in your contacts roster!
  54270. * _converse.api.chats.open(['buddy1@example.com', 'buddy2@example.com']).then((chats) => {
  54271. * // Now you can do something with the chat models
  54272. * });
  54273. * }
  54274. * });
  54275. *
  54276. */
  54277. 'open'(jids, attrs) {
  54278. return new Promise((resolve, reject) => {
  54279. Promise.all([_converse.api.waitUntil('rosterContactsFetched'), _converse.api.waitUntil('chatBoxesFetched')]).then(() => {
  54280. if (_.isUndefined(jids)) {
  54281. const err_msg = "chats.open: You need to provide at least one JID";
  54282. _converse.log(err_msg, Strophe.LogLevel.ERROR);
  54283. reject(new Error(err_msg));
  54284. } else if (_.isString(jids)) {
  54285. resolve(_converse.api.chats.create(jids, attrs).trigger('show'));
  54286. } else {
  54287. resolve(_.map(jids, jid => _converse.api.chats.create(jid, attrs).trigger('show')));
  54288. }
  54289. }).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  54290. });
  54291. },
  54292. /**
  54293. * Returns a chat model. The chat should already be open.
  54294. *
  54295. * @method _converse.api.chats.get
  54296. * @param {String|string[]} name - e.g. 'buddy@example.com' or ['buddy1@example.com', 'buddy2@example.com']
  54297. * @returns {Backbone.Model}
  54298. *
  54299. * @example
  54300. * // To return a single chat, provide the JID of the contact you're chatting with in that chat:
  54301. * const model = _converse.api.chats.get('buddy@example.com');
  54302. *
  54303. * @example
  54304. * // To return an array of chats, provide an array of JIDs:
  54305. * const models = _converse.api.chats.get(['buddy1@example.com', 'buddy2@example.com']);
  54306. *
  54307. * @example
  54308. * // To return all open chats, call the method without any parameters::
  54309. * const models = _converse.api.chats.get();
  54310. *
  54311. */
  54312. 'get'(jids) {
  54313. if (_.isUndefined(jids)) {
  54314. const result = [];
  54315. _converse.chatboxes.each(function (chatbox) {
  54316. // FIXME: Leaky abstraction from MUC. We need to add a
  54317. // base type for chat boxes, and check for that.
  54318. if (chatbox.get('type') !== _converse.CHATROOMS_TYPE) {
  54319. result.push(chatbox);
  54320. }
  54321. });
  54322. return result;
  54323. } else if (_.isString(jids)) {
  54324. return _converse.chatboxes.getChatBox(jids);
  54325. }
  54326. return _.map(jids, _.partial(_converse.chatboxes.getChatBox.bind(_converse.chatboxes), _, {}, true));
  54327. }
  54328. }
  54329. });
  54330. /************************ END API ************************/
  54331. }
  54332. });
  54333. return converse;
  54334. });
  54335. /***/ }),
  54336. /***/ "./src/converse-chatboxviews.js":
  54337. /*!**************************************!*\
  54338. !*** ./src/converse-chatboxviews.js ***!
  54339. \**************************************/
  54340. /*! no static exports found */
  54341. /***/ (function(module, exports, __webpack_require__) {
  54342. "use strict";
  54343. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  54344. // Converse.js
  54345. // http://conversejs.org
  54346. //
  54347. // Copyright (c) 2012-2018, the Converse.js developers
  54348. // Licensed under the Mozilla Public License (MPLv2)
  54349. (function (root, factory) {
  54350. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! templates/chatboxes.html */ "./src/templates/chatboxes.html"), __webpack_require__(/*! converse-chatboxes */ "./src/converse-chatboxes.js"), __webpack_require__(/*! backbone.overview */ "./node_modules/backbone.overview/backbone.overview.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  54351. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  54352. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  54353. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  54354. })(void 0, function (converse, tpl_chatboxes) {
  54355. "use strict";
  54356. const _converse$env = converse.env,
  54357. Backbone = _converse$env.Backbone,
  54358. _ = _converse$env._;
  54359. const AvatarMixin = {
  54360. renderAvatar() {
  54361. const canvas_el = this.el.querySelector('canvas');
  54362. if (_.isNull(canvas_el)) {
  54363. return;
  54364. }
  54365. const image_type = this.model.vcard.get('image_type'),
  54366. image = this.model.vcard.get('image'),
  54367. img_src = "data:" + image_type + ";base64," + image,
  54368. img = new Image();
  54369. img.onload = () => {
  54370. const ctx = canvas_el.getContext('2d'),
  54371. ratio = img.width / img.height;
  54372. ctx.clearRect(0, 0, canvas_el.width, canvas_el.height);
  54373. if (ratio < 1) {
  54374. const scaled_img_with = canvas_el.width * ratio,
  54375. x = Math.floor((canvas_el.width - scaled_img_with) / 2);
  54376. ctx.drawImage(img, x, 0, scaled_img_with, canvas_el.height);
  54377. } else {
  54378. ctx.drawImage(img, 0, 0, canvas_el.width, canvas_el.height * ratio);
  54379. }
  54380. };
  54381. img.src = img_src;
  54382. }
  54383. };
  54384. converse.plugins.add('converse-chatboxviews', {
  54385. dependencies: ["converse-chatboxes"],
  54386. overrides: {
  54387. // Overrides mentioned here will be picked up by converse.js's
  54388. // plugin architecture they will replace existing methods on the
  54389. // relevant objects or classes.
  54390. initStatus: function initStatus(reconnecting) {
  54391. const _converse = this.__super__._converse;
  54392. if (!reconnecting) {
  54393. _converse.chatboxviews.closeAllChatBoxes();
  54394. }
  54395. return this.__super__.initStatus.apply(this, arguments);
  54396. }
  54397. },
  54398. initialize() {
  54399. /* The initialize function gets called as soon as the plugin is
  54400. * loaded by converse.js's plugin machinery.
  54401. */
  54402. const _converse = this._converse,
  54403. __ = _converse.__;
  54404. _converse.api.promises.add(['chatBoxViewsInitialized']);
  54405. _converse.ViewWithAvatar = Backbone.NativeView.extend(AvatarMixin);
  54406. _converse.VDOMViewWithAvatar = Backbone.VDOMView.extend(AvatarMixin);
  54407. _converse.ChatBoxViews = Backbone.Overview.extend({
  54408. _ensureElement() {
  54409. /* Override method from backbone.js
  54410. * If the #conversejs element doesn't exist, create it.
  54411. */
  54412. if (!this.el) {
  54413. let el = _converse.root.querySelector('#conversejs');
  54414. if (_.isNull(el)) {
  54415. el = document.createElement('div');
  54416. el.setAttribute('id', 'conversejs');
  54417. const body = _converse.root.querySelector('body');
  54418. if (body) {
  54419. body.appendChild(el);
  54420. } else {
  54421. // Perhaps inside a web component?
  54422. _converse.root.appendChild(el);
  54423. }
  54424. }
  54425. el.innerHTML = '';
  54426. this.setElement(el, false);
  54427. } else {
  54428. this.setElement(_.result(this, 'el'), false);
  54429. }
  54430. },
  54431. initialize() {
  54432. this.model.on("destroy", this.removeChat, this);
  54433. this.el.classList.add(`converse-${_converse.view_mode}`);
  54434. this.render();
  54435. },
  54436. render() {
  54437. try {
  54438. this.el.innerHTML = tpl_chatboxes();
  54439. } catch (e) {
  54440. this._ensureElement();
  54441. this.el.innerHTML = tpl_chatboxes();
  54442. }
  54443. this.row_el = this.el.querySelector('.row');
  54444. },
  54445. insertRowColumn(el) {
  54446. /* Add a new DOM element (likely a chat box) into the
  54447. * the row managed by this overview.
  54448. */
  54449. this.row_el.insertAdjacentElement('afterBegin', el);
  54450. },
  54451. removeChat(item) {
  54452. this.remove(item.get('id'));
  54453. },
  54454. closeAllChatBoxes() {
  54455. /* This method gets overridden in src/converse-controlbox.js if
  54456. * the controlbox plugin is active.
  54457. */
  54458. this.each(function (view) {
  54459. view.close();
  54460. });
  54461. return this;
  54462. },
  54463. chatBoxMayBeShown(chatbox) {
  54464. return this.model.chatBoxMayBeShown(chatbox);
  54465. }
  54466. });
  54467. /************************ BEGIN Event Handlers ************************/
  54468. _converse.api.waitUntil('rosterContactsFetched').then(() => {
  54469. _converse.roster.on('add', contact => {
  54470. /* When a new contact is added, check if we already have a
  54471. * chatbox open for it, and if so attach it to the chatbox.
  54472. */
  54473. const chatbox = _converse.chatboxes.findWhere({
  54474. 'jid': contact.get('jid')
  54475. });
  54476. if (chatbox) {
  54477. chatbox.addRelatedContact(contact);
  54478. }
  54479. });
  54480. });
  54481. _converse.api.listen.on('chatBoxesInitialized', () => {
  54482. _converse.chatboxviews = new _converse.ChatBoxViews({
  54483. 'model': _converse.chatboxes
  54484. });
  54485. _converse.emit('chatBoxViewsInitialized');
  54486. });
  54487. _converse.api.listen.on('clearSession', () => _converse.chatboxviews.closeAllChatBoxes());
  54488. /************************ END Event Handlers ************************/
  54489. }
  54490. });
  54491. return converse;
  54492. });
  54493. /***/ }),
  54494. /***/ "./src/converse-chatview.js":
  54495. /*!**********************************!*\
  54496. !*** ./src/converse-chatview.js ***!
  54497. \**********************************/
  54498. /*! no static exports found */
  54499. /***/ (function(module, exports, __webpack_require__) {
  54500. "use strict";
  54501. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  54502. // Converse.js
  54503. // http://conversejs.org
  54504. //
  54505. // Copyright (c) 2012-2018, the Converse.js developers
  54506. // Licensed under the Mozilla Public License (MPLv2)
  54507. (function (root, factory) {
  54508. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! utils/emoji */ "./src/utils/emoji.js"), __webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! bootstrap */ "./node_modules/bootstrap.native/dist/bootstrap-native-v4.js"), __webpack_require__(/*! twemoji */ "./node_modules/twemoji/2/esm.js"), __webpack_require__(/*! xss */ "./node_modules/xss/dist/xss.js"), __webpack_require__(/*! templates/chatbox.html */ "./src/templates/chatbox.html"), __webpack_require__(/*! templates/chatbox_head.html */ "./src/templates/chatbox_head.html"), __webpack_require__(/*! templates/chatbox_message_form.html */ "./src/templates/chatbox_message_form.html"), __webpack_require__(/*! templates/emojis.html */ "./src/templates/emojis.html"), __webpack_require__(/*! templates/error_message.html */ "./src/templates/error_message.html"), __webpack_require__(/*! templates/help_message.html */ "./src/templates/help_message.html"), __webpack_require__(/*! templates/info.html */ "./src/templates/info.html"), __webpack_require__(/*! templates/new_day.html */ "./src/templates/new_day.html"), __webpack_require__(/*! templates/user_details_modal.html */ "./src/templates/user_details_modal.html"), __webpack_require__(/*! templates/toolbar_fileupload.html */ "./src/templates/toolbar_fileupload.html"), __webpack_require__(/*! templates/spinner.html */ "./src/templates/spinner.html"), __webpack_require__(/*! templates/spoiler_button.html */ "./src/templates/spoiler_button.html"), __webpack_require__(/*! templates/status_message.html */ "./src/templates/status_message.html"), __webpack_require__(/*! templates/toolbar.html */ "./src/templates/toolbar.html"), __webpack_require__(/*! converse-modal */ "./src/converse-modal.js"), __webpack_require__(/*! converse-chatboxviews */ "./src/converse-chatboxviews.js"), __webpack_require__(/*! converse-message-view */ "./src/converse-message-view.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  54509. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  54510. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  54511. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  54512. })(void 0, function (u, converse, bootstrap, twemoji, xss, tpl_chatbox, tpl_chatbox_head, tpl_chatbox_message_form, tpl_emojis, tpl_error_message, tpl_help_message, tpl_info, tpl_new_day, tpl_user_details_modal, tpl_toolbar_fileupload, tpl_spinner, tpl_spoiler_button, tpl_status_message, tpl_toolbar) {
  54513. "use strict";
  54514. const _converse$env = converse.env,
  54515. $msg = _converse$env.$msg,
  54516. Backbone = _converse$env.Backbone,
  54517. Promise = _converse$env.Promise,
  54518. Strophe = _converse$env.Strophe,
  54519. _ = _converse$env._,
  54520. b64_sha1 = _converse$env.b64_sha1,
  54521. f = _converse$env.f,
  54522. sizzle = _converse$env.sizzle,
  54523. moment = _converse$env.moment;
  54524. converse.plugins.add('converse-chatview', {
  54525. /* Plugin dependencies are other plugins which might be
  54526. * overridden or relied upon, and therefore need to be loaded before
  54527. * this plugin.
  54528. *
  54529. * If the setting "strict_plugin_dependencies" is set to true,
  54530. * an error will be raised if the plugin is not found. By default it's
  54531. * false, which means these plugins are only loaded opportunistically.
  54532. *
  54533. * NB: These plugins need to have already been loaded via require.js.
  54534. */
  54535. dependencies: ["converse-chatboxviews", "converse-disco", "converse-message-view", "converse-modal"],
  54536. initialize() {
  54537. /* The initialize function gets called as soon as the plugin is
  54538. * loaded by converse.js's plugin machinery.
  54539. */
  54540. const _converse = this._converse,
  54541. __ = _converse.__;
  54542. _converse.api.settings.update({
  54543. 'emoji_image_path': twemoji.default.base,
  54544. 'show_send_button': false,
  54545. 'show_toolbar': true,
  54546. 'time_format': 'HH:mm',
  54547. 'use_system_emojis': true,
  54548. 'visible_toolbar_buttons': {
  54549. 'call': false,
  54550. 'clear': true,
  54551. 'emoji': true,
  54552. 'spoiler': true
  54553. }
  54554. });
  54555. twemoji.default.base = _converse.emoji_image_path;
  54556. function onWindowStateChanged(data) {
  54557. if (_converse.chatboxviews) {
  54558. _converse.chatboxviews.each(view => view.onWindowStateChanged(data.state));
  54559. }
  54560. }
  54561. _converse.api.listen.on('windowStateChanged', onWindowStateChanged);
  54562. _converse.EmojiPicker = Backbone.Model.extend({
  54563. defaults: {
  54564. 'current_category': 'people',
  54565. 'current_skintone': '',
  54566. 'scroll_position': 0
  54567. }
  54568. });
  54569. _converse.EmojiPickerView = Backbone.VDOMView.extend({
  54570. className: 'emoji-picker-container',
  54571. events: {
  54572. 'click .emoji-category-picker li.emoji-category': 'chooseCategory',
  54573. 'click .emoji-skintone-picker li.emoji-skintone': 'chooseSkinTone'
  54574. },
  54575. initialize() {
  54576. this.model.on('change:current_skintone', this.render, this);
  54577. this.model.on('change:current_category', this.render, this);
  54578. },
  54579. toHTML() {
  54580. return tpl_emojis(_.extend(this.model.toJSON(), {
  54581. '_': _,
  54582. 'transform': u.getEmojiRenderer(_converse),
  54583. 'emojis_by_category': u.getEmojisByCategory(_converse),
  54584. 'toned_emojis': u.getTonedEmojis(_converse),
  54585. 'skintones': ['tone1', 'tone2', 'tone3', 'tone4', 'tone5'],
  54586. 'shouldBeHidden': this.shouldBeHidden
  54587. }));
  54588. },
  54589. shouldBeHidden(shortname, current_skintone, toned_emojis) {
  54590. /* Helper method for the template which decides whether an
  54591. * emoji should be hidden, based on which skin tone is
  54592. * currently being applied.
  54593. */
  54594. if (_.includes(shortname, '_tone')) {
  54595. if (!current_skintone || !_.includes(shortname, current_skintone)) {
  54596. return true;
  54597. }
  54598. } else {
  54599. if (current_skintone && _.includes(toned_emojis, shortname)) {
  54600. return true;
  54601. }
  54602. }
  54603. return false;
  54604. },
  54605. chooseSkinTone(ev) {
  54606. ev.preventDefault();
  54607. ev.stopPropagation();
  54608. const target = ev.target.nodeName === 'IMG' ? ev.target.parentElement : ev.target;
  54609. const skintone = target.getAttribute("data-skintone").trim();
  54610. if (this.model.get('current_skintone') === skintone) {
  54611. this.model.save({
  54612. 'current_skintone': ''
  54613. });
  54614. } else {
  54615. this.model.save({
  54616. 'current_skintone': skintone
  54617. });
  54618. }
  54619. },
  54620. chooseCategory(ev) {
  54621. ev.preventDefault();
  54622. ev.stopPropagation();
  54623. const target = ev.target.nodeName === 'IMG' ? ev.target.parentElement : ev.target;
  54624. const category = target.getAttribute("data-category").trim();
  54625. this.model.save({
  54626. 'current_category': category,
  54627. 'scroll_position': 0
  54628. });
  54629. }
  54630. });
  54631. _converse.ChatBoxHeading = _converse.ViewWithAvatar.extend({
  54632. initialize() {
  54633. this.model.on('change:status', this.onStatusMessageChanged, this);
  54634. this.model.vcard.on('change', this.render, this);
  54635. },
  54636. render() {
  54637. this.el.innerHTML = tpl_chatbox_head(_.extend(this.model.vcard.toJSON(), this.model.toJSON(), {
  54638. '_converse': _converse,
  54639. 'info_close': __('Close this chat box')
  54640. }));
  54641. this.renderAvatar();
  54642. return this;
  54643. },
  54644. onStatusMessageChanged(item) {
  54645. this.render();
  54646. _converse.emit('contactStatusMessageChanged', {
  54647. 'contact': item.attributes,
  54648. 'message': item.get('status')
  54649. });
  54650. }
  54651. });
  54652. _converse.UserDetailsModal = _converse.BootstrapModal.extend({
  54653. events: {
  54654. 'click button.remove-contact': 'removeContact',
  54655. 'click button.refresh-contact': 'refreshContact',
  54656. 'click .fingerprint-trust .btn input': 'toggleDeviceTrust'
  54657. },
  54658. initialize() {
  54659. _converse.BootstrapModal.prototype.initialize.apply(this, arguments);
  54660. this.model.on('contactAdded', this.registerContactEventHandlers, this);
  54661. this.model.on('change', this.render, this);
  54662. this.registerContactEventHandlers();
  54663. _converse.emit('userDetailsModalInitialized', this.model);
  54664. },
  54665. toHTML() {
  54666. return tpl_user_details_modal(_.extend(this.model.toJSON(), this.model.vcard.toJSON(), {
  54667. '_': _,
  54668. '__': __,
  54669. 'view': this,
  54670. '_converse': _converse,
  54671. 'allow_contact_removal': _converse.allow_contact_removal,
  54672. 'display_name': this.model.getDisplayName(),
  54673. 'is_roster_contact': !_.isUndefined(this.model.contact),
  54674. 'utils': u
  54675. }));
  54676. },
  54677. registerContactEventHandlers() {
  54678. if (!_.isUndefined(this.model.contact)) {
  54679. this.model.contact.on('change', this.render, this);
  54680. this.model.contact.vcard.on('change', this.render, this);
  54681. this.model.contact.on('destroy', () => {
  54682. delete this.model.contact;
  54683. this.render();
  54684. });
  54685. }
  54686. },
  54687. refreshContact(ev) {
  54688. if (ev && ev.preventDefault) {
  54689. ev.preventDefault();
  54690. }
  54691. const refresh_icon = this.el.querySelector('.fa-refresh');
  54692. u.addClass('fa-spin', refresh_icon);
  54693. _converse.api.vcard.update(this.model.contact.vcard, true).then(() => u.removeClass('fa-spin', refresh_icon)).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  54694. },
  54695. removeContact(ev) {
  54696. if (ev && ev.preventDefault) {
  54697. ev.preventDefault();
  54698. }
  54699. if (!_converse.allow_contact_removal) {
  54700. return;
  54701. }
  54702. const result = confirm(__("Are you sure you want to remove this contact?"));
  54703. if (result === true) {
  54704. this.modal.hide();
  54705. this.model.contact.removeFromRoster(iq => {
  54706. this.model.contact.destroy();
  54707. }, err => {
  54708. _converse.log(err, Strophe.LogLevel.ERROR);
  54709. _converse.api.alert.show(Strophe.LogLevel.ERROR, __('Error'), [__('Sorry, there was an error while trying to remove %1$s as a contact.', this.model.contact.getDisplayName())]);
  54710. });
  54711. }
  54712. }
  54713. });
  54714. _converse.ChatBoxView = Backbone.NativeView.extend({
  54715. length: 200,
  54716. className: 'chatbox hidden',
  54717. is_chatroom: false,
  54718. // Leaky abstraction from MUC
  54719. events: {
  54720. 'change input.fileupload': 'onFileSelection',
  54721. 'click .chat-msg__action-edit': 'onMessageEditButtonClicked',
  54722. 'click .chatbox-navback': 'showControlBox',
  54723. 'click .close-chatbox-button': 'close',
  54724. 'click .new-msgs-indicator': 'viewUnreadMessages',
  54725. 'click .send-button': 'onFormSubmitted',
  54726. 'click .show-user-details-modal': 'showUserDetailsModal',
  54727. 'click .spoiler-toggle': 'toggleSpoilerMessage',
  54728. 'click .toggle-call': 'toggleCall',
  54729. 'click .toggle-clear': 'clearMessages',
  54730. 'click .toggle-compose-spoiler': 'toggleComposeSpoilerMessage',
  54731. 'click .toggle-smiley ul.emoji-picker li': 'insertEmoji',
  54732. 'click .toggle-smiley': 'toggleEmojiMenu',
  54733. 'click .upload-file': 'toggleFileUpload',
  54734. 'input .chat-textarea': 'inputChanged',
  54735. 'keydown .chat-textarea': 'keyPressed'
  54736. },
  54737. initialize() {
  54738. this.initDebounced();
  54739. this.model.messages.on('add', this.onMessageAdded, this);
  54740. this.model.messages.on('rendered', this.scrollDown, this);
  54741. this.model.on('show', this.show, this);
  54742. this.model.on('destroy', this.remove, this);
  54743. this.model.presence.on('change:show', this.onPresenceChanged, this);
  54744. this.model.on('showHelpMessages', this.showHelpMessages, this);
  54745. this.render();
  54746. this.fetchMessages();
  54747. _converse.emit('chatBoxOpened', this);
  54748. _converse.emit('chatBoxInitialized', this);
  54749. },
  54750. initDebounced() {
  54751. this.scrollDown = _.debounce(this._scrollDown, 250);
  54752. this.markScrolled = _.debounce(this._markScrolled, 100);
  54753. this.show = _.debounce(this._show, 250, {
  54754. 'leading': true
  54755. });
  54756. },
  54757. render() {
  54758. // XXX: Is this still needed?
  54759. this.el.setAttribute('id', this.model.get('box_id'));
  54760. this.el.innerHTML = tpl_chatbox(_.extend(this.model.toJSON(), {
  54761. 'unread_msgs': __('You have unread messages')
  54762. }));
  54763. this.content = this.el.querySelector('.chat-content');
  54764. this.renderMessageForm();
  54765. this.insertHeading();
  54766. return this;
  54767. },
  54768. renderToolbar(toolbar, options) {
  54769. if (!_converse.show_toolbar) {
  54770. return this;
  54771. }
  54772. toolbar = toolbar || tpl_toolbar;
  54773. options = _.assign(this.model.toJSON(), this.getToolbarOptions(options || {}));
  54774. this.el.querySelector('.chat-toolbar').innerHTML = toolbar(options);
  54775. this.addSpoilerButton(options);
  54776. this.addFileUploadButton();
  54777. _converse.emit('renderToolbar', this);
  54778. return this;
  54779. },
  54780. renderMessageForm() {
  54781. let placeholder;
  54782. if (this.model.get('composing_spoiler')) {
  54783. placeholder = __('Hidden message');
  54784. } else {
  54785. placeholder = __('Message');
  54786. }
  54787. const form_container = this.el.querySelector('.message-form-container');
  54788. form_container.innerHTML = tpl_chatbox_message_form(_.extend(this.model.toJSON(), {
  54789. 'hint_value': _.get(this.el.querySelector('.spoiler-hint'), 'value'),
  54790. 'label_message': placeholder,
  54791. 'label_send': __('Send'),
  54792. 'label_spoiler_hint': __('Optional hint'),
  54793. 'message_value': _.get(this.el.querySelector('.chat-textarea'), 'value'),
  54794. 'show_send_button': _converse.show_send_button,
  54795. 'show_toolbar': _converse.show_toolbar,
  54796. 'unread_msgs': __('You have unread messages')
  54797. }));
  54798. this.renderToolbar();
  54799. },
  54800. showControlBox() {
  54801. // Used in mobile view, to navigate back to the controlbox
  54802. const view = _converse.chatboxviews.get('controlbox');
  54803. view.show();
  54804. this.hide();
  54805. },
  54806. showUserDetailsModal(ev) {
  54807. ev.preventDefault();
  54808. if (_.isUndefined(this.user_details_modal)) {
  54809. this.user_details_modal = new _converse.UserDetailsModal({
  54810. model: this.model
  54811. });
  54812. }
  54813. this.user_details_modal.show(ev);
  54814. },
  54815. toggleFileUpload(ev) {
  54816. this.el.querySelector('input.fileupload').click();
  54817. },
  54818. onFileSelection(evt) {
  54819. this.model.sendFiles(evt.target.files);
  54820. },
  54821. addFileUploadButton(options) {
  54822. _converse.api.disco.supports(Strophe.NS.HTTPUPLOAD, _converse.domain).then(result => {
  54823. if (result.length) {
  54824. this.el.querySelector('.chat-toolbar').insertAdjacentHTML('beforeend', tpl_toolbar_fileupload({
  54825. 'tooltip_upload_file': __('Choose a file to send')
  54826. }));
  54827. }
  54828. }).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  54829. },
  54830. addSpoilerButton(options) {
  54831. /* Asynchronously adds a button for writing spoiler
  54832. * messages, based on whether the contact's client supports
  54833. * it.
  54834. */
  54835. if (!options.show_spoiler_button || this.model.get('type') === 'chatroom') {
  54836. return;
  54837. }
  54838. const contact_jid = this.model.get('jid');
  54839. const resources = this.model.presence.get('resources');
  54840. if (_.isEmpty(resources)) {
  54841. return;
  54842. }
  54843. Promise.all(_.map(_.keys(resources), resource => _converse.api.disco.supports(Strophe.NS.SPOILER, `${contact_jid}/${resource}`))).then(results => {
  54844. if (_.filter(results, 'length').length) {
  54845. const html = tpl_spoiler_button(this.model.toJSON());
  54846. if (_converse.visible_toolbar_buttons.emoji) {
  54847. this.el.querySelector('.toggle-smiley').insertAdjacentHTML('afterEnd', html);
  54848. } else {
  54849. this.el.querySelector('.chat-toolbar').insertAdjacentHTML('afterBegin', html);
  54850. }
  54851. }
  54852. }).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  54853. },
  54854. insertHeading() {
  54855. this.heading = new _converse.ChatBoxHeading({
  54856. 'model': this.model
  54857. });
  54858. this.heading.render();
  54859. this.heading.chatview = this;
  54860. if (!_.isUndefined(this.model.contact)) {
  54861. this.model.contact.on('destroy', this.heading.render, this);
  54862. }
  54863. const flyout = this.el.querySelector('.flyout');
  54864. flyout.insertBefore(this.heading.el, flyout.querySelector('.chat-body'));
  54865. return this;
  54866. },
  54867. getToolbarOptions(options) {
  54868. let label_toggle_spoiler;
  54869. if (this.model.get('composing_spoiler')) {
  54870. label_toggle_spoiler = __('Click to write as a normal (non-spoiler) message');
  54871. } else {
  54872. label_toggle_spoiler = __('Click to write your message as a spoiler');
  54873. }
  54874. return _.extend(options || {}, {
  54875. 'label_clear': __('Clear all messages'),
  54876. 'tooltip_insert_smiley': __('Insert emojis'),
  54877. 'tooltip_start_call': __('Start a call'),
  54878. 'label_toggle_spoiler': label_toggle_spoiler,
  54879. 'show_call_button': _converse.visible_toolbar_buttons.call,
  54880. 'show_spoiler_button': _converse.visible_toolbar_buttons.spoiler,
  54881. 'use_emoji': _converse.visible_toolbar_buttons.emoji
  54882. });
  54883. },
  54884. afterMessagesFetched() {
  54885. this.insertIntoDOM();
  54886. this.scrollDown();
  54887. this.content.addEventListener('scroll', this.markScrolled.bind(this));
  54888. _converse.emit('afterMessagesFetched', this);
  54889. },
  54890. fetchMessages() {
  54891. this.model.messages.fetch({
  54892. 'add': true,
  54893. 'success': this.afterMessagesFetched.bind(this),
  54894. 'error': this.afterMessagesFetched.bind(this)
  54895. });
  54896. return this;
  54897. },
  54898. insertIntoDOM() {
  54899. /* This method gets overridden in src/converse-controlbox.js
  54900. * as well as src/converse-muc.js (if those plugins are
  54901. * enabled).
  54902. */
  54903. _converse.chatboxviews.insertRowColumn(this.el);
  54904. return this;
  54905. },
  54906. showChatEvent(message) {
  54907. const isodate = moment().format();
  54908. this.content.insertAdjacentHTML('beforeend', tpl_info({
  54909. 'extra_classes': 'chat-event',
  54910. 'message': message,
  54911. 'isodate': isodate
  54912. }));
  54913. this.insertDayIndicator(this.content.lastElementChild);
  54914. this.scrollDown();
  54915. return isodate;
  54916. },
  54917. showErrorMessage(message) {
  54918. this.content.insertAdjacentHTML('beforeend', tpl_error_message({
  54919. 'message': message,
  54920. 'isodate': moment().format()
  54921. }));
  54922. this.scrollDown();
  54923. },
  54924. addSpinner(append = false) {
  54925. if (_.isNull(this.el.querySelector('.spinner'))) {
  54926. if (append) {
  54927. this.content.insertAdjacentHTML('beforeend', tpl_spinner());
  54928. this.scrollDown();
  54929. } else {
  54930. this.content.insertAdjacentHTML('afterbegin', tpl_spinner());
  54931. }
  54932. }
  54933. },
  54934. clearSpinner() {
  54935. _.each(this.content.querySelectorAll('span.spinner'), el => el.parentNode.removeChild(el));
  54936. },
  54937. insertDayIndicator(next_msg_el) {
  54938. /* Inserts an indicator into the chat area, showing the
  54939. * day as given by the passed in date.
  54940. *
  54941. * The indicator is only inserted if necessary.
  54942. *
  54943. * Parameters:
  54944. * (HTMLElement) next_msg_el - The message element before
  54945. * which the day indicator element must be inserted.
  54946. * This element must have a "data-isodate" attribute
  54947. * which specifies its creation date.
  54948. */
  54949. const prev_msg_el = u.getPreviousElement(next_msg_el, ".message:not(.chat-state-notification)"),
  54950. prev_msg_date = _.isNull(prev_msg_el) ? null : prev_msg_el.getAttribute('data-isodate'),
  54951. next_msg_date = next_msg_el.getAttribute('data-isodate');
  54952. if (_.isNull(prev_msg_date) || moment(next_msg_date).isAfter(prev_msg_date, 'day')) {
  54953. const day_date = moment(next_msg_date).startOf('day');
  54954. next_msg_el.insertAdjacentHTML('beforeBegin', tpl_new_day({
  54955. 'isodate': day_date.format(),
  54956. 'datestring': day_date.format("dddd MMM Do YYYY")
  54957. }));
  54958. }
  54959. },
  54960. getLastMessageDate(cutoff) {
  54961. /* Return the ISO8601 format date of the latest message.
  54962. *
  54963. * Parameters:
  54964. * (Object) cutoff: Moment Date cutoff date. The last
  54965. * message received cutoff this date will be returned.
  54966. */
  54967. const first_msg = u.getFirstChildElement(this.content, '.message:not(.chat-state-notification)'),
  54968. oldest_date = first_msg ? first_msg.getAttribute('data-isodate') : null;
  54969. if (!_.isNull(oldest_date) && moment(oldest_date).isAfter(cutoff)) {
  54970. return null;
  54971. }
  54972. const last_msg = u.getLastChildElement(this.content, '.message:not(.chat-state-notification)'),
  54973. most_recent_date = last_msg ? last_msg.getAttribute('data-isodate') : null;
  54974. if (_.isNull(most_recent_date) || moment(most_recent_date).isBefore(cutoff)) {
  54975. return most_recent_date;
  54976. }
  54977. /* XXX: We avoid .chat-state-notification messages, since they are
  54978. * temporary and get removed once a new element is
  54979. * inserted into the chat area, so we don't query for
  54980. * them here, otherwise we get a null reference later
  54981. * upon element insertion.
  54982. */
  54983. const msg_dates = _.invokeMap(sizzle('.message:not(.chat-state-notification)', this.content), Element.prototype.getAttribute, 'data-isodate');
  54984. if (_.isObject(cutoff)) {
  54985. cutoff = cutoff.format();
  54986. }
  54987. msg_dates.push(cutoff);
  54988. msg_dates.sort();
  54989. const idx = msg_dates.lastIndexOf(cutoff);
  54990. if (idx === 0) {
  54991. return null;
  54992. } else {
  54993. return msg_dates[idx - 1];
  54994. }
  54995. },
  54996. setScrollPosition(message_el) {
  54997. /* Given a newly inserted message, determine whether we
  54998. * should keep the scrollbar in place (so as to not scroll
  54999. * up when using infinite scroll).
  55000. */
  55001. if (this.model.get('scrolled')) {
  55002. const next_msg_el = u.getNextElement(message_el, ".chat-msg");
  55003. if (next_msg_el) {
  55004. // The currently received message is not new, there
  55005. // are newer messages after it. So let's see if we
  55006. // should maintain our current scroll position.
  55007. if (this.content.scrollTop === 0 || this.model.get('top_visible_message')) {
  55008. const top_visible_message = this.model.get('top_visible_message') || next_msg_el;
  55009. this.model.set('top_visible_message', top_visible_message);
  55010. this.content.scrollTop = top_visible_message.offsetTop - 30;
  55011. }
  55012. }
  55013. } else {
  55014. this.scrollDown();
  55015. }
  55016. },
  55017. showHelpMessages(msgs, type, spinner) {
  55018. _.each(msgs, msg => {
  55019. this.content.insertAdjacentHTML('beforeend', tpl_help_message({
  55020. 'isodate': moment().format(),
  55021. 'type': type,
  55022. 'message': xss.filterXSS(msg, {
  55023. 'whiteList': {
  55024. 'strong': []
  55025. }
  55026. })
  55027. }));
  55028. });
  55029. if (spinner === true) {
  55030. this.addSpinner();
  55031. } else if (spinner === false) {
  55032. this.clearSpinner();
  55033. }
  55034. return this.scrollDown();
  55035. },
  55036. clearChatStateNotification(message, isodate) {
  55037. if (isodate) {
  55038. _.each(sizzle(`.chat-state-notification[data-csn="${message.get('from')}"][data-isodate="${isodate}"]`, this.content), u.removeElement);
  55039. } else {
  55040. _.each(sizzle(`.chat-state-notification[data-csn="${message.get('from')}"]`, this.content), u.removeElement);
  55041. }
  55042. },
  55043. shouldShowOnTextMessage() {
  55044. return !u.isVisible(this.el);
  55045. },
  55046. insertMessage(view) {
  55047. /* Given a view representing a message, insert it into the
  55048. * content area of the chat box.
  55049. *
  55050. * Parameters:
  55051. * (Backbone.View) message: The message Backbone.View
  55052. */
  55053. if (view.model.get('type') === 'error') {
  55054. const previous_msg_el = this.content.querySelector(`[data-msgid="${view.model.get('msgid')}"]`);
  55055. if (previous_msg_el) {
  55056. return previous_msg_el.insertAdjacentElement('afterend', view.el);
  55057. }
  55058. }
  55059. const current_msg_date = moment(view.model.get('time')) || moment,
  55060. previous_msg_date = this.getLastMessageDate(current_msg_date);
  55061. if (_.isNull(previous_msg_date)) {
  55062. this.content.insertAdjacentElement('afterbegin', view.el);
  55063. } else {
  55064. const previous_msg_el = sizzle(`[data-isodate="${previous_msg_date}"]:last`, this.content).pop();
  55065. if (view.model.get('type') === 'error' && u.hasClass('chat-error', previous_msg_el) && previous_msg_el.textContent === view.model.get('message')) {
  55066. // We don't show a duplicate error message
  55067. return;
  55068. }
  55069. previous_msg_el.insertAdjacentElement('afterend', view.el);
  55070. this.markFollowups(view.el);
  55071. }
  55072. },
  55073. markFollowups(el) {
  55074. /* Given a message element, determine wether it should be
  55075. * marked as a followup message to the previous element.
  55076. *
  55077. * Also determine whether the element following it is a
  55078. * followup message or not.
  55079. *
  55080. * Followup messages are subsequent ones written by the same
  55081. * author with no other conversation elements inbetween and
  55082. * posted within 10 minutes of one another.
  55083. *
  55084. * Parameters:
  55085. * (HTMLElement) el - The message element.
  55086. */
  55087. const from = el.getAttribute('data-from'),
  55088. previous_el = el.previousElementSibling,
  55089. date = moment(el.getAttribute('data-isodate')),
  55090. next_el = el.nextElementSibling;
  55091. if (!u.hasClass('chat-msg--action', el) && !u.hasClass('chat-msg--action', previous_el) && previous_el.getAttribute('data-from') === from && date.isBefore(moment(previous_el.getAttribute('data-isodate')).add(10, 'minutes')) && el.getAttribute('data-encrypted') === previous_el.getAttribute('data-encrypted')) {
  55092. u.addClass('chat-msg--followup', el);
  55093. }
  55094. if (!next_el) {
  55095. return;
  55096. }
  55097. if (!u.hasClass('chat-msg--action', 'el') && next_el.getAttribute('data-from') === from && moment(next_el.getAttribute('data-isodate')).isBefore(date.add(10, 'minutes')) && el.getAttribute('data-encrypted') === next_el.getAttribute('data-encrypted')) {
  55098. u.addClass('chat-msg--followup', next_el);
  55099. } else {
  55100. u.removeClass('chat-msg--followup', next_el);
  55101. }
  55102. },
  55103. showMessage(message) {
  55104. /* Inserts a chat message into the content area of the chat box.
  55105. *
  55106. * Will also insert a new day indicator if the message is on a
  55107. * different day.
  55108. *
  55109. * Parameters:
  55110. * (Backbone.Model) message: The message object
  55111. */
  55112. const view = new _converse.MessageView({
  55113. 'model': message
  55114. });
  55115. this.clearChatStateNotification(message);
  55116. this.insertMessage(view);
  55117. this.insertDayIndicator(view.el);
  55118. this.setScrollPosition(view.el);
  55119. if (u.isNewMessage(message)) {
  55120. if (message.get('sender') === 'me') {
  55121. // We remove the "scrolled" flag so that the chat area
  55122. // gets scrolled down. We always want to scroll down
  55123. // when the user writes a message as opposed to when a
  55124. // message is received.
  55125. this.model.set('scrolled', false);
  55126. } else if (this.model.get('scrolled', true) && !u.isOnlyChatStateNotification(message)) {
  55127. this.showNewMessagesIndicator();
  55128. }
  55129. }
  55130. if (this.shouldShowOnTextMessage()) {
  55131. this.show();
  55132. } else {
  55133. this.scrollDown();
  55134. }
  55135. },
  55136. onMessageAdded(message) {
  55137. /* Handler that gets called when a new message object is created.
  55138. *
  55139. * Parameters:
  55140. * (Object) message - The message Backbone object that was added.
  55141. */
  55142. this.showMessage(message);
  55143. if (message.get('correcting')) {
  55144. this.insertIntoTextArea(message.get('message'), true, true);
  55145. }
  55146. _converse.emit('messageAdded', {
  55147. 'message': message,
  55148. 'chatbox': this.model
  55149. });
  55150. },
  55151. parseMessageForCommands(text) {
  55152. const match = text.replace(/^\s*/, "").match(/^\/(.*)\s*$/);
  55153. if (match) {
  55154. if (match[1] === "clear") {
  55155. this.clearMessages();
  55156. return true;
  55157. } else if (match[1] === "help") {
  55158. const msgs = [`<strong>/clear</strong>: ${__('Remove messages')}`, `<strong>/me</strong>: ${__('Write in the third person')}`, `<strong>/help</strong>: ${__('Show this menu')}`];
  55159. this.showHelpMessages(msgs);
  55160. return true;
  55161. }
  55162. }
  55163. },
  55164. onMessageSubmitted(text, spoiler_hint) {
  55165. /* This method gets called once the user has typed a message
  55166. * and then pressed enter in a chat box.
  55167. *
  55168. * Parameters:
  55169. * (String) text - The chat message text.
  55170. * (String) spoiler_hint - A hint in case the message
  55171. * text is a hidden/spoiler message. See XEP-0382
  55172. */
  55173. if (!_converse.connection.authenticated) {
  55174. return this.showHelpMessages(['Sorry, the connection has been lost, ' + 'and your message could not be sent'], 'error');
  55175. }
  55176. if (this.parseMessageForCommands(text)) {
  55177. return;
  55178. }
  55179. const attrs = this.model.getOutgoingMessageAttributes(text, spoiler_hint);
  55180. this.model.sendMessage(attrs);
  55181. },
  55182. setChatState(state, options) {
  55183. /* Mutator for setting the chat state of this chat session.
  55184. * Handles clearing of any chat state notification timeouts and
  55185. * setting new ones if necessary.
  55186. * Timeouts are set when the state being set is COMPOSING or PAUSED.
  55187. * After the timeout, COMPOSING will become PAUSED and PAUSED will become INACTIVE.
  55188. * See XEP-0085 Chat State Notifications.
  55189. *
  55190. * Parameters:
  55191. * (string) state - The chat state (consts ACTIVE, COMPOSING, PAUSED, INACTIVE, GONE)
  55192. */
  55193. if (!_.isUndefined(this.chat_state_timeout)) {
  55194. window.clearTimeout(this.chat_state_timeout);
  55195. delete this.chat_state_timeout;
  55196. }
  55197. if (state === _converse.COMPOSING) {
  55198. this.chat_state_timeout = window.setTimeout(this.setChatState.bind(this), _converse.TIMEOUTS.PAUSED, _converse.PAUSED);
  55199. } else if (state === _converse.PAUSED) {
  55200. this.chat_state_timeout = window.setTimeout(this.setChatState.bind(this), _converse.TIMEOUTS.INACTIVE, _converse.INACTIVE);
  55201. }
  55202. this.model.set('chat_state', state, options);
  55203. return this;
  55204. },
  55205. onFormSubmitted(ev) {
  55206. ev.preventDefault();
  55207. const textarea = this.el.querySelector('.chat-textarea'),
  55208. message = textarea.value;
  55209. if (!message.replace(/\s/g, '').length) {
  55210. return;
  55211. }
  55212. let spoiler_hint;
  55213. if (this.model.get('composing_spoiler')) {
  55214. const hint_el = this.el.querySelector('form.sendXMPPMessage input.spoiler-hint');
  55215. spoiler_hint = hint_el.value;
  55216. hint_el.value = '';
  55217. }
  55218. textarea.value = '';
  55219. u.removeClass('correcting', textarea);
  55220. textarea.focus(); // Trigger input event, so that the textarea resizes
  55221. const event = document.createEvent('Event');
  55222. event.initEvent('input', true, true);
  55223. textarea.dispatchEvent(event);
  55224. this.onMessageSubmitted(message, spoiler_hint);
  55225. _converse.emit('messageSend', message); // Suppress events, otherwise superfluous CSN gets set
  55226. // immediately after the message, causing rate-limiting issues.
  55227. this.setChatState(_converse.ACTIVE, {
  55228. 'silent': true
  55229. });
  55230. },
  55231. keyPressed(ev) {
  55232. /* Event handler for when a key is pressed in a chat box textarea.
  55233. */
  55234. if (ev.ctrlKey) {
  55235. // When ctrl is pressed, no chars are entered into the textarea.
  55236. return;
  55237. }
  55238. if (!ev.shiftKey && !ev.altKey) {
  55239. if (ev.keyCode === _converse.keycodes.FORWARD_SLASH) {
  55240. // Forward slash is used to run commands. Nothing to do here.
  55241. return;
  55242. } else if (ev.keyCode === _converse.keycodes.ESCAPE) {
  55243. return this.onEscapePressed(ev);
  55244. } else if (ev.keyCode === _converse.keycodes.ENTER) {
  55245. if (this.emoji_dropdown && u.isVisible(this.emoji_dropdown.el.querySelector('.emoji-picker'))) {
  55246. this.emoji_dropdown.toggle();
  55247. }
  55248. return this.onFormSubmitted(ev);
  55249. } else if (ev.keyCode === _converse.keycodes.UP_ARROW && !ev.target.selectionEnd) {
  55250. return this.editEarlierMessage();
  55251. } else if (ev.keyCode === _converse.keycodes.DOWN_ARROW && ev.target.selectionEnd === ev.target.value.length) {
  55252. return this.editLaterMessage();
  55253. }
  55254. }
  55255. if (_.includes([_converse.keycodes.SHIFT, _converse.keycodes.META, _converse.keycodes.META_RIGHT, _converse.keycodes.ESCAPE, _converse.keycodes.ALT], ev.keyCode)) {
  55256. return;
  55257. }
  55258. if (this.model.get('chat_state') !== _converse.COMPOSING) {
  55259. // Set chat state to composing if keyCode is not a forward-slash
  55260. // (which would imply an internal command and not a message).
  55261. this.setChatState(_converse.COMPOSING);
  55262. }
  55263. },
  55264. getOwnMessages() {
  55265. return f(this.model.messages.filter({
  55266. 'sender': 'me'
  55267. }));
  55268. },
  55269. onEscapePressed(ev) {
  55270. ev.preventDefault();
  55271. const idx = this.model.messages.findLastIndex('correcting'),
  55272. message = idx >= 0 ? this.model.messages.at(idx) : null;
  55273. if (message) {
  55274. message.save('correcting', false);
  55275. }
  55276. this.insertIntoTextArea('', true, false);
  55277. },
  55278. onMessageEditButtonClicked(ev) {
  55279. ev.preventDefault();
  55280. const idx = this.model.messages.findLastIndex('correcting'),
  55281. currently_correcting = idx >= 0 ? this.model.messages.at(idx) : null,
  55282. message_el = u.ancestor(ev.target, '.chat-msg'),
  55283. message = this.model.messages.findWhere({
  55284. 'msgid': message_el.getAttribute('data-msgid')
  55285. });
  55286. if (currently_correcting !== message) {
  55287. if (!_.isNil(currently_correcting)) {
  55288. currently_correcting.save('correcting', false);
  55289. }
  55290. message.save('correcting', true);
  55291. this.insertIntoTextArea(u.prefixMentions(message), true, true);
  55292. } else {
  55293. message.save('correcting', false);
  55294. this.insertIntoTextArea('', true, false);
  55295. }
  55296. },
  55297. editLaterMessage() {
  55298. let message;
  55299. let idx = this.model.messages.findLastIndex('correcting');
  55300. if (idx >= 0) {
  55301. this.model.messages.at(idx).save('correcting', false);
  55302. while (idx < this.model.messages.length - 1) {
  55303. idx += 1;
  55304. const candidate = this.model.messages.at(idx);
  55305. if (candidate.get('sender') === 'me' && candidate.get('message')) {
  55306. message = candidate;
  55307. break;
  55308. }
  55309. }
  55310. }
  55311. if (message) {
  55312. this.insertIntoTextArea(message.get('message'), true, true);
  55313. message.save('correcting', true);
  55314. } else {
  55315. this.insertIntoTextArea('', true, false);
  55316. }
  55317. },
  55318. editEarlierMessage() {
  55319. let message;
  55320. let idx = this.model.messages.findLastIndex('correcting');
  55321. if (idx >= 0) {
  55322. this.model.messages.at(idx).save('correcting', false);
  55323. while (idx > 0) {
  55324. idx -= 1;
  55325. const candidate = this.model.messages.at(idx);
  55326. if (candidate.get('sender') === 'me' && candidate.get('message')) {
  55327. message = candidate;
  55328. break;
  55329. }
  55330. }
  55331. }
  55332. message = message || this.getOwnMessages().findLast(msg => msg.get('message'));
  55333. if (message) {
  55334. this.insertIntoTextArea(message.get('message'), true, true);
  55335. message.save('correcting', true);
  55336. }
  55337. },
  55338. inputChanged(ev) {
  55339. ev.target.style.height = 'auto'; // Fixes weirdness
  55340. ev.target.style.height = ev.target.scrollHeight + 'px';
  55341. },
  55342. clearMessages(ev) {
  55343. if (ev && ev.preventDefault) {
  55344. ev.preventDefault();
  55345. }
  55346. const result = confirm(__("Are you sure you want to clear the messages from this conversation?"));
  55347. if (result === true) {
  55348. this.content.innerHTML = '';
  55349. this.model.messages.reset();
  55350. this.model.messages.browserStorage._clear();
  55351. }
  55352. return this;
  55353. },
  55354. insertIntoTextArea(value, replace = false, correcting = false) {
  55355. const textarea = this.el.querySelector('.chat-textarea');
  55356. if (correcting) {
  55357. u.addClass('correcting', textarea);
  55358. } else {
  55359. u.removeClass('correcting', textarea);
  55360. }
  55361. if (replace) {
  55362. textarea.value = '';
  55363. textarea.value = value;
  55364. } else {
  55365. let existing = textarea.value;
  55366. if (existing && existing[existing.length - 1] !== ' ') {
  55367. existing = existing + ' ';
  55368. }
  55369. textarea.value = '';
  55370. textarea.value = existing + value + ' ';
  55371. }
  55372. u.putCurserAtEnd(textarea);
  55373. },
  55374. createEmojiPicker() {
  55375. if (_.isUndefined(_converse.emojipicker)) {
  55376. const storage = _converse.config.get('storage'),
  55377. id = `converse.emoji-${_converse.bare_jid}`;
  55378. _converse.emojipicker = new _converse.EmojiPicker({
  55379. 'id': id
  55380. });
  55381. _converse.emojipicker.browserStorage = new Backbone.BrowserStorage[storage](id);
  55382. _converse.emojipicker.fetch();
  55383. }
  55384. this.emoji_picker_view = new _converse.EmojiPickerView({
  55385. 'model': _converse.emojipicker
  55386. });
  55387. },
  55388. insertEmoji(ev) {
  55389. ev.preventDefault();
  55390. ev.stopPropagation();
  55391. const target = ev.target.nodeName === 'IMG' ? ev.target.parentElement : ev.target;
  55392. this.insertIntoTextArea(target.getAttribute('data-emoji'));
  55393. },
  55394. toggleEmojiMenu(ev) {
  55395. if (_.isUndefined(this.emoji_dropdown)) {
  55396. ev.stopPropagation();
  55397. this.createEmojiPicker();
  55398. this.insertEmojiPicker();
  55399. this.renderEmojiPicker();
  55400. const dropdown_el = this.el.querySelector('.toggle-smiley.dropup');
  55401. this.emoji_dropdown = new bootstrap.Dropdown(dropdown_el, true);
  55402. this.emoji_dropdown.el = dropdown_el;
  55403. this.emoji_dropdown.toggle();
  55404. }
  55405. },
  55406. toggleCall(ev) {
  55407. ev.stopPropagation();
  55408. _converse.emit('callButtonClicked', {
  55409. connection: _converse.connection,
  55410. model: this.model
  55411. });
  55412. },
  55413. toggleComposeSpoilerMessage() {
  55414. this.model.set('composing_spoiler', !this.model.get('composing_spoiler'));
  55415. this.renderMessageForm();
  55416. this.focus();
  55417. },
  55418. toggleSpoilerMessage(ev) {
  55419. if (ev && ev.preventDefault) {
  55420. ev.preventDefault();
  55421. }
  55422. const toggle_el = ev.target,
  55423. icon_el = toggle_el.firstElementChild;
  55424. u.slideToggleElement(toggle_el.parentElement.parentElement.querySelector('.spoiler'));
  55425. if (toggle_el.getAttribute("data-toggle-state") == "closed") {
  55426. toggle_el.textContent = 'Show less';
  55427. icon_el.classList.remove("fa-eye");
  55428. icon_el.classList.add("fa-eye-slash");
  55429. toggle_el.insertAdjacentElement('afterBegin', icon_el);
  55430. toggle_el.setAttribute("data-toggle-state", "open");
  55431. } else {
  55432. toggle_el.textContent = 'Show more';
  55433. icon_el.classList.remove("fa-eye-slash");
  55434. icon_el.classList.add("fa-eye");
  55435. toggle_el.insertAdjacentElement('afterBegin', icon_el);
  55436. toggle_el.setAttribute("data-toggle-state", "closed");
  55437. }
  55438. },
  55439. onPresenceChanged(item) {
  55440. const show = item.get('show'),
  55441. fullname = this.model.getDisplayName();
  55442. let text;
  55443. if (u.isVisible(this.el)) {
  55444. if (show === 'offline') {
  55445. text = __('%1$s has gone offline', fullname);
  55446. } else if (show === 'away') {
  55447. text = __('%1$s has gone away', fullname);
  55448. } else if (show === 'dnd') {
  55449. text = __('%1$s is busy', fullname);
  55450. } else if (show === 'online') {
  55451. text = __('%1$s is online', fullname);
  55452. }
  55453. if (text) {
  55454. this.content.insertAdjacentHTML('beforeend', tpl_status_message({
  55455. 'message': text,
  55456. 'isodate': moment().format()
  55457. }));
  55458. this.scrollDown();
  55459. }
  55460. }
  55461. },
  55462. close(ev) {
  55463. if (ev && ev.preventDefault) {
  55464. ev.preventDefault();
  55465. }
  55466. if (Backbone.history.getFragment() === "converse/chat?jid=" + this.model.get('jid')) {
  55467. _converse.router.navigate('');
  55468. }
  55469. if (_converse.connection.connected) {
  55470. // Immediately sending the chat state, because the
  55471. // model is going to be destroyed afterwards.
  55472. this.setChatState(_converse.INACTIVE);
  55473. this.model.sendChatState();
  55474. }
  55475. try {
  55476. this.model.destroy();
  55477. } catch (e) {
  55478. _converse.log(e, Strophe.LogLevel.ERROR);
  55479. }
  55480. this.remove();
  55481. _converse.emit('chatBoxClosed', this);
  55482. return this;
  55483. },
  55484. renderEmojiPicker() {
  55485. this.emoji_picker_view.render();
  55486. },
  55487. insertEmojiPicker() {
  55488. var picker_el = this.el.querySelector('.emoji-picker');
  55489. if (!_.isNull(picker_el)) {
  55490. picker_el.innerHTML = '';
  55491. picker_el.appendChild(this.emoji_picker_view.el);
  55492. }
  55493. },
  55494. focus() {
  55495. const textarea_el = this.el.querySelector('.chat-textarea');
  55496. if (!_.isNull(textarea_el)) {
  55497. textarea_el.focus();
  55498. _converse.emit('chatBoxFocused', this);
  55499. }
  55500. return this;
  55501. },
  55502. hide() {
  55503. this.el.classList.add('hidden');
  55504. return this;
  55505. },
  55506. afterShown() {
  55507. this.model.clearUnreadMsgCounter();
  55508. this.setChatState(_converse.ACTIVE);
  55509. this.scrollDown();
  55510. this.focus();
  55511. },
  55512. _show(f) {
  55513. /* Inner show method that gets debounced */
  55514. if (u.isVisible(this.el)) {
  55515. this.focus();
  55516. return;
  55517. }
  55518. u.fadeIn(this.el, _.bind(this.afterShown, this));
  55519. },
  55520. showNewMessagesIndicator() {
  55521. u.showElement(this.el.querySelector('.new-msgs-indicator'));
  55522. },
  55523. hideNewMessagesIndicator() {
  55524. const new_msgs_indicator = this.el.querySelector('.new-msgs-indicator');
  55525. if (!_.isNull(new_msgs_indicator)) {
  55526. new_msgs_indicator.classList.add('hidden');
  55527. }
  55528. },
  55529. _markScrolled: function _markScrolled(ev) {
  55530. /* Called when the chat content is scrolled up or down.
  55531. * We want to record when the user has scrolled away from
  55532. * the bottom, so that we don't automatically scroll away
  55533. * from what the user is reading when new messages are
  55534. * received.
  55535. */
  55536. if (ev && ev.preventDefault) {
  55537. ev.preventDefault();
  55538. }
  55539. let scrolled = true;
  55540. const is_at_bottom = this.content.scrollTop + this.content.clientHeight >= this.content.scrollHeight - 62; // sigh...
  55541. if (is_at_bottom) {
  55542. scrolled = false;
  55543. this.onScrolledDown();
  55544. }
  55545. u.safeSave(this.model, {
  55546. 'scrolled': scrolled,
  55547. 'top_visible_message': null
  55548. });
  55549. },
  55550. viewUnreadMessages() {
  55551. this.model.save({
  55552. 'scrolled': false,
  55553. 'top_visible_message': null
  55554. });
  55555. this.scrollDown();
  55556. },
  55557. _scrollDown() {
  55558. /* Inner method that gets debounced */
  55559. if (_.isUndefined(this.content)) {
  55560. return;
  55561. }
  55562. if (u.isVisible(this.content) && !this.model.get('scrolled')) {
  55563. this.content.scrollTop = this.content.scrollHeight;
  55564. }
  55565. },
  55566. onScrolledDown() {
  55567. this.hideNewMessagesIndicator();
  55568. if (_converse.windowState !== 'hidden') {
  55569. this.model.clearUnreadMsgCounter();
  55570. }
  55571. _converse.emit('chatBoxScrolledDown', {
  55572. 'chatbox': this.model
  55573. });
  55574. },
  55575. onWindowStateChanged(state) {
  55576. if (this.model.get('num_unread', 0) && !this.model.isHidden()) {
  55577. this.model.clearUnreadMsgCounter();
  55578. }
  55579. }
  55580. });
  55581. _converse.on('chatBoxViewsInitialized', () => {
  55582. const that = _converse.chatboxviews;
  55583. _converse.chatboxes.on('add', item => {
  55584. if (!that.get(item.get('id')) && item.get('type') === _converse.PRIVATE_CHAT_TYPE) {
  55585. that.add(item.get('id'), new _converse.ChatBoxView({
  55586. model: item
  55587. }));
  55588. }
  55589. });
  55590. });
  55591. _converse.on('connected', () => {
  55592. // Advertise that we support XEP-0382 Message Spoilers
  55593. _converse.api.disco.own.features.add(Strophe.NS.SPOILER);
  55594. });
  55595. /************************ BEGIN API ************************/
  55596. _.extend(_converse.api, {
  55597. /**
  55598. * The "chatview" namespace groups methods pertaining to views
  55599. * for one-on-one chats.
  55600. *
  55601. * @namespace _converse.api.chatviews
  55602. * @memberOf _converse.api
  55603. */
  55604. 'chatviews': {
  55605. /**
  55606. * Get the view of an already open chat.
  55607. *
  55608. * @method _converse.api.chatviews.get
  55609. * @returns {ChatBoxView} A [Backbone.View](http://backbonejs.org/#View) instance.
  55610. * The chat should already be open, otherwise `undefined` will be returned.
  55611. *
  55612. * @example
  55613. * // To return a single view, provide the JID of the contact:
  55614. * _converse.api.chatviews.get('buddy@example.com')
  55615. *
  55616. * @example
  55617. * // To return an array of views, provide an array of JIDs:
  55618. * _converse.api.chatviews.get(['buddy1@example.com', 'buddy2@example.com'])
  55619. */
  55620. 'get'(jids) {
  55621. if (_.isUndefined(jids)) {
  55622. _converse.log("chats.create: You need to provide at least one JID", Strophe.LogLevel.ERROR);
  55623. return null;
  55624. }
  55625. if (_.isString(jids)) {
  55626. return _converse.chatboxviews.get(jids);
  55627. }
  55628. return _.map(jids, jid => _converse.chatboxviews.get(jids));
  55629. }
  55630. }
  55631. });
  55632. /************************ END API ************************/
  55633. }
  55634. });
  55635. return converse;
  55636. });
  55637. /***/ }),
  55638. /***/ "./src/converse-controlbox.js":
  55639. /*!************************************!*\
  55640. !*** ./src/converse-controlbox.js ***!
  55641. \************************************/
  55642. /*! no static exports found */
  55643. /***/ (function(module, exports, __webpack_require__) {
  55644. "use strict";
  55645. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  55646. // Converse.js (A browser based XMPP chat client)
  55647. // http://conversejs.org
  55648. //
  55649. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  55650. // Licensed under the Mozilla Public License (MPLv2)
  55651. //
  55652. /*global define */
  55653. (function (root, factory) {
  55654. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! bootstrap */ "./node_modules/bootstrap.native/dist/bootstrap-native-v4.js"), __webpack_require__(/*! formdata-polyfill */ "./node_modules/formdata-polyfill/FormData.js"), __webpack_require__(/*! lodash.fp */ "./src/lodash.fp.js"), __webpack_require__(/*! templates/converse_brand_heading.html */ "./src/templates/converse_brand_heading.html"), __webpack_require__(/*! templates/controlbox.html */ "./src/templates/controlbox.html"), __webpack_require__(/*! templates/controlbox_toggle.html */ "./src/templates/controlbox_toggle.html"), __webpack_require__(/*! templates/login_panel.html */ "./src/templates/login_panel.html"), __webpack_require__(/*! converse-chatview */ "./src/converse-chatview.js"), __webpack_require__(/*! converse-rosterview */ "./src/converse-rosterview.js"), __webpack_require__(/*! converse-profile */ "./src/converse-profile.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  55655. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  55656. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  55657. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  55658. })(void 0, function (converse, bootstrap, _FormData, fp, tpl_brand_heading, tpl_controlbox, tpl_controlbox_toggle, tpl_login_panel) {
  55659. "use strict";
  55660. const CHATBOX_TYPE = 'chatbox';
  55661. const _converse$env = converse.env,
  55662. Strophe = _converse$env.Strophe,
  55663. Backbone = _converse$env.Backbone,
  55664. Promise = _converse$env.Promise,
  55665. _ = _converse$env._,
  55666. moment = _converse$env.moment;
  55667. const u = converse.env.utils;
  55668. const CONNECTION_STATUS_CSS_CLASS = {
  55669. 'Error': 'error',
  55670. 'Connecting': 'info',
  55671. 'Connection failure': 'error',
  55672. 'Authenticating': 'info',
  55673. 'Authentication failure': 'error',
  55674. 'Connected': 'info',
  55675. 'Disconnected': 'error',
  55676. 'Disconnecting': 'warn',
  55677. 'Attached': 'info',
  55678. 'Redirect': 'info',
  55679. 'Reconnecting': 'warn'
  55680. };
  55681. const PRETTY_CONNECTION_STATUS = {
  55682. 0: 'Error',
  55683. 1: 'Connecting',
  55684. 2: 'Connection failure',
  55685. 3: 'Authenticating',
  55686. 4: 'Authentication failure',
  55687. 5: 'Connected',
  55688. 6: 'Disconnected',
  55689. 7: 'Disconnecting',
  55690. 8: 'Attached',
  55691. 9: 'Redirect',
  55692. 10: 'Reconnecting'
  55693. };
  55694. const REPORTABLE_STATUSES = [0, // ERROR'
  55695. 1, // CONNECTING
  55696. 2, // CONNFAIL
  55697. 3, // AUTHENTICATING
  55698. 4, // AUTHFAIL
  55699. 7, // DISCONNECTING
  55700. 10 // RECONNECTING
  55701. ];
  55702. converse.plugins.add('converse-controlbox', {
  55703. /* Plugin dependencies are other plugins which might be
  55704. * overridden or relied upon, and therefore need to be loaded before
  55705. * this plugin.
  55706. *
  55707. * If the setting "strict_plugin_dependencies" is set to true,
  55708. * an error will be raised if the plugin is not found. By default it's
  55709. * false, which means these plugins are only loaded opportunistically.
  55710. *
  55711. * NB: These plugins need to have already been loaded via require.js.
  55712. */
  55713. dependencies: ["converse-modal", "converse-chatboxes", "converse-rosterview", "converse-chatview"],
  55714. overrides: {
  55715. // Overrides mentioned here will be picked up by converse.js's
  55716. // plugin architecture they will replace existing methods on the
  55717. // relevant objects or classes.
  55718. //
  55719. // New functions which don't exist yet can also be added.
  55720. tearDown() {
  55721. this.__super__.tearDown.apply(this, arguments);
  55722. if (this.rosterview) {
  55723. // Removes roster groups
  55724. this.rosterview.model.off().reset();
  55725. this.rosterview.each(function (groupview) {
  55726. groupview.removeAll();
  55727. groupview.remove();
  55728. });
  55729. this.rosterview.removeAll().remove();
  55730. }
  55731. },
  55732. ChatBoxes: {
  55733. chatBoxMayBeShown(chatbox) {
  55734. return this.__super__.chatBoxMayBeShown.apply(this, arguments) && chatbox.get('id') !== 'controlbox';
  55735. }
  55736. },
  55737. ChatBoxViews: {
  55738. closeAllChatBoxes() {
  55739. const _converse = this.__super__._converse;
  55740. this.each(function (view) {
  55741. if (view.model.get('id') === 'controlbox' && (_converse.disconnection_cause !== _converse.LOGOUT || _converse.show_controlbox_by_default)) {
  55742. return;
  55743. }
  55744. view.close();
  55745. });
  55746. return this;
  55747. },
  55748. getChatBoxWidth(view) {
  55749. const _converse = this.__super__._converse;
  55750. const controlbox = this.get('controlbox');
  55751. if (view.model.get('id') === 'controlbox') {
  55752. /* We return the width of the controlbox or its toggle,
  55753. * depending on which is visible.
  55754. */
  55755. if (!controlbox || !u.isVisible(controlbox.el)) {
  55756. return u.getOuterWidth(_converse.controlboxtoggle.el, true);
  55757. } else {
  55758. return u.getOuterWidth(controlbox.el, true);
  55759. }
  55760. } else {
  55761. return this.__super__.getChatBoxWidth.apply(this, arguments);
  55762. }
  55763. }
  55764. },
  55765. ChatBox: {
  55766. initialize() {
  55767. if (this.get('id') === 'controlbox') {
  55768. this.set({
  55769. 'time_opened': moment(0).valueOf()
  55770. });
  55771. } else {
  55772. this.__super__.initialize.apply(this, arguments);
  55773. }
  55774. }
  55775. },
  55776. ChatBoxView: {
  55777. insertIntoDOM() {
  55778. const view = this.__super__._converse.chatboxviews.get("controlbox");
  55779. if (view) {
  55780. view.el.insertAdjacentElement('afterend', this.el);
  55781. } else {
  55782. this.__super__.insertIntoDOM.apply(this, arguments);
  55783. }
  55784. return this;
  55785. }
  55786. }
  55787. },
  55788. initialize() {
  55789. /* The initialize function gets called as soon as the plugin is
  55790. * loaded by converse.js's plugin machinery.
  55791. */
  55792. const _converse = this._converse,
  55793. __ = _converse.__;
  55794. _converse.api.settings.update({
  55795. allow_logout: true,
  55796. default_domain: undefined,
  55797. locked_domain: undefined,
  55798. show_controlbox_by_default: false,
  55799. sticky_controlbox: false
  55800. });
  55801. _converse.api.promises.add('controlboxInitialized');
  55802. _converse.addControlBox = () => {
  55803. return _converse.chatboxes.add({
  55804. 'id': 'controlbox',
  55805. 'box_id': 'controlbox',
  55806. 'type': _converse.CONTROLBOX_TYPE,
  55807. 'closed': !_converse.show_controlbox_by_default
  55808. });
  55809. };
  55810. _converse.ControlBoxView = _converse.ChatBoxView.extend({
  55811. tagName: 'div',
  55812. className: 'chatbox',
  55813. id: 'controlbox',
  55814. events: {
  55815. 'click a.close-chatbox-button': 'close'
  55816. },
  55817. initialize() {
  55818. if (_.isUndefined(_converse.controlboxtoggle)) {
  55819. _converse.controlboxtoggle = new _converse.ControlBoxToggle();
  55820. }
  55821. _converse.controlboxtoggle.el.insertAdjacentElement('afterend', this.el);
  55822. this.model.on('change:connected', this.onConnected, this);
  55823. this.model.on('destroy', this.hide, this);
  55824. this.model.on('hide', this.hide, this);
  55825. this.model.on('show', this.show, this);
  55826. this.model.on('change:closed', this.ensureClosedState, this);
  55827. this.render();
  55828. if (this.model.get('connected')) {
  55829. this.insertRoster();
  55830. }
  55831. _converse.emit('controlboxInitialized', this);
  55832. },
  55833. render() {
  55834. if (this.model.get('connected')) {
  55835. if (_.isUndefined(this.model.get('closed'))) {
  55836. this.model.set('closed', !_converse.show_controlbox_by_default);
  55837. }
  55838. }
  55839. this.el.innerHTML = tpl_controlbox(_.extend(this.model.toJSON()));
  55840. if (!this.model.get('closed')) {
  55841. this.show();
  55842. } else {
  55843. this.hide();
  55844. }
  55845. if (!_converse.connection.connected || !_converse.connection.authenticated || _converse.connection.disconnecting) {
  55846. this.renderLoginPanel();
  55847. } else if (this.model.get('connected') && (!this.controlbox_pane || !u.isVisible(this.controlbox_pane.el))) {
  55848. this.renderControlBoxPane();
  55849. }
  55850. return this;
  55851. },
  55852. onConnected() {
  55853. if (this.model.get('connected')) {
  55854. this.render();
  55855. this.insertRoster();
  55856. }
  55857. },
  55858. insertRoster() {
  55859. if (_converse.authentication === _converse.ANONYMOUS) {
  55860. return;
  55861. }
  55862. /* Place the rosterview inside the "Contacts" panel. */
  55863. _converse.api.waitUntil('rosterViewInitialized').then(() => this.controlbox_pane.el.insertAdjacentElement('beforeEnd', _converse.rosterview.el)).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  55864. },
  55865. createBrandHeadingHTML() {
  55866. return tpl_brand_heading({
  55867. 'sticky_controlbox': _converse.sticky_controlbox
  55868. });
  55869. },
  55870. insertBrandHeading() {
  55871. const heading_el = this.el.querySelector('.brand-heading-container');
  55872. if (_.isNull(heading_el)) {
  55873. const el = this.el.querySelector('.controlbox-head');
  55874. el.insertAdjacentHTML('beforeend', this.createBrandHeadingHTML());
  55875. } else {
  55876. heading_el.outerHTML = this.createBrandHeadingHTML();
  55877. }
  55878. },
  55879. renderLoginPanel() {
  55880. this.el.classList.add("logged-out");
  55881. if (_.isNil(this.loginpanel)) {
  55882. this.loginpanel = new _converse.LoginPanel({
  55883. 'model': new _converse.LoginPanelModel()
  55884. });
  55885. const panes = this.el.querySelector('.controlbox-panes');
  55886. panes.innerHTML = '';
  55887. panes.appendChild(this.loginpanel.render().el);
  55888. this.insertBrandHeading();
  55889. } else {
  55890. this.loginpanel.render();
  55891. }
  55892. this.loginpanel.initPopovers();
  55893. return this;
  55894. },
  55895. renderControlBoxPane() {
  55896. /* Renders the "Contacts" panel of the controlbox.
  55897. *
  55898. * This will only be called after the user has already been
  55899. * logged in.
  55900. */
  55901. if (this.loginpanel) {
  55902. this.loginpanel.remove();
  55903. delete this.loginpanel;
  55904. }
  55905. this.el.classList.remove("logged-out");
  55906. this.controlbox_pane = new _converse.ControlBoxPane();
  55907. this.el.querySelector('.controlbox-panes').insertAdjacentElement('afterBegin', this.controlbox_pane.el);
  55908. },
  55909. close(ev) {
  55910. if (ev && ev.preventDefault) {
  55911. ev.preventDefault();
  55912. }
  55913. if (_converse.sticky_controlbox) {
  55914. return;
  55915. }
  55916. if (_converse.connection.connected && !_converse.connection.disconnecting) {
  55917. this.model.save({
  55918. 'closed': true
  55919. });
  55920. } else {
  55921. this.model.trigger('hide');
  55922. }
  55923. _converse.emit('controlBoxClosed', this);
  55924. return this;
  55925. },
  55926. ensureClosedState() {
  55927. if (this.model.get('closed')) {
  55928. this.hide();
  55929. } else {
  55930. this.show();
  55931. }
  55932. },
  55933. hide(callback) {
  55934. if (_converse.sticky_controlbox) {
  55935. return;
  55936. }
  55937. u.addClass('hidden', this.el);
  55938. _converse.emit('chatBoxClosed', this);
  55939. if (!_converse.connection.connected) {
  55940. _converse.controlboxtoggle.render();
  55941. }
  55942. _converse.controlboxtoggle.show(callback);
  55943. return this;
  55944. },
  55945. onControlBoxToggleHidden() {
  55946. this.model.set('closed', false);
  55947. this.el.classList.remove('hidden');
  55948. _converse.emit('controlBoxOpened', this);
  55949. },
  55950. show() {
  55951. _converse.controlboxtoggle.hide(this.onControlBoxToggleHidden.bind(this));
  55952. return this;
  55953. },
  55954. showHelpMessages() {
  55955. /* Override showHelpMessages in ChatBoxView, for now do nothing.
  55956. *
  55957. * Parameters:
  55958. * (Array) msgs: Array of messages
  55959. */
  55960. return;
  55961. }
  55962. });
  55963. _converse.LoginPanelModel = Backbone.Model.extend({
  55964. defaults: {
  55965. // Passed-by-reference. Fine in this case because there's
  55966. // only one such model.
  55967. 'errors': []
  55968. }
  55969. });
  55970. _converse.LoginPanel = Backbone.VDOMView.extend({
  55971. tagName: 'div',
  55972. id: "converse-login-panel",
  55973. className: 'controlbox-pane fade-in',
  55974. events: {
  55975. 'submit form#converse-login': 'authenticate',
  55976. 'change input': 'validate'
  55977. },
  55978. initialize(cfg) {
  55979. this.model.on('change', this.render, this);
  55980. this.listenTo(_converse.connfeedback, 'change', this.render);
  55981. this.render();
  55982. },
  55983. toHTML() {
  55984. const connection_status = _converse.connfeedback.get('connection_status');
  55985. let feedback_class, pretty_status;
  55986. if (_.includes(REPORTABLE_STATUSES, connection_status)) {
  55987. pretty_status = PRETTY_CONNECTION_STATUS[connection_status];
  55988. feedback_class = CONNECTION_STATUS_CSS_CLASS[pretty_status];
  55989. }
  55990. return tpl_login_panel(_.extend(this.model.toJSON(), {
  55991. '__': __,
  55992. '_converse': _converse,
  55993. 'ANONYMOUS': _converse.ANONYMOUS,
  55994. 'EXTERNAL': _converse.EXTERNAL,
  55995. 'LOGIN': _converse.LOGIN,
  55996. 'PREBIND': _converse.PREBIND,
  55997. 'auto_login': _converse.auto_login,
  55998. 'authentication': _converse.authentication,
  55999. 'connection_status': connection_status,
  56000. 'conn_feedback_class': feedback_class,
  56001. 'conn_feedback_subject': pretty_status,
  56002. 'conn_feedback_message': _converse.connfeedback.get('message'),
  56003. 'placeholder_username': (_converse.locked_domain || _converse.default_domain) && __('Username') || __('user@domain')
  56004. }));
  56005. },
  56006. initPopovers() {
  56007. _.forEach(this.el.querySelectorAll('[data-title]'), el => {
  56008. const popover = new bootstrap.Popover(el, {
  56009. 'trigger': _converse.view_mode === 'mobile' && 'click' || 'hover',
  56010. 'dismissible': _converse.view_mode === 'mobile' && true || false,
  56011. 'container': this.el.parentElement.parentElement.parentElement
  56012. });
  56013. });
  56014. },
  56015. validate() {
  56016. const form = this.el.querySelector('form');
  56017. const jid_element = form.querySelector('input[name=jid]');
  56018. if (jid_element.value && !_converse.locked_domain && !_converse.default_domain && !u.isValidJID(jid_element.value)) {
  56019. jid_element.setCustomValidity(__('Please enter a valid XMPP address'));
  56020. return false;
  56021. }
  56022. jid_element.setCustomValidity('');
  56023. return true;
  56024. },
  56025. authenticate(ev) {
  56026. /* Authenticate the user based on a form submission event.
  56027. */
  56028. if (ev && ev.preventDefault) {
  56029. ev.preventDefault();
  56030. }
  56031. if (_converse.authentication === _converse.ANONYMOUS) {
  56032. this.connect(_converse.jid, null);
  56033. return;
  56034. }
  56035. if (!this.validate()) {
  56036. return;
  56037. }
  56038. const form_data = new FormData(ev.target);
  56039. _converse.config.save({
  56040. 'trusted': form_data.get('trusted') && true || false,
  56041. 'storage': form_data.get('trusted') ? 'local' : 'session'
  56042. });
  56043. let jid = form_data.get('jid');
  56044. if (_converse.locked_domain) {
  56045. const last_part = '@' + _converse.locked_domain;
  56046. if (jid.endsWith(last_part)) {
  56047. jid = jid.substr(0, jid.length - last_part.length);
  56048. }
  56049. jid = Strophe.escapeNode(jid) + last_part;
  56050. } else if (_converse.default_domain && !_.includes(jid, '@')) {
  56051. jid = jid + '@' + _converse.default_domain;
  56052. }
  56053. this.connect(jid, form_data.get('password'));
  56054. },
  56055. connect(jid, password) {
  56056. if (jid) {
  56057. const resource = Strophe.getResourceFromJid(jid);
  56058. if (!resource) {
  56059. jid = jid.toLowerCase() + _converse.generateResource();
  56060. } else {
  56061. jid = Strophe.getBareJidFromJid(jid).toLowerCase() + '/' + resource;
  56062. }
  56063. }
  56064. if (_.includes(["converse/login", "converse/register"], Backbone.history.getFragment())) {
  56065. _converse.router.navigate('', {
  56066. 'replace': true
  56067. });
  56068. }
  56069. _converse.connection.reset();
  56070. _converse.connection.connect(jid, password, _converse.onConnectStatusChanged);
  56071. }
  56072. });
  56073. _converse.ControlBoxPane = Backbone.NativeView.extend({
  56074. tagName: 'div',
  56075. className: 'controlbox-pane',
  56076. initialize() {
  56077. _converse.xmppstatusview = new _converse.XMPPStatusView({
  56078. 'model': _converse.xmppstatus
  56079. });
  56080. this.el.insertAdjacentElement('afterBegin', _converse.xmppstatusview.render().el);
  56081. }
  56082. });
  56083. _converse.ControlBoxToggle = Backbone.NativeView.extend({
  56084. tagName: 'a',
  56085. className: 'toggle-controlbox hidden',
  56086. id: 'toggle-controlbox',
  56087. events: {
  56088. 'click': 'onClick'
  56089. },
  56090. attributes: {
  56091. 'href': "#"
  56092. },
  56093. initialize() {
  56094. _converse.chatboxviews.insertRowColumn(this.render().el);
  56095. _converse.api.waitUntil('initialized').then(this.render.bind(this)).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  56096. },
  56097. render() {
  56098. // We let the render method of ControlBoxView decide whether
  56099. // the ControlBox or the Toggle must be shown. This prevents
  56100. // artifacts (i.e. on page load the toggle is shown only to then
  56101. // seconds later be hidden in favor of the control box).
  56102. this.el.innerHTML = tpl_controlbox_toggle({
  56103. 'label_toggle': _converse.connection.connected ? __('Chat Contacts') : __('Toggle chat')
  56104. });
  56105. return this;
  56106. },
  56107. hide(callback) {
  56108. u.hideElement(this.el);
  56109. callback();
  56110. },
  56111. show(callback) {
  56112. u.fadeIn(this.el, callback);
  56113. },
  56114. showControlBox() {
  56115. let controlbox = _converse.chatboxes.get('controlbox');
  56116. if (!controlbox) {
  56117. controlbox = _converse.addControlBox();
  56118. }
  56119. if (_converse.connection.connected) {
  56120. controlbox.save({
  56121. closed: false
  56122. });
  56123. } else {
  56124. controlbox.trigger('show');
  56125. }
  56126. },
  56127. onClick(e) {
  56128. e.preventDefault();
  56129. if (u.isVisible(_converse.root.querySelector("#controlbox"))) {
  56130. const controlbox = _converse.chatboxes.get('controlbox');
  56131. if (_converse.connection.connected) {
  56132. controlbox.save({
  56133. closed: true
  56134. });
  56135. } else {
  56136. controlbox.trigger('hide');
  56137. }
  56138. } else {
  56139. this.showControlBox();
  56140. }
  56141. }
  56142. });
  56143. _converse.on('chatBoxViewsInitialized', () => {
  56144. const that = _converse.chatboxviews;
  56145. _converse.chatboxes.on('add', item => {
  56146. if (item.get('type') === _converse.CONTROLBOX_TYPE) {
  56147. const view = that.get(item.get('id'));
  56148. if (view) {
  56149. view.model = item;
  56150. view.initialize();
  56151. } else {
  56152. that.add(item.get('id'), new _converse.ControlBoxView({
  56153. model: item
  56154. }));
  56155. }
  56156. }
  56157. });
  56158. });
  56159. _converse.on('clearSession', () => {
  56160. if (_converse.config.get('trusted')) {
  56161. const chatboxes = _.get(_converse, 'chatboxes', null);
  56162. if (!_.isNil(chatboxes)) {
  56163. const controlbox = chatboxes.get('controlbox');
  56164. if (controlbox && controlbox.collection && controlbox.collection.browserStorage) {
  56165. controlbox.save({
  56166. 'connected': false
  56167. });
  56168. }
  56169. }
  56170. }
  56171. });
  56172. Promise.all([_converse.api.waitUntil('connectionInitialized'), _converse.api.waitUntil('chatBoxViewsInitialized')]).then(_converse.addControlBox).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  56173. _converse.on('chatBoxesFetched', () => {
  56174. const controlbox = _converse.chatboxes.get('controlbox') || _converse.addControlBox();
  56175. controlbox.save({
  56176. connected: true
  56177. });
  56178. });
  56179. const disconnect = function disconnect() {
  56180. /* Upon disconnection, set connected to `false`, so that if
  56181. * we reconnect, "onConnected" will be called,
  56182. * to fetch the roster again and to send out a presence stanza.
  56183. */
  56184. const view = _converse.chatboxviews.get('controlbox');
  56185. view.model.set({
  56186. 'connected': false
  56187. });
  56188. return view;
  56189. };
  56190. _converse.on('disconnected', () => disconnect().renderLoginPanel());
  56191. _converse.on('will-reconnect', disconnect);
  56192. }
  56193. });
  56194. });
  56195. /***/ }),
  56196. /***/ "./src/converse-core.js":
  56197. /*!******************************!*\
  56198. !*** ./src/converse-core.js ***!
  56199. \******************************/
  56200. /*! no static exports found */
  56201. /***/ (function(module, exports, __webpack_require__) {
  56202. "use strict";
  56203. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  56204. // Converse.js
  56205. // https://conversejs.org
  56206. //
  56207. // Copyright (c) 2013-2018, the Converse.js developers
  56208. // Licensed under the Mozilla Public License (MPLv2)
  56209. (function (root, factory) {
  56210. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! sizzle */ "./node_modules/sizzle/dist/sizzle.js"), __webpack_require__(/*! es6-promise */ "./node_modules/es6-promise/dist/es6-promise.auto.js"), __webpack_require__(/*! lodash.noconflict */ "./src/lodash.noconflict.js"), __webpack_require__(/*! lodash.fp */ "./src/lodash.fp.js"), __webpack_require__(/*! polyfill */ "./src/polyfill.js"), __webpack_require__(/*! i18n */ "./src/i18n.js"), __webpack_require__(/*! utils/core */ "./src/utils/core.js"), __webpack_require__(/*! moment */ "./node_modules/moment/moment.js"), __webpack_require__(/*! strophe */ "../strophejs/dist/strophe.js"), __webpack_require__(/*! pluggable */ "./node_modules/pluggable.js/dist/pluggable.js"), __webpack_require__(/*! backbone.noconflict */ "./src/backbone.noconflict.js"), __webpack_require__(/*! backbone.nativeview */ "./node_modules/backbone.nativeview/backbone.nativeview.js"), __webpack_require__(/*! backbone.browserStorage */ "./node_modules/backbone.browserStorage/backbone.browserStorage.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  56211. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  56212. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  56213. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  56214. })(void 0, function (sizzle, Promise, _, f, polyfill, i18n, u, moment, Strophe, pluggable, Backbone) {
  56215. "use strict"; // Strophe globals
  56216. const _Strophe = Strophe,
  56217. $build = _Strophe.$build,
  56218. $iq = _Strophe.$iq,
  56219. $msg = _Strophe.$msg,
  56220. $pres = _Strophe.$pres;
  56221. const b64_sha1 = Strophe.SHA1.b64_sha1;
  56222. Strophe = Strophe.Strophe; // Add Strophe Namespaces
  56223. Strophe.addNamespace('CARBONS', 'urn:xmpp:carbons:2');
  56224. Strophe.addNamespace('CHATSTATES', 'http://jabber.org/protocol/chatstates');
  56225. Strophe.addNamespace('CSI', 'urn:xmpp:csi:0');
  56226. Strophe.addNamespace('DELAY', 'urn:xmpp:delay');
  56227. Strophe.addNamespace('FORWARD', 'urn:xmpp:forward:0');
  56228. Strophe.addNamespace('HINTS', 'urn:xmpp:hints');
  56229. Strophe.addNamespace('HTTPUPLOAD', 'urn:xmpp:http:upload:0');
  56230. Strophe.addNamespace('MAM', 'urn:xmpp:mam:2');
  56231. Strophe.addNamespace('NICK', 'http://jabber.org/protocol/nick');
  56232. Strophe.addNamespace('OUTOFBAND', 'jabber:x:oob');
  56233. Strophe.addNamespace('PUBSUB', 'http://jabber.org/protocol/pubsub');
  56234. Strophe.addNamespace('REGISTER', 'jabber:iq:register');
  56235. Strophe.addNamespace('ROSTERX', 'http://jabber.org/protocol/rosterx');
  56236. Strophe.addNamespace('RSM', 'http://jabber.org/protocol/rsm');
  56237. Strophe.addNamespace('SID', 'urn:xmpp:sid:0');
  56238. Strophe.addNamespace('SPOILER', 'urn:xmpp:spoiler:0');
  56239. Strophe.addNamespace('VCARD', 'vcard-temp');
  56240. Strophe.addNamespace('VCARDUPDATE', 'vcard-temp:x:update');
  56241. Strophe.addNamespace('XFORM', 'jabber:x:data'); // Use Mustache style syntax for variable interpolation
  56242. /* Configuration of Lodash templates (this config is distinct to the
  56243. * config of requirejs-tpl in main.js). This one is for normal inline templates.
  56244. */
  56245. _.templateSettings = {
  56246. 'escape': /\{\{\{([\s\S]+?)\}\}\}/g,
  56247. 'evaluate': /\{\[([\s\S]+?)\]\}/g,
  56248. 'interpolate': /\{\{([\s\S]+?)\}\}/g,
  56249. 'imports': {
  56250. '_': _
  56251. }
  56252. };
  56253. /**
  56254. * A private, closured object containing the private api (via `_converse.api`)
  56255. * as well as private methods and internal data-structures.
  56256. *
  56257. * @namespace _converse
  56258. */
  56259. const _converse = {
  56260. 'templates': {},
  56261. 'promises': {}
  56262. };
  56263. _.extend(_converse, Backbone.Events); // Core plugins are whitelisted automatically
  56264. _converse.core_plugins = ['converse-autocomplete', 'converse-bookmarks', 'converse-caps', 'converse-chatboxes', 'converse-chatboxviews', 'converse-chatview', 'converse-controlbox', 'converse-core', 'converse-disco', 'converse-dragresize', 'converse-embedded', 'converse-fullscreen', 'converse-headline', 'converse-mam', 'converse-message-view', 'converse-minimize', 'converse-modal', 'converse-muc', 'converse-muc-views', 'converse-notification', 'converse-omemo', 'converse-ping', 'converse-profile', 'converse-push', 'converse-register', 'converse-roomslist', 'converse-roster', 'converse-rosterview', 'converse-singleton', 'converse-spoilers', 'converse-vcard']; // Setting wait to 59 instead of 60 to avoid timing conflicts with the
  56265. // webserver, which is often also set to 60 and might therefore sometimes
  56266. // return a 504 error page instead of passing through to the BOSH proxy.
  56267. const BOSH_WAIT = 59; // Make converse pluggable
  56268. pluggable.enable(_converse, '_converse', 'pluggable');
  56269. _converse.keycodes = {
  56270. TAB: 9,
  56271. ENTER: 13,
  56272. SHIFT: 16,
  56273. CTRL: 17,
  56274. ALT: 18,
  56275. ESCAPE: 27,
  56276. UP_ARROW: 38,
  56277. DOWN_ARROW: 40,
  56278. FORWARD_SLASH: 47,
  56279. AT: 50,
  56280. META: 91,
  56281. META_RIGHT: 93
  56282. }; // Module-level constants
  56283. _converse.STATUS_WEIGHTS = {
  56284. 'offline': 6,
  56285. 'unavailable': 5,
  56286. 'xa': 4,
  56287. 'away': 3,
  56288. 'dnd': 2,
  56289. 'chat': 1,
  56290. // We currently don't differentiate between "chat" and "online"
  56291. 'online': 1
  56292. };
  56293. _converse.PRETTY_CHAT_STATUS = {
  56294. 'offline': 'Offline',
  56295. 'unavailable': 'Unavailable',
  56296. 'xa': 'Extended Away',
  56297. 'away': 'Away',
  56298. 'dnd': 'Do not disturb',
  56299. 'chat': 'Chattty',
  56300. 'online': 'Online'
  56301. };
  56302. _converse.ANONYMOUS = "anonymous";
  56303. _converse.CLOSED = 'closed';
  56304. _converse.EXTERNAL = "external";
  56305. _converse.LOGIN = "login";
  56306. _converse.LOGOUT = "logout";
  56307. _converse.OPENED = 'opened';
  56308. _converse.PREBIND = "prebind";
  56309. _converse.IQ_TIMEOUT = 20000;
  56310. _converse.CONNECTION_STATUS = {
  56311. 0: 'ERROR',
  56312. 1: 'CONNECTING',
  56313. 2: 'CONNFAIL',
  56314. 3: 'AUTHENTICATING',
  56315. 4: 'AUTHFAIL',
  56316. 5: 'CONNECTED',
  56317. 6: 'DISCONNECTED',
  56318. 7: 'DISCONNECTING',
  56319. 8: 'ATTACHED',
  56320. 9: 'REDIRECT',
  56321. 10: 'RECONNECTING'
  56322. };
  56323. _converse.SUCCESS = 'success';
  56324. _converse.FAILURE = 'failure';
  56325. _converse.DEFAULT_IMAGE_TYPE = 'image/png';
  56326. _converse.DEFAULT_IMAGE = "iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAIAAABt+uBvAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gwHCy455JBsggAABkJJREFUeNrtnM1PE1sUwHvvTD8otWLHST/Gimi1CEgr6M6FEWuIBo2pujDVsNDEP8GN/4MbN7oxrlipG2OCgZgYlxAbkRYw1KqkIDRCSkM7nXvvW8x7vjyNeQ9m7p1p3z1LQk/v/Dhz7vkEXL161cHl9wI5Ag6IA+KAOCAOiAPigDggLhwQB2S+iNZ+PcYY/SWEEP2HAAAIoSAIoihCCP+ngDDGtVotGAz29/cfOXJEUZSOjg6n06lp2sbGRqlUWlhYyGazS0tLbrdbEASrzgksyeYJId3d3el0uqenRxRFAAAA4KdfIIRgjD9+/Pj8+fOpqSndslofEIQwHA6Pjo4mEon//qmFhYXHjx8vLi4ihBgDEnp7e9l8E0Jo165dQ0NDd+/eDYVC2/qsJElDQ0OEkKWlpa2tLZamxAhQo9EIBoOjo6MXL17csZLe3l5FUT59+lQul5l5JRaAVFWNRqN37tw5ceKEQVWRSOTw4cOFQuHbt2+iKLYCIISQLMu3b99OJpOmKAwEAgcPHszn8+vr6wzsiG6UQQhxuVyXLl0aGBgwUW0sFstkMl6v90fo1KyAMMYDAwPnzp0zXfPg4GAqlWo0Gk0MiBAiy/L58+edTqf5Aa4onj59OhaLYYybFRCEMBaL0fNxBw4cSCQStN0QRUBut3t4eJjq6U+dOiVJElVPRBFQIBDo6+ujCqirqyscDlONGykC2lYyYSR6pBoQQapHZwAoHo/TuARYAOrs7GQASFEUqn6aIiBJkhgA6ujooFpUo6iaTa7koFwnaoWadLNe81tbWwzoaJrWrICWl5cZAFpbW6OabVAEtLi4yABQsVjUNK0pAWWzWQaAcrlcswKanZ1VVZUqHYRQEwOq1Wpv3ryhCmh6erpcLjdrNl+v1ycnJ+l5UELI27dvv3//3qxxEADgy5cvExMT9Mznw4cPtFtAdAPFarU6Pj5eKpVM17yxsfHy5cvV1VXazXu62gVBKBQKT58+rdVqJqrFGL948eLdu3dU8/g/H4FBUaJYLAqC0NPTY9brMD4+PjY25mDSracOCABACJmZmXE6nUePHjWu8NWrV48ePSKEsGlAs7Agfd5nenq6Wq0mk0kjDzY2NvbkyRMIIbP2PLvhBUEQ8vl8NpuNx+M+n29bzhVjvLKycv/+/YmJCcazQuwA6YzW1tYmJyf1SY+2trZ/rRk1Go1SqfT69esHDx4UCgVmNaa/zZ/9ABUhRFXVYDB48uTJeDweiUQkSfL7/T9MA2NcqVTK5fLy8vL8/PzU1FSxWHS5XJaM4wGr9sUwxqqqer3eUCgkSZJuUBBCfTRvc3OzXC6vrKxUKhWn02nhCJ5lM4oQQo/HgxD6+vXr58+fHf8sDOp+HQDg8XgclorFU676dKLlo6yWRdItIBwQB8QBcUCtfosRQjRNQwhhjPUC4w46WXryBSHU1zgEQWBz99EFhDGu1+t+v//48ePxeFxRlD179ng8nh0Efgiher2+vr6ur3HMzMysrq7uTJVdACGEurq6Ll++nEgkPB7Pj9jPoDHqOxyqqubz+WfPnuVyuV9XPeyeagAAAoHArVu3BgcHab8CuVzu4cOHpVKJUnfA5GweY+xyuc6cOXPv3r1IJMLAR8iyPDw8XK/Xi8Wiqqqmm5KZgBBC7e3tN27cuHbtGuPVpf7+/lAoNDs7W61WzfVKpgHSSzw3b95MpVKW3MfRaDQSiczNzVUqFRMZmQOIEOL1eq9fv3727FlL1t50URRFluX5+flqtWpWEGAOIFEUU6nUlStXLKSjy759+xwOx9zcnKZpphzGHMzhcDiTydgk9r1w4YIp7RPTAAmCkMlk2FeLf/tIEKbTab/fbwtAhJBoNGrutpNx6e7uPnTokC1eMU3T0um0DZPMkZER6wERQnw+n/FFSxpy7Nix3bt3WwwIIcRgIWnHkkwmjecfRgGx7DtuV/r6+iwGhDHev3+/bQF1dnYaH6E2CkiWZdsC2rt3r8WAHA5HW1ubbQGZcjajgOwTH/4qNko1Wlg4IA6IA+KAOKBWBUQIsfNojyliKIoRRfH9+/dut9umf3wzpoUNNQ4BAJubmwz+ic+OxefzWWlBhJD29nbug7iT5sIBcUAcEAfEAXFAHBAHxOVn+QMrmWpuPZx12gAAAABJRU5ErkJggg==";
  56327. _converse.TIMEOUTS = {
  56328. // Set as module attr so that we can override in tests.
  56329. 'PAUSED': 10000,
  56330. 'INACTIVE': 90000
  56331. }; // XEP-0085 Chat states
  56332. // http://xmpp.org/extensions/xep-0085.html
  56333. _converse.INACTIVE = 'inactive';
  56334. _converse.ACTIVE = 'active';
  56335. _converse.COMPOSING = 'composing';
  56336. _converse.PAUSED = 'paused';
  56337. _converse.GONE = 'gone'; // Chat types
  56338. _converse.PRIVATE_CHAT_TYPE = 'chatbox';
  56339. _converse.CHATROOMS_TYPE = 'chatroom';
  56340. _converse.HEADLINES_TYPE = 'headline';
  56341. _converse.CONTROLBOX_TYPE = 'controlbox'; // Default configuration values
  56342. // ----------------------------
  56343. _converse.default_settings = {
  56344. allow_non_roster_messaging: false,
  56345. animate: true,
  56346. authentication: 'login',
  56347. // Available values are "login", "prebind", "anonymous" and "external".
  56348. auto_away: 0,
  56349. // Seconds after which user status is set to 'away'
  56350. auto_login: false,
  56351. // Currently only used in connection with anonymous login
  56352. auto_reconnect: true,
  56353. auto_xa: 0,
  56354. // Seconds after which user status is set to 'xa'
  56355. blacklisted_plugins: [],
  56356. bosh_service_url: undefined,
  56357. connection_options: {},
  56358. credentials_url: null,
  56359. // URL from where login credentials can be fetched
  56360. csi_waiting_time: 0,
  56361. // Support for XEP-0352. Seconds before client is considered idle and CSI is sent out.
  56362. debug: false,
  56363. default_state: 'online',
  56364. expose_rid_and_sid: false,
  56365. geouri_regex: /https:\/\/www.openstreetmap.org\/.*#map=[0-9]+\/([\-0-9.]+)\/([\-0-9.]+)\S*/g,
  56366. geouri_replacement: 'https://www.openstreetmap.org/?mlat=$1&mlon=$2#map=18/$1/$2',
  56367. jid: undefined,
  56368. keepalive: true,
  56369. locales_url: 'locale/{{{locale}}}/LC_MESSAGES/converse.json',
  56370. locales: ['af', 'ar', 'bg', 'ca', 'cs', 'de', 'es', 'eu', 'en', 'fr', 'he', 'hi', 'hu', 'id', 'it', 'ja', 'nb', 'nl', 'pl', 'pt_BR', 'ro', 'ru', 'tr', 'uk', 'zh_CN', 'zh_TW'],
  56371. message_carbons: true,
  56372. nickname: undefined,
  56373. password: undefined,
  56374. prebind_url: null,
  56375. priority: 0,
  56376. rid: undefined,
  56377. root: window.document,
  56378. sid: undefined,
  56379. strict_plugin_dependencies: false,
  56380. trusted: true,
  56381. view_mode: 'overlayed',
  56382. // Choices are 'overlayed', 'fullscreen', 'mobile'
  56383. websocket_url: undefined,
  56384. whitelisted_plugins: []
  56385. };
  56386. _converse.log = function (message, level, style = '') {
  56387. /* Logs messages to the browser's developer console.
  56388. *
  56389. * Parameters:
  56390. * (String) message - The message to be logged.
  56391. * (Integer) level - The loglevel which allows for filtering of log
  56392. * messages.
  56393. *
  56394. * Available loglevels are 0 for 'debug', 1 for 'info', 2 for 'warn',
  56395. * 3 for 'error' and 4 for 'fatal'.
  56396. *
  56397. * When using the 'error' or 'warn' loglevels, a full stacktrace will be
  56398. * logged as well.
  56399. */
  56400. if (level === Strophe.LogLevel.ERROR || level === Strophe.LogLevel.FATAL) {
  56401. style = style || 'color: maroon';
  56402. }
  56403. if (message instanceof Error) {
  56404. message = message.stack;
  56405. } else if (_.isElement(message)) {
  56406. message = message.outerHTML;
  56407. }
  56408. const prefix = style ? '%c' : '';
  56409. const logger = _.assign({
  56410. 'debug': _.get(console, 'log') ? console.log.bind(console) : _.noop,
  56411. 'error': _.get(console, 'log') ? console.log.bind(console) : _.noop,
  56412. 'info': _.get(console, 'log') ? console.log.bind(console) : _.noop,
  56413. 'warn': _.get(console, 'log') ? console.log.bind(console) : _.noop
  56414. }, console);
  56415. if (level === Strophe.LogLevel.ERROR) {
  56416. logger.error(`${prefix} ERROR: ${message}`, style);
  56417. } else if (level === Strophe.LogLevel.WARN) {
  56418. if (_converse.debug) {
  56419. logger.warn(`${prefix} ${moment().format()} WARNING: ${message}`, style);
  56420. }
  56421. } else if (level === Strophe.LogLevel.FATAL) {
  56422. logger.error(`${prefix} FATAL: ${message}`, style);
  56423. } else if (_converse.debug) {
  56424. if (level === Strophe.LogLevel.DEBUG) {
  56425. logger.debug(`${prefix} ${moment().format()} DEBUG: ${message}`, style);
  56426. } else {
  56427. logger.info(`${prefix} ${moment().format()} INFO: ${message}`, style);
  56428. }
  56429. }
  56430. };
  56431. Strophe.log = function (level, msg) {
  56432. _converse.log(level + ' ' + msg, level);
  56433. };
  56434. Strophe.error = function (msg) {
  56435. _converse.log(msg, Strophe.LogLevel.ERROR);
  56436. };
  56437. _converse.__ = function (str) {
  56438. /* Translate the given string based on the current locale.
  56439. *
  56440. * Parameters:
  56441. * (String) str - The string to translate.
  56442. */
  56443. if (_.isUndefined(i18n)) {
  56444. return str;
  56445. }
  56446. return i18n.translate.apply(i18n, arguments);
  56447. };
  56448. const __ = _converse.__;
  56449. const PROMISES = ['initialized', 'connectionInitialized', 'pluginsInitialized', 'statusInitialized'];
  56450. function addPromise(promise) {
  56451. /* Private function, used to add a new promise to the ones already
  56452. * available via the `waitUntil` api method.
  56453. */
  56454. _converse.promises[promise] = u.getResolveablePromise();
  56455. }
  56456. _converse.emit = function (name) {
  56457. /* Event emitter and promise resolver */
  56458. _converse.trigger.apply(this, arguments);
  56459. const promise = _converse.promises[name];
  56460. if (!_.isUndefined(promise)) {
  56461. promise.resolve();
  56462. }
  56463. };
  56464. _converse.isSingleton = function () {
  56465. return _.includes(['mobile', 'fullscreen', 'embedded'], _converse.view_mode);
  56466. };
  56467. _converse.router = new Backbone.Router();
  56468. _converse.initialize = function (settings, callback) {
  56469. settings = !_.isUndefined(settings) ? settings : {};
  56470. const init_promise = u.getResolveablePromise();
  56471. _.each(PROMISES, addPromise);
  56472. if (!_.isUndefined(_converse.connection)) {
  56473. // Looks like _converse.initialized was called again without logging
  56474. // out or disconnecting in the previous session.
  56475. // This happens in tests. We therefore first clean up.
  56476. Backbone.history.stop();
  56477. _converse.chatboxviews.closeAllChatBoxes();
  56478. if (_converse.bookmarks) {
  56479. _converse.bookmarks.reset();
  56480. }
  56481. delete _converse.controlboxtoggle;
  56482. delete _converse.chatboxviews;
  56483. _converse.connection.reset();
  56484. _converse.stopListening();
  56485. _converse.tearDown();
  56486. delete _converse.config;
  56487. _converse.initClientConfig();
  56488. _converse.off();
  56489. }
  56490. if ('onpagehide' in window) {
  56491. // Pagehide gets thrown in more cases than unload. Specifically it
  56492. // gets thrown when the page is cached and not just
  56493. // closed/destroyed. It's the only viable event on mobile Safari.
  56494. // https://www.webkit.org/blog/516/webkit-page-cache-ii-the-unload-event/
  56495. _converse.unloadevent = 'pagehide';
  56496. } else if ('onbeforeunload' in window) {
  56497. _converse.unloadevent = 'beforeunload';
  56498. } else if ('onunload' in window) {
  56499. _converse.unloadevent = 'unload';
  56500. }
  56501. _.assignIn(this, this.default_settings); // Allow only whitelisted configuration attributes to be overwritten
  56502. _.assignIn(this, _.pick(settings, _.keys(this.default_settings)));
  56503. if (this.authentication === _converse.ANONYMOUS) {
  56504. if (this.auto_login && !this.jid) {
  56505. throw new Error("Config Error: you need to provide the server's " + "domain via the 'jid' option when using anonymous " + "authentication with auto_login.");
  56506. }
  56507. }
  56508. /* Localisation */
  56509. if (!_.isUndefined(i18n)) {
  56510. i18n.setLocales(settings.i18n, _converse);
  56511. } else {
  56512. _converse.locale = 'en';
  56513. } // Module-level variables
  56514. // ----------------------
  56515. this.callback = callback || _.noop;
  56516. /* When reloading the page:
  56517. * For new sessions, we need to send out a presence stanza to notify
  56518. * the server/network that we're online.
  56519. * When re-attaching to an existing session (e.g. via the keepalive
  56520. * option), we don't need to again send out a presence stanza, because
  56521. * it's as if "we never left" (see onConnectStatusChanged).
  56522. * https://github.com/jcbrand/converse.js/issues/521
  56523. */
  56524. this.send_initial_presence = true;
  56525. this.msg_counter = 0;
  56526. this.user_settings = settings; // Save the user settings so that they can be used by plugins
  56527. // Module-level functions
  56528. // ----------------------
  56529. this.generateResource = () => `/converse.js-${Math.floor(Math.random() * 139749528).toString()}`;
  56530. this.sendCSI = function (stat) {
  56531. /* Send out a Chat Status Notification (XEP-0352)
  56532. *
  56533. * Parameters:
  56534. * (String) stat: The user's chat status
  56535. */
  56536. /* Send out a Chat Status Notification (XEP-0352) */
  56537. // XXX if (converse.features[Strophe.NS.CSI] || true) {
  56538. _converse.connection.send($build(stat, {
  56539. xmlns: Strophe.NS.CSI
  56540. }));
  56541. _converse.inactive = stat === _converse.INACTIVE ? true : false;
  56542. };
  56543. this.onUserActivity = function () {
  56544. /* Resets counters and flags relating to CSI and auto_away/auto_xa */
  56545. if (_converse.idle_seconds > 0) {
  56546. _converse.idle_seconds = 0;
  56547. }
  56548. if (!_converse.connection.authenticated) {
  56549. // We can't send out any stanzas when there's no authenticated connection.
  56550. // converse can happen when the connection reconnects.
  56551. return;
  56552. }
  56553. if (_converse.inactive) {
  56554. _converse.sendCSI(_converse.ACTIVE);
  56555. }
  56556. if (_converse.auto_changed_status === true) {
  56557. _converse.auto_changed_status = false; // XXX: we should really remember the original state here, and
  56558. // then set it back to that...
  56559. _converse.xmppstatus.set('status', _converse.default_state);
  56560. }
  56561. };
  56562. this.onEverySecond = function () {
  56563. /* An interval handler running every second.
  56564. * Used for CSI and the auto_away and auto_xa features.
  56565. */
  56566. if (!_converse.connection.authenticated) {
  56567. // We can't send out any stanzas when there's no authenticated connection.
  56568. // This can happen when the connection reconnects.
  56569. return;
  56570. }
  56571. const stat = _converse.xmppstatus.get('status');
  56572. _converse.idle_seconds++;
  56573. if (_converse.csi_waiting_time > 0 && _converse.idle_seconds > _converse.csi_waiting_time && !_converse.inactive) {
  56574. _converse.sendCSI(_converse.INACTIVE);
  56575. }
  56576. if (_converse.auto_away > 0 && _converse.idle_seconds > _converse.auto_away && stat !== 'away' && stat !== 'xa' && stat !== 'dnd') {
  56577. _converse.auto_changed_status = true;
  56578. _converse.xmppstatus.set('status', 'away');
  56579. } else if (_converse.auto_xa > 0 && _converse.idle_seconds > _converse.auto_xa && stat !== 'xa' && stat !== 'dnd') {
  56580. _converse.auto_changed_status = true;
  56581. _converse.xmppstatus.set('status', 'xa');
  56582. }
  56583. };
  56584. this.registerIntervalHandler = function () {
  56585. /* Set an interval of one second and register a handler for it.
  56586. * Required for the auto_away, auto_xa and csi_waiting_time features.
  56587. */
  56588. if (_converse.auto_away < 1 && _converse.auto_xa < 1 && _converse.csi_waiting_time < 1) {
  56589. // Waiting time of less then one second means features aren't used.
  56590. return;
  56591. }
  56592. _converse.idle_seconds = 0;
  56593. _converse.auto_changed_status = false; // Was the user's status changed by _converse.js?
  56594. window.addEventListener('click', _converse.onUserActivity);
  56595. window.addEventListener('focus', _converse.onUserActivity);
  56596. window.addEventListener('keypress', _converse.onUserActivity);
  56597. window.addEventListener('mousemove', _converse.onUserActivity);
  56598. const options = {
  56599. 'once': true,
  56600. 'passive': true
  56601. };
  56602. window.addEventListener(_converse.unloadevent, _converse.onUserActivity, options);
  56603. _converse.everySecondTrigger = window.setInterval(_converse.onEverySecond, 1000);
  56604. };
  56605. this.setConnectionStatus = function (connection_status, message) {
  56606. _converse.connfeedback.set({
  56607. 'connection_status': connection_status,
  56608. 'message': message
  56609. });
  56610. };
  56611. this.rejectPresenceSubscription = function (jid, message) {
  56612. /* Reject or cancel another user's subscription to our presence updates.
  56613. *
  56614. * Parameters:
  56615. * (String) jid - The Jabber ID of the user whose subscription
  56616. * is being canceled.
  56617. * (String) message - An optional message to the user
  56618. */
  56619. const pres = $pres({
  56620. to: jid,
  56621. type: "unsubscribed"
  56622. });
  56623. if (message && message !== "") {
  56624. pres.c("status").t(message);
  56625. }
  56626. _converse.connection.send(pres);
  56627. };
  56628. this.reconnect = _.debounce(function () {
  56629. _converse.log('RECONNECTING');
  56630. _converse.log('The connection has dropped, attempting to reconnect.');
  56631. _converse.setConnectionStatus(Strophe.Status.RECONNECTING, __('The connection has dropped, attempting to reconnect.'));
  56632. _converse.connection.reconnecting = true;
  56633. _converse.tearDown();
  56634. _converse.logIn(null, true);
  56635. }, 3000, {
  56636. 'leading': true
  56637. });
  56638. this.disconnect = function () {
  56639. _converse.log('DISCONNECTED');
  56640. delete _converse.connection.reconnecting;
  56641. _converse.connection.reset();
  56642. _converse.tearDown();
  56643. _converse.clearSession();
  56644. _converse.emit('disconnected');
  56645. };
  56646. this.onDisconnected = function () {
  56647. /* Gets called once strophe's status reaches Strophe.Status.DISCONNECTED.
  56648. * Will either start a teardown process for converse.js or attempt
  56649. * to reconnect.
  56650. */
  56651. const reason = _converse.disconnection_reason;
  56652. if (_converse.disconnection_cause === Strophe.Status.AUTHFAIL) {
  56653. if (_converse.credentials_url && _converse.auto_reconnect) {
  56654. /* In this case, we reconnect, because we might be receiving
  56655. * expirable tokens from the credentials_url.
  56656. */
  56657. _converse.emit('will-reconnect');
  56658. return _converse.reconnect();
  56659. } else {
  56660. return _converse.disconnect();
  56661. }
  56662. } else if (_converse.disconnection_cause === _converse.LOGOUT || !_.isUndefined(reason) && reason === _.get(Strophe, 'ErrorCondition.NO_AUTH_MECH') || reason === "host-unknown" || reason === "remote-connection-failed" || !_converse.auto_reconnect) {
  56663. return _converse.disconnect();
  56664. }
  56665. _converse.emit('will-reconnect');
  56666. _converse.reconnect();
  56667. };
  56668. this.setDisconnectionCause = function (cause, reason, override) {
  56669. /* Used to keep track of why we got disconnected, so that we can
  56670. * decide on what the next appropriate action is (in onDisconnected)
  56671. */
  56672. if (_.isUndefined(cause)) {
  56673. delete _converse.disconnection_cause;
  56674. delete _converse.disconnection_reason;
  56675. } else if (_.isUndefined(_converse.disconnection_cause) || override) {
  56676. _converse.disconnection_cause = cause;
  56677. _converse.disconnection_reason = reason;
  56678. }
  56679. };
  56680. this.onConnectStatusChanged = function (status, message) {
  56681. /* Callback method called by Strophe as the Strophe.Connection goes
  56682. * through various states while establishing or tearing down a
  56683. * connection.
  56684. */
  56685. _converse.log(`Status changed to: ${_converse.CONNECTION_STATUS[status]}`);
  56686. if (status === Strophe.Status.CONNECTED || status === Strophe.Status.ATTACHED) {
  56687. _converse.setConnectionStatus(status); // By default we always want to send out an initial presence stanza.
  56688. _converse.send_initial_presence = true;
  56689. _converse.setDisconnectionCause();
  56690. if (_converse.connection.reconnecting) {
  56691. _converse.log(status === Strophe.Status.CONNECTED ? 'Reconnected' : 'Reattached');
  56692. _converse.onConnected(true);
  56693. } else {
  56694. _converse.log(status === Strophe.Status.CONNECTED ? 'Connected' : 'Attached');
  56695. if (_converse.connection.restored) {
  56696. // No need to send an initial presence stanza when
  56697. // we're restoring an existing session.
  56698. _converse.send_initial_presence = false;
  56699. }
  56700. _converse.onConnected();
  56701. }
  56702. } else if (status === Strophe.Status.DISCONNECTED) {
  56703. _converse.setDisconnectionCause(status, message);
  56704. _converse.onDisconnected();
  56705. } else if (status === Strophe.Status.ERROR) {
  56706. _converse.setConnectionStatus(status, __('An error occurred while connecting to the chat server.'));
  56707. } else if (status === Strophe.Status.CONNECTING) {
  56708. _converse.setConnectionStatus(status);
  56709. } else if (status === Strophe.Status.AUTHENTICATING) {
  56710. _converse.setConnectionStatus(status);
  56711. } else if (status === Strophe.Status.AUTHFAIL) {
  56712. if (!message) {
  56713. message = __('Your Jabber ID and/or password is incorrect. Please try again.');
  56714. }
  56715. _converse.setConnectionStatus(status, message);
  56716. _converse.setDisconnectionCause(status, message, true);
  56717. _converse.onDisconnected();
  56718. } else if (status === Strophe.Status.CONNFAIL) {
  56719. let feedback = message;
  56720. if (message === "host-unknown" || message == "remote-connection-failed") {
  56721. feedback = __("Sorry, we could not connect to the XMPP host with domain: %1$s", `\"${Strophe.getDomainFromJid(_converse.connection.jid)}\"`);
  56722. } else if (!_.isUndefined(message) && message === _.get(Strophe, 'ErrorCondition.NO_AUTH_MECH')) {
  56723. feedback = __("The XMPP server did not offer a supported authentication mechanism");
  56724. }
  56725. _converse.setConnectionStatus(status, feedback);
  56726. _converse.setDisconnectionCause(status, message);
  56727. } else if (status === Strophe.Status.DISCONNECTING) {
  56728. _converse.setDisconnectionCause(status, message);
  56729. }
  56730. };
  56731. this.incrementMsgCounter = function () {
  56732. this.msg_counter += 1;
  56733. const unreadMsgCount = this.msg_counter;
  56734. let title = document.title;
  56735. if (_.isNil(title)) {
  56736. return;
  56737. }
  56738. if (title.search(/^Messages \(\d+\) /) === -1) {
  56739. title = `Messages (${unreadMsgCount}) ${title}`;
  56740. } else {
  56741. title = title.replace(/^Messages \(\d+\) /, `Messages (${unreadMsgCount})`);
  56742. }
  56743. };
  56744. this.clearMsgCounter = function () {
  56745. this.msg_counter = 0;
  56746. let title = document.title;
  56747. if (_.isNil(title)) {
  56748. return;
  56749. }
  56750. if (title.search(/^Messages \(\d+\) /) !== -1) {
  56751. title = title.replace(/^Messages \(\d+\) /, "");
  56752. }
  56753. };
  56754. this.initStatus = reconnecting => {
  56755. // If there's no xmppstatus obj, then we were never connected to
  56756. // begin with, so we set reconnecting to false.
  56757. reconnecting = _.isUndefined(_converse.xmppstatus) ? false : reconnecting;
  56758. if (reconnecting) {
  56759. _converse.onStatusInitialized(reconnecting);
  56760. } else {
  56761. const id = `converse.xmppstatus-${_converse.bare_jid}`;
  56762. this.xmppstatus = new this.XMPPStatus({
  56763. 'id': id
  56764. });
  56765. this.xmppstatus.browserStorage = new Backbone.BrowserStorage.session(id);
  56766. this.xmppstatus.fetch({
  56767. 'success': _.partial(_converse.onStatusInitialized, reconnecting),
  56768. 'error': _.partial(_converse.onStatusInitialized, reconnecting)
  56769. });
  56770. }
  56771. };
  56772. this.initClientConfig = function () {
  56773. /* The client config refers to configuration of the client which is
  56774. * independent of any particular user.
  56775. * What this means is that config values need to persist across
  56776. * user sessions.
  56777. */
  56778. const id = b64_sha1('converse.client-config');
  56779. _converse.config = new Backbone.Model({
  56780. 'id': id,
  56781. 'trusted': _converse.trusted && true || false,
  56782. 'storage': _converse.trusted ? 'local' : 'session'
  56783. });
  56784. _converse.config.browserStorage = new Backbone.BrowserStorage.session(id);
  56785. _converse.config.fetch();
  56786. _converse.emit('clientConfigInitialized');
  56787. };
  56788. this.initSession = function () {
  56789. const id = b64_sha1('converse.bosh-session');
  56790. _converse.session = new Backbone.Model({
  56791. 'id': id
  56792. });
  56793. _converse.session.browserStorage = new Backbone.BrowserStorage.session(id);
  56794. _converse.session.fetch();
  56795. _converse.emit('sessionInitialized');
  56796. };
  56797. this.clearSession = function () {
  56798. if (!_converse.config.get('trusted')) {
  56799. window.localStorage.clear();
  56800. window.sessionStorage.clear();
  56801. } else if (!_.isUndefined(this.session) && this.session.browserStorage) {
  56802. this.session.browserStorage._clear();
  56803. }
  56804. _converse.emit('clearSession');
  56805. };
  56806. this.logOut = function () {
  56807. _converse.clearSession();
  56808. _converse.setDisconnectionCause(_converse.LOGOUT, undefined, true);
  56809. if (!_.isUndefined(_converse.connection)) {
  56810. _converse.connection.disconnect();
  56811. } else {
  56812. _converse.tearDown();
  56813. } // Recreate all the promises
  56814. _.each(_.keys(_converse.promises), addPromise);
  56815. _converse.emit('logout');
  56816. };
  56817. this.saveWindowState = function (ev, hidden) {
  56818. // XXX: eventually we should be able to just use
  56819. // document.visibilityState (when we drop support for older
  56820. // browsers).
  56821. let state;
  56822. const event_map = {
  56823. 'focus': "visible",
  56824. 'focusin': "visible",
  56825. 'pageshow': "visible",
  56826. 'blur': "hidden",
  56827. 'focusout': "hidden",
  56828. 'pagehide': "hidden"
  56829. };
  56830. ev = ev || document.createEvent('Events');
  56831. if (ev.type in event_map) {
  56832. state = event_map[ev.type];
  56833. } else {
  56834. state = document[hidden] ? "hidden" : "visible";
  56835. }
  56836. if (state === 'visible') {
  56837. _converse.clearMsgCounter();
  56838. }
  56839. _converse.windowState = state;
  56840. _converse.emit('windowStateChanged', {
  56841. state
  56842. });
  56843. };
  56844. this.registerGlobalEventHandlers = function () {
  56845. // Taken from:
  56846. // http://stackoverflow.com/questions/1060008/is-there-a-way-to-detect-if-a-browser-window-is-not-currently-active
  56847. let hidden = "hidden"; // Standards:
  56848. if (hidden in document) {
  56849. document.addEventListener("visibilitychange", _.partial(_converse.saveWindowState, _, hidden));
  56850. } else if ((hidden = "mozHidden") in document) {
  56851. document.addEventListener("mozvisibilitychange", _.partial(_converse.saveWindowState, _, hidden));
  56852. } else if ((hidden = "webkitHidden") in document) {
  56853. document.addEventListener("webkitvisibilitychange", _.partial(_converse.saveWindowState, _, hidden));
  56854. } else if ((hidden = "msHidden") in document) {
  56855. document.addEventListener("msvisibilitychange", _.partial(_converse.saveWindowState, _, hidden));
  56856. } else if ("onfocusin" in document) {
  56857. // IE 9 and lower:
  56858. document.onfocusin = document.onfocusout = _.partial(_converse.saveWindowState, _, hidden);
  56859. } else {
  56860. // All others:
  56861. window.onpageshow = window.onpagehide = window.onfocus = window.onblur = _.partial(_converse.saveWindowState, _, hidden);
  56862. } // set the initial state (but only if browser supports the Page Visibility API)
  56863. if (document[hidden] !== undefined) {
  56864. _.partial(_converse.saveWindowState, _, hidden)({
  56865. type: document[hidden] ? "blur" : "focus"
  56866. });
  56867. }
  56868. _converse.emit('registeredGlobalEventHandlers');
  56869. };
  56870. this.enableCarbons = function () {
  56871. /* Ask the XMPP server to enable Message Carbons
  56872. * See XEP-0280 https://xmpp.org/extensions/xep-0280.html#enabling
  56873. */
  56874. if (!this.message_carbons || this.session.get('carbons_enabled')) {
  56875. return;
  56876. }
  56877. const carbons_iq = new Strophe.Builder('iq', {
  56878. 'from': this.connection.jid,
  56879. 'id': 'enablecarbons',
  56880. 'type': 'set'
  56881. }).c('enable', {
  56882. xmlns: Strophe.NS.CARBONS
  56883. });
  56884. this.connection.addHandler(iq => {
  56885. if (iq.querySelectorAll('error').length > 0) {
  56886. _converse.log('An error occurred while trying to enable message carbons.', Strophe.LogLevel.WARN);
  56887. } else {
  56888. this.session.save({
  56889. 'carbons_enabled': true
  56890. });
  56891. _converse.log('Message carbons have been enabled.');
  56892. }
  56893. }, null, "iq", null, "enablecarbons");
  56894. this.connection.send(carbons_iq);
  56895. };
  56896. this.sendInitialPresence = function () {
  56897. if (_converse.send_initial_presence) {
  56898. _converse.xmppstatus.sendPresence();
  56899. }
  56900. };
  56901. this.onStatusInitialized = function (reconnecting) {
  56902. _converse.emit('statusInitialized', reconnecting);
  56903. if (reconnecting) {
  56904. _converse.emit('reconnected');
  56905. } else {
  56906. init_promise.resolve();
  56907. _converse.emit('initialized');
  56908. _converse.emit('connected');
  56909. }
  56910. };
  56911. this.setUserJID = function () {
  56912. _converse.jid = _converse.connection.jid;
  56913. _converse.bare_jid = Strophe.getBareJidFromJid(_converse.connection.jid);
  56914. _converse.resource = Strophe.getResourceFromJid(_converse.connection.jid);
  56915. _converse.domain = Strophe.getDomainFromJid(_converse.connection.jid);
  56916. _converse.emit('setUserJID');
  56917. };
  56918. this.onConnected = function (reconnecting) {
  56919. /* Called as soon as a new connection has been established, either
  56920. * by logging in or by attaching to an existing BOSH session.
  56921. */
  56922. _converse.connection.flush(); // Solves problem of returned PubSub BOSH response not received by browser
  56923. _converse.setUserJID();
  56924. _converse.initSession();
  56925. _converse.enableCarbons();
  56926. _converse.initStatus(reconnecting);
  56927. };
  56928. this.ConnectionFeedback = Backbone.Model.extend({
  56929. defaults: {
  56930. 'connection_status': Strophe.Status.DISCONNECTED,
  56931. 'message': ''
  56932. },
  56933. initialize() {
  56934. this.on('change', () => {
  56935. _converse.emit('connfeedback', _converse.connfeedback);
  56936. });
  56937. }
  56938. });
  56939. this.connfeedback = new this.ConnectionFeedback();
  56940. this.XMPPStatus = Backbone.Model.extend({
  56941. defaults() {
  56942. return {
  56943. "jid": _converse.bare_jid,
  56944. "status": _converse.default_state
  56945. };
  56946. },
  56947. initialize() {
  56948. this.vcard = _converse.vcards.findWhere({
  56949. 'jid': this.get('jid')
  56950. });
  56951. if (_.isNil(this.vcard)) {
  56952. this.vcard = _converse.vcards.create({
  56953. 'jid': this.get('jid')
  56954. });
  56955. }
  56956. this.on('change:status', item => {
  56957. const status = this.get('status');
  56958. this.sendPresence(status);
  56959. _converse.emit('statusChanged', status);
  56960. });
  56961. this.on('change:status_message', () => {
  56962. const status_message = this.get('status_message');
  56963. this.sendPresence(this.get('status'), status_message);
  56964. _converse.emit('statusMessageChanged', status_message);
  56965. });
  56966. },
  56967. constructPresence(type, status_message) {
  56968. let presence;
  56969. type = _.isString(type) ? type : this.get('status') || _converse.default_state;
  56970. status_message = _.isString(status_message) ? status_message : this.get('status_message'); // Most of these presence types are actually not explicitly sent,
  56971. // but I add all of them here for reference and future proofing.
  56972. if (type === 'unavailable' || type === 'probe' || type === 'error' || type === 'unsubscribe' || type === 'unsubscribed' || type === 'subscribe' || type === 'subscribed') {
  56973. presence = $pres({
  56974. 'type': type
  56975. });
  56976. } else if (type === 'offline') {
  56977. presence = $pres({
  56978. 'type': 'unavailable'
  56979. });
  56980. } else if (type === 'online') {
  56981. presence = $pres();
  56982. } else {
  56983. presence = $pres().c('show').t(type).up();
  56984. }
  56985. if (status_message) {
  56986. presence.c('status').t(status_message).up();
  56987. }
  56988. presence.c('priority').t(_.isNaN(Number(_converse.priority)) ? 0 : _converse.priority);
  56989. return presence;
  56990. },
  56991. sendPresence(type, status_message) {
  56992. _converse.connection.send(this.constructPresence(type, status_message));
  56993. }
  56994. });
  56995. this.setUpXMLLogging = function () {
  56996. Strophe.log = function (level, msg) {
  56997. _converse.log(msg, level);
  56998. };
  56999. if (this.debug) {
  57000. this.connection.xmlInput = function (body) {
  57001. _converse.log(body.outerHTML, Strophe.LogLevel.DEBUG, 'color: darkgoldenrod');
  57002. };
  57003. this.connection.xmlOutput = function (body) {
  57004. _converse.log(body.outerHTML, Strophe.LogLevel.DEBUG, 'color: darkcyan');
  57005. };
  57006. }
  57007. };
  57008. this.fetchLoginCredentials = () => new Promise((resolve, reject) => {
  57009. const xhr = new XMLHttpRequest();
  57010. xhr.open('GET', _converse.credentials_url, true);
  57011. xhr.setRequestHeader('Accept', "application/json, text/javascript");
  57012. xhr.onload = function () {
  57013. if (xhr.status >= 200 && xhr.status < 400) {
  57014. const data = JSON.parse(xhr.responseText);
  57015. resolve({
  57016. 'jid': data.jid,
  57017. 'password': data.password
  57018. });
  57019. } else {
  57020. xhr.onerror();
  57021. }
  57022. };
  57023. xhr.onerror = function () {
  57024. delete _converse.connection;
  57025. _converse.emit('noResumeableSession', this);
  57026. reject(xhr.responseText);
  57027. };
  57028. xhr.send();
  57029. });
  57030. this.startNewBOSHSession = function () {
  57031. const xhr = new XMLHttpRequest();
  57032. xhr.open('GET', _converse.prebind_url, true);
  57033. xhr.setRequestHeader('Accept', "application/json, text/javascript");
  57034. xhr.onload = function () {
  57035. if (xhr.status >= 200 && xhr.status < 400) {
  57036. const data = JSON.parse(xhr.responseText);
  57037. _converse.connection.attach(data.jid, data.sid, data.rid, _converse.onConnectStatusChanged);
  57038. } else {
  57039. xhr.onerror();
  57040. }
  57041. };
  57042. xhr.onerror = function () {
  57043. delete _converse.connection;
  57044. _converse.emit('noResumeableSession', this);
  57045. };
  57046. xhr.send();
  57047. };
  57048. this.restoreBOSHSession = function (jid_is_required) {
  57049. /* Tries to restore a cached BOSH session. */
  57050. if (!this.jid) {
  57051. const msg = "restoreBOSHSession: tried to restore a \"keepalive\" session " + "but we don't have the JID for the user!";
  57052. if (jid_is_required) {
  57053. throw new Error(msg);
  57054. } else {
  57055. _converse.log(msg);
  57056. }
  57057. }
  57058. try {
  57059. this.connection.restore(this.jid, this.onConnectStatusChanged);
  57060. return true;
  57061. } catch (e) {
  57062. _converse.log("Could not restore session for jid: " + this.jid + " Error message: " + e.message, Strophe.LogLevel.WARN);
  57063. this.clearSession(); // We want to clear presences (see #555)
  57064. return false;
  57065. }
  57066. };
  57067. this.attemptPreboundSession = function (reconnecting) {
  57068. /* Handle session resumption or initialization when prebind is
  57069. * being used.
  57070. */
  57071. if (!reconnecting) {
  57072. if (this.keepalive && this.restoreBOSHSession(true)) {
  57073. return;
  57074. } // No keepalive, or session resumption has failed.
  57075. if (this.jid && this.sid && this.rid) {
  57076. return this.connection.attach(this.jid, this.sid, this.rid, this.onConnectStatusChanged);
  57077. }
  57078. }
  57079. if (this.prebind_url) {
  57080. return this.startNewBOSHSession();
  57081. } else {
  57082. throw new Error("attemptPreboundSession: If you use prebind and not keepalive, " + "then you MUST supply JID, RID and SID values or a prebind_url.");
  57083. }
  57084. };
  57085. this.attemptNonPreboundSession = function (credentials, reconnecting) {
  57086. /* Handle session resumption or initialization when prebind is not being used.
  57087. *
  57088. * Two potential options exist and are handled in this method:
  57089. * 1. keepalive
  57090. * 2. auto_login
  57091. */
  57092. if (!reconnecting && this.keepalive && this.restoreBOSHSession()) {
  57093. return;
  57094. }
  57095. if (credentials) {
  57096. // When credentials are passed in, they override prebinding
  57097. // or credentials fetching via HTTP
  57098. this.autoLogin(credentials);
  57099. } else if (this.auto_login) {
  57100. if (this.credentials_url) {
  57101. this.fetchLoginCredentials().then(this.autoLogin.bind(this), this.autoLogin.bind(this));
  57102. } else if (!this.jid) {
  57103. throw new Error("attemptNonPreboundSession: If you use auto_login, " + "you also need to give either a jid value (and if " + "applicable a password) or you need to pass in a URL " + "from where the username and password can be fetched " + "(via credentials_url).");
  57104. } else {
  57105. this.autoLogin(); // Could be ANONYMOUS or EXTERNAL
  57106. }
  57107. } else if (reconnecting) {
  57108. this.autoLogin();
  57109. }
  57110. };
  57111. this.autoLogin = function (credentials) {
  57112. if (credentials) {
  57113. // If passed in, the credentials come from credentials_url,
  57114. // so we set them on the converse object.
  57115. this.jid = credentials.jid;
  57116. }
  57117. if (this.authentication === _converse.ANONYMOUS || this.authentication === _converse.EXTERNAL) {
  57118. if (!this.jid) {
  57119. throw new Error("Config Error: when using anonymous login " + "you need to provide the server's domain via the 'jid' option. " + "Either when calling converse.initialize, or when calling " + "_converse.api.user.login.");
  57120. }
  57121. if (!this.connection.reconnecting) {
  57122. this.connection.reset();
  57123. }
  57124. this.connection.connect(this.jid.toLowerCase(), null, this.onConnectStatusChanged, BOSH_WAIT);
  57125. } else if (this.authentication === _converse.LOGIN) {
  57126. const password = _.isNil(credentials) ? _converse.connection.pass || this.password : credentials.password;
  57127. if (!password) {
  57128. if (this.auto_login) {
  57129. throw new Error("initConnection: If you use auto_login and " + "authentication='login' then you also need to provide a password.");
  57130. }
  57131. _converse.setDisconnectionCause(Strophe.Status.AUTHFAIL, undefined, true);
  57132. _converse.disconnect();
  57133. return;
  57134. }
  57135. const resource = Strophe.getResourceFromJid(this.jid);
  57136. if (!resource) {
  57137. this.jid = this.jid.toLowerCase() + _converse.generateResource();
  57138. } else {
  57139. this.jid = Strophe.getBareJidFromJid(this.jid).toLowerCase() + '/' + resource;
  57140. }
  57141. if (!this.connection.reconnecting) {
  57142. this.connection.reset();
  57143. }
  57144. this.connection.connect(this.jid, password, this.onConnectStatusChanged, BOSH_WAIT);
  57145. }
  57146. };
  57147. this.logIn = function (credentials, reconnecting) {
  57148. // We now try to resume or automatically set up a new session.
  57149. // Otherwise the user will be shown a login form.
  57150. if (this.authentication === _converse.PREBIND) {
  57151. this.attemptPreboundSession(reconnecting);
  57152. } else {
  57153. this.attemptNonPreboundSession(credentials, reconnecting);
  57154. }
  57155. };
  57156. this.initConnection = function () {
  57157. /* Creates a new Strophe.Connection instance if we don't already have one.
  57158. */
  57159. if (!this.connection) {
  57160. if (!this.bosh_service_url && !this.websocket_url) {
  57161. throw new Error("initConnection: you must supply a value for either the bosh_service_url or websocket_url or both.");
  57162. }
  57163. if (('WebSocket' in window || 'MozWebSocket' in window) && this.websocket_url) {
  57164. this.connection = new Strophe.Connection(this.websocket_url, this.connection_options);
  57165. } else if (this.bosh_service_url) {
  57166. this.connection = new Strophe.Connection(this.bosh_service_url, _.assignIn(this.connection_options, {
  57167. 'keepalive': this.keepalive
  57168. }));
  57169. } else {
  57170. throw new Error("initConnection: this browser does not support websockets and bosh_service_url wasn't specified.");
  57171. }
  57172. }
  57173. _converse.emit('connectionInitialized');
  57174. };
  57175. this.tearDown = function () {
  57176. /* Remove those views which are only allowed with a valid
  57177. * connection.
  57178. */
  57179. _converse.emit('beforeTearDown');
  57180. if (!_.isUndefined(_converse.session)) {
  57181. _converse.session.destroy();
  57182. }
  57183. window.removeEventListener('click', _converse.onUserActivity);
  57184. window.removeEventListener('focus', _converse.onUserActivity);
  57185. window.removeEventListener('keypress', _converse.onUserActivity);
  57186. window.removeEventListener('mousemove', _converse.onUserActivity);
  57187. window.removeEventListener(_converse.unloadevent, _converse.onUserActivity);
  57188. window.clearInterval(_converse.everySecondTrigger);
  57189. _converse.emit('afterTearDown');
  57190. return _converse;
  57191. };
  57192. this.initPlugins = function () {
  57193. // If initialize gets called a second time (e.g. during tests), then we
  57194. // need to re-apply all plugins (for a new converse instance), and we
  57195. // therefore need to clear this array that prevents plugins from being
  57196. // initialized twice.
  57197. // If initialize is called for the first time, then this array is empty
  57198. // in any case.
  57199. _converse.pluggable.initialized_plugins = [];
  57200. const whitelist = _converse.core_plugins.concat(_converse.whitelisted_plugins);
  57201. if (_converse.view_mode === 'embedded') {
  57202. _.forEach([// eslint-disable-line lodash/prefer-map
  57203. "converse-bookmarks", "converse-controlbox", "converse-headline", "converse-register"], name => {
  57204. _converse.blacklisted_plugins.push(name);
  57205. });
  57206. }
  57207. _converse.pluggable.initializePlugins({
  57208. 'updateSettings'() {
  57209. _converse.log("(DEPRECATION) " + "The `updateSettings` method has been deprecated. " + "Please use `_converse.api.settings.update` instead.", Strophe.LogLevel.WARN);
  57210. _converse.api.settings.update.apply(_converse, arguments);
  57211. },
  57212. '_converse': _converse
  57213. }, whitelist, _converse.blacklisted_plugins);
  57214. _converse.emit('pluginsInitialized');
  57215. }; // Initialization
  57216. // --------------
  57217. // This is the end of the initialize method.
  57218. if (settings.connection) {
  57219. this.connection = settings.connection;
  57220. }
  57221. function finishInitialization() {
  57222. _converse.initPlugins();
  57223. _converse.initClientConfig();
  57224. _converse.initConnection();
  57225. _converse.setUpXMLLogging();
  57226. _converse.logIn();
  57227. _converse.registerGlobalEventHandlers();
  57228. if (!Backbone.history.started) {
  57229. Backbone.history.start();
  57230. }
  57231. }
  57232. if (!_.isUndefined(_converse.connection) && _converse.connection.service === 'jasmine tests') {
  57233. finishInitialization();
  57234. return _converse;
  57235. } else if (_.isUndefined(i18n)) {
  57236. finishInitialization();
  57237. } else {
  57238. i18n.fetchTranslations(_converse.locale, _converse.locales, u.interpolate(_converse.locales_url, {
  57239. 'locale': _converse.locale
  57240. })).catch(e => _converse.log(e.message, Strophe.LogLevel.FATAL)).then(finishInitialization).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  57241. }
  57242. return init_promise;
  57243. };
  57244. /**
  57245. * ### The private API
  57246. *
  57247. * The private API methods are only accessible via the closured {@link _converse}
  57248. * object, which is only available to plugins.
  57249. *
  57250. * These methods are kept private (i.e. not global) because they may return
  57251. * sensitive data which should be kept off-limits to other 3rd-party scripts
  57252. * that might be running in the page.
  57253. *
  57254. * @namespace _converse.api
  57255. * @memberOf _converse
  57256. */
  57257. _converse.api = {
  57258. /**
  57259. * This grouping collects API functions related to the XMPP connection.
  57260. *
  57261. * @namespace _converse.api.connection
  57262. * @memberOf _converse.api
  57263. */
  57264. 'connection': {
  57265. /**
  57266. * @method _converse.api.connection.connected
  57267. * @memberOf _converse.api.connection
  57268. * @returns {boolean} Whether there is an established connection or not.
  57269. */
  57270. 'connected'() {
  57271. return _converse.connection && _converse.connection.connected || false;
  57272. },
  57273. /**
  57274. * Terminates the connection.
  57275. *
  57276. * @method _converse.api.connection.disconnect
  57277. * @memberOf _converse.api.connection
  57278. */
  57279. 'disconnect'() {
  57280. _converse.connection.disconnect();
  57281. }
  57282. },
  57283. /**
  57284. * Lets you emit (i.e. trigger) events, which can be listened to via
  57285. * {@link _converse.api.listen.on} or {@link _converse.api.listen.once}
  57286. * (see [_converse.api.listen](http://localhost:8000/docs/html/api/-_converse.api.listen.html)).
  57287. *
  57288. * @method _converse.api.emit
  57289. */
  57290. 'emit'() {
  57291. _converse.emit.apply(_converse, arguments);
  57292. },
  57293. /**
  57294. * This grouping collects API functions related to the current logged in user.
  57295. *
  57296. * @namespace _converse.api.user
  57297. * @memberOf _converse.api
  57298. */
  57299. 'user': {
  57300. /**
  57301. * @method _converse.api.user.jid
  57302. * @returns {string} The current user's full JID (Jabber ID)
  57303. * @example _converse.api.user.jid())
  57304. */
  57305. 'jid'() {
  57306. return _converse.connection.jid;
  57307. },
  57308. /**
  57309. * Logs the user in.
  57310. *
  57311. * If called without any parameters, Converse will try
  57312. * to log the user in by calling the `prebind_url` or `credentials_url` depending
  57313. * on whether prebinding is used or not.
  57314. *
  57315. * @method _converse.api.user.login
  57316. * @param {object} [credentials] An object with the credentials.
  57317. * @example
  57318. * converse.plugins.add('myplugin', {
  57319. * initialize: function () {
  57320. *
  57321. * this._converse.api.user.login({
  57322. * 'jid': 'dummy@example.com',
  57323. * 'password': 'secret'
  57324. * });
  57325. *
  57326. * }
  57327. * });
  57328. */
  57329. 'login'(credentials) {
  57330. _converse.logIn(credentials);
  57331. },
  57332. /**
  57333. * Logs the user out of the current XMPP session.
  57334. *
  57335. * @method _converse.api.user.logout
  57336. * @example _converse.api.user.logout();
  57337. */
  57338. 'logout'() {
  57339. _converse.logOut();
  57340. },
  57341. /**
  57342. * Set and get the user's chat status, also called their *availability*.
  57343. *
  57344. * @namespace _converse.api.user.status
  57345. * @memberOf _converse.api.user
  57346. */
  57347. 'status': {
  57348. /** Return the current user's availability status.
  57349. *
  57350. * @method _converse.api.user.status.get
  57351. * @example _converse.api.user.status.get();
  57352. */
  57353. 'get'() {
  57354. return _converse.xmppstatus.get('status');
  57355. },
  57356. /**
  57357. * The user's status can be set to one of the following values:
  57358. *
  57359. * @method _converse.api.user.status.set
  57360. * @param {string} value The user's chat status (e.g. 'away', 'dnd', 'offline', 'online', 'unavailable' or 'xa')
  57361. * @param {string} [message] A custom status message
  57362. *
  57363. * @example this._converse.api.user.status.set('dnd');
  57364. * @example this._converse.api.user.status.set('dnd', 'In a meeting');
  57365. */
  57366. 'set'(value, message) {
  57367. const data = {
  57368. 'status': value
  57369. };
  57370. if (!_.includes(_.keys(_converse.STATUS_WEIGHTS), value)) {
  57371. throw new Error('Invalid availability value. See https://xmpp.org/rfcs/rfc3921.html#rfc.section.2.2.2.1');
  57372. }
  57373. if (_.isString(message)) {
  57374. data.status_message = message;
  57375. }
  57376. _converse.xmppstatus.sendPresence(value);
  57377. _converse.xmppstatus.save(data);
  57378. },
  57379. /**
  57380. * Set and retrieve the user's custom status message.
  57381. *
  57382. * @namespace _converse.api.user.status.message
  57383. * @memberOf _converse.api.user.status
  57384. */
  57385. 'message': {
  57386. /**
  57387. * @method _converse.api.user.status.message.get
  57388. * @returns {string} The status message
  57389. * @example const message = _converse.api.user.status.message.get()
  57390. */
  57391. 'get'() {
  57392. return _converse.xmppstatus.get('status_message');
  57393. },
  57394. /**
  57395. * @method _converse.api.user.status.message.set
  57396. * @param {string} status The status message
  57397. * @example _converse.api.user.status.message.set('In a meeting');
  57398. */
  57399. 'set'(status) {
  57400. _converse.xmppstatus.save({
  57401. 'status_message': status
  57402. });
  57403. }
  57404. }
  57405. }
  57406. },
  57407. /**
  57408. * This grouping allows access to the
  57409. * [configuration settings](/docs/html/configuration.html#configuration-settings)
  57410. * of Converse.
  57411. *
  57412. * @namespace _converse.api.settings
  57413. * @memberOf _converse.api
  57414. */
  57415. 'settings': {
  57416. /**
  57417. * Allows new configuration settings to be specified, or new default values for
  57418. * existing configuration settings to be specified.
  57419. *
  57420. * @method _converse.api.settings.update
  57421. * @param {object} settings The configuration settings
  57422. * @example
  57423. * _converse.api.settings.update({
  57424. * 'enable_foo': true
  57425. * });
  57426. *
  57427. * // The user can then override the default value of the configuration setting when
  57428. * // calling `converse.initialize`.
  57429. * converse.initialize({
  57430. * 'enable_foo': false
  57431. * });
  57432. */
  57433. 'update'(settings) {
  57434. u.merge(_converse.default_settings, settings);
  57435. u.merge(_converse, settings);
  57436. u.applyUserSettings(_converse, settings, _converse.user_settings);
  57437. },
  57438. /**
  57439. * @method _converse.api.settings.get
  57440. * @returns {*} Value of the particular configuration setting.
  57441. * @example _converse.api.settings.get("play_sounds");
  57442. */
  57443. 'get'(key) {
  57444. if (_.includes(_.keys(_converse.default_settings), key)) {
  57445. return _converse[key];
  57446. }
  57447. },
  57448. /**
  57449. * Set one or many configuration settings.
  57450. *
  57451. * Note, this is not an alternative to calling {@link converse.initialize}, which still needs
  57452. * to be called. Generally, you'd use this method after Converse is already
  57453. * running and you want to change the configuration on-the-fly.
  57454. *
  57455. * @method _converse.api.settings.set
  57456. * @param {Object} [settings] An object containing configuration settings.
  57457. * @param {string} [key] Alternatively to passing in an object, you can pass in a key and a value.
  57458. * @param {string} [value]
  57459. * @example _converse.api.settings.set("play_sounds", true);
  57460. * @example
  57461. * _converse.api.settings.set({
  57462. * "play_sounds", true,
  57463. * "hide_offline_users" true
  57464. * });
  57465. */
  57466. 'set'(key, val) {
  57467. const o = {};
  57468. if (_.isObject(key)) {
  57469. _.assignIn(_converse, _.pick(key, _.keys(_converse.default_settings)));
  57470. } else if (_.isString("string")) {
  57471. o[key] = val;
  57472. _.assignIn(_converse, _.pick(o, _.keys(_converse.default_settings)));
  57473. }
  57474. }
  57475. },
  57476. /**
  57477. * Converse and its plugins emit various events which you can listen to via the
  57478. * {@link _converse.api.listen} namespace.
  57479. *
  57480. * Some of these events are also available as [ES2015 Promises](http://es6-features.org/#PromiseUsage)
  57481. * although not all of them could logically act as promises, since some events
  57482. * might be fired multpile times whereas promises are to be resolved (or
  57483. * rejected) only once.
  57484. *
  57485. * Events which are also promises include:
  57486. *
  57487. * * [cachedRoster](/docs/html/events.html#cachedroster)
  57488. * * [chatBoxesFetched](/docs/html/events.html#chatBoxesFetched)
  57489. * * [pluginsInitialized](/docs/html/events.html#pluginsInitialized)
  57490. * * [roster](/docs/html/events.html#roster)
  57491. * * [rosterContactsFetched](/docs/html/events.html#rosterContactsFetched)
  57492. * * [rosterGroupsFetched](/docs/html/events.html#rosterGroupsFetched)
  57493. * * [rosterInitialized](/docs/html/events.html#rosterInitialized)
  57494. * * [statusInitialized](/docs/html/events.html#statusInitialized)
  57495. * * [roomsPanelRendered](/docs/html/events.html#roomsPanelRendered)
  57496. *
  57497. * The various plugins might also provide promises, and they do this by using the
  57498. * `promises.add` api method.
  57499. *
  57500. * @namespace _converse.api.promises
  57501. * @memberOf _converse.api
  57502. */
  57503. 'promises': {
  57504. /**
  57505. * By calling `promises.add`, a new [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)
  57506. * is made available for other code or plugins to depend on via the
  57507. * {@link _converse.api.waitUntil} method.
  57508. *
  57509. * Generally, it's the responsibility of the plugin which adds the promise to
  57510. * also resolve it.
  57511. *
  57512. * This is done by calling {@link _converse.api.emit}, which not only resolves the
  57513. * promise, but also emits an event with the same name (which can be listened to
  57514. * via {@link _converse.api.listen}).
  57515. *
  57516. * @method _converse.api.promises.add
  57517. * @param {string|array} [name|names] The name or an array of names for the promise(s) to be added
  57518. * @example _converse.api.promises.add('foo-completed');
  57519. */
  57520. 'add'(promises) {
  57521. promises = _.isArray(promises) ? promises : [promises];
  57522. _.each(promises, addPromise);
  57523. }
  57524. },
  57525. /**
  57526. * This namespace lets you access the BOSH tokens
  57527. *
  57528. * @namespace _converse.api.tokens
  57529. * @memberOf _converse.api
  57530. */
  57531. 'tokens': {
  57532. /**
  57533. * @method _converse.api.tokens.get
  57534. * @param {string} [id] The type of token to return ('rid' or 'sid').
  57535. * @returns 'string' A token, either the RID or SID token depending on what's asked for.
  57536. * @example _converse.api.tokens.get('rid');
  57537. */
  57538. 'get'(id) {
  57539. if (!_converse.expose_rid_and_sid || _.isUndefined(_converse.connection)) {
  57540. return null;
  57541. }
  57542. if (id.toLowerCase() === 'rid') {
  57543. return _converse.connection.rid || _converse.connection._proto.rid;
  57544. } else if (id.toLowerCase() === 'sid') {
  57545. return _converse.connection.sid || _converse.connection._proto.sid;
  57546. }
  57547. }
  57548. },
  57549. /**
  57550. * Converse emits events to which you can subscribe to.
  57551. *
  57552. * The `listen` namespace exposes methods for creating event listeners
  57553. * (aka handlers) for these events.
  57554. *
  57555. * @namespace _converse.api.listen
  57556. * @memberOf _converse
  57557. */
  57558. 'listen': {
  57559. /**
  57560. * Lets you listen to an event exactly once.
  57561. *
  57562. * @method _converse.api.listen.once
  57563. * @param {string} name The event's name
  57564. * @param {function} callback The callback method to be called when the event is emitted.
  57565. * @param {object} [context] The value of the `this` parameter for the callback.
  57566. * @example _converse.api.listen.once('message', function (messageXML) { ... });
  57567. */
  57568. 'once': _converse.once.bind(_converse),
  57569. /**
  57570. * Lets you subscribe to an event.
  57571. *
  57572. * Every time the event fires, the callback method specified by `callback` will be called.
  57573. *
  57574. * @method _converse.api.listen.on
  57575. * @param {string} name The event's name
  57576. * @param {function} callback The callback method to be called when the event is emitted.
  57577. * @param {object} [context] The value of the `this` parameter for the callback.
  57578. * @example _converse.api.listen.on('message', function (messageXML) { ... });
  57579. */
  57580. 'on': _converse.on.bind(_converse),
  57581. /**
  57582. * To stop listening to an event, you can use the `not` method.
  57583. *
  57584. * Every time the event fires, the callback method specified by `callback` will be called.
  57585. *
  57586. * @method _converse.api.listen.not
  57587. * @param {string} name The event's name
  57588. * @param {function} callback The callback method that is to no longer be called when the event fires
  57589. * @example _converse.api.listen.not('message', function (messageXML);
  57590. */
  57591. 'not': _converse.off.bind(_converse),
  57592. /**
  57593. * Subscribe to an incoming stanza
  57594. *
  57595. * Every a matched stanza is received, the callback method specified by `callback` will be called.
  57596. *
  57597. * @method _converse.api.listen.stanza
  57598. * @param {string} name The stanza's name
  57599. * @param {object} options Matching options
  57600. * (e.g. 'ns' for namespace, 'type' for stanza type, also 'id' and 'from');
  57601. * @param {function} handler The callback method to be called when the stanza appears
  57602. */
  57603. 'stanza'(name, options, handler) {
  57604. if (_.isFunction(options)) {
  57605. handler = options;
  57606. options = {};
  57607. } else {
  57608. options = options || {};
  57609. }
  57610. _converse.connection.addHandler(handler, options.ns, name, options.type, options.id, options.from, options);
  57611. }
  57612. },
  57613. /**
  57614. * Wait until a promise is resolved
  57615. *
  57616. * @method _converse.api.waitUntil
  57617. * @param {string} name The name of the promise
  57618. * @returns {Promise}
  57619. */
  57620. 'waitUntil'(name) {
  57621. const promise = _converse.promises[name];
  57622. if (_.isUndefined(promise)) {
  57623. return null;
  57624. }
  57625. return promise;
  57626. },
  57627. /**
  57628. * Allows you to send XML stanzas.
  57629. *
  57630. * @method _converse.api.send
  57631. * @example
  57632. * const msg = converse.env.$msg({
  57633. * 'from': 'juliet@example.com/balcony',
  57634. * 'to': 'romeo@example.net',
  57635. * 'type':'chat'
  57636. * });
  57637. * _converse.api.send(msg);
  57638. */
  57639. 'send'(stanza) {
  57640. _converse.connection.send(stanza);
  57641. },
  57642. /**
  57643. * Send an IQ stanza and receive a promise
  57644. *
  57645. * @method _converse.api.sendIQ
  57646. * @returns {Promise} A promise which resolves when we receive a `result` stanza
  57647. * or is rejected when we receive an `error` stanza.
  57648. */
  57649. 'sendIQ'(stanza) {
  57650. return new Promise((resolve, reject) => {
  57651. _converse.connection.sendIQ(stanza, resolve, reject, _converse.IQ_TIMEOUT);
  57652. });
  57653. }
  57654. };
  57655. /**
  57656. * ### The Public API
  57657. *
  57658. * This namespace contains public API methods which are are
  57659. * accessible on the global `converse` object.
  57660. * They are public, because any JavaScript in the
  57661. * page can call them. Public methods therefore don’t expose any sensitive
  57662. * or closured data. To do that, you’ll need to create a plugin, which has
  57663. * access to the private API method.
  57664. *
  57665. * @namespace converse
  57666. */
  57667. const converse = {
  57668. /**
  57669. * Public API method which initializes Converse.
  57670. * This method must always be called when using Converse.
  57671. *
  57672. * @memberOf converse
  57673. * @method initialize
  57674. * @param {object} config A map of [configuration-settings](https://conversejs.org/docs/html/configuration.html#configuration-settings).
  57675. *
  57676. * @example
  57677. * converse.initialize({
  57678. * allow_otr: true,
  57679. * auto_list_rooms: false,
  57680. * auto_subscribe: false,
  57681. * bosh_service_url: 'https://bind.example.com',
  57682. * hide_muc_server: false,
  57683. * i18n: locales['en'],
  57684. * keepalive: true,
  57685. * play_sounds: true,
  57686. * prebind: false,
  57687. * show_controlbox_by_default: true,
  57688. * debug: false,
  57689. * roster_groups: true
  57690. * });
  57691. */
  57692. 'initialize'(settings, callback) {
  57693. return _converse.initialize(settings, callback);
  57694. },
  57695. /**
  57696. * Exposes methods for adding and removing plugins. You'll need to write a plugin
  57697. * if you want to have access to the private API methods defined further down below.
  57698. *
  57699. * For more information on plugins, read the documentation on [writing a plugin](/docs/html/plugin_development.html).
  57700. *
  57701. * @namespace plugins
  57702. * @memberOf converse
  57703. */
  57704. 'plugins': {
  57705. /** Registers a new plugin.
  57706. *
  57707. * @method converse.plugins.add
  57708. * @param {string} name The name of the plugin
  57709. * @param {object} plugin The plugin object
  57710. *
  57711. * @example
  57712. *
  57713. * const plugin = {
  57714. * initialize: function () {
  57715. * // Gets called as soon as the plugin has been loaded.
  57716. *
  57717. * // Inside this method, you have access to the private
  57718. * // API via `_covnerse.api`.
  57719. *
  57720. * // The private _converse object contains the core logic
  57721. * // and data-structures of Converse.
  57722. * }
  57723. * }
  57724. * converse.plugins.add('myplugin', plugin);
  57725. */
  57726. 'add'(name, plugin) {
  57727. plugin.__name__ = name;
  57728. if (!_.isUndefined(_converse.pluggable.plugins[name])) {
  57729. throw new TypeError(`Error: plugin with name "${name}" has already been ` + 'registered!');
  57730. } else {
  57731. _converse.pluggable.plugins[name] = plugin;
  57732. }
  57733. }
  57734. },
  57735. /**
  57736. * Utility methods and globals from bundled 3rd party libraries.
  57737. * @memberOf converse
  57738. *
  57739. * @property {function} converse.env.$build - Creates a Strophe.Builder, for creating stanza objects.
  57740. * @property {function} converse.env.$iq - Creates a Strophe.Builder with an <iq/> element as the root.
  57741. * @property {function} converse.env.$msg - Creates a Strophe.Builder with an <message/> element as the root.
  57742. * @property {function} converse.env.$pres - Creates a Strophe.Builder with an <presence/> element as the root.
  57743. * @property {object} converse.env.Backbone - The [Backbone](http://backbonejs.org) object used by Converse to create models and views.
  57744. * @property {function} converse.env.Promise - The Promise implementation used by Converse.
  57745. * @property {function} converse.env.Strophe - The [Strophe](http://strophe.im/strophejs) XMPP library used by Converse.
  57746. * @property {object} converse.env._ - The instance of [lodash](http://lodash.com) used by Converse.
  57747. * @property {function} converse.env.f - And instance of Lodash with its methods wrapped to produce immutable auto-curried iteratee-first data-last methods.
  57748. * @property {function} converse.env.b64_sha1 - Utility method from Strophe for creating base64 encoded sha1 hashes.
  57749. * @property {object} converse.env.moment - [Moment](https://momentjs.com) date manipulation library.
  57750. * @property {function} converse.env.sizzle - [Sizzle](https://sizzlejs.com) CSS selector engine.
  57751. * @property {object} converse.env.utils - Module containing common utility methods used by Converse.
  57752. */
  57753. 'env': {
  57754. '$build': $build,
  57755. '$iq': $iq,
  57756. '$msg': $msg,
  57757. '$pres': $pres,
  57758. 'Backbone': Backbone,
  57759. 'Promise': Promise,
  57760. 'Strophe': Strophe,
  57761. '_': _,
  57762. 'f': f,
  57763. 'b64_sha1': b64_sha1,
  57764. 'moment': moment,
  57765. 'sizzle': sizzle,
  57766. 'utils': u
  57767. }
  57768. };
  57769. window.converse = converse;
  57770. window.dispatchEvent(new CustomEvent('converse-loaded'));
  57771. return converse;
  57772. });
  57773. /***/ }),
  57774. /***/ "./src/converse-disco.js":
  57775. /*!*******************************!*\
  57776. !*** ./src/converse-disco.js ***!
  57777. \*******************************/
  57778. /*! no static exports found */
  57779. /***/ (function(module, exports, __webpack_require__) {
  57780. "use strict";
  57781. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  57782. // Converse.js
  57783. // http://conversejs.org
  57784. //
  57785. // Copyright (c) 2013-2018, the Converse developers
  57786. // Licensed under the Mozilla Public License (MPLv2)
  57787. /* This is a Converse plugin which add support for XEP-0030: Service Discovery */
  57788. (function (root, factory) {
  57789. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! sizzle */ "./node_modules/sizzle/dist/sizzle.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  57790. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  57791. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  57792. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  57793. })(void 0, function (converse, sizzle) {
  57794. const _converse$env = converse.env,
  57795. Backbone = _converse$env.Backbone,
  57796. Promise = _converse$env.Promise,
  57797. Strophe = _converse$env.Strophe,
  57798. $iq = _converse$env.$iq,
  57799. b64_sha1 = _converse$env.b64_sha1,
  57800. utils = _converse$env.utils,
  57801. _ = _converse$env._,
  57802. f = _converse$env.f;
  57803. converse.plugins.add('converse-disco', {
  57804. initialize() {
  57805. /* The initialize function gets called as soon as the plugin is
  57806. * loaded by converse.js's plugin machinery.
  57807. */
  57808. const _converse = this._converse; // Promises exposed by this plugin
  57809. _converse.api.promises.add('discoInitialized');
  57810. _converse.DiscoEntity = Backbone.Model.extend({
  57811. /* A Disco Entity is a JID addressable entity that can be queried
  57812. * for features.
  57813. *
  57814. * See XEP-0030: https://xmpp.org/extensions/xep-0030.html
  57815. */
  57816. idAttribute: 'jid',
  57817. initialize() {
  57818. this.waitUntilFeaturesDiscovered = utils.getResolveablePromise();
  57819. this.dataforms = new Backbone.Collection();
  57820. this.dataforms.browserStorage = new Backbone.BrowserStorage.session(b64_sha1(`converse.dataforms-{this.get('jid')}`));
  57821. this.features = new Backbone.Collection();
  57822. this.features.browserStorage = new Backbone.BrowserStorage.session(b64_sha1(`converse.features-${this.get('jid')}`));
  57823. this.features.on('add', this.onFeatureAdded, this);
  57824. this.fields = new Backbone.Collection();
  57825. this.fields.browserStorage = new Backbone.BrowserStorage.session(b64_sha1(`converse.fields-${this.get('jid')}`));
  57826. this.fields.on('add', this.onFieldAdded, this);
  57827. this.identities = new Backbone.Collection();
  57828. this.identities.browserStorage = new Backbone.BrowserStorage.session(b64_sha1(`converse.identities-${this.get('jid')}`));
  57829. this.fetchFeatures();
  57830. this.items = new _converse.DiscoEntities();
  57831. this.items.browserStorage = new Backbone.BrowserStorage.session(b64_sha1(`converse.disco-items-${this.get('jid')}`));
  57832. this.items.fetch();
  57833. },
  57834. getIdentity(category, type) {
  57835. /* Returns a Promise which resolves with a map indicating
  57836. * whether a given identity is provided.
  57837. *
  57838. * Parameters:
  57839. * (String) category - The identity category
  57840. * (String) type - The identity type
  57841. */
  57842. const entity = this;
  57843. return new Promise((resolve, reject) => {
  57844. function fulfillPromise() {
  57845. const model = entity.identities.findWhere({
  57846. 'category': category,
  57847. 'type': type
  57848. });
  57849. resolve(model);
  57850. }
  57851. entity.waitUntilFeaturesDiscovered.then(fulfillPromise).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  57852. });
  57853. },
  57854. hasFeature(feature) {
  57855. /* Returns a Promise which resolves with a map indicating
  57856. * whether a given feature is supported.
  57857. *
  57858. * Parameters:
  57859. * (String) feature - The feature that might be supported.
  57860. */
  57861. const entity = this;
  57862. return new Promise((resolve, reject) => {
  57863. function fulfillPromise() {
  57864. if (entity.features.findWhere({
  57865. 'var': feature
  57866. })) {
  57867. resolve(entity);
  57868. } else {
  57869. resolve();
  57870. }
  57871. }
  57872. entity.waitUntilFeaturesDiscovered.then(fulfillPromise).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  57873. });
  57874. },
  57875. onFeatureAdded(feature) {
  57876. feature.entity = this;
  57877. _converse.emit('serviceDiscovered', feature);
  57878. },
  57879. onFieldAdded(field) {
  57880. field.entity = this;
  57881. _converse.emit('discoExtensionFieldDiscovered', field);
  57882. },
  57883. fetchFeatures() {
  57884. if (this.features.browserStorage.records.length === 0) {
  57885. this.queryInfo();
  57886. } else {
  57887. this.features.fetch({
  57888. add: true,
  57889. success: () => {
  57890. this.waitUntilFeaturesDiscovered.resolve(this);
  57891. this.trigger('featuresDiscovered');
  57892. }
  57893. });
  57894. this.identities.fetch({
  57895. add: true
  57896. });
  57897. }
  57898. },
  57899. queryInfo() {
  57900. _converse.api.disco.info(this.get('jid'), null).then(stanza => this.onInfo(stanza)).catch(iq => {
  57901. this.waitUntilFeaturesDiscovered.resolve(this);
  57902. _converse.log(iq, Strophe.LogLevel.ERROR);
  57903. });
  57904. },
  57905. onDiscoItems(stanza) {
  57906. _.each(sizzle(`query[xmlns="${Strophe.NS.DISCO_ITEMS}"] item`, stanza), item => {
  57907. if (item.getAttribute("node")) {
  57908. // XXX: ignore nodes for now.
  57909. // See: https://xmpp.org/extensions/xep-0030.html#items-nodes
  57910. return;
  57911. }
  57912. const jid = item.getAttribute('jid');
  57913. if (_.isUndefined(this.items.get(jid))) {
  57914. const entity = _converse.disco_entities.get(jid);
  57915. if (entity) {
  57916. this.items.add(entity);
  57917. } else {
  57918. this.items.create({
  57919. 'jid': jid
  57920. });
  57921. }
  57922. }
  57923. });
  57924. },
  57925. queryForItems() {
  57926. if (_.isEmpty(this.identities.where({
  57927. 'category': 'server'
  57928. }))) {
  57929. // Don't fetch features and items if this is not a
  57930. // server or a conference component.
  57931. return;
  57932. }
  57933. _converse.api.disco.items(this.get('jid')).then(stanza => this.onDiscoItems(stanza));
  57934. },
  57935. onInfo(stanza) {
  57936. _.forEach(stanza.querySelectorAll('identity'), identity => {
  57937. this.identities.create({
  57938. 'category': identity.getAttribute('category'),
  57939. 'type': identity.getAttribute('type'),
  57940. 'name': identity.getAttribute('name')
  57941. });
  57942. });
  57943. _.each(sizzle(`x[type="result"][xmlns="${Strophe.NS.XFORM}"]`, stanza), form => {
  57944. const data = {};
  57945. _.each(form.querySelectorAll('field'), field => {
  57946. data[field.getAttribute('var')] = {
  57947. 'value': _.get(field.querySelector('value'), 'textContent'),
  57948. 'type': field.getAttribute('type')
  57949. };
  57950. });
  57951. this.dataforms.create(data);
  57952. });
  57953. if (stanza.querySelector(`feature[var="${Strophe.NS.DISCO_ITEMS}"]`)) {
  57954. this.queryForItems();
  57955. }
  57956. _.forEach(stanza.querySelectorAll('feature'), feature => {
  57957. this.features.create({
  57958. 'var': feature.getAttribute('var'),
  57959. 'from': stanza.getAttribute('from')
  57960. });
  57961. }); // XEP-0128 Service Discovery Extensions
  57962. _.forEach(sizzle('x[type="result"][xmlns="jabber:x:data"] field', stanza), field => {
  57963. this.fields.create({
  57964. 'var': field.getAttribute('var'),
  57965. 'value': _.get(field.querySelector('value'), 'textContent'),
  57966. 'from': stanza.getAttribute('from')
  57967. });
  57968. });
  57969. this.waitUntilFeaturesDiscovered.resolve(this);
  57970. this.trigger('featuresDiscovered');
  57971. }
  57972. });
  57973. _converse.DiscoEntities = Backbone.Collection.extend({
  57974. model: _converse.DiscoEntity,
  57975. fetchEntities() {
  57976. return new Promise((resolve, reject) => {
  57977. this.fetch({
  57978. add: true,
  57979. success: resolve,
  57980. error() {
  57981. reject(new Error("Could not fetch disco entities"));
  57982. }
  57983. });
  57984. });
  57985. }
  57986. });
  57987. function addClientFeatures() {
  57988. // See http://xmpp.org/registrar/disco-categories.html
  57989. _converse.api.disco.own.identities.add('client', 'web', 'Converse');
  57990. _converse.api.disco.own.features.add(Strophe.NS.BOSH);
  57991. _converse.api.disco.own.features.add(Strophe.NS.CHATSTATES);
  57992. _converse.api.disco.own.features.add(Strophe.NS.DISCO_INFO);
  57993. _converse.api.disco.own.features.add(Strophe.NS.ROSTERX); // Limited support
  57994. if (_converse.message_carbons) {
  57995. _converse.api.disco.own.features.add(Strophe.NS.CARBONS);
  57996. }
  57997. _converse.emit('addClientFeatures');
  57998. return this;
  57999. }
  58000. function initStreamFeatures() {
  58001. _converse.stream_features = new Backbone.Collection();
  58002. _converse.stream_features.browserStorage = new Backbone.BrowserStorage.session(b64_sha1(`converse.stream-features-${_converse.bare_jid}`));
  58003. _converse.stream_features.fetch({
  58004. success(collection) {
  58005. if (collection.length === 0 && _converse.connection.features) {
  58006. _.forEach(_converse.connection.features.childNodes, feature => {
  58007. _converse.stream_features.create({
  58008. 'name': feature.nodeName,
  58009. 'xmlns': feature.getAttribute('xmlns')
  58010. });
  58011. });
  58012. }
  58013. }
  58014. });
  58015. _converse.emit('streamFeaturesAdded');
  58016. }
  58017. function initializeDisco() {
  58018. addClientFeatures();
  58019. _converse.connection.addHandler(onDiscoInfoRequest, Strophe.NS.DISCO_INFO, 'iq', 'get', null, null);
  58020. _converse.disco_entities = new _converse.DiscoEntities();
  58021. _converse.disco_entities.browserStorage = new Backbone.BrowserStorage.session(b64_sha1(`converse.disco-entities-${_converse.bare_jid}`));
  58022. _converse.disco_entities.fetchEntities().then(collection => {
  58023. if (collection.length === 0 || !collection.get(_converse.domain)) {
  58024. // If we don't have an entity for our own XMPP server,
  58025. // create one.
  58026. _converse.disco_entities.create({
  58027. 'jid': _converse.domain
  58028. });
  58029. }
  58030. _converse.emit('discoInitialized');
  58031. }).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  58032. }
  58033. _converse.api.listen.on('sessionInitialized', initStreamFeatures);
  58034. _converse.api.listen.on('reconnected', initializeDisco);
  58035. _converse.api.listen.on('connected', initializeDisco);
  58036. _converse.api.listen.on('beforeTearDown', () => {
  58037. if (_converse.disco_entities) {
  58038. _converse.disco_entities.each(entity => {
  58039. entity.features.reset();
  58040. entity.features.browserStorage._clear();
  58041. });
  58042. _converse.disco_entities.reset();
  58043. _converse.disco_entities.browserStorage._clear();
  58044. }
  58045. });
  58046. const plugin = this;
  58047. plugin._identities = [];
  58048. plugin._features = [];
  58049. function onDiscoInfoRequest(stanza) {
  58050. const node = stanza.getElementsByTagName('query')[0].getAttribute('node');
  58051. const attrs = {
  58052. xmlns: Strophe.NS.DISCO_INFO
  58053. };
  58054. if (node) {
  58055. attrs.node = node;
  58056. }
  58057. const iqresult = $iq({
  58058. 'type': 'result',
  58059. 'id': stanza.getAttribute('id')
  58060. });
  58061. const from = stanza.getAttribute('from');
  58062. if (from !== null) {
  58063. iqresult.attrs({
  58064. 'to': from
  58065. });
  58066. }
  58067. iqresult.c('query', attrs);
  58068. _.each(plugin._identities, identity => {
  58069. const attrs = {
  58070. 'category': identity.category,
  58071. 'type': identity.type
  58072. };
  58073. if (identity.name) {
  58074. attrs.name = identity.name;
  58075. }
  58076. if (identity.lang) {
  58077. attrs['xml:lang'] = identity.lang;
  58078. }
  58079. iqresult.c('identity', attrs).up();
  58080. });
  58081. _.each(plugin._features, feature => {
  58082. iqresult.c('feature', {
  58083. 'var': feature
  58084. }).up();
  58085. });
  58086. _converse.connection.send(iqresult.tree());
  58087. return true;
  58088. }
  58089. _.extend(_converse.api, {
  58090. /**
  58091. * The XEP-0030 service discovery API
  58092. *
  58093. * This API lets you discover information about entities on the
  58094. * XMPP network.
  58095. *
  58096. * @namespace _converse.api.disco
  58097. * @memberOf _converse.api
  58098. */
  58099. 'disco': {
  58100. /**
  58101. * @namespace _converse.api.disco.stream
  58102. * @memberOf _converse.api.disco
  58103. */
  58104. 'stream': {
  58105. /**
  58106. * @method _converse.api.disco.stream.getFeature
  58107. * @param {String} name The feature name
  58108. * @param {String} xmlns The XML namespace
  58109. * @example _converse.api.disco.stream.getFeature('ver', 'urn:xmpp:features:rosterver')
  58110. */
  58111. 'getFeature': function getFeature(name, xmlns) {
  58112. if (_.isNil(name) || _.isNil(xmlns)) {
  58113. throw new Error("name and xmlns need to be provided when calling disco.stream.getFeature");
  58114. }
  58115. return _converse.stream_features.findWhere({
  58116. 'name': name,
  58117. 'xmlns': xmlns
  58118. });
  58119. }
  58120. },
  58121. /**
  58122. * @namespace _converse.api.disco.own
  58123. * @memberOf _converse.api.disco
  58124. */
  58125. 'own': {
  58126. /**
  58127. * @namespace _converse.api.disco.own.identities
  58128. * @memberOf _converse.api.disco.own
  58129. */
  58130. 'identities': {
  58131. /**
  58132. * Lets you add new identities for this client (i.e. instance of Converse)
  58133. * @method _converse.api.disco.own.identities.add
  58134. *
  58135. * @param {String} category - server, client, gateway, directory, etc.
  58136. * @param {String} type - phone, pc, web, etc.
  58137. * @param {String} name - "Converse"
  58138. * @param {String} lang - en, el, de, etc.
  58139. *
  58140. * @example _converse.api.disco.own.identities.clear();
  58141. */
  58142. add(category, type, name, lang) {
  58143. for (var i = 0; i < plugin._identities.length; i++) {
  58144. if (plugin._identities[i].category == category && plugin._identities[i].type == type && plugin._identities[i].name == name && plugin._identities[i].lang == lang) {
  58145. return false;
  58146. }
  58147. }
  58148. plugin._identities.push({
  58149. category: category,
  58150. type: type,
  58151. name: name,
  58152. lang: lang
  58153. });
  58154. },
  58155. /**
  58156. * Clears all previously registered identities.
  58157. * @method _converse.api.disco.own.identities.clear
  58158. * @example _converse.api.disco.own.identities.clear();
  58159. */
  58160. clear() {
  58161. plugin._identities = [];
  58162. },
  58163. /**
  58164. * Returns all of the identities registered for this client
  58165. * (i.e. instance of Converse).
  58166. * @method _converse.api.disco.identities.get
  58167. * @example const identities = _converse.api.disco.own.identities.get();
  58168. */
  58169. get() {
  58170. return plugin._identities;
  58171. }
  58172. },
  58173. /**
  58174. * @namespace _converse.api.disco.own.features
  58175. * @memberOf _converse.api.disco.own
  58176. */
  58177. 'features': {
  58178. /**
  58179. * Lets you register new disco features for this client (i.e. instance of Converse)
  58180. * @method _converse.api.disco.own.features.add
  58181. * @param {String} name - e.g. http://jabber.org/protocol/caps
  58182. * @example _converse.api.disco.own.features.add("http://jabber.org/protocol/caps");
  58183. */
  58184. add(name) {
  58185. for (var i = 0; i < plugin._features.length; i++) {
  58186. if (plugin._features[i] == name) {
  58187. return false;
  58188. }
  58189. }
  58190. plugin._features.push(name);
  58191. },
  58192. /**
  58193. * Clears all previously registered features.
  58194. * @method _converse.api.disco.own.features.clear
  58195. * @example _converse.api.disco.own.features.clear();
  58196. */
  58197. clear() {
  58198. plugin._features = [];
  58199. },
  58200. /**
  58201. * Returns all of the features registered for this client (i.e. instance of Converse).
  58202. * @method _converse.api.disco.own.features.get
  58203. * @example const features = _converse.api.disco.own.features.get();
  58204. */
  58205. get() {
  58206. return plugin._features;
  58207. }
  58208. }
  58209. },
  58210. /**
  58211. * Query for information about an XMPP entity
  58212. *
  58213. * @method _converse.api.disco.info
  58214. * @param {string} jid The Jabber ID of the entity to query
  58215. * @param {string} [node] A specific node identifier associated with the JID
  58216. * @returns {promise} Promise which resolves once we have a result from the server.
  58217. */
  58218. 'info'(jid, node) {
  58219. const attrs = {
  58220. xmlns: Strophe.NS.DISCO_INFO
  58221. };
  58222. if (node) {
  58223. attrs.node = node;
  58224. }
  58225. const info = $iq({
  58226. 'from': _converse.connection.jid,
  58227. 'to': jid,
  58228. 'type': 'get'
  58229. }).c('query', attrs);
  58230. return _converse.api.sendIQ(info);
  58231. },
  58232. /**
  58233. * Query for items associated with an XMPP entity
  58234. *
  58235. * @method _converse.api.disco.items
  58236. * @param {string} jid The Jabber ID of the entity to query for items
  58237. * @param {string} [node] A specific node identifier associated with the JID
  58238. * @returns {promise} Promise which resolves once we have a result from the server.
  58239. */
  58240. 'items'(jid, node) {
  58241. const attrs = {
  58242. 'xmlns': Strophe.NS.DISCO_ITEMS
  58243. };
  58244. if (node) {
  58245. attrs.node = node;
  58246. }
  58247. return _converse.api.sendIQ($iq({
  58248. 'from': _converse.connection.jid,
  58249. 'to': jid,
  58250. 'type': 'get'
  58251. }).c('query', attrs));
  58252. },
  58253. /**
  58254. * Namespace for methods associated with disco entities
  58255. *
  58256. * @namespace _converse.api.disco.entities
  58257. * @memberOf _converse.api.disco
  58258. */
  58259. 'entities': {
  58260. /**
  58261. * Get the the corresponding `DiscoEntity` instance.
  58262. *
  58263. * @method _converse.api.disco.entities.get
  58264. * @param {string} jid The Jabber ID of the entity
  58265. * @param {boolean} [create] Whether the entity should be created if it doesn't exist.
  58266. * @example _converse.api.disco.entities.get(jid);
  58267. */
  58268. 'get'(jid, create = false) {
  58269. return _converse.api.waitUntil('discoInitialized').then(() => {
  58270. if (_.isNil(jid)) {
  58271. return _converse.disco_entities;
  58272. }
  58273. const entity = _converse.disco_entities.get(jid);
  58274. if (entity || !create) {
  58275. return entity;
  58276. }
  58277. return _converse.disco_entities.create({
  58278. 'jid': jid
  58279. });
  58280. });
  58281. }
  58282. },
  58283. /**
  58284. * Used to determine whether an entity supports a given feature.
  58285. *
  58286. * @method _converse.api.disco.supports
  58287. * @param {string} feature The feature that might be
  58288. * supported. In the XML stanza, this is the `var`
  58289. * attribute of the `<feature>` element. For
  58290. * example: `http://jabber.org/protocol/muc`
  58291. * @param {string} jid The JID of the entity
  58292. * (and its associated items) which should be queried
  58293. * @returns {promise} A promise which resolves with a list containing
  58294. * _converse.Entity instances representing the entity
  58295. * itself or those items associated with the entity if
  58296. * they support the given feature.
  58297. *
  58298. * @example
  58299. * _converse.api.disco.supports(Strophe.NS.MAM, _converse.bare_jid)
  58300. * .then(value => {
  58301. * // `value` is a map with two keys, `supported` and `feature`.
  58302. * if (value.supported) {
  58303. * // The feature is supported
  58304. * } else {
  58305. * // The feature is not supported
  58306. * }
  58307. * }).catch(() => {
  58308. * _converse.log(
  58309. * "Error or timeout while checking for feature support",
  58310. * Strophe.LogLevel.ERROR
  58311. * );
  58312. * });
  58313. */
  58314. 'supports'(feature, jid) {
  58315. if (_.isNil(jid)) {
  58316. throw new TypeError('api.disco.supports: You need to provide an entity JID');
  58317. }
  58318. return _converse.api.waitUntil('discoInitialized').then(() => _converse.api.disco.entities.get(jid, true)).then(entity => entity.waitUntilFeaturesDiscovered).then(entity => {
  58319. const promises = _.concat(entity.items.map(item => item.hasFeature(feature)), entity.hasFeature(feature));
  58320. return Promise.all(promises);
  58321. }).then(result => f.filter(f.isObject, result));
  58322. },
  58323. /**
  58324. * Refresh the features (and fields and identities) associated with a
  58325. * disco entity by refetching them from the server
  58326. *
  58327. * @method _converse.api.disco.refreshFeatures
  58328. * @param {string} jid The JID of the entity whose features are refreshed.
  58329. * @returns {promise} A promise which resolves once the features have been refreshed
  58330. * @example
  58331. * await _converse.api.disco.refreshFeatures('room@conference.example.org');
  58332. */
  58333. 'refreshFeatures'(jid) {
  58334. if (_.isNil(jid)) {
  58335. throw new TypeError('api.disco.refreshFeatures: You need to provide an entity JID');
  58336. }
  58337. return _converse.api.waitUntil('discoInitialized').then(() => _converse.api.disco.entities.get(jid, true)).then(entity => {
  58338. entity.features.reset();
  58339. entity.fields.reset();
  58340. entity.identities.reset();
  58341. entity.waitUntilFeaturesDiscovered = utils.getResolveablePromise();
  58342. entity.queryInfo();
  58343. return entity.waitUntilFeaturesDiscovered;
  58344. }).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  58345. },
  58346. /**
  58347. * Return all the features associated with a disco entity
  58348. *
  58349. * @method _converse.api.disco.getFeatures
  58350. * @param {string} jid The JID of the entity whose features are returned.
  58351. * @returns {promise} A promise which resolves with the returned features
  58352. * @example
  58353. * const features = await _converse.api.disco.getFeatures('room@conference.example.org');
  58354. */
  58355. 'getFeatures'(jid) {
  58356. if (_.isNil(jid)) {
  58357. throw new TypeError('api.disco.getFeatures: You need to provide an entity JID');
  58358. }
  58359. return _converse.api.waitUntil('discoInitialized').then(() => _converse.api.disco.entities.get(jid, true)).then(entity => entity.waitUntilFeaturesDiscovered).then(entity => entity.features).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  58360. },
  58361. /**
  58362. * Return all the service discovery extensions fields
  58363. * associated with an entity.
  58364. *
  58365. * See [XEP-0129: Service Discovery Extensions](https://xmpp.org/extensions/xep-0128.html)
  58366. *
  58367. * @method _converse.api.disco.getFields
  58368. * @param {string} jid The JID of the entity whose fields are returned.
  58369. * @example
  58370. * const fields = await _converse.api.disco.getFields('room@conference.example.org');
  58371. */
  58372. 'getFields'(jid) {
  58373. if (_.isNil(jid)) {
  58374. throw new TypeError('api.disco.getFields: You need to provide an entity JID');
  58375. }
  58376. return _converse.api.waitUntil('discoInitialized').then(() => _converse.api.disco.entities.get(jid, true)).then(entity => entity.waitUntilFeaturesDiscovered).then(entity => entity.fields).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  58377. },
  58378. /**
  58379. * Get the identity (with the given category and type) for a given disco entity.
  58380. *
  58381. * For example, when determining support for PEP (personal eventing protocol), you
  58382. * want to know whether the user's own JID has an identity with
  58383. * `category='pubsub'` and `type='pep'` as explained in this section of
  58384. * XEP-0163: https://xmpp.org/extensions/xep-0163.html#support
  58385. *
  58386. * @method _converse.api.disco.getIdentity
  58387. * @param {string} The identity category.
  58388. * In the XML stanza, this is the `category`
  58389. * attribute of the `<identity>` element.
  58390. * For example: 'pubsub'
  58391. * @param {string} type The identity type.
  58392. * In the XML stanza, this is the `type`
  58393. * attribute of the `<identity>` element.
  58394. * For example: 'pep'
  58395. * @param {string} jid The JID of the entity which might have the identity
  58396. * @returns {promise} A promise which resolves with a map indicating
  58397. * whether an identity with a given type is provided by the entity.
  58398. * @example
  58399. * _converse.api.disco.getIdentity('pubsub', 'pep', _converse.bare_jid).then(
  58400. * function (identity) {
  58401. * if (_.isNil(identity)) {
  58402. * // The entity DOES NOT have this identity
  58403. * } else {
  58404. * // The entity DOES have this identity
  58405. * }
  58406. * }
  58407. * ).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  58408. */
  58409. 'getIdentity'(category, type, jid) {
  58410. return _converse.api.disco.entities.get(jid, true).then(e => e.getIdentity(category, type));
  58411. }
  58412. }
  58413. });
  58414. }
  58415. });
  58416. });
  58417. /***/ }),
  58418. /***/ "./src/converse-dragresize.js":
  58419. /*!************************************!*\
  58420. !*** ./src/converse-dragresize.js ***!
  58421. \************************************/
  58422. /*! no static exports found */
  58423. /***/ (function(module, exports, __webpack_require__) {
  58424. "use strict";
  58425. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  58426. // Converse.js (A browser based XMPP chat client)
  58427. // http://conversejs.org
  58428. //
  58429. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  58430. // Licensed under the Mozilla Public License (MPLv2)
  58431. //
  58432. /*global define, window, document */
  58433. (function (root, factory) {
  58434. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! templates/dragresize.html */ "./src/templates/dragresize.html"), __webpack_require__(/*! converse-chatview */ "./src/converse-chatview.js"), __webpack_require__(/*! converse-controlbox */ "./src/converse-controlbox.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  58435. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  58436. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  58437. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  58438. })(void 0, function (converse, tpl_dragresize) {
  58439. "use strict";
  58440. const _ = converse.env._;
  58441. function renderDragResizeHandles(_converse, view) {
  58442. const flyout = view.el.querySelector('.box-flyout');
  58443. const div = document.createElement('div');
  58444. div.innerHTML = tpl_dragresize();
  58445. flyout.insertBefore(div, flyout.firstChild);
  58446. }
  58447. converse.plugins.add('converse-dragresize', {
  58448. /* Plugin dependencies are other plugins which might be
  58449. * overridden or relied upon, and therefore need to be loaded before
  58450. * this plugin.
  58451. *
  58452. * If the setting "strict_plugin_dependencies" is set to true,
  58453. * an error will be raised if the plugin is not found. By default it's
  58454. * false, which means these plugins are only loaded opportunistically.
  58455. *
  58456. * NB: These plugins need to have already been loaded via require.js.
  58457. */
  58458. dependencies: ["converse-chatview", "converse-headline", "converse-muc-views"],
  58459. enabled(_converse) {
  58460. return _converse.view_mode == 'overlayed';
  58461. },
  58462. overrides: {
  58463. // Overrides mentioned here will be picked up by converse.js's
  58464. // plugin architecture they will replace existing methods on the
  58465. // relevant objects or classes.
  58466. //
  58467. // New functions which don't exist yet can also be added.
  58468. registerGlobalEventHandlers() {
  58469. const that = this;
  58470. document.addEventListener('mousemove', function (ev) {
  58471. if (!that.resizing || !that.allow_dragresize) {
  58472. return true;
  58473. }
  58474. ev.preventDefault();
  58475. that.resizing.chatbox.resizeChatBox(ev);
  58476. });
  58477. document.addEventListener('mouseup', function (ev) {
  58478. if (!that.resizing || !that.allow_dragresize) {
  58479. return true;
  58480. }
  58481. ev.preventDefault();
  58482. const height = that.applyDragResistance(that.resizing.chatbox.height, that.resizing.chatbox.model.get('default_height'));
  58483. const width = that.applyDragResistance(that.resizing.chatbox.width, that.resizing.chatbox.model.get('default_width'));
  58484. if (that.connection.connected) {
  58485. that.resizing.chatbox.model.save({
  58486. 'height': height
  58487. });
  58488. that.resizing.chatbox.model.save({
  58489. 'width': width
  58490. });
  58491. } else {
  58492. that.resizing.chatbox.model.set({
  58493. 'height': height
  58494. });
  58495. that.resizing.chatbox.model.set({
  58496. 'width': width
  58497. });
  58498. }
  58499. that.resizing = null;
  58500. });
  58501. return this.__super__.registerGlobalEventHandlers.apply(this, arguments);
  58502. },
  58503. ChatBox: {
  58504. initialize() {
  58505. const _converse = this.__super__._converse;
  58506. const result = this.__super__.initialize.apply(this, arguments),
  58507. height = this.get('height'),
  58508. width = this.get('width'),
  58509. save = this.get('id') === 'controlbox' ? this.set.bind(this) : this.save.bind(this);
  58510. save({
  58511. 'height': _converse.applyDragResistance(height, this.get('default_height')),
  58512. 'width': _converse.applyDragResistance(width, this.get('default_width'))
  58513. });
  58514. return result;
  58515. }
  58516. },
  58517. ChatBoxView: {
  58518. events: {
  58519. 'mousedown .dragresize-top': 'onStartVerticalResize',
  58520. 'mousedown .dragresize-left': 'onStartHorizontalResize',
  58521. 'mousedown .dragresize-topleft': 'onStartDiagonalResize'
  58522. },
  58523. initialize() {
  58524. window.addEventListener('resize', _.debounce(this.setDimensions.bind(this), 100));
  58525. this.__super__.initialize.apply(this, arguments);
  58526. },
  58527. render() {
  58528. const result = this.__super__.render.apply(this, arguments);
  58529. renderDragResizeHandles(this.__super__._converse, this);
  58530. this.setWidth();
  58531. return result;
  58532. },
  58533. setWidth() {
  58534. // If a custom width is applied (due to drag-resizing),
  58535. // then we need to set the width of the .chatbox element as well.
  58536. if (this.model.get('width')) {
  58537. this.el.style.width = this.model.get('width');
  58538. }
  58539. },
  58540. _show() {
  58541. this.initDragResize().setDimensions();
  58542. this.__super__._show.apply(this, arguments);
  58543. },
  58544. initDragResize() {
  58545. /* Determine and store the default box size.
  58546. * We need this information for the drag-resizing feature.
  58547. */
  58548. const _converse = this.__super__._converse,
  58549. flyout = this.el.querySelector('.box-flyout'),
  58550. style = window.getComputedStyle(flyout);
  58551. if (_.isUndefined(this.model.get('height'))) {
  58552. const height = parseInt(style.height.replace(/px$/, ''), 10),
  58553. width = parseInt(style.width.replace(/px$/, ''), 10);
  58554. this.model.set('height', height);
  58555. this.model.set('default_height', height);
  58556. this.model.set('width', width);
  58557. this.model.set('default_width', width);
  58558. }
  58559. const min_width = style['min-width'];
  58560. const min_height = style['min-height'];
  58561. this.model.set('min_width', min_width.endsWith('px') ? Number(min_width.replace(/px$/, '')) : 0);
  58562. this.model.set('min_height', min_height.endsWith('px') ? Number(min_height.replace(/px$/, '')) : 0); // Initialize last known mouse position
  58563. this.prev_pageY = 0;
  58564. this.prev_pageX = 0;
  58565. if (_converse.connection.connected) {
  58566. this.height = this.model.get('height');
  58567. this.width = this.model.get('width');
  58568. }
  58569. return this;
  58570. },
  58571. setDimensions() {
  58572. // Make sure the chat box has the right height and width.
  58573. this.adjustToViewport();
  58574. this.setChatBoxHeight(this.model.get('height'));
  58575. this.setChatBoxWidth(this.model.get('width'));
  58576. },
  58577. setChatBoxHeight(height) {
  58578. const _converse = this.__super__._converse;
  58579. if (height) {
  58580. height = _converse.applyDragResistance(height, this.model.get('default_height')) + 'px';
  58581. } else {
  58582. height = "";
  58583. }
  58584. const flyout_el = this.el.querySelector('.box-flyout');
  58585. if (!_.isNull(flyout_el)) {
  58586. flyout_el.style.height = height;
  58587. }
  58588. },
  58589. setChatBoxWidth(width) {
  58590. const _converse = this.__super__._converse;
  58591. if (width) {
  58592. width = _converse.applyDragResistance(width, this.model.get('default_width')) + 'px';
  58593. } else {
  58594. width = "";
  58595. }
  58596. this.el.style.width = width;
  58597. const flyout_el = this.el.querySelector('.box-flyout');
  58598. if (!_.isNull(flyout_el)) {
  58599. flyout_el.style.width = width;
  58600. }
  58601. },
  58602. adjustToViewport() {
  58603. /* Event handler called when viewport gets resized. We remove
  58604. * custom width/height from chat boxes.
  58605. */
  58606. const viewport_width = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
  58607. const viewport_height = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
  58608. if (viewport_width <= 480) {
  58609. this.model.set('height', undefined);
  58610. this.model.set('width', undefined);
  58611. } else if (viewport_width <= this.model.get('width')) {
  58612. this.model.set('width', undefined);
  58613. } else if (viewport_height <= this.model.get('height')) {
  58614. this.model.set('height', undefined);
  58615. }
  58616. },
  58617. onStartVerticalResize(ev) {
  58618. const _converse = this.__super__._converse;
  58619. if (!_converse.allow_dragresize) {
  58620. return true;
  58621. } // Record element attributes for mouseMove().
  58622. const flyout = this.el.querySelector('.box-flyout'),
  58623. style = window.getComputedStyle(flyout);
  58624. this.height = parseInt(style.height.replace(/px$/, ''), 10);
  58625. _converse.resizing = {
  58626. 'chatbox': this,
  58627. 'direction': 'top'
  58628. };
  58629. this.prev_pageY = ev.pageY;
  58630. },
  58631. onStartHorizontalResize(ev) {
  58632. const _converse = this.__super__._converse;
  58633. if (!_converse.allow_dragresize) {
  58634. return true;
  58635. }
  58636. const flyout = this.el.querySelector('.box-flyout'),
  58637. style = window.getComputedStyle(flyout);
  58638. this.width = parseInt(style.width.replace(/px$/, ''), 10);
  58639. _converse.resizing = {
  58640. 'chatbox': this,
  58641. 'direction': 'left'
  58642. };
  58643. this.prev_pageX = ev.pageX;
  58644. },
  58645. onStartDiagonalResize(ev) {
  58646. const _converse = this.__super__._converse;
  58647. this.onStartHorizontalResize(ev);
  58648. this.onStartVerticalResize(ev);
  58649. _converse.resizing.direction = 'topleft';
  58650. },
  58651. resizeChatBox(ev) {
  58652. let diff;
  58653. const _converse = this.__super__._converse;
  58654. if (_converse.resizing.direction.indexOf('top') === 0) {
  58655. diff = ev.pageY - this.prev_pageY;
  58656. if (diff) {
  58657. this.height = this.height - diff > (this.model.get('min_height') || 0) ? this.height - diff : this.model.get('min_height');
  58658. this.prev_pageY = ev.pageY;
  58659. this.setChatBoxHeight(this.height);
  58660. }
  58661. }
  58662. if (_.includes(_converse.resizing.direction, 'left')) {
  58663. diff = this.prev_pageX - ev.pageX;
  58664. if (diff) {
  58665. this.width = this.width + diff > (this.model.get('min_width') || 0) ? this.width + diff : this.model.get('min_width');
  58666. this.prev_pageX = ev.pageX;
  58667. this.setChatBoxWidth(this.width);
  58668. }
  58669. }
  58670. }
  58671. },
  58672. HeadlinesBoxView: {
  58673. events: {
  58674. 'mousedown .dragresize-top': 'onStartVerticalResize',
  58675. 'mousedown .dragresize-left': 'onStartHorizontalResize',
  58676. 'mousedown .dragresize-topleft': 'onStartDiagonalResize'
  58677. },
  58678. initialize() {
  58679. window.addEventListener('resize', _.debounce(this.setDimensions.bind(this), 100));
  58680. return this.__super__.initialize.apply(this, arguments);
  58681. },
  58682. render() {
  58683. const result = this.__super__.render.apply(this, arguments);
  58684. renderDragResizeHandles(this.__super__._converse, this);
  58685. this.setWidth();
  58686. return result;
  58687. }
  58688. },
  58689. ControlBoxView: {
  58690. events: {
  58691. 'mousedown .dragresize-top': 'onStartVerticalResize',
  58692. 'mousedown .dragresize-left': 'onStartHorizontalResize',
  58693. 'mousedown .dragresize-topleft': 'onStartDiagonalResize'
  58694. },
  58695. initialize() {
  58696. window.addEventListener('resize', _.debounce(this.setDimensions.bind(this), 100));
  58697. this.__super__.initialize.apply(this, arguments);
  58698. },
  58699. render() {
  58700. const result = this.__super__.render.apply(this, arguments);
  58701. renderDragResizeHandles(this.__super__._converse, this);
  58702. this.setWidth();
  58703. return result;
  58704. },
  58705. renderLoginPanel() {
  58706. const result = this.__super__.renderLoginPanel.apply(this, arguments);
  58707. this.initDragResize().setDimensions();
  58708. return result;
  58709. },
  58710. renderControlBoxPane() {
  58711. const result = this.__super__.renderControlBoxPane.apply(this, arguments);
  58712. this.initDragResize().setDimensions();
  58713. return result;
  58714. }
  58715. },
  58716. ChatRoomView: {
  58717. events: {
  58718. 'mousedown .dragresize-top': 'onStartVerticalResize',
  58719. 'mousedown .dragresize-left': 'onStartHorizontalResize',
  58720. 'mousedown .dragresize-topleft': 'onStartDiagonalResize'
  58721. },
  58722. initialize() {
  58723. window.addEventListener('resize', _.debounce(this.setDimensions.bind(this), 100));
  58724. this.__super__.initialize.apply(this, arguments);
  58725. },
  58726. render() {
  58727. const result = this.__super__.render.apply(this, arguments);
  58728. renderDragResizeHandles(this.__super__._converse, this);
  58729. this.setWidth();
  58730. return result;
  58731. }
  58732. }
  58733. },
  58734. initialize() {
  58735. /* The initialize function gets called as soon as the plugin is
  58736. * loaded by converse.js's plugin machinery.
  58737. */
  58738. const _converse = this._converse;
  58739. _converse.api.settings.update({
  58740. allow_dragresize: true
  58741. });
  58742. _converse.applyDragResistance = function (value, default_value) {
  58743. /* This method applies some resistance around the
  58744. * default_value. If value is close enough to
  58745. * default_value, then default_value is returned instead.
  58746. */
  58747. if (_.isUndefined(value)) {
  58748. return undefined;
  58749. } else if (_.isUndefined(default_value)) {
  58750. return value;
  58751. }
  58752. const resistance = 10;
  58753. if (value !== default_value && Math.abs(value - default_value) < resistance) {
  58754. return default_value;
  58755. }
  58756. return value;
  58757. };
  58758. }
  58759. });
  58760. });
  58761. /***/ }),
  58762. /***/ "./src/converse-embedded.js":
  58763. /*!**********************************!*\
  58764. !*** ./src/converse-embedded.js ***!
  58765. \**********************************/
  58766. /*! no static exports found */
  58767. /***/ (function(module, exports, __webpack_require__) {
  58768. "use strict";
  58769. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  58770. // Converse.js
  58771. // http://conversejs.org
  58772. //
  58773. // Copyright (c) 2012-2018, the Converse.js developers
  58774. // Licensed under the Mozilla Public License (MPLv2)
  58775. (function (root, factory) {
  58776. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! converse-muc */ "./src/converse-muc.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  58777. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  58778. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  58779. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  58780. })(void 0, function (converse) {
  58781. "use strict";
  58782. const _converse$env = converse.env,
  58783. Backbone = _converse$env.Backbone,
  58784. _ = _converse$env._;
  58785. converse.plugins.add('converse-embedded', {
  58786. enabled(_converse) {
  58787. return _converse.view_mode === 'embedded';
  58788. },
  58789. initialize() {
  58790. /* The initialize function gets called as soon as the plugin is
  58791. * loaded by converse.js's plugin machinery.
  58792. */
  58793. this._converse.api.settings.update({
  58794. 'allow_logout': false,
  58795. // No point in logging out when we have auto_login as true.
  58796. 'allow_muc_invitations': false,
  58797. // Doesn't make sense to allow because only
  58798. // roster contacts can be invited
  58799. 'hide_muc_server': true
  58800. });
  58801. const _converse = this._converse;
  58802. if (!_.isArray(_converse.auto_join_rooms) && !_.isArray(_converse.auto_join_private_chats)) {
  58803. throw new Error("converse-embedded: auto_join_rooms must be an Array");
  58804. }
  58805. if (_converse.auto_join_rooms.length > 1 && _converse.auto_join_private_chats.length > 1) {
  58806. throw new Error("converse-embedded: It doesn't make " + "sense to have the auto_join_rooms setting more then one, " + "since only one chat room can be open at any time.");
  58807. }
  58808. }
  58809. });
  58810. });
  58811. /***/ }),
  58812. /***/ "./src/converse-fullscreen.js":
  58813. /*!************************************!*\
  58814. !*** ./src/converse-fullscreen.js ***!
  58815. \************************************/
  58816. /*! no static exports found */
  58817. /***/ (function(module, exports, __webpack_require__) {
  58818. "use strict";
  58819. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  58820. // Converse.js (A browser based XMPP chat client)
  58821. // http://conversejs.org
  58822. //
  58823. // Copyright (c) JC Brand <jc@opkode.com>
  58824. // Licensed under the Mozilla Public License (MPLv2)
  58825. //
  58826. /*global define */
  58827. (function (root, factory) {
  58828. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! templates/inverse_brand_heading.html */ "./src/templates/inverse_brand_heading.html"), __webpack_require__(/*! converse-chatview */ "./src/converse-chatview.js"), __webpack_require__(/*! converse-controlbox */ "./src/converse-controlbox.js"), __webpack_require__(/*! converse-muc */ "./src/converse-muc.js"), __webpack_require__(/*! converse-singleton */ "./src/converse-singleton.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  58829. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  58830. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  58831. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  58832. })(void 0, function (converse, tpl_brand_heading) {
  58833. "use strict";
  58834. const _converse$env = converse.env,
  58835. Strophe = _converse$env.Strophe,
  58836. _ = _converse$env._;
  58837. converse.plugins.add('converse-fullscreen', {
  58838. enabled(_converse) {
  58839. return _.includes(['fullscreen', 'embedded'], _converse.view_mode);
  58840. },
  58841. overrides: {
  58842. // overrides mentioned here will be picked up by converse.js's
  58843. // plugin architecture they will replace existing methods on the
  58844. // relevant objects or classes.
  58845. //
  58846. // new functions which don't exist yet can also be added.
  58847. ControlBoxView: {
  58848. createBrandHeadingHTML() {
  58849. return tpl_brand_heading();
  58850. },
  58851. insertBrandHeading() {
  58852. const _converse = this.__super__._converse;
  58853. const el = _converse.root.getElementById('converse-login-panel');
  58854. el.parentNode.insertAdjacentHTML('afterbegin', this.createBrandHeadingHTML());
  58855. }
  58856. }
  58857. },
  58858. initialize() {
  58859. this._converse.api.settings.update({
  58860. chatview_avatar_height: 50,
  58861. chatview_avatar_width: 50,
  58862. hide_open_bookmarks: true,
  58863. show_controlbox_by_default: true,
  58864. sticky_controlbox: true
  58865. });
  58866. }
  58867. });
  58868. });
  58869. /***/ }),
  58870. /***/ "./src/converse-headline.js":
  58871. /*!**********************************!*\
  58872. !*** ./src/converse-headline.js ***!
  58873. \**********************************/
  58874. /*! no static exports found */
  58875. /***/ (function(module, exports, __webpack_require__) {
  58876. "use strict";
  58877. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  58878. // Converse.js (A browser based XMPP chat client)
  58879. // http://conversejs.org
  58880. //
  58881. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  58882. // Licensed under the Mozilla Public License (MPLv2)
  58883. //
  58884. /*global define */
  58885. (function (root, factory) {
  58886. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! templates/chatbox.html */ "./src/templates/chatbox.html"), __webpack_require__(/*! converse-chatview */ "./src/converse-chatview.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  58887. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  58888. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  58889. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  58890. })(void 0, function (converse, tpl_chatbox) {
  58891. "use strict";
  58892. const _converse$env = converse.env,
  58893. _ = _converse$env._,
  58894. utils = _converse$env.utils;
  58895. converse.plugins.add('converse-headline', {
  58896. /* Plugin dependencies are other plugins which might be
  58897. * overridden or relied upon, and therefore need to be loaded before
  58898. * this plugin.
  58899. *
  58900. * If the setting "strict_plugin_dependencies" is set to true,
  58901. * an error will be raised if the plugin is not found. By default it's
  58902. * false, which means these plugins are only loaded opportunistically.
  58903. *
  58904. * NB: These plugins need to have already been loaded via require.js.
  58905. */
  58906. dependencies: ["converse-chatview"],
  58907. overrides: {
  58908. // Overrides mentioned here will be picked up by converse.js's
  58909. // plugin architecture they will replace existing methods on the
  58910. // relevant objects or classes.
  58911. //
  58912. // New functions which don't exist yet can also be added.
  58913. ChatBoxes: {
  58914. model(attrs, options) {
  58915. const _converse = this.__super__._converse;
  58916. if (attrs.type == _converse.HEADLINES_TYPE) {
  58917. return new _converse.HeadlinesBox(attrs, options);
  58918. } else {
  58919. return this.__super__.model.apply(this, arguments);
  58920. }
  58921. }
  58922. }
  58923. },
  58924. initialize() {
  58925. /* The initialize function gets called as soon as the plugin is
  58926. * loaded by converse.js's plugin machinery.
  58927. */
  58928. const _converse = this._converse,
  58929. __ = _converse.__;
  58930. _converse.HeadlinesBox = _converse.ChatBox.extend({
  58931. defaults: {
  58932. 'type': _converse.HEADLINES_TYPE,
  58933. 'bookmarked': false,
  58934. 'chat_state': undefined,
  58935. 'num_unread': 0,
  58936. 'url': ''
  58937. }
  58938. });
  58939. _converse.HeadlinesBoxView = _converse.ChatBoxView.extend({
  58940. className: 'chatbox headlines',
  58941. events: {
  58942. 'click .close-chatbox-button': 'close',
  58943. 'click .toggle-chatbox-button': 'minimize',
  58944. 'keypress textarea.chat-textarea': 'keyPressed'
  58945. },
  58946. initialize() {
  58947. this.initDebounced();
  58948. this.disable_mam = true; // Don't do MAM queries for this box
  58949. this.model.messages.on('add', this.onMessageAdded, this);
  58950. this.model.on('show', this.show, this);
  58951. this.model.on('destroy', this.hide, this);
  58952. this.model.on('change:minimized', this.onMinimizedChanged, this);
  58953. this.render().insertHeading().fetchMessages().insertIntoDOM().hide();
  58954. _converse.emit('chatBoxOpened', this);
  58955. _converse.emit('chatBoxInitialized', this);
  58956. },
  58957. render() {
  58958. this.el.setAttribute('id', this.model.get('box_id'));
  58959. this.el.innerHTML = tpl_chatbox(_.extend(this.model.toJSON(), {
  58960. info_close: '',
  58961. label_personal_message: '',
  58962. show_send_button: false,
  58963. show_toolbar: false,
  58964. unread_msgs: ''
  58965. }));
  58966. this.content = this.el.querySelector('.chat-content');
  58967. return this;
  58968. },
  58969. // Override to avoid the methods in converse-chatview.js
  58970. 'renderMessageForm': _.noop,
  58971. 'afterShown': _.noop
  58972. });
  58973. function onHeadlineMessage(message) {
  58974. /* Handler method for all incoming messages of type "headline". */
  58975. const from_jid = message.getAttribute('from');
  58976. if (utils.isHeadlineMessage(_converse, message)) {
  58977. if (_.includes(from_jid, '@') && !_converse.api.contacts.get(from_jid) && !_converse.allow_non_roster_messaging) {
  58978. return;
  58979. }
  58980. if (_.isNull(message.querySelector('body'))) {
  58981. // Avoid creating a chat box if we have nothing to show
  58982. // inside it.
  58983. return;
  58984. }
  58985. const chatbox = _converse.chatboxes.create({
  58986. 'id': from_jid,
  58987. 'jid': from_jid,
  58988. 'type': _converse.HEADLINES_TYPE,
  58989. 'from': from_jid
  58990. });
  58991. chatbox.createMessage(message, message);
  58992. _converse.emit('message', {
  58993. 'chatbox': chatbox,
  58994. 'stanza': message
  58995. });
  58996. }
  58997. return true;
  58998. }
  58999. function registerHeadlineHandler() {
  59000. _converse.connection.addHandler(onHeadlineMessage, null, 'message');
  59001. }
  59002. _converse.on('connected', registerHeadlineHandler);
  59003. _converse.on('reconnected', registerHeadlineHandler);
  59004. _converse.on('chatBoxViewsInitialized', () => {
  59005. const that = _converse.chatboxviews;
  59006. _converse.chatboxes.on('add', item => {
  59007. if (!that.get(item.get('id')) && item.get('type') === _converse.HEADLINES_TYPE) {
  59008. that.add(item.get('id'), new _converse.HeadlinesBoxView({
  59009. model: item
  59010. }));
  59011. }
  59012. });
  59013. });
  59014. }
  59015. });
  59016. });
  59017. /***/ }),
  59018. /***/ "./src/converse-mam.js":
  59019. /*!*****************************!*\
  59020. !*** ./src/converse-mam.js ***!
  59021. \*****************************/
  59022. /*! no static exports found */
  59023. /***/ (function(module, exports, __webpack_require__) {
  59024. "use strict";
  59025. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  59026. // Converse.js (A browser based XMPP chat client)
  59027. // http://conversejs.org
  59028. //
  59029. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  59030. // Licensed under the Mozilla Public License (MPLv2)
  59031. //
  59032. /*global define */
  59033. // XEP-0059 Result Set Management
  59034. (function (root, factory) {
  59035. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! sizzle */ "./node_modules/sizzle/dist/sizzle.js"), __webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! converse-disco */ "./src/converse-disco.js"), __webpack_require__(/*! strophe.rsm */ "./node_modules/strophejs-plugin-rsm/strophe.rsm.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  59036. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  59037. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  59038. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  59039. })(void 0, function (sizzle, converse) {
  59040. "use strict";
  59041. const CHATROOMS_TYPE = 'chatroom';
  59042. const _converse$env = converse.env,
  59043. Promise = _converse$env.Promise,
  59044. Strophe = _converse$env.Strophe,
  59045. $iq = _converse$env.$iq,
  59046. _ = _converse$env._,
  59047. moment = _converse$env.moment;
  59048. const u = converse.env.utils;
  59049. const RSM_ATTRIBUTES = ['max', 'first', 'last', 'after', 'before', 'index', 'count']; // XEP-0313 Message Archive Management
  59050. const MAM_ATTRIBUTES = ['with', 'start', 'end'];
  59051. function getMessageArchiveID(stanza) {
  59052. // See https://xmpp.org/extensions/xep-0313.html#results
  59053. //
  59054. // The result messages MUST contain a <result/> element with an 'id'
  59055. // attribute that gives the current message's archive UID
  59056. const result = sizzle(`result[xmlns="${Strophe.NS.MAM}"]`, stanza).pop();
  59057. if (!_.isUndefined(result)) {
  59058. return result.getAttribute('id');
  59059. } // See: https://xmpp.org/extensions/xep-0313.html#archives_id
  59060. const stanza_id = sizzle(`stanza-id[xmlns="${Strophe.NS.SID}"]`, stanza).pop();
  59061. if (!_.isUndefined(stanza_id)) {
  59062. return stanza_id.getAttribute('id');
  59063. }
  59064. }
  59065. function queryForArchivedMessages(_converse, options, callback, errback) {
  59066. /* Internal function, called by the "archive.query" API method.
  59067. */
  59068. let date;
  59069. if (_.isFunction(options)) {
  59070. callback = options;
  59071. errback = callback;
  59072. options = null;
  59073. }
  59074. const queryid = _converse.connection.getUniqueId();
  59075. const attrs = {
  59076. 'type': 'set'
  59077. };
  59078. if (options && options.groupchat) {
  59079. if (!options['with']) {
  59080. // eslint-disable-line dot-notation
  59081. throw new Error('You need to specify a "with" value containing ' + 'the chat room JID, when querying groupchat messages.');
  59082. }
  59083. attrs.to = options['with']; // eslint-disable-line dot-notation
  59084. }
  59085. const stanza = $iq(attrs).c('query', {
  59086. 'xmlns': Strophe.NS.MAM,
  59087. 'queryid': queryid
  59088. });
  59089. if (options) {
  59090. stanza.c('x', {
  59091. 'xmlns': Strophe.NS.XFORM,
  59092. 'type': 'submit'
  59093. }).c('field', {
  59094. 'var': 'FORM_TYPE',
  59095. 'type': 'hidden'
  59096. }).c('value').t(Strophe.NS.MAM).up().up();
  59097. if (options['with'] && !options.groupchat) {
  59098. // eslint-disable-line dot-notation
  59099. stanza.c('field', {
  59100. 'var': 'with'
  59101. }).c('value').t(options['with']).up().up(); // eslint-disable-line dot-notation
  59102. }
  59103. _.each(['start', 'end'], function (t) {
  59104. if (options[t]) {
  59105. date = moment(options[t]);
  59106. if (date.isValid()) {
  59107. stanza.c('field', {
  59108. 'var': t
  59109. }).c('value').t(date.format()).up().up();
  59110. } else {
  59111. throw new TypeError(`archive.query: invalid date provided for: ${t}`);
  59112. }
  59113. }
  59114. });
  59115. stanza.up();
  59116. if (options instanceof Strophe.RSM) {
  59117. stanza.cnode(options.toXML());
  59118. } else if (_.intersection(RSM_ATTRIBUTES, _.keys(options)).length) {
  59119. stanza.cnode(new Strophe.RSM(options).toXML());
  59120. }
  59121. }
  59122. const messages = [];
  59123. const message_handler = _converse.connection.addHandler(message => {
  59124. if (options.groupchat && message.getAttribute('from') !== options['with']) {
  59125. // eslint-disable-line dot-notation
  59126. return true;
  59127. }
  59128. const result = message.querySelector('result');
  59129. if (!_.isNull(result) && result.getAttribute('queryid') === queryid) {
  59130. messages.push(message);
  59131. }
  59132. return true;
  59133. }, Strophe.NS.MAM);
  59134. _converse.connection.sendIQ(stanza, function (iq) {
  59135. _converse.connection.deleteHandler(message_handler);
  59136. if (_.isFunction(callback)) {
  59137. const set = iq.querySelector('set');
  59138. let rsm;
  59139. if (!_.isUndefined(set)) {
  59140. rsm = new Strophe.RSM({
  59141. xml: set
  59142. });
  59143. _.extend(rsm, _.pick(options, _.concat(MAM_ATTRIBUTES, ['max'])));
  59144. }
  59145. callback(messages, rsm);
  59146. }
  59147. }, function () {
  59148. _converse.connection.deleteHandler(message_handler);
  59149. if (_.isFunction(errback)) {
  59150. errback.apply(this, arguments);
  59151. }
  59152. }, _converse.message_archiving_timeout);
  59153. }
  59154. converse.plugins.add('converse-mam', {
  59155. dependencies: ['converse-chatview', 'converse-muc', 'converse-muc-views'],
  59156. overrides: {
  59157. // Overrides mentioned here will be picked up by converse.js's
  59158. // plugin architecture they will replace existing methods on the
  59159. // relevant objects or classes.
  59160. //
  59161. // New functions which don't exist yet can also be added.
  59162. ChatBox: {
  59163. getMessageAttributesFromStanza(message, original_stanza) {
  59164. function _process(attrs) {
  59165. const archive_id = getMessageArchiveID(original_stanza);
  59166. if (archive_id) {
  59167. attrs.archive_id = archive_id;
  59168. }
  59169. return attrs;
  59170. }
  59171. const result = this.__super__.getMessageAttributesFromStanza.apply(this, arguments);
  59172. if (result instanceof Promise) {
  59173. return new Promise((resolve, reject) => result.then(attrs => resolve(_process(attrs))).catch(reject));
  59174. } else {
  59175. return _process(result);
  59176. }
  59177. }
  59178. },
  59179. ChatBoxView: {
  59180. render() {
  59181. const result = this.__super__.render.apply(this, arguments);
  59182. if (!this.disable_mam) {
  59183. this.content.addEventListener('scroll', _.debounce(this.onScroll.bind(this), 100));
  59184. }
  59185. return result;
  59186. },
  59187. fetchNewestMessages() {
  59188. /* Fetches messages that might have been archived *after*
  59189. * the last archived message in our local cache.
  59190. */
  59191. if (this.disable_mam) {
  59192. return;
  59193. }
  59194. const _converse = this.__super__._converse,
  59195. most_recent_msg = u.getMostRecentMessage(this.model);
  59196. if (_.isNil(most_recent_msg)) {
  59197. this.fetchArchivedMessages();
  59198. } else {
  59199. const archive_id = most_recent_msg.get('archive_id');
  59200. if (archive_id) {
  59201. this.fetchArchivedMessages({
  59202. 'after': most_recent_msg.get('archive_id')
  59203. });
  59204. } else {
  59205. this.fetchArchivedMessages({
  59206. 'start': most_recent_msg.get('time')
  59207. });
  59208. }
  59209. }
  59210. },
  59211. fetchArchivedMessagesIfNecessary() {
  59212. /* Check if archived messages should be fetched, and if so, do so. */
  59213. if (this.disable_mam || this.model.get('mam_initialized')) {
  59214. return;
  59215. }
  59216. const _converse = this.__super__._converse;
  59217. _converse.api.disco.supports(Strophe.NS.MAM, _converse.bare_jid).then(result => {
  59218. // Success
  59219. if (result.length) {
  59220. this.fetchArchivedMessages();
  59221. }
  59222. this.model.save({
  59223. 'mam_initialized': true
  59224. });
  59225. }, () => {
  59226. // Error
  59227. _converse.log("Error or timeout while checking for MAM support", Strophe.LogLevel.ERROR);
  59228. }).catch(msg => {
  59229. this.clearSpinner();
  59230. _converse.log(msg, Strophe.LogLevel.FATAL);
  59231. });
  59232. },
  59233. fetchArchivedMessages(options) {
  59234. const _converse = this.__super__._converse;
  59235. if (this.disable_mam) {
  59236. return;
  59237. }
  59238. const is_groupchat = this.model.get('type') === CHATROOMS_TYPE;
  59239. let mam_jid, message_handler;
  59240. if (is_groupchat) {
  59241. mam_jid = this.model.get('jid');
  59242. message_handler = this.model.onMessage.bind(this.model);
  59243. } else {
  59244. mam_jid = _converse.bare_jid;
  59245. message_handler = _converse.chatboxes.onMessage.bind(_converse.chatboxes);
  59246. }
  59247. _converse.api.disco.supports(Strophe.NS.MAM, mam_jid).then(results => {
  59248. // Success
  59249. if (!results.length) {
  59250. return;
  59251. }
  59252. this.addSpinner();
  59253. _converse.api.archive.query(_.extend({
  59254. 'groupchat': is_groupchat,
  59255. 'before': '',
  59256. // Page backwards from the most recent message
  59257. 'max': _converse.archived_messages_page_size,
  59258. 'with': this.model.get('jid')
  59259. }, options), messages => {
  59260. // Success
  59261. this.clearSpinner();
  59262. _.each(messages, message_handler);
  59263. }, () => {
  59264. // Error
  59265. this.clearSpinner();
  59266. _converse.log("Error or timeout while trying to fetch " + "archived messages", Strophe.LogLevel.ERROR);
  59267. });
  59268. }, () => {
  59269. // Error
  59270. _converse.log("Error or timeout while checking for MAM support", Strophe.LogLevel.ERROR);
  59271. }).catch(msg => {
  59272. this.clearSpinner();
  59273. _converse.log(msg, Strophe.LogLevel.FATAL);
  59274. });
  59275. },
  59276. onScroll(ev) {
  59277. const _converse = this.__super__._converse;
  59278. if (this.content.scrollTop === 0 && this.model.messages.length) {
  59279. const oldest_message = this.model.messages.at(0);
  59280. const archive_id = oldest_message.get('archive_id');
  59281. if (archive_id) {
  59282. this.fetchArchivedMessages({
  59283. 'before': archive_id
  59284. });
  59285. } else {
  59286. this.fetchArchivedMessages({
  59287. 'end': oldest_message.get('time')
  59288. });
  59289. }
  59290. }
  59291. }
  59292. },
  59293. ChatRoom: {
  59294. isDuplicate(message, original_stanza) {
  59295. const result = this.__super__.isDuplicate.apply(this, arguments);
  59296. if (result) {
  59297. return result;
  59298. }
  59299. const archive_id = getMessageArchiveID(original_stanza);
  59300. if (archive_id) {
  59301. return this.messages.filter({
  59302. 'archive_id': archive_id
  59303. }).length > 0;
  59304. }
  59305. }
  59306. },
  59307. ChatRoomView: {
  59308. initialize() {
  59309. const _converse = this.__super__._converse;
  59310. this.__super__.initialize.apply(this, arguments);
  59311. this.model.on('change:mam_enabled', this.fetchArchivedMessagesIfNecessary, this);
  59312. this.model.on('change:connection_status', this.fetchArchivedMessagesIfNecessary, this);
  59313. },
  59314. renderChatArea() {
  59315. const result = this.__super__.renderChatArea.apply(this, arguments);
  59316. if (!this.disable_mam) {
  59317. this.content.addEventListener('scroll', _.debounce(this.onScroll.bind(this), 100));
  59318. }
  59319. return result;
  59320. },
  59321. fetchArchivedMessagesIfNecessary() {
  59322. if (this.model.get('connection_status') !== converse.ROOMSTATUS.ENTERED || !this.model.get('mam_enabled') || this.model.get('mam_initialized')) {
  59323. return;
  59324. }
  59325. this.fetchArchivedMessages();
  59326. this.model.save({
  59327. 'mam_initialized': true
  59328. });
  59329. }
  59330. }
  59331. },
  59332. initialize() {
  59333. /* The initialize function gets called as soon as the plugin is
  59334. * loaded by Converse.js's plugin machinery.
  59335. */
  59336. const _converse = this._converse;
  59337. _converse.api.settings.update({
  59338. archived_messages_page_size: '50',
  59339. message_archiving: undefined,
  59340. // Supported values are 'always', 'never', 'roster' (https://xmpp.org/extensions/xep-0313.html#prefs)
  59341. message_archiving_timeout: 8000 // Time (in milliseconds) to wait before aborting MAM request
  59342. });
  59343. _converse.onMAMError = function (model, iq) {
  59344. if (iq.querySelectorAll('feature-not-implemented').length) {
  59345. _converse.log("Message Archive Management (XEP-0313) not supported by this server", Strophe.LogLevel.WARN);
  59346. } else {
  59347. _converse.log("An error occured while trying to set archiving preferences.", Strophe.LogLevel.ERROR);
  59348. _converse.log(iq);
  59349. }
  59350. };
  59351. _converse.onMAMPreferences = function (feature, iq) {
  59352. /* Handle returned IQ stanza containing Message Archive
  59353. * Management (XEP-0313) preferences.
  59354. *
  59355. * XXX: For now we only handle the global default preference.
  59356. * The XEP also provides for per-JID preferences, which is
  59357. * currently not supported in converse.js.
  59358. *
  59359. * Per JID preferences will be set in chat boxes, so it'll
  59360. * probbaly be handled elsewhere in any case.
  59361. */
  59362. const preference = sizzle(`prefs[xmlns="${Strophe.NS.MAM}"]`, iq).pop();
  59363. const default_pref = preference.getAttribute('default');
  59364. if (default_pref !== _converse.message_archiving) {
  59365. const stanza = $iq({
  59366. 'type': 'set'
  59367. }).c('prefs', {
  59368. 'xmlns': Strophe.NS.MAM,
  59369. 'default': _converse.message_archiving
  59370. });
  59371. _.each(preference.children, function (child) {
  59372. stanza.cnode(child).up();
  59373. });
  59374. _converse.connection.sendIQ(stanza, _.partial(function (feature, iq) {
  59375. // XXX: Strictly speaking, the server should respond with the updated prefs
  59376. // (see example 18: https://xmpp.org/extensions/xep-0313.html#config)
  59377. // but Prosody doesn't do this, so we don't rely on it.
  59378. feature.save({
  59379. 'preferences': {
  59380. 'default': _converse.message_archiving
  59381. }
  59382. });
  59383. }, feature), _converse.onMAMError);
  59384. } else {
  59385. feature.save({
  59386. 'preferences': {
  59387. 'default': _converse.message_archiving
  59388. }
  59389. });
  59390. }
  59391. };
  59392. /* Event handlers */
  59393. _converse.on('serviceDiscovered', feature => {
  59394. const prefs = feature.get('preferences') || {};
  59395. if (feature.get('var') === Strophe.NS.MAM && prefs['default'] !== _converse.message_archiving && // eslint-disable-line dot-notation
  59396. !_.isUndefined(_converse.message_archiving)) {
  59397. // Ask the server for archiving preferences
  59398. _converse.connection.sendIQ($iq({
  59399. 'type': 'get'
  59400. }).c('prefs', {
  59401. 'xmlns': Strophe.NS.MAM
  59402. }), _.partial(_converse.onMAMPreferences, feature), _.partial(_converse.onMAMError, feature));
  59403. }
  59404. });
  59405. _converse.on('addClientFeatures', () => {
  59406. _converse.api.disco.own.features.add(Strophe.NS.MAM);
  59407. });
  59408. _converse.on('afterMessagesFetched', chatboxview => {
  59409. chatboxview.fetchNewestMessages();
  59410. });
  59411. _converse.on('reconnected', () => {
  59412. const private_chats = _converse.chatboxviews.filter(view => _.at(view, 'model.attributes.type')[0] === 'chatbox');
  59413. _.each(private_chats, view => view.fetchNewestMessages());
  59414. });
  59415. _.extend(_converse.api, {
  59416. /**
  59417. * The [XEP-0313](https://xmpp.org/extensions/xep-0313.html) Message Archive Management API
  59418. *
  59419. * Enables you to query an XMPP server for archived messages.
  59420. *
  59421. * See also the [message-archiving](/docs/html/configuration.html#message-archiving)
  59422. * option in the configuration settings section, which you'll
  59423. * usually want to use in conjunction with this API.
  59424. *
  59425. * @namespace _converse.api.archive
  59426. * @memberOf _converse.api
  59427. */
  59428. 'archive': {
  59429. /**
  59430. * Query for archived messages.
  59431. *
  59432. * The options parameter can also be an instance of
  59433. * Strophe.RSM to enable easy querying between results pages.
  59434. *
  59435. * @method _converse.api.archive.query
  59436. * @param {(Object|Strophe.RSM)} options Query parameters, either
  59437. * MAM-specific or also for Result Set Management.
  59438. * Can be either an object or an instance of Strophe.RSM.
  59439. * Valid query parameters are:
  59440. * * `with`
  59441. * * `start`
  59442. * * `end`
  59443. * * `first`
  59444. * * `last`
  59445. * * `after`
  59446. * * `before`
  59447. * * `index`
  59448. * * `count`
  59449. * @param {Function} callback A function to call whenever
  59450. * we receive query-relevant stanza.
  59451. * When the callback is called, a Strophe.RSM object is
  59452. * returned on which "next" or "previous" can be called
  59453. * before passing it in again to this method, to
  59454. * get the next or previous page in the result set.
  59455. * @param {Function} errback A function to call when an
  59456. * error stanza is received, for example when it
  59457. * doesn't support message archiving.
  59458. *
  59459. * @example
  59460. * // Requesting all archived messages
  59461. * // ================================
  59462. * //
  59463. * // The simplest query that can be made is to simply not pass in any parameters.
  59464. * // Such a query will return all archived messages for the current user.
  59465. * //
  59466. * // Generally, you'll however always want to pass in a callback method, to receive
  59467. * // the returned messages.
  59468. *
  59469. * this._converse.api.archive.query(
  59470. * (messages) => {
  59471. * // Do something with the messages, like showing them in your webpage.
  59472. * },
  59473. * (iq) => {
  59474. * // The query was not successful, perhaps inform the user?
  59475. * // The IQ stanza returned by the XMPP server is passed in, so that you
  59476. * // may inspect it and determine what the problem was.
  59477. * }
  59478. * )
  59479. * @example
  59480. * // Waiting until server support has been determined
  59481. * // ================================================
  59482. * //
  59483. * // The query method will only work if Converse has been able to determine that
  59484. * // the server supports MAM queries, otherwise the following error will be raised:
  59485. * //
  59486. * // "This server does not support XEP-0313, Message Archive Management"
  59487. * //
  59488. * // The very first time Converse loads in a browser tab, if you call the query
  59489. * // API too quickly, the above error might appear because service discovery has not
  59490. * // yet been completed.
  59491. * //
  59492. * // To work solve this problem, you can first listen for the `serviceDiscovered` event,
  59493. * // through which you can be informed once support for MAM has been determined.
  59494. *
  59495. * _converse.api.listen.on('serviceDiscovered', function (feature) {
  59496. * if (feature.get('var') === converse.env.Strophe.NS.MAM) {
  59497. * _converse.api.archive.query()
  59498. * }
  59499. * });
  59500. *
  59501. * @example
  59502. * // Requesting all archived messages for a particular contact or room
  59503. * // =================================================================
  59504. * //
  59505. * // To query for messages sent between the current user and another user or room,
  59506. * // the query options need to contain the the JID (Jabber ID) of the user or
  59507. * // room under the `with` key.
  59508. *
  59509. * // For a particular user
  59510. * this._converse.api.archive.query({'with': 'john@doe.net'}, callback, errback);)
  59511. *
  59512. * // For a particular room
  59513. * this._converse.api.archive.query({'with': 'discuss@conference.doglovers.net'}, callback, errback);)
  59514. *
  59515. * @example
  59516. * // Requesting all archived messages before or after a certain date
  59517. * // ===============================================================
  59518. * //
  59519. * // The `start` and `end` parameters are used to query for messages
  59520. * // within a certain timeframe. The passed in date values may either be ISO8601
  59521. * // formatted date strings, or JavaScript Date objects.
  59522. *
  59523. * const options = {
  59524. * 'with': 'john@doe.net',
  59525. * 'start': '2010-06-07T00:00:00Z',
  59526. * 'end': '2010-07-07T13:23:54Z'
  59527. * };
  59528. * this._converse.api.archive.query(options, callback, errback);
  59529. *
  59530. * @example
  59531. * // Limiting the amount of messages returned
  59532. * // ========================================
  59533. * //
  59534. * // The amount of returned messages may be limited with the `max` parameter.
  59535. * // By default, the messages are returned from oldest to newest.
  59536. *
  59537. * // Return maximum 10 archived messages
  59538. * this._converse.api.archive.query({'with': 'john@doe.net', 'max':10}, callback, errback);
  59539. *
  59540. * @example
  59541. * // Paging forwards through a set of archived messages
  59542. * // ==================================================
  59543. * //
  59544. * // When limiting the amount of messages returned per query, you might want to
  59545. * // repeatedly make a further query to fetch the next batch of messages.
  59546. * //
  59547. * // To simplify this usecase for you, the callback method receives not only an array
  59548. * // with the returned archived messages, but also a special RSM (*Result Set
  59549. * // Management*) object which contains the query parameters you passed in, as well
  59550. * // as two utility methods `next`, and `previous`.
  59551. * //
  59552. * // When you call one of these utility methods on the returned RSM object, and then
  59553. * // pass the result into a new query, you'll receive the next or previous batch of
  59554. * // archived messages. Please note, when calling these methods, pass in an integer
  59555. * // to limit your results.
  59556. *
  59557. * const callback = function (messages, rsm) {
  59558. * // Do something with the messages, like showing them in your webpage.
  59559. * // ...
  59560. * // You can now use the returned "rsm" object, to fetch the next batch of messages:
  59561. * _converse.api.archive.query(rsm.next(10), callback, errback))
  59562. *
  59563. * }
  59564. * _converse.api.archive.query({'with': 'john@doe.net', 'max':10}, callback, errback);
  59565. *
  59566. * @example
  59567. * // Paging backwards through a set of archived messages
  59568. * // ===================================================
  59569. * //
  59570. * // To page backwards through the archive, you need to know the UID of the message
  59571. * // which you'd like to page backwards from and then pass that as value for the
  59572. * // `before` parameter. If you simply want to page backwards from the most recent
  59573. * // message, pass in the `before` parameter with an empty string value `''`.
  59574. *
  59575. * _converse.api.archive.query({'before': '', 'max':5}, function (message, rsm) {
  59576. * // Do something with the messages, like showing them in your webpage.
  59577. * // ...
  59578. * // You can now use the returned "rsm" object, to fetch the previous batch of messages:
  59579. * rsm.previous(5); // Call previous method, to update the object's parameters,
  59580. * // passing in a limit value of 5.
  59581. * // Now we query again, to get the previous batch.
  59582. * _converse.api.archive.query(rsm, callback, errback);
  59583. * }
  59584. */
  59585. 'query': function query(options, callback, errback) {
  59586. if (!_converse.api.connection.connected()) {
  59587. throw new Error('Can\'t call `api.archive.query` before having established an XMPP session');
  59588. }
  59589. return queryForArchivedMessages(_converse, options, callback, errback);
  59590. }
  59591. }
  59592. });
  59593. }
  59594. });
  59595. });
  59596. /***/ }),
  59597. /***/ "./src/converse-message-view.js":
  59598. /*!**************************************!*\
  59599. !*** ./src/converse-message-view.js ***!
  59600. \**************************************/
  59601. /*! no static exports found */
  59602. /***/ (function(module, exports, __webpack_require__) {
  59603. "use strict";
  59604. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  59605. // Converse.js
  59606. // https://conversejs.org
  59607. //
  59608. // Copyright (c) 2013-2018, the Converse.js developers
  59609. // Licensed under the Mozilla Public License (MPLv2)
  59610. (function (root, factory) {
  59611. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! utils/emoji */ "./src/utils/emoji.js"), __webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! xss */ "./node_modules/xss/dist/xss.js"), __webpack_require__(/*! filesize */ "./node_modules/filesize/lib/filesize.js"), __webpack_require__(/*! templates/csn.html */ "./src/templates/csn.html"), __webpack_require__(/*! templates/file_progress.html */ "./src/templates/file_progress.html"), __webpack_require__(/*! templates/info.html */ "./src/templates/info.html"), __webpack_require__(/*! templates/message.html */ "./src/templates/message.html"), __webpack_require__(/*! templates/message_versions_modal.html */ "./src/templates/message_versions_modal.html")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  59612. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  59613. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  59614. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  59615. })(void 0, function (u, converse, xss, filesize, tpl_csn, tpl_file_progress, tpl_info, tpl_message, tpl_message_versions_modal) {
  59616. "use strict";
  59617. const _converse$env = converse.env,
  59618. Backbone = _converse$env.Backbone,
  59619. _ = _converse$env._,
  59620. moment = _converse$env.moment;
  59621. converse.plugins.add('converse-message-view', {
  59622. initialize() {
  59623. /* The initialize function gets called as soon as the plugin is
  59624. * loaded by converse.js's plugin machinery.
  59625. */
  59626. const _converse = this._converse,
  59627. __ = _converse.__;
  59628. _converse.MessageVersionsModal = _converse.BootstrapModal.extend({
  59629. toHTML() {
  59630. return tpl_message_versions_modal(_.extend(this.model.toJSON(), {
  59631. '__': __
  59632. }));
  59633. }
  59634. });
  59635. _converse.MessageView = _converse.ViewWithAvatar.extend({
  59636. events: {
  59637. 'click .chat-msg__edit-modal': 'showMessageVersionsModal'
  59638. },
  59639. initialize() {
  59640. if (this.model.vcard) {
  59641. this.model.vcard.on('change', this.render, this);
  59642. }
  59643. this.model.on('change:correcting', this.onMessageCorrection, this);
  59644. this.model.on('change:message', this.render, this);
  59645. this.model.on('change:progress', this.renderFileUploadProgresBar, this);
  59646. this.model.on('change:type', this.render, this);
  59647. this.model.on('change:upload', this.render, this);
  59648. this.model.on('destroy', this.remove, this);
  59649. this.render();
  59650. },
  59651. render() {
  59652. const is_followup = u.hasClass('chat-msg--followup', this.el);
  59653. let msg;
  59654. if (this.model.isOnlyChatStateNotification()) {
  59655. this.renderChatStateNotification();
  59656. } else if (this.model.get('file') && !this.model.get('oob_url')) {
  59657. this.renderFileUploadProgresBar();
  59658. } else if (this.model.get('type') === 'error') {
  59659. this.renderErrorMessage();
  59660. } else {
  59661. this.renderChatMessage();
  59662. }
  59663. if (is_followup) {
  59664. u.addClass('chat-msg--followup', this.el);
  59665. }
  59666. return this.el;
  59667. },
  59668. onMessageCorrection() {
  59669. this.render();
  59670. if (!this.model.get('correcting') && this.model.changed.message) {
  59671. this.el.addEventListener('animationend', () => u.removeClass('onload', this.el));
  59672. u.addClass('onload', this.el);
  59673. }
  59674. },
  59675. replaceElement(msg) {
  59676. if (!_.isNil(this.el.parentElement)) {
  59677. this.el.parentElement.replaceChild(msg, this.el);
  59678. }
  59679. this.setElement(msg);
  59680. return this.el;
  59681. },
  59682. renderChatMessage() {
  59683. const is_me_message = this.isMeCommand(),
  59684. moment_time = moment(this.model.get('time')),
  59685. role = this.model.vcard ? this.model.vcard.get('role') : null,
  59686. roles = role ? role.split(',') : [];
  59687. const msg = u.stringToElement(tpl_message(_.extend(this.model.toJSON(), {
  59688. '__': __,
  59689. 'is_me_message': is_me_message,
  59690. 'roles': roles,
  59691. 'pretty_time': moment_time.format(_converse.time_format),
  59692. 'time': moment_time.format(),
  59693. 'extra_classes': this.getExtraMessageClasses(),
  59694. 'label_show': __('Show more'),
  59695. 'username': this.model.getDisplayName()
  59696. })));
  59697. const url = this.model.get('oob_url');
  59698. if (url) {
  59699. msg.querySelector('.chat-msg__media').innerHTML = _.flow(_.partial(u.renderFileURL, _converse), _.partial(u.renderMovieURL, _converse), _.partial(u.renderAudioURL, _converse), _.partial(u.renderImageURL, _converse))(url);
  59700. }
  59701. let text = this.getMessageText();
  59702. const msg_content = msg.querySelector('.chat-msg__text');
  59703. if (text && text !== url) {
  59704. if (is_me_message) {
  59705. text = text.replace(/^\/me/, '');
  59706. }
  59707. text = xss.filterXSS(text, {
  59708. 'whiteList': {}
  59709. });
  59710. msg_content.innerHTML = _.flow(_.partial(u.geoUriToHttp, _, _converse.geouri_replacement), _.partial(u.addMentionsMarkup, _, this.model.get('references'), this.model.collection.chatbox), u.addHyperlinks, u.renderNewLines, _.partial(u.addEmoji, _converse, _))(text);
  59711. }
  59712. u.renderImageURLs(_converse, msg_content).then(() => {
  59713. this.model.collection.trigger('rendered');
  59714. });
  59715. this.replaceElement(msg);
  59716. if (this.model.get('type') !== 'headline') {
  59717. this.renderAvatar();
  59718. }
  59719. },
  59720. renderErrorMessage() {
  59721. const moment_time = moment(this.model.get('time')),
  59722. msg = u.stringToElement(tpl_info(_.extend(this.model.toJSON(), {
  59723. 'extra_classes': 'chat-error',
  59724. 'isodate': moment_time.format()
  59725. })));
  59726. return this.replaceElement(msg);
  59727. },
  59728. renderChatStateNotification() {
  59729. let text;
  59730. const from = this.model.get('from'),
  59731. name = this.model.getDisplayName();
  59732. if (this.model.get('chat_state') === _converse.COMPOSING) {
  59733. if (this.model.get('sender') === 'me') {
  59734. text = __('Typing from another device');
  59735. } else {
  59736. text = __('%1$s is typing', name);
  59737. }
  59738. } else if (this.model.get('chat_state') === _converse.PAUSED) {
  59739. if (this.model.get('sender') === 'me') {
  59740. text = __('Stopped typing on the other device');
  59741. } else {
  59742. text = __('%1$s has stopped typing', name);
  59743. }
  59744. } else if (this.model.get('chat_state') === _converse.GONE) {
  59745. text = __('%1$s has gone away', name);
  59746. } else {
  59747. return;
  59748. }
  59749. const isodate = moment().format();
  59750. this.replaceElement(u.stringToElement(tpl_csn({
  59751. 'message': text,
  59752. 'from': from,
  59753. 'isodate': isodate
  59754. })));
  59755. },
  59756. renderFileUploadProgresBar() {
  59757. const msg = u.stringToElement(tpl_file_progress(_.extend(this.model.toJSON(), {
  59758. 'filesize': filesize(this.model.get('file').size)
  59759. })));
  59760. this.replaceElement(msg);
  59761. this.renderAvatar();
  59762. },
  59763. showMessageVersionsModal(ev) {
  59764. ev.preventDefault();
  59765. if (_.isUndefined(this.model.message_versions_modal)) {
  59766. this.model.message_versions_modal = new _converse.MessageVersionsModal({
  59767. 'model': this.model
  59768. });
  59769. }
  59770. this.model.message_versions_modal.show(ev);
  59771. },
  59772. getMessageText() {
  59773. if (this.model.get('is_encrypted')) {
  59774. return this.model.get('plaintext') || (_converse.debug ? __('Unencryptable OMEMO message') : null);
  59775. }
  59776. return this.model.get('message');
  59777. },
  59778. isMeCommand() {
  59779. const text = this.getMessageText();
  59780. if (!text) {
  59781. return false;
  59782. }
  59783. const match = text.match(/^\/(.*?)(?: (.*))?$/);
  59784. return match && match[1] === 'me';
  59785. },
  59786. processMessageText() {
  59787. var text = this.get('message');
  59788. text = u.geoUriToHttp(text, _converse.geouri_replacement);
  59789. },
  59790. getExtraMessageClasses() {
  59791. let extra_classes = this.model.get('is_delayed') && 'delayed' || '';
  59792. if (this.model.get('type') === 'groupchat' && this.model.get('sender') === 'them') {
  59793. if (this.model.collection.chatbox.isUserMentioned(this.model)) {
  59794. // Add special class to mark groupchat messages
  59795. // in which we are mentioned.
  59796. extra_classes += ' mentioned';
  59797. }
  59798. }
  59799. if (this.model.get('correcting')) {
  59800. extra_classes += ' correcting';
  59801. }
  59802. return extra_classes;
  59803. }
  59804. });
  59805. }
  59806. });
  59807. return converse;
  59808. });
  59809. /***/ }),
  59810. /***/ "./src/converse-minimize.js":
  59811. /*!**********************************!*\
  59812. !*** ./src/converse-minimize.js ***!
  59813. \**********************************/
  59814. /*! no static exports found */
  59815. /***/ (function(module, exports, __webpack_require__) {
  59816. "use strict";
  59817. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  59818. // Converse.js (A browser based XMPP chat client)
  59819. // http://conversejs.org
  59820. //
  59821. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  59822. // Licensed under the Mozilla Public License (MPLv2)
  59823. //
  59824. /*global define, window, document */
  59825. (function (root, factory) {
  59826. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! templates/chatbox_minimize.html */ "./src/templates/chatbox_minimize.html"), __webpack_require__(/*! templates/toggle_chats.html */ "./src/templates/toggle_chats.html"), __webpack_require__(/*! templates/trimmed_chat.html */ "./src/templates/trimmed_chat.html"), __webpack_require__(/*! templates/chats_panel.html */ "./src/templates/chats_panel.html"), __webpack_require__(/*! converse-chatview */ "./src/converse-chatview.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  59827. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  59828. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  59829. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  59830. })(void 0, function (converse, tpl_chatbox_minimize, tpl_toggle_chats, tpl_trimmed_chat, tpl_chats_panel) {
  59831. "use strict";
  59832. const _converse$env = converse.env,
  59833. _ = _converse$env._,
  59834. Backbone = _converse$env.Backbone,
  59835. Promise = _converse$env.Promise,
  59836. Strophe = _converse$env.Strophe,
  59837. b64_sha1 = _converse$env.b64_sha1,
  59838. moment = _converse$env.moment;
  59839. const u = converse.env.utils;
  59840. converse.plugins.add('converse-minimize', {
  59841. /* Optional dependencies are other plugins which might be
  59842. * overridden or relied upon, and therefore need to be loaded before
  59843. * this plugin. They are called "optional" because they might not be
  59844. * available, in which case any overrides applicable to them will be
  59845. * ignored.
  59846. *
  59847. * It's possible however to make optional dependencies non-optional.
  59848. * If the setting "strict_plugin_dependencies" is set to true,
  59849. * an error will be raised if the plugin is not found.
  59850. *
  59851. * NB: These plugins need to have already been loaded via require.js.
  59852. */
  59853. dependencies: ["converse-chatview", "converse-controlbox", "converse-muc", "converse-muc-views", "converse-headline"],
  59854. enabled(_converse) {
  59855. return _converse.view_mode == 'overlayed';
  59856. },
  59857. overrides: {
  59858. // Overrides mentioned here will be picked up by converse.js's
  59859. // plugin architecture they will replace existing methods on the
  59860. // relevant objects or classes.
  59861. //
  59862. // New functions which don't exist yet can also be added.
  59863. ChatBox: {
  59864. initialize() {
  59865. this.__super__.initialize.apply(this, arguments);
  59866. this.on('show', this.maximize, this);
  59867. if (this.get('id') === 'controlbox') {
  59868. return;
  59869. }
  59870. this.save({
  59871. 'minimized': this.get('minimized') || false,
  59872. 'time_minimized': this.get('time_minimized') || moment()
  59873. });
  59874. },
  59875. maximize() {
  59876. u.safeSave(this, {
  59877. 'minimized': false,
  59878. 'time_opened': moment().valueOf()
  59879. });
  59880. },
  59881. minimize() {
  59882. u.safeSave(this, {
  59883. 'minimized': true,
  59884. 'time_minimized': moment().format()
  59885. });
  59886. }
  59887. },
  59888. ChatBoxView: {
  59889. events: {
  59890. 'click .toggle-chatbox-button': 'minimize'
  59891. },
  59892. initialize() {
  59893. this.model.on('change:minimized', this.onMinimizedChanged, this);
  59894. return this.__super__.initialize.apply(this, arguments);
  59895. },
  59896. _show() {
  59897. const _converse = this.__super__._converse;
  59898. if (!this.model.get('minimized')) {
  59899. this.__super__._show.apply(this, arguments);
  59900. _converse.chatboxviews.trimChats(this);
  59901. } else {
  59902. this.minimize();
  59903. }
  59904. },
  59905. isNewMessageHidden() {
  59906. return this.model.get('minimized') || this.__super__.isNewMessageHidden.apply(this, arguments);
  59907. },
  59908. shouldShowOnTextMessage() {
  59909. return !this.model.get('minimized') && this.__super__.shouldShowOnTextMessage.apply(this, arguments);
  59910. },
  59911. setChatBoxHeight(height) {
  59912. if (!this.model.get('minimized')) {
  59913. return this.__super__.setChatBoxHeight.apply(this, arguments);
  59914. }
  59915. },
  59916. setChatBoxWidth(width) {
  59917. if (!this.model.get('minimized')) {
  59918. return this.__super__.setChatBoxWidth.apply(this, arguments);
  59919. }
  59920. },
  59921. onMinimizedChanged(item) {
  59922. if (item.get('minimized')) {
  59923. this.minimize();
  59924. } else {
  59925. this.maximize();
  59926. }
  59927. },
  59928. maximize() {
  59929. // Restores a minimized chat box
  59930. const _converse = this.__super__._converse;
  59931. this.insertIntoDOM();
  59932. if (!this.model.isScrolledUp()) {
  59933. this.model.clearUnreadMsgCounter();
  59934. }
  59935. this.show();
  59936. this.__super__._converse.emit('chatBoxMaximized', this);
  59937. return this;
  59938. },
  59939. minimize(ev) {
  59940. const _converse = this.__super__._converse;
  59941. if (ev && ev.preventDefault) {
  59942. ev.preventDefault();
  59943. } // save the scroll position to restore it on maximize
  59944. if (this.model.collection && this.model.collection.browserStorage) {
  59945. this.model.save({
  59946. 'scroll': this.content.scrollTop
  59947. });
  59948. } else {
  59949. this.model.set({
  59950. 'scroll': this.content.scrollTop
  59951. });
  59952. }
  59953. this.setChatState(_converse.INACTIVE).model.minimize();
  59954. this.hide();
  59955. _converse.emit('chatBoxMinimized', this);
  59956. }
  59957. },
  59958. ChatBoxHeading: {
  59959. render() {
  59960. const _converse = this.__super__._converse,
  59961. __ = _converse.__;
  59962. const result = this.__super__.render.apply(this, arguments);
  59963. const new_html = tpl_chatbox_minimize({
  59964. info_minimize: __('Minimize this chat box')
  59965. });
  59966. const el = this.el.querySelector('.toggle-chatbox-button');
  59967. if (el) {
  59968. el.outerHTML = new_html;
  59969. } else {
  59970. const button = this.el.querySelector('.close-chatbox-button');
  59971. button.insertAdjacentHTML('afterEnd', new_html);
  59972. }
  59973. }
  59974. },
  59975. ChatRoomView: {
  59976. events: {
  59977. 'click .toggle-chatbox-button': 'minimize'
  59978. },
  59979. initialize() {
  59980. this.model.on('change:minimized', function (item) {
  59981. if (item.get('minimized')) {
  59982. this.hide();
  59983. } else {
  59984. this.maximize();
  59985. }
  59986. }, this);
  59987. const result = this.__super__.initialize.apply(this, arguments);
  59988. if (this.model.get('minimized')) {
  59989. this.hide();
  59990. }
  59991. return result;
  59992. },
  59993. generateHeadingHTML() {
  59994. const _converse = this.__super__._converse,
  59995. __ = _converse.__;
  59996. const html = this.__super__.generateHeadingHTML.apply(this, arguments);
  59997. const div = document.createElement('div');
  59998. div.innerHTML = html;
  59999. const button = div.querySelector('.close-chatbox-button');
  60000. button.insertAdjacentHTML('afterend', tpl_chatbox_minimize({
  60001. 'info_minimize': __('Minimize this chat box')
  60002. }));
  60003. return div.innerHTML;
  60004. }
  60005. },
  60006. ChatBoxes: {
  60007. chatBoxMayBeShown(chatbox) {
  60008. return this.__super__.chatBoxMayBeShown.apply(this, arguments) && !chatbox.get('minimized');
  60009. }
  60010. },
  60011. ChatBoxViews: {
  60012. getChatBoxWidth(view) {
  60013. if (!view.model.get('minimized') && u.isVisible(view.el)) {
  60014. return u.getOuterWidth(view.el, true);
  60015. }
  60016. return 0;
  60017. },
  60018. getShownChats() {
  60019. return this.filter(view => // The controlbox can take a while to close,
  60020. // so we need to check its state. That's why we checked
  60021. // the 'closed' state.
  60022. !view.model.get('minimized') && !view.model.get('closed') && u.isVisible(view.el));
  60023. },
  60024. trimChats(newchat) {
  60025. /* This method is called when a newly created chat box will
  60026. * be shown.
  60027. *
  60028. * It checks whether there is enough space on the page to show
  60029. * another chat box. Otherwise it minimizes the oldest chat box
  60030. * to create space.
  60031. */
  60032. const _converse = this.__super__._converse,
  60033. shown_chats = this.getShownChats(),
  60034. body_width = u.getOuterWidth(document.querySelector('body'), true);
  60035. if (_converse.no_trimming || shown_chats.length <= 1) {
  60036. return;
  60037. }
  60038. if (this.getChatBoxWidth(shown_chats[0]) === body_width) {
  60039. // If the chats shown are the same width as the body,
  60040. // then we're in responsive mode and the chats are
  60041. // fullscreen. In this case we don't trim.
  60042. return;
  60043. }
  60044. _converse.api.waitUntil('minimizedChatsInitialized').then(() => {
  60045. const minimized_el = _.get(_converse.minimized_chats, 'el'),
  60046. new_id = newchat ? newchat.model.get('id') : null;
  60047. if (minimized_el) {
  60048. const minimized_width = _.includes(this.model.pluck('minimized'), true) ? u.getOuterWidth(minimized_el, true) : 0;
  60049. const boxes_width = _.reduce(this.xget(new_id), (memo, view) => memo + this.getChatBoxWidth(view), newchat ? u.getOuterWidth(newchat.el, true) : 0);
  60050. if (minimized_width + boxes_width > body_width) {
  60051. const oldest_chat = this.getOldestMaximizedChat([new_id]);
  60052. if (oldest_chat) {
  60053. // We hide the chat immediately, because waiting
  60054. // for the event to fire (and letting the
  60055. // ChatBoxView hide it then) causes race
  60056. // conditions.
  60057. const view = this.get(oldest_chat.get('id'));
  60058. if (view) {
  60059. view.hide();
  60060. }
  60061. oldest_chat.minimize();
  60062. }
  60063. }
  60064. }
  60065. }).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  60066. },
  60067. getOldestMaximizedChat(exclude_ids) {
  60068. // Get oldest view (if its id is not excluded)
  60069. exclude_ids.push('controlbox');
  60070. let i = 0;
  60071. let model = this.model.sort().at(i);
  60072. while (_.includes(exclude_ids, model.get('id')) || model.get('minimized') === true) {
  60073. i++;
  60074. model = this.model.at(i);
  60075. if (!model) {
  60076. return null;
  60077. }
  60078. }
  60079. return model;
  60080. }
  60081. }
  60082. },
  60083. initialize() {
  60084. /* The initialize function gets called as soon as the plugin is
  60085. * loaded by Converse.js's plugin machinery.
  60086. */
  60087. const _converse = this._converse,
  60088. __ = _converse.__; // Add new HTML templates.
  60089. _converse.templates.chatbox_minimize = tpl_chatbox_minimize;
  60090. _converse.templates.toggle_chats = tpl_toggle_chats;
  60091. _converse.templates.trimmed_chat = tpl_trimmed_chat;
  60092. _converse.templates.chats_panel = tpl_chats_panel;
  60093. _converse.api.settings.update({
  60094. no_trimming: false // Set to true for phantomjs tests (where browser apparently has no width)
  60095. });
  60096. _converse.api.promises.add('minimizedChatsInitialized');
  60097. _converse.MinimizedChatBoxView = Backbone.NativeView.extend({
  60098. tagName: 'div',
  60099. className: 'chat-head row no-gutters',
  60100. events: {
  60101. 'click .close-chatbox-button': 'close',
  60102. 'click .restore-chat': 'restore'
  60103. },
  60104. initialize() {
  60105. this.model.on('change:num_unread', this.render, this);
  60106. },
  60107. render() {
  60108. const data = _.extend(this.model.toJSON(), {
  60109. 'tooltip': __('Click to restore this chat')
  60110. });
  60111. if (this.model.get('type') === 'chatroom') {
  60112. data.title = this.model.get('name');
  60113. u.addClass('chat-head-chatroom', this.el);
  60114. } else {
  60115. data.title = this.model.get('fullname');
  60116. u.addClass('chat-head-chatbox', this.el);
  60117. }
  60118. this.el.innerHTML = tpl_trimmed_chat(data);
  60119. return this.el;
  60120. },
  60121. close(ev) {
  60122. if (ev && ev.preventDefault) {
  60123. ev.preventDefault();
  60124. }
  60125. this.remove();
  60126. const view = _converse.chatboxviews.get(this.model.get('id'));
  60127. if (view) {
  60128. // This will call model.destroy(), removing it from the
  60129. // collection and will also emit 'chatBoxClosed'
  60130. view.close();
  60131. } else {
  60132. this.model.destroy();
  60133. _converse.emit('chatBoxClosed', this);
  60134. }
  60135. return this;
  60136. },
  60137. restore: _.debounce(function (ev) {
  60138. if (ev && ev.preventDefault) {
  60139. ev.preventDefault();
  60140. }
  60141. this.model.off('change:num_unread', null, this);
  60142. this.remove();
  60143. this.model.maximize();
  60144. }, 200, {
  60145. 'leading': true
  60146. })
  60147. });
  60148. _converse.MinimizedChats = Backbone.Overview.extend({
  60149. tagName: 'div',
  60150. id: "minimized-chats",
  60151. className: 'hidden',
  60152. events: {
  60153. "click #toggle-minimized-chats": "toggle"
  60154. },
  60155. initialize() {
  60156. this.render();
  60157. this.initToggle();
  60158. this.addMultipleChats(this.model.where({
  60159. 'minimized': true
  60160. }));
  60161. this.model.on("add", this.onChanged, this);
  60162. this.model.on("destroy", this.removeChat, this);
  60163. this.model.on("change:minimized", this.onChanged, this);
  60164. this.model.on('change:num_unread', this.updateUnreadMessagesCounter, this);
  60165. },
  60166. render() {
  60167. if (!this.el.parentElement) {
  60168. this.el.innerHTML = tpl_chats_panel();
  60169. _converse.chatboxviews.insertRowColumn(this.el);
  60170. }
  60171. if (this.keys().length === 0) {
  60172. this.el.classList.add('hidden');
  60173. } else if (this.keys().length > 0 && !u.isVisible(this.el)) {
  60174. this.el.classList.remove('hidden');
  60175. _converse.chatboxviews.trimChats();
  60176. }
  60177. return this.el;
  60178. },
  60179. tearDown() {
  60180. this.model.off("add", this.onChanged);
  60181. this.model.off("destroy", this.removeChat);
  60182. this.model.off("change:minimized", this.onChanged);
  60183. this.model.off('change:num_unread', this.updateUnreadMessagesCounter);
  60184. return this;
  60185. },
  60186. initToggle() {
  60187. const storage = _converse.config.get('storage'),
  60188. id = b64_sha1(`converse.minchatstoggle${_converse.bare_jid}`);
  60189. this.toggleview = new _converse.MinimizedChatsToggleView({
  60190. 'model': new _converse.MinimizedChatsToggle({
  60191. 'id': id
  60192. })
  60193. });
  60194. this.toggleview.model.browserStorage = new Backbone.BrowserStorage[storage](id);
  60195. this.toggleview.model.fetch();
  60196. },
  60197. toggle(ev) {
  60198. if (ev && ev.preventDefault) {
  60199. ev.preventDefault();
  60200. }
  60201. this.toggleview.model.save({
  60202. 'collapsed': !this.toggleview.model.get('collapsed')
  60203. });
  60204. u.slideToggleElement(this.el.querySelector('.minimized-chats-flyout'), 200);
  60205. },
  60206. onChanged(item) {
  60207. if (item.get('id') === 'controlbox') {
  60208. // The ControlBox has it's own minimize toggle
  60209. return;
  60210. }
  60211. if (item.get('minimized')) {
  60212. this.addChat(item);
  60213. } else if (this.get(item.get('id'))) {
  60214. this.removeChat(item);
  60215. }
  60216. },
  60217. addChatView(item) {
  60218. const existing = this.get(item.get('id'));
  60219. if (existing && existing.el.parentNode) {
  60220. return;
  60221. }
  60222. const view = new _converse.MinimizedChatBoxView({
  60223. model: item
  60224. });
  60225. this.el.querySelector('.minimized-chats-flyout').insertAdjacentElement('beforeEnd', view.render());
  60226. this.add(item.get('id'), view);
  60227. },
  60228. addMultipleChats(items) {
  60229. _.each(items, this.addChatView.bind(this));
  60230. this.toggleview.model.set({
  60231. 'num_minimized': this.keys().length
  60232. });
  60233. this.render();
  60234. },
  60235. addChat(item) {
  60236. this.addChatView(item);
  60237. this.toggleview.model.set({
  60238. 'num_minimized': this.keys().length
  60239. });
  60240. this.render();
  60241. },
  60242. removeChat(item) {
  60243. this.remove(item.get('id'));
  60244. this.toggleview.model.set({
  60245. 'num_minimized': this.keys().length
  60246. });
  60247. this.render();
  60248. },
  60249. updateUnreadMessagesCounter() {
  60250. const ls = this.model.pluck('num_unread');
  60251. let count = 0,
  60252. i;
  60253. for (i = 0; i < ls.length; i++) {
  60254. count += ls[i];
  60255. }
  60256. this.toggleview.model.save({
  60257. 'num_unread': count
  60258. });
  60259. this.render();
  60260. }
  60261. });
  60262. _converse.MinimizedChatsToggle = Backbone.Model.extend({
  60263. defaults: {
  60264. 'collapsed': false,
  60265. 'num_minimized': 0,
  60266. 'num_unread': 0
  60267. }
  60268. });
  60269. _converse.MinimizedChatsToggleView = Backbone.NativeView.extend({
  60270. el: '#toggle-minimized-chats',
  60271. initialize() {
  60272. this.model.on('change:num_minimized', this.render, this);
  60273. this.model.on('change:num_unread', this.render, this);
  60274. this.flyout = this.el.parentElement.querySelector('.minimized-chats-flyout');
  60275. },
  60276. render() {
  60277. this.el.innerHTML = tpl_toggle_chats(_.extend(this.model.toJSON(), {
  60278. 'Minimized': __('Minimized')
  60279. }));
  60280. if (this.model.get('collapsed')) {
  60281. u.hideElement(this.flyout);
  60282. } else {
  60283. u.showElement(this.flyout);
  60284. }
  60285. return this.el;
  60286. }
  60287. });
  60288. Promise.all([_converse.api.waitUntil('connectionInitialized'), _converse.api.waitUntil('chatBoxViewsInitialized')]).then(() => {
  60289. _converse.minimized_chats = new _converse.MinimizedChats({
  60290. model: _converse.chatboxes
  60291. });
  60292. _converse.emit('minimizedChatsInitialized');
  60293. }).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  60294. _converse.on('registeredGlobalEventHandlers', function () {
  60295. window.addEventListener("resize", _.debounce(function (ev) {
  60296. if (_converse.connection.connected) {
  60297. _converse.chatboxviews.trimChats();
  60298. }
  60299. }, 200));
  60300. });
  60301. _converse.on('controlBoxOpened', function (chatbox) {
  60302. // Wrapped in anon method because at scan time, chatboxviews
  60303. // attr not set yet.
  60304. if (_converse.connection.connected) {
  60305. _converse.chatboxviews.trimChats(chatbox);
  60306. }
  60307. });
  60308. }
  60309. });
  60310. });
  60311. /***/ }),
  60312. /***/ "./src/converse-modal.js":
  60313. /*!*******************************!*\
  60314. !*** ./src/converse-modal.js ***!
  60315. \*******************************/
  60316. /*! no static exports found */
  60317. /***/ (function(module, exports, __webpack_require__) {
  60318. "use strict";
  60319. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  60320. // Converse.js
  60321. // http://conversejs.org
  60322. //
  60323. // Copyright (c) 2018, the Converse.js developers
  60324. // Licensed under the Mozilla Public License (MPLv2)
  60325. (function (root, factory) {
  60326. if (true) {
  60327. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! templates/alert_modal.html */ "./src/templates/alert_modal.html"), __webpack_require__(/*! bootstrap */ "./node_modules/bootstrap.native/dist/bootstrap-native-v4.js"), __webpack_require__(/*! backbone.vdomview */ "./node_modules/backbone.vdomview/backbone.vdomview.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  60328. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  60329. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  60330. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  60331. }
  60332. })(void 0, function (converse, tpl_alert_modal, bootstrap) {
  60333. "use strict";
  60334. const _converse$env = converse.env,
  60335. Strophe = _converse$env.Strophe,
  60336. Backbone = _converse$env.Backbone,
  60337. _ = _converse$env._;
  60338. converse.plugins.add('converse-modal', {
  60339. initialize() {
  60340. const _converse = this._converse;
  60341. _converse.BootstrapModal = Backbone.VDOMView.extend({
  60342. initialize() {
  60343. this.render().insertIntoDOM();
  60344. this.modal = new bootstrap.Modal(this.el, {
  60345. backdrop: 'static',
  60346. keyboard: true
  60347. });
  60348. this.el.addEventListener('hide.bs.modal', event => {
  60349. if (!_.isNil(this.trigger_el)) {
  60350. this.trigger_el.classList.remove('selected');
  60351. }
  60352. }, false);
  60353. },
  60354. insertIntoDOM() {
  60355. const container_el = _converse.chatboxviews.el.querySelector("#converse-modals");
  60356. container_el.insertAdjacentElement('beforeEnd', this.el);
  60357. },
  60358. show(ev) {
  60359. if (ev) {
  60360. ev.preventDefault();
  60361. this.trigger_el = ev.target;
  60362. this.trigger_el.classList.add('selected');
  60363. }
  60364. this.modal.show();
  60365. }
  60366. });
  60367. _converse.Alert = _converse.BootstrapModal.extend({
  60368. initialize() {
  60369. _converse.BootstrapModal.prototype.initialize.apply(this, arguments);
  60370. this.model.on('change', this.render, this);
  60371. },
  60372. toHTML() {
  60373. return tpl_alert_modal(this.model.toJSON());
  60374. }
  60375. });
  60376. _converse.api.listen.on('afterTearDown', () => {
  60377. if (!_converse.chatboxviews) {
  60378. return;
  60379. }
  60380. const container = _converse.chatboxviews.el.querySelector("#converse-modals");
  60381. if (container) {
  60382. container.innerHTML = '';
  60383. }
  60384. });
  60385. /************************ BEGIN API ************************/
  60386. // We extend the default converse.js API to add methods specific to MUC chat rooms.
  60387. let alert;
  60388. _.extend(_converse.api, {
  60389. 'alert': {
  60390. 'show'(type, title, messages) {
  60391. if (_.isString(messages)) {
  60392. messages = [messages];
  60393. }
  60394. if (type === Strophe.LogLevel.ERROR) {
  60395. type = 'alert-danger';
  60396. } else if (type === Strophe.LogLevel.INFO) {
  60397. type = 'alert-info';
  60398. } else if (type === Strophe.LogLevel.WARN) {
  60399. type = 'alert-warning';
  60400. }
  60401. if (_.isUndefined(alert)) {
  60402. const model = new Backbone.Model({
  60403. 'title': title,
  60404. 'messages': messages,
  60405. 'type': type
  60406. });
  60407. alert = new _converse.Alert({
  60408. 'model': model
  60409. });
  60410. } else {
  60411. alert.model.set({
  60412. 'title': title,
  60413. 'messages': messages,
  60414. 'type': type
  60415. });
  60416. }
  60417. alert.show();
  60418. }
  60419. }
  60420. });
  60421. }
  60422. });
  60423. });
  60424. /***/ }),
  60425. /***/ "./src/converse-muc-views.js":
  60426. /*!***********************************!*\
  60427. !*** ./src/converse-muc-views.js ***!
  60428. \***********************************/
  60429. /*! no static exports found */
  60430. /***/ (function(module, exports, __webpack_require__) {
  60431. "use strict";
  60432. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  60433. // Converse.js
  60434. // http://conversejs.org
  60435. //
  60436. // Copyright (c) 2013-2018, the Converse.js developers
  60437. // Licensed under the Mozilla Public License (MPLv2)
  60438. (function (root, factory) {
  60439. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! formdata-polyfill */ "./node_modules/formdata-polyfill/FormData.js"), __webpack_require__(/*! utils/muc */ "./src/utils/muc.js"), __webpack_require__(/*! xss */ "./node_modules/xss/dist/xss.js"), __webpack_require__(/*! templates/add_chatroom_modal.html */ "./src/templates/add_chatroom_modal.html"), __webpack_require__(/*! templates/chatarea.html */ "./src/templates/chatarea.html"), __webpack_require__(/*! templates/chatroom.html */ "./src/templates/chatroom.html"), __webpack_require__(/*! templates/chatroom_details_modal.html */ "./src/templates/chatroom_details_modal.html"), __webpack_require__(/*! templates/chatroom_destroyed.html */ "./src/templates/chatroom_destroyed.html"), __webpack_require__(/*! templates/chatroom_disconnect.html */ "./src/templates/chatroom_disconnect.html"), __webpack_require__(/*! templates/chatroom_features.html */ "./src/templates/chatroom_features.html"), __webpack_require__(/*! templates/chatroom_form.html */ "./src/templates/chatroom_form.html"), __webpack_require__(/*! templates/chatroom_head.html */ "./src/templates/chatroom_head.html"), __webpack_require__(/*! templates/chatroom_invite.html */ "./src/templates/chatroom_invite.html"), __webpack_require__(/*! templates/chatroom_nickname_form.html */ "./src/templates/chatroom_nickname_form.html"), __webpack_require__(/*! templates/chatroom_password_form.html */ "./src/templates/chatroom_password_form.html"), __webpack_require__(/*! templates/chatroom_sidebar.html */ "./src/templates/chatroom_sidebar.html"), __webpack_require__(/*! templates/info.html */ "./src/templates/info.html"), __webpack_require__(/*! templates/list_chatrooms_modal.html */ "./src/templates/list_chatrooms_modal.html"), __webpack_require__(/*! templates/occupant.html */ "./src/templates/occupant.html"), __webpack_require__(/*! templates/room_description.html */ "./src/templates/room_description.html"), __webpack_require__(/*! templates/room_item.html */ "./src/templates/room_item.html"), __webpack_require__(/*! templates/room_panel.html */ "./src/templates/room_panel.html"), __webpack_require__(/*! templates/rooms_results.html */ "./src/templates/rooms_results.html"), __webpack_require__(/*! templates/spinner.html */ "./src/templates/spinner.html"), __webpack_require__(/*! awesomplete */ "./node_modules/awesomplete-avoid-xss/awesomplete.js"), __webpack_require__(/*! converse-modal */ "./src/converse-modal.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  60440. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  60441. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  60442. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  60443. })(void 0, function (converse, _FormData, muc_utils, xss, tpl_add_chatroom_modal, tpl_chatarea, tpl_chatroom, tpl_chatroom_details_modal, tpl_chatroom_destroyed, tpl_chatroom_disconnect, tpl_chatroom_features, tpl_chatroom_form, tpl_chatroom_head, tpl_chatroom_invite, tpl_chatroom_nickname_form, tpl_chatroom_password_form, tpl_chatroom_sidebar, tpl_info, tpl_list_chatrooms_modal, tpl_occupant, tpl_room_description, tpl_room_item, tpl_room_panel, tpl_rooms_results, tpl_spinner, Awesomplete) {
  60444. "use strict";
  60445. const _converse$env = converse.env,
  60446. Backbone = _converse$env.Backbone,
  60447. Promise = _converse$env.Promise,
  60448. Strophe = _converse$env.Strophe,
  60449. b64_sha1 = _converse$env.b64_sha1,
  60450. moment = _converse$env.moment,
  60451. f = _converse$env.f,
  60452. sizzle = _converse$env.sizzle,
  60453. _ = _converse$env._,
  60454. $build = _converse$env.$build,
  60455. $iq = _converse$env.$iq,
  60456. $msg = _converse$env.$msg,
  60457. $pres = _converse$env.$pres;
  60458. const u = converse.env.utils;
  60459. const ROOM_FEATURES_MAP = {
  60460. 'passwordprotected': 'unsecured',
  60461. 'unsecured': 'passwordprotected',
  60462. 'hidden': 'publicroom',
  60463. 'publicroom': 'hidden',
  60464. 'membersonly': 'open',
  60465. 'open': 'membersonly',
  60466. 'persistent': 'temporary',
  60467. 'temporary': 'persistent',
  60468. 'nonanonymous': 'semianonymous',
  60469. 'semianonymous': 'nonanonymous',
  60470. 'moderated': 'unmoderated',
  60471. 'unmoderated': 'moderated'
  60472. };
  60473. converse.plugins.add('converse-muc-views', {
  60474. /* Dependencies are other plugins which might be
  60475. * overridden or relied upon, and therefore need to be loaded before
  60476. * this plugin. They are "optional" because they might not be
  60477. * available, in which case any overrides applicable to them will be
  60478. * ignored.
  60479. *
  60480. * NB: These plugins need to have already been loaded via require.js.
  60481. *
  60482. * It's possible to make these dependencies "non-optional".
  60483. * If the setting "strict_plugin_dependencies" is set to true,
  60484. * an error will be raised if the plugin is not found.
  60485. */
  60486. dependencies: ["converse-autocomplete", "converse-modal", "converse-controlbox", "converse-chatview"],
  60487. overrides: {
  60488. ControlBoxView: {
  60489. renderRoomsPanel() {
  60490. const _converse = this.__super__._converse;
  60491. this.roomspanel = new _converse.RoomsPanel({
  60492. 'model': new (_converse.RoomsPanelModel.extend({
  60493. 'id': b64_sha1(`converse.roomspanel${_converse.bare_jid}`),
  60494. // Required by sessionStorage
  60495. 'browserStorage': new Backbone.BrowserStorage[_converse.config.get('storage')](b64_sha1(`converse.roomspanel${_converse.bare_jid}`))
  60496. }))()
  60497. });
  60498. this.roomspanel.model.fetch();
  60499. this.el.querySelector('.controlbox-pane').insertAdjacentElement('beforeEnd', this.roomspanel.render().el);
  60500. if (!this.roomspanel.model.get('nick')) {
  60501. this.roomspanel.model.save({
  60502. nick: _converse.xmppstatus.vcard.get('nickname') || Strophe.getNodeFromJid(_converse.bare_jid)
  60503. });
  60504. }
  60505. _converse.emit('roomsPanelRendered');
  60506. },
  60507. renderControlBoxPane() {
  60508. const _converse = this.__super__._converse;
  60509. this.__super__.renderControlBoxPane.apply(this, arguments);
  60510. if (_converse.allow_muc) {
  60511. this.renderRoomsPanel();
  60512. }
  60513. }
  60514. }
  60515. },
  60516. initialize() {
  60517. const _converse = this._converse,
  60518. __ = _converse.__;
  60519. _converse.api.promises.add(['roomsPanelRendered']); // Configuration values for this plugin
  60520. // ====================================
  60521. // Refer to docs/source/configuration.rst for explanations of these
  60522. // configuration settings.
  60523. _converse.api.settings.update({
  60524. 'auto_list_rooms': false,
  60525. 'hide_muc_server': false,
  60526. // TODO: no longer implemented...
  60527. 'muc_disable_moderator_commands': false,
  60528. 'visible_toolbar_buttons': {
  60529. 'toggle_occupants': true
  60530. }
  60531. });
  60532. function ___(str) {
  60533. /* This is part of a hack to get gettext to scan strings to be
  60534. * translated. Strings we cannot send to the function above because
  60535. * they require variable interpolation and we don't yet have the
  60536. * variables at scan time.
  60537. *
  60538. * See actionInfoMessages further below.
  60539. */
  60540. return str;
  60541. }
  60542. /* http://xmpp.org/extensions/xep-0045.html
  60543. * ----------------------------------------
  60544. * 100 message Entering a groupchat Inform user that any occupant is allowed to see the user's full JID
  60545. * 101 message (out of band) Affiliation change Inform user that his or her affiliation changed while not in the groupchat
  60546. * 102 message Configuration change Inform occupants that groupchat now shows unavailable members
  60547. * 103 message Configuration change Inform occupants that groupchat now does not show unavailable members
  60548. * 104 message Configuration change Inform occupants that a non-privacy-related groupchat configuration change has occurred
  60549. * 110 presence Any groupchat presence Inform user that presence refers to one of its own groupchat occupants
  60550. * 170 message or initial presence Configuration change Inform occupants that groupchat logging is now enabled
  60551. * 171 message Configuration change Inform occupants that groupchat logging is now disabled
  60552. * 172 message Configuration change Inform occupants that the groupchat is now non-anonymous
  60553. * 173 message Configuration change Inform occupants that the groupchat is now semi-anonymous
  60554. * 174 message Configuration change Inform occupants that the groupchat is now fully-anonymous
  60555. * 201 presence Entering a groupchat Inform user that a new groupchat has been created
  60556. * 210 presence Entering a groupchat Inform user that the service has assigned or modified the occupant's roomnick
  60557. * 301 presence Removal from groupchat Inform user that he or she has been banned from the groupchat
  60558. * 303 presence Exiting a groupchat Inform all occupants of new groupchat nickname
  60559. * 307 presence Removal from groupchat Inform user that he or she has been kicked from the groupchat
  60560. * 321 presence Removal from groupchat Inform user that he or she is being removed from the groupchat because of an affiliation change
  60561. * 322 presence Removal from groupchat Inform user that he or she is being removed from the groupchat because the groupchat has been changed to members-only and the user is not a member
  60562. * 332 presence Removal from groupchat Inform user that he or she is being removed from the groupchat because of a system shutdown
  60563. */
  60564. _converse.muc = {
  60565. info_messages: {
  60566. 100: __('This groupchat is not anonymous'),
  60567. 102: __('This groupchat now shows unavailable members'),
  60568. 103: __('This groupchat does not show unavailable members'),
  60569. 104: __('The groupchat configuration has changed'),
  60570. 170: __('groupchat logging is now enabled'),
  60571. 171: __('groupchat logging is now disabled'),
  60572. 172: __('This groupchat is now no longer anonymous'),
  60573. 173: __('This groupchat is now semi-anonymous'),
  60574. 174: __('This groupchat is now fully-anonymous'),
  60575. 201: __('A new groupchat has been created')
  60576. },
  60577. disconnect_messages: {
  60578. 301: __('You have been banned from this groupchat'),
  60579. 307: __('You have been kicked from this groupchat'),
  60580. 321: __("You have been removed from this groupchat because of an affiliation change"),
  60581. 322: __("You have been removed from this groupchat because the groupchat has changed to members-only and you're not a member"),
  60582. 332: __("You have been removed from this groupchat because the service hosting it is being shut down")
  60583. },
  60584. action_info_messages: {
  60585. /* XXX: Note the triple underscore function and not double
  60586. * underscore.
  60587. *
  60588. * This is a hack. We can't pass the strings to __ because we
  60589. * don't yet know what the variable to interpolate is.
  60590. *
  60591. * Triple underscore will just return the string again, but we
  60592. * can then at least tell gettext to scan for it so that these
  60593. * strings are picked up by the translation machinery.
  60594. */
  60595. 301: ___("%1$s has been banned"),
  60596. 303: ___("%1$s's nickname has changed"),
  60597. 307: ___("%1$s has been kicked out"),
  60598. 321: ___("%1$s has been removed because of an affiliation change"),
  60599. 322: ___("%1$s has been removed for not being a member")
  60600. },
  60601. new_nickname_messages: {
  60602. 210: ___('Your nickname has been automatically set to %1$s'),
  60603. 303: ___('Your nickname has been changed to %1$s')
  60604. }
  60605. };
  60606. function insertRoomInfo(el, stanza) {
  60607. /* Insert groupchat info (based on returned #disco IQ stanza)
  60608. *
  60609. * Parameters:
  60610. * (HTMLElement) el: The HTML DOM element that should
  60611. * contain the info.
  60612. * (XMLElement) stanza: The IQ stanza containing the groupchat
  60613. * info.
  60614. */
  60615. // All MUC features found here: http://xmpp.org/registrar/disco-features.html
  60616. el.querySelector('span.spinner').remove();
  60617. el.querySelector('a.room-info').classList.add('selected');
  60618. el.insertAdjacentHTML('beforeEnd', tpl_room_description({
  60619. 'jid': stanza.getAttribute('from'),
  60620. 'desc': _.get(_.head(sizzle('field[var="muc#roominfo_description"] value', stanza)), 'textContent'),
  60621. 'occ': _.get(_.head(sizzle('field[var="muc#roominfo_occupants"] value', stanza)), 'textContent'),
  60622. 'hidden': sizzle('feature[var="muc_hidden"]', stanza).length,
  60623. 'membersonly': sizzle('feature[var="muc_membersonly"]', stanza).length,
  60624. 'moderated': sizzle('feature[var="muc_moderated"]', stanza).length,
  60625. 'nonanonymous': sizzle('feature[var="muc_nonanonymous"]', stanza).length,
  60626. 'open': sizzle('feature[var="muc_open"]', stanza).length,
  60627. 'passwordprotected': sizzle('feature[var="muc_passwordprotected"]', stanza).length,
  60628. 'persistent': sizzle('feature[var="muc_persistent"]', stanza).length,
  60629. 'publicroom': sizzle('feature[var="muc_publicroom"]', stanza).length,
  60630. 'semianonymous': sizzle('feature[var="muc_semianonymous"]', stanza).length,
  60631. 'temporary': sizzle('feature[var="muc_temporary"]', stanza).length,
  60632. 'unmoderated': sizzle('feature[var="muc_unmoderated"]', stanza).length,
  60633. 'label_desc': __('Description:'),
  60634. 'label_jid': __('Groupchat Address (JID):'),
  60635. 'label_occ': __('Participants:'),
  60636. 'label_features': __('Features:'),
  60637. 'label_requires_auth': __('Requires authentication'),
  60638. 'label_hidden': __('Hidden'),
  60639. 'label_requires_invite': __('Requires an invitation'),
  60640. 'label_moderated': __('Moderated'),
  60641. 'label_non_anon': __('Non-anonymous'),
  60642. 'label_open_room': __('Open'),
  60643. 'label_permanent_room': __('Permanent'),
  60644. 'label_public': __('Public'),
  60645. 'label_semi_anon': __('Semi-anonymous'),
  60646. 'label_temp_room': __('Temporary'),
  60647. 'label_unmoderated': __('Unmoderated')
  60648. }));
  60649. }
  60650. function toggleRoomInfo(ev) {
  60651. /* Show/hide extra information about a groupchat in a listing. */
  60652. const parent_el = u.ancestor(ev.target, '.room-item'),
  60653. div_el = parent_el.querySelector('div.room-info');
  60654. if (div_el) {
  60655. u.slideIn(div_el).then(u.removeElement);
  60656. parent_el.querySelector('a.room-info').classList.remove('selected');
  60657. } else {
  60658. parent_el.insertAdjacentHTML('beforeend', tpl_spinner());
  60659. _converse.api.disco.info(ev.target.getAttribute('data-room-jid'), null).then(stanza => insertRoomInfo(parent_el, stanza)).catch(_.partial(_converse.log, _, Strophe.LogLevel.ERROR));
  60660. }
  60661. }
  60662. _converse.ListChatRoomsModal = _converse.BootstrapModal.extend({
  60663. events: {
  60664. 'submit form': 'showRooms',
  60665. 'click a.room-info': 'toggleRoomInfo',
  60666. 'change input[name=nick]': 'setNick',
  60667. 'change input[name=server]': 'setDomain',
  60668. 'click .open-room': 'openRoom'
  60669. },
  60670. initialize() {
  60671. _converse.BootstrapModal.prototype.initialize.apply(this, arguments);
  60672. this.model.on('change:muc_domain', this.onDomainChange, this);
  60673. },
  60674. toHTML() {
  60675. return tpl_list_chatrooms_modal(_.extend(this.model.toJSON(), {
  60676. 'heading_list_chatrooms': __('Query for Groupchats'),
  60677. 'label_server_address': __('Server address'),
  60678. 'label_query': __('Show groupchats'),
  60679. 'server_placeholder': __('conference.example.org')
  60680. }));
  60681. },
  60682. afterRender() {
  60683. this.el.addEventListener('shown.bs.modal', () => {
  60684. this.el.querySelector('input[name="server"]').focus();
  60685. }, false);
  60686. },
  60687. openRoom(ev) {
  60688. ev.preventDefault();
  60689. const jid = ev.target.getAttribute('data-room-jid');
  60690. const name = ev.target.getAttribute('data-room-name');
  60691. this.modal.hide();
  60692. _converse.api.rooms.open(jid, {
  60693. 'name': name
  60694. });
  60695. },
  60696. toggleRoomInfo(ev) {
  60697. ev.preventDefault();
  60698. toggleRoomInfo(ev);
  60699. },
  60700. onDomainChange(model) {
  60701. if (_converse.auto_list_rooms) {
  60702. this.updateRoomsList();
  60703. }
  60704. },
  60705. roomStanzaItemToHTMLElement(groupchat) {
  60706. const name = Strophe.unescapeNode(groupchat.getAttribute('name') || groupchat.getAttribute('jid'));
  60707. const div = document.createElement('div');
  60708. div.innerHTML = tpl_room_item({
  60709. 'name': Strophe.xmlunescape(name),
  60710. 'jid': groupchat.getAttribute('jid'),
  60711. 'open_title': __('Click to open this groupchat'),
  60712. 'info_title': __('Show more information on this groupchat')
  60713. });
  60714. return div.firstElementChild;
  60715. },
  60716. removeSpinner() {
  60717. _.each(this.el.querySelectorAll('span.spinner'), el => el.parentNode.removeChild(el));
  60718. },
  60719. informNoRoomsFound() {
  60720. const chatrooms_el = this.el.querySelector('.available-chatrooms');
  60721. chatrooms_el.innerHTML = tpl_rooms_results({
  60722. 'feedback_text': __('No groupchats found')
  60723. });
  60724. const input_el = this.el.querySelector('input[name="server"]');
  60725. input_el.classList.remove('hidden');
  60726. this.removeSpinner();
  60727. },
  60728. onRoomsFound(iq) {
  60729. /* Handle the IQ stanza returned from the server, containing
  60730. * all its public groupchats.
  60731. */
  60732. const available_chatrooms = this.el.querySelector('.available-chatrooms');
  60733. this.rooms = iq.querySelectorAll('query item');
  60734. if (this.rooms.length) {
  60735. // For translators: %1$s is a variable and will be
  60736. // replaced with the XMPP server name
  60737. available_chatrooms.innerHTML = tpl_rooms_results({
  60738. 'feedback_text': __('Groupchats found:')
  60739. });
  60740. const fragment = document.createDocumentFragment();
  60741. const children = _.reject(_.map(this.rooms, this.roomStanzaItemToHTMLElement), _.isNil);
  60742. _.each(children, child => fragment.appendChild(child));
  60743. available_chatrooms.appendChild(fragment);
  60744. this.removeSpinner();
  60745. } else {
  60746. this.informNoRoomsFound();
  60747. }
  60748. return true;
  60749. },
  60750. updateRoomsList() {
  60751. /* Send an IQ stanza to the server asking for all groupchats
  60752. */
  60753. _converse.connection.sendIQ($iq({
  60754. 'to': this.model.get('muc_domain'),
  60755. 'from': _converse.connection.jid,
  60756. 'type': "get"
  60757. }).c("query", {
  60758. xmlns: Strophe.NS.DISCO_ITEMS
  60759. }), this.onRoomsFound.bind(this), this.informNoRoomsFound.bind(this), 5000);
  60760. },
  60761. showRooms(ev) {
  60762. ev.preventDefault();
  60763. const data = new FormData(ev.target);
  60764. this.model.save('muc_domain', Strophe.getDomainFromJid(data.get('server')));
  60765. this.updateRoomsList();
  60766. },
  60767. setDomain(ev) {
  60768. this.model.save('muc_domain', Strophe.getDomainFromJid(ev.target.value));
  60769. },
  60770. setNick(ev) {
  60771. this.model.save({
  60772. nick: ev.target.value
  60773. });
  60774. }
  60775. });
  60776. _converse.AddChatRoomModal = _converse.BootstrapModal.extend({
  60777. events: {
  60778. 'submit form.add-chatroom': 'openChatRoom'
  60779. },
  60780. toHTML() {
  60781. return tpl_add_chatroom_modal(_.extend(this.model.toJSON(), {
  60782. 'heading_new_chatroom': __('Enter a new Groupchat'),
  60783. 'label_room_address': __('Groupchat address'),
  60784. 'label_nickname': __('Optional nickname'),
  60785. 'chatroom_placeholder': __('name@conference.example.org'),
  60786. 'label_join': __('Join')
  60787. }));
  60788. },
  60789. afterRender() {
  60790. this.el.addEventListener('shown.bs.modal', () => {
  60791. this.el.querySelector('input[name="chatroom"]').focus();
  60792. }, false);
  60793. },
  60794. parseRoomDataFromEvent(form) {
  60795. const data = new FormData(form);
  60796. const jid = data.get('chatroom');
  60797. this.model.save('muc_domain', Strophe.getDomainFromJid(jid));
  60798. return {
  60799. 'jid': jid,
  60800. 'nick': data.get('nickname')
  60801. };
  60802. },
  60803. openChatRoom(ev) {
  60804. ev.preventDefault();
  60805. const data = this.parseRoomDataFromEvent(ev.target);
  60806. if (data.nick === "") {
  60807. // Make sure defaults apply if no nick is provided.
  60808. data.nick = undefined;
  60809. }
  60810. _converse.api.rooms.open(data.jid, data);
  60811. this.modal.hide();
  60812. ev.target.reset();
  60813. }
  60814. });
  60815. _converse.RoomDetailsModal = _converse.BootstrapModal.extend({
  60816. initialize() {
  60817. _converse.BootstrapModal.prototype.initialize.apply(this, arguments);
  60818. this.model.on('change', this.render, this);
  60819. this.model.occupants.on('change', this.render, this);
  60820. },
  60821. toHTML() {
  60822. return tpl_chatroom_details_modal(_.extend(this.model.toJSON(), {
  60823. '_': _,
  60824. '__': __,
  60825. 'topic': u.addHyperlinks(xss.filterXSS(_.get(this.model.get('subject'), 'text'), {
  60826. 'whiteList': {}
  60827. })),
  60828. 'display_name': __('Groupchat info for %1$s', this.model.getDisplayName()),
  60829. 'num_occupants': this.model.occupants.length
  60830. }));
  60831. }
  60832. });
  60833. _converse.ChatRoomView = _converse.ChatBoxView.extend({
  60834. /* Backbone.NativeView which renders a groupchat, based upon the view
  60835. * for normal one-on-one chat boxes.
  60836. */
  60837. length: 300,
  60838. tagName: 'div',
  60839. className: 'chatbox chatroom hidden',
  60840. is_chatroom: true,
  60841. events: {
  60842. 'change input.fileupload': 'onFileSelection',
  60843. 'click .chat-msg__action-edit': 'onMessageEditButtonClicked',
  60844. 'click .chatbox-navback': 'showControlBox',
  60845. 'click .close-chatbox-button': 'close',
  60846. 'click .configure-chatroom-button': 'getAndRenderConfigurationForm',
  60847. 'click .hide-occupants': 'hideOccupants',
  60848. 'click .new-msgs-indicator': 'viewUnreadMessages',
  60849. 'click .occupant-nick': 'onOccupantClicked',
  60850. 'click a.open-chatroom': 'openChatRoomFromURIClicked',
  60851. 'click .send-button': 'onFormSubmitted',
  60852. 'click .show-room-details-modal': 'showRoomDetailsModal',
  60853. 'click .toggle-call': 'toggleCall',
  60854. 'click .toggle-occupants': 'toggleOccupants',
  60855. 'click .toggle-smiley ul.emoji-picker li': 'insertEmoji',
  60856. 'click .toggle-smiley': 'toggleEmojiMenu',
  60857. 'click .upload-file': 'toggleFileUpload',
  60858. 'keydown .chat-textarea': 'keyPressed',
  60859. 'keyup .chat-textarea': 'keyUp',
  60860. 'input .chat-textarea': 'inputChanged'
  60861. },
  60862. initialize() {
  60863. this.initDebounced();
  60864. this.model.messages.on('add', this.onMessageAdded, this);
  60865. this.model.messages.on('rendered', this.scrollDown, this);
  60866. this.model.on('change:affiliation', this.renderHeading, this);
  60867. this.model.on('change:connection_status', this.afterConnected, this);
  60868. this.model.on('change:jid', this.renderHeading, this);
  60869. this.model.on('change:name', this.renderHeading, this);
  60870. this.model.on('change:subject', this.renderHeading, this);
  60871. this.model.on('change:subject', this.setChatRoomSubject, this);
  60872. this.model.on('configurationNeeded', this.getAndRenderConfigurationForm, this);
  60873. this.model.on('destroy', this.hide, this);
  60874. this.model.on('show', this.show, this);
  60875. this.model.occupants.on('add', this.onOccupantAdded, this);
  60876. this.model.occupants.on('remove', this.onOccupantRemoved, this);
  60877. this.model.occupants.on('change:show', this.showJoinOrLeaveNotification, this);
  60878. this.model.occupants.on('change:role', this.informOfOccupantsRoleChange, this);
  60879. this.model.occupants.on('change:affiliation', this.informOfOccupantsAffiliationChange, this);
  60880. this.createEmojiPicker();
  60881. this.createOccupantsView();
  60882. this.render().insertIntoDOM();
  60883. this.registerHandlers();
  60884. this.enterRoom();
  60885. },
  60886. enterRoom(ev) {
  60887. if (ev) {
  60888. ev.preventDefault();
  60889. }
  60890. if (this.model.get('connection_status') !== converse.ROOMSTATUS.ENTERED) {
  60891. const handler = () => {
  60892. if (!u.isPersistableModel(this.model)) {
  60893. // Happens during tests, nothing to do if this
  60894. // is a hanging chatbox (i.e. not in the collection anymore).
  60895. return;
  60896. }
  60897. this.populateAndJoin();
  60898. _converse.emit('chatRoomOpened', this);
  60899. };
  60900. this.model.getRoomFeatures().then(handler, handler);
  60901. } else {
  60902. this.fetchMessages();
  60903. _converse.emit('chatRoomOpened', this);
  60904. }
  60905. },
  60906. render() {
  60907. this.el.setAttribute('id', this.model.get('box_id'));
  60908. this.el.innerHTML = tpl_chatroom();
  60909. this.renderHeading();
  60910. this.renderChatArea();
  60911. this.renderMessageForm();
  60912. this.initAutoComplete();
  60913. if (this.model.get('connection_status') !== converse.ROOMSTATUS.ENTERED) {
  60914. this.showSpinner();
  60915. }
  60916. return this;
  60917. },
  60918. renderHeading() {
  60919. /* Render the heading UI of the groupchat. */
  60920. this.el.querySelector('.chat-head-chatroom').innerHTML = this.generateHeadingHTML();
  60921. },
  60922. renderChatArea() {
  60923. /* Render the UI container in which groupchat messages will appear.
  60924. */
  60925. if (_.isNull(this.el.querySelector('.chat-area'))) {
  60926. const container_el = this.el.querySelector('.chatroom-body');
  60927. container_el.insertAdjacentHTML('beforeend', tpl_chatarea({
  60928. 'show_send_button': _converse.show_send_button
  60929. }));
  60930. container_el.insertAdjacentElement('beforeend', this.occupantsview.el);
  60931. this.content = this.el.querySelector('.chat-content');
  60932. this.toggleOccupants(null, true);
  60933. }
  60934. return this;
  60935. },
  60936. initAutoComplete() {
  60937. this.auto_complete = new _converse.AutoComplete(this.el, {
  60938. 'auto_first': true,
  60939. 'auto_evaluate': false,
  60940. 'min_chars': 1,
  60941. 'match_current_word': true,
  60942. 'match_on_tab': true,
  60943. 'list': () => this.model.occupants.map(o => ({
  60944. 'label': o.getDisplayName(),
  60945. 'value': `@${o.getDisplayName()}`
  60946. })),
  60947. 'filter': _converse.FILTER_STARTSWITH,
  60948. 'trigger_on_at': true
  60949. });
  60950. this.auto_complete.on('suggestion-box-selectcomplete', () => this.auto_completing = false);
  60951. },
  60952. keyPressed(ev) {
  60953. if (this.auto_complete.keyPressed(ev)) {
  60954. return;
  60955. }
  60956. return _converse.ChatBoxView.prototype.keyPressed.apply(this, arguments);
  60957. },
  60958. keyUp(ev) {
  60959. this.auto_complete.evaluate(ev);
  60960. },
  60961. showRoomDetailsModal(ev) {
  60962. ev.preventDefault();
  60963. if (_.isUndefined(this.model.room_details_modal)) {
  60964. this.model.room_details_modal = new _converse.RoomDetailsModal({
  60965. 'model': this.model
  60966. });
  60967. }
  60968. this.model.room_details_modal.show(ev);
  60969. },
  60970. showChatStateNotification(message) {
  60971. if (message.get('sender') === 'me') {
  60972. return;
  60973. }
  60974. return _converse.ChatBoxView.prototype.showChatStateNotification.apply(this, arguments);
  60975. },
  60976. createOccupantsView() {
  60977. /* Create the ChatRoomOccupantsView Backbone.NativeView
  60978. */
  60979. this.model.occupants.chatroomview = this;
  60980. this.occupantsview = new _converse.ChatRoomOccupantsView({
  60981. 'model': this.model.occupants
  60982. });
  60983. return this;
  60984. },
  60985. informOfOccupantsAffiliationChange(occupant, changed) {
  60986. const previous_affiliation = occupant._previousAttributes.affiliation,
  60987. current_affiliation = occupant.get('affiliation');
  60988. if (previous_affiliation === 'admin') {
  60989. this.showChatEvent(__("%1$s is no longer an admin of this groupchat", occupant.get('nick')));
  60990. } else if (previous_affiliation === 'owner') {
  60991. this.showChatEvent(__("%1$s is no longer an owner of this groupchat", occupant.get('nick')));
  60992. } else if (previous_affiliation === 'outcast') {
  60993. this.showChatEvent(__("%1$s is no longer banned from this groupchat", occupant.get('nick')));
  60994. }
  60995. if (current_affiliation === 'none' && previous_affiliation === 'member') {
  60996. this.showChatEvent(__("%1$s is no longer a permanent member of this groupchat", occupant.get('nick')));
  60997. }
  60998. if (current_affiliation === 'member') {
  60999. this.showChatEvent(__("%1$s is now a permanent member of this groupchat", occupant.get('nick')));
  61000. } else if (current_affiliation === 'outcast') {
  61001. this.showChatEvent(__("%1$s has been banned from this groupchat", occupant.get('nick')));
  61002. } else if (current_affiliation === 'admin' || current_affiliation == 'owner') {
  61003. this.showChatEvent(__(`%1$s is now an ${current_affiliation} of this groupchat`, occupant.get('nick')));
  61004. }
  61005. },
  61006. informOfOccupantsRoleChange(occupant, changed) {
  61007. const previous_role = occupant._previousAttributes.role;
  61008. if (previous_role === 'moderator') {
  61009. this.showChatEvent(__("%1$s is no longer a moderator", occupant.get('nick')));
  61010. }
  61011. if (previous_role === 'visitor') {
  61012. this.showChatEvent(__("%1$s has been given a voice again", occupant.get('nick')));
  61013. }
  61014. if (occupant.get('role') === 'visitor') {
  61015. this.showChatEvent(__("%1$s has been muted", occupant.get('nick')));
  61016. }
  61017. if (occupant.get('role') === 'moderator') {
  61018. this.showChatEvent(__("%1$s is now a moderator", occupant.get('nick')));
  61019. }
  61020. },
  61021. generateHeadingHTML() {
  61022. /* Returns the heading HTML to be rendered.
  61023. */
  61024. return tpl_chatroom_head(_.extend(this.model.toJSON(), {
  61025. 'Strophe': Strophe,
  61026. 'info_close': __('Close and leave this groupchat'),
  61027. 'info_configure': __('Configure this groupchat'),
  61028. 'info_details': __('Show more details about this groupchat'),
  61029. 'description': u.addHyperlinks(xss.filterXSS(_.get(this.model.get('subject'), 'text'), {
  61030. 'whiteList': {}
  61031. }))
  61032. }));
  61033. },
  61034. afterShown() {
  61035. /* Override from converse-chatview, specifically to avoid
  61036. * the 'active' chat state from being sent out prematurely.
  61037. *
  61038. * This is instead done in `afterConnected` below.
  61039. */
  61040. if (u.isPersistableModel(this.model)) {
  61041. this.model.clearUnreadMsgCounter();
  61042. this.model.save();
  61043. }
  61044. this.occupantsview.setOccupantsHeight();
  61045. this.scrollDown();
  61046. this.renderEmojiPicker();
  61047. },
  61048. show() {
  61049. if (u.isVisible(this.el)) {
  61050. this.focus();
  61051. return;
  61052. } // Override from converse-chatview in order to not use
  61053. // "fadeIn", which causes flashing.
  61054. u.showElement(this.el);
  61055. this.afterShown();
  61056. },
  61057. afterConnected() {
  61058. if (this.model.get('connection_status') === converse.ROOMSTATUS.ENTERED) {
  61059. this.hideSpinner();
  61060. this.setChatState(_converse.ACTIVE);
  61061. this.scrollDown();
  61062. this.focus();
  61063. }
  61064. },
  61065. getToolbarOptions() {
  61066. return _.extend(_converse.ChatBoxView.prototype.getToolbarOptions.apply(this, arguments), {
  61067. 'label_hide_occupants': __('Hide the list of participants'),
  61068. 'show_occupants_toggle': this.is_chatroom && _converse.visible_toolbar_buttons.toggle_occupants
  61069. });
  61070. },
  61071. close(ev) {
  61072. /* Close this chat box, which implies leaving the groupchat as
  61073. * well.
  61074. */
  61075. this.hide();
  61076. if (Backbone.history.getFragment() === "converse/room?jid=" + this.model.get('jid')) {
  61077. _converse.router.navigate('');
  61078. }
  61079. this.model.leave();
  61080. _converse.ChatBoxView.prototype.close.apply(this, arguments);
  61081. },
  61082. setOccupantsVisibility() {
  61083. const icon_el = this.el.querySelector('.toggle-occupants');
  61084. if (this.model.get('hidden_occupants')) {
  61085. u.removeClass('fa-angle-double-right', icon_el);
  61086. u.addClass('fa-angle-double-left', icon_el);
  61087. u.addClass('full', this.el.querySelector('.chat-area'));
  61088. u.hideElement(this.el.querySelector('.occupants'));
  61089. } else {
  61090. u.addClass('fa-angle-double-right', icon_el);
  61091. u.removeClass('fa-angle-double-left', icon_el);
  61092. u.removeClass('full', this.el.querySelector('.chat-area'));
  61093. u.removeClass('hidden', this.el.querySelector('.occupants'));
  61094. }
  61095. this.occupantsview.setOccupantsHeight();
  61096. },
  61097. hideOccupants(ev, preserve_state) {
  61098. /* Show or hide the right sidebar containing the chat
  61099. * occupants (and the invite widget).
  61100. */
  61101. if (ev) {
  61102. ev.preventDefault();
  61103. ev.stopPropagation();
  61104. }
  61105. this.model.save({
  61106. 'hidden_occupants': true
  61107. });
  61108. this.setOccupantsVisibility();
  61109. this.scrollDown();
  61110. },
  61111. toggleOccupants(ev, preserve_state) {
  61112. /* Show or hide the right sidebar containing the chat
  61113. * occupants (and the invite widget).
  61114. */
  61115. if (ev) {
  61116. ev.preventDefault();
  61117. ev.stopPropagation();
  61118. }
  61119. if (!preserve_state) {
  61120. this.model.set({
  61121. 'hidden_occupants': !this.model.get('hidden_occupants')
  61122. });
  61123. }
  61124. this.setOccupantsVisibility();
  61125. this.scrollDown();
  61126. },
  61127. onOccupantClicked(ev) {
  61128. /* When an occupant is clicked, insert their nickname into
  61129. * the chat textarea input.
  61130. */
  61131. this.insertIntoTextArea(ev.target.textContent);
  61132. },
  61133. openChatRoomFromURIClicked(ev) {
  61134. ev.preventDefault();
  61135. _converse.api.rooms.open(ev.target.href);
  61136. },
  61137. handleChatStateNotification(message) {
  61138. /* Override the method on the ChatBoxView base class to
  61139. * ignore <gone/> notifications in groupchats.
  61140. *
  61141. * As laid out in the business rules in XEP-0085
  61142. * http://xmpp.org/extensions/xep-0085.html#bizrules-groupchat
  61143. */
  61144. if (message.get('fullname') === this.model.get('nick')) {
  61145. // Don't know about other servers, but OpenFire sends
  61146. // back to you your own chat state notifications.
  61147. // We ignore them here...
  61148. return;
  61149. }
  61150. if (message.get('chat_state') !== _converse.GONE) {
  61151. _converse.ChatBoxView.prototype.handleChatStateNotification.apply(this, arguments);
  61152. }
  61153. },
  61154. modifyRole(groupchat, nick, role, reason, onSuccess, onError) {
  61155. const item = $build("item", {
  61156. nick,
  61157. role
  61158. });
  61159. const iq = $iq({
  61160. to: groupchat,
  61161. type: "set"
  61162. }).c("query", {
  61163. xmlns: Strophe.NS.MUC_ADMIN
  61164. }).cnode(item.node);
  61165. if (reason !== null) {
  61166. iq.c("reason", reason);
  61167. }
  61168. return _converse.connection.sendIQ(iq, onSuccess, onError);
  61169. },
  61170. verifyRoles(roles) {
  61171. const me = this.model.occupants.findWhere({
  61172. 'jid': _converse.bare_jid
  61173. });
  61174. if (!_.includes(roles, me.get('role'))) {
  61175. this.showErrorMessage(__(`Forbidden: you do not have the necessary role in order to do that.`));
  61176. return false;
  61177. }
  61178. return true;
  61179. },
  61180. verifyAffiliations(affiliations) {
  61181. const me = this.model.occupants.findWhere({
  61182. 'jid': _converse.bare_jid
  61183. });
  61184. if (!_.includes(affiliations, me.get('affiliation'))) {
  61185. this.showErrorMessage(__(`Forbidden: you do not have the necessary affiliation in order to do that.`));
  61186. return false;
  61187. }
  61188. return true;
  61189. },
  61190. validateRoleChangeCommand(command, args) {
  61191. /* Check that a command to change a groupchat user's role or
  61192. * affiliation has anough arguments.
  61193. */
  61194. if (args.length < 1 || args.length > 2) {
  61195. this.showErrorMessage(__('Error: the "%1$s" command takes two arguments, the user\'s nickname and optionally a reason.', command));
  61196. return false;
  61197. }
  61198. if (!this.model.occupants.findWhere({
  61199. 'nick': args[0]
  61200. }) && !this.model.occupants.findWhere({
  61201. 'jid': args[0]
  61202. })) {
  61203. this.showErrorMessage(__('Error: couldn\'t find a groupchat participant "%1$s"', args[0]));
  61204. return false;
  61205. }
  61206. return true;
  61207. },
  61208. onCommandError(err) {
  61209. _converse.log(err, Strophe.LogLevel.FATAL);
  61210. this.showErrorMessage(__("Sorry, an error happened while running the command. Check your browser's developer console for details."));
  61211. },
  61212. parseMessageForCommands(text) {
  61213. if (_converse.ChatBoxView.prototype.parseMessageForCommands.apply(this, arguments)) {
  61214. return true;
  61215. }
  61216. if (_converse.muc_disable_moderator_commands) {
  61217. return false;
  61218. }
  61219. const match = text.replace(/^\s*/, "").match(/^\/(.*?)(?: (.*))?$/) || [false, '', ''],
  61220. args = match[2] && match[2].splitOnce(' ').filter(s => s) || [],
  61221. command = match[1].toLowerCase();
  61222. switch (command) {
  61223. case 'admin':
  61224. if (!this.verifyAffiliations(['owner']) || !this.validateRoleChangeCommand(command, args)) {
  61225. break;
  61226. }
  61227. this.model.setAffiliation('admin', [{
  61228. 'jid': args[0],
  61229. 'reason': args[1]
  61230. }]).then(() => this.model.occupants.fetchMembers(), err => this.onCommandError(err));
  61231. break;
  61232. case 'ban':
  61233. if (!this.verifyAffiliations(['owner', 'admin']) || !this.validateRoleChangeCommand(command, args)) {
  61234. break;
  61235. }
  61236. this.model.setAffiliation('outcast', [{
  61237. 'jid': args[0],
  61238. 'reason': args[1]
  61239. }]).then(() => this.model.occupants.fetchMembers(), err => this.onCommandError(err));
  61240. break;
  61241. case 'deop':
  61242. if (!this.verifyAffiliations(['admin', 'owner']) || !this.validateRoleChangeCommand(command, args)) {
  61243. break;
  61244. }
  61245. this.modifyRole(this.model.get('jid'), args[0], 'participant', args[1], undefined, this.onCommandError.bind(this));
  61246. break;
  61247. case 'help':
  61248. this.showHelpMessages([`<strong>/admin</strong>: ${__("Change user's affiliation to admin")}`, `<strong>/ban</strong>: ${__('Ban user from groupchat')}`, `<strong>/clear</strong>: ${__('Remove messages')}`, `<strong>/deop</strong>: ${__('Change user role to participant')}`, `<strong>/help</strong>: ${__('Show this menu')}`, `<strong>/kick</strong>: ${__('Kick user from groupchat')}`, `<strong>/me</strong>: ${__('Write in 3rd person')}`, `<strong>/member</strong>: ${__('Grant membership to a user')}`, `<strong>/mute</strong>: ${__("Remove user's ability to post messages")}`, `<strong>/nick</strong>: ${__('Change your nickname')}`, `<strong>/op</strong>: ${__('Grant moderator role to user')}`, `<strong>/owner</strong>: ${__('Grant ownership of this groupchat')}`, `<strong>/register</strong>: ${__("Register a nickname for this room")}`, `<strong>/revoke</strong>: ${__("Revoke user's membership")}`, `<strong>/subject</strong>: ${__('Set groupchat subject')}`, `<strong>/topic</strong>: ${__('Set groupchat subject (alias for /subject)')}`, `<strong>/voice</strong>: ${__('Allow muted user to post messages')}`]);
  61249. break;
  61250. case 'kick':
  61251. if (!this.verifyRoles(['moderator']) || !this.validateRoleChangeCommand(command, args)) {
  61252. break;
  61253. }
  61254. this.modifyRole(this.model.get('jid'), args[0], 'none', args[1], undefined, this.onCommandError.bind(this));
  61255. break;
  61256. case 'mute':
  61257. if (!this.verifyRoles(['moderator']) || !this.validateRoleChangeCommand(command, args)) {
  61258. break;
  61259. }
  61260. this.modifyRole(this.model.get('jid'), args[0], 'visitor', args[1], undefined, this.onCommandError.bind(this));
  61261. break;
  61262. case 'member':
  61263. {
  61264. if (!this.verifyAffiliations(['admin', 'owner']) || !this.validateRoleChangeCommand(command, args)) {
  61265. break;
  61266. }
  61267. const occupant = this.model.occupants.findWhere({
  61268. 'nick': args[0]
  61269. }) || this.model.occupants.findWhere({
  61270. 'jid': args[0]
  61271. }),
  61272. attrs = {
  61273. 'jid': occupant.get('jid'),
  61274. 'reason': args[1]
  61275. };
  61276. if (_converse.auto_register_muc_nickname) {
  61277. attrs['nick'] = occupant.get('nick');
  61278. }
  61279. this.model.setAffiliation('member', [attrs]).then(() => this.model.occupants.fetchMembers()).catch(err => this.onCommandError(err));
  61280. break;
  61281. }
  61282. case 'nick':
  61283. if (!this.verifyRoles(['visitor', 'participant', 'moderator'])) {
  61284. break;
  61285. }
  61286. _converse.connection.send($pres({
  61287. from: _converse.connection.jid,
  61288. to: this.model.getRoomJIDAndNick(match[2]),
  61289. id: _converse.connection.getUniqueId()
  61290. }).tree());
  61291. break;
  61292. case 'owner':
  61293. if (!this.verifyAffiliations(['owner']) || !this.validateRoleChangeCommand(command, args)) {
  61294. break;
  61295. }
  61296. this.model.setAffiliation('owner', [{
  61297. 'jid': args[0],
  61298. 'reason': args[1]
  61299. }]).then(() => this.model.occupants.fetchMembers(), err => this.onCommandError(err));
  61300. break;
  61301. case 'op':
  61302. if (!this.verifyAffiliations(['admin', 'owner']) || !this.validateRoleChangeCommand(command, args)) {
  61303. break;
  61304. }
  61305. this.modifyRole(this.model.get('jid'), args[0], 'moderator', args[1], undefined, this.onCommandError.bind(this));
  61306. break;
  61307. case 'register':
  61308. if (args.length > 1) {
  61309. this.showErrorMessage(__(`Error: invalid number of arguments`));
  61310. } else {
  61311. this.model.registerNickname().then(err_msg => {
  61312. if (err_msg) this.showErrorMessage(err_msg);
  61313. });
  61314. }
  61315. break;
  61316. case 'revoke':
  61317. if (!this.verifyAffiliations(['admin', 'owner']) || !this.validateRoleChangeCommand(command, args)) {
  61318. break;
  61319. }
  61320. this.model.setAffiliation('none', [{
  61321. 'jid': args[0],
  61322. 'reason': args[1]
  61323. }]).then(() => this.model.occupants.fetchMembers(), err => this.onCommandError(err));
  61324. break;
  61325. case 'topic':
  61326. case 'subject':
  61327. // TODO: should be done via API call to _converse.api.rooms
  61328. _converse.connection.send($msg({
  61329. to: this.model.get('jid'),
  61330. from: _converse.connection.jid,
  61331. type: "groupchat"
  61332. }).c("subject", {
  61333. xmlns: "jabber:client"
  61334. }).t(match[2] || "").tree());
  61335. break;
  61336. case 'voice':
  61337. if (!this.verifyRoles(['moderator']) || !this.validateRoleChangeCommand(command, args)) {
  61338. break;
  61339. }
  61340. this.modifyRole(this.model.get('jid'), args[0], 'participant', args[1], undefined, this.onCommandError.bind(this));
  61341. break;
  61342. default:
  61343. return false;
  61344. }
  61345. return true;
  61346. },
  61347. registerHandlers() {
  61348. /* Register presence and message handlers for this chat
  61349. * groupchat
  61350. */
  61351. // XXX: Ideally this can be refactored out so that we don't
  61352. // need to do stanza processing inside the views in this
  61353. // module. See the comment in "onPresence" for more info.
  61354. this.model.addHandler('presence', 'ChatRoomView.onPresence', this.onPresence.bind(this)); // XXX instead of having a method showStatusMessages, we could instead
  61355. // create message models in converse-muc.js and then give them views in this module.
  61356. this.model.addHandler('message', 'ChatRoomView.showStatusMessages', this.showStatusMessages.bind(this));
  61357. },
  61358. onPresence(pres) {
  61359. /* Handles all MUC presence stanzas.
  61360. *
  61361. * Parameters:
  61362. * (XMLElement) pres: The stanza
  61363. */
  61364. // XXX: Current thinking is that excessive stanza
  61365. // processing inside a view is a "code smell".
  61366. // Instead stanza processing should happen inside the
  61367. // models/collections.
  61368. if (pres.getAttribute('type') === 'error') {
  61369. this.showErrorMessageFromPresence(pres);
  61370. } else {
  61371. // Instead of doing it this way, we could perhaps rather
  61372. // create StatusMessage objects inside the messages
  61373. // Collection and then simply render those. Then stanza
  61374. // processing is done on the model and rendering in the
  61375. // view(s).
  61376. this.showStatusMessages(pres);
  61377. }
  61378. },
  61379. populateAndJoin() {
  61380. this.model.occupants.fetchMembers();
  61381. this.join();
  61382. this.fetchMessages();
  61383. },
  61384. join(nick, password) {
  61385. /* Join the groupchat.
  61386. *
  61387. * Parameters:
  61388. * (String) nick: The user's nickname
  61389. * (String) password: Optional password, if required by
  61390. * the groupchat.
  61391. */
  61392. if (!nick && !this.model.get('nick')) {
  61393. this.checkForReservedNick();
  61394. return this;
  61395. }
  61396. this.model.join(nick, password);
  61397. return this;
  61398. },
  61399. renderConfigurationForm(stanza) {
  61400. /* Renders a form given an IQ stanza containing the current
  61401. * groupchat configuration.
  61402. *
  61403. * Returns a promise which resolves once the user has
  61404. * either submitted the form, or canceled it.
  61405. *
  61406. * Parameters:
  61407. * (XMLElement) stanza: The IQ stanza containing the groupchat
  61408. * config.
  61409. */
  61410. const container_el = this.el.querySelector('.chatroom-body');
  61411. _.each(container_el.querySelectorAll('.chatroom-form-container'), u.removeElement);
  61412. _.each(container_el.children, u.hideElement);
  61413. container_el.insertAdjacentHTML('beforeend', tpl_chatroom_form());
  61414. const form_el = container_el.querySelector('form.chatroom-form'),
  61415. fieldset_el = form_el.querySelector('fieldset'),
  61416. fields = stanza.querySelectorAll('field'),
  61417. title = _.get(stanza.querySelector('title'), 'textContent'),
  61418. instructions = _.get(stanza.querySelector('instructions'), 'textContent');
  61419. u.removeElement(fieldset_el.querySelector('span.spinner'));
  61420. fieldset_el.insertAdjacentHTML('beforeend', `<legend>${title}</legend>`);
  61421. if (instructions && instructions !== title) {
  61422. fieldset_el.insertAdjacentHTML('beforeend', `<p class="form-help">${instructions}</p>`);
  61423. }
  61424. _.each(fields, function (field) {
  61425. fieldset_el.insertAdjacentHTML('beforeend', u.xForm2webForm(field, stanza));
  61426. }); // Render save/cancel buttons
  61427. const last_fieldset_el = document.createElement('fieldset');
  61428. last_fieldset_el.insertAdjacentHTML('beforeend', `<input type="submit" class="btn btn-primary" value="${__('Save')}"/>`);
  61429. last_fieldset_el.insertAdjacentHTML('beforeend', `<input type="button" class="btn btn-secondary" value="${__('Cancel')}"/>`);
  61430. form_el.insertAdjacentElement('beforeend', last_fieldset_el);
  61431. last_fieldset_el.querySelector('input[type=button]').addEventListener('click', ev => {
  61432. ev.preventDefault();
  61433. this.closeForm();
  61434. });
  61435. form_el.addEventListener('submit', ev => {
  61436. ev.preventDefault();
  61437. this.model.saveConfiguration(ev.target).then(() => this.model.refreshRoomFeatures());
  61438. this.closeForm();
  61439. }, false);
  61440. },
  61441. closeForm() {
  61442. /* Remove the configuration form without submitting and
  61443. * return to the chat view.
  61444. */
  61445. u.removeElement(this.el.querySelector('.chatroom-form-container'));
  61446. this.renderAfterTransition();
  61447. },
  61448. getAndRenderConfigurationForm(ev) {
  61449. /* Start the process of configuring a groupchat, either by
  61450. * rendering a configuration form, or by auto-configuring
  61451. * based on the "roomconfig" data stored on the
  61452. * Backbone.Model.
  61453. *
  61454. * Stores the new configuration on the Backbone.Model once
  61455. * completed.
  61456. *
  61457. * Paremeters:
  61458. * (Event) ev: DOM event that might be passed in if this
  61459. * method is called due to a user action. In this
  61460. * case, auto-configure won't happen, regardless of
  61461. * the settings.
  61462. */
  61463. this.showSpinner();
  61464. this.model.fetchRoomConfiguration().then(this.renderConfigurationForm.bind(this)).catch(_.partial(_converse.log, _, Strophe.LogLevel.ERROR));
  61465. },
  61466. submitNickname(ev) {
  61467. /* Get the nickname value from the form and then join the
  61468. * groupchat with it.
  61469. */
  61470. ev.preventDefault();
  61471. const nick_el = ev.target.nick;
  61472. const nick = nick_el.value;
  61473. if (!nick) {
  61474. nick_el.classList.add('error');
  61475. return;
  61476. } else {
  61477. nick_el.classList.remove('error');
  61478. }
  61479. this.el.querySelector('.chatroom-form-container').outerHTML = tpl_spinner();
  61480. this.join(nick);
  61481. },
  61482. checkForReservedNick() {
  61483. /* User service-discovery to ask the XMPP server whether
  61484. * this user has a reserved nickname for this groupchat.
  61485. * If so, we'll use that, otherwise we render the nickname form.
  61486. */
  61487. this.showSpinner();
  61488. this.model.checkForReservedNick().then(this.onReservedNickFound.bind(this)).catch(this.onReservedNickNotFound.bind(this));
  61489. },
  61490. onReservedNickFound(iq) {
  61491. if (this.model.get('nick')) {
  61492. this.join();
  61493. } else {
  61494. this.onReservedNickNotFound();
  61495. }
  61496. },
  61497. onReservedNickNotFound(message) {
  61498. const nick = this.model.getDefaultNick();
  61499. if (nick) {
  61500. this.join(nick);
  61501. } else {
  61502. this.renderNicknameForm(message);
  61503. }
  61504. },
  61505. onNicknameClash(presence) {
  61506. /* When the nickname is already taken, we either render a
  61507. * form for the user to choose a new nickname, or we
  61508. * try to make the nickname unique by adding an integer to
  61509. * it. So john will become john-2, and then john-3 and so on.
  61510. *
  61511. * Which option is take depends on the value of
  61512. * muc_nickname_from_jid.
  61513. */
  61514. if (_converse.muc_nickname_from_jid) {
  61515. const nick = presence.getAttribute('from').split('/')[1];
  61516. if (nick === this.model.getDefaultNick()) {
  61517. this.join(nick + '-2');
  61518. } else {
  61519. const del = nick.lastIndexOf("-");
  61520. const num = nick.substring(del + 1, nick.length);
  61521. this.join(nick.substring(0, del + 1) + String(Number(num) + 1));
  61522. }
  61523. } else {
  61524. this.renderNicknameForm(__("The nickname you chose is reserved or " + "currently in use, please choose a different one."));
  61525. }
  61526. },
  61527. hideChatRoomContents() {
  61528. const container_el = this.el.querySelector('.chatroom-body');
  61529. if (!_.isNull(container_el)) {
  61530. _.each(container_el.children, child => {
  61531. child.classList.add('hidden');
  61532. });
  61533. }
  61534. },
  61535. renderNicknameForm(message) {
  61536. /* Render a form which allows the user to choose their
  61537. * nickname.
  61538. */
  61539. this.hideChatRoomContents();
  61540. _.each(this.el.querySelectorAll('span.centered.spinner'), u.removeElement);
  61541. if (!_.isString(message)) {
  61542. message = '';
  61543. }
  61544. const container_el = this.el.querySelector('.chatroom-body');
  61545. container_el.insertAdjacentHTML('beforeend', tpl_chatroom_nickname_form({
  61546. heading: __('Please choose your nickname'),
  61547. label_nickname: __('Nickname'),
  61548. label_join: __('Enter groupchat'),
  61549. validation_message: message
  61550. }));
  61551. this.model.save('connection_status', converse.ROOMSTATUS.NICKNAME_REQUIRED);
  61552. const form_el = this.el.querySelector('.chatroom-form');
  61553. form_el.addEventListener('submit', this.submitNickname.bind(this), false);
  61554. },
  61555. submitPassword(ev) {
  61556. ev.preventDefault();
  61557. const password = this.el.querySelector('.chatroom-form input[type=password]').value;
  61558. this.showSpinner();
  61559. this.join(this.model.get('nick'), password);
  61560. },
  61561. renderPasswordForm() {
  61562. const container_el = this.el.querySelector('.chatroom-body');
  61563. _.each(container_el.children, u.hideElement);
  61564. _.each(this.el.querySelectorAll('.spinner'), u.removeElement);
  61565. _.each(this.el.querySelectorAll('.chatroom-form-container'), u.removeElement);
  61566. container_el.insertAdjacentHTML('beforeend', tpl_chatroom_password_form({
  61567. 'heading': __('This groupchat requires a password'),
  61568. 'label_password': __('Password: '),
  61569. 'label_submit': __('Submit')
  61570. }));
  61571. this.model.save('connection_status', converse.ROOMSTATUS.PASSWORD_REQUIRED);
  61572. this.el.querySelector('.chatroom-form').addEventListener('submit', ev => this.submitPassword(ev), false);
  61573. },
  61574. showDestroyedMessage(error) {
  61575. u.hideElement(this.el.querySelector('.chat-area'));
  61576. u.hideElement(this.el.querySelector('.occupants'));
  61577. _.each(this.el.querySelectorAll('.spinner'), u.removeElement);
  61578. const container = this.el.querySelector('.disconnect-container');
  61579. const moved_jid = _.get(sizzle('gone[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]', error).pop(), 'textContent').replace(/^xmpp:/, '').replace(/\?join$/, '');
  61580. const reason = _.get(sizzle('text[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]', error).pop(), 'textContent');
  61581. container.innerHTML = tpl_chatroom_destroyed({
  61582. '_': _,
  61583. '__': __,
  61584. 'jid': moved_jid,
  61585. 'reason': reason ? `"${reason}"` : null
  61586. });
  61587. const switch_el = container.querySelector('a.switch-chat');
  61588. if (switch_el) {
  61589. switch_el.addEventListener('click', ev => {
  61590. ev.preventDefault();
  61591. this.model.save('jid', moved_jid);
  61592. container.innerHTML = '';
  61593. this.showSpinner();
  61594. this.enterRoom();
  61595. });
  61596. }
  61597. u.showElement(container);
  61598. },
  61599. showDisconnectMessages(msgs) {
  61600. if (_.isString(msgs)) {
  61601. msgs = [msgs];
  61602. }
  61603. u.hideElement(this.el.querySelector('.chat-area'));
  61604. u.hideElement(this.el.querySelector('.occupants'));
  61605. _.each(this.el.querySelectorAll('.spinner'), u.removeElement);
  61606. const container = this.el.querySelector('.disconnect-container');
  61607. container.innerHTML = tpl_chatroom_disconnect({
  61608. '_': _,
  61609. 'disconnect_messages': msgs
  61610. });
  61611. u.showElement(container);
  61612. },
  61613. getMessageFromStatus(stat, stanza, is_self) {
  61614. /* Parameters:
  61615. * (XMLElement) stat: A <status> element.
  61616. * (Boolean) is_self: Whether the element refers to the
  61617. * current user.
  61618. * (XMLElement) stanza: The original stanza received.
  61619. */
  61620. const code = stat.getAttribute('code');
  61621. if (code === '110' || code === '100' && !is_self) {
  61622. return;
  61623. }
  61624. if (code in _converse.muc.info_messages) {
  61625. return _converse.muc.info_messages[code];
  61626. }
  61627. let nick;
  61628. if (!is_self) {
  61629. if (code in _converse.muc.action_info_messages) {
  61630. nick = Strophe.getResourceFromJid(stanza.getAttribute('from'));
  61631. return __(_converse.muc.action_info_messages[code], nick);
  61632. }
  61633. } else if (code in _converse.muc.new_nickname_messages) {
  61634. if (is_self && code === "210") {
  61635. nick = Strophe.getResourceFromJid(stanza.getAttribute('from'));
  61636. } else if (is_self && code === "303") {
  61637. nick = stanza.querySelector('x item').getAttribute('nick');
  61638. }
  61639. return __(_converse.muc.new_nickname_messages[code], nick);
  61640. }
  61641. return;
  61642. },
  61643. getNotificationWithMessage(message) {
  61644. let el = this.content.lastElementChild;
  61645. while (!_.isNil(el)) {
  61646. const data = _.get(el, 'dataset', {});
  61647. if (!_.includes(_.get(el, 'classList', []), 'chat-info')) {
  61648. return;
  61649. }
  61650. if (el.textContent === message) {
  61651. return el;
  61652. }
  61653. el = el.previousElementSibling;
  61654. }
  61655. },
  61656. parseXUserElement(x, stanza, is_self) {
  61657. /* Parse the passed-in <x xmlns='http://jabber.org/protocol/muc#user'>
  61658. * element and construct a map containing relevant
  61659. * information.
  61660. */
  61661. // 1. Get notification messages based on the <status> elements.
  61662. const statuses = x.querySelectorAll('status');
  61663. const mapper = _.partial(this.getMessageFromStatus, _, stanza, is_self);
  61664. const notification = {};
  61665. const messages = _.reject(_.reject(_.map(statuses, mapper), _.isUndefined), message => this.getNotificationWithMessage(message));
  61666. if (messages.length) {
  61667. notification.messages = messages;
  61668. } // 2. Get disconnection messages based on the <status> elements
  61669. const codes = _.invokeMap(statuses, Element.prototype.getAttribute, 'code');
  61670. const disconnection_codes = _.intersection(codes, _.keys(_converse.muc.disconnect_messages));
  61671. const disconnected = is_self && disconnection_codes.length > 0;
  61672. if (disconnected) {
  61673. notification.disconnected = true;
  61674. notification.disconnection_message = _converse.muc.disconnect_messages[disconnection_codes[0]];
  61675. } // 3. Find the reason and actor from the <item> element
  61676. const item = x.querySelector('item'); // By using querySelector above, we assume here there is
  61677. // one <item> per <x xmlns='http://jabber.org/protocol/muc#user'>
  61678. // element. This appears to be a safe assumption, since
  61679. // each <x/> element pertains to a single user.
  61680. if (!_.isNull(item)) {
  61681. const reason = item.querySelector('reason');
  61682. if (reason) {
  61683. notification.reason = reason ? reason.textContent : undefined;
  61684. }
  61685. const actor = item.querySelector('actor');
  61686. if (actor) {
  61687. notification.actor = actor ? actor.getAttribute('nick') : undefined;
  61688. }
  61689. }
  61690. return notification;
  61691. },
  61692. showNotificationsforUser(notification) {
  61693. /* Given the notification object generated by
  61694. * parseXUserElement, display any relevant messages and
  61695. * information to the user.
  61696. */
  61697. if (notification.disconnected) {
  61698. const messages = [];
  61699. messages.push(notification.disconnection_message);
  61700. if (notification.actor) {
  61701. messages.push(__('This action was done by %1$s.', notification.actor));
  61702. }
  61703. if (notification.reason) {
  61704. messages.push(__('The reason given is: "%1$s".', notification.reason));
  61705. }
  61706. this.showDisconnectMessages(messages);
  61707. this.model.save('connection_status', converse.ROOMSTATUS.DISCONNECTED);
  61708. return;
  61709. }
  61710. _.each(notification.messages, message => {
  61711. this.content.insertAdjacentHTML('beforeend', tpl_info({
  61712. 'isodate': moment().format(),
  61713. 'extra_classes': 'chat-event',
  61714. 'message': message
  61715. }));
  61716. });
  61717. if (notification.reason) {
  61718. this.showChatEvent(__('The reason given is: "%1$s".', notification.reason));
  61719. }
  61720. if (_.get(notification.messages, 'length')) {
  61721. this.scrollDown();
  61722. }
  61723. },
  61724. onOccupantAdded(occupant) {
  61725. if (occupant.get('show') === 'online') {
  61726. this.showJoinNotification(occupant);
  61727. }
  61728. },
  61729. onOccupantRemoved(occupant) {
  61730. if (occupant.get('show') === 'online') {
  61731. this.showLeaveNotification(occupant);
  61732. }
  61733. },
  61734. showJoinOrLeaveNotification(occupant) {
  61735. if (_.includes(occupant.get('states'), '303')) {
  61736. return;
  61737. }
  61738. if (occupant.get('show') === 'offline') {
  61739. this.showLeaveNotification(occupant);
  61740. } else if (occupant.get('show') === 'online') {
  61741. this.showJoinNotification(occupant);
  61742. }
  61743. },
  61744. getPreviousJoinOrLeaveNotification(el, nick) {
  61745. /* Working backwards, get the first join/leave notification
  61746. * from the same user, on the same day and BEFORE any chat
  61747. * messages were received.
  61748. */
  61749. while (!_.isNil(el)) {
  61750. const data = _.get(el, 'dataset', {});
  61751. if (!_.includes(_.get(el, 'classList', []), 'chat-info')) {
  61752. return;
  61753. }
  61754. if (!moment(el.getAttribute('data-isodate')).isSame(new Date(), "day")) {
  61755. el = el.previousElementSibling;
  61756. continue;
  61757. }
  61758. if (data.join === nick || data.leave === nick || data.leavejoin === nick || data.joinleave === nick) {
  61759. return el;
  61760. }
  61761. el = el.previousElementSibling;
  61762. }
  61763. },
  61764. showJoinNotification(occupant) {
  61765. if (this.model.get('connection_status') !== converse.ROOMSTATUS.ENTERED) {
  61766. return;
  61767. }
  61768. const nick = occupant.get('nick'),
  61769. stat = occupant.get('status'),
  61770. prev_info_el = this.getPreviousJoinOrLeaveNotification(this.content.lastElementChild, nick),
  61771. data = _.get(prev_info_el, 'dataset', {});
  61772. if (data.leave === nick) {
  61773. let message;
  61774. if (_.isNil(stat)) {
  61775. message = __('%1$s has left and re-entered the groupchat', nick);
  61776. } else {
  61777. message = __('%1$s has left and re-entered the groupchat. "%2$s"', nick, stat);
  61778. }
  61779. const data = {
  61780. 'data_name': 'leavejoin',
  61781. 'data_value': nick,
  61782. 'isodate': moment().format(),
  61783. 'extra_classes': 'chat-event',
  61784. 'message': message
  61785. };
  61786. this.content.removeChild(prev_info_el);
  61787. this.content.insertAdjacentHTML('beforeend', tpl_info(data));
  61788. const el = this.content.lastElementChild;
  61789. setTimeout(() => u.addClass('fade-out', el), 5000);
  61790. setTimeout(() => el.parentElement && el.parentElement.removeChild(el), 5500);
  61791. } else {
  61792. let message;
  61793. if (_.isNil(stat)) {
  61794. message = __('%1$s has entered the groupchat', nick);
  61795. } else {
  61796. message = __('%1$s has entered the groupchat. "%2$s"', nick, stat);
  61797. }
  61798. const data = {
  61799. 'data_name': 'join',
  61800. 'data_value': nick,
  61801. 'isodate': moment().format(),
  61802. 'extra_classes': 'chat-event',
  61803. 'message': message
  61804. };
  61805. if (prev_info_el) {
  61806. this.content.removeChild(prev_info_el);
  61807. this.content.insertAdjacentHTML('beforeend', tpl_info(data));
  61808. } else {
  61809. this.content.insertAdjacentHTML('beforeend', tpl_info(data));
  61810. this.insertDayIndicator(this.content.lastElementChild);
  61811. }
  61812. }
  61813. this.scrollDown();
  61814. },
  61815. showLeaveNotification(occupant) {
  61816. if (_.includes(occupant.get('states'), '303') || _.includes(occupant.get('states'), '307')) {
  61817. return;
  61818. }
  61819. const nick = occupant.get('nick'),
  61820. stat = occupant.get('status'),
  61821. prev_info_el = this.getPreviousJoinOrLeaveNotification(this.content.lastElementChild, nick),
  61822. dataset = _.get(prev_info_el, 'dataset', {});
  61823. if (dataset.join === nick) {
  61824. let message;
  61825. if (_.isNil(stat)) {
  61826. message = __('%1$s has entered and left the groupchat', nick);
  61827. } else {
  61828. message = __('%1$s has entered and left the groupchat. "%2$s"', nick, stat);
  61829. }
  61830. const data = {
  61831. 'data_name': 'joinleave',
  61832. 'data_value': nick,
  61833. 'isodate': moment().format(),
  61834. 'extra_classes': 'chat-event',
  61835. 'message': message
  61836. };
  61837. this.content.removeChild(prev_info_el);
  61838. this.content.insertAdjacentHTML('beforeend', tpl_info(data));
  61839. const el = this.content.lastElementChild;
  61840. setTimeout(() => u.addClass('fade-out', el), 5000);
  61841. setTimeout(() => el.parentElement && el.parentElement.removeChild(el), 5500);
  61842. } else {
  61843. let message;
  61844. if (_.isNil(stat)) {
  61845. message = __('%1$s has left the groupchat', nick);
  61846. } else {
  61847. message = __('%1$s has left the groupchat. "%2$s"', nick, stat);
  61848. }
  61849. const data = {
  61850. 'message': message,
  61851. 'isodate': moment().format(),
  61852. 'extra_classes': 'chat-event',
  61853. 'data_name': 'leave',
  61854. 'data_value': nick
  61855. };
  61856. if (prev_info_el) {
  61857. this.content.removeChild(prev_info_el);
  61858. this.content.insertAdjacentHTML('beforeend', tpl_info(data));
  61859. } else {
  61860. this.content.insertAdjacentHTML('beforeend', tpl_info(data));
  61861. this.insertDayIndicator(this.content.lastElementChild);
  61862. }
  61863. }
  61864. this.scrollDown();
  61865. },
  61866. showStatusMessages(stanza) {
  61867. /* Check for status codes and communicate their purpose to the user.
  61868. * See: http://xmpp.org/registrar/mucstatus.html
  61869. *
  61870. * Parameters:
  61871. * (XMLElement) stanza: The message or presence stanza
  61872. * containing the status codes.
  61873. */
  61874. const elements = sizzle(`x[xmlns="${Strophe.NS.MUC_USER}"]`, stanza);
  61875. const is_self = stanza.querySelectorAll("status[code='110']").length;
  61876. const iteratee = _.partial(this.parseXUserElement.bind(this), _, stanza, is_self);
  61877. const notifications = _.reject(_.map(elements, iteratee), _.isEmpty);
  61878. _.each(notifications, this.showNotificationsforUser.bind(this));
  61879. },
  61880. showErrorMessageFromPresence(presence) {
  61881. // We didn't enter the groupchat, so we must remove it from the MUC add-on
  61882. const error = presence.querySelector('error');
  61883. if (error.getAttribute('type') === 'auth') {
  61884. if (!_.isNull(error.querySelector('not-authorized'))) {
  61885. this.renderPasswordForm();
  61886. } else if (!_.isNull(error.querySelector('registration-required'))) {
  61887. this.showDisconnectMessages(__('You are not on the member list of this groupchat.'));
  61888. } else if (!_.isNull(error.querySelector('forbidden'))) {
  61889. this.showDisconnectMessages(__('You have been banned from this groupchat.'));
  61890. }
  61891. } else if (error.getAttribute('type') === 'modify') {
  61892. if (!_.isNull(error.querySelector('jid-malformed'))) {
  61893. this.showDisconnectMessages(__('No nickname was specified.'));
  61894. }
  61895. } else if (error.getAttribute('type') === 'cancel') {
  61896. if (!_.isNull(error.querySelector('not-allowed'))) {
  61897. this.showDisconnectMessages(__('You are not allowed to create new groupchats.'));
  61898. } else if (!_.isNull(error.querySelector('not-acceptable'))) {
  61899. this.showDisconnectMessages(__("Your nickname doesn't conform to this groupchat's policies."));
  61900. } else if (sizzle('gone[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]', error).length) {
  61901. this.showDestroyedMessage(error);
  61902. } else if (!_.isNull(error.querySelector('conflict'))) {
  61903. this.onNicknameClash(presence);
  61904. } else if (!_.isNull(error.querySelector('item-not-found'))) {
  61905. this.showDisconnectMessages(__("This groupchat does not (yet) exist."));
  61906. } else if (!_.isNull(error.querySelector('service-unavailable'))) {
  61907. this.showDisconnectMessages(__("This groupchat has reached its maximum number of participants."));
  61908. } else if (!_.isNull(error.querySelector('remote-server-not-found'))) {
  61909. const messages = [__("Remote server not found")];
  61910. const reason = _.get(error.querySelector('text'), 'textContent');
  61911. if (reason) {
  61912. messages.push(__('The explanation given is: "%1$s".', reason));
  61913. }
  61914. this.showDisconnectMessages(messages);
  61915. }
  61916. }
  61917. },
  61918. renderAfterTransition() {
  61919. /* Rerender the groupchat after some kind of transition. For
  61920. * example after the spinner has been removed or after a
  61921. * form has been submitted and removed.
  61922. */
  61923. if (this.model.get('connection_status') == converse.ROOMSTATUS.NICKNAME_REQUIRED) {
  61924. this.renderNicknameForm();
  61925. } else if (this.model.get('connection_status') == converse.ROOMSTATUS.PASSWORD_REQUIRED) {
  61926. this.renderPasswordForm();
  61927. } else {
  61928. this.el.querySelector('.chat-area').classList.remove('hidden');
  61929. this.setOccupantsVisibility();
  61930. this.scrollDown();
  61931. }
  61932. },
  61933. showSpinner() {
  61934. u.removeElement(this.el.querySelector('.spinner'));
  61935. const container_el = this.el.querySelector('.chatroom-body');
  61936. const children = Array.prototype.slice.call(container_el.children, 0);
  61937. container_el.insertAdjacentHTML('afterbegin', tpl_spinner());
  61938. _.each(children, u.hideElement);
  61939. },
  61940. hideSpinner() {
  61941. /* Check if the spinner is being shown and if so, hide it.
  61942. * Also make sure then that the chat area and occupants
  61943. * list are both visible.
  61944. */
  61945. const spinner = this.el.querySelector('.spinner');
  61946. if (!_.isNull(spinner)) {
  61947. u.removeElement(spinner);
  61948. this.renderAfterTransition();
  61949. }
  61950. return this;
  61951. },
  61952. setChatRoomSubject() {
  61953. // For translators: the %1$s and %2$s parts will get
  61954. // replaced by the user and topic text respectively
  61955. // Example: Topic set by JC Brand to: Hello World!
  61956. const subject = this.model.get('subject'),
  61957. message = subject.text ? __('Topic set by %1$s', subject.author) : __('Topic cleared by %1$s', subject.author),
  61958. date = moment().format();
  61959. this.content.insertAdjacentHTML('beforeend', tpl_info({
  61960. 'isodate': date,
  61961. 'extra_classes': 'chat-event',
  61962. 'message': message
  61963. }));
  61964. if (subject.text) {
  61965. this.content.insertAdjacentHTML('beforeend', tpl_info({
  61966. 'isodate': date,
  61967. 'extra_classes': 'chat-topic',
  61968. 'message': u.addHyperlinks(xss.filterXSS(_.get(this.model.get('subject'), 'text'), {
  61969. 'whiteList': {}
  61970. })),
  61971. 'render_message': true
  61972. }));
  61973. }
  61974. this.scrollDown();
  61975. }
  61976. });
  61977. _converse.RoomsPanel = Backbone.NativeView.extend({
  61978. /* Backbone.NativeView which renders MUC section of the control box.
  61979. */
  61980. tagName: 'div',
  61981. className: 'controlbox-section',
  61982. id: 'chatrooms',
  61983. events: {
  61984. 'click a.chatbox-btn.show-add-muc-modal': 'showAddRoomModal',
  61985. 'click a.chatbox-btn.show-list-muc-modal': 'showListRoomsModal'
  61986. },
  61987. render() {
  61988. this.el.innerHTML = tpl_room_panel({
  61989. 'heading_chatrooms': __('Groupchats'),
  61990. 'title_new_room': __('Add a new groupchat'),
  61991. 'title_list_rooms': __('Query for groupchats')
  61992. });
  61993. return this;
  61994. },
  61995. showAddRoomModal(ev) {
  61996. if (_.isUndefined(this.add_room_modal)) {
  61997. this.add_room_modal = new _converse.AddChatRoomModal({
  61998. 'model': this.model
  61999. });
  62000. }
  62001. this.add_room_modal.show(ev);
  62002. },
  62003. showListRoomsModal(ev) {
  62004. if (_.isUndefined(this.list_rooms_modal)) {
  62005. this.list_rooms_modal = new _converse.ListChatRoomsModal({
  62006. 'model': this.model
  62007. });
  62008. }
  62009. this.list_rooms_modal.show(ev);
  62010. }
  62011. });
  62012. _converse.ChatRoomOccupantView = Backbone.VDOMView.extend({
  62013. tagName: 'li',
  62014. initialize() {
  62015. this.model.on('change', this.render, this);
  62016. },
  62017. toHTML() {
  62018. const show = this.model.get('show');
  62019. return tpl_occupant(_.extend({
  62020. '_': _,
  62021. // XXX Normally this should already be included,
  62022. // but with the current webpack build,
  62023. // we only get a subset of the _ methods.
  62024. 'jid': '',
  62025. 'show': show,
  62026. 'hint_show': _converse.PRETTY_CHAT_STATUS[show],
  62027. 'hint_occupant': __('Click to mention %1$s in your message.', this.model.get('nick')),
  62028. 'desc_moderator': __('This user is a moderator.'),
  62029. 'desc_participant': __('This user can send messages in this groupchat.'),
  62030. 'desc_visitor': __('This user can NOT send messages in this groupchat.'),
  62031. 'label_moderator': __('Moderator'),
  62032. 'label_visitor': __('Visitor'),
  62033. 'label_owner': __('Owner'),
  62034. 'label_member': __('Member'),
  62035. 'label_admin': __('Admin')
  62036. }, this.model.toJSON()));
  62037. },
  62038. destroy() {
  62039. this.el.parentElement.removeChild(this.el);
  62040. }
  62041. });
  62042. _converse.ChatRoomOccupantsView = Backbone.OrderedListView.extend({
  62043. tagName: 'div',
  62044. className: 'occupants col-md-3 col-4',
  62045. listItems: 'model',
  62046. sortEvent: 'change:role',
  62047. listSelector: '.occupant-list',
  62048. ItemView: _converse.ChatRoomOccupantView,
  62049. initialize() {
  62050. Backbone.OrderedListView.prototype.initialize.apply(this, arguments);
  62051. this.chatroomview = this.model.chatroomview;
  62052. this.chatroomview.model.on('change:open', this.renderInviteWidget, this);
  62053. this.chatroomview.model.on('change:affiliation', this.renderInviteWidget, this);
  62054. this.chatroomview.model.on('change:hidden', this.onFeatureChanged, this);
  62055. this.chatroomview.model.on('change:mam_enabled', this.onFeatureChanged, this);
  62056. this.chatroomview.model.on('change:membersonly', this.onFeatureChanged, this);
  62057. this.chatroomview.model.on('change:moderated', this.onFeatureChanged, this);
  62058. this.chatroomview.model.on('change:nonanonymous', this.onFeatureChanged, this);
  62059. this.chatroomview.model.on('change:open', this.onFeatureChanged, this);
  62060. this.chatroomview.model.on('change:passwordprotected', this.onFeatureChanged, this);
  62061. this.chatroomview.model.on('change:persistent', this.onFeatureChanged, this);
  62062. this.chatroomview.model.on('change:publicroom', this.onFeatureChanged, this);
  62063. this.chatroomview.model.on('change:semianonymous', this.onFeatureChanged, this);
  62064. this.chatroomview.model.on('change:temporary', this.onFeatureChanged, this);
  62065. this.chatroomview.model.on('change:unmoderated', this.onFeatureChanged, this);
  62066. this.chatroomview.model.on('change:unsecured', this.onFeatureChanged, this);
  62067. this.render();
  62068. this.model.fetch({
  62069. 'add': true,
  62070. 'silent': true,
  62071. 'success': this.sortAndPositionAllItems.bind(this)
  62072. });
  62073. },
  62074. render() {
  62075. this.el.innerHTML = tpl_chatroom_sidebar(_.extend(this.chatroomview.model.toJSON(), {
  62076. 'allow_muc_invitations': _converse.allow_muc_invitations,
  62077. 'label_occupants': __('Participants')
  62078. }));
  62079. if (_converse.allow_muc_invitations) {
  62080. _converse.api.waitUntil('rosterContactsFetched').then(this.renderInviteWidget.bind(this));
  62081. }
  62082. return this.renderRoomFeatures();
  62083. },
  62084. renderInviteWidget() {
  62085. const form = this.el.querySelector('form.room-invite');
  62086. if (this.shouldInviteWidgetBeShown()) {
  62087. if (_.isNull(form)) {
  62088. const heading = this.el.querySelector('.occupants-heading');
  62089. heading.insertAdjacentHTML('afterend', tpl_chatroom_invite({
  62090. 'error_message': null,
  62091. 'label_invitation': __('Invite')
  62092. }));
  62093. this.initInviteWidget();
  62094. }
  62095. } else if (!_.isNull(form)) {
  62096. form.remove();
  62097. }
  62098. return this;
  62099. },
  62100. renderRoomFeatures() {
  62101. const picks = _.pick(this.chatroomview.model.attributes, converse.ROOM_FEATURES),
  62102. iteratee = (a, v) => a || v,
  62103. el = this.el.querySelector('.chatroom-features');
  62104. el.innerHTML = tpl_chatroom_features(_.extend(this.chatroomview.model.toJSON(), {
  62105. '__': __,
  62106. 'has_features': _.reduce(_.values(picks), iteratee)
  62107. }));
  62108. this.setOccupantsHeight();
  62109. return this;
  62110. },
  62111. onFeatureChanged(model) {
  62112. /* When a feature has been changed, it's logical opposite
  62113. * must be set to the opposite value.
  62114. *
  62115. * So for example, if "temporary" was set to "false", then
  62116. * "persistent" will be set to "true" in this method.
  62117. *
  62118. * Additionally a debounced render method is called to make
  62119. * sure the features widget gets updated.
  62120. */
  62121. if (_.isUndefined(this.debouncedRenderRoomFeatures)) {
  62122. this.debouncedRenderRoomFeatures = _.debounce(this.renderRoomFeatures, 100, {
  62123. 'leading': false
  62124. });
  62125. }
  62126. const changed_features = {};
  62127. _.each(_.keys(model.changed), function (k) {
  62128. if (!_.isNil(ROOM_FEATURES_MAP[k])) {
  62129. changed_features[ROOM_FEATURES_MAP[k]] = !model.changed[k];
  62130. }
  62131. });
  62132. this.chatroomview.model.save(changed_features, {
  62133. 'silent': true
  62134. });
  62135. this.debouncedRenderRoomFeatures();
  62136. },
  62137. setOccupantsHeight() {
  62138. const el = this.el.querySelector('.chatroom-features');
  62139. this.el.querySelector('.occupant-list').style.cssText = `height: calc(100% - ${el.offsetHeight}px - 5em);`;
  62140. },
  62141. promptForInvite(suggestion) {
  62142. const reason = prompt(__('You are about to invite %1$s to the groupchat "%2$s". ' + 'You may optionally include a message, explaining the reason for the invitation.', suggestion.text.label, this.model.get('id')));
  62143. if (reason !== null) {
  62144. this.chatroomview.model.directInvite(suggestion.text.value, reason);
  62145. }
  62146. const form = suggestion.target.form,
  62147. error = form.querySelector('.pure-form-message.error');
  62148. if (!_.isNull(error)) {
  62149. error.parentNode.removeChild(error);
  62150. }
  62151. suggestion.target.value = '';
  62152. },
  62153. inviteFormSubmitted(evt) {
  62154. evt.preventDefault();
  62155. const el = evt.target.querySelector('input.invited-contact'),
  62156. jid = el.value;
  62157. if (!jid || _.compact(jid.split('@')).length < 2) {
  62158. evt.target.outerHTML = tpl_chatroom_invite({
  62159. 'error_message': __('Please enter a valid XMPP username'),
  62160. 'label_invitation': __('Invite')
  62161. });
  62162. this.initInviteWidget();
  62163. return;
  62164. }
  62165. this.promptForInvite({
  62166. 'target': el,
  62167. 'text': {
  62168. 'label': jid,
  62169. 'value': jid
  62170. }
  62171. });
  62172. },
  62173. shouldInviteWidgetBeShown() {
  62174. return _converse.allow_muc_invitations && (this.chatroomview.model.get('open') || this.chatroomview.model.get('affiliation') === "owner");
  62175. },
  62176. initInviteWidget() {
  62177. const form = this.el.querySelector('form.room-invite');
  62178. if (_.isNull(form)) {
  62179. return;
  62180. }
  62181. form.addEventListener('submit', this.inviteFormSubmitted.bind(this), false);
  62182. const el = this.el.querySelector('input.invited-contact');
  62183. const list = _converse.roster.map(function (item) {
  62184. const label = item.get('fullname') || item.get('jid');
  62185. return {
  62186. 'label': label,
  62187. 'value': item.get('jid')
  62188. };
  62189. });
  62190. const awesomplete = new Awesomplete(el, {
  62191. 'minChars': 1,
  62192. 'list': list
  62193. });
  62194. el.addEventListener('awesomplete-selectcomplete', this.promptForInvite.bind(this));
  62195. }
  62196. });
  62197. function setMUCDomain(domain, controlboxview) {
  62198. _converse.muc_domain = domain;
  62199. controlboxview.roomspanel.model.save('muc_domain', Strophe.getDomainFromJid(domain));
  62200. }
  62201. function setMUCDomainFromDisco(controlboxview) {
  62202. /* Check whether service discovery for the user's domain
  62203. * returned MUC information and use that to automatically
  62204. * set the MUC domain in the "Add groupchat" modal.
  62205. */
  62206. function featureAdded(feature) {
  62207. if (!feature) {
  62208. return;
  62209. }
  62210. if (feature.get('var') === Strophe.NS.MUC) {
  62211. feature.entity.getIdentity('conference', 'text').then(identity => {
  62212. if (identity) {
  62213. setMUCDomain(feature.get('from'), controlboxview);
  62214. }
  62215. });
  62216. }
  62217. }
  62218. _converse.api.waitUntil('discoInitialized').then(() => {
  62219. _converse.api.listen.on('serviceDiscovered', featureAdded); // Features could have been added before the controlbox was
  62220. // initialized. We're only interested in MUC
  62221. _converse.disco_entities.each(entity => featureAdded(entity.features.findWhere({
  62222. 'var': Strophe.NS.MUC
  62223. })));
  62224. }).catch(_.partial(_converse.log, _, Strophe.LogLevel.ERROR));
  62225. }
  62226. function fetchAndSetMUCDomain(controlboxview) {
  62227. if (controlboxview.model.get('connected')) {
  62228. if (!controlboxview.roomspanel.model.get('muc_domain')) {
  62229. if (_.isUndefined(_converse.muc_domain)) {
  62230. setMUCDomainFromDisco(controlboxview);
  62231. } else {
  62232. setMUCDomain(_converse.muc_domain, controlboxview);
  62233. }
  62234. }
  62235. }
  62236. }
  62237. /************************ BEGIN Event Handlers ************************/
  62238. _converse.on('chatBoxViewsInitialized', () => {
  62239. const that = _converse.chatboxviews;
  62240. _converse.chatboxes.on('add', item => {
  62241. if (!that.get(item.get('id')) && item.get('type') === _converse.CHATROOMS_TYPE) {
  62242. return that.add(item.get('id'), new _converse.ChatRoomView({
  62243. 'model': item
  62244. }));
  62245. }
  62246. });
  62247. });
  62248. _converse.on('controlboxInitialized', view => {
  62249. if (!_converse.allow_muc) {
  62250. return;
  62251. }
  62252. fetchAndSetMUCDomain(view);
  62253. view.model.on('change:connected', _.partial(fetchAndSetMUCDomain, view));
  62254. });
  62255. function reconnectToChatRooms() {
  62256. /* Upon a reconnection event from converse, join again
  62257. * all the open groupchats.
  62258. */
  62259. _converse.chatboxviews.each(function (view) {
  62260. if (view.model.get('type') === _converse.CHATROOMS_TYPE) {
  62261. view.model.save('connection_status', converse.ROOMSTATUS.DISCONNECTED);
  62262. view.model.registerHandlers();
  62263. view.populateAndJoin();
  62264. }
  62265. });
  62266. }
  62267. _converse.on('reconnected', reconnectToChatRooms);
  62268. /************************ END Event Handlers ************************/
  62269. /************************ BEGIN API ************************/
  62270. _.extend(_converse.api, {
  62271. /**
  62272. * The "roomviews" namespace groups methods relevant to chatroom
  62273. * (aka groupchats) views.
  62274. *
  62275. * @namespace _converse.api.roomviews
  62276. * @memberOf _converse.api
  62277. */
  62278. 'roomviews': {
  62279. /**
  62280. * Lets you close open chatrooms.
  62281. *
  62282. * You can call this method without any arguments to close
  62283. * all open chatrooms, or you can specify a single JID or
  62284. * an array of JIDs.
  62285. *
  62286. * @method _converse.api.roomviews.close
  62287. * @param {(String[]|String)} jids The JID or array of JIDs of the chatroom(s)
  62288. */
  62289. 'close'(jids) {
  62290. if (_.isUndefined(jids)) {
  62291. _converse.chatboxviews.each(function (view) {
  62292. if (view.is_chatroom && view.model) {
  62293. view.close();
  62294. }
  62295. });
  62296. } else if (_.isString(jids)) {
  62297. const view = _converse.chatboxviews.get(jids);
  62298. if (view) {
  62299. view.close();
  62300. }
  62301. } else {
  62302. _.each(jids, function (jid) {
  62303. const view = _converse.chatboxviews.get(jid);
  62304. if (view) {
  62305. view.close();
  62306. }
  62307. });
  62308. }
  62309. }
  62310. }
  62311. });
  62312. }
  62313. });
  62314. });
  62315. /***/ }),
  62316. /***/ "./src/converse-muc.js":
  62317. /*!*****************************!*\
  62318. !*** ./src/converse-muc.js ***!
  62319. \*****************************/
  62320. /*! no static exports found */
  62321. /***/ (function(module, exports, __webpack_require__) {
  62322. "use strict";
  62323. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  62324. function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
  62325. function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
  62326. function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
  62327. function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
  62328. // Converse.js
  62329. // http://conversejs.org
  62330. //
  62331. // Copyright (c) 2013-2018, the Converse.js developers
  62332. // Licensed under the Mozilla Public License (MPLv2)
  62333. (function (root, factory) {
  62334. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! utils/form */ "./src/utils/form.js"), __webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! converse-disco */ "./src/converse-disco.js"), __webpack_require__(/*! backbone.overview */ "./node_modules/backbone.overview/backbone.overview.js"), __webpack_require__(/*! backbone.orderedlistview */ "./node_modules/backbone.overview/backbone.orderedlistview.js"), __webpack_require__(/*! backbone.vdomview */ "./node_modules/backbone.vdomview/backbone.vdomview.js"), __webpack_require__(/*! utils/muc */ "./src/utils/muc.js"), __webpack_require__(/*! utils/emoji */ "./src/utils/emoji.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  62335. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  62336. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  62337. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  62338. })(void 0, function (u, converse) {
  62339. "use strict";
  62340. const MUC_ROLE_WEIGHTS = {
  62341. 'moderator': 1,
  62342. 'participant': 2,
  62343. 'visitor': 3,
  62344. 'none': 2
  62345. };
  62346. const _converse$env = converse.env,
  62347. Strophe = _converse$env.Strophe,
  62348. Backbone = _converse$env.Backbone,
  62349. Promise = _converse$env.Promise,
  62350. $iq = _converse$env.$iq,
  62351. $build = _converse$env.$build,
  62352. $msg = _converse$env.$msg,
  62353. $pres = _converse$env.$pres,
  62354. b64_sha1 = _converse$env.b64_sha1,
  62355. sizzle = _converse$env.sizzle,
  62356. f = _converse$env.f,
  62357. moment = _converse$env.moment,
  62358. _ = _converse$env._; // Add Strophe Namespaces
  62359. Strophe.addNamespace('MUC_ADMIN', Strophe.NS.MUC + "#admin");
  62360. Strophe.addNamespace('MUC_OWNER', Strophe.NS.MUC + "#owner");
  62361. Strophe.addNamespace('MUC_REGISTER', "jabber:iq:register");
  62362. Strophe.addNamespace('MUC_ROOMCONF', Strophe.NS.MUC + "#roomconfig");
  62363. Strophe.addNamespace('MUC_USER', Strophe.NS.MUC + "#user");
  62364. converse.MUC_NICK_CHANGED_CODE = "303";
  62365. converse.ROOM_FEATURES = ['passwordprotected', 'unsecured', 'hidden', 'publicroom', 'membersonly', 'open', 'persistent', 'temporary', 'nonanonymous', 'semianonymous', 'moderated', 'unmoderated', 'mam_enabled'];
  62366. converse.ROOMSTATUS = {
  62367. CONNECTED: 0,
  62368. CONNECTING: 1,
  62369. NICKNAME_REQUIRED: 2,
  62370. PASSWORD_REQUIRED: 3,
  62371. DISCONNECTED: 4,
  62372. ENTERED: 5
  62373. };
  62374. converse.plugins.add('converse-muc', {
  62375. /* Optional dependencies are other plugins which might be
  62376. * overridden or relied upon, and therefore need to be loaded before
  62377. * this plugin. They are called "optional" because they might not be
  62378. * available, in which case any overrides applicable to them will be
  62379. * ignored.
  62380. *
  62381. * It's possible however to make optional dependencies non-optional.
  62382. * If the setting "strict_plugin_dependencies" is set to true,
  62383. * an error will be raised if the plugin is not found.
  62384. *
  62385. * NB: These plugins need to have already been loaded via require.js.
  62386. */
  62387. dependencies: ["converse-chatboxes", "converse-disco", "converse-controlbox"],
  62388. overrides: {
  62389. tearDown() {
  62390. const _converse = this.__super__._converse,
  62391. groupchats = this.chatboxes.where({
  62392. 'type': _converse.CHATROOMS_TYPE
  62393. });
  62394. _.each(groupchats, gc => u.safeSave(gc, {
  62395. 'connection_status': converse.ROOMSTATUS.DISCONNECTED
  62396. }));
  62397. this.__super__.tearDown.call(this, arguments);
  62398. },
  62399. ChatBoxes: {
  62400. model(attrs, options) {
  62401. const _converse = this.__super__._converse;
  62402. if (attrs.type == _converse.CHATROOMS_TYPE) {
  62403. return new _converse.ChatRoom(attrs, options);
  62404. } else {
  62405. return this.__super__.model.apply(this, arguments);
  62406. }
  62407. }
  62408. }
  62409. },
  62410. initialize() {
  62411. /* The initialize function gets called as soon as the plugin is
  62412. * loaded by converse.js's plugin machinery.
  62413. */
  62414. const _converse = this._converse,
  62415. __ = _converse.__; // Configuration values for this plugin
  62416. // ====================================
  62417. // Refer to docs/source/configuration.rst for explanations of these
  62418. // configuration settings.
  62419. _converse.api.settings.update({
  62420. allow_muc: true,
  62421. allow_muc_invitations: true,
  62422. auto_join_on_invite: false,
  62423. auto_join_rooms: [],
  62424. auto_register_muc_nickname: false,
  62425. muc_domain: undefined,
  62426. muc_history_max_stanzas: undefined,
  62427. muc_instant_rooms: true,
  62428. muc_nickname_from_jid: false
  62429. });
  62430. _converse.api.promises.add(['roomsAutoJoined']);
  62431. function openRoom(jid) {
  62432. if (!u.isValidMUCJID(jid)) {
  62433. return _converse.log(`Invalid JID "${jid}" provided in URL fragment`, Strophe.LogLevel.WARN);
  62434. }
  62435. const promises = [_converse.api.waitUntil('roomsAutoJoined')];
  62436. if (_converse.allow_bookmarks) {
  62437. promises.push(_converse.api.waitUntil('bookmarksInitialized'));
  62438. }
  62439. Promise.all(promises).then(() => {
  62440. _converse.api.rooms.open(jid);
  62441. });
  62442. }
  62443. _converse.router.route('converse/room?jid=:jid', openRoom);
  62444. _converse.openChatRoom = function (jid, settings, bring_to_foreground) {
  62445. /* Opens a groupchat, making sure that certain attributes
  62446. * are correct, for example that the "type" is set to
  62447. * "chatroom".
  62448. */
  62449. settings.type = _converse.CHATROOMS_TYPE;
  62450. settings.id = jid;
  62451. settings.box_id = b64_sha1(jid);
  62452. const chatbox = _converse.chatboxes.getChatBox(jid, settings, true);
  62453. chatbox.trigger('show', true);
  62454. return chatbox;
  62455. };
  62456. _converse.ChatRoom = _converse.ChatBox.extend({
  62457. defaults() {
  62458. return _.assign(_.clone(_converse.ChatBox.prototype.defaults), _.zipObject(converse.ROOM_FEATURES, _.map(converse.ROOM_FEATURES, _.stubFalse)), {
  62459. // For group chats, we distinguish between generally unread
  62460. // messages and those ones that specifically mention the
  62461. // user.
  62462. //
  62463. // To keep things simple, we reuse `num_unread` from
  62464. // _converse.ChatBox to indicate unread messages which
  62465. // mention the user and `num_unread_general` to indicate
  62466. // generally unread messages (which *includes* mentions!).
  62467. 'num_unread_general': 0,
  62468. 'affiliation': null,
  62469. 'connection_status': converse.ROOMSTATUS.DISCONNECTED,
  62470. 'name': '',
  62471. 'nick': _converse.xmppstatus.get('nickname') || _converse.nickname,
  62472. 'description': '',
  62473. 'features_fetched': false,
  62474. 'roomconfig': {},
  62475. 'type': _converse.CHATROOMS_TYPE,
  62476. 'message_type': 'groupchat'
  62477. });
  62478. },
  62479. initialize() {
  62480. this.constructor.__super__.initialize.apply(this, arguments);
  62481. this.on('change:connection_status', this.onConnectionStatusChanged, this);
  62482. this.occupants = new _converse.ChatRoomOccupants();
  62483. this.occupants.browserStorage = new Backbone.BrowserStorage.session(b64_sha1(`converse.occupants-${_converse.bare_jid}${this.get('jid')}`));
  62484. this.occupants.chatroom = this;
  62485. this.registerHandlers();
  62486. },
  62487. async onConnectionStatusChanged() {
  62488. if (this.get('connection_status') === converse.ROOMSTATUS.ENTERED && _converse.auto_register_muc_nickname && !this.get('reserved_nick')) {
  62489. const result = await _converse.api.disco.supports(Strophe.NS.MUC_REGISTER, this.get('jid'));
  62490. if (result.length) {
  62491. this.registerNickname();
  62492. }
  62493. }
  62494. },
  62495. registerHandlers() {
  62496. /* Register presence and message handlers for this chat
  62497. * groupchat
  62498. */
  62499. const room_jid = this.get('jid');
  62500. this.removeHandlers();
  62501. this.presence_handler = _converse.connection.addHandler(stanza => {
  62502. _.each(_.values(this.handlers.presence), callback => callback(stanza));
  62503. this.onPresence(stanza);
  62504. return true;
  62505. }, null, 'presence', null, null, room_jid, {
  62506. 'ignoreNamespaceFragment': true,
  62507. 'matchBareFromJid': true
  62508. });
  62509. this.message_handler = _converse.connection.addHandler(stanza => {
  62510. _.each(_.values(this.handlers.message), callback => callback(stanza));
  62511. this.onMessage(stanza);
  62512. return true;
  62513. }, null, 'message', 'groupchat', null, room_jid, {
  62514. 'matchBareFromJid': true
  62515. });
  62516. },
  62517. removeHandlers() {
  62518. /* Remove the presence and message handlers that were
  62519. * registered for this groupchat.
  62520. */
  62521. if (this.message_handler) {
  62522. _converse.connection.deleteHandler(this.message_handler);
  62523. delete this.message_handler;
  62524. }
  62525. if (this.presence_handler) {
  62526. _converse.connection.deleteHandler(this.presence_handler);
  62527. delete this.presence_handler;
  62528. }
  62529. return this;
  62530. },
  62531. addHandler(type, name, callback) {
  62532. /* Allows 'presence' and 'message' handlers to be
  62533. * registered. These will be executed once presence or
  62534. * message stanzas are received, and *before* this model's
  62535. * own handlers are executed.
  62536. */
  62537. if (_.isNil(this.handlers)) {
  62538. this.handlers = {};
  62539. }
  62540. if (_.isNil(this.handlers[type])) {
  62541. this.handlers[type] = {};
  62542. }
  62543. this.handlers[type][name] = callback;
  62544. },
  62545. getDisplayName() {
  62546. return this.get('name') || this.get('jid');
  62547. },
  62548. join(nick, password) {
  62549. /* Join the groupchat.
  62550. *
  62551. * Parameters:
  62552. * (String) nick: The user's nickname
  62553. * (String) password: Optional password, if required by
  62554. * the groupchat.
  62555. */
  62556. nick = nick ? nick : this.get('nick');
  62557. if (!nick) {
  62558. throw new TypeError('join: You need to provide a valid nickname');
  62559. }
  62560. if (this.get('connection_status') === converse.ROOMSTATUS.ENTERED) {
  62561. // We have restored a groupchat from session storage,
  62562. // so we don't send out a presence stanza again.
  62563. return this;
  62564. }
  62565. const stanza = $pres({
  62566. 'from': _converse.connection.jid,
  62567. 'to': this.getRoomJIDAndNick(nick)
  62568. }).c("x", {
  62569. 'xmlns': Strophe.NS.MUC
  62570. }).c("history", {
  62571. 'maxstanzas': this.get('mam_enabled') ? 0 : _converse.muc_history_max_stanzas
  62572. }).up();
  62573. if (password) {
  62574. stanza.cnode(Strophe.xmlElement("password", [], password));
  62575. }
  62576. this.save('connection_status', converse.ROOMSTATUS.CONNECTING);
  62577. _converse.connection.send(stanza);
  62578. return this;
  62579. },
  62580. leave(exit_msg) {
  62581. /* Leave the groupchat.
  62582. *
  62583. * Parameters:
  62584. * (String) exit_msg: Optional message to indicate your
  62585. * reason for leaving.
  62586. */
  62587. this.occupants.browserStorage._clear();
  62588. this.occupants.reset();
  62589. const disco_entity = _converse.disco_entities.get(this.get('jid'));
  62590. if (disco_entity) {
  62591. disco_entity.destroy();
  62592. }
  62593. if (_converse.connection.connected) {
  62594. this.sendUnavailablePresence(exit_msg);
  62595. }
  62596. u.safeSave(this, {
  62597. 'connection_status': converse.ROOMSTATUS.DISCONNECTED
  62598. });
  62599. this.removeHandlers();
  62600. },
  62601. sendUnavailablePresence(exit_msg) {
  62602. const presence = $pres({
  62603. type: "unavailable",
  62604. from: _converse.connection.jid,
  62605. to: this.getRoomJIDAndNick()
  62606. });
  62607. if (exit_msg !== null) {
  62608. presence.c("status", exit_msg);
  62609. }
  62610. _converse.connection.sendPresence(presence);
  62611. },
  62612. getReferenceForMention(mention, index) {
  62613. const longest_match = u.getLongestSubstring(mention, this.occupants.map(o => o.getDisplayName()));
  62614. if (!longest_match) {
  62615. return null;
  62616. }
  62617. if ((mention[longest_match.length] || '').match(/[A-Za-zäëïöüâêîôûáéíóúàèìòùÄËÏÖÜÂÊÎÔÛÁÉÍÓÚÀÈÌÒÙ]/i)) {
  62618. // avoid false positives, i.e. mentions that have
  62619. // further alphabetical characters than our longest
  62620. // match.
  62621. return null;
  62622. }
  62623. const occupant = this.occupants.findOccupant({
  62624. 'nick': longest_match
  62625. }) || this.occupants.findOccupant({
  62626. 'jid': longest_match
  62627. });
  62628. if (!occupant) {
  62629. return null;
  62630. }
  62631. const obj = {
  62632. 'begin': index,
  62633. 'end': index + longest_match.length,
  62634. 'value': longest_match,
  62635. 'type': 'mention'
  62636. };
  62637. if (occupant.get('jid')) {
  62638. obj.uri = `xmpp:${occupant.get('jid')}`;
  62639. }
  62640. return obj;
  62641. },
  62642. extractReference(text, index) {
  62643. for (let i = index; i < text.length; i++) {
  62644. if (text[i] !== '@') {
  62645. continue;
  62646. } else {
  62647. const match = text.slice(i + 1),
  62648. ref = this.getReferenceForMention(match, i);
  62649. if (ref) {
  62650. return [text.slice(0, i) + match, ref, i];
  62651. }
  62652. }
  62653. }
  62654. return;
  62655. },
  62656. parseTextForReferences(text) {
  62657. const refs = [];
  62658. let index = 0;
  62659. while (index < (text || '').length) {
  62660. const result = this.extractReference(text, index);
  62661. if (result) {
  62662. text = result[0]; // @ gets filtered out
  62663. refs.push(result[1]);
  62664. index = result[2];
  62665. } else {
  62666. break;
  62667. }
  62668. }
  62669. return [text, refs];
  62670. },
  62671. getOutgoingMessageAttributes(text, spoiler_hint) {
  62672. const is_spoiler = this.get('composing_spoiler');
  62673. var references;
  62674. var _this$parseTextForRef = this.parseTextForReferences(text);
  62675. var _this$parseTextForRef2 = _slicedToArray(_this$parseTextForRef, 2);
  62676. text = _this$parseTextForRef2[0];
  62677. references = _this$parseTextForRef2[1];
  62678. return {
  62679. 'from': `${this.get('jid')}/${this.get('nick')}`,
  62680. 'fullname': this.get('nick'),
  62681. 'is_spoiler': is_spoiler,
  62682. 'message': text ? u.httpToGeoUri(u.shortnameToUnicode(text), _converse) : undefined,
  62683. 'nick': this.get('nick'),
  62684. 'references': references,
  62685. 'sender': 'me',
  62686. 'spoiler_hint': is_spoiler ? spoiler_hint : undefined,
  62687. 'type': 'groupchat'
  62688. };
  62689. },
  62690. getRoomJIDAndNick(nick) {
  62691. /* Utility method to construct the JID for the current user
  62692. * as occupant of the groupchat.
  62693. *
  62694. * This is the groupchat JID, with the user's nick added at the
  62695. * end.
  62696. *
  62697. * For example: groupchat@conference.example.org/nickname
  62698. */
  62699. if (nick) {
  62700. this.save({
  62701. 'nick': nick
  62702. });
  62703. } else {
  62704. nick = this.get('nick');
  62705. }
  62706. const groupchat = this.get('jid');
  62707. const jid = Strophe.getBareJidFromJid(groupchat);
  62708. return jid + (nick !== null ? `/${nick}` : "");
  62709. },
  62710. sendChatState() {
  62711. /* Sends a message with the status of the user in this chat session
  62712. * as taken from the 'chat_state' attribute of the chat box.
  62713. * See XEP-0085 Chat State Notifications.
  62714. */
  62715. if (this.get('connection_status') !== converse.ROOMSTATUS.ENTERED) {
  62716. return;
  62717. }
  62718. const chat_state = this.get('chat_state');
  62719. if (chat_state === _converse.GONE) {
  62720. // <gone/> is not applicable within MUC context
  62721. return;
  62722. }
  62723. _converse.connection.send($msg({
  62724. 'to': this.get('jid'),
  62725. 'type': 'groupchat'
  62726. }).c(chat_state, {
  62727. 'xmlns': Strophe.NS.CHATSTATES
  62728. }).up().c('no-store', {
  62729. 'xmlns': Strophe.NS.HINTS
  62730. }).up().c('no-permanent-store', {
  62731. 'xmlns': Strophe.NS.HINTS
  62732. }));
  62733. },
  62734. directInvite(recipient, reason) {
  62735. /* Send a direct invitation as per XEP-0249
  62736. *
  62737. * Parameters:
  62738. * (String) recipient - JID of the person being invited
  62739. * (String) reason - Optional reason for the invitation
  62740. */
  62741. if (this.get('membersonly')) {
  62742. // When inviting to a members-only groupchat, we first add
  62743. // the person to the member list by giving them an
  62744. // affiliation of 'member' (if they're not affiliated
  62745. // already), otherwise they won't be able to join.
  62746. const map = {};
  62747. map[recipient] = 'member';
  62748. const deltaFunc = _.partial(u.computeAffiliationsDelta, true, false);
  62749. this.updateMemberLists([{
  62750. 'jid': recipient,
  62751. 'affiliation': 'member',
  62752. 'reason': reason
  62753. }], ['member', 'owner', 'admin'], deltaFunc);
  62754. }
  62755. const attrs = {
  62756. 'xmlns': 'jabber:x:conference',
  62757. 'jid': this.get('jid')
  62758. };
  62759. if (reason !== null) {
  62760. attrs.reason = reason;
  62761. }
  62762. if (this.get('password')) {
  62763. attrs.password = this.get('password');
  62764. }
  62765. const invitation = $msg({
  62766. from: _converse.connection.jid,
  62767. to: recipient,
  62768. id: _converse.connection.getUniqueId()
  62769. }).c('x', attrs);
  62770. _converse.connection.send(invitation);
  62771. _converse.emit('roomInviteSent', {
  62772. 'room': this,
  62773. 'recipient': recipient,
  62774. 'reason': reason
  62775. });
  62776. },
  62777. async refreshRoomFeatures() {
  62778. await _converse.api.disco.refreshFeatures(this.get('jid'));
  62779. return this.getRoomFeatures();
  62780. },
  62781. async getRoomFeatures() {
  62782. const features = await _converse.api.disco.getFeatures(this.get('jid')),
  62783. fields = await _converse.api.disco.getFields(this.get('jid')),
  62784. identity = await _converse.api.disco.getIdentity('conference', 'text', this.get('jid')),
  62785. attrs = {
  62786. 'features_fetched': moment().format(),
  62787. 'name': identity && identity.get('name')
  62788. };
  62789. features.each(feature => {
  62790. const fieldname = feature.get('var');
  62791. if (!fieldname.startsWith('muc_')) {
  62792. if (fieldname === Strophe.NS.MAM) {
  62793. attrs.mam_enabled = true;
  62794. }
  62795. return;
  62796. }
  62797. attrs[fieldname.replace('muc_', '')] = true;
  62798. });
  62799. attrs.description = _.get(fields.findWhere({
  62800. 'var': "muc#roominfo_description"
  62801. }), 'attributes.value');
  62802. this.save(attrs);
  62803. },
  62804. requestMemberList(affiliation) {
  62805. /* Send an IQ stanza to the server, asking it for the
  62806. * member-list of this groupchat.
  62807. *
  62808. * See: http://xmpp.org/extensions/xep-0045.html#modifymember
  62809. *
  62810. * Parameters:
  62811. * (String) affiliation: The specific member list to
  62812. * fetch. 'admin', 'owner' or 'member'.
  62813. *
  62814. * Returns:
  62815. * A promise which resolves once the list has been
  62816. * retrieved.
  62817. */
  62818. affiliation = affiliation || 'member';
  62819. const iq = $iq({
  62820. to: this.get('jid'),
  62821. type: "get"
  62822. }).c("query", {
  62823. xmlns: Strophe.NS.MUC_ADMIN
  62824. }).c("item", {
  62825. 'affiliation': affiliation
  62826. });
  62827. return _converse.api.sendIQ(iq);
  62828. },
  62829. setAffiliation(affiliation, members) {
  62830. /* Send IQ stanzas to the server to set an affiliation for
  62831. * the provided JIDs.
  62832. *
  62833. * See: http://xmpp.org/extensions/xep-0045.html#modifymember
  62834. *
  62835. * XXX: Prosody doesn't accept multiple JIDs' affiliations
  62836. * being set in one IQ stanza, so as a workaround we send
  62837. * a separate stanza for each JID.
  62838. * Related ticket: https://issues.prosody.im/345
  62839. *
  62840. * Parameters:
  62841. * (String) affiliation: The affiliation
  62842. * (Object) members: A map of jids, affiliations and
  62843. * optionally reasons. Only those entries with the
  62844. * same affiliation as being currently set will be
  62845. * considered.
  62846. *
  62847. * Returns:
  62848. * A promise which resolves and fails depending on the
  62849. * XMPP server response.
  62850. */
  62851. members = _.filter(members, member => // We only want those members who have the right
  62852. // affiliation (or none, which implies the provided one).
  62853. _.isUndefined(member.affiliation) || member.affiliation === affiliation);
  62854. const promises = _.map(members, _.bind(this.sendAffiliationIQ, this, affiliation));
  62855. return Promise.all(promises);
  62856. },
  62857. saveConfiguration(form) {
  62858. /* Submit the groupchat configuration form by sending an IQ
  62859. * stanza to the server.
  62860. *
  62861. * Returns a promise which resolves once the XMPP server
  62862. * has return a response IQ.
  62863. *
  62864. * Parameters:
  62865. * (HTMLElement) form: The configuration form DOM element.
  62866. * If no form is provided, the default configuration
  62867. * values will be used.
  62868. */
  62869. return new Promise((resolve, reject) => {
  62870. const inputs = form ? sizzle(':input:not([type=button]):not([type=submit])', form) : [],
  62871. configArray = _.map(inputs, u.webForm2xForm);
  62872. this.sendConfiguration(configArray, resolve, reject);
  62873. });
  62874. },
  62875. autoConfigureChatRoom() {
  62876. /* Automatically configure groupchat based on this model's
  62877. * 'roomconfig' data.
  62878. *
  62879. * Returns a promise which resolves once a response IQ has
  62880. * been received.
  62881. */
  62882. return new Promise((resolve, reject) => {
  62883. this.fetchRoomConfiguration().then(stanza => {
  62884. const configArray = [],
  62885. fields = stanza.querySelectorAll('field'),
  62886. config = this.get('roomconfig');
  62887. let count = fields.length;
  62888. _.each(fields, field => {
  62889. const fieldname = field.getAttribute('var').replace('muc#roomconfig_', ''),
  62890. type = field.getAttribute('type');
  62891. let value;
  62892. if (fieldname in config) {
  62893. switch (type) {
  62894. case 'boolean':
  62895. value = config[fieldname] ? 1 : 0;
  62896. break;
  62897. case 'list-multi':
  62898. // TODO: we don't yet handle "list-multi" types
  62899. value = field.innerHTML;
  62900. break;
  62901. default:
  62902. value = config[fieldname];
  62903. }
  62904. field.innerHTML = $build('value').t(value);
  62905. }
  62906. configArray.push(field);
  62907. if (! --count) {
  62908. this.sendConfiguration(configArray, resolve, reject);
  62909. }
  62910. });
  62911. });
  62912. });
  62913. },
  62914. fetchRoomConfiguration() {
  62915. /* Send an IQ stanza to fetch the groupchat configuration data.
  62916. * Returns a promise which resolves once the response IQ
  62917. * has been received.
  62918. */
  62919. return new Promise((resolve, reject) => {
  62920. _converse.connection.sendIQ($iq({
  62921. 'to': this.get('jid'),
  62922. 'type': "get"
  62923. }).c("query", {
  62924. xmlns: Strophe.NS.MUC_OWNER
  62925. }), resolve, reject);
  62926. });
  62927. },
  62928. sendConfiguration(config, callback, errback) {
  62929. /* Send an IQ stanza with the groupchat configuration.
  62930. *
  62931. * Parameters:
  62932. * (Array) config: The groupchat configuration
  62933. * (Function) callback: Callback upon succesful IQ response
  62934. * The first parameter passed in is IQ containing the
  62935. * groupchat configuration.
  62936. * The second is the response IQ from the server.
  62937. * (Function) errback: Callback upon error IQ response
  62938. * The first parameter passed in is IQ containing the
  62939. * groupchat configuration.
  62940. * The second is the response IQ from the server.
  62941. */
  62942. const iq = $iq({
  62943. to: this.get('jid'),
  62944. type: "set"
  62945. }).c("query", {
  62946. xmlns: Strophe.NS.MUC_OWNER
  62947. }).c("x", {
  62948. xmlns: Strophe.NS.XFORM,
  62949. type: "submit"
  62950. });
  62951. _.each(config || [], function (node) {
  62952. iq.cnode(node).up();
  62953. });
  62954. callback = _.isUndefined(callback) ? _.noop : _.partial(callback, iq.nodeTree);
  62955. errback = _.isUndefined(errback) ? _.noop : _.partial(errback, iq.nodeTree);
  62956. return _converse.connection.sendIQ(iq, callback, errback);
  62957. },
  62958. saveAffiliationAndRole(pres) {
  62959. /* Parse the presence stanza for the current user's
  62960. * affiliation.
  62961. *
  62962. * Parameters:
  62963. * (XMLElement) pres: A <presence> stanza.
  62964. */
  62965. const item = sizzle(`x[xmlns="${Strophe.NS.MUC_USER}"] item`, pres).pop();
  62966. const is_self = pres.querySelector("status[code='110']");
  62967. if (is_self && !_.isNil(item)) {
  62968. const affiliation = item.getAttribute('affiliation');
  62969. const role = item.getAttribute('role');
  62970. if (affiliation) {
  62971. this.save({
  62972. 'affiliation': affiliation
  62973. });
  62974. }
  62975. if (role) {
  62976. this.save({
  62977. 'role': role
  62978. });
  62979. }
  62980. }
  62981. },
  62982. sendAffiliationIQ(affiliation, member) {
  62983. /* Send an IQ stanza specifying an affiliation change.
  62984. *
  62985. * Paremeters:
  62986. * (String) affiliation: affiliation (could also be stored
  62987. * on the member object).
  62988. * (Object) member: Map containing the member's jid and
  62989. * optionally a reason and affiliation.
  62990. */
  62991. return new Promise((resolve, reject) => {
  62992. const iq = $iq({
  62993. to: this.get('jid'),
  62994. type: "set"
  62995. }).c("query", {
  62996. xmlns: Strophe.NS.MUC_ADMIN
  62997. }).c("item", {
  62998. 'affiliation': member.affiliation || affiliation,
  62999. 'nick': member.nick,
  63000. 'jid': member.jid
  63001. });
  63002. if (!_.isUndefined(member.reason)) {
  63003. iq.c("reason", member.reason);
  63004. }
  63005. _converse.connection.sendIQ(iq, resolve, reject);
  63006. });
  63007. },
  63008. setAffiliations(members) {
  63009. /* Send IQ stanzas to the server to modify the
  63010. * affiliations in this groupchat.
  63011. *
  63012. * See: http://xmpp.org/extensions/xep-0045.html#modifymember
  63013. *
  63014. * Parameters:
  63015. * (Object) members: A map of jids, affiliations and optionally reasons
  63016. * (Function) onSuccess: callback for a succesful response
  63017. * (Function) onError: callback for an error response
  63018. */
  63019. const affiliations = _.uniq(_.map(members, 'affiliation'));
  63020. return Promise.all(_.map(affiliations, _.partial(this.setAffiliation.bind(this), _, members)));
  63021. },
  63022. async getJidsWithAffiliations(affiliations) {
  63023. /* Returns a map of JIDs that have the affiliations
  63024. * as provided.
  63025. */
  63026. if (_.isString(affiliations)) {
  63027. affiliations = [affiliations];
  63028. }
  63029. const result = await Promise.all(affiliations.map(a => this.requestMemberList(a).then(iq => u.parseMemberListIQ(iq)).catch(iq => {
  63030. _converse.log(iq, Strophe.LogLevel.ERROR);
  63031. })));
  63032. return [].concat.apply([], result).filter(p => p);
  63033. },
  63034. updateMemberLists(members, affiliations, deltaFunc) {
  63035. /* Fetch the lists of users with the given affiliations.
  63036. * Then compute the delta between those users and
  63037. * the passed in members, and if it exists, send the delta
  63038. * to the XMPP server to update the member list.
  63039. *
  63040. * Parameters:
  63041. * (Object) members: Map of member jids and affiliations.
  63042. * (String|Array) affiliation: An array of affiliations or
  63043. * a string if only one affiliation.
  63044. * (Function) deltaFunc: The function to compute the delta
  63045. * between old and new member lists.
  63046. *
  63047. * Returns:
  63048. * A promise which is resolved once the list has been
  63049. * updated or once it's been established there's no need
  63050. * to update the list.
  63051. */
  63052. this.getJidsWithAffiliations(affiliations).then(old_members => this.setAffiliations(deltaFunc(members, old_members))).then(() => this.occupants.fetchMembers()).catch(_.partial(_converse.log, _, Strophe.LogLevel.ERROR));
  63053. },
  63054. getDefaultNick() {
  63055. /* The default nickname (used when muc_nickname_from_jid is true)
  63056. * is the node part of the user's JID.
  63057. * We put this in a separate method so that it can be
  63058. * overridden by plugins.
  63059. */
  63060. const nick = _converse.xmppstatus.vcard.get('nickname');
  63061. if (nick) {
  63062. return nick;
  63063. } else if (_converse.muc_nickname_from_jid) {
  63064. return Strophe.unescapeNode(Strophe.getNodeFromJid(_converse.bare_jid));
  63065. }
  63066. },
  63067. checkForReservedNick() {
  63068. /* Use service-discovery to ask the XMPP server whether
  63069. * this user has a reserved nickname for this groupchat.
  63070. * If so, we'll use that, otherwise we render the nickname form.
  63071. *
  63072. * Parameters:
  63073. * (Function) callback: Callback upon succesful IQ response
  63074. * (Function) errback: Callback upon error IQ response
  63075. */
  63076. return _converse.api.sendIQ($iq({
  63077. 'to': this.get('jid'),
  63078. 'from': _converse.connection.jid,
  63079. 'type': "get"
  63080. }).c("query", {
  63081. 'xmlns': Strophe.NS.DISCO_INFO,
  63082. 'node': 'x-roomuser-item'
  63083. })).then(iq => {
  63084. const identity_el = iq.querySelector('query[node="x-roomuser-item"] identity'),
  63085. nick = identity_el ? identity_el.getAttribute('name') : null;
  63086. this.save({
  63087. 'reserved_nick': nick,
  63088. 'nick': nick
  63089. }, {
  63090. 'silent': true
  63091. });
  63092. return iq;
  63093. });
  63094. },
  63095. async registerNickname() {
  63096. // See https://xmpp.org/extensions/xep-0045.html#register
  63097. const nick = this.get('nick'),
  63098. jid = this.get('jid');
  63099. let iq, err_msg;
  63100. try {
  63101. iq = await _converse.api.sendIQ($iq({
  63102. 'to': jid,
  63103. 'from': _converse.connection.jid,
  63104. 'type': 'get'
  63105. }).c('query', {
  63106. 'xmlns': Strophe.NS.MUC_REGISTER
  63107. }));
  63108. } catch (e) {
  63109. if (sizzle('not-allowed[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]', e).length) {
  63110. err_msg = __("You're not allowed to register yourself in this groupchat.");
  63111. } else if (sizzle('registration-required[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]', e).length) {
  63112. err_msg = __("You're not allowed to register in this groupchat because it's members-only.");
  63113. }
  63114. _converse.log(e, Strophe.LogLevel.ERROR);
  63115. return err_msg;
  63116. }
  63117. const required_fields = sizzle('field required', iq).map(f => f.parentElement);
  63118. if (required_fields.length > 1 && required_fields[0].getAttribute('var') !== 'muc#register_roomnick') {
  63119. return _converse.log(`Can't register the user register in the groupchat ${jid} due to the required fields`);
  63120. }
  63121. try {
  63122. await _converse.api.sendIQ($iq({
  63123. 'to': jid,
  63124. 'from': _converse.connection.jid,
  63125. 'type': 'set'
  63126. }).c('query', {
  63127. 'xmlns': Strophe.NS.MUC_REGISTER
  63128. }).c('x', {
  63129. 'xmlns': Strophe.NS.XFORM,
  63130. 'type': 'submit'
  63131. }).c('field', {
  63132. 'var': 'FORM_TYPE'
  63133. }).c('value').t('http://jabber.org/protocol/muc#register').up().up().c('field', {
  63134. 'var': 'muc#register_roomnick'
  63135. }).c('value').t(nick));
  63136. } catch (e) {
  63137. if (sizzle('service-unavailable[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]', e).length) {
  63138. err_msg = __("Can't register your nickname in this groupchat, it doesn't support registration.");
  63139. } else if (sizzle('bad-request[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]', e).length) {
  63140. err_msg = __("Can't register your nickname in this groupchat, invalid data form supplied.");
  63141. }
  63142. _converse.log(err_msg);
  63143. _converse.log(e, Strophe.LogLevel.ERROR);
  63144. return err_msg;
  63145. }
  63146. },
  63147. updateOccupantsOnPresence(pres) {
  63148. /* Given a presence stanza, update the occupant model
  63149. * based on its contents.
  63150. *
  63151. * Parameters:
  63152. * (XMLElement) pres: The presence stanza
  63153. */
  63154. const data = this.parsePresence(pres);
  63155. if (data.type === 'error' || !data.jid && !data.nick) {
  63156. return true;
  63157. }
  63158. const occupant = this.occupants.findOccupant(data);
  63159. if (data.type === 'unavailable' && occupant) {
  63160. if (!_.includes(data.states, converse.MUC_NICK_CHANGED_CODE) && !occupant.isMember()) {
  63161. // We only destroy the occupant if this is not a nickname change operation.
  63162. // and if they're not on the member lists.
  63163. // Before destroying we set the new data, so
  63164. // that we can show the disconnection message.
  63165. occupant.set(data);
  63166. occupant.destroy();
  63167. return;
  63168. }
  63169. }
  63170. const jid = Strophe.getBareJidFromJid(data.jid);
  63171. const attributes = _.extend(data, {
  63172. 'jid': jid ? jid : undefined,
  63173. 'resource': data.jid ? Strophe.getResourceFromJid(data.jid) : undefined
  63174. });
  63175. if (occupant) {
  63176. occupant.save(attributes);
  63177. } else {
  63178. this.occupants.create(attributes);
  63179. }
  63180. },
  63181. parsePresence(pres) {
  63182. const from = pres.getAttribute("from"),
  63183. type = pres.getAttribute("type"),
  63184. data = {
  63185. 'from': from,
  63186. 'nick': Strophe.getResourceFromJid(from),
  63187. 'type': type,
  63188. 'states': [],
  63189. 'show': type !== 'unavailable' ? 'online' : 'offline'
  63190. };
  63191. _.each(pres.childNodes, function (child) {
  63192. switch (child.nodeName) {
  63193. case "status":
  63194. data.status = child.textContent || null;
  63195. break;
  63196. case "show":
  63197. data.show = child.textContent || 'online';
  63198. break;
  63199. case "x":
  63200. if (child.getAttribute("xmlns") === Strophe.NS.MUC_USER) {
  63201. _.each(child.childNodes, function (item) {
  63202. switch (item.nodeName) {
  63203. case "item":
  63204. data.affiliation = item.getAttribute("affiliation");
  63205. data.role = item.getAttribute("role");
  63206. data.jid = item.getAttribute("jid");
  63207. data.nick = item.getAttribute("nick") || data.nick;
  63208. break;
  63209. case "status":
  63210. if (item.getAttribute("code")) {
  63211. data.states.push(item.getAttribute("code"));
  63212. }
  63213. }
  63214. });
  63215. } else if (child.getAttribute("xmlns") === Strophe.NS.VCARDUPDATE) {
  63216. data.image_hash = _.get(child.querySelector('photo'), 'textContent');
  63217. }
  63218. }
  63219. });
  63220. return data;
  63221. },
  63222. isDuplicate(message, original_stanza) {
  63223. const msgid = message.getAttribute('id'),
  63224. jid = message.getAttribute('from');
  63225. if (msgid) {
  63226. return this.messages.where({
  63227. 'msgid': msgid,
  63228. 'from': jid
  63229. }).length;
  63230. }
  63231. return false;
  63232. },
  63233. fetchFeaturesIfConfigurationChanged(stanza) {
  63234. const configuration_changed = stanza.querySelector("status[code='104']"),
  63235. logging_enabled = stanza.querySelector("status[code='170']"),
  63236. logging_disabled = stanza.querySelector("status[code='171']"),
  63237. room_no_longer_anon = stanza.querySelector("status[code='172']"),
  63238. room_now_semi_anon = stanza.querySelector("status[code='173']"),
  63239. room_now_fully_anon = stanza.querySelector("status[code='173']");
  63240. if (configuration_changed || logging_enabled || logging_disabled || room_no_longer_anon || room_now_semi_anon || room_now_fully_anon) {
  63241. this.refreshRoomFeatures();
  63242. }
  63243. },
  63244. onMessage(stanza) {
  63245. /* Handler for all MUC messages sent to this groupchat.
  63246. *
  63247. * Parameters:
  63248. * (XMLElement) stanza: The message stanza.
  63249. */
  63250. this.fetchFeaturesIfConfigurationChanged(stanza);
  63251. const original_stanza = stanza,
  63252. forwarded = stanza.querySelector('forwarded');
  63253. if (!_.isNull(forwarded)) {
  63254. stanza = forwarded.querySelector('message');
  63255. }
  63256. if (this.isDuplicate(stanza, original_stanza)) {
  63257. return;
  63258. }
  63259. const jid = stanza.getAttribute('from'),
  63260. resource = Strophe.getResourceFromJid(jid),
  63261. sender = resource && Strophe.unescapeNode(resource) || '';
  63262. if (!this.handleMessageCorrection(stanza)) {
  63263. if (sender === '') {
  63264. return;
  63265. }
  63266. const subject_el = stanza.querySelector('subject');
  63267. if (subject_el) {
  63268. const subject = _.propertyOf(subject_el)('textContent') || '';
  63269. u.safeSave(this, {
  63270. 'subject': {
  63271. 'author': sender,
  63272. 'text': subject
  63273. }
  63274. });
  63275. }
  63276. this.createMessage(stanza, original_stanza).then(msg => this.incrementUnreadMsgCounter(msg)).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  63277. }
  63278. if (sender !== this.get('nick')) {
  63279. // We only emit an event if it's not our own message
  63280. _converse.emit('message', {
  63281. 'stanza': original_stanza,
  63282. 'chatbox': this
  63283. });
  63284. }
  63285. },
  63286. onPresence(pres) {
  63287. /* Handles all MUC presence stanzas.
  63288. *
  63289. * Parameters:
  63290. * (XMLElement) pres: The stanza
  63291. */
  63292. if (pres.getAttribute('type') === 'error') {
  63293. this.save('connection_status', converse.ROOMSTATUS.DISCONNECTED);
  63294. return;
  63295. }
  63296. const is_self = pres.querySelector("status[code='110']");
  63297. if (is_self && pres.getAttribute('type') !== 'unavailable') {
  63298. this.onOwnPresence(pres);
  63299. }
  63300. this.updateOccupantsOnPresence(pres);
  63301. if (this.get('role') !== 'none' && this.get('connection_status') === converse.ROOMSTATUS.CONNECTING) {
  63302. this.save('connection_status', converse.ROOMSTATUS.CONNECTED);
  63303. }
  63304. },
  63305. onOwnPresence(pres) {
  63306. /* Handles a received presence relating to the current
  63307. * user.
  63308. *
  63309. * For locked groupchats (which are by definition "new"), the
  63310. * groupchat will either be auto-configured or created instantly
  63311. * (with default config) or a configuration groupchat will be
  63312. * rendered.
  63313. *
  63314. * If the groupchat is not locked, then the groupchat will be
  63315. * auto-configured only if applicable and if the current
  63316. * user is the groupchat's owner.
  63317. *
  63318. * Parameters:
  63319. * (XMLElement) pres: The stanza
  63320. */
  63321. this.saveAffiliationAndRole(pres);
  63322. const locked_room = pres.querySelector("status[code='201']");
  63323. if (locked_room) {
  63324. if (this.get('auto_configure')) {
  63325. this.autoConfigureChatRoom().then(() => this.refreshRoomFeatures());
  63326. } else if (_converse.muc_instant_rooms) {
  63327. // Accept default configuration
  63328. this.saveConfiguration().then(() => this.getRoomFeatures());
  63329. } else {
  63330. this.trigger('configurationNeeded');
  63331. return; // We haven't yet entered the groupchat, so bail here.
  63332. }
  63333. } else if (!this.get('features_fetched')) {
  63334. // The features for this groupchat weren't fetched.
  63335. // That must mean it's a new groupchat without locking
  63336. // (in which case Prosody doesn't send a 201 status),
  63337. // otherwise the features would have been fetched in
  63338. // the "initialize" method already.
  63339. if (this.get('affiliation') === 'owner' && this.get('auto_configure')) {
  63340. this.autoConfigureChatRoom().then(() => this.refreshRoomFeatures());
  63341. } else {
  63342. this.getRoomFeatures();
  63343. }
  63344. }
  63345. this.save('connection_status', converse.ROOMSTATUS.ENTERED);
  63346. },
  63347. isUserMentioned(message) {
  63348. /* Returns a boolean to indicate whether the current user
  63349. * was mentioned in a message.
  63350. *
  63351. * Parameters:
  63352. * (String): The text message
  63353. */
  63354. const nick = this.get('nick');
  63355. if (message.get('references').length) {
  63356. const mentions = message.get('references').filter(ref => ref.type === 'mention').map(ref => ref.value);
  63357. return _.includes(mentions, nick);
  63358. } else {
  63359. return new RegExp(`\\b${nick}\\b`).test(message.get('message'));
  63360. }
  63361. },
  63362. incrementUnreadMsgCounter(message) {
  63363. /* Given a newly received message, update the unread counter if
  63364. * necessary.
  63365. *
  63366. * Parameters:
  63367. * (XMLElement): The <messsage> stanza
  63368. */
  63369. if (!message) {
  63370. return;
  63371. }
  63372. const body = message.get('message');
  63373. if (_.isNil(body)) {
  63374. return;
  63375. }
  63376. if (u.isNewMessage(message) && this.isHidden()) {
  63377. const settings = {
  63378. 'num_unread_general': this.get('num_unread_general') + 1
  63379. };
  63380. if (this.isUserMentioned(message)) {
  63381. settings.num_unread = this.get('num_unread') + 1;
  63382. _converse.incrementMsgCounter();
  63383. }
  63384. this.save(settings);
  63385. }
  63386. },
  63387. clearUnreadMsgCounter() {
  63388. u.safeSave(this, {
  63389. 'num_unread': 0,
  63390. 'num_unread_general': 0
  63391. });
  63392. }
  63393. });
  63394. _converse.ChatRoomOccupant = Backbone.Model.extend({
  63395. defaults: {
  63396. 'show': 'offline'
  63397. },
  63398. initialize(attributes) {
  63399. this.set(_.extend({
  63400. 'id': _converse.connection.getUniqueId()
  63401. }, attributes));
  63402. this.on('change:image_hash', this.onAvatarChanged, this);
  63403. },
  63404. onAvatarChanged() {
  63405. const hash = this.get('image_hash');
  63406. const vcards = [];
  63407. if (this.get('jid')) {
  63408. vcards.push(_converse.vcards.findWhere({
  63409. 'jid': this.get('jid')
  63410. }));
  63411. }
  63412. vcards.push(_converse.vcards.findWhere({
  63413. 'jid': this.get('from')
  63414. }));
  63415. _.forEach(_.filter(vcards, undefined), vcard => {
  63416. if (hash && vcard.get('image_hash') !== hash) {
  63417. _converse.api.vcard.update(vcard);
  63418. }
  63419. });
  63420. },
  63421. getDisplayName() {
  63422. return this.get('nick') || this.get('jid');
  63423. },
  63424. isMember() {
  63425. return _.includes(['admin', 'owner', 'member'], this.get('affiliation'));
  63426. }
  63427. });
  63428. _converse.ChatRoomOccupants = Backbone.Collection.extend({
  63429. model: _converse.ChatRoomOccupant,
  63430. comparator(occupant1, occupant2) {
  63431. const role1 = occupant1.get('role') || 'none';
  63432. const role2 = occupant2.get('role') || 'none';
  63433. if (MUC_ROLE_WEIGHTS[role1] === MUC_ROLE_WEIGHTS[role2]) {
  63434. const nick1 = occupant1.getDisplayName().toLowerCase();
  63435. const nick2 = occupant2.getDisplayName().toLowerCase();
  63436. return nick1 < nick2 ? -1 : nick1 > nick2 ? 1 : 0;
  63437. } else {
  63438. return MUC_ROLE_WEIGHTS[role1] < MUC_ROLE_WEIGHTS[role2] ? -1 : 1;
  63439. }
  63440. },
  63441. fetchMembers() {
  63442. this.chatroom.getJidsWithAffiliations(['member', 'owner', 'admin']).then(new_members => {
  63443. const new_jids = new_members.map(m => m.jid).filter(m => !_.isUndefined(m)),
  63444. new_nicks = new_members.map(m => !m.jid && m.nick || undefined).filter(m => !_.isUndefined(m)),
  63445. removed_members = this.filter(m => {
  63446. return f.includes(m.get('affiliation'), ['admin', 'member', 'owner']) && !f.includes(m.get('nick'), new_nicks) && !f.includes(m.get('jid'), new_jids);
  63447. });
  63448. _.each(removed_members, occupant => {
  63449. if (occupant.get('jid') === _converse.bare_jid) {
  63450. return;
  63451. }
  63452. if (occupant.get('show') === 'offline') {
  63453. occupant.destroy();
  63454. }
  63455. });
  63456. _.each(new_members, attrs => {
  63457. let occupant;
  63458. if (attrs.jid) {
  63459. occupant = this.findOccupant({
  63460. 'jid': attrs.jid
  63461. });
  63462. } else {
  63463. occupant = this.findOccupant({
  63464. 'nick': attrs.nick
  63465. });
  63466. }
  63467. if (occupant) {
  63468. occupant.save(attrs);
  63469. } else {
  63470. this.create(attrs);
  63471. }
  63472. });
  63473. }).catch(_.partial(_converse.log, _, Strophe.LogLevel.ERROR));
  63474. },
  63475. findOccupant(data) {
  63476. /* Try to find an existing occupant based on the passed in
  63477. * data object.
  63478. *
  63479. * If we have a JID, we use that as lookup variable,
  63480. * otherwise we use the nick. We don't always have both,
  63481. * but should have at least one or the other.
  63482. */
  63483. const jid = Strophe.getBareJidFromJid(data.jid);
  63484. if (jid !== null) {
  63485. return this.where({
  63486. 'jid': jid
  63487. }).pop();
  63488. } else {
  63489. return this.where({
  63490. 'nick': data.nick
  63491. }).pop();
  63492. }
  63493. }
  63494. });
  63495. _converse.RoomsPanelModel = Backbone.Model.extend({
  63496. defaults: {
  63497. 'muc_domain': ''
  63498. }
  63499. });
  63500. _converse.onDirectMUCInvitation = function (message) {
  63501. /* A direct MUC invitation to join a groupchat has been received
  63502. * See XEP-0249: Direct MUC invitations.
  63503. *
  63504. * Parameters:
  63505. * (XMLElement) message: The message stanza containing the
  63506. * invitation.
  63507. */
  63508. const x_el = sizzle('x[xmlns="jabber:x:conference"]', message).pop(),
  63509. from = Strophe.getBareJidFromJid(message.getAttribute('from')),
  63510. room_jid = x_el.getAttribute('jid'),
  63511. reason = x_el.getAttribute('reason');
  63512. let contact = _converse.roster.get(from),
  63513. result;
  63514. if (_converse.auto_join_on_invite) {
  63515. result = true;
  63516. } else {
  63517. // Invite request might come from someone not your roster list
  63518. contact = contact ? contact.get('fullname') : Strophe.getNodeFromJid(from);
  63519. if (!reason) {
  63520. result = confirm(__("%1$s has invited you to join a groupchat: %2$s", contact, room_jid));
  63521. } else {
  63522. result = confirm(__('%1$s has invited you to join a groupchat: %2$s, and left the following reason: "%3$s"', contact, room_jid, reason));
  63523. }
  63524. }
  63525. if (result === true) {
  63526. const chatroom = _converse.openChatRoom(room_jid, {
  63527. 'password': x_el.getAttribute('password')
  63528. });
  63529. if (chatroom.get('connection_status') === converse.ROOMSTATUS.DISCONNECTED) {
  63530. _converse.chatboxviews.get(room_jid).join();
  63531. }
  63532. }
  63533. };
  63534. if (_converse.allow_muc_invitations) {
  63535. const registerDirectInvitationHandler = function registerDirectInvitationHandler() {
  63536. _converse.connection.addHandler(message => {
  63537. _converse.onDirectMUCInvitation(message);
  63538. return true;
  63539. }, 'jabber:x:conference', 'message');
  63540. };
  63541. _converse.on('connected', registerDirectInvitationHandler);
  63542. _converse.on('reconnected', registerDirectInvitationHandler);
  63543. }
  63544. const getChatRoom = function getChatRoom(jid, attrs, create) {
  63545. jid = jid.toLowerCase();
  63546. attrs.type = _converse.CHATROOMS_TYPE;
  63547. attrs.id = jid;
  63548. attrs.box_id = b64_sha1(jid);
  63549. return _converse.chatboxes.getChatBox(jid, attrs, create);
  63550. };
  63551. const createChatRoom = function createChatRoom(jid, attrs) {
  63552. if (jid.startsWith('xmpp:') && jid.endsWith('?join')) {
  63553. jid = jid.replace(/^xmpp:/, '').replace(/\?join$/, '');
  63554. }
  63555. return getChatRoom(jid, attrs, true);
  63556. };
  63557. function autoJoinRooms() {
  63558. /* Automatically join groupchats, based on the
  63559. * "auto_join_rooms" configuration setting, which is an array
  63560. * of strings (groupchat JIDs) or objects (with groupchat JID and other
  63561. * settings).
  63562. */
  63563. _.each(_converse.auto_join_rooms, function (groupchat) {
  63564. if (_converse.chatboxes.where({
  63565. 'jid': groupchat
  63566. }).length) {
  63567. return;
  63568. }
  63569. if (_.isString(groupchat)) {
  63570. _converse.api.rooms.open(groupchat);
  63571. } else if (_.isObject(groupchat)) {
  63572. _converse.api.rooms.open(groupchat.jid, groupchat.nick);
  63573. } else {
  63574. _converse.log('Invalid groupchat criteria specified for "auto_join_rooms"', Strophe.LogLevel.ERROR);
  63575. }
  63576. });
  63577. _converse.emit('roomsAutoJoined');
  63578. }
  63579. function disconnectChatRooms() {
  63580. /* When disconnecting, mark all groupchats as
  63581. * disconnected, so that they will be properly entered again
  63582. * when fetched from session storage.
  63583. */
  63584. _converse.chatboxes.each(function (model) {
  63585. if (model.get('type') === _converse.CHATROOMS_TYPE) {
  63586. model.save('connection_status', converse.ROOMSTATUS.DISCONNECTED);
  63587. }
  63588. });
  63589. }
  63590. function fetchRegistrationForm(room_jid, user_jid) {
  63591. _converse.api.sendIQ($iq({
  63592. 'from': user_jid,
  63593. 'to': room_jid,
  63594. 'type': 'get'
  63595. }).c('query', {
  63596. 'xmlns': Strophe.NS.REGISTER
  63597. })).then(iq => {}).catch(iq => {
  63598. if (sizzle('item-not-found[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]', iq).length) {
  63599. this.feedback.set('error', __(`Error: the groupchat ${this.model.getDisplayName()} does not exist.`));
  63600. } else if (sizzle('not-allowed[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]').length) {
  63601. this.feedback.set('error', __(`Sorry, you're not allowed to register in this groupchat`));
  63602. }
  63603. });
  63604. }
  63605. /************************ BEGIN Event Handlers ************************/
  63606. _converse.on('addClientFeatures', () => {
  63607. if (_converse.allow_muc) {
  63608. _converse.api.disco.own.features.add(Strophe.NS.MUC);
  63609. }
  63610. if (_converse.allow_muc_invitations) {
  63611. _converse.api.disco.own.features.add('jabber:x:conference'); // Invites
  63612. }
  63613. });
  63614. _converse.api.listen.on('chatBoxesFetched', autoJoinRooms);
  63615. _converse.api.listen.on('disconnecting', disconnectChatRooms);
  63616. _converse.api.listen.on('statusInitialized', () => {
  63617. // XXX: For websocket connections, we disconnect from all
  63618. // chatrooms when the page reloads. This is a workaround for
  63619. // issue #1111 and should be removed once we support XEP-0198
  63620. const options = {
  63621. 'once': true,
  63622. 'passive': true
  63623. };
  63624. window.addEventListener(_converse.unloadevent, () => {
  63625. if (_converse.connection._proto instanceof Strophe.Websocket) {
  63626. disconnectChatRooms();
  63627. }
  63628. });
  63629. });
  63630. /************************ END Event Handlers ************************/
  63631. /************************ BEGIN API ************************/
  63632. // We extend the default converse.js API to add methods specific to MUC groupchats.
  63633. _.extend(_converse.api, {
  63634. /**
  63635. * The "rooms" namespace groups methods relevant to chatrooms
  63636. * (aka groupchats).
  63637. *
  63638. * @namespace _converse.api.rooms
  63639. * @memberOf _converse.api
  63640. */
  63641. 'rooms': {
  63642. /**
  63643. * Creates a new MUC chatroom (aka groupchat)
  63644. *
  63645. * Similar to {@link _converse.api.rooms.open}, but creates
  63646. * the chatroom in the background (i.e. doesn't cause a
  63647. * view to open).
  63648. *
  63649. * @method _converse.api.rooms.create
  63650. * @param {(string[]|string)} jid|jids The JID or array of
  63651. * JIDs of the chatroom(s) to create
  63652. * @param {object} [attrs] attrs The room attributes
  63653. */
  63654. 'create'(jids, attrs) {
  63655. if (_.isString(attrs)) {
  63656. attrs = {
  63657. 'nick': attrs
  63658. };
  63659. } else if (_.isUndefined(attrs)) {
  63660. attrs = {};
  63661. }
  63662. if (_.isUndefined(attrs.maximize)) {
  63663. attrs.maximize = false;
  63664. }
  63665. if (!attrs.nick && _converse.muc_nickname_from_jid) {
  63666. attrs.nick = Strophe.getNodeFromJid(_converse.bare_jid);
  63667. }
  63668. if (_.isUndefined(jids)) {
  63669. throw new TypeError('rooms.create: You need to provide at least one JID');
  63670. } else if (_.isString(jids)) {
  63671. return createChatRoom(jids, attrs);
  63672. }
  63673. return _.map(jids, _.partial(createChatRoom, _, attrs));
  63674. },
  63675. /**
  63676. * Opens a MUC chatroom (aka groupchat)
  63677. *
  63678. * Similar to {@link _converse.api.chats.open}, but for groupchats.
  63679. *
  63680. * @method _converse.api.rooms.open
  63681. * @param {string} jid The room JID or JIDs (if not specified, all
  63682. * currently open rooms will be returned).
  63683. * @param {string} attrs A map containing any extra room attributes.
  63684. * @param {string} [attrs.nick] The current user's nickname for the MUC
  63685. * @param {boolean} [attrs.auto_configure] A boolean, indicating
  63686. * whether the room should be configured automatically or not.
  63687. * If set to `true`, then it makes sense to pass in configuration settings.
  63688. * @param {object} [attrs.roomconfig] A map of configuration settings to be used when the room gets
  63689. * configured automatically. Currently it doesn't make sense to specify
  63690. * `roomconfig` values if `auto_configure` is set to `false`.
  63691. * For a list of configuration values that can be passed in, refer to these values
  63692. * in the [XEP-0045 MUC specification](http://xmpp.org/extensions/xep-0045.html#registrar-formtype-owner).
  63693. * The values should be named without the `muc#roomconfig_` prefix.
  63694. * @param {boolean} [attrs.maximize] A boolean, indicating whether minimized rooms should also be
  63695. * maximized, when opened. Set to `false` by default.
  63696. * @param {boolean} [attrs.bring_to_foreground] A boolean indicating whether the room should be
  63697. * brought to the foreground and therefore replace the currently shown chat.
  63698. * If there is no chat currently open, then this option is ineffective.
  63699. *
  63700. * @example
  63701. * this._converse.api.rooms.open('group@muc.example.com')
  63702. *
  63703. * @example
  63704. * // To return an array of rooms, provide an array of room JIDs:
  63705. * _converse.api.rooms.open(['group1@muc.example.com', 'group2@muc.example.com'])
  63706. *
  63707. * @example
  63708. * // To setup a custom nickname when joining the room, provide the optional nick argument:
  63709. * _converse.api.rooms.open('group@muc.example.com', {'nick': 'mycustomnick'})
  63710. *
  63711. * @example
  63712. * // For example, opening a room with a specific default configuration:
  63713. * _converse.api.rooms.open(
  63714. * 'myroom@conference.example.org',
  63715. * { 'nick': 'coolguy69',
  63716. * 'auto_configure': true,
  63717. * 'roomconfig': {
  63718. * 'changesubject': false,
  63719. * 'membersonly': true,
  63720. * 'persistentroom': true,
  63721. * 'publicroom': true,
  63722. * 'roomdesc': 'Comfy room for hanging out',
  63723. * 'whois': 'anyone'
  63724. * }
  63725. * },
  63726. * true
  63727. * );
  63728. */
  63729. 'open'(jids, attrs) {
  63730. return new Promise((resolve, reject) => {
  63731. _converse.api.waitUntil('chatBoxesFetched').then(() => {
  63732. if (_.isUndefined(jids)) {
  63733. const err_msg = 'rooms.open: You need to provide at least one JID';
  63734. _converse.log(err_msg, Strophe.LogLevel.ERROR);
  63735. reject(new TypeError(err_msg));
  63736. } else if (_.isString(jids)) {
  63737. resolve(_converse.api.rooms.create(jids, attrs).trigger('show'));
  63738. } else {
  63739. resolve(_.map(jids, jid => _converse.api.rooms.create(jid, attrs).trigger('show')));
  63740. }
  63741. });
  63742. });
  63743. },
  63744. /**
  63745. * Returns an object representing a MUC chatroom (aka groupchat)
  63746. *
  63747. * @method _converse.api.rooms.get
  63748. * @param {string} [jid] The room JID (if not specified, all rooms will be returned).
  63749. * @param {object} attrs A map containing any extra room attributes For example, if you want
  63750. * to specify the nickname, use `{'nick': 'bloodninja'}`. Previously (before
  63751. * version 1.0.7, the second parameter only accepted the nickname (as a string
  63752. * value). This is currently still accepted, but then you can't pass in any
  63753. * other room attributes. If the nickname is not specified then the node part of
  63754. * the user's JID will be used.
  63755. * @param {boolean} create A boolean indicating whether the room should be created
  63756. * if not found (default: `false`)
  63757. * @example
  63758. * _converse.api.waitUntil('roomsAutoJoined').then(() => {
  63759. * const create_if_not_found = true;
  63760. * _converse.api.rooms.get(
  63761. * 'group@muc.example.com',
  63762. * {'nick': 'dread-pirate-roberts'},
  63763. * create_if_not_found
  63764. * )
  63765. * });
  63766. */
  63767. 'get'(jids, attrs, create) {
  63768. if (_.isString(attrs)) {
  63769. attrs = {
  63770. 'nick': attrs
  63771. };
  63772. } else if (_.isUndefined(attrs)) {
  63773. attrs = {};
  63774. }
  63775. if (_.isUndefined(jids)) {
  63776. const result = [];
  63777. _converse.chatboxes.each(function (chatbox) {
  63778. if (chatbox.get('type') === _converse.CHATROOMS_TYPE) {
  63779. result.push(chatbox);
  63780. }
  63781. });
  63782. return result;
  63783. }
  63784. if (!attrs.nick) {
  63785. attrs.nick = Strophe.getNodeFromJid(_converse.bare_jid);
  63786. }
  63787. if (_.isString(jids)) {
  63788. return getChatRoom(jids, attrs);
  63789. }
  63790. return _.map(jids, _.partial(getChatRoom, _, attrs));
  63791. }
  63792. }
  63793. });
  63794. /************************ END API ************************/
  63795. }
  63796. });
  63797. });
  63798. /***/ }),
  63799. /***/ "./src/converse-notification.js":
  63800. /*!**************************************!*\
  63801. !*** ./src/converse-notification.js ***!
  63802. \**************************************/
  63803. /*! no static exports found */
  63804. /***/ (function(module, exports, __webpack_require__) {
  63805. "use strict";
  63806. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  63807. // Converse.js (A browser based XMPP chat client)
  63808. // http://conversejs.org
  63809. //
  63810. // Copyright (c) 2013-2018, JC Brand <jc@opkode.com>
  63811. // Licensed under the Mozilla Public License (MPLv2)
  63812. //
  63813. /*global define */
  63814. (function (root, factory) {
  63815. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  63816. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  63817. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  63818. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  63819. })(void 0, function (converse) {
  63820. "use strict";
  63821. const _converse$env = converse.env,
  63822. Strophe = _converse$env.Strophe,
  63823. _ = _converse$env._,
  63824. sizzle = _converse$env.sizzle,
  63825. u = converse.env.utils;
  63826. converse.plugins.add('converse-notification', {
  63827. dependencies: ["converse-chatboxes"],
  63828. initialize() {
  63829. /* The initialize function gets called as soon as the plugin is
  63830. * loaded by converse.js's plugin machinery.
  63831. */
  63832. const _converse = this._converse;
  63833. const __ = _converse.__;
  63834. _converse.supports_html5_notification = "Notification" in window;
  63835. _converse.api.settings.update({
  63836. notify_all_room_messages: false,
  63837. show_desktop_notifications: true,
  63838. show_chatstate_notifications: false,
  63839. chatstate_notification_blacklist: [],
  63840. // ^ a list of JIDs to ignore concerning chat state notifications
  63841. play_sounds: true,
  63842. sounds_path: '/sounds/',
  63843. notification_icon: '/logo/conversejs-filled.svg'
  63844. });
  63845. _converse.isOnlyChatStateNotification = msg => // See XEP-0085 Chat State Notification
  63846. _.isNull(msg.querySelector('body')) && (_.isNull(msg.querySelector(_converse.ACTIVE)) || _.isNull(msg.querySelector(_converse.COMPOSING)) || _.isNull(msg.querySelector(_converse.INACTIVE)) || _.isNull(msg.querySelector(_converse.PAUSED)) || _.isNull(msg.querySelector(_converse.GONE)));
  63847. _converse.shouldNotifyOfGroupMessage = function (message) {
  63848. /* Is this a group message worthy of notification?
  63849. */
  63850. let notify_all = _converse.notify_all_room_messages;
  63851. const jid = message.getAttribute('from'),
  63852. resource = Strophe.getResourceFromJid(jid),
  63853. room_jid = Strophe.getBareJidFromJid(jid),
  63854. sender = resource && Strophe.unescapeNode(resource) || '';
  63855. if (sender === '' || message.querySelectorAll('delay').length > 0) {
  63856. return false;
  63857. }
  63858. const room = _converse.chatboxes.get(room_jid);
  63859. const body = message.querySelector('body');
  63860. if (_.isNull(body)) {
  63861. return false;
  63862. }
  63863. const mentioned = new RegExp(`\\b${room.get('nick')}\\b`).test(body.textContent);
  63864. notify_all = notify_all === true || _.isArray(notify_all) && _.includes(notify_all, room_jid);
  63865. if (sender === room.get('nick') || !notify_all && !mentioned) {
  63866. return false;
  63867. }
  63868. return true;
  63869. };
  63870. _converse.isMessageToHiddenChat = function (message) {
  63871. if (_.includes(['mobile', 'fullscreen', 'embedded'], _converse.view_mode)) {
  63872. const jid = Strophe.getBareJidFromJid(message.getAttribute('from')),
  63873. view = _converse.chatboxviews.get(jid);
  63874. if (!_.isNil(view)) {
  63875. return view.model.get('hidden') || _converse.windowState === 'hidden' || !u.isVisible(view.el);
  63876. }
  63877. return true;
  63878. }
  63879. return _converse.windowState === 'hidden';
  63880. };
  63881. _converse.shouldNotifyOfMessage = function (message) {
  63882. const forwarded = message.querySelector('forwarded');
  63883. if (!_.isNull(forwarded)) {
  63884. return false;
  63885. } else if (message.getAttribute('type') === 'groupchat') {
  63886. return _converse.shouldNotifyOfGroupMessage(message);
  63887. } else if (u.isHeadlineMessage(_converse, message)) {
  63888. // We want to show notifications for headline messages.
  63889. return _converse.isMessageToHiddenChat(message);
  63890. }
  63891. const is_me = Strophe.getBareJidFromJid(message.getAttribute('from')) === _converse.bare_jid;
  63892. return !_converse.isOnlyChatStateNotification(message) && !is_me && _converse.isMessageToHiddenChat(message);
  63893. };
  63894. _converse.playSoundNotification = function () {
  63895. /* Plays a sound to notify that a new message was recieved.
  63896. */
  63897. // XXX Eventually this can be refactored to use Notification's sound
  63898. // feature, but no browser currently supports it.
  63899. // https://developer.mozilla.org/en-US/docs/Web/API/notification/sound
  63900. let audio;
  63901. if (_converse.play_sounds && !_.isUndefined(window.Audio)) {
  63902. audio = new Audio(_converse.sounds_path + "msg_received.ogg");
  63903. if (audio.canPlayType('audio/ogg')) {
  63904. audio.play();
  63905. } else {
  63906. audio = new Audio(_converse.sounds_path + "msg_received.mp3");
  63907. if (audio.canPlayType('audio/mp3')) {
  63908. audio.play();
  63909. }
  63910. }
  63911. }
  63912. };
  63913. _converse.areDesktopNotificationsEnabled = function () {
  63914. return _converse.supports_html5_notification && _converse.show_desktop_notifications && Notification.permission === "granted";
  63915. };
  63916. _converse.showMessageNotification = function (message) {
  63917. /* Shows an HTML5 Notification to indicate that a new chat
  63918. * message was received.
  63919. */
  63920. let title, roster_item;
  63921. const full_from_jid = message.getAttribute('from'),
  63922. from_jid = Strophe.getBareJidFromJid(full_from_jid);
  63923. if (message.getAttribute('type') === 'headline') {
  63924. if (!_.includes(from_jid, '@') || _converse.allow_non_roster_messaging) {
  63925. title = __("Notification from %1$s", from_jid);
  63926. } else {
  63927. return;
  63928. }
  63929. } else if (!_.includes(from_jid, '@')) {
  63930. // workaround for Prosody which doesn't give type "headline"
  63931. title = __("Notification from %1$s", from_jid);
  63932. } else if (message.getAttribute('type') === 'groupchat') {
  63933. title = __("%1$s says", Strophe.getResourceFromJid(full_from_jid));
  63934. } else {
  63935. if (_.isUndefined(_converse.roster)) {
  63936. _converse.log("Could not send notification, because roster is undefined", Strophe.LogLevel.ERROR);
  63937. return;
  63938. }
  63939. roster_item = _converse.roster.get(from_jid);
  63940. if (!_.isUndefined(roster_item)) {
  63941. title = __("%1$s says", roster_item.getDisplayName());
  63942. } else {
  63943. if (_converse.allow_non_roster_messaging) {
  63944. title = __("%1$s says", from_jid);
  63945. } else {
  63946. return;
  63947. }
  63948. }
  63949. } // TODO: we should suppress notifications if we cannot decrypt
  63950. // the message...
  63951. const body = sizzle(`encrypted[xmlns="${Strophe.NS.OMEMO}"]`, message).length ? __('OMEMO Message received') : _.get(message.querySelector('body'), 'textContent');
  63952. if (!body) {
  63953. return;
  63954. }
  63955. const n = new Notification(title, {
  63956. 'body': body,
  63957. 'lang': _converse.locale,
  63958. 'icon': _converse.notification_icon
  63959. });
  63960. setTimeout(n.close.bind(n), 5000);
  63961. };
  63962. _converse.showChatStateNotification = function (contact) {
  63963. /* Creates an HTML5 Notification to inform of a change in a
  63964. * contact's chat state.
  63965. */
  63966. if (_.includes(_converse.chatstate_notification_blacklist, contact.jid)) {
  63967. // Don't notify if the user is being ignored.
  63968. return;
  63969. }
  63970. const chat_state = contact.chat_status;
  63971. let message = null;
  63972. if (chat_state === 'offline') {
  63973. message = __('has gone offline');
  63974. } else if (chat_state === 'away') {
  63975. message = __('has gone away');
  63976. } else if (chat_state === 'dnd') {
  63977. message = __('is busy');
  63978. } else if (chat_state === 'online') {
  63979. message = __('has come online');
  63980. }
  63981. if (message === null) {
  63982. return;
  63983. }
  63984. const n = new Notification(contact.getDisplayName(), {
  63985. body: message,
  63986. lang: _converse.locale,
  63987. icon: _converse.notification_icon
  63988. });
  63989. setTimeout(n.close.bind(n), 5000);
  63990. };
  63991. _converse.showContactRequestNotification = function (contact) {
  63992. const n = new Notification(contact.getDisplayName(), {
  63993. body: __('wants to be your contact'),
  63994. lang: _converse.locale,
  63995. icon: _converse.notification_icon
  63996. });
  63997. setTimeout(n.close.bind(n), 5000);
  63998. };
  63999. _converse.showFeedbackNotification = function (data) {
  64000. if (data.klass === 'error' || data.klass === 'warn') {
  64001. const n = new Notification(data.subject, {
  64002. body: data.message,
  64003. lang: _converse.locale,
  64004. icon: _converse.notification_icon
  64005. });
  64006. setTimeout(n.close.bind(n), 5000);
  64007. }
  64008. };
  64009. _converse.handleChatStateNotification = function (contact) {
  64010. /* Event handler for on('contactPresenceChanged').
  64011. * Will show an HTML5 notification to indicate that the chat
  64012. * status has changed.
  64013. */
  64014. if (_converse.areDesktopNotificationsEnabled() && _converse.show_chatstate_notifications) {
  64015. _converse.showChatStateNotification(contact);
  64016. }
  64017. };
  64018. _converse.handleMessageNotification = function (data) {
  64019. /* Event handler for the on('message') event. Will call methods
  64020. * to play sounds and show HTML5 notifications.
  64021. */
  64022. const message = data.stanza;
  64023. if (!_converse.shouldNotifyOfMessage(message)) {
  64024. return false;
  64025. }
  64026. _converse.playSoundNotification();
  64027. if (_converse.areDesktopNotificationsEnabled()) {
  64028. _converse.showMessageNotification(message);
  64029. }
  64030. };
  64031. _converse.handleContactRequestNotification = function (contact) {
  64032. if (_converse.areDesktopNotificationsEnabled(true)) {
  64033. _converse.showContactRequestNotification(contact);
  64034. }
  64035. };
  64036. _converse.handleFeedback = function (data) {
  64037. if (_converse.areDesktopNotificationsEnabled(true)) {
  64038. _converse.showFeedbackNotification(data);
  64039. }
  64040. };
  64041. _converse.requestPermission = function () {
  64042. if (_converse.supports_html5_notification && !_.includes(['denied', 'granted'], Notification.permission)) {
  64043. // Ask user to enable HTML5 notifications
  64044. Notification.requestPermission();
  64045. }
  64046. };
  64047. _converse.on('pluginsInitialized', function () {
  64048. // We only register event handlers after all plugins are
  64049. // registered, because other plugins might override some of our
  64050. // handlers.
  64051. _converse.on('contactRequest', _converse.handleContactRequestNotification);
  64052. _converse.on('contactPresenceChanged', _converse.handleChatStateNotification);
  64053. _converse.on('message', _converse.handleMessageNotification);
  64054. _converse.on('feedback', _converse.handleFeedback);
  64055. _converse.on('connected', _converse.requestPermission);
  64056. });
  64057. }
  64058. });
  64059. });
  64060. /***/ }),
  64061. /***/ "./src/converse-omemo.js":
  64062. /*!*******************************!*\
  64063. !*** ./src/converse-omemo.js ***!
  64064. \*******************************/
  64065. /*! no static exports found */
  64066. /***/ (function(module, exports, __webpack_require__) {
  64067. "use strict";
  64068. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  64069. // Converse.js
  64070. // http://conversejs.org
  64071. //
  64072. // Copyright (c) 2013-2018, the Converse.js developers
  64073. // Licensed under the Mozilla Public License (MPLv2)
  64074. /* global libsignal, ArrayBuffer, parseInt, crypto */
  64075. (function (root, factory) {
  64076. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! templates/toolbar_omemo.html */ "./src/templates/toolbar_omemo.html")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  64077. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  64078. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  64079. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  64080. })(void 0, function (converse, tpl_toolbar_omemo) {
  64081. const _converse$env = converse.env,
  64082. Backbone = _converse$env.Backbone,
  64083. Promise = _converse$env.Promise,
  64084. Strophe = _converse$env.Strophe,
  64085. moment = _converse$env.moment,
  64086. sizzle = _converse$env.sizzle,
  64087. $iq = _converse$env.$iq,
  64088. $msg = _converse$env.$msg,
  64089. _ = _converse$env._,
  64090. f = _converse$env.f,
  64091. b64_sha1 = _converse$env.b64_sha1;
  64092. const u = converse.env.utils;
  64093. Strophe.addNamespace('OMEMO', "eu.siacs.conversations.axolotl");
  64094. Strophe.addNamespace('OMEMO_DEVICELIST', Strophe.NS.OMEMO + ".devicelist");
  64095. Strophe.addNamespace('OMEMO_VERIFICATION', Strophe.NS.OMEMO + ".verification");
  64096. Strophe.addNamespace('OMEMO_WHITELISTED', Strophe.NS.OMEMO + ".whitelisted");
  64097. Strophe.addNamespace('OMEMO_BUNDLES', Strophe.NS.OMEMO + ".bundles");
  64098. const UNDECIDED = 0;
  64099. const TRUSTED = 1;
  64100. const UNTRUSTED = -1;
  64101. const TAG_LENGTH = 128;
  64102. const KEY_ALGO = {
  64103. 'name': "AES-GCM",
  64104. 'length': 128
  64105. };
  64106. function parseBundle(bundle_el) {
  64107. /* Given an XML element representing a user's OMEMO bundle, parse it
  64108. * and return a map.
  64109. */
  64110. const signed_prekey_public_el = bundle_el.querySelector('signedPreKeyPublic'),
  64111. signed_prekey_signature_el = bundle_el.querySelector('signedPreKeySignature'),
  64112. identity_key_el = bundle_el.querySelector('identityKey');
  64113. const prekeys = _.map(sizzle(`prekeys > preKeyPublic`, bundle_el), el => {
  64114. return {
  64115. 'id': parseInt(el.getAttribute('preKeyId'), 10),
  64116. 'key': el.textContent
  64117. };
  64118. });
  64119. return {
  64120. 'identity_key': bundle_el.querySelector('identityKey').textContent.trim(),
  64121. 'signed_prekey': {
  64122. 'id': parseInt(signed_prekey_public_el.getAttribute('signedPreKeyId'), 10),
  64123. 'public_key': signed_prekey_public_el.textContent,
  64124. 'signature': signed_prekey_signature_el.textContent
  64125. },
  64126. 'prekeys': prekeys
  64127. };
  64128. }
  64129. converse.plugins.add('converse-omemo', {
  64130. enabled(_converse) {
  64131. return !_.isNil(window.libsignal) && !f.includes('converse-omemo', _converse.blacklisted_plugins);
  64132. },
  64133. dependencies: ["converse-chatview"],
  64134. overrides: {
  64135. ProfileModal: {
  64136. events: {
  64137. 'change input.select-all': 'selectAll',
  64138. 'submit .fingerprint-removal': 'removeSelectedFingerprints'
  64139. },
  64140. initialize() {
  64141. const _converse = this.__super__._converse;
  64142. this.debouncedRender = _.debounce(this.render, 50);
  64143. this.devicelist = _converse.devicelists.get(_converse.bare_jid);
  64144. this.devicelist.devices.on('change:bundle', this.debouncedRender, this);
  64145. this.devicelist.devices.on('reset', this.debouncedRender, this);
  64146. this.devicelist.devices.on('remove', this.debouncedRender, this);
  64147. this.devicelist.devices.on('add', this.debouncedRender, this);
  64148. return this.__super__.initialize.apply(this, arguments);
  64149. },
  64150. beforeRender() {
  64151. const _converse = this.__super__._converse,
  64152. device_id = _converse.omemo_store.get('device_id');
  64153. this.current_device = this.devicelist.devices.get(device_id);
  64154. this.other_devices = this.devicelist.devices.filter(d => d.get('id') !== device_id);
  64155. if (this.__super__.beforeRender) {
  64156. return this.__super__.beforeRender.apply(this, arguments);
  64157. }
  64158. },
  64159. selectAll(ev) {
  64160. let sibling = u.ancestor(ev.target, 'li');
  64161. while (sibling) {
  64162. sibling.querySelector('input[type="checkbox"]').checked = ev.target.checked;
  64163. sibling = sibling.nextElementSibling;
  64164. }
  64165. },
  64166. removeSelectedFingerprints(ev) {
  64167. ev.preventDefault();
  64168. ev.stopPropagation();
  64169. ev.target.querySelector('.select-all').checked = false;
  64170. const checkboxes = ev.target.querySelectorAll('.fingerprint-removal-item input[type="checkbox"]:checked'),
  64171. device_ids = _.map(checkboxes, 'value');
  64172. this.devicelist.removeOwnDevices(device_ids).then(this.modal.hide).catch(err => {
  64173. const _converse = this.__super__._converse,
  64174. __ = _converse.__;
  64175. _converse.log(err, Strophe.LogLevel.ERROR);
  64176. _converse.api.alert.show(Strophe.LogLevel.ERROR, __('Error'), [__('Sorry, an error occurred while trying to remove the devices.')]);
  64177. });
  64178. }
  64179. },
  64180. UserDetailsModal: {
  64181. events: {
  64182. 'click .fingerprint-trust .btn input': 'toggleDeviceTrust'
  64183. },
  64184. initialize() {
  64185. const _converse = this.__super__._converse;
  64186. const jid = this.model.get('jid');
  64187. this.devicelist = _converse.devicelists.get(jid) || _converse.devicelists.create({
  64188. 'jid': jid
  64189. });
  64190. this.devicelist.devices.on('change:bundle', this.render, this);
  64191. this.devicelist.devices.on('change:trusted', this.render, this);
  64192. this.devicelist.devices.on('remove', this.render, this);
  64193. this.devicelist.devices.on('add', this.render, this);
  64194. this.devicelist.devices.on('reset', this.render, this);
  64195. return this.__super__.initialize.apply(this, arguments);
  64196. },
  64197. toggleDeviceTrust(ev) {
  64198. const radio = ev.target;
  64199. const device = this.devicelist.devices.get(radio.getAttribute('name'));
  64200. device.save('trusted', parseInt(radio.value, 10));
  64201. }
  64202. },
  64203. ChatBox: {
  64204. getBundlesAndBuildSessions() {
  64205. const _converse = this.__super__._converse;
  64206. let devices;
  64207. return _converse.getDevicesForContact(this.get('jid')).then(their_devices => {
  64208. const device_id = _converse.omemo_store.get('device_id'),
  64209. devicelist = _converse.devicelists.get(_converse.bare_jid),
  64210. own_devices = devicelist.devices.filter(device => device.get('id') !== device_id);
  64211. devices = _.concat(own_devices, their_devices.models);
  64212. return Promise.all(devices.map(device => device.getBundle()));
  64213. }).then(() => this.buildSessions(devices));
  64214. },
  64215. buildSession(device) {
  64216. const _converse = this.__super__._converse,
  64217. address = new libsignal.SignalProtocolAddress(device.get('jid'), device.get('id')),
  64218. sessionBuilder = new libsignal.SessionBuilder(_converse.omemo_store, address),
  64219. prekey = device.getRandomPreKey();
  64220. return device.getBundle().then(bundle => {
  64221. return sessionBuilder.processPreKey({
  64222. 'registrationId': parseInt(device.get('id'), 10),
  64223. 'identityKey': u.base64ToArrayBuffer(bundle.identity_key),
  64224. 'signedPreKey': {
  64225. 'keyId': bundle.signed_prekey.id,
  64226. // <Number>
  64227. 'publicKey': u.base64ToArrayBuffer(bundle.signed_prekey.public_key),
  64228. 'signature': u.base64ToArrayBuffer(bundle.signed_prekey.signature)
  64229. },
  64230. 'preKey': {
  64231. 'keyId': prekey.id,
  64232. // <Number>
  64233. 'publicKey': u.base64ToArrayBuffer(prekey.key)
  64234. }
  64235. });
  64236. });
  64237. },
  64238. getSession(device) {
  64239. const _converse = this.__super__._converse,
  64240. address = new libsignal.SignalProtocolAddress(device.get('jid'), device.get('id'));
  64241. return _converse.omemo_store.loadSession(address.toString()).then(session => {
  64242. if (session) {
  64243. return Promise.resolve();
  64244. } else {
  64245. return this.buildSession(device);
  64246. }
  64247. });
  64248. },
  64249. async encryptMessage(plaintext) {
  64250. // The client MUST use fresh, randomly generated key/IV pairs
  64251. // with AES-128 in Galois/Counter Mode (GCM).
  64252. // For GCM a 12 byte IV is strongly suggested as other IV lengths
  64253. // will require additional calculations. In principle any IV size
  64254. // can be used as long as the IV doesn't ever repeat. NIST however
  64255. // suggests that only an IV size of 12 bytes needs to be supported
  64256. // by implementations.
  64257. //
  64258. // https://crypto.stackexchange.com/questions/26783/ciphertext-and-tag-size-and-iv-transmission-with-aes-in-gcm-mode
  64259. const iv = crypto.getRandomValues(new window.Uint8Array(12)),
  64260. key = await crypto.subtle.generateKey(KEY_ALGO, true, ["encrypt", "decrypt"]),
  64261. algo = {
  64262. 'name': 'AES-GCM',
  64263. 'iv': iv,
  64264. 'tagLength': TAG_LENGTH
  64265. },
  64266. encrypted = await crypto.subtle.encrypt(algo, key, u.stringToArrayBuffer(plaintext)),
  64267. length = encrypted.byteLength - (128 + 7 >> 3),
  64268. ciphertext = encrypted.slice(0, length),
  64269. tag = encrypted.slice(length),
  64270. exported_key = await crypto.subtle.exportKey("raw", key);
  64271. return Promise.resolve({
  64272. 'key': exported_key,
  64273. 'tag': tag,
  64274. 'key_and_tag': u.appendArrayBuffer(exported_key, tag),
  64275. 'payload': u.arrayBufferToBase64(ciphertext),
  64276. 'iv': u.arrayBufferToBase64(iv)
  64277. });
  64278. },
  64279. async decryptMessage(obj) {
  64280. const key_obj = await crypto.subtle.importKey('raw', obj.key, KEY_ALGO, true, ['encrypt', 'decrypt']),
  64281. cipher = u.appendArrayBuffer(u.base64ToArrayBuffer(obj.payload), obj.tag),
  64282. algo = {
  64283. 'name': "AES-GCM",
  64284. 'iv': u.base64ToArrayBuffer(obj.iv),
  64285. 'tagLength': TAG_LENGTH
  64286. };
  64287. return u.arrayBufferToString((await crypto.subtle.decrypt(algo, key_obj, cipher)));
  64288. },
  64289. reportDecryptionError(e) {
  64290. const _converse = this.__super__._converse;
  64291. if (_converse.debug) {
  64292. const __ = _converse.__;
  64293. this.messages.create({
  64294. 'message': __("Sorry, could not decrypt a received OMEMO message due to an error.") + ` ${e.name} ${e.message}`,
  64295. 'type': 'error'
  64296. });
  64297. }
  64298. _converse.log(`${e.name} ${e.message}`, Strophe.LogLevel.ERROR);
  64299. },
  64300. decrypt(attrs) {
  64301. const _converse = this.__super__._converse,
  64302. session_cipher = this.getSessionCipher(attrs.from, parseInt(attrs.encrypted.device_id, 10)); // https://xmpp.org/extensions/xep-0384.html#usecases-receiving
  64303. if (attrs.encrypted.prekey === 'true') {
  64304. let plaintext;
  64305. return session_cipher.decryptPreKeyWhisperMessage(u.base64ToArrayBuffer(attrs.encrypted.key), 'binary').then(key_and_tag => {
  64306. if (attrs.encrypted.payload) {
  64307. const key = key_and_tag.slice(0, 16),
  64308. tag = key_and_tag.slice(16);
  64309. return this.decryptMessage(_.extend(attrs.encrypted, {
  64310. 'key': key,
  64311. 'tag': tag
  64312. }));
  64313. }
  64314. return Promise.resolve();
  64315. }).then(pt => {
  64316. plaintext = pt;
  64317. return _converse.omemo_store.generateMissingPreKeys();
  64318. }).then(() => _converse.omemo_store.publishBundle()).then(() => {
  64319. if (plaintext) {
  64320. return _.extend(attrs, {
  64321. 'plaintext': plaintext
  64322. });
  64323. } else {
  64324. return _.extend(attrs, {
  64325. 'is_only_key': true
  64326. });
  64327. }
  64328. }).catch(e => {
  64329. this.reportDecryptionError(e);
  64330. return attrs;
  64331. });
  64332. } else {
  64333. return session_cipher.decryptWhisperMessage(u.base64ToArrayBuffer(attrs.encrypted.key), 'binary').then(key_and_tag => {
  64334. const key = key_and_tag.slice(0, 16),
  64335. tag = key_and_tag.slice(16);
  64336. return this.decryptMessage(_.extend(attrs.encrypted, {
  64337. 'key': key,
  64338. 'tag': tag
  64339. }));
  64340. }).then(plaintext => _.extend(attrs, {
  64341. 'plaintext': plaintext
  64342. })).catch(e => {
  64343. this.reportDecryptionError(e);
  64344. return attrs;
  64345. });
  64346. }
  64347. },
  64348. getEncryptionAttributesfromStanza(stanza, original_stanza, attrs) {
  64349. const _converse = this.__super__._converse,
  64350. encrypted = sizzle(`encrypted[xmlns="${Strophe.NS.OMEMO}"]`, original_stanza).pop(),
  64351. header = encrypted.querySelector('header'),
  64352. key = sizzle(`key[rid="${_converse.omemo_store.get('device_id')}"]`, encrypted).pop();
  64353. if (key) {
  64354. attrs['is_encrypted'] = true;
  64355. attrs['encrypted'] = {
  64356. 'device_id': header.getAttribute('sid'),
  64357. 'iv': header.querySelector('iv').textContent,
  64358. 'key': key.textContent,
  64359. 'payload': _.get(encrypted.querySelector('payload'), 'textContent', null),
  64360. 'prekey': key.getAttribute('prekey')
  64361. };
  64362. return this.decrypt(attrs);
  64363. } else {
  64364. return Promise.resolve(attrs);
  64365. }
  64366. },
  64367. getMessageAttributesFromStanza(stanza, original_stanza) {
  64368. const encrypted = sizzle(`encrypted[xmlns="${Strophe.NS.OMEMO}"]`, original_stanza).pop();
  64369. const attrs = this.__super__.getMessageAttributesFromStanza.apply(this, arguments);
  64370. if (!encrypted) {
  64371. return attrs;
  64372. } else {
  64373. return this.getEncryptionAttributesfromStanza(stanza, original_stanza, attrs);
  64374. }
  64375. },
  64376. buildSessions(devices) {
  64377. return Promise.all(devices.map(device => this.getSession(device))).then(() => devices);
  64378. },
  64379. getSessionCipher(jid, id) {
  64380. const _converse = this.__super__._converse,
  64381. address = new libsignal.SignalProtocolAddress(jid, id);
  64382. this.session_cipher = new window.libsignal.SessionCipher(_converse.omemo_store, address);
  64383. return this.session_cipher;
  64384. },
  64385. encryptKey(plaintext, device) {
  64386. return this.getSessionCipher(device.get('jid'), device.get('id')).encrypt(plaintext).then(payload => ({
  64387. 'payload': payload,
  64388. 'device': device
  64389. }));
  64390. },
  64391. addKeysToMessageStanza(stanza, dicts, iv) {
  64392. for (var i in dicts) {
  64393. if (Object.prototype.hasOwnProperty.call(dicts, i)) {
  64394. const payload = dicts[i].payload,
  64395. device = dicts[i].device,
  64396. prekey = 3 == parseInt(payload.type, 10);
  64397. stanza.c('key', {
  64398. 'rid': device.get('id')
  64399. }).t(btoa(payload.body));
  64400. if (prekey) {
  64401. stanza.attrs({
  64402. 'prekey': prekey
  64403. });
  64404. }
  64405. stanza.up();
  64406. if (i == dicts.length - 1) {
  64407. stanza.c('iv').t(iv).up().up();
  64408. }
  64409. }
  64410. }
  64411. return Promise.resolve(stanza);
  64412. },
  64413. createOMEMOMessageStanza(message, devices) {
  64414. const _converse = this.__super__._converse,
  64415. __ = _converse.__;
  64416. const body = __("This is an OMEMO encrypted message which your client doesn’t seem to support. " + "Find more information on https://conversations.im/omemo");
  64417. if (!message.get('message')) {
  64418. throw new Error("No message body to encrypt!");
  64419. }
  64420. const stanza = $msg({
  64421. 'from': _converse.connection.jid,
  64422. 'to': this.get('jid'),
  64423. 'type': this.get('message_type'),
  64424. 'id': message.get('msgid')
  64425. }).c('body').t(body).up() // An encrypted header is added to the message for
  64426. // each device that is supposed to receive it.
  64427. // These headers simply contain the key that the
  64428. // payload message is encrypted with,
  64429. // and they are separately encrypted using the
  64430. // session corresponding to the counterpart device.
  64431. .c('encrypted', {
  64432. 'xmlns': Strophe.NS.OMEMO
  64433. }).c('header', {
  64434. 'sid': _converse.omemo_store.get('device_id')
  64435. });
  64436. return this.encryptMessage(message.get('message')).then(obj => {
  64437. // The 16 bytes key and the GCM authentication tag (The tag
  64438. // SHOULD have at least 128 bit) are concatenated and for each
  64439. // intended recipient device, i.e. both own devices as well as
  64440. // devices associated with the contact, the result of this
  64441. // concatenation is encrypted using the corresponding
  64442. // long-standing SignalProtocol session.
  64443. const promises = devices.filter(device => device.get('trusted') != UNTRUSTED).map(device => this.encryptKey(obj.key_and_tag, device));
  64444. return Promise.all(promises).then(dicts => this.addKeysToMessageStanza(stanza, dicts, obj.iv)).then(stanza => {
  64445. stanza.c('payload').t(obj.payload).up().up();
  64446. stanza.c('store', {
  64447. 'xmlns': Strophe.NS.HINTS
  64448. });
  64449. return stanza;
  64450. });
  64451. });
  64452. },
  64453. sendMessage(attrs) {
  64454. const _converse = this.__super__._converse,
  64455. __ = _converse.__;
  64456. if (this.get('omemo_active') && attrs.message) {
  64457. attrs['is_encrypted'] = true;
  64458. attrs['plaintext'] = attrs.message;
  64459. const message = this.messages.create(attrs);
  64460. this.getBundlesAndBuildSessions().then(devices => this.createOMEMOMessageStanza(message, devices)).then(stanza => this.sendMessageStanza(stanza)).catch(e => {
  64461. this.messages.create({
  64462. 'message': __("Sorry, could not send the message due to an error.") + ` ${e.message}`,
  64463. 'type': 'error'
  64464. });
  64465. _converse.log(e, Strophe.LogLevel.ERROR);
  64466. });
  64467. } else {
  64468. return this.__super__.sendMessage.apply(this, arguments);
  64469. }
  64470. }
  64471. },
  64472. ChatBoxView: {
  64473. events: {
  64474. 'click .toggle-omemo': 'toggleOMEMO'
  64475. },
  64476. showMessage(message) {
  64477. // We don't show a message if it's only keying material
  64478. if (!message.get('is_only_key')) {
  64479. return this.__super__.showMessage.apply(this, arguments);
  64480. }
  64481. },
  64482. renderOMEMOToolbarButton() {
  64483. const _converse = this.__super__._converse,
  64484. __ = _converse.__;
  64485. _converse.contactHasOMEMOSupport(this.model.get('jid')).then(support => {
  64486. if (support) {
  64487. const icon = this.el.querySelector('.toggle-omemo'),
  64488. html = tpl_toolbar_omemo(_.extend(this.model.toJSON(), {
  64489. '__': __
  64490. }));
  64491. if (icon) {
  64492. icon.outerHTML = html;
  64493. } else {
  64494. this.el.querySelector('.chat-toolbar').insertAdjacentHTML('beforeend', html);
  64495. }
  64496. }
  64497. }).catch(_.partial(_converse.log, _, Strophe.LogLevel.ERROR));
  64498. },
  64499. toggleOMEMO(ev) {
  64500. ev.preventDefault();
  64501. this.model.save({
  64502. 'omemo_active': !this.model.get('omemo_active')
  64503. });
  64504. this.renderOMEMOToolbarButton();
  64505. }
  64506. }
  64507. },
  64508. initialize() {
  64509. /* The initialize function gets called as soon as the plugin is
  64510. * loaded by Converse.js's plugin machinery.
  64511. */
  64512. const _converse = this._converse;
  64513. _converse.api.promises.add(['OMEMOInitialized']);
  64514. _converse.NUM_PREKEYS = 100; // Set here so that tests can override
  64515. function generateFingerprint(device) {
  64516. if (_.get(device.get('bundle'), 'fingerprint')) {
  64517. return;
  64518. }
  64519. return device.getBundle().then(bundle => {
  64520. bundle['fingerprint'] = u.arrayBufferToHex(u.base64ToArrayBuffer(bundle['identity_key']));
  64521. device.save('bundle', bundle);
  64522. device.trigger('change:bundle'); // Doesn't get triggered automatically due to pass-by-reference
  64523. });
  64524. }
  64525. _converse.generateFingerprints = function (jid) {
  64526. return _converse.getDevicesForContact(jid).then(devices => Promise.all(devices.map(d => generateFingerprint(d))));
  64527. };
  64528. _converse.getDeviceForContact = function (jid, device_id) {
  64529. return _converse.getDevicesForContact(jid).then(devices => devices.get(device_id));
  64530. };
  64531. _converse.getDevicesForContact = function (jid) {
  64532. let devicelist;
  64533. return _converse.api.waitUntil('OMEMOInitialized').then(() => {
  64534. devicelist = _converse.devicelists.get(jid) || _converse.devicelists.create({
  64535. 'jid': jid
  64536. });
  64537. return devicelist.fetchDevices();
  64538. }).then(() => devicelist.devices);
  64539. };
  64540. _converse.contactHasOMEMOSupport = function (jid) {
  64541. /* Checks whether the contact advertises any OMEMO-compatible devices. */
  64542. return new Promise((resolve, reject) => {
  64543. _converse.getDevicesForContact(jid).then(devices => resolve(devices.length > 0)).catch(_.partial(_converse.log, _, Strophe.LogLevel.ERROR));
  64544. });
  64545. };
  64546. function generateDeviceID() {
  64547. /* Generates a device ID, making sure that it's unique */
  64548. const existing_ids = _converse.devicelists.get(_converse.bare_jid).devices.pluck('id');
  64549. let device_id = libsignal.KeyHelper.generateRegistrationId();
  64550. let i = 0;
  64551. while (_.includes(existing_ids, device_id)) {
  64552. device_id = libsignal.KeyHelper.generateRegistrationId();
  64553. i++;
  64554. if (i == 10) {
  64555. throw new Error("Unable to generate a unique device ID");
  64556. }
  64557. }
  64558. return device_id.toString();
  64559. }
  64560. _converse.OMEMOStore = Backbone.Model.extend({
  64561. Direction: {
  64562. SENDING: 1,
  64563. RECEIVING: 2
  64564. },
  64565. getIdentityKeyPair() {
  64566. const keypair = this.get('identity_keypair');
  64567. return Promise.resolve({
  64568. 'privKey': u.base64ToArrayBuffer(keypair.privKey),
  64569. 'pubKey': u.base64ToArrayBuffer(keypair.pubKey)
  64570. });
  64571. },
  64572. getLocalRegistrationId() {
  64573. return Promise.resolve(parseInt(this.get('device_id'), 10));
  64574. },
  64575. isTrustedIdentity(identifier, identity_key, direction) {
  64576. if (_.isNil(identifier)) {
  64577. throw new Error("Can't check identity key for invalid key");
  64578. }
  64579. if (!(identity_key instanceof ArrayBuffer)) {
  64580. throw new Error("Expected identity_key to be an ArrayBuffer");
  64581. }
  64582. const trusted = this.get('identity_key' + identifier);
  64583. if (trusted === undefined) {
  64584. return Promise.resolve(true);
  64585. }
  64586. return Promise.resolve(u.arrayBufferToBase64(identity_key) === trusted);
  64587. },
  64588. loadIdentityKey(identifier) {
  64589. if (_.isNil(identifier)) {
  64590. throw new Error("Can't load identity_key for invalid identifier");
  64591. }
  64592. return Promise.resolve(u.base64ToArrayBuffer(this.get('identity_key' + identifier)));
  64593. },
  64594. saveIdentity(identifier, identity_key) {
  64595. if (_.isNil(identifier)) {
  64596. throw new Error("Can't save identity_key for invalid identifier");
  64597. }
  64598. const address = new libsignal.SignalProtocolAddress.fromString(identifier),
  64599. existing = this.get('identity_key' + address.getName());
  64600. const b64_idkey = u.arrayBufferToBase64(identity_key);
  64601. this.save('identity_key' + address.getName(), b64_idkey);
  64602. if (existing && b64_idkey !== existing) {
  64603. return Promise.resolve(true);
  64604. } else {
  64605. return Promise.resolve(false);
  64606. }
  64607. },
  64608. getPreKeys() {
  64609. return this.get('prekeys') || {};
  64610. },
  64611. loadPreKey(key_id) {
  64612. const res = this.getPreKeys()[key_id];
  64613. if (res) {
  64614. return Promise.resolve({
  64615. 'privKey': u.base64ToArrayBuffer(res.privKey),
  64616. 'pubKey': u.base64ToArrayBuffer(res.pubKey)
  64617. });
  64618. }
  64619. return Promise.resolve();
  64620. },
  64621. storePreKey(key_id, key_pair) {
  64622. const prekey = {};
  64623. prekey[key_id] = {
  64624. 'pubKey': u.arrayBufferToBase64(key_pair.pubKey),
  64625. 'privKey': u.arrayBufferToBase64(key_pair.privKey)
  64626. };
  64627. this.save('prekeys', _.extend(this.getPreKeys(), prekey));
  64628. return Promise.resolve();
  64629. },
  64630. removePreKey(key_id) {
  64631. this.save('prekeys', _.omit(this.getPreKeys(), key_id));
  64632. return Promise.resolve();
  64633. },
  64634. loadSignedPreKey(keyId) {
  64635. const res = this.get('signed_prekey');
  64636. if (res) {
  64637. return Promise.resolve({
  64638. 'privKey': u.base64ToArrayBuffer(res.privKey),
  64639. 'pubKey': u.base64ToArrayBuffer(res.pubKey)
  64640. });
  64641. }
  64642. return Promise.resolve();
  64643. },
  64644. storeSignedPreKey(spk) {
  64645. if (typeof spk !== "object") {
  64646. // XXX: We've changed the signature of this method from the
  64647. // example given in InMemorySignalProtocolStore.
  64648. // Should be fine because the libsignal code doesn't
  64649. // actually call this method.
  64650. throw new Error("storeSignedPreKey: expected an object");
  64651. }
  64652. this.save('signed_prekey', {
  64653. 'id': spk.keyId,
  64654. 'privKey': u.arrayBufferToBase64(spk.keyPair.privKey),
  64655. 'pubKey': u.arrayBufferToBase64(spk.keyPair.pubKey),
  64656. // XXX: The InMemorySignalProtocolStore does not pass
  64657. // in or store the signature, but we need it when we
  64658. // publish out bundle and this method isn't called from
  64659. // within libsignal code, so we modify it to also store
  64660. // the signature.
  64661. 'signature': u.arrayBufferToBase64(spk.signature)
  64662. });
  64663. return Promise.resolve();
  64664. },
  64665. removeSignedPreKey(key_id) {
  64666. if (this.get('signed_prekey')['id'] === key_id) {
  64667. this.unset('signed_prekey');
  64668. this.save();
  64669. }
  64670. return Promise.resolve();
  64671. },
  64672. loadSession(identifier) {
  64673. return Promise.resolve(this.get('session' + identifier));
  64674. },
  64675. storeSession(identifier, record) {
  64676. return Promise.resolve(this.save('session' + identifier, record));
  64677. },
  64678. removeSession(identifier) {
  64679. return Promise.resolve(this.unset('session' + identifier));
  64680. },
  64681. removeAllSessions(identifier) {
  64682. const keys = _.filter(_.keys(this.attributes), key => {
  64683. if (key.startsWith('session' + identifier)) {
  64684. return key;
  64685. }
  64686. });
  64687. const attrs = {};
  64688. _.forEach(keys, key => {
  64689. attrs[key] = undefined;
  64690. });
  64691. this.save(attrs);
  64692. return Promise.resolve();
  64693. },
  64694. publishBundle() {
  64695. const signed_prekey = this.get('signed_prekey');
  64696. const stanza = $iq({
  64697. 'from': _converse.bare_jid,
  64698. 'type': 'set'
  64699. }).c('pubsub', {
  64700. 'xmlns': Strophe.NS.PUBSUB
  64701. }).c('publish', {
  64702. 'node': `${Strophe.NS.OMEMO_BUNDLES}:${this.get('device_id')}`
  64703. }).c('item').c('bundle', {
  64704. 'xmlns': Strophe.NS.OMEMO
  64705. }).c('signedPreKeyPublic', {
  64706. 'signedPreKeyId': signed_prekey.id
  64707. }).t(signed_prekey.pubKey).up().c('signedPreKeySignature').t(signed_prekey.signature).up().c('identityKey').t(this.get('identity_keypair').pubKey).up().c('prekeys');
  64708. _.forEach(this.get('prekeys'), (prekey, id) => stanza.c('preKeyPublic', {
  64709. 'preKeyId': id
  64710. }).t(prekey.pubKey).up());
  64711. return _converse.api.sendIQ(stanza);
  64712. },
  64713. generateMissingPreKeys() {
  64714. const current_keys = this.getPreKeys(),
  64715. missing_keys = _.difference(_.invokeMap(_.range(0, _converse.NUM_PREKEYS), Number.prototype.toString), _.keys(current_keys));
  64716. if (missing_keys.length < 1) {
  64717. _converse.log("No missing prekeys to generate for our own device", Strophe.LogLevel.WARN);
  64718. return Promise.resolve();
  64719. }
  64720. return Promise.all(_.map(missing_keys, id => libsignal.KeyHelper.generatePreKey(parseInt(id, 10)))).then(keys => {
  64721. _.forEach(keys, k => this.storePreKey(k.keyId, k.keyPair));
  64722. const marshalled_keys = _.map(this.getPreKeys(), k => ({
  64723. 'id': k.keyId,
  64724. 'key': u.arrayBufferToBase64(k.pubKey)
  64725. })),
  64726. devicelist = _converse.devicelists.get(_converse.bare_jid),
  64727. device = devicelist.devices.get(this.get('device_id'));
  64728. return device.getBundle().then(bundle => device.save('bundle', _.extend(bundle, {
  64729. 'prekeys': marshalled_keys
  64730. })));
  64731. });
  64732. },
  64733. generateBundle() {
  64734. /* The first thing that needs to happen if a client wants to
  64735. * start using OMEMO is they need to generate an IdentityKey
  64736. * and a Device ID. The IdentityKey is a Curve25519 [6]
  64737. * public/private Key pair. The Device ID is a randomly
  64738. * generated integer between 1 and 2^31 - 1.
  64739. */
  64740. const bundle = {};
  64741. return libsignal.KeyHelper.generateIdentityKeyPair().then(identity_keypair => {
  64742. const identity_key = u.arrayBufferToBase64(identity_keypair.pubKey),
  64743. device_id = generateDeviceID();
  64744. bundle['identity_key'] = identity_key;
  64745. bundle['device_id'] = device_id;
  64746. this.save({
  64747. 'device_id': device_id,
  64748. 'identity_keypair': {
  64749. 'privKey': u.arrayBufferToBase64(identity_keypair.privKey),
  64750. 'pubKey': identity_key
  64751. },
  64752. 'identity_key': identity_key
  64753. });
  64754. return libsignal.KeyHelper.generateSignedPreKey(identity_keypair, 0);
  64755. }).then(signed_prekey => {
  64756. _converse.omemo_store.storeSignedPreKey(signed_prekey);
  64757. bundle['signed_prekey'] = {
  64758. 'id': signed_prekey.keyId,
  64759. 'public_key': u.arrayBufferToBase64(signed_prekey.keyPair.privKey),
  64760. 'signature': u.arrayBufferToBase64(signed_prekey.signature)
  64761. };
  64762. return Promise.all(_.map(_.range(0, _converse.NUM_PREKEYS), id => libsignal.KeyHelper.generatePreKey(id)));
  64763. }).then(keys => {
  64764. _.forEach(keys, k => _converse.omemo_store.storePreKey(k.keyId, k.keyPair));
  64765. const devicelist = _converse.devicelists.get(_converse.bare_jid),
  64766. device = devicelist.devices.create({
  64767. 'id': bundle.device_id,
  64768. 'jid': _converse.bare_jid
  64769. }),
  64770. marshalled_keys = _.map(keys, k => ({
  64771. 'id': k.keyId,
  64772. 'key': u.arrayBufferToBase64(k.keyPair.pubKey)
  64773. }));
  64774. bundle['prekeys'] = marshalled_keys;
  64775. device.save('bundle', bundle);
  64776. });
  64777. },
  64778. fetchSession() {
  64779. if (_.isUndefined(this._setup_promise)) {
  64780. this._setup_promise = new Promise((resolve, reject) => {
  64781. this.fetch({
  64782. 'success': () => {
  64783. if (!_converse.omemo_store.get('device_id')) {
  64784. this.generateBundle().then(resolve).catch(resolve);
  64785. } else {
  64786. resolve();
  64787. }
  64788. },
  64789. 'error': () => {
  64790. this.generateBundle().then(resolve).catch(resolve);
  64791. }
  64792. });
  64793. });
  64794. }
  64795. return this._setup_promise;
  64796. }
  64797. });
  64798. _converse.Device = Backbone.Model.extend({
  64799. defaults: {
  64800. 'trusted': UNDECIDED
  64801. },
  64802. getRandomPreKey() {
  64803. // XXX: assumes that the bundle has already been fetched
  64804. const bundle = this.get('bundle');
  64805. return bundle.prekeys[u.getRandomInt(bundle.prekeys.length)];
  64806. },
  64807. fetchBundleFromServer() {
  64808. const stanza = $iq({
  64809. 'type': 'get',
  64810. 'from': _converse.bare_jid,
  64811. 'to': this.get('jid')
  64812. }).c('pubsub', {
  64813. 'xmlns': Strophe.NS.PUBSUB
  64814. }).c('items', {
  64815. 'node': `${Strophe.NS.OMEMO_BUNDLES}:${this.get('id')}`
  64816. });
  64817. return _converse.api.sendIQ(stanza).then(iq => {
  64818. const publish_el = sizzle(`items[node="${Strophe.NS.OMEMO_BUNDLES}:${this.get('id')}"]`, iq).pop(),
  64819. bundle_el = sizzle(`bundle[xmlns="${Strophe.NS.OMEMO}"]`, publish_el).pop(),
  64820. bundle = parseBundle(bundle_el);
  64821. this.save('bundle', bundle);
  64822. return bundle;
  64823. }).catch(iq => {
  64824. _converse.log(iq.outerHTML, Strophe.LogLevel.ERROR);
  64825. });
  64826. },
  64827. getBundle() {
  64828. /* Fetch and save the bundle information associated with
  64829. * this device, if the information is not at hand already.
  64830. */
  64831. if (this.get('bundle')) {
  64832. return Promise.resolve(this.get('bundle'), this);
  64833. } else {
  64834. return this.fetchBundleFromServer();
  64835. }
  64836. }
  64837. });
  64838. _converse.Devices = Backbone.Collection.extend({
  64839. model: _converse.Device
  64840. });
  64841. _converse.DeviceList = Backbone.Model.extend({
  64842. idAttribute: 'jid',
  64843. initialize() {
  64844. this.devices = new _converse.Devices();
  64845. const id = `converse.devicelist-${_converse.bare_jid}-${this.get('jid')}`;
  64846. this.devices.browserStorage = new Backbone.BrowserStorage.session(id);
  64847. this.fetchDevices();
  64848. },
  64849. fetchDevices() {
  64850. if (_.isUndefined(this._devices_promise)) {
  64851. this._devices_promise = new Promise((resolve, reject) => {
  64852. this.devices.fetch({
  64853. 'success': collection => {
  64854. if (collection.length === 0) {
  64855. this.fetchDevicesFromServer().then(ids => this.publishCurrentDevice(ids)).then(resolve).catch(resolve);
  64856. } else {
  64857. resolve();
  64858. }
  64859. }
  64860. });
  64861. });
  64862. }
  64863. return this._devices_promise;
  64864. },
  64865. publishCurrentDevice(device_ids) {
  64866. if (this.get('jid') !== _converse.bare_jid) {
  64867. // We only publish for ourselves.
  64868. return Promise.resolve();
  64869. }
  64870. return restoreOMEMOSession().then(() => {
  64871. const device_id = _converse.omemo_store.get('device_id'),
  64872. own_device = this.devices.findWhere({
  64873. 'id': device_id
  64874. });
  64875. if (!_.includes(device_ids, device_id)) {
  64876. return this.publishDevices();
  64877. }
  64878. });
  64879. },
  64880. fetchDevicesFromServer() {
  64881. const stanza = $iq({
  64882. 'type': 'get',
  64883. 'from': _converse.bare_jid,
  64884. 'to': this.get('jid')
  64885. }).c('pubsub', {
  64886. 'xmlns': Strophe.NS.PUBSUB
  64887. }).c('items', {
  64888. 'node': Strophe.NS.OMEMO_DEVICELIST
  64889. });
  64890. return _converse.api.sendIQ(stanza).then(iq => {
  64891. const device_ids = _.map(sizzle(`list[xmlns="${Strophe.NS.OMEMO}"] device`, iq), dev => dev.getAttribute('id'));
  64892. _.forEach(device_ids, id => this.devices.create({
  64893. 'id': id,
  64894. 'jid': this.get('jid')
  64895. }));
  64896. return device_ids;
  64897. });
  64898. },
  64899. publishDevices() {
  64900. const stanza = $iq({
  64901. 'from': _converse.bare_jid,
  64902. 'type': 'set'
  64903. }).c('pubsub', {
  64904. 'xmlns': Strophe.NS.PUBSUB
  64905. }).c('publish', {
  64906. 'node': Strophe.NS.OMEMO_DEVICELIST
  64907. }).c('item').c('list', {
  64908. 'xmlns': Strophe.NS.OMEMO
  64909. });
  64910. this.devices.each(device => stanza.c('device', {
  64911. 'id': device.get('id')
  64912. }).up());
  64913. return _converse.api.sendIQ(stanza);
  64914. },
  64915. removeOwnDevices(device_ids) {
  64916. if (this.get('jid') !== _converse.bare_jid) {
  64917. throw new Error("Cannot remove devices from someone else's device list");
  64918. }
  64919. _.forEach(device_ids, device_id => this.devices.get(device_id).destroy());
  64920. return this.publishDevices();
  64921. }
  64922. });
  64923. _converse.DeviceLists = Backbone.Collection.extend({
  64924. model: _converse.DeviceList
  64925. });
  64926. function fetchDeviceLists() {
  64927. return new Promise((resolve, reject) => _converse.devicelists.fetch({
  64928. 'success': resolve
  64929. }));
  64930. }
  64931. function fetchOwnDevices() {
  64932. return fetchDeviceLists().then(() => {
  64933. let own_devicelist = _converse.devicelists.get(_converse.bare_jid);
  64934. if (_.isNil(own_devicelist)) {
  64935. own_devicelist = _converse.devicelists.create({
  64936. 'jid': _converse.bare_jid
  64937. });
  64938. }
  64939. return own_devicelist.fetchDevices();
  64940. });
  64941. }
  64942. function updateBundleFromStanza(stanza) {
  64943. const items_el = sizzle(`items`, stanza).pop();
  64944. if (!items_el || !items_el.getAttribute('node').startsWith(Strophe.NS.OMEMO_BUNDLES)) {
  64945. return;
  64946. }
  64947. const device_id = items_el.getAttribute('node').split(':')[1],
  64948. jid = stanza.getAttribute('from'),
  64949. bundle_el = sizzle(`item > bundle`, items_el).pop(),
  64950. devicelist = _converse.devicelists.get(jid) || _converse.devicelists.create({
  64951. 'jid': jid
  64952. }),
  64953. device = devicelist.devices.get(device_id) || devicelist.devices.create({
  64954. 'id': device_id,
  64955. 'jid': jid
  64956. });
  64957. device.save({
  64958. 'bundle': parseBundle(bundle_el)
  64959. });
  64960. }
  64961. function updateDevicesFromStanza(stanza) {
  64962. const items_el = sizzle(`items[node="${Strophe.NS.OMEMO_DEVICELIST}"]`, stanza).pop();
  64963. if (!items_el) {
  64964. return;
  64965. }
  64966. const device_ids = _.map(sizzle(`item list[xmlns="${Strophe.NS.OMEMO}"] device`, items_el), device => device.getAttribute('id'));
  64967. const jid = stanza.getAttribute('from'),
  64968. devicelist = _converse.devicelists.get(jid) || _converse.devicelists.create({
  64969. 'jid': jid
  64970. }),
  64971. devices = devicelist.devices,
  64972. removed_ids = _.difference(devices.pluck('id'), device_ids);
  64973. _.forEach(removed_ids, id => {
  64974. if (jid === _converse.bare_jid && id === _converse.omemo_store.get('device_id')) {
  64975. // We don't remove the current device
  64976. return;
  64977. }
  64978. devices.get(id).destroy();
  64979. });
  64980. _.forEach(device_ids, device_id => {
  64981. if (!devices.get(device_id)) {
  64982. devices.create({
  64983. 'id': device_id,
  64984. 'jid': jid
  64985. });
  64986. }
  64987. });
  64988. if (Strophe.getBareJidFromJid(jid) === _converse.bare_jid) {
  64989. // Make sure our own device is on the list (i.e. if it was
  64990. // removed, add it again.
  64991. _converse.devicelists.get(_converse.bare_jid).publishCurrentDevice(device_ids);
  64992. }
  64993. }
  64994. function registerPEPPushHandler() {
  64995. // Add a handler for devices pushed from other connected clients
  64996. _converse.connection.addHandler(message => {
  64997. try {
  64998. if (sizzle(`event[xmlns="${Strophe.NS.PUBSUB}#event"]`, message).length) {
  64999. updateDevicesFromStanza(message);
  65000. updateBundleFromStanza(message);
  65001. }
  65002. } catch (e) {
  65003. _converse.log(e.message, Strophe.LogLevel.ERROR);
  65004. }
  65005. return true;
  65006. }, null, 'message', 'headline');
  65007. }
  65008. function restoreOMEMOSession() {
  65009. if (_.isUndefined(_converse.omemo_store)) {
  65010. const storage = _converse.config.get('storage'),
  65011. id = `converse.omemosession-${_converse.bare_jid}`;
  65012. _converse.omemo_store = new _converse.OMEMOStore({
  65013. 'id': id
  65014. });
  65015. _converse.omemo_store.browserStorage = new Backbone.BrowserStorage[storage](id);
  65016. }
  65017. return _converse.omemo_store.fetchSession();
  65018. }
  65019. function initOMEMO() {
  65020. _converse.devicelists = new _converse.DeviceLists();
  65021. const storage = _converse.config.get('storage'),
  65022. id = `converse.devicelists-${_converse.bare_jid}`;
  65023. _converse.devicelists.browserStorage = new Backbone.BrowserStorage[storage](id);
  65024. fetchOwnDevices().then(() => restoreOMEMOSession()).then(() => _converse.omemo_store.publishBundle()).then(() => _converse.emit('OMEMOInitialized')).catch(_.partial(_converse.log, _, Strophe.LogLevel.ERROR));
  65025. }
  65026. _converse.api.listen.on('afterTearDown', () => {
  65027. if (_converse.devicelists) {
  65028. _converse.devicelists.reset();
  65029. }
  65030. delete _converse.omemo_store;
  65031. });
  65032. _converse.api.listen.on('connected', registerPEPPushHandler);
  65033. _converse.api.listen.on('renderToolbar', view => view.renderOMEMOToolbarButton());
  65034. _converse.api.listen.on('statusInitialized', initOMEMO);
  65035. _converse.api.listen.on('addClientFeatures', () => _converse.api.disco.own.features.add(`${Strophe.NS.OMEMO_DEVICELIST}+notify`));
  65036. _converse.api.listen.on('userDetailsModalInitialized', contact => {
  65037. const jid = contact.get('jid');
  65038. _converse.generateFingerprints(jid).catch(_.partial(_converse.log, _, Strophe.LogLevel.ERROR));
  65039. });
  65040. _converse.api.listen.on('profileModalInitialized', contact => {
  65041. _converse.generateFingerprints(_converse.bare_jid).catch(_.partial(_converse.log, _, Strophe.LogLevel.ERROR));
  65042. });
  65043. }
  65044. });
  65045. });
  65046. /***/ }),
  65047. /***/ "./src/converse-ping.js":
  65048. /*!******************************!*\
  65049. !*** ./src/converse-ping.js ***!
  65050. \******************************/
  65051. /*! no static exports found */
  65052. /***/ (function(module, exports, __webpack_require__) {
  65053. "use strict";
  65054. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  65055. // Converse.js
  65056. // https://conversejs.org
  65057. //
  65058. // Copyright (c) 2013-2018, the Converse.js developers
  65059. // Licensed under the Mozilla Public License (MPLv2)
  65060. /* This is a Converse.js plugin which add support for application-level pings
  65061. * as specified in XEP-0199 XMPP Ping.
  65062. */
  65063. (function (root, factory) {
  65064. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! strophe.ping */ "./node_modules/strophejs-plugin-ping/strophe.ping.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  65065. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  65066. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  65067. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  65068. })(void 0, function (converse) {
  65069. "use strict"; // Strophe methods for building stanzas
  65070. const _converse$env = converse.env,
  65071. Strophe = _converse$env.Strophe,
  65072. _ = _converse$env._;
  65073. converse.plugins.add('converse-ping', {
  65074. initialize() {
  65075. /* The initialize function gets called as soon as the plugin is
  65076. * loaded by converse.js's plugin machinery.
  65077. */
  65078. const _converse = this._converse;
  65079. _converse.api.settings.update({
  65080. ping_interval: 180 //in seconds
  65081. });
  65082. _converse.ping = function (jid, success, error, timeout) {
  65083. // XXX: We could first check here if the server advertised that
  65084. // it supports PING.
  65085. // However, some servers don't advertise while still keeping the
  65086. // connection option due to pings.
  65087. //
  65088. // var feature = _converse.disco_entities[_converse.domain].features.findWhere({'var': Strophe.NS.PING});
  65089. _converse.lastStanzaDate = new Date();
  65090. if (_.isNil(jid)) {
  65091. jid = Strophe.getDomainFromJid(_converse.bare_jid);
  65092. }
  65093. if (_.isUndefined(timeout)) {
  65094. timeout = null;
  65095. }
  65096. if (_.isUndefined(success)) {
  65097. success = null;
  65098. }
  65099. if (_.isUndefined(error)) {
  65100. error = null;
  65101. }
  65102. if (_converse.connection) {
  65103. _converse.connection.ping.ping(jid, success, error, timeout);
  65104. return true;
  65105. }
  65106. return false;
  65107. };
  65108. _converse.pong = function (ping) {
  65109. _converse.lastStanzaDate = new Date();
  65110. _converse.connection.ping.pong(ping);
  65111. return true;
  65112. };
  65113. _converse.registerPongHandler = function () {
  65114. if (!_.isUndefined(_converse.connection.disco)) {
  65115. _converse.api.disco.own.features.add(Strophe.NS.PING);
  65116. }
  65117. _converse.connection.ping.addPingHandler(_converse.pong);
  65118. };
  65119. _converse.registerPingHandler = function () {
  65120. _converse.registerPongHandler();
  65121. if (_converse.ping_interval > 0) {
  65122. _converse.connection.addHandler(function () {
  65123. /* Handler on each stanza, saves the received date
  65124. * in order to ping only when needed.
  65125. */
  65126. _converse.lastStanzaDate = new Date();
  65127. return true;
  65128. });
  65129. _converse.connection.addTimedHandler(1000, function () {
  65130. const now = new Date();
  65131. if (!_converse.lastStanzaDate) {
  65132. _converse.lastStanzaDate = now;
  65133. }
  65134. if ((now - _converse.lastStanzaDate) / 1000 > _converse.ping_interval) {
  65135. return _converse.ping();
  65136. }
  65137. return true;
  65138. });
  65139. }
  65140. };
  65141. const onConnected = function onConnected() {
  65142. // Wrapper so that we can spy on registerPingHandler in tests
  65143. _converse.registerPingHandler();
  65144. };
  65145. _converse.on('connected', onConnected);
  65146. _converse.on('reconnected', onConnected);
  65147. }
  65148. });
  65149. });
  65150. /***/ }),
  65151. /***/ "./src/converse-profile.js":
  65152. /*!*********************************!*\
  65153. !*** ./src/converse-profile.js ***!
  65154. \*********************************/
  65155. /*! no static exports found */
  65156. /***/ (function(module, exports, __webpack_require__) {
  65157. "use strict";
  65158. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  65159. // Converse.js (A browser based XMPP chat client)
  65160. // http://conversejs.org
  65161. //
  65162. // Copyright (c) 2013-2017, Jan-Carel Brand <jc@opkode.com>
  65163. // Licensed under the Mozilla Public License (MPLv2)
  65164. //
  65165. /*global define */
  65166. (function (root, factory) {
  65167. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! bootstrap */ "./node_modules/bootstrap.native/dist/bootstrap-native-v4.js"), __webpack_require__(/*! formdata-polyfill */ "./node_modules/formdata-polyfill/FormData.js"), __webpack_require__(/*! templates/alert.html */ "./src/templates/alert.html"), __webpack_require__(/*! templates/chat_status_modal.html */ "./src/templates/chat_status_modal.html"), __webpack_require__(/*! templates/profile_modal.html */ "./src/templates/profile_modal.html"), __webpack_require__(/*! templates/profile_view.html */ "./src/templates/profile_view.html"), __webpack_require__(/*! templates/status_option.html */ "./src/templates/status_option.html"), __webpack_require__(/*! converse-vcard */ "./src/converse-vcard.js"), __webpack_require__(/*! converse-modal */ "./src/converse-modal.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  65168. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  65169. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  65170. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  65171. })(void 0, function (converse, bootstrap, _FormData, tpl_alert, tpl_chat_status_modal, tpl_profile_modal, tpl_profile_view, tpl_status_option) {
  65172. "use strict";
  65173. const _converse$env = converse.env,
  65174. Strophe = _converse$env.Strophe,
  65175. Backbone = _converse$env.Backbone,
  65176. Promise = _converse$env.Promise,
  65177. utils = _converse$env.utils,
  65178. _ = _converse$env._,
  65179. moment = _converse$env.moment;
  65180. const u = converse.env.utils;
  65181. converse.plugins.add('converse-profile', {
  65182. dependencies: ["converse-modal", "converse-vcard", "converse-chatboxviews"],
  65183. initialize() {
  65184. /* The initialize function gets called as soon as the plugin is
  65185. * loaded by converse.js's plugin machinery.
  65186. */
  65187. const _converse = this._converse,
  65188. __ = _converse.__;
  65189. _converse.ProfileModal = _converse.BootstrapModal.extend({
  65190. events: {
  65191. 'click .change-avatar': "openFileSelection",
  65192. 'change input[type="file"': "updateFilePreview",
  65193. 'submit .profile-form': 'onFormSubmitted'
  65194. },
  65195. initialize() {
  65196. this.model.on('change', this.render, this);
  65197. _converse.BootstrapModal.prototype.initialize.apply(this, arguments);
  65198. _converse.emit('profileModalInitialized', this.model);
  65199. },
  65200. toHTML() {
  65201. return tpl_profile_modal(_.extend(this.model.toJSON(), this.model.vcard.toJSON(), {
  65202. '_': _,
  65203. '__': __,
  65204. '_converse': _converse,
  65205. 'alt_avatar': __('Your avatar image'),
  65206. 'heading_profile': __('Your Profile'),
  65207. 'label_close': __('Close'),
  65208. 'label_email': __('Email'),
  65209. 'label_fullname': __('Full Name'),
  65210. 'label_jid': __('XMPP Address (JID)'),
  65211. 'label_nickname': __('Nickname'),
  65212. 'label_role': __('Role'),
  65213. 'label_role_help': __('Use commas to separate multiple roles. Your roles are shown next to your name on your chat messages.'),
  65214. 'label_url': __('URL'),
  65215. 'utils': u,
  65216. 'view': this
  65217. }));
  65218. },
  65219. afterRender() {
  65220. this.tabs = _.map(this.el.querySelectorAll('.nav-item'), tab => new bootstrap.Tab(tab));
  65221. },
  65222. openFileSelection(ev) {
  65223. ev.preventDefault();
  65224. this.el.querySelector('input[type="file"]').click();
  65225. },
  65226. updateFilePreview(ev) {
  65227. const file = ev.target.files[0],
  65228. reader = new FileReader();
  65229. reader.onloadend = () => {
  65230. this.el.querySelector('.avatar').setAttribute('src', reader.result);
  65231. };
  65232. reader.readAsDataURL(file);
  65233. },
  65234. setVCard(data) {
  65235. _converse.api.vcard.set(_converse.bare_jid, data).then(() => _converse.api.vcard.update(this.model.vcard, true)).catch(err => {
  65236. _converse.log(err, Strophe.LogLevel.FATAL);
  65237. _converse.api.alert.show(Strophe.LogLevel.ERROR, __('Error'), [__("Sorry, an error happened while trying to save your profile data."), __("You can check your browser's developer console for any error output.")]);
  65238. });
  65239. this.modal.hide();
  65240. },
  65241. onFormSubmitted(ev) {
  65242. ev.preventDefault();
  65243. const reader = new FileReader(),
  65244. form_data = new FormData(ev.target),
  65245. image_file = form_data.get('image');
  65246. const data = {
  65247. 'fn': form_data.get('fn'),
  65248. 'nickname': form_data.get('nickname'),
  65249. 'role': form_data.get('role'),
  65250. 'email': form_data.get('email'),
  65251. 'url': form_data.get('url')
  65252. };
  65253. if (!image_file.size) {
  65254. _.extend(data, {
  65255. 'image': this.model.vcard.get('image'),
  65256. 'image_type': this.model.vcard.get('image_type')
  65257. });
  65258. this.setVCard(data);
  65259. } else {
  65260. reader.onloadend = () => {
  65261. _.extend(data, {
  65262. 'image': btoa(reader.result),
  65263. 'image_type': image_file.type
  65264. });
  65265. this.setVCard(data);
  65266. };
  65267. reader.readAsBinaryString(image_file);
  65268. }
  65269. }
  65270. });
  65271. _converse.ChatStatusModal = _converse.BootstrapModal.extend({
  65272. events: {
  65273. "submit form#set-xmpp-status": "onFormSubmitted",
  65274. "click .clear-input": "clearStatusMessage"
  65275. },
  65276. toHTML() {
  65277. return tpl_chat_status_modal(_.extend(this.model.toJSON(), this.model.vcard.toJSON(), {
  65278. 'label_away': __('Away'),
  65279. 'label_close': __('Close'),
  65280. 'label_busy': __('Busy'),
  65281. 'label_cancel': __('Cancel'),
  65282. 'label_custom_status': __('Custom status'),
  65283. 'label_offline': __('Offline'),
  65284. 'label_online': __('Online'),
  65285. 'label_save': __('Save'),
  65286. 'label_xa': __('Away for long'),
  65287. 'modal_title': __('Change chat status'),
  65288. 'placeholder_status_message': __('Personal status message')
  65289. }));
  65290. },
  65291. afterRender() {
  65292. this.el.addEventListener('shown.bs.modal', () => {
  65293. this.el.querySelector('input[name="status_message"]').focus();
  65294. }, false);
  65295. },
  65296. clearStatusMessage(ev) {
  65297. if (ev && ev.preventDefault) {
  65298. ev.preventDefault();
  65299. u.hideElement(this.el.querySelector('.clear-input'));
  65300. }
  65301. const roster_filter = this.el.querySelector('input[name="status_message"]');
  65302. roster_filter.value = '';
  65303. },
  65304. onFormSubmitted(ev) {
  65305. ev.preventDefault();
  65306. const data = new FormData(ev.target);
  65307. this.model.save({
  65308. 'status_message': data.get('status_message'),
  65309. 'status': data.get('chat_status')
  65310. });
  65311. this.modal.hide();
  65312. }
  65313. });
  65314. _converse.XMPPStatusView = _converse.VDOMViewWithAvatar.extend({
  65315. tagName: "div",
  65316. events: {
  65317. "click a.show-profile": "showProfileModal",
  65318. "click a.change-status": "showStatusChangeModal",
  65319. "click .logout": "logOut"
  65320. },
  65321. initialize() {
  65322. this.model.on("change", this.render, this);
  65323. this.model.vcard.on("change", this.render, this);
  65324. },
  65325. toHTML() {
  65326. const chat_status = this.model.get('status') || 'offline';
  65327. return tpl_profile_view(_.extend(this.model.toJSON(), this.model.vcard.toJSON(), {
  65328. '__': __,
  65329. 'fullname': this.model.vcard.get('fullname') || _converse.bare_jid,
  65330. 'status_message': this.model.get('status_message') || __("I am %1$s", this.getPrettyStatus(chat_status)),
  65331. 'chat_status': chat_status,
  65332. '_converse': _converse,
  65333. 'title_change_settings': __('Change settings'),
  65334. 'title_change_status': __('Click to change your chat status'),
  65335. 'title_log_out': __('Log out'),
  65336. 'title_your_profile': __('Your profile')
  65337. }));
  65338. },
  65339. afterRender() {
  65340. this.renderAvatar();
  65341. },
  65342. showProfileModal(ev) {
  65343. if (_.isUndefined(this.profile_modal)) {
  65344. this.profile_modal = new _converse.ProfileModal({
  65345. model: this.model
  65346. });
  65347. }
  65348. this.profile_modal.show(ev);
  65349. },
  65350. showStatusChangeModal(ev) {
  65351. if (_.isUndefined(this.status_modal)) {
  65352. this.status_modal = new _converse.ChatStatusModal({
  65353. model: this.model
  65354. });
  65355. }
  65356. this.status_modal.show(ev);
  65357. },
  65358. logOut(ev) {
  65359. ev.preventDefault();
  65360. const result = confirm(__("Are you sure you want to log out?"));
  65361. if (result === true) {
  65362. _converse.logOut();
  65363. }
  65364. },
  65365. getPrettyStatus(stat) {
  65366. if (stat === 'chat') {
  65367. return __('online');
  65368. } else if (stat === 'dnd') {
  65369. return __('busy');
  65370. } else if (stat === 'xa') {
  65371. return __('away for long');
  65372. } else if (stat === 'away') {
  65373. return __('away');
  65374. } else if (stat === 'offline') {
  65375. return __('offline');
  65376. } else {
  65377. return __(stat) || __('online');
  65378. }
  65379. }
  65380. });
  65381. }
  65382. });
  65383. });
  65384. /***/ }),
  65385. /***/ "./src/converse-push.js":
  65386. /*!******************************!*\
  65387. !*** ./src/converse-push.js ***!
  65388. \******************************/
  65389. /*! no static exports found */
  65390. /***/ (function(module, exports, __webpack_require__) {
  65391. "use strict";
  65392. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  65393. // Converse.js
  65394. // https://conversejs.org
  65395. //
  65396. // Copyright (c) 2013-2018, the Converse.js developers
  65397. // Licensed under the Mozilla Public License (MPLv2)
  65398. /* This is a Converse.js plugin which add support for registering
  65399. * an "App Server" as defined in XEP-0357
  65400. */
  65401. (function (root, factory) {
  65402. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  65403. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  65404. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  65405. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  65406. })(void 0, function (converse) {
  65407. "use strict";
  65408. const _converse$env = converse.env,
  65409. Strophe = _converse$env.Strophe,
  65410. $iq = _converse$env.$iq,
  65411. _ = _converse$env._;
  65412. Strophe.addNamespace('PUSH', 'urn:xmpp:push:0');
  65413. converse.plugins.add('converse-push', {
  65414. initialize() {
  65415. /* The initialize function gets called as soon as the plugin is
  65416. * loaded by converse.js's plugin machinery.
  65417. */
  65418. const _converse = this._converse,
  65419. __ = _converse.__;
  65420. _converse.api.settings.update({
  65421. 'push_app_servers': [],
  65422. 'enable_muc_push': false
  65423. });
  65424. async function disablePushAppServer(domain, push_app_server) {
  65425. if (!push_app_server.jid) {
  65426. return;
  65427. }
  65428. const result = await _converse.api.disco.supports(Strophe.NS.PUSH, domain || _converse.bare_jid);
  65429. if (!result.length) {
  65430. return _converse.log(`Not disabling push app server "${push_app_server.jid}", no disco support from your server.`, Strophe.LogLevel.WARN);
  65431. }
  65432. const stanza = $iq({
  65433. 'type': 'set'
  65434. });
  65435. if (domain !== _converse.bare_jid) {
  65436. stanza.attrs({
  65437. 'to': domain
  65438. });
  65439. }
  65440. stanza.c('disable', {
  65441. 'xmlns': Strophe.NS.PUSH,
  65442. 'jid': push_app_server.jid
  65443. });
  65444. if (push_app_server.node) {
  65445. stanza.attrs({
  65446. 'node': push_app_server.node
  65447. });
  65448. }
  65449. _converse.api.sendIQ(stanza).catch(e => {
  65450. _converse.log(`Could not disable push app server for ${push_app_server.jid}`, Strophe.LogLevel.ERROR);
  65451. _converse.log(e, Strophe.LogLevel.ERROR);
  65452. });
  65453. }
  65454. async function enablePushAppServer(domain, push_app_server) {
  65455. if (!push_app_server.jid || !push_app_server.node) {
  65456. return;
  65457. }
  65458. const identity = await _converse.api.disco.getIdentity('pubsub', 'push', push_app_server.jid);
  65459. if (!identity) {
  65460. return _converse.log(`Not enabling push the service "${push_app_server.jid}", it doesn't have the right disco identtiy.`, Strophe.LogLevel.WARN);
  65461. }
  65462. const result = await Promise.all([_converse.api.disco.supports(Strophe.NS.PUSH, push_app_server.jid), _converse.api.disco.supports(Strophe.NS.PUSH, domain)]);
  65463. if (!result[0].length && !result[1].length) {
  65464. return _converse.log(`Not enabling push app server "${push_app_server.jid}", no disco support from your server.`, Strophe.LogLevel.WARN);
  65465. }
  65466. const stanza = $iq({
  65467. 'type': 'set'
  65468. });
  65469. if (domain !== _converse.bare_jid) {
  65470. stanza.attrs({
  65471. 'to': domain
  65472. });
  65473. }
  65474. stanza.c('enable', {
  65475. 'xmlns': Strophe.NS.PUSH,
  65476. 'jid': push_app_server.jid,
  65477. 'node': push_app_server.node
  65478. });
  65479. if (push_app_server.secret) {
  65480. stanza.c('x', {
  65481. 'xmlns': Strophe.NS.XFORM,
  65482. 'type': 'submit'
  65483. }).c('field', {
  65484. 'var': 'FORM_TYPE'
  65485. }).c('value').t(`${Strophe.NS.PUBSUB}#publish-options`).up().up().c('field', {
  65486. 'var': 'secret'
  65487. }).c('value').t(push_app_server.secret);
  65488. }
  65489. return _converse.api.sendIQ(stanza);
  65490. }
  65491. async function enablePush(domain) {
  65492. domain = domain || _converse.bare_jid;
  65493. const push_enabled = _converse.session.get('push_enabled') || [];
  65494. if (_.includes(push_enabled, domain)) {
  65495. return;
  65496. }
  65497. const enabled_services = _.reject(_converse.push_app_servers, 'disable');
  65498. try {
  65499. await Promise.all(_.map(enabled_services, _.partial(enablePushAppServer, domain)));
  65500. } catch (e) {
  65501. _converse.log('Could not enable push App Server', Strophe.LogLevel.ERROR);
  65502. if (e) _converse.log(e, Strophe.LogLevel.ERROR);
  65503. } finally {
  65504. push_enabled.push(domain);
  65505. }
  65506. const disabled_services = _.filter(_converse.push_app_servers, 'disable');
  65507. _.each(disabled_services, _.partial(disablePushAppServer, domain));
  65508. _converse.session.save('push_enabled', push_enabled);
  65509. }
  65510. _converse.api.listen.on('statusInitialized', () => enablePush());
  65511. function onChatBoxAdded(model) {
  65512. if (model.get('type') == _converse.CHATROOMS_TYPE) {
  65513. enablePush(Strophe.getDomainFromJid(model.get('jid')));
  65514. }
  65515. }
  65516. if (_converse.enable_muc_push) {
  65517. _converse.api.listen.on('chatBoxesInitialized', () => _converse.chatboxes.on('add', onChatBoxAdded));
  65518. }
  65519. }
  65520. });
  65521. });
  65522. /***/ }),
  65523. /***/ "./src/converse-register.js":
  65524. /*!**********************************!*\
  65525. !*** ./src/converse-register.js ***!
  65526. \**********************************/
  65527. /*! no static exports found */
  65528. /***/ (function(module, exports, __webpack_require__) {
  65529. "use strict";
  65530. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  65531. // Converse.js (A browser based XMPP chat client)
  65532. // http://conversejs.org
  65533. //
  65534. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  65535. // Licensed under the Mozilla Public License (MPLv2)
  65536. //
  65537. /*global define */
  65538. /* This is a Converse.js plugin which add support for in-band registration
  65539. * as specified in XEP-0077.
  65540. */
  65541. (function (root, factory) {
  65542. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! utils/form */ "./src/utils/form.js"), __webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! templates/form_username.html */ "./src/templates/form_username.html"), __webpack_require__(/*! templates/register_link.html */ "./src/templates/register_link.html"), __webpack_require__(/*! templates/register_panel.html */ "./src/templates/register_panel.html"), __webpack_require__(/*! templates/registration_form.html */ "./src/templates/registration_form.html"), __webpack_require__(/*! templates/registration_request.html */ "./src/templates/registration_request.html"), __webpack_require__(/*! templates/form_input.html */ "./src/templates/form_input.html"), __webpack_require__(/*! templates/spinner.html */ "./src/templates/spinner.html"), __webpack_require__(/*! converse-controlbox */ "./src/converse-controlbox.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  65543. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  65544. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  65545. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  65546. })(void 0, function (utils, converse, tpl_form_username, tpl_register_link, tpl_register_panel, tpl_registration_form, tpl_registration_request, tpl_form_input, tpl_spinner) {
  65547. "use strict"; // Strophe methods for building stanzas
  65548. const _converse$env = converse.env,
  65549. Strophe = _converse$env.Strophe,
  65550. Backbone = _converse$env.Backbone,
  65551. sizzle = _converse$env.sizzle,
  65552. $iq = _converse$env.$iq,
  65553. _ = _converse$env._; // Add Strophe Namespaces
  65554. Strophe.addNamespace('REGISTER', 'jabber:iq:register'); // Add Strophe Statuses
  65555. let i = 0;
  65556. _.each(_.keys(Strophe.Status), function (key) {
  65557. i = Math.max(i, Strophe.Status[key]);
  65558. });
  65559. Strophe.Status.REGIFAIL = i + 1;
  65560. Strophe.Status.REGISTERED = i + 2;
  65561. Strophe.Status.CONFLICT = i + 3;
  65562. Strophe.Status.NOTACCEPTABLE = i + 5;
  65563. converse.plugins.add('converse-register', {
  65564. 'overrides': {
  65565. // Overrides mentioned here will be picked up by converse.js's
  65566. // plugin architecture they will replace existing methods on the
  65567. // relevant objects or classes.
  65568. //
  65569. // New functions which don't exist yet can also be added.
  65570. LoginPanel: {
  65571. insertRegisterLink() {
  65572. const _converse = this.__super__._converse;
  65573. if (_.isUndefined(this.registerlinkview)) {
  65574. this.registerlinkview = new _converse.RegisterLinkView({
  65575. 'model': this.model
  65576. });
  65577. this.registerlinkview.render();
  65578. this.el.querySelector('.buttons').insertAdjacentElement('afterend', this.registerlinkview.el);
  65579. }
  65580. this.registerlinkview.render();
  65581. },
  65582. render(cfg) {
  65583. const _converse = this.__super__._converse;
  65584. this.__super__.render.apply(this, arguments);
  65585. if (_converse.allow_registration && !_converse.auto_login) {
  65586. this.insertRegisterLink();
  65587. }
  65588. return this;
  65589. }
  65590. },
  65591. ControlBoxView: {
  65592. initialize() {
  65593. this.__super__.initialize.apply(this, arguments);
  65594. this.model.on('change:active-form', this.showLoginOrRegisterForm.bind(this));
  65595. },
  65596. showLoginOrRegisterForm() {
  65597. const _converse = this.__super__._converse;
  65598. if (_.isNil(this.registerpanel)) {
  65599. return;
  65600. }
  65601. if (this.model.get('active-form') == "register") {
  65602. this.loginpanel.el.classList.add('hidden');
  65603. this.registerpanel.el.classList.remove('hidden');
  65604. } else {
  65605. this.loginpanel.el.classList.remove('hidden');
  65606. this.registerpanel.el.classList.add('hidden');
  65607. }
  65608. },
  65609. renderRegistrationPanel() {
  65610. const _converse = this.__super__._converse;
  65611. if (_converse.allow_registration) {
  65612. this.registerpanel = new _converse.RegisterPanel({
  65613. 'model': this.model
  65614. });
  65615. this.registerpanel.render();
  65616. this.registerpanel.el.classList.add('hidden');
  65617. this.el.querySelector('#converse-login-panel').insertAdjacentElement('afterend', this.registerpanel.el);
  65618. this.showLoginOrRegisterForm();
  65619. }
  65620. return this;
  65621. },
  65622. renderLoginPanel() {
  65623. /* Also render a registration panel, when rendering the
  65624. * login panel.
  65625. */
  65626. this.__super__.renderLoginPanel.apply(this, arguments);
  65627. this.renderRegistrationPanel();
  65628. return this;
  65629. }
  65630. }
  65631. },
  65632. initialize() {
  65633. /* The initialize function gets called as soon as the plugin is
  65634. * loaded by converse.js's plugin machinery.
  65635. */
  65636. const _converse = this._converse,
  65637. __ = _converse.__;
  65638. _converse.CONNECTION_STATUS[Strophe.Status.REGIFAIL] = 'REGIFAIL';
  65639. _converse.CONNECTION_STATUS[Strophe.Status.REGISTERED] = 'REGISTERED';
  65640. _converse.CONNECTION_STATUS[Strophe.Status.CONFLICT] = 'CONFLICT';
  65641. _converse.CONNECTION_STATUS[Strophe.Status.NOTACCEPTABLE] = 'NOTACCEPTABLE';
  65642. _converse.api.settings.update({
  65643. 'allow_registration': true,
  65644. 'domain_placeholder': __(" e.g. conversejs.org"),
  65645. // Placeholder text shown in the domain input on the registration form
  65646. 'providers_link': 'https://compliance.conversations.im/',
  65647. // Link to XMPP providers shown on registration page
  65648. 'registration_domain': ''
  65649. });
  65650. function setActiveForm(value) {
  65651. _converse.api.waitUntil('controlboxInitialized').then(() => {
  65652. const controlbox = _converse.chatboxes.get('controlbox');
  65653. controlbox.set({
  65654. 'active-form': value
  65655. });
  65656. }).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
  65657. }
  65658. _converse.router.route('converse/login', _.partial(setActiveForm, 'login'));
  65659. _converse.router.route('converse/register', _.partial(setActiveForm, 'register'));
  65660. _converse.RegisterLinkView = Backbone.VDOMView.extend({
  65661. toHTML() {
  65662. return tpl_register_link(_.extend(this.model.toJSON(), {
  65663. '__': _converse.__,
  65664. '_converse': _converse,
  65665. 'connection_status': _converse.connfeedback.get('connection_status')
  65666. }));
  65667. }
  65668. });
  65669. _converse.RegisterPanel = Backbone.NativeView.extend({
  65670. tagName: 'div',
  65671. id: "converse-register-panel",
  65672. className: 'controlbox-pane fade-in',
  65673. events: {
  65674. 'submit form#converse-register': 'onFormSubmission',
  65675. 'click .button-cancel': 'renderProviderChoiceForm'
  65676. },
  65677. initialize(cfg) {
  65678. this.reset();
  65679. this.registerHooks();
  65680. },
  65681. render() {
  65682. this.model.set('registration_form_rendered', false);
  65683. this.el.innerHTML = tpl_register_panel({
  65684. '__': __,
  65685. 'default_domain': _converse.registration_domain,
  65686. 'label_register': __('Fetch registration form'),
  65687. 'help_providers': __('Tip: A list of public XMPP providers is available'),
  65688. 'help_providers_link': __('here'),
  65689. 'href_providers': _converse.providers_link,
  65690. 'domain_placeholder': _converse.domain_placeholder
  65691. });
  65692. if (_converse.registration_domain) {
  65693. this.fetchRegistrationForm(_converse.registration_domain);
  65694. }
  65695. return this;
  65696. },
  65697. registerHooks() {
  65698. /* Hook into Strophe's _connect_cb, so that we can send an IQ
  65699. * requesting the registration fields.
  65700. */
  65701. const conn = _converse.connection;
  65702. const connect_cb = conn._connect_cb.bind(conn);
  65703. conn._connect_cb = (req, callback, raw) => {
  65704. if (!this._registering) {
  65705. connect_cb(req, callback, raw);
  65706. } else {
  65707. if (this.getRegistrationFields(req, callback, raw)) {
  65708. this._registering = false;
  65709. }
  65710. }
  65711. };
  65712. },
  65713. getRegistrationFields(req, _callback, raw) {
  65714. /* Send an IQ stanza to the XMPP server asking for the
  65715. * registration fields.
  65716. * Parameters:
  65717. * (Strophe.Request) req - The current request
  65718. * (Function) callback
  65719. */
  65720. const conn = _converse.connection;
  65721. conn.connected = true;
  65722. const body = conn._proto._reqToData(req);
  65723. if (!body) {
  65724. return;
  65725. }
  65726. if (conn._proto._connect_cb(body) === Strophe.Status.CONNFAIL) {
  65727. this.showValidationError(__("Sorry, we're unable to connect to your chosen provider."));
  65728. return false;
  65729. }
  65730. const register = body.getElementsByTagName("register");
  65731. const mechanisms = body.getElementsByTagName("mechanism");
  65732. if (register.length === 0 && mechanisms.length === 0) {
  65733. conn._proto._no_auth_received(_callback);
  65734. return false;
  65735. }
  65736. if (register.length === 0) {
  65737. conn._changeConnectStatus(Strophe.Status.REGIFAIL);
  65738. this.showValidationError(__("Sorry, the given provider does not support in " + "band account registration. Please try with a " + "different provider."));
  65739. return true;
  65740. } // Send an IQ stanza to get all required data fields
  65741. conn._addSysHandler(this.onRegistrationFields.bind(this), null, "iq", null, null);
  65742. const stanza = $iq({
  65743. type: "get"
  65744. }).c("query", {
  65745. xmlns: Strophe.NS.REGISTER
  65746. }).tree();
  65747. stanza.setAttribute("id", conn.getUniqueId("sendIQ"));
  65748. conn.send(stanza);
  65749. conn.connected = false;
  65750. return true;
  65751. },
  65752. onRegistrationFields(stanza) {
  65753. /* Handler for Registration Fields Request.
  65754. *
  65755. * Parameters:
  65756. * (XMLElement) elem - The query stanza.
  65757. */
  65758. if (stanza.getAttribute("type") === "error") {
  65759. _converse.connection._changeConnectStatus(Strophe.Status.REGIFAIL, __('Something went wrong while establishing a connection with "%1$s". ' + 'Are you sure it exists?', this.domain));
  65760. return false;
  65761. }
  65762. if (stanza.getElementsByTagName("query").length !== 1) {
  65763. _converse.connection._changeConnectStatus(Strophe.Status.REGIFAIL, "unknown");
  65764. return false;
  65765. }
  65766. this.setFields(stanza);
  65767. if (!this.model.get('registration_form_rendered')) {
  65768. this.renderRegistrationForm(stanza);
  65769. }
  65770. return false;
  65771. },
  65772. reset(settings) {
  65773. const defaults = {
  65774. fields: {},
  65775. urls: [],
  65776. title: "",
  65777. instructions: "",
  65778. registered: false,
  65779. _registering: false,
  65780. domain: null,
  65781. form_type: null
  65782. };
  65783. _.extend(this, defaults);
  65784. if (settings) {
  65785. _.extend(this, _.pick(settings, _.keys(defaults)));
  65786. }
  65787. },
  65788. onFormSubmission(ev) {
  65789. /* Event handler when the #converse-register form is
  65790. * submitted.
  65791. *
  65792. * Depending on the available input fields, we delegate to
  65793. * other methods.
  65794. */
  65795. if (ev && ev.preventDefault) {
  65796. ev.preventDefault();
  65797. }
  65798. if (_.isNull(ev.target.querySelector('input[name=domain]'))) {
  65799. this.submitRegistrationForm(ev.target);
  65800. } else {
  65801. this.onProviderChosen(ev.target);
  65802. }
  65803. },
  65804. onProviderChosen(form) {
  65805. /* Callback method that gets called when the user has chosen an
  65806. * XMPP provider.
  65807. *
  65808. * Parameters:
  65809. * (HTMLElement) form - The form that was submitted
  65810. */
  65811. const domain_input = form.querySelector('input[name=domain]'),
  65812. domain = _.get(domain_input, 'value');
  65813. if (!domain) {
  65814. // TODO: add validation message
  65815. domain_input.classList.add('error');
  65816. return;
  65817. }
  65818. form.querySelector('input[type=submit]').classList.add('hidden');
  65819. this.fetchRegistrationForm(domain.trim());
  65820. },
  65821. fetchRegistrationForm(domain_name) {
  65822. /* This is called with a domain name based on which, it fetches a
  65823. * registration form from the requested domain.
  65824. *
  65825. * Parameters:
  65826. * (String) domain_name - XMPP server domain
  65827. */
  65828. if (!this.model.get('registration_form_rendered')) {
  65829. this.renderRegistrationRequest();
  65830. }
  65831. this.reset({
  65832. 'domain': Strophe.getDomainFromJid(domain_name),
  65833. '_registering': true
  65834. });
  65835. _converse.connection.connect(this.domain, "", this.onConnectStatusChanged.bind(this));
  65836. return false;
  65837. },
  65838. renderRegistrationRequest() {
  65839. /* Clear the form and inform the user that the registration
  65840. * form is being fetched.
  65841. */
  65842. this.clearRegistrationForm().insertAdjacentHTML('beforeend', tpl_registration_request({
  65843. '__': _converse.__,
  65844. 'cancel': _converse.registration_domain
  65845. }));
  65846. },
  65847. giveFeedback(message, klass) {
  65848. let feedback = this.el.querySelector('.reg-feedback');
  65849. if (!_.isNull(feedback)) {
  65850. feedback.parentNode.removeChild(feedback);
  65851. }
  65852. const form = this.el.querySelector('form');
  65853. form.insertAdjacentHTML('afterbegin', '<span class="reg-feedback"></span>');
  65854. feedback = form.querySelector('.reg-feedback');
  65855. feedback.textContent = message;
  65856. if (klass) {
  65857. feedback.classList.add(klass);
  65858. }
  65859. },
  65860. clearRegistrationForm() {
  65861. const form = this.el.querySelector('form');
  65862. form.innerHTML = '';
  65863. this.model.set('registration_form_rendered', false);
  65864. return form;
  65865. },
  65866. showSpinner() {
  65867. const form = this.el.querySelector('form');
  65868. form.innerHTML = tpl_spinner();
  65869. this.model.set('registration_form_rendered', false);
  65870. return this;
  65871. },
  65872. onConnectStatusChanged(status_code) {
  65873. /* Callback function called by Strophe whenever the
  65874. * connection status changes.
  65875. *
  65876. * Passed to Strophe specifically during a registration
  65877. * attempt.
  65878. *
  65879. * Parameters:
  65880. * (Integer) status_code - The Stroph.Status status code
  65881. */
  65882. _converse.log('converse-register: onConnectStatusChanged');
  65883. if (_.includes([Strophe.Status.DISCONNECTED, Strophe.Status.CONNFAIL, Strophe.Status.REGIFAIL, Strophe.Status.NOTACCEPTABLE, Strophe.Status.CONFLICT], status_code)) {
  65884. _converse.log(`Problem during registration: Strophe.Status is ${_converse.CONNECTION_STATUS[status_code]}`, Strophe.LogLevel.ERROR);
  65885. this.abortRegistration();
  65886. } else if (status_code === Strophe.Status.REGISTERED) {
  65887. _converse.log("Registered successfully.");
  65888. _converse.connection.reset();
  65889. this.showSpinner();
  65890. if (_.includes(["converse/login", "converse/register"], Backbone.history.getFragment())) {
  65891. _converse.router.navigate('', {
  65892. 'replace': true
  65893. });
  65894. }
  65895. if (this.fields.password && this.fields.username) {
  65896. // automatically log the user in
  65897. _converse.connection.connect(this.fields.username.toLowerCase() + '@' + this.domain.toLowerCase(), this.fields.password, _converse.onConnectStatusChanged);
  65898. this.giveFeedback(__('Now logging you in'), 'info');
  65899. } else {
  65900. _converse.chatboxviews.get('controlbox').renderLoginPanel();
  65901. _converse.giveFeedback(__('Registered successfully'));
  65902. }
  65903. this.reset();
  65904. }
  65905. },
  65906. renderLegacyRegistrationForm(form) {
  65907. _.each(_.keys(this.fields), key => {
  65908. if (key === "username") {
  65909. form.insertAdjacentHTML('beforeend', tpl_form_username({
  65910. 'domain': ` @${this.domain}`,
  65911. 'name': key,
  65912. 'type': "text",
  65913. 'label': key,
  65914. 'value': '',
  65915. 'required': true
  65916. }));
  65917. } else {
  65918. form.insertAdjacentHTML('beforeend', tpl_form_input({
  65919. 'label': key,
  65920. 'name': key,
  65921. 'placeholder': key,
  65922. 'required': true,
  65923. 'type': key === 'password' || key === 'email' ? key : "text",
  65924. 'value': ''
  65925. }));
  65926. }
  65927. }); // Show urls
  65928. _.each(this.urls, url => {
  65929. form.insertAdjacentHTML('afterend', '<a target="blank" rel="noopener" href="' + url + '">' + url + '</a>');
  65930. });
  65931. },
  65932. renderRegistrationForm(stanza) {
  65933. /* Renders the registration form based on the XForm fields
  65934. * received from the XMPP server.
  65935. *
  65936. * Parameters:
  65937. * (XMLElement) stanza - The IQ stanza received from the XMPP server.
  65938. */
  65939. const form = this.el.querySelector('form');
  65940. form.innerHTML = tpl_registration_form({
  65941. '__': _converse.__,
  65942. 'domain': this.domain,
  65943. 'title': this.title,
  65944. 'instructions': this.instructions,
  65945. 'registration_domain': _converse.registration_domain
  65946. });
  65947. const buttons = form.querySelector('fieldset.buttons');
  65948. if (this.form_type === 'xform') {
  65949. _.each(stanza.querySelectorAll('field'), field => {
  65950. buttons.insertAdjacentHTML('beforebegin', utils.xForm2webForm(field, stanza, this.domain));
  65951. });
  65952. } else {
  65953. this.renderLegacyRegistrationForm(form);
  65954. }
  65955. if (!this.fields) {
  65956. form.querySelector('.button-primary').classList.add('hidden');
  65957. }
  65958. form.classList.remove('hidden');
  65959. this.model.set('registration_form_rendered', true);
  65960. },
  65961. showValidationError(message) {
  65962. const form = this.el.querySelector('form');
  65963. let flash = form.querySelector('.form-errors');
  65964. if (_.isNull(flash)) {
  65965. flash = '<div class="form-errors hidden"></div>';
  65966. const instructions = form.querySelector('p.instructions');
  65967. if (_.isNull(instructions)) {
  65968. form.insertAdjacentHTML('afterbegin', flash);
  65969. } else {
  65970. instructions.insertAdjacentHTML('afterend', flash);
  65971. }
  65972. flash = form.querySelector('.form-errors');
  65973. } else {
  65974. flash.innerHTML = '';
  65975. }
  65976. flash.insertAdjacentHTML('beforeend', '<p class="form-help error">' + message + '</p>');
  65977. flash.classList.remove('hidden');
  65978. },
  65979. reportErrors(stanza) {
  65980. /* Report back to the user any error messages received from the
  65981. * XMPP server after attempted registration.
  65982. *
  65983. * Parameters:
  65984. * (XMLElement) stanza - The IQ stanza received from the
  65985. * XMPP server.
  65986. */
  65987. const errors = stanza.querySelectorAll('error');
  65988. _.each(errors, error => {
  65989. this.showValidationError(error.textContent);
  65990. });
  65991. if (!errors.length) {
  65992. const message = __('The provider rejected your registration attempt. ' + 'Please check the values you entered for correctness.');
  65993. this.showValidationError(message);
  65994. }
  65995. },
  65996. renderProviderChoiceForm(ev) {
  65997. if (ev && ev.preventDefault) {
  65998. ev.preventDefault();
  65999. }
  66000. _converse.connection._proto._abortAllRequests();
  66001. _converse.connection.reset();
  66002. this.render();
  66003. },
  66004. abortRegistration() {
  66005. _converse.connection._proto._abortAllRequests();
  66006. _converse.connection.reset();
  66007. if (this.model.get('registration_form_rendered')) {
  66008. if (_converse.registration_domain && this.model.get('registration_form_rendered')) {
  66009. this.fetchRegistrationForm(_converse.registration_domain);
  66010. }
  66011. } else {
  66012. this.render();
  66013. }
  66014. },
  66015. submitRegistrationForm(form) {
  66016. /* Handler, when the user submits the registration form.
  66017. * Provides form error feedback or starts the registration
  66018. * process.
  66019. *
  66020. * Parameters:
  66021. * (HTMLElement) form - The HTML form that was submitted
  66022. */
  66023. const has_empty_inputs = _.reduce(this.el.querySelectorAll('input.required'), function (result, input) {
  66024. if (input.value === '') {
  66025. input.classList.add('error');
  66026. return result + 1;
  66027. }
  66028. return result;
  66029. }, 0);
  66030. if (has_empty_inputs) {
  66031. return;
  66032. }
  66033. const inputs = sizzle(':input:not([type=button]):not([type=submit])', form),
  66034. iq = $iq({
  66035. 'type': 'set',
  66036. 'id': _converse.connection.getUniqueId()
  66037. }).c("query", {
  66038. xmlns: Strophe.NS.REGISTER
  66039. });
  66040. if (this.form_type === 'xform') {
  66041. iq.c("x", {
  66042. xmlns: Strophe.NS.XFORM,
  66043. type: 'submit'
  66044. });
  66045. _.each(inputs, input => {
  66046. iq.cnode(utils.webForm2xForm(input)).up();
  66047. });
  66048. } else {
  66049. _.each(inputs, input => {
  66050. iq.c(input.getAttribute('name'), {}, input.value);
  66051. });
  66052. }
  66053. _converse.connection._addSysHandler(this._onRegisterIQ.bind(this), null, "iq", null, null);
  66054. _converse.connection.send(iq);
  66055. this.setFields(iq.tree());
  66056. },
  66057. setFields(stanza) {
  66058. /* Stores the values that will be sent to the XMPP server
  66059. * during attempted registration.
  66060. *
  66061. * Parameters:
  66062. * (XMLElement) stanza - the IQ stanza that will be sent to the XMPP server.
  66063. */
  66064. const query = stanza.querySelector('query');
  66065. const xform = sizzle(`x[xmlns="${Strophe.NS.XFORM}"]`, query);
  66066. if (xform.length > 0) {
  66067. this._setFieldsFromXForm(xform.pop());
  66068. } else {
  66069. this._setFieldsFromLegacy(query);
  66070. }
  66071. },
  66072. _setFieldsFromLegacy(query) {
  66073. _.each(query.children, field => {
  66074. if (field.tagName.toLowerCase() === 'instructions') {
  66075. this.instructions = Strophe.getText(field);
  66076. return;
  66077. } else if (field.tagName.toLowerCase() === 'x') {
  66078. if (field.getAttribute('xmlns') === 'jabber:x:oob') {
  66079. this.urls.concat(_.map(field.querySelectorAll('url'), 'textContent'));
  66080. }
  66081. return;
  66082. }
  66083. this.fields[field.tagName.toLowerCase()] = Strophe.getText(field);
  66084. });
  66085. this.form_type = 'legacy';
  66086. },
  66087. _setFieldsFromXForm(xform) {
  66088. this.title = _.get(xform.querySelector('title'), 'textContent');
  66089. this.instructions = _.get(xform.querySelector('instructions'), 'textContent');
  66090. _.each(xform.querySelectorAll('field'), field => {
  66091. const _var = field.getAttribute('var');
  66092. if (_var) {
  66093. this.fields[_var.toLowerCase()] = _.get(field.querySelector('value'), 'textContent', '');
  66094. } else {
  66095. // TODO: other option seems to be type="fixed"
  66096. _converse.log("Found field we couldn't parse", Strophe.LogLevel.WARN);
  66097. }
  66098. });
  66099. this.form_type = 'xform';
  66100. },
  66101. _onRegisterIQ(stanza) {
  66102. /* Callback method that gets called when a return IQ stanza
  66103. * is received from the XMPP server, after attempting to
  66104. * register a new user.
  66105. *
  66106. * Parameters:
  66107. * (XMLElement) stanza - The IQ stanza.
  66108. */
  66109. if (stanza.getAttribute("type") === "error") {
  66110. _converse.log("Registration failed.", Strophe.LogLevel.ERROR);
  66111. this.reportErrors(stanza);
  66112. let error = stanza.getElementsByTagName("error");
  66113. if (error.length !== 1) {
  66114. _converse.connection._changeConnectStatus(Strophe.Status.REGIFAIL, "unknown");
  66115. return false;
  66116. }
  66117. error = error[0].firstChild.tagName.toLowerCase();
  66118. if (error === 'conflict') {
  66119. _converse.connection._changeConnectStatus(Strophe.Status.CONFLICT, error);
  66120. } else if (error === 'not-acceptable') {
  66121. _converse.connection._changeConnectStatus(Strophe.Status.NOTACCEPTABLE, error);
  66122. } else {
  66123. _converse.connection._changeConnectStatus(Strophe.Status.REGIFAIL, error);
  66124. }
  66125. } else {
  66126. _converse.connection._changeConnectStatus(Strophe.Status.REGISTERED, null);
  66127. }
  66128. return false;
  66129. }
  66130. });
  66131. }
  66132. });
  66133. });
  66134. /***/ }),
  66135. /***/ "./src/converse-roomslist.js":
  66136. /*!***********************************!*\
  66137. !*** ./src/converse-roomslist.js ***!
  66138. \***********************************/
  66139. /*! no static exports found */
  66140. /***/ (function(module, exports, __webpack_require__) {
  66141. "use strict";
  66142. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  66143. // Converse.js (A browser based XMPP chat client)
  66144. // http://conversejs.org
  66145. //
  66146. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  66147. // Licensed under the Mozilla Public License (MPLv2)
  66148. //
  66149. /*global define */
  66150. /* This is a non-core Converse.js plugin which shows a list of currently open
  66151. * rooms in the "Rooms Panel" of the ControlBox.
  66152. */
  66153. (function (root, factory) {
  66154. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! converse-muc */ "./src/converse-muc.js"), __webpack_require__(/*! templates/rooms_list.html */ "./src/templates/rooms_list.html"), __webpack_require__(/*! templates/rooms_list_item.html */ "./src/templates/rooms_list_item.html")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  66155. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  66156. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  66157. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  66158. })(void 0, function (converse, muc, tpl_rooms_list, tpl_rooms_list_item) {
  66159. const _converse$env = converse.env,
  66160. Backbone = _converse$env.Backbone,
  66161. Promise = _converse$env.Promise,
  66162. Strophe = _converse$env.Strophe,
  66163. b64_sha1 = _converse$env.b64_sha1,
  66164. sizzle = _converse$env.sizzle,
  66165. _ = _converse$env._;
  66166. const u = converse.env.utils;
  66167. converse.plugins.add('converse-roomslist', {
  66168. /* Optional dependencies are other plugins which might be
  66169. * overridden or relied upon, and therefore need to be loaded before
  66170. * this plugin. They are called "optional" because they might not be
  66171. * available, in which case any overrides applicable to them will be
  66172. * ignored.
  66173. *
  66174. * It's possible however to make optional dependencies non-optional.
  66175. * If the setting "strict_plugin_dependencies" is set to true,
  66176. * an error will be raised if the plugin is not found.
  66177. *
  66178. * NB: These plugins need to have already been loaded via require.js.
  66179. */
  66180. dependencies: ["converse-singleton", "converse-controlbox", "converse-muc", "converse-bookmarks"],
  66181. initialize() {
  66182. /* The initialize function gets called as soon as the plugin is
  66183. * loaded by converse.js's plugin machinery.
  66184. */
  66185. const _converse = this._converse,
  66186. __ = _converse.__;
  66187. _converse.OpenRooms = Backbone.Collection.extend({
  66188. comparator(room) {
  66189. if (room.get('bookmarked')) {
  66190. const bookmark = _.head(_converse.bookmarksview.model.where({
  66191. 'jid': room.get('jid')
  66192. }));
  66193. return bookmark.get('name');
  66194. } else {
  66195. return room.get('name');
  66196. }
  66197. },
  66198. initialize() {
  66199. _converse.chatboxes.on('add', this.onChatBoxAdded, this);
  66200. _converse.chatboxes.on('change:hidden', this.onChatBoxChanged, this);
  66201. _converse.chatboxes.on('change:bookmarked', this.onChatBoxChanged, this);
  66202. _converse.chatboxes.on('change:name', this.onChatBoxChanged, this);
  66203. _converse.chatboxes.on('change:num_unread', this.onChatBoxChanged, this);
  66204. _converse.chatboxes.on('change:num_unread_general', this.onChatBoxChanged, this);
  66205. _converse.chatboxes.on('remove', this.onChatBoxRemoved, this);
  66206. this.reset(_.map(_converse.chatboxes.where({
  66207. 'type': 'chatroom'
  66208. }), 'attributes'));
  66209. },
  66210. onChatBoxAdded(item) {
  66211. if (item.get('type') === 'chatroom') {
  66212. this.create(item.attributes);
  66213. }
  66214. },
  66215. onChatBoxChanged(item) {
  66216. if (item.get('type') === 'chatroom') {
  66217. const room = this.get(item.get('jid'));
  66218. if (!_.isNil(room)) {
  66219. room.set(item.attributes);
  66220. }
  66221. }
  66222. },
  66223. onChatBoxRemoved(item) {
  66224. if (item.get('type') === 'chatroom') {
  66225. const room = this.get(item.get('jid'));
  66226. this.remove(room);
  66227. }
  66228. }
  66229. });
  66230. _converse.RoomsList = Backbone.Model.extend({
  66231. defaults: {
  66232. "toggle-state": _converse.OPENED
  66233. }
  66234. });
  66235. _converse.RoomsListElementView = Backbone.VDOMView.extend({
  66236. events: {
  66237. 'click .room-info': 'showRoomDetailsModal'
  66238. },
  66239. initialize() {
  66240. this.model.on('destroy', this.remove, this);
  66241. this.model.on('remove', this.remove, this);
  66242. this.model.on('change:bookmarked', this.render, this);
  66243. this.model.on('change:hidden', this.render, this);
  66244. this.model.on('change:name', this.render, this);
  66245. this.model.on('change:num_unread', this.render, this);
  66246. this.model.on('change:num_unread_general', this.render, this);
  66247. },
  66248. toHTML() {
  66249. return tpl_rooms_list_item(_.extend(this.model.toJSON(), {
  66250. // XXX: By the time this renders, the _converse.bookmarks
  66251. // collection should already exist if bookmarks are
  66252. // supported by the XMPP server. So we can use it
  66253. // as a check for support (other ways of checking are async).
  66254. 'allow_bookmarks': _converse.allow_bookmarks && _converse.bookmarks,
  66255. 'currently_open': _converse.isSingleton() && !this.model.get('hidden'),
  66256. 'info_leave_room': __('Leave this groupchat'),
  66257. 'info_remove_bookmark': __('Unbookmark this groupchat'),
  66258. 'info_add_bookmark': __('Bookmark this groupchat'),
  66259. 'info_title': __('Show more information on this groupchat'),
  66260. 'name': this.getRoomsListElementName(),
  66261. 'open_title': __('Click to open this groupchat')
  66262. }));
  66263. },
  66264. showRoomDetailsModal(ev) {
  66265. const room = _converse.chatboxes.get(this.model.get('jid'));
  66266. ev.preventDefault();
  66267. if (_.isUndefined(room.room_details_modal)) {
  66268. room.room_details_modal = new _converse.RoomDetailsModal({
  66269. 'model': room
  66270. });
  66271. }
  66272. room.room_details_modal.show(ev);
  66273. },
  66274. getRoomsListElementName() {
  66275. if (this.model.get('bookmarked') && _converse.bookmarksview) {
  66276. const bookmark = _.head(_converse.bookmarksview.model.where({
  66277. 'jid': this.model.get('jid')
  66278. }));
  66279. return bookmark.get('name');
  66280. } else {
  66281. return this.model.get('name');
  66282. }
  66283. }
  66284. });
  66285. _converse.RoomsListView = Backbone.OrderedListView.extend({
  66286. tagName: 'div',
  66287. className: 'open-rooms-list list-container rooms-list-container',
  66288. events: {
  66289. 'click .add-bookmark': 'addBookmark',
  66290. 'click .close-room': 'closeRoom',
  66291. 'click .list-toggle': 'toggleRoomsList',
  66292. 'click .remove-bookmark': 'removeBookmark',
  66293. 'click .open-room': 'openRoom'
  66294. },
  66295. listSelector: '.rooms-list',
  66296. ItemView: _converse.RoomsListElementView,
  66297. subviewIndex: 'jid',
  66298. initialize() {
  66299. Backbone.OrderedListView.prototype.initialize.apply(this, arguments);
  66300. this.model.on('add', this.showOrHide, this);
  66301. this.model.on('remove', this.showOrHide, this);
  66302. const storage = _converse.config.get('storage'),
  66303. id = b64_sha1(`converse.roomslist${_converse.bare_jid}`);
  66304. this.list_model = new _converse.RoomsList({
  66305. 'id': id
  66306. });
  66307. this.list_model.browserStorage = new Backbone.BrowserStorage[storage](id);
  66308. this.list_model.fetch();
  66309. this.render();
  66310. this.sortAndPositionAllItems();
  66311. },
  66312. render() {
  66313. this.el.innerHTML = tpl_rooms_list({
  66314. 'toggle_state': this.list_model.get('toggle-state'),
  66315. 'desc_rooms': __('Click to toggle the list of open groupchats'),
  66316. 'label_rooms': __('Open Groupchats'),
  66317. '_converse': _converse
  66318. });
  66319. if (this.list_model.get('toggle-state') !== _converse.OPENED) {
  66320. this.el.querySelector('.open-rooms-list').classList.add('collapsed');
  66321. }
  66322. this.showOrHide();
  66323. this.insertIntoControlBox();
  66324. return this;
  66325. },
  66326. insertIntoControlBox() {
  66327. const controlboxview = _converse.chatboxviews.get('controlbox');
  66328. if (!_.isUndefined(controlboxview) && !u.rootContains(_converse.root, this.el)) {
  66329. const el = controlboxview.el.querySelector('.open-rooms-list');
  66330. if (!_.isNull(el)) {
  66331. el.parentNode.replaceChild(this.el, el);
  66332. }
  66333. }
  66334. },
  66335. hide() {
  66336. u.hideElement(this.el);
  66337. },
  66338. show() {
  66339. u.showElement(this.el);
  66340. },
  66341. openRoom(ev) {
  66342. ev.preventDefault();
  66343. const name = ev.target.textContent;
  66344. const jid = ev.target.getAttribute('data-room-jid');
  66345. const data = {
  66346. 'name': name || Strophe.unescapeNode(Strophe.getNodeFromJid(jid)) || jid
  66347. };
  66348. _converse.api.rooms.open(jid, data);
  66349. },
  66350. closeRoom(ev) {
  66351. ev.preventDefault();
  66352. const name = ev.target.getAttribute('data-room-name');
  66353. const jid = ev.target.getAttribute('data-room-jid');
  66354. if (confirm(__("Are you sure you want to leave the groupchat %1$s?", name))) {
  66355. // TODO: replace with API call
  66356. _converse.chatboxviews.get(jid).close();
  66357. }
  66358. },
  66359. showOrHide(item) {
  66360. if (!this.model.models.length) {
  66361. u.hideElement(this.el);
  66362. } else {
  66363. u.showElement(this.el);
  66364. }
  66365. },
  66366. removeBookmark: _converse.removeBookmarkViaEvent,
  66367. addBookmark: _converse.addBookmarkViaEvent,
  66368. toggleRoomsList(ev) {
  66369. if (ev && ev.preventDefault) {
  66370. ev.preventDefault();
  66371. }
  66372. const icon_el = ev.target.querySelector('.fa');
  66373. if (icon_el.classList.contains("fa-caret-down")) {
  66374. u.slideIn(this.el.querySelector('.open-rooms-list')).then(() => {
  66375. this.list_model.save({
  66376. 'toggle-state': _converse.CLOSED
  66377. });
  66378. icon_el.classList.remove("fa-caret-down");
  66379. icon_el.classList.add("fa-caret-right");
  66380. });
  66381. } else {
  66382. u.slideOut(this.el.querySelector('.open-rooms-list')).then(() => {
  66383. this.list_model.save({
  66384. 'toggle-state': _converse.OPENED
  66385. });
  66386. icon_el.classList.remove("fa-caret-right");
  66387. icon_el.classList.add("fa-caret-down");
  66388. });
  66389. }
  66390. }
  66391. });
  66392. const initRoomsListView = function initRoomsListView() {
  66393. const storage = _converse.config.get('storage'),
  66394. id = b64_sha1(`converse.open-rooms-{_converse.bare_jid}`),
  66395. model = new _converse.OpenRooms();
  66396. model.browserStorage = new Backbone.BrowserStorage[storage](id);
  66397. _converse.rooms_list_view = new _converse.RoomsListView({
  66398. 'model': model
  66399. });
  66400. };
  66401. if (_converse.allow_bookmarks) {
  66402. u.onMultipleEvents([{
  66403. 'object': _converse,
  66404. 'event': 'chatBoxesFetched'
  66405. }, {
  66406. 'object': _converse,
  66407. 'event': 'roomsPanelRendered'
  66408. }, {
  66409. 'object': _converse,
  66410. 'event': 'bookmarksInitialized'
  66411. }], initRoomsListView);
  66412. } else {
  66413. u.onMultipleEvents([{
  66414. 'object': _converse,
  66415. 'event': 'chatBoxesFetched'
  66416. }, {
  66417. 'object': _converse,
  66418. 'event': 'roomsPanelRendered'
  66419. }], initRoomsListView);
  66420. }
  66421. _converse.api.listen.on('reconnected', initRoomsListView);
  66422. }
  66423. });
  66424. });
  66425. /***/ }),
  66426. /***/ "./src/converse-roster.js":
  66427. /*!********************************!*\
  66428. !*** ./src/converse-roster.js ***!
  66429. \********************************/
  66430. /*! no static exports found */
  66431. /***/ (function(module, exports, __webpack_require__) {
  66432. "use strict";
  66433. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  66434. // Converse.js
  66435. // http://conversejs.org
  66436. //
  66437. // Copyright (c) 2012-2018, the Converse.js developers
  66438. // Licensed under the Mozilla Public License (MPLv2)
  66439. (function (root, factory) {
  66440. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  66441. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  66442. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  66443. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  66444. })(void 0, function (converse) {
  66445. "use strict";
  66446. const _converse$env = converse.env,
  66447. Backbone = _converse$env.Backbone,
  66448. Promise = _converse$env.Promise,
  66449. Strophe = _converse$env.Strophe,
  66450. $iq = _converse$env.$iq,
  66451. $pres = _converse$env.$pres,
  66452. b64_sha1 = _converse$env.b64_sha1,
  66453. moment = _converse$env.moment,
  66454. sizzle = _converse$env.sizzle,
  66455. _ = _converse$env._;
  66456. const u = converse.env.utils;
  66457. converse.plugins.add('converse-roster', {
  66458. dependencies: ["converse-vcard"],
  66459. initialize() {
  66460. /* The initialize function gets called as soon as the plugin is
  66461. * loaded by converse.js's plugin machinery.
  66462. */
  66463. const _converse = this._converse,
  66464. __ = _converse.__;
  66465. _converse.api.settings.update({
  66466. 'allow_contact_requests': true,
  66467. 'auto_subscribe': false,
  66468. 'synchronize_availability': true
  66469. });
  66470. _converse.api.promises.add(['cachedRoster', 'roster', 'rosterContactsFetched', 'rosterGroupsFetched', 'rosterInitialized']);
  66471. _converse.registerPresenceHandler = function () {
  66472. _converse.unregisterPresenceHandler();
  66473. _converse.presence_ref = _converse.connection.addHandler(function (presence) {
  66474. _converse.roster.presenceHandler(presence);
  66475. return true;
  66476. }, null, 'presence', null);
  66477. };
  66478. _converse.initRoster = function () {
  66479. /* Initialize the Bakcbone collections that represent the contats
  66480. * roster and the roster groups.
  66481. */
  66482. const storage = _converse.config.get('storage');
  66483. _converse.roster = new _converse.RosterContacts();
  66484. _converse.roster.browserStorage = new Backbone.BrowserStorage[storage](b64_sha1(`converse.contacts-${_converse.bare_jid}`));
  66485. _converse.roster.data = new Backbone.Model();
  66486. const id = b64_sha1(`converse-roster-model-${_converse.bare_jid}`);
  66487. _converse.roster.data.id = id;
  66488. _converse.roster.data.browserStorage = new Backbone.BrowserStorage[storage](id);
  66489. _converse.roster.data.fetch();
  66490. _converse.rostergroups = new _converse.RosterGroups();
  66491. _converse.rostergroups.browserStorage = new Backbone.BrowserStorage[storage](b64_sha1(`converse.roster.groups${_converse.bare_jid}`));
  66492. _converse.emit('rosterInitialized');
  66493. };
  66494. _converse.populateRoster = function (ignore_cache = false) {
  66495. /* Fetch all the roster groups, and then the roster contacts.
  66496. * Emit an event after fetching is done in each case.
  66497. *
  66498. * Parameters:
  66499. * (Bool) ignore_cache - If set to to true, the local cache
  66500. * will be ignored it's guaranteed that the XMPP server
  66501. * will be queried for the roster.
  66502. */
  66503. if (ignore_cache) {
  66504. _converse.send_initial_presence = true;
  66505. _converse.roster.fetchFromServer().then(() => {
  66506. _converse.emit('rosterContactsFetched');
  66507. _converse.sendInitialPresence();
  66508. }).catch(reason => {
  66509. _converse.log(reason, Strophe.LogLevel.ERROR);
  66510. _converse.sendInitialPresence();
  66511. });
  66512. } else {
  66513. _converse.rostergroups.fetchRosterGroups().then(() => {
  66514. _converse.emit('rosterGroupsFetched');
  66515. return _converse.roster.fetchRosterContacts();
  66516. }).then(() => {
  66517. _converse.emit('rosterContactsFetched');
  66518. _converse.sendInitialPresence();
  66519. }).catch(reason => {
  66520. _converse.log(reason, Strophe.LogLevel.ERROR);
  66521. _converse.sendInitialPresence();
  66522. });
  66523. }
  66524. };
  66525. _converse.Presence = Backbone.Model.extend({
  66526. defaults() {
  66527. return {
  66528. 'show': 'offline',
  66529. 'resources': {}
  66530. };
  66531. },
  66532. getHighestPriorityResource() {
  66533. /* Return the resource with the highest priority.
  66534. *
  66535. * If multiple resources have the same priority, take the
  66536. * latest one.
  66537. */
  66538. const resources = this.get('resources');
  66539. if (_.isObject(resources) && _.size(resources)) {
  66540. const val = _.flow(_.values, _.partial(_.sortBy, _, ['priority', 'timestamp']), _.reverse)(resources)[0];
  66541. if (!_.isUndefined(val)) {
  66542. return val;
  66543. }
  66544. }
  66545. },
  66546. addResource(presence) {
  66547. /* Adds a new resource and it's associated attributes as taken
  66548. * from the passed in presence stanza.
  66549. *
  66550. * Also updates the presence if the resource has higher priority (and is newer).
  66551. */
  66552. const jid = presence.getAttribute('from'),
  66553. show = _.propertyOf(presence.querySelector('show'))('textContent') || 'online',
  66554. resource = Strophe.getResourceFromJid(jid),
  66555. delay = sizzle(`delay[xmlns="${Strophe.NS.DELAY}"]`, presence).pop(),
  66556. timestamp = _.isNil(delay) ? moment().format() : moment(delay.getAttribute('stamp')).format();
  66557. let priority = _.propertyOf(presence.querySelector('priority'))('textContent') || 0;
  66558. priority = _.isNaN(parseInt(priority, 10)) ? 0 : parseInt(priority, 10);
  66559. const resources = _.isObject(this.get('resources')) ? this.get('resources') : {};
  66560. resources[resource] = {
  66561. 'name': resource,
  66562. 'priority': priority,
  66563. 'show': show,
  66564. 'timestamp': timestamp
  66565. };
  66566. const changed = {
  66567. 'resources': resources
  66568. };
  66569. const hpr = this.getHighestPriorityResource();
  66570. if (priority == hpr.priority && timestamp == hpr.timestamp) {
  66571. // Only set the "global" presence if this is the newest resource
  66572. // with the highest priority
  66573. changed.show = show;
  66574. }
  66575. this.save(changed);
  66576. return resources;
  66577. },
  66578. removeResource(resource) {
  66579. /* Remove the passed in resource from the resources map.
  66580. *
  66581. * Also redetermines the presence given that there's one less
  66582. * resource.
  66583. */
  66584. let resources = this.get('resources');
  66585. if (!_.isObject(resources)) {
  66586. resources = {};
  66587. } else {
  66588. delete resources[resource];
  66589. }
  66590. this.save({
  66591. 'resources': resources,
  66592. 'show': _.propertyOf(this.getHighestPriorityResource())('show') || 'offline'
  66593. });
  66594. }
  66595. });
  66596. _converse.Presences = Backbone.Collection.extend({
  66597. model: _converse.Presence
  66598. });
  66599. _converse.ModelWithVCardAndPresence = Backbone.Model.extend({
  66600. initialize() {
  66601. this.setVCard();
  66602. this.setPresence();
  66603. },
  66604. setVCard() {
  66605. const jid = this.get('jid');
  66606. this.vcard = _converse.vcards.findWhere({
  66607. 'jid': jid
  66608. }) || _converse.vcards.create({
  66609. 'jid': jid
  66610. });
  66611. },
  66612. setPresence() {
  66613. const jid = this.get('jid');
  66614. this.presence = _converse.presences.findWhere({
  66615. 'jid': jid
  66616. }) || _converse.presences.create({
  66617. 'jid': jid
  66618. });
  66619. }
  66620. });
  66621. _converse.RosterContact = _converse.ModelWithVCardAndPresence.extend({
  66622. defaults: {
  66623. 'chat_state': undefined,
  66624. 'image': _converse.DEFAULT_IMAGE,
  66625. 'image_type': _converse.DEFAULT_IMAGE_TYPE,
  66626. 'num_unread': 0,
  66627. 'status': ''
  66628. },
  66629. initialize(attributes) {
  66630. _converse.ModelWithVCardAndPresence.prototype.initialize.apply(this, arguments);
  66631. const jid = attributes.jid,
  66632. bare_jid = Strophe.getBareJidFromJid(jid).toLowerCase(),
  66633. resource = Strophe.getResourceFromJid(jid);
  66634. attributes.jid = bare_jid;
  66635. this.set(_.assignIn({
  66636. 'groups': [],
  66637. 'id': bare_jid,
  66638. 'jid': bare_jid,
  66639. 'user_id': Strophe.getNodeFromJid(jid)
  66640. }, attributes));
  66641. this.setChatBox();
  66642. this.presence.on('change:show', () => _converse.emit('contactPresenceChanged', this));
  66643. this.presence.on('change:show', () => this.trigger('presenceChanged'));
  66644. },
  66645. setChatBox(chatbox = null) {
  66646. chatbox = chatbox || _converse.chatboxes.get(this.get('jid'));
  66647. if (chatbox) {
  66648. this.chatbox = chatbox;
  66649. this.chatbox.on('change:hidden', this.render, this);
  66650. }
  66651. },
  66652. getDisplayName() {
  66653. return this.get('nickname') || this.vcard.get('nickname') || this.vcard.get('fullname') || this.get('jid');
  66654. },
  66655. getFullname() {
  66656. return this.vcard.get('fullname');
  66657. },
  66658. subscribe(message) {
  66659. /* Send a presence subscription request to this roster contact
  66660. *
  66661. * Parameters:
  66662. * (String) message - An optional message to explain the
  66663. * reason for the subscription request.
  66664. */
  66665. const pres = $pres({
  66666. to: this.get('jid'),
  66667. type: "subscribe"
  66668. });
  66669. if (message && message !== "") {
  66670. pres.c("status").t(message).up();
  66671. }
  66672. const nick = _converse.xmppstatus.vcard.get('nickname') || _converse.xmppstatus.vcard.get('fullname');
  66673. if (nick) {
  66674. pres.c('nick', {
  66675. 'xmlns': Strophe.NS.NICK
  66676. }).t(nick).up();
  66677. }
  66678. _converse.connection.send(pres);
  66679. this.save('ask', "subscribe"); // ask === 'subscribe' Means we have asked to subscribe to them.
  66680. return this;
  66681. },
  66682. ackSubscribe() {
  66683. /* Upon receiving the presence stanza of type "subscribed",
  66684. * the user SHOULD acknowledge receipt of that subscription
  66685. * state notification by sending a presence stanza of type
  66686. * "subscribe" to the contact
  66687. */
  66688. _converse.connection.send($pres({
  66689. 'type': 'subscribe',
  66690. 'to': this.get('jid')
  66691. }));
  66692. },
  66693. ackUnsubscribe() {
  66694. /* Upon receiving the presence stanza of type "unsubscribed",
  66695. * the user SHOULD acknowledge receipt of that subscription state
  66696. * notification by sending a presence stanza of type "unsubscribe"
  66697. * this step lets the user's server know that it MUST no longer
  66698. * send notification of the subscription state change to the user.
  66699. * Parameters:
  66700. * (String) jid - The Jabber ID of the user who is unsubscribing
  66701. */
  66702. _converse.connection.send($pres({
  66703. 'type': 'unsubscribe',
  66704. 'to': this.get('jid')
  66705. }));
  66706. this.removeFromRoster();
  66707. this.destroy();
  66708. },
  66709. unauthorize(message) {
  66710. /* Unauthorize this contact's presence subscription
  66711. * Parameters:
  66712. * (String) message - Optional message to send to the person being unauthorized
  66713. */
  66714. _converse.rejectPresenceSubscription(this.get('jid'), message);
  66715. return this;
  66716. },
  66717. authorize(message) {
  66718. /* Authorize presence subscription
  66719. * Parameters:
  66720. * (String) message - Optional message to send to the person being authorized
  66721. */
  66722. const pres = $pres({
  66723. 'to': this.get('jid'),
  66724. 'type': "subscribed"
  66725. });
  66726. if (message && message !== "") {
  66727. pres.c("status").t(message);
  66728. }
  66729. _converse.connection.send(pres);
  66730. return this;
  66731. },
  66732. removeFromRoster(callback, errback) {
  66733. /* Instruct the XMPP server to remove this contact from our roster
  66734. * Parameters:
  66735. * (Function) callback
  66736. */
  66737. const iq = $iq({
  66738. type: 'set'
  66739. }).c('query', {
  66740. xmlns: Strophe.NS.ROSTER
  66741. }).c('item', {
  66742. jid: this.get('jid'),
  66743. subscription: "remove"
  66744. });
  66745. _converse.connection.sendIQ(iq, callback, errback);
  66746. return this;
  66747. }
  66748. });
  66749. _converse.RosterContacts = Backbone.Collection.extend({
  66750. model: _converse.RosterContact,
  66751. comparator(contact1, contact2) {
  66752. const status1 = contact1.presence.get('show') || 'offline';
  66753. const status2 = contact2.presence.get('show') || 'offline';
  66754. if (_converse.STATUS_WEIGHTS[status1] === _converse.STATUS_WEIGHTS[status2]) {
  66755. const name1 = contact1.getDisplayName().toLowerCase();
  66756. const name2 = contact2.getDisplayName().toLowerCase();
  66757. return name1 < name2 ? -1 : name1 > name2 ? 1 : 0;
  66758. } else {
  66759. return _converse.STATUS_WEIGHTS[status1] < _converse.STATUS_WEIGHTS[status2] ? -1 : 1;
  66760. }
  66761. },
  66762. onConnected() {
  66763. /* Called as soon as the connection has been established
  66764. * (either after initial login, or after reconnection).
  66765. *
  66766. * Use the opportunity to register stanza handlers.
  66767. */
  66768. this.registerRosterHandler();
  66769. this.registerRosterXHandler();
  66770. },
  66771. registerRosterHandler() {
  66772. /* Register a handler for roster IQ "set" stanzas, which update
  66773. * roster contacts.
  66774. */
  66775. _converse.connection.addHandler(iq => {
  66776. _converse.roster.onRosterPush(iq);
  66777. return true;
  66778. }, Strophe.NS.ROSTER, 'iq', "set");
  66779. },
  66780. registerRosterXHandler() {
  66781. /* Register a handler for RosterX message stanzas, which are
  66782. * used to suggest roster contacts to a user.
  66783. */
  66784. let t = 0;
  66785. _converse.connection.addHandler(function (msg) {
  66786. window.setTimeout(function () {
  66787. _converse.connection.flush();
  66788. _converse.roster.subscribeToSuggestedItems.bind(_converse.roster)(msg);
  66789. }, t);
  66790. t += msg.querySelectorAll('item').length * 250;
  66791. return true;
  66792. }, Strophe.NS.ROSTERX, 'message', null);
  66793. },
  66794. fetchRosterContacts() {
  66795. /* Fetches the roster contacts, first by trying the
  66796. * sessionStorage cache, and if that's empty, then by querying
  66797. * the XMPP server.
  66798. *
  66799. * Returns a promise which resolves once the contacts have been
  66800. * fetched.
  66801. */
  66802. const that = this;
  66803. return new Promise((resolve, reject) => {
  66804. this.fetch({
  66805. 'add': true,
  66806. 'silent': true,
  66807. success(collection) {
  66808. if (collection.length === 0 || that.rosterVersioningSupported() && !_converse.session.get('roster_fetched')) {
  66809. _converse.send_initial_presence = true;
  66810. _converse.roster.fetchFromServer().then(resolve).catch(reject);
  66811. } else {
  66812. _converse.emit('cachedRoster', collection);
  66813. resolve();
  66814. }
  66815. }
  66816. });
  66817. });
  66818. },
  66819. subscribeToSuggestedItems(msg) {
  66820. _.each(msg.querySelectorAll('item'), function (item) {
  66821. if (item.getAttribute('action') === 'add') {
  66822. _converse.roster.addAndSubscribe(item.getAttribute('jid'), _converse.xmppstatus.vcard.get('nickname') || _converse.xmppstatus.vcard.get('fullname'));
  66823. }
  66824. });
  66825. return true;
  66826. },
  66827. isSelf(jid) {
  66828. return u.isSameBareJID(jid, _converse.connection.jid);
  66829. },
  66830. addAndSubscribe(jid, name, groups, message, attributes) {
  66831. /* Add a roster contact and then once we have confirmation from
  66832. * the XMPP server we subscribe to that contact's presence updates.
  66833. * Parameters:
  66834. * (String) jid - The Jabber ID of the user being added and subscribed to.
  66835. * (String) name - The name of that user
  66836. * (Array of Strings) groups - Any roster groups the user might belong to
  66837. * (String) message - An optional message to explain the
  66838. * reason for the subscription request.
  66839. * (Object) attributes - Any additional attributes to be stored on the user's model.
  66840. */
  66841. const handler = contact => {
  66842. if (contact instanceof _converse.RosterContact) {
  66843. contact.subscribe(message);
  66844. }
  66845. };
  66846. this.addContactToRoster(jid, name, groups, attributes).then(handler, handler);
  66847. },
  66848. sendContactAddIQ(jid, name, groups, callback, errback) {
  66849. /* Send an IQ stanza to the XMPP server to add a new roster contact.
  66850. *
  66851. * Parameters:
  66852. * (String) jid - The Jabber ID of the user being added
  66853. * (String) name - The name of that user
  66854. * (Array of Strings) groups - Any roster groups the user might belong to
  66855. * (Function) callback - A function to call once the IQ is returned
  66856. * (Function) errback - A function to call if an error occurred
  66857. */
  66858. name = _.isEmpty(name) ? jid : name;
  66859. const iq = $iq({
  66860. type: 'set'
  66861. }).c('query', {
  66862. xmlns: Strophe.NS.ROSTER
  66863. }).c('item', {
  66864. jid,
  66865. name
  66866. });
  66867. _.each(groups, function (group) {
  66868. iq.c('group').t(group).up();
  66869. });
  66870. _converse.connection.sendIQ(iq, callback, errback);
  66871. },
  66872. addContactToRoster(jid, name, groups, attributes) {
  66873. /* Adds a RosterContact instance to _converse.roster and
  66874. * registers the contact on the XMPP server.
  66875. * Returns a promise which is resolved once the XMPP server has
  66876. * responded.
  66877. *
  66878. * Parameters:
  66879. * (String) jid - The Jabber ID of the user being added and subscribed to.
  66880. * (String) name - The name of that user
  66881. * (Array of Strings) groups - Any roster groups the user might belong to
  66882. * (Object) attributes - Any additional attributes to be stored on the user's model.
  66883. */
  66884. return new Promise((resolve, reject) => {
  66885. groups = groups || [];
  66886. this.sendContactAddIQ(jid, name, groups, () => {
  66887. const contact = this.create(_.assignIn({
  66888. 'ask': undefined,
  66889. 'nickname': name,
  66890. groups,
  66891. jid,
  66892. 'requesting': false,
  66893. 'subscription': 'none'
  66894. }, attributes), {
  66895. sort: false
  66896. });
  66897. resolve(contact);
  66898. }, function (err) {
  66899. alert(__('Sorry, there was an error while trying to add %1$s as a contact.', name));
  66900. _converse.log(err, Strophe.LogLevel.ERROR);
  66901. resolve(err);
  66902. });
  66903. });
  66904. },
  66905. subscribeBack(bare_jid, presence) {
  66906. const contact = this.get(bare_jid);
  66907. if (contact instanceof _converse.RosterContact) {
  66908. contact.authorize().subscribe();
  66909. } else {
  66910. // Can happen when a subscription is retried or roster was deleted
  66911. const handler = contact => {
  66912. if (contact instanceof _converse.RosterContact) {
  66913. contact.authorize().subscribe();
  66914. }
  66915. };
  66916. const nickname = _.get(sizzle(`nick[xmlns="${Strophe.NS.NICK}"]`, presence).pop(), 'textContent', null);
  66917. this.addContactToRoster(bare_jid, nickname, [], {
  66918. 'subscription': 'from'
  66919. }).then(handler, handler);
  66920. }
  66921. },
  66922. getNumOnlineContacts() {
  66923. let ignored = ['offline', 'unavailable'];
  66924. if (_converse.show_only_online_users) {
  66925. ignored = _.union(ignored, ['dnd', 'xa', 'away']);
  66926. }
  66927. return _.sum(this.models.filter(model => !_.includes(ignored, model.presence.get('show'))));
  66928. },
  66929. onRosterPush(iq) {
  66930. /* Handle roster updates from the XMPP server.
  66931. * See: https://xmpp.org/rfcs/rfc6121.html#roster-syntax-actions-push
  66932. *
  66933. * Parameters:
  66934. * (XMLElement) IQ - The IQ stanza received from the XMPP server.
  66935. */
  66936. const id = iq.getAttribute('id');
  66937. const from = iq.getAttribute('from');
  66938. if (from && from !== _converse.connection.jid) {
  66939. // https://tools.ietf.org/html/rfc6121#page-15
  66940. //
  66941. // A receiving client MUST ignore the stanza unless it has no 'from'
  66942. // attribute (i.e., implicitly from the bare JID of the user's
  66943. // account) or it has a 'from' attribute whose value matches the
  66944. // user's bare JID <user@domainpart>.
  66945. return;
  66946. }
  66947. _converse.connection.send($iq({
  66948. type: 'result',
  66949. id,
  66950. from: _converse.connection.jid
  66951. }));
  66952. const query = sizzle(`query[xmlns="${Strophe.NS.ROSTER}"]`, iq).pop();
  66953. this.data.save('version', query.getAttribute('ver'));
  66954. const items = sizzle(`item`, query);
  66955. if (items.length > 1) {
  66956. _converse.log(iq, Strophe.LogLevel.ERROR);
  66957. throw new Error('Roster push query may not contain more than one "item" element.');
  66958. }
  66959. if (items.length === 0) {
  66960. _converse.log(iq, Strophe.LogLevel.WARN);
  66961. _converse.log('Received a roster push stanza without an "item" element.', Strophe.LogLevel.WARN);
  66962. return;
  66963. }
  66964. this.updateContact(items.pop());
  66965. _converse.emit('rosterPush', iq);
  66966. return;
  66967. },
  66968. rosterVersioningSupported() {
  66969. return _converse.api.disco.stream.getFeature('ver', 'urn:xmpp:features:rosterver') && this.data.get('version');
  66970. },
  66971. fetchFromServer() {
  66972. /* Fetch the roster from the XMPP server */
  66973. return new Promise((resolve, reject) => {
  66974. const iq = $iq({
  66975. 'type': 'get',
  66976. 'id': _converse.connection.getUniqueId('roster')
  66977. }).c('query', {
  66978. xmlns: Strophe.NS.ROSTER
  66979. });
  66980. if (this.rosterVersioningSupported()) {
  66981. iq.attrs({
  66982. 'ver': this.data.get('version')
  66983. });
  66984. }
  66985. const callback = _.flow(this.onReceivedFromServer.bind(this), resolve);
  66986. const errback = function errback(iq) {
  66987. const errmsg = "Error while trying to fetch roster from the server";
  66988. _converse.log(errmsg, Strophe.LogLevel.ERROR);
  66989. reject(new Error(errmsg));
  66990. };
  66991. return _converse.connection.sendIQ(iq, callback, errback);
  66992. });
  66993. },
  66994. onReceivedFromServer(iq) {
  66995. /* An IQ stanza containing the roster has been received from
  66996. * the XMPP server.
  66997. */
  66998. const query = sizzle(`query[xmlns="${Strophe.NS.ROSTER}"]`, iq).pop();
  66999. if (query) {
  67000. const items = sizzle(`item`, query);
  67001. _.each(items, item => this.updateContact(item));
  67002. this.data.save('version', query.getAttribute('ver'));
  67003. _converse.session.save('roster_fetched', true);
  67004. }
  67005. _converse.emit('roster', iq);
  67006. },
  67007. updateContact(item) {
  67008. /* Update or create RosterContact models based on items
  67009. * received in the IQ from the server.
  67010. */
  67011. const jid = item.getAttribute('jid');
  67012. if (this.isSelf(jid)) {
  67013. return;
  67014. }
  67015. const contact = this.get(jid),
  67016. subscription = item.getAttribute("subscription"),
  67017. ask = item.getAttribute("ask"),
  67018. groups = _.map(item.getElementsByTagName('group'), Strophe.getText);
  67019. if (!contact) {
  67020. if (subscription === "none" && ask === null || subscription === "remove") {
  67021. return; // We're lazy when adding contacts.
  67022. }
  67023. this.create({
  67024. 'ask': ask,
  67025. 'nickname': item.getAttribute("name"),
  67026. 'groups': groups,
  67027. 'jid': jid,
  67028. 'subscription': subscription
  67029. }, {
  67030. sort: false
  67031. });
  67032. } else {
  67033. if (subscription === "remove") {
  67034. return contact.destroy();
  67035. } // We only find out about requesting contacts via the
  67036. // presence handler, so if we receive a contact
  67037. // here, we know they aren't requesting anymore.
  67038. // see docs/DEVELOPER.rst
  67039. contact.save({
  67040. 'subscription': subscription,
  67041. 'ask': ask,
  67042. 'requesting': null,
  67043. 'groups': groups
  67044. });
  67045. }
  67046. },
  67047. createRequestingContact(presence) {
  67048. const bare_jid = Strophe.getBareJidFromJid(presence.getAttribute('from')),
  67049. nickname = _.get(sizzle(`nick[xmlns="${Strophe.NS.NICK}"]`, presence).pop(), 'textContent', null);
  67050. const user_data = {
  67051. 'jid': bare_jid,
  67052. 'subscription': 'none',
  67053. 'ask': null,
  67054. 'requesting': true,
  67055. 'nickname': nickname
  67056. };
  67057. _converse.emit('contactRequest', this.create(user_data));
  67058. },
  67059. handleIncomingSubscription(presence) {
  67060. const jid = presence.getAttribute('from'),
  67061. bare_jid = Strophe.getBareJidFromJid(jid),
  67062. contact = this.get(bare_jid);
  67063. if (!_converse.allow_contact_requests) {
  67064. _converse.rejectPresenceSubscription(jid, __("This client does not allow presence subscriptions"));
  67065. }
  67066. if (_converse.auto_subscribe) {
  67067. if (!contact || contact.get('subscription') !== 'to') {
  67068. this.subscribeBack(bare_jid, presence);
  67069. } else {
  67070. contact.authorize();
  67071. }
  67072. } else {
  67073. if (contact) {
  67074. if (contact.get('subscription') !== 'none') {
  67075. contact.authorize();
  67076. } else if (contact.get('ask') === "subscribe") {
  67077. contact.authorize();
  67078. }
  67079. } else {
  67080. this.createRequestingContact(presence);
  67081. }
  67082. }
  67083. },
  67084. handleOwnPresence(presence) {
  67085. const jid = presence.getAttribute('from'),
  67086. resource = Strophe.getResourceFromJid(jid),
  67087. presence_type = presence.getAttribute('type');
  67088. if (_converse.connection.jid !== jid && presence_type !== 'unavailable' && (_converse.synchronize_availability === true || _converse.synchronize_availability === resource)) {
  67089. // Another resource has changed its status and
  67090. // synchronize_availability option set to update,
  67091. // we'll update ours as well.
  67092. const show = _.propertyOf(presence.querySelector('show'))('textContent') || 'online';
  67093. _converse.xmppstatus.save({
  67094. 'status': show
  67095. }, {
  67096. 'silent': true
  67097. });
  67098. const status_message = _.propertyOf(presence.querySelector('status'))('textContent');
  67099. if (status_message) {
  67100. _converse.xmppstatus.save({
  67101. 'status_message': status_message
  67102. });
  67103. }
  67104. }
  67105. if (_converse.jid === jid && presence_type === 'unavailable') {
  67106. // XXX: We've received an "unavailable" presence from our
  67107. // own resource. Apparently this happens due to a
  67108. // Prosody bug, whereby we send an IQ stanza to remove
  67109. // a roster contact, and Prosody then sends
  67110. // "unavailable" globally, instead of directed to the
  67111. // particular user that's removed.
  67112. //
  67113. // Here is the bug report: https://prosody.im/issues/1121
  67114. //
  67115. // I'm not sure whether this might legitimately happen
  67116. // in other cases.
  67117. //
  67118. // As a workaround for now we simply send our presence again,
  67119. // otherwise we're treated as offline.
  67120. _converse.xmppstatus.sendPresence();
  67121. }
  67122. },
  67123. presenceHandler(presence) {
  67124. const presence_type = presence.getAttribute('type');
  67125. if (presence_type === 'error') {
  67126. return true;
  67127. }
  67128. const jid = presence.getAttribute('from'),
  67129. bare_jid = Strophe.getBareJidFromJid(jid);
  67130. if (this.isSelf(bare_jid)) {
  67131. return this.handleOwnPresence(presence);
  67132. } else if (sizzle(`query[xmlns="${Strophe.NS.MUC}"]`, presence).length) {
  67133. return; // Ignore MUC
  67134. }
  67135. const status_message = _.propertyOf(presence.querySelector('status'))('textContent'),
  67136. contact = this.get(bare_jid);
  67137. if (contact && status_message !== contact.get('status')) {
  67138. contact.save({
  67139. 'status': status_message
  67140. });
  67141. }
  67142. if (presence_type === 'subscribed' && contact) {
  67143. contact.ackSubscribe();
  67144. } else if (presence_type === 'unsubscribed' && contact) {
  67145. contact.ackUnsubscribe();
  67146. } else if (presence_type === 'unsubscribe') {
  67147. return;
  67148. } else if (presence_type === 'subscribe') {
  67149. this.handleIncomingSubscription(presence);
  67150. } else if (presence_type === 'unavailable' && contact) {
  67151. const resource = Strophe.getResourceFromJid(jid);
  67152. contact.presence.removeResource(resource);
  67153. } else if (contact) {
  67154. // presence_type is undefined
  67155. contact.presence.addResource(presence);
  67156. }
  67157. }
  67158. });
  67159. _converse.RosterGroup = Backbone.Model.extend({
  67160. initialize(attributes) {
  67161. this.set(_.assignIn({
  67162. description: __('Click to hide these contacts'),
  67163. state: _converse.OPENED
  67164. }, attributes)); // Collection of contacts belonging to this group.
  67165. this.contacts = new _converse.RosterContacts();
  67166. }
  67167. });
  67168. _converse.RosterGroups = Backbone.Collection.extend({
  67169. model: _converse.RosterGroup,
  67170. fetchRosterGroups() {
  67171. /* Fetches all the roster groups from sessionStorage.
  67172. *
  67173. * Returns a promise which resolves once the groups have been
  67174. * returned.
  67175. */
  67176. return new Promise((resolve, reject) => {
  67177. this.fetch({
  67178. silent: true,
  67179. // We need to first have all groups before
  67180. // we can start positioning them, so we set
  67181. // 'silent' to true.
  67182. success: resolve
  67183. });
  67184. });
  67185. }
  67186. });
  67187. _converse.unregisterPresenceHandler = function () {
  67188. if (!_.isUndefined(_converse.presence_ref)) {
  67189. _converse.connection.deleteHandler(_converse.presence_ref);
  67190. delete _converse.presence_ref;
  67191. }
  67192. };
  67193. /********** Event Handlers *************/
  67194. function updateUnreadCounter(chatbox) {
  67195. const contact = _converse.roster.findWhere({
  67196. 'jid': chatbox.get('jid')
  67197. });
  67198. if (!_.isUndefined(contact)) {
  67199. contact.save({
  67200. 'num_unread': chatbox.get('num_unread')
  67201. });
  67202. }
  67203. }
  67204. _converse.api.listen.on('chatBoxesInitialized', () => {
  67205. _converse.chatboxes.on('change:num_unread', updateUnreadCounter);
  67206. });
  67207. _converse.api.listen.on('beforeTearDown', _converse.unregisterPresenceHandler());
  67208. _converse.api.listen.on('afterTearDown', () => {
  67209. if (_converse.presences) {
  67210. _converse.presences.off().reset(); // Remove presences
  67211. }
  67212. });
  67213. _converse.api.listen.on('clearSession', () => {
  67214. if (_converse.presences) {
  67215. _converse.presences.browserStorage._clear();
  67216. }
  67217. });
  67218. _converse.api.listen.on('statusInitialized', reconnecting => {
  67219. if (!reconnecting) {
  67220. _converse.presences = new _converse.Presences();
  67221. _converse.presences.browserStorage = new Backbone.BrowserStorage.session(b64_sha1(`converse.presences-${_converse.bare_jid}`));
  67222. _converse.presences.fetch();
  67223. }
  67224. _converse.emit('presencesInitialized', reconnecting);
  67225. });
  67226. _converse.api.listen.on('presencesInitialized', reconnecting => {
  67227. if (reconnecting) {
  67228. // No need to recreate the roster, otherwise we lose our
  67229. // cached data. However we still emit an event, to give
  67230. // event handlers a chance to register views for the
  67231. // roster and its groups, before we start populating.
  67232. _converse.emit('rosterReadyAfterReconnection');
  67233. } else {
  67234. _converse.registerIntervalHandler();
  67235. _converse.initRoster();
  67236. }
  67237. _converse.roster.onConnected();
  67238. _converse.populateRoster(reconnecting);
  67239. _converse.registerPresenceHandler();
  67240. });
  67241. /************************ API ************************/
  67242. // API methods only available to plugins
  67243. _.extend(_converse.api, {
  67244. /**
  67245. * @namespace _converse.api.contacts
  67246. * @memberOf _converse.api
  67247. */
  67248. 'contacts': {
  67249. /**
  67250. * This method is used to retrieve roster contacts.
  67251. *
  67252. * @method _converse.api.contacts.get
  67253. * @params {(string[]|string)} jid|jids The JID or JIDs of
  67254. * the contacts to be returned.
  67255. * @returns {(RosterContact[]|RosterContact)} [Backbone.Model](http://backbonejs.org/#Model)
  67256. * (or an array of them) representing the contact.
  67257. *
  67258. * @example
  67259. * // Fetch a single contact
  67260. * _converse.api.listen.on('rosterContactsFetched', function () {
  67261. * const contact = _converse.api.contacts.get('buddy@example.com')
  67262. * // ...
  67263. * });
  67264. *
  67265. * @example
  67266. * // To get multiple contacts, pass in an array of JIDs:
  67267. * _converse.api.listen.on('rosterContactsFetched', function () {
  67268. * const contacts = _converse.api.contacts.get(
  67269. * ['buddy1@example.com', 'buddy2@example.com']
  67270. * )
  67271. * // ...
  67272. * });
  67273. *
  67274. * @example
  67275. * // To return all contacts, simply call ``get`` without any parameters:
  67276. * _converse.api.listen.on('rosterContactsFetched', function () {
  67277. * const contacts = _converse.api.contacts.get();
  67278. * // ...
  67279. * });
  67280. */
  67281. 'get'(jids) {
  67282. const _getter = function _getter(jid) {
  67283. return _converse.roster.get(Strophe.getBareJidFromJid(jid)) || null;
  67284. };
  67285. if (_.isUndefined(jids)) {
  67286. jids = _converse.roster.pluck('jid');
  67287. } else if (_.isString(jids)) {
  67288. return _getter(jids);
  67289. }
  67290. return _.map(jids, _getter);
  67291. },
  67292. /**
  67293. * Add a contact.
  67294. *
  67295. * @method _converse.api.contacts.add
  67296. * @param {string} jid The JID of the contact to be added
  67297. * @param {string} [name] A custom name to show the user by
  67298. * in the roster.
  67299. * @example
  67300. * _converse.api.contacts.add('buddy@example.com')
  67301. * @example
  67302. * _converse.api.contacts.add('buddy@example.com', 'Buddy')
  67303. */
  67304. 'add'(jid, name) {
  67305. if (!_.isString(jid) || !_.includes(jid, '@')) {
  67306. throw new TypeError('contacts.add: invalid jid');
  67307. }
  67308. _converse.roster.addAndSubscribe(jid, _.isEmpty(name) ? jid : name);
  67309. }
  67310. }
  67311. });
  67312. }
  67313. });
  67314. });
  67315. /***/ }),
  67316. /***/ "./src/converse-rosterview.js":
  67317. /*!************************************!*\
  67318. !*** ./src/converse-rosterview.js ***!
  67319. \************************************/
  67320. /*! no static exports found */
  67321. /***/ (function(module, exports, __webpack_require__) {
  67322. "use strict";
  67323. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  67324. // Converse.js
  67325. // http://conversejs.org
  67326. //
  67327. // Copyright (c) 2012-2018, the Converse.js developers
  67328. // Licensed under the Mozilla Public License (MPLv2)
  67329. (function (root, factory) {
  67330. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! formdata-polyfill */ "./node_modules/formdata-polyfill/FormData.js"), __webpack_require__(/*! templates/add_contact_modal.html */ "./src/templates/add_contact_modal.html"), __webpack_require__(/*! templates/group_header.html */ "./src/templates/group_header.html"), __webpack_require__(/*! templates/pending_contact.html */ "./src/templates/pending_contact.html"), __webpack_require__(/*! templates/requesting_contact.html */ "./src/templates/requesting_contact.html"), __webpack_require__(/*! templates/roster.html */ "./src/templates/roster.html"), __webpack_require__(/*! templates/roster_filter.html */ "./src/templates/roster_filter.html"), __webpack_require__(/*! templates/roster_item.html */ "./src/templates/roster_item.html"), __webpack_require__(/*! templates/search_contact.html */ "./src/templates/search_contact.html"), __webpack_require__(/*! awesomplete */ "./node_modules/awesomplete-avoid-xss/awesomplete.js"), __webpack_require__(/*! converse-chatboxes */ "./src/converse-chatboxes.js"), __webpack_require__(/*! converse-modal */ "./src/converse-modal.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  67331. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  67332. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  67333. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  67334. })(void 0, function (converse, _FormData, tpl_add_contact_modal, tpl_group_header, tpl_pending_contact, tpl_requesting_contact, tpl_roster, tpl_roster_filter, tpl_roster_item, tpl_search_contact, Awesomplete) {
  67335. "use strict";
  67336. const _converse$env = converse.env,
  67337. Backbone = _converse$env.Backbone,
  67338. Strophe = _converse$env.Strophe,
  67339. $iq = _converse$env.$iq,
  67340. b64_sha1 = _converse$env.b64_sha1,
  67341. sizzle = _converse$env.sizzle,
  67342. _ = _converse$env._;
  67343. const u = converse.env.utils;
  67344. converse.plugins.add('converse-rosterview', {
  67345. dependencies: ["converse-roster", "converse-modal"],
  67346. overrides: {
  67347. // Overrides mentioned here will be picked up by converse.js's
  67348. // plugin architecture they will replace existing methods on the
  67349. // relevant objects or classes.
  67350. //
  67351. // New functions which don't exist yet can also be added.
  67352. afterReconnected() {
  67353. this.__super__.afterReconnected.apply(this, arguments);
  67354. },
  67355. tearDown() {
  67356. /* Remove the rosterview when tearing down. It gets created
  67357. * anew when reconnecting or logging in.
  67358. */
  67359. this.__super__.tearDown.apply(this, arguments);
  67360. if (!_.isUndefined(this.rosterview)) {
  67361. this.rosterview.remove();
  67362. }
  67363. },
  67364. RosterGroups: {
  67365. comparator() {
  67366. // RosterGroupsComparator only gets set later (once i18n is
  67367. // set up), so we need to wrap it in this nameless function.
  67368. const _converse = this.__super__._converse;
  67369. return _converse.RosterGroupsComparator.apply(this, arguments);
  67370. }
  67371. }
  67372. },
  67373. initialize() {
  67374. /* The initialize function gets called as soon as the plugin is
  67375. * loaded by converse.js's plugin machinery.
  67376. */
  67377. const _converse = this._converse,
  67378. __ = _converse.__;
  67379. _converse.api.settings.update({
  67380. 'allow_chat_pending_contacts': true,
  67381. 'allow_contact_removal': true,
  67382. 'hide_offline_users': false,
  67383. 'roster_groups': true,
  67384. 'show_only_online_users': false,
  67385. 'show_toolbar': true,
  67386. 'xhr_user_search_url': null
  67387. });
  67388. _converse.api.promises.add('rosterViewInitialized');
  67389. const STATUSES = {
  67390. 'dnd': __('This contact is busy'),
  67391. 'online': __('This contact is online'),
  67392. 'offline': __('This contact is offline'),
  67393. 'unavailable': __('This contact is unavailable'),
  67394. 'xa': __('This contact is away for an extended period'),
  67395. 'away': __('This contact is away')
  67396. };
  67397. const LABEL_GROUPS = __('Groups');
  67398. const HEADER_CURRENT_CONTACTS = __('My contacts');
  67399. const HEADER_PENDING_CONTACTS = __('Pending contacts');
  67400. const HEADER_REQUESTING_CONTACTS = __('Contact requests');
  67401. const HEADER_UNGROUPED = __('Ungrouped');
  67402. const HEADER_WEIGHTS = {};
  67403. HEADER_WEIGHTS[HEADER_REQUESTING_CONTACTS] = 0;
  67404. HEADER_WEIGHTS[HEADER_CURRENT_CONTACTS] = 1;
  67405. HEADER_WEIGHTS[HEADER_UNGROUPED] = 2;
  67406. HEADER_WEIGHTS[HEADER_PENDING_CONTACTS] = 3;
  67407. _converse.RosterGroupsComparator = function (a, b) {
  67408. /* Groups are sorted alphabetically, ignoring case.
  67409. * However, Ungrouped, Requesting Contacts and Pending Contacts
  67410. * appear last and in that order.
  67411. */
  67412. a = a.get('name');
  67413. b = b.get('name');
  67414. const special_groups = _.keys(HEADER_WEIGHTS);
  67415. const a_is_special = _.includes(special_groups, a);
  67416. const b_is_special = _.includes(special_groups, b);
  67417. if (!a_is_special && !b_is_special) {
  67418. return a.toLowerCase() < b.toLowerCase() ? -1 : a.toLowerCase() > b.toLowerCase() ? 1 : 0;
  67419. } else if (a_is_special && b_is_special) {
  67420. return HEADER_WEIGHTS[a] < HEADER_WEIGHTS[b] ? -1 : HEADER_WEIGHTS[a] > HEADER_WEIGHTS[b] ? 1 : 0;
  67421. } else if (!a_is_special && b_is_special) {
  67422. return b === HEADER_REQUESTING_CONTACTS ? 1 : -1;
  67423. } else if (a_is_special && !b_is_special) {
  67424. return a === HEADER_REQUESTING_CONTACTS ? -1 : 1;
  67425. }
  67426. };
  67427. _converse.AddContactModal = _converse.BootstrapModal.extend({
  67428. events: {
  67429. 'submit form': 'addContactFromForm'
  67430. },
  67431. initialize() {
  67432. _converse.BootstrapModal.prototype.initialize.apply(this, arguments);
  67433. this.model.on('change', this.render, this);
  67434. },
  67435. toHTML() {
  67436. const label_nickname = _converse.xhr_user_search_url ? __('Contact name') : __('Optional nickname');
  67437. return tpl_add_contact_modal(_.extend(this.model.toJSON(), {
  67438. '_converse': _converse,
  67439. 'heading_new_contact': __('Add a Contact'),
  67440. 'label_xmpp_address': __('XMPP Address'),
  67441. 'label_nickname': label_nickname,
  67442. 'contact_placeholder': __('name@example.org'),
  67443. 'label_add': __('Add'),
  67444. 'error_message': __('Please enter a valid XMPP address')
  67445. }));
  67446. },
  67447. afterRender() {
  67448. if (_converse.xhr_user_search_url && _.isString(_converse.xhr_user_search_url)) {
  67449. this.initXHRAutoComplete(this.el);
  67450. } else {
  67451. this.initJIDAutoComplete(this.el);
  67452. }
  67453. const jid_input = this.el.querySelector('input[name="jid"]');
  67454. this.el.addEventListener('shown.bs.modal', () => {
  67455. jid_input.focus();
  67456. }, false);
  67457. },
  67458. initJIDAutoComplete(root) {
  67459. const jid_input = root.querySelector('input[name="jid"]');
  67460. const list = _.uniq(_converse.roster.map(item => Strophe.getDomainFromJid(item.get('jid'))));
  67461. new Awesomplete(jid_input, {
  67462. 'list': list,
  67463. 'data': function data(text, input) {
  67464. return input.slice(0, input.indexOf("@")) + "@" + text;
  67465. },
  67466. 'filter': Awesomplete.FILTER_STARTSWITH
  67467. });
  67468. },
  67469. initXHRAutoComplete(root) {
  67470. const name_input = this.el.querySelector('input[name="name"]');
  67471. const jid_input = this.el.querySelector('input[name="jid"]');
  67472. const awesomplete = new Awesomplete(name_input, {
  67473. 'minChars': 1,
  67474. 'list': []
  67475. });
  67476. const xhr = new window.XMLHttpRequest(); // `open` must be called after `onload` for mock/testing purposes.
  67477. xhr.onload = function () {
  67478. if (xhr.responseText) {
  67479. awesomplete.list = JSON.parse(xhr.responseText).map(i => {
  67480. //eslint-disable-line arrow-body-style
  67481. return {
  67482. 'label': i.fullname || i.jid,
  67483. 'value': i.jid
  67484. };
  67485. });
  67486. awesomplete.evaluate();
  67487. }
  67488. };
  67489. name_input.addEventListener('input', _.debounce(() => {
  67490. xhr.open("GET", `${_converse.xhr_user_search_url}q=${name_input.value}`, true);
  67491. xhr.send();
  67492. }, 300));
  67493. this.el.addEventListener('awesomplete-selectcomplete', ev => {
  67494. jid_input.value = ev.text.value;
  67495. name_input.value = ev.text.label;
  67496. });
  67497. },
  67498. addContactFromForm(ev) {
  67499. ev.preventDefault();
  67500. const data = new FormData(ev.target),
  67501. jid = data.get('jid'),
  67502. name = data.get('name');
  67503. if (!jid || _.compact(jid.split('@')).length < 2) {
  67504. // XXX: we have to do this manually, instead of via
  67505. // toHTML because Awesomplete messes things up and
  67506. // confuses Snabbdom
  67507. u.addClass('is-invalid', this.el.querySelector('input[name="jid"]'));
  67508. u.addClass('d-block', this.el.querySelector('.invalid-feedback'));
  67509. } else {
  67510. ev.target.reset();
  67511. _converse.roster.addAndSubscribe(jid, name);
  67512. this.model.clear();
  67513. this.modal.hide();
  67514. }
  67515. }
  67516. });
  67517. _converse.RosterFilter = Backbone.Model.extend({
  67518. initialize() {
  67519. this.set({
  67520. 'filter_text': '',
  67521. 'filter_type': 'contacts',
  67522. 'chat_state': ''
  67523. });
  67524. }
  67525. });
  67526. _converse.RosterFilterView = Backbone.VDOMView.extend({
  67527. tagName: 'form',
  67528. className: 'roster-filter-form',
  67529. events: {
  67530. "keydown .roster-filter": "liveFilter",
  67531. "submit form.roster-filter-form": "submitFilter",
  67532. "click .clear-input": "clearFilter",
  67533. "click .filter-by span": "changeTypeFilter",
  67534. "change .state-type": "changeChatStateFilter"
  67535. },
  67536. initialize() {
  67537. this.model.on('change:filter_type', this.render, this);
  67538. this.model.on('change:filter_text', this.render, this);
  67539. },
  67540. toHTML() {
  67541. return tpl_roster_filter(_.extend(this.model.toJSON(), {
  67542. visible: this.shouldBeVisible(),
  67543. placeholder: __('Filter'),
  67544. title_contact_filter: __('Filter by contact name'),
  67545. title_group_filter: __('Filter by group name'),
  67546. title_status_filter: __('Filter by status'),
  67547. label_any: __('Any'),
  67548. label_unread_messages: __('Unread'),
  67549. label_online: __('Online'),
  67550. label_chatty: __('Chatty'),
  67551. label_busy: __('Busy'),
  67552. label_away: __('Away'),
  67553. label_xa: __('Extended Away'),
  67554. label_offline: __('Offline')
  67555. }));
  67556. },
  67557. changeChatStateFilter(ev) {
  67558. if (ev && ev.preventDefault) {
  67559. ev.preventDefault();
  67560. }
  67561. this.model.save({
  67562. 'chat_state': this.el.querySelector('.state-type').value
  67563. });
  67564. },
  67565. changeTypeFilter(ev) {
  67566. if (ev && ev.preventDefault) {
  67567. ev.preventDefault();
  67568. }
  67569. const type = ev.target.dataset.type;
  67570. if (type === 'state') {
  67571. this.model.save({
  67572. 'filter_type': type,
  67573. 'chat_state': this.el.querySelector('.state-type').value
  67574. });
  67575. } else {
  67576. this.model.save({
  67577. 'filter_type': type,
  67578. 'filter_text': this.el.querySelector('.roster-filter').value
  67579. });
  67580. }
  67581. },
  67582. liveFilter: _.debounce(function (ev) {
  67583. this.model.save({
  67584. 'filter_text': this.el.querySelector('.roster-filter').value
  67585. });
  67586. }, 250),
  67587. submitFilter(ev) {
  67588. if (ev && ev.preventDefault) {
  67589. ev.preventDefault();
  67590. }
  67591. this.liveFilter();
  67592. this.render();
  67593. },
  67594. isActive() {
  67595. /* Returns true if the filter is enabled (i.e. if the user
  67596. * has added values to the filter).
  67597. */
  67598. if (this.model.get('filter_type') === 'state' || this.model.get('filter_text')) {
  67599. return true;
  67600. }
  67601. return false;
  67602. },
  67603. shouldBeVisible() {
  67604. return _converse.roster.length >= 5 || this.isActive();
  67605. },
  67606. showOrHide() {
  67607. if (this.shouldBeVisible()) {
  67608. this.show();
  67609. } else {
  67610. this.hide();
  67611. }
  67612. },
  67613. show() {
  67614. if (u.isVisible(this.el)) {
  67615. return this;
  67616. }
  67617. this.el.classList.add('fade-in');
  67618. this.el.classList.remove('hidden');
  67619. return this;
  67620. },
  67621. hide() {
  67622. if (!u.isVisible(this.el)) {
  67623. return this;
  67624. }
  67625. this.model.save({
  67626. 'filter_text': '',
  67627. 'chat_state': ''
  67628. });
  67629. this.el.classList.add('hidden');
  67630. return this;
  67631. },
  67632. clearFilter(ev) {
  67633. if (ev && ev.preventDefault) {
  67634. ev.preventDefault();
  67635. u.hideElement(this.el.querySelector('.clear-input'));
  67636. }
  67637. const roster_filter = this.el.querySelector('.roster-filter');
  67638. roster_filter.value = '';
  67639. this.model.save({
  67640. 'filter_text': ''
  67641. });
  67642. }
  67643. });
  67644. _converse.RosterContactView = Backbone.NativeView.extend({
  67645. tagName: 'li',
  67646. className: 'list-item d-flex hidden controlbox-padded',
  67647. events: {
  67648. "click .accept-xmpp-request": "acceptRequest",
  67649. "click .decline-xmpp-request": "declineRequest",
  67650. "click .open-chat": "openChat",
  67651. "click .remove-xmpp-contact": "removeContact"
  67652. },
  67653. initialize() {
  67654. this.model.on("change", this.render, this);
  67655. this.model.on("highlight", this.highlight, this);
  67656. this.model.on("destroy", this.remove, this);
  67657. this.model.on("open", this.openChat, this);
  67658. this.model.on("remove", this.remove, this);
  67659. this.model.presence.on("change:show", this.render, this);
  67660. this.model.vcard.on('change:fullname', this.render, this);
  67661. },
  67662. render() {
  67663. const that = this;
  67664. if (!this.mayBeShown()) {
  67665. u.hideElement(this.el);
  67666. return this;
  67667. }
  67668. const ask = this.model.get('ask'),
  67669. show = this.model.presence.get('show'),
  67670. requesting = this.model.get('requesting'),
  67671. subscription = this.model.get('subscription');
  67672. const classes_to_remove = ['current-xmpp-contact', 'pending-xmpp-contact', 'requesting-xmpp-contact'].concat(_.keys(STATUSES));
  67673. _.each(classes_to_remove, function (cls) {
  67674. if (_.includes(that.el.className, cls)) {
  67675. that.el.classList.remove(cls);
  67676. }
  67677. });
  67678. this.el.classList.add(show);
  67679. this.el.setAttribute('data-status', show);
  67680. this.highlight();
  67681. if (_converse.isSingleton()) {
  67682. const chatbox = _converse.chatboxes.get(this.model.get('jid'));
  67683. if (chatbox) {
  67684. if (chatbox.get('hidden')) {
  67685. this.el.classList.remove('open');
  67686. } else {
  67687. this.el.classList.add('open');
  67688. }
  67689. }
  67690. }
  67691. if (ask === 'subscribe' || subscription === 'from') {
  67692. /* ask === 'subscribe'
  67693. * Means we have asked to subscribe to them.
  67694. *
  67695. * subscription === 'from'
  67696. * They are subscribed to use, but not vice versa.
  67697. * We assume that there is a pending subscription
  67698. * from us to them (otherwise we're in a state not
  67699. * supported by converse.js).
  67700. *
  67701. * So in both cases the user is a "pending" contact.
  67702. */
  67703. const display_name = this.model.getDisplayName();
  67704. this.el.classList.add('pending-xmpp-contact');
  67705. this.el.innerHTML = tpl_pending_contact(_.extend(this.model.toJSON(), {
  67706. 'display_name': display_name,
  67707. 'desc_remove': __('Click to remove %1$s as a contact', display_name),
  67708. 'allow_chat_pending_contacts': _converse.allow_chat_pending_contacts
  67709. }));
  67710. } else if (requesting === true) {
  67711. const display_name = this.model.getDisplayName();
  67712. this.el.classList.add('requesting-xmpp-contact');
  67713. this.el.innerHTML = tpl_requesting_contact(_.extend(this.model.toJSON(), {
  67714. 'display_name': display_name,
  67715. 'desc_accept': __("Click to accept the contact request from %1$s", display_name),
  67716. 'desc_decline': __("Click to decline the contact request from %1$s", display_name),
  67717. 'allow_chat_pending_contacts': _converse.allow_chat_pending_contacts
  67718. }));
  67719. } else if (subscription === 'both' || subscription === 'to') {
  67720. this.el.classList.add('current-xmpp-contact');
  67721. this.el.classList.remove(_.without(['both', 'to'], subscription)[0]);
  67722. this.el.classList.add(subscription);
  67723. this.renderRosterItem(this.model);
  67724. }
  67725. return this;
  67726. },
  67727. highlight() {
  67728. /* If appropriate, highlight the contact (by adding the 'open' class).
  67729. */
  67730. if (_converse.isSingleton()) {
  67731. const chatbox = _converse.chatboxes.get(this.model.get('jid'));
  67732. if (chatbox) {
  67733. if (chatbox.get('hidden')) {
  67734. this.el.classList.remove('open');
  67735. } else {
  67736. this.el.classList.add('open');
  67737. }
  67738. }
  67739. }
  67740. },
  67741. renderRosterItem(item) {
  67742. let status_icon = 'fa fa-times-circle';
  67743. const show = item.presence.get('show') || 'offline';
  67744. if (show === 'online') {
  67745. status_icon = 'fa fa-circle';
  67746. } else if (show === 'away') {
  67747. status_icon = 'fa fa-dot-circle';
  67748. } else if (show === 'xa') {
  67749. status_icon = 'far fa-circle';
  67750. } else if (show === 'dnd') {
  67751. status_icon = 'fa fa-minus-circle';
  67752. }
  67753. const display_name = item.getDisplayName();
  67754. this.el.innerHTML = tpl_roster_item(_.extend(item.toJSON(), {
  67755. 'display_name': display_name,
  67756. 'desc_status': STATUSES[show],
  67757. 'status_icon': status_icon,
  67758. 'desc_chat': __('Click to chat with %1$s (JID: %2$s)', display_name, item.get('jid')),
  67759. 'desc_remove': __('Click to remove %1$s as a contact', display_name),
  67760. 'allow_contact_removal': _converse.allow_contact_removal,
  67761. 'num_unread': item.get('num_unread') || 0
  67762. }));
  67763. return this;
  67764. },
  67765. mayBeShown() {
  67766. /* Return a boolean indicating whether this contact should
  67767. * generally be visible in the roster.
  67768. *
  67769. * It doesn't check for the more specific case of whether
  67770. * the group it's in is collapsed.
  67771. */
  67772. const chatStatus = this.model.presence.get('show');
  67773. if (_converse.show_only_online_users && chatStatus !== 'online' || _converse.hide_offline_users && chatStatus === 'offline') {
  67774. // If pending or requesting, show
  67775. if (this.model.get('ask') === 'subscribe' || this.model.get('subscription') === 'from' || this.model.get('requesting') === true) {
  67776. return true;
  67777. }
  67778. return false;
  67779. }
  67780. return true;
  67781. },
  67782. openChat(ev) {
  67783. if (ev && ev.preventDefault) {
  67784. ev.preventDefault();
  67785. }
  67786. const attrs = this.model.attributes;
  67787. _converse.api.chats.open(attrs.jid, attrs);
  67788. },
  67789. removeContact(ev) {
  67790. if (ev && ev.preventDefault) {
  67791. ev.preventDefault();
  67792. }
  67793. if (!_converse.allow_contact_removal) {
  67794. return;
  67795. }
  67796. const result = confirm(__("Are you sure you want to remove this contact?"));
  67797. if (result === true) {
  67798. this.model.removeFromRoster(iq => {
  67799. this.model.destroy();
  67800. this.remove();
  67801. }, function (err) {
  67802. alert(__('Sorry, there was an error while trying to remove %1$s as a contact.', name));
  67803. _converse.log(err, Strophe.LogLevel.ERROR);
  67804. });
  67805. }
  67806. },
  67807. acceptRequest(ev) {
  67808. if (ev && ev.preventDefault) {
  67809. ev.preventDefault();
  67810. }
  67811. _converse.roster.sendContactAddIQ(this.model.get('jid'), this.model.getFullname(), [], () => {
  67812. this.model.authorize().subscribe();
  67813. });
  67814. },
  67815. declineRequest(ev) {
  67816. if (ev && ev.preventDefault) {
  67817. ev.preventDefault();
  67818. }
  67819. const result = confirm(__("Are you sure you want to decline this contact request?"));
  67820. if (result === true) {
  67821. this.model.unauthorize().destroy();
  67822. }
  67823. return this;
  67824. }
  67825. });
  67826. _converse.RosterGroupView = Backbone.OrderedListView.extend({
  67827. tagName: 'div',
  67828. className: 'roster-group hidden',
  67829. events: {
  67830. "click a.group-toggle": "toggle"
  67831. },
  67832. ItemView: _converse.RosterContactView,
  67833. listItems: 'model.contacts',
  67834. listSelector: '.roster-group-contacts',
  67835. sortEvent: 'presenceChanged',
  67836. initialize() {
  67837. Backbone.OrderedListView.prototype.initialize.apply(this, arguments);
  67838. this.model.contacts.on("change:subscription", this.onContactSubscriptionChange, this);
  67839. this.model.contacts.on("change:requesting", this.onContactRequestChange, this);
  67840. this.model.contacts.on("remove", this.onRemove, this);
  67841. _converse.roster.on('change:groups', this.onContactGroupChange, this); // This event gets triggered once *all* contacts (i.e. not
  67842. // just this group's) have been fetched from browser
  67843. // storage or the XMPP server and once they've been
  67844. // assigned to their various groups.
  67845. _converse.rosterview.on('rosterContactsFetchedAndProcessed', this.sortAndPositionAllItems.bind(this));
  67846. },
  67847. render() {
  67848. this.el.setAttribute('data-group', this.model.get('name'));
  67849. this.el.innerHTML = tpl_group_header({
  67850. 'label_group': this.model.get('name'),
  67851. 'desc_group_toggle': this.model.get('description'),
  67852. 'toggle_state': this.model.get('state'),
  67853. '_converse': _converse
  67854. });
  67855. this.contacts_el = this.el.querySelector('.roster-group-contacts');
  67856. return this;
  67857. },
  67858. show() {
  67859. u.showElement(this.el);
  67860. _.each(this.getAll(), contact_view => {
  67861. if (contact_view.mayBeShown() && this.model.get('state') === _converse.OPENED) {
  67862. u.showElement(contact_view.el);
  67863. }
  67864. });
  67865. return this;
  67866. },
  67867. collapse() {
  67868. return u.slideIn(this.contacts_el);
  67869. },
  67870. filterOutContacts(contacts = []) {
  67871. /* Given a list of contacts, make sure they're filtered out
  67872. * (aka hidden) and that all other contacts are visible.
  67873. *
  67874. * If all contacts are hidden, then also hide the group
  67875. * title.
  67876. */
  67877. let shown = 0;
  67878. const all_contact_views = this.getAll();
  67879. _.each(this.model.contacts.models, contact => {
  67880. const contact_view = this.get(contact.get('id'));
  67881. if (_.includes(contacts, contact)) {
  67882. u.hideElement(contact_view.el);
  67883. } else if (contact_view.mayBeShown()) {
  67884. u.showElement(contact_view.el);
  67885. shown += 1;
  67886. }
  67887. });
  67888. if (shown) {
  67889. u.showElement(this.el);
  67890. } else {
  67891. u.hideElement(this.el);
  67892. }
  67893. },
  67894. getFilterMatches(q, type) {
  67895. /* Given the filter query "q" and the filter type "type",
  67896. * return a list of contacts that need to be filtered out.
  67897. */
  67898. if (q.length === 0) {
  67899. return [];
  67900. }
  67901. let matches;
  67902. q = q.toLowerCase();
  67903. if (type === 'state') {
  67904. if (this.model.get('name') === HEADER_REQUESTING_CONTACTS) {
  67905. // When filtering by chat state, we still want to
  67906. // show requesting contacts, even though they don't
  67907. // have the state in question.
  67908. matches = this.model.contacts.filter(contact => !_.includes(contact.presence.get('show'), q) && !contact.get('requesting'));
  67909. } else if (q === 'unread_messages') {
  67910. matches = this.model.contacts.filter({
  67911. 'num_unread': 0
  67912. });
  67913. } else {
  67914. matches = this.model.contacts.filter(contact => !_.includes(contact.presence.get('show'), q));
  67915. }
  67916. } else {
  67917. matches = this.model.contacts.filter(contact => {
  67918. return !_.includes(contact.getDisplayName().toLowerCase(), q.toLowerCase());
  67919. });
  67920. }
  67921. return matches;
  67922. },
  67923. filter(q, type) {
  67924. /* Filter the group's contacts based on the query "q".
  67925. *
  67926. * If all contacts are filtered out (i.e. hidden), then the
  67927. * group must be filtered out as well.
  67928. */
  67929. if (_.isNil(q)) {
  67930. type = type || _converse.rosterview.filter_view.model.get('filter_type');
  67931. if (type === 'state') {
  67932. q = _converse.rosterview.filter_view.model.get('chat_state');
  67933. } else {
  67934. q = _converse.rosterview.filter_view.model.get('filter_text');
  67935. }
  67936. }
  67937. this.filterOutContacts(this.getFilterMatches(q, type));
  67938. },
  67939. toggle(ev) {
  67940. if (ev && ev.preventDefault) {
  67941. ev.preventDefault();
  67942. }
  67943. const icon_el = ev.target.querySelector('.fa');
  67944. if (_.includes(icon_el.classList, "fa-caret-down")) {
  67945. this.model.save({
  67946. state: _converse.CLOSED
  67947. });
  67948. this.collapse().then(() => {
  67949. icon_el.classList.remove("fa-caret-down");
  67950. icon_el.classList.add("fa-caret-right");
  67951. });
  67952. } else {
  67953. icon_el.classList.remove("fa-caret-right");
  67954. icon_el.classList.add("fa-caret-down");
  67955. this.model.save({
  67956. state: _converse.OPENED
  67957. });
  67958. this.filter();
  67959. u.showElement(this.el);
  67960. u.slideOut(this.contacts_el);
  67961. }
  67962. },
  67963. onContactGroupChange(contact) {
  67964. const in_this_group = _.includes(contact.get('groups'), this.model.get('name'));
  67965. const cid = contact.get('id');
  67966. const in_this_overview = !this.get(cid);
  67967. if (in_this_group && !in_this_overview) {
  67968. this.items.trigger('add', contact);
  67969. } else if (!in_this_group) {
  67970. this.removeContact(contact);
  67971. }
  67972. },
  67973. onContactSubscriptionChange(contact) {
  67974. if (this.model.get('name') === HEADER_PENDING_CONTACTS && contact.get('subscription') !== 'from') {
  67975. this.removeContact(contact);
  67976. }
  67977. },
  67978. onContactRequestChange(contact) {
  67979. if (this.model.get('name') === HEADER_REQUESTING_CONTACTS && !contact.get('requesting')) {
  67980. this.removeContact(contact);
  67981. }
  67982. },
  67983. removeContact(contact) {
  67984. // We suppress events, otherwise the remove event will
  67985. // also cause the contact's view to be removed from the
  67986. // "Pending Contacts" group.
  67987. this.model.contacts.remove(contact, {
  67988. 'silent': true
  67989. });
  67990. this.onRemove(contact);
  67991. },
  67992. onRemove(contact) {
  67993. this.remove(contact.get('jid'));
  67994. if (this.model.contacts.length === 0) {
  67995. this.remove();
  67996. }
  67997. }
  67998. });
  67999. _converse.RosterView = Backbone.OrderedListView.extend({
  68000. tagName: 'div',
  68001. id: 'converse-roster',
  68002. className: 'controlbox-section',
  68003. ItemView: _converse.RosterGroupView,
  68004. listItems: 'model',
  68005. listSelector: '.roster-contacts',
  68006. sortEvent: null,
  68007. // Groups are immutable, so they don't get re-sorted
  68008. subviewIndex: 'name',
  68009. events: {
  68010. 'click a.chatbox-btn.add-contact': 'showAddContactModal'
  68011. },
  68012. initialize() {
  68013. Backbone.OrderedListView.prototype.initialize.apply(this, arguments);
  68014. _converse.roster.on("add", this.onContactAdded, this);
  68015. _converse.roster.on('change:groups', this.onContactAdded, this);
  68016. _converse.roster.on('change', this.onContactChange, this);
  68017. _converse.roster.on("destroy", this.update, this);
  68018. _converse.roster.on("remove", this.update, this);
  68019. _converse.presences.on('change:show', () => {
  68020. this.update();
  68021. this.updateFilter();
  68022. });
  68023. this.model.on("reset", this.reset, this); // This event gets triggered once *all* contacts (i.e. not
  68024. // just this group's) have been fetched from browser
  68025. // storage or the XMPP server and once they've been
  68026. // assigned to their various groups.
  68027. _converse.on('rosterGroupsFetched', this.sortAndPositionAllItems.bind(this));
  68028. _converse.on('rosterContactsFetched', () => {
  68029. _converse.roster.each(contact => this.addRosterContact(contact, {
  68030. 'silent': true
  68031. }));
  68032. this.update();
  68033. this.updateFilter();
  68034. this.trigger('rosterContactsFetchedAndProcessed');
  68035. });
  68036. this.createRosterFilter();
  68037. },
  68038. render() {
  68039. this.el.innerHTML = tpl_roster({
  68040. 'allow_contact_requests': _converse.allow_contact_requests,
  68041. 'heading_contacts': __('Contacts'),
  68042. 'title_add_contact': __('Add a contact')
  68043. });
  68044. const form = this.el.querySelector('.roster-filter-form');
  68045. this.el.replaceChild(this.filter_view.render().el, form);
  68046. this.roster_el = this.el.querySelector('.roster-contacts');
  68047. return this;
  68048. },
  68049. showAddContactModal(ev) {
  68050. if (_.isUndefined(this.add_contact_modal)) {
  68051. this.add_contact_modal = new _converse.AddContactModal({
  68052. 'model': new Backbone.Model()
  68053. });
  68054. }
  68055. this.add_contact_modal.show(ev);
  68056. },
  68057. createRosterFilter() {
  68058. // Create a model on which we can store filter properties
  68059. const model = new _converse.RosterFilter();
  68060. model.id = b64_sha1(`_converse.rosterfilter${_converse.bare_jid}`);
  68061. model.browserStorage = new Backbone.BrowserStorage.local(this.filter.id);
  68062. this.filter_view = new _converse.RosterFilterView({
  68063. 'model': model
  68064. });
  68065. this.filter_view.model.on('change', this.updateFilter, this);
  68066. this.filter_view.model.fetch();
  68067. },
  68068. updateFilter: _.debounce(function () {
  68069. /* Filter the roster again.
  68070. * Called whenever the filter settings have been changed or
  68071. * when contacts have been added, removed or changed.
  68072. *
  68073. * Debounced so that it doesn't get called for every
  68074. * contact fetched from browser storage.
  68075. */
  68076. const type = this.filter_view.model.get('filter_type');
  68077. if (type === 'state') {
  68078. this.filter(this.filter_view.model.get('chat_state'), type);
  68079. } else {
  68080. this.filter(this.filter_view.model.get('filter_text'), type);
  68081. }
  68082. }, 100),
  68083. update: _.debounce(function () {
  68084. if (!u.isVisible(this.roster_el)) {
  68085. u.showElement(this.roster_el);
  68086. }
  68087. this.filter_view.showOrHide();
  68088. return this;
  68089. }, _converse.animate ? 100 : 0),
  68090. filter(query, type) {
  68091. // First we make sure the filter is restored to its
  68092. // original state
  68093. _.each(this.getAll(), function (view) {
  68094. if (view.model.contacts.length > 0) {
  68095. view.show().filter('');
  68096. }
  68097. }); // Now we can filter
  68098. query = query.toLowerCase();
  68099. if (type === 'groups') {
  68100. _.each(this.getAll(), function (view, idx) {
  68101. if (!_.includes(view.model.get('name').toLowerCase(), query.toLowerCase())) {
  68102. u.slideIn(view.el);
  68103. } else if (view.model.contacts.length > 0) {
  68104. u.slideOut(view.el);
  68105. }
  68106. });
  68107. } else {
  68108. _.each(this.getAll(), function (view) {
  68109. view.filter(query, type);
  68110. });
  68111. }
  68112. },
  68113. reset() {
  68114. _converse.roster.reset();
  68115. this.removeAll();
  68116. this.render().update();
  68117. return this;
  68118. },
  68119. onContactAdded(contact) {
  68120. this.addRosterContact(contact);
  68121. this.update();
  68122. this.updateFilter();
  68123. },
  68124. onContactChange(contact) {
  68125. this.updateChatBox(contact);
  68126. this.update();
  68127. if (_.has(contact.changed, 'subscription')) {
  68128. if (contact.changed.subscription === 'from') {
  68129. this.addContactToGroup(contact, HEADER_PENDING_CONTACTS);
  68130. } else if (_.includes(['both', 'to'], contact.get('subscription'))) {
  68131. this.addExistingContact(contact);
  68132. }
  68133. }
  68134. if (_.has(contact.changed, 'ask') && contact.changed.ask === 'subscribe') {
  68135. this.addContactToGroup(contact, HEADER_PENDING_CONTACTS);
  68136. }
  68137. if (_.has(contact.changed, 'subscription') && contact.changed.requesting === 'true') {
  68138. this.addContactToGroup(contact, HEADER_REQUESTING_CONTACTS);
  68139. }
  68140. this.updateFilter();
  68141. },
  68142. updateChatBox(contact) {
  68143. if (!this.model.chatbox) {
  68144. return this;
  68145. }
  68146. const changes = {};
  68147. if (_.has(contact.changed, 'status')) {
  68148. changes.status = contact.get('status');
  68149. }
  68150. this.model.chatbox.save(changes);
  68151. return this;
  68152. },
  68153. getGroup(name) {
  68154. /* Returns the group as specified by name.
  68155. * Creates the group if it doesn't exist.
  68156. */
  68157. const view = this.get(name);
  68158. if (view) {
  68159. return view.model;
  68160. }
  68161. return this.model.create({
  68162. name,
  68163. id: b64_sha1(name)
  68164. });
  68165. },
  68166. addContactToGroup(contact, name, options) {
  68167. this.getGroup(name).contacts.add(contact, options);
  68168. this.sortAndPositionAllItems();
  68169. },
  68170. addExistingContact(contact, options) {
  68171. let groups;
  68172. if (_converse.roster_groups) {
  68173. groups = contact.get('groups');
  68174. if (groups.length === 0) {
  68175. groups = [HEADER_UNGROUPED];
  68176. }
  68177. } else {
  68178. groups = [HEADER_CURRENT_CONTACTS];
  68179. }
  68180. _.each(groups, _.bind(this.addContactToGroup, this, contact, _, options));
  68181. },
  68182. addRosterContact(contact, options) {
  68183. if (contact.get('subscription') === 'both' || contact.get('subscription') === 'to') {
  68184. this.addExistingContact(contact, options);
  68185. } else {
  68186. if (!_converse.allow_contact_requests) {
  68187. _converse.log(`Not adding requesting or pending contact ${contact.get('jid')} ` + `because allow_contact_requests is false`, Strophe.LogLevel.DEBUG);
  68188. return;
  68189. }
  68190. if (contact.get('ask') === 'subscribe' || contact.get('subscription') === 'from') {
  68191. this.addContactToGroup(contact, HEADER_PENDING_CONTACTS, options);
  68192. } else if (contact.get('requesting') === true) {
  68193. this.addContactToGroup(contact, HEADER_REQUESTING_CONTACTS, options);
  68194. }
  68195. }
  68196. return this;
  68197. }
  68198. });
  68199. /* -------- Event Handlers ----------- */
  68200. _converse.api.listen.on('chatBoxesInitialized', () => {
  68201. _converse.chatboxes.on('change:hidden', chatbox => {
  68202. const contact = _converse.roster.findWhere({
  68203. 'jid': chatbox.get('jid')
  68204. });
  68205. if (!_.isUndefined(contact)) {
  68206. contact.trigger('highlight', contact);
  68207. }
  68208. });
  68209. });
  68210. function initRoster() {
  68211. /* Create an instance of RosterView once the RosterGroups
  68212. * collection has been created (in converse-core.js)
  68213. */
  68214. if (_converse.authentication === _converse.ANONYMOUS) {
  68215. return;
  68216. }
  68217. _converse.rosterview = new _converse.RosterView({
  68218. 'model': _converse.rostergroups
  68219. });
  68220. _converse.rosterview.render();
  68221. _converse.emit('rosterViewInitialized');
  68222. }
  68223. _converse.api.listen.on('rosterInitialized', initRoster);
  68224. _converse.api.listen.on('rosterReadyAfterReconnection', initRoster);
  68225. }
  68226. });
  68227. });
  68228. /***/ }),
  68229. /***/ "./src/converse-singleton.js":
  68230. /*!***********************************!*\
  68231. !*** ./src/converse-singleton.js ***!
  68232. \***********************************/
  68233. /*! no static exports found */
  68234. /***/ (function(module, exports, __webpack_require__) {
  68235. "use strict";
  68236. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  68237. // Converse.js
  68238. // http://conversejs.org
  68239. //
  68240. // Copyright (c) 2012-2018, the Converse.js developers
  68241. // Licensed under the Mozilla Public License (MPLv2)
  68242. /* converse-singleton
  68243. * ******************
  68244. *
  68245. * A plugin which ensures that only one chat (private or groupchat) is
  68246. * visible at any one time. All other ongoing chats are hidden and kept in the
  68247. * background.
  68248. *
  68249. * This plugin makes sense in mobile or fullscreen chat environments (as
  68250. * configured by the `view_mode` setting).
  68251. *
  68252. */
  68253. (function (root, factory) {
  68254. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! converse-chatview */ "./src/converse-chatview.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  68255. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  68256. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  68257. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  68258. })(void 0, function (converse) {
  68259. "use strict";
  68260. const _converse$env = converse.env,
  68261. _ = _converse$env._,
  68262. Strophe = _converse$env.Strophe;
  68263. const u = converse.env.utils;
  68264. function hideChat(view) {
  68265. if (view.model.get('id') === 'controlbox') {
  68266. return;
  68267. }
  68268. u.safeSave(view.model, {
  68269. 'hidden': true
  68270. });
  68271. view.hide();
  68272. }
  68273. converse.plugins.add('converse-singleton', {
  68274. // It's possible however to make optional dependencies non-optional.
  68275. // If the setting "strict_plugin_dependencies" is set to true,
  68276. // an error will be raised if the plugin is not found.
  68277. //
  68278. // NB: These plugins need to have already been loaded via require.js.
  68279. dependencies: ['converse-chatboxes', 'converse-muc', 'converse-muc-views', 'converse-controlbox', 'converse-rosterview'],
  68280. overrides: {
  68281. // overrides mentioned here will be picked up by converse.js's
  68282. // plugin architecture they will replace existing methods on the
  68283. // relevant objects or classes.
  68284. //
  68285. // new functions which don't exist yet can also be added.
  68286. ChatBoxes: {
  68287. chatBoxMayBeShown(chatbox) {
  68288. const _converse = this.__super__._converse;
  68289. if (chatbox.get('id') === 'controlbox') {
  68290. return true;
  68291. }
  68292. if (_converse.isSingleton()) {
  68293. const any_chats_visible = _converse.chatboxes.filter(cb => cb.get('id') != 'controlbox').filter(cb => !cb.get('hidden')).length > 0;
  68294. if (any_chats_visible) {
  68295. return !chatbox.get('hidden');
  68296. } else {
  68297. return true;
  68298. }
  68299. } else {
  68300. return this.__super__.chatBoxMayBeShown.apply(this, arguments);
  68301. }
  68302. },
  68303. createChatBox(jid, attrs) {
  68304. /* Make sure new chat boxes are hidden by default. */
  68305. const _converse = this.__super__._converse;
  68306. if (_converse.isSingleton()) {
  68307. attrs = attrs || {};
  68308. attrs.hidden = true;
  68309. }
  68310. return this.__super__.createChatBox.call(this, jid, attrs);
  68311. }
  68312. },
  68313. ChatBoxView: {
  68314. shouldShowOnTextMessage() {
  68315. const _converse = this.__super__._converse;
  68316. if (_converse.isSingleton()) {
  68317. return false;
  68318. } else {
  68319. return this.__super__.shouldShowOnTextMessage.apply(this, arguments);
  68320. }
  68321. },
  68322. _show(focus) {
  68323. /* We only have one chat visible at any one
  68324. * time. So before opening a chat, we make sure all other
  68325. * chats are hidden.
  68326. */
  68327. const _converse = this.__super__._converse;
  68328. if (_converse.isSingleton()) {
  68329. _.each(this.__super__._converse.chatboxviews.xget(this.model.get('id')), hideChat);
  68330. u.safeSave(this.model, {
  68331. 'hidden': false
  68332. });
  68333. }
  68334. return this.__super__._show.apply(this, arguments);
  68335. }
  68336. },
  68337. ChatRoomView: {
  68338. show(focus) {
  68339. const _converse = this.__super__._converse;
  68340. if (_converse.isSingleton()) {
  68341. _.each(this.__super__._converse.chatboxviews.xget(this.model.get('id')), hideChat);
  68342. u.safeSave(this.model, {
  68343. 'hidden': false
  68344. });
  68345. }
  68346. return this.__super__.show.apply(this, arguments);
  68347. }
  68348. }
  68349. }
  68350. });
  68351. });
  68352. /***/ }),
  68353. /***/ "./src/converse-vcard.js":
  68354. /*!*******************************!*\
  68355. !*** ./src/converse-vcard.js ***!
  68356. \*******************************/
  68357. /*! no static exports found */
  68358. /***/ (function(module, exports, __webpack_require__) {
  68359. "use strict";
  68360. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  68361. // Converse.js
  68362. // http://conversejs.org
  68363. //
  68364. // Copyright (c) 2013-2018, the Converse.js developers
  68365. // Licensed under the Mozilla Public License (MPLv2)
  68366. (function (root, factory) {
  68367. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! templates/vcard.html */ "./src/templates/vcard.html")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  68368. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  68369. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  68370. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  68371. })(void 0, function (converse, tpl_vcard) {
  68372. "use strict";
  68373. const _converse$env = converse.env,
  68374. Backbone = _converse$env.Backbone,
  68375. Promise = _converse$env.Promise,
  68376. Strophe = _converse$env.Strophe,
  68377. _ = _converse$env._,
  68378. $iq = _converse$env.$iq,
  68379. $build = _converse$env.$build,
  68380. b64_sha1 = _converse$env.b64_sha1,
  68381. moment = _converse$env.moment,
  68382. sizzle = _converse$env.sizzle;
  68383. const u = converse.env.utils;
  68384. converse.plugins.add('converse-vcard', {
  68385. initialize() {
  68386. /* The initialize function gets called as soon as the plugin is
  68387. * loaded by converse.js's plugin machinery.
  68388. */
  68389. const _converse = this._converse;
  68390. _converse.VCard = Backbone.Model.extend({
  68391. defaults: {
  68392. 'image': _converse.DEFAULT_IMAGE,
  68393. 'image_type': _converse.DEFAULT_IMAGE_TYPE
  68394. },
  68395. set(key, val, options) {
  68396. // Override Backbone.Model.prototype.set to make sure that the
  68397. // default `image` and `image_type` values are maintained.
  68398. let attrs;
  68399. if (typeof key === 'object') {
  68400. attrs = key;
  68401. options = val;
  68402. } else {
  68403. (attrs = {})[key] = val;
  68404. }
  68405. if (_.has(attrs, 'image') && !attrs['image']) {
  68406. attrs['image'] = _converse.DEFAULT_IMAGE;
  68407. attrs['image_type'] = _converse.DEFAULT_IMAGE_TYPE;
  68408. return Backbone.Model.prototype.set.call(this, attrs, options);
  68409. } else {
  68410. return Backbone.Model.prototype.set.apply(this, arguments);
  68411. }
  68412. }
  68413. });
  68414. _converse.VCards = Backbone.Collection.extend({
  68415. model: _converse.VCard,
  68416. initialize() {
  68417. this.on('add', vcard => _converse.api.vcard.update(vcard));
  68418. }
  68419. });
  68420. function onVCardData(jid, iq, callback) {
  68421. const vcard = iq.querySelector('vCard');
  68422. let result = {};
  68423. if (!_.isNull(vcard)) {
  68424. result = {
  68425. 'stanza': iq,
  68426. 'fullname': _.get(vcard.querySelector('FN'), 'textContent'),
  68427. 'nickname': _.get(vcard.querySelector('NICKNAME'), 'textContent'),
  68428. 'image': _.get(vcard.querySelector('PHOTO BINVAL'), 'textContent'),
  68429. 'image_type': _.get(vcard.querySelector('PHOTO TYPE'), 'textContent'),
  68430. 'url': _.get(vcard.querySelector('URL'), 'textContent'),
  68431. 'role': _.get(vcard.querySelector('ROLE'), 'textContent'),
  68432. 'email': _.get(vcard.querySelector('EMAIL USERID'), 'textContent'),
  68433. 'vcard_updated': moment().format(),
  68434. 'vcard_error': undefined
  68435. };
  68436. }
  68437. if (result.image) {
  68438. const buffer = u.base64ToArrayBuffer(result['image']);
  68439. crypto.subtle.digest('SHA-1', buffer).then(ab => {
  68440. result['image_hash'] = u.arrayBufferToHex(ab);
  68441. if (callback) callback(result);
  68442. });
  68443. } else {
  68444. if (callback) callback(result);
  68445. }
  68446. }
  68447. function onVCardError(jid, iq, errback) {
  68448. if (errback) {
  68449. errback({
  68450. 'stanza': iq,
  68451. 'jid': jid,
  68452. 'vcard_error': moment().format()
  68453. });
  68454. }
  68455. }
  68456. function createStanza(type, jid, vcard_el) {
  68457. const iq = $iq(jid ? {
  68458. 'type': type,
  68459. 'to': jid
  68460. } : {
  68461. 'type': type
  68462. });
  68463. if (!vcard_el) {
  68464. iq.c("vCard", {
  68465. 'xmlns': Strophe.NS.VCARD
  68466. });
  68467. } else {
  68468. iq.cnode(vcard_el);
  68469. }
  68470. return iq;
  68471. }
  68472. function setVCard(jid, data) {
  68473. if (!jid) {
  68474. throw Error("No jid provided for the VCard data");
  68475. }
  68476. const vcard_el = Strophe.xmlHtmlNode(tpl_vcard(data)).firstElementChild;
  68477. return _converse.api.sendIQ(createStanza("set", jid, vcard_el));
  68478. }
  68479. function getVCard(_converse, jid) {
  68480. /* Request the VCard of another user. Returns a promise.
  68481. *
  68482. * Parameters:
  68483. * (String) jid - The Jabber ID of the user whose VCard
  68484. * is being requested.
  68485. */
  68486. const to = Strophe.getBareJidFromJid(jid) === _converse.bare_jid ? null : jid;
  68487. return new Promise((resolve, reject) => {
  68488. _converse.connection.sendIQ(createStanza("get", to), _.partial(onVCardData, jid, _, resolve), _.partial(onVCardError, jid, _, resolve), _converse.IQ_TIMEOUT);
  68489. });
  68490. }
  68491. /* Event handlers */
  68492. _converse.initVCardCollection = function () {
  68493. _converse.vcards = new _converse.VCards();
  68494. const id = b64_sha1(`converse.vcards`);
  68495. _converse.vcards.browserStorage = new Backbone.BrowserStorage[_converse.config.get('storage')](id);
  68496. _converse.vcards.fetch();
  68497. };
  68498. _converse.api.listen.on('sessionInitialized', _converse.initVCardCollection);
  68499. _converse.on('addClientFeatures', () => {
  68500. _converse.api.disco.own.features.add(Strophe.NS.VCARD);
  68501. });
  68502. _.extend(_converse.api, {
  68503. /**
  68504. * The XEP-0054 VCard API
  68505. *
  68506. * This API lets you access and update user VCards
  68507. *
  68508. * @namespace _converse.api.vcard
  68509. * @memberOf _converse.api
  68510. */
  68511. 'vcard': {
  68512. /**
  68513. * Enables setting new values for a VCard.
  68514. *
  68515. * @method _converse.api.vcard.set
  68516. * @param {string} jid The JID for which the VCard should be set
  68517. * @param {object} data A map of VCard keys and values
  68518. * @example
  68519. * _converse.api.vcard.set({
  68520. * 'jid': _converse.bare_jid,
  68521. * 'fn': 'John Doe',
  68522. * 'nickname': 'jdoe'
  68523. * }).then(() => {
  68524. * // Succes
  68525. * }).catch(() => {
  68526. * // Failure
  68527. * }).
  68528. */
  68529. 'set'(jid, data) {
  68530. return setVCard(jid, data);
  68531. },
  68532. /**
  68533. * @method _converse.api.vcard.get
  68534. * @param {Backbone.Model|string} model Either a `Backbone.Model` instance, or a string JID.
  68535. * If a `Backbone.Model` instance is passed in, then it must have either a `jid`
  68536. * attribute or a `muc_jid` attribute.
  68537. * @param {boolean} [force] A boolean indicating whether the vcard should be
  68538. * fetched even if it's been fetched before.
  68539. * @returns {promise} A Promise which resolves with the VCard data for a particular JID or for
  68540. * a `Backbone.Model` instance which represents an entity with a JID (such as a roster contact,
  68541. * chat or chatroom occupant).
  68542. *
  68543. * @example
  68544. * _converse.api.waitUntil('rosterContactsFetched').then(() => {
  68545. * _converse.api.vcard.get('someone@example.org').then(
  68546. * (vcard) => {
  68547. * // Do something with the vcard...
  68548. * }
  68549. * );
  68550. * });
  68551. */
  68552. 'get'(model, force) {
  68553. if (_.isString(model)) {
  68554. return getVCard(_converse, model);
  68555. } else if (force || !model.get('vcard_updated') || !moment(model.get('vcard_error')).isSame(new Date(), "day")) {
  68556. const jid = model.get('jid');
  68557. if (!jid) {
  68558. throw new Error("No JID to get vcard for!");
  68559. }
  68560. return getVCard(_converse, jid);
  68561. } else {
  68562. return Promise.resolve({});
  68563. }
  68564. },
  68565. /**
  68566. * Fetches the VCard associated with a particular `Backbone.Model` instance
  68567. * (by using its `jid` or `muc_jid` attribute) and then updates the model with the
  68568. * returned VCard data.
  68569. *
  68570. * @method _converse.api.vcard.update
  68571. * @param {Backbone.Model} model A `Backbone.Model` instance
  68572. * @param {boolean} [force] A boolean indicating whether the vcard should be
  68573. * fetched again even if it's been fetched before.
  68574. * @returns {promise} A promise which resolves once the update has completed.
  68575. * @example
  68576. * _converse.api.waitUntil('rosterContactsFetched').then(() => {
  68577. * const chatbox = _converse.chatboxes.getChatBox('someone@example.org');
  68578. * _converse.api.vcard.update(chatbox);
  68579. * });
  68580. */
  68581. 'update'(model, force) {
  68582. return this.get(model, force).then(vcard => {
  68583. delete vcard['stanza'];
  68584. model.save(vcard);
  68585. });
  68586. }
  68587. }
  68588. });
  68589. }
  68590. });
  68591. });
  68592. /***/ }),
  68593. /***/ "./src/converse.js":
  68594. /*!*************************!*\
  68595. !*** ./src/converse.js ***!
  68596. \*************************/
  68597. /*! no static exports found */
  68598. /***/ (function(module, exports, __webpack_require__) {
  68599. "use strict";
  68600. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  68601. /*global define */
  68602. if (true) {
  68603. // The section below determines which plugins will be included in a build
  68604. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js"),
  68605. /* START: Removable components
  68606. * --------------------
  68607. * Any of the following components may be removed if they're not needed.
  68608. */
  68609. __webpack_require__(/*! converse-autocomplete */ "./src/converse-autocomplete.js"), __webpack_require__(/*! converse-bookmarks */ "./src/converse-bookmarks.js"), // XEP-0048 Bookmarks
  68610. __webpack_require__(/*! converse-caps */ "./src/converse-caps.js"), // XEP-0115 Entity Capabilities
  68611. __webpack_require__(/*! converse-chatview */ "./src/converse-chatview.js"), // Renders standalone chat boxes for single user chat
  68612. __webpack_require__(/*! converse-controlbox */ "./src/converse-controlbox.js"), // The control box
  68613. __webpack_require__(/*! converse-dragresize */ "./src/converse-dragresize.js"), // Allows chat boxes to be resized by dragging them
  68614. __webpack_require__(/*! converse-embedded */ "./src/converse-embedded.js"), __webpack_require__(/*! converse-fullscreen */ "./src/converse-fullscreen.js"), __webpack_require__(/*! converse-push */ "./src/converse-push.js"), // XEP-0357 Push Notifications
  68615. __webpack_require__(/*! converse-headline */ "./src/converse-headline.js"), // Support for headline messages
  68616. __webpack_require__(/*! converse-mam */ "./src/converse-mam.js"), // XEP-0313 Message Archive Management
  68617. __webpack_require__(/*! converse-minimize */ "./src/converse-minimize.js"), // Allows chat boxes to be minimized
  68618. __webpack_require__(/*! converse-muc */ "./src/converse-muc.js"), // XEP-0045 Multi-user chat
  68619. __webpack_require__(/*! converse-muc-views */ "./src/converse-muc-views.js"), // Views related to MUC
  68620. __webpack_require__(/*! converse-notification */ "./src/converse-notification.js"), // HTML5 Notifications
  68621. __webpack_require__(/*! converse-omemo */ "./src/converse-omemo.js"), __webpack_require__(/*! converse-ping */ "./src/converse-ping.js"), // XEP-0199 XMPP Ping
  68622. __webpack_require__(/*! converse-register */ "./src/converse-register.js"), // XEP-0077 In-band registration
  68623. __webpack_require__(/*! converse-roomslist */ "./src/converse-roomslist.js"), // Show currently open chat rooms
  68624. __webpack_require__(/*! converse-roster */ "./src/converse-roster.js"), __webpack_require__(/*! converse-vcard */ "./src/converse-vcard.js")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (converse) {
  68625. return converse;
  68626. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  68627. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  68628. }
  68629. /***/ }),
  68630. /***/ "./src/i18n.js":
  68631. /*!*********************!*\
  68632. !*** ./src/i18n.js ***!
  68633. \*********************/
  68634. /*! no static exports found */
  68635. /***/ (function(module, exports, __webpack_require__) {
  68636. "use strict";
  68637. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  68638. // Converse.js (A browser based XMPP chat client)
  68639. // http://conversejs.org
  68640. //
  68641. // This is the internationalization module.
  68642. //
  68643. // Copyright (c) 2013-2017, Jan-Carel Brand <jc@opkode.com>
  68644. // Licensed under the Mozilla Public License (MPLv2)
  68645. //
  68646. /*global define */
  68647. (function (root, factory) {
  68648. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! es6-promise */ "./node_modules/es6-promise/dist/es6-promise.auto.js"), __webpack_require__(/*! jed */ "./node_modules/jed/jed.js"), __webpack_require__(/*! lodash.noconflict */ "./src/lodash.noconflict.js"), __webpack_require__(/*! moment */ "./node_modules/moment/moment.js"), __webpack_require__(/*! moment/locale/af */ "./node_modules/moment/locale/af.js"), __webpack_require__(/*! moment/locale/ar */ "./node_modules/moment/locale/ar.js"), __webpack_require__(/*! moment/locale/bg */ "./node_modules/moment/locale/bg.js"), __webpack_require__(/*! moment/locale/ca */ "./node_modules/moment/locale/ca.js"), __webpack_require__(/*! moment/locale/cs */ "./node_modules/moment/locale/cs.js"), __webpack_require__(/*! moment/locale/de */ "./node_modules/moment/locale/de.js"), __webpack_require__(/*! moment/locale/es */ "./node_modules/moment/locale/es.js"), __webpack_require__(/*! moment/locale/eu */ "./node_modules/moment/locale/eu.js"), __webpack_require__(/*! moment/locale/fr */ "./node_modules/moment/locale/fr.js"), __webpack_require__(/*! moment/locale/he */ "./node_modules/moment/locale/he.js"), __webpack_require__(/*! moment/locale/hi */ "./node_modules/moment/locale/hi.js"), __webpack_require__(/*! moment/locale/hu */ "./node_modules/moment/locale/hu.js"), __webpack_require__(/*! moment/locale/id */ "./node_modules/moment/locale/id.js"), __webpack_require__(/*! moment/locale/it */ "./node_modules/moment/locale/it.js"), __webpack_require__(/*! moment/locale/ja */ "./node_modules/moment/locale/ja.js"), __webpack_require__(/*! moment/locale/nb */ "./node_modules/moment/locale/nb.js"), __webpack_require__(/*! moment/locale/nl */ "./node_modules/moment/locale/nl.js"), __webpack_require__(/*! moment/locale/pl */ "./node_modules/moment/locale/pl.js"), __webpack_require__(/*! moment/locale/pt-br */ "./node_modules/moment/locale/pt-br.js"), __webpack_require__(/*! moment/locale/ro */ "./node_modules/moment/locale/ro.js"), __webpack_require__(/*! moment/locale/ru */ "./node_modules/moment/locale/ru.js"), __webpack_require__(/*! moment/locale/tr */ "./node_modules/moment/locale/tr.js"), __webpack_require__(/*! moment/locale/uk */ "./node_modules/moment/locale/uk.js"), __webpack_require__(/*! moment/locale/zh-cn */ "./node_modules/moment/locale/zh-cn.js"), __webpack_require__(/*! moment/locale/zh-tw */ "./node_modules/moment/locale/zh-tw.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  68649. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  68650. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  68651. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  68652. })(void 0, function (Promise, Jed, _, moment) {
  68653. 'use strict';
  68654. function detectLocale(library_check) {
  68655. /* Determine which locale is supported by the user's system as well
  68656. * as by the relevant library (e.g. converse.js or moment.js).
  68657. *
  68658. * Parameters:
  68659. * (Function) library_check - Returns a boolean indicating whether
  68660. * the locale is supported.
  68661. */
  68662. var locale, i;
  68663. if (window.navigator.userLanguage) {
  68664. locale = isLocaleAvailable(window.navigator.userLanguage, library_check);
  68665. }
  68666. if (window.navigator.languages && !locale) {
  68667. for (i = 0; i < window.navigator.languages.length && !locale; i++) {
  68668. locale = isLocaleAvailable(window.navigator.languages[i], library_check);
  68669. }
  68670. }
  68671. if (window.navigator.browserLanguage && !locale) {
  68672. locale = isLocaleAvailable(window.navigator.browserLanguage, library_check);
  68673. }
  68674. if (window.navigator.language && !locale) {
  68675. locale = isLocaleAvailable(window.navigator.language, library_check);
  68676. }
  68677. if (window.navigator.systemLanguage && !locale) {
  68678. locale = isLocaleAvailable(window.navigator.systemLanguage, library_check);
  68679. }
  68680. return locale || 'en';
  68681. }
  68682. function isMomentLocale(locale) {
  68683. return _.includes(moment.locales(), locale);
  68684. }
  68685. function isConverseLocale(locale, supported_locales) {
  68686. return _.isString(locale) && _.includes(supported_locales, locale);
  68687. }
  68688. function getLocale(preferred_locale, isSupportedByLibrary) {
  68689. if (_.isString(preferred_locale)) {
  68690. if (preferred_locale === 'en' || isSupportedByLibrary(preferred_locale)) {
  68691. return preferred_locale;
  68692. }
  68693. }
  68694. return detectLocale(isSupportedByLibrary) || 'en';
  68695. }
  68696. function isLocaleAvailable(locale, available) {
  68697. /* Check whether the locale or sub locale (e.g. en-US, en) is supported.
  68698. *
  68699. * Parameters:
  68700. * (String) locale - The locale to check for
  68701. * (Function) available - returns a boolean indicating whether the locale is supported
  68702. */
  68703. if (available(locale)) {
  68704. return locale;
  68705. } else {
  68706. var sublocale = locale.split("-")[0];
  68707. if (sublocale !== locale && available(sublocale)) {
  68708. return sublocale;
  68709. }
  68710. }
  68711. }
  68712. let jed_instance;
  68713. return {
  68714. setLocales(preferred_locale, _converse) {
  68715. _converse.locale = getLocale(preferred_locale, _.partial(isConverseLocale, _, _converse.locales));
  68716. moment.locale(getLocale(preferred_locale, isMomentLocale));
  68717. },
  68718. translate(str) {
  68719. if (_.isNil(jed_instance)) {
  68720. return Jed.sprintf.apply(Jed, arguments);
  68721. }
  68722. var t = jed_instance.translate(str);
  68723. if (arguments.length > 1) {
  68724. return t.fetch.apply(t, [].slice.call(arguments, 1));
  68725. } else {
  68726. return t.fetch();
  68727. }
  68728. },
  68729. fetchTranslations(locale, supported_locales, locale_url) {
  68730. /* Fetch the translations for the given local at the given URL.
  68731. *
  68732. * Parameters:
  68733. * (String) locale: The given i18n locale
  68734. * (Array) supported_locales: List of locales supported
  68735. * (String) locale_url: The URL from which the translations
  68736. * should be fetched.
  68737. */
  68738. return new Promise((resolve, reject) => {
  68739. if (!isConverseLocale(locale, supported_locales) || locale === 'en') {
  68740. return resolve();
  68741. }
  68742. const xhr = new XMLHttpRequest();
  68743. xhr.open('GET', locale_url, true);
  68744. xhr.setRequestHeader('Accept', "application/json, text/javascript");
  68745. xhr.onload = function () {
  68746. if (xhr.status >= 200 && xhr.status < 400) {
  68747. try {
  68748. const data = window.JSON.parse(xhr.responseText);
  68749. jed_instance = new Jed(data);
  68750. resolve();
  68751. } catch (e) {
  68752. xhr.onerror(e);
  68753. }
  68754. } else {
  68755. xhr.onerror();
  68756. }
  68757. };
  68758. xhr.onerror = e => {
  68759. const err_message = e ? ` Error: ${e.message}` : '';
  68760. reject(new Error(`Could not fetch translations. Status: ${xhr.statusText}. ${err_message}`));
  68761. };
  68762. xhr.send();
  68763. });
  68764. }
  68765. };
  68766. });
  68767. /***/ }),
  68768. /***/ "./src/jquery-stub.js":
  68769. /*!****************************!*\
  68770. !*** ./src/jquery-stub.js ***!
  68771. \****************************/
  68772. /*! no static exports found */
  68773. /***/ (function(module, exports, __webpack_require__) {
  68774. "use strict";
  68775. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  68776. /*global define */
  68777. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
  68778. return Object;
  68779. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  68780. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  68781. /***/ }),
  68782. /***/ "./src/lodash.fp.js":
  68783. /*!**************************!*\
  68784. !*** ./src/lodash.fp.js ***!
  68785. \**************************/
  68786. /*! no static exports found */
  68787. /***/ (function(module, exports, __webpack_require__) {
  68788. "use strict";
  68789. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  68790. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js"), __webpack_require__(/*! lodash.converter */ "./3rdparty/lodash.fp.js")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (_, lodashConverter) {
  68791. var fp = lodashConverter(_.runInContext());
  68792. return fp;
  68793. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  68794. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  68795. /***/ }),
  68796. /***/ "./src/lodash.noconflict.js":
  68797. /*!**********************************!*\
  68798. !*** ./src/lodash.noconflict.js ***!
  68799. \**********************************/
  68800. /*! no static exports found */
  68801. /***/ (function(module, exports, __webpack_require__) {
  68802. "use strict";
  68803. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  68804. /*global define */
  68805. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (_) {
  68806. return _.noConflict();
  68807. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  68808. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  68809. /***/ }),
  68810. /***/ "./src/polyfill.js":
  68811. /*!*************************!*\
  68812. !*** ./src/polyfill.js ***!
  68813. \*************************/
  68814. /*! no static exports found */
  68815. /***/ (function(module, exports, __webpack_require__) {
  68816. "use strict";
  68817. function CustomEvent(event, params) {
  68818. params = params || {
  68819. bubbles: false,
  68820. cancelable: false,
  68821. detail: undefined
  68822. };
  68823. var evt = document.createEvent('CustomEvent');
  68824. evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
  68825. return evt;
  68826. }
  68827. if (typeof window.CustomEvent !== "function") {
  68828. CustomEvent.prototype = window.Event.prototype;
  68829. window.CustomEvent = CustomEvent;
  68830. }
  68831. if (!String.prototype.includes) {
  68832. String.prototype.includes = function (search, start) {
  68833. 'use strict';
  68834. if (typeof start !== 'number') {
  68835. start = 0;
  68836. }
  68837. if (start + search.length > this.length) {
  68838. return false;
  68839. } else {
  68840. return this.indexOf(search, start) !== -1; // eslint-disable-line lodash/prefer-includes
  68841. }
  68842. };
  68843. }
  68844. if (!String.prototype.endsWith) {
  68845. String.prototype.endsWith = function (searchString, position) {
  68846. var subjectString = this.toString();
  68847. if (position === undefined || position > subjectString.length) {
  68848. position = subjectString.length;
  68849. }
  68850. position -= searchString.length;
  68851. var lastIndex = subjectString.indexOf(searchString, position);
  68852. return lastIndex !== -1 && lastIndex === position;
  68853. };
  68854. }
  68855. if (!String.prototype.startsWith) {
  68856. String.prototype.startsWith = function (searchString, position) {
  68857. position = position || 0;
  68858. return this.substr(position, searchString.length) === searchString;
  68859. };
  68860. }
  68861. if (!String.prototype.splitOnce) {
  68862. String.prototype.splitOnce = function (delimiter) {
  68863. var components = this.split(delimiter);
  68864. return [components.shift(), components.join(delimiter)];
  68865. };
  68866. }
  68867. if (!String.prototype.trim) {
  68868. String.prototype.trim = function () {
  68869. return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
  68870. };
  68871. }
  68872. /***/ }),
  68873. /***/ "./src/templates/add_chatroom_modal.html":
  68874. /*!***********************************************!*\
  68875. !*** ./src/templates/add_chatroom_modal.html ***!
  68876. \***********************************************/
  68877. /*! no static exports found */
  68878. /***/ (function(module, exports, __webpack_require__) {
  68879. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  68880. module.exports = function(o) {
  68881. var __t, __p = '', __e = _.escape;
  68882. __p += '<!-- src/templates/add_chatroom_modal.html -->\n<div class="modal fade" id="add-chatroom-modal" tabindex="-1" role="dialog" aria-labelledby="add-chatroom-modal-label" aria-hidden="true">\n <div class="modal-dialog" role="document">\n <div class="modal-content">\n <div class="modal-header">\n <h5 class="modal-title"\n id="add-chatroom-modal-label">' +
  68883. __e(o.heading_new_chatroom) +
  68884. '</h5>\n <button type="button" class="close" data-dismiss="modal" aria-label="Close">\n <span aria-hidden="true">&times;</span>\n </button>\n </div>\n <div class="modal-body">\n <form class="converse-form add-chatroom">\n <div class="form-group">\n <label for="chatroom">' +
  68885. __e(o.label_room_address) +
  68886. ':</label>\n <input type="text" required="required" name="chatroom" class="form-control" placeholder="' +
  68887. __e(o.chatroom_placeholder) +
  68888. '">\n </div>\n <div class="form-group">\n <label for="nickname">' +
  68889. __e(o.label_nickname) +
  68890. ':</label>\n <input type="text" name="nickname" value="' +
  68891. __e(o.nick) +
  68892. '" class="form-control">\n </div>\n <input type="submit" class="btn btn-primary" name="join" value="' +
  68893. __e(o.label_join) +
  68894. '">\n </form>\n </div>\n </div>\n </div>\n</div>\n';
  68895. return __p
  68896. };
  68897. /***/ }),
  68898. /***/ "./src/templates/add_contact_modal.html":
  68899. /*!**********************************************!*\
  68900. !*** ./src/templates/add_contact_modal.html ***!
  68901. \**********************************************/
  68902. /*! no static exports found */
  68903. /***/ (function(module, exports, __webpack_require__) {
  68904. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  68905. module.exports = function(o) {
  68906. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  68907. function print() { __p += __j.call(arguments, '') }
  68908. __p += '<!-- src/templates/add_contact_modal.html -->\n<!-- Add contact Modal -->\n<div class="modal fade" id="add-contact-modal" tabindex="-1" role="dialog" aria-labelledby="addContactModalLabel" aria-hidden="true">\n <div class="modal-dialog" role="document">\n <div class="modal-content">\n <div class="modal-header">\n <h5 class="modal-title" id="addContactModalLabel">' +
  68909. __e(o.heading_new_contact) +
  68910. '</h5>\n <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>\n </div>\n <form class="converse-form add-xmpp-contact">\n <div class="modal-body">\n <div class="form-group ';
  68911. if (o._converse.xhr_user_search_url) { ;
  68912. __p += ' hidden ';
  68913. } ;
  68914. __p += '">\n <label class="clearfix" for="jid">' +
  68915. __e(o.label_xmpp_address) +
  68916. ':</label>\n <input type="text" name="jid" required="required" value="' +
  68917. __e(o.jid) +
  68918. '"\n class="form-control"\n placeholder="' +
  68919. __e(o.contact_placeholder) +
  68920. '"/>\n <div class="invalid-feedback">' +
  68921. __e(o.error_message) +
  68922. '</div>\n </div>\n <div class="form-group">\n <label class="clearfix" for="name">' +
  68923. __e(o.label_nickname) +
  68924. ':</label>\n <input type="text" name="name" value="' +
  68925. __e(o.nickname) +
  68926. '"\n class="form-control"\n placeholder="' +
  68927. __e(o.nickname_placeholder) +
  68928. '"/>\n </div>\n </div>\n <div class="modal-footer">\n <button type="submit" class="btn btn-primary">' +
  68929. __e(o.label_add) +
  68930. '</button>\n </div>\n </form>\n </div>\n </div>\n</div>\n';
  68931. return __p
  68932. };
  68933. /***/ }),
  68934. /***/ "./src/templates/alert.html":
  68935. /*!**********************************!*\
  68936. !*** ./src/templates/alert.html ***!
  68937. \**********************************/
  68938. /*! no static exports found */
  68939. /***/ (function(module, exports, __webpack_require__) {
  68940. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  68941. module.exports = function(o) {
  68942. var __t, __p = '', __e = _.escape;
  68943. __p += '<!-- src/templates/alert.html -->\n<div class="alert ' +
  68944. __e(o.type) +
  68945. '" role="alert">' +
  68946. __e(o.message) +
  68947. '</div>\n';
  68948. return __p
  68949. };
  68950. /***/ }),
  68951. /***/ "./src/templates/alert_modal.html":
  68952. /*!****************************************!*\
  68953. !*** ./src/templates/alert_modal.html ***!
  68954. \****************************************/
  68955. /*! no static exports found */
  68956. /***/ (function(module, exports, __webpack_require__) {
  68957. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  68958. module.exports = function(o) {
  68959. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  68960. function print() { __p += __j.call(arguments, '') }
  68961. __p += '<!-- src/templates/alert_modal.html -->\n<div class="modal" tabindex="-1" role="dialog">\n <div class="modal-dialog" role="document">\n <div class="modal-content">\n <div class="modal-header ' +
  68962. __e(o.type) +
  68963. '">\n <h5 class="modal-title">' +
  68964. __e(o.title) +
  68965. '</h5>\n <button type="button" class="close" data-dismiss="modal" aria-label="Close">\n <span aria-hidden="true">&times;</span>\n </button>\n </div>\n <div class="modal-body">';
  68966. o.messages.forEach(function (message) { ;
  68967. __p += '\n <p>' +
  68968. __e(message) +
  68969. '</p>\n ';
  68970. }) ;
  68971. __p += '\n </div>\n </div>\n </div>\n</div>\n';
  68972. return __p
  68973. };
  68974. /***/ }),
  68975. /***/ "./src/templates/audio.html":
  68976. /*!**********************************!*\
  68977. !*** ./src/templates/audio.html ***!
  68978. \**********************************/
  68979. /*! no static exports found */
  68980. /***/ (function(module, exports, __webpack_require__) {
  68981. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  68982. module.exports = function(o) {
  68983. var __t, __p = '', __e = _.escape;
  68984. __p += '<!-- src/templates/audio.html -->\n<audio controls src="' +
  68985. __e(o.url) +
  68986. '"></audio>\n<a target="_blank" rel="noopener" href="' +
  68987. __e(o.url) +
  68988. '">' +
  68989. __e(o.label_download) +
  68990. '</a>\n';
  68991. return __p
  68992. };
  68993. /***/ }),
  68994. /***/ "./src/templates/bookmark.html":
  68995. /*!*************************************!*\
  68996. !*** ./src/templates/bookmark.html ***!
  68997. \*************************************/
  68998. /*! no static exports found */
  68999. /***/ (function(module, exports, __webpack_require__) {
  69000. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69001. module.exports = function(o) {
  69002. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  69003. function print() { __p += __j.call(arguments, '') }
  69004. __p += '<!-- src/templates/bookmark.html -->\n<div class="list-item controlbox-padded room-item available-chatroom d-flex flex-row ';
  69005. if (o.hidden) { ;
  69006. __p += ' hidden ';
  69007. } ;
  69008. __p += '" data-room-jid="' +
  69009. __e(o.jid) +
  69010. '">\n <a class="list-item-link open-room w-100" data-room-jid="' +
  69011. __e(o.jid) +
  69012. '" title="' +
  69013. __e(o.open_title) +
  69014. '" href="#">' +
  69015. __e(o.name) +
  69016. '</a>\n <a class="list-item-action remove-bookmark fa fa-bookmark align-self-center ';
  69017. if (o.bookmarked) { ;
  69018. __p += ' button-on ';
  69019. } ;
  69020. __p += '"\n data-room-jid="' +
  69021. __e(o.jid) +
  69022. '" data-bookmark-name="' +
  69023. __e(o.name) +
  69024. '"\n title="' +
  69025. __e(o.info_remove_bookmark) +
  69026. '" href="#">&nbsp;</a>\n</div>\n';
  69027. return __p
  69028. };
  69029. /***/ }),
  69030. /***/ "./src/templates/bookmarks_list.html":
  69031. /*!*******************************************!*\
  69032. !*** ./src/templates/bookmarks_list.html ***!
  69033. \*******************************************/
  69034. /*! no static exports found */
  69035. /***/ (function(module, exports, __webpack_require__) {
  69036. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69037. module.exports = function(o) {
  69038. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  69039. function print() { __p += __j.call(arguments, '') }
  69040. __p += '<!-- src/templates/bookmarks_list.html -->\n<a href="#" class="list-toggle bookmarks-toggle controlbox-padded" title="' +
  69041. __e(o.desc_bookmarks) +
  69042. '">\n <span class="fa ';
  69043. if (o.toggle_state === o._converse.OPENED) { ;
  69044. __p += ' fa-caret-down ';
  69045. } else { ;
  69046. __p += ' fa-caret-right ';
  69047. } ;
  69048. __p += '">\n </span> ' +
  69049. __e(o.label_bookmarks) +
  69050. '</a>\n<div class="items-list bookmarks rooms-list ';
  69051. if (o.toggle_state !== o._converse.OPENED) { ;
  69052. __p += ' hidden ';
  69053. } ;
  69054. __p += '"></div>\n';
  69055. return __p
  69056. };
  69057. /***/ }),
  69058. /***/ "./src/templates/chat_status_modal.html":
  69059. /*!**********************************************!*\
  69060. !*** ./src/templates/chat_status_modal.html ***!
  69061. \**********************************************/
  69062. /*! no static exports found */
  69063. /***/ (function(module, exports, __webpack_require__) {
  69064. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69065. module.exports = function(o) {
  69066. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  69067. function print() { __p += __j.call(arguments, '') }
  69068. __p += '<!-- src/templates/chat_status_modal.html -->\n<!-- Change status Modal -->\n<div class="modal fade" id="modal-status-change" tabindex="-1" role="dialog" aria-labelledby="changeStatusModalLabel" aria-hidden="true">\n <div class="modal-dialog" role="document">\n <div class="modal-content">\n <div class="modal-header">\n <h5 class="modal-title" id="changeStatusModalLabel">' +
  69069. __e(o.modal_title) +
  69070. '</h5>\n <button type="button" class="close" data-dismiss="modal" aria-label="' +
  69071. __e(o.label_close) +
  69072. '">\n <span aria-hidden="true">&times;</span>\n </button>\n </div>\n <form class="set-xmpp-status" id="set-xmpp-status">\n <div class="modal-body">\n <div class="form-group">\n <div class="custom-control custom-radio">\n <input ';
  69073. if (o.status === 'online') { ;
  69074. __p += ' checked="checked" ';
  69075. } ;
  69076. __p += '\n type="radio" id="radio-online" value="online" name="chat_status" class="custom-control-input">\n <label class="custom-control-label" for="radio-online">\n <span class="fa fa-circle"></span>&nbsp;' +
  69077. __e(o.label_online) +
  69078. '</label>\n </div>\n <div class="custom-control custom-radio">\n <input ';
  69079. if (o.status === 'busy') { ;
  69080. __p += ' checked="checked" ';
  69081. } ;
  69082. __p += '\n type="radio" id="radio-busy" value="dnd" name="chat_status" class="custom-control-input">\n <label class="custom-control-label" for="radio-busy">\n <span class="fa fa-minus-circle"></span>&nbsp;' +
  69083. __e(o.label_busy) +
  69084. '</label>\n </div>\n <div class="custom-control custom-radio">\n <input ';
  69085. if (o.status === 'away') { ;
  69086. __p += ' checked="checked" ';
  69087. } ;
  69088. __p += '\n type="radio" id="radio-away" value="away" name="chat_status" class="custom-control-input">\n <label class="custom-control-label" for="radio-away">\n <span class="fa fa-dot-circle"></span>&nbsp;' +
  69089. __e(o.label_away) +
  69090. '</label>\n </div>\n <div class="custom-control custom-radio">\n <input ';
  69091. if (o.status === 'xa') { ;
  69092. __p += ' checked="checked" ';
  69093. } ;
  69094. __p += '\n type="radio" id="radio-xa" value="xa" name="chat_status" class="custom-control-input">\n <label class="custom-control-label" for="radio-xa">\n <span class="far fa-circle"></span>&nbsp;' +
  69095. __e(o.label_xa) +
  69096. '</label>\n </div>\n </div>\n <div class="btn-group w-100">\n <input name="status_message" type="text" class="form-control" \n value="' +
  69097. __e(o.status_message) +
  69098. '" placeholder="' +
  69099. __e(o.placeholder_status_message) +
  69100. '">\n <span class="clear-input fa fa-times ';
  69101. if (!o.status_message) { ;
  69102. __p += ' hidden ';
  69103. } ;
  69104. __p += '"></span>\n </div>\n </div>\n <div class="modal-footer">\n <button type="submit" class="btn btn-primary">' +
  69105. __e(o.label_save) +
  69106. '</button>\n </div>\n </form>\n </div>\n </div>\n</div>\n';
  69107. return __p
  69108. };
  69109. /***/ }),
  69110. /***/ "./src/templates/chatarea.html":
  69111. /*!*************************************!*\
  69112. !*** ./src/templates/chatarea.html ***!
  69113. \*************************************/
  69114. /*! no static exports found */
  69115. /***/ (function(module, exports, __webpack_require__) {
  69116. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69117. module.exports = function(o) {
  69118. var __t, __p = '', __j = Array.prototype.join;
  69119. function print() { __p += __j.call(arguments, '') }
  69120. __p += '<!-- src/templates/chatarea.html -->\n<div class="chat-area col-md-9 col-8">\n <div class="chat-content ';
  69121. if (o.show_send_button) { ;
  69122. __p += 'chat-content-sendbutton';
  69123. } ;
  69124. __p += '"></div>\n <div class="message-form-container"/>\n</div>\n';
  69125. return __p
  69126. };
  69127. /***/ }),
  69128. /***/ "./src/templates/chatbox.html":
  69129. /*!************************************!*\
  69130. !*** ./src/templates/chatbox.html ***!
  69131. \************************************/
  69132. /*! no static exports found */
  69133. /***/ (function(module, exports, __webpack_require__) {
  69134. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69135. module.exports = function(o) {
  69136. var __t, __p = '', __j = Array.prototype.join;
  69137. function print() { __p += __j.call(arguments, '') }
  69138. __p += '<!-- src/templates/chatbox.html -->\n<div class="flyout box-flyout">\n <div class="chat-body">\n <div class="chat-content ';
  69139. if (o.show_send_button) { ;
  69140. __p += 'chat-content-sendbutton';
  69141. } ;
  69142. __p += '"></div>\n <div class="message-form-container"/>\n </div>\n</div>\n';
  69143. return __p
  69144. };
  69145. /***/ }),
  69146. /***/ "./src/templates/chatbox_head.html":
  69147. /*!*****************************************!*\
  69148. !*** ./src/templates/chatbox_head.html ***!
  69149. \*****************************************/
  69150. /*! no static exports found */
  69151. /***/ (function(module, exports, __webpack_require__) {
  69152. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69153. module.exports = function(o) {
  69154. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  69155. function print() { __p += __j.call(arguments, '') }
  69156. __p += '<!-- src/templates/chatbox_head.html -->\n<div class="chat-head chat-head-chatbox row no-gutters">\n <div class="chatbox-navback"><i class="fa fa-arrow-left"></i></div>\n <div class="chatbox-title">\n <div class="row no-gutters">\n <canvas class="avatar" height="36" width="36"></canvas>\n <div class="col chat-title" title="' +
  69157. __e(o.jid) +
  69158. '">\n ';
  69159. if (o.url) { ;
  69160. __p += '\n <a href="' +
  69161. __e(o.url) +
  69162. '" target="_blank" rel="noopener" class="user">\n ';
  69163. } ;
  69164. __p += '\n ' +
  69165. __e( o.nickname || o.fullname || o.jid ) +
  69166. '\n ';
  69167. if (o.url) { ;
  69168. __p += '\n </a>\n ';
  69169. } ;
  69170. __p += '\n <p class="user-custom-message">' +
  69171. __e( o.status ) +
  69172. '</p>\n </div>\n </div>\n </div>\n <div class="chatbox-buttons row no-gutters">\n <a class="chatbox-btn close-chatbox-button fa fa-times" title=' +
  69173. __e(o.info_close) +
  69174. '></a>\n <a class="chatbox-btn show-user-details-modal fa fa-id-card" title="' +
  69175. __e(o.info_details) +
  69176. '"></a>\n </div>\n</div>\n';
  69177. return __p
  69178. };
  69179. /***/ }),
  69180. /***/ "./src/templates/chatbox_message_form.html":
  69181. /*!*************************************************!*\
  69182. !*** ./src/templates/chatbox_message_form.html ***!
  69183. \*************************************************/
  69184. /*! no static exports found */
  69185. /***/ (function(module, exports, __webpack_require__) {
  69186. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69187. module.exports = function(o) {
  69188. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  69189. function print() { __p += __j.call(arguments, '') }
  69190. __p += '<!-- src/templates/chatbox_message_form.html -->\n<div class="message-form-container">\n<div class="new-msgs-indicator hidden">▼ ' +
  69191. __e( o.unread_msgs ) +
  69192. ' ▼</div>\n<form class="sendXMPPMessage">\n ';
  69193. if (o.show_toolbar) { ;
  69194. __p += '\n <ul class="chat-toolbar no-text-select"></ul>\n ';
  69195. } ;
  69196. __p += '\n <input type="text" placeholder="' +
  69197. ((__t = (o.label_spoiler_hint)) == null ? '' : __t) +
  69198. '" value="' +
  69199. ((__t = ( o.hint_value )) == null ? '' : __t) +
  69200. '"\n class="';
  69201. if (!o.composing_spoiler) { ;
  69202. __p += ' hidden ';
  69203. } ;
  69204. __p += ' spoiler-hint"/>\n\n <div class="suggestion-box">\n <ul class="suggestion-box__results suggestion-box__results--above" hidden></ul>\n <textarea\n type="text"\n class="chat-textarea suggestion-box__input\n ';
  69205. if (o.show_send_button) { ;
  69206. __p += ' chat-textarea-send-button ';
  69207. } ;
  69208. __p += '\n ';
  69209. if (o.composing_spoiler) { ;
  69210. __p += ' spoiler ';
  69211. } ;
  69212. __p += '"\n placeholder="' +
  69213. __e(o.label_message) +
  69214. '">' +
  69215. ((__t = ( o.message_value )) == null ? '' : __t) +
  69216. '</textarea>\n <span class="suggestion-box__additions visually-hidden" role="status" aria-live="assertive" aria-relevant="additions"></span>\n\n ';
  69217. if (o.show_send_button) { ;
  69218. __p += '\n <button type="submit" class="pure-button send-button">' +
  69219. __e( o.label_send ) +
  69220. '</button>\n ';
  69221. } ;
  69222. __p += '\n </div>\n</form>\n</div>\n';
  69223. return __p
  69224. };
  69225. /***/ }),
  69226. /***/ "./src/templates/chatbox_minimize.html":
  69227. /*!*********************************************!*\
  69228. !*** ./src/templates/chatbox_minimize.html ***!
  69229. \*********************************************/
  69230. /*! no static exports found */
  69231. /***/ (function(module, exports, __webpack_require__) {
  69232. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69233. module.exports = function(o) {
  69234. var __t, __p = '', __e = _.escape;
  69235. __p += '<!-- src/templates/chatbox_minimize.html -->\n<a class="chatbox-btn toggle-chatbox-button fa fa-minus" title="' +
  69236. __e(o.info_minimize) +
  69237. '"></a>\n';
  69238. return __p
  69239. };
  69240. /***/ }),
  69241. /***/ "./src/templates/chatboxes.html":
  69242. /*!**************************************!*\
  69243. !*** ./src/templates/chatboxes.html ***!
  69244. \**************************************/
  69245. /*! no static exports found */
  69246. /***/ (function(module, exports, __webpack_require__) {
  69247. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69248. module.exports = function(o) {
  69249. var __t, __p = '';
  69250. __p += '<!-- src/templates/chatboxes.html -->\n<div class="converse-chatboxes row no-gutters"></div>\n<div id="converse-modals" class="modals"></div>\n';
  69251. return __p
  69252. };
  69253. /***/ }),
  69254. /***/ "./src/templates/chatroom.html":
  69255. /*!*************************************!*\
  69256. !*** ./src/templates/chatroom.html ***!
  69257. \*************************************/
  69258. /*! no static exports found */
  69259. /***/ (function(module, exports, __webpack_require__) {
  69260. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69261. module.exports = function(o) {
  69262. var __t, __p = '';
  69263. __p += '<!-- src/templates/chatroom.html -->\n<div class="flyout box-flyout">\n <div class="chat-head chat-head-chatroom row no-gutters"></div>\n <div class="chat-body chatroom-body row no-gutters">\n <div class="disconnect-container hidden"></div>\n </div>\n</div>\n';
  69264. return __p
  69265. };
  69266. /***/ }),
  69267. /***/ "./src/templates/chatroom_bookmark_form.html":
  69268. /*!***************************************************!*\
  69269. !*** ./src/templates/chatroom_bookmark_form.html ***!
  69270. \***************************************************/
  69271. /*! no static exports found */
  69272. /***/ (function(module, exports, __webpack_require__) {
  69273. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69274. module.exports = function(o) {
  69275. var __t, __p = '', __e = _.escape;
  69276. __p += '<!-- src/templates/chatroom_bookmark_form.html -->\n<div class="chatroom-form-container">\n <form class="converse-form chatroom-form">\n <legend>' +
  69277. __e(o.heading) +
  69278. '</legend>\n <fieldset class="form-group">\n <label for="converse_muc_bookmark_name">' +
  69279. __e(o.label_name) +
  69280. '</label>\n <input class="form-control" type="text" value="' +
  69281. __e(o.name) +
  69282. '" name="name" required="required" id="converse_muc_bookmark_name"/>\n </fieldset>\n <fieldset class="form-group">\n <label for="converse_muc_bookmark_nick">' +
  69283. __e(o.label_nick) +
  69284. '</label>\n <input class="form-control" type="text" name="nick" value="' +
  69285. __e(o.default_nick) +
  69286. '" id="converse_muc_bookmark_nick"/>\n </fieldset>\n <fieldset class="form-group form-check">\n <input class="form-check-input" id="converse_muc_bookmark_autojoin" type="checkbox" name="autojoin"/>\n <label class="form-check-label" for="converse_muc_bookmark_autojoin">' +
  69287. __e(o.label_autojoin) +
  69288. '</label>\n </fieldset>\n <fieldset class="form-group">\n <input class="btn btn-primary" type="submit" value="' +
  69289. __e(o.label_submit) +
  69290. '"/>\n <input class="btn btn-secondary button-cancel" type="button" value="' +
  69291. __e(o.label_cancel) +
  69292. '"/>\n </fieldset>\n </form>\n</div>\n';
  69293. return __p
  69294. };
  69295. /***/ }),
  69296. /***/ "./src/templates/chatroom_bookmark_toggle.html":
  69297. /*!*****************************************************!*\
  69298. !*** ./src/templates/chatroom_bookmark_toggle.html ***!
  69299. \*****************************************************/
  69300. /*! no static exports found */
  69301. /***/ (function(module, exports, __webpack_require__) {
  69302. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69303. module.exports = function(o) {
  69304. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  69305. function print() { __p += __j.call(arguments, '') }
  69306. __p += '<!-- src/templates/chatroom_bookmark_toggle.html -->\n<a class="chatbox-btn toggle-bookmark fa fa-bookmark\n ';
  69307. if (o.bookmarked) {;
  69308. __p += ' button-on ';
  69309. } ;
  69310. __p += '" title="' +
  69311. __e(o.info_toggle_bookmark) +
  69312. '"></a>\n';
  69313. return __p
  69314. };
  69315. /***/ }),
  69316. /***/ "./src/templates/chatroom_destroyed.html":
  69317. /*!***********************************************!*\
  69318. !*** ./src/templates/chatroom_destroyed.html ***!
  69319. \***********************************************/
  69320. /*! no static exports found */
  69321. /***/ (function(module, exports, __webpack_require__) {
  69322. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69323. module.exports = function(o) {
  69324. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  69325. function print() { __p += __j.call(arguments, '') }
  69326. __p += '<!-- src/templates/chatroom_destroyed.html -->\n<div class="alert alert-danger">\n <h3 class="alert-heading disconnect-msg">' +
  69327. __e(o.__('This room no longer exists')) +
  69328. '</h3>\n\n <p class="destroyed-reason">' +
  69329. __e(o.reason) +
  69330. '</p>\n\n ';
  69331. if (o.jid) { ;
  69332. __p += '\n <p class="moved-label">\n ' +
  69333. __e(o.__('The conversation has moved. Click below to enter.') ) +
  69334. '\n </p>\n <p class="moved-link"><a class="switch-chat" href="#">' +
  69335. __e(o.jid) +
  69336. '</a></p>\n ';
  69337. } ;
  69338. __p += '\n</div>\n';
  69339. return __p
  69340. };
  69341. /***/ }),
  69342. /***/ "./src/templates/chatroom_details_modal.html":
  69343. /*!***************************************************!*\
  69344. !*** ./src/templates/chatroom_details_modal.html ***!
  69345. \***************************************************/
  69346. /*! no static exports found */
  69347. /***/ (function(module, exports, __webpack_require__) {
  69348. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69349. module.exports = function(o) {
  69350. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  69351. function print() { __p += __j.call(arguments, '') }
  69352. __p += '<!-- src/templates/chatroom_details_modal.html -->\n<div class="modal fade" id="room-details-modal" tabindex="-1" role="dialog" aria-labelledby="room-details-modal-label" aria-hidden="true">\n <div class="modal-dialog" role="document">\n <div class="modal-content">\n <div class="modal-header">\n <h5 class="modal-title" id="room-details-modal-label">' +
  69353. __e(o.display_name) +
  69354. '</h5>\n <button type="button" class="close" data-dismiss="modal" aria-label="' +
  69355. __e(o.label_close) +
  69356. '"><span aria-hidden="true">&times;</span></button>\n </div>\n <div class="modal-body">\n <div class="room-info">\n <p class="room-info"><strong>' +
  69357. __e(o.__('Name')) +
  69358. '</strong>: ' +
  69359. __e(o.name) +
  69360. '</p>\n <p class="room-info"><strong>' +
  69361. __e(o.__('Groupchat address (JID)')) +
  69362. '</strong>: ' +
  69363. __e(o.jid) +
  69364. '</p>\n <p class="room-info"><strong>' +
  69365. __e(o.__('Description')) +
  69366. '</strong>: ' +
  69367. __e(o.description) +
  69368. '</p>\n ';
  69369. if (o.subject) { ;
  69370. __p += '\n <p class="room-info"><strong>' +
  69371. __e(o.__('Topic')) +
  69372. '</strong>: ' +
  69373. ((__t = (o.topic)) == null ? '' : __t) +
  69374. '</p> <!-- Sanitized in converse-muc-views. We want to render links. -->\n <p class="room-info"><strong>' +
  69375. __e(o.__('Topic author')) +
  69376. '</strong>: ' +
  69377. __e(o._.get(o.subject, 'author')) +
  69378. '</p>\n ';
  69379. } ;
  69380. __p += '\n <p class="room-info"><strong>' +
  69381. __e(o.__('Online users')) +
  69382. '</strong>: ' +
  69383. __e(o.num_occupants) +
  69384. '</p>\n <p class="room-info"><strong>' +
  69385. __e(o.__('Features')) +
  69386. '</strong>:\n <div class="chatroom-features">\n <ul class="features-list">\n ';
  69387. if (o.passwordprotected) { ;
  69388. __p += '\n <li class="feature" ><span class="fa fa-lock"></span>' +
  69389. __e( o.__('Password protected') ) +
  69390. ' - <em>' +
  69391. __e( o.__('This groupchat requires a password before entry') ) +
  69392. '</em></li>\n ';
  69393. } ;
  69394. __p += '\n ';
  69395. if (o.unsecured) { ;
  69396. __p += '\n <li class="feature" ><span class="fa fa-unlock"></span>' +
  69397. __e( o.__('No password required') ) +
  69398. ' - <em>' +
  69399. __e( o.__('This groupchat does not require a password upon entry') ) +
  69400. '</em></li>\n ';
  69401. } ;
  69402. __p += '\n ';
  69403. if (o.hidden) { ;
  69404. __p += '\n <li class="feature" ><span class="fa fa-eye-slash"></span>' +
  69405. __e( o.__('Hidden') ) +
  69406. ' - <em>' +
  69407. __e( o.__('This groupchat is not publicly searchable') ) +
  69408. '</em></li>\n ';
  69409. } ;
  69410. __p += '\n ';
  69411. if (o.public_room) { ;
  69412. __p += '\n <li class="feature" ><span class="fa fa-eye"></span>' +
  69413. __e( o.__('Public') ) +
  69414. ' - <em>' +
  69415. __e( o.__('This groupchat is publicly searchable') ) +
  69416. '</em></li>\n ';
  69417. } ;
  69418. __p += '\n ';
  69419. if (o.membersonly) { ;
  69420. __p += '\n <li class="feature" ><span class="fa fa-address-book"></span>' +
  69421. __e( o.__('Members only') ) +
  69422. ' - <em>' +
  69423. __e( o.__('This groupchat is restricted to members only') ) +
  69424. '</em></li>\n ';
  69425. } ;
  69426. __p += '\n ';
  69427. if (o.open) { ;
  69428. __p += '\n <li class="feature" ><span class="fa fa-globe"></span>' +
  69429. __e( o.__('Open') ) +
  69430. ' - <em>' +
  69431. __e( o.__('Anyone can join this groupchat') ) +
  69432. '</em></li>\n ';
  69433. } ;
  69434. __p += '\n ';
  69435. if (o.persistent) { ;
  69436. __p += '\n <li class="feature" ><span class="fa fa-save"></span>' +
  69437. __e( o.__('Persistent') ) +
  69438. ' - <em>' +
  69439. __e( o.__('This groupchat persists even if it\'s unoccupied') ) +
  69440. '</em></li>\n ';
  69441. } ;
  69442. __p += '\n ';
  69443. if (o.temporary) { ;
  69444. __p += '\n <li class="feature" ><span class="fa fa-snowflake-o"></span>' +
  69445. __e( o.__('Temporary') ) +
  69446. ' - <em>' +
  69447. __e( o.__('This groupchat will disappear once the last person leaves') ) +
  69448. '</em></li>\n ';
  69449. } ;
  69450. __p += '\n ';
  69451. if (o.nonanonymous) { ;
  69452. __p += '\n <li class="feature" ><span class="fa fa-id-card"></span>' +
  69453. __e( o.__('Not anonymous') ) +
  69454. ' - <em>' +
  69455. __e( o.__('All other groupchat participants can see your XMPP username') ) +
  69456. '</em></li>\n ';
  69457. } ;
  69458. __p += '\n ';
  69459. if (o.semianonymous) { ;
  69460. __p += '\n <li class="feature" ><span class="fa fa-user-secret"></span>' +
  69461. __e( o.__('Semi-anonymous') ) +
  69462. ' - <em>' +
  69463. __e( o.__('Only moderators can see your XMPP username') ) +
  69464. '</em></li>\n ';
  69465. } ;
  69466. __p += '\n ';
  69467. if (o.moderated) { ;
  69468. __p += '\n <li class="feature" ><span class="fa fa-gavel"></span>' +
  69469. __e( o.__('Moderated') ) +
  69470. ' - <em>' +
  69471. __e( o.__('Participants entering this groupchat need to request permission to write') ) +
  69472. '</em></li>\n ';
  69473. } ;
  69474. __p += '\n ';
  69475. if (o.unmoderated) { ;
  69476. __p += '\n <li class="feature" ><span class="fa fa-info-circle"></span>' +
  69477. __e( o.__('Not moderated') ) +
  69478. ' - <em>' +
  69479. __e( o.__('Participants entering this groupchat can write right away') ) +
  69480. '</em></li>\n ';
  69481. } ;
  69482. __p += '\n ';
  69483. if (o.mam_enabled) { ;
  69484. __p += '\n <li class="feature" ><span class="fa fa-database"></span>' +
  69485. __e( o.__('Message archiving') ) +
  69486. ' - <em>' +
  69487. __e( o.__('Messages are archived on the server') ) +
  69488. '</em></li>\n ';
  69489. } ;
  69490. __p += '\n </ul>\n </div>\n </p>\n </div>\n </div>\n <div class="modal-footer">\n <button type="button" class="btn btn-secondary" data-dismiss="modal">' +
  69491. __e(o.__('Close')) +
  69492. '</button>\n </div>\n </div>\n </div>\n</div>\n';
  69493. return __p
  69494. };
  69495. /***/ }),
  69496. /***/ "./src/templates/chatroom_disconnect.html":
  69497. /*!************************************************!*\
  69498. !*** ./src/templates/chatroom_disconnect.html ***!
  69499. \************************************************/
  69500. /*! no static exports found */
  69501. /***/ (function(module, exports, __webpack_require__) {
  69502. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69503. module.exports = function(o) {
  69504. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  69505. function print() { __p += __j.call(arguments, '') }
  69506. __p += '<!-- src/templates/chatroom_disconnect.html -->\n<div class="alert alert-danger">\n <h3 class="alert-heading disconnect-msg">' +
  69507. __e(o.disconnect_messages[0]) +
  69508. '</h3>\n\n ';
  69509. o._.forEach(o.disconnect_messages.slice(1), function (msg) { ;
  69510. __p += '\n <p class="disconnect-msg">' +
  69511. __e(msg) +
  69512. '</p>\n ';
  69513. }); ;
  69514. __p += '\n</div>\n';
  69515. return __p
  69516. };
  69517. /***/ }),
  69518. /***/ "./src/templates/chatroom_features.html":
  69519. /*!**********************************************!*\
  69520. !*** ./src/templates/chatroom_features.html ***!
  69521. \**********************************************/
  69522. /*! no static exports found */
  69523. /***/ (function(module, exports, __webpack_require__) {
  69524. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69525. module.exports = function(o) {
  69526. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  69527. function print() { __p += __j.call(arguments, '') }
  69528. __p += '<!-- src/templates/chatroom_features.html -->\n';
  69529. if (o.has_features) { ;
  69530. __p += '\n<p class="occupants-heading">' +
  69531. __e(o.__('Features')) +
  69532. '</p>\n';
  69533. } ;
  69534. __p += '\n<ul class="features-list">\n';
  69535. if (o.passwordprotected) { ;
  69536. __p += '\n<li class="feature" title="' +
  69537. __e( o.__('This groupchat requires a password before entry') ) +
  69538. '"><span class="fa fa-lock"></span>' +
  69539. __e( o.__('Password protected') ) +
  69540. '</li>\n';
  69541. } ;
  69542. __p += '\n';
  69543. if (o.unsecured) { ;
  69544. __p += '\n<li class="feature" title="' +
  69545. __e( o.__('This groupchat does not require a password upon entry') ) +
  69546. '"><span class="fa fa-unlock"></span>' +
  69547. __e( o.__('No password') ) +
  69548. '</li>\n';
  69549. } ;
  69550. __p += '\n';
  69551. if (o.hidden) { ;
  69552. __p += '\n<li class="feature" title="' +
  69553. __e( o.__('This groupchat is not publicly searchable') ) +
  69554. '"><span class="fa fa-eye-slash"></span>' +
  69555. __e( o.__('Hidden') ) +
  69556. '</li>\n';
  69557. } ;
  69558. __p += '\n';
  69559. if (o.public_room) { ;
  69560. __p += '\n<li class="feature" title="' +
  69561. __e( o.__('This groupchat is publicly searchable') ) +
  69562. '"><span class="fa fa-eye"></span>' +
  69563. __e( o.__('Public') ) +
  69564. '</li>\n';
  69565. } ;
  69566. __p += '\n';
  69567. if (o.membersonly) { ;
  69568. __p += '\n<li class="feature" title="' +
  69569. __e( o.__('this groupchat is restricted to members only') ) +
  69570. '"><span class="fa fa-address-book"></span>' +
  69571. __e( o.__('Members only') ) +
  69572. '</li>\n';
  69573. } ;
  69574. __p += '\n';
  69575. if (o.open) { ;
  69576. __p += '\n<li class="feature" title="' +
  69577. __e( o.__('Anyone can join this groupchat') ) +
  69578. '"><span class="fa fa-globe"></span>' +
  69579. __e( o.__('Open') ) +
  69580. '</li>\n';
  69581. } ;
  69582. __p += '\n';
  69583. if (o.persistent) { ;
  69584. __p += '\n<li class="feature" title="' +
  69585. __e( o.__('This groupchat persists even if it\'s unoccupied') ) +
  69586. '"><span class="fa fa-save"></span>' +
  69587. __e( o.__('Persistent') ) +
  69588. '</li>\n';
  69589. } ;
  69590. __p += '\n';
  69591. if (o.temporary) { ;
  69592. __p += '\n<li class="feature" title="' +
  69593. __e( o.__('This groupchat will disappear once the last person leaves') ) +
  69594. '"><span class="fa fa-snowflake-o"></span>' +
  69595. __e( o.__('Temporary') ) +
  69596. '</li>\n';
  69597. } ;
  69598. __p += '\n';
  69599. if (o.nonanonymous) { ;
  69600. __p += '\n<li class="feature" title="' +
  69601. __e( o.__('All other groupchat participants can see your XMPP username') ) +
  69602. '"><span class="fa fa-id-card"></span>' +
  69603. __e( o.__('Not anonymous') ) +
  69604. '</li>\n';
  69605. } ;
  69606. __p += '\n';
  69607. if (o.semianonymous) { ;
  69608. __p += '\n<li class="feature" title="' +
  69609. __e( o.__('Only moderators can see your XMPP username') ) +
  69610. '"><span class="fa fa-user-secret"></span>' +
  69611. __e( o.__('Semi-anonymous') ) +
  69612. '</li>\n';
  69613. } ;
  69614. __p += '\n';
  69615. if (o.moderated) { ;
  69616. __p += '\n<li class="feature" title="' +
  69617. __e( o.__('Participants entering this groupchat need to request permission to write') ) +
  69618. '"><span class="fa fa-gavel"></span>' +
  69619. __e( o.__('Moderated') ) +
  69620. '</li>\n';
  69621. } ;
  69622. __p += '\n';
  69623. if (o.unmoderated) { ;
  69624. __p += '\n<li class="feature" title="' +
  69625. __e( o.__('Participants entering this groupchat can write right away') ) +
  69626. '"><span class="fa fa-info-circle"></span>' +
  69627. __e( o.__('Not moderated') ) +
  69628. '</li>\n';
  69629. } ;
  69630. __p += '\n';
  69631. if (o.mam_enabled) { ;
  69632. __p += '\n<li class="feature" title="' +
  69633. __e( o.__('Messages are archived on the server') ) +
  69634. '"><span class="fa fa-database"></span>' +
  69635. __e( o.__('Message archiving') ) +
  69636. '</li>\n';
  69637. } ;
  69638. __p += '\n</ul>\n';
  69639. return __p
  69640. };
  69641. /***/ }),
  69642. /***/ "./src/templates/chatroom_form.html":
  69643. /*!******************************************!*\
  69644. !*** ./src/templates/chatroom_form.html ***!
  69645. \******************************************/
  69646. /*! no static exports found */
  69647. /***/ (function(module, exports, __webpack_require__) {
  69648. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69649. module.exports = function(o) {
  69650. var __t, __p = '';
  69651. __p += '<!-- src/templates/chatroom_form.html -->\n<div class="chatroom-form-container">\n <form class="converse-form chatroom-form">\n <fieldset class="form-group">\n <span class="spinner fa fa-spinner centered"/>\n </fieldset>\n </form>\n</div>\n';
  69652. return __p
  69653. };
  69654. /***/ }),
  69655. /***/ "./src/templates/chatroom_head.html":
  69656. /*!******************************************!*\
  69657. !*** ./src/templates/chatroom_head.html ***!
  69658. \******************************************/
  69659. /*! no static exports found */
  69660. /***/ (function(module, exports, __webpack_require__) {
  69661. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69662. module.exports = function(o) {
  69663. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  69664. function print() { __p += __j.call(arguments, '') }
  69665. __p += '<!-- src/templates/chatroom_head.html -->\n<div class="chatbox-navback"><i class="fa fa-arrow-left"></i></div>\n<div class="chatbox-title">\n <div class="chat-title" title="' +
  69666. __e(o.jid) +
  69667. '">\n ';
  69668. if (o.name && o.name !== o.Strophe.getNodeFromJid(o.jid)) { ;
  69669. __p += '\n ' +
  69670. __e( o.name ) +
  69671. '\n ';
  69672. } else { ;
  69673. __p += '\n ' +
  69674. __e( o.Strophe.getNodeFromJid(o.jid) ) +
  69675. '@' +
  69676. __e( o.Strophe.getDomainFromJid(o.jid) ) +
  69677. '\n ';
  69678. } ;
  69679. __p += '\n </div>\n <!-- Sanitized in converse-muc-views. We want to render links. -->\n <p class="chatroom-description">' +
  69680. ((__t = (o.description)) == null ? '' : __t) +
  69681. '</p>\n</div>\n<div class="chatbox-buttons row no-gutters">\n <a class="chatbox-btn close-chatbox-button fa fa-sign-out-alt" title="' +
  69682. __e(o.info_close) +
  69683. '"></a>\n ';
  69684. if (o.affiliation == 'owner') { ;
  69685. __p += '\n <a class="chatbox-btn configure-chatroom-button fa fa-wrench" title="' +
  69686. __e(o.info_configure) +
  69687. ' "></a>\n ';
  69688. } ;
  69689. __p += '\n <a class="chatbox-btn show-room-details-modal fa fa-info-circle" title="' +
  69690. __e(o.info_details) +
  69691. '"></a>\n</div>\n';
  69692. return __p
  69693. };
  69694. /***/ }),
  69695. /***/ "./src/templates/chatroom_invite.html":
  69696. /*!********************************************!*\
  69697. !*** ./src/templates/chatroom_invite.html ***!
  69698. \********************************************/
  69699. /*! no static exports found */
  69700. /***/ (function(module, exports, __webpack_require__) {
  69701. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69702. module.exports = function(o) {
  69703. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  69704. function print() { __p += __j.call(arguments, '') }
  69705. __p += '<!-- src/templates/chatroom_invite.html -->\n<form class="room-invite">\n ';
  69706. if (o.error_message) { ;
  69707. __p += '\n <span class="error">' +
  69708. __e(o.error_message) +
  69709. '</span>\n ';
  69710. } ;
  69711. __p += '\n <input class="form-control invited-contact" placeholder="' +
  69712. __e(o.label_invitation) +
  69713. '" type="text"/>\n</form>\n';
  69714. return __p
  69715. };
  69716. /***/ }),
  69717. /***/ "./src/templates/chatroom_nickname_form.html":
  69718. /*!***************************************************!*\
  69719. !*** ./src/templates/chatroom_nickname_form.html ***!
  69720. \***************************************************/
  69721. /*! no static exports found */
  69722. /***/ (function(module, exports, __webpack_require__) {
  69723. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69724. module.exports = function(o) {
  69725. var __t, __p = '', __e = _.escape;
  69726. __p += '<!-- src/templates/chatroom_nickname_form.html -->\n<div class="chatroom-form-container">\n <form class="converse-form chatroom-form converse-centered-form">\n <fieldset class="form-group">\n <label>' +
  69727. __e(o.heading) +
  69728. '</label>\n <p class="validation-message">' +
  69729. __e(o.validation_message) +
  69730. '</p>\n <input type="text" required="required" name="nick" class="form-control" placeholder="' +
  69731. __e(o.label_nickname) +
  69732. '"/>\n </fieldset>\n <input type="submit" class="btn btn-primary" name="join" value="' +
  69733. __e(o.label_join) +
  69734. '"/>\n </form>\n</div>\n';
  69735. return __p
  69736. };
  69737. /***/ }),
  69738. /***/ "./src/templates/chatroom_password_form.html":
  69739. /*!***************************************************!*\
  69740. !*** ./src/templates/chatroom_password_form.html ***!
  69741. \***************************************************/
  69742. /*! no static exports found */
  69743. /***/ (function(module, exports, __webpack_require__) {
  69744. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69745. module.exports = function(o) {
  69746. var __t, __p = '', __e = _.escape;
  69747. __p += '<!-- src/templates/chatroom_password_form.html -->\n<div class="chatroom-form-container">\n <form class="pure-form converse-form chatroom-form">\n <fieldset class="form-group">\n <legend>' +
  69748. __e(o.heading) +
  69749. '</legend>\n <label>' +
  69750. __e(o.label_password) +
  69751. '</label>\n <input type="password" name="password"/>\n </fieldset>\n <input class="btn btn-primary" type="submit" value="' +
  69752. __e(o.label_submit) +
  69753. '"/>\n </form>\n</div>\n';
  69754. return __p
  69755. };
  69756. /***/ }),
  69757. /***/ "./src/templates/chatroom_sidebar.html":
  69758. /*!*********************************************!*\
  69759. !*** ./src/templates/chatroom_sidebar.html ***!
  69760. \*********************************************/
  69761. /*! no static exports found */
  69762. /***/ (function(module, exports, __webpack_require__) {
  69763. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69764. module.exports = function(o) {
  69765. var __t, __p = '', __e = _.escape;
  69766. __p += '<!-- src/templates/chatroom_sidebar.html -->\n<!-- <div class="occupants"> -->\n<div class="occupants-header">\n <i class="hide-occupants fa fa-times"></i>\n <p class="occupants-heading">' +
  69767. __e(o.label_occupants) +
  69768. '</p>\n</div>\n<ul class="occupant-list"></ul>\n<div class="chatroom-features"></div>\n<!-- </div> -->\n';
  69769. return __p
  69770. };
  69771. /***/ }),
  69772. /***/ "./src/templates/chats_panel.html":
  69773. /*!****************************************!*\
  69774. !*** ./src/templates/chats_panel.html ***!
  69775. \****************************************/
  69776. /*! no static exports found */
  69777. /***/ (function(module, exports, __webpack_require__) {
  69778. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69779. module.exports = function(o) {
  69780. var __t, __p = '';
  69781. __p += '<!-- src/templates/chats_panel.html -->\n<a id="toggle-minimized-chats" href="#" class="row no-gutters"></a>\n<div class="flyout minimized-chats-flyout row no-gutters"></div>\n';
  69782. return __p
  69783. };
  69784. /***/ }),
  69785. /***/ "./src/templates/controlbox.html":
  69786. /*!***************************************!*\
  69787. !*** ./src/templates/controlbox.html ***!
  69788. \***************************************/
  69789. /*! no static exports found */
  69790. /***/ (function(module, exports, __webpack_require__) {
  69791. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69792. module.exports = function(o) {
  69793. var __t, __p = '', __j = Array.prototype.join;
  69794. function print() { __p += __j.call(arguments, '') }
  69795. __p += '<!-- src/templates/controlbox.html -->\n<div class="flyout box-flyout">\n <div class="chat-head controlbox-head">\n ';
  69796. if (!o.sticky_controlbox) { ;
  69797. __p += '\n <a class="chatbox-btn close-chatbox-button fa fa-times"></a>\n ';
  69798. } ;
  69799. __p += '\n </div>\n <div class="controlbox-panes"></div>\n</div>\n';
  69800. return __p
  69801. };
  69802. /***/ }),
  69803. /***/ "./src/templates/controlbox_toggle.html":
  69804. /*!**********************************************!*\
  69805. !*** ./src/templates/controlbox_toggle.html ***!
  69806. \**********************************************/
  69807. /*! no static exports found */
  69808. /***/ (function(module, exports, __webpack_require__) {
  69809. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69810. module.exports = function(o) {
  69811. var __t, __p = '', __e = _.escape;
  69812. __p += '<!-- src/templates/controlbox_toggle.html -->\n<span class="toggle-feedback">' +
  69813. __e(o.label_toggle) +
  69814. '</span>\n';
  69815. return __p
  69816. };
  69817. /***/ }),
  69818. /***/ "./src/templates/converse_brand_heading.html":
  69819. /*!***************************************************!*\
  69820. !*** ./src/templates/converse_brand_heading.html ***!
  69821. \***************************************************/
  69822. /*! no static exports found */
  69823. /***/ (function(module, exports, __webpack_require__) {
  69824. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69825. module.exports = function(o) {
  69826. var __t, __p = '';
  69827. __p += '<!-- src/templates/converse_brand_heading.html -->\n<span class="brand-heading-container">\n <div class="brand-heading">\n <a href="https://conversejs.org" target="_blank" rel="noopener">\n <i class="icon-conversejs"></i><span class="brand-name">converse</span>\n </a>\n </div>\n</span>\n';
  69828. return __p
  69829. };
  69830. /***/ }),
  69831. /***/ "./src/templates/csn.html":
  69832. /*!********************************!*\
  69833. !*** ./src/templates/csn.html ***!
  69834. \********************************/
  69835. /*! no static exports found */
  69836. /***/ (function(module, exports, __webpack_require__) {
  69837. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69838. module.exports = function(o) {
  69839. var __t, __p = '', __e = _.escape;
  69840. __p += '<!-- src/templates/csn.html -->\n<div class="message chat-info chat-state-notification"\n data-isodate="' +
  69841. __e(o.isodate) +
  69842. '"\n data-csn="' +
  69843. __e(o.from) +
  69844. '">' +
  69845. __e(o.message) +
  69846. '</div>\n';
  69847. return __p
  69848. };
  69849. /***/ }),
  69850. /***/ "./src/templates/dragresize.html":
  69851. /*!***************************************!*\
  69852. !*** ./src/templates/dragresize.html ***!
  69853. \***************************************/
  69854. /*! no static exports found */
  69855. /***/ (function(module, exports, __webpack_require__) {
  69856. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69857. module.exports = function(o) {
  69858. var __t, __p = '';
  69859. __p += '<!-- src/templates/dragresize.html -->\n<div class="dragresize dragresize-top"></div>\n<div class="dragresize dragresize-topleft"></div>\n<div class="dragresize dragresize-left"></div>\n';
  69860. return __p
  69861. };
  69862. /***/ }),
  69863. /***/ "./src/templates/emojis.html":
  69864. /*!***********************************!*\
  69865. !*** ./src/templates/emojis.html ***!
  69866. \***********************************/
  69867. /*! no static exports found */
  69868. /***/ (function(module, exports, __webpack_require__) {
  69869. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69870. module.exports = function(o) {
  69871. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  69872. function print() { __p += __j.call(arguments, '') }
  69873. __p += '<!-- src/templates/emojis.html -->\n<div class="emoji-picker-container">\n';
  69874. o._.forEach(o.emojis_by_category, function (obj, category) { ;
  69875. __p += '\n <ul class="emoji-picker emoji-picker-' +
  69876. __e(category) +
  69877. ' ';
  69878. if (o.current_category !== category) { ;
  69879. __p += ' hidden ';
  69880. } ;
  69881. __p += '">\n ';
  69882. o._.forEach(o.emojis_by_category[category], function (emoji) { ;
  69883. __p += '\n <li class="emoji insert-emoji ';
  69884. if (o.shouldBeHidden(emoji._shortname, o.current_skintone, o.toned_emojis)) { ;
  69885. __p += ' hidden ';
  69886. }; ;
  69887. __p += '"\n data-emoji="' +
  69888. __e(emoji._shortname) +
  69889. '">\n <a href="#" data-emoji="' +
  69890. __e(emoji._shortname) +
  69891. '"> ' +
  69892. ((__t = ( o.transform(emoji._shortname) )) == null ? '' : __t) +
  69893. ' </a>\n </li>\n ';
  69894. }); ;
  69895. __p += '\n </ul>\n';
  69896. }); ;
  69897. __p += '\n<ul class="emoji-toolbar">\n <li class="emoji-category-picker">\n <ul>\n ';
  69898. o._.forEach(o.emojis_by_category, function (obj, category) { ;
  69899. __p += '\n <li data-category="' +
  69900. __e(category) +
  69901. '" class="emoji-category ';
  69902. if (o.current_category === category) { ;
  69903. __p += ' picked ';
  69904. } ;
  69905. __p += '">\n <a class="pick-category" href="#" data-category="' +
  69906. __e(category) +
  69907. '"> ' +
  69908. ((__t = ( o.transform(o.emojis_by_category[category][0]._shortname) )) == null ? '' : __t) +
  69909. ' </a>\n </li>\n ';
  69910. }); ;
  69911. __p += '\n </ul>\n </li>\n <li class="emoji-skintone-picker">\n <ul>\n ';
  69912. o._.forEach(o.skintones, function (skintone) { ;
  69913. __p += '\n <li data-skintone="' +
  69914. __e(skintone) +
  69915. '" class="emoji-skintone ';
  69916. if (o.current_skintone === skintone) { ;
  69917. __p += ' picked ';
  69918. } ;
  69919. __p += '">\n <a class="pick-skintone" href="#" data-skintone="' +
  69920. __e(skintone) +
  69921. '"> ' +
  69922. ((__t = ( o.transform(':'+skintone+':') )) == null ? '' : __t) +
  69923. ' </a>\n </li>\n ';
  69924. }); ;
  69925. __p += '\n </ul>\n </li>\n</ul>\n</div>\n';
  69926. return __p
  69927. };
  69928. /***/ }),
  69929. /***/ "./src/templates/error_message.html":
  69930. /*!******************************************!*\
  69931. !*** ./src/templates/error_message.html ***!
  69932. \******************************************/
  69933. /*! no static exports found */
  69934. /***/ (function(module, exports, __webpack_require__) {
  69935. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69936. module.exports = function(o) {
  69937. var __t, __p = '', __e = _.escape;
  69938. __p += '<!-- src/templates/error_message.html -->\n<div class="message chat-info chat-error" data-isodate="' +
  69939. __e(o.isodate) +
  69940. '">' +
  69941. __e(o.message) +
  69942. '</div>\n';
  69943. return __p
  69944. };
  69945. /***/ }),
  69946. /***/ "./src/templates/field.html":
  69947. /*!**********************************!*\
  69948. !*** ./src/templates/field.html ***!
  69949. \**********************************/
  69950. /*! no static exports found */
  69951. /***/ (function(module, exports, __webpack_require__) {
  69952. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69953. module.exports = function(o) {
  69954. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  69955. function print() { __p += __j.call(arguments, '') }
  69956. __p += '<!-- src/templates/field.html -->\n<field var="' +
  69957. __e(o.name) +
  69958. '">\n';
  69959. if (o.value.constructor === Array) { ;
  69960. __p += '\n ';
  69961. o.value.forEach(function (arrayValue) { ;
  69962. __p += '<value>' +
  69963. __e(arrayValue) +
  69964. '</value>';
  69965. }); ;
  69966. __p += '\n';
  69967. } else { ;
  69968. __p += '\n <value>' +
  69969. __e(o.value) +
  69970. '</value>\n';
  69971. } ;
  69972. __p += '</field>\n';
  69973. return __p
  69974. };
  69975. /***/ }),
  69976. /***/ "./src/templates/file.html":
  69977. /*!*********************************!*\
  69978. !*** ./src/templates/file.html ***!
  69979. \*********************************/
  69980. /*! no static exports found */
  69981. /***/ (function(module, exports, __webpack_require__) {
  69982. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  69983. module.exports = function(o) {
  69984. var __t, __p = '', __e = _.escape;
  69985. __p += '<!-- src/templates/file.html -->\n<a target="_blank" rel="noopener" href="' +
  69986. __e(o.url) +
  69987. '">' +
  69988. __e(o.label_download) +
  69989. '</a>\n';
  69990. return __p
  69991. };
  69992. /***/ }),
  69993. /***/ "./src/templates/file_progress.html":
  69994. /*!******************************************!*\
  69995. !*** ./src/templates/file_progress.html ***!
  69996. \******************************************/
  69997. /*! no static exports found */
  69998. /***/ (function(module, exports, __webpack_require__) {
  69999. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70000. module.exports = function(o) {
  70001. var __t, __p = '', __e = _.escape;
  70002. __p += '<!-- src/templates/file_progress.html -->\n<div class="message chat-msg" data-isodate="' +
  70003. __e(o.time) +
  70004. '" data-msgid="' +
  70005. __e(o.msgid) +
  70006. '">\n <canvas class="avatar chat-msg__avatar" height="36" width="36"></canvas>\n <div class="chat-msg__content">\n <span class="chat-msg__text">Uploading file: <strong>' +
  70007. __e(o.file.name) +
  70008. '</strong>, ' +
  70009. __e(o.filesize) +
  70010. '</span>\n <progress value="' +
  70011. __e(o.progress) +
  70012. '"/>\n </div>\n</div>\n';
  70013. return __p
  70014. };
  70015. /***/ }),
  70016. /***/ "./src/templates/form_captcha.html":
  70017. /*!*****************************************!*\
  70018. !*** ./src/templates/form_captcha.html ***!
  70019. \*****************************************/
  70020. /*! no static exports found */
  70021. /***/ (function(module, exports, __webpack_require__) {
  70022. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70023. module.exports = function(o) {
  70024. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  70025. function print() { __p += __j.call(arguments, '') }
  70026. __p += '<!-- src/templates/form_captcha.html -->\n';
  70027. if (o.label) { ;
  70028. __p += '\n<label>\n ' +
  70029. __e(o.label) +
  70030. '\n</label>\n';
  70031. } ;
  70032. __p += '\n<img src="data:' +
  70033. __e(o.type) +
  70034. ';base64,' +
  70035. __e(o.data) +
  70036. '">\n<input name="' +
  70037. __e(o.name) +
  70038. '" type="text" ';
  70039. if (o.required) { ;
  70040. __p += ' class="required" ';
  70041. } ;
  70042. __p += ' >\n\n\n';
  70043. return __p
  70044. };
  70045. /***/ }),
  70046. /***/ "./src/templates/form_checkbox.html":
  70047. /*!******************************************!*\
  70048. !*** ./src/templates/form_checkbox.html ***!
  70049. \******************************************/
  70050. /*! no static exports found */
  70051. /***/ (function(module, exports, __webpack_require__) {
  70052. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70053. module.exports = function(o) {
  70054. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  70055. function print() { __p += __j.call(arguments, '') }
  70056. __p += '<!-- src/templates/form_checkbox.html -->\n<div class="form-group">\n <input id="' +
  70057. __e(o.id) +
  70058. '" name="' +
  70059. __e(o.name) +
  70060. '" type="checkbox" ' +
  70061. __e(o.checked) +
  70062. ' ';
  70063. if (o.required) { ;
  70064. __p += ' required ';
  70065. } ;
  70066. __p += ' >\n <label class="form-check-label" for="' +
  70067. __e(o.id) +
  70068. '">' +
  70069. __e(o.label) +
  70070. '</label>\n</div>\n';
  70071. return __p
  70072. };
  70073. /***/ }),
  70074. /***/ "./src/templates/form_input.html":
  70075. /*!***************************************!*\
  70076. !*** ./src/templates/form_input.html ***!
  70077. \***************************************/
  70078. /*! no static exports found */
  70079. /***/ (function(module, exports, __webpack_require__) {
  70080. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70081. module.exports = function(o) {
  70082. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  70083. function print() { __p += __j.call(arguments, '') }
  70084. __p += '<!-- src/templates/form_input.html -->\n<div class="form-group">\n ';
  70085. if (o.type !== 'hidden') { ;
  70086. __p += '\n <label for="' +
  70087. __e(o.id) +
  70088. '">' +
  70089. __e(o.label) +
  70090. '</label>\n ';
  70091. } ;
  70092. __p += '\n <input class="form-control" name="' +
  70093. __e(o.name) +
  70094. '" type="' +
  70095. __e(o.type) +
  70096. '" id="' +
  70097. __e(o.id) +
  70098. '"\n ';
  70099. if (o.placeholder) { ;
  70100. __p += ' placeholder="' +
  70101. __e(o.placeholder) +
  70102. '" ';
  70103. } ;
  70104. __p += '\n ';
  70105. if (o.value) { ;
  70106. __p += ' value="' +
  70107. __e(o.value) +
  70108. '" ';
  70109. } ;
  70110. __p += '\n ';
  70111. if (o.required) { ;
  70112. __p += ' required ';
  70113. } ;
  70114. __p += ' >\n</div>\n';
  70115. return __p
  70116. };
  70117. /***/ }),
  70118. /***/ "./src/templates/form_select.html":
  70119. /*!****************************************!*\
  70120. !*** ./src/templates/form_select.html ***!
  70121. \****************************************/
  70122. /*! no static exports found */
  70123. /***/ (function(module, exports, __webpack_require__) {
  70124. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70125. module.exports = function(o) {
  70126. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  70127. function print() { __p += __j.call(arguments, '') }
  70128. __p += '<!-- src/templates/form_select.html -->\n<div class="form-group">\n <label for="' +
  70129. __e(o.id) +
  70130. '">' +
  70131. __e(o.label) +
  70132. '</label>\n <select class="form-control" id="' +
  70133. __e(o.id) +
  70134. '" name="' +
  70135. __e(o.name) +
  70136. '" ';
  70137. if (o.multiple) { ;
  70138. __p += ' multiple="multiple" ';
  70139. } ;
  70140. __p += '>' +
  70141. ((__t = (o.options)) == null ? '' : __t) +
  70142. '</select>\n</div>\n';
  70143. return __p
  70144. };
  70145. /***/ }),
  70146. /***/ "./src/templates/form_textarea.html":
  70147. /*!******************************************!*\
  70148. !*** ./src/templates/form_textarea.html ***!
  70149. \******************************************/
  70150. /*! no static exports found */
  70151. /***/ (function(module, exports, __webpack_require__) {
  70152. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70153. module.exports = function(o) {
  70154. var __t, __p = '', __e = _.escape;
  70155. __p += '<!-- src/templates/form_textarea.html -->\n<label class="label-ta">' +
  70156. __e(o.label) +
  70157. '</label>\n<textarea name="' +
  70158. __e(o.name) +
  70159. '">' +
  70160. __e(o.value) +
  70161. '</textarea>\n';
  70162. return __p
  70163. };
  70164. /***/ }),
  70165. /***/ "./src/templates/form_url.html":
  70166. /*!*************************************!*\
  70167. !*** ./src/templates/form_url.html ***!
  70168. \*************************************/
  70169. /*! no static exports found */
  70170. /***/ (function(module, exports, __webpack_require__) {
  70171. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70172. module.exports = function(o) {
  70173. var __t, __p = '', __e = _.escape;
  70174. __p += '<!-- src/templates/form_url.html -->\n<label>\n ' +
  70175. __e(o.label) +
  70176. '\n <a class="form-url" target="_blank" rel="noopener" href="' +
  70177. __e(o.value) +
  70178. '">' +
  70179. __e(o.value) +
  70180. '</a>\n</label>\n';
  70181. return __p
  70182. };
  70183. /***/ }),
  70184. /***/ "./src/templates/form_username.html":
  70185. /*!******************************************!*\
  70186. !*** ./src/templates/form_username.html ***!
  70187. \******************************************/
  70188. /*! no static exports found */
  70189. /***/ (function(module, exports, __webpack_require__) {
  70190. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70191. module.exports = function(o) {
  70192. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  70193. function print() { __p += __j.call(arguments, '') }
  70194. __p += '<!-- src/templates/form_username.html -->\n<div class="form-group">\n ';
  70195. if (o.label) { ;
  70196. __p += '\n <label>\n ' +
  70197. __e(o.label) +
  70198. '\n </label>\n ';
  70199. } ;
  70200. __p += '\n <div class="input-group">\n <div class="input-group-prepend">\n <input name="' +
  70201. __e(o.name) +
  70202. '" type="' +
  70203. __e(o.type) +
  70204. '"\n ';
  70205. if (o.value) { ;
  70206. __p += ' value="' +
  70207. __e(o.value) +
  70208. '" ';
  70209. } ;
  70210. __p += '\n ';
  70211. if (o.required) { ;
  70212. __p += ' class="required" ';
  70213. } ;
  70214. __p += ' />\n <div class="input-group-text col" title="' +
  70215. __e(o.domain) +
  70216. '">' +
  70217. __e(o.domain) +
  70218. '</div>\n </div>\n </div>\n</div>\n';
  70219. return __p
  70220. };
  70221. /***/ }),
  70222. /***/ "./src/templates/group_header.html":
  70223. /*!*****************************************!*\
  70224. !*** ./src/templates/group_header.html ***!
  70225. \*****************************************/
  70226. /*! no static exports found */
  70227. /***/ (function(module, exports, __webpack_require__) {
  70228. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70229. module.exports = function(o) {
  70230. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  70231. function print() { __p += __j.call(arguments, '') }
  70232. __p += '<!-- src/templates/group_header.html -->\n<a href="#" class="group-toggle controlbox-padded" title="' +
  70233. __e(o.desc_group_toggle) +
  70234. '">\n <span class="fa ';
  70235. if (o.toggle_state === o._converse.OPENED) { ;
  70236. __p += ' fa-caret-down ';
  70237. } else { ;
  70238. __p += ' fa-caret-right ';
  70239. } ;
  70240. __p += '">\n </span> ' +
  70241. __e(o.label_group) +
  70242. '</a>\n<ul class="items-list roster-group-contacts ';
  70243. if (o.toggle_state === o._converse.CLOSED) { ;
  70244. __p += ' collapsed ';
  70245. } ;
  70246. __p += '"></ul>\n';
  70247. return __p
  70248. };
  70249. /***/ }),
  70250. /***/ "./src/templates/help_message.html":
  70251. /*!*****************************************!*\
  70252. !*** ./src/templates/help_message.html ***!
  70253. \*****************************************/
  70254. /*! no static exports found */
  70255. /***/ (function(module, exports, __webpack_require__) {
  70256. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70257. module.exports = function(o) {
  70258. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  70259. function print() { __p += __j.call(arguments, '') }
  70260. __p += '<!-- src/templates/help_message.html -->\n<div class="message chat-info ';
  70261. if (o.type !== 'info') { ;
  70262. __p += ' chat-' +
  70263. __e(o.type) +
  70264. ' ';
  70265. } ;
  70266. __p += '" data-isodate="' +
  70267. __e(o.isodate) +
  70268. '">' +
  70269. ((__t = (o.message)) == null ? '' : __t) +
  70270. '</div>\n';
  70271. return __p
  70272. };
  70273. /***/ }),
  70274. /***/ "./src/templates/image.html":
  70275. /*!**********************************!*\
  70276. !*** ./src/templates/image.html ***!
  70277. \**********************************/
  70278. /*! no static exports found */
  70279. /***/ (function(module, exports, __webpack_require__) {
  70280. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70281. module.exports = function(o) {
  70282. var __t, __p = '', __e = _.escape;
  70283. __p += '<!-- src/templates/image.html -->\n<a href="' +
  70284. __e(o.url) +
  70285. '" target="_blank" rel="noopener"><img class="chat-image img-thumbnail" src="' +
  70286. __e(o.url) +
  70287. '"></a>\n';
  70288. return __p
  70289. };
  70290. /***/ }),
  70291. /***/ "./src/templates/info.html":
  70292. /*!*********************************!*\
  70293. !*** ./src/templates/info.html ***!
  70294. \*********************************/
  70295. /*! no static exports found */
  70296. /***/ (function(module, exports, __webpack_require__) {
  70297. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70298. module.exports = function(o) {
  70299. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  70300. function print() { __p += __j.call(arguments, '') }
  70301. __p += '<!-- src/templates/info.html -->\n';
  70302. if (o.render_message) { ;
  70303. __p += '\n <!-- XXX: Should only ever be rendered if the message text has been sanitized already -->\n <div class="message chat-info ' +
  70304. __e(o.extra_classes) +
  70305. '"\n data-isodate="' +
  70306. __e(o.isodate) +
  70307. '" ';
  70308. if (o.data_name) { ;
  70309. __p += ' data-' +
  70310. __e(o.data_name) +
  70311. '="' +
  70312. __e(o.data_value) +
  70313. '"';
  70314. } ;
  70315. __p += '>' +
  70316. ((__t = (o.message)) == null ? '' : __t) +
  70317. '</div>\n';
  70318. } else { ;
  70319. __p += '\n <div class="message chat-info ' +
  70320. __e(o.extra_classes) +
  70321. '"\n data-isodate="' +
  70322. __e(o.isodate) +
  70323. '" ';
  70324. if (o.data_name) { ;
  70325. __p += ' data-' +
  70326. __e(o.data_name) +
  70327. '="' +
  70328. __e(o.data_value) +
  70329. '"';
  70330. } ;
  70331. __p += '>' +
  70332. __e(o.message) +
  70333. '</div>\n';
  70334. } ;
  70335. __p += '\n';
  70336. return __p
  70337. };
  70338. /***/ }),
  70339. /***/ "./src/templates/inverse_brand_heading.html":
  70340. /*!**************************************************!*\
  70341. !*** ./src/templates/inverse_brand_heading.html ***!
  70342. \**************************************************/
  70343. /*! no static exports found */
  70344. /***/ (function(module, exports, __webpack_require__) {
  70345. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70346. module.exports = function(o) {
  70347. var __t, __p = '';
  70348. __p += '<!-- src/templates/inverse_brand_heading.html -->\n<div class="row">\n <div class="container brand-heading-container">\n <h1 class="brand-heading"><i class="icon-conversejs"></i>Converse</h1>\n <p class="brand-subtitle"><a target="_blank" rel="nofollow" href="https://conversejs.org">Open Source</a> XMPP chat client brought to you by <a target="_blank" rel="nofollow" href="https://opkode.com">Opkode</a> </p>\n <p class="brand-subtitle"><a target="_blank" rel="nofollow" href="https://hosted.weblate.org/projects/conversejs/#languages">Translate</a> it into your own language</p>\n <div>\n</div>\n';
  70349. return __p
  70350. };
  70351. /***/ }),
  70352. /***/ "./src/templates/list_chatrooms_modal.html":
  70353. /*!*************************************************!*\
  70354. !*** ./src/templates/list_chatrooms_modal.html ***!
  70355. \*************************************************/
  70356. /*! no static exports found */
  70357. /***/ (function(module, exports, __webpack_require__) {
  70358. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70359. module.exports = function(o) {
  70360. var __t, __p = '', __e = _.escape;
  70361. __p += '<!-- src/templates/list_chatrooms_modal.html -->\n<div class="modal fade" id="list-chatrooms-modal" tabindex="-1" role="dialog" aria-labelledby="list-chatrooms-modal-label" aria-hidden="true">\n <div class="modal-dialog" role="document">\n <div class="modal-content">\n <div class="modal-header">\n <h5 class="modal-title"\n id="list-chatrooms-modal-label">' +
  70362. __e(o.heading_list_chatrooms) +
  70363. '</h5>\n <button type="button" class="close" data-dismiss="modal" aria-label="Close">\n <span aria-hidden="true">&times;</span>\n </button>\n </div>\n <div class="modal-body">\n <form class="converse-form list-chatrooms">\n <div class="form-group">\n <label for="chatroom">' +
  70364. __e(o.label_server_address) +
  70365. ':</label>\n <input type="text" value="' +
  70366. __e(o.muc_domain) +
  70367. '" required="required" name="server" class="form-control" placeholder="' +
  70368. __e(o.server_placeholder) +
  70369. '">\n </div>\n <input type="submit" class="btn btn-primary" name="join" value="' +
  70370. __e(o.label_query) +
  70371. '">\n </form>\n <ul class="available-chatrooms list-group"></ul>\n </div>\n </div>\n </div>\n</div>\n';
  70372. return __p
  70373. };
  70374. /***/ }),
  70375. /***/ "./src/templates/login_panel.html":
  70376. /*!****************************************!*\
  70377. !*** ./src/templates/login_panel.html ***!
  70378. \****************************************/
  70379. /*! no static exports found */
  70380. /***/ (function(module, exports, __webpack_require__) {
  70381. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70382. module.exports = function(o) {
  70383. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  70384. function print() { __p += __j.call(arguments, '') }
  70385. __p += '<!-- src/templates/login_panel.html -->\n<div id="converse-login-panel" class="controlbox-pane fade-in row no-gutters">\n <form id="converse-login" class="converse-form" method="post">\n <div class="conn-feedback fade-in ';
  70386. if (!o.conn_feedback_subject) { ;
  70387. __p += ' hidden ';
  70388. } ;
  70389. __p += ' ' +
  70390. __e(o.conn_feedback_class) +
  70391. '">\n <p class="feedback-subject">' +
  70392. __e( o.conn_feedback_subject ) +
  70393. '</p>\n <p class="feedback-message ';
  70394. if (!o.conn_feedback_message) { ;
  70395. __p += ' hidden ';
  70396. } ;
  70397. __p += '">' +
  70398. __e(o.conn_feedback_message) +
  70399. '</p>\n </div>\n ';
  70400. if (o.auto_login || o._converse.CONNECTION_STATUS[o.connection_status] === 'CONNECTING') { ;
  70401. __p += '\n <span class="spinner fa fa-spinner centered"/>\n ';
  70402. } else { ;
  70403. __p += '\n ';
  70404. if (o.authentication == o.LOGIN || o.authentication == o.EXTERNAL) { ;
  70405. __p += '\n <div class="form-group">\n <label for="converse-login-jid">' +
  70406. __e(o.__("XMPP Username:")) +
  70407. '</label>\n <input id="converse-login-jid" class="form-control" autofocus required="required" type="text" name="jid" placeholder="' +
  70408. __e(o.placeholder_username) +
  70409. '">\n </div>\n ';
  70410. if (o.authentication !== o.EXTERNAL) { ;
  70411. __p += '\n <div class="form-group">\n <label for="converse-login-password">' +
  70412. __e(o.__("Password:")) +
  70413. '</label>\n <input id="converse-login-password" class="form-control" required="required" type="password" name="password" placeholder="' +
  70414. __e(o.__('password')) +
  70415. '">\n </div>\n ';
  70416. } ;
  70417. __p += '\n <div class="form-group form-check login-trusted">\n <input id="converse-login-trusted" type="checkbox" class="form-check-input" name="trusted" ';
  70418. if (o._converse.config.get('trusted')) { ;
  70419. __p += ' checked="checked" ';
  70420. } ;
  70421. __p += '>\n <label for="converse-login-trusted" class="form-check-label login-trusted__desc">' +
  70422. __e(o.__('This is a trusted device')) +
  70423. '</label>\n <i class="fa fa-info-circle" data-toggle="popover"\n data-title="Trusted device?"\n data-content="' +
  70424. __e(o.__('To improve performance, we cache your data in this browser. Uncheck this box if this is a public computer or if you want your data to be deleted when you log out. It\'s important that you explicitly log out, otherwise not all cached data might be deleted.')) +
  70425. '"></i>\n </div>\n\n <fieldset class="buttons">\n <input class="btn btn-primary" type="submit" value="' +
  70426. __e(o.__('Log in')) +
  70427. '">\n </fieldset>\n ';
  70428. } ;
  70429. __p += '\n ';
  70430. if (o.authentication == o.ANONYMOUS) { ;
  70431. __p += '\n <input class="btn btn-primary login-anon" type="submit" value="' +
  70432. __e(o.__('Click here to log in anonymously')) +
  70433. '"/>\n ';
  70434. } ;
  70435. __p += '\n ';
  70436. if (o.authentication == o.PREBIND) { ;
  70437. __p += '\n <p>Disconnected.</p>\n ';
  70438. } ;
  70439. __p += '\n ';
  70440. } ;
  70441. __p += '\n </form>\n</div>\n';
  70442. return __p
  70443. };
  70444. /***/ }),
  70445. /***/ "./src/templates/message.html":
  70446. /*!************************************!*\
  70447. !*** ./src/templates/message.html ***!
  70448. \************************************/
  70449. /*! no static exports found */
  70450. /***/ (function(module, exports, __webpack_require__) {
  70451. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70452. module.exports = function(o) {
  70453. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  70454. function print() { __p += __j.call(arguments, '') }
  70455. __p += '<!-- src/templates/message.html -->\n<div class="message chat-msg ' +
  70456. __e(o.type) +
  70457. ' ';
  70458. if (o.is_me_message) { ;
  70459. __p += ' chat-msg--action ';
  70460. } ;
  70461. __p += ' ' +
  70462. __e(o.extra_classes) +
  70463. '"\n data-isodate="' +
  70464. __e(o.time) +
  70465. '" data-msgid="' +
  70466. __e(o.msgid) +
  70467. '" data-from="' +
  70468. __e(o.from) +
  70469. '" data-encrypted="' +
  70470. __e(o.is_encrypted) +
  70471. '">\n ';
  70472. if (o.type !== 'headline' && !o.is_me_message) { ;
  70473. __p += '\n <canvas class="avatar chat-msg__avatar" height="36" width="36"></canvas>\n ';
  70474. } ;
  70475. __p += '\n <div class="chat-msg__content ';
  70476. if (o.is_me_message) { ;
  70477. __p += 'chat-msg__content--action';
  70478. } ;
  70479. __p += '">\n <span class="chat-msg__heading">\n ';
  70480. if (o.is_me_message) { ;
  70481. __p += '<time timestamp="' +
  70482. __e(o.isodate) +
  70483. '" class="chat-msg__time">' +
  70484. __e(o.pretty_time) +
  70485. '</time>';
  70486. } ;
  70487. __p += '\n <span class="chat-msg__author">';
  70488. if (o.is_me_message) { ;
  70489. __p += '**';
  70490. }; ;
  70491. __p +=
  70492. __e(o.username) +
  70493. '</span>\n ';
  70494. o.roles.forEach(function (role) { ;
  70495. __p += ' <span class="badge badge-secondary">' +
  70496. __e(role) +
  70497. '</span> ';
  70498. }); ;
  70499. __p += '\n ';
  70500. if (!o.is_me_message) { ;
  70501. __p += '<time timestamp="' +
  70502. __e(o.isodate) +
  70503. '" class="chat-msg__time">' +
  70504. __e(o.pretty_time) +
  70505. '</time>';
  70506. } ;
  70507. __p += '\n ';
  70508. if (o.is_encrypted) { ;
  70509. __p += '<span class="fa fa-lock"></span>';
  70510. } ;
  70511. __p += '\n </span>\n ';
  70512. if (!o.is_me_message) { ;
  70513. __p += '<div class="chat-msg__body">';
  70514. } ;
  70515. __p += '\n ';
  70516. if (o.edited) { ;
  70517. __p += ' <i title="' +
  70518. __e(o.__('This message has been edited')) +
  70519. '" class="fa fa-edit chat-msg__edit-modal"></i> ';
  70520. } ;
  70521. __p += '\n ';
  70522. if (!o.is_me_message) { ;
  70523. __p += '<div class="chat-msg__message">';
  70524. } ;
  70525. __p += '\n ';
  70526. if (o.is_spoiler) { ;
  70527. __p += '\n <div class="chat-msg__spoiler-hint">\n <span class="spoiler-hint">' +
  70528. __e(o.spoiler_hint) +
  70529. '</span>\n <a class="badge badge-info spoiler-toggle" data-toggle-state="closed" href="#"><i class="fa fa-eye"></i>' +
  70530. __e(o.label_show) +
  70531. '</a>\n </div>\n ';
  70532. } ;
  70533. __p += '\n <div class="chat-msg__text';
  70534. if (o.is_spoiler) { ;
  70535. __p += ' spoiler collapsed';
  70536. } ;
  70537. __p += '"><!-- message gets added here via renderMessage --></div>\n <div class="chat-msg__media"></div>\n ';
  70538. if (!o.is_me_message) { ;
  70539. __p += '</div>';
  70540. } ;
  70541. __p += '\n ';
  70542. if (o.type !== 'headline' && !o.is_me_message && o.sender === 'me') { ;
  70543. __p += '\n <div class="chat-msg__actions">\n <button class="chat-msg__action chat-msg__action-edit fa fa-pencil-alt" title="' +
  70544. __e(o.__('Edit this message')) +
  70545. '">&nbsp;</button>\n </div>\n ';
  70546. } ;
  70547. __p += '\n\n ';
  70548. if (!o.is_me_message) { ;
  70549. __p += '</div>';
  70550. } ;
  70551. __p += '\n </div>\n</div>\n';
  70552. return __p
  70553. };
  70554. /***/ }),
  70555. /***/ "./src/templates/message_versions_modal.html":
  70556. /*!***************************************************!*\
  70557. !*** ./src/templates/message_versions_modal.html ***!
  70558. \***************************************************/
  70559. /*! no static exports found */
  70560. /***/ (function(module, exports, __webpack_require__) {
  70561. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70562. module.exports = function(o) {
  70563. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  70564. function print() { __p += __j.call(arguments, '') }
  70565. __p += '<!-- src/templates/message_versions_modal.html -->\n<div class="modal fade" id="message-versions-modal" tabindex="-1" role="dialog" aria-labelledby="message-versions-modal-label" aria-hidden="true">\n <div class="modal-dialog" role="document">\n <div class="modal-content">\n <div class="modal-header">\n <h4 class="modal-title" id="message-versions-modal-label">' +
  70566. __e(o.__('Message versions')) +
  70567. '</h4>\n <button type="button" class="close" data-dismiss="modal" aria-label="' +
  70568. __e(o.label_close) +
  70569. '"><span aria-hidden="true">&times;</span></button>\n </div>\n <div class="modal-body">\n <h4>Older versions</h4>\n ';
  70570. o.older_versions.forEach(function (text) { ;
  70571. __p += ' <p class="older-msg">' +
  70572. __e(text) +
  70573. '</p> ';
  70574. }); ;
  70575. __p += '\n <hr>\n <h4>Current version</h4>\n <p>' +
  70576. __e(o.message) +
  70577. '</p>\n </div>\n <div class="modal-footer">\n <button type="button" class="btn btn-secondary" data-dismiss="modal">' +
  70578. __e(o.__('Close')) +
  70579. '</button>\n </div>\n </div>\n </div>\n</div>\n';
  70580. return __p
  70581. };
  70582. /***/ }),
  70583. /***/ "./src/templates/new_day.html":
  70584. /*!************************************!*\
  70585. !*** ./src/templates/new_day.html ***!
  70586. \************************************/
  70587. /*! no static exports found */
  70588. /***/ (function(module, exports, __webpack_require__) {
  70589. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70590. module.exports = function(o) {
  70591. var __t, __p = '', __e = _.escape;
  70592. __p += '<!-- src/templates/new_day.html -->\n<div class="message date-separator" data-isodate="' +
  70593. __e(o.isodate) +
  70594. '">\n <hr class="separator">\n <time class="separator-text" datetime="' +
  70595. __e(o.isodate) +
  70596. '"><span>' +
  70597. __e(o.datestring) +
  70598. '</span></time>\n</div>\n';
  70599. return __p
  70600. };
  70601. /***/ }),
  70602. /***/ "./src/templates/occupant.html":
  70603. /*!*************************************!*\
  70604. !*** ./src/templates/occupant.html ***!
  70605. \*************************************/
  70606. /*! no static exports found */
  70607. /***/ (function(module, exports, __webpack_require__) {
  70608. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70609. module.exports = function(o) {
  70610. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  70611. function print() { __p += __j.call(arguments, '') }
  70612. __p += '<!-- src/templates/occupant.html -->\n<li class="occupant" id="' +
  70613. __e( o.id ) +
  70614. '"\n ';
  70615. if (o.role === "moderator") { ;
  70616. __p += '\n title="' +
  70617. __e( o.jid ) +
  70618. ' ' +
  70619. __e( o.desc_moderator ) +
  70620. ' ' +
  70621. __e( o.hint_occupant ) +
  70622. '"\n ';
  70623. } ;
  70624. __p += '\n ';
  70625. if (o.role === "participant") { ;
  70626. __p += '\n title="' +
  70627. __e( o.jid ) +
  70628. ' ' +
  70629. __e( o.desc_participant ) +
  70630. ' ' +
  70631. __e( o.hint_occupant ) +
  70632. '"\n ';
  70633. } ;
  70634. __p += '\n ';
  70635. if (o.role === "visitor") { ;
  70636. __p += '\n title="' +
  70637. __e( o.jid ) +
  70638. ' ' +
  70639. __e( o.desc_visitor ) +
  70640. ' ' +
  70641. __e( o.hint_occupant ) +
  70642. '"\n ';
  70643. } ;
  70644. __p += '\n ';
  70645. if (!o._.includes(["visitor", "participant", "moderator"], o.role)) { ;
  70646. __p += '\n title="' +
  70647. __e( o.jid ) +
  70648. ' ' +
  70649. __e( o.hint_occupant ) +
  70650. '"\n ';
  70651. } ;
  70652. __p += '>\n <div class="row no-gutters">\n <div class="col-auto">\n <div class="occupant-status occupant-' +
  70653. __e(o.show) +
  70654. ' circle" title="' +
  70655. __e(o.hint_show) +
  70656. '"></div>\n </div>\n <div class="col">\n <span class="occupant-nick">' +
  70657. __e(o.nick || o.jid) +
  70658. '</span>\n ';
  70659. if (o.affiliation === "owner") { ;
  70660. __p += '\n <span class="badge badge-danger">' +
  70661. __e(o.label_owner) +
  70662. '</span>\n ';
  70663. } ;
  70664. __p += '\n ';
  70665. if (o.affiliation === "admin") { ;
  70666. __p += '\n <span class="badge badge-info">' +
  70667. __e(o.label_admin) +
  70668. '</span>\n ';
  70669. } ;
  70670. __p += '\n ';
  70671. if (o.affiliation === "member") { ;
  70672. __p += '\n <span class="badge badge-info">' +
  70673. __e(o.label_member) +
  70674. '</span>\n ';
  70675. } ;
  70676. __p += '\n\n ';
  70677. if (o.role === "moderator") { ;
  70678. __p += '\n <span class="badge badge-info">' +
  70679. __e(o.label_moderator) +
  70680. '</span>\n ';
  70681. } ;
  70682. __p += '\n ';
  70683. if (o.role === "visitor") { ;
  70684. __p += '\n <span class="badge badge-secondary">' +
  70685. __e(o.label_visitor) +
  70686. '</span>\n ';
  70687. } ;
  70688. __p += '\n </div>\n </div>\n</li>\n';
  70689. return __p
  70690. };
  70691. /***/ }),
  70692. /***/ "./src/templates/pending_contact.html":
  70693. /*!********************************************!*\
  70694. !*** ./src/templates/pending_contact.html ***!
  70695. \********************************************/
  70696. /*! no static exports found */
  70697. /***/ (function(module, exports, __webpack_require__) {
  70698. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70699. module.exports = function(o) {
  70700. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  70701. function print() { __p += __j.call(arguments, '') }
  70702. __p += '<!-- src/templates/pending_contact.html -->\n';
  70703. if (o.allow_chat_pending_contacts) { ;
  70704. __p += '<a class="open-chat w-100" href="#">';
  70705. } ;
  70706. __p += '\n<span class="pending-contact-name w-100" title="JID: ' +
  70707. __e(o.jid) +
  70708. '">' +
  70709. __e(o.display_name) +
  70710. '</span> \n';
  70711. if (o.allow_chat_pending_contacts) { ;
  70712. __p += '</a>';
  70713. } ;
  70714. __p += '\n<a class="remove-xmpp-contact far fa-trash-alt" title="' +
  70715. __e(o.desc_remove) +
  70716. '" href="#"></a>\n';
  70717. return __p
  70718. };
  70719. /***/ }),
  70720. /***/ "./src/templates/profile_modal.html":
  70721. /*!******************************************!*\
  70722. !*** ./src/templates/profile_modal.html ***!
  70723. \******************************************/
  70724. /*! no static exports found */
  70725. /***/ (function(module, exports, __webpack_require__) {
  70726. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70727. module.exports = function(o) {
  70728. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  70729. function print() { __p += __j.call(arguments, '') }
  70730. __p += '<!-- src/templates/profile_modal.html -->\n<div class="modal fade" id="user-profile-modal" tabindex="-1" role="dialog" aria-labelledby="user-profile-modal-label" aria-hidden="true">\n <div class="modal-dialog" role="document">\n <div class="modal-content">\n <div class="modal-header">\n <h5 class="modal-title" id="user-profile-modal-label">' +
  70731. __e(o.heading_profile) +
  70732. '</h5>\n <button type="button" class="close" data-dismiss="modal" aria-label="' +
  70733. __e(o.label_close) +
  70734. '"><span aria-hidden="true">&times;</span></button>\n </div>\n <div class="modal-body">\n ';
  70735. if (o._converse.pluggable.plugins['converse-omemo'].enabled(o._converse)) { ;
  70736. __p += '\n <ul class="nav nav-pills justify-content-center">\n <li role="presentation" class="nav-item">\n <a class="nav-link active" id="profile-tab" href="#profile-tabpanel" aria-controls="profile-tabpanel" role="tab" data-toggle="tab">Profile</a>\n </li>\n <li role="presentation" class="nav-item">\n <a class="nav-link" id="omemo-tab" href="#omemo-tabpanel" aria-controls="omemo-tabpanel" role="tab" data-toggle="tab">OMEMO</a>\n </li>\n </ul>\n ';
  70737. } ;
  70738. __p += '\n <div class="tab-content">\n <div class="tab-pane fade show active" id="profile-tabpanel" role="tabpanel" aria-labelledby="profile-tab">\n <form class="converse-form converse-form--modal profile-form" action="#">\n <div class="row">\n <div class="col-auto">\n <a class="change-avatar" href="#">\n ';
  70739. if (o.image) { ;
  70740. __p += '\n <img alt="' +
  70741. __e(o.alt_avatar) +
  70742. '" class="img-thumbnail avatar align-self-center" height="100px" width="100px" src="data:' +
  70743. __e(o.image_type) +
  70744. ';base64,' +
  70745. __e(o.image) +
  70746. '"/>\n ';
  70747. } ;
  70748. __p += '\n ';
  70749. if (!o.image) { ;
  70750. __p += '\n <canvas class="avatar" height="100px" width="100px"/>\n ';
  70751. } ;
  70752. __p += '\n </a>\n <input class="hidden" name="image" type="file">\n </div>\n <div class="col">\n <div class="form-group">\n <label class="col-form-label">' +
  70753. __e(o.label_jid) +
  70754. ':</label>\n <div>' +
  70755. __e(o.jid) +
  70756. '</div>\n </div>\n </div>\n </div>\n <div class="form-group">\n <label for="vcard-fullname" class="col-form-label">' +
  70757. __e(o.label_fullname) +
  70758. ':</label>\n <input id="vcard-fullname" type="text" class="form-control" name="fn" value="' +
  70759. __e(o.fullname) +
  70760. '">\n </div>\n <div class="form-group">\n <label for="vcard-nickname" class="col-form-label">' +
  70761. __e(o.label_nickname) +
  70762. ':</label>\n <input id="vcard-nickname" type="text" class="form-control" name="nickname" value="' +
  70763. __e(o.nickname) +
  70764. '">\n </div>\n <div class="form-group">\n <label for="vcard-url" class="col-form-label">' +
  70765. __e(o.label_url) +
  70766. ':</label>\n <input id="vcard-url" type="url" class="form-control" name="url" value="' +
  70767. __e(o.url) +
  70768. '">\n </div>\n <div class="form-group">\n <label for="vcard-email" class="col-form-label">' +
  70769. __e(o.label_email) +
  70770. ':</label>\n <input id="vcard-email" type="email" class="form-control" name="email" value="' +
  70771. __e(o.email) +
  70772. '">\n </div>\n <div class="form-group">\n <label for="vcard-role" class="col-form-label">' +
  70773. __e(o.label_role) +
  70774. ':</label>\n <input id="vcard-role" type="text" class="form-control" name="role" value="' +
  70775. __e(o.role) +
  70776. '" aria-describedby="vcard-role-help">\n <small id="vcard-role-help" class="form-text text-muted">' +
  70777. __e(o.label_role_help) +
  70778. '</small>\n </div>\n <hr/>\n <div class="form-group">\n <button type="submit" class="save-form btn btn-primary">' +
  70779. __e(o.__('Save and close')) +
  70780. '</button>\n </div>\n </form>\n </div>\n ';
  70781. if (o._converse.pluggable.plugins['converse-omemo'].enabled(o._converse)) { ;
  70782. __p += '\n <div class="tab-pane fade" id="omemo-tabpanel" role="tabpanel" aria-labelledby="omemo-tab">\n <form class="converse-form fingerprint-removal">\n <ul class="list-group fingerprints">\n <li class="list-group-item active">' +
  70783. __e(o.__("This device's OMEMO fingerprint")) +
  70784. '</li>\n <li class="list-group-item">\n ';
  70785. if (o.view.current_device && o.view.current_device.get('bundle') && o.view.current_device.get('bundle').fingerprint) { ;
  70786. __p += '\n <span class="fingerprint">' +
  70787. __e(o.utils.formatFingerprint(o.view.current_device.get('bundle').fingerprint)) +
  70788. '</span>\n ';
  70789. } else {;
  70790. __p += '\n <span class="spinner fa fa-spinner centered"/>\n ';
  70791. } ;
  70792. __p += '\n </li>\n </ul>\n ';
  70793. if (o.view.other_devices.length) { ;
  70794. __p += '\n <ul class="list-group fingerprints">\n <li class="list-group-item nopadding active">\n <label>\n <input type="checkbox" class="select-all" title="' +
  70795. __e(o.__('Select all')) +
  70796. '"\n aria-label="' +
  70797. __e(o.__('Checkbox to select fingerprints of all other OMEMO devices')) +
  70798. '">\n ' +
  70799. __e(o.__('Other OMEMO-enabled devices')) +
  70800. '\n </label>\n </li>\n ';
  70801. o._.forEach(o.view.other_devices, function (device) { ;
  70802. __p += '\n ';
  70803. if (device.get('bundle') && device.get('bundle').fingerprint) { ;
  70804. __p += '\n <li class="fingerprint-removal-item list-group-item nopadding">\n <label>\n <input type="checkbox" value="' +
  70805. __e(device.get('id')) +
  70806. '"\n aria-label="' +
  70807. __e(o.__('Checkbox for selecting the following fingerprint')) +
  70808. '">\n <span class="fingerprint">' +
  70809. __e(o.utils.formatFingerprint(device.get('bundle').fingerprint)) +
  70810. '</span>\n </label>\n </li>\n ';
  70811. } else {;
  70812. __p += '\n <li class="fingerprint-removal-item list-group-item nopadding">\n <label>\n <input type="checkbox" value="' +
  70813. __e(device.get('id')) +
  70814. '"\n aria-label="' +
  70815. __e(o.__('Checkbox for selecting the following fingerprint')) +
  70816. '">\n <span>' +
  70817. __e(o.__('Device without a fingerprint')) +
  70818. '</span>\n </label>\n </li>\n ';
  70819. } ;
  70820. __p += '\n ';
  70821. }); ;
  70822. __p += '\n </ul>\n <div class="form-group">\n <button type="submit" class="save-form btn btn-primary">' +
  70823. __e(o.__('Remove checked devices and close')) +
  70824. '</button>\n </div>\n ';
  70825. } ;
  70826. __p += '\n </form>\n </div>\n ';
  70827. } ;
  70828. __p += '\n </div>\n </div>\n </div>\n </div>\n</div>\n';
  70829. return __p
  70830. };
  70831. /***/ }),
  70832. /***/ "./src/templates/profile_view.html":
  70833. /*!*****************************************!*\
  70834. !*** ./src/templates/profile_view.html ***!
  70835. \*****************************************/
  70836. /*! no static exports found */
  70837. /***/ (function(module, exports, __webpack_require__) {
  70838. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70839. module.exports = function(o) {
  70840. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  70841. function print() { __p += __j.call(arguments, '') }
  70842. __p += '<!-- src/templates/profile_view.html -->\n<div class="userinfo controlbox-padded">\n<div class="profile d-flex">\n <a class="show-profile" href="#">\n <canvas alt="o.__(\'Your avatar\')" class="avatar align-self-center" height="40" width="40"></canvas>\n </a>\n <span class="username w-100 align-self-center">' +
  70843. __e(o.fullname) +
  70844. '</span>\n <!-- <a class="chatbox-btn fa fa-id-card align-self-center" title="' +
  70845. __e(o.title_your_profile) +
  70846. '" data-toggle="modal" data-target="#userProfileModal"></a> -->\n <!-- <a class="chatbox-btn fa fa-cog align-self-center" title="' +
  70847. __e(o.title_change_status) +
  70848. '" data-toggle="modal" data-target="#settingsModal"></a> -->\n ';
  70849. if (o._converse.allow_logout) { ;
  70850. __p += '\n <a class="chatbox-btn logout fa fa-sign-out-alt align-self-center" title="' +
  70851. __e(o.title_log_out) +
  70852. '"></a>\n ';
  70853. } ;
  70854. __p += '\n</div>\n<div class="d-flex xmpp-status">\n <span class="' +
  70855. __e(o.chat_status) +
  70856. ' w-100 align-self-center" data-value="' +
  70857. __e(o.chat_status) +
  70858. '">\n <span class="\n ';
  70859. if (o.chat_status === 'online') { ;
  70860. __p += ' fa fa-circle ';
  70861. } ;
  70862. __p += '\n ';
  70863. if (o.chat_status === 'dnd') { ;
  70864. __p += ' fa fa-minus-circle ';
  70865. } ;
  70866. __p += '\n ';
  70867. if (o.chat_status === 'away') { ;
  70868. __p += ' fa fa-dot-circle ';
  70869. } ;
  70870. __p += '\n ';
  70871. if (o.chat_status === 'xa') { ;
  70872. __p += ' far fa-circle ';
  70873. } ;
  70874. __p += '\n ';
  70875. if (o.chat_status === 'offline') { ;
  70876. __p += ' fa fa-times-circle ';
  70877. } ;
  70878. __p += '"></span> ' +
  70879. __e(o.status_message) +
  70880. '</span>\n <a class="chatbox-btn change-status fa fa-pencil-alt" title="' +
  70881. __e(o.title_change_status) +
  70882. '" data-toggle="modal" data-target="#changeStatusModal"></a>\n</div>\n</div>\n';
  70883. return __p
  70884. };
  70885. /***/ }),
  70886. /***/ "./src/templates/register_link.html":
  70887. /*!******************************************!*\
  70888. !*** ./src/templates/register_link.html ***!
  70889. \******************************************/
  70890. /*! no static exports found */
  70891. /***/ (function(module, exports, __webpack_require__) {
  70892. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70893. module.exports = function(o) {
  70894. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  70895. function print() { __p += __j.call(arguments, '') }
  70896. __p += '<!-- src/templates/register_link.html -->\n<fieldset class="switch-form">\n ';
  70897. if (!o._converse.auto_login && o._converse.CONNECTION_STATUS[o.connection_status] !== 'CONNECTING') { ;
  70898. __p += '\n <p>' +
  70899. __e( o.__("Don't have a chat account?") ) +
  70900. '</p>\n <p><a class="register-account toggle-register-login" href="#converse/register">' +
  70901. __e(o.__("Create an account")) +
  70902. '</a></p>\n ';
  70903. } ;
  70904. __p += '\n</fieldset>\n';
  70905. return __p
  70906. };
  70907. /***/ }),
  70908. /***/ "./src/templates/register_panel.html":
  70909. /*!*******************************************!*\
  70910. !*** ./src/templates/register_panel.html ***!
  70911. \*******************************************/
  70912. /*! no static exports found */
  70913. /***/ (function(module, exports, __webpack_require__) {
  70914. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70915. module.exports = function(o) {
  70916. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  70917. function print() { __p += __j.call(arguments, '') }
  70918. __p += '<!-- src/templates/register_panel.html -->\n<div class="row">\n <form id="converse-register" class="converse-form">\n <legend class="col-form-label">' +
  70919. __e(o.__("Create your account")) +
  70920. '</legend>\n\n <div class="form-group">\n <label>' +
  70921. __e(o.__("Please enter the XMPP provider to register with:")) +
  70922. '</label>\n <div class="form-errors hidden"></div>\n\n ';
  70923. if (o.default_domain) { ;
  70924. __p += '\n ' +
  70925. __e(o.default_domain) +
  70926. '\n </div>\n ';
  70927. } ;
  70928. __p += '\n ';
  70929. if (!o.default_domain) { ;
  70930. __p += '\n <input class="form-control" autofocus="autofocus" required="required" type="text" name="domain" placeholder="' +
  70931. __e(o.domain_placeholder) +
  70932. '">\n <p class="form-text text-muted">' +
  70933. __e(o.help_providers) +
  70934. ' <a href="' +
  70935. __e(o.href_providers) +
  70936. '" class="url" target="_blank" rel="noopener">' +
  70937. __e(o.help_providers_link) +
  70938. '</a>.</p>\n </div>\n <fieldset class="buttons">\n <input class="btn btn-primary" type="submit" value="' +
  70939. __e(o.label_register) +
  70940. '">\n <div class="switch-form">\n <p>' +
  70941. __e( o.__("Already have a chat account?") ) +
  70942. '</p>\n <p><a class="login-here toggle-register-login" href="#converse/login">' +
  70943. __e(o.__("Log in here")) +
  70944. '</a></p>\n </div>\n </fieldset>\n ';
  70945. } ;
  70946. __p += '\n </div>\n </form>\n</div>\n';
  70947. return __p
  70948. };
  70949. /***/ }),
  70950. /***/ "./src/templates/registration_form.html":
  70951. /*!**********************************************!*\
  70952. !*** ./src/templates/registration_form.html ***!
  70953. \**********************************************/
  70954. /*! no static exports found */
  70955. /***/ (function(module, exports, __webpack_require__) {
  70956. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70957. module.exports = function(o) {
  70958. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  70959. function print() { __p += __j.call(arguments, '') }
  70960. __p += '<!-- src/templates/registration_form.html -->\n<legend class="col-form-label">' +
  70961. __e(o.__("Account Registration:")) +
  70962. ' ' +
  70963. __e(o.domain) +
  70964. '</legend>\n<p class="title">' +
  70965. __e(o.title) +
  70966. '</p>\n<p class="form-help instructions">' +
  70967. __e(o.instructions) +
  70968. '</p>\n<div class="form-errors hidden"></div>\n\n<fieldset class="buttons">\n <input type="submit" class="btn btn-primary" value="' +
  70969. __e(o.__('Register')) +
  70970. '"/>\n ';
  70971. if (!o.registration_domain) { ;
  70972. __p += '\n <input type="button" class="btn btn-secondary button-cancel" value="' +
  70973. __e(o.__('Choose a different provider')) +
  70974. '"/>\n ';
  70975. } ;
  70976. __p += '\n <div class="switch-form">\n <p>' +
  70977. __e( o.__("Already have a chat account?") ) +
  70978. '</p>\n <p><a class="login-here toggle-register-login" href="#converse/login">' +
  70979. __e(o.__("Log in here")) +
  70980. '</a></p>\n </div>\n</fieldset>\n';
  70981. return __p
  70982. };
  70983. /***/ }),
  70984. /***/ "./src/templates/registration_request.html":
  70985. /*!*************************************************!*\
  70986. !*** ./src/templates/registration_request.html ***!
  70987. \*************************************************/
  70988. /*! no static exports found */
  70989. /***/ (function(module, exports, __webpack_require__) {
  70990. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  70991. module.exports = function(o) {
  70992. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  70993. function print() { __p += __j.call(arguments, '') }
  70994. __p += '<!-- src/templates/registration_request.html -->\n<span class="spinner login-submit fa fa-spinner"></span>\n<p class="info">' +
  70995. __e(o.__("Hold tight, we're fetching the registration form…")) +
  70996. '</p>\n';
  70997. if (o.cancel) { ;
  70998. __p += '\n <button class="btn btn-secondary button-cancel hor_centered">' +
  70999. __e(o.__('Cancel')) +
  71000. '</button>\n';
  71001. } ;
  71002. __p += '\n';
  71003. return __p
  71004. };
  71005. /***/ }),
  71006. /***/ "./src/templates/requesting_contact.html":
  71007. /*!***********************************************!*\
  71008. !*** ./src/templates/requesting_contact.html ***!
  71009. \***********************************************/
  71010. /*! no static exports found */
  71011. /***/ (function(module, exports, __webpack_require__) {
  71012. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71013. module.exports = function(o) {
  71014. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  71015. function print() { __p += __j.call(arguments, '') }
  71016. __p += '<!-- src/templates/requesting_contact.html -->\n';
  71017. if (o.allow_chat_pending_contacts) { ;
  71018. __p += '\n<a class="open-chat w-100"href="#">\n';
  71019. } ;
  71020. __p += '\n<span class="req-contact-name w-100" title="JID: ' +
  71021. __e(o.jid) +
  71022. '">' +
  71023. __e(o.display_name) +
  71024. '</span>\n';
  71025. if (o.allow_chat_pending_contacts) { ;
  71026. __p += '\n</a>\n';
  71027. } ;
  71028. __p += '\n<a class="accept-xmpp-request fa fa-check"\n aria-label="' +
  71029. __e(o.desc_accept) +
  71030. '" title="' +
  71031. __e(o.desc_accept) +
  71032. '" href="#"></a>\n<a class="decline-xmpp-request fa fa-times"\n aria-label="' +
  71033. __e(o.desc_decline) +
  71034. '" title="' +
  71035. __e(o.desc_decline) +
  71036. '" href="#"></a>\n';
  71037. return __p
  71038. };
  71039. /***/ }),
  71040. /***/ "./src/templates/room_description.html":
  71041. /*!*********************************************!*\
  71042. !*** ./src/templates/room_description.html ***!
  71043. \*********************************************/
  71044. /*! no static exports found */
  71045. /***/ (function(module, exports, __webpack_require__) {
  71046. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71047. module.exports = function(o) {
  71048. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  71049. function print() { __p += __j.call(arguments, '') }
  71050. __p += '<!-- src/templates/room_description.html -->\n<!-- FIXME: check markup in mockup -->\n<div class="room-info">\n<p class="room-info"><strong>' +
  71051. __e(o.label_jid) +
  71052. '</strong> ' +
  71053. __e(o.jid) +
  71054. '</p>\n<p class="room-info"><strong>' +
  71055. __e(o.label_desc) +
  71056. '</strong> ' +
  71057. __e(o.desc) +
  71058. '</p>\n<p class="room-info"><strong>' +
  71059. __e(o.label_occ) +
  71060. '</strong> ' +
  71061. __e(o.occ) +
  71062. '</p>\n<p class="room-info"><strong>' +
  71063. __e(o.label_features) +
  71064. '</strong>\n <ul>\n ';
  71065. if (o.passwordprotected) { ;
  71066. __p += '\n <li class="room-info locked">' +
  71067. __e(o.label_requires_auth) +
  71068. '</li>\n ';
  71069. } ;
  71070. __p += '\n ';
  71071. if (o.hidden) { ;
  71072. __p += '\n <li class="room-info">' +
  71073. __e(o.label_hidden) +
  71074. '</li>\n ';
  71075. } ;
  71076. __p += '\n ';
  71077. if (o.membersonly) { ;
  71078. __p += '\n <li class="room-info">' +
  71079. __e(o.label_requires_invite) +
  71080. '</li>\n ';
  71081. } ;
  71082. __p += '\n ';
  71083. if (o.moderated) { ;
  71084. __p += '\n <li class="room-info">' +
  71085. __e(o.label_moderated) +
  71086. '</li>\n ';
  71087. } ;
  71088. __p += '\n ';
  71089. if (o.nonanonymous) { ;
  71090. __p += '\n <li class="room-info">' +
  71091. __e(o.label_non_anon) +
  71092. '</li>\n ';
  71093. } ;
  71094. __p += '\n ';
  71095. if (o.open) { ;
  71096. __p += '\n <li class="room-info">' +
  71097. __e(o.label_open_room) +
  71098. '</li>\n ';
  71099. } ;
  71100. __p += '\n ';
  71101. if (o.persistent) { ;
  71102. __p += '\n <li class="room-info">' +
  71103. __e(o.label_permanent_room) +
  71104. '</li>\n ';
  71105. } ;
  71106. __p += '\n ';
  71107. if (o.publicroom) { ;
  71108. __p += '\n <li class="room-info">' +
  71109. __e(o.label_public) +
  71110. '</li>\n ';
  71111. } ;
  71112. __p += '\n ';
  71113. if (o.semianonymous) { ;
  71114. __p += '\n <li class="room-info">' +
  71115. __e(o.label_semi_anon) +
  71116. '</li>\n ';
  71117. } ;
  71118. __p += '\n ';
  71119. if (o.temporary) { ;
  71120. __p += '\n <li class="room-info">' +
  71121. __e(o.label_temp_room) +
  71122. '</li>\n ';
  71123. } ;
  71124. __p += '\n ';
  71125. if (o.unmoderated) { ;
  71126. __p += '\n <li class="room-info">' +
  71127. __e(o.label_unmoderated) +
  71128. '</li>\n ';
  71129. } ;
  71130. __p += '\n </ul>\n</p>\n</div>\n';
  71131. return __p
  71132. };
  71133. /***/ }),
  71134. /***/ "./src/templates/room_item.html":
  71135. /*!**************************************!*\
  71136. !*** ./src/templates/room_item.html ***!
  71137. \**************************************/
  71138. /*! no static exports found */
  71139. /***/ (function(module, exports, __webpack_require__) {
  71140. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71141. module.exports = function(o) {
  71142. var __t, __p = '', __e = _.escape;
  71143. __p += '<!-- src/templates/room_item.html -->\n<li class="room-item list-group-item">\n <div class="available-chatroom d-flex flex-row">\n <a class="open-room available-room w-100"\n data-room-jid="' +
  71144. __e(o.jid) +
  71145. '"\n data-room-name="' +
  71146. __e(o.name) +
  71147. '"\n title="' +
  71148. __e(o.open_title) +
  71149. '"\n href="#">' +
  71150. __e(o.name) +
  71151. '</a>\n <a class="right room-info icon-room-info"\n data-room-jid="' +
  71152. __e(o.jid) +
  71153. '"\n title="' +
  71154. __e(o.info_title) +
  71155. '" href="#">&nbsp;</a>\n </div>\n</li>\n';
  71156. return __p
  71157. };
  71158. /***/ }),
  71159. /***/ "./src/templates/room_panel.html":
  71160. /*!***************************************!*\
  71161. !*** ./src/templates/room_panel.html ***!
  71162. \***************************************/
  71163. /*! no static exports found */
  71164. /***/ (function(module, exports, __webpack_require__) {
  71165. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71166. module.exports = function(o) {
  71167. var __t, __p = '', __e = _.escape;
  71168. __p += '<!-- src/templates/room_panel.html -->\n<!-- <div id="chatrooms"> -->\n<div class="d-flex controlbox-padded">\n <span class="w-100 controlbox-heading">' +
  71169. __e(o.heading_chatrooms) +
  71170. '</span>\n <a class="chatbox-btn show-list-muc-modal fa fa-list-ul" title="' +
  71171. __e(o.title_list_rooms) +
  71172. '" data-toggle="modal" data-target="#list-chatrooms-modal"></a>\n <a class="chatbox-btn show-add-muc-modal fa fa-plus" title="' +
  71173. __e(o.title_new_room) +
  71174. '" data-toggle="modal" data-target="#add-chatrooms-modal"></a>\n</div>\n<div class="list-container open-rooms-list rooms-list-container"></div>\n<div class="list-container bookmarks-list rooms-list-container"></div>\n<!-- </div> -->\n';
  71175. return __p
  71176. };
  71177. /***/ }),
  71178. /***/ "./src/templates/rooms_list.html":
  71179. /*!***************************************!*\
  71180. !*** ./src/templates/rooms_list.html ***!
  71181. \***************************************/
  71182. /*! no static exports found */
  71183. /***/ (function(module, exports, __webpack_require__) {
  71184. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71185. module.exports = function(o) {
  71186. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  71187. function print() { __p += __j.call(arguments, '') }
  71188. __p += '<!-- src/templates/rooms_list.html -->\n<a href="#" class="list-toggle open-rooms-toggle controlbox-padded" title="' +
  71189. __e(o.desc_rooms) +
  71190. '">\n <span class="fa ';
  71191. if (o.toggle_state === o._converse.OPENED) { ;
  71192. __p += ' fa-caret-down ';
  71193. } else { ;
  71194. __p += ' fa-caret-right ';
  71195. } ;
  71196. __p += '">\n </span> ' +
  71197. __e(o.label_rooms) +
  71198. '</a>\n<div class="items-list rooms-list open-rooms-list"></div>\n';
  71199. return __p
  71200. };
  71201. /***/ }),
  71202. /***/ "./src/templates/rooms_list_item.html":
  71203. /*!********************************************!*\
  71204. !*** ./src/templates/rooms_list_item.html ***!
  71205. \********************************************/
  71206. /*! no static exports found */
  71207. /***/ (function(module, exports, __webpack_require__) {
  71208. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71209. module.exports = function(o) {
  71210. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  71211. function print() { __p += __j.call(arguments, '') }
  71212. __p += '<!-- src/templates/rooms_list_item.html -->\n<div class="list-item controlbox-padded available-chatroom d-flex flex-row\n ';
  71213. if (o.currently_open) { ;
  71214. __p += ' open ';
  71215. } ;
  71216. __p += '\n ';
  71217. if (o.num_unread_general) { ;
  71218. __p += ' unread-msgs ';
  71219. } ;
  71220. __p += '"\n data-room-jid="' +
  71221. __e(o.jid) +
  71222. '">\n';
  71223. if (o.num_unread) { ;
  71224. __p += '\n <span class="msgs-indicator badge badge-info">' +
  71225. __e( o.num_unread ) +
  71226. '</span>\n';
  71227. } ;
  71228. __p += '\n<a class="list-item-link open-room available-room w-100"\n data-room-jid="' +
  71229. __e(o.jid) +
  71230. '"\n title="' +
  71231. __e(o.open_title) +
  71232. '" href="#">' +
  71233. __e(o.name || o.jid) +
  71234. '</a>\n\n';
  71235. if (o.allow_bookmarks) { ;
  71236. __p += '\n<a class="list-item-action fa ';
  71237. if (o.bookmarked) { ;
  71238. __p += ' fa-bookmark remove-bookmark button-on ';
  71239. } else { ;
  71240. __p += ' add-bookmark fa-bookmark-o ';
  71241. } ;
  71242. __p += '"\n data-room-jid="' +
  71243. __e(o.jid) +
  71244. '" data-bookmark-name="' +
  71245. __e(o.name) +
  71246. '"\n title="';
  71247. if (o.bookmarked) { ;
  71248. __p += ' ' +
  71249. __e(o.info_remove_bookmark) +
  71250. ' ';
  71251. } else { ;
  71252. __p += ' ' +
  71253. __e(o.info_add_bookmark) +
  71254. ' ';
  71255. } ;
  71256. __p += '"\n href="#">&nbsp;</a>\n';
  71257. } ;
  71258. __p += '\n\n<a class="list-item-action room-info fa fa-info-circle" data-room-jid="' +
  71259. __e(o.jid) +
  71260. '"\n title="' +
  71261. __e(o.info_title) +
  71262. '" href="#">&nbsp;</a>\n\n<a class="list-item-action fa fa-times close-room"\n data-room-jid="' +
  71263. __e(o.jid) +
  71264. '"\n data-room-name="' +
  71265. __e(o.name || o.jid) +
  71266. '"\n title="' +
  71267. __e(o.info_leave_room) +
  71268. '" href="#">&nbsp;</a>\n\n</div>\n';
  71269. return __p
  71270. };
  71271. /***/ }),
  71272. /***/ "./src/templates/rooms_results.html":
  71273. /*!******************************************!*\
  71274. !*** ./src/templates/rooms_results.html ***!
  71275. \******************************************/
  71276. /*! no static exports found */
  71277. /***/ (function(module, exports, __webpack_require__) {
  71278. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71279. module.exports = function(o) {
  71280. var __t, __p = '', __e = _.escape;
  71281. __p += '<!-- src/templates/rooms_results.html -->\n<li class="list-group-item active">' +
  71282. __e( o.feedback_text ) +
  71283. '</dt>\n';
  71284. return __p
  71285. };
  71286. /***/ }),
  71287. /***/ "./src/templates/roster.html":
  71288. /*!***********************************!*\
  71289. !*** ./src/templates/roster.html ***!
  71290. \***********************************/
  71291. /*! no static exports found */
  71292. /***/ (function(module, exports, __webpack_require__) {
  71293. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71294. module.exports = function(o) {
  71295. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  71296. function print() { __p += __j.call(arguments, '') }
  71297. __p += '<!-- src/templates/roster.html -->\n<div class="d-flex controlbox-padded">\n <span class="w-100 controlbox-heading">' +
  71298. __e(o.heading_contacts) +
  71299. '</span>\n ';
  71300. if (o.allow_contact_requests) { ;
  71301. __p += '\n <a class="chatbox-btn add-contact fa fa-user-plus"\n title="' +
  71302. __e(o.title_add_contact) +
  71303. '"\n data-toggle="modal"\n data-target="#add-contact-modal"></a>\n ';
  71304. } ;
  71305. __p += '\n</div>\n\n<form class="roster-filter-form"></form>\n\n<div class="roster-contacts"></div>\n';
  71306. return __p
  71307. };
  71308. /***/ }),
  71309. /***/ "./src/templates/roster_filter.html":
  71310. /*!******************************************!*\
  71311. !*** ./src/templates/roster_filter.html ***!
  71312. \******************************************/
  71313. /*! no static exports found */
  71314. /***/ (function(module, exports, __webpack_require__) {
  71315. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71316. module.exports = function(o) {
  71317. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  71318. function print() { __p += __j.call(arguments, '') }
  71319. __p += '<!-- src/templates/roster_filter.html -->\n<form class="controlbox-padded roster-filter-form input-button-group ';
  71320. if (!o.visible) { ;
  71321. __p += ' hidden ';
  71322. } ;
  71323. __p += '">\n <div class="form-inline flex-nowrap">\n <div class="btn-group">\n <input ';
  71324. if (o.filter_text) { ;
  71325. __p += ' value="' +
  71326. __e(o.filter_text) +
  71327. '" ';
  71328. } ;
  71329. __p += '\n class="roster-filter form-control ';
  71330. if (o.filter_type === 'state') { ;
  71331. __p += ' hidden ';
  71332. } ;
  71333. __p += '"\n placeholder="' +
  71334. __e(o.placeholder) +
  71335. '">\n <span class="clear-input fa fa-times ';
  71336. if (!o.filter_text || o.filter_type === 'state') { ;
  71337. __p += ' hidden ';
  71338. } ;
  71339. __p += '"></span>\n </div>\n\n <select class="form-control state-type ';
  71340. if (o.filter_type !== 'state') { ;
  71341. __p += ' hidden ';
  71342. } ;
  71343. __p += '">\n <option value="">' +
  71344. __e(o.label_any) +
  71345. '</option>\n <option ';
  71346. if (o.chat_state === 'unread_messages') { ;
  71347. __p += ' selected="selected" ';
  71348. } ;
  71349. __p += '\n value="unread_messages">' +
  71350. __e(o.label_unread_messages) +
  71351. '</option>\n <option ';
  71352. if (o.chat_state === 'online') { ;
  71353. __p += ' selected="selected" ';
  71354. } ;
  71355. __p += '\n value="online">' +
  71356. __e(o.label_online) +
  71357. '</option>\n <option ';
  71358. if (o.chat_state === 'chat') { ;
  71359. __p += ' selected="selected" ';
  71360. } ;
  71361. __p += '\n value="chat">' +
  71362. __e(o.label_chatty) +
  71363. '</option>\n <option ';
  71364. if (o.chat_state === 'dnd') { ;
  71365. __p += ' selected="selected" ';
  71366. } ;
  71367. __p += '\n value="dnd">' +
  71368. __e(o.label_busy) +
  71369. '</option>\n <option ';
  71370. if (o.chat_state === 'away') { ;
  71371. __p += ' selected="selected" ';
  71372. } ;
  71373. __p += '\n value="away">' +
  71374. __e(o.label_away) +
  71375. '</option>\n <option ';
  71376. if (o.chat_state === 'xa') { ;
  71377. __p += ' selected="selected" ';
  71378. } ;
  71379. __p += '\n value="xa">' +
  71380. __e(o.label_xa) +
  71381. '</option>\n <option ';
  71382. if (o.chat_state === 'offline') { ;
  71383. __p += ' selected="selected" ';
  71384. } ;
  71385. __p += '\n value="offline">' +
  71386. __e(o.label_offline) +
  71387. '</option>\n </select>\n\n <div class="filter-by d-flex flex-nowrap">\n <span class="fa fa-user ';
  71388. if (o.filter_type === 'contacts') { ;
  71389. __p += ' selected ';
  71390. } ;
  71391. __p += '" data-type="contacts" title="' +
  71392. __e(o.title_contact_filter) +
  71393. '"></span>\n <span class="fa fa-users ';
  71394. if (o.filter_type === 'groups') { ;
  71395. __p += ' selected ';
  71396. } ;
  71397. __p += '" data-type="groups" title="' +
  71398. __e(o.title_group_filter) +
  71399. '"></span>\n <span class="fa fa-circle ';
  71400. if (o.filter_type === 'state') { ;
  71401. __p += ' selected ';
  71402. } ;
  71403. __p += '" data-type="state" title="' +
  71404. __e(o.title_status_filter) +
  71405. '"></span>\n </div>\n </div>\n</form>\n';
  71406. return __p
  71407. };
  71408. /***/ }),
  71409. /***/ "./src/templates/roster_item.html":
  71410. /*!****************************************!*\
  71411. !*** ./src/templates/roster_item.html ***!
  71412. \****************************************/
  71413. /*! no static exports found */
  71414. /***/ (function(module, exports, __webpack_require__) {
  71415. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71416. module.exports = function(o) {
  71417. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  71418. function print() { __p += __j.call(arguments, '') }
  71419. __p += '<!-- src/templates/roster_item.html -->\n<a class="list-item-link cbox-list-item open-chat w-100 ';
  71420. if (o.num_unread) { ;
  71421. __p += ' unread-msgs ';
  71422. } ;
  71423. __p += '"\n title="' +
  71424. __e(o.desc_chat) +
  71425. '" href="#">\n <span class="' +
  71426. __e(o.status_icon) +
  71427. '" title="' +
  71428. __e(o.desc_status) +
  71429. '"></span>\n ';
  71430. if (o.num_unread) { ;
  71431. __p += '\n <span class="msgs-indicator">' +
  71432. __e( o.num_unread ) +
  71433. '</span>\n ';
  71434. } ;
  71435. __p += '\n <span class="contact-name ';
  71436. if (o.num_unread) { ;
  71437. __p += ' unread-msgs ';
  71438. } ;
  71439. __p += '">' +
  71440. __e(o.display_name) +
  71441. '</span></a>\n';
  71442. if (o.allow_contact_removal) { ;
  71443. __p += '\n<a class="list-item-action remove-xmpp-contact far fa-trash-alt" title="' +
  71444. __e(o.desc_remove) +
  71445. '" href="#"></a>\n';
  71446. } ;
  71447. __p += '\n';
  71448. return __p
  71449. };
  71450. /***/ }),
  71451. /***/ "./src/templates/search_contact.html":
  71452. /*!*******************************************!*\
  71453. !*** ./src/templates/search_contact.html ***!
  71454. \*******************************************/
  71455. /*! no static exports found */
  71456. /***/ (function(module, exports, __webpack_require__) {
  71457. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71458. module.exports = function(o) {
  71459. var __t, __p = '', __e = _.escape;
  71460. __p += '<!-- src/templates/search_contact.html -->\n<li>\n <form class="search-xmpp-contact">\n <input type="text"\n name="identifier"\n class="username"\n placeholder="' +
  71461. __e(o.label_contact_name) +
  71462. '"/>\n <button type="submit">' +
  71463. __e(o.label_search) +
  71464. '</button>\n </form>\n</li>\n';
  71465. return __p
  71466. };
  71467. /***/ }),
  71468. /***/ "./src/templates/select_option.html":
  71469. /*!******************************************!*\
  71470. !*** ./src/templates/select_option.html ***!
  71471. \******************************************/
  71472. /*! no static exports found */
  71473. /***/ (function(module, exports, __webpack_require__) {
  71474. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71475. module.exports = function(o) {
  71476. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  71477. function print() { __p += __j.call(arguments, '') }
  71478. __p += '<!-- src/templates/select_option.html -->\n<option value="' +
  71479. __e(o.value) +
  71480. '" ';
  71481. if (o.selected) { ;
  71482. __p += ' selected="selected" ';
  71483. } ;
  71484. __p += ' >' +
  71485. __e(o.label) +
  71486. '</option>\n';
  71487. return __p
  71488. };
  71489. /***/ }),
  71490. /***/ "./src/templates/spinner.html":
  71491. /*!************************************!*\
  71492. !*** ./src/templates/spinner.html ***!
  71493. \************************************/
  71494. /*! no static exports found */
  71495. /***/ (function(module, exports, __webpack_require__) {
  71496. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71497. module.exports = function(o) {
  71498. var __t, __p = '';
  71499. __p += '<!-- src/templates/spinner.html -->\n<span class="spinner fa fa-spinner centered"/>\n';
  71500. return __p
  71501. };
  71502. /***/ }),
  71503. /***/ "./src/templates/spoiler_button.html":
  71504. /*!*******************************************!*\
  71505. !*** ./src/templates/spoiler_button.html ***!
  71506. \*******************************************/
  71507. /*! no static exports found */
  71508. /***/ (function(module, exports, __webpack_require__) {
  71509. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71510. module.exports = function(o) {
  71511. var __t, __p = '', __j = Array.prototype.join;
  71512. function print() { __p += __j.call(arguments, '') }
  71513. __p += '<!-- src/templates/spoiler_button.html -->\n<li class="toggle-compose-spoiler fa ';
  71514. if (o.composing_spoiler) { ;
  71515. __p += ' fa-eye-slash ';
  71516. } ;
  71517. __p += ' ';
  71518. if (!o.composing_spoiler) { ;
  71519. __p += ' fa-eye ';
  71520. } ;
  71521. __p += '"\n title="' +
  71522. ((__t = ( o.label_toggle_spoiler )) == null ? '' : __t) +
  71523. '"></a>\n</li>\n';
  71524. return __p
  71525. };
  71526. /***/ }),
  71527. /***/ "./src/templates/status_message.html":
  71528. /*!*******************************************!*\
  71529. !*** ./src/templates/status_message.html ***!
  71530. \*******************************************/
  71531. /*! no static exports found */
  71532. /***/ (function(module, exports, __webpack_require__) {
  71533. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71534. module.exports = function(o) {
  71535. var __t, __p = '', __e = _.escape;
  71536. __p += '<!-- src/templates/status_message.html -->\n<div class="message chat-info chat-status"\n data-isodate="' +
  71537. __e(o.isodate) +
  71538. '"\n data-status="' +
  71539. __e(o.from) +
  71540. '">' +
  71541. __e(o.message) +
  71542. '</div>\n';
  71543. return __p
  71544. };
  71545. /***/ }),
  71546. /***/ "./src/templates/status_option.html":
  71547. /*!******************************************!*\
  71548. !*** ./src/templates/status_option.html ***!
  71549. \******************************************/
  71550. /*! no static exports found */
  71551. /***/ (function(module, exports, __webpack_require__) {
  71552. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71553. module.exports = function(o) {
  71554. var __t, __p = '', __e = _.escape;
  71555. __p += '<!-- src/templates/status_option.html -->\n<li>\n <a href="#" class="' +
  71556. __e( o.value ) +
  71557. '" data-value="' +
  71558. __e( o.value ) +
  71559. '">\n <span class="icon-' +
  71560. __e( o.value ) +
  71561. '"></span>\n ' +
  71562. __e( o.text ) +
  71563. '\n </a>\n</li>\n';
  71564. return __p
  71565. };
  71566. /***/ }),
  71567. /***/ "./src/templates/toggle_chats.html":
  71568. /*!*****************************************!*\
  71569. !*** ./src/templates/toggle_chats.html ***!
  71570. \*****************************************/
  71571. /*! no static exports found */
  71572. /***/ (function(module, exports, __webpack_require__) {
  71573. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71574. module.exports = function(o) {
  71575. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  71576. function print() { __p += __j.call(arguments, '') }
  71577. __p += '<!-- src/templates/toggle_chats.html -->\n' +
  71578. __e(o.num_minimized) +
  71579. ' ' +
  71580. __e(o.Minimized) +
  71581. '\n<span class="unread-message-count ';
  71582. if (!o.num_unread) { ;
  71583. __p += ' unread-message-count-hidden ';
  71584. } ;
  71585. __p += '" href="#">' +
  71586. __e(o.num_unread) +
  71587. '</span>\n';
  71588. return __p
  71589. };
  71590. /***/ }),
  71591. /***/ "./src/templates/toolbar.html":
  71592. /*!************************************!*\
  71593. !*** ./src/templates/toolbar.html ***!
  71594. \************************************/
  71595. /*! no static exports found */
  71596. /***/ (function(module, exports, __webpack_require__) {
  71597. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71598. module.exports = function(o) {
  71599. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  71600. function print() { __p += __j.call(arguments, '') }
  71601. __p += '<!-- src/templates/toolbar.html -->\n';
  71602. if (o.use_emoji) { ;
  71603. __p += '\n<li class="toggle-toolbar-menu toggle-smiley dropup">\n <a class="toggle-smiley far fa-smile" title="' +
  71604. __e(o.tooltip_insert_smiley) +
  71605. '" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></a> \n <div class="emoji-picker dropdown-menu toolbar-menu"></div>\n</li>\n';
  71606. } ;
  71607. __p += '\n';
  71608. if (o.show_call_button) { ;
  71609. __p += '\n<li class="toggle-call fa fa-phone" title="' +
  71610. __e(o.label_start_call) +
  71611. '"></li>\n';
  71612. } ;
  71613. __p += '\n';
  71614. if (o.show_occupants_toggle) { ;
  71615. __p += '\n<li class="toggle-occupants fa fa-angle-double-right" title="' +
  71616. __e(o.label_hide_occupants) +
  71617. '"></li>\n';
  71618. } ;
  71619. __p += '\n';
  71620. return __p
  71621. };
  71622. /***/ }),
  71623. /***/ "./src/templates/toolbar_fileupload.html":
  71624. /*!***********************************************!*\
  71625. !*** ./src/templates/toolbar_fileupload.html ***!
  71626. \***********************************************/
  71627. /*! no static exports found */
  71628. /***/ (function(module, exports, __webpack_require__) {
  71629. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71630. module.exports = function(o) {
  71631. var __t, __p = '', __e = _.escape;
  71632. __p += '<!-- src/templates/toolbar_fileupload.html -->\n<li class="upload-file">\n <a class="fa fa-paperclip" title="' +
  71633. __e(o.tooltip_upload_file) +
  71634. '"></a>\n <input type="file" class="fileupload" multiple style="display:none"/>\n</li> \n';
  71635. return __p
  71636. };
  71637. /***/ }),
  71638. /***/ "./src/templates/toolbar_omemo.html":
  71639. /*!******************************************!*\
  71640. !*** ./src/templates/toolbar_omemo.html ***!
  71641. \******************************************/
  71642. /*! no static exports found */
  71643. /***/ (function(module, exports, __webpack_require__) {
  71644. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71645. module.exports = function(o) {
  71646. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  71647. function print() { __p += __j.call(arguments, '') }
  71648. __p += '<!-- src/templates/toolbar_omemo.html -->\n<li class="toggle-omemo fa ';
  71649. if (o.omemo_active) { ;
  71650. __p += ' fa-lock ';
  71651. } else { ;
  71652. __p += ' fa-unlock ';
  71653. } ;
  71654. __p += '" title="' +
  71655. __e(o.__('Messages are being sent in plaintext')) +
  71656. '"></li>\n';
  71657. return __p
  71658. };
  71659. /***/ }),
  71660. /***/ "./src/templates/trimmed_chat.html":
  71661. /*!*****************************************!*\
  71662. !*** ./src/templates/trimmed_chat.html ***!
  71663. \*****************************************/
  71664. /*! no static exports found */
  71665. /***/ (function(module, exports, __webpack_require__) {
  71666. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71667. module.exports = function(o) {
  71668. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  71669. function print() { __p += __j.call(arguments, '') }
  71670. __p += '<!-- src/templates/trimmed_chat.html -->\n<a href="#" class="restore-chat w-100 align-self-center" title="' +
  71671. __e(o.tooltip) +
  71672. '">\n ';
  71673. if (o.num_unread) { ;
  71674. __p += ' \n <span class="message-count badge badge-light">' +
  71675. __e(o.num_unread) +
  71676. '</span>\n ';
  71677. } ;
  71678. __p += '\n ' +
  71679. __e(o.title || o.jid ) +
  71680. '\n</a>\n<a class="chatbox-btn close-chatbox-button fa fa-times"></a>\n';
  71681. return __p
  71682. };
  71683. /***/ }),
  71684. /***/ "./src/templates/user_details_modal.html":
  71685. /*!***********************************************!*\
  71686. !*** ./src/templates/user_details_modal.html ***!
  71687. \***********************************************/
  71688. /*! no static exports found */
  71689. /***/ (function(module, exports, __webpack_require__) {
  71690. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71691. module.exports = function(o) {
  71692. var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
  71693. function print() { __p += __j.call(arguments, '') }
  71694. __p += '<!-- src/templates/user_details_modal.html -->\n<div class="modal fade" id="user-details-modal" tabindex="-1" role="dialog" aria-labelledby="user-details-modal-label" aria-hidden="true">\n <div class="modal-dialog" role="document">\n <div class="modal-content">\n <div class="modal-header">\n <h5 class="modal-title" id="user-details-modal-label">' +
  71695. __e(o.display_name) +
  71696. '</h5>\n <button type="button" class="close" data-dismiss="modal" aria-label="' +
  71697. __e(o.__('Close')) +
  71698. '"><span aria-hidden="true">&times;</span></button>\n </div>\n <div class="modal-body">\n ';
  71699. if (o.image) { ;
  71700. __p += '\n <img alt="' +
  71701. __e(o.__('The User\'s Profile Image')) +
  71702. '"\n class="img-thumbnail avatar align-self-center mb-3"\n height="100" width="100" src="data:' +
  71703. __e(o.image_type) +
  71704. ';base64,' +
  71705. __e(o.image) +
  71706. '"/>\n ';
  71707. } ;
  71708. __p += '\n ';
  71709. if (o.fullname) { ;
  71710. __p += '\n <p><label>' +
  71711. __e(o.__('Full Name')) +
  71712. ':</label>&nbsp;' +
  71713. __e(o.fullname) +
  71714. '</p>\n ';
  71715. } ;
  71716. __p += '\n <p><label>' +
  71717. __e(o.__('XMPP Address')) +
  71718. ':</label>&nbsp;' +
  71719. __e(o.jid) +
  71720. '</p>\n ';
  71721. if (o.nickname) { ;
  71722. __p += '\n <p><label>' +
  71723. __e(o.__('Nickname')) +
  71724. ':</label>&nbsp;' +
  71725. __e(o.nickname) +
  71726. '</p>\n ';
  71727. } ;
  71728. __p += '\n ';
  71729. if (o.url) { ;
  71730. __p += '\n <p><label>' +
  71731. __e(o.__('URL')) +
  71732. ':</label>&nbsp;<a target="_blank" rel="noopener" href="' +
  71733. __e(o.url) +
  71734. '">' +
  71735. __e(o.url) +
  71736. '</a></p>\n ';
  71737. } ;
  71738. __p += '\n ';
  71739. if (o.email) { ;
  71740. __p += '\n <p><label>' +
  71741. __e(o.__('Email')) +
  71742. ':</label>&nbsp;<a href="mailto:' +
  71743. __e(o.email) +
  71744. '">' +
  71745. __e(o.email) +
  71746. '</a></p>\n ';
  71747. } ;
  71748. __p += '\n ';
  71749. if (o.role) { ;
  71750. __p += '\n <p><label>' +
  71751. __e(o.__('Role')) +
  71752. ':</label>&nbsp;' +
  71753. __e(o.role) +
  71754. '</p>\n ';
  71755. } ;
  71756. __p += '\n\n ';
  71757. if (o._converse.pluggable.plugins['converse-omemo'].enabled(o._converse)) { ;
  71758. __p += '\n <hr>\n <ul class="list-group fingerprints">\n <li class="list-group-item active">' +
  71759. __e(o.__('OMEMO Fingerprints')) +
  71760. '</li>\n ';
  71761. if (!o.view.devicelist.devices) { ;
  71762. __p += '\n <li class="list-group-item"><span class="spinner fa fa-spinner centered"/></li>\n ';
  71763. } ;
  71764. __p += '\n ';
  71765. if (o.view.devicelist.devices) { ;
  71766. __p += '\n ';
  71767. o.view.devicelist.devices.each(function (device) { ;
  71768. __p += '\n ';
  71769. if (device.get('bundle') && device.get('bundle').fingerprint) { ;
  71770. __p += '\n <li class="list-group-item">\n <form class="fingerprint-trust">\n <div class="btn-group btn-group-toggle">\n <label class="btn btn--small ';
  71771. if (device.get('trusted') !== -1) { ;
  71772. __p += ' btn-primary active ';
  71773. } else { ;
  71774. __p += ' btn-secondary ';
  71775. } ;
  71776. __p += '">\n <input type="radio" name="' +
  71777. __e(device.get('id')) +
  71778. '" value="1"\n ';
  71779. if (device.get('trusted') !== -1) { ;
  71780. __p += ' checked="checked" ';
  71781. } ;
  71782. __p += '>' +
  71783. __e(o.__('Trusted')) +
  71784. '\n </label>\n <label class="btn btn--small ';
  71785. if (device.get('trusted') === -1) { ;
  71786. __p += ' btn-primary active ';
  71787. } else { ;
  71788. __p += ' btn-secondary ';
  71789. } ;
  71790. __p += '">\n <input type="radio" name="' +
  71791. __e(device.get('id')) +
  71792. '" value="-1"\n ';
  71793. if (device.get('trusted') === -1) { ;
  71794. __p += ' checked="checked" ';
  71795. } ;
  71796. __p += '>' +
  71797. __e(o.__('Untrusted')) +
  71798. '\n </label>\n </div>\n <span class="fingerprint">' +
  71799. __e(o.utils.formatFingerprint(device.get('bundle').fingerprint)) +
  71800. '</span>\n </form>\n </li>\n ';
  71801. } ;
  71802. __p += '\n ';
  71803. }); ;
  71804. __p += '\n ';
  71805. } ;
  71806. __p += '\n </ul>\n ';
  71807. } ;
  71808. __p += '\n </div>\n <div class="modal-footer">\n ';
  71809. if (o.allow_contact_removal && o.is_roster_contact) { ;
  71810. __p += '\n <button type="button" class="btn btn-danger remove-contact"><i class="far fa-trash-alt"> </i>' +
  71811. __e(o.__('Remove as contact')) +
  71812. '</button>\n ';
  71813. } ;
  71814. __p += '\n <button type="button" class="btn btn-info refresh-contact"><i class="fa fa-refresh"> </i>' +
  71815. __e(o.__('Refresh')) +
  71816. '</button>\n <button type="button" class="btn btn-secondary" data-dismiss="modal">' +
  71817. __e(o.__('Close')) +
  71818. '</button>\n </div>\n </div>\n </div>\n</div>\n';
  71819. return __p
  71820. };
  71821. /***/ }),
  71822. /***/ "./src/templates/vcard.html":
  71823. /*!**********************************!*\
  71824. !*** ./src/templates/vcard.html ***!
  71825. \**********************************/
  71826. /*! no static exports found */
  71827. /***/ (function(module, exports, __webpack_require__) {
  71828. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71829. module.exports = function(o) {
  71830. var __t, __p = '', __e = _.escape;
  71831. __p += '<!-- src/templates/vcard.html -->\n<vCard xmlns="vcard-temp">\n <FN>' +
  71832. __e(o.fn) +
  71833. '</FN>\n <NICKNAME>' +
  71834. __e(o.nickname) +
  71835. '</NICKNAME>\n <URL>' +
  71836. __e(o.url) +
  71837. '</URL>\n <ROLE>' +
  71838. __e(o.role) +
  71839. '</ROLE>\n <EMAIL><INTERNET/><PREF/><USERID>' +
  71840. __e(o.email) +
  71841. '</USERID></EMAIL>\n <PHOTO>\n <TYPE>' +
  71842. __e(o.image_type) +
  71843. '</TYPE>\n <BINVAL>' +
  71844. __e(o.image) +
  71845. '</BINVAL>\n </PHOTO>\n</vCard>\n';
  71846. return __p
  71847. };
  71848. /***/ }),
  71849. /***/ "./src/templates/video.html":
  71850. /*!**********************************!*\
  71851. !*** ./src/templates/video.html ***!
  71852. \**********************************/
  71853. /*! no static exports found */
  71854. /***/ (function(module, exports, __webpack_require__) {
  71855. var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
  71856. module.exports = function(o) {
  71857. var __t, __p = '', __e = _.escape;
  71858. __p += '<!-- src/templates/video.html -->\n<video controls src="' +
  71859. __e(o.url) +
  71860. '" style="max-height: 50vh"></video>\n<a target="_blank" rel="noopener" href="' +
  71861. __e(o.url) +
  71862. '">' +
  71863. __e(o.label_download) +
  71864. '</a>\n';
  71865. return __p
  71866. };
  71867. /***/ }),
  71868. /***/ "./src/underscore-shim.js":
  71869. /*!********************************!*\
  71870. !*** ./src/underscore-shim.js ***!
  71871. \********************************/
  71872. /*! no static exports found */
  71873. /***/ (function(module, exports, __webpack_require__) {
  71874. "use strict";
  71875. var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  71876. /*global define */
  71877. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! lodash */ "./node_modules/lodash/lodash.js")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (_) {
  71878. return _.noConflict();
  71879. }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
  71880. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  71881. /***/ }),
  71882. /***/ "./src/utils/core.js":
  71883. /*!***************************!*\
  71884. !*** ./src/utils/core.js ***!
  71885. \***************************/
  71886. /*! no static exports found */
  71887. /***/ (function(module, exports, __webpack_require__) {
  71888. "use strict";
  71889. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  71890. // Converse.js (A browser based XMPP chat client)
  71891. // http://conversejs.org
  71892. //
  71893. // This is the utilities module.
  71894. //
  71895. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  71896. // Licensed under the Mozilla Public License (MPLv2)
  71897. //
  71898. /*global define, escape, window, Uint8Array */
  71899. (function (root, factory) {
  71900. if (true) {
  71901. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! sizzle */ "./node_modules/sizzle/dist/sizzle.js"), __webpack_require__(/*! es6-promise */ "./node_modules/es6-promise/dist/es6-promise.auto.js"), __webpack_require__(/*! fast-text-encoding */ "./node_modules/fast-text-encoding/text.js"), __webpack_require__(/*! lodash.noconflict */ "./src/lodash.noconflict.js"), __webpack_require__(/*! backbone */ "./node_modules/backbone/backbone.js"), __webpack_require__(/*! strophe */ "../strophejs/dist/strophe.js"), __webpack_require__(/*! uri */ "./node_modules/urijs/src/URI.js"), __webpack_require__(/*! templates/audio.html */ "./src/templates/audio.html"), __webpack_require__(/*! templates/file.html */ "./src/templates/file.html"), __webpack_require__(/*! templates/image.html */ "./src/templates/image.html"), __webpack_require__(/*! templates/video.html */ "./src/templates/video.html")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  71902. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  71903. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  71904. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  71905. } else {}
  71906. })(void 0, function (sizzle, Promise, FastTextEncoding, _, Backbone, Strophe, URI, tpl_audio, tpl_file, tpl_image, tpl_video) {
  71907. "use strict";
  71908. Strophe = Strophe.Strophe;
  71909. const URL_REGEX = /\b(https?:\/\/|www\.|https?:\/\/www\.)[^\s<>]{2,200}\b\/?/g;
  71910. const logger = _.assign({
  71911. 'debug': _.get(console, 'log') ? console.log.bind(console) : _.noop,
  71912. 'error': _.get(console, 'log') ? console.log.bind(console) : _.noop,
  71913. 'info': _.get(console, 'log') ? console.log.bind(console) : _.noop,
  71914. 'warn': _.get(console, 'log') ? console.log.bind(console) : _.noop
  71915. }, console);
  71916. var isImage = function isImage(url) {
  71917. return new Promise((resolve, reject) => {
  71918. var img = new Image();
  71919. var timer = window.setTimeout(function () {
  71920. reject(new Error("Could not determine whether it's an image"));
  71921. img = null;
  71922. }, 3000);
  71923. img.onerror = img.onabort = function () {
  71924. clearTimeout(timer);
  71925. reject(new Error("Could not determine whether it's an image"));
  71926. };
  71927. img.onload = function () {
  71928. clearTimeout(timer);
  71929. resolve(img);
  71930. };
  71931. img.src = url;
  71932. });
  71933. };
  71934. function slideOutWrapup(el) {
  71935. /* Wrapup function for slideOut. */
  71936. el.removeAttribute('data-slider-marker');
  71937. el.classList.remove('collapsed');
  71938. el.style.overflow = "";
  71939. el.style.height = "";
  71940. }
  71941. var u = {};
  71942. u.getLongestSubstring = function (string, candidates) {
  71943. function reducer(accumulator, current_value) {
  71944. if (string.startsWith(current_value)) {
  71945. if (current_value.length > accumulator.length) {
  71946. return current_value;
  71947. } else {
  71948. return accumulator;
  71949. }
  71950. } else {
  71951. return accumulator;
  71952. }
  71953. }
  71954. return candidates.reduce(reducer, '');
  71955. };
  71956. u.getNextElement = function (el, selector = '*') {
  71957. let next_el = el.nextElementSibling;
  71958. while (!_.isNull(next_el) && !sizzle.matchesSelector(next_el, selector)) {
  71959. next_el = next_el.nextElementSibling;
  71960. }
  71961. return next_el;
  71962. };
  71963. u.getPreviousElement = function (el, selector = '*') {
  71964. let prev_el = el.previousSibling;
  71965. while (!_.isNull(prev_el) && !sizzle.matchesSelector(prev_el, selector)) {
  71966. prev_el = prev_el.previousSibling;
  71967. }
  71968. return prev_el;
  71969. };
  71970. u.getFirstChildElement = function (el, selector = '*') {
  71971. let first_el = el.firstElementChild;
  71972. while (!_.isNull(first_el) && !sizzle.matchesSelector(first_el, selector)) {
  71973. first_el = first_el.nextSibling;
  71974. }
  71975. return first_el;
  71976. };
  71977. u.getLastChildElement = function (el, selector = '*') {
  71978. let last_el = el.lastElementChild;
  71979. while (!_.isNull(last_el) && !sizzle.matchesSelector(last_el, selector)) {
  71980. last_el = last_el.previousSibling;
  71981. }
  71982. return last_el;
  71983. };
  71984. u.calculateElementHeight = function (el) {
  71985. /* Return the height of the passed in DOM element,
  71986. * based on the heights of its children.
  71987. */
  71988. return _.reduce(el.children, (result, child) => result + child.offsetHeight, 0);
  71989. };
  71990. u.addClass = function (className, el) {
  71991. if (el instanceof Element) {
  71992. el.classList.add(className);
  71993. }
  71994. };
  71995. u.removeClass = function (className, el) {
  71996. if (el instanceof Element) {
  71997. el.classList.remove(className);
  71998. }
  71999. return el;
  72000. };
  72001. u.removeElement = function (el) {
  72002. if (!_.isNil(el) && !_.isNil(el.parentNode)) {
  72003. el.parentNode.removeChild(el);
  72004. }
  72005. };
  72006. u.showElement = _.flow(_.partial(u.removeClass, 'collapsed'), _.partial(u.removeClass, 'hidden'));
  72007. u.hideElement = function (el) {
  72008. if (!_.isNil(el)) {
  72009. el.classList.add('hidden');
  72010. }
  72011. return el;
  72012. };
  72013. u.ancestor = function (el, selector) {
  72014. let parent = el;
  72015. while (!_.isNil(parent) && !sizzle.matchesSelector(parent, selector)) {
  72016. parent = parent.parentElement;
  72017. }
  72018. return parent;
  72019. };
  72020. u.nextUntil = function (el, selector, include_self = false) {
  72021. /* Return the element's siblings until one matches the selector. */
  72022. const matches = [];
  72023. let sibling_el = el.nextElementSibling;
  72024. while (!_.isNil(sibling_el) && !sibling_el.matches(selector)) {
  72025. matches.push(sibling_el);
  72026. sibling_el = sibling_el.nextElementSibling;
  72027. }
  72028. return matches;
  72029. };
  72030. u.unescapeHTML = function (string) {
  72031. /* Helper method that replace HTML-escaped symbols with equivalent characters
  72032. * (e.g. transform occurrences of '&amp;' to '&')
  72033. *
  72034. * Parameters:
  72035. * (String) string: a String containing the HTML-escaped symbols.
  72036. */
  72037. var div = document.createElement('div');
  72038. div.innerHTML = string;
  72039. return div.innerText;
  72040. };
  72041. u.escapeHTML = function (string) {
  72042. return string.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
  72043. };
  72044. u.prefixMentions = function (message) {
  72045. /* Given a message object, return its text with @ chars
  72046. * inserted before the mentioned nicknames.
  72047. */
  72048. let text = message.get('message');
  72049. (message.get('references') || []).sort((a, b) => b.begin - a.begin).forEach(ref => {
  72050. text = `${text.slice(0, ref.begin)}@${text.slice(ref.begin)}`;
  72051. });
  72052. return text;
  72053. };
  72054. u.addMentionsMarkup = function (text, references, chatbox) {
  72055. if (chatbox.get('message_type') !== 'groupchat') {
  72056. return text;
  72057. }
  72058. const nick = chatbox.get('nick');
  72059. references.sort((a, b) => b.begin - a.begin).forEach(ref => {
  72060. const mention = text.slice(ref.begin, ref.end);
  72061. chatbox;
  72062. if (mention === nick) {
  72063. text = text.slice(0, ref.begin) + `<span class="mention mention--self badge badge-info">${mention}</span>` + text.slice(ref.end);
  72064. } else {
  72065. text = text.slice(0, ref.begin) + `<span class="mention">${mention}</span>` + text.slice(ref.end);
  72066. }
  72067. });
  72068. return text;
  72069. };
  72070. u.addHyperlinks = function (text) {
  72071. return URI.withinString(text, url => {
  72072. const uri = new URI(url);
  72073. url = uri.normalize()._string;
  72074. const pretty_url = uri._parts.urn ? url : uri.readable();
  72075. if (!uri._parts.protocol && !url.startsWith('http://') && !url.startsWith('https://')) {
  72076. url = 'http://' + url;
  72077. }
  72078. if (uri._parts.protocol === 'xmpp' && uri._parts.query === 'join') {
  72079. return `<a target="_blank" rel="noopener" class="open-chatroom" href="${url}">${u.escapeHTML(pretty_url)}</a>`;
  72080. }
  72081. return `<a target="_blank" rel="noopener" href="${url}">${u.escapeHTML(pretty_url)}</a>`;
  72082. }, {
  72083. 'start': /\b(?:([a-z][a-z0-9.+-]*:\/\/)|xmpp:|mailto:|www\.)/gi
  72084. });
  72085. };
  72086. u.renderNewLines = function (text) {
  72087. return text.replace(/\n\n+/g, '<br/><br/>').replace(/\n/g, '<br/>');
  72088. };
  72089. u.renderImageURLs = function (_converse, obj) {
  72090. /* Returns a Promise which resolves once all images have been loaded.
  72091. */
  72092. const __ = _converse.__;
  72093. const list = obj.textContent.match(URL_REGEX) || [];
  72094. return Promise.all(_.map(list, url => new Promise((resolve, reject) => isImage(url).then(function (img) {
  72095. const i = new Image();
  72096. i.src = img.src;
  72097. i.addEventListener('load', resolve); // We also resolve for non-images, otherwise the
  72098. // Promise.all resolves prematurely.
  72099. i.addEventListener('error', resolve);
  72100. _.each(sizzle(`a[href="${url}"]`, obj), a => {
  72101. a.outerHTML = tpl_image({
  72102. 'url': url,
  72103. 'label_download': __('Download')
  72104. });
  72105. });
  72106. }).catch(resolve))));
  72107. };
  72108. u.renderFileURL = function (_converse, url) {
  72109. const uri = new URI(url),
  72110. filename = uri.filename(),
  72111. lower_filename = filename.toLowerCase();
  72112. if (!_.includes(["https", "http"], uri.protocol().toLowerCase()) || lower_filename.endsWith('mp3') || lower_filename.endsWith('mp4') || lower_filename.endsWith('ogg') || lower_filename.endsWith('jpg') || lower_filename.endsWith('jpeg') || lower_filename.endsWith('png') || lower_filename.endsWith('gif') || lower_filename.endsWith('m4a') || lower_filename.endsWith('webm') || lower_filename.endsWith('svg')) {
  72113. return url;
  72114. }
  72115. const __ = _converse.__;
  72116. return tpl_file({
  72117. 'url': url,
  72118. 'label_download': __('Download file "%1$s"', decodeURI(filename))
  72119. });
  72120. };
  72121. u.renderImageURL = function (_converse, url) {
  72122. const lurl = url.toLowerCase();
  72123. if (lurl.endsWith('jpg') || lurl.endsWith('jpeg') || lurl.endsWith('png') || lurl.endsWith('gif') || lurl.endsWith('svg')) {
  72124. const __ = _converse.__,
  72125. uri = new URI(url);
  72126. return tpl_image({
  72127. 'url': url,
  72128. 'label_download': __('Download image "%1$s"', decodeURI(uri.filename()))
  72129. });
  72130. }
  72131. return url;
  72132. };
  72133. u.renderMovieURL = function (_converse, url) {
  72134. if (url.endsWith('mp4') || url.endsWith('webm')) {
  72135. const __ = _converse.__,
  72136. uri = new URI(url);
  72137. return tpl_video({
  72138. 'url': url,
  72139. 'label_download': __('Download video file "%1$s"', decodeURI(uri.filename()))
  72140. });
  72141. }
  72142. return url;
  72143. };
  72144. u.renderAudioURL = function (_converse, url) {
  72145. if (url.endsWith('mp3') || url.endsWith('m4a') || url.endsWith('ogg')) {
  72146. const __ = _converse.__,
  72147. uri = new URI(url);
  72148. return tpl_audio({
  72149. 'url': url,
  72150. 'label_download': __('Download audio file "%1$s"', decodeURI(uri.filename()))
  72151. });
  72152. }
  72153. return url;
  72154. };
  72155. u.slideInAllElements = function (elements, duration = 300) {
  72156. return Promise.all(_.map(elements, _.partial(u.slideIn, _, duration)));
  72157. };
  72158. u.slideToggleElement = function (el, duration) {
  72159. if (_.includes(el.classList, 'collapsed') || _.includes(el.classList, 'hidden')) {
  72160. return u.slideOut(el, duration);
  72161. } else {
  72162. return u.slideIn(el, duration);
  72163. }
  72164. };
  72165. u.hasClass = function (className, el) {
  72166. return _.includes(el.classList, className);
  72167. };
  72168. u.slideOut = function (el, duration = 200) {
  72169. /* Shows/expands an element by sliding it out of itself
  72170. *
  72171. * Parameters:
  72172. * (HTMLElement) el - The HTML string
  72173. * (Number) duration - The duration amount in milliseconds
  72174. */
  72175. return new Promise((resolve, reject) => {
  72176. if (_.isNil(el)) {
  72177. const err = "Undefined or null element passed into slideOut";
  72178. logger.warn(err);
  72179. reject(new Error(err));
  72180. return;
  72181. }
  72182. const marker = el.getAttribute('data-slider-marker');
  72183. if (marker) {
  72184. el.removeAttribute('data-slider-marker');
  72185. window.cancelAnimationFrame(marker);
  72186. }
  72187. const end_height = u.calculateElementHeight(el);
  72188. if (window.converse_disable_effects) {
  72189. // Effects are disabled (for tests)
  72190. el.style.height = end_height + 'px';
  72191. slideOutWrapup(el);
  72192. resolve();
  72193. return;
  72194. }
  72195. if (!u.hasClass('collapsed', el) && !u.hasClass('hidden', el)) {
  72196. resolve();
  72197. return;
  72198. }
  72199. const steps = duration / 17; // We assume 17ms per animation which is ~60FPS
  72200. let height = 0;
  72201. function draw() {
  72202. height += end_height / steps;
  72203. if (height < end_height) {
  72204. el.style.height = height + 'px';
  72205. el.setAttribute('data-slider-marker', window.requestAnimationFrame(draw));
  72206. } else {
  72207. // We recalculate the height to work around an apparent
  72208. // browser bug where browsers don't know the correct
  72209. // offsetHeight beforehand.
  72210. el.removeAttribute('data-slider-marker');
  72211. el.style.height = u.calculateElementHeight(el) + 'px';
  72212. el.style.overflow = "";
  72213. el.style.height = "";
  72214. resolve();
  72215. }
  72216. }
  72217. el.style.height = '0';
  72218. el.style.overflow = 'hidden';
  72219. el.classList.remove('hidden');
  72220. el.classList.remove('collapsed');
  72221. el.setAttribute('data-slider-marker', window.requestAnimationFrame(draw));
  72222. });
  72223. };
  72224. u.slideIn = function (el, duration = 200) {
  72225. /* Hides/collapses an element by sliding it into itself. */
  72226. return new Promise((resolve, reject) => {
  72227. if (_.isNil(el)) {
  72228. const err = "Undefined or null element passed into slideIn";
  72229. logger.warn(err);
  72230. return reject(new Error(err));
  72231. } else if (_.includes(el.classList, 'collapsed')) {
  72232. return resolve(el);
  72233. } else if (window.converse_disable_effects) {
  72234. // Effects are disabled (for tests)
  72235. el.classList.add('collapsed');
  72236. el.style.height = "";
  72237. return resolve(el);
  72238. }
  72239. const marker = el.getAttribute('data-slider-marker');
  72240. if (marker) {
  72241. el.removeAttribute('data-slider-marker');
  72242. window.cancelAnimationFrame(marker);
  72243. }
  72244. const original_height = el.offsetHeight,
  72245. steps = duration / 17; // We assume 17ms per animation which is ~60FPS
  72246. let height = original_height;
  72247. el.style.overflow = 'hidden';
  72248. function draw() {
  72249. height -= original_height / steps;
  72250. if (height > 0) {
  72251. el.style.height = height + 'px';
  72252. el.setAttribute('data-slider-marker', window.requestAnimationFrame(draw));
  72253. } else {
  72254. el.removeAttribute('data-slider-marker');
  72255. el.classList.add('collapsed');
  72256. el.style.height = "";
  72257. resolve(el);
  72258. }
  72259. }
  72260. el.setAttribute('data-slider-marker', window.requestAnimationFrame(draw));
  72261. });
  72262. };
  72263. function afterAnimationEnds(el, callback) {
  72264. el.classList.remove('visible');
  72265. if (_.isFunction(callback)) {
  72266. callback();
  72267. }
  72268. }
  72269. u.fadeIn = function (el, callback) {
  72270. if (_.isNil(el)) {
  72271. logger.warn("Undefined or null element passed into fadeIn");
  72272. }
  72273. if (window.converse_disable_effects) {
  72274. el.classList.remove('hidden');
  72275. return afterAnimationEnds(el, callback);
  72276. }
  72277. if (_.includes(el.classList, 'hidden')) {
  72278. el.classList.add('visible');
  72279. el.classList.remove('hidden');
  72280. el.addEventListener("webkitAnimationEnd", _.partial(afterAnimationEnds, el, callback));
  72281. el.addEventListener("animationend", _.partial(afterAnimationEnds, el, callback));
  72282. el.addEventListener("oanimationend", _.partial(afterAnimationEnds, el, callback));
  72283. } else {
  72284. afterAnimationEnds(el, callback);
  72285. }
  72286. };
  72287. u.isValidJID = function (jid) {
  72288. return _.compact(jid.split('@')).length === 2 && !jid.startsWith('@') && !jid.endsWith('@');
  72289. };
  72290. u.isValidMUCJID = function (jid) {
  72291. return !jid.startsWith('@') && !jid.endsWith('@');
  72292. };
  72293. u.isSameBareJID = function (jid1, jid2) {
  72294. return Strophe.getBareJidFromJid(jid1).toLowerCase() === Strophe.getBareJidFromJid(jid2).toLowerCase();
  72295. };
  72296. u.getMostRecentMessage = function (model) {
  72297. const messages = model.messages.filter('message');
  72298. return messages[messages.length - 1];
  72299. };
  72300. u.isNewMessage = function (message) {
  72301. /* Given a stanza, determine whether it's a new
  72302. * message, i.e. not a MAM archived one.
  72303. */
  72304. if (message instanceof Element) {
  72305. return !(sizzle(`result[xmlns="${Strophe.NS.MAM}"]`, message).length && sizzle(`delay[xmlns="${Strophe.NS.DELAY}"]`, message).length);
  72306. } else {
  72307. return !(message.get('is_delayed') && message.get('is_archived'));
  72308. }
  72309. };
  72310. u.isOnlyChatStateNotification = function (attrs) {
  72311. if (attrs instanceof Backbone.Model) {
  72312. attrs = attrs.attributes;
  72313. }
  72314. return attrs['chat_state'] && !attrs['oob_url'] && !attrs['file'] && !attrs['message'];
  72315. };
  72316. u.isHeadlineMessage = function (_converse, message) {
  72317. var from_jid = message.getAttribute('from');
  72318. if (message.getAttribute('type') === 'headline') {
  72319. return true;
  72320. }
  72321. const chatbox = _converse.chatboxes.get(Strophe.getBareJidFromJid(from_jid));
  72322. if (chatbox && chatbox.get('type') === 'chatroom') {
  72323. return false;
  72324. }
  72325. if (message.getAttribute('type') !== 'error' && !_.isNil(from_jid) && !_.includes(from_jid, '@')) {
  72326. // Some servers (I'm looking at you Prosody) don't set the message
  72327. // type to "headline" when sending server messages. For now we
  72328. // check if an @ signal is included, and if not, we assume it's
  72329. // a headline message.
  72330. return true;
  72331. }
  72332. return false;
  72333. };
  72334. u.merge = function merge(first, second) {
  72335. /* Merge the second object into the first one.
  72336. */
  72337. for (var k in second) {
  72338. if (_.isObject(first[k])) {
  72339. merge(first[k], second[k]);
  72340. } else {
  72341. first[k] = second[k];
  72342. }
  72343. }
  72344. };
  72345. u.applyUserSettings = function applyUserSettings(context, settings, user_settings) {
  72346. /* Configuration settings might be nested objects. We only want to
  72347. * add settings which are whitelisted.
  72348. */
  72349. for (var k in settings) {
  72350. if (_.isUndefined(user_settings[k])) {
  72351. continue;
  72352. }
  72353. if (_.isObject(settings[k]) && !_.isArray(settings[k])) {
  72354. applyUserSettings(context[k], settings[k], user_settings[k]);
  72355. } else {
  72356. context[k] = user_settings[k];
  72357. }
  72358. }
  72359. };
  72360. u.stringToNode = function (s) {
  72361. /* Converts an HTML string into a DOM Node.
  72362. * Expects that the HTML string has only one top-level element,
  72363. * i.e. not multiple ones.
  72364. *
  72365. * Parameters:
  72366. * (String) s - The HTML string
  72367. */
  72368. var div = document.createElement('div');
  72369. div.innerHTML = s;
  72370. return div.firstElementChild;
  72371. };
  72372. u.getOuterWidth = function (el, include_margin = false) {
  72373. var width = el.offsetWidth;
  72374. if (!include_margin) {
  72375. return width;
  72376. }
  72377. var style = window.getComputedStyle(el);
  72378. width += parseInt(style.marginLeft, 10) + parseInt(style.marginRight, 10);
  72379. return width;
  72380. };
  72381. u.stringToElement = function (s) {
  72382. /* Converts an HTML string into a DOM element.
  72383. * Expects that the HTML string has only one top-level element,
  72384. * i.e. not multiple ones.
  72385. *
  72386. * Parameters:
  72387. * (String) s - The HTML string
  72388. */
  72389. var div = document.createElement('div');
  72390. div.innerHTML = s;
  72391. return div.firstElementChild;
  72392. };
  72393. u.matchesSelector = function (el, selector) {
  72394. /* Checks whether the DOM element matches the given selector.
  72395. *
  72396. * Parameters:
  72397. * (DOMElement) el - The DOM element
  72398. * (String) selector - The selector
  72399. */
  72400. return (el.matches || el.matchesSelector || el.msMatchesSelector || el.mozMatchesSelector || el.webkitMatchesSelector || el.oMatchesSelector).call(el, selector);
  72401. };
  72402. u.queryChildren = function (el, selector) {
  72403. /* Returns a list of children of the DOM element that match the
  72404. * selector.
  72405. *
  72406. * Parameters:
  72407. * (DOMElement) el - the DOM element
  72408. * (String) selector - the selector they should be matched
  72409. * against.
  72410. */
  72411. return _.filter(el.childNodes, _.partial(u.matchesSelector, _, selector));
  72412. };
  72413. u.contains = function (attr, query) {
  72414. return function (item) {
  72415. if (typeof attr === 'object') {
  72416. var value = false;
  72417. _.forEach(attr, function (a) {
  72418. value = value || _.includes(item.get(a).toLowerCase(), query.toLowerCase());
  72419. });
  72420. return value;
  72421. } else if (typeof attr === 'string') {
  72422. return _.includes(item.get(attr).toLowerCase(), query.toLowerCase());
  72423. } else {
  72424. throw new TypeError('contains: wrong attribute type. Must be string or array.');
  72425. }
  72426. };
  72427. };
  72428. u.isOfType = function (type, item) {
  72429. return item.get('type') == type;
  72430. };
  72431. u.isInstance = function (type, item) {
  72432. return item instanceof type;
  72433. };
  72434. u.getAttribute = function (key, item) {
  72435. return item.get(key);
  72436. };
  72437. u.contains.not = function (attr, query) {
  72438. return function (item) {
  72439. return !u.contains(attr, query)(item);
  72440. };
  72441. };
  72442. u.rootContains = function (root, el) {
  72443. // The document element does not have the contains method in IE.
  72444. if (root === document && !root.contains) {
  72445. return document.head.contains(el) || document.body.contains(el);
  72446. }
  72447. return root.contains ? root.contains(el) : window.HTMLElement.prototype.contains.call(root, el);
  72448. };
  72449. u.createFragmentFromText = function (markup) {
  72450. /* Returns a DocumentFragment containing DOM nodes based on the
  72451. * passed-in markup text.
  72452. */
  72453. // http://stackoverflow.com/questions/9334645/create-node-from-markup-string
  72454. var frag = document.createDocumentFragment(),
  72455. tmp = document.createElement('body'),
  72456. child;
  72457. tmp.innerHTML = markup; // Append elements in a loop to a DocumentFragment, so that the
  72458. // browser does not re-render the document for each node.
  72459. while (child = tmp.firstChild) {
  72460. // eslint-disable-line no-cond-assign
  72461. frag.appendChild(child);
  72462. }
  72463. return frag;
  72464. };
  72465. u.isPersistableModel = function (model) {
  72466. return model.collection && model.collection.browserStorage;
  72467. };
  72468. u.getResolveablePromise = function () {
  72469. /* Returns a promise object on which `resolve` or `reject` can be
  72470. * called.
  72471. */
  72472. const wrapper = {};
  72473. const promise = new Promise((resolve, reject) => {
  72474. wrapper.resolve = resolve;
  72475. wrapper.reject = reject;
  72476. });
  72477. _.assign(promise, wrapper);
  72478. return promise;
  72479. };
  72480. u.interpolate = function (string, o) {
  72481. return string.replace(/{{{([^{}]*)}}}/g, (a, b) => {
  72482. var r = o[b];
  72483. return typeof r === 'string' || typeof r === 'number' ? r : a;
  72484. });
  72485. };
  72486. u.onMultipleEvents = function (events = [], callback) {
  72487. /* Call the callback once all the events have been triggered
  72488. *
  72489. * Parameters:
  72490. * (Array) events: An array of objects, with keys `object` and
  72491. * `event`, representing the event name and the object it's
  72492. * triggered upon.
  72493. * (Function) callback: The function to call once all events have
  72494. * been triggered.
  72495. */
  72496. let triggered = [];
  72497. function handler(result) {
  72498. triggered.push(result);
  72499. if (events.length === triggered.length) {
  72500. callback(triggered);
  72501. triggered = [];
  72502. }
  72503. }
  72504. _.each(events, map => map.object.on(map.event, handler));
  72505. };
  72506. u.safeSave = function (model, attributes) {
  72507. if (u.isPersistableModel(model)) {
  72508. model.save(attributes);
  72509. } else {
  72510. model.set(attributes);
  72511. }
  72512. };
  72513. u.siblingIndex = function (el) {
  72514. /* eslint-disable no-cond-assign */
  72515. for (var i = 0; el = el.previousElementSibling; i++);
  72516. return i;
  72517. };
  72518. u.getCurrentWord = function (input) {
  72519. const cursor = input.selectionEnd || undefined;
  72520. return _.last(input.value.slice(0, cursor).split(' '));
  72521. };
  72522. u.replaceCurrentWord = function (input, new_value) {
  72523. const cursor = input.selectionEnd || undefined,
  72524. current_word = _.last(input.value.slice(0, cursor).split(' ')),
  72525. value = input.value;
  72526. input.value = value.slice(0, cursor - current_word.length) + `${new_value} ` + value.slice(cursor);
  72527. input.selectionEnd = cursor - current_word.length + new_value.length + 1;
  72528. };
  72529. u.isVisible = function (el) {
  72530. if (u.hasClass('hidden', el)) {
  72531. return false;
  72532. } // XXX: Taken from jQuery's "visible" implementation
  72533. return el.offsetWidth > 0 || el.offsetHeight > 0 || el.getClientRects().length > 0;
  72534. };
  72535. u.triggerEvent = function (el, name, type = "Event", bubbles = true, cancelable = true) {
  72536. const evt = document.createEvent(type);
  72537. evt.initEvent(name, bubbles, cancelable);
  72538. el.dispatchEvent(evt);
  72539. };
  72540. u.geoUriToHttp = function (text, geouri_replacement) {
  72541. const regex = /geo:([\-0-9.]+),([\-0-9.]+)(?:,([\-0-9.]+))?(?:\?(.*))?/g;
  72542. return text.replace(regex, geouri_replacement);
  72543. };
  72544. u.httpToGeoUri = function (text, _converse) {
  72545. const replacement = 'geo:$1,$2';
  72546. return text.replace(_converse.geouri_regex, replacement);
  72547. };
  72548. u.getSelectValues = function (select) {
  72549. const result = [];
  72550. const options = select && select.options;
  72551. for (var i = 0, iLen = options.length; i < iLen; i++) {
  72552. const opt = options[i];
  72553. if (opt.selected) {
  72554. result.push(opt.value || opt.text);
  72555. }
  72556. }
  72557. return result;
  72558. };
  72559. u.formatFingerprint = function (fp) {
  72560. fp = fp.replace(/^05/, '');
  72561. const arr = [];
  72562. for (let i = 1; i < 8; i++) {
  72563. const idx = i * 8 + i - 1;
  72564. fp = fp.slice(0, idx) + ' ' + fp.slice(idx);
  72565. }
  72566. return fp;
  72567. };
  72568. u.appendArrayBuffer = function (buffer1, buffer2) {
  72569. const tmp = new Uint8Array(buffer1.byteLength + buffer2.byteLength);
  72570. tmp.set(new Uint8Array(buffer1), 0);
  72571. tmp.set(new Uint8Array(buffer2), buffer1.byteLength);
  72572. return tmp.buffer;
  72573. };
  72574. u.arrayBufferToHex = function (ab) {
  72575. // https://stackoverflow.com/questions/40031688/javascript-arraybuffer-to-hex#40031979
  72576. return Array.prototype.map.call(new Uint8Array(ab), x => ('00' + x.toString(16)).slice(-2)).join('');
  72577. };
  72578. u.arrayBufferToString = function (ab) {
  72579. return new TextDecoder("utf-8").decode(ab);
  72580. };
  72581. u.stringToArrayBuffer = function (string) {
  72582. const bytes = new TextEncoder("utf-8").encode(string);
  72583. return bytes.buffer;
  72584. };
  72585. u.arrayBufferToBase64 = function (ab) {
  72586. return btoa(new Uint8Array(ab).reduce((data, byte) => data + String.fromCharCode(byte), ''));
  72587. };
  72588. u.base64ToArrayBuffer = function (b64) {
  72589. const binary_string = window.atob(b64),
  72590. len = binary_string.length,
  72591. bytes = new Uint8Array(len);
  72592. for (let i = 0; i < len; i++) {
  72593. bytes[i] = binary_string.charCodeAt(i);
  72594. }
  72595. return bytes.buffer;
  72596. };
  72597. u.getRandomInt = function (max) {
  72598. return Math.floor(Math.random() * Math.floor(max));
  72599. };
  72600. u.putCurserAtEnd = function (textarea) {
  72601. if (textarea !== document.activeElement) {
  72602. textarea.focus();
  72603. } // Double the length because Opera is inconsistent about whether a carriage return is one character or two.
  72604. const len = textarea.value.length * 2; // Timeout seems to be required for Blink
  72605. setTimeout(() => textarea.setSelectionRange(len, len), 1); // Scroll to the bottom, in case we're in a tall textarea
  72606. // (Necessary for Firefox and Chrome)
  72607. this.scrollTop = 999999;
  72608. };
  72609. u.getUniqueId = function () {
  72610. return 'xxxxxxxx-xxxx'.replace(/[x]/g, function (c) {
  72611. var r = Math.random() * 16 | 0,
  72612. v = c === 'x' ? r : r & 0x3 | 0x8;
  72613. return v.toString(16);
  72614. });
  72615. };
  72616. return u;
  72617. });
  72618. /***/ }),
  72619. /***/ "./src/utils/emoji.js":
  72620. /*!****************************!*\
  72621. !*** ./src/utils/emoji.js ***!
  72622. \****************************/
  72623. /*! no static exports found */
  72624. /***/ (function(module, exports, __webpack_require__) {
  72625. "use strict";
  72626. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  72627. (function (root, factory) {
  72628. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! lodash.noconflict */ "./src/lodash.noconflict.js"), __webpack_require__(/*! utils/core */ "./src/utils/core.js"), __webpack_require__(/*! twemoji */ "./node_modules/twemoji/2/esm.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  72629. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  72630. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  72631. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  72632. })(void 0, function (_, u, twemoji) {
  72633. "use strict";
  72634. const emoji_list = {
  72635. ":kiss_mm:": {
  72636. "uc_base": "1f468-2764-1f48b-1f468",
  72637. "uc_output": "1f468-200d-2764-fe0f-200d-1f48b-200d-1f468",
  72638. "uc_match": "1f468-2764-fe0f-1f48b-1f468",
  72639. "uc_greedy": "1f468-2764-1f48b-1f468",
  72640. "shortnames": [":couplekiss_mm:"],
  72641. "category": "people"
  72642. },
  72643. ":kiss_woman_man:": {
  72644. "uc_base": "1f469-2764-1f48b-1f468",
  72645. "uc_output": "1f469-200d-2764-fe0f-200d-1f48b-200d-1f468",
  72646. "uc_match": "1f469-2764-fe0f-1f48b-1f468",
  72647. "uc_greedy": "1f469-2764-1f48b-1f468",
  72648. "shortnames": [],
  72649. "category": "people"
  72650. },
  72651. ":kiss_ww:": {
  72652. "uc_base": "1f469-2764-1f48b-1f469",
  72653. "uc_output": "1f469-200d-2764-fe0f-200d-1f48b-200d-1f469",
  72654. "uc_match": "1f469-2764-fe0f-1f48b-1f469",
  72655. "uc_greedy": "1f469-2764-1f48b-1f469",
  72656. "shortnames": [":couplekiss_ww:"],
  72657. "category": "people"
  72658. },
  72659. ":england:": {
  72660. "uc_base": "1f3f4-e0067-e0062-e0065-e006e-e0067-e007f",
  72661. "uc_output": "1f3f4-e0067-e0062-e0065-e006e-e0067-e007f",
  72662. "uc_match": "1f3f4-e0067-e0062-e0065-e006e-e0067-e007f",
  72663. "uc_greedy": "1f3f4-e0067-e0062-e0065-e006e-e0067-e007f",
  72664. "shortnames": [],
  72665. "category": "flags"
  72666. },
  72667. ":scotland:": {
  72668. "uc_base": "1f3f4-e0067-e0062-e0073-e0063-e0074-e007f",
  72669. "uc_output": "1f3f4-e0067-e0062-e0073-e0063-e0074-e007f",
  72670. "uc_match": "1f3f4-e0067-e0062-e0073-e0063-e0074-e007f",
  72671. "uc_greedy": "1f3f4-e0067-e0062-e0073-e0063-e0074-e007f",
  72672. "shortnames": [],
  72673. "category": "flags"
  72674. },
  72675. ":wales:": {
  72676. "uc_base": "1f3f4-e0067-e0062-e0077-e006c-e0073-e007f",
  72677. "uc_output": "1f3f4-e0067-e0062-e0077-e006c-e0073-e007f",
  72678. "uc_match": "1f3f4-e0067-e0062-e0077-e006c-e0073-e007f",
  72679. "uc_greedy": "1f3f4-e0067-e0062-e0077-e006c-e0073-e007f",
  72680. "shortnames": [],
  72681. "category": "flags"
  72682. },
  72683. ":family_mmbb:": {
  72684. "uc_base": "1f468-1f468-1f466-1f466",
  72685. "uc_output": "1f468-200d-1f468-200d-1f466-200d-1f466",
  72686. "uc_match": "1f468-1f468-1f466-1f466",
  72687. "uc_greedy": "1f468-1f468-1f466-1f466",
  72688. "shortnames": [],
  72689. "category": "people"
  72690. },
  72691. ":family_mmgb:": {
  72692. "uc_base": "1f468-1f468-1f467-1f466",
  72693. "uc_output": "1f468-200d-1f468-200d-1f467-200d-1f466",
  72694. "uc_match": "1f468-1f468-1f467-1f466",
  72695. "uc_greedy": "1f468-1f468-1f467-1f466",
  72696. "shortnames": [],
  72697. "category": "people"
  72698. },
  72699. ":family_mmgg:": {
  72700. "uc_base": "1f468-1f468-1f467-1f467",
  72701. "uc_output": "1f468-200d-1f468-200d-1f467-200d-1f467",
  72702. "uc_match": "1f468-1f468-1f467-1f467",
  72703. "uc_greedy": "1f468-1f468-1f467-1f467",
  72704. "shortnames": [],
  72705. "category": "people"
  72706. },
  72707. ":family_mwbb:": {
  72708. "uc_base": "1f468-1f469-1f466-1f466",
  72709. "uc_output": "1f468-200d-1f469-200d-1f466-200d-1f466",
  72710. "uc_match": "1f468-1f469-1f466-1f466",
  72711. "uc_greedy": "1f468-1f469-1f466-1f466",
  72712. "shortnames": [],
  72713. "category": "people"
  72714. },
  72715. ":family_mwgb:": {
  72716. "uc_base": "1f468-1f469-1f467-1f466",
  72717. "uc_output": "1f468-200d-1f469-200d-1f467-200d-1f466",
  72718. "uc_match": "1f468-1f469-1f467-1f466",
  72719. "uc_greedy": "1f468-1f469-1f467-1f466",
  72720. "shortnames": [],
  72721. "category": "people"
  72722. },
  72723. ":family_mwgg:": {
  72724. "uc_base": "1f468-1f469-1f467-1f467",
  72725. "uc_output": "1f468-200d-1f469-200d-1f467-200d-1f467",
  72726. "uc_match": "1f468-1f469-1f467-1f467",
  72727. "uc_greedy": "1f468-1f469-1f467-1f467",
  72728. "shortnames": [],
  72729. "category": "people"
  72730. },
  72731. ":family_wwbb:": {
  72732. "uc_base": "1f469-1f469-1f466-1f466",
  72733. "uc_output": "1f469-200d-1f469-200d-1f466-200d-1f466",
  72734. "uc_match": "1f469-1f469-1f466-1f466",
  72735. "uc_greedy": "1f469-1f469-1f466-1f466",
  72736. "shortnames": [],
  72737. "category": "people"
  72738. },
  72739. ":family_wwgb:": {
  72740. "uc_base": "1f469-1f469-1f467-1f466",
  72741. "uc_output": "1f469-200d-1f469-200d-1f467-200d-1f466",
  72742. "uc_match": "1f469-1f469-1f467-1f466",
  72743. "uc_greedy": "1f469-1f469-1f467-1f466",
  72744. "shortnames": [],
  72745. "category": "people"
  72746. },
  72747. ":family_wwgg:": {
  72748. "uc_base": "1f469-1f469-1f467-1f467",
  72749. "uc_output": "1f469-200d-1f469-200d-1f467-200d-1f467",
  72750. "uc_match": "1f469-1f469-1f467-1f467",
  72751. "uc_greedy": "1f469-1f469-1f467-1f467",
  72752. "shortnames": [],
  72753. "category": "people"
  72754. },
  72755. ":couple_mm:": {
  72756. "uc_base": "1f468-2764-1f468",
  72757. "uc_output": "1f468-200d-2764-fe0f-200d-1f468",
  72758. "uc_match": "1f468-2764-fe0f-1f468",
  72759. "uc_greedy": "1f468-2764-1f468",
  72760. "shortnames": [":couple_with_heart_mm:"],
  72761. "category": "people"
  72762. },
  72763. ":couple_with_heart_woman_man:": {
  72764. "uc_base": "1f469-2764-1f468",
  72765. "uc_output": "1f469-200d-2764-fe0f-200d-1f468",
  72766. "uc_match": "1f469-2764-fe0f-1f468",
  72767. "uc_greedy": "1f469-2764-1f468",
  72768. "shortnames": [],
  72769. "category": "people"
  72770. },
  72771. ":couple_ww:": {
  72772. "uc_base": "1f469-2764-1f469",
  72773. "uc_output": "1f469-200d-2764-fe0f-200d-1f469",
  72774. "uc_match": "1f469-2764-fe0f-1f469",
  72775. "uc_greedy": "1f469-2764-1f469",
  72776. "shortnames": [":couple_with_heart_ww:"],
  72777. "category": "people"
  72778. },
  72779. ":family_man_boy_boy:": {
  72780. "uc_base": "1f468-1f466-1f466",
  72781. "uc_output": "1f468-200d-1f466-200d-1f466",
  72782. "uc_match": "1f468-1f466-1f466",
  72783. "uc_greedy": "1f468-1f466-1f466",
  72784. "shortnames": [],
  72785. "category": "people"
  72786. },
  72787. ":family_man_girl_boy:": {
  72788. "uc_base": "1f468-1f467-1f466",
  72789. "uc_output": "1f468-200d-1f467-200d-1f466",
  72790. "uc_match": "1f468-1f467-1f466",
  72791. "uc_greedy": "1f468-1f467-1f466",
  72792. "shortnames": [],
  72793. "category": "people"
  72794. },
  72795. ":family_man_girl_girl:": {
  72796. "uc_base": "1f468-1f467-1f467",
  72797. "uc_output": "1f468-200d-1f467-200d-1f467",
  72798. "uc_match": "1f468-1f467-1f467",
  72799. "uc_greedy": "1f468-1f467-1f467",
  72800. "shortnames": [],
  72801. "category": "people"
  72802. },
  72803. ":family_man_woman_boy:": {
  72804. "uc_base": "1f468-1f469-1f466",
  72805. "uc_output": "1f468-200d-1f469-200d-1f466",
  72806. "uc_match": "1f468-1f469-1f466",
  72807. "uc_greedy": "1f468-1f469-1f466",
  72808. "shortnames": [],
  72809. "category": "people"
  72810. },
  72811. ":family_mmb:": {
  72812. "uc_base": "1f468-1f468-1f466",
  72813. "uc_output": "1f468-200d-1f468-200d-1f466",
  72814. "uc_match": "1f468-1f468-1f466",
  72815. "uc_greedy": "1f468-1f468-1f466",
  72816. "shortnames": [],
  72817. "category": "people"
  72818. },
  72819. ":family_mmg:": {
  72820. "uc_base": "1f468-1f468-1f467",
  72821. "uc_output": "1f468-200d-1f468-200d-1f467",
  72822. "uc_match": "1f468-1f468-1f467",
  72823. "uc_greedy": "1f468-1f468-1f467",
  72824. "shortnames": [],
  72825. "category": "people"
  72826. },
  72827. ":family_mwg:": {
  72828. "uc_base": "1f468-1f469-1f467",
  72829. "uc_output": "1f468-200d-1f469-200d-1f467",
  72830. "uc_match": "1f468-1f469-1f467",
  72831. "uc_greedy": "1f468-1f469-1f467",
  72832. "shortnames": [],
  72833. "category": "people"
  72834. },
  72835. ":family_woman_boy_boy:": {
  72836. "uc_base": "1f469-1f466-1f466",
  72837. "uc_output": "1f469-200d-1f466-200d-1f466",
  72838. "uc_match": "1f469-1f466-1f466",
  72839. "uc_greedy": "1f469-1f466-1f466",
  72840. "shortnames": [],
  72841. "category": "people"
  72842. },
  72843. ":family_woman_girl_boy:": {
  72844. "uc_base": "1f469-1f467-1f466",
  72845. "uc_output": "1f469-200d-1f467-200d-1f466",
  72846. "uc_match": "1f469-1f467-1f466",
  72847. "uc_greedy": "1f469-1f467-1f466",
  72848. "shortnames": [],
  72849. "category": "people"
  72850. },
  72851. ":family_woman_girl_girl:": {
  72852. "uc_base": "1f469-1f467-1f467",
  72853. "uc_output": "1f469-200d-1f467-200d-1f467",
  72854. "uc_match": "1f469-1f467-1f467",
  72855. "uc_greedy": "1f469-1f467-1f467",
  72856. "shortnames": [],
  72857. "category": "people"
  72858. },
  72859. ":family_wwb:": {
  72860. "uc_base": "1f469-1f469-1f466",
  72861. "uc_output": "1f469-200d-1f469-200d-1f466",
  72862. "uc_match": "1f469-1f469-1f466",
  72863. "uc_greedy": "1f469-1f469-1f466",
  72864. "shortnames": [],
  72865. "category": "people"
  72866. },
  72867. ":family_wwg:": {
  72868. "uc_base": "1f469-1f469-1f467",
  72869. "uc_output": "1f469-200d-1f469-200d-1f467",
  72870. "uc_match": "1f469-1f469-1f467",
  72871. "uc_greedy": "1f469-1f469-1f467",
  72872. "shortnames": [],
  72873. "category": "people"
  72874. },
  72875. ":blond-haired_man_tone1:": {
  72876. "uc_base": "1f471-1f3fb-2642",
  72877. "uc_output": "1f471-1f3fb-200d-2642-fe0f",
  72878. "uc_match": "1f471-1f3fb-2642-fe0f",
  72879. "uc_greedy": "1f471-1f3fb-2642",
  72880. "shortnames": [":blond-haired_man_light_skin_tone:"],
  72881. "category": "people"
  72882. },
  72883. ":blond-haired_man_tone2:": {
  72884. "uc_base": "1f471-1f3fc-2642",
  72885. "uc_output": "1f471-1f3fc-200d-2642-fe0f",
  72886. "uc_match": "1f471-1f3fc-2642-fe0f",
  72887. "uc_greedy": "1f471-1f3fc-2642",
  72888. "shortnames": [":blond-haired_man_medium_light_skin_tone:"],
  72889. "category": "people"
  72890. },
  72891. ":blond-haired_man_tone3:": {
  72892. "uc_base": "1f471-1f3fd-2642",
  72893. "uc_output": "1f471-1f3fd-200d-2642-fe0f",
  72894. "uc_match": "1f471-1f3fd-2642-fe0f",
  72895. "uc_greedy": "1f471-1f3fd-2642",
  72896. "shortnames": [":blond-haired_man_medium_skin_tone:"],
  72897. "category": "people"
  72898. },
  72899. ":blond-haired_man_tone4:": {
  72900. "uc_base": "1f471-1f3fe-2642",
  72901. "uc_output": "1f471-1f3fe-200d-2642-fe0f",
  72902. "uc_match": "1f471-1f3fe-2642-fe0f",
  72903. "uc_greedy": "1f471-1f3fe-2642",
  72904. "shortnames": [":blond-haired_man_medium_dark_skin_tone:"],
  72905. "category": "people"
  72906. },
  72907. ":blond-haired_man_tone5:": {
  72908. "uc_base": "1f471-1f3ff-2642",
  72909. "uc_output": "1f471-1f3ff-200d-2642-fe0f",
  72910. "uc_match": "1f471-1f3ff-2642-fe0f",
  72911. "uc_greedy": "1f471-1f3ff-2642",
  72912. "shortnames": [":blond-haired_man_dark_skin_tone:"],
  72913. "category": "people"
  72914. },
  72915. ":blond-haired_woman_tone1:": {
  72916. "uc_base": "1f471-1f3fb-2640",
  72917. "uc_output": "1f471-1f3fb-200d-2640-fe0f",
  72918. "uc_match": "1f471-1f3fb-2640-fe0f",
  72919. "uc_greedy": "1f471-1f3fb-2640",
  72920. "shortnames": [":blond-haired_woman_light_skin_tone:"],
  72921. "category": "people"
  72922. },
  72923. ":blond-haired_woman_tone2:": {
  72924. "uc_base": "1f471-1f3fc-2640",
  72925. "uc_output": "1f471-1f3fc-200d-2640-fe0f",
  72926. "uc_match": "1f471-1f3fc-2640-fe0f",
  72927. "uc_greedy": "1f471-1f3fc-2640",
  72928. "shortnames": [":blond-haired_woman_medium_light_skin_tone:"],
  72929. "category": "people"
  72930. },
  72931. ":blond-haired_woman_tone3:": {
  72932. "uc_base": "1f471-1f3fd-2640",
  72933. "uc_output": "1f471-1f3fd-200d-2640-fe0f",
  72934. "uc_match": "1f471-1f3fd-2640-fe0f",
  72935. "uc_greedy": "1f471-1f3fd-2640",
  72936. "shortnames": [":blond-haired_woman_medium_skin_tone:"],
  72937. "category": "people"
  72938. },
  72939. ":blond-haired_woman_tone4:": {
  72940. "uc_base": "1f471-1f3fe-2640",
  72941. "uc_output": "1f471-1f3fe-200d-2640-fe0f",
  72942. "uc_match": "1f471-1f3fe-2640-fe0f",
  72943. "uc_greedy": "1f471-1f3fe-2640",
  72944. "shortnames": [":blond-haired_woman_medium_dark_skin_tone:"],
  72945. "category": "people"
  72946. },
  72947. ":blond-haired_woman_tone5:": {
  72948. "uc_base": "1f471-1f3ff-2640",
  72949. "uc_output": "1f471-1f3ff-200d-2640-fe0f",
  72950. "uc_match": "1f471-1f3ff-2640-fe0f",
  72951. "uc_greedy": "1f471-1f3ff-2640",
  72952. "shortnames": [":blond-haired_woman_dark_skin_tone:"],
  72953. "category": "people"
  72954. },
  72955. ":eye_in_speech_bubble:": {
  72956. "uc_base": "1f441-1f5e8",
  72957. "uc_output": "1f441-fe0f-200d-1f5e8-fe0f",
  72958. "uc_match": "1f441-fe0f-200d-1f5e8",
  72959. "uc_greedy": "1f441-1f5e8",
  72960. "shortnames": [],
  72961. "category": "symbols"
  72962. },
  72963. ":man_biking_tone1:": {
  72964. "uc_base": "1f6b4-1f3fb-2642",
  72965. "uc_output": "1f6b4-1f3fb-200d-2642-fe0f",
  72966. "uc_match": "1f6b4-1f3fb-2642-fe0f",
  72967. "uc_greedy": "1f6b4-1f3fb-2642",
  72968. "shortnames": [":man_biking_light_skin_tone:"],
  72969. "category": "activity"
  72970. },
  72971. ":man_biking_tone2:": {
  72972. "uc_base": "1f6b4-1f3fc-2642",
  72973. "uc_output": "1f6b4-1f3fc-200d-2642-fe0f",
  72974. "uc_match": "1f6b4-1f3fc-2642-fe0f",
  72975. "uc_greedy": "1f6b4-1f3fc-2642",
  72976. "shortnames": [":man_biking_medium_light_skin_tone:"],
  72977. "category": "activity"
  72978. },
  72979. ":man_biking_tone3:": {
  72980. "uc_base": "1f6b4-1f3fd-2642",
  72981. "uc_output": "1f6b4-1f3fd-200d-2642-fe0f",
  72982. "uc_match": "1f6b4-1f3fd-2642-fe0f",
  72983. "uc_greedy": "1f6b4-1f3fd-2642",
  72984. "shortnames": [":man_biking_medium_skin_tone:"],
  72985. "category": "activity"
  72986. },
  72987. ":man_biking_tone4:": {
  72988. "uc_base": "1f6b4-1f3fe-2642",
  72989. "uc_output": "1f6b4-1f3fe-200d-2642-fe0f",
  72990. "uc_match": "1f6b4-1f3fe-2642-fe0f",
  72991. "uc_greedy": "1f6b4-1f3fe-2642",
  72992. "shortnames": [":man_biking_medium_dark_skin_tone:"],
  72993. "category": "activity"
  72994. },
  72995. ":man_biking_tone5:": {
  72996. "uc_base": "1f6b4-1f3ff-2642",
  72997. "uc_output": "1f6b4-1f3ff-200d-2642-fe0f",
  72998. "uc_match": "1f6b4-1f3ff-2642-fe0f",
  72999. "uc_greedy": "1f6b4-1f3ff-2642",
  73000. "shortnames": [":man_biking_dark_skin_tone:"],
  73001. "category": "activity"
  73002. },
  73003. ":man_bowing_tone1:": {
  73004. "uc_base": "1f647-1f3fb-2642",
  73005. "uc_output": "1f647-1f3fb-200d-2642-fe0f",
  73006. "uc_match": "1f647-1f3fb-2642-fe0f",
  73007. "uc_greedy": "1f647-1f3fb-2642",
  73008. "shortnames": [":man_bowing_light_skin_tone:"],
  73009. "category": "people"
  73010. },
  73011. ":man_bowing_tone2:": {
  73012. "uc_base": "1f647-1f3fc-2642",
  73013. "uc_output": "1f647-1f3fc-200d-2642-fe0f",
  73014. "uc_match": "1f647-1f3fc-2642-fe0f",
  73015. "uc_greedy": "1f647-1f3fc-2642",
  73016. "shortnames": [":man_bowing_medium_light_skin_tone:"],
  73017. "category": "people"
  73018. },
  73019. ":man_bowing_tone3:": {
  73020. "uc_base": "1f647-1f3fd-2642",
  73021. "uc_output": "1f647-1f3fd-200d-2642-fe0f",
  73022. "uc_match": "1f647-1f3fd-2642-fe0f",
  73023. "uc_greedy": "1f647-1f3fd-2642",
  73024. "shortnames": [":man_bowing_medium_skin_tone:"],
  73025. "category": "people"
  73026. },
  73027. ":man_bowing_tone4:": {
  73028. "uc_base": "1f647-1f3fe-2642",
  73029. "uc_output": "1f647-1f3fe-200d-2642-fe0f",
  73030. "uc_match": "1f647-1f3fe-2642-fe0f",
  73031. "uc_greedy": "1f647-1f3fe-2642",
  73032. "shortnames": [":man_bowing_medium_dark_skin_tone:"],
  73033. "category": "people"
  73034. },
  73035. ":man_bowing_tone5:": {
  73036. "uc_base": "1f647-1f3ff-2642",
  73037. "uc_output": "1f647-1f3ff-200d-2642-fe0f",
  73038. "uc_match": "1f647-1f3ff-2642-fe0f",
  73039. "uc_greedy": "1f647-1f3ff-2642",
  73040. "shortnames": [":man_bowing_dark_skin_tone:"],
  73041. "category": "people"
  73042. },
  73043. ":man_cartwheeling_tone1:": {
  73044. "uc_base": "1f938-1f3fb-2642",
  73045. "uc_output": "1f938-1f3fb-200d-2642-fe0f",
  73046. "uc_match": "1f938-1f3fb-2642-fe0f",
  73047. "uc_greedy": "1f938-1f3fb-2642",
  73048. "shortnames": [":man_cartwheeling_light_skin_tone:"],
  73049. "category": "activity"
  73050. },
  73051. ":man_cartwheeling_tone2:": {
  73052. "uc_base": "1f938-1f3fc-2642",
  73053. "uc_output": "1f938-1f3fc-200d-2642-fe0f",
  73054. "uc_match": "1f938-1f3fc-2642-fe0f",
  73055. "uc_greedy": "1f938-1f3fc-2642",
  73056. "shortnames": [":man_cartwheeling_medium_light_skin_tone:"],
  73057. "category": "activity"
  73058. },
  73059. ":man_cartwheeling_tone3:": {
  73060. "uc_base": "1f938-1f3fd-2642",
  73061. "uc_output": "1f938-1f3fd-200d-2642-fe0f",
  73062. "uc_match": "1f938-1f3fd-2642-fe0f",
  73063. "uc_greedy": "1f938-1f3fd-2642",
  73064. "shortnames": [":man_cartwheeling_medium_skin_tone:"],
  73065. "category": "activity"
  73066. },
  73067. ":man_cartwheeling_tone4:": {
  73068. "uc_base": "1f938-1f3fe-2642",
  73069. "uc_output": "1f938-1f3fe-200d-2642-fe0f",
  73070. "uc_match": "1f938-1f3fe-2642-fe0f",
  73071. "uc_greedy": "1f938-1f3fe-2642",
  73072. "shortnames": [":man_cartwheeling_medium_dark_skin_tone:"],
  73073. "category": "activity"
  73074. },
  73075. ":man_cartwheeling_tone5:": {
  73076. "uc_base": "1f938-1f3ff-2642",
  73077. "uc_output": "1f938-1f3ff-200d-2642-fe0f",
  73078. "uc_match": "1f938-1f3ff-2642-fe0f",
  73079. "uc_greedy": "1f938-1f3ff-2642",
  73080. "shortnames": [":man_cartwheeling_dark_skin_tone:"],
  73081. "category": "activity"
  73082. },
  73083. ":man_climbing_tone1:": {
  73084. "uc_base": "1f9d7-1f3fb-2642",
  73085. "uc_output": "1f9d7-1f3fb-200d-2642-fe0f",
  73086. "uc_match": "1f9d7-1f3fb-2642-fe0f",
  73087. "uc_greedy": "1f9d7-1f3fb-2642",
  73088. "shortnames": [":man_climbing_light_skin_tone:"],
  73089. "category": "activity"
  73090. },
  73091. ":man_climbing_tone2:": {
  73092. "uc_base": "1f9d7-1f3fc-2642",
  73093. "uc_output": "1f9d7-1f3fc-200d-2642-fe0f",
  73094. "uc_match": "1f9d7-1f3fc-2642-fe0f",
  73095. "uc_greedy": "1f9d7-1f3fc-2642",
  73096. "shortnames": [":man_climbing_medium_light_skin_tone:"],
  73097. "category": "activity"
  73098. },
  73099. ":man_climbing_tone3:": {
  73100. "uc_base": "1f9d7-1f3fd-2642",
  73101. "uc_output": "1f9d7-1f3fd-200d-2642-fe0f",
  73102. "uc_match": "1f9d7-1f3fd-2642-fe0f",
  73103. "uc_greedy": "1f9d7-1f3fd-2642",
  73104. "shortnames": [":man_climbing_medium_skin_tone:"],
  73105. "category": "activity"
  73106. },
  73107. ":man_climbing_tone4:": {
  73108. "uc_base": "1f9d7-1f3fe-2642",
  73109. "uc_output": "1f9d7-1f3fe-200d-2642-fe0f",
  73110. "uc_match": "1f9d7-1f3fe-2642-fe0f",
  73111. "uc_greedy": "1f9d7-1f3fe-2642",
  73112. "shortnames": [":man_climbing_medium_dark_skin_tone:"],
  73113. "category": "activity"
  73114. },
  73115. ":man_climbing_tone5:": {
  73116. "uc_base": "1f9d7-1f3ff-2642",
  73117. "uc_output": "1f9d7-1f3ff-200d-2642-fe0f",
  73118. "uc_match": "1f9d7-1f3ff-2642-fe0f",
  73119. "uc_greedy": "1f9d7-1f3ff-2642",
  73120. "shortnames": [":man_climbing_dark_skin_tone:"],
  73121. "category": "activity"
  73122. },
  73123. ":man_construction_worker_tone1:": {
  73124. "uc_base": "1f477-1f3fb-2642",
  73125. "uc_output": "1f477-1f3fb-200d-2642-fe0f",
  73126. "uc_match": "1f477-1f3fb-2642-fe0f",
  73127. "uc_greedy": "1f477-1f3fb-2642",
  73128. "shortnames": [":man_construction_worker_light_skin_tone:"],
  73129. "category": "people"
  73130. },
  73131. ":man_construction_worker_tone2:": {
  73132. "uc_base": "1f477-1f3fc-2642",
  73133. "uc_output": "1f477-1f3fc-200d-2642-fe0f",
  73134. "uc_match": "1f477-1f3fc-2642-fe0f",
  73135. "uc_greedy": "1f477-1f3fc-2642",
  73136. "shortnames": [":man_construction_worker_medium_light_skin_tone:"],
  73137. "category": "people"
  73138. },
  73139. ":man_construction_worker_tone3:": {
  73140. "uc_base": "1f477-1f3fd-2642",
  73141. "uc_output": "1f477-1f3fd-200d-2642-fe0f",
  73142. "uc_match": "1f477-1f3fd-2642-fe0f",
  73143. "uc_greedy": "1f477-1f3fd-2642",
  73144. "shortnames": [":man_construction_worker_medium_skin_tone:"],
  73145. "category": "people"
  73146. },
  73147. ":man_construction_worker_tone4:": {
  73148. "uc_base": "1f477-1f3fe-2642",
  73149. "uc_output": "1f477-1f3fe-200d-2642-fe0f",
  73150. "uc_match": "1f477-1f3fe-2642-fe0f",
  73151. "uc_greedy": "1f477-1f3fe-2642",
  73152. "shortnames": [":man_construction_worker_medium_dark_skin_tone:"],
  73153. "category": "people"
  73154. },
  73155. ":man_construction_worker_tone5:": {
  73156. "uc_base": "1f477-1f3ff-2642",
  73157. "uc_output": "1f477-1f3ff-200d-2642-fe0f",
  73158. "uc_match": "1f477-1f3ff-2642-fe0f",
  73159. "uc_greedy": "1f477-1f3ff-2642",
  73160. "shortnames": [":man_construction_worker_dark_skin_tone:"],
  73161. "category": "people"
  73162. },
  73163. ":man_detective_tone1:": {
  73164. "uc_base": "1f575-1f3fb-2642",
  73165. "uc_output": "1f575-1f3fb-200d-2642-fe0f",
  73166. "uc_match": "1f575-fe0f-1f3fb-2642-fe0f",
  73167. "uc_greedy": "1f575-1f3fb-2642",
  73168. "shortnames": [":man_detective_light_skin_tone:"],
  73169. "category": "people"
  73170. },
  73171. ":man_detective_tone2:": {
  73172. "uc_base": "1f575-1f3fc-2642",
  73173. "uc_output": "1f575-1f3fc-200d-2642-fe0f",
  73174. "uc_match": "1f575-fe0f-1f3fc-2642-fe0f",
  73175. "uc_greedy": "1f575-1f3fc-2642",
  73176. "shortnames": [":man_detective_medium_light_skin_tone:"],
  73177. "category": "people"
  73178. },
  73179. ":man_detective_tone3:": {
  73180. "uc_base": "1f575-1f3fd-2642",
  73181. "uc_output": "1f575-1f3fd-200d-2642-fe0f",
  73182. "uc_match": "1f575-fe0f-1f3fd-2642-fe0f",
  73183. "uc_greedy": "1f575-1f3fd-2642",
  73184. "shortnames": [":man_detective_medium_skin_tone:"],
  73185. "category": "people"
  73186. },
  73187. ":man_detective_tone4:": {
  73188. "uc_base": "1f575-1f3fe-2642",
  73189. "uc_output": "1f575-1f3fe-200d-2642-fe0f",
  73190. "uc_match": "1f575-fe0f-1f3fe-2642-fe0f",
  73191. "uc_greedy": "1f575-1f3fe-2642",
  73192. "shortnames": [":man_detective_medium_dark_skin_tone:"],
  73193. "category": "people"
  73194. },
  73195. ":man_detective_tone5:": {
  73196. "uc_base": "1f575-1f3ff-2642",
  73197. "uc_output": "1f575-1f3ff-200d-2642-fe0f",
  73198. "uc_match": "1f575-fe0f-1f3ff-2642-fe0f",
  73199. "uc_greedy": "1f575-1f3ff-2642",
  73200. "shortnames": [":man_detective_dark_skin_tone:"],
  73201. "category": "people"
  73202. },
  73203. ":man_elf_tone1:": {
  73204. "uc_base": "1f9dd-1f3fb-2642",
  73205. "uc_output": "1f9dd-1f3fb-200d-2642-fe0f",
  73206. "uc_match": "1f9dd-1f3fb-2642-fe0f",
  73207. "uc_greedy": "1f9dd-1f3fb-2642",
  73208. "shortnames": [":man_elf_light_skin_tone:"],
  73209. "category": "people"
  73210. },
  73211. ":man_elf_tone2:": {
  73212. "uc_base": "1f9dd-1f3fc-2642",
  73213. "uc_output": "1f9dd-1f3fc-200d-2642-fe0f",
  73214. "uc_match": "1f9dd-1f3fc-2642-fe0f",
  73215. "uc_greedy": "1f9dd-1f3fc-2642",
  73216. "shortnames": [":man_elf_medium_light_skin_tone:"],
  73217. "category": "people"
  73218. },
  73219. ":man_elf_tone3:": {
  73220. "uc_base": "1f9dd-1f3fd-2642",
  73221. "uc_output": "1f9dd-1f3fd-200d-2642-fe0f",
  73222. "uc_match": "1f9dd-1f3fd-2642-fe0f",
  73223. "uc_greedy": "1f9dd-1f3fd-2642",
  73224. "shortnames": [":man_elf_medium_skin_tone:"],
  73225. "category": "people"
  73226. },
  73227. ":man_elf_tone4:": {
  73228. "uc_base": "1f9dd-1f3fe-2642",
  73229. "uc_output": "1f9dd-1f3fe-200d-2642-fe0f",
  73230. "uc_match": "1f9dd-1f3fe-2642-fe0f",
  73231. "uc_greedy": "1f9dd-1f3fe-2642",
  73232. "shortnames": [":man_elf_medium_dark_skin_tone:"],
  73233. "category": "people"
  73234. },
  73235. ":man_elf_tone5:": {
  73236. "uc_base": "1f9dd-1f3ff-2642",
  73237. "uc_output": "1f9dd-1f3ff-200d-2642-fe0f",
  73238. "uc_match": "1f9dd-1f3ff-2642-fe0f",
  73239. "uc_greedy": "1f9dd-1f3ff-2642",
  73240. "shortnames": [":man_elf_dark_skin_tone:"],
  73241. "category": "people"
  73242. },
  73243. ":man_facepalming_tone1:": {
  73244. "uc_base": "1f926-1f3fb-2642",
  73245. "uc_output": "1f926-1f3fb-200d-2642-fe0f",
  73246. "uc_match": "1f926-1f3fb-2642-fe0f",
  73247. "uc_greedy": "1f926-1f3fb-2642",
  73248. "shortnames": [":man_facepalming_light_skin_tone:"],
  73249. "category": "people"
  73250. },
  73251. ":man_facepalming_tone2:": {
  73252. "uc_base": "1f926-1f3fc-2642",
  73253. "uc_output": "1f926-1f3fc-200d-2642-fe0f",
  73254. "uc_match": "1f926-1f3fc-2642-fe0f",
  73255. "uc_greedy": "1f926-1f3fc-2642",
  73256. "shortnames": [":man_facepalming_medium_light_skin_tone:"],
  73257. "category": "people"
  73258. },
  73259. ":man_facepalming_tone3:": {
  73260. "uc_base": "1f926-1f3fd-2642",
  73261. "uc_output": "1f926-1f3fd-200d-2642-fe0f",
  73262. "uc_match": "1f926-1f3fd-2642-fe0f",
  73263. "uc_greedy": "1f926-1f3fd-2642",
  73264. "shortnames": [":man_facepalming_medium_skin_tone:"],
  73265. "category": "people"
  73266. },
  73267. ":man_facepalming_tone4:": {
  73268. "uc_base": "1f926-1f3fe-2642",
  73269. "uc_output": "1f926-1f3fe-200d-2642-fe0f",
  73270. "uc_match": "1f926-1f3fe-2642-fe0f",
  73271. "uc_greedy": "1f926-1f3fe-2642",
  73272. "shortnames": [":man_facepalming_medium_dark_skin_tone:"],
  73273. "category": "people"
  73274. },
  73275. ":man_facepalming_tone5:": {
  73276. "uc_base": "1f926-1f3ff-2642",
  73277. "uc_output": "1f926-1f3ff-200d-2642-fe0f",
  73278. "uc_match": "1f926-1f3ff-2642-fe0f",
  73279. "uc_greedy": "1f926-1f3ff-2642",
  73280. "shortnames": [":man_facepalming_dark_skin_tone:"],
  73281. "category": "people"
  73282. },
  73283. ":man_fairy_tone1:": {
  73284. "uc_base": "1f9da-1f3fb-2642",
  73285. "uc_output": "1f9da-1f3fb-200d-2642-fe0f",
  73286. "uc_match": "1f9da-1f3fb-2642-fe0f",
  73287. "uc_greedy": "1f9da-1f3fb-2642",
  73288. "shortnames": [":man_fairy_light_skin_tone:"],
  73289. "category": "people"
  73290. },
  73291. ":man_fairy_tone2:": {
  73292. "uc_base": "1f9da-1f3fc-2642",
  73293. "uc_output": "1f9da-1f3fc-200d-2642-fe0f",
  73294. "uc_match": "1f9da-1f3fc-2642-fe0f",
  73295. "uc_greedy": "1f9da-1f3fc-2642",
  73296. "shortnames": [":man_fairy_medium_light_skin_tone:"],
  73297. "category": "people"
  73298. },
  73299. ":man_fairy_tone3:": {
  73300. "uc_base": "1f9da-1f3fd-2642",
  73301. "uc_output": "1f9da-1f3fd-200d-2642-fe0f",
  73302. "uc_match": "1f9da-1f3fd-2642-fe0f",
  73303. "uc_greedy": "1f9da-1f3fd-2642",
  73304. "shortnames": [":man_fairy_medium_skin_tone:"],
  73305. "category": "people"
  73306. },
  73307. ":man_fairy_tone4:": {
  73308. "uc_base": "1f9da-1f3fe-2642",
  73309. "uc_output": "1f9da-1f3fe-200d-2642-fe0f",
  73310. "uc_match": "1f9da-1f3fe-2642-fe0f",
  73311. "uc_greedy": "1f9da-1f3fe-2642",
  73312. "shortnames": [":man_fairy_medium_dark_skin_tone:"],
  73313. "category": "people"
  73314. },
  73315. ":man_fairy_tone5:": {
  73316. "uc_base": "1f9da-1f3ff-2642",
  73317. "uc_output": "1f9da-1f3ff-200d-2642-fe0f",
  73318. "uc_match": "1f9da-1f3ff-2642-fe0f",
  73319. "uc_greedy": "1f9da-1f3ff-2642",
  73320. "shortnames": [":man_fairy_dark_skin_tone:"],
  73321. "category": "people"
  73322. },
  73323. ":man_frowning_tone1:": {
  73324. "uc_base": "1f64d-1f3fb-2642",
  73325. "uc_output": "1f64d-1f3fb-200d-2642-fe0f",
  73326. "uc_match": "1f64d-1f3fb-2642-fe0f",
  73327. "uc_greedy": "1f64d-1f3fb-2642",
  73328. "shortnames": [":man_frowning_light_skin_tone:"],
  73329. "category": "people"
  73330. },
  73331. ":man_frowning_tone2:": {
  73332. "uc_base": "1f64d-1f3fc-2642",
  73333. "uc_output": "1f64d-1f3fc-200d-2642-fe0f",
  73334. "uc_match": "1f64d-1f3fc-2642-fe0f",
  73335. "uc_greedy": "1f64d-1f3fc-2642",
  73336. "shortnames": [":man_frowning_medium_light_skin_tone:"],
  73337. "category": "people"
  73338. },
  73339. ":man_frowning_tone3:": {
  73340. "uc_base": "1f64d-1f3fd-2642",
  73341. "uc_output": "1f64d-1f3fd-200d-2642-fe0f",
  73342. "uc_match": "1f64d-1f3fd-2642-fe0f",
  73343. "uc_greedy": "1f64d-1f3fd-2642",
  73344. "shortnames": [":man_frowning_medium_skin_tone:"],
  73345. "category": "people"
  73346. },
  73347. ":man_frowning_tone4:": {
  73348. "uc_base": "1f64d-1f3fe-2642",
  73349. "uc_output": "1f64d-1f3fe-200d-2642-fe0f",
  73350. "uc_match": "1f64d-1f3fe-2642-fe0f",
  73351. "uc_greedy": "1f64d-1f3fe-2642",
  73352. "shortnames": [":man_frowning_medium_dark_skin_tone:"],
  73353. "category": "people"
  73354. },
  73355. ":man_frowning_tone5:": {
  73356. "uc_base": "1f64d-1f3ff-2642",
  73357. "uc_output": "1f64d-1f3ff-200d-2642-fe0f",
  73358. "uc_match": "1f64d-1f3ff-2642-fe0f",
  73359. "uc_greedy": "1f64d-1f3ff-2642",
  73360. "shortnames": [":man_frowning_dark_skin_tone:"],
  73361. "category": "people"
  73362. },
  73363. ":man_gesturing_no_tone1:": {
  73364. "uc_base": "1f645-1f3fb-2642",
  73365. "uc_output": "1f645-1f3fb-200d-2642-fe0f",
  73366. "uc_match": "1f645-1f3fb-2642-fe0f",
  73367. "uc_greedy": "1f645-1f3fb-2642",
  73368. "shortnames": [":man_gesturing_no_light_skin_tone:"],
  73369. "category": "people"
  73370. },
  73371. ":man_gesturing_no_tone2:": {
  73372. "uc_base": "1f645-1f3fc-2642",
  73373. "uc_output": "1f645-1f3fc-200d-2642-fe0f",
  73374. "uc_match": "1f645-1f3fc-2642-fe0f",
  73375. "uc_greedy": "1f645-1f3fc-2642",
  73376. "shortnames": [":man_gesturing_no_medium_light_skin_tone:"],
  73377. "category": "people"
  73378. },
  73379. ":man_gesturing_no_tone3:": {
  73380. "uc_base": "1f645-1f3fd-2642",
  73381. "uc_output": "1f645-1f3fd-200d-2642-fe0f",
  73382. "uc_match": "1f645-1f3fd-2642-fe0f",
  73383. "uc_greedy": "1f645-1f3fd-2642",
  73384. "shortnames": [":man_gesturing_no_medium_skin_tone:"],
  73385. "category": "people"
  73386. },
  73387. ":man_gesturing_no_tone4:": {
  73388. "uc_base": "1f645-1f3fe-2642",
  73389. "uc_output": "1f645-1f3fe-200d-2642-fe0f",
  73390. "uc_match": "1f645-1f3fe-2642-fe0f",
  73391. "uc_greedy": "1f645-1f3fe-2642",
  73392. "shortnames": [":man_gesturing_no_medium_dark_skin_tone:"],
  73393. "category": "people"
  73394. },
  73395. ":man_gesturing_no_tone5:": {
  73396. "uc_base": "1f645-1f3ff-2642",
  73397. "uc_output": "1f645-1f3ff-200d-2642-fe0f",
  73398. "uc_match": "1f645-1f3ff-2642-fe0f",
  73399. "uc_greedy": "1f645-1f3ff-2642",
  73400. "shortnames": [":man_gesturing_no_dark_skin_tone:"],
  73401. "category": "people"
  73402. },
  73403. ":man_gesturing_ok_tone1:": {
  73404. "uc_base": "1f646-1f3fb-2642",
  73405. "uc_output": "1f646-1f3fb-200d-2642-fe0f",
  73406. "uc_match": "1f646-1f3fb-2642-fe0f",
  73407. "uc_greedy": "1f646-1f3fb-2642",
  73408. "shortnames": [":man_gesturing_ok_light_skin_tone:"],
  73409. "category": "people"
  73410. },
  73411. ":man_gesturing_ok_tone2:": {
  73412. "uc_base": "1f646-1f3fc-2642",
  73413. "uc_output": "1f646-1f3fc-200d-2642-fe0f",
  73414. "uc_match": "1f646-1f3fc-2642-fe0f",
  73415. "uc_greedy": "1f646-1f3fc-2642",
  73416. "shortnames": [":man_gesturing_ok_medium_light_skin_tone:"],
  73417. "category": "people"
  73418. },
  73419. ":man_gesturing_ok_tone3:": {
  73420. "uc_base": "1f646-1f3fd-2642",
  73421. "uc_output": "1f646-1f3fd-200d-2642-fe0f",
  73422. "uc_match": "1f646-1f3fd-2642-fe0f",
  73423. "uc_greedy": "1f646-1f3fd-2642",
  73424. "shortnames": [":man_gesturing_ok_medium_skin_tone:"],
  73425. "category": "people"
  73426. },
  73427. ":man_gesturing_ok_tone4:": {
  73428. "uc_base": "1f646-1f3fe-2642",
  73429. "uc_output": "1f646-1f3fe-200d-2642-fe0f",
  73430. "uc_match": "1f646-1f3fe-2642-fe0f",
  73431. "uc_greedy": "1f646-1f3fe-2642",
  73432. "shortnames": [":man_gesturing_ok_medium_dark_skin_tone:"],
  73433. "category": "people"
  73434. },
  73435. ":man_gesturing_ok_tone5:": {
  73436. "uc_base": "1f646-1f3ff-2642",
  73437. "uc_output": "1f646-1f3ff-200d-2642-fe0f",
  73438. "uc_match": "1f646-1f3ff-2642-fe0f",
  73439. "uc_greedy": "1f646-1f3ff-2642",
  73440. "shortnames": [":man_gesturing_ok_dark_skin_tone:"],
  73441. "category": "people"
  73442. },
  73443. ":man_getting_face_massage_tone1:": {
  73444. "uc_base": "1f486-1f3fb-2642",
  73445. "uc_output": "1f486-1f3fb-200d-2642-fe0f",
  73446. "uc_match": "1f486-1f3fb-2642-fe0f",
  73447. "uc_greedy": "1f486-1f3fb-2642",
  73448. "shortnames": [":man_getting_face_massage_light_skin_tone:"],
  73449. "category": "people"
  73450. },
  73451. ":man_getting_face_massage_tone2:": {
  73452. "uc_base": "1f486-1f3fc-2642",
  73453. "uc_output": "1f486-1f3fc-200d-2642-fe0f",
  73454. "uc_match": "1f486-1f3fc-2642-fe0f",
  73455. "uc_greedy": "1f486-1f3fc-2642",
  73456. "shortnames": [":man_getting_face_massage_medium_light_skin_tone:"],
  73457. "category": "people"
  73458. },
  73459. ":man_getting_face_massage_tone3:": {
  73460. "uc_base": "1f486-1f3fd-2642",
  73461. "uc_output": "1f486-1f3fd-200d-2642-fe0f",
  73462. "uc_match": "1f486-1f3fd-2642-fe0f",
  73463. "uc_greedy": "1f486-1f3fd-2642",
  73464. "shortnames": [":man_getting_face_massage_medium_skin_tone:"],
  73465. "category": "people"
  73466. },
  73467. ":man_getting_face_massage_tone4:": {
  73468. "uc_base": "1f486-1f3fe-2642",
  73469. "uc_output": "1f486-1f3fe-200d-2642-fe0f",
  73470. "uc_match": "1f486-1f3fe-2642-fe0f",
  73471. "uc_greedy": "1f486-1f3fe-2642",
  73472. "shortnames": [":man_getting_face_massage_medium_dark_skin_tone:"],
  73473. "category": "people"
  73474. },
  73475. ":man_getting_face_massage_tone5:": {
  73476. "uc_base": "1f486-1f3ff-2642",
  73477. "uc_output": "1f486-1f3ff-200d-2642-fe0f",
  73478. "uc_match": "1f486-1f3ff-2642-fe0f",
  73479. "uc_greedy": "1f486-1f3ff-2642",
  73480. "shortnames": [":man_getting_face_massage_dark_skin_tone:"],
  73481. "category": "people"
  73482. },
  73483. ":man_getting_haircut_tone1:": {
  73484. "uc_base": "1f487-1f3fb-2642",
  73485. "uc_output": "1f487-1f3fb-200d-2642-fe0f",
  73486. "uc_match": "1f487-1f3fb-2642-fe0f",
  73487. "uc_greedy": "1f487-1f3fb-2642",
  73488. "shortnames": [":man_getting_haircut_light_skin_tone:"],
  73489. "category": "people"
  73490. },
  73491. ":man_getting_haircut_tone2:": {
  73492. "uc_base": "1f487-1f3fc-2642",
  73493. "uc_output": "1f487-1f3fc-200d-2642-fe0f",
  73494. "uc_match": "1f487-1f3fc-2642-fe0f",
  73495. "uc_greedy": "1f487-1f3fc-2642",
  73496. "shortnames": [":man_getting_haircut_medium_light_skin_tone:"],
  73497. "category": "people"
  73498. },
  73499. ":man_getting_haircut_tone3:": {
  73500. "uc_base": "1f487-1f3fd-2642",
  73501. "uc_output": "1f487-1f3fd-200d-2642-fe0f",
  73502. "uc_match": "1f487-1f3fd-2642-fe0f",
  73503. "uc_greedy": "1f487-1f3fd-2642",
  73504. "shortnames": [":man_getting_haircut_medium_skin_tone:"],
  73505. "category": "people"
  73506. },
  73507. ":man_getting_haircut_tone4:": {
  73508. "uc_base": "1f487-1f3fe-2642",
  73509. "uc_output": "1f487-1f3fe-200d-2642-fe0f",
  73510. "uc_match": "1f487-1f3fe-2642-fe0f",
  73511. "uc_greedy": "1f487-1f3fe-2642",
  73512. "shortnames": [":man_getting_haircut_medium_dark_skin_tone:"],
  73513. "category": "people"
  73514. },
  73515. ":man_getting_haircut_tone5:": {
  73516. "uc_base": "1f487-1f3ff-2642",
  73517. "uc_output": "1f487-1f3ff-200d-2642-fe0f",
  73518. "uc_match": "1f487-1f3ff-2642-fe0f",
  73519. "uc_greedy": "1f487-1f3ff-2642",
  73520. "shortnames": [":man_getting_haircut_dark_skin_tone:"],
  73521. "category": "people"
  73522. },
  73523. ":man_golfing_tone1:": {
  73524. "uc_base": "1f3cc-1f3fb-2642",
  73525. "uc_output": "1f3cc-1f3fb-200d-2642-fe0f",
  73526. "uc_match": "1f3cc-fe0f-1f3fb-2642-fe0f",
  73527. "uc_greedy": "1f3cc-1f3fb-2642",
  73528. "shortnames": [":man_golfing_light_skin_tone:"],
  73529. "category": "activity"
  73530. },
  73531. ":man_golfing_tone2:": {
  73532. "uc_base": "1f3cc-1f3fc-2642",
  73533. "uc_output": "1f3cc-1f3fc-200d-2642-fe0f",
  73534. "uc_match": "1f3cc-fe0f-1f3fc-2642-fe0f",
  73535. "uc_greedy": "1f3cc-1f3fc-2642",
  73536. "shortnames": [":man_golfing_medium_light_skin_tone:"],
  73537. "category": "activity"
  73538. },
  73539. ":man_golfing_tone3:": {
  73540. "uc_base": "1f3cc-1f3fd-2642",
  73541. "uc_output": "1f3cc-1f3fd-200d-2642-fe0f",
  73542. "uc_match": "1f3cc-fe0f-1f3fd-2642-fe0f",
  73543. "uc_greedy": "1f3cc-1f3fd-2642",
  73544. "shortnames": [":man_golfing_medium_skin_tone:"],
  73545. "category": "activity"
  73546. },
  73547. ":man_golfing_tone4:": {
  73548. "uc_base": "1f3cc-1f3fe-2642",
  73549. "uc_output": "1f3cc-1f3fe-200d-2642-fe0f",
  73550. "uc_match": "1f3cc-fe0f-1f3fe-2642-fe0f",
  73551. "uc_greedy": "1f3cc-1f3fe-2642",
  73552. "shortnames": [":man_golfing_medium_dark_skin_tone:"],
  73553. "category": "activity"
  73554. },
  73555. ":man_golfing_tone5:": {
  73556. "uc_base": "1f3cc-1f3ff-2642",
  73557. "uc_output": "1f3cc-1f3ff-200d-2642-fe0f",
  73558. "uc_match": "1f3cc-fe0f-1f3ff-2642-fe0f",
  73559. "uc_greedy": "1f3cc-1f3ff-2642",
  73560. "shortnames": [":man_golfing_dark_skin_tone:"],
  73561. "category": "activity"
  73562. },
  73563. ":man_guard_tone1:": {
  73564. "uc_base": "1f482-1f3fb-2642",
  73565. "uc_output": "1f482-1f3fb-200d-2642-fe0f",
  73566. "uc_match": "1f482-1f3fb-2642-fe0f",
  73567. "uc_greedy": "1f482-1f3fb-2642",
  73568. "shortnames": [":man_guard_light_skin_tone:"],
  73569. "category": "people"
  73570. },
  73571. ":man_guard_tone2:": {
  73572. "uc_base": "1f482-1f3fc-2642",
  73573. "uc_output": "1f482-1f3fc-200d-2642-fe0f",
  73574. "uc_match": "1f482-1f3fc-2642-fe0f",
  73575. "uc_greedy": "1f482-1f3fc-2642",
  73576. "shortnames": [":man_guard_medium_light_skin_tone:"],
  73577. "category": "people"
  73578. },
  73579. ":man_guard_tone3:": {
  73580. "uc_base": "1f482-1f3fd-2642",
  73581. "uc_output": "1f482-1f3fd-200d-2642-fe0f",
  73582. "uc_match": "1f482-1f3fd-2642-fe0f",
  73583. "uc_greedy": "1f482-1f3fd-2642",
  73584. "shortnames": [":man_guard_medium_skin_tone:"],
  73585. "category": "people"
  73586. },
  73587. ":man_guard_tone4:": {
  73588. "uc_base": "1f482-1f3fe-2642",
  73589. "uc_output": "1f482-1f3fe-200d-2642-fe0f",
  73590. "uc_match": "1f482-1f3fe-2642-fe0f",
  73591. "uc_greedy": "1f482-1f3fe-2642",
  73592. "shortnames": [":man_guard_medium_dark_skin_tone:"],
  73593. "category": "people"
  73594. },
  73595. ":man_guard_tone5:": {
  73596. "uc_base": "1f482-1f3ff-2642",
  73597. "uc_output": "1f482-1f3ff-200d-2642-fe0f",
  73598. "uc_match": "1f482-1f3ff-2642-fe0f",
  73599. "uc_greedy": "1f482-1f3ff-2642",
  73600. "shortnames": [":man_guard_dark_skin_tone:"],
  73601. "category": "people"
  73602. },
  73603. ":man_health_worker_tone1:": {
  73604. "uc_base": "1f468-1f3fb-2695",
  73605. "uc_output": "1f468-1f3fb-200d-2695-fe0f",
  73606. "uc_match": "1f468-1f3fb-2695-fe0f",
  73607. "uc_greedy": "1f468-1f3fb-2695",
  73608. "shortnames": [":man_health_worker_light_skin_tone:"],
  73609. "category": "people"
  73610. },
  73611. ":man_health_worker_tone2:": {
  73612. "uc_base": "1f468-1f3fc-2695",
  73613. "uc_output": "1f468-1f3fc-200d-2695-fe0f",
  73614. "uc_match": "1f468-1f3fc-2695-fe0f",
  73615. "uc_greedy": "1f468-1f3fc-2695",
  73616. "shortnames": [":man_health_worker_medium_light_skin_tone:"],
  73617. "category": "people"
  73618. },
  73619. ":man_health_worker_tone3:": {
  73620. "uc_base": "1f468-1f3fd-2695",
  73621. "uc_output": "1f468-1f3fd-200d-2695-fe0f",
  73622. "uc_match": "1f468-1f3fd-2695-fe0f",
  73623. "uc_greedy": "1f468-1f3fd-2695",
  73624. "shortnames": [":man_health_worker_medium_skin_tone:"],
  73625. "category": "people"
  73626. },
  73627. ":man_health_worker_tone4:": {
  73628. "uc_base": "1f468-1f3fe-2695",
  73629. "uc_output": "1f468-1f3fe-200d-2695-fe0f",
  73630. "uc_match": "1f468-1f3fe-2695-fe0f",
  73631. "uc_greedy": "1f468-1f3fe-2695",
  73632. "shortnames": [":man_health_worker_medium_dark_skin_tone:"],
  73633. "category": "people"
  73634. },
  73635. ":man_health_worker_tone5:": {
  73636. "uc_base": "1f468-1f3ff-2695",
  73637. "uc_output": "1f468-1f3ff-200d-2695-fe0f",
  73638. "uc_match": "1f468-1f3ff-2695-fe0f",
  73639. "uc_greedy": "1f468-1f3ff-2695",
  73640. "shortnames": [":man_health_worker_dark_skin_tone:"],
  73641. "category": "people"
  73642. },
  73643. ":man_in_lotus_position_tone1:": {
  73644. "uc_base": "1f9d8-1f3fb-2642",
  73645. "uc_output": "1f9d8-1f3fb-200d-2642-fe0f",
  73646. "uc_match": "1f9d8-1f3fb-2642-fe0f",
  73647. "uc_greedy": "1f9d8-1f3fb-2642",
  73648. "shortnames": [":man_in_lotus_position_light_skin_tone:"],
  73649. "category": "activity"
  73650. },
  73651. ":man_in_lotus_position_tone2:": {
  73652. "uc_base": "1f9d8-1f3fc-2642",
  73653. "uc_output": "1f9d8-1f3fc-200d-2642-fe0f",
  73654. "uc_match": "1f9d8-1f3fc-2642-fe0f",
  73655. "uc_greedy": "1f9d8-1f3fc-2642",
  73656. "shortnames": [":man_in_lotus_position_medium_light_skin_tone:"],
  73657. "category": "activity"
  73658. },
  73659. ":man_in_lotus_position_tone3:": {
  73660. "uc_base": "1f9d8-1f3fd-2642",
  73661. "uc_output": "1f9d8-1f3fd-200d-2642-fe0f",
  73662. "uc_match": "1f9d8-1f3fd-2642-fe0f",
  73663. "uc_greedy": "1f9d8-1f3fd-2642",
  73664. "shortnames": [":man_in_lotus_position_medium_skin_tone:"],
  73665. "category": "activity"
  73666. },
  73667. ":man_in_lotus_position_tone4:": {
  73668. "uc_base": "1f9d8-1f3fe-2642",
  73669. "uc_output": "1f9d8-1f3fe-200d-2642-fe0f",
  73670. "uc_match": "1f9d8-1f3fe-2642-fe0f",
  73671. "uc_greedy": "1f9d8-1f3fe-2642",
  73672. "shortnames": [":man_in_lotus_position_medium_dark_skin_tone:"],
  73673. "category": "activity"
  73674. },
  73675. ":man_in_lotus_position_tone5:": {
  73676. "uc_base": "1f9d8-1f3ff-2642",
  73677. "uc_output": "1f9d8-1f3ff-200d-2642-fe0f",
  73678. "uc_match": "1f9d8-1f3ff-2642-fe0f",
  73679. "uc_greedy": "1f9d8-1f3ff-2642",
  73680. "shortnames": [":man_in_lotus_position_dark_skin_tone:"],
  73681. "category": "activity"
  73682. },
  73683. ":man_in_steamy_room_tone1:": {
  73684. "uc_base": "1f9d6-1f3fb-2642",
  73685. "uc_output": "1f9d6-1f3fb-200d-2642-fe0f",
  73686. "uc_match": "1f9d6-1f3fb-2642-fe0f",
  73687. "uc_greedy": "1f9d6-1f3fb-2642",
  73688. "shortnames": [":man_in_steamy_room_light_skin_tone:"],
  73689. "category": "people"
  73690. },
  73691. ":man_in_steamy_room_tone2:": {
  73692. "uc_base": "1f9d6-1f3fc-2642",
  73693. "uc_output": "1f9d6-1f3fc-200d-2642-fe0f",
  73694. "uc_match": "1f9d6-1f3fc-2642-fe0f",
  73695. "uc_greedy": "1f9d6-1f3fc-2642",
  73696. "shortnames": [":man_in_steamy_room_medium_light_skin_tone:"],
  73697. "category": "people"
  73698. },
  73699. ":man_in_steamy_room_tone3:": {
  73700. "uc_base": "1f9d6-1f3fd-2642",
  73701. "uc_output": "1f9d6-1f3fd-200d-2642-fe0f",
  73702. "uc_match": "1f9d6-1f3fd-2642-fe0f",
  73703. "uc_greedy": "1f9d6-1f3fd-2642",
  73704. "shortnames": [":man_in_steamy_room_medium_skin_tone:"],
  73705. "category": "people"
  73706. },
  73707. ":man_in_steamy_room_tone4:": {
  73708. "uc_base": "1f9d6-1f3fe-2642",
  73709. "uc_output": "1f9d6-1f3fe-200d-2642-fe0f",
  73710. "uc_match": "1f9d6-1f3fe-2642-fe0f",
  73711. "uc_greedy": "1f9d6-1f3fe-2642",
  73712. "shortnames": [":man_in_steamy_room_medium_dark_skin_tone:"],
  73713. "category": "people"
  73714. },
  73715. ":man_in_steamy_room_tone5:": {
  73716. "uc_base": "1f9d6-1f3ff-2642",
  73717. "uc_output": "1f9d6-1f3ff-200d-2642-fe0f",
  73718. "uc_match": "1f9d6-1f3ff-2642-fe0f",
  73719. "uc_greedy": "1f9d6-1f3ff-2642",
  73720. "shortnames": [":man_in_steamy_room_dark_skin_tone:"],
  73721. "category": "people"
  73722. },
  73723. ":man_judge_tone1:": {
  73724. "uc_base": "1f468-1f3fb-2696",
  73725. "uc_output": "1f468-1f3fb-200d-2696-fe0f",
  73726. "uc_match": "1f468-1f3fb-2696-fe0f",
  73727. "uc_greedy": "1f468-1f3fb-2696",
  73728. "shortnames": [":man_judge_light_skin_tone:"],
  73729. "category": "people"
  73730. },
  73731. ":man_judge_tone2:": {
  73732. "uc_base": "1f468-1f3fc-2696",
  73733. "uc_output": "1f468-1f3fc-200d-2696-fe0f",
  73734. "uc_match": "1f468-1f3fc-2696-fe0f",
  73735. "uc_greedy": "1f468-1f3fc-2696",
  73736. "shortnames": [":man_judge_medium_light_skin_tone:"],
  73737. "category": "people"
  73738. },
  73739. ":man_judge_tone3:": {
  73740. "uc_base": "1f468-1f3fd-2696",
  73741. "uc_output": "1f468-1f3fd-200d-2696-fe0f",
  73742. "uc_match": "1f468-1f3fd-2696-fe0f",
  73743. "uc_greedy": "1f468-1f3fd-2696",
  73744. "shortnames": [":man_judge_medium_skin_tone:"],
  73745. "category": "people"
  73746. },
  73747. ":man_judge_tone4:": {
  73748. "uc_base": "1f468-1f3fe-2696",
  73749. "uc_output": "1f468-1f3fe-200d-2696-fe0f",
  73750. "uc_match": "1f468-1f3fe-2696-fe0f",
  73751. "uc_greedy": "1f468-1f3fe-2696",
  73752. "shortnames": [":man_judge_medium_dark_skin_tone:"],
  73753. "category": "people"
  73754. },
  73755. ":man_judge_tone5:": {
  73756. "uc_base": "1f468-1f3ff-2696",
  73757. "uc_output": "1f468-1f3ff-200d-2696-fe0f",
  73758. "uc_match": "1f468-1f3ff-2696-fe0f",
  73759. "uc_greedy": "1f468-1f3ff-2696",
  73760. "shortnames": [":man_judge_dark_skin_tone:"],
  73761. "category": "people"
  73762. },
  73763. ":man_juggling_tone1:": {
  73764. "uc_base": "1f939-1f3fb-2642",
  73765. "uc_output": "1f939-1f3fb-200d-2642-fe0f",
  73766. "uc_match": "1f939-1f3fb-2642-fe0f",
  73767. "uc_greedy": "1f939-1f3fb-2642",
  73768. "shortnames": [":man_juggling_light_skin_tone:"],
  73769. "category": "activity"
  73770. },
  73771. ":man_juggling_tone2:": {
  73772. "uc_base": "1f939-1f3fc-2642",
  73773. "uc_output": "1f939-1f3fc-200d-2642-fe0f",
  73774. "uc_match": "1f939-1f3fc-2642-fe0f",
  73775. "uc_greedy": "1f939-1f3fc-2642",
  73776. "shortnames": [":man_juggling_medium_light_skin_tone:"],
  73777. "category": "activity"
  73778. },
  73779. ":man_juggling_tone3:": {
  73780. "uc_base": "1f939-1f3fd-2642",
  73781. "uc_output": "1f939-1f3fd-200d-2642-fe0f",
  73782. "uc_match": "1f939-1f3fd-2642-fe0f",
  73783. "uc_greedy": "1f939-1f3fd-2642",
  73784. "shortnames": [":man_juggling_medium_skin_tone:"],
  73785. "category": "activity"
  73786. },
  73787. ":man_juggling_tone4:": {
  73788. "uc_base": "1f939-1f3fe-2642",
  73789. "uc_output": "1f939-1f3fe-200d-2642-fe0f",
  73790. "uc_match": "1f939-1f3fe-2642-fe0f",
  73791. "uc_greedy": "1f939-1f3fe-2642",
  73792. "shortnames": [":man_juggling_medium_dark_skin_tone:"],
  73793. "category": "activity"
  73794. },
  73795. ":man_juggling_tone5:": {
  73796. "uc_base": "1f939-1f3ff-2642",
  73797. "uc_output": "1f939-1f3ff-200d-2642-fe0f",
  73798. "uc_match": "1f939-1f3ff-2642-fe0f",
  73799. "uc_greedy": "1f939-1f3ff-2642",
  73800. "shortnames": [":man_juggling_dark_skin_tone:"],
  73801. "category": "activity"
  73802. },
  73803. ":man_lifting_weights_tone1:": {
  73804. "uc_base": "1f3cb-1f3fb-2642",
  73805. "uc_output": "1f3cb-1f3fb-200d-2642-fe0f",
  73806. "uc_match": "1f3cb-fe0f-1f3fb-2642-fe0f",
  73807. "uc_greedy": "1f3cb-1f3fb-2642",
  73808. "shortnames": [":man_lifting_weights_light_skin_tone:"],
  73809. "category": "activity"
  73810. },
  73811. ":man_lifting_weights_tone2:": {
  73812. "uc_base": "1f3cb-1f3fc-2642",
  73813. "uc_output": "1f3cb-1f3fc-200d-2642-fe0f",
  73814. "uc_match": "1f3cb-fe0f-1f3fc-2642-fe0f",
  73815. "uc_greedy": "1f3cb-1f3fc-2642",
  73816. "shortnames": [":man_lifting_weights_medium_light_skin_tone:"],
  73817. "category": "activity"
  73818. },
  73819. ":man_lifting_weights_tone3:": {
  73820. "uc_base": "1f3cb-1f3fd-2642",
  73821. "uc_output": "1f3cb-1f3fd-200d-2642-fe0f",
  73822. "uc_match": "1f3cb-fe0f-1f3fd-2642-fe0f",
  73823. "uc_greedy": "1f3cb-1f3fd-2642",
  73824. "shortnames": [":man_lifting_weights_medium_skin_tone:"],
  73825. "category": "activity"
  73826. },
  73827. ":man_lifting_weights_tone4:": {
  73828. "uc_base": "1f3cb-1f3fe-2642",
  73829. "uc_output": "1f3cb-1f3fe-200d-2642-fe0f",
  73830. "uc_match": "1f3cb-fe0f-1f3fe-2642-fe0f",
  73831. "uc_greedy": "1f3cb-1f3fe-2642",
  73832. "shortnames": [":man_lifting_weights_medium_dark_skin_tone:"],
  73833. "category": "activity"
  73834. },
  73835. ":man_lifting_weights_tone5:": {
  73836. "uc_base": "1f3cb-1f3ff-2642",
  73837. "uc_output": "1f3cb-1f3ff-200d-2642-fe0f",
  73838. "uc_match": "1f3cb-fe0f-1f3ff-2642-fe0f",
  73839. "uc_greedy": "1f3cb-1f3ff-2642",
  73840. "shortnames": [":man_lifting_weights_dark_skin_tone:"],
  73841. "category": "activity"
  73842. },
  73843. ":man_mage_tone1:": {
  73844. "uc_base": "1f9d9-1f3fb-2642",
  73845. "uc_output": "1f9d9-1f3fb-200d-2642-fe0f",
  73846. "uc_match": "1f9d9-1f3fb-2642-fe0f",
  73847. "uc_greedy": "1f9d9-1f3fb-2642",
  73848. "shortnames": [":man_mage_light_skin_tone:"],
  73849. "category": "people"
  73850. },
  73851. ":man_mage_tone2:": {
  73852. "uc_base": "1f9d9-1f3fc-2642",
  73853. "uc_output": "1f9d9-1f3fc-200d-2642-fe0f",
  73854. "uc_match": "1f9d9-1f3fc-2642-fe0f",
  73855. "uc_greedy": "1f9d9-1f3fc-2642",
  73856. "shortnames": [":man_mage_medium_light_skin_tone:"],
  73857. "category": "people"
  73858. },
  73859. ":man_mage_tone3:": {
  73860. "uc_base": "1f9d9-1f3fd-2642",
  73861. "uc_output": "1f9d9-1f3fd-200d-2642-fe0f",
  73862. "uc_match": "1f9d9-1f3fd-2642-fe0f",
  73863. "uc_greedy": "1f9d9-1f3fd-2642",
  73864. "shortnames": [":man_mage_medium_skin_tone:"],
  73865. "category": "people"
  73866. },
  73867. ":man_mage_tone4:": {
  73868. "uc_base": "1f9d9-1f3fe-2642",
  73869. "uc_output": "1f9d9-1f3fe-200d-2642-fe0f",
  73870. "uc_match": "1f9d9-1f3fe-2642-fe0f",
  73871. "uc_greedy": "1f9d9-1f3fe-2642",
  73872. "shortnames": [":man_mage_medium_dark_skin_tone:"],
  73873. "category": "people"
  73874. },
  73875. ":man_mage_tone5:": {
  73876. "uc_base": "1f9d9-1f3ff-2642",
  73877. "uc_output": "1f9d9-1f3ff-200d-2642-fe0f",
  73878. "uc_match": "1f9d9-1f3ff-2642-fe0f",
  73879. "uc_greedy": "1f9d9-1f3ff-2642",
  73880. "shortnames": [":man_mage_dark_skin_tone:"],
  73881. "category": "people"
  73882. },
  73883. ":man_mountain_biking_tone1:": {
  73884. "uc_base": "1f6b5-1f3fb-2642",
  73885. "uc_output": "1f6b5-1f3fb-200d-2642-fe0f",
  73886. "uc_match": "1f6b5-1f3fb-2642-fe0f",
  73887. "uc_greedy": "1f6b5-1f3fb-2642",
  73888. "shortnames": [":man_mountain_biking_light_skin_tone:"],
  73889. "category": "activity"
  73890. },
  73891. ":man_mountain_biking_tone2:": {
  73892. "uc_base": "1f6b5-1f3fc-2642",
  73893. "uc_output": "1f6b5-1f3fc-200d-2642-fe0f",
  73894. "uc_match": "1f6b5-1f3fc-2642-fe0f",
  73895. "uc_greedy": "1f6b5-1f3fc-2642",
  73896. "shortnames": [":man_mountain_biking_medium_light_skin_tone:"],
  73897. "category": "activity"
  73898. },
  73899. ":man_mountain_biking_tone3:": {
  73900. "uc_base": "1f6b5-1f3fd-2642",
  73901. "uc_output": "1f6b5-1f3fd-200d-2642-fe0f",
  73902. "uc_match": "1f6b5-1f3fd-2642-fe0f",
  73903. "uc_greedy": "1f6b5-1f3fd-2642",
  73904. "shortnames": [":man_mountain_biking_medium_skin_tone:"],
  73905. "category": "activity"
  73906. },
  73907. ":man_mountain_biking_tone4:": {
  73908. "uc_base": "1f6b5-1f3fe-2642",
  73909. "uc_output": "1f6b5-1f3fe-200d-2642-fe0f",
  73910. "uc_match": "1f6b5-1f3fe-2642-fe0f",
  73911. "uc_greedy": "1f6b5-1f3fe-2642",
  73912. "shortnames": [":man_mountain_biking_medium_dark_skin_tone:"],
  73913. "category": "activity"
  73914. },
  73915. ":man_mountain_biking_tone5:": {
  73916. "uc_base": "1f6b5-1f3ff-2642",
  73917. "uc_output": "1f6b5-1f3ff-200d-2642-fe0f",
  73918. "uc_match": "1f6b5-1f3ff-2642-fe0f",
  73919. "uc_greedy": "1f6b5-1f3ff-2642",
  73920. "shortnames": [":man_mountain_biking_dark_skin_tone:"],
  73921. "category": "activity"
  73922. },
  73923. ":man_pilot_tone1:": {
  73924. "uc_base": "1f468-1f3fb-2708",
  73925. "uc_output": "1f468-1f3fb-200d-2708-fe0f",
  73926. "uc_match": "1f468-1f3fb-2708-fe0f",
  73927. "uc_greedy": "1f468-1f3fb-2708",
  73928. "shortnames": [":man_pilot_light_skin_tone:"],
  73929. "category": "people"
  73930. },
  73931. ":man_pilot_tone2:": {
  73932. "uc_base": "1f468-1f3fc-2708",
  73933. "uc_output": "1f468-1f3fc-200d-2708-fe0f",
  73934. "uc_match": "1f468-1f3fc-2708-fe0f",
  73935. "uc_greedy": "1f468-1f3fc-2708",
  73936. "shortnames": [":man_pilot_medium_light_skin_tone:"],
  73937. "category": "people"
  73938. },
  73939. ":man_pilot_tone3:": {
  73940. "uc_base": "1f468-1f3fd-2708",
  73941. "uc_output": "1f468-1f3fd-200d-2708-fe0f",
  73942. "uc_match": "1f468-1f3fd-2708-fe0f",
  73943. "uc_greedy": "1f468-1f3fd-2708",
  73944. "shortnames": [":man_pilot_medium_skin_tone:"],
  73945. "category": "people"
  73946. },
  73947. ":man_pilot_tone4:": {
  73948. "uc_base": "1f468-1f3fe-2708",
  73949. "uc_output": "1f468-1f3fe-200d-2708-fe0f",
  73950. "uc_match": "1f468-1f3fe-2708-fe0f",
  73951. "uc_greedy": "1f468-1f3fe-2708",
  73952. "shortnames": [":man_pilot_medium_dark_skin_tone:"],
  73953. "category": "people"
  73954. },
  73955. ":man_pilot_tone5:": {
  73956. "uc_base": "1f468-1f3ff-2708",
  73957. "uc_output": "1f468-1f3ff-200d-2708-fe0f",
  73958. "uc_match": "1f468-1f3ff-2708-fe0f",
  73959. "uc_greedy": "1f468-1f3ff-2708",
  73960. "shortnames": [":man_pilot_dark_skin_tone:"],
  73961. "category": "people"
  73962. },
  73963. ":man_playing_handball_tone1:": {
  73964. "uc_base": "1f93e-1f3fb-2642",
  73965. "uc_output": "1f93e-1f3fb-200d-2642-fe0f",
  73966. "uc_match": "1f93e-1f3fb-2642-fe0f",
  73967. "uc_greedy": "1f93e-1f3fb-2642",
  73968. "shortnames": [":man_playing_handball_light_skin_tone:"],
  73969. "category": "activity"
  73970. },
  73971. ":man_playing_handball_tone2:": {
  73972. "uc_base": "1f93e-1f3fc-2642",
  73973. "uc_output": "1f93e-1f3fc-200d-2642-fe0f",
  73974. "uc_match": "1f93e-1f3fc-2642-fe0f",
  73975. "uc_greedy": "1f93e-1f3fc-2642",
  73976. "shortnames": [":man_playing_handball_medium_light_skin_tone:"],
  73977. "category": "activity"
  73978. },
  73979. ":man_playing_handball_tone3:": {
  73980. "uc_base": "1f93e-1f3fd-2642",
  73981. "uc_output": "1f93e-1f3fd-200d-2642-fe0f",
  73982. "uc_match": "1f93e-1f3fd-2642-fe0f",
  73983. "uc_greedy": "1f93e-1f3fd-2642",
  73984. "shortnames": [":man_playing_handball_medium_skin_tone:"],
  73985. "category": "activity"
  73986. },
  73987. ":man_playing_handball_tone4:": {
  73988. "uc_base": "1f93e-1f3fe-2642",
  73989. "uc_output": "1f93e-1f3fe-200d-2642-fe0f",
  73990. "uc_match": "1f93e-1f3fe-2642-fe0f",
  73991. "uc_greedy": "1f93e-1f3fe-2642",
  73992. "shortnames": [":man_playing_handball_medium_dark_skin_tone:"],
  73993. "category": "activity"
  73994. },
  73995. ":man_playing_handball_tone5:": {
  73996. "uc_base": "1f93e-1f3ff-2642",
  73997. "uc_output": "1f93e-1f3ff-200d-2642-fe0f",
  73998. "uc_match": "1f93e-1f3ff-2642-fe0f",
  73999. "uc_greedy": "1f93e-1f3ff-2642",
  74000. "shortnames": [":man_playing_handball_dark_skin_tone:"],
  74001. "category": "activity"
  74002. },
  74003. ":man_playing_water_polo_tone1:": {
  74004. "uc_base": "1f93d-1f3fb-2642",
  74005. "uc_output": "1f93d-1f3fb-200d-2642-fe0f",
  74006. "uc_match": "1f93d-1f3fb-2642-fe0f",
  74007. "uc_greedy": "1f93d-1f3fb-2642",
  74008. "shortnames": [":man_playing_water_polo_light_skin_tone:"],
  74009. "category": "activity"
  74010. },
  74011. ":man_playing_water_polo_tone2:": {
  74012. "uc_base": "1f93d-1f3fc-2642",
  74013. "uc_output": "1f93d-1f3fc-200d-2642-fe0f",
  74014. "uc_match": "1f93d-1f3fc-2642-fe0f",
  74015. "uc_greedy": "1f93d-1f3fc-2642",
  74016. "shortnames": [":man_playing_water_polo_medium_light_skin_tone:"],
  74017. "category": "activity"
  74018. },
  74019. ":man_playing_water_polo_tone3:": {
  74020. "uc_base": "1f93d-1f3fd-2642",
  74021. "uc_output": "1f93d-1f3fd-200d-2642-fe0f",
  74022. "uc_match": "1f93d-1f3fd-2642-fe0f",
  74023. "uc_greedy": "1f93d-1f3fd-2642",
  74024. "shortnames": [":man_playing_water_polo_medium_skin_tone:"],
  74025. "category": "activity"
  74026. },
  74027. ":man_playing_water_polo_tone4:": {
  74028. "uc_base": "1f93d-1f3fe-2642",
  74029. "uc_output": "1f93d-1f3fe-200d-2642-fe0f",
  74030. "uc_match": "1f93d-1f3fe-2642-fe0f",
  74031. "uc_greedy": "1f93d-1f3fe-2642",
  74032. "shortnames": [":man_playing_water_polo_medium_dark_skin_tone:"],
  74033. "category": "activity"
  74034. },
  74035. ":man_playing_water_polo_tone5:": {
  74036. "uc_base": "1f93d-1f3ff-2642",
  74037. "uc_output": "1f93d-1f3ff-200d-2642-fe0f",
  74038. "uc_match": "1f93d-1f3ff-2642-fe0f",
  74039. "uc_greedy": "1f93d-1f3ff-2642",
  74040. "shortnames": [":man_playing_water_polo_dark_skin_tone:"],
  74041. "category": "activity"
  74042. },
  74043. ":man_police_officer_tone1:": {
  74044. "uc_base": "1f46e-1f3fb-2642",
  74045. "uc_output": "1f46e-1f3fb-200d-2642-fe0f",
  74046. "uc_match": "1f46e-1f3fb-2642-fe0f",
  74047. "uc_greedy": "1f46e-1f3fb-2642",
  74048. "shortnames": [":man_police_officer_light_skin_tone:"],
  74049. "category": "people"
  74050. },
  74051. ":man_police_officer_tone2:": {
  74052. "uc_base": "1f46e-1f3fc-2642",
  74053. "uc_output": "1f46e-1f3fc-200d-2642-fe0f",
  74054. "uc_match": "1f46e-1f3fc-2642-fe0f",
  74055. "uc_greedy": "1f46e-1f3fc-2642",
  74056. "shortnames": [":man_police_officer_medium_light_skin_tone:"],
  74057. "category": "people"
  74058. },
  74059. ":man_police_officer_tone3:": {
  74060. "uc_base": "1f46e-1f3fd-2642",
  74061. "uc_output": "1f46e-1f3fd-200d-2642-fe0f",
  74062. "uc_match": "1f46e-1f3fd-2642-fe0f",
  74063. "uc_greedy": "1f46e-1f3fd-2642",
  74064. "shortnames": [":man_police_officer_medium_skin_tone:"],
  74065. "category": "people"
  74066. },
  74067. ":man_police_officer_tone4:": {
  74068. "uc_base": "1f46e-1f3fe-2642",
  74069. "uc_output": "1f46e-1f3fe-200d-2642-fe0f",
  74070. "uc_match": "1f46e-1f3fe-2642-fe0f",
  74071. "uc_greedy": "1f46e-1f3fe-2642",
  74072. "shortnames": [":man_police_officer_medium_dark_skin_tone:"],
  74073. "category": "people"
  74074. },
  74075. ":man_police_officer_tone5:": {
  74076. "uc_base": "1f46e-1f3ff-2642",
  74077. "uc_output": "1f46e-1f3ff-200d-2642-fe0f",
  74078. "uc_match": "1f46e-1f3ff-2642-fe0f",
  74079. "uc_greedy": "1f46e-1f3ff-2642",
  74080. "shortnames": [":man_police_officer_dark_skin_tone:"],
  74081. "category": "people"
  74082. },
  74083. ":man_pouting_tone1:": {
  74084. "uc_base": "1f64e-1f3fb-2642",
  74085. "uc_output": "1f64e-1f3fb-200d-2642-fe0f",
  74086. "uc_match": "1f64e-1f3fb-2642-fe0f",
  74087. "uc_greedy": "1f64e-1f3fb-2642",
  74088. "shortnames": [":man_pouting_light_skin_tone:"],
  74089. "category": "people"
  74090. },
  74091. ":man_pouting_tone2:": {
  74092. "uc_base": "1f64e-1f3fc-2642",
  74093. "uc_output": "1f64e-1f3fc-200d-2642-fe0f",
  74094. "uc_match": "1f64e-1f3fc-2642-fe0f",
  74095. "uc_greedy": "1f64e-1f3fc-2642",
  74096. "shortnames": [":man_pouting_medium_light_skin_tone:"],
  74097. "category": "people"
  74098. },
  74099. ":man_pouting_tone3:": {
  74100. "uc_base": "1f64e-1f3fd-2642",
  74101. "uc_output": "1f64e-1f3fd-200d-2642-fe0f",
  74102. "uc_match": "1f64e-1f3fd-2642-fe0f",
  74103. "uc_greedy": "1f64e-1f3fd-2642",
  74104. "shortnames": [":man_pouting_medium_skin_tone:"],
  74105. "category": "people"
  74106. },
  74107. ":man_pouting_tone4:": {
  74108. "uc_base": "1f64e-1f3fe-2642",
  74109. "uc_output": "1f64e-1f3fe-200d-2642-fe0f",
  74110. "uc_match": "1f64e-1f3fe-2642-fe0f",
  74111. "uc_greedy": "1f64e-1f3fe-2642",
  74112. "shortnames": [":man_pouting_medium_dark_skin_tone:"],
  74113. "category": "people"
  74114. },
  74115. ":man_pouting_tone5:": {
  74116. "uc_base": "1f64e-1f3ff-2642",
  74117. "uc_output": "1f64e-1f3ff-200d-2642-fe0f",
  74118. "uc_match": "1f64e-1f3ff-2642-fe0f",
  74119. "uc_greedy": "1f64e-1f3ff-2642",
  74120. "shortnames": [":man_pouting_dark_skin_tone:"],
  74121. "category": "people"
  74122. },
  74123. ":man_raising_hand_tone1:": {
  74124. "uc_base": "1f64b-1f3fb-2642",
  74125. "uc_output": "1f64b-1f3fb-200d-2642-fe0f",
  74126. "uc_match": "1f64b-1f3fb-2642-fe0f",
  74127. "uc_greedy": "1f64b-1f3fb-2642",
  74128. "shortnames": [":man_raising_hand_light_skin_tone:"],
  74129. "category": "people"
  74130. },
  74131. ":man_raising_hand_tone2:": {
  74132. "uc_base": "1f64b-1f3fc-2642",
  74133. "uc_output": "1f64b-1f3fc-200d-2642-fe0f",
  74134. "uc_match": "1f64b-1f3fc-2642-fe0f",
  74135. "uc_greedy": "1f64b-1f3fc-2642",
  74136. "shortnames": [":man_raising_hand_medium_light_skin_tone:"],
  74137. "category": "people"
  74138. },
  74139. ":man_raising_hand_tone3:": {
  74140. "uc_base": "1f64b-1f3fd-2642",
  74141. "uc_output": "1f64b-1f3fd-200d-2642-fe0f",
  74142. "uc_match": "1f64b-1f3fd-2642-fe0f",
  74143. "uc_greedy": "1f64b-1f3fd-2642",
  74144. "shortnames": [":man_raising_hand_medium_skin_tone:"],
  74145. "category": "people"
  74146. },
  74147. ":man_raising_hand_tone4:": {
  74148. "uc_base": "1f64b-1f3fe-2642",
  74149. "uc_output": "1f64b-1f3fe-200d-2642-fe0f",
  74150. "uc_match": "1f64b-1f3fe-2642-fe0f",
  74151. "uc_greedy": "1f64b-1f3fe-2642",
  74152. "shortnames": [":man_raising_hand_medium_dark_skin_tone:"],
  74153. "category": "people"
  74154. },
  74155. ":man_raising_hand_tone5:": {
  74156. "uc_base": "1f64b-1f3ff-2642",
  74157. "uc_output": "1f64b-1f3ff-200d-2642-fe0f",
  74158. "uc_match": "1f64b-1f3ff-2642-fe0f",
  74159. "uc_greedy": "1f64b-1f3ff-2642",
  74160. "shortnames": [":man_raising_hand_dark_skin_tone:"],
  74161. "category": "people"
  74162. },
  74163. ":man_rowing_boat_tone1:": {
  74164. "uc_base": "1f6a3-1f3fb-2642",
  74165. "uc_output": "1f6a3-1f3fb-200d-2642-fe0f",
  74166. "uc_match": "1f6a3-1f3fb-2642-fe0f",
  74167. "uc_greedy": "1f6a3-1f3fb-2642",
  74168. "shortnames": [":man_rowing_boat_light_skin_tone:"],
  74169. "category": "activity"
  74170. },
  74171. ":man_rowing_boat_tone2:": {
  74172. "uc_base": "1f6a3-1f3fc-2642",
  74173. "uc_output": "1f6a3-1f3fc-200d-2642-fe0f",
  74174. "uc_match": "1f6a3-1f3fc-2642-fe0f",
  74175. "uc_greedy": "1f6a3-1f3fc-2642",
  74176. "shortnames": [":man_rowing_boat_medium_light_skin_tone:"],
  74177. "category": "activity"
  74178. },
  74179. ":man_rowing_boat_tone3:": {
  74180. "uc_base": "1f6a3-1f3fd-2642",
  74181. "uc_output": "1f6a3-1f3fd-200d-2642-fe0f",
  74182. "uc_match": "1f6a3-1f3fd-2642-fe0f",
  74183. "uc_greedy": "1f6a3-1f3fd-2642",
  74184. "shortnames": [":man_rowing_boat_medium_skin_tone:"],
  74185. "category": "activity"
  74186. },
  74187. ":man_rowing_boat_tone4:": {
  74188. "uc_base": "1f6a3-1f3fe-2642",
  74189. "uc_output": "1f6a3-1f3fe-200d-2642-fe0f",
  74190. "uc_match": "1f6a3-1f3fe-2642-fe0f",
  74191. "uc_greedy": "1f6a3-1f3fe-2642",
  74192. "shortnames": [":man_rowing_boat_medium_dark_skin_tone:"],
  74193. "category": "activity"
  74194. },
  74195. ":man_rowing_boat_tone5:": {
  74196. "uc_base": "1f6a3-1f3ff-2642",
  74197. "uc_output": "1f6a3-1f3ff-200d-2642-fe0f",
  74198. "uc_match": "1f6a3-1f3ff-2642-fe0f",
  74199. "uc_greedy": "1f6a3-1f3ff-2642",
  74200. "shortnames": [":man_rowing_boat_dark_skin_tone:"],
  74201. "category": "activity"
  74202. },
  74203. ":man_running_tone1:": {
  74204. "uc_base": "1f3c3-1f3fb-2642",
  74205. "uc_output": "1f3c3-1f3fb-200d-2642-fe0f",
  74206. "uc_match": "1f3c3-1f3fb-2642-fe0f",
  74207. "uc_greedy": "1f3c3-1f3fb-2642",
  74208. "shortnames": [":man_running_light_skin_tone:"],
  74209. "category": "people"
  74210. },
  74211. ":man_running_tone2:": {
  74212. "uc_base": "1f3c3-1f3fc-2642",
  74213. "uc_output": "1f3c3-1f3fc-200d-2642-fe0f",
  74214. "uc_match": "1f3c3-1f3fc-2642-fe0f",
  74215. "uc_greedy": "1f3c3-1f3fc-2642",
  74216. "shortnames": [":man_running_medium_light_skin_tone:"],
  74217. "category": "people"
  74218. },
  74219. ":man_running_tone3:": {
  74220. "uc_base": "1f3c3-1f3fd-2642",
  74221. "uc_output": "1f3c3-1f3fd-200d-2642-fe0f",
  74222. "uc_match": "1f3c3-1f3fd-2642-fe0f",
  74223. "uc_greedy": "1f3c3-1f3fd-2642",
  74224. "shortnames": [":man_running_medium_skin_tone:"],
  74225. "category": "people"
  74226. },
  74227. ":man_running_tone4:": {
  74228. "uc_base": "1f3c3-1f3fe-2642",
  74229. "uc_output": "1f3c3-1f3fe-200d-2642-fe0f",
  74230. "uc_match": "1f3c3-1f3fe-2642-fe0f",
  74231. "uc_greedy": "1f3c3-1f3fe-2642",
  74232. "shortnames": [":man_running_medium_dark_skin_tone:"],
  74233. "category": "people"
  74234. },
  74235. ":man_running_tone5:": {
  74236. "uc_base": "1f3c3-1f3ff-2642",
  74237. "uc_output": "1f3c3-1f3ff-200d-2642-fe0f",
  74238. "uc_match": "1f3c3-1f3ff-2642-fe0f",
  74239. "uc_greedy": "1f3c3-1f3ff-2642",
  74240. "shortnames": [":man_running_dark_skin_tone:"],
  74241. "category": "people"
  74242. },
  74243. ":man_shrugging_tone1:": {
  74244. "uc_base": "1f937-1f3fb-2642",
  74245. "uc_output": "1f937-1f3fb-200d-2642-fe0f",
  74246. "uc_match": "1f937-1f3fb-2642-fe0f",
  74247. "uc_greedy": "1f937-1f3fb-2642",
  74248. "shortnames": [":man_shrugging_light_skin_tone:"],
  74249. "category": "people"
  74250. },
  74251. ":man_shrugging_tone2:": {
  74252. "uc_base": "1f937-1f3fc-2642",
  74253. "uc_output": "1f937-1f3fc-200d-2642-fe0f",
  74254. "uc_match": "1f937-1f3fc-2642-fe0f",
  74255. "uc_greedy": "1f937-1f3fc-2642",
  74256. "shortnames": [":man_shrugging_medium_light_skin_tone:"],
  74257. "category": "people"
  74258. },
  74259. ":man_shrugging_tone3:": {
  74260. "uc_base": "1f937-1f3fd-2642",
  74261. "uc_output": "1f937-1f3fd-200d-2642-fe0f",
  74262. "uc_match": "1f937-1f3fd-2642-fe0f",
  74263. "uc_greedy": "1f937-1f3fd-2642",
  74264. "shortnames": [":man_shrugging_medium_skin_tone:"],
  74265. "category": "people"
  74266. },
  74267. ":man_shrugging_tone4:": {
  74268. "uc_base": "1f937-1f3fe-2642",
  74269. "uc_output": "1f937-1f3fe-200d-2642-fe0f",
  74270. "uc_match": "1f937-1f3fe-2642-fe0f",
  74271. "uc_greedy": "1f937-1f3fe-2642",
  74272. "shortnames": [":man_shrugging_medium_dark_skin_tone:"],
  74273. "category": "people"
  74274. },
  74275. ":man_shrugging_tone5:": {
  74276. "uc_base": "1f937-1f3ff-2642",
  74277. "uc_output": "1f937-1f3ff-200d-2642-fe0f",
  74278. "uc_match": "1f937-1f3ff-2642-fe0f",
  74279. "uc_greedy": "1f937-1f3ff-2642",
  74280. "shortnames": [":man_shrugging_dark_skin_tone:"],
  74281. "category": "people"
  74282. },
  74283. ":man_surfing_tone1:": {
  74284. "uc_base": "1f3c4-1f3fb-2642",
  74285. "uc_output": "1f3c4-1f3fb-200d-2642-fe0f",
  74286. "uc_match": "1f3c4-1f3fb-2642-fe0f",
  74287. "uc_greedy": "1f3c4-1f3fb-2642",
  74288. "shortnames": [":man_surfing_light_skin_tone:"],
  74289. "category": "activity"
  74290. },
  74291. ":man_surfing_tone2:": {
  74292. "uc_base": "1f3c4-1f3fc-2642",
  74293. "uc_output": "1f3c4-1f3fc-200d-2642-fe0f",
  74294. "uc_match": "1f3c4-1f3fc-2642-fe0f",
  74295. "uc_greedy": "1f3c4-1f3fc-2642",
  74296. "shortnames": [":man_surfing_medium_light_skin_tone:"],
  74297. "category": "activity"
  74298. },
  74299. ":man_surfing_tone3:": {
  74300. "uc_base": "1f3c4-1f3fd-2642",
  74301. "uc_output": "1f3c4-1f3fd-200d-2642-fe0f",
  74302. "uc_match": "1f3c4-1f3fd-2642-fe0f",
  74303. "uc_greedy": "1f3c4-1f3fd-2642",
  74304. "shortnames": [":man_surfing_medium_skin_tone:"],
  74305. "category": "activity"
  74306. },
  74307. ":man_surfing_tone4:": {
  74308. "uc_base": "1f3c4-1f3fe-2642",
  74309. "uc_output": "1f3c4-1f3fe-200d-2642-fe0f",
  74310. "uc_match": "1f3c4-1f3fe-2642-fe0f",
  74311. "uc_greedy": "1f3c4-1f3fe-2642",
  74312. "shortnames": [":man_surfing_medium_dark_skin_tone:"],
  74313. "category": "activity"
  74314. },
  74315. ":man_surfing_tone5:": {
  74316. "uc_base": "1f3c4-1f3ff-2642",
  74317. "uc_output": "1f3c4-1f3ff-200d-2642-fe0f",
  74318. "uc_match": "1f3c4-1f3ff-2642-fe0f",
  74319. "uc_greedy": "1f3c4-1f3ff-2642",
  74320. "shortnames": [":man_surfing_dark_skin_tone:"],
  74321. "category": "activity"
  74322. },
  74323. ":man_swimming_tone1:": {
  74324. "uc_base": "1f3ca-1f3fb-2642",
  74325. "uc_output": "1f3ca-1f3fb-200d-2642-fe0f",
  74326. "uc_match": "1f3ca-1f3fb-2642-fe0f",
  74327. "uc_greedy": "1f3ca-1f3fb-2642",
  74328. "shortnames": [":man_swimming_light_skin_tone:"],
  74329. "category": "activity"
  74330. },
  74331. ":man_swimming_tone2:": {
  74332. "uc_base": "1f3ca-1f3fc-2642",
  74333. "uc_output": "1f3ca-1f3fc-200d-2642-fe0f",
  74334. "uc_match": "1f3ca-1f3fc-2642-fe0f",
  74335. "uc_greedy": "1f3ca-1f3fc-2642",
  74336. "shortnames": [":man_swimming_medium_light_skin_tone:"],
  74337. "category": "activity"
  74338. },
  74339. ":man_swimming_tone3:": {
  74340. "uc_base": "1f3ca-1f3fd-2642",
  74341. "uc_output": "1f3ca-1f3fd-200d-2642-fe0f",
  74342. "uc_match": "1f3ca-1f3fd-2642-fe0f",
  74343. "uc_greedy": "1f3ca-1f3fd-2642",
  74344. "shortnames": [":man_swimming_medium_skin_tone:"],
  74345. "category": "activity"
  74346. },
  74347. ":man_swimming_tone4:": {
  74348. "uc_base": "1f3ca-1f3fe-2642",
  74349. "uc_output": "1f3ca-1f3fe-200d-2642-fe0f",
  74350. "uc_match": "1f3ca-1f3fe-2642-fe0f",
  74351. "uc_greedy": "1f3ca-1f3fe-2642",
  74352. "shortnames": [":man_swimming_medium_dark_skin_tone:"],
  74353. "category": "activity"
  74354. },
  74355. ":man_swimming_tone5:": {
  74356. "uc_base": "1f3ca-1f3ff-2642",
  74357. "uc_output": "1f3ca-1f3ff-200d-2642-fe0f",
  74358. "uc_match": "1f3ca-1f3ff-2642-fe0f",
  74359. "uc_greedy": "1f3ca-1f3ff-2642",
  74360. "shortnames": [":man_swimming_dark_skin_tone:"],
  74361. "category": "activity"
  74362. },
  74363. ":man_tipping_hand_tone1:": {
  74364. "uc_base": "1f481-1f3fb-2642",
  74365. "uc_output": "1f481-1f3fb-200d-2642-fe0f",
  74366. "uc_match": "1f481-1f3fb-2642-fe0f",
  74367. "uc_greedy": "1f481-1f3fb-2642",
  74368. "shortnames": [":man_tipping_hand_light_skin_tone:"],
  74369. "category": "people"
  74370. },
  74371. ":man_tipping_hand_tone2:": {
  74372. "uc_base": "1f481-1f3fc-2642",
  74373. "uc_output": "1f481-1f3fc-200d-2642-fe0f",
  74374. "uc_match": "1f481-1f3fc-2642-fe0f",
  74375. "uc_greedy": "1f481-1f3fc-2642",
  74376. "shortnames": [":man_tipping_hand_medium_light_skin_tone:"],
  74377. "category": "people"
  74378. },
  74379. ":man_tipping_hand_tone3:": {
  74380. "uc_base": "1f481-1f3fd-2642",
  74381. "uc_output": "1f481-1f3fd-200d-2642-fe0f",
  74382. "uc_match": "1f481-1f3fd-2642-fe0f",
  74383. "uc_greedy": "1f481-1f3fd-2642",
  74384. "shortnames": [":man_tipping_hand_medium_skin_tone:"],
  74385. "category": "people"
  74386. },
  74387. ":man_tipping_hand_tone4:": {
  74388. "uc_base": "1f481-1f3fe-2642",
  74389. "uc_output": "1f481-1f3fe-200d-2642-fe0f",
  74390. "uc_match": "1f481-1f3fe-2642-fe0f",
  74391. "uc_greedy": "1f481-1f3fe-2642",
  74392. "shortnames": [":man_tipping_hand_medium_dark_skin_tone:"],
  74393. "category": "people"
  74394. },
  74395. ":man_tipping_hand_tone5:": {
  74396. "uc_base": "1f481-1f3ff-2642",
  74397. "uc_output": "1f481-1f3ff-200d-2642-fe0f",
  74398. "uc_match": "1f481-1f3ff-2642-fe0f",
  74399. "uc_greedy": "1f481-1f3ff-2642",
  74400. "shortnames": [":man_tipping_hand_dark_skin_tone:"],
  74401. "category": "people"
  74402. },
  74403. ":man_vampire_tone1:": {
  74404. "uc_base": "1f9db-1f3fb-2642",
  74405. "uc_output": "1f9db-1f3fb-200d-2642-fe0f",
  74406. "uc_match": "1f9db-1f3fb-2642-fe0f",
  74407. "uc_greedy": "1f9db-1f3fb-2642",
  74408. "shortnames": [":man_vampire_light_skin_tone:"],
  74409. "category": "people"
  74410. },
  74411. ":man_vampire_tone2:": {
  74412. "uc_base": "1f9db-1f3fc-2642",
  74413. "uc_output": "1f9db-1f3fc-200d-2642-fe0f",
  74414. "uc_match": "1f9db-1f3fc-2642-fe0f",
  74415. "uc_greedy": "1f9db-1f3fc-2642",
  74416. "shortnames": [":man_vampire_medium_light_skin_tone:"],
  74417. "category": "people"
  74418. },
  74419. ":man_vampire_tone3:": {
  74420. "uc_base": "1f9db-1f3fd-2642",
  74421. "uc_output": "1f9db-1f3fd-200d-2642-fe0f",
  74422. "uc_match": "1f9db-1f3fd-2642-fe0f",
  74423. "uc_greedy": "1f9db-1f3fd-2642",
  74424. "shortnames": [":man_vampire_medium_skin_tone:"],
  74425. "category": "people"
  74426. },
  74427. ":man_vampire_tone4:": {
  74428. "uc_base": "1f9db-1f3fe-2642",
  74429. "uc_output": "1f9db-1f3fe-200d-2642-fe0f",
  74430. "uc_match": "1f9db-1f3fe-2642-fe0f",
  74431. "uc_greedy": "1f9db-1f3fe-2642",
  74432. "shortnames": [":man_vampire_medium_dark_skin_tone:"],
  74433. "category": "people"
  74434. },
  74435. ":man_vampire_tone5:": {
  74436. "uc_base": "1f9db-1f3ff-2642",
  74437. "uc_output": "1f9db-1f3ff-200d-2642-fe0f",
  74438. "uc_match": "1f9db-1f3ff-2642-fe0f",
  74439. "uc_greedy": "1f9db-1f3ff-2642",
  74440. "shortnames": [":man_vampire_dark_skin_tone:"],
  74441. "category": "people"
  74442. },
  74443. ":man_walking_tone1:": {
  74444. "uc_base": "1f6b6-1f3fb-2642",
  74445. "uc_output": "1f6b6-1f3fb-200d-2642-fe0f",
  74446. "uc_match": "1f6b6-1f3fb-2642-fe0f",
  74447. "uc_greedy": "1f6b6-1f3fb-2642",
  74448. "shortnames": [":man_walking_light_skin_tone:"],
  74449. "category": "people"
  74450. },
  74451. ":man_walking_tone2:": {
  74452. "uc_base": "1f6b6-1f3fc-2642",
  74453. "uc_output": "1f6b6-1f3fc-200d-2642-fe0f",
  74454. "uc_match": "1f6b6-1f3fc-2642-fe0f",
  74455. "uc_greedy": "1f6b6-1f3fc-2642",
  74456. "shortnames": [":man_walking_medium_light_skin_tone:"],
  74457. "category": "people"
  74458. },
  74459. ":man_walking_tone3:": {
  74460. "uc_base": "1f6b6-1f3fd-2642",
  74461. "uc_output": "1f6b6-1f3fd-200d-2642-fe0f",
  74462. "uc_match": "1f6b6-1f3fd-2642-fe0f",
  74463. "uc_greedy": "1f6b6-1f3fd-2642",
  74464. "shortnames": [":man_walking_medium_skin_tone:"],
  74465. "category": "people"
  74466. },
  74467. ":man_walking_tone4:": {
  74468. "uc_base": "1f6b6-1f3fe-2642",
  74469. "uc_output": "1f6b6-1f3fe-200d-2642-fe0f",
  74470. "uc_match": "1f6b6-1f3fe-2642-fe0f",
  74471. "uc_greedy": "1f6b6-1f3fe-2642",
  74472. "shortnames": [":man_walking_medium_dark_skin_tone:"],
  74473. "category": "people"
  74474. },
  74475. ":man_walking_tone5:": {
  74476. "uc_base": "1f6b6-1f3ff-2642",
  74477. "uc_output": "1f6b6-1f3ff-200d-2642-fe0f",
  74478. "uc_match": "1f6b6-1f3ff-2642-fe0f",
  74479. "uc_greedy": "1f6b6-1f3ff-2642",
  74480. "shortnames": [":man_walking_dark_skin_tone:"],
  74481. "category": "people"
  74482. },
  74483. ":man_wearing_turban_tone1:": {
  74484. "uc_base": "1f473-1f3fb-2642",
  74485. "uc_output": "1f473-1f3fb-200d-2642-fe0f",
  74486. "uc_match": "1f473-1f3fb-2642-fe0f",
  74487. "uc_greedy": "1f473-1f3fb-2642",
  74488. "shortnames": [":man_wearing_turban_light_skin_tone:"],
  74489. "category": "people"
  74490. },
  74491. ":man_wearing_turban_tone2:": {
  74492. "uc_base": "1f473-1f3fc-2642",
  74493. "uc_output": "1f473-1f3fc-200d-2642-fe0f",
  74494. "uc_match": "1f473-1f3fc-2642-fe0f",
  74495. "uc_greedy": "1f473-1f3fc-2642",
  74496. "shortnames": [":man_wearing_turban_medium_light_skin_tone:"],
  74497. "category": "people"
  74498. },
  74499. ":man_wearing_turban_tone3:": {
  74500. "uc_base": "1f473-1f3fd-2642",
  74501. "uc_output": "1f473-1f3fd-200d-2642-fe0f",
  74502. "uc_match": "1f473-1f3fd-2642-fe0f",
  74503. "uc_greedy": "1f473-1f3fd-2642",
  74504. "shortnames": [":man_wearing_turban_medium_skin_tone:"],
  74505. "category": "people"
  74506. },
  74507. ":man_wearing_turban_tone4:": {
  74508. "uc_base": "1f473-1f3fe-2642",
  74509. "uc_output": "1f473-1f3fe-200d-2642-fe0f",
  74510. "uc_match": "1f473-1f3fe-2642-fe0f",
  74511. "uc_greedy": "1f473-1f3fe-2642",
  74512. "shortnames": [":man_wearing_turban_medium_dark_skin_tone:"],
  74513. "category": "people"
  74514. },
  74515. ":man_wearing_turban_tone5:": {
  74516. "uc_base": "1f473-1f3ff-2642",
  74517. "uc_output": "1f473-1f3ff-200d-2642-fe0f",
  74518. "uc_match": "1f473-1f3ff-2642-fe0f",
  74519. "uc_greedy": "1f473-1f3ff-2642",
  74520. "shortnames": [":man_wearing_turban_dark_skin_tone:"],
  74521. "category": "people"
  74522. },
  74523. ":mermaid_tone1:": {
  74524. "uc_base": "1f9dc-1f3fb-2640",
  74525. "uc_output": "1f9dc-1f3fb-200d-2640-fe0f",
  74526. "uc_match": "1f9dc-1f3fb-2640-fe0f",
  74527. "uc_greedy": "1f9dc-1f3fb-2640",
  74528. "shortnames": [":mermaid_light_skin_tone:"],
  74529. "category": "people"
  74530. },
  74531. ":mermaid_tone2:": {
  74532. "uc_base": "1f9dc-1f3fc-2640",
  74533. "uc_output": "1f9dc-1f3fc-200d-2640-fe0f",
  74534. "uc_match": "1f9dc-1f3fc-2640-fe0f",
  74535. "uc_greedy": "1f9dc-1f3fc-2640",
  74536. "shortnames": [":mermaid_medium_light_skin_tone:"],
  74537. "category": "people"
  74538. },
  74539. ":mermaid_tone3:": {
  74540. "uc_base": "1f9dc-1f3fd-2640",
  74541. "uc_output": "1f9dc-1f3fd-200d-2640-fe0f",
  74542. "uc_match": "1f9dc-1f3fd-2640-fe0f",
  74543. "uc_greedy": "1f9dc-1f3fd-2640",
  74544. "shortnames": [":mermaid_medium_skin_tone:"],
  74545. "category": "people"
  74546. },
  74547. ":mermaid_tone4:": {
  74548. "uc_base": "1f9dc-1f3fe-2640",
  74549. "uc_output": "1f9dc-1f3fe-200d-2640-fe0f",
  74550. "uc_match": "1f9dc-1f3fe-2640-fe0f",
  74551. "uc_greedy": "1f9dc-1f3fe-2640",
  74552. "shortnames": [":mermaid_medium_dark_skin_tone:"],
  74553. "category": "people"
  74554. },
  74555. ":mermaid_tone5:": {
  74556. "uc_base": "1f9dc-1f3ff-2640",
  74557. "uc_output": "1f9dc-1f3ff-200d-2640-fe0f",
  74558. "uc_match": "1f9dc-1f3ff-2640-fe0f",
  74559. "uc_greedy": "1f9dc-1f3ff-2640",
  74560. "shortnames": [":mermaid_dark_skin_tone:"],
  74561. "category": "people"
  74562. },
  74563. ":merman_tone1:": {
  74564. "uc_base": "1f9dc-1f3fb-2642",
  74565. "uc_output": "1f9dc-1f3fb-200d-2642-fe0f",
  74566. "uc_match": "1f9dc-1f3fb-2642-fe0f",
  74567. "uc_greedy": "1f9dc-1f3fb-2642",
  74568. "shortnames": [":merman_light_skin_tone:"],
  74569. "category": "people"
  74570. },
  74571. ":merman_tone2:": {
  74572. "uc_base": "1f9dc-1f3fc-2642",
  74573. "uc_output": "1f9dc-1f3fc-200d-2642-fe0f",
  74574. "uc_match": "1f9dc-1f3fc-2642-fe0f",
  74575. "uc_greedy": "1f9dc-1f3fc-2642",
  74576. "shortnames": [":merman_medium_light_skin_tone:"],
  74577. "category": "people"
  74578. },
  74579. ":merman_tone3:": {
  74580. "uc_base": "1f9dc-1f3fd-2642",
  74581. "uc_output": "1f9dc-1f3fd-200d-2642-fe0f",
  74582. "uc_match": "1f9dc-1f3fd-2642-fe0f",
  74583. "uc_greedy": "1f9dc-1f3fd-2642",
  74584. "shortnames": [":merman_medium_skin_tone:"],
  74585. "category": "people"
  74586. },
  74587. ":merman_tone4:": {
  74588. "uc_base": "1f9dc-1f3fe-2642",
  74589. "uc_output": "1f9dc-1f3fe-200d-2642-fe0f",
  74590. "uc_match": "1f9dc-1f3fe-2642-fe0f",
  74591. "uc_greedy": "1f9dc-1f3fe-2642",
  74592. "shortnames": [":merman_medium_dark_skin_tone:"],
  74593. "category": "people"
  74594. },
  74595. ":merman_tone5:": {
  74596. "uc_base": "1f9dc-1f3ff-2642",
  74597. "uc_output": "1f9dc-1f3ff-200d-2642-fe0f",
  74598. "uc_match": "1f9dc-1f3ff-2642-fe0f",
  74599. "uc_greedy": "1f9dc-1f3ff-2642",
  74600. "shortnames": [":merman_dark_skin_tone:"],
  74601. "category": "people"
  74602. },
  74603. ":woman_biking_tone1:": {
  74604. "uc_base": "1f6b4-1f3fb-2640",
  74605. "uc_output": "1f6b4-1f3fb-200d-2640-fe0f",
  74606. "uc_match": "1f6b4-1f3fb-2640-fe0f",
  74607. "uc_greedy": "1f6b4-1f3fb-2640",
  74608. "shortnames": [":woman_biking_light_skin_tone:"],
  74609. "category": "activity"
  74610. },
  74611. ":woman_biking_tone2:": {
  74612. "uc_base": "1f6b4-1f3fc-2640",
  74613. "uc_output": "1f6b4-1f3fc-200d-2640-fe0f",
  74614. "uc_match": "1f6b4-1f3fc-2640-fe0f",
  74615. "uc_greedy": "1f6b4-1f3fc-2640",
  74616. "shortnames": [":woman_biking_medium_light_skin_tone:"],
  74617. "category": "activity"
  74618. },
  74619. ":woman_biking_tone3:": {
  74620. "uc_base": "1f6b4-1f3fd-2640",
  74621. "uc_output": "1f6b4-1f3fd-200d-2640-fe0f",
  74622. "uc_match": "1f6b4-1f3fd-2640-fe0f",
  74623. "uc_greedy": "1f6b4-1f3fd-2640",
  74624. "shortnames": [":woman_biking_medium_skin_tone:"],
  74625. "category": "activity"
  74626. },
  74627. ":woman_biking_tone4:": {
  74628. "uc_base": "1f6b4-1f3fe-2640",
  74629. "uc_output": "1f6b4-1f3fe-200d-2640-fe0f",
  74630. "uc_match": "1f6b4-1f3fe-2640-fe0f",
  74631. "uc_greedy": "1f6b4-1f3fe-2640",
  74632. "shortnames": [":woman_biking_medium_dark_skin_tone:"],
  74633. "category": "activity"
  74634. },
  74635. ":woman_biking_tone5:": {
  74636. "uc_base": "1f6b4-1f3ff-2640",
  74637. "uc_output": "1f6b4-1f3ff-200d-2640-fe0f",
  74638. "uc_match": "1f6b4-1f3ff-2640-fe0f",
  74639. "uc_greedy": "1f6b4-1f3ff-2640",
  74640. "shortnames": [":woman_biking_dark_skin_tone:"],
  74641. "category": "activity"
  74642. },
  74643. ":woman_bowing_tone1:": {
  74644. "uc_base": "1f647-1f3fb-2640",
  74645. "uc_output": "1f647-1f3fb-200d-2640-fe0f",
  74646. "uc_match": "1f647-1f3fb-2640-fe0f",
  74647. "uc_greedy": "1f647-1f3fb-2640",
  74648. "shortnames": [":woman_bowing_light_skin_tone:"],
  74649. "category": "people"
  74650. },
  74651. ":woman_bowing_tone2:": {
  74652. "uc_base": "1f647-1f3fc-2640",
  74653. "uc_output": "1f647-1f3fc-200d-2640-fe0f",
  74654. "uc_match": "1f647-1f3fc-2640-fe0f",
  74655. "uc_greedy": "1f647-1f3fc-2640",
  74656. "shortnames": [":woman_bowing_medium_light_skin_tone:"],
  74657. "category": "people"
  74658. },
  74659. ":woman_bowing_tone3:": {
  74660. "uc_base": "1f647-1f3fd-2640",
  74661. "uc_output": "1f647-1f3fd-200d-2640-fe0f",
  74662. "uc_match": "1f647-1f3fd-2640-fe0f",
  74663. "uc_greedy": "1f647-1f3fd-2640",
  74664. "shortnames": [":woman_bowing_medium_skin_tone:"],
  74665. "category": "people"
  74666. },
  74667. ":woman_bowing_tone4:": {
  74668. "uc_base": "1f647-1f3fe-2640",
  74669. "uc_output": "1f647-1f3fe-200d-2640-fe0f",
  74670. "uc_match": "1f647-1f3fe-2640-fe0f",
  74671. "uc_greedy": "1f647-1f3fe-2640",
  74672. "shortnames": [":woman_bowing_medium_dark_skin_tone:"],
  74673. "category": "people"
  74674. },
  74675. ":woman_bowing_tone5:": {
  74676. "uc_base": "1f647-1f3ff-2640",
  74677. "uc_output": "1f647-1f3ff-200d-2640-fe0f",
  74678. "uc_match": "1f647-1f3ff-2640-fe0f",
  74679. "uc_greedy": "1f647-1f3ff-2640",
  74680. "shortnames": [":woman_bowing_dark_skin_tone:"],
  74681. "category": "people"
  74682. },
  74683. ":woman_cartwheeling_tone1:": {
  74684. "uc_base": "1f938-1f3fb-2640",
  74685. "uc_output": "1f938-1f3fb-200d-2640-fe0f",
  74686. "uc_match": "1f938-1f3fb-2640-fe0f",
  74687. "uc_greedy": "1f938-1f3fb-2640",
  74688. "shortnames": [":woman_cartwheeling_light_skin_tone:"],
  74689. "category": "activity"
  74690. },
  74691. ":woman_cartwheeling_tone2:": {
  74692. "uc_base": "1f938-1f3fc-2640",
  74693. "uc_output": "1f938-1f3fc-200d-2640-fe0f",
  74694. "uc_match": "1f938-1f3fc-2640-fe0f",
  74695. "uc_greedy": "1f938-1f3fc-2640",
  74696. "shortnames": [":woman_cartwheeling_medium_light_skin_tone:"],
  74697. "category": "activity"
  74698. },
  74699. ":woman_cartwheeling_tone3:": {
  74700. "uc_base": "1f938-1f3fd-2640",
  74701. "uc_output": "1f938-1f3fd-200d-2640-fe0f",
  74702. "uc_match": "1f938-1f3fd-2640-fe0f",
  74703. "uc_greedy": "1f938-1f3fd-2640",
  74704. "shortnames": [":woman_cartwheeling_medium_skin_tone:"],
  74705. "category": "activity"
  74706. },
  74707. ":woman_cartwheeling_tone4:": {
  74708. "uc_base": "1f938-1f3fe-2640",
  74709. "uc_output": "1f938-1f3fe-200d-2640-fe0f",
  74710. "uc_match": "1f938-1f3fe-2640-fe0f",
  74711. "uc_greedy": "1f938-1f3fe-2640",
  74712. "shortnames": [":woman_cartwheeling_medium_dark_skin_tone:"],
  74713. "category": "activity"
  74714. },
  74715. ":woman_cartwheeling_tone5:": {
  74716. "uc_base": "1f938-1f3ff-2640",
  74717. "uc_output": "1f938-1f3ff-200d-2640-fe0f",
  74718. "uc_match": "1f938-1f3ff-2640-fe0f",
  74719. "uc_greedy": "1f938-1f3ff-2640",
  74720. "shortnames": [":woman_cartwheeling_dark_skin_tone:"],
  74721. "category": "activity"
  74722. },
  74723. ":woman_climbing_tone1:": {
  74724. "uc_base": "1f9d7-1f3fb-2640",
  74725. "uc_output": "1f9d7-1f3fb-200d-2640-fe0f",
  74726. "uc_match": "1f9d7-1f3fb-2640-fe0f",
  74727. "uc_greedy": "1f9d7-1f3fb-2640",
  74728. "shortnames": [":woman_climbing_light_skin_tone:"],
  74729. "category": "activity"
  74730. },
  74731. ":woman_climbing_tone2:": {
  74732. "uc_base": "1f9d7-1f3fc-2640",
  74733. "uc_output": "1f9d7-1f3fc-200d-2640-fe0f",
  74734. "uc_match": "1f9d7-1f3fc-2640-fe0f",
  74735. "uc_greedy": "1f9d7-1f3fc-2640",
  74736. "shortnames": [":woman_climbing_medium_light_skin_tone:"],
  74737. "category": "activity"
  74738. },
  74739. ":woman_climbing_tone3:": {
  74740. "uc_base": "1f9d7-1f3fd-2640",
  74741. "uc_output": "1f9d7-1f3fd-200d-2640-fe0f",
  74742. "uc_match": "1f9d7-1f3fd-2640-fe0f",
  74743. "uc_greedy": "1f9d7-1f3fd-2640",
  74744. "shortnames": [":woman_climbing_medium_skin_tone:"],
  74745. "category": "activity"
  74746. },
  74747. ":woman_climbing_tone4:": {
  74748. "uc_base": "1f9d7-1f3fe-2640",
  74749. "uc_output": "1f9d7-1f3fe-200d-2640-fe0f",
  74750. "uc_match": "1f9d7-1f3fe-2640-fe0f",
  74751. "uc_greedy": "1f9d7-1f3fe-2640",
  74752. "shortnames": [":woman_climbing_medium_dark_skin_tone:"],
  74753. "category": "activity"
  74754. },
  74755. ":woman_climbing_tone5:": {
  74756. "uc_base": "1f9d7-1f3ff-2640",
  74757. "uc_output": "1f9d7-1f3ff-200d-2640-fe0f",
  74758. "uc_match": "1f9d7-1f3ff-2640-fe0f",
  74759. "uc_greedy": "1f9d7-1f3ff-2640",
  74760. "shortnames": [":woman_climbing_dark_skin_tone:"],
  74761. "category": "activity"
  74762. },
  74763. ":woman_construction_worker_tone1:": {
  74764. "uc_base": "1f477-1f3fb-2640",
  74765. "uc_output": "1f477-1f3fb-200d-2640-fe0f",
  74766. "uc_match": "1f477-1f3fb-2640-fe0f",
  74767. "uc_greedy": "1f477-1f3fb-2640",
  74768. "shortnames": [":woman_construction_worker_light_skin_tone:"],
  74769. "category": "people"
  74770. },
  74771. ":woman_construction_worker_tone2:": {
  74772. "uc_base": "1f477-1f3fc-2640",
  74773. "uc_output": "1f477-1f3fc-200d-2640-fe0f",
  74774. "uc_match": "1f477-1f3fc-2640-fe0f",
  74775. "uc_greedy": "1f477-1f3fc-2640",
  74776. "shortnames": [":woman_construction_worker_medium_light_skin_tone:"],
  74777. "category": "people"
  74778. },
  74779. ":woman_construction_worker_tone3:": {
  74780. "uc_base": "1f477-1f3fd-2640",
  74781. "uc_output": "1f477-1f3fd-200d-2640-fe0f",
  74782. "uc_match": "1f477-1f3fd-2640-fe0f",
  74783. "uc_greedy": "1f477-1f3fd-2640",
  74784. "shortnames": [":woman_construction_worker_medium_skin_tone:"],
  74785. "category": "people"
  74786. },
  74787. ":woman_construction_worker_tone4:": {
  74788. "uc_base": "1f477-1f3fe-2640",
  74789. "uc_output": "1f477-1f3fe-200d-2640-fe0f",
  74790. "uc_match": "1f477-1f3fe-2640-fe0f",
  74791. "uc_greedy": "1f477-1f3fe-2640",
  74792. "shortnames": [":woman_construction_worker_medium_dark_skin_tone:"],
  74793. "category": "people"
  74794. },
  74795. ":woman_construction_worker_tone5:": {
  74796. "uc_base": "1f477-1f3ff-2640",
  74797. "uc_output": "1f477-1f3ff-200d-2640-fe0f",
  74798. "uc_match": "1f477-1f3ff-2640-fe0f",
  74799. "uc_greedy": "1f477-1f3ff-2640",
  74800. "shortnames": [":woman_construction_worker_dark_skin_tone:"],
  74801. "category": "people"
  74802. },
  74803. ":woman_detective_tone1:": {
  74804. "uc_base": "1f575-1f3fb-2640",
  74805. "uc_output": "1f575-1f3fb-200d-2640-fe0f",
  74806. "uc_match": "1f575-fe0f-1f3fb-2640-fe0f",
  74807. "uc_greedy": "1f575-1f3fb-2640",
  74808. "shortnames": [":woman_detective_light_skin_tone:"],
  74809. "category": "people"
  74810. },
  74811. ":woman_detective_tone2:": {
  74812. "uc_base": "1f575-1f3fc-2640",
  74813. "uc_output": "1f575-1f3fc-200d-2640-fe0f",
  74814. "uc_match": "1f575-fe0f-1f3fc-2640-fe0f",
  74815. "uc_greedy": "1f575-1f3fc-2640",
  74816. "shortnames": [":woman_detective_medium_light_skin_tone:"],
  74817. "category": "people"
  74818. },
  74819. ":woman_detective_tone3:": {
  74820. "uc_base": "1f575-1f3fd-2640",
  74821. "uc_output": "1f575-1f3fd-200d-2640-fe0f",
  74822. "uc_match": "1f575-fe0f-1f3fd-2640-fe0f",
  74823. "uc_greedy": "1f575-1f3fd-2640",
  74824. "shortnames": [":woman_detective_medium_skin_tone:"],
  74825. "category": "people"
  74826. },
  74827. ":woman_detective_tone4:": {
  74828. "uc_base": "1f575-1f3fe-2640",
  74829. "uc_output": "1f575-1f3fe-200d-2640-fe0f",
  74830. "uc_match": "1f575-fe0f-1f3fe-2640-fe0f",
  74831. "uc_greedy": "1f575-1f3fe-2640",
  74832. "shortnames": [":woman_detective_medium_dark_skin_tone:"],
  74833. "category": "people"
  74834. },
  74835. ":woman_detective_tone5:": {
  74836. "uc_base": "1f575-1f3ff-2640",
  74837. "uc_output": "1f575-1f3ff-200d-2640-fe0f",
  74838. "uc_match": "1f575-fe0f-1f3ff-2640-fe0f",
  74839. "uc_greedy": "1f575-1f3ff-2640",
  74840. "shortnames": [":woman_detective_dark_skin_tone:"],
  74841. "category": "people"
  74842. },
  74843. ":woman_elf_tone1:": {
  74844. "uc_base": "1f9dd-1f3fb-2640",
  74845. "uc_output": "1f9dd-1f3fb-200d-2640-fe0f",
  74846. "uc_match": "1f9dd-1f3fb-2640-fe0f",
  74847. "uc_greedy": "1f9dd-1f3fb-2640",
  74848. "shortnames": [":woman_elf_light_skin_tone:"],
  74849. "category": "people"
  74850. },
  74851. ":woman_elf_tone2:": {
  74852. "uc_base": "1f9dd-1f3fc-2640",
  74853. "uc_output": "1f9dd-1f3fc-200d-2640-fe0f",
  74854. "uc_match": "1f9dd-1f3fc-2640-fe0f",
  74855. "uc_greedy": "1f9dd-1f3fc-2640",
  74856. "shortnames": [":woman_elf_medium_light_skin_tone:"],
  74857. "category": "people"
  74858. },
  74859. ":woman_elf_tone3:": {
  74860. "uc_base": "1f9dd-1f3fd-2640",
  74861. "uc_output": "1f9dd-1f3fd-200d-2640-fe0f",
  74862. "uc_match": "1f9dd-1f3fd-2640-fe0f",
  74863. "uc_greedy": "1f9dd-1f3fd-2640",
  74864. "shortnames": [":woman_elf_medium_skin_tone:"],
  74865. "category": "people"
  74866. },
  74867. ":woman_elf_tone4:": {
  74868. "uc_base": "1f9dd-1f3fe-2640",
  74869. "uc_output": "1f9dd-1f3fe-200d-2640-fe0f",
  74870. "uc_match": "1f9dd-1f3fe-2640-fe0f",
  74871. "uc_greedy": "1f9dd-1f3fe-2640",
  74872. "shortnames": [":woman_elf_medium_dark_skin_tone:"],
  74873. "category": "people"
  74874. },
  74875. ":woman_elf_tone5:": {
  74876. "uc_base": "1f9dd-1f3ff-2640",
  74877. "uc_output": "1f9dd-1f3ff-200d-2640-fe0f",
  74878. "uc_match": "1f9dd-1f3ff-2640-fe0f",
  74879. "uc_greedy": "1f9dd-1f3ff-2640",
  74880. "shortnames": [":woman_elf_dark_skin_tone:"],
  74881. "category": "people"
  74882. },
  74883. ":woman_facepalming_tone1:": {
  74884. "uc_base": "1f926-1f3fb-2640",
  74885. "uc_output": "1f926-1f3fb-200d-2640-fe0f",
  74886. "uc_match": "1f926-1f3fb-2640-fe0f",
  74887. "uc_greedy": "1f926-1f3fb-2640",
  74888. "shortnames": [":woman_facepalming_light_skin_tone:"],
  74889. "category": "people"
  74890. },
  74891. ":woman_facepalming_tone2:": {
  74892. "uc_base": "1f926-1f3fc-2640",
  74893. "uc_output": "1f926-1f3fc-200d-2640-fe0f",
  74894. "uc_match": "1f926-1f3fc-2640-fe0f",
  74895. "uc_greedy": "1f926-1f3fc-2640",
  74896. "shortnames": [":woman_facepalming_medium_light_skin_tone:"],
  74897. "category": "people"
  74898. },
  74899. ":woman_facepalming_tone3:": {
  74900. "uc_base": "1f926-1f3fd-2640",
  74901. "uc_output": "1f926-1f3fd-200d-2640-fe0f",
  74902. "uc_match": "1f926-1f3fd-2640-fe0f",
  74903. "uc_greedy": "1f926-1f3fd-2640",
  74904. "shortnames": [":woman_facepalming_medium_skin_tone:"],
  74905. "category": "people"
  74906. },
  74907. ":woman_facepalming_tone4:": {
  74908. "uc_base": "1f926-1f3fe-2640",
  74909. "uc_output": "1f926-1f3fe-200d-2640-fe0f",
  74910. "uc_match": "1f926-1f3fe-2640-fe0f",
  74911. "uc_greedy": "1f926-1f3fe-2640",
  74912. "shortnames": [":woman_facepalming_medium_dark_skin_tone:"],
  74913. "category": "people"
  74914. },
  74915. ":woman_facepalming_tone5:": {
  74916. "uc_base": "1f926-1f3ff-2640",
  74917. "uc_output": "1f926-1f3ff-200d-2640-fe0f",
  74918. "uc_match": "1f926-1f3ff-2640-fe0f",
  74919. "uc_greedy": "1f926-1f3ff-2640",
  74920. "shortnames": [":woman_facepalming_dark_skin_tone:"],
  74921. "category": "people"
  74922. },
  74923. ":woman_fairy_tone1:": {
  74924. "uc_base": "1f9da-1f3fb-2640",
  74925. "uc_output": "1f9da-1f3fb-200d-2640-fe0f",
  74926. "uc_match": "1f9da-1f3fb-2640-fe0f",
  74927. "uc_greedy": "1f9da-1f3fb-2640",
  74928. "shortnames": [":woman_fairy_light_skin_tone:"],
  74929. "category": "people"
  74930. },
  74931. ":woman_fairy_tone2:": {
  74932. "uc_base": "1f9da-1f3fc-2640",
  74933. "uc_output": "1f9da-1f3fc-200d-2640-fe0f",
  74934. "uc_match": "1f9da-1f3fc-2640-fe0f",
  74935. "uc_greedy": "1f9da-1f3fc-2640",
  74936. "shortnames": [":woman_fairy_medium_light_skin_tone:"],
  74937. "category": "people"
  74938. },
  74939. ":woman_fairy_tone3:": {
  74940. "uc_base": "1f9da-1f3fd-2640",
  74941. "uc_output": "1f9da-1f3fd-200d-2640-fe0f",
  74942. "uc_match": "1f9da-1f3fd-2640-fe0f",
  74943. "uc_greedy": "1f9da-1f3fd-2640",
  74944. "shortnames": [":woman_fairy_medium_skin_tone:"],
  74945. "category": "people"
  74946. },
  74947. ":woman_fairy_tone4:": {
  74948. "uc_base": "1f9da-1f3fe-2640",
  74949. "uc_output": "1f9da-1f3fe-200d-2640-fe0f",
  74950. "uc_match": "1f9da-1f3fe-2640-fe0f",
  74951. "uc_greedy": "1f9da-1f3fe-2640",
  74952. "shortnames": [":woman_fairy_medium_dark_skin_tone:"],
  74953. "category": "people"
  74954. },
  74955. ":woman_fairy_tone5:": {
  74956. "uc_base": "1f9da-1f3ff-2640",
  74957. "uc_output": "1f9da-1f3ff-200d-2640-fe0f",
  74958. "uc_match": "1f9da-1f3ff-2640-fe0f",
  74959. "uc_greedy": "1f9da-1f3ff-2640",
  74960. "shortnames": [":woman_fairy_dark_skin_tone:"],
  74961. "category": "people"
  74962. },
  74963. ":woman_frowning_tone1:": {
  74964. "uc_base": "1f64d-1f3fb-2640",
  74965. "uc_output": "1f64d-1f3fb-200d-2640-fe0f",
  74966. "uc_match": "1f64d-1f3fb-2640-fe0f",
  74967. "uc_greedy": "1f64d-1f3fb-2640",
  74968. "shortnames": [":woman_frowning_light_skin_tone:"],
  74969. "category": "people"
  74970. },
  74971. ":woman_frowning_tone2:": {
  74972. "uc_base": "1f64d-1f3fc-2640",
  74973. "uc_output": "1f64d-1f3fc-200d-2640-fe0f",
  74974. "uc_match": "1f64d-1f3fc-2640-fe0f",
  74975. "uc_greedy": "1f64d-1f3fc-2640",
  74976. "shortnames": [":woman_frowning_medium_light_skin_tone:"],
  74977. "category": "people"
  74978. },
  74979. ":woman_frowning_tone3:": {
  74980. "uc_base": "1f64d-1f3fd-2640",
  74981. "uc_output": "1f64d-1f3fd-200d-2640-fe0f",
  74982. "uc_match": "1f64d-1f3fd-2640-fe0f",
  74983. "uc_greedy": "1f64d-1f3fd-2640",
  74984. "shortnames": [":woman_frowning_medium_skin_tone:"],
  74985. "category": "people"
  74986. },
  74987. ":woman_frowning_tone4:": {
  74988. "uc_base": "1f64d-1f3fe-2640",
  74989. "uc_output": "1f64d-1f3fe-200d-2640-fe0f",
  74990. "uc_match": "1f64d-1f3fe-2640-fe0f",
  74991. "uc_greedy": "1f64d-1f3fe-2640",
  74992. "shortnames": [":woman_frowning_medium_dark_skin_tone:"],
  74993. "category": "people"
  74994. },
  74995. ":woman_frowning_tone5:": {
  74996. "uc_base": "1f64d-1f3ff-2640",
  74997. "uc_output": "1f64d-1f3ff-200d-2640-fe0f",
  74998. "uc_match": "1f64d-1f3ff-2640-fe0f",
  74999. "uc_greedy": "1f64d-1f3ff-2640",
  75000. "shortnames": [":woman_frowning_dark_skin_tone:"],
  75001. "category": "people"
  75002. },
  75003. ":woman_gesturing_no_tone1:": {
  75004. "uc_base": "1f645-1f3fb-2640",
  75005. "uc_output": "1f645-1f3fb-200d-2640-fe0f",
  75006. "uc_match": "1f645-1f3fb-2640-fe0f",
  75007. "uc_greedy": "1f645-1f3fb-2640",
  75008. "shortnames": [":woman_gesturing_no_light_skin_tone:"],
  75009. "category": "people"
  75010. },
  75011. ":woman_gesturing_no_tone2:": {
  75012. "uc_base": "1f645-1f3fc-2640",
  75013. "uc_output": "1f645-1f3fc-200d-2640-fe0f",
  75014. "uc_match": "1f645-1f3fc-2640-fe0f",
  75015. "uc_greedy": "1f645-1f3fc-2640",
  75016. "shortnames": [":woman_gesturing_no_medium_light_skin_tone:"],
  75017. "category": "people"
  75018. },
  75019. ":woman_gesturing_no_tone3:": {
  75020. "uc_base": "1f645-1f3fd-2640",
  75021. "uc_output": "1f645-1f3fd-200d-2640-fe0f",
  75022. "uc_match": "1f645-1f3fd-2640-fe0f",
  75023. "uc_greedy": "1f645-1f3fd-2640",
  75024. "shortnames": [":woman_gesturing_no_medium_skin_tone:"],
  75025. "category": "people"
  75026. },
  75027. ":woman_gesturing_no_tone4:": {
  75028. "uc_base": "1f645-1f3fe-2640",
  75029. "uc_output": "1f645-1f3fe-200d-2640-fe0f",
  75030. "uc_match": "1f645-1f3fe-2640-fe0f",
  75031. "uc_greedy": "1f645-1f3fe-2640",
  75032. "shortnames": [":woman_gesturing_no_medium_dark_skin_tone:"],
  75033. "category": "people"
  75034. },
  75035. ":woman_gesturing_no_tone5:": {
  75036. "uc_base": "1f645-1f3ff-2640",
  75037. "uc_output": "1f645-1f3ff-200d-2640-fe0f",
  75038. "uc_match": "1f645-1f3ff-2640-fe0f",
  75039. "uc_greedy": "1f645-1f3ff-2640",
  75040. "shortnames": [":woman_gesturing_no_dark_skin_tone:"],
  75041. "category": "people"
  75042. },
  75043. ":woman_gesturing_ok_tone1:": {
  75044. "uc_base": "1f646-1f3fb-2640",
  75045. "uc_output": "1f646-1f3fb-200d-2640-fe0f",
  75046. "uc_match": "1f646-1f3fb-2640-fe0f",
  75047. "uc_greedy": "1f646-1f3fb-2640",
  75048. "shortnames": [":woman_gesturing_ok_light_skin_tone:"],
  75049. "category": "people"
  75050. },
  75051. ":woman_gesturing_ok_tone2:": {
  75052. "uc_base": "1f646-1f3fc-2640",
  75053. "uc_output": "1f646-1f3fc-200d-2640-fe0f",
  75054. "uc_match": "1f646-1f3fc-2640-fe0f",
  75055. "uc_greedy": "1f646-1f3fc-2640",
  75056. "shortnames": [":woman_gesturing_ok_medium_light_skin_tone:"],
  75057. "category": "people"
  75058. },
  75059. ":woman_gesturing_ok_tone3:": {
  75060. "uc_base": "1f646-1f3fd-2640",
  75061. "uc_output": "1f646-1f3fd-200d-2640-fe0f",
  75062. "uc_match": "1f646-1f3fd-2640-fe0f",
  75063. "uc_greedy": "1f646-1f3fd-2640",
  75064. "shortnames": [":woman_gesturing_ok_medium_skin_tone:"],
  75065. "category": "people"
  75066. },
  75067. ":woman_gesturing_ok_tone4:": {
  75068. "uc_base": "1f646-1f3fe-2640",
  75069. "uc_output": "1f646-1f3fe-200d-2640-fe0f",
  75070. "uc_match": "1f646-1f3fe-2640-fe0f",
  75071. "uc_greedy": "1f646-1f3fe-2640",
  75072. "shortnames": [":woman_gesturing_ok_medium_dark_skin_tone:"],
  75073. "category": "people"
  75074. },
  75075. ":woman_gesturing_ok_tone5:": {
  75076. "uc_base": "1f646-1f3ff-2640",
  75077. "uc_output": "1f646-1f3ff-200d-2640-fe0f",
  75078. "uc_match": "1f646-1f3ff-2640-fe0f",
  75079. "uc_greedy": "1f646-1f3ff-2640",
  75080. "shortnames": [":woman_gesturing_ok_dark_skin_tone:"],
  75081. "category": "people"
  75082. },
  75083. ":woman_getting_face_massage_tone1:": {
  75084. "uc_base": "1f486-1f3fb-2640",
  75085. "uc_output": "1f486-1f3fb-200d-2640-fe0f",
  75086. "uc_match": "1f486-1f3fb-2640-fe0f",
  75087. "uc_greedy": "1f486-1f3fb-2640",
  75088. "shortnames": [":woman_getting_face_massage_light_skin_tone:"],
  75089. "category": "people"
  75090. },
  75091. ":woman_getting_face_massage_tone2:": {
  75092. "uc_base": "1f486-1f3fc-2640",
  75093. "uc_output": "1f486-1f3fc-200d-2640-fe0f",
  75094. "uc_match": "1f486-1f3fc-2640-fe0f",
  75095. "uc_greedy": "1f486-1f3fc-2640",
  75096. "shortnames": [":woman_getting_face_massage_medium_light_skin_tone:"],
  75097. "category": "people"
  75098. },
  75099. ":woman_getting_face_massage_tone3:": {
  75100. "uc_base": "1f486-1f3fd-2640",
  75101. "uc_output": "1f486-1f3fd-200d-2640-fe0f",
  75102. "uc_match": "1f486-1f3fd-2640-fe0f",
  75103. "uc_greedy": "1f486-1f3fd-2640",
  75104. "shortnames": [":woman_getting_face_massage_medium_skin_tone:"],
  75105. "category": "people"
  75106. },
  75107. ":woman_getting_face_massage_tone4:": {
  75108. "uc_base": "1f486-1f3fe-2640",
  75109. "uc_output": "1f486-1f3fe-200d-2640-fe0f",
  75110. "uc_match": "1f486-1f3fe-2640-fe0f",
  75111. "uc_greedy": "1f486-1f3fe-2640",
  75112. "shortnames": [":woman_getting_face_massage_medium_dark_skin_tone:"],
  75113. "category": "people"
  75114. },
  75115. ":woman_getting_face_massage_tone5:": {
  75116. "uc_base": "1f486-1f3ff-2640",
  75117. "uc_output": "1f486-1f3ff-200d-2640-fe0f",
  75118. "uc_match": "1f486-1f3ff-2640-fe0f",
  75119. "uc_greedy": "1f486-1f3ff-2640",
  75120. "shortnames": [":woman_getting_face_massage_dark_skin_tone:"],
  75121. "category": "people"
  75122. },
  75123. ":woman_getting_haircut_tone1:": {
  75124. "uc_base": "1f487-1f3fb-2640",
  75125. "uc_output": "1f487-1f3fb-200d-2640-fe0f",
  75126. "uc_match": "1f487-1f3fb-2640-fe0f",
  75127. "uc_greedy": "1f487-1f3fb-2640",
  75128. "shortnames": [":woman_getting_haircut_light_skin_tone:"],
  75129. "category": "people"
  75130. },
  75131. ":woman_getting_haircut_tone2:": {
  75132. "uc_base": "1f487-1f3fc-2640",
  75133. "uc_output": "1f487-1f3fc-200d-2640-fe0f",
  75134. "uc_match": "1f487-1f3fc-2640-fe0f",
  75135. "uc_greedy": "1f487-1f3fc-2640",
  75136. "shortnames": [":woman_getting_haircut_medium_light_skin_tone:"],
  75137. "category": "people"
  75138. },
  75139. ":woman_getting_haircut_tone3:": {
  75140. "uc_base": "1f487-1f3fd-2640",
  75141. "uc_output": "1f487-1f3fd-200d-2640-fe0f",
  75142. "uc_match": "1f487-1f3fd-2640-fe0f",
  75143. "uc_greedy": "1f487-1f3fd-2640",
  75144. "shortnames": [":woman_getting_haircut_medium_skin_tone:"],
  75145. "category": "people"
  75146. },
  75147. ":woman_getting_haircut_tone4:": {
  75148. "uc_base": "1f487-1f3fe-2640",
  75149. "uc_output": "1f487-1f3fe-200d-2640-fe0f",
  75150. "uc_match": "1f487-1f3fe-2640-fe0f",
  75151. "uc_greedy": "1f487-1f3fe-2640",
  75152. "shortnames": [":woman_getting_haircut_medium_dark_skin_tone:"],
  75153. "category": "people"
  75154. },
  75155. ":woman_getting_haircut_tone5:": {
  75156. "uc_base": "1f487-1f3ff-2640",
  75157. "uc_output": "1f487-1f3ff-200d-2640-fe0f",
  75158. "uc_match": "1f487-1f3ff-2640-fe0f",
  75159. "uc_greedy": "1f487-1f3ff-2640",
  75160. "shortnames": [":woman_getting_haircut_dark_skin_tone:"],
  75161. "category": "people"
  75162. },
  75163. ":woman_golfing_tone1:": {
  75164. "uc_base": "1f3cc-1f3fb-2640",
  75165. "uc_output": "1f3cc-1f3fb-200d-2640-fe0f",
  75166. "uc_match": "1f3cc-fe0f-1f3fb-2640-fe0f",
  75167. "uc_greedy": "1f3cc-1f3fb-2640",
  75168. "shortnames": [":woman_golfing_light_skin_tone:"],
  75169. "category": "activity"
  75170. },
  75171. ":woman_golfing_tone2:": {
  75172. "uc_base": "1f3cc-1f3fc-2640",
  75173. "uc_output": "1f3cc-1f3fc-200d-2640-fe0f",
  75174. "uc_match": "1f3cc-fe0f-1f3fc-2640-fe0f",
  75175. "uc_greedy": "1f3cc-1f3fc-2640",
  75176. "shortnames": [":woman_golfing_medium_light_skin_tone:"],
  75177. "category": "activity"
  75178. },
  75179. ":woman_golfing_tone3:": {
  75180. "uc_base": "1f3cc-1f3fd-2640",
  75181. "uc_output": "1f3cc-1f3fd-200d-2640-fe0f",
  75182. "uc_match": "1f3cc-fe0f-1f3fd-2640-fe0f",
  75183. "uc_greedy": "1f3cc-1f3fd-2640",
  75184. "shortnames": [":woman_golfing_medium_skin_tone:"],
  75185. "category": "activity"
  75186. },
  75187. ":woman_golfing_tone4:": {
  75188. "uc_base": "1f3cc-1f3fe-2640",
  75189. "uc_output": "1f3cc-1f3fe-200d-2640-fe0f",
  75190. "uc_match": "1f3cc-fe0f-1f3fe-2640-fe0f",
  75191. "uc_greedy": "1f3cc-1f3fe-2640",
  75192. "shortnames": [":woman_golfing_medium_dark_skin_tone:"],
  75193. "category": "activity"
  75194. },
  75195. ":woman_golfing_tone5:": {
  75196. "uc_base": "1f3cc-1f3ff-2640",
  75197. "uc_output": "1f3cc-1f3ff-200d-2640-fe0f",
  75198. "uc_match": "1f3cc-fe0f-1f3ff-2640-fe0f",
  75199. "uc_greedy": "1f3cc-1f3ff-2640",
  75200. "shortnames": [":woman_golfing_dark_skin_tone:"],
  75201. "category": "activity"
  75202. },
  75203. ":woman_guard_tone1:": {
  75204. "uc_base": "1f482-1f3fb-2640",
  75205. "uc_output": "1f482-1f3fb-200d-2640-fe0f",
  75206. "uc_match": "1f482-1f3fb-2640-fe0f",
  75207. "uc_greedy": "1f482-1f3fb-2640",
  75208. "shortnames": [":woman_guard_light_skin_tone:"],
  75209. "category": "people"
  75210. },
  75211. ":woman_guard_tone2:": {
  75212. "uc_base": "1f482-1f3fc-2640",
  75213. "uc_output": "1f482-1f3fc-200d-2640-fe0f",
  75214. "uc_match": "1f482-1f3fc-2640-fe0f",
  75215. "uc_greedy": "1f482-1f3fc-2640",
  75216. "shortnames": [":woman_guard_medium_light_skin_tone:"],
  75217. "category": "people"
  75218. },
  75219. ":woman_guard_tone3:": {
  75220. "uc_base": "1f482-1f3fd-2640",
  75221. "uc_output": "1f482-1f3fd-200d-2640-fe0f",
  75222. "uc_match": "1f482-1f3fd-2640-fe0f",
  75223. "uc_greedy": "1f482-1f3fd-2640",
  75224. "shortnames": [":woman_guard_medium_skin_tone:"],
  75225. "category": "people"
  75226. },
  75227. ":woman_guard_tone4:": {
  75228. "uc_base": "1f482-1f3fe-2640",
  75229. "uc_output": "1f482-1f3fe-200d-2640-fe0f",
  75230. "uc_match": "1f482-1f3fe-2640-fe0f",
  75231. "uc_greedy": "1f482-1f3fe-2640",
  75232. "shortnames": [":woman_guard_medium_dark_skin_tone:"],
  75233. "category": "people"
  75234. },
  75235. ":woman_guard_tone5:": {
  75236. "uc_base": "1f482-1f3ff-2640",
  75237. "uc_output": "1f482-1f3ff-200d-2640-fe0f",
  75238. "uc_match": "1f482-1f3ff-2640-fe0f",
  75239. "uc_greedy": "1f482-1f3ff-2640",
  75240. "shortnames": [":woman_guard_dark_skin_tone:"],
  75241. "category": "people"
  75242. },
  75243. ":woman_health_worker_tone1:": {
  75244. "uc_base": "1f469-1f3fb-2695",
  75245. "uc_output": "1f469-1f3fb-200d-2695-fe0f",
  75246. "uc_match": "1f469-1f3fb-2695-fe0f",
  75247. "uc_greedy": "1f469-1f3fb-2695",
  75248. "shortnames": [":woman_health_worker_light_skin_tone:"],
  75249. "category": "people"
  75250. },
  75251. ":woman_health_worker_tone2:": {
  75252. "uc_base": "1f469-1f3fc-2695",
  75253. "uc_output": "1f469-1f3fc-200d-2695-fe0f",
  75254. "uc_match": "1f469-1f3fc-2695-fe0f",
  75255. "uc_greedy": "1f469-1f3fc-2695",
  75256. "shortnames": [":woman_health_worker_medium_light_skin_tone:"],
  75257. "category": "people"
  75258. },
  75259. ":woman_health_worker_tone3:": {
  75260. "uc_base": "1f469-1f3fd-2695",
  75261. "uc_output": "1f469-1f3fd-200d-2695-fe0f",
  75262. "uc_match": "1f469-1f3fd-2695-fe0f",
  75263. "uc_greedy": "1f469-1f3fd-2695",
  75264. "shortnames": [":woman_health_worker_medium_skin_tone:"],
  75265. "category": "people"
  75266. },
  75267. ":woman_health_worker_tone4:": {
  75268. "uc_base": "1f469-1f3fe-2695",
  75269. "uc_output": "1f469-1f3fe-200d-2695-fe0f",
  75270. "uc_match": "1f469-1f3fe-2695-fe0f",
  75271. "uc_greedy": "1f469-1f3fe-2695",
  75272. "shortnames": [":woman_health_worker_medium_dark_skin_tone:"],
  75273. "category": "people"
  75274. },
  75275. ":woman_health_worker_tone5:": {
  75276. "uc_base": "1f469-1f3ff-2695",
  75277. "uc_output": "1f469-1f3ff-200d-2695-fe0f",
  75278. "uc_match": "1f469-1f3ff-2695-fe0f",
  75279. "uc_greedy": "1f469-1f3ff-2695",
  75280. "shortnames": [":woman_health_worker_dark_skin_tone:"],
  75281. "category": "people"
  75282. },
  75283. ":woman_in_lotus_position_tone1:": {
  75284. "uc_base": "1f9d8-1f3fb-2640",
  75285. "uc_output": "1f9d8-1f3fb-200d-2640-fe0f",
  75286. "uc_match": "1f9d8-1f3fb-2640-fe0f",
  75287. "uc_greedy": "1f9d8-1f3fb-2640",
  75288. "shortnames": [":woman_in_lotus_position_light_skin_tone:"],
  75289. "category": "activity"
  75290. },
  75291. ":woman_in_lotus_position_tone2:": {
  75292. "uc_base": "1f9d8-1f3fc-2640",
  75293. "uc_output": "1f9d8-1f3fc-200d-2640-fe0f",
  75294. "uc_match": "1f9d8-1f3fc-2640-fe0f",
  75295. "uc_greedy": "1f9d8-1f3fc-2640",
  75296. "shortnames": [":woman_in_lotus_position_medium_light_skin_tone:"],
  75297. "category": "activity"
  75298. },
  75299. ":woman_in_lotus_position_tone3:": {
  75300. "uc_base": "1f9d8-1f3fd-2640",
  75301. "uc_output": "1f9d8-1f3fd-200d-2640-fe0f",
  75302. "uc_match": "1f9d8-1f3fd-2640-fe0f",
  75303. "uc_greedy": "1f9d8-1f3fd-2640",
  75304. "shortnames": [":woman_in_lotus_position_medium_skin_tone:"],
  75305. "category": "activity"
  75306. },
  75307. ":woman_in_lotus_position_tone4:": {
  75308. "uc_base": "1f9d8-1f3fe-2640",
  75309. "uc_output": "1f9d8-1f3fe-200d-2640-fe0f",
  75310. "uc_match": "1f9d8-1f3fe-2640-fe0f",
  75311. "uc_greedy": "1f9d8-1f3fe-2640",
  75312. "shortnames": [":woman_in_lotus_position_medium_dark_skin_tone:"],
  75313. "category": "activity"
  75314. },
  75315. ":woman_in_lotus_position_tone5:": {
  75316. "uc_base": "1f9d8-1f3ff-2640",
  75317. "uc_output": "1f9d8-1f3ff-200d-2640-fe0f",
  75318. "uc_match": "1f9d8-1f3ff-2640-fe0f",
  75319. "uc_greedy": "1f9d8-1f3ff-2640",
  75320. "shortnames": [":woman_in_lotus_position_dark_skin_tone:"],
  75321. "category": "activity"
  75322. },
  75323. ":woman_in_steamy_room_tone1:": {
  75324. "uc_base": "1f9d6-1f3fb-2640",
  75325. "uc_output": "1f9d6-1f3fb-200d-2640-fe0f",
  75326. "uc_match": "1f9d6-1f3fb-2640-fe0f",
  75327. "uc_greedy": "1f9d6-1f3fb-2640",
  75328. "shortnames": [":woman_in_steamy_room_light_skin_tone:"],
  75329. "category": "people"
  75330. },
  75331. ":woman_in_steamy_room_tone2:": {
  75332. "uc_base": "1f9d6-1f3fc-2640",
  75333. "uc_output": "1f9d6-1f3fc-200d-2640-fe0f",
  75334. "uc_match": "1f9d6-1f3fc-2640-fe0f",
  75335. "uc_greedy": "1f9d6-1f3fc-2640",
  75336. "shortnames": [":woman_in_steamy_room_medium_light_skin_tone:"],
  75337. "category": "people"
  75338. },
  75339. ":woman_in_steamy_room_tone3:": {
  75340. "uc_base": "1f9d6-1f3fd-2640",
  75341. "uc_output": "1f9d6-1f3fd-200d-2640-fe0f",
  75342. "uc_match": "1f9d6-1f3fd-2640-fe0f",
  75343. "uc_greedy": "1f9d6-1f3fd-2640",
  75344. "shortnames": [":woman_in_steamy_room_medium_skin_tone:"],
  75345. "category": "people"
  75346. },
  75347. ":woman_in_steamy_room_tone4:": {
  75348. "uc_base": "1f9d6-1f3fe-2640",
  75349. "uc_output": "1f9d6-1f3fe-200d-2640-fe0f",
  75350. "uc_match": "1f9d6-1f3fe-2640-fe0f",
  75351. "uc_greedy": "1f9d6-1f3fe-2640",
  75352. "shortnames": [":woman_in_steamy_room_medium_dark_skin_tone:"],
  75353. "category": "people"
  75354. },
  75355. ":woman_in_steamy_room_tone5:": {
  75356. "uc_base": "1f9d6-1f3ff-2640",
  75357. "uc_output": "1f9d6-1f3ff-200d-2640-fe0f",
  75358. "uc_match": "1f9d6-1f3ff-2640-fe0f",
  75359. "uc_greedy": "1f9d6-1f3ff-2640",
  75360. "shortnames": [":woman_in_steamy_room_dark_skin_tone:"],
  75361. "category": "people"
  75362. },
  75363. ":woman_judge_tone1:": {
  75364. "uc_base": "1f469-1f3fb-2696",
  75365. "uc_output": "1f469-1f3fb-200d-2696-fe0f",
  75366. "uc_match": "1f469-1f3fb-2696-fe0f",
  75367. "uc_greedy": "1f469-1f3fb-2696",
  75368. "shortnames": [":woman_judge_light_skin_tone:"],
  75369. "category": "people"
  75370. },
  75371. ":woman_judge_tone2:": {
  75372. "uc_base": "1f469-1f3fc-2696",
  75373. "uc_output": "1f469-1f3fc-200d-2696-fe0f",
  75374. "uc_match": "1f469-1f3fc-2696-fe0f",
  75375. "uc_greedy": "1f469-1f3fc-2696",
  75376. "shortnames": [":woman_judge_medium_light_skin_tone:"],
  75377. "category": "people"
  75378. },
  75379. ":woman_judge_tone3:": {
  75380. "uc_base": "1f469-1f3fd-2696",
  75381. "uc_output": "1f469-1f3fd-200d-2696-fe0f",
  75382. "uc_match": "1f469-1f3fd-2696-fe0f",
  75383. "uc_greedy": "1f469-1f3fd-2696",
  75384. "shortnames": [":woman_judge_medium_skin_tone:"],
  75385. "category": "people"
  75386. },
  75387. ":woman_judge_tone4:": {
  75388. "uc_base": "1f469-1f3fe-2696",
  75389. "uc_output": "1f469-1f3fe-200d-2696-fe0f",
  75390. "uc_match": "1f469-1f3fe-2696-fe0f",
  75391. "uc_greedy": "1f469-1f3fe-2696",
  75392. "shortnames": [":woman_judge_medium_dark_skin_tone:"],
  75393. "category": "people"
  75394. },
  75395. ":woman_judge_tone5:": {
  75396. "uc_base": "1f469-1f3ff-2696",
  75397. "uc_output": "1f469-1f3ff-200d-2696-fe0f",
  75398. "uc_match": "1f469-1f3ff-2696-fe0f",
  75399. "uc_greedy": "1f469-1f3ff-2696",
  75400. "shortnames": [":woman_judge_dark_skin_tone:"],
  75401. "category": "people"
  75402. },
  75403. ":woman_juggling_tone1:": {
  75404. "uc_base": "1f939-1f3fb-2640",
  75405. "uc_output": "1f939-1f3fb-200d-2640-fe0f",
  75406. "uc_match": "1f939-1f3fb-2640-fe0f",
  75407. "uc_greedy": "1f939-1f3fb-2640",
  75408. "shortnames": [":woman_juggling_light_skin_tone:"],
  75409. "category": "activity"
  75410. },
  75411. ":woman_juggling_tone2:": {
  75412. "uc_base": "1f939-1f3fc-2640",
  75413. "uc_output": "1f939-1f3fc-200d-2640-fe0f",
  75414. "uc_match": "1f939-1f3fc-2640-fe0f",
  75415. "uc_greedy": "1f939-1f3fc-2640",
  75416. "shortnames": [":woman_juggling_medium_light_skin_tone:"],
  75417. "category": "activity"
  75418. },
  75419. ":woman_juggling_tone3:": {
  75420. "uc_base": "1f939-1f3fd-2640",
  75421. "uc_output": "1f939-1f3fd-200d-2640-fe0f",
  75422. "uc_match": "1f939-1f3fd-2640-fe0f",
  75423. "uc_greedy": "1f939-1f3fd-2640",
  75424. "shortnames": [":woman_juggling_medium_skin_tone:"],
  75425. "category": "activity"
  75426. },
  75427. ":woman_juggling_tone4:": {
  75428. "uc_base": "1f939-1f3fe-2640",
  75429. "uc_output": "1f939-1f3fe-200d-2640-fe0f",
  75430. "uc_match": "1f939-1f3fe-2640-fe0f",
  75431. "uc_greedy": "1f939-1f3fe-2640",
  75432. "shortnames": [":woman_juggling_medium_dark_skin_tone:"],
  75433. "category": "activity"
  75434. },
  75435. ":woman_juggling_tone5:": {
  75436. "uc_base": "1f939-1f3ff-2640",
  75437. "uc_output": "1f939-1f3ff-200d-2640-fe0f",
  75438. "uc_match": "1f939-1f3ff-2640-fe0f",
  75439. "uc_greedy": "1f939-1f3ff-2640",
  75440. "shortnames": [":woman_juggling_dark_skin_tone:"],
  75441. "category": "activity"
  75442. },
  75443. ":woman_lifting_weights_tone1:": {
  75444. "uc_base": "1f3cb-1f3fb-2640",
  75445. "uc_output": "1f3cb-1f3fb-200d-2640-fe0f",
  75446. "uc_match": "1f3cb-fe0f-1f3fb-2640-fe0f",
  75447. "uc_greedy": "1f3cb-1f3fb-2640",
  75448. "shortnames": [":woman_lifting_weights_light_skin_tone:"],
  75449. "category": "activity"
  75450. },
  75451. ":woman_lifting_weights_tone2:": {
  75452. "uc_base": "1f3cb-1f3fc-2640",
  75453. "uc_output": "1f3cb-1f3fc-200d-2640-fe0f",
  75454. "uc_match": "1f3cb-fe0f-1f3fc-2640-fe0f",
  75455. "uc_greedy": "1f3cb-1f3fc-2640",
  75456. "shortnames": [":woman_lifting_weights_medium_light_skin_tone:"],
  75457. "category": "activity"
  75458. },
  75459. ":woman_lifting_weights_tone3:": {
  75460. "uc_base": "1f3cb-1f3fd-2640",
  75461. "uc_output": "1f3cb-1f3fd-200d-2640-fe0f",
  75462. "uc_match": "1f3cb-fe0f-1f3fd-2640-fe0f",
  75463. "uc_greedy": "1f3cb-1f3fd-2640",
  75464. "shortnames": [":woman_lifting_weights_medium_skin_tone:"],
  75465. "category": "activity"
  75466. },
  75467. ":woman_lifting_weights_tone4:": {
  75468. "uc_base": "1f3cb-1f3fe-2640",
  75469. "uc_output": "1f3cb-1f3fe-200d-2640-fe0f",
  75470. "uc_match": "1f3cb-fe0f-1f3fe-2640-fe0f",
  75471. "uc_greedy": "1f3cb-1f3fe-2640",
  75472. "shortnames": [":woman_lifting_weights_medium_dark_skin_tone:"],
  75473. "category": "activity"
  75474. },
  75475. ":woman_lifting_weights_tone5:": {
  75476. "uc_base": "1f3cb-1f3ff-2640",
  75477. "uc_output": "1f3cb-1f3ff-200d-2640-fe0f",
  75478. "uc_match": "1f3cb-fe0f-1f3ff-2640-fe0f",
  75479. "uc_greedy": "1f3cb-1f3ff-2640",
  75480. "shortnames": [":woman_lifting_weights_dark_skin_tone:"],
  75481. "category": "activity"
  75482. },
  75483. ":woman_mage_tone1:": {
  75484. "uc_base": "1f9d9-1f3fb-2640",
  75485. "uc_output": "1f9d9-1f3fb-200d-2640-fe0f",
  75486. "uc_match": "1f9d9-1f3fb-2640-fe0f",
  75487. "uc_greedy": "1f9d9-1f3fb-2640",
  75488. "shortnames": [":woman_mage_light_skin_tone:"],
  75489. "category": "people"
  75490. },
  75491. ":woman_mage_tone2:": {
  75492. "uc_base": "1f9d9-1f3fc-2640",
  75493. "uc_output": "1f9d9-1f3fc-200d-2640-fe0f",
  75494. "uc_match": "1f9d9-1f3fc-2640-fe0f",
  75495. "uc_greedy": "1f9d9-1f3fc-2640",
  75496. "shortnames": [":woman_mage_medium_light_skin_tone:"],
  75497. "category": "people"
  75498. },
  75499. ":woman_mage_tone3:": {
  75500. "uc_base": "1f9d9-1f3fd-2640",
  75501. "uc_output": "1f9d9-1f3fd-200d-2640-fe0f",
  75502. "uc_match": "1f9d9-1f3fd-2640-fe0f",
  75503. "uc_greedy": "1f9d9-1f3fd-2640",
  75504. "shortnames": [":woman_mage_medium_skin_tone:"],
  75505. "category": "people"
  75506. },
  75507. ":woman_mage_tone4:": {
  75508. "uc_base": "1f9d9-1f3fe-2640",
  75509. "uc_output": "1f9d9-1f3fe-200d-2640-fe0f",
  75510. "uc_match": "1f9d9-1f3fe-2640-fe0f",
  75511. "uc_greedy": "1f9d9-1f3fe-2640",
  75512. "shortnames": [":woman_mage_medium_dark_skin_tone:"],
  75513. "category": "people"
  75514. },
  75515. ":woman_mage_tone5:": {
  75516. "uc_base": "1f9d9-1f3ff-2640",
  75517. "uc_output": "1f9d9-1f3ff-200d-2640-fe0f",
  75518. "uc_match": "1f9d9-1f3ff-2640-fe0f",
  75519. "uc_greedy": "1f9d9-1f3ff-2640",
  75520. "shortnames": [":woman_mage_dark_skin_tone:"],
  75521. "category": "people"
  75522. },
  75523. ":woman_mountain_biking_tone1:": {
  75524. "uc_base": "1f6b5-1f3fb-2640",
  75525. "uc_output": "1f6b5-1f3fb-200d-2640-fe0f",
  75526. "uc_match": "1f6b5-1f3fb-2640-fe0f",
  75527. "uc_greedy": "1f6b5-1f3fb-2640",
  75528. "shortnames": [":woman_mountain_biking_light_skin_tone:"],
  75529. "category": "activity"
  75530. },
  75531. ":woman_mountain_biking_tone2:": {
  75532. "uc_base": "1f6b5-1f3fc-2640",
  75533. "uc_output": "1f6b5-1f3fc-200d-2640-fe0f",
  75534. "uc_match": "1f6b5-1f3fc-2640-fe0f",
  75535. "uc_greedy": "1f6b5-1f3fc-2640",
  75536. "shortnames": [":woman_mountain_biking_medium_light_skin_tone:"],
  75537. "category": "activity"
  75538. },
  75539. ":woman_mountain_biking_tone3:": {
  75540. "uc_base": "1f6b5-1f3fd-2640",
  75541. "uc_output": "1f6b5-1f3fd-200d-2640-fe0f",
  75542. "uc_match": "1f6b5-1f3fd-2640-fe0f",
  75543. "uc_greedy": "1f6b5-1f3fd-2640",
  75544. "shortnames": [":woman_mountain_biking_medium_skin_tone:"],
  75545. "category": "activity"
  75546. },
  75547. ":woman_mountain_biking_tone4:": {
  75548. "uc_base": "1f6b5-1f3fe-2640",
  75549. "uc_output": "1f6b5-1f3fe-200d-2640-fe0f",
  75550. "uc_match": "1f6b5-1f3fe-2640-fe0f",
  75551. "uc_greedy": "1f6b5-1f3fe-2640",
  75552. "shortnames": [":woman_mountain_biking_medium_dark_skin_tone:"],
  75553. "category": "activity"
  75554. },
  75555. ":woman_mountain_biking_tone5:": {
  75556. "uc_base": "1f6b5-1f3ff-2640",
  75557. "uc_output": "1f6b5-1f3ff-200d-2640-fe0f",
  75558. "uc_match": "1f6b5-1f3ff-2640-fe0f",
  75559. "uc_greedy": "1f6b5-1f3ff-2640",
  75560. "shortnames": [":woman_mountain_biking_dark_skin_tone:"],
  75561. "category": "activity"
  75562. },
  75563. ":woman_pilot_tone1:": {
  75564. "uc_base": "1f469-1f3fb-2708",
  75565. "uc_output": "1f469-1f3fb-200d-2708-fe0f",
  75566. "uc_match": "1f469-1f3fb-2708-fe0f",
  75567. "uc_greedy": "1f469-1f3fb-2708",
  75568. "shortnames": [":woman_pilot_light_skin_tone:"],
  75569. "category": "people"
  75570. },
  75571. ":woman_pilot_tone2:": {
  75572. "uc_base": "1f469-1f3fc-2708",
  75573. "uc_output": "1f469-1f3fc-200d-2708-fe0f",
  75574. "uc_match": "1f469-1f3fc-2708-fe0f",
  75575. "uc_greedy": "1f469-1f3fc-2708",
  75576. "shortnames": [":woman_pilot_medium_light_skin_tone:"],
  75577. "category": "people"
  75578. },
  75579. ":woman_pilot_tone3:": {
  75580. "uc_base": "1f469-1f3fd-2708",
  75581. "uc_output": "1f469-1f3fd-200d-2708-fe0f",
  75582. "uc_match": "1f469-1f3fd-2708-fe0f",
  75583. "uc_greedy": "1f469-1f3fd-2708",
  75584. "shortnames": [":woman_pilot_medium_skin_tone:"],
  75585. "category": "people"
  75586. },
  75587. ":woman_pilot_tone4:": {
  75588. "uc_base": "1f469-1f3fe-2708",
  75589. "uc_output": "1f469-1f3fe-200d-2708-fe0f",
  75590. "uc_match": "1f469-1f3fe-2708-fe0f",
  75591. "uc_greedy": "1f469-1f3fe-2708",
  75592. "shortnames": [":woman_pilot_medium_dark_skin_tone:"],
  75593. "category": "people"
  75594. },
  75595. ":woman_pilot_tone5:": {
  75596. "uc_base": "1f469-1f3ff-2708",
  75597. "uc_output": "1f469-1f3ff-200d-2708-fe0f",
  75598. "uc_match": "1f469-1f3ff-2708-fe0f",
  75599. "uc_greedy": "1f469-1f3ff-2708",
  75600. "shortnames": [":woman_pilot_dark_skin_tone:"],
  75601. "category": "people"
  75602. },
  75603. ":woman_playing_handball_tone1:": {
  75604. "uc_base": "1f93e-1f3fb-2640",
  75605. "uc_output": "1f93e-1f3fb-200d-2640-fe0f",
  75606. "uc_match": "1f93e-1f3fb-2640-fe0f",
  75607. "uc_greedy": "1f93e-1f3fb-2640",
  75608. "shortnames": [":woman_playing_handball_light_skin_tone:"],
  75609. "category": "activity"
  75610. },
  75611. ":woman_playing_handball_tone2:": {
  75612. "uc_base": "1f93e-1f3fc-2640",
  75613. "uc_output": "1f93e-1f3fc-200d-2640-fe0f",
  75614. "uc_match": "1f93e-1f3fc-2640-fe0f",
  75615. "uc_greedy": "1f93e-1f3fc-2640",
  75616. "shortnames": [":woman_playing_handball_medium_light_skin_tone:"],
  75617. "category": "activity"
  75618. },
  75619. ":woman_playing_handball_tone3:": {
  75620. "uc_base": "1f93e-1f3fd-2640",
  75621. "uc_output": "1f93e-1f3fd-200d-2640-fe0f",
  75622. "uc_match": "1f93e-1f3fd-2640-fe0f",
  75623. "uc_greedy": "1f93e-1f3fd-2640",
  75624. "shortnames": [":woman_playing_handball_medium_skin_tone:"],
  75625. "category": "activity"
  75626. },
  75627. ":woman_playing_handball_tone4:": {
  75628. "uc_base": "1f93e-1f3fe-2640",
  75629. "uc_output": "1f93e-1f3fe-200d-2640-fe0f",
  75630. "uc_match": "1f93e-1f3fe-2640-fe0f",
  75631. "uc_greedy": "1f93e-1f3fe-2640",
  75632. "shortnames": [":woman_playing_handball_medium_dark_skin_tone:"],
  75633. "category": "activity"
  75634. },
  75635. ":woman_playing_handball_tone5:": {
  75636. "uc_base": "1f93e-1f3ff-2640",
  75637. "uc_output": "1f93e-1f3ff-200d-2640-fe0f",
  75638. "uc_match": "1f93e-1f3ff-2640-fe0f",
  75639. "uc_greedy": "1f93e-1f3ff-2640",
  75640. "shortnames": [":woman_playing_handball_dark_skin_tone:"],
  75641. "category": "activity"
  75642. },
  75643. ":woman_playing_water_polo_tone1:": {
  75644. "uc_base": "1f93d-1f3fb-2640",
  75645. "uc_output": "1f93d-1f3fb-200d-2640-fe0f",
  75646. "uc_match": "1f93d-1f3fb-2640-fe0f",
  75647. "uc_greedy": "1f93d-1f3fb-2640",
  75648. "shortnames": [":woman_playing_water_polo_light_skin_tone:"],
  75649. "category": "activity"
  75650. },
  75651. ":woman_playing_water_polo_tone2:": {
  75652. "uc_base": "1f93d-1f3fc-2640",
  75653. "uc_output": "1f93d-1f3fc-200d-2640-fe0f",
  75654. "uc_match": "1f93d-1f3fc-2640-fe0f",
  75655. "uc_greedy": "1f93d-1f3fc-2640",
  75656. "shortnames": [":woman_playing_water_polo_medium_light_skin_tone:"],
  75657. "category": "activity"
  75658. },
  75659. ":woman_playing_water_polo_tone3:": {
  75660. "uc_base": "1f93d-1f3fd-2640",
  75661. "uc_output": "1f93d-1f3fd-200d-2640-fe0f",
  75662. "uc_match": "1f93d-1f3fd-2640-fe0f",
  75663. "uc_greedy": "1f93d-1f3fd-2640",
  75664. "shortnames": [":woman_playing_water_polo_medium_skin_tone:"],
  75665. "category": "activity"
  75666. },
  75667. ":woman_playing_water_polo_tone4:": {
  75668. "uc_base": "1f93d-1f3fe-2640",
  75669. "uc_output": "1f93d-1f3fe-200d-2640-fe0f",
  75670. "uc_match": "1f93d-1f3fe-2640-fe0f",
  75671. "uc_greedy": "1f93d-1f3fe-2640",
  75672. "shortnames": [":woman_playing_water_polo_medium_dark_skin_tone:"],
  75673. "category": "activity"
  75674. },
  75675. ":woman_playing_water_polo_tone5:": {
  75676. "uc_base": "1f93d-1f3ff-2640",
  75677. "uc_output": "1f93d-1f3ff-200d-2640-fe0f",
  75678. "uc_match": "1f93d-1f3ff-2640-fe0f",
  75679. "uc_greedy": "1f93d-1f3ff-2640",
  75680. "shortnames": [":woman_playing_water_polo_dark_skin_tone:"],
  75681. "category": "activity"
  75682. },
  75683. ":woman_police_officer_tone1:": {
  75684. "uc_base": "1f46e-1f3fb-2640",
  75685. "uc_output": "1f46e-1f3fb-200d-2640-fe0f",
  75686. "uc_match": "1f46e-1f3fb-2640-fe0f",
  75687. "uc_greedy": "1f46e-1f3fb-2640",
  75688. "shortnames": [":woman_police_officer_light_skin_tone:"],
  75689. "category": "people"
  75690. },
  75691. ":woman_police_officer_tone2:": {
  75692. "uc_base": "1f46e-1f3fc-2640",
  75693. "uc_output": "1f46e-1f3fc-200d-2640-fe0f",
  75694. "uc_match": "1f46e-1f3fc-2640-fe0f",
  75695. "uc_greedy": "1f46e-1f3fc-2640",
  75696. "shortnames": [":woman_police_officer_medium_light_skin_tone:"],
  75697. "category": "people"
  75698. },
  75699. ":woman_police_officer_tone3:": {
  75700. "uc_base": "1f46e-1f3fd-2640",
  75701. "uc_output": "1f46e-1f3fd-200d-2640-fe0f",
  75702. "uc_match": "1f46e-1f3fd-2640-fe0f",
  75703. "uc_greedy": "1f46e-1f3fd-2640",
  75704. "shortnames": [":woman_police_officer_medium_skin_tone:"],
  75705. "category": "people"
  75706. },
  75707. ":woman_police_officer_tone4:": {
  75708. "uc_base": "1f46e-1f3fe-2640",
  75709. "uc_output": "1f46e-1f3fe-200d-2640-fe0f",
  75710. "uc_match": "1f46e-1f3fe-2640-fe0f",
  75711. "uc_greedy": "1f46e-1f3fe-2640",
  75712. "shortnames": [":woman_police_officer_medium_dark_skin_tone:"],
  75713. "category": "people"
  75714. },
  75715. ":woman_police_officer_tone5:": {
  75716. "uc_base": "1f46e-1f3ff-2640",
  75717. "uc_output": "1f46e-1f3ff-200d-2640-fe0f",
  75718. "uc_match": "1f46e-1f3ff-2640-fe0f",
  75719. "uc_greedy": "1f46e-1f3ff-2640",
  75720. "shortnames": [":woman_police_officer_dark_skin_tone:"],
  75721. "category": "people"
  75722. },
  75723. ":woman_pouting_tone1:": {
  75724. "uc_base": "1f64e-1f3fb-2640",
  75725. "uc_output": "1f64e-1f3fb-200d-2640-fe0f",
  75726. "uc_match": "1f64e-1f3fb-2640-fe0f",
  75727. "uc_greedy": "1f64e-1f3fb-2640",
  75728. "shortnames": [":woman_pouting_light_skin_tone:"],
  75729. "category": "people"
  75730. },
  75731. ":woman_pouting_tone2:": {
  75732. "uc_base": "1f64e-1f3fc-2640",
  75733. "uc_output": "1f64e-1f3fc-200d-2640-fe0f",
  75734. "uc_match": "1f64e-1f3fc-2640-fe0f",
  75735. "uc_greedy": "1f64e-1f3fc-2640",
  75736. "shortnames": [":woman_pouting_medium_light_skin_tone:"],
  75737. "category": "people"
  75738. },
  75739. ":woman_pouting_tone3:": {
  75740. "uc_base": "1f64e-1f3fd-2640",
  75741. "uc_output": "1f64e-1f3fd-200d-2640-fe0f",
  75742. "uc_match": "1f64e-1f3fd-2640-fe0f",
  75743. "uc_greedy": "1f64e-1f3fd-2640",
  75744. "shortnames": [":woman_pouting_medium_skin_tone:"],
  75745. "category": "people"
  75746. },
  75747. ":woman_pouting_tone4:": {
  75748. "uc_base": "1f64e-1f3fe-2640",
  75749. "uc_output": "1f64e-1f3fe-200d-2640-fe0f",
  75750. "uc_match": "1f64e-1f3fe-2640-fe0f",
  75751. "uc_greedy": "1f64e-1f3fe-2640",
  75752. "shortnames": [":woman_pouting_medium_dark_skin_tone:"],
  75753. "category": "people"
  75754. },
  75755. ":woman_pouting_tone5:": {
  75756. "uc_base": "1f64e-1f3ff-2640",
  75757. "uc_output": "1f64e-1f3ff-200d-2640-fe0f",
  75758. "uc_match": "1f64e-1f3ff-2640-fe0f",
  75759. "uc_greedy": "1f64e-1f3ff-2640",
  75760. "shortnames": [":woman_pouting_dark_skin_tone:"],
  75761. "category": "people"
  75762. },
  75763. ":woman_raising_hand_tone1:": {
  75764. "uc_base": "1f64b-1f3fb-2640",
  75765. "uc_output": "1f64b-1f3fb-200d-2640-fe0f",
  75766. "uc_match": "1f64b-1f3fb-2640-fe0f",
  75767. "uc_greedy": "1f64b-1f3fb-2640",
  75768. "shortnames": [":woman_raising_hand_light_skin_tone:"],
  75769. "category": "people"
  75770. },
  75771. ":woman_raising_hand_tone2:": {
  75772. "uc_base": "1f64b-1f3fc-2640",
  75773. "uc_output": "1f64b-1f3fc-200d-2640-fe0f",
  75774. "uc_match": "1f64b-1f3fc-2640-fe0f",
  75775. "uc_greedy": "1f64b-1f3fc-2640",
  75776. "shortnames": [":woman_raising_hand_medium_light_skin_tone:"],
  75777. "category": "people"
  75778. },
  75779. ":woman_raising_hand_tone3:": {
  75780. "uc_base": "1f64b-1f3fd-2640",
  75781. "uc_output": "1f64b-1f3fd-200d-2640-fe0f",
  75782. "uc_match": "1f64b-1f3fd-2640-fe0f",
  75783. "uc_greedy": "1f64b-1f3fd-2640",
  75784. "shortnames": [":woman_raising_hand_medium_skin_tone:"],
  75785. "category": "people"
  75786. },
  75787. ":woman_raising_hand_tone4:": {
  75788. "uc_base": "1f64b-1f3fe-2640",
  75789. "uc_output": "1f64b-1f3fe-200d-2640-fe0f",
  75790. "uc_match": "1f64b-1f3fe-2640-fe0f",
  75791. "uc_greedy": "1f64b-1f3fe-2640",
  75792. "shortnames": [":woman_raising_hand_medium_dark_skin_tone:"],
  75793. "category": "people"
  75794. },
  75795. ":woman_raising_hand_tone5:": {
  75796. "uc_base": "1f64b-1f3ff-2640",
  75797. "uc_output": "1f64b-1f3ff-200d-2640-fe0f",
  75798. "uc_match": "1f64b-1f3ff-2640-fe0f",
  75799. "uc_greedy": "1f64b-1f3ff-2640",
  75800. "shortnames": [":woman_raising_hand_dark_skin_tone:"],
  75801. "category": "people"
  75802. },
  75803. ":woman_rowing_boat_tone1:": {
  75804. "uc_base": "1f6a3-1f3fb-2640",
  75805. "uc_output": "1f6a3-1f3fb-200d-2640-fe0f",
  75806. "uc_match": "1f6a3-1f3fb-2640-fe0f",
  75807. "uc_greedy": "1f6a3-1f3fb-2640",
  75808. "shortnames": [":woman_rowing_boat_light_skin_tone:"],
  75809. "category": "activity"
  75810. },
  75811. ":woman_rowing_boat_tone2:": {
  75812. "uc_base": "1f6a3-1f3fc-2640",
  75813. "uc_output": "1f6a3-1f3fc-200d-2640-fe0f",
  75814. "uc_match": "1f6a3-1f3fc-2640-fe0f",
  75815. "uc_greedy": "1f6a3-1f3fc-2640",
  75816. "shortnames": [":woman_rowing_boat_medium_light_skin_tone:"],
  75817. "category": "activity"
  75818. },
  75819. ":woman_rowing_boat_tone3:": {
  75820. "uc_base": "1f6a3-1f3fd-2640",
  75821. "uc_output": "1f6a3-1f3fd-200d-2640-fe0f",
  75822. "uc_match": "1f6a3-1f3fd-2640-fe0f",
  75823. "uc_greedy": "1f6a3-1f3fd-2640",
  75824. "shortnames": [":woman_rowing_boat_medium_skin_tone:"],
  75825. "category": "activity"
  75826. },
  75827. ":woman_rowing_boat_tone4:": {
  75828. "uc_base": "1f6a3-1f3fe-2640",
  75829. "uc_output": "1f6a3-1f3fe-200d-2640-fe0f",
  75830. "uc_match": "1f6a3-1f3fe-2640-fe0f",
  75831. "uc_greedy": "1f6a3-1f3fe-2640",
  75832. "shortnames": [":woman_rowing_boat_medium_dark_skin_tone:"],
  75833. "category": "activity"
  75834. },
  75835. ":woman_rowing_boat_tone5:": {
  75836. "uc_base": "1f6a3-1f3ff-2640",
  75837. "uc_output": "1f6a3-1f3ff-200d-2640-fe0f",
  75838. "uc_match": "1f6a3-1f3ff-2640-fe0f",
  75839. "uc_greedy": "1f6a3-1f3ff-2640",
  75840. "shortnames": [":woman_rowing_boat_dark_skin_tone:"],
  75841. "category": "activity"
  75842. },
  75843. ":woman_running_tone1:": {
  75844. "uc_base": "1f3c3-1f3fb-2640",
  75845. "uc_output": "1f3c3-1f3fb-200d-2640-fe0f",
  75846. "uc_match": "1f3c3-1f3fb-2640-fe0f",
  75847. "uc_greedy": "1f3c3-1f3fb-2640",
  75848. "shortnames": [":woman_running_light_skin_tone:"],
  75849. "category": "people"
  75850. },
  75851. ":woman_running_tone2:": {
  75852. "uc_base": "1f3c3-1f3fc-2640",
  75853. "uc_output": "1f3c3-1f3fc-200d-2640-fe0f",
  75854. "uc_match": "1f3c3-1f3fc-2640-fe0f",
  75855. "uc_greedy": "1f3c3-1f3fc-2640",
  75856. "shortnames": [":woman_running_medium_light_skin_tone:"],
  75857. "category": "people"
  75858. },
  75859. ":woman_running_tone3:": {
  75860. "uc_base": "1f3c3-1f3fd-2640",
  75861. "uc_output": "1f3c3-1f3fd-200d-2640-fe0f",
  75862. "uc_match": "1f3c3-1f3fd-2640-fe0f",
  75863. "uc_greedy": "1f3c3-1f3fd-2640",
  75864. "shortnames": [":woman_running_medium_skin_tone:"],
  75865. "category": "people"
  75866. },
  75867. ":woman_running_tone4:": {
  75868. "uc_base": "1f3c3-1f3fe-2640",
  75869. "uc_output": "1f3c3-1f3fe-200d-2640-fe0f",
  75870. "uc_match": "1f3c3-1f3fe-2640-fe0f",
  75871. "uc_greedy": "1f3c3-1f3fe-2640",
  75872. "shortnames": [":woman_running_medium_dark_skin_tone:"],
  75873. "category": "people"
  75874. },
  75875. ":woman_running_tone5:": {
  75876. "uc_base": "1f3c3-1f3ff-2640",
  75877. "uc_output": "1f3c3-1f3ff-200d-2640-fe0f",
  75878. "uc_match": "1f3c3-1f3ff-2640-fe0f",
  75879. "uc_greedy": "1f3c3-1f3ff-2640",
  75880. "shortnames": [":woman_running_dark_skin_tone:"],
  75881. "category": "people"
  75882. },
  75883. ":woman_shrugging_tone1:": {
  75884. "uc_base": "1f937-1f3fb-2640",
  75885. "uc_output": "1f937-1f3fb-200d-2640-fe0f",
  75886. "uc_match": "1f937-1f3fb-2640-fe0f",
  75887. "uc_greedy": "1f937-1f3fb-2640",
  75888. "shortnames": [":woman_shrugging_light_skin_tone:"],
  75889. "category": "people"
  75890. },
  75891. ":woman_shrugging_tone2:": {
  75892. "uc_base": "1f937-1f3fc-2640",
  75893. "uc_output": "1f937-1f3fc-200d-2640-fe0f",
  75894. "uc_match": "1f937-1f3fc-2640-fe0f",
  75895. "uc_greedy": "1f937-1f3fc-2640",
  75896. "shortnames": [":woman_shrugging_medium_light_skin_tone:"],
  75897. "category": "people"
  75898. },
  75899. ":woman_shrugging_tone3:": {
  75900. "uc_base": "1f937-1f3fd-2640",
  75901. "uc_output": "1f937-1f3fd-200d-2640-fe0f",
  75902. "uc_match": "1f937-1f3fd-2640-fe0f",
  75903. "uc_greedy": "1f937-1f3fd-2640",
  75904. "shortnames": [":woman_shrugging_medium_skin_tone:"],
  75905. "category": "people"
  75906. },
  75907. ":woman_shrugging_tone4:": {
  75908. "uc_base": "1f937-1f3fe-2640",
  75909. "uc_output": "1f937-1f3fe-200d-2640-fe0f",
  75910. "uc_match": "1f937-1f3fe-2640-fe0f",
  75911. "uc_greedy": "1f937-1f3fe-2640",
  75912. "shortnames": [":woman_shrugging_medium_dark_skin_tone:"],
  75913. "category": "people"
  75914. },
  75915. ":woman_shrugging_tone5:": {
  75916. "uc_base": "1f937-1f3ff-2640",
  75917. "uc_output": "1f937-1f3ff-200d-2640-fe0f",
  75918. "uc_match": "1f937-1f3ff-2640-fe0f",
  75919. "uc_greedy": "1f937-1f3ff-2640",
  75920. "shortnames": [":woman_shrugging_dark_skin_tone:"],
  75921. "category": "people"
  75922. },
  75923. ":woman_surfing_tone1:": {
  75924. "uc_base": "1f3c4-1f3fb-2640",
  75925. "uc_output": "1f3c4-1f3fb-200d-2640-fe0f",
  75926. "uc_match": "1f3c4-1f3fb-2640-fe0f",
  75927. "uc_greedy": "1f3c4-1f3fb-2640",
  75928. "shortnames": [":woman_surfing_light_skin_tone:"],
  75929. "category": "activity"
  75930. },
  75931. ":woman_surfing_tone2:": {
  75932. "uc_base": "1f3c4-1f3fc-2640",
  75933. "uc_output": "1f3c4-1f3fc-200d-2640-fe0f",
  75934. "uc_match": "1f3c4-1f3fc-2640-fe0f",
  75935. "uc_greedy": "1f3c4-1f3fc-2640",
  75936. "shortnames": [":woman_surfing_medium_light_skin_tone:"],
  75937. "category": "activity"
  75938. },
  75939. ":woman_surfing_tone3:": {
  75940. "uc_base": "1f3c4-1f3fd-2640",
  75941. "uc_output": "1f3c4-1f3fd-200d-2640-fe0f",
  75942. "uc_match": "1f3c4-1f3fd-2640-fe0f",
  75943. "uc_greedy": "1f3c4-1f3fd-2640",
  75944. "shortnames": [":woman_surfing_medium_skin_tone:"],
  75945. "category": "activity"
  75946. },
  75947. ":woman_surfing_tone4:": {
  75948. "uc_base": "1f3c4-1f3fe-2640",
  75949. "uc_output": "1f3c4-1f3fe-200d-2640-fe0f",
  75950. "uc_match": "1f3c4-1f3fe-2640-fe0f",
  75951. "uc_greedy": "1f3c4-1f3fe-2640",
  75952. "shortnames": [":woman_surfing_medium_dark_skin_tone:"],
  75953. "category": "activity"
  75954. },
  75955. ":woman_surfing_tone5:": {
  75956. "uc_base": "1f3c4-1f3ff-2640",
  75957. "uc_output": "1f3c4-1f3ff-200d-2640-fe0f",
  75958. "uc_match": "1f3c4-1f3ff-2640-fe0f",
  75959. "uc_greedy": "1f3c4-1f3ff-2640",
  75960. "shortnames": [":woman_surfing_dark_skin_tone:"],
  75961. "category": "activity"
  75962. },
  75963. ":woman_swimming_tone1:": {
  75964. "uc_base": "1f3ca-1f3fb-2640",
  75965. "uc_output": "1f3ca-1f3fb-200d-2640-fe0f",
  75966. "uc_match": "1f3ca-1f3fb-2640-fe0f",
  75967. "uc_greedy": "1f3ca-1f3fb-2640",
  75968. "shortnames": [":woman_swimming_light_skin_tone:"],
  75969. "category": "activity"
  75970. },
  75971. ":woman_swimming_tone2:": {
  75972. "uc_base": "1f3ca-1f3fc-2640",
  75973. "uc_output": "1f3ca-1f3fc-200d-2640-fe0f",
  75974. "uc_match": "1f3ca-1f3fc-2640-fe0f",
  75975. "uc_greedy": "1f3ca-1f3fc-2640",
  75976. "shortnames": [":woman_swimming_medium_light_skin_tone:"],
  75977. "category": "activity"
  75978. },
  75979. ":woman_swimming_tone3:": {
  75980. "uc_base": "1f3ca-1f3fd-2640",
  75981. "uc_output": "1f3ca-1f3fd-200d-2640-fe0f",
  75982. "uc_match": "1f3ca-1f3fd-2640-fe0f",
  75983. "uc_greedy": "1f3ca-1f3fd-2640",
  75984. "shortnames": [":woman_swimming_medium_skin_tone:"],
  75985. "category": "activity"
  75986. },
  75987. ":woman_swimming_tone4:": {
  75988. "uc_base": "1f3ca-1f3fe-2640",
  75989. "uc_output": "1f3ca-1f3fe-200d-2640-fe0f",
  75990. "uc_match": "1f3ca-1f3fe-2640-fe0f",
  75991. "uc_greedy": "1f3ca-1f3fe-2640",
  75992. "shortnames": [":woman_swimming_medium_dark_skin_tone:"],
  75993. "category": "activity"
  75994. },
  75995. ":woman_swimming_tone5:": {
  75996. "uc_base": "1f3ca-1f3ff-2640",
  75997. "uc_output": "1f3ca-1f3ff-200d-2640-fe0f",
  75998. "uc_match": "1f3ca-1f3ff-2640-fe0f",
  75999. "uc_greedy": "1f3ca-1f3ff-2640",
  76000. "shortnames": [":woman_swimming_dark_skin_tone:"],
  76001. "category": "activity"
  76002. },
  76003. ":woman_tipping_hand_tone1:": {
  76004. "uc_base": "1f481-1f3fb-2640",
  76005. "uc_output": "1f481-1f3fb-200d-2640-fe0f",
  76006. "uc_match": "1f481-1f3fb-2640-fe0f",
  76007. "uc_greedy": "1f481-1f3fb-2640",
  76008. "shortnames": [":woman_tipping_hand_light_skin_tone:"],
  76009. "category": "people"
  76010. },
  76011. ":woman_tipping_hand_tone2:": {
  76012. "uc_base": "1f481-1f3fc-2640",
  76013. "uc_output": "1f481-1f3fc-200d-2640-fe0f",
  76014. "uc_match": "1f481-1f3fc-2640-fe0f",
  76015. "uc_greedy": "1f481-1f3fc-2640",
  76016. "shortnames": [":woman_tipping_hand_medium_light_skin_tone:"],
  76017. "category": "people"
  76018. },
  76019. ":woman_tipping_hand_tone3:": {
  76020. "uc_base": "1f481-1f3fd-2640",
  76021. "uc_output": "1f481-1f3fd-200d-2640-fe0f",
  76022. "uc_match": "1f481-1f3fd-2640-fe0f",
  76023. "uc_greedy": "1f481-1f3fd-2640",
  76024. "shortnames": [":woman_tipping_hand_medium_skin_tone:"],
  76025. "category": "people"
  76026. },
  76027. ":woman_tipping_hand_tone4:": {
  76028. "uc_base": "1f481-1f3fe-2640",
  76029. "uc_output": "1f481-1f3fe-200d-2640-fe0f",
  76030. "uc_match": "1f481-1f3fe-2640-fe0f",
  76031. "uc_greedy": "1f481-1f3fe-2640",
  76032. "shortnames": [":woman_tipping_hand_medium_dark_skin_tone:"],
  76033. "category": "people"
  76034. },
  76035. ":woman_tipping_hand_tone5:": {
  76036. "uc_base": "1f481-1f3ff-2640",
  76037. "uc_output": "1f481-1f3ff-200d-2640-fe0f",
  76038. "uc_match": "1f481-1f3ff-2640-fe0f",
  76039. "uc_greedy": "1f481-1f3ff-2640",
  76040. "shortnames": [":woman_tipping_hand_dark_skin_tone:"],
  76041. "category": "people"
  76042. },
  76043. ":woman_vampire_tone1:": {
  76044. "uc_base": "1f9db-1f3fb-2640",
  76045. "uc_output": "1f9db-1f3fb-200d-2640-fe0f",
  76046. "uc_match": "1f9db-1f3fb-2640-fe0f",
  76047. "uc_greedy": "1f9db-1f3fb-2640",
  76048. "shortnames": [":woman_vampire_light_skin_tone:"],
  76049. "category": "people"
  76050. },
  76051. ":woman_vampire_tone2:": {
  76052. "uc_base": "1f9db-1f3fc-2640",
  76053. "uc_output": "1f9db-1f3fc-200d-2640-fe0f",
  76054. "uc_match": "1f9db-1f3fc-2640-fe0f",
  76055. "uc_greedy": "1f9db-1f3fc-2640",
  76056. "shortnames": [":woman_vampire_medium_light_skin_tone:"],
  76057. "category": "people"
  76058. },
  76059. ":woman_vampire_tone3:": {
  76060. "uc_base": "1f9db-1f3fd-2640",
  76061. "uc_output": "1f9db-1f3fd-200d-2640-fe0f",
  76062. "uc_match": "1f9db-1f3fd-2640-fe0f",
  76063. "uc_greedy": "1f9db-1f3fd-2640",
  76064. "shortnames": [":woman_vampire_medium_skin_tone:"],
  76065. "category": "people"
  76066. },
  76067. ":woman_vampire_tone4:": {
  76068. "uc_base": "1f9db-1f3fe-2640",
  76069. "uc_output": "1f9db-1f3fe-200d-2640-fe0f",
  76070. "uc_match": "1f9db-1f3fe-2640-fe0f",
  76071. "uc_greedy": "1f9db-1f3fe-2640",
  76072. "shortnames": [":woman_vampire_medium_dark_skin_tone:"],
  76073. "category": "people"
  76074. },
  76075. ":woman_vampire_tone5:": {
  76076. "uc_base": "1f9db-1f3ff-2640",
  76077. "uc_output": "1f9db-1f3ff-200d-2640-fe0f",
  76078. "uc_match": "1f9db-1f3ff-2640-fe0f",
  76079. "uc_greedy": "1f9db-1f3ff-2640",
  76080. "shortnames": [":woman_vampire_dark_skin_tone:"],
  76081. "category": "people"
  76082. },
  76083. ":woman_walking_tone1:": {
  76084. "uc_base": "1f6b6-1f3fb-2640",
  76085. "uc_output": "1f6b6-1f3fb-200d-2640-fe0f",
  76086. "uc_match": "1f6b6-1f3fb-2640-fe0f",
  76087. "uc_greedy": "1f6b6-1f3fb-2640",
  76088. "shortnames": [":woman_walking_light_skin_tone:"],
  76089. "category": "people"
  76090. },
  76091. ":woman_walking_tone2:": {
  76092. "uc_base": "1f6b6-1f3fc-2640",
  76093. "uc_output": "1f6b6-1f3fc-200d-2640-fe0f",
  76094. "uc_match": "1f6b6-1f3fc-2640-fe0f",
  76095. "uc_greedy": "1f6b6-1f3fc-2640",
  76096. "shortnames": [":woman_walking_medium_light_skin_tone:"],
  76097. "category": "people"
  76098. },
  76099. ":woman_walking_tone3:": {
  76100. "uc_base": "1f6b6-1f3fd-2640",
  76101. "uc_output": "1f6b6-1f3fd-200d-2640-fe0f",
  76102. "uc_match": "1f6b6-1f3fd-2640-fe0f",
  76103. "uc_greedy": "1f6b6-1f3fd-2640",
  76104. "shortnames": [":woman_walking_medium_skin_tone:"],
  76105. "category": "people"
  76106. },
  76107. ":woman_walking_tone4:": {
  76108. "uc_base": "1f6b6-1f3fe-2640",
  76109. "uc_output": "1f6b6-1f3fe-200d-2640-fe0f",
  76110. "uc_match": "1f6b6-1f3fe-2640-fe0f",
  76111. "uc_greedy": "1f6b6-1f3fe-2640",
  76112. "shortnames": [":woman_walking_medium_dark_skin_tone:"],
  76113. "category": "people"
  76114. },
  76115. ":woman_walking_tone5:": {
  76116. "uc_base": "1f6b6-1f3ff-2640",
  76117. "uc_output": "1f6b6-1f3ff-200d-2640-fe0f",
  76118. "uc_match": "1f6b6-1f3ff-2640-fe0f",
  76119. "uc_greedy": "1f6b6-1f3ff-2640",
  76120. "shortnames": [":woman_walking_dark_skin_tone:"],
  76121. "category": "people"
  76122. },
  76123. ":woman_wearing_turban_tone1:": {
  76124. "uc_base": "1f473-1f3fb-2640",
  76125. "uc_output": "1f473-1f3fb-200d-2640-fe0f",
  76126. "uc_match": "1f473-1f3fb-2640-fe0f",
  76127. "uc_greedy": "1f473-1f3fb-2640",
  76128. "shortnames": [":woman_wearing_turban_light_skin_tone:"],
  76129. "category": "people"
  76130. },
  76131. ":woman_wearing_turban_tone2:": {
  76132. "uc_base": "1f473-1f3fc-2640",
  76133. "uc_output": "1f473-1f3fc-200d-2640-fe0f",
  76134. "uc_match": "1f473-1f3fc-2640-fe0f",
  76135. "uc_greedy": "1f473-1f3fc-2640",
  76136. "shortnames": [":woman_wearing_turban_medium_light_skin_tone:"],
  76137. "category": "people"
  76138. },
  76139. ":woman_wearing_turban_tone3:": {
  76140. "uc_base": "1f473-1f3fd-2640",
  76141. "uc_output": "1f473-1f3fd-200d-2640-fe0f",
  76142. "uc_match": "1f473-1f3fd-2640-fe0f",
  76143. "uc_greedy": "1f473-1f3fd-2640",
  76144. "shortnames": [":woman_wearing_turban_medium_skin_tone:"],
  76145. "category": "people"
  76146. },
  76147. ":woman_wearing_turban_tone4:": {
  76148. "uc_base": "1f473-1f3fe-2640",
  76149. "uc_output": "1f473-1f3fe-200d-2640-fe0f",
  76150. "uc_match": "1f473-1f3fe-2640-fe0f",
  76151. "uc_greedy": "1f473-1f3fe-2640",
  76152. "shortnames": [":woman_wearing_turban_medium_dark_skin_tone:"],
  76153. "category": "people"
  76154. },
  76155. ":woman_wearing_turban_tone5:": {
  76156. "uc_base": "1f473-1f3ff-2640",
  76157. "uc_output": "1f473-1f3ff-200d-2640-fe0f",
  76158. "uc_match": "1f473-1f3ff-2640-fe0f",
  76159. "uc_greedy": "1f473-1f3ff-2640",
  76160. "shortnames": [":woman_wearing_turban_dark_skin_tone:"],
  76161. "category": "people"
  76162. },
  76163. ":man_bouncing_ball_tone1:": {
  76164. "uc_base": "26f9-1f3fb-2642",
  76165. "uc_output": "26f9-1f3fb-200d-2642-fe0f",
  76166. "uc_match": "26f9-fe0f-1f3fb-2642-fe0f",
  76167. "uc_greedy": "26f9-1f3fb-2642",
  76168. "shortnames": [":man_bouncing_ball_light_skin_tone:"],
  76169. "category": "activity"
  76170. },
  76171. ":man_bouncing_ball_tone2:": {
  76172. "uc_base": "26f9-1f3fc-2642",
  76173. "uc_output": "26f9-1f3fc-200d-2642-fe0f",
  76174. "uc_match": "26f9-fe0f-1f3fc-2642-fe0f",
  76175. "uc_greedy": "26f9-1f3fc-2642",
  76176. "shortnames": [":man_bouncing_ball_medium_light_skin_tone:"],
  76177. "category": "activity"
  76178. },
  76179. ":man_bouncing_ball_tone3:": {
  76180. "uc_base": "26f9-1f3fd-2642",
  76181. "uc_output": "26f9-1f3fd-200d-2642-fe0f",
  76182. "uc_match": "26f9-fe0f-1f3fd-2642-fe0f",
  76183. "uc_greedy": "26f9-1f3fd-2642",
  76184. "shortnames": [":man_bouncing_ball_medium_skin_tone:"],
  76185. "category": "activity"
  76186. },
  76187. ":man_bouncing_ball_tone4:": {
  76188. "uc_base": "26f9-1f3fe-2642",
  76189. "uc_output": "26f9-1f3fe-200d-2642-fe0f",
  76190. "uc_match": "26f9-fe0f-1f3fe-2642-fe0f",
  76191. "uc_greedy": "26f9-1f3fe-2642",
  76192. "shortnames": [":man_bouncing_ball_medium_dark_skin_tone:"],
  76193. "category": "activity"
  76194. },
  76195. ":man_bouncing_ball_tone5:": {
  76196. "uc_base": "26f9-1f3ff-2642",
  76197. "uc_output": "26f9-1f3ff-200d-2642-fe0f",
  76198. "uc_match": "26f9-fe0f-1f3ff-2642-fe0f",
  76199. "uc_greedy": "26f9-1f3ff-2642",
  76200. "shortnames": [":man_bouncing_ball_dark_skin_tone:"],
  76201. "category": "activity"
  76202. },
  76203. ":man_detective:": {
  76204. "uc_base": "1f575-2642",
  76205. "uc_output": "1f575-fe0f-200d-2642-fe0f",
  76206. "uc_match": "1f575-fe0f-200d-2642",
  76207. "uc_greedy": "1f575-2642",
  76208. "shortnames": [],
  76209. "category": "people"
  76210. },
  76211. ":man_golfing:": {
  76212. "uc_base": "1f3cc-2642",
  76213. "uc_output": "1f3cc-fe0f-200d-2642-fe0f",
  76214. "uc_match": "1f3cc-fe0f-200d-2642",
  76215. "uc_greedy": "1f3cc-2642",
  76216. "shortnames": [],
  76217. "category": "activity"
  76218. },
  76219. ":man_lifting_weights:": {
  76220. "uc_base": "1f3cb-2642",
  76221. "uc_output": "1f3cb-fe0f-200d-2642-fe0f",
  76222. "uc_match": "1f3cb-fe0f-200d-2642",
  76223. "uc_greedy": "1f3cb-2642",
  76224. "shortnames": [],
  76225. "category": "activity"
  76226. },
  76227. ":woman_bouncing_ball_tone1:": {
  76228. "uc_base": "26f9-1f3fb-2640",
  76229. "uc_output": "26f9-1f3fb-200d-2640-fe0f",
  76230. "uc_match": "26f9-fe0f-1f3fb-2640-fe0f",
  76231. "uc_greedy": "26f9-1f3fb-2640",
  76232. "shortnames": [":woman_bouncing_ball_light_skin_tone:"],
  76233. "category": "activity"
  76234. },
  76235. ":woman_bouncing_ball_tone2:": {
  76236. "uc_base": "26f9-1f3fc-2640",
  76237. "uc_output": "26f9-1f3fc-200d-2640-fe0f",
  76238. "uc_match": "26f9-fe0f-1f3fc-2640-fe0f",
  76239. "uc_greedy": "26f9-1f3fc-2640",
  76240. "shortnames": [":woman_bouncing_ball_medium_light_skin_tone:"],
  76241. "category": "activity"
  76242. },
  76243. ":woman_bouncing_ball_tone3:": {
  76244. "uc_base": "26f9-1f3fd-2640",
  76245. "uc_output": "26f9-1f3fd-200d-2640-fe0f",
  76246. "uc_match": "26f9-fe0f-1f3fd-2640-fe0f",
  76247. "uc_greedy": "26f9-1f3fd-2640",
  76248. "shortnames": [":woman_bouncing_ball_medium_skin_tone:"],
  76249. "category": "activity"
  76250. },
  76251. ":woman_bouncing_ball_tone4:": {
  76252. "uc_base": "26f9-1f3fe-2640",
  76253. "uc_output": "26f9-1f3fe-200d-2640-fe0f",
  76254. "uc_match": "26f9-fe0f-1f3fe-2640-fe0f",
  76255. "uc_greedy": "26f9-1f3fe-2640",
  76256. "shortnames": [":woman_bouncing_ball_medium_dark_skin_tone:"],
  76257. "category": "activity"
  76258. },
  76259. ":woman_bouncing_ball_tone5:": {
  76260. "uc_base": "26f9-1f3ff-2640",
  76261. "uc_output": "26f9-1f3ff-200d-2640-fe0f",
  76262. "uc_match": "26f9-fe0f-1f3ff-2640-fe0f",
  76263. "uc_greedy": "26f9-1f3ff-2640",
  76264. "shortnames": [":woman_bouncing_ball_dark_skin_tone:"],
  76265. "category": "activity"
  76266. },
  76267. ":woman_detective:": {
  76268. "uc_base": "1f575-2640",
  76269. "uc_output": "1f575-fe0f-200d-2640-fe0f",
  76270. "uc_match": "1f575-fe0f-200d-2640",
  76271. "uc_greedy": "1f575-2640",
  76272. "shortnames": [],
  76273. "category": "people"
  76274. },
  76275. ":woman_golfing:": {
  76276. "uc_base": "1f3cc-2640",
  76277. "uc_output": "1f3cc-fe0f-200d-2640-fe0f",
  76278. "uc_match": "1f3cc-fe0f-200d-2640",
  76279. "uc_greedy": "1f3cc-2640",
  76280. "shortnames": [],
  76281. "category": "activity"
  76282. },
  76283. ":woman_lifting_weights:": {
  76284. "uc_base": "1f3cb-2640",
  76285. "uc_output": "1f3cb-fe0f-200d-2640-fe0f",
  76286. "uc_match": "1f3cb-fe0f-200d-2640",
  76287. "uc_greedy": "1f3cb-2640",
  76288. "shortnames": [],
  76289. "category": "activity"
  76290. },
  76291. ":man_bouncing_ball:": {
  76292. "uc_base": "26f9-2642",
  76293. "uc_output": "26f9-fe0f-200d-2642-fe0f",
  76294. "uc_match": "26f9-fe0f-200d-2642",
  76295. "uc_greedy": "26f9-2642",
  76296. "shortnames": [],
  76297. "category": "activity"
  76298. },
  76299. ":woman_bouncing_ball:": {
  76300. "uc_base": "26f9-2640",
  76301. "uc_output": "26f9-fe0f-200d-2640-fe0f",
  76302. "uc_match": "26f9-fe0f-200d-2640",
  76303. "uc_greedy": "26f9-2640",
  76304. "shortnames": [],
  76305. "category": "activity"
  76306. },
  76307. ":man_artist_tone1:": {
  76308. "uc_base": "1f468-1f3fb-1f3a8",
  76309. "uc_output": "1f468-1f3fb-200d-1f3a8",
  76310. "uc_match": "1f468-1f3fb-1f3a8",
  76311. "uc_greedy": "1f468-1f3fb-1f3a8",
  76312. "shortnames": [":man_artist_light_skin_tone:"],
  76313. "category": "people"
  76314. },
  76315. ":man_artist_tone2:": {
  76316. "uc_base": "1f468-1f3fc-1f3a8",
  76317. "uc_output": "1f468-1f3fc-200d-1f3a8",
  76318. "uc_match": "1f468-1f3fc-1f3a8",
  76319. "uc_greedy": "1f468-1f3fc-1f3a8",
  76320. "shortnames": [":man_artist_medium_light_skin_tone:"],
  76321. "category": "people"
  76322. },
  76323. ":man_artist_tone3:": {
  76324. "uc_base": "1f468-1f3fd-1f3a8",
  76325. "uc_output": "1f468-1f3fd-200d-1f3a8",
  76326. "uc_match": "1f468-1f3fd-1f3a8",
  76327. "uc_greedy": "1f468-1f3fd-1f3a8",
  76328. "shortnames": [":man_artist_medium_skin_tone:"],
  76329. "category": "people"
  76330. },
  76331. ":man_artist_tone4:": {
  76332. "uc_base": "1f468-1f3fe-1f3a8",
  76333. "uc_output": "1f468-1f3fe-200d-1f3a8",
  76334. "uc_match": "1f468-1f3fe-1f3a8",
  76335. "uc_greedy": "1f468-1f3fe-1f3a8",
  76336. "shortnames": [":man_artist_medium_dark_skin_tone:"],
  76337. "category": "people"
  76338. },
  76339. ":man_artist_tone5:": {
  76340. "uc_base": "1f468-1f3ff-1f3a8",
  76341. "uc_output": "1f468-1f3ff-200d-1f3a8",
  76342. "uc_match": "1f468-1f3ff-1f3a8",
  76343. "uc_greedy": "1f468-1f3ff-1f3a8",
  76344. "shortnames": [":man_artist_dark_skin_tone:"],
  76345. "category": "people"
  76346. },
  76347. ":man_astronaut_tone1:": {
  76348. "uc_base": "1f468-1f3fb-1f680",
  76349. "uc_output": "1f468-1f3fb-200d-1f680",
  76350. "uc_match": "1f468-1f3fb-1f680",
  76351. "uc_greedy": "1f468-1f3fb-1f680",
  76352. "shortnames": [":man_astronaut_light_skin_tone:"],
  76353. "category": "people"
  76354. },
  76355. ":man_astronaut_tone2:": {
  76356. "uc_base": "1f468-1f3fc-1f680",
  76357. "uc_output": "1f468-1f3fc-200d-1f680",
  76358. "uc_match": "1f468-1f3fc-1f680",
  76359. "uc_greedy": "1f468-1f3fc-1f680",
  76360. "shortnames": [":man_astronaut_medium_light_skin_tone:"],
  76361. "category": "people"
  76362. },
  76363. ":man_astronaut_tone3:": {
  76364. "uc_base": "1f468-1f3fd-1f680",
  76365. "uc_output": "1f468-1f3fd-200d-1f680",
  76366. "uc_match": "1f468-1f3fd-1f680",
  76367. "uc_greedy": "1f468-1f3fd-1f680",
  76368. "shortnames": [":man_astronaut_medium_skin_tone:"],
  76369. "category": "people"
  76370. },
  76371. ":man_astronaut_tone4:": {
  76372. "uc_base": "1f468-1f3fe-1f680",
  76373. "uc_output": "1f468-1f3fe-200d-1f680",
  76374. "uc_match": "1f468-1f3fe-1f680",
  76375. "uc_greedy": "1f468-1f3fe-1f680",
  76376. "shortnames": [":man_astronaut_medium_dark_skin_tone:"],
  76377. "category": "people"
  76378. },
  76379. ":man_astronaut_tone5:": {
  76380. "uc_base": "1f468-1f3ff-1f680",
  76381. "uc_output": "1f468-1f3ff-200d-1f680",
  76382. "uc_match": "1f468-1f3ff-1f680",
  76383. "uc_greedy": "1f468-1f3ff-1f680",
  76384. "shortnames": [":man_astronaut_dark_skin_tone:"],
  76385. "category": "people"
  76386. },
  76387. ":man_cook_tone1:": {
  76388. "uc_base": "1f468-1f3fb-1f373",
  76389. "uc_output": "1f468-1f3fb-200d-1f373",
  76390. "uc_match": "1f468-1f3fb-1f373",
  76391. "uc_greedy": "1f468-1f3fb-1f373",
  76392. "shortnames": [":man_cook_light_skin_tone:"],
  76393. "category": "people"
  76394. },
  76395. ":man_cook_tone2:": {
  76396. "uc_base": "1f468-1f3fc-1f373",
  76397. "uc_output": "1f468-1f3fc-200d-1f373",
  76398. "uc_match": "1f468-1f3fc-1f373",
  76399. "uc_greedy": "1f468-1f3fc-1f373",
  76400. "shortnames": [":man_cook_medium_light_skin_tone:"],
  76401. "category": "people"
  76402. },
  76403. ":man_cook_tone3:": {
  76404. "uc_base": "1f468-1f3fd-1f373",
  76405. "uc_output": "1f468-1f3fd-200d-1f373",
  76406. "uc_match": "1f468-1f3fd-1f373",
  76407. "uc_greedy": "1f468-1f3fd-1f373",
  76408. "shortnames": [":man_cook_medium_skin_tone:"],
  76409. "category": "people"
  76410. },
  76411. ":man_cook_tone4:": {
  76412. "uc_base": "1f468-1f3fe-1f373",
  76413. "uc_output": "1f468-1f3fe-200d-1f373",
  76414. "uc_match": "1f468-1f3fe-1f373",
  76415. "uc_greedy": "1f468-1f3fe-1f373",
  76416. "shortnames": [":man_cook_medium_dark_skin_tone:"],
  76417. "category": "people"
  76418. },
  76419. ":man_cook_tone5:": {
  76420. "uc_base": "1f468-1f3ff-1f373",
  76421. "uc_output": "1f468-1f3ff-200d-1f373",
  76422. "uc_match": "1f468-1f3ff-1f373",
  76423. "uc_greedy": "1f468-1f3ff-1f373",
  76424. "shortnames": [":man_cook_dark_skin_tone:"],
  76425. "category": "people"
  76426. },
  76427. ":man_factory_worker_tone1:": {
  76428. "uc_base": "1f468-1f3fb-1f3ed",
  76429. "uc_output": "1f468-1f3fb-200d-1f3ed",
  76430. "uc_match": "1f468-1f3fb-1f3ed",
  76431. "uc_greedy": "1f468-1f3fb-1f3ed",
  76432. "shortnames": [":man_factory_worker_light_skin_tone:"],
  76433. "category": "people"
  76434. },
  76435. ":man_factory_worker_tone2:": {
  76436. "uc_base": "1f468-1f3fc-1f3ed",
  76437. "uc_output": "1f468-1f3fc-200d-1f3ed",
  76438. "uc_match": "1f468-1f3fc-1f3ed",
  76439. "uc_greedy": "1f468-1f3fc-1f3ed",
  76440. "shortnames": [":man_factory_worker_medium_light_skin_tone:"],
  76441. "category": "people"
  76442. },
  76443. ":man_factory_worker_tone3:": {
  76444. "uc_base": "1f468-1f3fd-1f3ed",
  76445. "uc_output": "1f468-1f3fd-200d-1f3ed",
  76446. "uc_match": "1f468-1f3fd-1f3ed",
  76447. "uc_greedy": "1f468-1f3fd-1f3ed",
  76448. "shortnames": [":man_factory_worker_medium_skin_tone:"],
  76449. "category": "people"
  76450. },
  76451. ":man_factory_worker_tone4:": {
  76452. "uc_base": "1f468-1f3fe-1f3ed",
  76453. "uc_output": "1f468-1f3fe-200d-1f3ed",
  76454. "uc_match": "1f468-1f3fe-1f3ed",
  76455. "uc_greedy": "1f468-1f3fe-1f3ed",
  76456. "shortnames": [":man_factory_worker_medium_dark_skin_tone:"],
  76457. "category": "people"
  76458. },
  76459. ":man_factory_worker_tone5:": {
  76460. "uc_base": "1f468-1f3ff-1f3ed",
  76461. "uc_output": "1f468-1f3ff-200d-1f3ed",
  76462. "uc_match": "1f468-1f3ff-1f3ed",
  76463. "uc_greedy": "1f468-1f3ff-1f3ed",
  76464. "shortnames": [":man_factory_worker_dark_skin_tone:"],
  76465. "category": "people"
  76466. },
  76467. ":man_farmer_tone1:": {
  76468. "uc_base": "1f468-1f3fb-1f33e",
  76469. "uc_output": "1f468-1f3fb-200d-1f33e",
  76470. "uc_match": "1f468-1f3fb-1f33e",
  76471. "uc_greedy": "1f468-1f3fb-1f33e",
  76472. "shortnames": [":man_farmer_light_skin_tone:"],
  76473. "category": "people"
  76474. },
  76475. ":man_farmer_tone2:": {
  76476. "uc_base": "1f468-1f3fc-1f33e",
  76477. "uc_output": "1f468-1f3fc-200d-1f33e",
  76478. "uc_match": "1f468-1f3fc-1f33e",
  76479. "uc_greedy": "1f468-1f3fc-1f33e",
  76480. "shortnames": [":man_farmer_medium_light_skin_tone:"],
  76481. "category": "people"
  76482. },
  76483. ":man_farmer_tone3:": {
  76484. "uc_base": "1f468-1f3fd-1f33e",
  76485. "uc_output": "1f468-1f3fd-200d-1f33e",
  76486. "uc_match": "1f468-1f3fd-1f33e",
  76487. "uc_greedy": "1f468-1f3fd-1f33e",
  76488. "shortnames": [":man_farmer_medium_skin_tone:"],
  76489. "category": "people"
  76490. },
  76491. ":man_farmer_tone4:": {
  76492. "uc_base": "1f468-1f3fe-1f33e",
  76493. "uc_output": "1f468-1f3fe-200d-1f33e",
  76494. "uc_match": "1f468-1f3fe-1f33e",
  76495. "uc_greedy": "1f468-1f3fe-1f33e",
  76496. "shortnames": [":man_farmer_medium_dark_skin_tone:"],
  76497. "category": "people"
  76498. },
  76499. ":man_farmer_tone5:": {
  76500. "uc_base": "1f468-1f3ff-1f33e",
  76501. "uc_output": "1f468-1f3ff-200d-1f33e",
  76502. "uc_match": "1f468-1f3ff-1f33e",
  76503. "uc_greedy": "1f468-1f3ff-1f33e",
  76504. "shortnames": [":man_farmer_dark_skin_tone:"],
  76505. "category": "people"
  76506. },
  76507. ":man_firefighter_tone1:": {
  76508. "uc_base": "1f468-1f3fb-1f692",
  76509. "uc_output": "1f468-1f3fb-200d-1f692",
  76510. "uc_match": "1f468-1f3fb-1f692",
  76511. "uc_greedy": "1f468-1f3fb-1f692",
  76512. "shortnames": [":man_firefighter_light_skin_tone:"],
  76513. "category": "people"
  76514. },
  76515. ":man_firefighter_tone2:": {
  76516. "uc_base": "1f468-1f3fc-1f692",
  76517. "uc_output": "1f468-1f3fc-200d-1f692",
  76518. "uc_match": "1f468-1f3fc-1f692",
  76519. "uc_greedy": "1f468-1f3fc-1f692",
  76520. "shortnames": [":man_firefighter_medium_light_skin_tone:"],
  76521. "category": "people"
  76522. },
  76523. ":man_firefighter_tone3:": {
  76524. "uc_base": "1f468-1f3fd-1f692",
  76525. "uc_output": "1f468-1f3fd-200d-1f692",
  76526. "uc_match": "1f468-1f3fd-1f692",
  76527. "uc_greedy": "1f468-1f3fd-1f692",
  76528. "shortnames": [":man_firefighter_medium_skin_tone:"],
  76529. "category": "people"
  76530. },
  76531. ":man_firefighter_tone4:": {
  76532. "uc_base": "1f468-1f3fe-1f692",
  76533. "uc_output": "1f468-1f3fe-200d-1f692",
  76534. "uc_match": "1f468-1f3fe-1f692",
  76535. "uc_greedy": "1f468-1f3fe-1f692",
  76536. "shortnames": [":man_firefighter_medium_dark_skin_tone:"],
  76537. "category": "people"
  76538. },
  76539. ":man_firefighter_tone5:": {
  76540. "uc_base": "1f468-1f3ff-1f692",
  76541. "uc_output": "1f468-1f3ff-200d-1f692",
  76542. "uc_match": "1f468-1f3ff-1f692",
  76543. "uc_greedy": "1f468-1f3ff-1f692",
  76544. "shortnames": [":man_firefighter_dark_skin_tone:"],
  76545. "category": "people"
  76546. },
  76547. ":man_mechanic_tone1:": {
  76548. "uc_base": "1f468-1f3fb-1f527",
  76549. "uc_output": "1f468-1f3fb-200d-1f527",
  76550. "uc_match": "1f468-1f3fb-1f527",
  76551. "uc_greedy": "1f468-1f3fb-1f527",
  76552. "shortnames": [":man_mechanic_light_skin_tone:"],
  76553. "category": "people"
  76554. },
  76555. ":man_mechanic_tone2:": {
  76556. "uc_base": "1f468-1f3fc-1f527",
  76557. "uc_output": "1f468-1f3fc-200d-1f527",
  76558. "uc_match": "1f468-1f3fc-1f527",
  76559. "uc_greedy": "1f468-1f3fc-1f527",
  76560. "shortnames": [":man_mechanic_medium_light_skin_tone:"],
  76561. "category": "people"
  76562. },
  76563. ":man_mechanic_tone3:": {
  76564. "uc_base": "1f468-1f3fd-1f527",
  76565. "uc_output": "1f468-1f3fd-200d-1f527",
  76566. "uc_match": "1f468-1f3fd-1f527",
  76567. "uc_greedy": "1f468-1f3fd-1f527",
  76568. "shortnames": [":man_mechanic_medium_skin_tone:"],
  76569. "category": "people"
  76570. },
  76571. ":man_mechanic_tone4:": {
  76572. "uc_base": "1f468-1f3fe-1f527",
  76573. "uc_output": "1f468-1f3fe-200d-1f527",
  76574. "uc_match": "1f468-1f3fe-1f527",
  76575. "uc_greedy": "1f468-1f3fe-1f527",
  76576. "shortnames": [":man_mechanic_medium_dark_skin_tone:"],
  76577. "category": "people"
  76578. },
  76579. ":man_mechanic_tone5:": {
  76580. "uc_base": "1f468-1f3ff-1f527",
  76581. "uc_output": "1f468-1f3ff-200d-1f527",
  76582. "uc_match": "1f468-1f3ff-1f527",
  76583. "uc_greedy": "1f468-1f3ff-1f527",
  76584. "shortnames": [":man_mechanic_dark_skin_tone:"],
  76585. "category": "people"
  76586. },
  76587. ":man_office_worker_tone1:": {
  76588. "uc_base": "1f468-1f3fb-1f4bc",
  76589. "uc_output": "1f468-1f3fb-200d-1f4bc",
  76590. "uc_match": "1f468-1f3fb-1f4bc",
  76591. "uc_greedy": "1f468-1f3fb-1f4bc",
  76592. "shortnames": [":man_office_worker_light_skin_tone:"],
  76593. "category": "people"
  76594. },
  76595. ":man_office_worker_tone2:": {
  76596. "uc_base": "1f468-1f3fc-1f4bc",
  76597. "uc_output": "1f468-1f3fc-200d-1f4bc",
  76598. "uc_match": "1f468-1f3fc-1f4bc",
  76599. "uc_greedy": "1f468-1f3fc-1f4bc",
  76600. "shortnames": [":man_office_worker_medium_light_skin_tone:"],
  76601. "category": "people"
  76602. },
  76603. ":man_office_worker_tone3:": {
  76604. "uc_base": "1f468-1f3fd-1f4bc",
  76605. "uc_output": "1f468-1f3fd-200d-1f4bc",
  76606. "uc_match": "1f468-1f3fd-1f4bc",
  76607. "uc_greedy": "1f468-1f3fd-1f4bc",
  76608. "shortnames": [":man_office_worker_medium_skin_tone:"],
  76609. "category": "people"
  76610. },
  76611. ":man_office_worker_tone4:": {
  76612. "uc_base": "1f468-1f3fe-1f4bc",
  76613. "uc_output": "1f468-1f3fe-200d-1f4bc",
  76614. "uc_match": "1f468-1f3fe-1f4bc",
  76615. "uc_greedy": "1f468-1f3fe-1f4bc",
  76616. "shortnames": [":man_office_worker_medium_dark_skin_tone:"],
  76617. "category": "people"
  76618. },
  76619. ":man_office_worker_tone5:": {
  76620. "uc_base": "1f468-1f3ff-1f4bc",
  76621. "uc_output": "1f468-1f3ff-200d-1f4bc",
  76622. "uc_match": "1f468-1f3ff-1f4bc",
  76623. "uc_greedy": "1f468-1f3ff-1f4bc",
  76624. "shortnames": [":man_office_worker_dark_skin_tone:"],
  76625. "category": "people"
  76626. },
  76627. ":man_scientist_tone1:": {
  76628. "uc_base": "1f468-1f3fb-1f52c",
  76629. "uc_output": "1f468-1f3fb-200d-1f52c",
  76630. "uc_match": "1f468-1f3fb-1f52c",
  76631. "uc_greedy": "1f468-1f3fb-1f52c",
  76632. "shortnames": [":man_scientist_light_skin_tone:"],
  76633. "category": "people"
  76634. },
  76635. ":man_scientist_tone2:": {
  76636. "uc_base": "1f468-1f3fc-1f52c",
  76637. "uc_output": "1f468-1f3fc-200d-1f52c",
  76638. "uc_match": "1f468-1f3fc-1f52c",
  76639. "uc_greedy": "1f468-1f3fc-1f52c",
  76640. "shortnames": [":man_scientist_medium_light_skin_tone:"],
  76641. "category": "people"
  76642. },
  76643. ":man_scientist_tone3:": {
  76644. "uc_base": "1f468-1f3fd-1f52c",
  76645. "uc_output": "1f468-1f3fd-200d-1f52c",
  76646. "uc_match": "1f468-1f3fd-1f52c",
  76647. "uc_greedy": "1f468-1f3fd-1f52c",
  76648. "shortnames": [":man_scientist_medium_skin_tone:"],
  76649. "category": "people"
  76650. },
  76651. ":man_scientist_tone4:": {
  76652. "uc_base": "1f468-1f3fe-1f52c",
  76653. "uc_output": "1f468-1f3fe-200d-1f52c",
  76654. "uc_match": "1f468-1f3fe-1f52c",
  76655. "uc_greedy": "1f468-1f3fe-1f52c",
  76656. "shortnames": [":man_scientist_medium_dark_skin_tone:"],
  76657. "category": "people"
  76658. },
  76659. ":man_scientist_tone5:": {
  76660. "uc_base": "1f468-1f3ff-1f52c",
  76661. "uc_output": "1f468-1f3ff-200d-1f52c",
  76662. "uc_match": "1f468-1f3ff-1f52c",
  76663. "uc_greedy": "1f468-1f3ff-1f52c",
  76664. "shortnames": [":man_scientist_dark_skin_tone:"],
  76665. "category": "people"
  76666. },
  76667. ":man_singer_tone1:": {
  76668. "uc_base": "1f468-1f3fb-1f3a4",
  76669. "uc_output": "1f468-1f3fb-200d-1f3a4",
  76670. "uc_match": "1f468-1f3fb-1f3a4",
  76671. "uc_greedy": "1f468-1f3fb-1f3a4",
  76672. "shortnames": [":man_singer_light_skin_tone:"],
  76673. "category": "people"
  76674. },
  76675. ":man_singer_tone2:": {
  76676. "uc_base": "1f468-1f3fc-1f3a4",
  76677. "uc_output": "1f468-1f3fc-200d-1f3a4",
  76678. "uc_match": "1f468-1f3fc-1f3a4",
  76679. "uc_greedy": "1f468-1f3fc-1f3a4",
  76680. "shortnames": [":man_singer_medium_light_skin_tone:"],
  76681. "category": "people"
  76682. },
  76683. ":man_singer_tone3:": {
  76684. "uc_base": "1f468-1f3fd-1f3a4",
  76685. "uc_output": "1f468-1f3fd-200d-1f3a4",
  76686. "uc_match": "1f468-1f3fd-1f3a4",
  76687. "uc_greedy": "1f468-1f3fd-1f3a4",
  76688. "shortnames": [":man_singer_medium_skin_tone:"],
  76689. "category": "people"
  76690. },
  76691. ":man_singer_tone4:": {
  76692. "uc_base": "1f468-1f3fe-1f3a4",
  76693. "uc_output": "1f468-1f3fe-200d-1f3a4",
  76694. "uc_match": "1f468-1f3fe-1f3a4",
  76695. "uc_greedy": "1f468-1f3fe-1f3a4",
  76696. "shortnames": [":man_singer_medium_dark_skin_tone:"],
  76697. "category": "people"
  76698. },
  76699. ":man_singer_tone5:": {
  76700. "uc_base": "1f468-1f3ff-1f3a4",
  76701. "uc_output": "1f468-1f3ff-200d-1f3a4",
  76702. "uc_match": "1f468-1f3ff-1f3a4",
  76703. "uc_greedy": "1f468-1f3ff-1f3a4",
  76704. "shortnames": [":man_singer_dark_skin_tone:"],
  76705. "category": "people"
  76706. },
  76707. ":man_student_tone1:": {
  76708. "uc_base": "1f468-1f3fb-1f393",
  76709. "uc_output": "1f468-1f3fb-200d-1f393",
  76710. "uc_match": "1f468-1f3fb-1f393",
  76711. "uc_greedy": "1f468-1f3fb-1f393",
  76712. "shortnames": [":man_student_light_skin_tone:"],
  76713. "category": "people"
  76714. },
  76715. ":man_student_tone2:": {
  76716. "uc_base": "1f468-1f3fc-1f393",
  76717. "uc_output": "1f468-1f3fc-200d-1f393",
  76718. "uc_match": "1f468-1f3fc-1f393",
  76719. "uc_greedy": "1f468-1f3fc-1f393",
  76720. "shortnames": [":man_student_medium_light_skin_tone:"],
  76721. "category": "people"
  76722. },
  76723. ":man_student_tone3:": {
  76724. "uc_base": "1f468-1f3fd-1f393",
  76725. "uc_output": "1f468-1f3fd-200d-1f393",
  76726. "uc_match": "1f468-1f3fd-1f393",
  76727. "uc_greedy": "1f468-1f3fd-1f393",
  76728. "shortnames": [":man_student_medium_skin_tone:"],
  76729. "category": "people"
  76730. },
  76731. ":man_student_tone4:": {
  76732. "uc_base": "1f468-1f3fe-1f393",
  76733. "uc_output": "1f468-1f3fe-200d-1f393",
  76734. "uc_match": "1f468-1f3fe-1f393",
  76735. "uc_greedy": "1f468-1f3fe-1f393",
  76736. "shortnames": [":man_student_medium_dark_skin_tone:"],
  76737. "category": "people"
  76738. },
  76739. ":man_student_tone5:": {
  76740. "uc_base": "1f468-1f3ff-1f393",
  76741. "uc_output": "1f468-1f3ff-200d-1f393",
  76742. "uc_match": "1f468-1f3ff-1f393",
  76743. "uc_greedy": "1f468-1f3ff-1f393",
  76744. "shortnames": [":man_student_dark_skin_tone:"],
  76745. "category": "people"
  76746. },
  76747. ":man_teacher_tone1:": {
  76748. "uc_base": "1f468-1f3fb-1f3eb",
  76749. "uc_output": "1f468-1f3fb-200d-1f3eb",
  76750. "uc_match": "1f468-1f3fb-1f3eb",
  76751. "uc_greedy": "1f468-1f3fb-1f3eb",
  76752. "shortnames": [":man_teacher_light_skin_tone:"],
  76753. "category": "people"
  76754. },
  76755. ":man_teacher_tone2:": {
  76756. "uc_base": "1f468-1f3fc-1f3eb",
  76757. "uc_output": "1f468-1f3fc-200d-1f3eb",
  76758. "uc_match": "1f468-1f3fc-1f3eb",
  76759. "uc_greedy": "1f468-1f3fc-1f3eb",
  76760. "shortnames": [":man_teacher_medium_light_skin_tone:"],
  76761. "category": "people"
  76762. },
  76763. ":man_teacher_tone3:": {
  76764. "uc_base": "1f468-1f3fd-1f3eb",
  76765. "uc_output": "1f468-1f3fd-200d-1f3eb",
  76766. "uc_match": "1f468-1f3fd-1f3eb",
  76767. "uc_greedy": "1f468-1f3fd-1f3eb",
  76768. "shortnames": [":man_teacher_medium_skin_tone:"],
  76769. "category": "people"
  76770. },
  76771. ":man_teacher_tone4:": {
  76772. "uc_base": "1f468-1f3fe-1f3eb",
  76773. "uc_output": "1f468-1f3fe-200d-1f3eb",
  76774. "uc_match": "1f468-1f3fe-1f3eb",
  76775. "uc_greedy": "1f468-1f3fe-1f3eb",
  76776. "shortnames": [":man_teacher_medium_dark_skin_tone:"],
  76777. "category": "people"
  76778. },
  76779. ":man_teacher_tone5:": {
  76780. "uc_base": "1f468-1f3ff-1f3eb",
  76781. "uc_output": "1f468-1f3ff-200d-1f3eb",
  76782. "uc_match": "1f468-1f3ff-1f3eb",
  76783. "uc_greedy": "1f468-1f3ff-1f3eb",
  76784. "shortnames": [":man_teacher_dark_skin_tone:"],
  76785. "category": "people"
  76786. },
  76787. ":man_technologist_tone1:": {
  76788. "uc_base": "1f468-1f3fb-1f4bb",
  76789. "uc_output": "1f468-1f3fb-200d-1f4bb",
  76790. "uc_match": "1f468-1f3fb-1f4bb",
  76791. "uc_greedy": "1f468-1f3fb-1f4bb",
  76792. "shortnames": [":man_technologist_light_skin_tone:"],
  76793. "category": "people"
  76794. },
  76795. ":man_technologist_tone2:": {
  76796. "uc_base": "1f468-1f3fc-1f4bb",
  76797. "uc_output": "1f468-1f3fc-200d-1f4bb",
  76798. "uc_match": "1f468-1f3fc-1f4bb",
  76799. "uc_greedy": "1f468-1f3fc-1f4bb",
  76800. "shortnames": [":man_technologist_medium_light_skin_tone:"],
  76801. "category": "people"
  76802. },
  76803. ":man_technologist_tone3:": {
  76804. "uc_base": "1f468-1f3fd-1f4bb",
  76805. "uc_output": "1f468-1f3fd-200d-1f4bb",
  76806. "uc_match": "1f468-1f3fd-1f4bb",
  76807. "uc_greedy": "1f468-1f3fd-1f4bb",
  76808. "shortnames": [":man_technologist_medium_skin_tone:"],
  76809. "category": "people"
  76810. },
  76811. ":man_technologist_tone4:": {
  76812. "uc_base": "1f468-1f3fe-1f4bb",
  76813. "uc_output": "1f468-1f3fe-200d-1f4bb",
  76814. "uc_match": "1f468-1f3fe-1f4bb",
  76815. "uc_greedy": "1f468-1f3fe-1f4bb",
  76816. "shortnames": [":man_technologist_medium_dark_skin_tone:"],
  76817. "category": "people"
  76818. },
  76819. ":man_technologist_tone5:": {
  76820. "uc_base": "1f468-1f3ff-1f4bb",
  76821. "uc_output": "1f468-1f3ff-200d-1f4bb",
  76822. "uc_match": "1f468-1f3ff-1f4bb",
  76823. "uc_greedy": "1f468-1f3ff-1f4bb",
  76824. "shortnames": [":man_technologist_dark_skin_tone:"],
  76825. "category": "people"
  76826. },
  76827. ":woman_artist_tone1:": {
  76828. "uc_base": "1f469-1f3fb-1f3a8",
  76829. "uc_output": "1f469-1f3fb-200d-1f3a8",
  76830. "uc_match": "1f469-1f3fb-1f3a8",
  76831. "uc_greedy": "1f469-1f3fb-1f3a8",
  76832. "shortnames": [":woman_artist_light_skin_tone:"],
  76833. "category": "people"
  76834. },
  76835. ":woman_artist_tone2:": {
  76836. "uc_base": "1f469-1f3fc-1f3a8",
  76837. "uc_output": "1f469-1f3fc-200d-1f3a8",
  76838. "uc_match": "1f469-1f3fc-1f3a8",
  76839. "uc_greedy": "1f469-1f3fc-1f3a8",
  76840. "shortnames": [":woman_artist_medium_light_skin_tone:"],
  76841. "category": "people"
  76842. },
  76843. ":woman_artist_tone3:": {
  76844. "uc_base": "1f469-1f3fd-1f3a8",
  76845. "uc_output": "1f469-1f3fd-200d-1f3a8",
  76846. "uc_match": "1f469-1f3fd-1f3a8",
  76847. "uc_greedy": "1f469-1f3fd-1f3a8",
  76848. "shortnames": [":woman_artist_medium_skin_tone:"],
  76849. "category": "people"
  76850. },
  76851. ":woman_artist_tone4:": {
  76852. "uc_base": "1f469-1f3fe-1f3a8",
  76853. "uc_output": "1f469-1f3fe-200d-1f3a8",
  76854. "uc_match": "1f469-1f3fe-1f3a8",
  76855. "uc_greedy": "1f469-1f3fe-1f3a8",
  76856. "shortnames": [":woman_artist_medium_dark_skin_tone:"],
  76857. "category": "people"
  76858. },
  76859. ":woman_artist_tone5:": {
  76860. "uc_base": "1f469-1f3ff-1f3a8",
  76861. "uc_output": "1f469-1f3ff-200d-1f3a8",
  76862. "uc_match": "1f469-1f3ff-1f3a8",
  76863. "uc_greedy": "1f469-1f3ff-1f3a8",
  76864. "shortnames": [":woman_artist_dark_skin_tone:"],
  76865. "category": "people"
  76866. },
  76867. ":woman_astronaut_tone1:": {
  76868. "uc_base": "1f469-1f3fb-1f680",
  76869. "uc_output": "1f469-1f3fb-200d-1f680",
  76870. "uc_match": "1f469-1f3fb-1f680",
  76871. "uc_greedy": "1f469-1f3fb-1f680",
  76872. "shortnames": [":woman_astronaut_light_skin_tone:"],
  76873. "category": "people"
  76874. },
  76875. ":woman_astronaut_tone2:": {
  76876. "uc_base": "1f469-1f3fc-1f680",
  76877. "uc_output": "1f469-1f3fc-200d-1f680",
  76878. "uc_match": "1f469-1f3fc-1f680",
  76879. "uc_greedy": "1f469-1f3fc-1f680",
  76880. "shortnames": [":woman_astronaut_medium_light_skin_tone:"],
  76881. "category": "people"
  76882. },
  76883. ":woman_astronaut_tone3:": {
  76884. "uc_base": "1f469-1f3fd-1f680",
  76885. "uc_output": "1f469-1f3fd-200d-1f680",
  76886. "uc_match": "1f469-1f3fd-1f680",
  76887. "uc_greedy": "1f469-1f3fd-1f680",
  76888. "shortnames": [":woman_astronaut_medium_skin_tone:"],
  76889. "category": "people"
  76890. },
  76891. ":woman_astronaut_tone4:": {
  76892. "uc_base": "1f469-1f3fe-1f680",
  76893. "uc_output": "1f469-1f3fe-200d-1f680",
  76894. "uc_match": "1f469-1f3fe-1f680",
  76895. "uc_greedy": "1f469-1f3fe-1f680",
  76896. "shortnames": [":woman_astronaut_medium_dark_skin_tone:"],
  76897. "category": "people"
  76898. },
  76899. ":woman_astronaut_tone5:": {
  76900. "uc_base": "1f469-1f3ff-1f680",
  76901. "uc_output": "1f469-1f3ff-200d-1f680",
  76902. "uc_match": "1f469-1f3ff-1f680",
  76903. "uc_greedy": "1f469-1f3ff-1f680",
  76904. "shortnames": [":woman_astronaut_dark_skin_tone:"],
  76905. "category": "people"
  76906. },
  76907. ":woman_cook_tone1:": {
  76908. "uc_base": "1f469-1f3fb-1f373",
  76909. "uc_output": "1f469-1f3fb-200d-1f373",
  76910. "uc_match": "1f469-1f3fb-1f373",
  76911. "uc_greedy": "1f469-1f3fb-1f373",
  76912. "shortnames": [":woman_cook_light_skin_tone:"],
  76913. "category": "people"
  76914. },
  76915. ":woman_cook_tone2:": {
  76916. "uc_base": "1f469-1f3fc-1f373",
  76917. "uc_output": "1f469-1f3fc-200d-1f373",
  76918. "uc_match": "1f469-1f3fc-1f373",
  76919. "uc_greedy": "1f469-1f3fc-1f373",
  76920. "shortnames": [":woman_cook_medium_light_skin_tone:"],
  76921. "category": "people"
  76922. },
  76923. ":woman_cook_tone3:": {
  76924. "uc_base": "1f469-1f3fd-1f373",
  76925. "uc_output": "1f469-1f3fd-200d-1f373",
  76926. "uc_match": "1f469-1f3fd-1f373",
  76927. "uc_greedy": "1f469-1f3fd-1f373",
  76928. "shortnames": [":woman_cook_medium_skin_tone:"],
  76929. "category": "people"
  76930. },
  76931. ":woman_cook_tone4:": {
  76932. "uc_base": "1f469-1f3fe-1f373",
  76933. "uc_output": "1f469-1f3fe-200d-1f373",
  76934. "uc_match": "1f469-1f3fe-1f373",
  76935. "uc_greedy": "1f469-1f3fe-1f373",
  76936. "shortnames": [":woman_cook_medium_dark_skin_tone:"],
  76937. "category": "people"
  76938. },
  76939. ":woman_cook_tone5:": {
  76940. "uc_base": "1f469-1f3ff-1f373",
  76941. "uc_output": "1f469-1f3ff-200d-1f373",
  76942. "uc_match": "1f469-1f3ff-1f373",
  76943. "uc_greedy": "1f469-1f3ff-1f373",
  76944. "shortnames": [":woman_cook_dark_skin_tone:"],
  76945. "category": "people"
  76946. },
  76947. ":woman_factory_worker_tone1:": {
  76948. "uc_base": "1f469-1f3fb-1f3ed",
  76949. "uc_output": "1f469-1f3fb-200d-1f3ed",
  76950. "uc_match": "1f469-1f3fb-1f3ed",
  76951. "uc_greedy": "1f469-1f3fb-1f3ed",
  76952. "shortnames": [":woman_factory_worker_light_skin_tone:"],
  76953. "category": "people"
  76954. },
  76955. ":woman_factory_worker_tone2:": {
  76956. "uc_base": "1f469-1f3fc-1f3ed",
  76957. "uc_output": "1f469-1f3fc-200d-1f3ed",
  76958. "uc_match": "1f469-1f3fc-1f3ed",
  76959. "uc_greedy": "1f469-1f3fc-1f3ed",
  76960. "shortnames": [":woman_factory_worker_medium_light_skin_tone:"],
  76961. "category": "people"
  76962. },
  76963. ":woman_factory_worker_tone3:": {
  76964. "uc_base": "1f469-1f3fd-1f3ed",
  76965. "uc_output": "1f469-1f3fd-200d-1f3ed",
  76966. "uc_match": "1f469-1f3fd-1f3ed",
  76967. "uc_greedy": "1f469-1f3fd-1f3ed",
  76968. "shortnames": [":woman_factory_worker_medium_skin_tone:"],
  76969. "category": "people"
  76970. },
  76971. ":woman_factory_worker_tone4:": {
  76972. "uc_base": "1f469-1f3fe-1f3ed",
  76973. "uc_output": "1f469-1f3fe-200d-1f3ed",
  76974. "uc_match": "1f469-1f3fe-1f3ed",
  76975. "uc_greedy": "1f469-1f3fe-1f3ed",
  76976. "shortnames": [":woman_factory_worker_medium_dark_skin_tone:"],
  76977. "category": "people"
  76978. },
  76979. ":woman_factory_worker_tone5:": {
  76980. "uc_base": "1f469-1f3ff-1f3ed",
  76981. "uc_output": "1f469-1f3ff-200d-1f3ed",
  76982. "uc_match": "1f469-1f3ff-1f3ed",
  76983. "uc_greedy": "1f469-1f3ff-1f3ed",
  76984. "shortnames": [":woman_factory_worker_dark_skin_tone:"],
  76985. "category": "people"
  76986. },
  76987. ":woman_farmer_tone1:": {
  76988. "uc_base": "1f469-1f3fb-1f33e",
  76989. "uc_output": "1f469-1f3fb-200d-1f33e",
  76990. "uc_match": "1f469-1f3fb-1f33e",
  76991. "uc_greedy": "1f469-1f3fb-1f33e",
  76992. "shortnames": [":woman_farmer_light_skin_tone:"],
  76993. "category": "people"
  76994. },
  76995. ":woman_farmer_tone2:": {
  76996. "uc_base": "1f469-1f3fc-1f33e",
  76997. "uc_output": "1f469-1f3fc-200d-1f33e",
  76998. "uc_match": "1f469-1f3fc-1f33e",
  76999. "uc_greedy": "1f469-1f3fc-1f33e",
  77000. "shortnames": [":woman_farmer_medium_light_skin_tone:"],
  77001. "category": "people"
  77002. },
  77003. ":woman_farmer_tone3:": {
  77004. "uc_base": "1f469-1f3fd-1f33e",
  77005. "uc_output": "1f469-1f3fd-200d-1f33e",
  77006. "uc_match": "1f469-1f3fd-1f33e",
  77007. "uc_greedy": "1f469-1f3fd-1f33e",
  77008. "shortnames": [":woman_farmer_medium_skin_tone:"],
  77009. "category": "people"
  77010. },
  77011. ":woman_farmer_tone4:": {
  77012. "uc_base": "1f469-1f3fe-1f33e",
  77013. "uc_output": "1f469-1f3fe-200d-1f33e",
  77014. "uc_match": "1f469-1f3fe-1f33e",
  77015. "uc_greedy": "1f469-1f3fe-1f33e",
  77016. "shortnames": [":woman_farmer_medium_dark_skin_tone:"],
  77017. "category": "people"
  77018. },
  77019. ":woman_farmer_tone5:": {
  77020. "uc_base": "1f469-1f3ff-1f33e",
  77021. "uc_output": "1f469-1f3ff-200d-1f33e",
  77022. "uc_match": "1f469-1f3ff-1f33e",
  77023. "uc_greedy": "1f469-1f3ff-1f33e",
  77024. "shortnames": [":woman_farmer_dark_skin_tone:"],
  77025. "category": "people"
  77026. },
  77027. ":woman_firefighter_tone1:": {
  77028. "uc_base": "1f469-1f3fb-1f692",
  77029. "uc_output": "1f469-1f3fb-200d-1f692",
  77030. "uc_match": "1f469-1f3fb-1f692",
  77031. "uc_greedy": "1f469-1f3fb-1f692",
  77032. "shortnames": [":woman_firefighter_light_skin_tone:"],
  77033. "category": "people"
  77034. },
  77035. ":woman_firefighter_tone2:": {
  77036. "uc_base": "1f469-1f3fc-1f692",
  77037. "uc_output": "1f469-1f3fc-200d-1f692",
  77038. "uc_match": "1f469-1f3fc-1f692",
  77039. "uc_greedy": "1f469-1f3fc-1f692",
  77040. "shortnames": [":woman_firefighter_medium_light_skin_tone:"],
  77041. "category": "people"
  77042. },
  77043. ":woman_firefighter_tone3:": {
  77044. "uc_base": "1f469-1f3fd-1f692",
  77045. "uc_output": "1f469-1f3fd-200d-1f692",
  77046. "uc_match": "1f469-1f3fd-1f692",
  77047. "uc_greedy": "1f469-1f3fd-1f692",
  77048. "shortnames": [":woman_firefighter_medium_skin_tone:"],
  77049. "category": "people"
  77050. },
  77051. ":woman_firefighter_tone4:": {
  77052. "uc_base": "1f469-1f3fe-1f692",
  77053. "uc_output": "1f469-1f3fe-200d-1f692",
  77054. "uc_match": "1f469-1f3fe-1f692",
  77055. "uc_greedy": "1f469-1f3fe-1f692",
  77056. "shortnames": [":woman_firefighter_medium_dark_skin_tone:"],
  77057. "category": "people"
  77058. },
  77059. ":woman_firefighter_tone5:": {
  77060. "uc_base": "1f469-1f3ff-1f692",
  77061. "uc_output": "1f469-1f3ff-200d-1f692",
  77062. "uc_match": "1f469-1f3ff-1f692",
  77063. "uc_greedy": "1f469-1f3ff-1f692",
  77064. "shortnames": [":woman_firefighter_dark_skin_tone:"],
  77065. "category": "people"
  77066. },
  77067. ":woman_mechanic_tone1:": {
  77068. "uc_base": "1f469-1f3fb-1f527",
  77069. "uc_output": "1f469-1f3fb-200d-1f527",
  77070. "uc_match": "1f469-1f3fb-1f527",
  77071. "uc_greedy": "1f469-1f3fb-1f527",
  77072. "shortnames": [":woman_mechanic_light_skin_tone:"],
  77073. "category": "people"
  77074. },
  77075. ":woman_mechanic_tone2:": {
  77076. "uc_base": "1f469-1f3fc-1f527",
  77077. "uc_output": "1f469-1f3fc-200d-1f527",
  77078. "uc_match": "1f469-1f3fc-1f527",
  77079. "uc_greedy": "1f469-1f3fc-1f527",
  77080. "shortnames": [":woman_mechanic_medium_light_skin_tone:"],
  77081. "category": "people"
  77082. },
  77083. ":woman_mechanic_tone3:": {
  77084. "uc_base": "1f469-1f3fd-1f527",
  77085. "uc_output": "1f469-1f3fd-200d-1f527",
  77086. "uc_match": "1f469-1f3fd-1f527",
  77087. "uc_greedy": "1f469-1f3fd-1f527",
  77088. "shortnames": [":woman_mechanic_medium_skin_tone:"],
  77089. "category": "people"
  77090. },
  77091. ":woman_mechanic_tone4:": {
  77092. "uc_base": "1f469-1f3fe-1f527",
  77093. "uc_output": "1f469-1f3fe-200d-1f527",
  77094. "uc_match": "1f469-1f3fe-1f527",
  77095. "uc_greedy": "1f469-1f3fe-1f527",
  77096. "shortnames": [":woman_mechanic_medium_dark_skin_tone:"],
  77097. "category": "people"
  77098. },
  77099. ":woman_mechanic_tone5:": {
  77100. "uc_base": "1f469-1f3ff-1f527",
  77101. "uc_output": "1f469-1f3ff-200d-1f527",
  77102. "uc_match": "1f469-1f3ff-1f527",
  77103. "uc_greedy": "1f469-1f3ff-1f527",
  77104. "shortnames": [":woman_mechanic_dark_skin_tone:"],
  77105. "category": "people"
  77106. },
  77107. ":woman_office_worker_tone1:": {
  77108. "uc_base": "1f469-1f3fb-1f4bc",
  77109. "uc_output": "1f469-1f3fb-200d-1f4bc",
  77110. "uc_match": "1f469-1f3fb-1f4bc",
  77111. "uc_greedy": "1f469-1f3fb-1f4bc",
  77112. "shortnames": [":woman_office_worker_light_skin_tone:"],
  77113. "category": "people"
  77114. },
  77115. ":woman_office_worker_tone2:": {
  77116. "uc_base": "1f469-1f3fc-1f4bc",
  77117. "uc_output": "1f469-1f3fc-200d-1f4bc",
  77118. "uc_match": "1f469-1f3fc-1f4bc",
  77119. "uc_greedy": "1f469-1f3fc-1f4bc",
  77120. "shortnames": [":woman_office_worker_medium_light_skin_tone:"],
  77121. "category": "people"
  77122. },
  77123. ":woman_office_worker_tone3:": {
  77124. "uc_base": "1f469-1f3fd-1f4bc",
  77125. "uc_output": "1f469-1f3fd-200d-1f4bc",
  77126. "uc_match": "1f469-1f3fd-1f4bc",
  77127. "uc_greedy": "1f469-1f3fd-1f4bc",
  77128. "shortnames": [":woman_office_worker_medium_skin_tone:"],
  77129. "category": "people"
  77130. },
  77131. ":woman_office_worker_tone4:": {
  77132. "uc_base": "1f469-1f3fe-1f4bc",
  77133. "uc_output": "1f469-1f3fe-200d-1f4bc",
  77134. "uc_match": "1f469-1f3fe-1f4bc",
  77135. "uc_greedy": "1f469-1f3fe-1f4bc",
  77136. "shortnames": [":woman_office_worker_medium_dark_skin_tone:"],
  77137. "category": "people"
  77138. },
  77139. ":woman_office_worker_tone5:": {
  77140. "uc_base": "1f469-1f3ff-1f4bc",
  77141. "uc_output": "1f469-1f3ff-200d-1f4bc",
  77142. "uc_match": "1f469-1f3ff-1f4bc",
  77143. "uc_greedy": "1f469-1f3ff-1f4bc",
  77144. "shortnames": [":woman_office_worker_dark_skin_tone:"],
  77145. "category": "people"
  77146. },
  77147. ":woman_scientist_tone1:": {
  77148. "uc_base": "1f469-1f3fb-1f52c",
  77149. "uc_output": "1f469-1f3fb-200d-1f52c",
  77150. "uc_match": "1f469-1f3fb-1f52c",
  77151. "uc_greedy": "1f469-1f3fb-1f52c",
  77152. "shortnames": [":woman_scientist_light_skin_tone:"],
  77153. "category": "people"
  77154. },
  77155. ":woman_scientist_tone2:": {
  77156. "uc_base": "1f469-1f3fc-1f52c",
  77157. "uc_output": "1f469-1f3fc-200d-1f52c",
  77158. "uc_match": "1f469-1f3fc-1f52c",
  77159. "uc_greedy": "1f469-1f3fc-1f52c",
  77160. "shortnames": [":woman_scientist_medium_light_skin_tone:"],
  77161. "category": "people"
  77162. },
  77163. ":woman_scientist_tone3:": {
  77164. "uc_base": "1f469-1f3fd-1f52c",
  77165. "uc_output": "1f469-1f3fd-200d-1f52c",
  77166. "uc_match": "1f469-1f3fd-1f52c",
  77167. "uc_greedy": "1f469-1f3fd-1f52c",
  77168. "shortnames": [":woman_scientist_medium_skin_tone:"],
  77169. "category": "people"
  77170. },
  77171. ":woman_scientist_tone4:": {
  77172. "uc_base": "1f469-1f3fe-1f52c",
  77173. "uc_output": "1f469-1f3fe-200d-1f52c",
  77174. "uc_match": "1f469-1f3fe-1f52c",
  77175. "uc_greedy": "1f469-1f3fe-1f52c",
  77176. "shortnames": [":woman_scientist_medium_dark_skin_tone:"],
  77177. "category": "people"
  77178. },
  77179. ":woman_scientist_tone5:": {
  77180. "uc_base": "1f469-1f3ff-1f52c",
  77181. "uc_output": "1f469-1f3ff-200d-1f52c",
  77182. "uc_match": "1f469-1f3ff-1f52c",
  77183. "uc_greedy": "1f469-1f3ff-1f52c",
  77184. "shortnames": [":woman_scientist_dark_skin_tone:"],
  77185. "category": "people"
  77186. },
  77187. ":woman_singer_tone1:": {
  77188. "uc_base": "1f469-1f3fb-1f3a4",
  77189. "uc_output": "1f469-1f3fb-200d-1f3a4",
  77190. "uc_match": "1f469-1f3fb-1f3a4",
  77191. "uc_greedy": "1f469-1f3fb-1f3a4",
  77192. "shortnames": [":woman_singer_light_skin_tone:"],
  77193. "category": "people"
  77194. },
  77195. ":woman_singer_tone2:": {
  77196. "uc_base": "1f469-1f3fc-1f3a4",
  77197. "uc_output": "1f469-1f3fc-200d-1f3a4",
  77198. "uc_match": "1f469-1f3fc-1f3a4",
  77199. "uc_greedy": "1f469-1f3fc-1f3a4",
  77200. "shortnames": [":woman_singer_medium_light_skin_tone:"],
  77201. "category": "people"
  77202. },
  77203. ":woman_singer_tone3:": {
  77204. "uc_base": "1f469-1f3fd-1f3a4",
  77205. "uc_output": "1f469-1f3fd-200d-1f3a4",
  77206. "uc_match": "1f469-1f3fd-1f3a4",
  77207. "uc_greedy": "1f469-1f3fd-1f3a4",
  77208. "shortnames": [":woman_singer_medium_skin_tone:"],
  77209. "category": "people"
  77210. },
  77211. ":woman_singer_tone4:": {
  77212. "uc_base": "1f469-1f3fe-1f3a4",
  77213. "uc_output": "1f469-1f3fe-200d-1f3a4",
  77214. "uc_match": "1f469-1f3fe-1f3a4",
  77215. "uc_greedy": "1f469-1f3fe-1f3a4",
  77216. "shortnames": [":woman_singer_medium_dark_skin_tone:"],
  77217. "category": "people"
  77218. },
  77219. ":woman_singer_tone5:": {
  77220. "uc_base": "1f469-1f3ff-1f3a4",
  77221. "uc_output": "1f469-1f3ff-200d-1f3a4",
  77222. "uc_match": "1f469-1f3ff-1f3a4",
  77223. "uc_greedy": "1f469-1f3ff-1f3a4",
  77224. "shortnames": [":woman_singer_dark_skin_tone:"],
  77225. "category": "people"
  77226. },
  77227. ":woman_student_tone1:": {
  77228. "uc_base": "1f469-1f3fb-1f393",
  77229. "uc_output": "1f469-1f3fb-200d-1f393",
  77230. "uc_match": "1f469-1f3fb-1f393",
  77231. "uc_greedy": "1f469-1f3fb-1f393",
  77232. "shortnames": [":woman_student_light_skin_tone:"],
  77233. "category": "people"
  77234. },
  77235. ":woman_student_tone2:": {
  77236. "uc_base": "1f469-1f3fc-1f393",
  77237. "uc_output": "1f469-1f3fc-200d-1f393",
  77238. "uc_match": "1f469-1f3fc-1f393",
  77239. "uc_greedy": "1f469-1f3fc-1f393",
  77240. "shortnames": [":woman_student_medium_light_skin_tone:"],
  77241. "category": "people"
  77242. },
  77243. ":woman_student_tone3:": {
  77244. "uc_base": "1f469-1f3fd-1f393",
  77245. "uc_output": "1f469-1f3fd-200d-1f393",
  77246. "uc_match": "1f469-1f3fd-1f393",
  77247. "uc_greedy": "1f469-1f3fd-1f393",
  77248. "shortnames": [":woman_student_medium_skin_tone:"],
  77249. "category": "people"
  77250. },
  77251. ":woman_student_tone4:": {
  77252. "uc_base": "1f469-1f3fe-1f393",
  77253. "uc_output": "1f469-1f3fe-200d-1f393",
  77254. "uc_match": "1f469-1f3fe-1f393",
  77255. "uc_greedy": "1f469-1f3fe-1f393",
  77256. "shortnames": [":woman_student_medium_dark_skin_tone:"],
  77257. "category": "people"
  77258. },
  77259. ":woman_student_tone5:": {
  77260. "uc_base": "1f469-1f3ff-1f393",
  77261. "uc_output": "1f469-1f3ff-200d-1f393",
  77262. "uc_match": "1f469-1f3ff-1f393",
  77263. "uc_greedy": "1f469-1f3ff-1f393",
  77264. "shortnames": [":woman_student_dark_skin_tone:"],
  77265. "category": "people"
  77266. },
  77267. ":woman_teacher_tone1:": {
  77268. "uc_base": "1f469-1f3fb-1f3eb",
  77269. "uc_output": "1f469-1f3fb-200d-1f3eb",
  77270. "uc_match": "1f469-1f3fb-1f3eb",
  77271. "uc_greedy": "1f469-1f3fb-1f3eb",
  77272. "shortnames": [":woman_teacher_light_skin_tone:"],
  77273. "category": "people"
  77274. },
  77275. ":woman_teacher_tone2:": {
  77276. "uc_base": "1f469-1f3fc-1f3eb",
  77277. "uc_output": "1f469-1f3fc-200d-1f3eb",
  77278. "uc_match": "1f469-1f3fc-1f3eb",
  77279. "uc_greedy": "1f469-1f3fc-1f3eb",
  77280. "shortnames": [":woman_teacher_medium_light_skin_tone:"],
  77281. "category": "people"
  77282. },
  77283. ":woman_teacher_tone3:": {
  77284. "uc_base": "1f469-1f3fd-1f3eb",
  77285. "uc_output": "1f469-1f3fd-200d-1f3eb",
  77286. "uc_match": "1f469-1f3fd-1f3eb",
  77287. "uc_greedy": "1f469-1f3fd-1f3eb",
  77288. "shortnames": [":woman_teacher_medium_skin_tone:"],
  77289. "category": "people"
  77290. },
  77291. ":woman_teacher_tone4:": {
  77292. "uc_base": "1f469-1f3fe-1f3eb",
  77293. "uc_output": "1f469-1f3fe-200d-1f3eb",
  77294. "uc_match": "1f469-1f3fe-1f3eb",
  77295. "uc_greedy": "1f469-1f3fe-1f3eb",
  77296. "shortnames": [":woman_teacher_medium_dark_skin_tone:"],
  77297. "category": "people"
  77298. },
  77299. ":woman_teacher_tone5:": {
  77300. "uc_base": "1f469-1f3ff-1f3eb",
  77301. "uc_output": "1f469-1f3ff-200d-1f3eb",
  77302. "uc_match": "1f469-1f3ff-1f3eb",
  77303. "uc_greedy": "1f469-1f3ff-1f3eb",
  77304. "shortnames": [":woman_teacher_dark_skin_tone:"],
  77305. "category": "people"
  77306. },
  77307. ":woman_technologist_tone1:": {
  77308. "uc_base": "1f469-1f3fb-1f4bb",
  77309. "uc_output": "1f469-1f3fb-200d-1f4bb",
  77310. "uc_match": "1f469-1f3fb-1f4bb",
  77311. "uc_greedy": "1f469-1f3fb-1f4bb",
  77312. "shortnames": [":woman_technologist_light_skin_tone:"],
  77313. "category": "people"
  77314. },
  77315. ":woman_technologist_tone2:": {
  77316. "uc_base": "1f469-1f3fc-1f4bb",
  77317. "uc_output": "1f469-1f3fc-200d-1f4bb",
  77318. "uc_match": "1f469-1f3fc-1f4bb",
  77319. "uc_greedy": "1f469-1f3fc-1f4bb",
  77320. "shortnames": [":woman_technologist_medium_light_skin_tone:"],
  77321. "category": "people"
  77322. },
  77323. ":woman_technologist_tone3:": {
  77324. "uc_base": "1f469-1f3fd-1f4bb",
  77325. "uc_output": "1f469-1f3fd-200d-1f4bb",
  77326. "uc_match": "1f469-1f3fd-1f4bb",
  77327. "uc_greedy": "1f469-1f3fd-1f4bb",
  77328. "shortnames": [":woman_technologist_medium_skin_tone:"],
  77329. "category": "people"
  77330. },
  77331. ":woman_technologist_tone4:": {
  77332. "uc_base": "1f469-1f3fe-1f4bb",
  77333. "uc_output": "1f469-1f3fe-200d-1f4bb",
  77334. "uc_match": "1f469-1f3fe-1f4bb",
  77335. "uc_greedy": "1f469-1f3fe-1f4bb",
  77336. "shortnames": [":woman_technologist_medium_dark_skin_tone:"],
  77337. "category": "people"
  77338. },
  77339. ":woman_technologist_tone5:": {
  77340. "uc_base": "1f469-1f3ff-1f4bb",
  77341. "uc_output": "1f469-1f3ff-200d-1f4bb",
  77342. "uc_match": "1f469-1f3ff-1f4bb",
  77343. "uc_greedy": "1f469-1f3ff-1f4bb",
  77344. "shortnames": [":woman_technologist_dark_skin_tone:"],
  77345. "category": "people"
  77346. },
  77347. ":rainbow_flag:": {
  77348. "uc_base": "1f3f3-1f308",
  77349. "uc_output": "1f3f3-fe0f-200d-1f308",
  77350. "uc_match": "1f3f3-fe0f-1f308",
  77351. "uc_greedy": "1f3f3-1f308",
  77352. "shortnames": [":gay_pride_flag:"],
  77353. "category": "flags"
  77354. },
  77355. ":blond-haired_man:": {
  77356. "uc_base": "1f471-2642",
  77357. "uc_output": "1f471-200d-2642-fe0f",
  77358. "uc_match": "1f471-2642-fe0f",
  77359. "uc_greedy": "1f471-2642",
  77360. "shortnames": [],
  77361. "category": "people"
  77362. },
  77363. ":blond-haired_woman:": {
  77364. "uc_base": "1f471-2640",
  77365. "uc_output": "1f471-200d-2640-fe0f",
  77366. "uc_match": "1f471-2640-fe0f",
  77367. "uc_greedy": "1f471-2640",
  77368. "shortnames": [],
  77369. "category": "people"
  77370. },
  77371. ":man_biking:": {
  77372. "uc_base": "1f6b4-2642",
  77373. "uc_output": "1f6b4-200d-2642-fe0f",
  77374. "uc_match": "1f6b4-2642-fe0f",
  77375. "uc_greedy": "1f6b4-2642",
  77376. "shortnames": [],
  77377. "category": "activity"
  77378. },
  77379. ":man_bowing:": {
  77380. "uc_base": "1f647-2642",
  77381. "uc_output": "1f647-200d-2642-fe0f",
  77382. "uc_match": "1f647-2642-fe0f",
  77383. "uc_greedy": "1f647-2642",
  77384. "shortnames": [],
  77385. "category": "people"
  77386. },
  77387. ":man_cartwheeling:": {
  77388. "uc_base": "1f938-2642",
  77389. "uc_output": "1f938-200d-2642-fe0f",
  77390. "uc_match": "1f938-2642-fe0f",
  77391. "uc_greedy": "1f938-2642",
  77392. "shortnames": [],
  77393. "category": "activity"
  77394. },
  77395. ":man_climbing:": {
  77396. "uc_base": "1f9d7-2642",
  77397. "uc_output": "1f9d7-200d-2642-fe0f",
  77398. "uc_match": "1f9d7-2642-fe0f",
  77399. "uc_greedy": "1f9d7-2642",
  77400. "shortnames": [],
  77401. "category": "activity"
  77402. },
  77403. ":man_construction_worker:": {
  77404. "uc_base": "1f477-2642",
  77405. "uc_output": "1f477-200d-2642-fe0f",
  77406. "uc_match": "1f477-2642-fe0f",
  77407. "uc_greedy": "1f477-2642",
  77408. "shortnames": [],
  77409. "category": "people"
  77410. },
  77411. ":man_elf:": {
  77412. "uc_base": "1f9dd-2642",
  77413. "uc_output": "1f9dd-200d-2642-fe0f",
  77414. "uc_match": "1f9dd-2642-fe0f",
  77415. "uc_greedy": "1f9dd-2642",
  77416. "shortnames": [],
  77417. "category": "people"
  77418. },
  77419. ":man_facepalming:": {
  77420. "uc_base": "1f926-2642",
  77421. "uc_output": "1f926-200d-2642-fe0f",
  77422. "uc_match": "1f926-2642-fe0f",
  77423. "uc_greedy": "1f926-2642",
  77424. "shortnames": [],
  77425. "category": "people"
  77426. },
  77427. ":man_fairy:": {
  77428. "uc_base": "1f9da-2642",
  77429. "uc_output": "1f9da-200d-2642-fe0f",
  77430. "uc_match": "1f9da-2642-fe0f",
  77431. "uc_greedy": "1f9da-2642",
  77432. "shortnames": [],
  77433. "category": "people"
  77434. },
  77435. ":man_frowning:": {
  77436. "uc_base": "1f64d-2642",
  77437. "uc_output": "1f64d-200d-2642-fe0f",
  77438. "uc_match": "1f64d-2642-fe0f",
  77439. "uc_greedy": "1f64d-2642",
  77440. "shortnames": [],
  77441. "category": "people"
  77442. },
  77443. ":man_genie:": {
  77444. "uc_base": "1f9de-2642",
  77445. "uc_output": "1f9de-200d-2642-fe0f",
  77446. "uc_match": "1f9de-2642-fe0f",
  77447. "uc_greedy": "1f9de-2642",
  77448. "shortnames": [],
  77449. "category": "people"
  77450. },
  77451. ":man_gesturing_no:": {
  77452. "uc_base": "1f645-2642",
  77453. "uc_output": "1f645-200d-2642-fe0f",
  77454. "uc_match": "1f645-2642-fe0f",
  77455. "uc_greedy": "1f645-2642",
  77456. "shortnames": [],
  77457. "category": "people"
  77458. },
  77459. ":man_gesturing_ok:": {
  77460. "uc_base": "1f646-2642",
  77461. "uc_output": "1f646-200d-2642-fe0f",
  77462. "uc_match": "1f646-2642-fe0f",
  77463. "uc_greedy": "1f646-2642",
  77464. "shortnames": [],
  77465. "category": "people"
  77466. },
  77467. ":man_getting_face_massage:": {
  77468. "uc_base": "1f486-2642",
  77469. "uc_output": "1f486-200d-2642-fe0f",
  77470. "uc_match": "1f486-2642-fe0f",
  77471. "uc_greedy": "1f486-2642",
  77472. "shortnames": [],
  77473. "category": "people"
  77474. },
  77475. ":man_getting_haircut:": {
  77476. "uc_base": "1f487-2642",
  77477. "uc_output": "1f487-200d-2642-fe0f",
  77478. "uc_match": "1f487-2642-fe0f",
  77479. "uc_greedy": "1f487-2642",
  77480. "shortnames": [],
  77481. "category": "people"
  77482. },
  77483. ":man_guard:": {
  77484. "uc_base": "1f482-2642",
  77485. "uc_output": "1f482-200d-2642-fe0f",
  77486. "uc_match": "1f482-2642-fe0f",
  77487. "uc_greedy": "1f482-2642",
  77488. "shortnames": [],
  77489. "category": "people"
  77490. },
  77491. ":man_health_worker:": {
  77492. "uc_base": "1f468-2695",
  77493. "uc_output": "1f468-200d-2695-fe0f",
  77494. "uc_match": "1f468-2695-fe0f",
  77495. "uc_greedy": "1f468-2695",
  77496. "shortnames": [],
  77497. "category": "people"
  77498. },
  77499. ":man_in_lotus_position:": {
  77500. "uc_base": "1f9d8-2642",
  77501. "uc_output": "1f9d8-200d-2642-fe0f",
  77502. "uc_match": "1f9d8-2642-fe0f",
  77503. "uc_greedy": "1f9d8-2642",
  77504. "shortnames": [],
  77505. "category": "activity"
  77506. },
  77507. ":man_in_steamy_room:": {
  77508. "uc_base": "1f9d6-2642",
  77509. "uc_output": "1f9d6-200d-2642-fe0f",
  77510. "uc_match": "1f9d6-2642-fe0f",
  77511. "uc_greedy": "1f9d6-2642",
  77512. "shortnames": [],
  77513. "category": "people"
  77514. },
  77515. ":man_judge:": {
  77516. "uc_base": "1f468-2696",
  77517. "uc_output": "1f468-200d-2696-fe0f",
  77518. "uc_match": "1f468-2696-fe0f",
  77519. "uc_greedy": "1f468-2696",
  77520. "shortnames": [],
  77521. "category": "people"
  77522. },
  77523. ":man_juggling:": {
  77524. "uc_base": "1f939-2642",
  77525. "uc_output": "1f939-200d-2642-fe0f",
  77526. "uc_match": "1f939-2642-fe0f",
  77527. "uc_greedy": "1f939-2642",
  77528. "shortnames": [],
  77529. "category": "activity"
  77530. },
  77531. ":man_mage:": {
  77532. "uc_base": "1f9d9-2642",
  77533. "uc_output": "1f9d9-200d-2642-fe0f",
  77534. "uc_match": "1f9d9-2642-fe0f",
  77535. "uc_greedy": "1f9d9-2642",
  77536. "shortnames": [],
  77537. "category": "people"
  77538. },
  77539. ":man_mountain_biking:": {
  77540. "uc_base": "1f6b5-2642",
  77541. "uc_output": "1f6b5-200d-2642-fe0f",
  77542. "uc_match": "1f6b5-2642-fe0f",
  77543. "uc_greedy": "1f6b5-2642",
  77544. "shortnames": [],
  77545. "category": "activity"
  77546. },
  77547. ":man_pilot:": {
  77548. "uc_base": "1f468-2708",
  77549. "uc_output": "1f468-200d-2708-fe0f",
  77550. "uc_match": "1f468-2708-fe0f",
  77551. "uc_greedy": "1f468-2708",
  77552. "shortnames": [],
  77553. "category": "people"
  77554. },
  77555. ":man_playing_handball:": {
  77556. "uc_base": "1f93e-2642",
  77557. "uc_output": "1f93e-200d-2642-fe0f",
  77558. "uc_match": "1f93e-2642-fe0f",
  77559. "uc_greedy": "1f93e-2642",
  77560. "shortnames": [],
  77561. "category": "activity"
  77562. },
  77563. ":man_playing_water_polo:": {
  77564. "uc_base": "1f93d-2642",
  77565. "uc_output": "1f93d-200d-2642-fe0f",
  77566. "uc_match": "1f93d-2642-fe0f",
  77567. "uc_greedy": "1f93d-2642",
  77568. "shortnames": [],
  77569. "category": "activity"
  77570. },
  77571. ":man_police_officer:": {
  77572. "uc_base": "1f46e-2642",
  77573. "uc_output": "1f46e-200d-2642-fe0f",
  77574. "uc_match": "1f46e-2642-fe0f",
  77575. "uc_greedy": "1f46e-2642",
  77576. "shortnames": [],
  77577. "category": "people"
  77578. },
  77579. ":man_pouting:": {
  77580. "uc_base": "1f64e-2642",
  77581. "uc_output": "1f64e-200d-2642-fe0f",
  77582. "uc_match": "1f64e-2642-fe0f",
  77583. "uc_greedy": "1f64e-2642",
  77584. "shortnames": [],
  77585. "category": "people"
  77586. },
  77587. ":man_raising_hand:": {
  77588. "uc_base": "1f64b-2642",
  77589. "uc_output": "1f64b-200d-2642-fe0f",
  77590. "uc_match": "1f64b-2642-fe0f",
  77591. "uc_greedy": "1f64b-2642",
  77592. "shortnames": [],
  77593. "category": "people"
  77594. },
  77595. ":man_rowing_boat:": {
  77596. "uc_base": "1f6a3-2642",
  77597. "uc_output": "1f6a3-200d-2642-fe0f",
  77598. "uc_match": "1f6a3-2642-fe0f",
  77599. "uc_greedy": "1f6a3-2642",
  77600. "shortnames": [],
  77601. "category": "activity"
  77602. },
  77603. ":man_running:": {
  77604. "uc_base": "1f3c3-2642",
  77605. "uc_output": "1f3c3-200d-2642-fe0f",
  77606. "uc_match": "1f3c3-2642-fe0f",
  77607. "uc_greedy": "1f3c3-2642",
  77608. "shortnames": [],
  77609. "category": "people"
  77610. },
  77611. ":man_shrugging:": {
  77612. "uc_base": "1f937-2642",
  77613. "uc_output": "1f937-200d-2642-fe0f",
  77614. "uc_match": "1f937-2642-fe0f",
  77615. "uc_greedy": "1f937-2642",
  77616. "shortnames": [],
  77617. "category": "people"
  77618. },
  77619. ":man_surfing:": {
  77620. "uc_base": "1f3c4-2642",
  77621. "uc_output": "1f3c4-200d-2642-fe0f",
  77622. "uc_match": "1f3c4-2642-fe0f",
  77623. "uc_greedy": "1f3c4-2642",
  77624. "shortnames": [],
  77625. "category": "activity"
  77626. },
  77627. ":man_swimming:": {
  77628. "uc_base": "1f3ca-2642",
  77629. "uc_output": "1f3ca-200d-2642-fe0f",
  77630. "uc_match": "1f3ca-2642-fe0f",
  77631. "uc_greedy": "1f3ca-2642",
  77632. "shortnames": [],
  77633. "category": "activity"
  77634. },
  77635. ":man_tipping_hand:": {
  77636. "uc_base": "1f481-2642",
  77637. "uc_output": "1f481-200d-2642-fe0f",
  77638. "uc_match": "1f481-2642-fe0f",
  77639. "uc_greedy": "1f481-2642",
  77640. "shortnames": [],
  77641. "category": "people"
  77642. },
  77643. ":man_vampire:": {
  77644. "uc_base": "1f9db-2642",
  77645. "uc_output": "1f9db-200d-2642-fe0f",
  77646. "uc_match": "1f9db-2642-fe0f",
  77647. "uc_greedy": "1f9db-2642",
  77648. "shortnames": [],
  77649. "category": "people"
  77650. },
  77651. ":man_walking:": {
  77652. "uc_base": "1f6b6-2642",
  77653. "uc_output": "1f6b6-200d-2642-fe0f",
  77654. "uc_match": "1f6b6-2642-fe0f",
  77655. "uc_greedy": "1f6b6-2642",
  77656. "shortnames": [],
  77657. "category": "people"
  77658. },
  77659. ":man_wearing_turban:": {
  77660. "uc_base": "1f473-2642",
  77661. "uc_output": "1f473-200d-2642-fe0f",
  77662. "uc_match": "1f473-2642-fe0f",
  77663. "uc_greedy": "1f473-2642",
  77664. "shortnames": [],
  77665. "category": "people"
  77666. },
  77667. ":man_zombie:": {
  77668. "uc_base": "1f9df-2642",
  77669. "uc_output": "1f9df-200d-2642-fe0f",
  77670. "uc_match": "1f9df-2642-fe0f",
  77671. "uc_greedy": "1f9df-2642",
  77672. "shortnames": [],
  77673. "category": "people"
  77674. },
  77675. ":men_with_bunny_ears_partying:": {
  77676. "uc_base": "1f46f-2642",
  77677. "uc_output": "1f46f-200d-2642-fe0f",
  77678. "uc_match": "1f46f-2642-fe0f",
  77679. "uc_greedy": "1f46f-2642",
  77680. "shortnames": [],
  77681. "category": "people"
  77682. },
  77683. ":men_wrestling:": {
  77684. "uc_base": "1f93c-2642",
  77685. "uc_output": "1f93c-200d-2642-fe0f",
  77686. "uc_match": "1f93c-2642-fe0f",
  77687. "uc_greedy": "1f93c-2642",
  77688. "shortnames": [],
  77689. "category": "activity"
  77690. },
  77691. ":mermaid:": {
  77692. "uc_base": "1f9dc-2640",
  77693. "uc_output": "1f9dc-200d-2640-fe0f",
  77694. "uc_match": "1f9dc-2640-fe0f",
  77695. "uc_greedy": "1f9dc-2640",
  77696. "shortnames": [],
  77697. "category": "people"
  77698. },
  77699. ":merman:": {
  77700. "uc_base": "1f9dc-2642",
  77701. "uc_output": "1f9dc-200d-2642-fe0f",
  77702. "uc_match": "1f9dc-2642-fe0f",
  77703. "uc_greedy": "1f9dc-2642",
  77704. "shortnames": [],
  77705. "category": "people"
  77706. },
  77707. ":woman_biking:": {
  77708. "uc_base": "1f6b4-2640",
  77709. "uc_output": "1f6b4-200d-2640-fe0f",
  77710. "uc_match": "1f6b4-2640-fe0f",
  77711. "uc_greedy": "1f6b4-2640",
  77712. "shortnames": [],
  77713. "category": "activity"
  77714. },
  77715. ":woman_bowing:": {
  77716. "uc_base": "1f647-2640",
  77717. "uc_output": "1f647-200d-2640-fe0f",
  77718. "uc_match": "1f647-2640-fe0f",
  77719. "uc_greedy": "1f647-2640",
  77720. "shortnames": [],
  77721. "category": "people"
  77722. },
  77723. ":woman_cartwheeling:": {
  77724. "uc_base": "1f938-2640",
  77725. "uc_output": "1f938-200d-2640-fe0f",
  77726. "uc_match": "1f938-2640-fe0f",
  77727. "uc_greedy": "1f938-2640",
  77728. "shortnames": [],
  77729. "category": "activity"
  77730. },
  77731. ":woman_climbing:": {
  77732. "uc_base": "1f9d7-2640",
  77733. "uc_output": "1f9d7-200d-2640-fe0f",
  77734. "uc_match": "1f9d7-2640-fe0f",
  77735. "uc_greedy": "1f9d7-2640",
  77736. "shortnames": [],
  77737. "category": "activity"
  77738. },
  77739. ":woman_construction_worker:": {
  77740. "uc_base": "1f477-2640",
  77741. "uc_output": "1f477-200d-2640-fe0f",
  77742. "uc_match": "1f477-2640-fe0f",
  77743. "uc_greedy": "1f477-2640",
  77744. "shortnames": [],
  77745. "category": "people"
  77746. },
  77747. ":woman_elf:": {
  77748. "uc_base": "1f9dd-2640",
  77749. "uc_output": "1f9dd-200d-2640-fe0f",
  77750. "uc_match": "1f9dd-2640-fe0f",
  77751. "uc_greedy": "1f9dd-2640",
  77752. "shortnames": [],
  77753. "category": "people"
  77754. },
  77755. ":woman_facepalming:": {
  77756. "uc_base": "1f926-2640",
  77757. "uc_output": "1f926-200d-2640-fe0f",
  77758. "uc_match": "1f926-2640-fe0f",
  77759. "uc_greedy": "1f926-2640",
  77760. "shortnames": [],
  77761. "category": "people"
  77762. },
  77763. ":woman_fairy:": {
  77764. "uc_base": "1f9da-2640",
  77765. "uc_output": "1f9da-200d-2640-fe0f",
  77766. "uc_match": "1f9da-2640-fe0f",
  77767. "uc_greedy": "1f9da-2640",
  77768. "shortnames": [],
  77769. "category": "people"
  77770. },
  77771. ":woman_frowning:": {
  77772. "uc_base": "1f64d-2640",
  77773. "uc_output": "1f64d-200d-2640-fe0f",
  77774. "uc_match": "1f64d-2640-fe0f",
  77775. "uc_greedy": "1f64d-2640",
  77776. "shortnames": [],
  77777. "category": "people"
  77778. },
  77779. ":woman_genie:": {
  77780. "uc_base": "1f9de-2640",
  77781. "uc_output": "1f9de-200d-2640-fe0f",
  77782. "uc_match": "1f9de-2640-fe0f",
  77783. "uc_greedy": "1f9de-2640",
  77784. "shortnames": [],
  77785. "category": "people"
  77786. },
  77787. ":woman_gesturing_no:": {
  77788. "uc_base": "1f645-2640",
  77789. "uc_output": "1f645-200d-2640-fe0f",
  77790. "uc_match": "1f645-2640-fe0f",
  77791. "uc_greedy": "1f645-2640",
  77792. "shortnames": [],
  77793. "category": "people"
  77794. },
  77795. ":woman_gesturing_ok:": {
  77796. "uc_base": "1f646-2640",
  77797. "uc_output": "1f646-200d-2640-fe0f",
  77798. "uc_match": "1f646-2640-fe0f",
  77799. "uc_greedy": "1f646-2640",
  77800. "shortnames": [],
  77801. "category": "people"
  77802. },
  77803. ":woman_getting_face_massage:": {
  77804. "uc_base": "1f486-2640",
  77805. "uc_output": "1f486-200d-2640-fe0f",
  77806. "uc_match": "1f486-2640-fe0f",
  77807. "uc_greedy": "1f486-2640",
  77808. "shortnames": [],
  77809. "category": "people"
  77810. },
  77811. ":woman_getting_haircut:": {
  77812. "uc_base": "1f487-2640",
  77813. "uc_output": "1f487-200d-2640-fe0f",
  77814. "uc_match": "1f487-2640-fe0f",
  77815. "uc_greedy": "1f487-2640",
  77816. "shortnames": [],
  77817. "category": "people"
  77818. },
  77819. ":woman_guard:": {
  77820. "uc_base": "1f482-2640",
  77821. "uc_output": "1f482-200d-2640-fe0f",
  77822. "uc_match": "1f482-2640-fe0f",
  77823. "uc_greedy": "1f482-2640",
  77824. "shortnames": [],
  77825. "category": "people"
  77826. },
  77827. ":woman_health_worker:": {
  77828. "uc_base": "1f469-2695",
  77829. "uc_output": "1f469-200d-2695-fe0f",
  77830. "uc_match": "1f469-2695-fe0f",
  77831. "uc_greedy": "1f469-2695",
  77832. "shortnames": [],
  77833. "category": "people"
  77834. },
  77835. ":woman_in_lotus_position:": {
  77836. "uc_base": "1f9d8-2640",
  77837. "uc_output": "1f9d8-200d-2640-fe0f",
  77838. "uc_match": "1f9d8-2640-fe0f",
  77839. "uc_greedy": "1f9d8-2640",
  77840. "shortnames": [],
  77841. "category": "activity"
  77842. },
  77843. ":woman_in_steamy_room:": {
  77844. "uc_base": "1f9d6-2640",
  77845. "uc_output": "1f9d6-200d-2640-fe0f",
  77846. "uc_match": "1f9d6-2640-fe0f",
  77847. "uc_greedy": "1f9d6-2640",
  77848. "shortnames": [],
  77849. "category": "people"
  77850. },
  77851. ":woman_judge:": {
  77852. "uc_base": "1f469-2696",
  77853. "uc_output": "1f469-200d-2696-fe0f",
  77854. "uc_match": "1f469-2696-fe0f",
  77855. "uc_greedy": "1f469-2696",
  77856. "shortnames": [],
  77857. "category": "people"
  77858. },
  77859. ":woman_juggling:": {
  77860. "uc_base": "1f939-2640",
  77861. "uc_output": "1f939-200d-2640-fe0f",
  77862. "uc_match": "1f939-2640-fe0f",
  77863. "uc_greedy": "1f939-2640",
  77864. "shortnames": [],
  77865. "category": "activity"
  77866. },
  77867. ":woman_mage:": {
  77868. "uc_base": "1f9d9-2640",
  77869. "uc_output": "1f9d9-200d-2640-fe0f",
  77870. "uc_match": "1f9d9-2640-fe0f",
  77871. "uc_greedy": "1f9d9-2640",
  77872. "shortnames": [],
  77873. "category": "people"
  77874. },
  77875. ":woman_mountain_biking:": {
  77876. "uc_base": "1f6b5-2640",
  77877. "uc_output": "1f6b5-200d-2640-fe0f",
  77878. "uc_match": "1f6b5-2640-fe0f",
  77879. "uc_greedy": "1f6b5-2640",
  77880. "shortnames": [],
  77881. "category": "activity"
  77882. },
  77883. ":woman_pilot:": {
  77884. "uc_base": "1f469-2708",
  77885. "uc_output": "1f469-200d-2708-fe0f",
  77886. "uc_match": "1f469-2708-fe0f",
  77887. "uc_greedy": "1f469-2708",
  77888. "shortnames": [],
  77889. "category": "people"
  77890. },
  77891. ":woman_playing_handball:": {
  77892. "uc_base": "1f93e-2640",
  77893. "uc_output": "1f93e-200d-2640-fe0f",
  77894. "uc_match": "1f93e-2640-fe0f",
  77895. "uc_greedy": "1f93e-2640",
  77896. "shortnames": [],
  77897. "category": "activity"
  77898. },
  77899. ":woman_playing_water_polo:": {
  77900. "uc_base": "1f93d-2640",
  77901. "uc_output": "1f93d-200d-2640-fe0f",
  77902. "uc_match": "1f93d-2640-fe0f",
  77903. "uc_greedy": "1f93d-2640",
  77904. "shortnames": [],
  77905. "category": "activity"
  77906. },
  77907. ":woman_police_officer:": {
  77908. "uc_base": "1f46e-2640",
  77909. "uc_output": "1f46e-200d-2640-fe0f",
  77910. "uc_match": "1f46e-2640-fe0f",
  77911. "uc_greedy": "1f46e-2640",
  77912. "shortnames": [],
  77913. "category": "people"
  77914. },
  77915. ":woman_pouting:": {
  77916. "uc_base": "1f64e-2640",
  77917. "uc_output": "1f64e-200d-2640-fe0f",
  77918. "uc_match": "1f64e-2640-fe0f",
  77919. "uc_greedy": "1f64e-2640",
  77920. "shortnames": [],
  77921. "category": "people"
  77922. },
  77923. ":woman_raising_hand:": {
  77924. "uc_base": "1f64b-2640",
  77925. "uc_output": "1f64b-200d-2640-fe0f",
  77926. "uc_match": "1f64b-2640-fe0f",
  77927. "uc_greedy": "1f64b-2640",
  77928. "shortnames": [],
  77929. "category": "people"
  77930. },
  77931. ":woman_rowing_boat:": {
  77932. "uc_base": "1f6a3-2640",
  77933. "uc_output": "1f6a3-200d-2640-fe0f",
  77934. "uc_match": "1f6a3-2640-fe0f",
  77935. "uc_greedy": "1f6a3-2640",
  77936. "shortnames": [],
  77937. "category": "activity"
  77938. },
  77939. ":woman_running:": {
  77940. "uc_base": "1f3c3-2640",
  77941. "uc_output": "1f3c3-200d-2640-fe0f",
  77942. "uc_match": "1f3c3-2640-fe0f",
  77943. "uc_greedy": "1f3c3-2640",
  77944. "shortnames": [],
  77945. "category": "people"
  77946. },
  77947. ":woman_shrugging:": {
  77948. "uc_base": "1f937-2640",
  77949. "uc_output": "1f937-200d-2640-fe0f",
  77950. "uc_match": "1f937-2640-fe0f",
  77951. "uc_greedy": "1f937-2640",
  77952. "shortnames": [],
  77953. "category": "people"
  77954. },
  77955. ":woman_surfing:": {
  77956. "uc_base": "1f3c4-2640",
  77957. "uc_output": "1f3c4-200d-2640-fe0f",
  77958. "uc_match": "1f3c4-2640-fe0f",
  77959. "uc_greedy": "1f3c4-2640",
  77960. "shortnames": [],
  77961. "category": "activity"
  77962. },
  77963. ":woman_swimming:": {
  77964. "uc_base": "1f3ca-2640",
  77965. "uc_output": "1f3ca-200d-2640-fe0f",
  77966. "uc_match": "1f3ca-2640-fe0f",
  77967. "uc_greedy": "1f3ca-2640",
  77968. "shortnames": [],
  77969. "category": "activity"
  77970. },
  77971. ":woman_tipping_hand:": {
  77972. "uc_base": "1f481-2640",
  77973. "uc_output": "1f481-200d-2640-fe0f",
  77974. "uc_match": "1f481-2640-fe0f",
  77975. "uc_greedy": "1f481-2640",
  77976. "shortnames": [],
  77977. "category": "people"
  77978. },
  77979. ":woman_vampire:": {
  77980. "uc_base": "1f9db-2640",
  77981. "uc_output": "1f9db-200d-2640-fe0f",
  77982. "uc_match": "1f9db-2640-fe0f",
  77983. "uc_greedy": "1f9db-2640",
  77984. "shortnames": [],
  77985. "category": "people"
  77986. },
  77987. ":woman_walking:": {
  77988. "uc_base": "1f6b6-2640",
  77989. "uc_output": "1f6b6-200d-2640-fe0f",
  77990. "uc_match": "1f6b6-2640-fe0f",
  77991. "uc_greedy": "1f6b6-2640",
  77992. "shortnames": [],
  77993. "category": "people"
  77994. },
  77995. ":woman_wearing_turban:": {
  77996. "uc_base": "1f473-2640",
  77997. "uc_output": "1f473-200d-2640-fe0f",
  77998. "uc_match": "1f473-2640-fe0f",
  77999. "uc_greedy": "1f473-2640",
  78000. "shortnames": [],
  78001. "category": "people"
  78002. },
  78003. ":woman_zombie:": {
  78004. "uc_base": "1f9df-2640",
  78005. "uc_output": "1f9df-200d-2640-fe0f",
  78006. "uc_match": "1f9df-2640-fe0f",
  78007. "uc_greedy": "1f9df-2640",
  78008. "shortnames": [],
  78009. "category": "people"
  78010. },
  78011. ":women_with_bunny_ears_partying:": {
  78012. "uc_base": "1f46f-2640",
  78013. "uc_output": "1f46f-200d-2640-fe0f",
  78014. "uc_match": "1f46f-2640-fe0f",
  78015. "uc_greedy": "1f46f-2640",
  78016. "shortnames": [],
  78017. "category": "people"
  78018. },
  78019. ":women_wrestling:": {
  78020. "uc_base": "1f93c-2640",
  78021. "uc_output": "1f93c-200d-2640-fe0f",
  78022. "uc_match": "1f93c-2640-fe0f",
  78023. "uc_greedy": "1f93c-2640",
  78024. "shortnames": [],
  78025. "category": "activity"
  78026. },
  78027. ":family_man_boy:": {
  78028. "uc_base": "1f468-1f466",
  78029. "uc_output": "1f468-200d-1f466",
  78030. "uc_match": "1f468-1f466",
  78031. "uc_greedy": "1f468-1f466",
  78032. "shortnames": [],
  78033. "category": "people"
  78034. },
  78035. ":family_man_girl:": {
  78036. "uc_base": "1f468-1f467",
  78037. "uc_output": "1f468-200d-1f467",
  78038. "uc_match": "1f468-1f467",
  78039. "uc_greedy": "1f468-1f467",
  78040. "shortnames": [],
  78041. "category": "people"
  78042. },
  78043. ":family_woman_boy:": {
  78044. "uc_base": "1f469-1f466",
  78045. "uc_output": "1f469-200d-1f466",
  78046. "uc_match": "1f469-1f466",
  78047. "uc_greedy": "1f469-1f466",
  78048. "shortnames": [],
  78049. "category": "people"
  78050. },
  78051. ":family_woman_girl:": {
  78052. "uc_base": "1f469-1f467",
  78053. "uc_output": "1f469-200d-1f467",
  78054. "uc_match": "1f469-1f467",
  78055. "uc_greedy": "1f469-1f467",
  78056. "shortnames": [],
  78057. "category": "people"
  78058. },
  78059. ":man_artist:": {
  78060. "uc_base": "1f468-1f3a8",
  78061. "uc_output": "1f468-200d-1f3a8",
  78062. "uc_match": "1f468-1f3a8",
  78063. "uc_greedy": "1f468-1f3a8",
  78064. "shortnames": [],
  78065. "category": "people"
  78066. },
  78067. ":man_astronaut:": {
  78068. "uc_base": "1f468-1f680",
  78069. "uc_output": "1f468-200d-1f680",
  78070. "uc_match": "1f468-1f680",
  78071. "uc_greedy": "1f468-1f680",
  78072. "shortnames": [],
  78073. "category": "people"
  78074. },
  78075. ":man_cook:": {
  78076. "uc_base": "1f468-1f373",
  78077. "uc_output": "1f468-200d-1f373",
  78078. "uc_match": "1f468-1f373",
  78079. "uc_greedy": "1f468-1f373",
  78080. "shortnames": [],
  78081. "category": "people"
  78082. },
  78083. ":man_factory_worker:": {
  78084. "uc_base": "1f468-1f3ed",
  78085. "uc_output": "1f468-200d-1f3ed",
  78086. "uc_match": "1f468-1f3ed",
  78087. "uc_greedy": "1f468-1f3ed",
  78088. "shortnames": [],
  78089. "category": "people"
  78090. },
  78091. ":man_farmer:": {
  78092. "uc_base": "1f468-1f33e",
  78093. "uc_output": "1f468-200d-1f33e",
  78094. "uc_match": "1f468-1f33e",
  78095. "uc_greedy": "1f468-1f33e",
  78096. "shortnames": [],
  78097. "category": "people"
  78098. },
  78099. ":man_firefighter:": {
  78100. "uc_base": "1f468-1f692",
  78101. "uc_output": "1f468-200d-1f692",
  78102. "uc_match": "1f468-1f692",
  78103. "uc_greedy": "1f468-1f692",
  78104. "shortnames": [],
  78105. "category": "people"
  78106. },
  78107. ":man_mechanic:": {
  78108. "uc_base": "1f468-1f527",
  78109. "uc_output": "1f468-200d-1f527",
  78110. "uc_match": "1f468-1f527",
  78111. "uc_greedy": "1f468-1f527",
  78112. "shortnames": [],
  78113. "category": "people"
  78114. },
  78115. ":man_office_worker:": {
  78116. "uc_base": "1f468-1f4bc",
  78117. "uc_output": "1f468-200d-1f4bc",
  78118. "uc_match": "1f468-1f4bc",
  78119. "uc_greedy": "1f468-1f4bc",
  78120. "shortnames": [],
  78121. "category": "people"
  78122. },
  78123. ":man_scientist:": {
  78124. "uc_base": "1f468-1f52c",
  78125. "uc_output": "1f468-200d-1f52c",
  78126. "uc_match": "1f468-1f52c",
  78127. "uc_greedy": "1f468-1f52c",
  78128. "shortnames": [],
  78129. "category": "people"
  78130. },
  78131. ":man_singer:": {
  78132. "uc_base": "1f468-1f3a4",
  78133. "uc_output": "1f468-200d-1f3a4",
  78134. "uc_match": "1f468-1f3a4",
  78135. "uc_greedy": "1f468-1f3a4",
  78136. "shortnames": [],
  78137. "category": "people"
  78138. },
  78139. ":man_student:": {
  78140. "uc_base": "1f468-1f393",
  78141. "uc_output": "1f468-200d-1f393",
  78142. "uc_match": "1f468-1f393",
  78143. "uc_greedy": "1f468-1f393",
  78144. "shortnames": [],
  78145. "category": "people"
  78146. },
  78147. ":man_teacher:": {
  78148. "uc_base": "1f468-1f3eb",
  78149. "uc_output": "1f468-200d-1f3eb",
  78150. "uc_match": "1f468-1f3eb",
  78151. "uc_greedy": "1f468-1f3eb",
  78152. "shortnames": [],
  78153. "category": "people"
  78154. },
  78155. ":man_technologist:": {
  78156. "uc_base": "1f468-1f4bb",
  78157. "uc_output": "1f468-200d-1f4bb",
  78158. "uc_match": "1f468-1f4bb",
  78159. "uc_greedy": "1f468-1f4bb",
  78160. "shortnames": [],
  78161. "category": "people"
  78162. },
  78163. ":woman_artist:": {
  78164. "uc_base": "1f469-1f3a8",
  78165. "uc_output": "1f469-200d-1f3a8",
  78166. "uc_match": "1f469-1f3a8",
  78167. "uc_greedy": "1f469-1f3a8",
  78168. "shortnames": [],
  78169. "category": "people"
  78170. },
  78171. ":woman_astronaut:": {
  78172. "uc_base": "1f469-1f680",
  78173. "uc_output": "1f469-200d-1f680",
  78174. "uc_match": "1f469-1f680",
  78175. "uc_greedy": "1f469-1f680",
  78176. "shortnames": [],
  78177. "category": "people"
  78178. },
  78179. ":woman_cook:": {
  78180. "uc_base": "1f469-1f373",
  78181. "uc_output": "1f469-200d-1f373",
  78182. "uc_match": "1f469-1f373",
  78183. "uc_greedy": "1f469-1f373",
  78184. "shortnames": [],
  78185. "category": "people"
  78186. },
  78187. ":woman_factory_worker:": {
  78188. "uc_base": "1f469-1f3ed",
  78189. "uc_output": "1f469-200d-1f3ed",
  78190. "uc_match": "1f469-1f3ed",
  78191. "uc_greedy": "1f469-1f3ed",
  78192. "shortnames": [],
  78193. "category": "people"
  78194. },
  78195. ":woman_farmer:": {
  78196. "uc_base": "1f469-1f33e",
  78197. "uc_output": "1f469-200d-1f33e",
  78198. "uc_match": "1f469-1f33e",
  78199. "uc_greedy": "1f469-1f33e",
  78200. "shortnames": [],
  78201. "category": "people"
  78202. },
  78203. ":woman_firefighter:": {
  78204. "uc_base": "1f469-1f692",
  78205. "uc_output": "1f469-200d-1f692",
  78206. "uc_match": "1f469-1f692",
  78207. "uc_greedy": "1f469-1f692",
  78208. "shortnames": [],
  78209. "category": "people"
  78210. },
  78211. ":woman_mechanic:": {
  78212. "uc_base": "1f469-1f527",
  78213. "uc_output": "1f469-200d-1f527",
  78214. "uc_match": "1f469-1f527",
  78215. "uc_greedy": "1f469-1f527",
  78216. "shortnames": [],
  78217. "category": "people"
  78218. },
  78219. ":woman_office_worker:": {
  78220. "uc_base": "1f469-1f4bc",
  78221. "uc_output": "1f469-200d-1f4bc",
  78222. "uc_match": "1f469-1f4bc",
  78223. "uc_greedy": "1f469-1f4bc",
  78224. "shortnames": [],
  78225. "category": "people"
  78226. },
  78227. ":woman_scientist:": {
  78228. "uc_base": "1f469-1f52c",
  78229. "uc_output": "1f469-200d-1f52c",
  78230. "uc_match": "1f469-1f52c",
  78231. "uc_greedy": "1f469-1f52c",
  78232. "shortnames": [],
  78233. "category": "people"
  78234. },
  78235. ":woman_singer:": {
  78236. "uc_base": "1f469-1f3a4",
  78237. "uc_output": "1f469-200d-1f3a4",
  78238. "uc_match": "1f469-1f3a4",
  78239. "uc_greedy": "1f469-1f3a4",
  78240. "shortnames": [],
  78241. "category": "people"
  78242. },
  78243. ":woman_student:": {
  78244. "uc_base": "1f469-1f393",
  78245. "uc_output": "1f469-200d-1f393",
  78246. "uc_match": "1f469-1f393",
  78247. "uc_greedy": "1f469-1f393",
  78248. "shortnames": [],
  78249. "category": "people"
  78250. },
  78251. ":woman_teacher:": {
  78252. "uc_base": "1f469-1f3eb",
  78253. "uc_output": "1f469-200d-1f3eb",
  78254. "uc_match": "1f469-1f3eb",
  78255. "uc_greedy": "1f469-1f3eb",
  78256. "shortnames": [],
  78257. "category": "people"
  78258. },
  78259. ":woman_technologist:": {
  78260. "uc_base": "1f469-1f4bb",
  78261. "uc_output": "1f469-200d-1f4bb",
  78262. "uc_match": "1f469-1f4bb",
  78263. "uc_greedy": "1f469-1f4bb",
  78264. "shortnames": [],
  78265. "category": "people"
  78266. },
  78267. ":asterisk:": {
  78268. "uc_base": "002a-20e3",
  78269. "uc_output": "002a-fe0f-20e3",
  78270. "uc_match": "002a-20e3",
  78271. "uc_greedy": "002a-20e3",
  78272. "shortnames": [":keycap_asterisk:"],
  78273. "category": "symbols"
  78274. },
  78275. ":eight:": {
  78276. "uc_base": "0038-20e3",
  78277. "uc_output": "0038-fe0f-20e3",
  78278. "uc_match": "0038-20e3",
  78279. "uc_greedy": "0038-20e3",
  78280. "shortnames": [],
  78281. "category": "symbols"
  78282. },
  78283. ":five:": {
  78284. "uc_base": "0035-20e3",
  78285. "uc_output": "0035-fe0f-20e3",
  78286. "uc_match": "0035-20e3",
  78287. "uc_greedy": "0035-20e3",
  78288. "shortnames": [],
  78289. "category": "symbols"
  78290. },
  78291. ":four:": {
  78292. "uc_base": "0034-20e3",
  78293. "uc_output": "0034-fe0f-20e3",
  78294. "uc_match": "0034-20e3",
  78295. "uc_greedy": "0034-20e3",
  78296. "shortnames": [],
  78297. "category": "symbols"
  78298. },
  78299. ":hash:": {
  78300. "uc_base": "0023-20e3",
  78301. "uc_output": "0023-fe0f-20e3",
  78302. "uc_match": "0023-20e3",
  78303. "uc_greedy": "0023-20e3",
  78304. "shortnames": [],
  78305. "category": "symbols"
  78306. },
  78307. ":nine:": {
  78308. "uc_base": "0039-20e3",
  78309. "uc_output": "0039-fe0f-20e3",
  78310. "uc_match": "0039-20e3",
  78311. "uc_greedy": "0039-20e3",
  78312. "shortnames": [],
  78313. "category": "symbols"
  78314. },
  78315. ":one:": {
  78316. "uc_base": "0031-20e3",
  78317. "uc_output": "0031-fe0f-20e3",
  78318. "uc_match": "0031-20e3",
  78319. "uc_greedy": "0031-20e3",
  78320. "shortnames": [],
  78321. "category": "symbols"
  78322. },
  78323. ":seven:": {
  78324. "uc_base": "0037-20e3",
  78325. "uc_output": "0037-fe0f-20e3",
  78326. "uc_match": "0037-20e3",
  78327. "uc_greedy": "0037-20e3",
  78328. "shortnames": [],
  78329. "category": "symbols"
  78330. },
  78331. ":six:": {
  78332. "uc_base": "0036-20e3",
  78333. "uc_output": "0036-fe0f-20e3",
  78334. "uc_match": "0036-20e3",
  78335. "uc_greedy": "0036-20e3",
  78336. "shortnames": [],
  78337. "category": "symbols"
  78338. },
  78339. ":three:": {
  78340. "uc_base": "0033-20e3",
  78341. "uc_output": "0033-fe0f-20e3",
  78342. "uc_match": "0033-20e3",
  78343. "uc_greedy": "0033-20e3",
  78344. "shortnames": [],
  78345. "category": "symbols"
  78346. },
  78347. ":two:": {
  78348. "uc_base": "0032-20e3",
  78349. "uc_output": "0032-fe0f-20e3",
  78350. "uc_match": "0032-20e3",
  78351. "uc_greedy": "0032-20e3",
  78352. "shortnames": [],
  78353. "category": "symbols"
  78354. },
  78355. ":zero:": {
  78356. "uc_base": "0030-20e3",
  78357. "uc_output": "0030-fe0f-20e3",
  78358. "uc_match": "0030-20e3",
  78359. "uc_greedy": "0030-20e3",
  78360. "shortnames": [],
  78361. "category": "symbols"
  78362. },
  78363. ":adult_tone1:": {
  78364. "uc_base": "1f9d1-1f3fb",
  78365. "uc_output": "1f9d1-1f3fb",
  78366. "uc_match": "1f9d1-1f3fb",
  78367. "uc_greedy": "1f9d1-1f3fb",
  78368. "shortnames": [":adult_light_skin_tone:"],
  78369. "category": "people"
  78370. },
  78371. ":adult_tone2:": {
  78372. "uc_base": "1f9d1-1f3fc",
  78373. "uc_output": "1f9d1-1f3fc",
  78374. "uc_match": "1f9d1-1f3fc",
  78375. "uc_greedy": "1f9d1-1f3fc",
  78376. "shortnames": [":adult_medium_light_skin_tone:"],
  78377. "category": "people"
  78378. },
  78379. ":adult_tone3:": {
  78380. "uc_base": "1f9d1-1f3fd",
  78381. "uc_output": "1f9d1-1f3fd",
  78382. "uc_match": "1f9d1-1f3fd",
  78383. "uc_greedy": "1f9d1-1f3fd",
  78384. "shortnames": [":adult_medium_skin_tone:"],
  78385. "category": "people"
  78386. },
  78387. ":adult_tone4:": {
  78388. "uc_base": "1f9d1-1f3fe",
  78389. "uc_output": "1f9d1-1f3fe",
  78390. "uc_match": "1f9d1-1f3fe",
  78391. "uc_greedy": "1f9d1-1f3fe",
  78392. "shortnames": [":adult_medium_dark_skin_tone:"],
  78393. "category": "people"
  78394. },
  78395. ":adult_tone5:": {
  78396. "uc_base": "1f9d1-1f3ff",
  78397. "uc_output": "1f9d1-1f3ff",
  78398. "uc_match": "1f9d1-1f3ff",
  78399. "uc_greedy": "1f9d1-1f3ff",
  78400. "shortnames": [":adult_dark_skin_tone:"],
  78401. "category": "people"
  78402. },
  78403. ":angel_tone1:": {
  78404. "uc_base": "1f47c-1f3fb",
  78405. "uc_output": "1f47c-1f3fb",
  78406. "uc_match": "1f47c-1f3fb",
  78407. "uc_greedy": "1f47c-1f3fb",
  78408. "shortnames": [],
  78409. "category": "people"
  78410. },
  78411. ":angel_tone2:": {
  78412. "uc_base": "1f47c-1f3fc",
  78413. "uc_output": "1f47c-1f3fc",
  78414. "uc_match": "1f47c-1f3fc",
  78415. "uc_greedy": "1f47c-1f3fc",
  78416. "shortnames": [],
  78417. "category": "people"
  78418. },
  78419. ":angel_tone3:": {
  78420. "uc_base": "1f47c-1f3fd",
  78421. "uc_output": "1f47c-1f3fd",
  78422. "uc_match": "1f47c-1f3fd",
  78423. "uc_greedy": "1f47c-1f3fd",
  78424. "shortnames": [],
  78425. "category": "people"
  78426. },
  78427. ":angel_tone4:": {
  78428. "uc_base": "1f47c-1f3fe",
  78429. "uc_output": "1f47c-1f3fe",
  78430. "uc_match": "1f47c-1f3fe",
  78431. "uc_greedy": "1f47c-1f3fe",
  78432. "shortnames": [],
  78433. "category": "people"
  78434. },
  78435. ":angel_tone5:": {
  78436. "uc_base": "1f47c-1f3ff",
  78437. "uc_output": "1f47c-1f3ff",
  78438. "uc_match": "1f47c-1f3ff",
  78439. "uc_greedy": "1f47c-1f3ff",
  78440. "shortnames": [],
  78441. "category": "people"
  78442. },
  78443. ":baby_tone1:": {
  78444. "uc_base": "1f476-1f3fb",
  78445. "uc_output": "1f476-1f3fb",
  78446. "uc_match": "1f476-1f3fb",
  78447. "uc_greedy": "1f476-1f3fb",
  78448. "shortnames": [],
  78449. "category": "people"
  78450. },
  78451. ":baby_tone2:": {
  78452. "uc_base": "1f476-1f3fc",
  78453. "uc_output": "1f476-1f3fc",
  78454. "uc_match": "1f476-1f3fc",
  78455. "uc_greedy": "1f476-1f3fc",
  78456. "shortnames": [],
  78457. "category": "people"
  78458. },
  78459. ":baby_tone3:": {
  78460. "uc_base": "1f476-1f3fd",
  78461. "uc_output": "1f476-1f3fd",
  78462. "uc_match": "1f476-1f3fd",
  78463. "uc_greedy": "1f476-1f3fd",
  78464. "shortnames": [],
  78465. "category": "people"
  78466. },
  78467. ":baby_tone4:": {
  78468. "uc_base": "1f476-1f3fe",
  78469. "uc_output": "1f476-1f3fe",
  78470. "uc_match": "1f476-1f3fe",
  78471. "uc_greedy": "1f476-1f3fe",
  78472. "shortnames": [],
  78473. "category": "people"
  78474. },
  78475. ":baby_tone5:": {
  78476. "uc_base": "1f476-1f3ff",
  78477. "uc_output": "1f476-1f3ff",
  78478. "uc_match": "1f476-1f3ff",
  78479. "uc_greedy": "1f476-1f3ff",
  78480. "shortnames": [],
  78481. "category": "people"
  78482. },
  78483. ":bath_tone1:": {
  78484. "uc_base": "1f6c0-1f3fb",
  78485. "uc_output": "1f6c0-1f3fb",
  78486. "uc_match": "1f6c0-1f3fb",
  78487. "uc_greedy": "1f6c0-1f3fb",
  78488. "shortnames": [],
  78489. "category": "objects"
  78490. },
  78491. ":bath_tone2:": {
  78492. "uc_base": "1f6c0-1f3fc",
  78493. "uc_output": "1f6c0-1f3fc",
  78494. "uc_match": "1f6c0-1f3fc",
  78495. "uc_greedy": "1f6c0-1f3fc",
  78496. "shortnames": [],
  78497. "category": "objects"
  78498. },
  78499. ":bath_tone3:": {
  78500. "uc_base": "1f6c0-1f3fd",
  78501. "uc_output": "1f6c0-1f3fd",
  78502. "uc_match": "1f6c0-1f3fd",
  78503. "uc_greedy": "1f6c0-1f3fd",
  78504. "shortnames": [],
  78505. "category": "objects"
  78506. },
  78507. ":bath_tone4:": {
  78508. "uc_base": "1f6c0-1f3fe",
  78509. "uc_output": "1f6c0-1f3fe",
  78510. "uc_match": "1f6c0-1f3fe",
  78511. "uc_greedy": "1f6c0-1f3fe",
  78512. "shortnames": [],
  78513. "category": "objects"
  78514. },
  78515. ":bath_tone5:": {
  78516. "uc_base": "1f6c0-1f3ff",
  78517. "uc_output": "1f6c0-1f3ff",
  78518. "uc_match": "1f6c0-1f3ff",
  78519. "uc_greedy": "1f6c0-1f3ff",
  78520. "shortnames": [],
  78521. "category": "objects"
  78522. },
  78523. ":bearded_person_tone1:": {
  78524. "uc_base": "1f9d4-1f3fb",
  78525. "uc_output": "1f9d4-1f3fb",
  78526. "uc_match": "1f9d4-1f3fb",
  78527. "uc_greedy": "1f9d4-1f3fb",
  78528. "shortnames": [":bearded_person_light_skin_tone:"],
  78529. "category": "people"
  78530. },
  78531. ":bearded_person_tone2:": {
  78532. "uc_base": "1f9d4-1f3fc",
  78533. "uc_output": "1f9d4-1f3fc",
  78534. "uc_match": "1f9d4-1f3fc",
  78535. "uc_greedy": "1f9d4-1f3fc",
  78536. "shortnames": [":bearded_person_medium_light_skin_tone:"],
  78537. "category": "people"
  78538. },
  78539. ":bearded_person_tone3:": {
  78540. "uc_base": "1f9d4-1f3fd",
  78541. "uc_output": "1f9d4-1f3fd",
  78542. "uc_match": "1f9d4-1f3fd",
  78543. "uc_greedy": "1f9d4-1f3fd",
  78544. "shortnames": [":bearded_person_medium_skin_tone:"],
  78545. "category": "people"
  78546. },
  78547. ":bearded_person_tone4:": {
  78548. "uc_base": "1f9d4-1f3fe",
  78549. "uc_output": "1f9d4-1f3fe",
  78550. "uc_match": "1f9d4-1f3fe",
  78551. "uc_greedy": "1f9d4-1f3fe",
  78552. "shortnames": [":bearded_person_medium_dark_skin_tone:"],
  78553. "category": "people"
  78554. },
  78555. ":bearded_person_tone5:": {
  78556. "uc_base": "1f9d4-1f3ff",
  78557. "uc_output": "1f9d4-1f3ff",
  78558. "uc_match": "1f9d4-1f3ff",
  78559. "uc_greedy": "1f9d4-1f3ff",
  78560. "shortnames": [":bearded_person_dark_skin_tone:"],
  78561. "category": "people"
  78562. },
  78563. ":blond_haired_person_tone1:": {
  78564. "uc_base": "1f471-1f3fb",
  78565. "uc_output": "1f471-1f3fb",
  78566. "uc_match": "1f471-1f3fb",
  78567. "uc_greedy": "1f471-1f3fb",
  78568. "shortnames": [":person_with_blond_hair_tone1:"],
  78569. "category": "people"
  78570. },
  78571. ":blond_haired_person_tone2:": {
  78572. "uc_base": "1f471-1f3fc",
  78573. "uc_output": "1f471-1f3fc",
  78574. "uc_match": "1f471-1f3fc",
  78575. "uc_greedy": "1f471-1f3fc",
  78576. "shortnames": [":person_with_blond_hair_tone2:"],
  78577. "category": "people"
  78578. },
  78579. ":blond_haired_person_tone3:": {
  78580. "uc_base": "1f471-1f3fd",
  78581. "uc_output": "1f471-1f3fd",
  78582. "uc_match": "1f471-1f3fd",
  78583. "uc_greedy": "1f471-1f3fd",
  78584. "shortnames": [":person_with_blond_hair_tone3:"],
  78585. "category": "people"
  78586. },
  78587. ":blond_haired_person_tone4:": {
  78588. "uc_base": "1f471-1f3fe",
  78589. "uc_output": "1f471-1f3fe",
  78590. "uc_match": "1f471-1f3fe",
  78591. "uc_greedy": "1f471-1f3fe",
  78592. "shortnames": [":person_with_blond_hair_tone4:"],
  78593. "category": "people"
  78594. },
  78595. ":blond_haired_person_tone5:": {
  78596. "uc_base": "1f471-1f3ff",
  78597. "uc_output": "1f471-1f3ff",
  78598. "uc_match": "1f471-1f3ff",
  78599. "uc_greedy": "1f471-1f3ff",
  78600. "shortnames": [":person_with_blond_hair_tone5:"],
  78601. "category": "people"
  78602. },
  78603. ":boy_tone1:": {
  78604. "uc_base": "1f466-1f3fb",
  78605. "uc_output": "1f466-1f3fb",
  78606. "uc_match": "1f466-1f3fb",
  78607. "uc_greedy": "1f466-1f3fb",
  78608. "shortnames": [],
  78609. "category": "people"
  78610. },
  78611. ":boy_tone2:": {
  78612. "uc_base": "1f466-1f3fc",
  78613. "uc_output": "1f466-1f3fc",
  78614. "uc_match": "1f466-1f3fc",
  78615. "uc_greedy": "1f466-1f3fc",
  78616. "shortnames": [],
  78617. "category": "people"
  78618. },
  78619. ":boy_tone3:": {
  78620. "uc_base": "1f466-1f3fd",
  78621. "uc_output": "1f466-1f3fd",
  78622. "uc_match": "1f466-1f3fd",
  78623. "uc_greedy": "1f466-1f3fd",
  78624. "shortnames": [],
  78625. "category": "people"
  78626. },
  78627. ":boy_tone4:": {
  78628. "uc_base": "1f466-1f3fe",
  78629. "uc_output": "1f466-1f3fe",
  78630. "uc_match": "1f466-1f3fe",
  78631. "uc_greedy": "1f466-1f3fe",
  78632. "shortnames": [],
  78633. "category": "people"
  78634. },
  78635. ":boy_tone5:": {
  78636. "uc_base": "1f466-1f3ff",
  78637. "uc_output": "1f466-1f3ff",
  78638. "uc_match": "1f466-1f3ff",
  78639. "uc_greedy": "1f466-1f3ff",
  78640. "shortnames": [],
  78641. "category": "people"
  78642. },
  78643. ":breast_feeding_tone1:": {
  78644. "uc_base": "1f931-1f3fb",
  78645. "uc_output": "1f931-1f3fb",
  78646. "uc_match": "1f931-1f3fb",
  78647. "uc_greedy": "1f931-1f3fb",
  78648. "shortnames": [":breast_feeding_light_skin_tone:"],
  78649. "category": "people"
  78650. },
  78651. ":breast_feeding_tone2:": {
  78652. "uc_base": "1f931-1f3fc",
  78653. "uc_output": "1f931-1f3fc",
  78654. "uc_match": "1f931-1f3fc",
  78655. "uc_greedy": "1f931-1f3fc",
  78656. "shortnames": [":breast_feeding_medium_light_skin_tone:"],
  78657. "category": "people"
  78658. },
  78659. ":breast_feeding_tone3:": {
  78660. "uc_base": "1f931-1f3fd",
  78661. "uc_output": "1f931-1f3fd",
  78662. "uc_match": "1f931-1f3fd",
  78663. "uc_greedy": "1f931-1f3fd",
  78664. "shortnames": [":breast_feeding_medium_skin_tone:"],
  78665. "category": "people"
  78666. },
  78667. ":breast_feeding_tone4:": {
  78668. "uc_base": "1f931-1f3fe",
  78669. "uc_output": "1f931-1f3fe",
  78670. "uc_match": "1f931-1f3fe",
  78671. "uc_greedy": "1f931-1f3fe",
  78672. "shortnames": [":breast_feeding_medium_dark_skin_tone:"],
  78673. "category": "people"
  78674. },
  78675. ":breast_feeding_tone5:": {
  78676. "uc_base": "1f931-1f3ff",
  78677. "uc_output": "1f931-1f3ff",
  78678. "uc_match": "1f931-1f3ff",
  78679. "uc_greedy": "1f931-1f3ff",
  78680. "shortnames": [":breast_feeding_dark_skin_tone:"],
  78681. "category": "people"
  78682. },
  78683. ":bride_with_veil_tone1:": {
  78684. "uc_base": "1f470-1f3fb",
  78685. "uc_output": "1f470-1f3fb",
  78686. "uc_match": "1f470-1f3fb",
  78687. "uc_greedy": "1f470-1f3fb",
  78688. "shortnames": [],
  78689. "category": "people"
  78690. },
  78691. ":bride_with_veil_tone2:": {
  78692. "uc_base": "1f470-1f3fc",
  78693. "uc_output": "1f470-1f3fc",
  78694. "uc_match": "1f470-1f3fc",
  78695. "uc_greedy": "1f470-1f3fc",
  78696. "shortnames": [],
  78697. "category": "people"
  78698. },
  78699. ":bride_with_veil_tone3:": {
  78700. "uc_base": "1f470-1f3fd",
  78701. "uc_output": "1f470-1f3fd",
  78702. "uc_match": "1f470-1f3fd",
  78703. "uc_greedy": "1f470-1f3fd",
  78704. "shortnames": [],
  78705. "category": "people"
  78706. },
  78707. ":bride_with_veil_tone4:": {
  78708. "uc_base": "1f470-1f3fe",
  78709. "uc_output": "1f470-1f3fe",
  78710. "uc_match": "1f470-1f3fe",
  78711. "uc_greedy": "1f470-1f3fe",
  78712. "shortnames": [],
  78713. "category": "people"
  78714. },
  78715. ":bride_with_veil_tone5:": {
  78716. "uc_base": "1f470-1f3ff",
  78717. "uc_output": "1f470-1f3ff",
  78718. "uc_match": "1f470-1f3ff",
  78719. "uc_greedy": "1f470-1f3ff",
  78720. "shortnames": [],
  78721. "category": "people"
  78722. },
  78723. ":call_me_tone1:": {
  78724. "uc_base": "1f919-1f3fb",
  78725. "uc_output": "1f919-1f3fb",
  78726. "uc_match": "1f919-1f3fb",
  78727. "uc_greedy": "1f919-1f3fb",
  78728. "shortnames": [":call_me_hand_tone1:"],
  78729. "category": "people"
  78730. },
  78731. ":call_me_tone2:": {
  78732. "uc_base": "1f919-1f3fc",
  78733. "uc_output": "1f919-1f3fc",
  78734. "uc_match": "1f919-1f3fc",
  78735. "uc_greedy": "1f919-1f3fc",
  78736. "shortnames": [":call_me_hand_tone2:"],
  78737. "category": "people"
  78738. },
  78739. ":call_me_tone3:": {
  78740. "uc_base": "1f919-1f3fd",
  78741. "uc_output": "1f919-1f3fd",
  78742. "uc_match": "1f919-1f3fd",
  78743. "uc_greedy": "1f919-1f3fd",
  78744. "shortnames": [":call_me_hand_tone3:"],
  78745. "category": "people"
  78746. },
  78747. ":call_me_tone4:": {
  78748. "uc_base": "1f919-1f3fe",
  78749. "uc_output": "1f919-1f3fe",
  78750. "uc_match": "1f919-1f3fe",
  78751. "uc_greedy": "1f919-1f3fe",
  78752. "shortnames": [":call_me_hand_tone4:"],
  78753. "category": "people"
  78754. },
  78755. ":call_me_tone5:": {
  78756. "uc_base": "1f919-1f3ff",
  78757. "uc_output": "1f919-1f3ff",
  78758. "uc_match": "1f919-1f3ff",
  78759. "uc_greedy": "1f919-1f3ff",
  78760. "shortnames": [":call_me_hand_tone5:"],
  78761. "category": "people"
  78762. },
  78763. ":child_tone1:": {
  78764. "uc_base": "1f9d2-1f3fb",
  78765. "uc_output": "1f9d2-1f3fb",
  78766. "uc_match": "1f9d2-1f3fb",
  78767. "uc_greedy": "1f9d2-1f3fb",
  78768. "shortnames": [":child_light_skin_tone:"],
  78769. "category": "people"
  78770. },
  78771. ":child_tone2:": {
  78772. "uc_base": "1f9d2-1f3fc",
  78773. "uc_output": "1f9d2-1f3fc",
  78774. "uc_match": "1f9d2-1f3fc",
  78775. "uc_greedy": "1f9d2-1f3fc",
  78776. "shortnames": [":child_medium_light_skin_tone:"],
  78777. "category": "people"
  78778. },
  78779. ":child_tone3:": {
  78780. "uc_base": "1f9d2-1f3fd",
  78781. "uc_output": "1f9d2-1f3fd",
  78782. "uc_match": "1f9d2-1f3fd",
  78783. "uc_greedy": "1f9d2-1f3fd",
  78784. "shortnames": [":child_medium_skin_tone:"],
  78785. "category": "people"
  78786. },
  78787. ":child_tone4:": {
  78788. "uc_base": "1f9d2-1f3fe",
  78789. "uc_output": "1f9d2-1f3fe",
  78790. "uc_match": "1f9d2-1f3fe",
  78791. "uc_greedy": "1f9d2-1f3fe",
  78792. "shortnames": [":child_medium_dark_skin_tone:"],
  78793. "category": "people"
  78794. },
  78795. ":child_tone5:": {
  78796. "uc_base": "1f9d2-1f3ff",
  78797. "uc_output": "1f9d2-1f3ff",
  78798. "uc_match": "1f9d2-1f3ff",
  78799. "uc_greedy": "1f9d2-1f3ff",
  78800. "shortnames": [":child_dark_skin_tone:"],
  78801. "category": "people"
  78802. },
  78803. ":clap_tone1:": {
  78804. "uc_base": "1f44f-1f3fb",
  78805. "uc_output": "1f44f-1f3fb",
  78806. "uc_match": "1f44f-1f3fb",
  78807. "uc_greedy": "1f44f-1f3fb",
  78808. "shortnames": [],
  78809. "category": "people"
  78810. },
  78811. ":clap_tone2:": {
  78812. "uc_base": "1f44f-1f3fc",
  78813. "uc_output": "1f44f-1f3fc",
  78814. "uc_match": "1f44f-1f3fc",
  78815. "uc_greedy": "1f44f-1f3fc",
  78816. "shortnames": [],
  78817. "category": "people"
  78818. },
  78819. ":clap_tone3:": {
  78820. "uc_base": "1f44f-1f3fd",
  78821. "uc_output": "1f44f-1f3fd",
  78822. "uc_match": "1f44f-1f3fd",
  78823. "uc_greedy": "1f44f-1f3fd",
  78824. "shortnames": [],
  78825. "category": "people"
  78826. },
  78827. ":clap_tone4:": {
  78828. "uc_base": "1f44f-1f3fe",
  78829. "uc_output": "1f44f-1f3fe",
  78830. "uc_match": "1f44f-1f3fe",
  78831. "uc_greedy": "1f44f-1f3fe",
  78832. "shortnames": [],
  78833. "category": "people"
  78834. },
  78835. ":clap_tone5:": {
  78836. "uc_base": "1f44f-1f3ff",
  78837. "uc_output": "1f44f-1f3ff",
  78838. "uc_match": "1f44f-1f3ff",
  78839. "uc_greedy": "1f44f-1f3ff",
  78840. "shortnames": [],
  78841. "category": "people"
  78842. },
  78843. ":construction_worker_tone1:": {
  78844. "uc_base": "1f477-1f3fb",
  78845. "uc_output": "1f477-1f3fb",
  78846. "uc_match": "1f477-1f3fb",
  78847. "uc_greedy": "1f477-1f3fb",
  78848. "shortnames": [],
  78849. "category": "people"
  78850. },
  78851. ":construction_worker_tone2:": {
  78852. "uc_base": "1f477-1f3fc",
  78853. "uc_output": "1f477-1f3fc",
  78854. "uc_match": "1f477-1f3fc",
  78855. "uc_greedy": "1f477-1f3fc",
  78856. "shortnames": [],
  78857. "category": "people"
  78858. },
  78859. ":construction_worker_tone3:": {
  78860. "uc_base": "1f477-1f3fd",
  78861. "uc_output": "1f477-1f3fd",
  78862. "uc_match": "1f477-1f3fd",
  78863. "uc_greedy": "1f477-1f3fd",
  78864. "shortnames": [],
  78865. "category": "people"
  78866. },
  78867. ":construction_worker_tone4:": {
  78868. "uc_base": "1f477-1f3fe",
  78869. "uc_output": "1f477-1f3fe",
  78870. "uc_match": "1f477-1f3fe",
  78871. "uc_greedy": "1f477-1f3fe",
  78872. "shortnames": [],
  78873. "category": "people"
  78874. },
  78875. ":construction_worker_tone5:": {
  78876. "uc_base": "1f477-1f3ff",
  78877. "uc_output": "1f477-1f3ff",
  78878. "uc_match": "1f477-1f3ff",
  78879. "uc_greedy": "1f477-1f3ff",
  78880. "shortnames": [],
  78881. "category": "people"
  78882. },
  78883. ":dancer_tone1:": {
  78884. "uc_base": "1f483-1f3fb",
  78885. "uc_output": "1f483-1f3fb",
  78886. "uc_match": "1f483-1f3fb",
  78887. "uc_greedy": "1f483-1f3fb",
  78888. "shortnames": [],
  78889. "category": "people"
  78890. },
  78891. ":dancer_tone2:": {
  78892. "uc_base": "1f483-1f3fc",
  78893. "uc_output": "1f483-1f3fc",
  78894. "uc_match": "1f483-1f3fc",
  78895. "uc_greedy": "1f483-1f3fc",
  78896. "shortnames": [],
  78897. "category": "people"
  78898. },
  78899. ":dancer_tone3:": {
  78900. "uc_base": "1f483-1f3fd",
  78901. "uc_output": "1f483-1f3fd",
  78902. "uc_match": "1f483-1f3fd",
  78903. "uc_greedy": "1f483-1f3fd",
  78904. "shortnames": [],
  78905. "category": "people"
  78906. },
  78907. ":dancer_tone4:": {
  78908. "uc_base": "1f483-1f3fe",
  78909. "uc_output": "1f483-1f3fe",
  78910. "uc_match": "1f483-1f3fe",
  78911. "uc_greedy": "1f483-1f3fe",
  78912. "shortnames": [],
  78913. "category": "people"
  78914. },
  78915. ":dancer_tone5:": {
  78916. "uc_base": "1f483-1f3ff",
  78917. "uc_output": "1f483-1f3ff",
  78918. "uc_match": "1f483-1f3ff",
  78919. "uc_greedy": "1f483-1f3ff",
  78920. "shortnames": [],
  78921. "category": "people"
  78922. },
  78923. ":detective_tone1:": {
  78924. "uc_base": "1f575-1f3fb",
  78925. "uc_output": "1f575-1f3fb",
  78926. "uc_match": "1f575-fe0f-1f3fb",
  78927. "uc_greedy": "1f575-fe0f-1f3fb",
  78928. "shortnames": [":spy_tone1:", ":sleuth_or_spy_tone1:"],
  78929. "category": "people"
  78930. },
  78931. ":detective_tone2:": {
  78932. "uc_base": "1f575-1f3fc",
  78933. "uc_output": "1f575-1f3fc",
  78934. "uc_match": "1f575-fe0f-1f3fc",
  78935. "uc_greedy": "1f575-fe0f-1f3fc",
  78936. "shortnames": [":spy_tone2:", ":sleuth_or_spy_tone2:"],
  78937. "category": "people"
  78938. },
  78939. ":detective_tone3:": {
  78940. "uc_base": "1f575-1f3fd",
  78941. "uc_output": "1f575-1f3fd",
  78942. "uc_match": "1f575-fe0f-1f3fd",
  78943. "uc_greedy": "1f575-fe0f-1f3fd",
  78944. "shortnames": [":spy_tone3:", ":sleuth_or_spy_tone3:"],
  78945. "category": "people"
  78946. },
  78947. ":detective_tone4:": {
  78948. "uc_base": "1f575-1f3fe",
  78949. "uc_output": "1f575-1f3fe",
  78950. "uc_match": "1f575-fe0f-1f3fe",
  78951. "uc_greedy": "1f575-fe0f-1f3fe",
  78952. "shortnames": [":spy_tone4:", ":sleuth_or_spy_tone4:"],
  78953. "category": "people"
  78954. },
  78955. ":detective_tone5:": {
  78956. "uc_base": "1f575-1f3ff",
  78957. "uc_output": "1f575-1f3ff",
  78958. "uc_match": "1f575-fe0f-1f3ff",
  78959. "uc_greedy": "1f575-fe0f-1f3ff",
  78960. "shortnames": [":spy_tone5:", ":sleuth_or_spy_tone5:"],
  78961. "category": "people"
  78962. },
  78963. ":ear_tone1:": {
  78964. "uc_base": "1f442-1f3fb",
  78965. "uc_output": "1f442-1f3fb",
  78966. "uc_match": "1f442-1f3fb",
  78967. "uc_greedy": "1f442-1f3fb",
  78968. "shortnames": [],
  78969. "category": "people"
  78970. },
  78971. ":ear_tone2:": {
  78972. "uc_base": "1f442-1f3fc",
  78973. "uc_output": "1f442-1f3fc",
  78974. "uc_match": "1f442-1f3fc",
  78975. "uc_greedy": "1f442-1f3fc",
  78976. "shortnames": [],
  78977. "category": "people"
  78978. },
  78979. ":ear_tone3:": {
  78980. "uc_base": "1f442-1f3fd",
  78981. "uc_output": "1f442-1f3fd",
  78982. "uc_match": "1f442-1f3fd",
  78983. "uc_greedy": "1f442-1f3fd",
  78984. "shortnames": [],
  78985. "category": "people"
  78986. },
  78987. ":ear_tone4:": {
  78988. "uc_base": "1f442-1f3fe",
  78989. "uc_output": "1f442-1f3fe",
  78990. "uc_match": "1f442-1f3fe",
  78991. "uc_greedy": "1f442-1f3fe",
  78992. "shortnames": [],
  78993. "category": "people"
  78994. },
  78995. ":ear_tone5:": {
  78996. "uc_base": "1f442-1f3ff",
  78997. "uc_output": "1f442-1f3ff",
  78998. "uc_match": "1f442-1f3ff",
  78999. "uc_greedy": "1f442-1f3ff",
  79000. "shortnames": [],
  79001. "category": "people"
  79002. },
  79003. ":elf_tone1:": {
  79004. "uc_base": "1f9dd-1f3fb",
  79005. "uc_output": "1f9dd-1f3fb",
  79006. "uc_match": "1f9dd-1f3fb",
  79007. "uc_greedy": "1f9dd-1f3fb",
  79008. "shortnames": [":elf_light_skin_tone:"],
  79009. "category": "people"
  79010. },
  79011. ":elf_tone2:": {
  79012. "uc_base": "1f9dd-1f3fc",
  79013. "uc_output": "1f9dd-1f3fc",
  79014. "uc_match": "1f9dd-1f3fc",
  79015. "uc_greedy": "1f9dd-1f3fc",
  79016. "shortnames": [":elf_medium_light_skin_tone:"],
  79017. "category": "people"
  79018. },
  79019. ":elf_tone3:": {
  79020. "uc_base": "1f9dd-1f3fd",
  79021. "uc_output": "1f9dd-1f3fd",
  79022. "uc_match": "1f9dd-1f3fd",
  79023. "uc_greedy": "1f9dd-1f3fd",
  79024. "shortnames": [":elf_medium_skin_tone:"],
  79025. "category": "people"
  79026. },
  79027. ":elf_tone4:": {
  79028. "uc_base": "1f9dd-1f3fe",
  79029. "uc_output": "1f9dd-1f3fe",
  79030. "uc_match": "1f9dd-1f3fe",
  79031. "uc_greedy": "1f9dd-1f3fe",
  79032. "shortnames": [":elf_medium_dark_skin_tone:"],
  79033. "category": "people"
  79034. },
  79035. ":elf_tone5:": {
  79036. "uc_base": "1f9dd-1f3ff",
  79037. "uc_output": "1f9dd-1f3ff",
  79038. "uc_match": "1f9dd-1f3ff",
  79039. "uc_greedy": "1f9dd-1f3ff",
  79040. "shortnames": [":elf_dark_skin_tone:"],
  79041. "category": "people"
  79042. },
  79043. ":fairy_tone1:": {
  79044. "uc_base": "1f9da-1f3fb",
  79045. "uc_output": "1f9da-1f3fb",
  79046. "uc_match": "1f9da-1f3fb",
  79047. "uc_greedy": "1f9da-1f3fb",
  79048. "shortnames": [":fairy_light_skin_tone:"],
  79049. "category": "people"
  79050. },
  79051. ":fairy_tone2:": {
  79052. "uc_base": "1f9da-1f3fc",
  79053. "uc_output": "1f9da-1f3fc",
  79054. "uc_match": "1f9da-1f3fc",
  79055. "uc_greedy": "1f9da-1f3fc",
  79056. "shortnames": [":fairy_medium_light_skin_tone:"],
  79057. "category": "people"
  79058. },
  79059. ":fairy_tone3:": {
  79060. "uc_base": "1f9da-1f3fd",
  79061. "uc_output": "1f9da-1f3fd",
  79062. "uc_match": "1f9da-1f3fd",
  79063. "uc_greedy": "1f9da-1f3fd",
  79064. "shortnames": [":fairy_medium_skin_tone:"],
  79065. "category": "people"
  79066. },
  79067. ":fairy_tone4:": {
  79068. "uc_base": "1f9da-1f3fe",
  79069. "uc_output": "1f9da-1f3fe",
  79070. "uc_match": "1f9da-1f3fe",
  79071. "uc_greedy": "1f9da-1f3fe",
  79072. "shortnames": [":fairy_medium_dark_skin_tone:"],
  79073. "category": "people"
  79074. },
  79075. ":fairy_tone5:": {
  79076. "uc_base": "1f9da-1f3ff",
  79077. "uc_output": "1f9da-1f3ff",
  79078. "uc_match": "1f9da-1f3ff",
  79079. "uc_greedy": "1f9da-1f3ff",
  79080. "shortnames": [":fairy_dark_skin_tone:"],
  79081. "category": "people"
  79082. },
  79083. ":fingers_crossed_tone1:": {
  79084. "uc_base": "1f91e-1f3fb",
  79085. "uc_output": "1f91e-1f3fb",
  79086. "uc_match": "1f91e-1f3fb",
  79087. "uc_greedy": "1f91e-1f3fb",
  79088. "shortnames": [":hand_with_index_and_middle_fingers_crossed_tone1:"],
  79089. "category": "people"
  79090. },
  79091. ":fingers_crossed_tone2:": {
  79092. "uc_base": "1f91e-1f3fc",
  79093. "uc_output": "1f91e-1f3fc",
  79094. "uc_match": "1f91e-1f3fc",
  79095. "uc_greedy": "1f91e-1f3fc",
  79096. "shortnames": [":hand_with_index_and_middle_fingers_crossed_tone2:"],
  79097. "category": "people"
  79098. },
  79099. ":fingers_crossed_tone3:": {
  79100. "uc_base": "1f91e-1f3fd",
  79101. "uc_output": "1f91e-1f3fd",
  79102. "uc_match": "1f91e-1f3fd",
  79103. "uc_greedy": "1f91e-1f3fd",
  79104. "shortnames": [":hand_with_index_and_middle_fingers_crossed_tone3:"],
  79105. "category": "people"
  79106. },
  79107. ":fingers_crossed_tone4:": {
  79108. "uc_base": "1f91e-1f3fe",
  79109. "uc_output": "1f91e-1f3fe",
  79110. "uc_match": "1f91e-1f3fe",
  79111. "uc_greedy": "1f91e-1f3fe",
  79112. "shortnames": [":hand_with_index_and_middle_fingers_crossed_tone4:"],
  79113. "category": "people"
  79114. },
  79115. ":fingers_crossed_tone5:": {
  79116. "uc_base": "1f91e-1f3ff",
  79117. "uc_output": "1f91e-1f3ff",
  79118. "uc_match": "1f91e-1f3ff",
  79119. "uc_greedy": "1f91e-1f3ff",
  79120. "shortnames": [":hand_with_index_and_middle_fingers_crossed_tone5:"],
  79121. "category": "people"
  79122. },
  79123. ":flag_ac:": {
  79124. "uc_base": "1f1e6-1f1e8",
  79125. "uc_output": "1f1e6-1f1e8",
  79126. "uc_match": "1f1e6-1f1e8",
  79127. "uc_greedy": "1f1e6-1f1e8",
  79128. "shortnames": [":ac:"],
  79129. "category": "flags"
  79130. },
  79131. ":flag_ad:": {
  79132. "uc_base": "1f1e6-1f1e9",
  79133. "uc_output": "1f1e6-1f1e9",
  79134. "uc_match": "1f1e6-1f1e9",
  79135. "uc_greedy": "1f1e6-1f1e9",
  79136. "shortnames": [":ad:"],
  79137. "category": "flags"
  79138. },
  79139. ":flag_ae:": {
  79140. "uc_base": "1f1e6-1f1ea",
  79141. "uc_output": "1f1e6-1f1ea",
  79142. "uc_match": "1f1e6-1f1ea",
  79143. "uc_greedy": "1f1e6-1f1ea",
  79144. "shortnames": [":ae:"],
  79145. "category": "flags"
  79146. },
  79147. ":flag_af:": {
  79148. "uc_base": "1f1e6-1f1eb",
  79149. "uc_output": "1f1e6-1f1eb",
  79150. "uc_match": "1f1e6-1f1eb",
  79151. "uc_greedy": "1f1e6-1f1eb",
  79152. "shortnames": [":af:"],
  79153. "category": "flags"
  79154. },
  79155. ":flag_ag:": {
  79156. "uc_base": "1f1e6-1f1ec",
  79157. "uc_output": "1f1e6-1f1ec",
  79158. "uc_match": "1f1e6-1f1ec",
  79159. "uc_greedy": "1f1e6-1f1ec",
  79160. "shortnames": [":ag:"],
  79161. "category": "flags"
  79162. },
  79163. ":flag_ai:": {
  79164. "uc_base": "1f1e6-1f1ee",
  79165. "uc_output": "1f1e6-1f1ee",
  79166. "uc_match": "1f1e6-1f1ee",
  79167. "uc_greedy": "1f1e6-1f1ee",
  79168. "shortnames": [":ai:"],
  79169. "category": "flags"
  79170. },
  79171. ":flag_al:": {
  79172. "uc_base": "1f1e6-1f1f1",
  79173. "uc_output": "1f1e6-1f1f1",
  79174. "uc_match": "1f1e6-1f1f1",
  79175. "uc_greedy": "1f1e6-1f1f1",
  79176. "shortnames": [":al:"],
  79177. "category": "flags"
  79178. },
  79179. ":flag_am:": {
  79180. "uc_base": "1f1e6-1f1f2",
  79181. "uc_output": "1f1e6-1f1f2",
  79182. "uc_match": "1f1e6-1f1f2",
  79183. "uc_greedy": "1f1e6-1f1f2",
  79184. "shortnames": [":am:"],
  79185. "category": "flags"
  79186. },
  79187. ":flag_ao:": {
  79188. "uc_base": "1f1e6-1f1f4",
  79189. "uc_output": "1f1e6-1f1f4",
  79190. "uc_match": "1f1e6-1f1f4",
  79191. "uc_greedy": "1f1e6-1f1f4",
  79192. "shortnames": [":ao:"],
  79193. "category": "flags"
  79194. },
  79195. ":flag_aq:": {
  79196. "uc_base": "1f1e6-1f1f6",
  79197. "uc_output": "1f1e6-1f1f6",
  79198. "uc_match": "1f1e6-1f1f6",
  79199. "uc_greedy": "1f1e6-1f1f6",
  79200. "shortnames": [":aq:"],
  79201. "category": "flags"
  79202. },
  79203. ":flag_ar:": {
  79204. "uc_base": "1f1e6-1f1f7",
  79205. "uc_output": "1f1e6-1f1f7",
  79206. "uc_match": "1f1e6-1f1f7",
  79207. "uc_greedy": "1f1e6-1f1f7",
  79208. "shortnames": [":ar:"],
  79209. "category": "flags"
  79210. },
  79211. ":flag_as:": {
  79212. "uc_base": "1f1e6-1f1f8",
  79213. "uc_output": "1f1e6-1f1f8",
  79214. "uc_match": "1f1e6-1f1f8",
  79215. "uc_greedy": "1f1e6-1f1f8",
  79216. "shortnames": [":as:"],
  79217. "category": "flags"
  79218. },
  79219. ":flag_at:": {
  79220. "uc_base": "1f1e6-1f1f9",
  79221. "uc_output": "1f1e6-1f1f9",
  79222. "uc_match": "1f1e6-1f1f9",
  79223. "uc_greedy": "1f1e6-1f1f9",
  79224. "shortnames": [":at:"],
  79225. "category": "flags"
  79226. },
  79227. ":flag_au:": {
  79228. "uc_base": "1f1e6-1f1fa",
  79229. "uc_output": "1f1e6-1f1fa",
  79230. "uc_match": "1f1e6-1f1fa",
  79231. "uc_greedy": "1f1e6-1f1fa",
  79232. "shortnames": [":au:"],
  79233. "category": "flags"
  79234. },
  79235. ":flag_aw:": {
  79236. "uc_base": "1f1e6-1f1fc",
  79237. "uc_output": "1f1e6-1f1fc",
  79238. "uc_match": "1f1e6-1f1fc",
  79239. "uc_greedy": "1f1e6-1f1fc",
  79240. "shortnames": [":aw:"],
  79241. "category": "flags"
  79242. },
  79243. ":flag_ax:": {
  79244. "uc_base": "1f1e6-1f1fd",
  79245. "uc_output": "1f1e6-1f1fd",
  79246. "uc_match": "1f1e6-1f1fd",
  79247. "uc_greedy": "1f1e6-1f1fd",
  79248. "shortnames": [":ax:"],
  79249. "category": "flags"
  79250. },
  79251. ":flag_az:": {
  79252. "uc_base": "1f1e6-1f1ff",
  79253. "uc_output": "1f1e6-1f1ff",
  79254. "uc_match": "1f1e6-1f1ff",
  79255. "uc_greedy": "1f1e6-1f1ff",
  79256. "shortnames": [":az:"],
  79257. "category": "flags"
  79258. },
  79259. ":flag_ba:": {
  79260. "uc_base": "1f1e7-1f1e6",
  79261. "uc_output": "1f1e7-1f1e6",
  79262. "uc_match": "1f1e7-1f1e6",
  79263. "uc_greedy": "1f1e7-1f1e6",
  79264. "shortnames": [":ba:"],
  79265. "category": "flags"
  79266. },
  79267. ":flag_bb:": {
  79268. "uc_base": "1f1e7-1f1e7",
  79269. "uc_output": "1f1e7-1f1e7",
  79270. "uc_match": "1f1e7-1f1e7",
  79271. "uc_greedy": "1f1e7-1f1e7",
  79272. "shortnames": [":bb:"],
  79273. "category": "flags"
  79274. },
  79275. ":flag_bd:": {
  79276. "uc_base": "1f1e7-1f1e9",
  79277. "uc_output": "1f1e7-1f1e9",
  79278. "uc_match": "1f1e7-1f1e9",
  79279. "uc_greedy": "1f1e7-1f1e9",
  79280. "shortnames": [":bd:"],
  79281. "category": "flags"
  79282. },
  79283. ":flag_be:": {
  79284. "uc_base": "1f1e7-1f1ea",
  79285. "uc_output": "1f1e7-1f1ea",
  79286. "uc_match": "1f1e7-1f1ea",
  79287. "uc_greedy": "1f1e7-1f1ea",
  79288. "shortnames": [":be:"],
  79289. "category": "flags"
  79290. },
  79291. ":flag_bf:": {
  79292. "uc_base": "1f1e7-1f1eb",
  79293. "uc_output": "1f1e7-1f1eb",
  79294. "uc_match": "1f1e7-1f1eb",
  79295. "uc_greedy": "1f1e7-1f1eb",
  79296. "shortnames": [":bf:"],
  79297. "category": "flags"
  79298. },
  79299. ":flag_bg:": {
  79300. "uc_base": "1f1e7-1f1ec",
  79301. "uc_output": "1f1e7-1f1ec",
  79302. "uc_match": "1f1e7-1f1ec",
  79303. "uc_greedy": "1f1e7-1f1ec",
  79304. "shortnames": [":bg:"],
  79305. "category": "flags"
  79306. },
  79307. ":flag_bh:": {
  79308. "uc_base": "1f1e7-1f1ed",
  79309. "uc_output": "1f1e7-1f1ed",
  79310. "uc_match": "1f1e7-1f1ed",
  79311. "uc_greedy": "1f1e7-1f1ed",
  79312. "shortnames": [":bh:"],
  79313. "category": "flags"
  79314. },
  79315. ":flag_bi:": {
  79316. "uc_base": "1f1e7-1f1ee",
  79317. "uc_output": "1f1e7-1f1ee",
  79318. "uc_match": "1f1e7-1f1ee",
  79319. "uc_greedy": "1f1e7-1f1ee",
  79320. "shortnames": [":bi:"],
  79321. "category": "flags"
  79322. },
  79323. ":flag_bj:": {
  79324. "uc_base": "1f1e7-1f1ef",
  79325. "uc_output": "1f1e7-1f1ef",
  79326. "uc_match": "1f1e7-1f1ef",
  79327. "uc_greedy": "1f1e7-1f1ef",
  79328. "shortnames": [":bj:"],
  79329. "category": "flags"
  79330. },
  79331. ":flag_bl:": {
  79332. "uc_base": "1f1e7-1f1f1",
  79333. "uc_output": "1f1e7-1f1f1",
  79334. "uc_match": "1f1e7-1f1f1",
  79335. "uc_greedy": "1f1e7-1f1f1",
  79336. "shortnames": [":bl:"],
  79337. "category": "flags"
  79338. },
  79339. ":flag_bm:": {
  79340. "uc_base": "1f1e7-1f1f2",
  79341. "uc_output": "1f1e7-1f1f2",
  79342. "uc_match": "1f1e7-1f1f2",
  79343. "uc_greedy": "1f1e7-1f1f2",
  79344. "shortnames": [":bm:"],
  79345. "category": "flags"
  79346. },
  79347. ":flag_bn:": {
  79348. "uc_base": "1f1e7-1f1f3",
  79349. "uc_output": "1f1e7-1f1f3",
  79350. "uc_match": "1f1e7-1f1f3",
  79351. "uc_greedy": "1f1e7-1f1f3",
  79352. "shortnames": [":bn:"],
  79353. "category": "flags"
  79354. },
  79355. ":flag_bo:": {
  79356. "uc_base": "1f1e7-1f1f4",
  79357. "uc_output": "1f1e7-1f1f4",
  79358. "uc_match": "1f1e7-1f1f4",
  79359. "uc_greedy": "1f1e7-1f1f4",
  79360. "shortnames": [":bo:"],
  79361. "category": "flags"
  79362. },
  79363. ":flag_bq:": {
  79364. "uc_base": "1f1e7-1f1f6",
  79365. "uc_output": "1f1e7-1f1f6",
  79366. "uc_match": "1f1e7-1f1f6",
  79367. "uc_greedy": "1f1e7-1f1f6",
  79368. "shortnames": [":bq:"],
  79369. "category": "flags"
  79370. },
  79371. ":flag_br:": {
  79372. "uc_base": "1f1e7-1f1f7",
  79373. "uc_output": "1f1e7-1f1f7",
  79374. "uc_match": "1f1e7-1f1f7",
  79375. "uc_greedy": "1f1e7-1f1f7",
  79376. "shortnames": [":br:"],
  79377. "category": "flags"
  79378. },
  79379. ":flag_bs:": {
  79380. "uc_base": "1f1e7-1f1f8",
  79381. "uc_output": "1f1e7-1f1f8",
  79382. "uc_match": "1f1e7-1f1f8",
  79383. "uc_greedy": "1f1e7-1f1f8",
  79384. "shortnames": [":bs:"],
  79385. "category": "flags"
  79386. },
  79387. ":flag_bt:": {
  79388. "uc_base": "1f1e7-1f1f9",
  79389. "uc_output": "1f1e7-1f1f9",
  79390. "uc_match": "1f1e7-1f1f9",
  79391. "uc_greedy": "1f1e7-1f1f9",
  79392. "shortnames": [":bt:"],
  79393. "category": "flags"
  79394. },
  79395. ":flag_bv:": {
  79396. "uc_base": "1f1e7-1f1fb",
  79397. "uc_output": "1f1e7-1f1fb",
  79398. "uc_match": "1f1e7-1f1fb",
  79399. "uc_greedy": "1f1e7-1f1fb",
  79400. "shortnames": [":bv:"],
  79401. "category": "flags"
  79402. },
  79403. ":flag_bw:": {
  79404. "uc_base": "1f1e7-1f1fc",
  79405. "uc_output": "1f1e7-1f1fc",
  79406. "uc_match": "1f1e7-1f1fc",
  79407. "uc_greedy": "1f1e7-1f1fc",
  79408. "shortnames": [":bw:"],
  79409. "category": "flags"
  79410. },
  79411. ":flag_by:": {
  79412. "uc_base": "1f1e7-1f1fe",
  79413. "uc_output": "1f1e7-1f1fe",
  79414. "uc_match": "1f1e7-1f1fe",
  79415. "uc_greedy": "1f1e7-1f1fe",
  79416. "shortnames": [":by:"],
  79417. "category": "flags"
  79418. },
  79419. ":flag_bz:": {
  79420. "uc_base": "1f1e7-1f1ff",
  79421. "uc_output": "1f1e7-1f1ff",
  79422. "uc_match": "1f1e7-1f1ff",
  79423. "uc_greedy": "1f1e7-1f1ff",
  79424. "shortnames": [":bz:"],
  79425. "category": "flags"
  79426. },
  79427. ":flag_ca:": {
  79428. "uc_base": "1f1e8-1f1e6",
  79429. "uc_output": "1f1e8-1f1e6",
  79430. "uc_match": "1f1e8-1f1e6",
  79431. "uc_greedy": "1f1e8-1f1e6",
  79432. "shortnames": [":ca:"],
  79433. "category": "flags"
  79434. },
  79435. ":flag_cc:": {
  79436. "uc_base": "1f1e8-1f1e8",
  79437. "uc_output": "1f1e8-1f1e8",
  79438. "uc_match": "1f1e8-1f1e8",
  79439. "uc_greedy": "1f1e8-1f1e8",
  79440. "shortnames": [":cc:"],
  79441. "category": "flags"
  79442. },
  79443. ":flag_cd:": {
  79444. "uc_base": "1f1e8-1f1e9",
  79445. "uc_output": "1f1e8-1f1e9",
  79446. "uc_match": "1f1e8-1f1e9",
  79447. "uc_greedy": "1f1e8-1f1e9",
  79448. "shortnames": [":congo:"],
  79449. "category": "flags"
  79450. },
  79451. ":flag_cf:": {
  79452. "uc_base": "1f1e8-1f1eb",
  79453. "uc_output": "1f1e8-1f1eb",
  79454. "uc_match": "1f1e8-1f1eb",
  79455. "uc_greedy": "1f1e8-1f1eb",
  79456. "shortnames": [":cf:"],
  79457. "category": "flags"
  79458. },
  79459. ":flag_cg:": {
  79460. "uc_base": "1f1e8-1f1ec",
  79461. "uc_output": "1f1e8-1f1ec",
  79462. "uc_match": "1f1e8-1f1ec",
  79463. "uc_greedy": "1f1e8-1f1ec",
  79464. "shortnames": [":cg:"],
  79465. "category": "flags"
  79466. },
  79467. ":flag_ch:": {
  79468. "uc_base": "1f1e8-1f1ed",
  79469. "uc_output": "1f1e8-1f1ed",
  79470. "uc_match": "1f1e8-1f1ed",
  79471. "uc_greedy": "1f1e8-1f1ed",
  79472. "shortnames": [":ch:"],
  79473. "category": "flags"
  79474. },
  79475. ":flag_ci:": {
  79476. "uc_base": "1f1e8-1f1ee",
  79477. "uc_output": "1f1e8-1f1ee",
  79478. "uc_match": "1f1e8-1f1ee",
  79479. "uc_greedy": "1f1e8-1f1ee",
  79480. "shortnames": [":ci:"],
  79481. "category": "flags"
  79482. },
  79483. ":flag_ck:": {
  79484. "uc_base": "1f1e8-1f1f0",
  79485. "uc_output": "1f1e8-1f1f0",
  79486. "uc_match": "1f1e8-1f1f0",
  79487. "uc_greedy": "1f1e8-1f1f0",
  79488. "shortnames": [":ck:"],
  79489. "category": "flags"
  79490. },
  79491. ":flag_cl:": {
  79492. "uc_base": "1f1e8-1f1f1",
  79493. "uc_output": "1f1e8-1f1f1",
  79494. "uc_match": "1f1e8-1f1f1",
  79495. "uc_greedy": "1f1e8-1f1f1",
  79496. "shortnames": [":chile:"],
  79497. "category": "flags"
  79498. },
  79499. ":flag_cm:": {
  79500. "uc_base": "1f1e8-1f1f2",
  79501. "uc_output": "1f1e8-1f1f2",
  79502. "uc_match": "1f1e8-1f1f2",
  79503. "uc_greedy": "1f1e8-1f1f2",
  79504. "shortnames": [":cm:"],
  79505. "category": "flags"
  79506. },
  79507. ":flag_cn:": {
  79508. "uc_base": "1f1e8-1f1f3",
  79509. "uc_output": "1f1e8-1f1f3",
  79510. "uc_match": "1f1e8-1f1f3",
  79511. "uc_greedy": "1f1e8-1f1f3",
  79512. "shortnames": [":cn:"],
  79513. "category": "flags"
  79514. },
  79515. ":flag_co:": {
  79516. "uc_base": "1f1e8-1f1f4",
  79517. "uc_output": "1f1e8-1f1f4",
  79518. "uc_match": "1f1e8-1f1f4",
  79519. "uc_greedy": "1f1e8-1f1f4",
  79520. "shortnames": [":co:"],
  79521. "category": "flags"
  79522. },
  79523. ":flag_cp:": {
  79524. "uc_base": "1f1e8-1f1f5",
  79525. "uc_output": "1f1e8-1f1f5",
  79526. "uc_match": "1f1e8-1f1f5",
  79527. "uc_greedy": "1f1e8-1f1f5",
  79528. "shortnames": [":cp:"],
  79529. "category": "flags"
  79530. },
  79531. ":flag_cr:": {
  79532. "uc_base": "1f1e8-1f1f7",
  79533. "uc_output": "1f1e8-1f1f7",
  79534. "uc_match": "1f1e8-1f1f7",
  79535. "uc_greedy": "1f1e8-1f1f7",
  79536. "shortnames": [":cr:"],
  79537. "category": "flags"
  79538. },
  79539. ":flag_cu:": {
  79540. "uc_base": "1f1e8-1f1fa",
  79541. "uc_output": "1f1e8-1f1fa",
  79542. "uc_match": "1f1e8-1f1fa",
  79543. "uc_greedy": "1f1e8-1f1fa",
  79544. "shortnames": [":cu:"],
  79545. "category": "flags"
  79546. },
  79547. ":flag_cv:": {
  79548. "uc_base": "1f1e8-1f1fb",
  79549. "uc_output": "1f1e8-1f1fb",
  79550. "uc_match": "1f1e8-1f1fb",
  79551. "uc_greedy": "1f1e8-1f1fb",
  79552. "shortnames": [":cv:"],
  79553. "category": "flags"
  79554. },
  79555. ":flag_cw:": {
  79556. "uc_base": "1f1e8-1f1fc",
  79557. "uc_output": "1f1e8-1f1fc",
  79558. "uc_match": "1f1e8-1f1fc",
  79559. "uc_greedy": "1f1e8-1f1fc",
  79560. "shortnames": [":cw:"],
  79561. "category": "flags"
  79562. },
  79563. ":flag_cx:": {
  79564. "uc_base": "1f1e8-1f1fd",
  79565. "uc_output": "1f1e8-1f1fd",
  79566. "uc_match": "1f1e8-1f1fd",
  79567. "uc_greedy": "1f1e8-1f1fd",
  79568. "shortnames": [":cx:"],
  79569. "category": "flags"
  79570. },
  79571. ":flag_cy:": {
  79572. "uc_base": "1f1e8-1f1fe",
  79573. "uc_output": "1f1e8-1f1fe",
  79574. "uc_match": "1f1e8-1f1fe",
  79575. "uc_greedy": "1f1e8-1f1fe",
  79576. "shortnames": [":cy:"],
  79577. "category": "flags"
  79578. },
  79579. ":flag_cz:": {
  79580. "uc_base": "1f1e8-1f1ff",
  79581. "uc_output": "1f1e8-1f1ff",
  79582. "uc_match": "1f1e8-1f1ff",
  79583. "uc_greedy": "1f1e8-1f1ff",
  79584. "shortnames": [":cz:"],
  79585. "category": "flags"
  79586. },
  79587. ":flag_de:": {
  79588. "uc_base": "1f1e9-1f1ea",
  79589. "uc_output": "1f1e9-1f1ea",
  79590. "uc_match": "1f1e9-1f1ea",
  79591. "uc_greedy": "1f1e9-1f1ea",
  79592. "shortnames": [":de:"],
  79593. "category": "flags"
  79594. },
  79595. ":flag_dg:": {
  79596. "uc_base": "1f1e9-1f1ec",
  79597. "uc_output": "1f1e9-1f1ec",
  79598. "uc_match": "1f1e9-1f1ec",
  79599. "uc_greedy": "1f1e9-1f1ec",
  79600. "shortnames": [":dg:"],
  79601. "category": "flags"
  79602. },
  79603. ":flag_dj:": {
  79604. "uc_base": "1f1e9-1f1ef",
  79605. "uc_output": "1f1e9-1f1ef",
  79606. "uc_match": "1f1e9-1f1ef",
  79607. "uc_greedy": "1f1e9-1f1ef",
  79608. "shortnames": [":dj:"],
  79609. "category": "flags"
  79610. },
  79611. ":flag_dk:": {
  79612. "uc_base": "1f1e9-1f1f0",
  79613. "uc_output": "1f1e9-1f1f0",
  79614. "uc_match": "1f1e9-1f1f0",
  79615. "uc_greedy": "1f1e9-1f1f0",
  79616. "shortnames": [":dk:"],
  79617. "category": "flags"
  79618. },
  79619. ":flag_dm:": {
  79620. "uc_base": "1f1e9-1f1f2",
  79621. "uc_output": "1f1e9-1f1f2",
  79622. "uc_match": "1f1e9-1f1f2",
  79623. "uc_greedy": "1f1e9-1f1f2",
  79624. "shortnames": [":dm:"],
  79625. "category": "flags"
  79626. },
  79627. ":flag_do:": {
  79628. "uc_base": "1f1e9-1f1f4",
  79629. "uc_output": "1f1e9-1f1f4",
  79630. "uc_match": "1f1e9-1f1f4",
  79631. "uc_greedy": "1f1e9-1f1f4",
  79632. "shortnames": [":do:"],
  79633. "category": "flags"
  79634. },
  79635. ":flag_dz:": {
  79636. "uc_base": "1f1e9-1f1ff",
  79637. "uc_output": "1f1e9-1f1ff",
  79638. "uc_match": "1f1e9-1f1ff",
  79639. "uc_greedy": "1f1e9-1f1ff",
  79640. "shortnames": [":dz:"],
  79641. "category": "flags"
  79642. },
  79643. ":flag_ea:": {
  79644. "uc_base": "1f1ea-1f1e6",
  79645. "uc_output": "1f1ea-1f1e6",
  79646. "uc_match": "1f1ea-1f1e6",
  79647. "uc_greedy": "1f1ea-1f1e6",
  79648. "shortnames": [":ea:"],
  79649. "category": "flags"
  79650. },
  79651. ":flag_ec:": {
  79652. "uc_base": "1f1ea-1f1e8",
  79653. "uc_output": "1f1ea-1f1e8",
  79654. "uc_match": "1f1ea-1f1e8",
  79655. "uc_greedy": "1f1ea-1f1e8",
  79656. "shortnames": [":ec:"],
  79657. "category": "flags"
  79658. },
  79659. ":flag_ee:": {
  79660. "uc_base": "1f1ea-1f1ea",
  79661. "uc_output": "1f1ea-1f1ea",
  79662. "uc_match": "1f1ea-1f1ea",
  79663. "uc_greedy": "1f1ea-1f1ea",
  79664. "shortnames": [":ee:"],
  79665. "category": "flags"
  79666. },
  79667. ":flag_eg:": {
  79668. "uc_base": "1f1ea-1f1ec",
  79669. "uc_output": "1f1ea-1f1ec",
  79670. "uc_match": "1f1ea-1f1ec",
  79671. "uc_greedy": "1f1ea-1f1ec",
  79672. "shortnames": [":eg:"],
  79673. "category": "flags"
  79674. },
  79675. ":flag_eh:": {
  79676. "uc_base": "1f1ea-1f1ed",
  79677. "uc_output": "1f1ea-1f1ed",
  79678. "uc_match": "1f1ea-1f1ed",
  79679. "uc_greedy": "1f1ea-1f1ed",
  79680. "shortnames": [":eh:"],
  79681. "category": "flags"
  79682. },
  79683. ":flag_er:": {
  79684. "uc_base": "1f1ea-1f1f7",
  79685. "uc_output": "1f1ea-1f1f7",
  79686. "uc_match": "1f1ea-1f1f7",
  79687. "uc_greedy": "1f1ea-1f1f7",
  79688. "shortnames": [":er:"],
  79689. "category": "flags"
  79690. },
  79691. ":flag_es:": {
  79692. "uc_base": "1f1ea-1f1f8",
  79693. "uc_output": "1f1ea-1f1f8",
  79694. "uc_match": "1f1ea-1f1f8",
  79695. "uc_greedy": "1f1ea-1f1f8",
  79696. "shortnames": [":es:"],
  79697. "category": "flags"
  79698. },
  79699. ":flag_et:": {
  79700. "uc_base": "1f1ea-1f1f9",
  79701. "uc_output": "1f1ea-1f1f9",
  79702. "uc_match": "1f1ea-1f1f9",
  79703. "uc_greedy": "1f1ea-1f1f9",
  79704. "shortnames": [":et:"],
  79705. "category": "flags"
  79706. },
  79707. ":flag_eu:": {
  79708. "uc_base": "1f1ea-1f1fa",
  79709. "uc_output": "1f1ea-1f1fa",
  79710. "uc_match": "1f1ea-1f1fa",
  79711. "uc_greedy": "1f1ea-1f1fa",
  79712. "shortnames": [":eu:"],
  79713. "category": "flags"
  79714. },
  79715. ":flag_fi:": {
  79716. "uc_base": "1f1eb-1f1ee",
  79717. "uc_output": "1f1eb-1f1ee",
  79718. "uc_match": "1f1eb-1f1ee",
  79719. "uc_greedy": "1f1eb-1f1ee",
  79720. "shortnames": [":fi:"],
  79721. "category": "flags"
  79722. },
  79723. ":flag_fj:": {
  79724. "uc_base": "1f1eb-1f1ef",
  79725. "uc_output": "1f1eb-1f1ef",
  79726. "uc_match": "1f1eb-1f1ef",
  79727. "uc_greedy": "1f1eb-1f1ef",
  79728. "shortnames": [":fj:"],
  79729. "category": "flags"
  79730. },
  79731. ":flag_fk:": {
  79732. "uc_base": "1f1eb-1f1f0",
  79733. "uc_output": "1f1eb-1f1f0",
  79734. "uc_match": "1f1eb-1f1f0",
  79735. "uc_greedy": "1f1eb-1f1f0",
  79736. "shortnames": [":fk:"],
  79737. "category": "flags"
  79738. },
  79739. ":flag_fm:": {
  79740. "uc_base": "1f1eb-1f1f2",
  79741. "uc_output": "1f1eb-1f1f2",
  79742. "uc_match": "1f1eb-1f1f2",
  79743. "uc_greedy": "1f1eb-1f1f2",
  79744. "shortnames": [":fm:"],
  79745. "category": "flags"
  79746. },
  79747. ":flag_fo:": {
  79748. "uc_base": "1f1eb-1f1f4",
  79749. "uc_output": "1f1eb-1f1f4",
  79750. "uc_match": "1f1eb-1f1f4",
  79751. "uc_greedy": "1f1eb-1f1f4",
  79752. "shortnames": [":fo:"],
  79753. "category": "flags"
  79754. },
  79755. ":flag_fr:": {
  79756. "uc_base": "1f1eb-1f1f7",
  79757. "uc_output": "1f1eb-1f1f7",
  79758. "uc_match": "1f1eb-1f1f7",
  79759. "uc_greedy": "1f1eb-1f1f7",
  79760. "shortnames": [":fr:"],
  79761. "category": "flags"
  79762. },
  79763. ":flag_ga:": {
  79764. "uc_base": "1f1ec-1f1e6",
  79765. "uc_output": "1f1ec-1f1e6",
  79766. "uc_match": "1f1ec-1f1e6",
  79767. "uc_greedy": "1f1ec-1f1e6",
  79768. "shortnames": [":ga:"],
  79769. "category": "flags"
  79770. },
  79771. ":flag_gb:": {
  79772. "uc_base": "1f1ec-1f1e7",
  79773. "uc_output": "1f1ec-1f1e7",
  79774. "uc_match": "1f1ec-1f1e7",
  79775. "uc_greedy": "1f1ec-1f1e7",
  79776. "shortnames": [":gb:"],
  79777. "category": "flags"
  79778. },
  79779. ":flag_gd:": {
  79780. "uc_base": "1f1ec-1f1e9",
  79781. "uc_output": "1f1ec-1f1e9",
  79782. "uc_match": "1f1ec-1f1e9",
  79783. "uc_greedy": "1f1ec-1f1e9",
  79784. "shortnames": [":gd:"],
  79785. "category": "flags"
  79786. },
  79787. ":flag_ge:": {
  79788. "uc_base": "1f1ec-1f1ea",
  79789. "uc_output": "1f1ec-1f1ea",
  79790. "uc_match": "1f1ec-1f1ea",
  79791. "uc_greedy": "1f1ec-1f1ea",
  79792. "shortnames": [":ge:"],
  79793. "category": "flags"
  79794. },
  79795. ":flag_gf:": {
  79796. "uc_base": "1f1ec-1f1eb",
  79797. "uc_output": "1f1ec-1f1eb",
  79798. "uc_match": "1f1ec-1f1eb",
  79799. "uc_greedy": "1f1ec-1f1eb",
  79800. "shortnames": [":gf:"],
  79801. "category": "flags"
  79802. },
  79803. ":flag_gg:": {
  79804. "uc_base": "1f1ec-1f1ec",
  79805. "uc_output": "1f1ec-1f1ec",
  79806. "uc_match": "1f1ec-1f1ec",
  79807. "uc_greedy": "1f1ec-1f1ec",
  79808. "shortnames": [":gg:"],
  79809. "category": "flags"
  79810. },
  79811. ":flag_gh:": {
  79812. "uc_base": "1f1ec-1f1ed",
  79813. "uc_output": "1f1ec-1f1ed",
  79814. "uc_match": "1f1ec-1f1ed",
  79815. "uc_greedy": "1f1ec-1f1ed",
  79816. "shortnames": [":gh:"],
  79817. "category": "flags"
  79818. },
  79819. ":flag_gi:": {
  79820. "uc_base": "1f1ec-1f1ee",
  79821. "uc_output": "1f1ec-1f1ee",
  79822. "uc_match": "1f1ec-1f1ee",
  79823. "uc_greedy": "1f1ec-1f1ee",
  79824. "shortnames": [":gi:"],
  79825. "category": "flags"
  79826. },
  79827. ":flag_gl:": {
  79828. "uc_base": "1f1ec-1f1f1",
  79829. "uc_output": "1f1ec-1f1f1",
  79830. "uc_match": "1f1ec-1f1f1",
  79831. "uc_greedy": "1f1ec-1f1f1",
  79832. "shortnames": [":gl:"],
  79833. "category": "flags"
  79834. },
  79835. ":flag_gm:": {
  79836. "uc_base": "1f1ec-1f1f2",
  79837. "uc_output": "1f1ec-1f1f2",
  79838. "uc_match": "1f1ec-1f1f2",
  79839. "uc_greedy": "1f1ec-1f1f2",
  79840. "shortnames": [":gm:"],
  79841. "category": "flags"
  79842. },
  79843. ":flag_gn:": {
  79844. "uc_base": "1f1ec-1f1f3",
  79845. "uc_output": "1f1ec-1f1f3",
  79846. "uc_match": "1f1ec-1f1f3",
  79847. "uc_greedy": "1f1ec-1f1f3",
  79848. "shortnames": [":gn:"],
  79849. "category": "flags"
  79850. },
  79851. ":flag_gp:": {
  79852. "uc_base": "1f1ec-1f1f5",
  79853. "uc_output": "1f1ec-1f1f5",
  79854. "uc_match": "1f1ec-1f1f5",
  79855. "uc_greedy": "1f1ec-1f1f5",
  79856. "shortnames": [":gp:"],
  79857. "category": "flags"
  79858. },
  79859. ":flag_gq:": {
  79860. "uc_base": "1f1ec-1f1f6",
  79861. "uc_output": "1f1ec-1f1f6",
  79862. "uc_match": "1f1ec-1f1f6",
  79863. "uc_greedy": "1f1ec-1f1f6",
  79864. "shortnames": [":gq:"],
  79865. "category": "flags"
  79866. },
  79867. ":flag_gr:": {
  79868. "uc_base": "1f1ec-1f1f7",
  79869. "uc_output": "1f1ec-1f1f7",
  79870. "uc_match": "1f1ec-1f1f7",
  79871. "uc_greedy": "1f1ec-1f1f7",
  79872. "shortnames": [":gr:"],
  79873. "category": "flags"
  79874. },
  79875. ":flag_gs:": {
  79876. "uc_base": "1f1ec-1f1f8",
  79877. "uc_output": "1f1ec-1f1f8",
  79878. "uc_match": "1f1ec-1f1f8",
  79879. "uc_greedy": "1f1ec-1f1f8",
  79880. "shortnames": [":gs:"],
  79881. "category": "flags"
  79882. },
  79883. ":flag_gt:": {
  79884. "uc_base": "1f1ec-1f1f9",
  79885. "uc_output": "1f1ec-1f1f9",
  79886. "uc_match": "1f1ec-1f1f9",
  79887. "uc_greedy": "1f1ec-1f1f9",
  79888. "shortnames": [":gt:"],
  79889. "category": "flags"
  79890. },
  79891. ":flag_gu:": {
  79892. "uc_base": "1f1ec-1f1fa",
  79893. "uc_output": "1f1ec-1f1fa",
  79894. "uc_match": "1f1ec-1f1fa",
  79895. "uc_greedy": "1f1ec-1f1fa",
  79896. "shortnames": [":gu:"],
  79897. "category": "flags"
  79898. },
  79899. ":flag_gw:": {
  79900. "uc_base": "1f1ec-1f1fc",
  79901. "uc_output": "1f1ec-1f1fc",
  79902. "uc_match": "1f1ec-1f1fc",
  79903. "uc_greedy": "1f1ec-1f1fc",
  79904. "shortnames": [":gw:"],
  79905. "category": "flags"
  79906. },
  79907. ":flag_gy:": {
  79908. "uc_base": "1f1ec-1f1fe",
  79909. "uc_output": "1f1ec-1f1fe",
  79910. "uc_match": "1f1ec-1f1fe",
  79911. "uc_greedy": "1f1ec-1f1fe",
  79912. "shortnames": [":gy:"],
  79913. "category": "flags"
  79914. },
  79915. ":flag_hk:": {
  79916. "uc_base": "1f1ed-1f1f0",
  79917. "uc_output": "1f1ed-1f1f0",
  79918. "uc_match": "1f1ed-1f1f0",
  79919. "uc_greedy": "1f1ed-1f1f0",
  79920. "shortnames": [":hk:"],
  79921. "category": "flags"
  79922. },
  79923. ":flag_hm:": {
  79924. "uc_base": "1f1ed-1f1f2",
  79925. "uc_output": "1f1ed-1f1f2",
  79926. "uc_match": "1f1ed-1f1f2",
  79927. "uc_greedy": "1f1ed-1f1f2",
  79928. "shortnames": [":hm:"],
  79929. "category": "flags"
  79930. },
  79931. ":flag_hn:": {
  79932. "uc_base": "1f1ed-1f1f3",
  79933. "uc_output": "1f1ed-1f1f3",
  79934. "uc_match": "1f1ed-1f1f3",
  79935. "uc_greedy": "1f1ed-1f1f3",
  79936. "shortnames": [":hn:"],
  79937. "category": "flags"
  79938. },
  79939. ":flag_hr:": {
  79940. "uc_base": "1f1ed-1f1f7",
  79941. "uc_output": "1f1ed-1f1f7",
  79942. "uc_match": "1f1ed-1f1f7",
  79943. "uc_greedy": "1f1ed-1f1f7",
  79944. "shortnames": [":hr:"],
  79945. "category": "flags"
  79946. },
  79947. ":flag_ht:": {
  79948. "uc_base": "1f1ed-1f1f9",
  79949. "uc_output": "1f1ed-1f1f9",
  79950. "uc_match": "1f1ed-1f1f9",
  79951. "uc_greedy": "1f1ed-1f1f9",
  79952. "shortnames": [":ht:"],
  79953. "category": "flags"
  79954. },
  79955. ":flag_hu:": {
  79956. "uc_base": "1f1ed-1f1fa",
  79957. "uc_output": "1f1ed-1f1fa",
  79958. "uc_match": "1f1ed-1f1fa",
  79959. "uc_greedy": "1f1ed-1f1fa",
  79960. "shortnames": [":hu:"],
  79961. "category": "flags"
  79962. },
  79963. ":flag_ic:": {
  79964. "uc_base": "1f1ee-1f1e8",
  79965. "uc_output": "1f1ee-1f1e8",
  79966. "uc_match": "1f1ee-1f1e8",
  79967. "uc_greedy": "1f1ee-1f1e8",
  79968. "shortnames": [":ic:"],
  79969. "category": "flags"
  79970. },
  79971. ":flag_id:": {
  79972. "uc_base": "1f1ee-1f1e9",
  79973. "uc_output": "1f1ee-1f1e9",
  79974. "uc_match": "1f1ee-1f1e9",
  79975. "uc_greedy": "1f1ee-1f1e9",
  79976. "shortnames": [":indonesia:"],
  79977. "category": "flags"
  79978. },
  79979. ":flag_ie:": {
  79980. "uc_base": "1f1ee-1f1ea",
  79981. "uc_output": "1f1ee-1f1ea",
  79982. "uc_match": "1f1ee-1f1ea",
  79983. "uc_greedy": "1f1ee-1f1ea",
  79984. "shortnames": [":ie:"],
  79985. "category": "flags"
  79986. },
  79987. ":flag_il:": {
  79988. "uc_base": "1f1ee-1f1f1",
  79989. "uc_output": "1f1ee-1f1f1",
  79990. "uc_match": "1f1ee-1f1f1",
  79991. "uc_greedy": "1f1ee-1f1f1",
  79992. "shortnames": [":il:"],
  79993. "category": "flags"
  79994. },
  79995. ":flag_im:": {
  79996. "uc_base": "1f1ee-1f1f2",
  79997. "uc_output": "1f1ee-1f1f2",
  79998. "uc_match": "1f1ee-1f1f2",
  79999. "uc_greedy": "1f1ee-1f1f2",
  80000. "shortnames": [":im:"],
  80001. "category": "flags"
  80002. },
  80003. ":flag_in:": {
  80004. "uc_base": "1f1ee-1f1f3",
  80005. "uc_output": "1f1ee-1f1f3",
  80006. "uc_match": "1f1ee-1f1f3",
  80007. "uc_greedy": "1f1ee-1f1f3",
  80008. "shortnames": [":in:"],
  80009. "category": "flags"
  80010. },
  80011. ":flag_io:": {
  80012. "uc_base": "1f1ee-1f1f4",
  80013. "uc_output": "1f1ee-1f1f4",
  80014. "uc_match": "1f1ee-1f1f4",
  80015. "uc_greedy": "1f1ee-1f1f4",
  80016. "shortnames": [":io:"],
  80017. "category": "flags"
  80018. },
  80019. ":flag_iq:": {
  80020. "uc_base": "1f1ee-1f1f6",
  80021. "uc_output": "1f1ee-1f1f6",
  80022. "uc_match": "1f1ee-1f1f6",
  80023. "uc_greedy": "1f1ee-1f1f6",
  80024. "shortnames": [":iq:"],
  80025. "category": "flags"
  80026. },
  80027. ":flag_ir:": {
  80028. "uc_base": "1f1ee-1f1f7",
  80029. "uc_output": "1f1ee-1f1f7",
  80030. "uc_match": "1f1ee-1f1f7",
  80031. "uc_greedy": "1f1ee-1f1f7",
  80032. "shortnames": [":ir:"],
  80033. "category": "flags"
  80034. },
  80035. ":flag_is:": {
  80036. "uc_base": "1f1ee-1f1f8",
  80037. "uc_output": "1f1ee-1f1f8",
  80038. "uc_match": "1f1ee-1f1f8",
  80039. "uc_greedy": "1f1ee-1f1f8",
  80040. "shortnames": [":is:"],
  80041. "category": "flags"
  80042. },
  80043. ":flag_it:": {
  80044. "uc_base": "1f1ee-1f1f9",
  80045. "uc_output": "1f1ee-1f1f9",
  80046. "uc_match": "1f1ee-1f1f9",
  80047. "uc_greedy": "1f1ee-1f1f9",
  80048. "shortnames": [":it:"],
  80049. "category": "flags"
  80050. },
  80051. ":flag_je:": {
  80052. "uc_base": "1f1ef-1f1ea",
  80053. "uc_output": "1f1ef-1f1ea",
  80054. "uc_match": "1f1ef-1f1ea",
  80055. "uc_greedy": "1f1ef-1f1ea",
  80056. "shortnames": [":je:"],
  80057. "category": "flags"
  80058. },
  80059. ":flag_jm:": {
  80060. "uc_base": "1f1ef-1f1f2",
  80061. "uc_output": "1f1ef-1f1f2",
  80062. "uc_match": "1f1ef-1f1f2",
  80063. "uc_greedy": "1f1ef-1f1f2",
  80064. "shortnames": [":jm:"],
  80065. "category": "flags"
  80066. },
  80067. ":flag_jo:": {
  80068. "uc_base": "1f1ef-1f1f4",
  80069. "uc_output": "1f1ef-1f1f4",
  80070. "uc_match": "1f1ef-1f1f4",
  80071. "uc_greedy": "1f1ef-1f1f4",
  80072. "shortnames": [":jo:"],
  80073. "category": "flags"
  80074. },
  80075. ":flag_jp:": {
  80076. "uc_base": "1f1ef-1f1f5",
  80077. "uc_output": "1f1ef-1f1f5",
  80078. "uc_match": "1f1ef-1f1f5",
  80079. "uc_greedy": "1f1ef-1f1f5",
  80080. "shortnames": [":jp:"],
  80081. "category": "flags"
  80082. },
  80083. ":flag_ke:": {
  80084. "uc_base": "1f1f0-1f1ea",
  80085. "uc_output": "1f1f0-1f1ea",
  80086. "uc_match": "1f1f0-1f1ea",
  80087. "uc_greedy": "1f1f0-1f1ea",
  80088. "shortnames": [":ke:"],
  80089. "category": "flags"
  80090. },
  80091. ":flag_kg:": {
  80092. "uc_base": "1f1f0-1f1ec",
  80093. "uc_output": "1f1f0-1f1ec",
  80094. "uc_match": "1f1f0-1f1ec",
  80095. "uc_greedy": "1f1f0-1f1ec",
  80096. "shortnames": [":kg:"],
  80097. "category": "flags"
  80098. },
  80099. ":flag_kh:": {
  80100. "uc_base": "1f1f0-1f1ed",
  80101. "uc_output": "1f1f0-1f1ed",
  80102. "uc_match": "1f1f0-1f1ed",
  80103. "uc_greedy": "1f1f0-1f1ed",
  80104. "shortnames": [":kh:"],
  80105. "category": "flags"
  80106. },
  80107. ":flag_ki:": {
  80108. "uc_base": "1f1f0-1f1ee",
  80109. "uc_output": "1f1f0-1f1ee",
  80110. "uc_match": "1f1f0-1f1ee",
  80111. "uc_greedy": "1f1f0-1f1ee",
  80112. "shortnames": [":ki:"],
  80113. "category": "flags"
  80114. },
  80115. ":flag_km:": {
  80116. "uc_base": "1f1f0-1f1f2",
  80117. "uc_output": "1f1f0-1f1f2",
  80118. "uc_match": "1f1f0-1f1f2",
  80119. "uc_greedy": "1f1f0-1f1f2",
  80120. "shortnames": [":km:"],
  80121. "category": "flags"
  80122. },
  80123. ":flag_kn:": {
  80124. "uc_base": "1f1f0-1f1f3",
  80125. "uc_output": "1f1f0-1f1f3",
  80126. "uc_match": "1f1f0-1f1f3",
  80127. "uc_greedy": "1f1f0-1f1f3",
  80128. "shortnames": [":kn:"],
  80129. "category": "flags"
  80130. },
  80131. ":flag_kp:": {
  80132. "uc_base": "1f1f0-1f1f5",
  80133. "uc_output": "1f1f0-1f1f5",
  80134. "uc_match": "1f1f0-1f1f5",
  80135. "uc_greedy": "1f1f0-1f1f5",
  80136. "shortnames": [":kp:"],
  80137. "category": "flags"
  80138. },
  80139. ":flag_kr:": {
  80140. "uc_base": "1f1f0-1f1f7",
  80141. "uc_output": "1f1f0-1f1f7",
  80142. "uc_match": "1f1f0-1f1f7",
  80143. "uc_greedy": "1f1f0-1f1f7",
  80144. "shortnames": [":kr:"],
  80145. "category": "flags"
  80146. },
  80147. ":flag_kw:": {
  80148. "uc_base": "1f1f0-1f1fc",
  80149. "uc_output": "1f1f0-1f1fc",
  80150. "uc_match": "1f1f0-1f1fc",
  80151. "uc_greedy": "1f1f0-1f1fc",
  80152. "shortnames": [":kw:"],
  80153. "category": "flags"
  80154. },
  80155. ":flag_ky:": {
  80156. "uc_base": "1f1f0-1f1fe",
  80157. "uc_output": "1f1f0-1f1fe",
  80158. "uc_match": "1f1f0-1f1fe",
  80159. "uc_greedy": "1f1f0-1f1fe",
  80160. "shortnames": [":ky:"],
  80161. "category": "flags"
  80162. },
  80163. ":flag_kz:": {
  80164. "uc_base": "1f1f0-1f1ff",
  80165. "uc_output": "1f1f0-1f1ff",
  80166. "uc_match": "1f1f0-1f1ff",
  80167. "uc_greedy": "1f1f0-1f1ff",
  80168. "shortnames": [":kz:"],
  80169. "category": "flags"
  80170. },
  80171. ":flag_la:": {
  80172. "uc_base": "1f1f1-1f1e6",
  80173. "uc_output": "1f1f1-1f1e6",
  80174. "uc_match": "1f1f1-1f1e6",
  80175. "uc_greedy": "1f1f1-1f1e6",
  80176. "shortnames": [":la:"],
  80177. "category": "flags"
  80178. },
  80179. ":flag_lb:": {
  80180. "uc_base": "1f1f1-1f1e7",
  80181. "uc_output": "1f1f1-1f1e7",
  80182. "uc_match": "1f1f1-1f1e7",
  80183. "uc_greedy": "1f1f1-1f1e7",
  80184. "shortnames": [":lb:"],
  80185. "category": "flags"
  80186. },
  80187. ":flag_lc:": {
  80188. "uc_base": "1f1f1-1f1e8",
  80189. "uc_output": "1f1f1-1f1e8",
  80190. "uc_match": "1f1f1-1f1e8",
  80191. "uc_greedy": "1f1f1-1f1e8",
  80192. "shortnames": [":lc:"],
  80193. "category": "flags"
  80194. },
  80195. ":flag_li:": {
  80196. "uc_base": "1f1f1-1f1ee",
  80197. "uc_output": "1f1f1-1f1ee",
  80198. "uc_match": "1f1f1-1f1ee",
  80199. "uc_greedy": "1f1f1-1f1ee",
  80200. "shortnames": [":li:"],
  80201. "category": "flags"
  80202. },
  80203. ":flag_lk:": {
  80204. "uc_base": "1f1f1-1f1f0",
  80205. "uc_output": "1f1f1-1f1f0",
  80206. "uc_match": "1f1f1-1f1f0",
  80207. "uc_greedy": "1f1f1-1f1f0",
  80208. "shortnames": [":lk:"],
  80209. "category": "flags"
  80210. },
  80211. ":flag_lr:": {
  80212. "uc_base": "1f1f1-1f1f7",
  80213. "uc_output": "1f1f1-1f1f7",
  80214. "uc_match": "1f1f1-1f1f7",
  80215. "uc_greedy": "1f1f1-1f1f7",
  80216. "shortnames": [":lr:"],
  80217. "category": "flags"
  80218. },
  80219. ":flag_ls:": {
  80220. "uc_base": "1f1f1-1f1f8",
  80221. "uc_output": "1f1f1-1f1f8",
  80222. "uc_match": "1f1f1-1f1f8",
  80223. "uc_greedy": "1f1f1-1f1f8",
  80224. "shortnames": [":ls:"],
  80225. "category": "flags"
  80226. },
  80227. ":flag_lt:": {
  80228. "uc_base": "1f1f1-1f1f9",
  80229. "uc_output": "1f1f1-1f1f9",
  80230. "uc_match": "1f1f1-1f1f9",
  80231. "uc_greedy": "1f1f1-1f1f9",
  80232. "shortnames": [":lt:"],
  80233. "category": "flags"
  80234. },
  80235. ":flag_lu:": {
  80236. "uc_base": "1f1f1-1f1fa",
  80237. "uc_output": "1f1f1-1f1fa",
  80238. "uc_match": "1f1f1-1f1fa",
  80239. "uc_greedy": "1f1f1-1f1fa",
  80240. "shortnames": [":lu:"],
  80241. "category": "flags"
  80242. },
  80243. ":flag_lv:": {
  80244. "uc_base": "1f1f1-1f1fb",
  80245. "uc_output": "1f1f1-1f1fb",
  80246. "uc_match": "1f1f1-1f1fb",
  80247. "uc_greedy": "1f1f1-1f1fb",
  80248. "shortnames": [":lv:"],
  80249. "category": "flags"
  80250. },
  80251. ":flag_ly:": {
  80252. "uc_base": "1f1f1-1f1fe",
  80253. "uc_output": "1f1f1-1f1fe",
  80254. "uc_match": "1f1f1-1f1fe",
  80255. "uc_greedy": "1f1f1-1f1fe",
  80256. "shortnames": [":ly:"],
  80257. "category": "flags"
  80258. },
  80259. ":flag_ma:": {
  80260. "uc_base": "1f1f2-1f1e6",
  80261. "uc_output": "1f1f2-1f1e6",
  80262. "uc_match": "1f1f2-1f1e6",
  80263. "uc_greedy": "1f1f2-1f1e6",
  80264. "shortnames": [":ma:"],
  80265. "category": "flags"
  80266. },
  80267. ":flag_mc:": {
  80268. "uc_base": "1f1f2-1f1e8",
  80269. "uc_output": "1f1f2-1f1e8",
  80270. "uc_match": "1f1f2-1f1e8",
  80271. "uc_greedy": "1f1f2-1f1e8",
  80272. "shortnames": [":mc:"],
  80273. "category": "flags"
  80274. },
  80275. ":flag_md:": {
  80276. "uc_base": "1f1f2-1f1e9",
  80277. "uc_output": "1f1f2-1f1e9",
  80278. "uc_match": "1f1f2-1f1e9",
  80279. "uc_greedy": "1f1f2-1f1e9",
  80280. "shortnames": [":md:"],
  80281. "category": "flags"
  80282. },
  80283. ":flag_me:": {
  80284. "uc_base": "1f1f2-1f1ea",
  80285. "uc_output": "1f1f2-1f1ea",
  80286. "uc_match": "1f1f2-1f1ea",
  80287. "uc_greedy": "1f1f2-1f1ea",
  80288. "shortnames": [":me:"],
  80289. "category": "flags"
  80290. },
  80291. ":flag_mf:": {
  80292. "uc_base": "1f1f2-1f1eb",
  80293. "uc_output": "1f1f2-1f1eb",
  80294. "uc_match": "1f1f2-1f1eb",
  80295. "uc_greedy": "1f1f2-1f1eb",
  80296. "shortnames": [":mf:"],
  80297. "category": "flags"
  80298. },
  80299. ":flag_mg:": {
  80300. "uc_base": "1f1f2-1f1ec",
  80301. "uc_output": "1f1f2-1f1ec",
  80302. "uc_match": "1f1f2-1f1ec",
  80303. "uc_greedy": "1f1f2-1f1ec",
  80304. "shortnames": [":mg:"],
  80305. "category": "flags"
  80306. },
  80307. ":flag_mh:": {
  80308. "uc_base": "1f1f2-1f1ed",
  80309. "uc_output": "1f1f2-1f1ed",
  80310. "uc_match": "1f1f2-1f1ed",
  80311. "uc_greedy": "1f1f2-1f1ed",
  80312. "shortnames": [":mh:"],
  80313. "category": "flags"
  80314. },
  80315. ":flag_mk:": {
  80316. "uc_base": "1f1f2-1f1f0",
  80317. "uc_output": "1f1f2-1f1f0",
  80318. "uc_match": "1f1f2-1f1f0",
  80319. "uc_greedy": "1f1f2-1f1f0",
  80320. "shortnames": [":mk:"],
  80321. "category": "flags"
  80322. },
  80323. ":flag_ml:": {
  80324. "uc_base": "1f1f2-1f1f1",
  80325. "uc_output": "1f1f2-1f1f1",
  80326. "uc_match": "1f1f2-1f1f1",
  80327. "uc_greedy": "1f1f2-1f1f1",
  80328. "shortnames": [":ml:"],
  80329. "category": "flags"
  80330. },
  80331. ":flag_mm:": {
  80332. "uc_base": "1f1f2-1f1f2",
  80333. "uc_output": "1f1f2-1f1f2",
  80334. "uc_match": "1f1f2-1f1f2",
  80335. "uc_greedy": "1f1f2-1f1f2",
  80336. "shortnames": [":mm:"],
  80337. "category": "flags"
  80338. },
  80339. ":flag_mn:": {
  80340. "uc_base": "1f1f2-1f1f3",
  80341. "uc_output": "1f1f2-1f1f3",
  80342. "uc_match": "1f1f2-1f1f3",
  80343. "uc_greedy": "1f1f2-1f1f3",
  80344. "shortnames": [":mn:"],
  80345. "category": "flags"
  80346. },
  80347. ":flag_mo:": {
  80348. "uc_base": "1f1f2-1f1f4",
  80349. "uc_output": "1f1f2-1f1f4",
  80350. "uc_match": "1f1f2-1f1f4",
  80351. "uc_greedy": "1f1f2-1f1f4",
  80352. "shortnames": [":mo:"],
  80353. "category": "flags"
  80354. },
  80355. ":flag_mp:": {
  80356. "uc_base": "1f1f2-1f1f5",
  80357. "uc_output": "1f1f2-1f1f5",
  80358. "uc_match": "1f1f2-1f1f5",
  80359. "uc_greedy": "1f1f2-1f1f5",
  80360. "shortnames": [":mp:"],
  80361. "category": "flags"
  80362. },
  80363. ":flag_mq:": {
  80364. "uc_base": "1f1f2-1f1f6",
  80365. "uc_output": "1f1f2-1f1f6",
  80366. "uc_match": "1f1f2-1f1f6",
  80367. "uc_greedy": "1f1f2-1f1f6",
  80368. "shortnames": [":mq:"],
  80369. "category": "flags"
  80370. },
  80371. ":flag_mr:": {
  80372. "uc_base": "1f1f2-1f1f7",
  80373. "uc_output": "1f1f2-1f1f7",
  80374. "uc_match": "1f1f2-1f1f7",
  80375. "uc_greedy": "1f1f2-1f1f7",
  80376. "shortnames": [":mr:"],
  80377. "category": "flags"
  80378. },
  80379. ":flag_ms:": {
  80380. "uc_base": "1f1f2-1f1f8",
  80381. "uc_output": "1f1f2-1f1f8",
  80382. "uc_match": "1f1f2-1f1f8",
  80383. "uc_greedy": "1f1f2-1f1f8",
  80384. "shortnames": [":ms:"],
  80385. "category": "flags"
  80386. },
  80387. ":flag_mt:": {
  80388. "uc_base": "1f1f2-1f1f9",
  80389. "uc_output": "1f1f2-1f1f9",
  80390. "uc_match": "1f1f2-1f1f9",
  80391. "uc_greedy": "1f1f2-1f1f9",
  80392. "shortnames": [":mt:"],
  80393. "category": "flags"
  80394. },
  80395. ":flag_mu:": {
  80396. "uc_base": "1f1f2-1f1fa",
  80397. "uc_output": "1f1f2-1f1fa",
  80398. "uc_match": "1f1f2-1f1fa",
  80399. "uc_greedy": "1f1f2-1f1fa",
  80400. "shortnames": [":mu:"],
  80401. "category": "flags"
  80402. },
  80403. ":flag_mv:": {
  80404. "uc_base": "1f1f2-1f1fb",
  80405. "uc_output": "1f1f2-1f1fb",
  80406. "uc_match": "1f1f2-1f1fb",
  80407. "uc_greedy": "1f1f2-1f1fb",
  80408. "shortnames": [":mv:"],
  80409. "category": "flags"
  80410. },
  80411. ":flag_mw:": {
  80412. "uc_base": "1f1f2-1f1fc",
  80413. "uc_output": "1f1f2-1f1fc",
  80414. "uc_match": "1f1f2-1f1fc",
  80415. "uc_greedy": "1f1f2-1f1fc",
  80416. "shortnames": [":mw:"],
  80417. "category": "flags"
  80418. },
  80419. ":flag_mx:": {
  80420. "uc_base": "1f1f2-1f1fd",
  80421. "uc_output": "1f1f2-1f1fd",
  80422. "uc_match": "1f1f2-1f1fd",
  80423. "uc_greedy": "1f1f2-1f1fd",
  80424. "shortnames": [":mx:"],
  80425. "category": "flags"
  80426. },
  80427. ":flag_my:": {
  80428. "uc_base": "1f1f2-1f1fe",
  80429. "uc_output": "1f1f2-1f1fe",
  80430. "uc_match": "1f1f2-1f1fe",
  80431. "uc_greedy": "1f1f2-1f1fe",
  80432. "shortnames": [":my:"],
  80433. "category": "flags"
  80434. },
  80435. ":flag_mz:": {
  80436. "uc_base": "1f1f2-1f1ff",
  80437. "uc_output": "1f1f2-1f1ff",
  80438. "uc_match": "1f1f2-1f1ff",
  80439. "uc_greedy": "1f1f2-1f1ff",
  80440. "shortnames": [":mz:"],
  80441. "category": "flags"
  80442. },
  80443. ":flag_na:": {
  80444. "uc_base": "1f1f3-1f1e6",
  80445. "uc_output": "1f1f3-1f1e6",
  80446. "uc_match": "1f1f3-1f1e6",
  80447. "uc_greedy": "1f1f3-1f1e6",
  80448. "shortnames": [":na:"],
  80449. "category": "flags"
  80450. },
  80451. ":flag_nc:": {
  80452. "uc_base": "1f1f3-1f1e8",
  80453. "uc_output": "1f1f3-1f1e8",
  80454. "uc_match": "1f1f3-1f1e8",
  80455. "uc_greedy": "1f1f3-1f1e8",
  80456. "shortnames": [":nc:"],
  80457. "category": "flags"
  80458. },
  80459. ":flag_ne:": {
  80460. "uc_base": "1f1f3-1f1ea",
  80461. "uc_output": "1f1f3-1f1ea",
  80462. "uc_match": "1f1f3-1f1ea",
  80463. "uc_greedy": "1f1f3-1f1ea",
  80464. "shortnames": [":ne:"],
  80465. "category": "flags"
  80466. },
  80467. ":flag_nf:": {
  80468. "uc_base": "1f1f3-1f1eb",
  80469. "uc_output": "1f1f3-1f1eb",
  80470. "uc_match": "1f1f3-1f1eb",
  80471. "uc_greedy": "1f1f3-1f1eb",
  80472. "shortnames": [":nf:"],
  80473. "category": "flags"
  80474. },
  80475. ":flag_ng:": {
  80476. "uc_base": "1f1f3-1f1ec",
  80477. "uc_output": "1f1f3-1f1ec",
  80478. "uc_match": "1f1f3-1f1ec",
  80479. "uc_greedy": "1f1f3-1f1ec",
  80480. "shortnames": [":nigeria:"],
  80481. "category": "flags"
  80482. },
  80483. ":flag_ni:": {
  80484. "uc_base": "1f1f3-1f1ee",
  80485. "uc_output": "1f1f3-1f1ee",
  80486. "uc_match": "1f1f3-1f1ee",
  80487. "uc_greedy": "1f1f3-1f1ee",
  80488. "shortnames": [":ni:"],
  80489. "category": "flags"
  80490. },
  80491. ":flag_nl:": {
  80492. "uc_base": "1f1f3-1f1f1",
  80493. "uc_output": "1f1f3-1f1f1",
  80494. "uc_match": "1f1f3-1f1f1",
  80495. "uc_greedy": "1f1f3-1f1f1",
  80496. "shortnames": [":nl:"],
  80497. "category": "flags"
  80498. },
  80499. ":flag_no:": {
  80500. "uc_base": "1f1f3-1f1f4",
  80501. "uc_output": "1f1f3-1f1f4",
  80502. "uc_match": "1f1f3-1f1f4",
  80503. "uc_greedy": "1f1f3-1f1f4",
  80504. "shortnames": [":no:"],
  80505. "category": "flags"
  80506. },
  80507. ":flag_np:": {
  80508. "uc_base": "1f1f3-1f1f5",
  80509. "uc_output": "1f1f3-1f1f5",
  80510. "uc_match": "1f1f3-1f1f5",
  80511. "uc_greedy": "1f1f3-1f1f5",
  80512. "shortnames": [":np:"],
  80513. "category": "flags"
  80514. },
  80515. ":flag_nr:": {
  80516. "uc_base": "1f1f3-1f1f7",
  80517. "uc_output": "1f1f3-1f1f7",
  80518. "uc_match": "1f1f3-1f1f7",
  80519. "uc_greedy": "1f1f3-1f1f7",
  80520. "shortnames": [":nr:"],
  80521. "category": "flags"
  80522. },
  80523. ":flag_nu:": {
  80524. "uc_base": "1f1f3-1f1fa",
  80525. "uc_output": "1f1f3-1f1fa",
  80526. "uc_match": "1f1f3-1f1fa",
  80527. "uc_greedy": "1f1f3-1f1fa",
  80528. "shortnames": [":nu:"],
  80529. "category": "flags"
  80530. },
  80531. ":flag_nz:": {
  80532. "uc_base": "1f1f3-1f1ff",
  80533. "uc_output": "1f1f3-1f1ff",
  80534. "uc_match": "1f1f3-1f1ff",
  80535. "uc_greedy": "1f1f3-1f1ff",
  80536. "shortnames": [":nz:"],
  80537. "category": "flags"
  80538. },
  80539. ":flag_om:": {
  80540. "uc_base": "1f1f4-1f1f2",
  80541. "uc_output": "1f1f4-1f1f2",
  80542. "uc_match": "1f1f4-1f1f2",
  80543. "uc_greedy": "1f1f4-1f1f2",
  80544. "shortnames": [":om:"],
  80545. "category": "flags"
  80546. },
  80547. ":flag_pa:": {
  80548. "uc_base": "1f1f5-1f1e6",
  80549. "uc_output": "1f1f5-1f1e6",
  80550. "uc_match": "1f1f5-1f1e6",
  80551. "uc_greedy": "1f1f5-1f1e6",
  80552. "shortnames": [":pa:"],
  80553. "category": "flags"
  80554. },
  80555. ":flag_pe:": {
  80556. "uc_base": "1f1f5-1f1ea",
  80557. "uc_output": "1f1f5-1f1ea",
  80558. "uc_match": "1f1f5-1f1ea",
  80559. "uc_greedy": "1f1f5-1f1ea",
  80560. "shortnames": [":pe:"],
  80561. "category": "flags"
  80562. },
  80563. ":flag_pf:": {
  80564. "uc_base": "1f1f5-1f1eb",
  80565. "uc_output": "1f1f5-1f1eb",
  80566. "uc_match": "1f1f5-1f1eb",
  80567. "uc_greedy": "1f1f5-1f1eb",
  80568. "shortnames": [":pf:"],
  80569. "category": "flags"
  80570. },
  80571. ":flag_pg:": {
  80572. "uc_base": "1f1f5-1f1ec",
  80573. "uc_output": "1f1f5-1f1ec",
  80574. "uc_match": "1f1f5-1f1ec",
  80575. "uc_greedy": "1f1f5-1f1ec",
  80576. "shortnames": [":pg:"],
  80577. "category": "flags"
  80578. },
  80579. ":flag_ph:": {
  80580. "uc_base": "1f1f5-1f1ed",
  80581. "uc_output": "1f1f5-1f1ed",
  80582. "uc_match": "1f1f5-1f1ed",
  80583. "uc_greedy": "1f1f5-1f1ed",
  80584. "shortnames": [":ph:"],
  80585. "category": "flags"
  80586. },
  80587. ":flag_pk:": {
  80588. "uc_base": "1f1f5-1f1f0",
  80589. "uc_output": "1f1f5-1f1f0",
  80590. "uc_match": "1f1f5-1f1f0",
  80591. "uc_greedy": "1f1f5-1f1f0",
  80592. "shortnames": [":pk:"],
  80593. "category": "flags"
  80594. },
  80595. ":flag_pl:": {
  80596. "uc_base": "1f1f5-1f1f1",
  80597. "uc_output": "1f1f5-1f1f1",
  80598. "uc_match": "1f1f5-1f1f1",
  80599. "uc_greedy": "1f1f5-1f1f1",
  80600. "shortnames": [":pl:"],
  80601. "category": "flags"
  80602. },
  80603. ":flag_pm:": {
  80604. "uc_base": "1f1f5-1f1f2",
  80605. "uc_output": "1f1f5-1f1f2",
  80606. "uc_match": "1f1f5-1f1f2",
  80607. "uc_greedy": "1f1f5-1f1f2",
  80608. "shortnames": [":pm:"],
  80609. "category": "flags"
  80610. },
  80611. ":flag_pn:": {
  80612. "uc_base": "1f1f5-1f1f3",
  80613. "uc_output": "1f1f5-1f1f3",
  80614. "uc_match": "1f1f5-1f1f3",
  80615. "uc_greedy": "1f1f5-1f1f3",
  80616. "shortnames": [":pn:"],
  80617. "category": "flags"
  80618. },
  80619. ":flag_pr:": {
  80620. "uc_base": "1f1f5-1f1f7",
  80621. "uc_output": "1f1f5-1f1f7",
  80622. "uc_match": "1f1f5-1f1f7",
  80623. "uc_greedy": "1f1f5-1f1f7",
  80624. "shortnames": [":pr:"],
  80625. "category": "flags"
  80626. },
  80627. ":flag_ps:": {
  80628. "uc_base": "1f1f5-1f1f8",
  80629. "uc_output": "1f1f5-1f1f8",
  80630. "uc_match": "1f1f5-1f1f8",
  80631. "uc_greedy": "1f1f5-1f1f8",
  80632. "shortnames": [":ps:"],
  80633. "category": "flags"
  80634. },
  80635. ":flag_pt:": {
  80636. "uc_base": "1f1f5-1f1f9",
  80637. "uc_output": "1f1f5-1f1f9",
  80638. "uc_match": "1f1f5-1f1f9",
  80639. "uc_greedy": "1f1f5-1f1f9",
  80640. "shortnames": [":pt:"],
  80641. "category": "flags"
  80642. },
  80643. ":flag_pw:": {
  80644. "uc_base": "1f1f5-1f1fc",
  80645. "uc_output": "1f1f5-1f1fc",
  80646. "uc_match": "1f1f5-1f1fc",
  80647. "uc_greedy": "1f1f5-1f1fc",
  80648. "shortnames": [":pw:"],
  80649. "category": "flags"
  80650. },
  80651. ":flag_py:": {
  80652. "uc_base": "1f1f5-1f1fe",
  80653. "uc_output": "1f1f5-1f1fe",
  80654. "uc_match": "1f1f5-1f1fe",
  80655. "uc_greedy": "1f1f5-1f1fe",
  80656. "shortnames": [":py:"],
  80657. "category": "flags"
  80658. },
  80659. ":flag_qa:": {
  80660. "uc_base": "1f1f6-1f1e6",
  80661. "uc_output": "1f1f6-1f1e6",
  80662. "uc_match": "1f1f6-1f1e6",
  80663. "uc_greedy": "1f1f6-1f1e6",
  80664. "shortnames": [":qa:"],
  80665. "category": "flags"
  80666. },
  80667. ":flag_re:": {
  80668. "uc_base": "1f1f7-1f1ea",
  80669. "uc_output": "1f1f7-1f1ea",
  80670. "uc_match": "1f1f7-1f1ea",
  80671. "uc_greedy": "1f1f7-1f1ea",
  80672. "shortnames": [":re:"],
  80673. "category": "flags"
  80674. },
  80675. ":flag_ro:": {
  80676. "uc_base": "1f1f7-1f1f4",
  80677. "uc_output": "1f1f7-1f1f4",
  80678. "uc_match": "1f1f7-1f1f4",
  80679. "uc_greedy": "1f1f7-1f1f4",
  80680. "shortnames": [":ro:"],
  80681. "category": "flags"
  80682. },
  80683. ":flag_rs:": {
  80684. "uc_base": "1f1f7-1f1f8",
  80685. "uc_output": "1f1f7-1f1f8",
  80686. "uc_match": "1f1f7-1f1f8",
  80687. "uc_greedy": "1f1f7-1f1f8",
  80688. "shortnames": [":rs:"],
  80689. "category": "flags"
  80690. },
  80691. ":flag_ru:": {
  80692. "uc_base": "1f1f7-1f1fa",
  80693. "uc_output": "1f1f7-1f1fa",
  80694. "uc_match": "1f1f7-1f1fa",
  80695. "uc_greedy": "1f1f7-1f1fa",
  80696. "shortnames": [":ru:"],
  80697. "category": "flags"
  80698. },
  80699. ":flag_rw:": {
  80700. "uc_base": "1f1f7-1f1fc",
  80701. "uc_output": "1f1f7-1f1fc",
  80702. "uc_match": "1f1f7-1f1fc",
  80703. "uc_greedy": "1f1f7-1f1fc",
  80704. "shortnames": [":rw:"],
  80705. "category": "flags"
  80706. },
  80707. ":flag_sa:": {
  80708. "uc_base": "1f1f8-1f1e6",
  80709. "uc_output": "1f1f8-1f1e6",
  80710. "uc_match": "1f1f8-1f1e6",
  80711. "uc_greedy": "1f1f8-1f1e6",
  80712. "shortnames": [":saudiarabia:", ":saudi:"],
  80713. "category": "flags"
  80714. },
  80715. ":flag_sb:": {
  80716. "uc_base": "1f1f8-1f1e7",
  80717. "uc_output": "1f1f8-1f1e7",
  80718. "uc_match": "1f1f8-1f1e7",
  80719. "uc_greedy": "1f1f8-1f1e7",
  80720. "shortnames": [":sb:"],
  80721. "category": "flags"
  80722. },
  80723. ":flag_sc:": {
  80724. "uc_base": "1f1f8-1f1e8",
  80725. "uc_output": "1f1f8-1f1e8",
  80726. "uc_match": "1f1f8-1f1e8",
  80727. "uc_greedy": "1f1f8-1f1e8",
  80728. "shortnames": [":sc:"],
  80729. "category": "flags"
  80730. },
  80731. ":flag_sd:": {
  80732. "uc_base": "1f1f8-1f1e9",
  80733. "uc_output": "1f1f8-1f1e9",
  80734. "uc_match": "1f1f8-1f1e9",
  80735. "uc_greedy": "1f1f8-1f1e9",
  80736. "shortnames": [":sd:"],
  80737. "category": "flags"
  80738. },
  80739. ":flag_se:": {
  80740. "uc_base": "1f1f8-1f1ea",
  80741. "uc_output": "1f1f8-1f1ea",
  80742. "uc_match": "1f1f8-1f1ea",
  80743. "uc_greedy": "1f1f8-1f1ea",
  80744. "shortnames": [":se:"],
  80745. "category": "flags"
  80746. },
  80747. ":flag_sg:": {
  80748. "uc_base": "1f1f8-1f1ec",
  80749. "uc_output": "1f1f8-1f1ec",
  80750. "uc_match": "1f1f8-1f1ec",
  80751. "uc_greedy": "1f1f8-1f1ec",
  80752. "shortnames": [":sg:"],
  80753. "category": "flags"
  80754. },
  80755. ":flag_sh:": {
  80756. "uc_base": "1f1f8-1f1ed",
  80757. "uc_output": "1f1f8-1f1ed",
  80758. "uc_match": "1f1f8-1f1ed",
  80759. "uc_greedy": "1f1f8-1f1ed",
  80760. "shortnames": [":sh:"],
  80761. "category": "flags"
  80762. },
  80763. ":flag_si:": {
  80764. "uc_base": "1f1f8-1f1ee",
  80765. "uc_output": "1f1f8-1f1ee",
  80766. "uc_match": "1f1f8-1f1ee",
  80767. "uc_greedy": "1f1f8-1f1ee",
  80768. "shortnames": [":si:"],
  80769. "category": "flags"
  80770. },
  80771. ":flag_sj:": {
  80772. "uc_base": "1f1f8-1f1ef",
  80773. "uc_output": "1f1f8-1f1ef",
  80774. "uc_match": "1f1f8-1f1ef",
  80775. "uc_greedy": "1f1f8-1f1ef",
  80776. "shortnames": [":sj:"],
  80777. "category": "flags"
  80778. },
  80779. ":flag_sk:": {
  80780. "uc_base": "1f1f8-1f1f0",
  80781. "uc_output": "1f1f8-1f1f0",
  80782. "uc_match": "1f1f8-1f1f0",
  80783. "uc_greedy": "1f1f8-1f1f0",
  80784. "shortnames": [":sk:"],
  80785. "category": "flags"
  80786. },
  80787. ":flag_sl:": {
  80788. "uc_base": "1f1f8-1f1f1",
  80789. "uc_output": "1f1f8-1f1f1",
  80790. "uc_match": "1f1f8-1f1f1",
  80791. "uc_greedy": "1f1f8-1f1f1",
  80792. "shortnames": [":sl:"],
  80793. "category": "flags"
  80794. },
  80795. ":flag_sm:": {
  80796. "uc_base": "1f1f8-1f1f2",
  80797. "uc_output": "1f1f8-1f1f2",
  80798. "uc_match": "1f1f8-1f1f2",
  80799. "uc_greedy": "1f1f8-1f1f2",
  80800. "shortnames": [":sm:"],
  80801. "category": "flags"
  80802. },
  80803. ":flag_sn:": {
  80804. "uc_base": "1f1f8-1f1f3",
  80805. "uc_output": "1f1f8-1f1f3",
  80806. "uc_match": "1f1f8-1f1f3",
  80807. "uc_greedy": "1f1f8-1f1f3",
  80808. "shortnames": [":sn:"],
  80809. "category": "flags"
  80810. },
  80811. ":flag_so:": {
  80812. "uc_base": "1f1f8-1f1f4",
  80813. "uc_output": "1f1f8-1f1f4",
  80814. "uc_match": "1f1f8-1f1f4",
  80815. "uc_greedy": "1f1f8-1f1f4",
  80816. "shortnames": [":so:"],
  80817. "category": "flags"
  80818. },
  80819. ":flag_sr:": {
  80820. "uc_base": "1f1f8-1f1f7",
  80821. "uc_output": "1f1f8-1f1f7",
  80822. "uc_match": "1f1f8-1f1f7",
  80823. "uc_greedy": "1f1f8-1f1f7",
  80824. "shortnames": [":sr:"],
  80825. "category": "flags"
  80826. },
  80827. ":flag_ss:": {
  80828. "uc_base": "1f1f8-1f1f8",
  80829. "uc_output": "1f1f8-1f1f8",
  80830. "uc_match": "1f1f8-1f1f8",
  80831. "uc_greedy": "1f1f8-1f1f8",
  80832. "shortnames": [":ss:"],
  80833. "category": "flags"
  80834. },
  80835. ":flag_st:": {
  80836. "uc_base": "1f1f8-1f1f9",
  80837. "uc_output": "1f1f8-1f1f9",
  80838. "uc_match": "1f1f8-1f1f9",
  80839. "uc_greedy": "1f1f8-1f1f9",
  80840. "shortnames": [":st:"],
  80841. "category": "flags"
  80842. },
  80843. ":flag_sv:": {
  80844. "uc_base": "1f1f8-1f1fb",
  80845. "uc_output": "1f1f8-1f1fb",
  80846. "uc_match": "1f1f8-1f1fb",
  80847. "uc_greedy": "1f1f8-1f1fb",
  80848. "shortnames": [":sv:"],
  80849. "category": "flags"
  80850. },
  80851. ":flag_sx:": {
  80852. "uc_base": "1f1f8-1f1fd",
  80853. "uc_output": "1f1f8-1f1fd",
  80854. "uc_match": "1f1f8-1f1fd",
  80855. "uc_greedy": "1f1f8-1f1fd",
  80856. "shortnames": [":sx:"],
  80857. "category": "flags"
  80858. },
  80859. ":flag_sy:": {
  80860. "uc_base": "1f1f8-1f1fe",
  80861. "uc_output": "1f1f8-1f1fe",
  80862. "uc_match": "1f1f8-1f1fe",
  80863. "uc_greedy": "1f1f8-1f1fe",
  80864. "shortnames": [":sy:"],
  80865. "category": "flags"
  80866. },
  80867. ":flag_sz:": {
  80868. "uc_base": "1f1f8-1f1ff",
  80869. "uc_output": "1f1f8-1f1ff",
  80870. "uc_match": "1f1f8-1f1ff",
  80871. "uc_greedy": "1f1f8-1f1ff",
  80872. "shortnames": [":sz:"],
  80873. "category": "flags"
  80874. },
  80875. ":flag_ta:": {
  80876. "uc_base": "1f1f9-1f1e6",
  80877. "uc_output": "1f1f9-1f1e6",
  80878. "uc_match": "1f1f9-1f1e6",
  80879. "uc_greedy": "1f1f9-1f1e6",
  80880. "shortnames": [":ta:"],
  80881. "category": "flags"
  80882. },
  80883. ":flag_tc:": {
  80884. "uc_base": "1f1f9-1f1e8",
  80885. "uc_output": "1f1f9-1f1e8",
  80886. "uc_match": "1f1f9-1f1e8",
  80887. "uc_greedy": "1f1f9-1f1e8",
  80888. "shortnames": [":tc:"],
  80889. "category": "flags"
  80890. },
  80891. ":flag_td:": {
  80892. "uc_base": "1f1f9-1f1e9",
  80893. "uc_output": "1f1f9-1f1e9",
  80894. "uc_match": "1f1f9-1f1e9",
  80895. "uc_greedy": "1f1f9-1f1e9",
  80896. "shortnames": [":td:"],
  80897. "category": "flags"
  80898. },
  80899. ":flag_tf:": {
  80900. "uc_base": "1f1f9-1f1eb",
  80901. "uc_output": "1f1f9-1f1eb",
  80902. "uc_match": "1f1f9-1f1eb",
  80903. "uc_greedy": "1f1f9-1f1eb",
  80904. "shortnames": [":tf:"],
  80905. "category": "flags"
  80906. },
  80907. ":flag_tg:": {
  80908. "uc_base": "1f1f9-1f1ec",
  80909. "uc_output": "1f1f9-1f1ec",
  80910. "uc_match": "1f1f9-1f1ec",
  80911. "uc_greedy": "1f1f9-1f1ec",
  80912. "shortnames": [":tg:"],
  80913. "category": "flags"
  80914. },
  80915. ":flag_th:": {
  80916. "uc_base": "1f1f9-1f1ed",
  80917. "uc_output": "1f1f9-1f1ed",
  80918. "uc_match": "1f1f9-1f1ed",
  80919. "uc_greedy": "1f1f9-1f1ed",
  80920. "shortnames": [":th:"],
  80921. "category": "flags"
  80922. },
  80923. ":flag_tj:": {
  80924. "uc_base": "1f1f9-1f1ef",
  80925. "uc_output": "1f1f9-1f1ef",
  80926. "uc_match": "1f1f9-1f1ef",
  80927. "uc_greedy": "1f1f9-1f1ef",
  80928. "shortnames": [":tj:"],
  80929. "category": "flags"
  80930. },
  80931. ":flag_tk:": {
  80932. "uc_base": "1f1f9-1f1f0",
  80933. "uc_output": "1f1f9-1f1f0",
  80934. "uc_match": "1f1f9-1f1f0",
  80935. "uc_greedy": "1f1f9-1f1f0",
  80936. "shortnames": [":tk:"],
  80937. "category": "flags"
  80938. },
  80939. ":flag_tl:": {
  80940. "uc_base": "1f1f9-1f1f1",
  80941. "uc_output": "1f1f9-1f1f1",
  80942. "uc_match": "1f1f9-1f1f1",
  80943. "uc_greedy": "1f1f9-1f1f1",
  80944. "shortnames": [":tl:"],
  80945. "category": "flags"
  80946. },
  80947. ":flag_tm:": {
  80948. "uc_base": "1f1f9-1f1f2",
  80949. "uc_output": "1f1f9-1f1f2",
  80950. "uc_match": "1f1f9-1f1f2",
  80951. "uc_greedy": "1f1f9-1f1f2",
  80952. "shortnames": [":turkmenistan:"],
  80953. "category": "flags"
  80954. },
  80955. ":flag_tn:": {
  80956. "uc_base": "1f1f9-1f1f3",
  80957. "uc_output": "1f1f9-1f1f3",
  80958. "uc_match": "1f1f9-1f1f3",
  80959. "uc_greedy": "1f1f9-1f1f3",
  80960. "shortnames": [":tn:"],
  80961. "category": "flags"
  80962. },
  80963. ":flag_to:": {
  80964. "uc_base": "1f1f9-1f1f4",
  80965. "uc_output": "1f1f9-1f1f4",
  80966. "uc_match": "1f1f9-1f1f4",
  80967. "uc_greedy": "1f1f9-1f1f4",
  80968. "shortnames": [":to:"],
  80969. "category": "flags"
  80970. },
  80971. ":flag_tr:": {
  80972. "uc_base": "1f1f9-1f1f7",
  80973. "uc_output": "1f1f9-1f1f7",
  80974. "uc_match": "1f1f9-1f1f7",
  80975. "uc_greedy": "1f1f9-1f1f7",
  80976. "shortnames": [":tr:"],
  80977. "category": "flags"
  80978. },
  80979. ":flag_tt:": {
  80980. "uc_base": "1f1f9-1f1f9",
  80981. "uc_output": "1f1f9-1f1f9",
  80982. "uc_match": "1f1f9-1f1f9",
  80983. "uc_greedy": "1f1f9-1f1f9",
  80984. "shortnames": [":tt:"],
  80985. "category": "flags"
  80986. },
  80987. ":flag_tv:": {
  80988. "uc_base": "1f1f9-1f1fb",
  80989. "uc_output": "1f1f9-1f1fb",
  80990. "uc_match": "1f1f9-1f1fb",
  80991. "uc_greedy": "1f1f9-1f1fb",
  80992. "shortnames": [":tuvalu:"],
  80993. "category": "flags"
  80994. },
  80995. ":flag_tw:": {
  80996. "uc_base": "1f1f9-1f1fc",
  80997. "uc_output": "1f1f9-1f1fc",
  80998. "uc_match": "1f1f9-1f1fc",
  80999. "uc_greedy": "1f1f9-1f1fc",
  81000. "shortnames": [":tw:"],
  81001. "category": "flags"
  81002. },
  81003. ":flag_tz:": {
  81004. "uc_base": "1f1f9-1f1ff",
  81005. "uc_output": "1f1f9-1f1ff",
  81006. "uc_match": "1f1f9-1f1ff",
  81007. "uc_greedy": "1f1f9-1f1ff",
  81008. "shortnames": [":tz:"],
  81009. "category": "flags"
  81010. },
  81011. ":flag_ua:": {
  81012. "uc_base": "1f1fa-1f1e6",
  81013. "uc_output": "1f1fa-1f1e6",
  81014. "uc_match": "1f1fa-1f1e6",
  81015. "uc_greedy": "1f1fa-1f1e6",
  81016. "shortnames": [":ua:"],
  81017. "category": "flags"
  81018. },
  81019. ":flag_ug:": {
  81020. "uc_base": "1f1fa-1f1ec",
  81021. "uc_output": "1f1fa-1f1ec",
  81022. "uc_match": "1f1fa-1f1ec",
  81023. "uc_greedy": "1f1fa-1f1ec",
  81024. "shortnames": [":ug:"],
  81025. "category": "flags"
  81026. },
  81027. ":flag_um:": {
  81028. "uc_base": "1f1fa-1f1f2",
  81029. "uc_output": "1f1fa-1f1f2",
  81030. "uc_match": "1f1fa-1f1f2",
  81031. "uc_greedy": "1f1fa-1f1f2",
  81032. "shortnames": [":um:"],
  81033. "category": "flags"
  81034. },
  81035. ":flag_us:": {
  81036. "uc_base": "1f1fa-1f1f8",
  81037. "uc_output": "1f1fa-1f1f8",
  81038. "uc_match": "1f1fa-1f1f8",
  81039. "uc_greedy": "1f1fa-1f1f8",
  81040. "shortnames": [":us:"],
  81041. "category": "flags"
  81042. },
  81043. ":flag_uy:": {
  81044. "uc_base": "1f1fa-1f1fe",
  81045. "uc_output": "1f1fa-1f1fe",
  81046. "uc_match": "1f1fa-1f1fe",
  81047. "uc_greedy": "1f1fa-1f1fe",
  81048. "shortnames": [":uy:"],
  81049. "category": "flags"
  81050. },
  81051. ":flag_uz:": {
  81052. "uc_base": "1f1fa-1f1ff",
  81053. "uc_output": "1f1fa-1f1ff",
  81054. "uc_match": "1f1fa-1f1ff",
  81055. "uc_greedy": "1f1fa-1f1ff",
  81056. "shortnames": [":uz:"],
  81057. "category": "flags"
  81058. },
  81059. ":flag_va:": {
  81060. "uc_base": "1f1fb-1f1e6",
  81061. "uc_output": "1f1fb-1f1e6",
  81062. "uc_match": "1f1fb-1f1e6",
  81063. "uc_greedy": "1f1fb-1f1e6",
  81064. "shortnames": [":va:"],
  81065. "category": "flags"
  81066. },
  81067. ":flag_vc:": {
  81068. "uc_base": "1f1fb-1f1e8",
  81069. "uc_output": "1f1fb-1f1e8",
  81070. "uc_match": "1f1fb-1f1e8",
  81071. "uc_greedy": "1f1fb-1f1e8",
  81072. "shortnames": [":vc:"],
  81073. "category": "flags"
  81074. },
  81075. ":flag_ve:": {
  81076. "uc_base": "1f1fb-1f1ea",
  81077. "uc_output": "1f1fb-1f1ea",
  81078. "uc_match": "1f1fb-1f1ea",
  81079. "uc_greedy": "1f1fb-1f1ea",
  81080. "shortnames": [":ve:"],
  81081. "category": "flags"
  81082. },
  81083. ":flag_vg:": {
  81084. "uc_base": "1f1fb-1f1ec",
  81085. "uc_output": "1f1fb-1f1ec",
  81086. "uc_match": "1f1fb-1f1ec",
  81087. "uc_greedy": "1f1fb-1f1ec",
  81088. "shortnames": [":vg:"],
  81089. "category": "flags"
  81090. },
  81091. ":flag_vi:": {
  81092. "uc_base": "1f1fb-1f1ee",
  81093. "uc_output": "1f1fb-1f1ee",
  81094. "uc_match": "1f1fb-1f1ee",
  81095. "uc_greedy": "1f1fb-1f1ee",
  81096. "shortnames": [":vi:"],
  81097. "category": "flags"
  81098. },
  81099. ":flag_vn:": {
  81100. "uc_base": "1f1fb-1f1f3",
  81101. "uc_output": "1f1fb-1f1f3",
  81102. "uc_match": "1f1fb-1f1f3",
  81103. "uc_greedy": "1f1fb-1f1f3",
  81104. "shortnames": [":vn:"],
  81105. "category": "flags"
  81106. },
  81107. ":flag_vu:": {
  81108. "uc_base": "1f1fb-1f1fa",
  81109. "uc_output": "1f1fb-1f1fa",
  81110. "uc_match": "1f1fb-1f1fa",
  81111. "uc_greedy": "1f1fb-1f1fa",
  81112. "shortnames": [":vu:"],
  81113. "category": "flags"
  81114. },
  81115. ":flag_wf:": {
  81116. "uc_base": "1f1fc-1f1eb",
  81117. "uc_output": "1f1fc-1f1eb",
  81118. "uc_match": "1f1fc-1f1eb",
  81119. "uc_greedy": "1f1fc-1f1eb",
  81120. "shortnames": [":wf:"],
  81121. "category": "flags"
  81122. },
  81123. ":flag_ws:": {
  81124. "uc_base": "1f1fc-1f1f8",
  81125. "uc_output": "1f1fc-1f1f8",
  81126. "uc_match": "1f1fc-1f1f8",
  81127. "uc_greedy": "1f1fc-1f1f8",
  81128. "shortnames": [":ws:"],
  81129. "category": "flags"
  81130. },
  81131. ":flag_xk:": {
  81132. "uc_base": "1f1fd-1f1f0",
  81133. "uc_output": "1f1fd-1f1f0",
  81134. "uc_match": "1f1fd-1f1f0",
  81135. "uc_greedy": "1f1fd-1f1f0",
  81136. "shortnames": [":xk:"],
  81137. "category": "flags"
  81138. },
  81139. ":flag_ye:": {
  81140. "uc_base": "1f1fe-1f1ea",
  81141. "uc_output": "1f1fe-1f1ea",
  81142. "uc_match": "1f1fe-1f1ea",
  81143. "uc_greedy": "1f1fe-1f1ea",
  81144. "shortnames": [":ye:"],
  81145. "category": "flags"
  81146. },
  81147. ":flag_yt:": {
  81148. "uc_base": "1f1fe-1f1f9",
  81149. "uc_output": "1f1fe-1f1f9",
  81150. "uc_match": "1f1fe-1f1f9",
  81151. "uc_greedy": "1f1fe-1f1f9",
  81152. "shortnames": [":yt:"],
  81153. "category": "flags"
  81154. },
  81155. ":flag_za:": {
  81156. "uc_base": "1f1ff-1f1e6",
  81157. "uc_output": "1f1ff-1f1e6",
  81158. "uc_match": "1f1ff-1f1e6",
  81159. "uc_greedy": "1f1ff-1f1e6",
  81160. "shortnames": [":za:"],
  81161. "category": "flags"
  81162. },
  81163. ":flag_zm:": {
  81164. "uc_base": "1f1ff-1f1f2",
  81165. "uc_output": "1f1ff-1f1f2",
  81166. "uc_match": "1f1ff-1f1f2",
  81167. "uc_greedy": "1f1ff-1f1f2",
  81168. "shortnames": [":zm:"],
  81169. "category": "flags"
  81170. },
  81171. ":flag_zw:": {
  81172. "uc_base": "1f1ff-1f1fc",
  81173. "uc_output": "1f1ff-1f1fc",
  81174. "uc_match": "1f1ff-1f1fc",
  81175. "uc_greedy": "1f1ff-1f1fc",
  81176. "shortnames": [":zw:"],
  81177. "category": "flags"
  81178. },
  81179. ":girl_tone1:": {
  81180. "uc_base": "1f467-1f3fb",
  81181. "uc_output": "1f467-1f3fb",
  81182. "uc_match": "1f467-1f3fb",
  81183. "uc_greedy": "1f467-1f3fb",
  81184. "shortnames": [],
  81185. "category": "people"
  81186. },
  81187. ":girl_tone2:": {
  81188. "uc_base": "1f467-1f3fc",
  81189. "uc_output": "1f467-1f3fc",
  81190. "uc_match": "1f467-1f3fc",
  81191. "uc_greedy": "1f467-1f3fc",
  81192. "shortnames": [],
  81193. "category": "people"
  81194. },
  81195. ":girl_tone3:": {
  81196. "uc_base": "1f467-1f3fd",
  81197. "uc_output": "1f467-1f3fd",
  81198. "uc_match": "1f467-1f3fd",
  81199. "uc_greedy": "1f467-1f3fd",
  81200. "shortnames": [],
  81201. "category": "people"
  81202. },
  81203. ":girl_tone4:": {
  81204. "uc_base": "1f467-1f3fe",
  81205. "uc_output": "1f467-1f3fe",
  81206. "uc_match": "1f467-1f3fe",
  81207. "uc_greedy": "1f467-1f3fe",
  81208. "shortnames": [],
  81209. "category": "people"
  81210. },
  81211. ":girl_tone5:": {
  81212. "uc_base": "1f467-1f3ff",
  81213. "uc_output": "1f467-1f3ff",
  81214. "uc_match": "1f467-1f3ff",
  81215. "uc_greedy": "1f467-1f3ff",
  81216. "shortnames": [],
  81217. "category": "people"
  81218. },
  81219. ":guard_tone1:": {
  81220. "uc_base": "1f482-1f3fb",
  81221. "uc_output": "1f482-1f3fb",
  81222. "uc_match": "1f482-1f3fb",
  81223. "uc_greedy": "1f482-1f3fb",
  81224. "shortnames": [":guardsman_tone1:"],
  81225. "category": "people"
  81226. },
  81227. ":guard_tone2:": {
  81228. "uc_base": "1f482-1f3fc",
  81229. "uc_output": "1f482-1f3fc",
  81230. "uc_match": "1f482-1f3fc",
  81231. "uc_greedy": "1f482-1f3fc",
  81232. "shortnames": [":guardsman_tone2:"],
  81233. "category": "people"
  81234. },
  81235. ":guard_tone3:": {
  81236. "uc_base": "1f482-1f3fd",
  81237. "uc_output": "1f482-1f3fd",
  81238. "uc_match": "1f482-1f3fd",
  81239. "uc_greedy": "1f482-1f3fd",
  81240. "shortnames": [":guardsman_tone3:"],
  81241. "category": "people"
  81242. },
  81243. ":guard_tone4:": {
  81244. "uc_base": "1f482-1f3fe",
  81245. "uc_output": "1f482-1f3fe",
  81246. "uc_match": "1f482-1f3fe",
  81247. "uc_greedy": "1f482-1f3fe",
  81248. "shortnames": [":guardsman_tone4:"],
  81249. "category": "people"
  81250. },
  81251. ":guard_tone5:": {
  81252. "uc_base": "1f482-1f3ff",
  81253. "uc_output": "1f482-1f3ff",
  81254. "uc_match": "1f482-1f3ff",
  81255. "uc_greedy": "1f482-1f3ff",
  81256. "shortnames": [":guardsman_tone5:"],
  81257. "category": "people"
  81258. },
  81259. ":hand_splayed_tone1:": {
  81260. "uc_base": "1f590-1f3fb",
  81261. "uc_output": "1f590-1f3fb",
  81262. "uc_match": "1f590-fe0f-1f3fb",
  81263. "uc_greedy": "1f590-fe0f-1f3fb",
  81264. "shortnames": [":raised_hand_with_fingers_splayed_tone1:"],
  81265. "category": "people"
  81266. },
  81267. ":hand_splayed_tone2:": {
  81268. "uc_base": "1f590-1f3fc",
  81269. "uc_output": "1f590-1f3fc",
  81270. "uc_match": "1f590-fe0f-1f3fc",
  81271. "uc_greedy": "1f590-fe0f-1f3fc",
  81272. "shortnames": [":raised_hand_with_fingers_splayed_tone2:"],
  81273. "category": "people"
  81274. },
  81275. ":hand_splayed_tone3:": {
  81276. "uc_base": "1f590-1f3fd",
  81277. "uc_output": "1f590-1f3fd",
  81278. "uc_match": "1f590-fe0f-1f3fd",
  81279. "uc_greedy": "1f590-fe0f-1f3fd",
  81280. "shortnames": [":raised_hand_with_fingers_splayed_tone3:"],
  81281. "category": "people"
  81282. },
  81283. ":hand_splayed_tone4:": {
  81284. "uc_base": "1f590-1f3fe",
  81285. "uc_output": "1f590-1f3fe",
  81286. "uc_match": "1f590-fe0f-1f3fe",
  81287. "uc_greedy": "1f590-fe0f-1f3fe",
  81288. "shortnames": [":raised_hand_with_fingers_splayed_tone4:"],
  81289. "category": "people"
  81290. },
  81291. ":hand_splayed_tone5:": {
  81292. "uc_base": "1f590-1f3ff",
  81293. "uc_output": "1f590-1f3ff",
  81294. "uc_match": "1f590-fe0f-1f3ff",
  81295. "uc_greedy": "1f590-fe0f-1f3ff",
  81296. "shortnames": [":raised_hand_with_fingers_splayed_tone5:"],
  81297. "category": "people"
  81298. },
  81299. ":horse_racing_tone1:": {
  81300. "uc_base": "1f3c7-1f3fb",
  81301. "uc_output": "1f3c7-1f3fb",
  81302. "uc_match": "1f3c7-1f3fb",
  81303. "uc_greedy": "1f3c7-1f3fb",
  81304. "shortnames": [],
  81305. "category": "activity"
  81306. },
  81307. ":horse_racing_tone2:": {
  81308. "uc_base": "1f3c7-1f3fc",
  81309. "uc_output": "1f3c7-1f3fc",
  81310. "uc_match": "1f3c7-1f3fc",
  81311. "uc_greedy": "1f3c7-1f3fc",
  81312. "shortnames": [],
  81313. "category": "activity"
  81314. },
  81315. ":horse_racing_tone3:": {
  81316. "uc_base": "1f3c7-1f3fd",
  81317. "uc_output": "1f3c7-1f3fd",
  81318. "uc_match": "1f3c7-1f3fd",
  81319. "uc_greedy": "1f3c7-1f3fd",
  81320. "shortnames": [],
  81321. "category": "activity"
  81322. },
  81323. ":horse_racing_tone4:": {
  81324. "uc_base": "1f3c7-1f3fe",
  81325. "uc_output": "1f3c7-1f3fe",
  81326. "uc_match": "1f3c7-1f3fe",
  81327. "uc_greedy": "1f3c7-1f3fe",
  81328. "shortnames": [],
  81329. "category": "activity"
  81330. },
  81331. ":horse_racing_tone5:": {
  81332. "uc_base": "1f3c7-1f3ff",
  81333. "uc_output": "1f3c7-1f3ff",
  81334. "uc_match": "1f3c7-1f3ff",
  81335. "uc_greedy": "1f3c7-1f3ff",
  81336. "shortnames": [],
  81337. "category": "activity"
  81338. },
  81339. ":left_facing_fist_tone1:": {
  81340. "uc_base": "1f91b-1f3fb",
  81341. "uc_output": "1f91b-1f3fb",
  81342. "uc_match": "1f91b-1f3fb",
  81343. "uc_greedy": "1f91b-1f3fb",
  81344. "shortnames": [":left_fist_tone1:"],
  81345. "category": "people"
  81346. },
  81347. ":left_facing_fist_tone2:": {
  81348. "uc_base": "1f91b-1f3fc",
  81349. "uc_output": "1f91b-1f3fc",
  81350. "uc_match": "1f91b-1f3fc",
  81351. "uc_greedy": "1f91b-1f3fc",
  81352. "shortnames": [":left_fist_tone2:"],
  81353. "category": "people"
  81354. },
  81355. ":left_facing_fist_tone3:": {
  81356. "uc_base": "1f91b-1f3fd",
  81357. "uc_output": "1f91b-1f3fd",
  81358. "uc_match": "1f91b-1f3fd",
  81359. "uc_greedy": "1f91b-1f3fd",
  81360. "shortnames": [":left_fist_tone3:"],
  81361. "category": "people"
  81362. },
  81363. ":left_facing_fist_tone4:": {
  81364. "uc_base": "1f91b-1f3fe",
  81365. "uc_output": "1f91b-1f3fe",
  81366. "uc_match": "1f91b-1f3fe",
  81367. "uc_greedy": "1f91b-1f3fe",
  81368. "shortnames": [":left_fist_tone4:"],
  81369. "category": "people"
  81370. },
  81371. ":left_facing_fist_tone5:": {
  81372. "uc_base": "1f91b-1f3ff",
  81373. "uc_output": "1f91b-1f3ff",
  81374. "uc_match": "1f91b-1f3ff",
  81375. "uc_greedy": "1f91b-1f3ff",
  81376. "shortnames": [":left_fist_tone5:"],
  81377. "category": "people"
  81378. },
  81379. ":levitate_tone1:": {
  81380. "uc_base": "1f574-1f3fb",
  81381. "uc_output": "1f574-1f3fb",
  81382. "uc_match": "1f574-fe0f-1f3fb",
  81383. "uc_greedy": "1f574-fe0f-1f3fb",
  81384. "shortnames": [":man_in_business_suit_levitating_tone1:", ":man_in_business_suit_levitating_light_skin_tone:"],
  81385. "category": "people"
  81386. },
  81387. ":levitate_tone2:": {
  81388. "uc_base": "1f574-1f3fc",
  81389. "uc_output": "1f574-1f3fc",
  81390. "uc_match": "1f574-fe0f-1f3fc",
  81391. "uc_greedy": "1f574-fe0f-1f3fc",
  81392. "shortnames": [":man_in_business_suit_levitating_tone2:", ":man_in_business_suit_levitating_medium_light_skin_tone:"],
  81393. "category": "people"
  81394. },
  81395. ":levitate_tone3:": {
  81396. "uc_base": "1f574-1f3fd",
  81397. "uc_output": "1f574-1f3fd",
  81398. "uc_match": "1f574-fe0f-1f3fd",
  81399. "uc_greedy": "1f574-fe0f-1f3fd",
  81400. "shortnames": [":man_in_business_suit_levitating_tone3:", ":man_in_business_suit_levitating_medium_skin_tone:"],
  81401. "category": "people"
  81402. },
  81403. ":levitate_tone4:": {
  81404. "uc_base": "1f574-1f3fe",
  81405. "uc_output": "1f574-1f3fe",
  81406. "uc_match": "1f574-fe0f-1f3fe",
  81407. "uc_greedy": "1f574-fe0f-1f3fe",
  81408. "shortnames": [":man_in_business_suit_levitating_tone4:", ":man_in_business_suit_levitating_medium_dark_skin_tone:"],
  81409. "category": "people"
  81410. },
  81411. ":levitate_tone5:": {
  81412. "uc_base": "1f574-1f3ff",
  81413. "uc_output": "1f574-1f3ff",
  81414. "uc_match": "1f574-fe0f-1f3ff",
  81415. "uc_greedy": "1f574-fe0f-1f3ff",
  81416. "shortnames": [":man_in_business_suit_levitating_tone5:", ":man_in_business_suit_levitating_dark_skin_tone:"],
  81417. "category": "people"
  81418. },
  81419. ":love_you_gesture_tone1:": {
  81420. "uc_base": "1f91f-1f3fb",
  81421. "uc_output": "1f91f-1f3fb",
  81422. "uc_match": "1f91f-1f3fb",
  81423. "uc_greedy": "1f91f-1f3fb",
  81424. "shortnames": [":love_you_gesture_light_skin_tone:"],
  81425. "category": "people"
  81426. },
  81427. ":love_you_gesture_tone2:": {
  81428. "uc_base": "1f91f-1f3fc",
  81429. "uc_output": "1f91f-1f3fc",
  81430. "uc_match": "1f91f-1f3fc",
  81431. "uc_greedy": "1f91f-1f3fc",
  81432. "shortnames": [":love_you_gesture_medium_light_skin_tone:"],
  81433. "category": "people"
  81434. },
  81435. ":love_you_gesture_tone3:": {
  81436. "uc_base": "1f91f-1f3fd",
  81437. "uc_output": "1f91f-1f3fd",
  81438. "uc_match": "1f91f-1f3fd",
  81439. "uc_greedy": "1f91f-1f3fd",
  81440. "shortnames": [":love_you_gesture_medium_skin_tone:"],
  81441. "category": "people"
  81442. },
  81443. ":love_you_gesture_tone4:": {
  81444. "uc_base": "1f91f-1f3fe",
  81445. "uc_output": "1f91f-1f3fe",
  81446. "uc_match": "1f91f-1f3fe",
  81447. "uc_greedy": "1f91f-1f3fe",
  81448. "shortnames": [":love_you_gesture_medium_dark_skin_tone:"],
  81449. "category": "people"
  81450. },
  81451. ":love_you_gesture_tone5:": {
  81452. "uc_base": "1f91f-1f3ff",
  81453. "uc_output": "1f91f-1f3ff",
  81454. "uc_match": "1f91f-1f3ff",
  81455. "uc_greedy": "1f91f-1f3ff",
  81456. "shortnames": [":love_you_gesture_dark_skin_tone:"],
  81457. "category": "people"
  81458. },
  81459. ":mage_tone1:": {
  81460. "uc_base": "1f9d9-1f3fb",
  81461. "uc_output": "1f9d9-1f3fb",
  81462. "uc_match": "1f9d9-1f3fb",
  81463. "uc_greedy": "1f9d9-1f3fb",
  81464. "shortnames": [":mage_light_skin_tone:"],
  81465. "category": "people"
  81466. },
  81467. ":mage_tone2:": {
  81468. "uc_base": "1f9d9-1f3fc",
  81469. "uc_output": "1f9d9-1f3fc",
  81470. "uc_match": "1f9d9-1f3fc",
  81471. "uc_greedy": "1f9d9-1f3fc",
  81472. "shortnames": [":mage_medium_light_skin_tone:"],
  81473. "category": "people"
  81474. },
  81475. ":mage_tone3:": {
  81476. "uc_base": "1f9d9-1f3fd",
  81477. "uc_output": "1f9d9-1f3fd",
  81478. "uc_match": "1f9d9-1f3fd",
  81479. "uc_greedy": "1f9d9-1f3fd",
  81480. "shortnames": [":mage_medium_skin_tone:"],
  81481. "category": "people"
  81482. },
  81483. ":mage_tone4:": {
  81484. "uc_base": "1f9d9-1f3fe",
  81485. "uc_output": "1f9d9-1f3fe",
  81486. "uc_match": "1f9d9-1f3fe",
  81487. "uc_greedy": "1f9d9-1f3fe",
  81488. "shortnames": [":mage_medium_dark_skin_tone:"],
  81489. "category": "people"
  81490. },
  81491. ":mage_tone5:": {
  81492. "uc_base": "1f9d9-1f3ff",
  81493. "uc_output": "1f9d9-1f3ff",
  81494. "uc_match": "1f9d9-1f3ff",
  81495. "uc_greedy": "1f9d9-1f3ff",
  81496. "shortnames": [":mage_dark_skin_tone:"],
  81497. "category": "people"
  81498. },
  81499. ":man_dancing_tone1:": {
  81500. "uc_base": "1f57a-1f3fb",
  81501. "uc_output": "1f57a-1f3fb",
  81502. "uc_match": "1f57a-1f3fb",
  81503. "uc_greedy": "1f57a-1f3fb",
  81504. "shortnames": [":male_dancer_tone1:"],
  81505. "category": "people"
  81506. },
  81507. ":man_dancing_tone2:": {
  81508. "uc_base": "1f57a-1f3fc",
  81509. "uc_output": "1f57a-1f3fc",
  81510. "uc_match": "1f57a-1f3fc",
  81511. "uc_greedy": "1f57a-1f3fc",
  81512. "shortnames": [":male_dancer_tone2:"],
  81513. "category": "people"
  81514. },
  81515. ":man_dancing_tone3:": {
  81516. "uc_base": "1f57a-1f3fd",
  81517. "uc_output": "1f57a-1f3fd",
  81518. "uc_match": "1f57a-1f3fd",
  81519. "uc_greedy": "1f57a-1f3fd",
  81520. "shortnames": [":male_dancer_tone3:"],
  81521. "category": "people"
  81522. },
  81523. ":man_dancing_tone4:": {
  81524. "uc_base": "1f57a-1f3fe",
  81525. "uc_output": "1f57a-1f3fe",
  81526. "uc_match": "1f57a-1f3fe",
  81527. "uc_greedy": "1f57a-1f3fe",
  81528. "shortnames": [":male_dancer_tone4:"],
  81529. "category": "people"
  81530. },
  81531. ":man_dancing_tone5:": {
  81532. "uc_base": "1f57a-1f3ff",
  81533. "uc_output": "1f57a-1f3ff",
  81534. "uc_match": "1f57a-1f3ff",
  81535. "uc_greedy": "1f57a-1f3ff",
  81536. "shortnames": [":male_dancer_tone5:"],
  81537. "category": "people"
  81538. },
  81539. ":man_in_tuxedo_tone1:": {
  81540. "uc_base": "1f935-1f3fb",
  81541. "uc_output": "1f935-1f3fb",
  81542. "uc_match": "1f935-1f3fb",
  81543. "uc_greedy": "1f935-1f3fb",
  81544. "shortnames": [":tuxedo_tone1:"],
  81545. "category": "people"
  81546. },
  81547. ":man_in_tuxedo_tone2:": {
  81548. "uc_base": "1f935-1f3fc",
  81549. "uc_output": "1f935-1f3fc",
  81550. "uc_match": "1f935-1f3fc",
  81551. "uc_greedy": "1f935-1f3fc",
  81552. "shortnames": [":tuxedo_tone2:"],
  81553. "category": "people"
  81554. },
  81555. ":man_in_tuxedo_tone3:": {
  81556. "uc_base": "1f935-1f3fd",
  81557. "uc_output": "1f935-1f3fd",
  81558. "uc_match": "1f935-1f3fd",
  81559. "uc_greedy": "1f935-1f3fd",
  81560. "shortnames": [":tuxedo_tone3:"],
  81561. "category": "people"
  81562. },
  81563. ":man_in_tuxedo_tone4:": {
  81564. "uc_base": "1f935-1f3fe",
  81565. "uc_output": "1f935-1f3fe",
  81566. "uc_match": "1f935-1f3fe",
  81567. "uc_greedy": "1f935-1f3fe",
  81568. "shortnames": [":tuxedo_tone4:"],
  81569. "category": "people"
  81570. },
  81571. ":man_in_tuxedo_tone5:": {
  81572. "uc_base": "1f935-1f3ff",
  81573. "uc_output": "1f935-1f3ff",
  81574. "uc_match": "1f935-1f3ff",
  81575. "uc_greedy": "1f935-1f3ff",
  81576. "shortnames": [":tuxedo_tone5:"],
  81577. "category": "people"
  81578. },
  81579. ":man_tone1:": {
  81580. "uc_base": "1f468-1f3fb",
  81581. "uc_output": "1f468-1f3fb",
  81582. "uc_match": "1f468-1f3fb",
  81583. "uc_greedy": "1f468-1f3fb",
  81584. "shortnames": [],
  81585. "category": "people"
  81586. },
  81587. ":man_tone2:": {
  81588. "uc_base": "1f468-1f3fc",
  81589. "uc_output": "1f468-1f3fc",
  81590. "uc_match": "1f468-1f3fc",
  81591. "uc_greedy": "1f468-1f3fc",
  81592. "shortnames": [],
  81593. "category": "people"
  81594. },
  81595. ":man_tone3:": {
  81596. "uc_base": "1f468-1f3fd",
  81597. "uc_output": "1f468-1f3fd",
  81598. "uc_match": "1f468-1f3fd",
  81599. "uc_greedy": "1f468-1f3fd",
  81600. "shortnames": [],
  81601. "category": "people"
  81602. },
  81603. ":man_tone4:": {
  81604. "uc_base": "1f468-1f3fe",
  81605. "uc_output": "1f468-1f3fe",
  81606. "uc_match": "1f468-1f3fe",
  81607. "uc_greedy": "1f468-1f3fe",
  81608. "shortnames": [],
  81609. "category": "people"
  81610. },
  81611. ":man_tone5:": {
  81612. "uc_base": "1f468-1f3ff",
  81613. "uc_output": "1f468-1f3ff",
  81614. "uc_match": "1f468-1f3ff",
  81615. "uc_greedy": "1f468-1f3ff",
  81616. "shortnames": [],
  81617. "category": "people"
  81618. },
  81619. ":man_with_chinese_cap_tone1:": {
  81620. "uc_base": "1f472-1f3fb",
  81621. "uc_output": "1f472-1f3fb",
  81622. "uc_match": "1f472-1f3fb",
  81623. "uc_greedy": "1f472-1f3fb",
  81624. "shortnames": [":man_with_gua_pi_mao_tone1:"],
  81625. "category": "people"
  81626. },
  81627. ":man_with_chinese_cap_tone2:": {
  81628. "uc_base": "1f472-1f3fc",
  81629. "uc_output": "1f472-1f3fc",
  81630. "uc_match": "1f472-1f3fc",
  81631. "uc_greedy": "1f472-1f3fc",
  81632. "shortnames": [":man_with_gua_pi_mao_tone2:"],
  81633. "category": "people"
  81634. },
  81635. ":man_with_chinese_cap_tone3:": {
  81636. "uc_base": "1f472-1f3fd",
  81637. "uc_output": "1f472-1f3fd",
  81638. "uc_match": "1f472-1f3fd",
  81639. "uc_greedy": "1f472-1f3fd",
  81640. "shortnames": [":man_with_gua_pi_mao_tone3:"],
  81641. "category": "people"
  81642. },
  81643. ":man_with_chinese_cap_tone4:": {
  81644. "uc_base": "1f472-1f3fe",
  81645. "uc_output": "1f472-1f3fe",
  81646. "uc_match": "1f472-1f3fe",
  81647. "uc_greedy": "1f472-1f3fe",
  81648. "shortnames": [":man_with_gua_pi_mao_tone4:"],
  81649. "category": "people"
  81650. },
  81651. ":man_with_chinese_cap_tone5:": {
  81652. "uc_base": "1f472-1f3ff",
  81653. "uc_output": "1f472-1f3ff",
  81654. "uc_match": "1f472-1f3ff",
  81655. "uc_greedy": "1f472-1f3ff",
  81656. "shortnames": [":man_with_gua_pi_mao_tone5:"],
  81657. "category": "people"
  81658. },
  81659. ":merperson_tone1:": {
  81660. "uc_base": "1f9dc-1f3fb",
  81661. "uc_output": "1f9dc-1f3fb",
  81662. "uc_match": "1f9dc-1f3fb",
  81663. "uc_greedy": "1f9dc-1f3fb",
  81664. "shortnames": [":merperson_light_skin_tone:"],
  81665. "category": "people"
  81666. },
  81667. ":merperson_tone2:": {
  81668. "uc_base": "1f9dc-1f3fc",
  81669. "uc_output": "1f9dc-1f3fc",
  81670. "uc_match": "1f9dc-1f3fc",
  81671. "uc_greedy": "1f9dc-1f3fc",
  81672. "shortnames": [":merperson_medium_light_skin_tone:"],
  81673. "category": "people"
  81674. },
  81675. ":merperson_tone3:": {
  81676. "uc_base": "1f9dc-1f3fd",
  81677. "uc_output": "1f9dc-1f3fd",
  81678. "uc_match": "1f9dc-1f3fd",
  81679. "uc_greedy": "1f9dc-1f3fd",
  81680. "shortnames": [":merperson_medium_skin_tone:"],
  81681. "category": "people"
  81682. },
  81683. ":merperson_tone4:": {
  81684. "uc_base": "1f9dc-1f3fe",
  81685. "uc_output": "1f9dc-1f3fe",
  81686. "uc_match": "1f9dc-1f3fe",
  81687. "uc_greedy": "1f9dc-1f3fe",
  81688. "shortnames": [":merperson_medium_dark_skin_tone:"],
  81689. "category": "people"
  81690. },
  81691. ":merperson_tone5:": {
  81692. "uc_base": "1f9dc-1f3ff",
  81693. "uc_output": "1f9dc-1f3ff",
  81694. "uc_match": "1f9dc-1f3ff",
  81695. "uc_greedy": "1f9dc-1f3ff",
  81696. "shortnames": [":merperson_dark_skin_tone:"],
  81697. "category": "people"
  81698. },
  81699. ":metal_tone1:": {
  81700. "uc_base": "1f918-1f3fb",
  81701. "uc_output": "1f918-1f3fb",
  81702. "uc_match": "1f918-1f3fb",
  81703. "uc_greedy": "1f918-1f3fb",
  81704. "shortnames": [":sign_of_the_horns_tone1:"],
  81705. "category": "people"
  81706. },
  81707. ":metal_tone2:": {
  81708. "uc_base": "1f918-1f3fc",
  81709. "uc_output": "1f918-1f3fc",
  81710. "uc_match": "1f918-1f3fc",
  81711. "uc_greedy": "1f918-1f3fc",
  81712. "shortnames": [":sign_of_the_horns_tone2:"],
  81713. "category": "people"
  81714. },
  81715. ":metal_tone3:": {
  81716. "uc_base": "1f918-1f3fd",
  81717. "uc_output": "1f918-1f3fd",
  81718. "uc_match": "1f918-1f3fd",
  81719. "uc_greedy": "1f918-1f3fd",
  81720. "shortnames": [":sign_of_the_horns_tone3:"],
  81721. "category": "people"
  81722. },
  81723. ":metal_tone4:": {
  81724. "uc_base": "1f918-1f3fe",
  81725. "uc_output": "1f918-1f3fe",
  81726. "uc_match": "1f918-1f3fe",
  81727. "uc_greedy": "1f918-1f3fe",
  81728. "shortnames": [":sign_of_the_horns_tone4:"],
  81729. "category": "people"
  81730. },
  81731. ":metal_tone5:": {
  81732. "uc_base": "1f918-1f3ff",
  81733. "uc_output": "1f918-1f3ff",
  81734. "uc_match": "1f918-1f3ff",
  81735. "uc_greedy": "1f918-1f3ff",
  81736. "shortnames": [":sign_of_the_horns_tone5:"],
  81737. "category": "people"
  81738. },
  81739. ":middle_finger_tone1:": {
  81740. "uc_base": "1f595-1f3fb",
  81741. "uc_output": "1f595-1f3fb",
  81742. "uc_match": "1f595-1f3fb",
  81743. "uc_greedy": "1f595-1f3fb",
  81744. "shortnames": [":reversed_hand_with_middle_finger_extended_tone1:"],
  81745. "category": "people"
  81746. },
  81747. ":middle_finger_tone2:": {
  81748. "uc_base": "1f595-1f3fc",
  81749. "uc_output": "1f595-1f3fc",
  81750. "uc_match": "1f595-1f3fc",
  81751. "uc_greedy": "1f595-1f3fc",
  81752. "shortnames": [":reversed_hand_with_middle_finger_extended_tone2:"],
  81753. "category": "people"
  81754. },
  81755. ":middle_finger_tone3:": {
  81756. "uc_base": "1f595-1f3fd",
  81757. "uc_output": "1f595-1f3fd",
  81758. "uc_match": "1f595-1f3fd",
  81759. "uc_greedy": "1f595-1f3fd",
  81760. "shortnames": [":reversed_hand_with_middle_finger_extended_tone3:"],
  81761. "category": "people"
  81762. },
  81763. ":middle_finger_tone4:": {
  81764. "uc_base": "1f595-1f3fe",
  81765. "uc_output": "1f595-1f3fe",
  81766. "uc_match": "1f595-1f3fe",
  81767. "uc_greedy": "1f595-1f3fe",
  81768. "shortnames": [":reversed_hand_with_middle_finger_extended_tone4:"],
  81769. "category": "people"
  81770. },
  81771. ":middle_finger_tone5:": {
  81772. "uc_base": "1f595-1f3ff",
  81773. "uc_output": "1f595-1f3ff",
  81774. "uc_match": "1f595-1f3ff",
  81775. "uc_greedy": "1f595-1f3ff",
  81776. "shortnames": [":reversed_hand_with_middle_finger_extended_tone5:"],
  81777. "category": "people"
  81778. },
  81779. ":mrs_claus_tone1:": {
  81780. "uc_base": "1f936-1f3fb",
  81781. "uc_output": "1f936-1f3fb",
  81782. "uc_match": "1f936-1f3fb",
  81783. "uc_greedy": "1f936-1f3fb",
  81784. "shortnames": [":mother_christmas_tone1:"],
  81785. "category": "people"
  81786. },
  81787. ":mrs_claus_tone2:": {
  81788. "uc_base": "1f936-1f3fc",
  81789. "uc_output": "1f936-1f3fc",
  81790. "uc_match": "1f936-1f3fc",
  81791. "uc_greedy": "1f936-1f3fc",
  81792. "shortnames": [":mother_christmas_tone2:"],
  81793. "category": "people"
  81794. },
  81795. ":mrs_claus_tone3:": {
  81796. "uc_base": "1f936-1f3fd",
  81797. "uc_output": "1f936-1f3fd",
  81798. "uc_match": "1f936-1f3fd",
  81799. "uc_greedy": "1f936-1f3fd",
  81800. "shortnames": [":mother_christmas_tone3:"],
  81801. "category": "people"
  81802. },
  81803. ":mrs_claus_tone4:": {
  81804. "uc_base": "1f936-1f3fe",
  81805. "uc_output": "1f936-1f3fe",
  81806. "uc_match": "1f936-1f3fe",
  81807. "uc_greedy": "1f936-1f3fe",
  81808. "shortnames": [":mother_christmas_tone4:"],
  81809. "category": "people"
  81810. },
  81811. ":mrs_claus_tone5:": {
  81812. "uc_base": "1f936-1f3ff",
  81813. "uc_output": "1f936-1f3ff",
  81814. "uc_match": "1f936-1f3ff",
  81815. "uc_greedy": "1f936-1f3ff",
  81816. "shortnames": [":mother_christmas_tone5:"],
  81817. "category": "people"
  81818. },
  81819. ":muscle_tone1:": {
  81820. "uc_base": "1f4aa-1f3fb",
  81821. "uc_output": "1f4aa-1f3fb",
  81822. "uc_match": "1f4aa-1f3fb",
  81823. "uc_greedy": "1f4aa-1f3fb",
  81824. "shortnames": [],
  81825. "category": "people"
  81826. },
  81827. ":muscle_tone2:": {
  81828. "uc_base": "1f4aa-1f3fc",
  81829. "uc_output": "1f4aa-1f3fc",
  81830. "uc_match": "1f4aa-1f3fc",
  81831. "uc_greedy": "1f4aa-1f3fc",
  81832. "shortnames": [],
  81833. "category": "people"
  81834. },
  81835. ":muscle_tone3:": {
  81836. "uc_base": "1f4aa-1f3fd",
  81837. "uc_output": "1f4aa-1f3fd",
  81838. "uc_match": "1f4aa-1f3fd",
  81839. "uc_greedy": "1f4aa-1f3fd",
  81840. "shortnames": [],
  81841. "category": "people"
  81842. },
  81843. ":muscle_tone4:": {
  81844. "uc_base": "1f4aa-1f3fe",
  81845. "uc_output": "1f4aa-1f3fe",
  81846. "uc_match": "1f4aa-1f3fe",
  81847. "uc_greedy": "1f4aa-1f3fe",
  81848. "shortnames": [],
  81849. "category": "people"
  81850. },
  81851. ":muscle_tone5:": {
  81852. "uc_base": "1f4aa-1f3ff",
  81853. "uc_output": "1f4aa-1f3ff",
  81854. "uc_match": "1f4aa-1f3ff",
  81855. "uc_greedy": "1f4aa-1f3ff",
  81856. "shortnames": [],
  81857. "category": "people"
  81858. },
  81859. ":nail_care_tone1:": {
  81860. "uc_base": "1f485-1f3fb",
  81861. "uc_output": "1f485-1f3fb",
  81862. "uc_match": "1f485-1f3fb",
  81863. "uc_greedy": "1f485-1f3fb",
  81864. "shortnames": [],
  81865. "category": "people"
  81866. },
  81867. ":nail_care_tone2:": {
  81868. "uc_base": "1f485-1f3fc",
  81869. "uc_output": "1f485-1f3fc",
  81870. "uc_match": "1f485-1f3fc",
  81871. "uc_greedy": "1f485-1f3fc",
  81872. "shortnames": [],
  81873. "category": "people"
  81874. },
  81875. ":nail_care_tone3:": {
  81876. "uc_base": "1f485-1f3fd",
  81877. "uc_output": "1f485-1f3fd",
  81878. "uc_match": "1f485-1f3fd",
  81879. "uc_greedy": "1f485-1f3fd",
  81880. "shortnames": [],
  81881. "category": "people"
  81882. },
  81883. ":nail_care_tone4:": {
  81884. "uc_base": "1f485-1f3fe",
  81885. "uc_output": "1f485-1f3fe",
  81886. "uc_match": "1f485-1f3fe",
  81887. "uc_greedy": "1f485-1f3fe",
  81888. "shortnames": [],
  81889. "category": "people"
  81890. },
  81891. ":nail_care_tone5:": {
  81892. "uc_base": "1f485-1f3ff",
  81893. "uc_output": "1f485-1f3ff",
  81894. "uc_match": "1f485-1f3ff",
  81895. "uc_greedy": "1f485-1f3ff",
  81896. "shortnames": [],
  81897. "category": "people"
  81898. },
  81899. ":nose_tone1:": {
  81900. "uc_base": "1f443-1f3fb",
  81901. "uc_output": "1f443-1f3fb",
  81902. "uc_match": "1f443-1f3fb",
  81903. "uc_greedy": "1f443-1f3fb",
  81904. "shortnames": [],
  81905. "category": "people"
  81906. },
  81907. ":nose_tone2:": {
  81908. "uc_base": "1f443-1f3fc",
  81909. "uc_output": "1f443-1f3fc",
  81910. "uc_match": "1f443-1f3fc",
  81911. "uc_greedy": "1f443-1f3fc",
  81912. "shortnames": [],
  81913. "category": "people"
  81914. },
  81915. ":nose_tone3:": {
  81916. "uc_base": "1f443-1f3fd",
  81917. "uc_output": "1f443-1f3fd",
  81918. "uc_match": "1f443-1f3fd",
  81919. "uc_greedy": "1f443-1f3fd",
  81920. "shortnames": [],
  81921. "category": "people"
  81922. },
  81923. ":nose_tone4:": {
  81924. "uc_base": "1f443-1f3fe",
  81925. "uc_output": "1f443-1f3fe",
  81926. "uc_match": "1f443-1f3fe",
  81927. "uc_greedy": "1f443-1f3fe",
  81928. "shortnames": [],
  81929. "category": "people"
  81930. },
  81931. ":nose_tone5:": {
  81932. "uc_base": "1f443-1f3ff",
  81933. "uc_output": "1f443-1f3ff",
  81934. "uc_match": "1f443-1f3ff",
  81935. "uc_greedy": "1f443-1f3ff",
  81936. "shortnames": [],
  81937. "category": "people"
  81938. },
  81939. ":ok_hand_tone1:": {
  81940. "uc_base": "1f44c-1f3fb",
  81941. "uc_output": "1f44c-1f3fb",
  81942. "uc_match": "1f44c-1f3fb",
  81943. "uc_greedy": "1f44c-1f3fb",
  81944. "shortnames": [],
  81945. "category": "people"
  81946. },
  81947. ":ok_hand_tone2:": {
  81948. "uc_base": "1f44c-1f3fc",
  81949. "uc_output": "1f44c-1f3fc",
  81950. "uc_match": "1f44c-1f3fc",
  81951. "uc_greedy": "1f44c-1f3fc",
  81952. "shortnames": [],
  81953. "category": "people"
  81954. },
  81955. ":ok_hand_tone3:": {
  81956. "uc_base": "1f44c-1f3fd",
  81957. "uc_output": "1f44c-1f3fd",
  81958. "uc_match": "1f44c-1f3fd",
  81959. "uc_greedy": "1f44c-1f3fd",
  81960. "shortnames": [],
  81961. "category": "people"
  81962. },
  81963. ":ok_hand_tone4:": {
  81964. "uc_base": "1f44c-1f3fe",
  81965. "uc_output": "1f44c-1f3fe",
  81966. "uc_match": "1f44c-1f3fe",
  81967. "uc_greedy": "1f44c-1f3fe",
  81968. "shortnames": [],
  81969. "category": "people"
  81970. },
  81971. ":ok_hand_tone5:": {
  81972. "uc_base": "1f44c-1f3ff",
  81973. "uc_output": "1f44c-1f3ff",
  81974. "uc_match": "1f44c-1f3ff",
  81975. "uc_greedy": "1f44c-1f3ff",
  81976. "shortnames": [],
  81977. "category": "people"
  81978. },
  81979. ":older_adult_tone1:": {
  81980. "uc_base": "1f9d3-1f3fb",
  81981. "uc_output": "1f9d3-1f3fb",
  81982. "uc_match": "1f9d3-1f3fb",
  81983. "uc_greedy": "1f9d3-1f3fb",
  81984. "shortnames": [":older_adult_light_skin_tone:"],
  81985. "category": "people"
  81986. },
  81987. ":older_adult_tone2:": {
  81988. "uc_base": "1f9d3-1f3fc",
  81989. "uc_output": "1f9d3-1f3fc",
  81990. "uc_match": "1f9d3-1f3fc",
  81991. "uc_greedy": "1f9d3-1f3fc",
  81992. "shortnames": [":older_adult_medium_light_skin_tone:"],
  81993. "category": "people"
  81994. },
  81995. ":older_adult_tone3:": {
  81996. "uc_base": "1f9d3-1f3fd",
  81997. "uc_output": "1f9d3-1f3fd",
  81998. "uc_match": "1f9d3-1f3fd",
  81999. "uc_greedy": "1f9d3-1f3fd",
  82000. "shortnames": [":older_adult_medium_skin_tone:"],
  82001. "category": "people"
  82002. },
  82003. ":older_adult_tone4:": {
  82004. "uc_base": "1f9d3-1f3fe",
  82005. "uc_output": "1f9d3-1f3fe",
  82006. "uc_match": "1f9d3-1f3fe",
  82007. "uc_greedy": "1f9d3-1f3fe",
  82008. "shortnames": [":older_adult_medium_dark_skin_tone:"],
  82009. "category": "people"
  82010. },
  82011. ":older_adult_tone5:": {
  82012. "uc_base": "1f9d3-1f3ff",
  82013. "uc_output": "1f9d3-1f3ff",
  82014. "uc_match": "1f9d3-1f3ff",
  82015. "uc_greedy": "1f9d3-1f3ff",
  82016. "shortnames": [":older_adult_dark_skin_tone:"],
  82017. "category": "people"
  82018. },
  82019. ":older_man_tone1:": {
  82020. "uc_base": "1f474-1f3fb",
  82021. "uc_output": "1f474-1f3fb",
  82022. "uc_match": "1f474-1f3fb",
  82023. "uc_greedy": "1f474-1f3fb",
  82024. "shortnames": [],
  82025. "category": "people"
  82026. },
  82027. ":older_man_tone2:": {
  82028. "uc_base": "1f474-1f3fc",
  82029. "uc_output": "1f474-1f3fc",
  82030. "uc_match": "1f474-1f3fc",
  82031. "uc_greedy": "1f474-1f3fc",
  82032. "shortnames": [],
  82033. "category": "people"
  82034. },
  82035. ":older_man_tone3:": {
  82036. "uc_base": "1f474-1f3fd",
  82037. "uc_output": "1f474-1f3fd",
  82038. "uc_match": "1f474-1f3fd",
  82039. "uc_greedy": "1f474-1f3fd",
  82040. "shortnames": [],
  82041. "category": "people"
  82042. },
  82043. ":older_man_tone4:": {
  82044. "uc_base": "1f474-1f3fe",
  82045. "uc_output": "1f474-1f3fe",
  82046. "uc_match": "1f474-1f3fe",
  82047. "uc_greedy": "1f474-1f3fe",
  82048. "shortnames": [],
  82049. "category": "people"
  82050. },
  82051. ":older_man_tone5:": {
  82052. "uc_base": "1f474-1f3ff",
  82053. "uc_output": "1f474-1f3ff",
  82054. "uc_match": "1f474-1f3ff",
  82055. "uc_greedy": "1f474-1f3ff",
  82056. "shortnames": [],
  82057. "category": "people"
  82058. },
  82059. ":older_woman_tone1:": {
  82060. "uc_base": "1f475-1f3fb",
  82061. "uc_output": "1f475-1f3fb",
  82062. "uc_match": "1f475-1f3fb",
  82063. "uc_greedy": "1f475-1f3fb",
  82064. "shortnames": [":grandma_tone1:"],
  82065. "category": "people"
  82066. },
  82067. ":older_woman_tone2:": {
  82068. "uc_base": "1f475-1f3fc",
  82069. "uc_output": "1f475-1f3fc",
  82070. "uc_match": "1f475-1f3fc",
  82071. "uc_greedy": "1f475-1f3fc",
  82072. "shortnames": [":grandma_tone2:"],
  82073. "category": "people"
  82074. },
  82075. ":older_woman_tone3:": {
  82076. "uc_base": "1f475-1f3fd",
  82077. "uc_output": "1f475-1f3fd",
  82078. "uc_match": "1f475-1f3fd",
  82079. "uc_greedy": "1f475-1f3fd",
  82080. "shortnames": [":grandma_tone3:"],
  82081. "category": "people"
  82082. },
  82083. ":older_woman_tone4:": {
  82084. "uc_base": "1f475-1f3fe",
  82085. "uc_output": "1f475-1f3fe",
  82086. "uc_match": "1f475-1f3fe",
  82087. "uc_greedy": "1f475-1f3fe",
  82088. "shortnames": [":grandma_tone4:"],
  82089. "category": "people"
  82090. },
  82091. ":older_woman_tone5:": {
  82092. "uc_base": "1f475-1f3ff",
  82093. "uc_output": "1f475-1f3ff",
  82094. "uc_match": "1f475-1f3ff",
  82095. "uc_greedy": "1f475-1f3ff",
  82096. "shortnames": [":grandma_tone5:"],
  82097. "category": "people"
  82098. },
  82099. ":open_hands_tone1:": {
  82100. "uc_base": "1f450-1f3fb",
  82101. "uc_output": "1f450-1f3fb",
  82102. "uc_match": "1f450-1f3fb",
  82103. "uc_greedy": "1f450-1f3fb",
  82104. "shortnames": [],
  82105. "category": "people"
  82106. },
  82107. ":open_hands_tone2:": {
  82108. "uc_base": "1f450-1f3fc",
  82109. "uc_output": "1f450-1f3fc",
  82110. "uc_match": "1f450-1f3fc",
  82111. "uc_greedy": "1f450-1f3fc",
  82112. "shortnames": [],
  82113. "category": "people"
  82114. },
  82115. ":open_hands_tone3:": {
  82116. "uc_base": "1f450-1f3fd",
  82117. "uc_output": "1f450-1f3fd",
  82118. "uc_match": "1f450-1f3fd",
  82119. "uc_greedy": "1f450-1f3fd",
  82120. "shortnames": [],
  82121. "category": "people"
  82122. },
  82123. ":open_hands_tone4:": {
  82124. "uc_base": "1f450-1f3fe",
  82125. "uc_output": "1f450-1f3fe",
  82126. "uc_match": "1f450-1f3fe",
  82127. "uc_greedy": "1f450-1f3fe",
  82128. "shortnames": [],
  82129. "category": "people"
  82130. },
  82131. ":open_hands_tone5:": {
  82132. "uc_base": "1f450-1f3ff",
  82133. "uc_output": "1f450-1f3ff",
  82134. "uc_match": "1f450-1f3ff",
  82135. "uc_greedy": "1f450-1f3ff",
  82136. "shortnames": [],
  82137. "category": "people"
  82138. },
  82139. ":palms_up_together_tone1:": {
  82140. "uc_base": "1f932-1f3fb",
  82141. "uc_output": "1f932-1f3fb",
  82142. "uc_match": "1f932-1f3fb",
  82143. "uc_greedy": "1f932-1f3fb",
  82144. "shortnames": [":palms_up_together_light_skin_tone:"],
  82145. "category": "people"
  82146. },
  82147. ":palms_up_together_tone2:": {
  82148. "uc_base": "1f932-1f3fc",
  82149. "uc_output": "1f932-1f3fc",
  82150. "uc_match": "1f932-1f3fc",
  82151. "uc_greedy": "1f932-1f3fc",
  82152. "shortnames": [":palms_up_together_medium_light_skin_tone:"],
  82153. "category": "people"
  82154. },
  82155. ":palms_up_together_tone3:": {
  82156. "uc_base": "1f932-1f3fd",
  82157. "uc_output": "1f932-1f3fd",
  82158. "uc_match": "1f932-1f3fd",
  82159. "uc_greedy": "1f932-1f3fd",
  82160. "shortnames": [":palms_up_together_medium_skin_tone:"],
  82161. "category": "people"
  82162. },
  82163. ":palms_up_together_tone4:": {
  82164. "uc_base": "1f932-1f3fe",
  82165. "uc_output": "1f932-1f3fe",
  82166. "uc_match": "1f932-1f3fe",
  82167. "uc_greedy": "1f932-1f3fe",
  82168. "shortnames": [":palms_up_together_medium_dark_skin_tone:"],
  82169. "category": "people"
  82170. },
  82171. ":palms_up_together_tone5:": {
  82172. "uc_base": "1f932-1f3ff",
  82173. "uc_output": "1f932-1f3ff",
  82174. "uc_match": "1f932-1f3ff",
  82175. "uc_greedy": "1f932-1f3ff",
  82176. "shortnames": [":palms_up_together_dark_skin_tone:"],
  82177. "category": "people"
  82178. },
  82179. ":person_biking_tone1:": {
  82180. "uc_base": "1f6b4-1f3fb",
  82181. "uc_output": "1f6b4-1f3fb",
  82182. "uc_match": "1f6b4-1f3fb",
  82183. "uc_greedy": "1f6b4-1f3fb",
  82184. "shortnames": [":bicyclist_tone1:"],
  82185. "category": "activity"
  82186. },
  82187. ":person_biking_tone2:": {
  82188. "uc_base": "1f6b4-1f3fc",
  82189. "uc_output": "1f6b4-1f3fc",
  82190. "uc_match": "1f6b4-1f3fc",
  82191. "uc_greedy": "1f6b4-1f3fc",
  82192. "shortnames": [":bicyclist_tone2:"],
  82193. "category": "activity"
  82194. },
  82195. ":person_biking_tone3:": {
  82196. "uc_base": "1f6b4-1f3fd",
  82197. "uc_output": "1f6b4-1f3fd",
  82198. "uc_match": "1f6b4-1f3fd",
  82199. "uc_greedy": "1f6b4-1f3fd",
  82200. "shortnames": [":bicyclist_tone3:"],
  82201. "category": "activity"
  82202. },
  82203. ":person_biking_tone4:": {
  82204. "uc_base": "1f6b4-1f3fe",
  82205. "uc_output": "1f6b4-1f3fe",
  82206. "uc_match": "1f6b4-1f3fe",
  82207. "uc_greedy": "1f6b4-1f3fe",
  82208. "shortnames": [":bicyclist_tone4:"],
  82209. "category": "activity"
  82210. },
  82211. ":person_biking_tone5:": {
  82212. "uc_base": "1f6b4-1f3ff",
  82213. "uc_output": "1f6b4-1f3ff",
  82214. "uc_match": "1f6b4-1f3ff",
  82215. "uc_greedy": "1f6b4-1f3ff",
  82216. "shortnames": [":bicyclist_tone5:"],
  82217. "category": "activity"
  82218. },
  82219. ":person_bowing_tone1:": {
  82220. "uc_base": "1f647-1f3fb",
  82221. "uc_output": "1f647-1f3fb",
  82222. "uc_match": "1f647-1f3fb",
  82223. "uc_greedy": "1f647-1f3fb",
  82224. "shortnames": [":bow_tone1:"],
  82225. "category": "people"
  82226. },
  82227. ":person_bowing_tone2:": {
  82228. "uc_base": "1f647-1f3fc",
  82229. "uc_output": "1f647-1f3fc",
  82230. "uc_match": "1f647-1f3fc",
  82231. "uc_greedy": "1f647-1f3fc",
  82232. "shortnames": [":bow_tone2:"],
  82233. "category": "people"
  82234. },
  82235. ":person_bowing_tone3:": {
  82236. "uc_base": "1f647-1f3fd",
  82237. "uc_output": "1f647-1f3fd",
  82238. "uc_match": "1f647-1f3fd",
  82239. "uc_greedy": "1f647-1f3fd",
  82240. "shortnames": [":bow_tone3:"],
  82241. "category": "people"
  82242. },
  82243. ":person_bowing_tone4:": {
  82244. "uc_base": "1f647-1f3fe",
  82245. "uc_output": "1f647-1f3fe",
  82246. "uc_match": "1f647-1f3fe",
  82247. "uc_greedy": "1f647-1f3fe",
  82248. "shortnames": [":bow_tone4:"],
  82249. "category": "people"
  82250. },
  82251. ":person_bowing_tone5:": {
  82252. "uc_base": "1f647-1f3ff",
  82253. "uc_output": "1f647-1f3ff",
  82254. "uc_match": "1f647-1f3ff",
  82255. "uc_greedy": "1f647-1f3ff",
  82256. "shortnames": [":bow_tone5:"],
  82257. "category": "people"
  82258. },
  82259. ":person_climbing_tone1:": {
  82260. "uc_base": "1f9d7-1f3fb",
  82261. "uc_output": "1f9d7-1f3fb",
  82262. "uc_match": "1f9d7-1f3fb",
  82263. "uc_greedy": "1f9d7-1f3fb",
  82264. "shortnames": [":person_climbing_light_skin_tone:"],
  82265. "category": "activity"
  82266. },
  82267. ":person_climbing_tone2:": {
  82268. "uc_base": "1f9d7-1f3fc",
  82269. "uc_output": "1f9d7-1f3fc",
  82270. "uc_match": "1f9d7-1f3fc",
  82271. "uc_greedy": "1f9d7-1f3fc",
  82272. "shortnames": [":person_climbing_medium_light_skin_tone:"],
  82273. "category": "activity"
  82274. },
  82275. ":person_climbing_tone3:": {
  82276. "uc_base": "1f9d7-1f3fd",
  82277. "uc_output": "1f9d7-1f3fd",
  82278. "uc_match": "1f9d7-1f3fd",
  82279. "uc_greedy": "1f9d7-1f3fd",
  82280. "shortnames": [":person_climbing_medium_skin_tone:"],
  82281. "category": "activity"
  82282. },
  82283. ":person_climbing_tone4:": {
  82284. "uc_base": "1f9d7-1f3fe",
  82285. "uc_output": "1f9d7-1f3fe",
  82286. "uc_match": "1f9d7-1f3fe",
  82287. "uc_greedy": "1f9d7-1f3fe",
  82288. "shortnames": [":person_climbing_medium_dark_skin_tone:"],
  82289. "category": "activity"
  82290. },
  82291. ":person_climbing_tone5:": {
  82292. "uc_base": "1f9d7-1f3ff",
  82293. "uc_output": "1f9d7-1f3ff",
  82294. "uc_match": "1f9d7-1f3ff",
  82295. "uc_greedy": "1f9d7-1f3ff",
  82296. "shortnames": [":person_climbing_dark_skin_tone:"],
  82297. "category": "activity"
  82298. },
  82299. ":person_doing_cartwheel_tone1:": {
  82300. "uc_base": "1f938-1f3fb",
  82301. "uc_output": "1f938-1f3fb",
  82302. "uc_match": "1f938-1f3fb",
  82303. "uc_greedy": "1f938-1f3fb",
  82304. "shortnames": [":cartwheel_tone1:"],
  82305. "category": "activity"
  82306. },
  82307. ":person_doing_cartwheel_tone2:": {
  82308. "uc_base": "1f938-1f3fc",
  82309. "uc_output": "1f938-1f3fc",
  82310. "uc_match": "1f938-1f3fc",
  82311. "uc_greedy": "1f938-1f3fc",
  82312. "shortnames": [":cartwheel_tone2:"],
  82313. "category": "activity"
  82314. },
  82315. ":person_doing_cartwheel_tone3:": {
  82316. "uc_base": "1f938-1f3fd",
  82317. "uc_output": "1f938-1f3fd",
  82318. "uc_match": "1f938-1f3fd",
  82319. "uc_greedy": "1f938-1f3fd",
  82320. "shortnames": [":cartwheel_tone3:"],
  82321. "category": "activity"
  82322. },
  82323. ":person_doing_cartwheel_tone4:": {
  82324. "uc_base": "1f938-1f3fe",
  82325. "uc_output": "1f938-1f3fe",
  82326. "uc_match": "1f938-1f3fe",
  82327. "uc_greedy": "1f938-1f3fe",
  82328. "shortnames": [":cartwheel_tone4:"],
  82329. "category": "activity"
  82330. },
  82331. ":person_doing_cartwheel_tone5:": {
  82332. "uc_base": "1f938-1f3ff",
  82333. "uc_output": "1f938-1f3ff",
  82334. "uc_match": "1f938-1f3ff",
  82335. "uc_greedy": "1f938-1f3ff",
  82336. "shortnames": [":cartwheel_tone5:"],
  82337. "category": "activity"
  82338. },
  82339. ":person_facepalming_tone1:": {
  82340. "uc_base": "1f926-1f3fb",
  82341. "uc_output": "1f926-1f3fb",
  82342. "uc_match": "1f926-1f3fb",
  82343. "uc_greedy": "1f926-1f3fb",
  82344. "shortnames": [":face_palm_tone1:", ":facepalm_tone1:"],
  82345. "category": "people"
  82346. },
  82347. ":person_facepalming_tone2:": {
  82348. "uc_base": "1f926-1f3fc",
  82349. "uc_output": "1f926-1f3fc",
  82350. "uc_match": "1f926-1f3fc",
  82351. "uc_greedy": "1f926-1f3fc",
  82352. "shortnames": [":face_palm_tone2:", ":facepalm_tone2:"],
  82353. "category": "people"
  82354. },
  82355. ":person_facepalming_tone3:": {
  82356. "uc_base": "1f926-1f3fd",
  82357. "uc_output": "1f926-1f3fd",
  82358. "uc_match": "1f926-1f3fd",
  82359. "uc_greedy": "1f926-1f3fd",
  82360. "shortnames": [":face_palm_tone3:", ":facepalm_tone3:"],
  82361. "category": "people"
  82362. },
  82363. ":person_facepalming_tone4:": {
  82364. "uc_base": "1f926-1f3fe",
  82365. "uc_output": "1f926-1f3fe",
  82366. "uc_match": "1f926-1f3fe",
  82367. "uc_greedy": "1f926-1f3fe",
  82368. "shortnames": [":face_palm_tone4:", ":facepalm_tone4:"],
  82369. "category": "people"
  82370. },
  82371. ":person_facepalming_tone5:": {
  82372. "uc_base": "1f926-1f3ff",
  82373. "uc_output": "1f926-1f3ff",
  82374. "uc_match": "1f926-1f3ff",
  82375. "uc_greedy": "1f926-1f3ff",
  82376. "shortnames": [":face_palm_tone5:", ":facepalm_tone5:"],
  82377. "category": "people"
  82378. },
  82379. ":person_frowning_tone1:": {
  82380. "uc_base": "1f64d-1f3fb",
  82381. "uc_output": "1f64d-1f3fb",
  82382. "uc_match": "1f64d-1f3fb",
  82383. "uc_greedy": "1f64d-1f3fb",
  82384. "shortnames": [],
  82385. "category": "people"
  82386. },
  82387. ":person_frowning_tone2:": {
  82388. "uc_base": "1f64d-1f3fc",
  82389. "uc_output": "1f64d-1f3fc",
  82390. "uc_match": "1f64d-1f3fc",
  82391. "uc_greedy": "1f64d-1f3fc",
  82392. "shortnames": [],
  82393. "category": "people"
  82394. },
  82395. ":person_frowning_tone3:": {
  82396. "uc_base": "1f64d-1f3fd",
  82397. "uc_output": "1f64d-1f3fd",
  82398. "uc_match": "1f64d-1f3fd",
  82399. "uc_greedy": "1f64d-1f3fd",
  82400. "shortnames": [],
  82401. "category": "people"
  82402. },
  82403. ":person_frowning_tone4:": {
  82404. "uc_base": "1f64d-1f3fe",
  82405. "uc_output": "1f64d-1f3fe",
  82406. "uc_match": "1f64d-1f3fe",
  82407. "uc_greedy": "1f64d-1f3fe",
  82408. "shortnames": [],
  82409. "category": "people"
  82410. },
  82411. ":person_frowning_tone5:": {
  82412. "uc_base": "1f64d-1f3ff",
  82413. "uc_output": "1f64d-1f3ff",
  82414. "uc_match": "1f64d-1f3ff",
  82415. "uc_greedy": "1f64d-1f3ff",
  82416. "shortnames": [],
  82417. "category": "people"
  82418. },
  82419. ":person_gesturing_no_tone1:": {
  82420. "uc_base": "1f645-1f3fb",
  82421. "uc_output": "1f645-1f3fb",
  82422. "uc_match": "1f645-1f3fb",
  82423. "uc_greedy": "1f645-1f3fb",
  82424. "shortnames": [":no_good_tone1:"],
  82425. "category": "people"
  82426. },
  82427. ":person_gesturing_no_tone2:": {
  82428. "uc_base": "1f645-1f3fc",
  82429. "uc_output": "1f645-1f3fc",
  82430. "uc_match": "1f645-1f3fc",
  82431. "uc_greedy": "1f645-1f3fc",
  82432. "shortnames": [":no_good_tone2:"],
  82433. "category": "people"
  82434. },
  82435. ":person_gesturing_no_tone3:": {
  82436. "uc_base": "1f645-1f3fd",
  82437. "uc_output": "1f645-1f3fd",
  82438. "uc_match": "1f645-1f3fd",
  82439. "uc_greedy": "1f645-1f3fd",
  82440. "shortnames": [":no_good_tone3:"],
  82441. "category": "people"
  82442. },
  82443. ":person_gesturing_no_tone4:": {
  82444. "uc_base": "1f645-1f3fe",
  82445. "uc_output": "1f645-1f3fe",
  82446. "uc_match": "1f645-1f3fe",
  82447. "uc_greedy": "1f645-1f3fe",
  82448. "shortnames": [":no_good_tone4:"],
  82449. "category": "people"
  82450. },
  82451. ":person_gesturing_no_tone5:": {
  82452. "uc_base": "1f645-1f3ff",
  82453. "uc_output": "1f645-1f3ff",
  82454. "uc_match": "1f645-1f3ff",
  82455. "uc_greedy": "1f645-1f3ff",
  82456. "shortnames": [":no_good_tone5:"],
  82457. "category": "people"
  82458. },
  82459. ":person_gesturing_ok_tone1:": {
  82460. "uc_base": "1f646-1f3fb",
  82461. "uc_output": "1f646-1f3fb",
  82462. "uc_match": "1f646-1f3fb",
  82463. "uc_greedy": "1f646-1f3fb",
  82464. "shortnames": [":ok_woman_tone1:"],
  82465. "category": "people"
  82466. },
  82467. ":person_gesturing_ok_tone2:": {
  82468. "uc_base": "1f646-1f3fc",
  82469. "uc_output": "1f646-1f3fc",
  82470. "uc_match": "1f646-1f3fc",
  82471. "uc_greedy": "1f646-1f3fc",
  82472. "shortnames": [":ok_woman_tone2:"],
  82473. "category": "people"
  82474. },
  82475. ":person_gesturing_ok_tone3:": {
  82476. "uc_base": "1f646-1f3fd",
  82477. "uc_output": "1f646-1f3fd",
  82478. "uc_match": "1f646-1f3fd",
  82479. "uc_greedy": "1f646-1f3fd",
  82480. "shortnames": [":ok_woman_tone3:"],
  82481. "category": "people"
  82482. },
  82483. ":person_gesturing_ok_tone4:": {
  82484. "uc_base": "1f646-1f3fe",
  82485. "uc_output": "1f646-1f3fe",
  82486. "uc_match": "1f646-1f3fe",
  82487. "uc_greedy": "1f646-1f3fe",
  82488. "shortnames": [":ok_woman_tone4:"],
  82489. "category": "people"
  82490. },
  82491. ":person_gesturing_ok_tone5:": {
  82492. "uc_base": "1f646-1f3ff",
  82493. "uc_output": "1f646-1f3ff",
  82494. "uc_match": "1f646-1f3ff",
  82495. "uc_greedy": "1f646-1f3ff",
  82496. "shortnames": [":ok_woman_tone5:"],
  82497. "category": "people"
  82498. },
  82499. ":person_getting_haircut_tone1:": {
  82500. "uc_base": "1f487-1f3fb",
  82501. "uc_output": "1f487-1f3fb",
  82502. "uc_match": "1f487-1f3fb",
  82503. "uc_greedy": "1f487-1f3fb",
  82504. "shortnames": [":haircut_tone1:"],
  82505. "category": "people"
  82506. },
  82507. ":person_getting_haircut_tone2:": {
  82508. "uc_base": "1f487-1f3fc",
  82509. "uc_output": "1f487-1f3fc",
  82510. "uc_match": "1f487-1f3fc",
  82511. "uc_greedy": "1f487-1f3fc",
  82512. "shortnames": [":haircut_tone2:"],
  82513. "category": "people"
  82514. },
  82515. ":person_getting_haircut_tone3:": {
  82516. "uc_base": "1f487-1f3fd",
  82517. "uc_output": "1f487-1f3fd",
  82518. "uc_match": "1f487-1f3fd",
  82519. "uc_greedy": "1f487-1f3fd",
  82520. "shortnames": [":haircut_tone3:"],
  82521. "category": "people"
  82522. },
  82523. ":person_getting_haircut_tone4:": {
  82524. "uc_base": "1f487-1f3fe",
  82525. "uc_output": "1f487-1f3fe",
  82526. "uc_match": "1f487-1f3fe",
  82527. "uc_greedy": "1f487-1f3fe",
  82528. "shortnames": [":haircut_tone4:"],
  82529. "category": "people"
  82530. },
  82531. ":person_getting_haircut_tone5:": {
  82532. "uc_base": "1f487-1f3ff",
  82533. "uc_output": "1f487-1f3ff",
  82534. "uc_match": "1f487-1f3ff",
  82535. "uc_greedy": "1f487-1f3ff",
  82536. "shortnames": [":haircut_tone5:"],
  82537. "category": "people"
  82538. },
  82539. ":person_getting_massage_tone1:": {
  82540. "uc_base": "1f486-1f3fb",
  82541. "uc_output": "1f486-1f3fb",
  82542. "uc_match": "1f486-1f3fb",
  82543. "uc_greedy": "1f486-1f3fb",
  82544. "shortnames": [":massage_tone1:"],
  82545. "category": "people"
  82546. },
  82547. ":person_getting_massage_tone2:": {
  82548. "uc_base": "1f486-1f3fc",
  82549. "uc_output": "1f486-1f3fc",
  82550. "uc_match": "1f486-1f3fc",
  82551. "uc_greedy": "1f486-1f3fc",
  82552. "shortnames": [":massage_tone2:"],
  82553. "category": "people"
  82554. },
  82555. ":person_getting_massage_tone3:": {
  82556. "uc_base": "1f486-1f3fd",
  82557. "uc_output": "1f486-1f3fd",
  82558. "uc_match": "1f486-1f3fd",
  82559. "uc_greedy": "1f486-1f3fd",
  82560. "shortnames": [":massage_tone3:"],
  82561. "category": "people"
  82562. },
  82563. ":person_getting_massage_tone4:": {
  82564. "uc_base": "1f486-1f3fe",
  82565. "uc_output": "1f486-1f3fe",
  82566. "uc_match": "1f486-1f3fe",
  82567. "uc_greedy": "1f486-1f3fe",
  82568. "shortnames": [":massage_tone4:"],
  82569. "category": "people"
  82570. },
  82571. ":person_getting_massage_tone5:": {
  82572. "uc_base": "1f486-1f3ff",
  82573. "uc_output": "1f486-1f3ff",
  82574. "uc_match": "1f486-1f3ff",
  82575. "uc_greedy": "1f486-1f3ff",
  82576. "shortnames": [":massage_tone5:"],
  82577. "category": "people"
  82578. },
  82579. ":person_golfing_tone1:": {
  82580. "uc_base": "1f3cc-1f3fb",
  82581. "uc_output": "1f3cc-1f3fb",
  82582. "uc_match": "1f3cc-fe0f-1f3fb",
  82583. "uc_greedy": "1f3cc-fe0f-1f3fb",
  82584. "shortnames": [":person_golfing_light_skin_tone:"],
  82585. "category": "activity"
  82586. },
  82587. ":person_golfing_tone2:": {
  82588. "uc_base": "1f3cc-1f3fc",
  82589. "uc_output": "1f3cc-1f3fc",
  82590. "uc_match": "1f3cc-fe0f-1f3fc",
  82591. "uc_greedy": "1f3cc-fe0f-1f3fc",
  82592. "shortnames": [":person_golfing_medium_light_skin_tone:"],
  82593. "category": "activity"
  82594. },
  82595. ":person_golfing_tone3:": {
  82596. "uc_base": "1f3cc-1f3fd",
  82597. "uc_output": "1f3cc-1f3fd",
  82598. "uc_match": "1f3cc-fe0f-1f3fd",
  82599. "uc_greedy": "1f3cc-fe0f-1f3fd",
  82600. "shortnames": [":person_golfing_medium_skin_tone:"],
  82601. "category": "activity"
  82602. },
  82603. ":person_golfing_tone4:": {
  82604. "uc_base": "1f3cc-1f3fe",
  82605. "uc_output": "1f3cc-1f3fe",
  82606. "uc_match": "1f3cc-fe0f-1f3fe",
  82607. "uc_greedy": "1f3cc-fe0f-1f3fe",
  82608. "shortnames": [":person_golfing_medium_dark_skin_tone:"],
  82609. "category": "activity"
  82610. },
  82611. ":person_golfing_tone5:": {
  82612. "uc_base": "1f3cc-1f3ff",
  82613. "uc_output": "1f3cc-1f3ff",
  82614. "uc_match": "1f3cc-fe0f-1f3ff",
  82615. "uc_greedy": "1f3cc-fe0f-1f3ff",
  82616. "shortnames": [":person_golfing_dark_skin_tone:"],
  82617. "category": "activity"
  82618. },
  82619. ":person_in_bed_tone1:": {
  82620. "uc_base": "1f6cc-1f3fb",
  82621. "uc_output": "1f6cc-1f3fb",
  82622. "uc_match": "1f6cc-1f3fb",
  82623. "uc_greedy": "1f6cc-1f3fb",
  82624. "shortnames": [":person_in_bed_light_skin_tone:"],
  82625. "category": "objects"
  82626. },
  82627. ":person_in_bed_tone2:": {
  82628. "uc_base": "1f6cc-1f3fc",
  82629. "uc_output": "1f6cc-1f3fc",
  82630. "uc_match": "1f6cc-1f3fc",
  82631. "uc_greedy": "1f6cc-1f3fc",
  82632. "shortnames": [":person_in_bed_medium_light_skin_tone:"],
  82633. "category": "objects"
  82634. },
  82635. ":person_in_bed_tone3:": {
  82636. "uc_base": "1f6cc-1f3fd",
  82637. "uc_output": "1f6cc-1f3fd",
  82638. "uc_match": "1f6cc-1f3fd",
  82639. "uc_greedy": "1f6cc-1f3fd",
  82640. "shortnames": [":person_in_bed_medium_skin_tone:"],
  82641. "category": "objects"
  82642. },
  82643. ":person_in_bed_tone4:": {
  82644. "uc_base": "1f6cc-1f3fe",
  82645. "uc_output": "1f6cc-1f3fe",
  82646. "uc_match": "1f6cc-1f3fe",
  82647. "uc_greedy": "1f6cc-1f3fe",
  82648. "shortnames": [":person_in_bed_medium_dark_skin_tone:"],
  82649. "category": "objects"
  82650. },
  82651. ":person_in_bed_tone5:": {
  82652. "uc_base": "1f6cc-1f3ff",
  82653. "uc_output": "1f6cc-1f3ff",
  82654. "uc_match": "1f6cc-1f3ff",
  82655. "uc_greedy": "1f6cc-1f3ff",
  82656. "shortnames": [":person_in_bed_dark_skin_tone:"],
  82657. "category": "objects"
  82658. },
  82659. ":person_in_lotus_position_tone1:": {
  82660. "uc_base": "1f9d8-1f3fb",
  82661. "uc_output": "1f9d8-1f3fb",
  82662. "uc_match": "1f9d8-1f3fb",
  82663. "uc_greedy": "1f9d8-1f3fb",
  82664. "shortnames": [":person_in_lotus_position_light_skin_tone:"],
  82665. "category": "activity"
  82666. },
  82667. ":person_in_lotus_position_tone2:": {
  82668. "uc_base": "1f9d8-1f3fc",
  82669. "uc_output": "1f9d8-1f3fc",
  82670. "uc_match": "1f9d8-1f3fc",
  82671. "uc_greedy": "1f9d8-1f3fc",
  82672. "shortnames": [":person_in_lotus_position_medium_light_skin_tone:"],
  82673. "category": "activity"
  82674. },
  82675. ":person_in_lotus_position_tone3:": {
  82676. "uc_base": "1f9d8-1f3fd",
  82677. "uc_output": "1f9d8-1f3fd",
  82678. "uc_match": "1f9d8-1f3fd",
  82679. "uc_greedy": "1f9d8-1f3fd",
  82680. "shortnames": [":person_in_lotus_position_medium_skin_tone:"],
  82681. "category": "activity"
  82682. },
  82683. ":person_in_lotus_position_tone4:": {
  82684. "uc_base": "1f9d8-1f3fe",
  82685. "uc_output": "1f9d8-1f3fe",
  82686. "uc_match": "1f9d8-1f3fe",
  82687. "uc_greedy": "1f9d8-1f3fe",
  82688. "shortnames": [":person_in_lotus_position_medium_dark_skin_tone:"],
  82689. "category": "activity"
  82690. },
  82691. ":person_in_lotus_position_tone5:": {
  82692. "uc_base": "1f9d8-1f3ff",
  82693. "uc_output": "1f9d8-1f3ff",
  82694. "uc_match": "1f9d8-1f3ff",
  82695. "uc_greedy": "1f9d8-1f3ff",
  82696. "shortnames": [":person_in_lotus_position_dark_skin_tone:"],
  82697. "category": "activity"
  82698. },
  82699. ":person_in_steamy_room_tone1:": {
  82700. "uc_base": "1f9d6-1f3fb",
  82701. "uc_output": "1f9d6-1f3fb",
  82702. "uc_match": "1f9d6-1f3fb",
  82703. "uc_greedy": "1f9d6-1f3fb",
  82704. "shortnames": [":person_in_steamy_room_light_skin_tone:"],
  82705. "category": "people"
  82706. },
  82707. ":person_in_steamy_room_tone2:": {
  82708. "uc_base": "1f9d6-1f3fc",
  82709. "uc_output": "1f9d6-1f3fc",
  82710. "uc_match": "1f9d6-1f3fc",
  82711. "uc_greedy": "1f9d6-1f3fc",
  82712. "shortnames": [":person_in_steamy_room_medium_light_skin_tone:"],
  82713. "category": "people"
  82714. },
  82715. ":person_in_steamy_room_tone3:": {
  82716. "uc_base": "1f9d6-1f3fd",
  82717. "uc_output": "1f9d6-1f3fd",
  82718. "uc_match": "1f9d6-1f3fd",
  82719. "uc_greedy": "1f9d6-1f3fd",
  82720. "shortnames": [":person_in_steamy_room_medium_skin_tone:"],
  82721. "category": "people"
  82722. },
  82723. ":person_in_steamy_room_tone4:": {
  82724. "uc_base": "1f9d6-1f3fe",
  82725. "uc_output": "1f9d6-1f3fe",
  82726. "uc_match": "1f9d6-1f3fe",
  82727. "uc_greedy": "1f9d6-1f3fe",
  82728. "shortnames": [":person_in_steamy_room_medium_dark_skin_tone:"],
  82729. "category": "people"
  82730. },
  82731. ":person_in_steamy_room_tone5:": {
  82732. "uc_base": "1f9d6-1f3ff",
  82733. "uc_output": "1f9d6-1f3ff",
  82734. "uc_match": "1f9d6-1f3ff",
  82735. "uc_greedy": "1f9d6-1f3ff",
  82736. "shortnames": [":person_in_steamy_room_dark_skin_tone:"],
  82737. "category": "people"
  82738. },
  82739. ":person_juggling_tone1:": {
  82740. "uc_base": "1f939-1f3fb",
  82741. "uc_output": "1f939-1f3fb",
  82742. "uc_match": "1f939-1f3fb",
  82743. "uc_greedy": "1f939-1f3fb",
  82744. "shortnames": [":juggling_tone1:", ":juggler_tone1:"],
  82745. "category": "activity"
  82746. },
  82747. ":person_juggling_tone2:": {
  82748. "uc_base": "1f939-1f3fc",
  82749. "uc_output": "1f939-1f3fc",
  82750. "uc_match": "1f939-1f3fc",
  82751. "uc_greedy": "1f939-1f3fc",
  82752. "shortnames": [":juggling_tone2:", ":juggler_tone2:"],
  82753. "category": "activity"
  82754. },
  82755. ":person_juggling_tone3:": {
  82756. "uc_base": "1f939-1f3fd",
  82757. "uc_output": "1f939-1f3fd",
  82758. "uc_match": "1f939-1f3fd",
  82759. "uc_greedy": "1f939-1f3fd",
  82760. "shortnames": [":juggling_tone3:", ":juggler_tone3:"],
  82761. "category": "activity"
  82762. },
  82763. ":person_juggling_tone4:": {
  82764. "uc_base": "1f939-1f3fe",
  82765. "uc_output": "1f939-1f3fe",
  82766. "uc_match": "1f939-1f3fe",
  82767. "uc_greedy": "1f939-1f3fe",
  82768. "shortnames": [":juggling_tone4:", ":juggler_tone4:"],
  82769. "category": "activity"
  82770. },
  82771. ":person_juggling_tone5:": {
  82772. "uc_base": "1f939-1f3ff",
  82773. "uc_output": "1f939-1f3ff",
  82774. "uc_match": "1f939-1f3ff",
  82775. "uc_greedy": "1f939-1f3ff",
  82776. "shortnames": [":juggling_tone5:", ":juggler_tone5:"],
  82777. "category": "activity"
  82778. },
  82779. ":person_lifting_weights_tone1:": {
  82780. "uc_base": "1f3cb-1f3fb",
  82781. "uc_output": "1f3cb-1f3fb",
  82782. "uc_match": "1f3cb-fe0f-1f3fb",
  82783. "uc_greedy": "1f3cb-fe0f-1f3fb",
  82784. "shortnames": [":lifter_tone1:", ":weight_lifter_tone1:"],
  82785. "category": "activity"
  82786. },
  82787. ":person_lifting_weights_tone2:": {
  82788. "uc_base": "1f3cb-1f3fc",
  82789. "uc_output": "1f3cb-1f3fc",
  82790. "uc_match": "1f3cb-fe0f-1f3fc",
  82791. "uc_greedy": "1f3cb-fe0f-1f3fc",
  82792. "shortnames": [":lifter_tone2:", ":weight_lifter_tone2:"],
  82793. "category": "activity"
  82794. },
  82795. ":person_lifting_weights_tone3:": {
  82796. "uc_base": "1f3cb-1f3fd",
  82797. "uc_output": "1f3cb-1f3fd",
  82798. "uc_match": "1f3cb-fe0f-1f3fd",
  82799. "uc_greedy": "1f3cb-fe0f-1f3fd",
  82800. "shortnames": [":lifter_tone3:", ":weight_lifter_tone3:"],
  82801. "category": "activity"
  82802. },
  82803. ":person_lifting_weights_tone4:": {
  82804. "uc_base": "1f3cb-1f3fe",
  82805. "uc_output": "1f3cb-1f3fe",
  82806. "uc_match": "1f3cb-fe0f-1f3fe",
  82807. "uc_greedy": "1f3cb-fe0f-1f3fe",
  82808. "shortnames": [":lifter_tone4:", ":weight_lifter_tone4:"],
  82809. "category": "activity"
  82810. },
  82811. ":person_lifting_weights_tone5:": {
  82812. "uc_base": "1f3cb-1f3ff",
  82813. "uc_output": "1f3cb-1f3ff",
  82814. "uc_match": "1f3cb-fe0f-1f3ff",
  82815. "uc_greedy": "1f3cb-fe0f-1f3ff",
  82816. "shortnames": [":lifter_tone5:", ":weight_lifter_tone5:"],
  82817. "category": "activity"
  82818. },
  82819. ":person_mountain_biking_tone1:": {
  82820. "uc_base": "1f6b5-1f3fb",
  82821. "uc_output": "1f6b5-1f3fb",
  82822. "uc_match": "1f6b5-1f3fb",
  82823. "uc_greedy": "1f6b5-1f3fb",
  82824. "shortnames": [":mountain_bicyclist_tone1:"],
  82825. "category": "activity"
  82826. },
  82827. ":person_mountain_biking_tone2:": {
  82828. "uc_base": "1f6b5-1f3fc",
  82829. "uc_output": "1f6b5-1f3fc",
  82830. "uc_match": "1f6b5-1f3fc",
  82831. "uc_greedy": "1f6b5-1f3fc",
  82832. "shortnames": [":mountain_bicyclist_tone2:"],
  82833. "category": "activity"
  82834. },
  82835. ":person_mountain_biking_tone3:": {
  82836. "uc_base": "1f6b5-1f3fd",
  82837. "uc_output": "1f6b5-1f3fd",
  82838. "uc_match": "1f6b5-1f3fd",
  82839. "uc_greedy": "1f6b5-1f3fd",
  82840. "shortnames": [":mountain_bicyclist_tone3:"],
  82841. "category": "activity"
  82842. },
  82843. ":person_mountain_biking_tone4:": {
  82844. "uc_base": "1f6b5-1f3fe",
  82845. "uc_output": "1f6b5-1f3fe",
  82846. "uc_match": "1f6b5-1f3fe",
  82847. "uc_greedy": "1f6b5-1f3fe",
  82848. "shortnames": [":mountain_bicyclist_tone4:"],
  82849. "category": "activity"
  82850. },
  82851. ":person_mountain_biking_tone5:": {
  82852. "uc_base": "1f6b5-1f3ff",
  82853. "uc_output": "1f6b5-1f3ff",
  82854. "uc_match": "1f6b5-1f3ff",
  82855. "uc_greedy": "1f6b5-1f3ff",
  82856. "shortnames": [":mountain_bicyclist_tone5:"],
  82857. "category": "activity"
  82858. },
  82859. ":person_playing_handball_tone1:": {
  82860. "uc_base": "1f93e-1f3fb",
  82861. "uc_output": "1f93e-1f3fb",
  82862. "uc_match": "1f93e-1f3fb",
  82863. "uc_greedy": "1f93e-1f3fb",
  82864. "shortnames": [":handball_tone1:"],
  82865. "category": "activity"
  82866. },
  82867. ":person_playing_handball_tone2:": {
  82868. "uc_base": "1f93e-1f3fc",
  82869. "uc_output": "1f93e-1f3fc",
  82870. "uc_match": "1f93e-1f3fc",
  82871. "uc_greedy": "1f93e-1f3fc",
  82872. "shortnames": [":handball_tone2:"],
  82873. "category": "activity"
  82874. },
  82875. ":person_playing_handball_tone3:": {
  82876. "uc_base": "1f93e-1f3fd",
  82877. "uc_output": "1f93e-1f3fd",
  82878. "uc_match": "1f93e-1f3fd",
  82879. "uc_greedy": "1f93e-1f3fd",
  82880. "shortnames": [":handball_tone3:"],
  82881. "category": "activity"
  82882. },
  82883. ":person_playing_handball_tone4:": {
  82884. "uc_base": "1f93e-1f3fe",
  82885. "uc_output": "1f93e-1f3fe",
  82886. "uc_match": "1f93e-1f3fe",
  82887. "uc_greedy": "1f93e-1f3fe",
  82888. "shortnames": [":handball_tone4:"],
  82889. "category": "activity"
  82890. },
  82891. ":person_playing_handball_tone5:": {
  82892. "uc_base": "1f93e-1f3ff",
  82893. "uc_output": "1f93e-1f3ff",
  82894. "uc_match": "1f93e-1f3ff",
  82895. "uc_greedy": "1f93e-1f3ff",
  82896. "shortnames": [":handball_tone5:"],
  82897. "category": "activity"
  82898. },
  82899. ":person_playing_water_polo_tone1:": {
  82900. "uc_base": "1f93d-1f3fb",
  82901. "uc_output": "1f93d-1f3fb",
  82902. "uc_match": "1f93d-1f3fb",
  82903. "uc_greedy": "1f93d-1f3fb",
  82904. "shortnames": [":water_polo_tone1:"],
  82905. "category": "activity"
  82906. },
  82907. ":person_playing_water_polo_tone2:": {
  82908. "uc_base": "1f93d-1f3fc",
  82909. "uc_output": "1f93d-1f3fc",
  82910. "uc_match": "1f93d-1f3fc",
  82911. "uc_greedy": "1f93d-1f3fc",
  82912. "shortnames": [":water_polo_tone2:"],
  82913. "category": "activity"
  82914. },
  82915. ":person_playing_water_polo_tone3:": {
  82916. "uc_base": "1f93d-1f3fd",
  82917. "uc_output": "1f93d-1f3fd",
  82918. "uc_match": "1f93d-1f3fd",
  82919. "uc_greedy": "1f93d-1f3fd",
  82920. "shortnames": [":water_polo_tone3:"],
  82921. "category": "activity"
  82922. },
  82923. ":person_playing_water_polo_tone4:": {
  82924. "uc_base": "1f93d-1f3fe",
  82925. "uc_output": "1f93d-1f3fe",
  82926. "uc_match": "1f93d-1f3fe",
  82927. "uc_greedy": "1f93d-1f3fe",
  82928. "shortnames": [":water_polo_tone4:"],
  82929. "category": "activity"
  82930. },
  82931. ":person_playing_water_polo_tone5:": {
  82932. "uc_base": "1f93d-1f3ff",
  82933. "uc_output": "1f93d-1f3ff",
  82934. "uc_match": "1f93d-1f3ff",
  82935. "uc_greedy": "1f93d-1f3ff",
  82936. "shortnames": [":water_polo_tone5:"],
  82937. "category": "activity"
  82938. },
  82939. ":person_pouting_tone1:": {
  82940. "uc_base": "1f64e-1f3fb",
  82941. "uc_output": "1f64e-1f3fb",
  82942. "uc_match": "1f64e-1f3fb",
  82943. "uc_greedy": "1f64e-1f3fb",
  82944. "shortnames": [":person_with_pouting_face_tone1:"],
  82945. "category": "people"
  82946. },
  82947. ":person_pouting_tone2:": {
  82948. "uc_base": "1f64e-1f3fc",
  82949. "uc_output": "1f64e-1f3fc",
  82950. "uc_match": "1f64e-1f3fc",
  82951. "uc_greedy": "1f64e-1f3fc",
  82952. "shortnames": [":person_with_pouting_face_tone2:"],
  82953. "category": "people"
  82954. },
  82955. ":person_pouting_tone3:": {
  82956. "uc_base": "1f64e-1f3fd",
  82957. "uc_output": "1f64e-1f3fd",
  82958. "uc_match": "1f64e-1f3fd",
  82959. "uc_greedy": "1f64e-1f3fd",
  82960. "shortnames": [":person_with_pouting_face_tone3:"],
  82961. "category": "people"
  82962. },
  82963. ":person_pouting_tone4:": {
  82964. "uc_base": "1f64e-1f3fe",
  82965. "uc_output": "1f64e-1f3fe",
  82966. "uc_match": "1f64e-1f3fe",
  82967. "uc_greedy": "1f64e-1f3fe",
  82968. "shortnames": [":person_with_pouting_face_tone4:"],
  82969. "category": "people"
  82970. },
  82971. ":person_pouting_tone5:": {
  82972. "uc_base": "1f64e-1f3ff",
  82973. "uc_output": "1f64e-1f3ff",
  82974. "uc_match": "1f64e-1f3ff",
  82975. "uc_greedy": "1f64e-1f3ff",
  82976. "shortnames": [":person_with_pouting_face_tone5:"],
  82977. "category": "people"
  82978. },
  82979. ":person_raising_hand_tone1:": {
  82980. "uc_base": "1f64b-1f3fb",
  82981. "uc_output": "1f64b-1f3fb",
  82982. "uc_match": "1f64b-1f3fb",
  82983. "uc_greedy": "1f64b-1f3fb",
  82984. "shortnames": [":raising_hand_tone1:"],
  82985. "category": "people"
  82986. },
  82987. ":person_raising_hand_tone2:": {
  82988. "uc_base": "1f64b-1f3fc",
  82989. "uc_output": "1f64b-1f3fc",
  82990. "uc_match": "1f64b-1f3fc",
  82991. "uc_greedy": "1f64b-1f3fc",
  82992. "shortnames": [":raising_hand_tone2:"],
  82993. "category": "people"
  82994. },
  82995. ":person_raising_hand_tone3:": {
  82996. "uc_base": "1f64b-1f3fd",
  82997. "uc_output": "1f64b-1f3fd",
  82998. "uc_match": "1f64b-1f3fd",
  82999. "uc_greedy": "1f64b-1f3fd",
  83000. "shortnames": [":raising_hand_tone3:"],
  83001. "category": "people"
  83002. },
  83003. ":person_raising_hand_tone4:": {
  83004. "uc_base": "1f64b-1f3fe",
  83005. "uc_output": "1f64b-1f3fe",
  83006. "uc_match": "1f64b-1f3fe",
  83007. "uc_greedy": "1f64b-1f3fe",
  83008. "shortnames": [":raising_hand_tone4:"],
  83009. "category": "people"
  83010. },
  83011. ":person_raising_hand_tone5:": {
  83012. "uc_base": "1f64b-1f3ff",
  83013. "uc_output": "1f64b-1f3ff",
  83014. "uc_match": "1f64b-1f3ff",
  83015. "uc_greedy": "1f64b-1f3ff",
  83016. "shortnames": [":raising_hand_tone5:"],
  83017. "category": "people"
  83018. },
  83019. ":person_rowing_boat_tone1:": {
  83020. "uc_base": "1f6a3-1f3fb",
  83021. "uc_output": "1f6a3-1f3fb",
  83022. "uc_match": "1f6a3-1f3fb",
  83023. "uc_greedy": "1f6a3-1f3fb",
  83024. "shortnames": [":rowboat_tone1:"],
  83025. "category": "activity"
  83026. },
  83027. ":person_rowing_boat_tone2:": {
  83028. "uc_base": "1f6a3-1f3fc",
  83029. "uc_output": "1f6a3-1f3fc",
  83030. "uc_match": "1f6a3-1f3fc",
  83031. "uc_greedy": "1f6a3-1f3fc",
  83032. "shortnames": [":rowboat_tone2:"],
  83033. "category": "activity"
  83034. },
  83035. ":person_rowing_boat_tone3:": {
  83036. "uc_base": "1f6a3-1f3fd",
  83037. "uc_output": "1f6a3-1f3fd",
  83038. "uc_match": "1f6a3-1f3fd",
  83039. "uc_greedy": "1f6a3-1f3fd",
  83040. "shortnames": [":rowboat_tone3:"],
  83041. "category": "activity"
  83042. },
  83043. ":person_rowing_boat_tone4:": {
  83044. "uc_base": "1f6a3-1f3fe",
  83045. "uc_output": "1f6a3-1f3fe",
  83046. "uc_match": "1f6a3-1f3fe",
  83047. "uc_greedy": "1f6a3-1f3fe",
  83048. "shortnames": [":rowboat_tone4:"],
  83049. "category": "activity"
  83050. },
  83051. ":person_rowing_boat_tone5:": {
  83052. "uc_base": "1f6a3-1f3ff",
  83053. "uc_output": "1f6a3-1f3ff",
  83054. "uc_match": "1f6a3-1f3ff",
  83055. "uc_greedy": "1f6a3-1f3ff",
  83056. "shortnames": [":rowboat_tone5:"],
  83057. "category": "activity"
  83058. },
  83059. ":person_running_tone1:": {
  83060. "uc_base": "1f3c3-1f3fb",
  83061. "uc_output": "1f3c3-1f3fb",
  83062. "uc_match": "1f3c3-1f3fb",
  83063. "uc_greedy": "1f3c3-1f3fb",
  83064. "shortnames": [":runner_tone1:"],
  83065. "category": "people"
  83066. },
  83067. ":person_running_tone2:": {
  83068. "uc_base": "1f3c3-1f3fc",
  83069. "uc_output": "1f3c3-1f3fc",
  83070. "uc_match": "1f3c3-1f3fc",
  83071. "uc_greedy": "1f3c3-1f3fc",
  83072. "shortnames": [":runner_tone2:"],
  83073. "category": "people"
  83074. },
  83075. ":person_running_tone3:": {
  83076. "uc_base": "1f3c3-1f3fd",
  83077. "uc_output": "1f3c3-1f3fd",
  83078. "uc_match": "1f3c3-1f3fd",
  83079. "uc_greedy": "1f3c3-1f3fd",
  83080. "shortnames": [":runner_tone3:"],
  83081. "category": "people"
  83082. },
  83083. ":person_running_tone4:": {
  83084. "uc_base": "1f3c3-1f3fe",
  83085. "uc_output": "1f3c3-1f3fe",
  83086. "uc_match": "1f3c3-1f3fe",
  83087. "uc_greedy": "1f3c3-1f3fe",
  83088. "shortnames": [":runner_tone4:"],
  83089. "category": "people"
  83090. },
  83091. ":person_running_tone5:": {
  83092. "uc_base": "1f3c3-1f3ff",
  83093. "uc_output": "1f3c3-1f3ff",
  83094. "uc_match": "1f3c3-1f3ff",
  83095. "uc_greedy": "1f3c3-1f3ff",
  83096. "shortnames": [":runner_tone5:"],
  83097. "category": "people"
  83098. },
  83099. ":person_shrugging_tone1:": {
  83100. "uc_base": "1f937-1f3fb",
  83101. "uc_output": "1f937-1f3fb",
  83102. "uc_match": "1f937-1f3fb",
  83103. "uc_greedy": "1f937-1f3fb",
  83104. "shortnames": [":shrug_tone1:"],
  83105. "category": "people"
  83106. },
  83107. ":person_shrugging_tone2:": {
  83108. "uc_base": "1f937-1f3fc",
  83109. "uc_output": "1f937-1f3fc",
  83110. "uc_match": "1f937-1f3fc",
  83111. "uc_greedy": "1f937-1f3fc",
  83112. "shortnames": [":shrug_tone2:"],
  83113. "category": "people"
  83114. },
  83115. ":person_shrugging_tone3:": {
  83116. "uc_base": "1f937-1f3fd",
  83117. "uc_output": "1f937-1f3fd",
  83118. "uc_match": "1f937-1f3fd",
  83119. "uc_greedy": "1f937-1f3fd",
  83120. "shortnames": [":shrug_tone3:"],
  83121. "category": "people"
  83122. },
  83123. ":person_shrugging_tone4:": {
  83124. "uc_base": "1f937-1f3fe",
  83125. "uc_output": "1f937-1f3fe",
  83126. "uc_match": "1f937-1f3fe",
  83127. "uc_greedy": "1f937-1f3fe",
  83128. "shortnames": [":shrug_tone4:"],
  83129. "category": "people"
  83130. },
  83131. ":person_shrugging_tone5:": {
  83132. "uc_base": "1f937-1f3ff",
  83133. "uc_output": "1f937-1f3ff",
  83134. "uc_match": "1f937-1f3ff",
  83135. "uc_greedy": "1f937-1f3ff",
  83136. "shortnames": [":shrug_tone5:"],
  83137. "category": "people"
  83138. },
  83139. ":person_surfing_tone1:": {
  83140. "uc_base": "1f3c4-1f3fb",
  83141. "uc_output": "1f3c4-1f3fb",
  83142. "uc_match": "1f3c4-1f3fb",
  83143. "uc_greedy": "1f3c4-1f3fb",
  83144. "shortnames": [":surfer_tone1:"],
  83145. "category": "activity"
  83146. },
  83147. ":person_surfing_tone2:": {
  83148. "uc_base": "1f3c4-1f3fc",
  83149. "uc_output": "1f3c4-1f3fc",
  83150. "uc_match": "1f3c4-1f3fc",
  83151. "uc_greedy": "1f3c4-1f3fc",
  83152. "shortnames": [":surfer_tone2:"],
  83153. "category": "activity"
  83154. },
  83155. ":person_surfing_tone3:": {
  83156. "uc_base": "1f3c4-1f3fd",
  83157. "uc_output": "1f3c4-1f3fd",
  83158. "uc_match": "1f3c4-1f3fd",
  83159. "uc_greedy": "1f3c4-1f3fd",
  83160. "shortnames": [":surfer_tone3:"],
  83161. "category": "activity"
  83162. },
  83163. ":person_surfing_tone4:": {
  83164. "uc_base": "1f3c4-1f3fe",
  83165. "uc_output": "1f3c4-1f3fe",
  83166. "uc_match": "1f3c4-1f3fe",
  83167. "uc_greedy": "1f3c4-1f3fe",
  83168. "shortnames": [":surfer_tone4:"],
  83169. "category": "activity"
  83170. },
  83171. ":person_surfing_tone5:": {
  83172. "uc_base": "1f3c4-1f3ff",
  83173. "uc_output": "1f3c4-1f3ff",
  83174. "uc_match": "1f3c4-1f3ff",
  83175. "uc_greedy": "1f3c4-1f3ff",
  83176. "shortnames": [":surfer_tone5:"],
  83177. "category": "activity"
  83178. },
  83179. ":person_swimming_tone1:": {
  83180. "uc_base": "1f3ca-1f3fb",
  83181. "uc_output": "1f3ca-1f3fb",
  83182. "uc_match": "1f3ca-1f3fb",
  83183. "uc_greedy": "1f3ca-1f3fb",
  83184. "shortnames": [":swimmer_tone1:"],
  83185. "category": "activity"
  83186. },
  83187. ":person_swimming_tone2:": {
  83188. "uc_base": "1f3ca-1f3fc",
  83189. "uc_output": "1f3ca-1f3fc",
  83190. "uc_match": "1f3ca-1f3fc",
  83191. "uc_greedy": "1f3ca-1f3fc",
  83192. "shortnames": [":swimmer_tone2:"],
  83193. "category": "activity"
  83194. },
  83195. ":person_swimming_tone3:": {
  83196. "uc_base": "1f3ca-1f3fd",
  83197. "uc_output": "1f3ca-1f3fd",
  83198. "uc_match": "1f3ca-1f3fd",
  83199. "uc_greedy": "1f3ca-1f3fd",
  83200. "shortnames": [":swimmer_tone3:"],
  83201. "category": "activity"
  83202. },
  83203. ":person_swimming_tone4:": {
  83204. "uc_base": "1f3ca-1f3fe",
  83205. "uc_output": "1f3ca-1f3fe",
  83206. "uc_match": "1f3ca-1f3fe",
  83207. "uc_greedy": "1f3ca-1f3fe",
  83208. "shortnames": [":swimmer_tone4:"],
  83209. "category": "activity"
  83210. },
  83211. ":person_swimming_tone5:": {
  83212. "uc_base": "1f3ca-1f3ff",
  83213. "uc_output": "1f3ca-1f3ff",
  83214. "uc_match": "1f3ca-1f3ff",
  83215. "uc_greedy": "1f3ca-1f3ff",
  83216. "shortnames": [":swimmer_tone5:"],
  83217. "category": "activity"
  83218. },
  83219. ":person_tipping_hand_tone1:": {
  83220. "uc_base": "1f481-1f3fb",
  83221. "uc_output": "1f481-1f3fb",
  83222. "uc_match": "1f481-1f3fb",
  83223. "uc_greedy": "1f481-1f3fb",
  83224. "shortnames": [":information_desk_person_tone1:"],
  83225. "category": "people"
  83226. },
  83227. ":person_tipping_hand_tone2:": {
  83228. "uc_base": "1f481-1f3fc",
  83229. "uc_output": "1f481-1f3fc",
  83230. "uc_match": "1f481-1f3fc",
  83231. "uc_greedy": "1f481-1f3fc",
  83232. "shortnames": [":information_desk_person_tone2:"],
  83233. "category": "people"
  83234. },
  83235. ":person_tipping_hand_tone3:": {
  83236. "uc_base": "1f481-1f3fd",
  83237. "uc_output": "1f481-1f3fd",
  83238. "uc_match": "1f481-1f3fd",
  83239. "uc_greedy": "1f481-1f3fd",
  83240. "shortnames": [":information_desk_person_tone3:"],
  83241. "category": "people"
  83242. },
  83243. ":person_tipping_hand_tone4:": {
  83244. "uc_base": "1f481-1f3fe",
  83245. "uc_output": "1f481-1f3fe",
  83246. "uc_match": "1f481-1f3fe",
  83247. "uc_greedy": "1f481-1f3fe",
  83248. "shortnames": [":information_desk_person_tone4:"],
  83249. "category": "people"
  83250. },
  83251. ":person_tipping_hand_tone5:": {
  83252. "uc_base": "1f481-1f3ff",
  83253. "uc_output": "1f481-1f3ff",
  83254. "uc_match": "1f481-1f3ff",
  83255. "uc_greedy": "1f481-1f3ff",
  83256. "shortnames": [":information_desk_person_tone5:"],
  83257. "category": "people"
  83258. },
  83259. ":person_walking_tone1:": {
  83260. "uc_base": "1f6b6-1f3fb",
  83261. "uc_output": "1f6b6-1f3fb",
  83262. "uc_match": "1f6b6-1f3fb",
  83263. "uc_greedy": "1f6b6-1f3fb",
  83264. "shortnames": [":walking_tone1:"],
  83265. "category": "people"
  83266. },
  83267. ":person_walking_tone2:": {
  83268. "uc_base": "1f6b6-1f3fc",
  83269. "uc_output": "1f6b6-1f3fc",
  83270. "uc_match": "1f6b6-1f3fc",
  83271. "uc_greedy": "1f6b6-1f3fc",
  83272. "shortnames": [":walking_tone2:"],
  83273. "category": "people"
  83274. },
  83275. ":person_walking_tone3:": {
  83276. "uc_base": "1f6b6-1f3fd",
  83277. "uc_output": "1f6b6-1f3fd",
  83278. "uc_match": "1f6b6-1f3fd",
  83279. "uc_greedy": "1f6b6-1f3fd",
  83280. "shortnames": [":walking_tone3:"],
  83281. "category": "people"
  83282. },
  83283. ":person_walking_tone4:": {
  83284. "uc_base": "1f6b6-1f3fe",
  83285. "uc_output": "1f6b6-1f3fe",
  83286. "uc_match": "1f6b6-1f3fe",
  83287. "uc_greedy": "1f6b6-1f3fe",
  83288. "shortnames": [":walking_tone4:"],
  83289. "category": "people"
  83290. },
  83291. ":person_walking_tone5:": {
  83292. "uc_base": "1f6b6-1f3ff",
  83293. "uc_output": "1f6b6-1f3ff",
  83294. "uc_match": "1f6b6-1f3ff",
  83295. "uc_greedy": "1f6b6-1f3ff",
  83296. "shortnames": [":walking_tone5:"],
  83297. "category": "people"
  83298. },
  83299. ":person_wearing_turban_tone1:": {
  83300. "uc_base": "1f473-1f3fb",
  83301. "uc_output": "1f473-1f3fb",
  83302. "uc_match": "1f473-1f3fb",
  83303. "uc_greedy": "1f473-1f3fb",
  83304. "shortnames": [":man_with_turban_tone1:"],
  83305. "category": "people"
  83306. },
  83307. ":person_wearing_turban_tone2:": {
  83308. "uc_base": "1f473-1f3fc",
  83309. "uc_output": "1f473-1f3fc",
  83310. "uc_match": "1f473-1f3fc",
  83311. "uc_greedy": "1f473-1f3fc",
  83312. "shortnames": [":man_with_turban_tone2:"],
  83313. "category": "people"
  83314. },
  83315. ":person_wearing_turban_tone3:": {
  83316. "uc_base": "1f473-1f3fd",
  83317. "uc_output": "1f473-1f3fd",
  83318. "uc_match": "1f473-1f3fd",
  83319. "uc_greedy": "1f473-1f3fd",
  83320. "shortnames": [":man_with_turban_tone3:"],
  83321. "category": "people"
  83322. },
  83323. ":person_wearing_turban_tone4:": {
  83324. "uc_base": "1f473-1f3fe",
  83325. "uc_output": "1f473-1f3fe",
  83326. "uc_match": "1f473-1f3fe",
  83327. "uc_greedy": "1f473-1f3fe",
  83328. "shortnames": [":man_with_turban_tone4:"],
  83329. "category": "people"
  83330. },
  83331. ":person_wearing_turban_tone5:": {
  83332. "uc_base": "1f473-1f3ff",
  83333. "uc_output": "1f473-1f3ff",
  83334. "uc_match": "1f473-1f3ff",
  83335. "uc_greedy": "1f473-1f3ff",
  83336. "shortnames": [":man_with_turban_tone5:"],
  83337. "category": "people"
  83338. },
  83339. ":point_down_tone1:": {
  83340. "uc_base": "1f447-1f3fb",
  83341. "uc_output": "1f447-1f3fb",
  83342. "uc_match": "1f447-1f3fb",
  83343. "uc_greedy": "1f447-1f3fb",
  83344. "shortnames": [],
  83345. "category": "people"
  83346. },
  83347. ":point_down_tone2:": {
  83348. "uc_base": "1f447-1f3fc",
  83349. "uc_output": "1f447-1f3fc",
  83350. "uc_match": "1f447-1f3fc",
  83351. "uc_greedy": "1f447-1f3fc",
  83352. "shortnames": [],
  83353. "category": "people"
  83354. },
  83355. ":point_down_tone3:": {
  83356. "uc_base": "1f447-1f3fd",
  83357. "uc_output": "1f447-1f3fd",
  83358. "uc_match": "1f447-1f3fd",
  83359. "uc_greedy": "1f447-1f3fd",
  83360. "shortnames": [],
  83361. "category": "people"
  83362. },
  83363. ":point_down_tone4:": {
  83364. "uc_base": "1f447-1f3fe",
  83365. "uc_output": "1f447-1f3fe",
  83366. "uc_match": "1f447-1f3fe",
  83367. "uc_greedy": "1f447-1f3fe",
  83368. "shortnames": [],
  83369. "category": "people"
  83370. },
  83371. ":point_down_tone5:": {
  83372. "uc_base": "1f447-1f3ff",
  83373. "uc_output": "1f447-1f3ff",
  83374. "uc_match": "1f447-1f3ff",
  83375. "uc_greedy": "1f447-1f3ff",
  83376. "shortnames": [],
  83377. "category": "people"
  83378. },
  83379. ":point_left_tone1:": {
  83380. "uc_base": "1f448-1f3fb",
  83381. "uc_output": "1f448-1f3fb",
  83382. "uc_match": "1f448-1f3fb",
  83383. "uc_greedy": "1f448-1f3fb",
  83384. "shortnames": [],
  83385. "category": "people"
  83386. },
  83387. ":point_left_tone2:": {
  83388. "uc_base": "1f448-1f3fc",
  83389. "uc_output": "1f448-1f3fc",
  83390. "uc_match": "1f448-1f3fc",
  83391. "uc_greedy": "1f448-1f3fc",
  83392. "shortnames": [],
  83393. "category": "people"
  83394. },
  83395. ":point_left_tone3:": {
  83396. "uc_base": "1f448-1f3fd",
  83397. "uc_output": "1f448-1f3fd",
  83398. "uc_match": "1f448-1f3fd",
  83399. "uc_greedy": "1f448-1f3fd",
  83400. "shortnames": [],
  83401. "category": "people"
  83402. },
  83403. ":point_left_tone4:": {
  83404. "uc_base": "1f448-1f3fe",
  83405. "uc_output": "1f448-1f3fe",
  83406. "uc_match": "1f448-1f3fe",
  83407. "uc_greedy": "1f448-1f3fe",
  83408. "shortnames": [],
  83409. "category": "people"
  83410. },
  83411. ":point_left_tone5:": {
  83412. "uc_base": "1f448-1f3ff",
  83413. "uc_output": "1f448-1f3ff",
  83414. "uc_match": "1f448-1f3ff",
  83415. "uc_greedy": "1f448-1f3ff",
  83416. "shortnames": [],
  83417. "category": "people"
  83418. },
  83419. ":point_right_tone1:": {
  83420. "uc_base": "1f449-1f3fb",
  83421. "uc_output": "1f449-1f3fb",
  83422. "uc_match": "1f449-1f3fb",
  83423. "uc_greedy": "1f449-1f3fb",
  83424. "shortnames": [],
  83425. "category": "people"
  83426. },
  83427. ":point_right_tone2:": {
  83428. "uc_base": "1f449-1f3fc",
  83429. "uc_output": "1f449-1f3fc",
  83430. "uc_match": "1f449-1f3fc",
  83431. "uc_greedy": "1f449-1f3fc",
  83432. "shortnames": [],
  83433. "category": "people"
  83434. },
  83435. ":point_right_tone3:": {
  83436. "uc_base": "1f449-1f3fd",
  83437. "uc_output": "1f449-1f3fd",
  83438. "uc_match": "1f449-1f3fd",
  83439. "uc_greedy": "1f449-1f3fd",
  83440. "shortnames": [],
  83441. "category": "people"
  83442. },
  83443. ":point_right_tone4:": {
  83444. "uc_base": "1f449-1f3fe",
  83445. "uc_output": "1f449-1f3fe",
  83446. "uc_match": "1f449-1f3fe",
  83447. "uc_greedy": "1f449-1f3fe",
  83448. "shortnames": [],
  83449. "category": "people"
  83450. },
  83451. ":point_right_tone5:": {
  83452. "uc_base": "1f449-1f3ff",
  83453. "uc_output": "1f449-1f3ff",
  83454. "uc_match": "1f449-1f3ff",
  83455. "uc_greedy": "1f449-1f3ff",
  83456. "shortnames": [],
  83457. "category": "people"
  83458. },
  83459. ":point_up_2_tone1:": {
  83460. "uc_base": "1f446-1f3fb",
  83461. "uc_output": "1f446-1f3fb",
  83462. "uc_match": "1f446-1f3fb",
  83463. "uc_greedy": "1f446-1f3fb",
  83464. "shortnames": [],
  83465. "category": "people"
  83466. },
  83467. ":point_up_2_tone2:": {
  83468. "uc_base": "1f446-1f3fc",
  83469. "uc_output": "1f446-1f3fc",
  83470. "uc_match": "1f446-1f3fc",
  83471. "uc_greedy": "1f446-1f3fc",
  83472. "shortnames": [],
  83473. "category": "people"
  83474. },
  83475. ":point_up_2_tone3:": {
  83476. "uc_base": "1f446-1f3fd",
  83477. "uc_output": "1f446-1f3fd",
  83478. "uc_match": "1f446-1f3fd",
  83479. "uc_greedy": "1f446-1f3fd",
  83480. "shortnames": [],
  83481. "category": "people"
  83482. },
  83483. ":point_up_2_tone4:": {
  83484. "uc_base": "1f446-1f3fe",
  83485. "uc_output": "1f446-1f3fe",
  83486. "uc_match": "1f446-1f3fe",
  83487. "uc_greedy": "1f446-1f3fe",
  83488. "shortnames": [],
  83489. "category": "people"
  83490. },
  83491. ":point_up_2_tone5:": {
  83492. "uc_base": "1f446-1f3ff",
  83493. "uc_output": "1f446-1f3ff",
  83494. "uc_match": "1f446-1f3ff",
  83495. "uc_greedy": "1f446-1f3ff",
  83496. "shortnames": [],
  83497. "category": "people"
  83498. },
  83499. ":police_officer_tone1:": {
  83500. "uc_base": "1f46e-1f3fb",
  83501. "uc_output": "1f46e-1f3fb",
  83502. "uc_match": "1f46e-1f3fb",
  83503. "uc_greedy": "1f46e-1f3fb",
  83504. "shortnames": [":cop_tone1:"],
  83505. "category": "people"
  83506. },
  83507. ":police_officer_tone2:": {
  83508. "uc_base": "1f46e-1f3fc",
  83509. "uc_output": "1f46e-1f3fc",
  83510. "uc_match": "1f46e-1f3fc",
  83511. "uc_greedy": "1f46e-1f3fc",
  83512. "shortnames": [":cop_tone2:"],
  83513. "category": "people"
  83514. },
  83515. ":police_officer_tone3:": {
  83516. "uc_base": "1f46e-1f3fd",
  83517. "uc_output": "1f46e-1f3fd",
  83518. "uc_match": "1f46e-1f3fd",
  83519. "uc_greedy": "1f46e-1f3fd",
  83520. "shortnames": [":cop_tone3:"],
  83521. "category": "people"
  83522. },
  83523. ":police_officer_tone4:": {
  83524. "uc_base": "1f46e-1f3fe",
  83525. "uc_output": "1f46e-1f3fe",
  83526. "uc_match": "1f46e-1f3fe",
  83527. "uc_greedy": "1f46e-1f3fe",
  83528. "shortnames": [":cop_tone4:"],
  83529. "category": "people"
  83530. },
  83531. ":police_officer_tone5:": {
  83532. "uc_base": "1f46e-1f3ff",
  83533. "uc_output": "1f46e-1f3ff",
  83534. "uc_match": "1f46e-1f3ff",
  83535. "uc_greedy": "1f46e-1f3ff",
  83536. "shortnames": [":cop_tone5:"],
  83537. "category": "people"
  83538. },
  83539. ":pray_tone1:": {
  83540. "uc_base": "1f64f-1f3fb",
  83541. "uc_output": "1f64f-1f3fb",
  83542. "uc_match": "1f64f-1f3fb",
  83543. "uc_greedy": "1f64f-1f3fb",
  83544. "shortnames": [],
  83545. "category": "people"
  83546. },
  83547. ":pray_tone2:": {
  83548. "uc_base": "1f64f-1f3fc",
  83549. "uc_output": "1f64f-1f3fc",
  83550. "uc_match": "1f64f-1f3fc",
  83551. "uc_greedy": "1f64f-1f3fc",
  83552. "shortnames": [],
  83553. "category": "people"
  83554. },
  83555. ":pray_tone3:": {
  83556. "uc_base": "1f64f-1f3fd",
  83557. "uc_output": "1f64f-1f3fd",
  83558. "uc_match": "1f64f-1f3fd",
  83559. "uc_greedy": "1f64f-1f3fd",
  83560. "shortnames": [],
  83561. "category": "people"
  83562. },
  83563. ":pray_tone4:": {
  83564. "uc_base": "1f64f-1f3fe",
  83565. "uc_output": "1f64f-1f3fe",
  83566. "uc_match": "1f64f-1f3fe",
  83567. "uc_greedy": "1f64f-1f3fe",
  83568. "shortnames": [],
  83569. "category": "people"
  83570. },
  83571. ":pray_tone5:": {
  83572. "uc_base": "1f64f-1f3ff",
  83573. "uc_output": "1f64f-1f3ff",
  83574. "uc_match": "1f64f-1f3ff",
  83575. "uc_greedy": "1f64f-1f3ff",
  83576. "shortnames": [],
  83577. "category": "people"
  83578. },
  83579. ":pregnant_woman_tone1:": {
  83580. "uc_base": "1f930-1f3fb",
  83581. "uc_output": "1f930-1f3fb",
  83582. "uc_match": "1f930-1f3fb",
  83583. "uc_greedy": "1f930-1f3fb",
  83584. "shortnames": [":expecting_woman_tone1:"],
  83585. "category": "people"
  83586. },
  83587. ":pregnant_woman_tone2:": {
  83588. "uc_base": "1f930-1f3fc",
  83589. "uc_output": "1f930-1f3fc",
  83590. "uc_match": "1f930-1f3fc",
  83591. "uc_greedy": "1f930-1f3fc",
  83592. "shortnames": [":expecting_woman_tone2:"],
  83593. "category": "people"
  83594. },
  83595. ":pregnant_woman_tone3:": {
  83596. "uc_base": "1f930-1f3fd",
  83597. "uc_output": "1f930-1f3fd",
  83598. "uc_match": "1f930-1f3fd",
  83599. "uc_greedy": "1f930-1f3fd",
  83600. "shortnames": [":expecting_woman_tone3:"],
  83601. "category": "people"
  83602. },
  83603. ":pregnant_woman_tone4:": {
  83604. "uc_base": "1f930-1f3fe",
  83605. "uc_output": "1f930-1f3fe",
  83606. "uc_match": "1f930-1f3fe",
  83607. "uc_greedy": "1f930-1f3fe",
  83608. "shortnames": [":expecting_woman_tone4:"],
  83609. "category": "people"
  83610. },
  83611. ":pregnant_woman_tone5:": {
  83612. "uc_base": "1f930-1f3ff",
  83613. "uc_output": "1f930-1f3ff",
  83614. "uc_match": "1f930-1f3ff",
  83615. "uc_greedy": "1f930-1f3ff",
  83616. "shortnames": [":expecting_woman_tone5:"],
  83617. "category": "people"
  83618. },
  83619. ":prince_tone1:": {
  83620. "uc_base": "1f934-1f3fb",
  83621. "uc_output": "1f934-1f3fb",
  83622. "uc_match": "1f934-1f3fb",
  83623. "uc_greedy": "1f934-1f3fb",
  83624. "shortnames": [],
  83625. "category": "people"
  83626. },
  83627. ":prince_tone2:": {
  83628. "uc_base": "1f934-1f3fc",
  83629. "uc_output": "1f934-1f3fc",
  83630. "uc_match": "1f934-1f3fc",
  83631. "uc_greedy": "1f934-1f3fc",
  83632. "shortnames": [],
  83633. "category": "people"
  83634. },
  83635. ":prince_tone3:": {
  83636. "uc_base": "1f934-1f3fd",
  83637. "uc_output": "1f934-1f3fd",
  83638. "uc_match": "1f934-1f3fd",
  83639. "uc_greedy": "1f934-1f3fd",
  83640. "shortnames": [],
  83641. "category": "people"
  83642. },
  83643. ":prince_tone4:": {
  83644. "uc_base": "1f934-1f3fe",
  83645. "uc_output": "1f934-1f3fe",
  83646. "uc_match": "1f934-1f3fe",
  83647. "uc_greedy": "1f934-1f3fe",
  83648. "shortnames": [],
  83649. "category": "people"
  83650. },
  83651. ":prince_tone5:": {
  83652. "uc_base": "1f934-1f3ff",
  83653. "uc_output": "1f934-1f3ff",
  83654. "uc_match": "1f934-1f3ff",
  83655. "uc_greedy": "1f934-1f3ff",
  83656. "shortnames": [],
  83657. "category": "people"
  83658. },
  83659. ":princess_tone1:": {
  83660. "uc_base": "1f478-1f3fb",
  83661. "uc_output": "1f478-1f3fb",
  83662. "uc_match": "1f478-1f3fb",
  83663. "uc_greedy": "1f478-1f3fb",
  83664. "shortnames": [],
  83665. "category": "people"
  83666. },
  83667. ":princess_tone2:": {
  83668. "uc_base": "1f478-1f3fc",
  83669. "uc_output": "1f478-1f3fc",
  83670. "uc_match": "1f478-1f3fc",
  83671. "uc_greedy": "1f478-1f3fc",
  83672. "shortnames": [],
  83673. "category": "people"
  83674. },
  83675. ":princess_tone3:": {
  83676. "uc_base": "1f478-1f3fd",
  83677. "uc_output": "1f478-1f3fd",
  83678. "uc_match": "1f478-1f3fd",
  83679. "uc_greedy": "1f478-1f3fd",
  83680. "shortnames": [],
  83681. "category": "people"
  83682. },
  83683. ":princess_tone4:": {
  83684. "uc_base": "1f478-1f3fe",
  83685. "uc_output": "1f478-1f3fe",
  83686. "uc_match": "1f478-1f3fe",
  83687. "uc_greedy": "1f478-1f3fe",
  83688. "shortnames": [],
  83689. "category": "people"
  83690. },
  83691. ":princess_tone5:": {
  83692. "uc_base": "1f478-1f3ff",
  83693. "uc_output": "1f478-1f3ff",
  83694. "uc_match": "1f478-1f3ff",
  83695. "uc_greedy": "1f478-1f3ff",
  83696. "shortnames": [],
  83697. "category": "people"
  83698. },
  83699. ":punch_tone1:": {
  83700. "uc_base": "1f44a-1f3fb",
  83701. "uc_output": "1f44a-1f3fb",
  83702. "uc_match": "1f44a-1f3fb",
  83703. "uc_greedy": "1f44a-1f3fb",
  83704. "shortnames": [],
  83705. "category": "people"
  83706. },
  83707. ":punch_tone2:": {
  83708. "uc_base": "1f44a-1f3fc",
  83709. "uc_output": "1f44a-1f3fc",
  83710. "uc_match": "1f44a-1f3fc",
  83711. "uc_greedy": "1f44a-1f3fc",
  83712. "shortnames": [],
  83713. "category": "people"
  83714. },
  83715. ":punch_tone3:": {
  83716. "uc_base": "1f44a-1f3fd",
  83717. "uc_output": "1f44a-1f3fd",
  83718. "uc_match": "1f44a-1f3fd",
  83719. "uc_greedy": "1f44a-1f3fd",
  83720. "shortnames": [],
  83721. "category": "people"
  83722. },
  83723. ":punch_tone4:": {
  83724. "uc_base": "1f44a-1f3fe",
  83725. "uc_output": "1f44a-1f3fe",
  83726. "uc_match": "1f44a-1f3fe",
  83727. "uc_greedy": "1f44a-1f3fe",
  83728. "shortnames": [],
  83729. "category": "people"
  83730. },
  83731. ":punch_tone5:": {
  83732. "uc_base": "1f44a-1f3ff",
  83733. "uc_output": "1f44a-1f3ff",
  83734. "uc_match": "1f44a-1f3ff",
  83735. "uc_greedy": "1f44a-1f3ff",
  83736. "shortnames": [],
  83737. "category": "people"
  83738. },
  83739. ":raised_back_of_hand_tone1:": {
  83740. "uc_base": "1f91a-1f3fb",
  83741. "uc_output": "1f91a-1f3fb",
  83742. "uc_match": "1f91a-1f3fb",
  83743. "uc_greedy": "1f91a-1f3fb",
  83744. "shortnames": [":back_of_hand_tone1:"],
  83745. "category": "people"
  83746. },
  83747. ":raised_back_of_hand_tone2:": {
  83748. "uc_base": "1f91a-1f3fc",
  83749. "uc_output": "1f91a-1f3fc",
  83750. "uc_match": "1f91a-1f3fc",
  83751. "uc_greedy": "1f91a-1f3fc",
  83752. "shortnames": [":back_of_hand_tone2:"],
  83753. "category": "people"
  83754. },
  83755. ":raised_back_of_hand_tone3:": {
  83756. "uc_base": "1f91a-1f3fd",
  83757. "uc_output": "1f91a-1f3fd",
  83758. "uc_match": "1f91a-1f3fd",
  83759. "uc_greedy": "1f91a-1f3fd",
  83760. "shortnames": [":back_of_hand_tone3:"],
  83761. "category": "people"
  83762. },
  83763. ":raised_back_of_hand_tone4:": {
  83764. "uc_base": "1f91a-1f3fe",
  83765. "uc_output": "1f91a-1f3fe",
  83766. "uc_match": "1f91a-1f3fe",
  83767. "uc_greedy": "1f91a-1f3fe",
  83768. "shortnames": [":back_of_hand_tone4:"],
  83769. "category": "people"
  83770. },
  83771. ":raised_back_of_hand_tone5:": {
  83772. "uc_base": "1f91a-1f3ff",
  83773. "uc_output": "1f91a-1f3ff",
  83774. "uc_match": "1f91a-1f3ff",
  83775. "uc_greedy": "1f91a-1f3ff",
  83776. "shortnames": [":back_of_hand_tone5:"],
  83777. "category": "people"
  83778. },
  83779. ":raised_hands_tone1:": {
  83780. "uc_base": "1f64c-1f3fb",
  83781. "uc_output": "1f64c-1f3fb",
  83782. "uc_match": "1f64c-1f3fb",
  83783. "uc_greedy": "1f64c-1f3fb",
  83784. "shortnames": [],
  83785. "category": "people"
  83786. },
  83787. ":raised_hands_tone2:": {
  83788. "uc_base": "1f64c-1f3fc",
  83789. "uc_output": "1f64c-1f3fc",
  83790. "uc_match": "1f64c-1f3fc",
  83791. "uc_greedy": "1f64c-1f3fc",
  83792. "shortnames": [],
  83793. "category": "people"
  83794. },
  83795. ":raised_hands_tone3:": {
  83796. "uc_base": "1f64c-1f3fd",
  83797. "uc_output": "1f64c-1f3fd",
  83798. "uc_match": "1f64c-1f3fd",
  83799. "uc_greedy": "1f64c-1f3fd",
  83800. "shortnames": [],
  83801. "category": "people"
  83802. },
  83803. ":raised_hands_tone4:": {
  83804. "uc_base": "1f64c-1f3fe",
  83805. "uc_output": "1f64c-1f3fe",
  83806. "uc_match": "1f64c-1f3fe",
  83807. "uc_greedy": "1f64c-1f3fe",
  83808. "shortnames": [],
  83809. "category": "people"
  83810. },
  83811. ":raised_hands_tone5:": {
  83812. "uc_base": "1f64c-1f3ff",
  83813. "uc_output": "1f64c-1f3ff",
  83814. "uc_match": "1f64c-1f3ff",
  83815. "uc_greedy": "1f64c-1f3ff",
  83816. "shortnames": [],
  83817. "category": "people"
  83818. },
  83819. ":right_facing_fist_tone1:": {
  83820. "uc_base": "1f91c-1f3fb",
  83821. "uc_output": "1f91c-1f3fb",
  83822. "uc_match": "1f91c-1f3fb",
  83823. "uc_greedy": "1f91c-1f3fb",
  83824. "shortnames": [":right_fist_tone1:"],
  83825. "category": "people"
  83826. },
  83827. ":right_facing_fist_tone2:": {
  83828. "uc_base": "1f91c-1f3fc",
  83829. "uc_output": "1f91c-1f3fc",
  83830. "uc_match": "1f91c-1f3fc",
  83831. "uc_greedy": "1f91c-1f3fc",
  83832. "shortnames": [":right_fist_tone2:"],
  83833. "category": "people"
  83834. },
  83835. ":right_facing_fist_tone3:": {
  83836. "uc_base": "1f91c-1f3fd",
  83837. "uc_output": "1f91c-1f3fd",
  83838. "uc_match": "1f91c-1f3fd",
  83839. "uc_greedy": "1f91c-1f3fd",
  83840. "shortnames": [":right_fist_tone3:"],
  83841. "category": "people"
  83842. },
  83843. ":right_facing_fist_tone4:": {
  83844. "uc_base": "1f91c-1f3fe",
  83845. "uc_output": "1f91c-1f3fe",
  83846. "uc_match": "1f91c-1f3fe",
  83847. "uc_greedy": "1f91c-1f3fe",
  83848. "shortnames": [":right_fist_tone4:"],
  83849. "category": "people"
  83850. },
  83851. ":right_facing_fist_tone5:": {
  83852. "uc_base": "1f91c-1f3ff",
  83853. "uc_output": "1f91c-1f3ff",
  83854. "uc_match": "1f91c-1f3ff",
  83855. "uc_greedy": "1f91c-1f3ff",
  83856. "shortnames": [":right_fist_tone5:"],
  83857. "category": "people"
  83858. },
  83859. ":santa_tone1:": {
  83860. "uc_base": "1f385-1f3fb",
  83861. "uc_output": "1f385-1f3fb",
  83862. "uc_match": "1f385-1f3fb",
  83863. "uc_greedy": "1f385-1f3fb",
  83864. "shortnames": [],
  83865. "category": "people"
  83866. },
  83867. ":santa_tone2:": {
  83868. "uc_base": "1f385-1f3fc",
  83869. "uc_output": "1f385-1f3fc",
  83870. "uc_match": "1f385-1f3fc",
  83871. "uc_greedy": "1f385-1f3fc",
  83872. "shortnames": [],
  83873. "category": "people"
  83874. },
  83875. ":santa_tone3:": {
  83876. "uc_base": "1f385-1f3fd",
  83877. "uc_output": "1f385-1f3fd",
  83878. "uc_match": "1f385-1f3fd",
  83879. "uc_greedy": "1f385-1f3fd",
  83880. "shortnames": [],
  83881. "category": "people"
  83882. },
  83883. ":santa_tone4:": {
  83884. "uc_base": "1f385-1f3fe",
  83885. "uc_output": "1f385-1f3fe",
  83886. "uc_match": "1f385-1f3fe",
  83887. "uc_greedy": "1f385-1f3fe",
  83888. "shortnames": [],
  83889. "category": "people"
  83890. },
  83891. ":santa_tone5:": {
  83892. "uc_base": "1f385-1f3ff",
  83893. "uc_output": "1f385-1f3ff",
  83894. "uc_match": "1f385-1f3ff",
  83895. "uc_greedy": "1f385-1f3ff",
  83896. "shortnames": [],
  83897. "category": "people"
  83898. },
  83899. ":selfie_tone1:": {
  83900. "uc_base": "1f933-1f3fb",
  83901. "uc_output": "1f933-1f3fb",
  83902. "uc_match": "1f933-1f3fb",
  83903. "uc_greedy": "1f933-1f3fb",
  83904. "shortnames": [],
  83905. "category": "people"
  83906. },
  83907. ":selfie_tone2:": {
  83908. "uc_base": "1f933-1f3fc",
  83909. "uc_output": "1f933-1f3fc",
  83910. "uc_match": "1f933-1f3fc",
  83911. "uc_greedy": "1f933-1f3fc",
  83912. "shortnames": [],
  83913. "category": "people"
  83914. },
  83915. ":selfie_tone3:": {
  83916. "uc_base": "1f933-1f3fd",
  83917. "uc_output": "1f933-1f3fd",
  83918. "uc_match": "1f933-1f3fd",
  83919. "uc_greedy": "1f933-1f3fd",
  83920. "shortnames": [],
  83921. "category": "people"
  83922. },
  83923. ":selfie_tone4:": {
  83924. "uc_base": "1f933-1f3fe",
  83925. "uc_output": "1f933-1f3fe",
  83926. "uc_match": "1f933-1f3fe",
  83927. "uc_greedy": "1f933-1f3fe",
  83928. "shortnames": [],
  83929. "category": "people"
  83930. },
  83931. ":selfie_tone5:": {
  83932. "uc_base": "1f933-1f3ff",
  83933. "uc_output": "1f933-1f3ff",
  83934. "uc_match": "1f933-1f3ff",
  83935. "uc_greedy": "1f933-1f3ff",
  83936. "shortnames": [],
  83937. "category": "people"
  83938. },
  83939. ":snowboarder_tone1:": {
  83940. "uc_base": "1f3c2-1f3fb",
  83941. "uc_output": "1f3c2-1f3fb",
  83942. "uc_match": "1f3c2-1f3fb",
  83943. "uc_greedy": "1f3c2-1f3fb",
  83944. "shortnames": [":snowboarder_light_skin_tone:"],
  83945. "category": "activity"
  83946. },
  83947. ":snowboarder_tone2:": {
  83948. "uc_base": "1f3c2-1f3fc",
  83949. "uc_output": "1f3c2-1f3fc",
  83950. "uc_match": "1f3c2-1f3fc",
  83951. "uc_greedy": "1f3c2-1f3fc",
  83952. "shortnames": [":snowboarder_medium_light_skin_tone:"],
  83953. "category": "activity"
  83954. },
  83955. ":snowboarder_tone3:": {
  83956. "uc_base": "1f3c2-1f3fd",
  83957. "uc_output": "1f3c2-1f3fd",
  83958. "uc_match": "1f3c2-1f3fd",
  83959. "uc_greedy": "1f3c2-1f3fd",
  83960. "shortnames": [":snowboarder_medium_skin_tone:"],
  83961. "category": "activity"
  83962. },
  83963. ":snowboarder_tone4:": {
  83964. "uc_base": "1f3c2-1f3fe",
  83965. "uc_output": "1f3c2-1f3fe",
  83966. "uc_match": "1f3c2-1f3fe",
  83967. "uc_greedy": "1f3c2-1f3fe",
  83968. "shortnames": [":snowboarder_medium_dark_skin_tone:"],
  83969. "category": "activity"
  83970. },
  83971. ":snowboarder_tone5:": {
  83972. "uc_base": "1f3c2-1f3ff",
  83973. "uc_output": "1f3c2-1f3ff",
  83974. "uc_match": "1f3c2-1f3ff",
  83975. "uc_greedy": "1f3c2-1f3ff",
  83976. "shortnames": [":snowboarder_dark_skin_tone:"],
  83977. "category": "activity"
  83978. },
  83979. ":thumbsdown_tone1:": {
  83980. "uc_base": "1f44e-1f3fb",
  83981. "uc_output": "1f44e-1f3fb",
  83982. "uc_match": "1f44e-1f3fb",
  83983. "uc_greedy": "1f44e-1f3fb",
  83984. "shortnames": [":-1_tone1:", ":thumbdown_tone1:"],
  83985. "category": "people"
  83986. },
  83987. ":thumbsdown_tone2:": {
  83988. "uc_base": "1f44e-1f3fc",
  83989. "uc_output": "1f44e-1f3fc",
  83990. "uc_match": "1f44e-1f3fc",
  83991. "uc_greedy": "1f44e-1f3fc",
  83992. "shortnames": [":-1_tone2:", ":thumbdown_tone2:"],
  83993. "category": "people"
  83994. },
  83995. ":thumbsdown_tone3:": {
  83996. "uc_base": "1f44e-1f3fd",
  83997. "uc_output": "1f44e-1f3fd",
  83998. "uc_match": "1f44e-1f3fd",
  83999. "uc_greedy": "1f44e-1f3fd",
  84000. "shortnames": [":-1_tone3:", ":thumbdown_tone3:"],
  84001. "category": "people"
  84002. },
  84003. ":thumbsdown_tone4:": {
  84004. "uc_base": "1f44e-1f3fe",
  84005. "uc_output": "1f44e-1f3fe",
  84006. "uc_match": "1f44e-1f3fe",
  84007. "uc_greedy": "1f44e-1f3fe",
  84008. "shortnames": [":-1_tone4:", ":thumbdown_tone4:"],
  84009. "category": "people"
  84010. },
  84011. ":thumbsdown_tone5:": {
  84012. "uc_base": "1f44e-1f3ff",
  84013. "uc_output": "1f44e-1f3ff",
  84014. "uc_match": "1f44e-1f3ff",
  84015. "uc_greedy": "1f44e-1f3ff",
  84016. "shortnames": [":-1_tone5:", ":thumbdown_tone5:"],
  84017. "category": "people"
  84018. },
  84019. ":thumbsup_tone1:": {
  84020. "uc_base": "1f44d-1f3fb",
  84021. "uc_output": "1f44d-1f3fb",
  84022. "uc_match": "1f44d-1f3fb",
  84023. "uc_greedy": "1f44d-1f3fb",
  84024. "shortnames": [":+1_tone1:", ":thumbup_tone1:"],
  84025. "category": "people"
  84026. },
  84027. ":thumbsup_tone2:": {
  84028. "uc_base": "1f44d-1f3fc",
  84029. "uc_output": "1f44d-1f3fc",
  84030. "uc_match": "1f44d-1f3fc",
  84031. "uc_greedy": "1f44d-1f3fc",
  84032. "shortnames": [":+1_tone2:", ":thumbup_tone2:"],
  84033. "category": "people"
  84034. },
  84035. ":thumbsup_tone3:": {
  84036. "uc_base": "1f44d-1f3fd",
  84037. "uc_output": "1f44d-1f3fd",
  84038. "uc_match": "1f44d-1f3fd",
  84039. "uc_greedy": "1f44d-1f3fd",
  84040. "shortnames": [":+1_tone3:", ":thumbup_tone3:"],
  84041. "category": "people"
  84042. },
  84043. ":thumbsup_tone4:": {
  84044. "uc_base": "1f44d-1f3fe",
  84045. "uc_output": "1f44d-1f3fe",
  84046. "uc_match": "1f44d-1f3fe",
  84047. "uc_greedy": "1f44d-1f3fe",
  84048. "shortnames": [":+1_tone4:", ":thumbup_tone4:"],
  84049. "category": "people"
  84050. },
  84051. ":thumbsup_tone5:": {
  84052. "uc_base": "1f44d-1f3ff",
  84053. "uc_output": "1f44d-1f3ff",
  84054. "uc_match": "1f44d-1f3ff",
  84055. "uc_greedy": "1f44d-1f3ff",
  84056. "shortnames": [":+1_tone5:", ":thumbup_tone5:"],
  84057. "category": "people"
  84058. },
  84059. ":united_nations:": {
  84060. "uc_base": "1f1fa-1f1f3",
  84061. "uc_output": "1f1fa-1f1f3",
  84062. "uc_match": "1f1fa-1f1f3",
  84063. "uc_greedy": "1f1fa-1f1f3",
  84064. "shortnames": [],
  84065. "category": "flags"
  84066. },
  84067. ":vampire_tone1:": {
  84068. "uc_base": "1f9db-1f3fb",
  84069. "uc_output": "1f9db-1f3fb",
  84070. "uc_match": "1f9db-1f3fb",
  84071. "uc_greedy": "1f9db-1f3fb",
  84072. "shortnames": [":vampire_light_skin_tone:"],
  84073. "category": "people"
  84074. },
  84075. ":vampire_tone2:": {
  84076. "uc_base": "1f9db-1f3fc",
  84077. "uc_output": "1f9db-1f3fc",
  84078. "uc_match": "1f9db-1f3fc",
  84079. "uc_greedy": "1f9db-1f3fc",
  84080. "shortnames": [":vampire_medium_light_skin_tone:"],
  84081. "category": "people"
  84082. },
  84083. ":vampire_tone3:": {
  84084. "uc_base": "1f9db-1f3fd",
  84085. "uc_output": "1f9db-1f3fd",
  84086. "uc_match": "1f9db-1f3fd",
  84087. "uc_greedy": "1f9db-1f3fd",
  84088. "shortnames": [":vampire_medium_skin_tone:"],
  84089. "category": "people"
  84090. },
  84091. ":vampire_tone4:": {
  84092. "uc_base": "1f9db-1f3fe",
  84093. "uc_output": "1f9db-1f3fe",
  84094. "uc_match": "1f9db-1f3fe",
  84095. "uc_greedy": "1f9db-1f3fe",
  84096. "shortnames": [":vampire_medium_dark_skin_tone:"],
  84097. "category": "people"
  84098. },
  84099. ":vampire_tone5:": {
  84100. "uc_base": "1f9db-1f3ff",
  84101. "uc_output": "1f9db-1f3ff",
  84102. "uc_match": "1f9db-1f3ff",
  84103. "uc_greedy": "1f9db-1f3ff",
  84104. "shortnames": [":vampire_dark_skin_tone:"],
  84105. "category": "people"
  84106. },
  84107. ":vulcan_tone1:": {
  84108. "uc_base": "1f596-1f3fb",
  84109. "uc_output": "1f596-1f3fb",
  84110. "uc_match": "1f596-1f3fb",
  84111. "uc_greedy": "1f596-1f3fb",
  84112. "shortnames": [":raised_hand_with_part_between_middle_and_ring_fingers_tone1:"],
  84113. "category": "people"
  84114. },
  84115. ":vulcan_tone2:": {
  84116. "uc_base": "1f596-1f3fc",
  84117. "uc_output": "1f596-1f3fc",
  84118. "uc_match": "1f596-1f3fc",
  84119. "uc_greedy": "1f596-1f3fc",
  84120. "shortnames": [":raised_hand_with_part_between_middle_and_ring_fingers_tone2:"],
  84121. "category": "people"
  84122. },
  84123. ":vulcan_tone3:": {
  84124. "uc_base": "1f596-1f3fd",
  84125. "uc_output": "1f596-1f3fd",
  84126. "uc_match": "1f596-1f3fd",
  84127. "uc_greedy": "1f596-1f3fd",
  84128. "shortnames": [":raised_hand_with_part_between_middle_and_ring_fingers_tone3:"],
  84129. "category": "people"
  84130. },
  84131. ":vulcan_tone4:": {
  84132. "uc_base": "1f596-1f3fe",
  84133. "uc_output": "1f596-1f3fe",
  84134. "uc_match": "1f596-1f3fe",
  84135. "uc_greedy": "1f596-1f3fe",
  84136. "shortnames": [":raised_hand_with_part_between_middle_and_ring_fingers_tone4:"],
  84137. "category": "people"
  84138. },
  84139. ":vulcan_tone5:": {
  84140. "uc_base": "1f596-1f3ff",
  84141. "uc_output": "1f596-1f3ff",
  84142. "uc_match": "1f596-1f3ff",
  84143. "uc_greedy": "1f596-1f3ff",
  84144. "shortnames": [":raised_hand_with_part_between_middle_and_ring_fingers_tone5:"],
  84145. "category": "people"
  84146. },
  84147. ":wave_tone1:": {
  84148. "uc_base": "1f44b-1f3fb",
  84149. "uc_output": "1f44b-1f3fb",
  84150. "uc_match": "1f44b-1f3fb",
  84151. "uc_greedy": "1f44b-1f3fb",
  84152. "shortnames": [],
  84153. "category": "people"
  84154. },
  84155. ":wave_tone2:": {
  84156. "uc_base": "1f44b-1f3fc",
  84157. "uc_output": "1f44b-1f3fc",
  84158. "uc_match": "1f44b-1f3fc",
  84159. "uc_greedy": "1f44b-1f3fc",
  84160. "shortnames": [],
  84161. "category": "people"
  84162. },
  84163. ":wave_tone3:": {
  84164. "uc_base": "1f44b-1f3fd",
  84165. "uc_output": "1f44b-1f3fd",
  84166. "uc_match": "1f44b-1f3fd",
  84167. "uc_greedy": "1f44b-1f3fd",
  84168. "shortnames": [],
  84169. "category": "people"
  84170. },
  84171. ":wave_tone4:": {
  84172. "uc_base": "1f44b-1f3fe",
  84173. "uc_output": "1f44b-1f3fe",
  84174. "uc_match": "1f44b-1f3fe",
  84175. "uc_greedy": "1f44b-1f3fe",
  84176. "shortnames": [],
  84177. "category": "people"
  84178. },
  84179. ":wave_tone5:": {
  84180. "uc_base": "1f44b-1f3ff",
  84181. "uc_output": "1f44b-1f3ff",
  84182. "uc_match": "1f44b-1f3ff",
  84183. "uc_greedy": "1f44b-1f3ff",
  84184. "shortnames": [],
  84185. "category": "people"
  84186. },
  84187. ":woman_tone1:": {
  84188. "uc_base": "1f469-1f3fb",
  84189. "uc_output": "1f469-1f3fb",
  84190. "uc_match": "1f469-1f3fb",
  84191. "uc_greedy": "1f469-1f3fb",
  84192. "shortnames": [],
  84193. "category": "people"
  84194. },
  84195. ":woman_tone2:": {
  84196. "uc_base": "1f469-1f3fc",
  84197. "uc_output": "1f469-1f3fc",
  84198. "uc_match": "1f469-1f3fc",
  84199. "uc_greedy": "1f469-1f3fc",
  84200. "shortnames": [],
  84201. "category": "people"
  84202. },
  84203. ":woman_tone3:": {
  84204. "uc_base": "1f469-1f3fd",
  84205. "uc_output": "1f469-1f3fd",
  84206. "uc_match": "1f469-1f3fd",
  84207. "uc_greedy": "1f469-1f3fd",
  84208. "shortnames": [],
  84209. "category": "people"
  84210. },
  84211. ":woman_tone4:": {
  84212. "uc_base": "1f469-1f3fe",
  84213. "uc_output": "1f469-1f3fe",
  84214. "uc_match": "1f469-1f3fe",
  84215. "uc_greedy": "1f469-1f3fe",
  84216. "shortnames": [],
  84217. "category": "people"
  84218. },
  84219. ":woman_tone5:": {
  84220. "uc_base": "1f469-1f3ff",
  84221. "uc_output": "1f469-1f3ff",
  84222. "uc_match": "1f469-1f3ff",
  84223. "uc_greedy": "1f469-1f3ff",
  84224. "shortnames": [],
  84225. "category": "people"
  84226. },
  84227. ":woman_with_headscarf_tone1:": {
  84228. "uc_base": "1f9d5-1f3fb",
  84229. "uc_output": "1f9d5-1f3fb",
  84230. "uc_match": "1f9d5-1f3fb",
  84231. "uc_greedy": "1f9d5-1f3fb",
  84232. "shortnames": [":woman_with_headscarf_light_skin_tone:"],
  84233. "category": "people"
  84234. },
  84235. ":woman_with_headscarf_tone2:": {
  84236. "uc_base": "1f9d5-1f3fc",
  84237. "uc_output": "1f9d5-1f3fc",
  84238. "uc_match": "1f9d5-1f3fc",
  84239. "uc_greedy": "1f9d5-1f3fc",
  84240. "shortnames": [":woman_with_headscarf_medium_light_skin_tone:"],
  84241. "category": "people"
  84242. },
  84243. ":woman_with_headscarf_tone3:": {
  84244. "uc_base": "1f9d5-1f3fd",
  84245. "uc_output": "1f9d5-1f3fd",
  84246. "uc_match": "1f9d5-1f3fd",
  84247. "uc_greedy": "1f9d5-1f3fd",
  84248. "shortnames": [":woman_with_headscarf_medium_skin_tone:"],
  84249. "category": "people"
  84250. },
  84251. ":woman_with_headscarf_tone4:": {
  84252. "uc_base": "1f9d5-1f3fe",
  84253. "uc_output": "1f9d5-1f3fe",
  84254. "uc_match": "1f9d5-1f3fe",
  84255. "uc_greedy": "1f9d5-1f3fe",
  84256. "shortnames": [":woman_with_headscarf_medium_dark_skin_tone:"],
  84257. "category": "people"
  84258. },
  84259. ":woman_with_headscarf_tone5:": {
  84260. "uc_base": "1f9d5-1f3ff",
  84261. "uc_output": "1f9d5-1f3ff",
  84262. "uc_match": "1f9d5-1f3ff",
  84263. "uc_greedy": "1f9d5-1f3ff",
  84264. "shortnames": [":woman_with_headscarf_dark_skin_tone:"],
  84265. "category": "people"
  84266. },
  84267. ":fist_tone1:": {
  84268. "uc_base": "270a-1f3fb",
  84269. "uc_output": "270a-1f3fb",
  84270. "uc_match": "270a-1f3fb",
  84271. "uc_greedy": "270a-1f3fb",
  84272. "shortnames": [],
  84273. "category": "people"
  84274. },
  84275. ":fist_tone2:": {
  84276. "uc_base": "270a-1f3fc",
  84277. "uc_output": "270a-1f3fc",
  84278. "uc_match": "270a-1f3fc",
  84279. "uc_greedy": "270a-1f3fc",
  84280. "shortnames": [],
  84281. "category": "people"
  84282. },
  84283. ":fist_tone3:": {
  84284. "uc_base": "270a-1f3fd",
  84285. "uc_output": "270a-1f3fd",
  84286. "uc_match": "270a-1f3fd",
  84287. "uc_greedy": "270a-1f3fd",
  84288. "shortnames": [],
  84289. "category": "people"
  84290. },
  84291. ":fist_tone4:": {
  84292. "uc_base": "270a-1f3fe",
  84293. "uc_output": "270a-1f3fe",
  84294. "uc_match": "270a-1f3fe",
  84295. "uc_greedy": "270a-1f3fe",
  84296. "shortnames": [],
  84297. "category": "people"
  84298. },
  84299. ":fist_tone5:": {
  84300. "uc_base": "270a-1f3ff",
  84301. "uc_output": "270a-1f3ff",
  84302. "uc_match": "270a-1f3ff",
  84303. "uc_greedy": "270a-1f3ff",
  84304. "shortnames": [],
  84305. "category": "people"
  84306. },
  84307. ":person_bouncing_ball_tone1:": {
  84308. "uc_base": "26f9-1f3fb",
  84309. "uc_output": "26f9-1f3fb",
  84310. "uc_match": "26f9-fe0f-1f3fb",
  84311. "uc_greedy": "26f9-fe0f-1f3fb",
  84312. "shortnames": [":basketball_player_tone1:", ":person_with_ball_tone1:"],
  84313. "category": "activity"
  84314. },
  84315. ":person_bouncing_ball_tone2:": {
  84316. "uc_base": "26f9-1f3fc",
  84317. "uc_output": "26f9-1f3fc",
  84318. "uc_match": "26f9-fe0f-1f3fc",
  84319. "uc_greedy": "26f9-fe0f-1f3fc",
  84320. "shortnames": [":basketball_player_tone2:", ":person_with_ball_tone2:"],
  84321. "category": "activity"
  84322. },
  84323. ":person_bouncing_ball_tone3:": {
  84324. "uc_base": "26f9-1f3fd",
  84325. "uc_output": "26f9-1f3fd",
  84326. "uc_match": "26f9-fe0f-1f3fd",
  84327. "uc_greedy": "26f9-fe0f-1f3fd",
  84328. "shortnames": [":basketball_player_tone3:", ":person_with_ball_tone3:"],
  84329. "category": "activity"
  84330. },
  84331. ":person_bouncing_ball_tone4:": {
  84332. "uc_base": "26f9-1f3fe",
  84333. "uc_output": "26f9-1f3fe",
  84334. "uc_match": "26f9-fe0f-1f3fe",
  84335. "uc_greedy": "26f9-fe0f-1f3fe",
  84336. "shortnames": [":basketball_player_tone4:", ":person_with_ball_tone4:"],
  84337. "category": "activity"
  84338. },
  84339. ":person_bouncing_ball_tone5:": {
  84340. "uc_base": "26f9-1f3ff",
  84341. "uc_output": "26f9-1f3ff",
  84342. "uc_match": "26f9-fe0f-1f3ff",
  84343. "uc_greedy": "26f9-fe0f-1f3ff",
  84344. "shortnames": [":basketball_player_tone5:", ":person_with_ball_tone5:"],
  84345. "category": "activity"
  84346. },
  84347. ":point_up_tone1:": {
  84348. "uc_base": "261d-1f3fb",
  84349. "uc_output": "261d-1f3fb",
  84350. "uc_match": "261d-fe0f-1f3fb",
  84351. "uc_greedy": "261d-fe0f-1f3fb",
  84352. "shortnames": [],
  84353. "category": "people"
  84354. },
  84355. ":point_up_tone2:": {
  84356. "uc_base": "261d-1f3fc",
  84357. "uc_output": "261d-1f3fc",
  84358. "uc_match": "261d-fe0f-1f3fc",
  84359. "uc_greedy": "261d-fe0f-1f3fc",
  84360. "shortnames": [],
  84361. "category": "people"
  84362. },
  84363. ":point_up_tone3:": {
  84364. "uc_base": "261d-1f3fd",
  84365. "uc_output": "261d-1f3fd",
  84366. "uc_match": "261d-fe0f-1f3fd",
  84367. "uc_greedy": "261d-fe0f-1f3fd",
  84368. "shortnames": [],
  84369. "category": "people"
  84370. },
  84371. ":point_up_tone4:": {
  84372. "uc_base": "261d-1f3fe",
  84373. "uc_output": "261d-1f3fe",
  84374. "uc_match": "261d-fe0f-1f3fe",
  84375. "uc_greedy": "261d-fe0f-1f3fe",
  84376. "shortnames": [],
  84377. "category": "people"
  84378. },
  84379. ":point_up_tone5:": {
  84380. "uc_base": "261d-1f3ff",
  84381. "uc_output": "261d-1f3ff",
  84382. "uc_match": "261d-fe0f-1f3ff",
  84383. "uc_greedy": "261d-fe0f-1f3ff",
  84384. "shortnames": [],
  84385. "category": "people"
  84386. },
  84387. ":raised_hand_tone1:": {
  84388. "uc_base": "270b-1f3fb",
  84389. "uc_output": "270b-1f3fb",
  84390. "uc_match": "270b-1f3fb",
  84391. "uc_greedy": "270b-1f3fb",
  84392. "shortnames": [],
  84393. "category": "people"
  84394. },
  84395. ":raised_hand_tone2:": {
  84396. "uc_base": "270b-1f3fc",
  84397. "uc_output": "270b-1f3fc",
  84398. "uc_match": "270b-1f3fc",
  84399. "uc_greedy": "270b-1f3fc",
  84400. "shortnames": [],
  84401. "category": "people"
  84402. },
  84403. ":raised_hand_tone3:": {
  84404. "uc_base": "270b-1f3fd",
  84405. "uc_output": "270b-1f3fd",
  84406. "uc_match": "270b-1f3fd",
  84407. "uc_greedy": "270b-1f3fd",
  84408. "shortnames": [],
  84409. "category": "people"
  84410. },
  84411. ":raised_hand_tone4:": {
  84412. "uc_base": "270b-1f3fe",
  84413. "uc_output": "270b-1f3fe",
  84414. "uc_match": "270b-1f3fe",
  84415. "uc_greedy": "270b-1f3fe",
  84416. "shortnames": [],
  84417. "category": "people"
  84418. },
  84419. ":raised_hand_tone5:": {
  84420. "uc_base": "270b-1f3ff",
  84421. "uc_output": "270b-1f3ff",
  84422. "uc_match": "270b-1f3ff",
  84423. "uc_greedy": "270b-1f3ff",
  84424. "shortnames": [],
  84425. "category": "people"
  84426. },
  84427. ":v_tone1:": {
  84428. "uc_base": "270c-1f3fb",
  84429. "uc_output": "270c-1f3fb",
  84430. "uc_match": "270c-fe0f-1f3fb",
  84431. "uc_greedy": "270c-fe0f-1f3fb",
  84432. "shortnames": [],
  84433. "category": "people"
  84434. },
  84435. ":v_tone2:": {
  84436. "uc_base": "270c-1f3fc",
  84437. "uc_output": "270c-1f3fc",
  84438. "uc_match": "270c-fe0f-1f3fc",
  84439. "uc_greedy": "270c-fe0f-1f3fc",
  84440. "shortnames": [],
  84441. "category": "people"
  84442. },
  84443. ":v_tone3:": {
  84444. "uc_base": "270c-1f3fd",
  84445. "uc_output": "270c-1f3fd",
  84446. "uc_match": "270c-fe0f-1f3fd",
  84447. "uc_greedy": "270c-fe0f-1f3fd",
  84448. "shortnames": [],
  84449. "category": "people"
  84450. },
  84451. ":v_tone4:": {
  84452. "uc_base": "270c-1f3fe",
  84453. "uc_output": "270c-1f3fe",
  84454. "uc_match": "270c-fe0f-1f3fe",
  84455. "uc_greedy": "270c-fe0f-1f3fe",
  84456. "shortnames": [],
  84457. "category": "people"
  84458. },
  84459. ":v_tone5:": {
  84460. "uc_base": "270c-1f3ff",
  84461. "uc_output": "270c-1f3ff",
  84462. "uc_match": "270c-fe0f-1f3ff",
  84463. "uc_greedy": "270c-fe0f-1f3ff",
  84464. "shortnames": [],
  84465. "category": "people"
  84466. },
  84467. ":writing_hand_tone1:": {
  84468. "uc_base": "270d-1f3fb",
  84469. "uc_output": "270d-1f3fb",
  84470. "uc_match": "270d-fe0f-1f3fb",
  84471. "uc_greedy": "270d-fe0f-1f3fb",
  84472. "shortnames": [],
  84473. "category": "people"
  84474. },
  84475. ":writing_hand_tone2:": {
  84476. "uc_base": "270d-1f3fc",
  84477. "uc_output": "270d-1f3fc",
  84478. "uc_match": "270d-fe0f-1f3fc",
  84479. "uc_greedy": "270d-fe0f-1f3fc",
  84480. "shortnames": [],
  84481. "category": "people"
  84482. },
  84483. ":writing_hand_tone3:": {
  84484. "uc_base": "270d-1f3fd",
  84485. "uc_output": "270d-1f3fd",
  84486. "uc_match": "270d-fe0f-1f3fd",
  84487. "uc_greedy": "270d-fe0f-1f3fd",
  84488. "shortnames": [],
  84489. "category": "people"
  84490. },
  84491. ":writing_hand_tone4:": {
  84492. "uc_base": "270d-1f3fe",
  84493. "uc_output": "270d-1f3fe",
  84494. "uc_match": "270d-fe0f-1f3fe",
  84495. "uc_greedy": "270d-fe0f-1f3fe",
  84496. "shortnames": [],
  84497. "category": "people"
  84498. },
  84499. ":writing_hand_tone5:": {
  84500. "uc_base": "270d-1f3ff",
  84501. "uc_output": "270d-1f3ff",
  84502. "uc_match": "270d-fe0f-1f3ff",
  84503. "uc_greedy": "270d-fe0f-1f3ff",
  84504. "shortnames": [],
  84505. "category": "people"
  84506. },
  84507. ":100:": {
  84508. "uc_base": "1f4af",
  84509. "uc_output": "1f4af",
  84510. "uc_match": "1f4af",
  84511. "uc_greedy": "1f4af",
  84512. "shortnames": [],
  84513. "category": "symbols"
  84514. },
  84515. ":1234:": {
  84516. "uc_base": "1f522",
  84517. "uc_output": "1f522",
  84518. "uc_match": "1f522",
  84519. "uc_greedy": "1f522",
  84520. "shortnames": [],
  84521. "category": "symbols"
  84522. },
  84523. ":8ball:": {
  84524. "uc_base": "1f3b1",
  84525. "uc_output": "1f3b1",
  84526. "uc_match": "1f3b1",
  84527. "uc_greedy": "1f3b1",
  84528. "shortnames": [],
  84529. "category": "activity"
  84530. },
  84531. ":a:": {
  84532. "uc_base": "1f170",
  84533. "uc_output": "1f170",
  84534. "uc_match": "1f170-fe0f",
  84535. "uc_greedy": "1f170-fe0f",
  84536. "shortnames": [],
  84537. "category": "symbols"
  84538. },
  84539. ":ab:": {
  84540. "uc_base": "1f18e",
  84541. "uc_output": "1f18e",
  84542. "uc_match": "1f18e",
  84543. "uc_greedy": "1f18e",
  84544. "shortnames": [],
  84545. "category": "symbols"
  84546. },
  84547. ":abc:": {
  84548. "uc_base": "1f524",
  84549. "uc_output": "1f524",
  84550. "uc_match": "1f524",
  84551. "uc_greedy": "1f524",
  84552. "shortnames": [],
  84553. "category": "symbols"
  84554. },
  84555. ":abcd:": {
  84556. "uc_base": "1f521",
  84557. "uc_output": "1f521",
  84558. "uc_match": "1f521",
  84559. "uc_greedy": "1f521",
  84560. "shortnames": [],
  84561. "category": "symbols"
  84562. },
  84563. ":accept:": {
  84564. "uc_base": "1f251",
  84565. "uc_output": "1f251",
  84566. "uc_match": "1f251",
  84567. "uc_greedy": "1f251",
  84568. "shortnames": [],
  84569. "category": "symbols"
  84570. },
  84571. ":adult:": {
  84572. "uc_base": "1f9d1",
  84573. "uc_output": "1f9d1",
  84574. "uc_match": "1f9d1",
  84575. "uc_greedy": "1f9d1",
  84576. "shortnames": [],
  84577. "category": "people"
  84578. },
  84579. ":aerial_tramway:": {
  84580. "uc_base": "1f6a1",
  84581. "uc_output": "1f6a1",
  84582. "uc_match": "1f6a1",
  84583. "uc_greedy": "1f6a1",
  84584. "shortnames": [],
  84585. "category": "travel"
  84586. },
  84587. ":airplane_arriving:": {
  84588. "uc_base": "1f6ec",
  84589. "uc_output": "1f6ec",
  84590. "uc_match": "1f6ec",
  84591. "uc_greedy": "1f6ec",
  84592. "shortnames": [],
  84593. "category": "travel"
  84594. },
  84595. ":airplane_departure:": {
  84596. "uc_base": "1f6eb",
  84597. "uc_output": "1f6eb",
  84598. "uc_match": "1f6eb",
  84599. "uc_greedy": "1f6eb",
  84600. "shortnames": [],
  84601. "category": "travel"
  84602. },
  84603. ":airplane_small:": {
  84604. "uc_base": "1f6e9",
  84605. "uc_output": "1f6e9",
  84606. "uc_match": "1f6e9-fe0f",
  84607. "uc_greedy": "1f6e9-fe0f",
  84608. "shortnames": [":small_airplane:"],
  84609. "category": "travel"
  84610. },
  84611. ":alien:": {
  84612. "uc_base": "1f47d",
  84613. "uc_output": "1f47d",
  84614. "uc_match": "1f47d-fe0f",
  84615. "uc_greedy": "1f47d-fe0f",
  84616. "shortnames": [],
  84617. "category": "people"
  84618. },
  84619. ":ambulance:": {
  84620. "uc_base": "1f691",
  84621. "uc_output": "1f691",
  84622. "uc_match": "1f691-fe0f",
  84623. "uc_greedy": "1f691-fe0f",
  84624. "shortnames": [],
  84625. "category": "travel"
  84626. },
  84627. ":amphora:": {
  84628. "uc_base": "1f3fa",
  84629. "uc_output": "1f3fa",
  84630. "uc_match": "1f3fa",
  84631. "uc_greedy": "1f3fa",
  84632. "shortnames": [],
  84633. "category": "objects"
  84634. },
  84635. ":angel:": {
  84636. "uc_base": "1f47c",
  84637. "uc_output": "1f47c",
  84638. "uc_match": "1f47c",
  84639. "uc_greedy": "1f47c",
  84640. "shortnames": [],
  84641. "category": "people"
  84642. },
  84643. ":anger:": {
  84644. "uc_base": "1f4a2",
  84645. "uc_output": "1f4a2",
  84646. "uc_match": "1f4a2",
  84647. "uc_greedy": "1f4a2",
  84648. "shortnames": [],
  84649. "category": "symbols"
  84650. },
  84651. ":anger_right:": {
  84652. "uc_base": "1f5ef",
  84653. "uc_output": "1f5ef",
  84654. "uc_match": "1f5ef-fe0f",
  84655. "uc_greedy": "1f5ef-fe0f",
  84656. "shortnames": [":right_anger_bubble:"],
  84657. "category": "symbols"
  84658. },
  84659. ":angry:": {
  84660. "uc_base": "1f620",
  84661. "uc_output": "1f620",
  84662. "uc_match": "1f620",
  84663. "uc_greedy": "1f620",
  84664. "shortnames": [],
  84665. "category": "people"
  84666. },
  84667. ":anguished:": {
  84668. "uc_base": "1f627",
  84669. "uc_output": "1f627",
  84670. "uc_match": "1f627",
  84671. "uc_greedy": "1f627",
  84672. "shortnames": [],
  84673. "category": "people"
  84674. },
  84675. ":ant:": {
  84676. "uc_base": "1f41c",
  84677. "uc_output": "1f41c",
  84678. "uc_match": "1f41c",
  84679. "uc_greedy": "1f41c",
  84680. "shortnames": [],
  84681. "category": "nature"
  84682. },
  84683. ":apple:": {
  84684. "uc_base": "1f34e",
  84685. "uc_output": "1f34e",
  84686. "uc_match": "1f34e",
  84687. "uc_greedy": "1f34e",
  84688. "shortnames": [],
  84689. "category": "food"
  84690. },
  84691. ":arrow_down_small:": {
  84692. "uc_base": "1f53d",
  84693. "uc_output": "1f53d",
  84694. "uc_match": "1f53d",
  84695. "uc_greedy": "1f53d",
  84696. "shortnames": [],
  84697. "category": "symbols"
  84698. },
  84699. ":arrow_up_small:": {
  84700. "uc_base": "1f53c",
  84701. "uc_output": "1f53c",
  84702. "uc_match": "1f53c",
  84703. "uc_greedy": "1f53c",
  84704. "shortnames": [],
  84705. "category": "symbols"
  84706. },
  84707. ":arrows_clockwise:": {
  84708. "uc_base": "1f503",
  84709. "uc_output": "1f503",
  84710. "uc_match": "1f503",
  84711. "uc_greedy": "1f503",
  84712. "shortnames": [],
  84713. "category": "symbols"
  84714. },
  84715. ":arrows_counterclockwise:": {
  84716. "uc_base": "1f504",
  84717. "uc_output": "1f504",
  84718. "uc_match": "1f504",
  84719. "uc_greedy": "1f504",
  84720. "shortnames": [],
  84721. "category": "symbols"
  84722. },
  84723. ":art:": {
  84724. "uc_base": "1f3a8",
  84725. "uc_output": "1f3a8",
  84726. "uc_match": "1f3a8",
  84727. "uc_greedy": "1f3a8",
  84728. "shortnames": [],
  84729. "category": "activity"
  84730. },
  84731. ":articulated_lorry:": {
  84732. "uc_base": "1f69b",
  84733. "uc_output": "1f69b",
  84734. "uc_match": "1f69b",
  84735. "uc_greedy": "1f69b",
  84736. "shortnames": [],
  84737. "category": "travel"
  84738. },
  84739. ":astonished:": {
  84740. "uc_base": "1f632",
  84741. "uc_output": "1f632",
  84742. "uc_match": "1f632",
  84743. "uc_greedy": "1f632",
  84744. "shortnames": [],
  84745. "category": "people"
  84746. },
  84747. ":athletic_shoe:": {
  84748. "uc_base": "1f45f",
  84749. "uc_output": "1f45f",
  84750. "uc_match": "1f45f",
  84751. "uc_greedy": "1f45f",
  84752. "shortnames": [],
  84753. "category": "people"
  84754. },
  84755. ":atm:": {
  84756. "uc_base": "1f3e7",
  84757. "uc_output": "1f3e7",
  84758. "uc_match": "1f3e7",
  84759. "uc_greedy": "1f3e7",
  84760. "shortnames": [],
  84761. "category": "symbols"
  84762. },
  84763. ":avocado:": {
  84764. "uc_base": "1f951",
  84765. "uc_output": "1f951",
  84766. "uc_match": "1f951",
  84767. "uc_greedy": "1f951",
  84768. "shortnames": [],
  84769. "category": "food"
  84770. },
  84771. ":b:": {
  84772. "uc_base": "1f171",
  84773. "uc_output": "1f171",
  84774. "uc_match": "1f171-fe0f",
  84775. "uc_greedy": "1f171-fe0f",
  84776. "shortnames": [],
  84777. "category": "symbols"
  84778. },
  84779. ":baby:": {
  84780. "uc_base": "1f476",
  84781. "uc_output": "1f476",
  84782. "uc_match": "1f476",
  84783. "uc_greedy": "1f476",
  84784. "shortnames": [],
  84785. "category": "people"
  84786. },
  84787. ":baby_bottle:": {
  84788. "uc_base": "1f37c",
  84789. "uc_output": "1f37c",
  84790. "uc_match": "1f37c",
  84791. "uc_greedy": "1f37c",
  84792. "shortnames": [],
  84793. "category": "food"
  84794. },
  84795. ":baby_chick:": {
  84796. "uc_base": "1f424",
  84797. "uc_output": "1f424",
  84798. "uc_match": "1f424",
  84799. "uc_greedy": "1f424",
  84800. "shortnames": [],
  84801. "category": "nature"
  84802. },
  84803. ":baby_symbol:": {
  84804. "uc_base": "1f6bc",
  84805. "uc_output": "1f6bc",
  84806. "uc_match": "1f6bc-fe0f",
  84807. "uc_greedy": "1f6bc-fe0f",
  84808. "shortnames": [],
  84809. "category": "symbols"
  84810. },
  84811. ":back:": {
  84812. "uc_base": "1f519",
  84813. "uc_output": "1f519",
  84814. "uc_match": "1f519",
  84815. "uc_greedy": "1f519",
  84816. "shortnames": [],
  84817. "category": "symbols"
  84818. },
  84819. ":bacon:": {
  84820. "uc_base": "1f953",
  84821. "uc_output": "1f953",
  84822. "uc_match": "1f953",
  84823. "uc_greedy": "1f953",
  84824. "shortnames": [],
  84825. "category": "food"
  84826. },
  84827. ":badminton:": {
  84828. "uc_base": "1f3f8",
  84829. "uc_output": "1f3f8",
  84830. "uc_match": "1f3f8",
  84831. "uc_greedy": "1f3f8",
  84832. "shortnames": [],
  84833. "category": "activity"
  84834. },
  84835. ":baggage_claim:": {
  84836. "uc_base": "1f6c4",
  84837. "uc_output": "1f6c4",
  84838. "uc_match": "1f6c4",
  84839. "uc_greedy": "1f6c4",
  84840. "shortnames": [],
  84841. "category": "symbols"
  84842. },
  84843. ":balloon:": {
  84844. "uc_base": "1f388",
  84845. "uc_output": "1f388",
  84846. "uc_match": "1f388",
  84847. "uc_greedy": "1f388",
  84848. "shortnames": [],
  84849. "category": "objects"
  84850. },
  84851. ":ballot_box:": {
  84852. "uc_base": "1f5f3",
  84853. "uc_output": "1f5f3",
  84854. "uc_match": "1f5f3-fe0f",
  84855. "uc_greedy": "1f5f3-fe0f",
  84856. "shortnames": [":ballot_box_with_ballot:"],
  84857. "category": "objects"
  84858. },
  84859. ":bamboo:": {
  84860. "uc_base": "1f38d",
  84861. "uc_output": "1f38d",
  84862. "uc_match": "1f38d",
  84863. "uc_greedy": "1f38d",
  84864. "shortnames": [],
  84865. "category": "nature"
  84866. },
  84867. ":banana:": {
  84868. "uc_base": "1f34c",
  84869. "uc_output": "1f34c",
  84870. "uc_match": "1f34c",
  84871. "uc_greedy": "1f34c",
  84872. "shortnames": [],
  84873. "category": "food"
  84874. },
  84875. ":bank:": {
  84876. "uc_base": "1f3e6",
  84877. "uc_output": "1f3e6",
  84878. "uc_match": "1f3e6",
  84879. "uc_greedy": "1f3e6",
  84880. "shortnames": [],
  84881. "category": "travel"
  84882. },
  84883. ":bar_chart:": {
  84884. "uc_base": "1f4ca",
  84885. "uc_output": "1f4ca",
  84886. "uc_match": "1f4ca",
  84887. "uc_greedy": "1f4ca",
  84888. "shortnames": [],
  84889. "category": "objects"
  84890. },
  84891. ":barber:": {
  84892. "uc_base": "1f488",
  84893. "uc_output": "1f488",
  84894. "uc_match": "1f488",
  84895. "uc_greedy": "1f488",
  84896. "shortnames": [],
  84897. "category": "objects"
  84898. },
  84899. ":basketball:": {
  84900. "uc_base": "1f3c0",
  84901. "uc_output": "1f3c0",
  84902. "uc_match": "1f3c0",
  84903. "uc_greedy": "1f3c0",
  84904. "shortnames": [],
  84905. "category": "activity"
  84906. },
  84907. ":bat:": {
  84908. "uc_base": "1f987",
  84909. "uc_output": "1f987",
  84910. "uc_match": "1f987",
  84911. "uc_greedy": "1f987",
  84912. "shortnames": [],
  84913. "category": "nature"
  84914. },
  84915. ":bath:": {
  84916. "uc_base": "1f6c0",
  84917. "uc_output": "1f6c0",
  84918. "uc_match": "1f6c0",
  84919. "uc_greedy": "1f6c0",
  84920. "shortnames": [],
  84921. "category": "objects"
  84922. },
  84923. ":bathtub:": {
  84924. "uc_base": "1f6c1",
  84925. "uc_output": "1f6c1",
  84926. "uc_match": "1f6c1",
  84927. "uc_greedy": "1f6c1",
  84928. "shortnames": [],
  84929. "category": "objects"
  84930. },
  84931. ":battery:": {
  84932. "uc_base": "1f50b",
  84933. "uc_output": "1f50b",
  84934. "uc_match": "1f50b",
  84935. "uc_greedy": "1f50b",
  84936. "shortnames": [],
  84937. "category": "objects"
  84938. },
  84939. ":beach:": {
  84940. "uc_base": "1f3d6",
  84941. "uc_output": "1f3d6",
  84942. "uc_match": "1f3d6-fe0f",
  84943. "uc_greedy": "1f3d6-fe0f",
  84944. "shortnames": [":beach_with_umbrella:"],
  84945. "category": "travel"
  84946. },
  84947. ":bear:": {
  84948. "uc_base": "1f43b",
  84949. "uc_output": "1f43b",
  84950. "uc_match": "1f43b",
  84951. "uc_greedy": "1f43b",
  84952. "shortnames": [],
  84953. "category": "nature"
  84954. },
  84955. ":bearded_person:": {
  84956. "uc_base": "1f9d4",
  84957. "uc_output": "1f9d4",
  84958. "uc_match": "1f9d4",
  84959. "uc_greedy": "1f9d4",
  84960. "shortnames": [],
  84961. "category": "people"
  84962. },
  84963. ":bed:": {
  84964. "uc_base": "1f6cf",
  84965. "uc_output": "1f6cf",
  84966. "uc_match": "1f6cf-fe0f",
  84967. "uc_greedy": "1f6cf-fe0f",
  84968. "shortnames": [],
  84969. "category": "objects"
  84970. },
  84971. ":bee:": {
  84972. "uc_base": "1f41d",
  84973. "uc_output": "1f41d",
  84974. "uc_match": "1f41d",
  84975. "uc_greedy": "1f41d",
  84976. "shortnames": [],
  84977. "category": "nature"
  84978. },
  84979. ":beer:": {
  84980. "uc_base": "1f37a",
  84981. "uc_output": "1f37a",
  84982. "uc_match": "1f37a",
  84983. "uc_greedy": "1f37a",
  84984. "shortnames": [],
  84985. "category": "food"
  84986. },
  84987. ":beers:": {
  84988. "uc_base": "1f37b",
  84989. "uc_output": "1f37b",
  84990. "uc_match": "1f37b",
  84991. "uc_greedy": "1f37b",
  84992. "shortnames": [],
  84993. "category": "food"
  84994. },
  84995. ":beetle:": {
  84996. "uc_base": "1f41e",
  84997. "uc_output": "1f41e",
  84998. "uc_match": "1f41e",
  84999. "uc_greedy": "1f41e",
  85000. "shortnames": [],
  85001. "category": "nature"
  85002. },
  85003. ":beginner:": {
  85004. "uc_base": "1f530",
  85005. "uc_output": "1f530",
  85006. "uc_match": "1f530",
  85007. "uc_greedy": "1f530",
  85008. "shortnames": [],
  85009. "category": "symbols"
  85010. },
  85011. ":bell:": {
  85012. "uc_base": "1f514",
  85013. "uc_output": "1f514",
  85014. "uc_match": "1f514",
  85015. "uc_greedy": "1f514",
  85016. "shortnames": [],
  85017. "category": "symbols"
  85018. },
  85019. ":bellhop:": {
  85020. "uc_base": "1f6ce",
  85021. "uc_output": "1f6ce",
  85022. "uc_match": "1f6ce-fe0f",
  85023. "uc_greedy": "1f6ce-fe0f",
  85024. "shortnames": [":bellhop_bell:"],
  85025. "category": "objects"
  85026. },
  85027. ":bento:": {
  85028. "uc_base": "1f371",
  85029. "uc_output": "1f371",
  85030. "uc_match": "1f371",
  85031. "uc_greedy": "1f371",
  85032. "shortnames": [],
  85033. "category": "food"
  85034. },
  85035. ":bike:": {
  85036. "uc_base": "1f6b2",
  85037. "uc_output": "1f6b2",
  85038. "uc_match": "1f6b2-fe0f",
  85039. "uc_greedy": "1f6b2-fe0f",
  85040. "shortnames": [],
  85041. "category": "travel"
  85042. },
  85043. ":bikini:": {
  85044. "uc_base": "1f459",
  85045. "uc_output": "1f459",
  85046. "uc_match": "1f459",
  85047. "uc_greedy": "1f459",
  85048. "shortnames": [],
  85049. "category": "people"
  85050. },
  85051. ":billed_cap:": {
  85052. "uc_base": "1f9e2",
  85053. "uc_output": "1f9e2",
  85054. "uc_match": "1f9e2",
  85055. "uc_greedy": "1f9e2",
  85056. "shortnames": [],
  85057. "category": "people"
  85058. },
  85059. ":bird:": {
  85060. "uc_base": "1f426",
  85061. "uc_output": "1f426",
  85062. "uc_match": "1f426-fe0f",
  85063. "uc_greedy": "1f426-fe0f",
  85064. "shortnames": [],
  85065. "category": "nature"
  85066. },
  85067. ":birthday:": {
  85068. "uc_base": "1f382",
  85069. "uc_output": "1f382",
  85070. "uc_match": "1f382",
  85071. "uc_greedy": "1f382",
  85072. "shortnames": [],
  85073. "category": "food"
  85074. },
  85075. ":black_heart:": {
  85076. "uc_base": "1f5a4",
  85077. "uc_output": "1f5a4",
  85078. "uc_match": "1f5a4",
  85079. "uc_greedy": "1f5a4",
  85080. "shortnames": [],
  85081. "category": "symbols"
  85082. },
  85083. ":black_joker:": {
  85084. "uc_base": "1f0cf",
  85085. "uc_output": "1f0cf",
  85086. "uc_match": "1f0cf",
  85087. "uc_greedy": "1f0cf",
  85088. "shortnames": [],
  85089. "category": "symbols"
  85090. },
  85091. ":black_square_button:": {
  85092. "uc_base": "1f532",
  85093. "uc_output": "1f532",
  85094. "uc_match": "1f532",
  85095. "uc_greedy": "1f532",
  85096. "shortnames": [],
  85097. "category": "symbols"
  85098. },
  85099. ":blond_haired_person:": {
  85100. "uc_base": "1f471",
  85101. "uc_output": "1f471",
  85102. "uc_match": "1f471",
  85103. "uc_greedy": "1f471",
  85104. "shortnames": [":person_with_blond_hair:"],
  85105. "category": "people"
  85106. },
  85107. ":blossom:": {
  85108. "uc_base": "1f33c",
  85109. "uc_output": "1f33c",
  85110. "uc_match": "1f33c",
  85111. "uc_greedy": "1f33c",
  85112. "shortnames": [],
  85113. "category": "nature"
  85114. },
  85115. ":blowfish:": {
  85116. "uc_base": "1f421",
  85117. "uc_output": "1f421",
  85118. "uc_match": "1f421",
  85119. "uc_greedy": "1f421",
  85120. "shortnames": [],
  85121. "category": "nature"
  85122. },
  85123. ":blue_book:": {
  85124. "uc_base": "1f4d8",
  85125. "uc_output": "1f4d8",
  85126. "uc_match": "1f4d8",
  85127. "uc_greedy": "1f4d8",
  85128. "shortnames": [],
  85129. "category": "objects"
  85130. },
  85131. ":blue_car:": {
  85132. "uc_base": "1f699",
  85133. "uc_output": "1f699",
  85134. "uc_match": "1f699",
  85135. "uc_greedy": "1f699",
  85136. "shortnames": [],
  85137. "category": "travel"
  85138. },
  85139. ":blue_circle:": {
  85140. "uc_base": "1f535",
  85141. "uc_output": "1f535",
  85142. "uc_match": "1f535",
  85143. "uc_greedy": "1f535",
  85144. "shortnames": [],
  85145. "category": "symbols"
  85146. },
  85147. ":blue_heart:": {
  85148. "uc_base": "1f499",
  85149. "uc_output": "1f499",
  85150. "uc_match": "1f499",
  85151. "uc_greedy": "1f499",
  85152. "shortnames": [],
  85153. "category": "symbols"
  85154. },
  85155. ":blush:": {
  85156. "uc_base": "1f60a",
  85157. "uc_output": "1f60a",
  85158. "uc_match": "1f60a",
  85159. "uc_greedy": "1f60a",
  85160. "shortnames": [],
  85161. "category": "people"
  85162. },
  85163. ":boar:": {
  85164. "uc_base": "1f417",
  85165. "uc_output": "1f417",
  85166. "uc_match": "1f417",
  85167. "uc_greedy": "1f417",
  85168. "shortnames": [],
  85169. "category": "nature"
  85170. },
  85171. ":bomb:": {
  85172. "uc_base": "1f4a3",
  85173. "uc_output": "1f4a3",
  85174. "uc_match": "1f4a3-fe0f",
  85175. "uc_greedy": "1f4a3-fe0f",
  85176. "shortnames": [],
  85177. "category": "objects"
  85178. },
  85179. ":book:": {
  85180. "uc_base": "1f4d6",
  85181. "uc_output": "1f4d6",
  85182. "uc_match": "1f4d6",
  85183. "uc_greedy": "1f4d6",
  85184. "shortnames": [],
  85185. "category": "objects"
  85186. },
  85187. ":bookmark:": {
  85188. "uc_base": "1f516",
  85189. "uc_output": "1f516",
  85190. "uc_match": "1f516",
  85191. "uc_greedy": "1f516",
  85192. "shortnames": [],
  85193. "category": "objects"
  85194. },
  85195. ":bookmark_tabs:": {
  85196. "uc_base": "1f4d1",
  85197. "uc_output": "1f4d1",
  85198. "uc_match": "1f4d1",
  85199. "uc_greedy": "1f4d1",
  85200. "shortnames": [],
  85201. "category": "objects"
  85202. },
  85203. ":books:": {
  85204. "uc_base": "1f4da",
  85205. "uc_output": "1f4da",
  85206. "uc_match": "1f4da-fe0f",
  85207. "uc_greedy": "1f4da-fe0f",
  85208. "shortnames": [],
  85209. "category": "objects"
  85210. },
  85211. ":boom:": {
  85212. "uc_base": "1f4a5",
  85213. "uc_output": "1f4a5",
  85214. "uc_match": "1f4a5",
  85215. "uc_greedy": "1f4a5",
  85216. "shortnames": [],
  85217. "category": "nature"
  85218. },
  85219. ":boot:": {
  85220. "uc_base": "1f462",
  85221. "uc_output": "1f462",
  85222. "uc_match": "1f462",
  85223. "uc_greedy": "1f462",
  85224. "shortnames": [],
  85225. "category": "people"
  85226. },
  85227. ":bouquet:": {
  85228. "uc_base": "1f490",
  85229. "uc_output": "1f490",
  85230. "uc_match": "1f490",
  85231. "uc_greedy": "1f490",
  85232. "shortnames": [],
  85233. "category": "nature"
  85234. },
  85235. ":bow_and_arrow:": {
  85236. "uc_base": "1f3f9",
  85237. "uc_output": "1f3f9",
  85238. "uc_match": "1f3f9",
  85239. "uc_greedy": "1f3f9",
  85240. "shortnames": [":archery:"],
  85241. "category": "activity"
  85242. },
  85243. ":bowl_with_spoon:": {
  85244. "uc_base": "1f963",
  85245. "uc_output": "1f963",
  85246. "uc_match": "1f963",
  85247. "uc_greedy": "1f963",
  85248. "shortnames": [],
  85249. "category": "food"
  85250. },
  85251. ":bowling:": {
  85252. "uc_base": "1f3b3",
  85253. "uc_output": "1f3b3",
  85254. "uc_match": "1f3b3",
  85255. "uc_greedy": "1f3b3",
  85256. "shortnames": [],
  85257. "category": "activity"
  85258. },
  85259. ":boxing_glove:": {
  85260. "uc_base": "1f94a",
  85261. "uc_output": "1f94a",
  85262. "uc_match": "1f94a",
  85263. "uc_greedy": "1f94a",
  85264. "shortnames": [":boxing_gloves:"],
  85265. "category": "activity"
  85266. },
  85267. ":boy:": {
  85268. "uc_base": "1f466",
  85269. "uc_output": "1f466",
  85270. "uc_match": "1f466",
  85271. "uc_greedy": "1f466",
  85272. "shortnames": [],
  85273. "category": "people"
  85274. },
  85275. ":brain:": {
  85276. "uc_base": "1f9e0",
  85277. "uc_output": "1f9e0",
  85278. "uc_match": "1f9e0",
  85279. "uc_greedy": "1f9e0",
  85280. "shortnames": [],
  85281. "category": "people"
  85282. },
  85283. ":bread:": {
  85284. "uc_base": "1f35e",
  85285. "uc_output": "1f35e",
  85286. "uc_match": "1f35e",
  85287. "uc_greedy": "1f35e",
  85288. "shortnames": [],
  85289. "category": "food"
  85290. },
  85291. ":breast_feeding:": {
  85292. "uc_base": "1f931",
  85293. "uc_output": "1f931",
  85294. "uc_match": "1f931",
  85295. "uc_greedy": "1f931",
  85296. "shortnames": [],
  85297. "category": "people"
  85298. },
  85299. ":bride_with_veil:": {
  85300. "uc_base": "1f470",
  85301. "uc_output": "1f470",
  85302. "uc_match": "1f470",
  85303. "uc_greedy": "1f470",
  85304. "shortnames": [],
  85305. "category": "people"
  85306. },
  85307. ":bridge_at_night:": {
  85308. "uc_base": "1f309",
  85309. "uc_output": "1f309",
  85310. "uc_match": "1f309",
  85311. "uc_greedy": "1f309",
  85312. "shortnames": [],
  85313. "category": "travel"
  85314. },
  85315. ":briefcase:": {
  85316. "uc_base": "1f4bc",
  85317. "uc_output": "1f4bc",
  85318. "uc_match": "1f4bc",
  85319. "uc_greedy": "1f4bc",
  85320. "shortnames": [],
  85321. "category": "people"
  85322. },
  85323. ":broccoli:": {
  85324. "uc_base": "1f966",
  85325. "uc_output": "1f966",
  85326. "uc_match": "1f966",
  85327. "uc_greedy": "1f966",
  85328. "shortnames": [],
  85329. "category": "food"
  85330. },
  85331. ":broken_heart:": {
  85332. "uc_base": "1f494",
  85333. "uc_output": "1f494",
  85334. "uc_match": "1f494",
  85335. "uc_greedy": "1f494",
  85336. "shortnames": [],
  85337. "category": "symbols"
  85338. },
  85339. ":bug:": {
  85340. "uc_base": "1f41b",
  85341. "uc_output": "1f41b",
  85342. "uc_match": "1f41b",
  85343. "uc_greedy": "1f41b",
  85344. "shortnames": [],
  85345. "category": "nature"
  85346. },
  85347. ":bulb:": {
  85348. "uc_base": "1f4a1",
  85349. "uc_output": "1f4a1",
  85350. "uc_match": "1f4a1",
  85351. "uc_greedy": "1f4a1",
  85352. "shortnames": [],
  85353. "category": "objects"
  85354. },
  85355. ":bullettrain_front:": {
  85356. "uc_base": "1f685",
  85357. "uc_output": "1f685",
  85358. "uc_match": "1f685",
  85359. "uc_greedy": "1f685",
  85360. "shortnames": [],
  85361. "category": "travel"
  85362. },
  85363. ":bullettrain_side:": {
  85364. "uc_base": "1f684",
  85365. "uc_output": "1f684",
  85366. "uc_match": "1f684",
  85367. "uc_greedy": "1f684",
  85368. "shortnames": [],
  85369. "category": "travel"
  85370. },
  85371. ":burrito:": {
  85372. "uc_base": "1f32f",
  85373. "uc_output": "1f32f",
  85374. "uc_match": "1f32f",
  85375. "uc_greedy": "1f32f",
  85376. "shortnames": [],
  85377. "category": "food"
  85378. },
  85379. ":bus:": {
  85380. "uc_base": "1f68c",
  85381. "uc_output": "1f68c",
  85382. "uc_match": "1f68c",
  85383. "uc_greedy": "1f68c",
  85384. "shortnames": [],
  85385. "category": "travel"
  85386. },
  85387. ":busstop:": {
  85388. "uc_base": "1f68f",
  85389. "uc_output": "1f68f",
  85390. "uc_match": "1f68f",
  85391. "uc_greedy": "1f68f",
  85392. "shortnames": [],
  85393. "category": "travel"
  85394. },
  85395. ":bust_in_silhouette:": {
  85396. "uc_base": "1f464",
  85397. "uc_output": "1f464",
  85398. "uc_match": "1f464",
  85399. "uc_greedy": "1f464",
  85400. "shortnames": [],
  85401. "category": "people"
  85402. },
  85403. ":busts_in_silhouette:": {
  85404. "uc_base": "1f465",
  85405. "uc_output": "1f465",
  85406. "uc_match": "1f465",
  85407. "uc_greedy": "1f465",
  85408. "shortnames": [],
  85409. "category": "people"
  85410. },
  85411. ":butterfly:": {
  85412. "uc_base": "1f98b",
  85413. "uc_output": "1f98b",
  85414. "uc_match": "1f98b",
  85415. "uc_greedy": "1f98b",
  85416. "shortnames": [],
  85417. "category": "nature"
  85418. },
  85419. ":cactus:": {
  85420. "uc_base": "1f335",
  85421. "uc_output": "1f335",
  85422. "uc_match": "1f335",
  85423. "uc_greedy": "1f335",
  85424. "shortnames": [],
  85425. "category": "nature"
  85426. },
  85427. ":cake:": {
  85428. "uc_base": "1f370",
  85429. "uc_output": "1f370",
  85430. "uc_match": "1f370",
  85431. "uc_greedy": "1f370",
  85432. "shortnames": [],
  85433. "category": "food"
  85434. },
  85435. ":calendar:": {
  85436. "uc_base": "1f4c6",
  85437. "uc_output": "1f4c6",
  85438. "uc_match": "1f4c6",
  85439. "uc_greedy": "1f4c6",
  85440. "shortnames": [],
  85441. "category": "objects"
  85442. },
  85443. ":calendar_spiral:": {
  85444. "uc_base": "1f5d3",
  85445. "uc_output": "1f5d3",
  85446. "uc_match": "1f5d3-fe0f",
  85447. "uc_greedy": "1f5d3-fe0f",
  85448. "shortnames": [":spiral_calendar_pad:"],
  85449. "category": "objects"
  85450. },
  85451. ":call_me:": {
  85452. "uc_base": "1f919",
  85453. "uc_output": "1f919",
  85454. "uc_match": "1f919",
  85455. "uc_greedy": "1f919",
  85456. "shortnames": [":call_me_hand:"],
  85457. "category": "people"
  85458. },
  85459. ":calling:": {
  85460. "uc_base": "1f4f2",
  85461. "uc_output": "1f4f2",
  85462. "uc_match": "1f4f2",
  85463. "uc_greedy": "1f4f2",
  85464. "shortnames": [],
  85465. "category": "objects"
  85466. },
  85467. ":camel:": {
  85468. "uc_base": "1f42b",
  85469. "uc_output": "1f42b",
  85470. "uc_match": "1f42b",
  85471. "uc_greedy": "1f42b",
  85472. "shortnames": [],
  85473. "category": "nature"
  85474. },
  85475. ":camera:": {
  85476. "uc_base": "1f4f7",
  85477. "uc_output": "1f4f7",
  85478. "uc_match": "1f4f7-fe0f",
  85479. "uc_greedy": "1f4f7-fe0f",
  85480. "shortnames": [],
  85481. "category": "objects"
  85482. },
  85483. ":camera_with_flash:": {
  85484. "uc_base": "1f4f8",
  85485. "uc_output": "1f4f8",
  85486. "uc_match": "1f4f8",
  85487. "uc_greedy": "1f4f8",
  85488. "shortnames": [],
  85489. "category": "objects"
  85490. },
  85491. ":camping:": {
  85492. "uc_base": "1f3d5",
  85493. "uc_output": "1f3d5",
  85494. "uc_match": "1f3d5-fe0f",
  85495. "uc_greedy": "1f3d5-fe0f",
  85496. "shortnames": [],
  85497. "category": "travel"
  85498. },
  85499. ":candle:": {
  85500. "uc_base": "1f56f",
  85501. "uc_output": "1f56f",
  85502. "uc_match": "1f56f-fe0f",
  85503. "uc_greedy": "1f56f-fe0f",
  85504. "shortnames": [],
  85505. "category": "objects"
  85506. },
  85507. ":candy:": {
  85508. "uc_base": "1f36c",
  85509. "uc_output": "1f36c",
  85510. "uc_match": "1f36c",
  85511. "uc_greedy": "1f36c",
  85512. "shortnames": [],
  85513. "category": "food"
  85514. },
  85515. ":canned_food:": {
  85516. "uc_base": "1f96b",
  85517. "uc_output": "1f96b",
  85518. "uc_match": "1f96b",
  85519. "uc_greedy": "1f96b",
  85520. "shortnames": [],
  85521. "category": "food"
  85522. },
  85523. ":canoe:": {
  85524. "uc_base": "1f6f6",
  85525. "uc_output": "1f6f6",
  85526. "uc_match": "1f6f6",
  85527. "uc_greedy": "1f6f6",
  85528. "shortnames": [":kayak:"],
  85529. "category": "travel"
  85530. },
  85531. ":capital_abcd:": {
  85532. "uc_base": "1f520",
  85533. "uc_output": "1f520",
  85534. "uc_match": "1f520",
  85535. "uc_greedy": "1f520",
  85536. "shortnames": [],
  85537. "category": "symbols"
  85538. },
  85539. ":card_box:": {
  85540. "uc_base": "1f5c3",
  85541. "uc_output": "1f5c3",
  85542. "uc_match": "1f5c3-fe0f",
  85543. "uc_greedy": "1f5c3-fe0f",
  85544. "shortnames": [":card_file_box:"],
  85545. "category": "objects"
  85546. },
  85547. ":card_index:": {
  85548. "uc_base": "1f4c7",
  85549. "uc_output": "1f4c7",
  85550. "uc_match": "1f4c7",
  85551. "uc_greedy": "1f4c7",
  85552. "shortnames": [],
  85553. "category": "objects"
  85554. },
  85555. ":carousel_horse:": {
  85556. "uc_base": "1f3a0",
  85557. "uc_output": "1f3a0",
  85558. "uc_match": "1f3a0",
  85559. "uc_greedy": "1f3a0",
  85560. "shortnames": [],
  85561. "category": "travel"
  85562. },
  85563. ":carrot:": {
  85564. "uc_base": "1f955",
  85565. "uc_output": "1f955",
  85566. "uc_match": "1f955",
  85567. "uc_greedy": "1f955",
  85568. "shortnames": [],
  85569. "category": "food"
  85570. },
  85571. ":cat2:": {
  85572. "uc_base": "1f408",
  85573. "uc_output": "1f408",
  85574. "uc_match": "1f408-fe0f",
  85575. "uc_greedy": "1f408-fe0f",
  85576. "shortnames": [],
  85577. "category": "nature"
  85578. },
  85579. ":cat:": {
  85580. "uc_base": "1f431",
  85581. "uc_output": "1f431",
  85582. "uc_match": "1f431",
  85583. "uc_greedy": "1f431",
  85584. "shortnames": [],
  85585. "category": "nature"
  85586. },
  85587. ":cd:": {
  85588. "uc_base": "1f4bf",
  85589. "uc_output": "1f4bf",
  85590. "uc_match": "1f4bf-fe0f",
  85591. "uc_greedy": "1f4bf-fe0f",
  85592. "shortnames": [],
  85593. "category": "objects"
  85594. },
  85595. ":champagne:": {
  85596. "uc_base": "1f37e",
  85597. "uc_output": "1f37e",
  85598. "uc_match": "1f37e",
  85599. "uc_greedy": "1f37e",
  85600. "shortnames": [":bottle_with_popping_cork:"],
  85601. "category": "food"
  85602. },
  85603. ":champagne_glass:": {
  85604. "uc_base": "1f942",
  85605. "uc_output": "1f942",
  85606. "uc_match": "1f942",
  85607. "uc_greedy": "1f942",
  85608. "shortnames": [":clinking_glass:"],
  85609. "category": "food"
  85610. },
  85611. ":chart:": {
  85612. "uc_base": "1f4b9",
  85613. "uc_output": "1f4b9",
  85614. "uc_match": "1f4b9",
  85615. "uc_greedy": "1f4b9",
  85616. "shortnames": [],
  85617. "category": "symbols"
  85618. },
  85619. ":chart_with_downwards_trend:": {
  85620. "uc_base": "1f4c9",
  85621. "uc_output": "1f4c9",
  85622. "uc_match": "1f4c9",
  85623. "uc_greedy": "1f4c9",
  85624. "shortnames": [],
  85625. "category": "objects"
  85626. },
  85627. ":chart_with_upwards_trend:": {
  85628. "uc_base": "1f4c8",
  85629. "uc_output": "1f4c8",
  85630. "uc_match": "1f4c8",
  85631. "uc_greedy": "1f4c8",
  85632. "shortnames": [],
  85633. "category": "objects"
  85634. },
  85635. ":checkered_flag:": {
  85636. "uc_base": "1f3c1",
  85637. "uc_output": "1f3c1",
  85638. "uc_match": "1f3c1",
  85639. "uc_greedy": "1f3c1",
  85640. "shortnames": [],
  85641. "category": "flags"
  85642. },
  85643. ":cheese:": {
  85644. "uc_base": "1f9c0",
  85645. "uc_output": "1f9c0",
  85646. "uc_match": "1f9c0",
  85647. "uc_greedy": "1f9c0",
  85648. "shortnames": [":cheese_wedge:"],
  85649. "category": "food"
  85650. },
  85651. ":cherries:": {
  85652. "uc_base": "1f352",
  85653. "uc_output": "1f352",
  85654. "uc_match": "1f352",
  85655. "uc_greedy": "1f352",
  85656. "shortnames": [],
  85657. "category": "food"
  85658. },
  85659. ":cherry_blossom:": {
  85660. "uc_base": "1f338",
  85661. "uc_output": "1f338",
  85662. "uc_match": "1f338",
  85663. "uc_greedy": "1f338",
  85664. "shortnames": [],
  85665. "category": "nature"
  85666. },
  85667. ":chestnut:": {
  85668. "uc_base": "1f330",
  85669. "uc_output": "1f330",
  85670. "uc_match": "1f330",
  85671. "uc_greedy": "1f330",
  85672. "shortnames": [],
  85673. "category": "food"
  85674. },
  85675. ":chicken:": {
  85676. "uc_base": "1f414",
  85677. "uc_output": "1f414",
  85678. "uc_match": "1f414",
  85679. "uc_greedy": "1f414",
  85680. "shortnames": [],
  85681. "category": "nature"
  85682. },
  85683. ":child:": {
  85684. "uc_base": "1f9d2",
  85685. "uc_output": "1f9d2",
  85686. "uc_match": "1f9d2",
  85687. "uc_greedy": "1f9d2",
  85688. "shortnames": [],
  85689. "category": "people"
  85690. },
  85691. ":children_crossing:": {
  85692. "uc_base": "1f6b8",
  85693. "uc_output": "1f6b8",
  85694. "uc_match": "1f6b8",
  85695. "uc_greedy": "1f6b8",
  85696. "shortnames": [],
  85697. "category": "symbols"
  85698. },
  85699. ":chipmunk:": {
  85700. "uc_base": "1f43f",
  85701. "uc_output": "1f43f",
  85702. "uc_match": "1f43f-fe0f",
  85703. "uc_greedy": "1f43f-fe0f",
  85704. "shortnames": [],
  85705. "category": "nature"
  85706. },
  85707. ":chocolate_bar:": {
  85708. "uc_base": "1f36b",
  85709. "uc_output": "1f36b",
  85710. "uc_match": "1f36b",
  85711. "uc_greedy": "1f36b",
  85712. "shortnames": [],
  85713. "category": "food"
  85714. },
  85715. ":chopsticks:": {
  85716. "uc_base": "1f962",
  85717. "uc_output": "1f962",
  85718. "uc_match": "1f962",
  85719. "uc_greedy": "1f962",
  85720. "shortnames": [],
  85721. "category": "food"
  85722. },
  85723. ":christmas_tree:": {
  85724. "uc_base": "1f384",
  85725. "uc_output": "1f384",
  85726. "uc_match": "1f384",
  85727. "uc_greedy": "1f384",
  85728. "shortnames": [],
  85729. "category": "nature"
  85730. },
  85731. ":cinema:": {
  85732. "uc_base": "1f3a6",
  85733. "uc_output": "1f3a6",
  85734. "uc_match": "1f3a6",
  85735. "uc_greedy": "1f3a6",
  85736. "shortnames": [],
  85737. "category": "symbols"
  85738. },
  85739. ":circus_tent:": {
  85740. "uc_base": "1f3aa",
  85741. "uc_output": "1f3aa",
  85742. "uc_match": "1f3aa",
  85743. "uc_greedy": "1f3aa",
  85744. "shortnames": [],
  85745. "category": "activity"
  85746. },
  85747. ":city_dusk:": {
  85748. "uc_base": "1f306",
  85749. "uc_output": "1f306",
  85750. "uc_match": "1f306",
  85751. "uc_greedy": "1f306",
  85752. "shortnames": [],
  85753. "category": "travel"
  85754. },
  85755. ":city_sunset:": {
  85756. "uc_base": "1f307",
  85757. "uc_output": "1f307",
  85758. "uc_match": "1f307",
  85759. "uc_greedy": "1f307",
  85760. "shortnames": [":city_sunrise:"],
  85761. "category": "travel"
  85762. },
  85763. ":cityscape:": {
  85764. "uc_base": "1f3d9",
  85765. "uc_output": "1f3d9",
  85766. "uc_match": "1f3d9-fe0f",
  85767. "uc_greedy": "1f3d9-fe0f",
  85768. "shortnames": [],
  85769. "category": "travel"
  85770. },
  85771. ":cl:": {
  85772. "uc_base": "1f191",
  85773. "uc_output": "1f191",
  85774. "uc_match": "1f191",
  85775. "uc_greedy": "1f191",
  85776. "shortnames": [],
  85777. "category": "symbols"
  85778. },
  85779. ":clap:": {
  85780. "uc_base": "1f44f",
  85781. "uc_output": "1f44f",
  85782. "uc_match": "1f44f",
  85783. "uc_greedy": "1f44f",
  85784. "shortnames": [],
  85785. "category": "people"
  85786. },
  85787. ":clapper:": {
  85788. "uc_base": "1f3ac",
  85789. "uc_output": "1f3ac",
  85790. "uc_match": "1f3ac-fe0f",
  85791. "uc_greedy": "1f3ac-fe0f",
  85792. "shortnames": [],
  85793. "category": "activity"
  85794. },
  85795. ":classical_building:": {
  85796. "uc_base": "1f3db",
  85797. "uc_output": "1f3db",
  85798. "uc_match": "1f3db-fe0f",
  85799. "uc_greedy": "1f3db-fe0f",
  85800. "shortnames": [],
  85801. "category": "travel"
  85802. },
  85803. ":clipboard:": {
  85804. "uc_base": "1f4cb",
  85805. "uc_output": "1f4cb",
  85806. "uc_match": "1f4cb-fe0f",
  85807. "uc_greedy": "1f4cb-fe0f",
  85808. "shortnames": [],
  85809. "category": "objects"
  85810. },
  85811. ":clock1030:": {
  85812. "uc_base": "1f565",
  85813. "uc_output": "1f565",
  85814. "uc_match": "1f565-fe0f",
  85815. "uc_greedy": "1f565-fe0f",
  85816. "shortnames": [],
  85817. "category": "symbols"
  85818. },
  85819. ":clock10:": {
  85820. "uc_base": "1f559",
  85821. "uc_output": "1f559",
  85822. "uc_match": "1f559-fe0f",
  85823. "uc_greedy": "1f559-fe0f",
  85824. "shortnames": [],
  85825. "category": "symbols"
  85826. },
  85827. ":clock1130:": {
  85828. "uc_base": "1f566",
  85829. "uc_output": "1f566",
  85830. "uc_match": "1f566-fe0f",
  85831. "uc_greedy": "1f566-fe0f",
  85832. "shortnames": [],
  85833. "category": "symbols"
  85834. },
  85835. ":clock11:": {
  85836. "uc_base": "1f55a",
  85837. "uc_output": "1f55a",
  85838. "uc_match": "1f55a-fe0f",
  85839. "uc_greedy": "1f55a-fe0f",
  85840. "shortnames": [],
  85841. "category": "symbols"
  85842. },
  85843. ":clock1230:": {
  85844. "uc_base": "1f567",
  85845. "uc_output": "1f567",
  85846. "uc_match": "1f567-fe0f",
  85847. "uc_greedy": "1f567-fe0f",
  85848. "shortnames": [],
  85849. "category": "symbols"
  85850. },
  85851. ":clock12:": {
  85852. "uc_base": "1f55b",
  85853. "uc_output": "1f55b",
  85854. "uc_match": "1f55b-fe0f",
  85855. "uc_greedy": "1f55b-fe0f",
  85856. "shortnames": [],
  85857. "category": "symbols"
  85858. },
  85859. ":clock130:": {
  85860. "uc_base": "1f55c",
  85861. "uc_output": "1f55c",
  85862. "uc_match": "1f55c-fe0f",
  85863. "uc_greedy": "1f55c-fe0f",
  85864. "shortnames": [],
  85865. "category": "symbols"
  85866. },
  85867. ":clock1:": {
  85868. "uc_base": "1f550",
  85869. "uc_output": "1f550",
  85870. "uc_match": "1f550-fe0f",
  85871. "uc_greedy": "1f550-fe0f",
  85872. "shortnames": [],
  85873. "category": "symbols"
  85874. },
  85875. ":clock230:": {
  85876. "uc_base": "1f55d",
  85877. "uc_output": "1f55d",
  85878. "uc_match": "1f55d-fe0f",
  85879. "uc_greedy": "1f55d-fe0f",
  85880. "shortnames": [],
  85881. "category": "symbols"
  85882. },
  85883. ":clock2:": {
  85884. "uc_base": "1f551",
  85885. "uc_output": "1f551",
  85886. "uc_match": "1f551-fe0f",
  85887. "uc_greedy": "1f551-fe0f",
  85888. "shortnames": [],
  85889. "category": "symbols"
  85890. },
  85891. ":clock330:": {
  85892. "uc_base": "1f55e",
  85893. "uc_output": "1f55e",
  85894. "uc_match": "1f55e-fe0f",
  85895. "uc_greedy": "1f55e-fe0f",
  85896. "shortnames": [],
  85897. "category": "symbols"
  85898. },
  85899. ":clock3:": {
  85900. "uc_base": "1f552",
  85901. "uc_output": "1f552",
  85902. "uc_match": "1f552-fe0f",
  85903. "uc_greedy": "1f552-fe0f",
  85904. "shortnames": [],
  85905. "category": "symbols"
  85906. },
  85907. ":clock430:": {
  85908. "uc_base": "1f55f",
  85909. "uc_output": "1f55f",
  85910. "uc_match": "1f55f-fe0f",
  85911. "uc_greedy": "1f55f-fe0f",
  85912. "shortnames": [],
  85913. "category": "symbols"
  85914. },
  85915. ":clock4:": {
  85916. "uc_base": "1f553",
  85917. "uc_output": "1f553",
  85918. "uc_match": "1f553-fe0f",
  85919. "uc_greedy": "1f553-fe0f",
  85920. "shortnames": [],
  85921. "category": "symbols"
  85922. },
  85923. ":clock530:": {
  85924. "uc_base": "1f560",
  85925. "uc_output": "1f560",
  85926. "uc_match": "1f560-fe0f",
  85927. "uc_greedy": "1f560-fe0f",
  85928. "shortnames": [],
  85929. "category": "symbols"
  85930. },
  85931. ":clock5:": {
  85932. "uc_base": "1f554",
  85933. "uc_output": "1f554",
  85934. "uc_match": "1f554-fe0f",
  85935. "uc_greedy": "1f554-fe0f",
  85936. "shortnames": [],
  85937. "category": "symbols"
  85938. },
  85939. ":clock630:": {
  85940. "uc_base": "1f561",
  85941. "uc_output": "1f561",
  85942. "uc_match": "1f561-fe0f",
  85943. "uc_greedy": "1f561-fe0f",
  85944. "shortnames": [],
  85945. "category": "symbols"
  85946. },
  85947. ":clock6:": {
  85948. "uc_base": "1f555",
  85949. "uc_output": "1f555",
  85950. "uc_match": "1f555-fe0f",
  85951. "uc_greedy": "1f555-fe0f",
  85952. "shortnames": [],
  85953. "category": "symbols"
  85954. },
  85955. ":clock730:": {
  85956. "uc_base": "1f562",
  85957. "uc_output": "1f562",
  85958. "uc_match": "1f562-fe0f",
  85959. "uc_greedy": "1f562-fe0f",
  85960. "shortnames": [],
  85961. "category": "symbols"
  85962. },
  85963. ":clock7:": {
  85964. "uc_base": "1f556",
  85965. "uc_output": "1f556",
  85966. "uc_match": "1f556-fe0f",
  85967. "uc_greedy": "1f556-fe0f",
  85968. "shortnames": [],
  85969. "category": "symbols"
  85970. },
  85971. ":clock830:": {
  85972. "uc_base": "1f563",
  85973. "uc_output": "1f563",
  85974. "uc_match": "1f563-fe0f",
  85975. "uc_greedy": "1f563-fe0f",
  85976. "shortnames": [],
  85977. "category": "symbols"
  85978. },
  85979. ":clock8:": {
  85980. "uc_base": "1f557",
  85981. "uc_output": "1f557",
  85982. "uc_match": "1f557-fe0f",
  85983. "uc_greedy": "1f557-fe0f",
  85984. "shortnames": [],
  85985. "category": "symbols"
  85986. },
  85987. ":clock930:": {
  85988. "uc_base": "1f564",
  85989. "uc_output": "1f564",
  85990. "uc_match": "1f564-fe0f",
  85991. "uc_greedy": "1f564-fe0f",
  85992. "shortnames": [],
  85993. "category": "symbols"
  85994. },
  85995. ":clock9:": {
  85996. "uc_base": "1f558",
  85997. "uc_output": "1f558",
  85998. "uc_match": "1f558-fe0f",
  85999. "uc_greedy": "1f558-fe0f",
  86000. "shortnames": [],
  86001. "category": "symbols"
  86002. },
  86003. ":clock:": {
  86004. "uc_base": "1f570",
  86005. "uc_output": "1f570",
  86006. "uc_match": "1f570-fe0f",
  86007. "uc_greedy": "1f570-fe0f",
  86008. "shortnames": [":mantlepiece_clock:"],
  86009. "category": "objects"
  86010. },
  86011. ":closed_book:": {
  86012. "uc_base": "1f4d5",
  86013. "uc_output": "1f4d5",
  86014. "uc_match": "1f4d5",
  86015. "uc_greedy": "1f4d5",
  86016. "shortnames": [],
  86017. "category": "objects"
  86018. },
  86019. ":closed_lock_with_key:": {
  86020. "uc_base": "1f510",
  86021. "uc_output": "1f510",
  86022. "uc_match": "1f510",
  86023. "uc_greedy": "1f510",
  86024. "shortnames": [],
  86025. "category": "objects"
  86026. },
  86027. ":closed_umbrella:": {
  86028. "uc_base": "1f302",
  86029. "uc_output": "1f302",
  86030. "uc_match": "1f302",
  86031. "uc_greedy": "1f302",
  86032. "shortnames": [],
  86033. "category": "people"
  86034. },
  86035. ":cloud_lightning:": {
  86036. "uc_base": "1f329",
  86037. "uc_output": "1f329",
  86038. "uc_match": "1f329-fe0f",
  86039. "uc_greedy": "1f329-fe0f",
  86040. "shortnames": [":cloud_with_lightning:"],
  86041. "category": "nature"
  86042. },
  86043. ":cloud_rain:": {
  86044. "uc_base": "1f327",
  86045. "uc_output": "1f327",
  86046. "uc_match": "1f327-fe0f",
  86047. "uc_greedy": "1f327-fe0f",
  86048. "shortnames": [":cloud_with_rain:"],
  86049. "category": "nature"
  86050. },
  86051. ":cloud_snow:": {
  86052. "uc_base": "1f328",
  86053. "uc_output": "1f328",
  86054. "uc_match": "1f328-fe0f",
  86055. "uc_greedy": "1f328-fe0f",
  86056. "shortnames": [":cloud_with_snow:"],
  86057. "category": "nature"
  86058. },
  86059. ":cloud_tornado:": {
  86060. "uc_base": "1f32a",
  86061. "uc_output": "1f32a",
  86062. "uc_match": "1f32a-fe0f",
  86063. "uc_greedy": "1f32a-fe0f",
  86064. "shortnames": [":cloud_with_tornado:"],
  86065. "category": "nature"
  86066. },
  86067. ":clown:": {
  86068. "uc_base": "1f921",
  86069. "uc_output": "1f921",
  86070. "uc_match": "1f921",
  86071. "uc_greedy": "1f921",
  86072. "shortnames": [":clown_face:"],
  86073. "category": "people"
  86074. },
  86075. ":coat:": {
  86076. "uc_base": "1f9e5",
  86077. "uc_output": "1f9e5",
  86078. "uc_match": "1f9e5",
  86079. "uc_greedy": "1f9e5",
  86080. "shortnames": [],
  86081. "category": "people"
  86082. },
  86083. ":cocktail:": {
  86084. "uc_base": "1f378",
  86085. "uc_output": "1f378",
  86086. "uc_match": "1f378-fe0f",
  86087. "uc_greedy": "1f378-fe0f",
  86088. "shortnames": [],
  86089. "category": "food"
  86090. },
  86091. ":coconut:": {
  86092. "uc_base": "1f965",
  86093. "uc_output": "1f965",
  86094. "uc_match": "1f965",
  86095. "uc_greedy": "1f965",
  86096. "shortnames": [],
  86097. "category": "food"
  86098. },
  86099. ":cold_sweat:": {
  86100. "uc_base": "1f630",
  86101. "uc_output": "1f630",
  86102. "uc_match": "1f630",
  86103. "uc_greedy": "1f630",
  86104. "shortnames": [],
  86105. "category": "people"
  86106. },
  86107. ":compression:": {
  86108. "uc_base": "1f5dc",
  86109. "uc_output": "1f5dc",
  86110. "uc_match": "1f5dc-fe0f",
  86111. "uc_greedy": "1f5dc-fe0f",
  86112. "shortnames": [],
  86113. "category": "objects"
  86114. },
  86115. ":computer:": {
  86116. "uc_base": "1f4bb",
  86117. "uc_output": "1f4bb",
  86118. "uc_match": "1f4bb-fe0f",
  86119. "uc_greedy": "1f4bb-fe0f",
  86120. "shortnames": [],
  86121. "category": "objects"
  86122. },
  86123. ":confetti_ball:": {
  86124. "uc_base": "1f38a",
  86125. "uc_output": "1f38a",
  86126. "uc_match": "1f38a",
  86127. "uc_greedy": "1f38a",
  86128. "shortnames": [],
  86129. "category": "objects"
  86130. },
  86131. ":confounded:": {
  86132. "uc_base": "1f616",
  86133. "uc_output": "1f616",
  86134. "uc_match": "1f616",
  86135. "uc_greedy": "1f616",
  86136. "shortnames": [],
  86137. "category": "people"
  86138. },
  86139. ":confused:": {
  86140. "uc_base": "1f615",
  86141. "uc_output": "1f615",
  86142. "uc_match": "1f615",
  86143. "uc_greedy": "1f615",
  86144. "shortnames": [],
  86145. "category": "people"
  86146. },
  86147. ":construction:": {
  86148. "uc_base": "1f6a7",
  86149. "uc_output": "1f6a7",
  86150. "uc_match": "1f6a7",
  86151. "uc_greedy": "1f6a7",
  86152. "shortnames": [],
  86153. "category": "travel"
  86154. },
  86155. ":construction_site:": {
  86156. "uc_base": "1f3d7",
  86157. "uc_output": "1f3d7",
  86158. "uc_match": "1f3d7-fe0f",
  86159. "uc_greedy": "1f3d7-fe0f",
  86160. "shortnames": [":building_construction:"],
  86161. "category": "travel"
  86162. },
  86163. ":construction_worker:": {
  86164. "uc_base": "1f477",
  86165. "uc_output": "1f477",
  86166. "uc_match": "1f477",
  86167. "uc_greedy": "1f477",
  86168. "shortnames": [],
  86169. "category": "people"
  86170. },
  86171. ":control_knobs:": {
  86172. "uc_base": "1f39b",
  86173. "uc_output": "1f39b",
  86174. "uc_match": "1f39b-fe0f",
  86175. "uc_greedy": "1f39b-fe0f",
  86176. "shortnames": [],
  86177. "category": "objects"
  86178. },
  86179. ":convenience_store:": {
  86180. "uc_base": "1f3ea",
  86181. "uc_output": "1f3ea",
  86182. "uc_match": "1f3ea",
  86183. "uc_greedy": "1f3ea",
  86184. "shortnames": [],
  86185. "category": "travel"
  86186. },
  86187. ":cookie:": {
  86188. "uc_base": "1f36a",
  86189. "uc_output": "1f36a",
  86190. "uc_match": "1f36a",
  86191. "uc_greedy": "1f36a",
  86192. "shortnames": [],
  86193. "category": "food"
  86194. },
  86195. ":cooking:": {
  86196. "uc_base": "1f373",
  86197. "uc_output": "1f373",
  86198. "uc_match": "1f373",
  86199. "uc_greedy": "1f373",
  86200. "shortnames": [],
  86201. "category": "food"
  86202. },
  86203. ":cool:": {
  86204. "uc_base": "1f192",
  86205. "uc_output": "1f192",
  86206. "uc_match": "1f192",
  86207. "uc_greedy": "1f192",
  86208. "shortnames": [],
  86209. "category": "symbols"
  86210. },
  86211. ":corn:": {
  86212. "uc_base": "1f33d",
  86213. "uc_output": "1f33d",
  86214. "uc_match": "1f33d",
  86215. "uc_greedy": "1f33d",
  86216. "shortnames": [],
  86217. "category": "food"
  86218. },
  86219. ":couch:": {
  86220. "uc_base": "1f6cb",
  86221. "uc_output": "1f6cb",
  86222. "uc_match": "1f6cb-fe0f",
  86223. "uc_greedy": "1f6cb-fe0f",
  86224. "shortnames": [":couch_and_lamp:"],
  86225. "category": "objects"
  86226. },
  86227. ":couple:": {
  86228. "uc_base": "1f46b",
  86229. "uc_output": "1f46b",
  86230. "uc_match": "1f46b",
  86231. "uc_greedy": "1f46b",
  86232. "shortnames": [],
  86233. "category": "people"
  86234. },
  86235. ":couple_with_heart:": {
  86236. "uc_base": "1f491",
  86237. "uc_output": "1f491",
  86238. "uc_match": "1f491",
  86239. "uc_greedy": "1f491",
  86240. "shortnames": [],
  86241. "category": "people"
  86242. },
  86243. ":couplekiss:": {
  86244. "uc_base": "1f48f",
  86245. "uc_output": "1f48f",
  86246. "uc_match": "1f48f",
  86247. "uc_greedy": "1f48f",
  86248. "shortnames": [],
  86249. "category": "people"
  86250. },
  86251. ":cow2:": {
  86252. "uc_base": "1f404",
  86253. "uc_output": "1f404",
  86254. "uc_match": "1f404",
  86255. "uc_greedy": "1f404",
  86256. "shortnames": [],
  86257. "category": "nature"
  86258. },
  86259. ":cow:": {
  86260. "uc_base": "1f42e",
  86261. "uc_output": "1f42e",
  86262. "uc_match": "1f42e",
  86263. "uc_greedy": "1f42e",
  86264. "shortnames": [],
  86265. "category": "nature"
  86266. },
  86267. ":cowboy:": {
  86268. "uc_base": "1f920",
  86269. "uc_output": "1f920",
  86270. "uc_match": "1f920",
  86271. "uc_greedy": "1f920",
  86272. "shortnames": [":face_with_cowboy_hat:"],
  86273. "category": "people"
  86274. },
  86275. ":crab:": {
  86276. "uc_base": "1f980",
  86277. "uc_output": "1f980",
  86278. "uc_match": "1f980",
  86279. "uc_greedy": "1f980",
  86280. "shortnames": [],
  86281. "category": "nature"
  86282. },
  86283. ":crayon:": {
  86284. "uc_base": "1f58d",
  86285. "uc_output": "1f58d",
  86286. "uc_match": "1f58d-fe0f",
  86287. "uc_greedy": "1f58d-fe0f",
  86288. "shortnames": [":lower_left_crayon:"],
  86289. "category": "objects"
  86290. },
  86291. ":crazy_face:": {
  86292. "uc_base": "1f92a",
  86293. "uc_output": "1f92a",
  86294. "uc_match": "1f92a",
  86295. "uc_greedy": "1f92a",
  86296. "shortnames": [],
  86297. "category": "people"
  86298. },
  86299. ":credit_card:": {
  86300. "uc_base": "1f4b3",
  86301. "uc_output": "1f4b3",
  86302. "uc_match": "1f4b3-fe0f",
  86303. "uc_greedy": "1f4b3-fe0f",
  86304. "shortnames": [],
  86305. "category": "objects"
  86306. },
  86307. ":crescent_moon:": {
  86308. "uc_base": "1f319",
  86309. "uc_output": "1f319",
  86310. "uc_match": "1f319",
  86311. "uc_greedy": "1f319",
  86312. "shortnames": [],
  86313. "category": "nature"
  86314. },
  86315. ":cricket:": {
  86316. "uc_base": "1f997",
  86317. "uc_output": "1f997",
  86318. "uc_match": "1f997",
  86319. "uc_greedy": "1f997",
  86320. "shortnames": [],
  86321. "category": "nature"
  86322. },
  86323. ":cricket_game:": {
  86324. "uc_base": "1f3cf",
  86325. "uc_output": "1f3cf",
  86326. "uc_match": "1f3cf",
  86327. "uc_greedy": "1f3cf",
  86328. "shortnames": [":cricket_bat_ball:"],
  86329. "category": "activity"
  86330. },
  86331. ":crocodile:": {
  86332. "uc_base": "1f40a",
  86333. "uc_output": "1f40a",
  86334. "uc_match": "1f40a",
  86335. "uc_greedy": "1f40a",
  86336. "shortnames": [],
  86337. "category": "nature"
  86338. },
  86339. ":croissant:": {
  86340. "uc_base": "1f950",
  86341. "uc_output": "1f950",
  86342. "uc_match": "1f950",
  86343. "uc_greedy": "1f950",
  86344. "shortnames": [],
  86345. "category": "food"
  86346. },
  86347. ":crossed_flags:": {
  86348. "uc_base": "1f38c",
  86349. "uc_output": "1f38c",
  86350. "uc_match": "1f38c",
  86351. "uc_greedy": "1f38c",
  86352. "shortnames": [],
  86353. "category": "flags"
  86354. },
  86355. ":crown:": {
  86356. "uc_base": "1f451",
  86357. "uc_output": "1f451",
  86358. "uc_match": "1f451",
  86359. "uc_greedy": "1f451",
  86360. "shortnames": [],
  86361. "category": "people"
  86362. },
  86363. ":cruise_ship:": {
  86364. "uc_base": "1f6f3",
  86365. "uc_output": "1f6f3",
  86366. "uc_match": "1f6f3-fe0f",
  86367. "uc_greedy": "1f6f3-fe0f",
  86368. "shortnames": [":passenger_ship:"],
  86369. "category": "travel"
  86370. },
  86371. ":cry:": {
  86372. "uc_base": "1f622",
  86373. "uc_output": "1f622",
  86374. "uc_match": "1f622",
  86375. "uc_greedy": "1f622",
  86376. "shortnames": [],
  86377. "category": "people"
  86378. },
  86379. ":crying_cat_face:": {
  86380. "uc_base": "1f63f",
  86381. "uc_output": "1f63f",
  86382. "uc_match": "1f63f",
  86383. "uc_greedy": "1f63f",
  86384. "shortnames": [],
  86385. "category": "people"
  86386. },
  86387. ":crystal_ball:": {
  86388. "uc_base": "1f52e",
  86389. "uc_output": "1f52e",
  86390. "uc_match": "1f52e",
  86391. "uc_greedy": "1f52e",
  86392. "shortnames": [],
  86393. "category": "objects"
  86394. },
  86395. ":cucumber:": {
  86396. "uc_base": "1f952",
  86397. "uc_output": "1f952",
  86398. "uc_match": "1f952",
  86399. "uc_greedy": "1f952",
  86400. "shortnames": [],
  86401. "category": "food"
  86402. },
  86403. ":cup_with_straw:": {
  86404. "uc_base": "1f964",
  86405. "uc_output": "1f964",
  86406. "uc_match": "1f964",
  86407. "uc_greedy": "1f964",
  86408. "shortnames": [],
  86409. "category": "food"
  86410. },
  86411. ":cupid:": {
  86412. "uc_base": "1f498",
  86413. "uc_output": "1f498",
  86414. "uc_match": "1f498",
  86415. "uc_greedy": "1f498",
  86416. "shortnames": [],
  86417. "category": "symbols"
  86418. },
  86419. ":curling_stone:": {
  86420. "uc_base": "1f94c",
  86421. "uc_output": "1f94c",
  86422. "uc_match": "1f94c",
  86423. "uc_greedy": "1f94c",
  86424. "shortnames": [],
  86425. "category": "activity"
  86426. },
  86427. ":currency_exchange:": {
  86428. "uc_base": "1f4b1",
  86429. "uc_output": "1f4b1",
  86430. "uc_match": "1f4b1",
  86431. "uc_greedy": "1f4b1",
  86432. "shortnames": [],
  86433. "category": "symbols"
  86434. },
  86435. ":curry:": {
  86436. "uc_base": "1f35b",
  86437. "uc_output": "1f35b",
  86438. "uc_match": "1f35b",
  86439. "uc_greedy": "1f35b",
  86440. "shortnames": [],
  86441. "category": "food"
  86442. },
  86443. ":custard:": {
  86444. "uc_base": "1f36e",
  86445. "uc_output": "1f36e",
  86446. "uc_match": "1f36e",
  86447. "uc_greedy": "1f36e",
  86448. "shortnames": [":pudding:", ":flan:"],
  86449. "category": "food"
  86450. },
  86451. ":customs:": {
  86452. "uc_base": "1f6c3",
  86453. "uc_output": "1f6c3",
  86454. "uc_match": "1f6c3",
  86455. "uc_greedy": "1f6c3",
  86456. "shortnames": [],
  86457. "category": "symbols"
  86458. },
  86459. ":cut_of_meat:": {
  86460. "uc_base": "1f969",
  86461. "uc_output": "1f969",
  86462. "uc_match": "1f969",
  86463. "uc_greedy": "1f969",
  86464. "shortnames": [],
  86465. "category": "food"
  86466. },
  86467. ":cyclone:": {
  86468. "uc_base": "1f300",
  86469. "uc_output": "1f300",
  86470. "uc_match": "1f300",
  86471. "uc_greedy": "1f300",
  86472. "shortnames": [],
  86473. "category": "symbols"
  86474. },
  86475. ":dagger:": {
  86476. "uc_base": "1f5e1",
  86477. "uc_output": "1f5e1",
  86478. "uc_match": "1f5e1-fe0f",
  86479. "uc_greedy": "1f5e1-fe0f",
  86480. "shortnames": [":dagger_knife:"],
  86481. "category": "objects"
  86482. },
  86483. ":dancer:": {
  86484. "uc_base": "1f483",
  86485. "uc_output": "1f483",
  86486. "uc_match": "1f483",
  86487. "uc_greedy": "1f483",
  86488. "shortnames": [],
  86489. "category": "people"
  86490. },
  86491. ":dango:": {
  86492. "uc_base": "1f361",
  86493. "uc_output": "1f361",
  86494. "uc_match": "1f361",
  86495. "uc_greedy": "1f361",
  86496. "shortnames": [],
  86497. "category": "food"
  86498. },
  86499. ":dark_sunglasses:": {
  86500. "uc_base": "1f576",
  86501. "uc_output": "1f576",
  86502. "uc_match": "1f576-fe0f",
  86503. "uc_greedy": "1f576-fe0f",
  86504. "shortnames": [],
  86505. "category": "people"
  86506. },
  86507. ":dart:": {
  86508. "uc_base": "1f3af",
  86509. "uc_output": "1f3af",
  86510. "uc_match": "1f3af",
  86511. "uc_greedy": "1f3af",
  86512. "shortnames": [],
  86513. "category": "activity"
  86514. },
  86515. ":dash:": {
  86516. "uc_base": "1f4a8",
  86517. "uc_output": "1f4a8",
  86518. "uc_match": "1f4a8",
  86519. "uc_greedy": "1f4a8",
  86520. "shortnames": [],
  86521. "category": "nature"
  86522. },
  86523. ":date:": {
  86524. "uc_base": "1f4c5",
  86525. "uc_output": "1f4c5",
  86526. "uc_match": "1f4c5",
  86527. "uc_greedy": "1f4c5",
  86528. "shortnames": [],
  86529. "category": "objects"
  86530. },
  86531. ":deciduous_tree:": {
  86532. "uc_base": "1f333",
  86533. "uc_output": "1f333",
  86534. "uc_match": "1f333",
  86535. "uc_greedy": "1f333",
  86536. "shortnames": [],
  86537. "category": "nature"
  86538. },
  86539. ":deer:": {
  86540. "uc_base": "1f98c",
  86541. "uc_output": "1f98c",
  86542. "uc_match": "1f98c",
  86543. "uc_greedy": "1f98c",
  86544. "shortnames": [],
  86545. "category": "nature"
  86546. },
  86547. ":department_store:": {
  86548. "uc_base": "1f3ec",
  86549. "uc_output": "1f3ec",
  86550. "uc_match": "1f3ec",
  86551. "uc_greedy": "1f3ec",
  86552. "shortnames": [],
  86553. "category": "travel"
  86554. },
  86555. ":desert:": {
  86556. "uc_base": "1f3dc",
  86557. "uc_output": "1f3dc",
  86558. "uc_match": "1f3dc-fe0f",
  86559. "uc_greedy": "1f3dc-fe0f",
  86560. "shortnames": [],
  86561. "category": "travel"
  86562. },
  86563. ":desktop:": {
  86564. "uc_base": "1f5a5",
  86565. "uc_output": "1f5a5",
  86566. "uc_match": "1f5a5-fe0f",
  86567. "uc_greedy": "1f5a5-fe0f",
  86568. "shortnames": [":desktop_computer:"],
  86569. "category": "objects"
  86570. },
  86571. ":detective:": {
  86572. "uc_base": "1f575",
  86573. "uc_output": "1f575",
  86574. "uc_match": "1f575-fe0f",
  86575. "uc_greedy": "1f575-fe0f",
  86576. "shortnames": [":spy:", ":sleuth_or_spy:"],
  86577. "category": "people"
  86578. },
  86579. ":diamond_shape_with_a_dot_inside:": {
  86580. "uc_base": "1f4a0",
  86581. "uc_output": "1f4a0",
  86582. "uc_match": "1f4a0",
  86583. "uc_greedy": "1f4a0",
  86584. "shortnames": [],
  86585. "category": "symbols"
  86586. },
  86587. ":disappointed:": {
  86588. "uc_base": "1f61e",
  86589. "uc_output": "1f61e",
  86590. "uc_match": "1f61e",
  86591. "uc_greedy": "1f61e",
  86592. "shortnames": [],
  86593. "category": "people"
  86594. },
  86595. ":disappointed_relieved:": {
  86596. "uc_base": "1f625",
  86597. "uc_output": "1f625",
  86598. "uc_match": "1f625",
  86599. "uc_greedy": "1f625",
  86600. "shortnames": [],
  86601. "category": "people"
  86602. },
  86603. ":dividers:": {
  86604. "uc_base": "1f5c2",
  86605. "uc_output": "1f5c2",
  86606. "uc_match": "1f5c2-fe0f",
  86607. "uc_greedy": "1f5c2-fe0f",
  86608. "shortnames": [":card_index_dividers:"],
  86609. "category": "objects"
  86610. },
  86611. ":dizzy:": {
  86612. "uc_base": "1f4ab",
  86613. "uc_output": "1f4ab",
  86614. "uc_match": "1f4ab",
  86615. "uc_greedy": "1f4ab",
  86616. "shortnames": [],
  86617. "category": "nature"
  86618. },
  86619. ":dizzy_face:": {
  86620. "uc_base": "1f635",
  86621. "uc_output": "1f635",
  86622. "uc_match": "1f635",
  86623. "uc_greedy": "1f635",
  86624. "shortnames": [],
  86625. "category": "people"
  86626. },
  86627. ":do_not_litter:": {
  86628. "uc_base": "1f6af",
  86629. "uc_output": "1f6af",
  86630. "uc_match": "1f6af",
  86631. "uc_greedy": "1f6af",
  86632. "shortnames": [],
  86633. "category": "symbols"
  86634. },
  86635. ":dog2:": {
  86636. "uc_base": "1f415",
  86637. "uc_output": "1f415",
  86638. "uc_match": "1f415-fe0f",
  86639. "uc_greedy": "1f415-fe0f",
  86640. "shortnames": [],
  86641. "category": "nature"
  86642. },
  86643. ":dog:": {
  86644. "uc_base": "1f436",
  86645. "uc_output": "1f436",
  86646. "uc_match": "1f436",
  86647. "uc_greedy": "1f436",
  86648. "shortnames": [],
  86649. "category": "nature"
  86650. },
  86651. ":dollar:": {
  86652. "uc_base": "1f4b5",
  86653. "uc_output": "1f4b5",
  86654. "uc_match": "1f4b5",
  86655. "uc_greedy": "1f4b5",
  86656. "shortnames": [],
  86657. "category": "objects"
  86658. },
  86659. ":dolls:": {
  86660. "uc_base": "1f38e",
  86661. "uc_output": "1f38e",
  86662. "uc_match": "1f38e",
  86663. "uc_greedy": "1f38e",
  86664. "shortnames": [],
  86665. "category": "objects"
  86666. },
  86667. ":dolphin:": {
  86668. "uc_base": "1f42c",
  86669. "uc_output": "1f42c",
  86670. "uc_match": "1f42c",
  86671. "uc_greedy": "1f42c",
  86672. "shortnames": [],
  86673. "category": "nature"
  86674. },
  86675. ":door:": {
  86676. "uc_base": "1f6aa",
  86677. "uc_output": "1f6aa",
  86678. "uc_match": "1f6aa",
  86679. "uc_greedy": "1f6aa",
  86680. "shortnames": [],
  86681. "category": "objects"
  86682. },
  86683. ":doughnut:": {
  86684. "uc_base": "1f369",
  86685. "uc_output": "1f369",
  86686. "uc_match": "1f369",
  86687. "uc_greedy": "1f369",
  86688. "shortnames": [],
  86689. "category": "food"
  86690. },
  86691. ":dove:": {
  86692. "uc_base": "1f54a",
  86693. "uc_output": "1f54a",
  86694. "uc_match": "1f54a-fe0f",
  86695. "uc_greedy": "1f54a-fe0f",
  86696. "shortnames": [":dove_of_peace:"],
  86697. "category": "nature"
  86698. },
  86699. ":dragon:": {
  86700. "uc_base": "1f409",
  86701. "uc_output": "1f409",
  86702. "uc_match": "1f409",
  86703. "uc_greedy": "1f409",
  86704. "shortnames": [],
  86705. "category": "nature"
  86706. },
  86707. ":dragon_face:": {
  86708. "uc_base": "1f432",
  86709. "uc_output": "1f432",
  86710. "uc_match": "1f432",
  86711. "uc_greedy": "1f432",
  86712. "shortnames": [],
  86713. "category": "nature"
  86714. },
  86715. ":dress:": {
  86716. "uc_base": "1f457",
  86717. "uc_output": "1f457",
  86718. "uc_match": "1f457",
  86719. "uc_greedy": "1f457",
  86720. "shortnames": [],
  86721. "category": "people"
  86722. },
  86723. ":dromedary_camel:": {
  86724. "uc_base": "1f42a",
  86725. "uc_output": "1f42a",
  86726. "uc_match": "1f42a",
  86727. "uc_greedy": "1f42a",
  86728. "shortnames": [],
  86729. "category": "nature"
  86730. },
  86731. ":drooling_face:": {
  86732. "uc_base": "1f924",
  86733. "uc_output": "1f924",
  86734. "uc_match": "1f924",
  86735. "uc_greedy": "1f924",
  86736. "shortnames": [":drool:"],
  86737. "category": "people"
  86738. },
  86739. ":droplet:": {
  86740. "uc_base": "1f4a7",
  86741. "uc_output": "1f4a7",
  86742. "uc_match": "1f4a7",
  86743. "uc_greedy": "1f4a7",
  86744. "shortnames": [],
  86745. "category": "nature"
  86746. },
  86747. ":drum:": {
  86748. "uc_base": "1f941",
  86749. "uc_output": "1f941",
  86750. "uc_match": "1f941",
  86751. "uc_greedy": "1f941",
  86752. "shortnames": [":drum_with_drumsticks:"],
  86753. "category": "activity"
  86754. },
  86755. ":duck:": {
  86756. "uc_base": "1f986",
  86757. "uc_output": "1f986",
  86758. "uc_match": "1f986",
  86759. "uc_greedy": "1f986",
  86760. "shortnames": [],
  86761. "category": "nature"
  86762. },
  86763. ":dumpling:": {
  86764. "uc_base": "1f95f",
  86765. "uc_output": "1f95f",
  86766. "uc_match": "1f95f",
  86767. "uc_greedy": "1f95f",
  86768. "shortnames": [],
  86769. "category": "food"
  86770. },
  86771. ":dvd:": {
  86772. "uc_base": "1f4c0",
  86773. "uc_output": "1f4c0",
  86774. "uc_match": "1f4c0",
  86775. "uc_greedy": "1f4c0",
  86776. "shortnames": [],
  86777. "category": "objects"
  86778. },
  86779. ":e-mail:": {
  86780. "uc_base": "1f4e7",
  86781. "uc_output": "1f4e7",
  86782. "uc_match": "1f4e7",
  86783. "uc_greedy": "1f4e7",
  86784. "shortnames": [":email:"],
  86785. "category": "objects"
  86786. },
  86787. ":eagle:": {
  86788. "uc_base": "1f985",
  86789. "uc_output": "1f985",
  86790. "uc_match": "1f985",
  86791. "uc_greedy": "1f985",
  86792. "shortnames": [],
  86793. "category": "nature"
  86794. },
  86795. ":ear:": {
  86796. "uc_base": "1f442",
  86797. "uc_output": "1f442",
  86798. "uc_match": "1f442-fe0f",
  86799. "uc_greedy": "1f442-fe0f",
  86800. "shortnames": [],
  86801. "category": "people"
  86802. },
  86803. ":ear_of_rice:": {
  86804. "uc_base": "1f33e",
  86805. "uc_output": "1f33e",
  86806. "uc_match": "1f33e",
  86807. "uc_greedy": "1f33e",
  86808. "shortnames": [],
  86809. "category": "nature"
  86810. },
  86811. ":earth_africa:": {
  86812. "uc_base": "1f30d",
  86813. "uc_output": "1f30d",
  86814. "uc_match": "1f30d-fe0f",
  86815. "uc_greedy": "1f30d-fe0f",
  86816. "shortnames": [],
  86817. "category": "nature"
  86818. },
  86819. ":earth_americas:": {
  86820. "uc_base": "1f30e",
  86821. "uc_output": "1f30e",
  86822. "uc_match": "1f30e-fe0f",
  86823. "uc_greedy": "1f30e-fe0f",
  86824. "shortnames": [],
  86825. "category": "nature"
  86826. },
  86827. ":earth_asia:": {
  86828. "uc_base": "1f30f",
  86829. "uc_output": "1f30f",
  86830. "uc_match": "1f30f-fe0f",
  86831. "uc_greedy": "1f30f-fe0f",
  86832. "shortnames": [],
  86833. "category": "nature"
  86834. },
  86835. ":egg:": {
  86836. "uc_base": "1f95a",
  86837. "uc_output": "1f95a",
  86838. "uc_match": "1f95a",
  86839. "uc_greedy": "1f95a",
  86840. "shortnames": [],
  86841. "category": "food"
  86842. },
  86843. ":eggplant:": {
  86844. "uc_base": "1f346",
  86845. "uc_output": "1f346",
  86846. "uc_match": "1f346",
  86847. "uc_greedy": "1f346",
  86848. "shortnames": [],
  86849. "category": "food"
  86850. },
  86851. ":electric_plug:": {
  86852. "uc_base": "1f50c",
  86853. "uc_output": "1f50c",
  86854. "uc_match": "1f50c",
  86855. "uc_greedy": "1f50c",
  86856. "shortnames": [],
  86857. "category": "objects"
  86858. },
  86859. ":elephant:": {
  86860. "uc_base": "1f418",
  86861. "uc_output": "1f418",
  86862. "uc_match": "1f418",
  86863. "uc_greedy": "1f418",
  86864. "shortnames": [],
  86865. "category": "nature"
  86866. },
  86867. ":elf:": {
  86868. "uc_base": "1f9dd",
  86869. "uc_output": "1f9dd",
  86870. "uc_match": "1f9dd",
  86871. "uc_greedy": "1f9dd",
  86872. "shortnames": [],
  86873. "category": "people"
  86874. },
  86875. ":end:": {
  86876. "uc_base": "1f51a",
  86877. "uc_output": "1f51a",
  86878. "uc_match": "1f51a",
  86879. "uc_greedy": "1f51a",
  86880. "shortnames": [],
  86881. "category": "symbols"
  86882. },
  86883. ":envelope_with_arrow:": {
  86884. "uc_base": "1f4e9",
  86885. "uc_output": "1f4e9",
  86886. "uc_match": "1f4e9",
  86887. "uc_greedy": "1f4e9",
  86888. "shortnames": [],
  86889. "category": "objects"
  86890. },
  86891. ":euro:": {
  86892. "uc_base": "1f4b6",
  86893. "uc_output": "1f4b6",
  86894. "uc_match": "1f4b6",
  86895. "uc_greedy": "1f4b6",
  86896. "shortnames": [],
  86897. "category": "objects"
  86898. },
  86899. ":european_castle:": {
  86900. "uc_base": "1f3f0",
  86901. "uc_output": "1f3f0",
  86902. "uc_match": "1f3f0",
  86903. "uc_greedy": "1f3f0",
  86904. "shortnames": [],
  86905. "category": "travel"
  86906. },
  86907. ":european_post_office:": {
  86908. "uc_base": "1f3e4",
  86909. "uc_output": "1f3e4",
  86910. "uc_match": "1f3e4",
  86911. "uc_greedy": "1f3e4",
  86912. "shortnames": [],
  86913. "category": "travel"
  86914. },
  86915. ":evergreen_tree:": {
  86916. "uc_base": "1f332",
  86917. "uc_output": "1f332",
  86918. "uc_match": "1f332",
  86919. "uc_greedy": "1f332",
  86920. "shortnames": [],
  86921. "category": "nature"
  86922. },
  86923. ":exploding_head:": {
  86924. "uc_base": "1f92f",
  86925. "uc_output": "1f92f",
  86926. "uc_match": "1f92f",
  86927. "uc_greedy": "1f92f",
  86928. "shortnames": [],
  86929. "category": "people"
  86930. },
  86931. ":expressionless:": {
  86932. "uc_base": "1f611",
  86933. "uc_output": "1f611",
  86934. "uc_match": "1f611",
  86935. "uc_greedy": "1f611",
  86936. "shortnames": [],
  86937. "category": "people"
  86938. },
  86939. ":eye:": {
  86940. "uc_base": "1f441",
  86941. "uc_output": "1f441",
  86942. "uc_match": "1f441-fe0f",
  86943. "uc_greedy": "1f441-fe0f",
  86944. "shortnames": [],
  86945. "category": "people"
  86946. },
  86947. ":eyeglasses:": {
  86948. "uc_base": "1f453",
  86949. "uc_output": "1f453",
  86950. "uc_match": "1f453-fe0f",
  86951. "uc_greedy": "1f453-fe0f",
  86952. "shortnames": [],
  86953. "category": "people"
  86954. },
  86955. ":eyes:": {
  86956. "uc_base": "1f440",
  86957. "uc_output": "1f440",
  86958. "uc_match": "1f440",
  86959. "uc_greedy": "1f440",
  86960. "shortnames": [],
  86961. "category": "people"
  86962. },
  86963. ":face_vomiting:": {
  86964. "uc_base": "1f92e",
  86965. "uc_output": "1f92e",
  86966. "uc_match": "1f92e",
  86967. "uc_greedy": "1f92e",
  86968. "shortnames": [],
  86969. "category": "people"
  86970. },
  86971. ":face_with_hand_over_mouth:": {
  86972. "uc_base": "1f92d",
  86973. "uc_output": "1f92d",
  86974. "uc_match": "1f92d",
  86975. "uc_greedy": "1f92d",
  86976. "shortnames": [],
  86977. "category": "people"
  86978. },
  86979. ":face_with_monocle:": {
  86980. "uc_base": "1f9d0",
  86981. "uc_output": "1f9d0",
  86982. "uc_match": "1f9d0",
  86983. "uc_greedy": "1f9d0",
  86984. "shortnames": [],
  86985. "category": "people"
  86986. },
  86987. ":face_with_raised_eyebrow:": {
  86988. "uc_base": "1f928",
  86989. "uc_output": "1f928",
  86990. "uc_match": "1f928",
  86991. "uc_greedy": "1f928",
  86992. "shortnames": [],
  86993. "category": "people"
  86994. },
  86995. ":face_with_symbols_over_mouth:": {
  86996. "uc_base": "1f92c",
  86997. "uc_output": "1f92c",
  86998. "uc_match": "1f92c",
  86999. "uc_greedy": "1f92c",
  87000. "shortnames": [],
  87001. "category": "people"
  87002. },
  87003. ":factory:": {
  87004. "uc_base": "1f3ed",
  87005. "uc_output": "1f3ed",
  87006. "uc_match": "1f3ed-fe0f",
  87007. "uc_greedy": "1f3ed-fe0f",
  87008. "shortnames": [],
  87009. "category": "travel"
  87010. },
  87011. ":fairy:": {
  87012. "uc_base": "1f9da",
  87013. "uc_output": "1f9da",
  87014. "uc_match": "1f9da",
  87015. "uc_greedy": "1f9da",
  87016. "shortnames": [],
  87017. "category": "people"
  87018. },
  87019. ":fallen_leaf:": {
  87020. "uc_base": "1f342",
  87021. "uc_output": "1f342",
  87022. "uc_match": "1f342",
  87023. "uc_greedy": "1f342",
  87024. "shortnames": [],
  87025. "category": "nature"
  87026. },
  87027. ":family:": {
  87028. "uc_base": "1f46a",
  87029. "uc_output": "1f46a",
  87030. "uc_match": "1f46a-fe0f",
  87031. "uc_greedy": "1f46a-fe0f",
  87032. "shortnames": [],
  87033. "category": "people"
  87034. },
  87035. ":fax:": {
  87036. "uc_base": "1f4e0",
  87037. "uc_output": "1f4e0",
  87038. "uc_match": "1f4e0",
  87039. "uc_greedy": "1f4e0",
  87040. "shortnames": [],
  87041. "category": "objects"
  87042. },
  87043. ":fearful:": {
  87044. "uc_base": "1f628",
  87045. "uc_output": "1f628",
  87046. "uc_match": "1f628",
  87047. "uc_greedy": "1f628",
  87048. "shortnames": [],
  87049. "category": "people"
  87050. },
  87051. ":feet:": {
  87052. "uc_base": "1f43e",
  87053. "uc_output": "1f43e",
  87054. "uc_match": "1f43e",
  87055. "uc_greedy": "1f43e",
  87056. "shortnames": [":paw_prints:"],
  87057. "category": "nature"
  87058. },
  87059. ":ferris_wheel:": {
  87060. "uc_base": "1f3a1",
  87061. "uc_output": "1f3a1",
  87062. "uc_match": "1f3a1",
  87063. "uc_greedy": "1f3a1",
  87064. "shortnames": [],
  87065. "category": "travel"
  87066. },
  87067. ":field_hockey:": {
  87068. "uc_base": "1f3d1",
  87069. "uc_output": "1f3d1",
  87070. "uc_match": "1f3d1",
  87071. "uc_greedy": "1f3d1",
  87072. "shortnames": [],
  87073. "category": "activity"
  87074. },
  87075. ":file_cabinet:": {
  87076. "uc_base": "1f5c4",
  87077. "uc_output": "1f5c4",
  87078. "uc_match": "1f5c4-fe0f",
  87079. "uc_greedy": "1f5c4-fe0f",
  87080. "shortnames": [],
  87081. "category": "objects"
  87082. },
  87083. ":file_folder:": {
  87084. "uc_base": "1f4c1",
  87085. "uc_output": "1f4c1",
  87086. "uc_match": "1f4c1",
  87087. "uc_greedy": "1f4c1",
  87088. "shortnames": [],
  87089. "category": "objects"
  87090. },
  87091. ":film_frames:": {
  87092. "uc_base": "1f39e",
  87093. "uc_output": "1f39e",
  87094. "uc_match": "1f39e-fe0f",
  87095. "uc_greedy": "1f39e-fe0f",
  87096. "shortnames": [],
  87097. "category": "objects"
  87098. },
  87099. ":fingers_crossed:": {
  87100. "uc_base": "1f91e",
  87101. "uc_output": "1f91e",
  87102. "uc_match": "1f91e",
  87103. "uc_greedy": "1f91e",
  87104. "shortnames": [":hand_with_index_and_middle_finger_crossed:"],
  87105. "category": "people"
  87106. },
  87107. ":fire:": {
  87108. "uc_base": "1f525",
  87109. "uc_output": "1f525",
  87110. "uc_match": "1f525",
  87111. "uc_greedy": "1f525",
  87112. "shortnames": [":flame:"],
  87113. "category": "nature"
  87114. },
  87115. ":fire_engine:": {
  87116. "uc_base": "1f692",
  87117. "uc_output": "1f692",
  87118. "uc_match": "1f692",
  87119. "uc_greedy": "1f692",
  87120. "shortnames": [],
  87121. "category": "travel"
  87122. },
  87123. ":fireworks:": {
  87124. "uc_base": "1f386",
  87125. "uc_output": "1f386",
  87126. "uc_match": "1f386",
  87127. "uc_greedy": "1f386",
  87128. "shortnames": [],
  87129. "category": "travel"
  87130. },
  87131. ":first_place:": {
  87132. "uc_base": "1f947",
  87133. "uc_output": "1f947",
  87134. "uc_match": "1f947",
  87135. "uc_greedy": "1f947",
  87136. "shortnames": [":first_place_medal:"],
  87137. "category": "activity"
  87138. },
  87139. ":first_quarter_moon:": {
  87140. "uc_base": "1f313",
  87141. "uc_output": "1f313",
  87142. "uc_match": "1f313",
  87143. "uc_greedy": "1f313",
  87144. "shortnames": [],
  87145. "category": "nature"
  87146. },
  87147. ":first_quarter_moon_with_face:": {
  87148. "uc_base": "1f31b",
  87149. "uc_output": "1f31b",
  87150. "uc_match": "1f31b",
  87151. "uc_greedy": "1f31b",
  87152. "shortnames": [],
  87153. "category": "nature"
  87154. },
  87155. ":fish:": {
  87156. "uc_base": "1f41f",
  87157. "uc_output": "1f41f",
  87158. "uc_match": "1f41f-fe0f",
  87159. "uc_greedy": "1f41f-fe0f",
  87160. "shortnames": [],
  87161. "category": "nature"
  87162. },
  87163. ":fish_cake:": {
  87164. "uc_base": "1f365",
  87165. "uc_output": "1f365",
  87166. "uc_match": "1f365",
  87167. "uc_greedy": "1f365",
  87168. "shortnames": [],
  87169. "category": "food"
  87170. },
  87171. ":fishing_pole_and_fish:": {
  87172. "uc_base": "1f3a3",
  87173. "uc_output": "1f3a3",
  87174. "uc_match": "1f3a3",
  87175. "uc_greedy": "1f3a3",
  87176. "shortnames": [],
  87177. "category": "activity"
  87178. },
  87179. ":flag_black:": {
  87180. "uc_base": "1f3f4",
  87181. "uc_output": "1f3f4",
  87182. "uc_match": "1f3f4",
  87183. "uc_greedy": "1f3f4",
  87184. "shortnames": [":waving_black_flag:"],
  87185. "category": "flags"
  87186. },
  87187. ":flag_white:": {
  87188. "uc_base": "1f3f3",
  87189. "uc_output": "1f3f3",
  87190. "uc_match": "1f3f3-fe0f",
  87191. "uc_greedy": "1f3f3-fe0f",
  87192. "shortnames": [":waving_white_flag:"],
  87193. "category": "flags"
  87194. },
  87195. ":flags:": {
  87196. "uc_base": "1f38f",
  87197. "uc_output": "1f38f",
  87198. "uc_match": "1f38f",
  87199. "uc_greedy": "1f38f",
  87200. "shortnames": [],
  87201. "category": "objects"
  87202. },
  87203. ":flashlight:": {
  87204. "uc_base": "1f526",
  87205. "uc_output": "1f526",
  87206. "uc_match": "1f526",
  87207. "uc_greedy": "1f526",
  87208. "shortnames": [],
  87209. "category": "objects"
  87210. },
  87211. ":floppy_disk:": {
  87212. "uc_base": "1f4be",
  87213. "uc_output": "1f4be",
  87214. "uc_match": "1f4be",
  87215. "uc_greedy": "1f4be",
  87216. "shortnames": [],
  87217. "category": "objects"
  87218. },
  87219. ":flower_playing_cards:": {
  87220. "uc_base": "1f3b4",
  87221. "uc_output": "1f3b4",
  87222. "uc_match": "1f3b4",
  87223. "uc_greedy": "1f3b4",
  87224. "shortnames": [],
  87225. "category": "symbols"
  87226. },
  87227. ":flushed:": {
  87228. "uc_base": "1f633",
  87229. "uc_output": "1f633",
  87230. "uc_match": "1f633",
  87231. "uc_greedy": "1f633",
  87232. "shortnames": [],
  87233. "category": "people"
  87234. },
  87235. ":flying_saucer:": {
  87236. "uc_base": "1f6f8",
  87237. "uc_output": "1f6f8",
  87238. "uc_match": "1f6f8",
  87239. "uc_greedy": "1f6f8",
  87240. "shortnames": [],
  87241. "category": "travel"
  87242. },
  87243. ":fog:": {
  87244. "uc_base": "1f32b",
  87245. "uc_output": "1f32b",
  87246. "uc_match": "1f32b-fe0f",
  87247. "uc_greedy": "1f32b-fe0f",
  87248. "shortnames": [],
  87249. "category": "nature"
  87250. },
  87251. ":foggy:": {
  87252. "uc_base": "1f301",
  87253. "uc_output": "1f301",
  87254. "uc_match": "1f301",
  87255. "uc_greedy": "1f301",
  87256. "shortnames": [],
  87257. "category": "travel"
  87258. },
  87259. ":football:": {
  87260. "uc_base": "1f3c8",
  87261. "uc_output": "1f3c8",
  87262. "uc_match": "1f3c8",
  87263. "uc_greedy": "1f3c8",
  87264. "shortnames": [],
  87265. "category": "activity"
  87266. },
  87267. ":footprints:": {
  87268. "uc_base": "1f463",
  87269. "uc_output": "1f463",
  87270. "uc_match": "1f463",
  87271. "uc_greedy": "1f463",
  87272. "shortnames": [],
  87273. "category": "people"
  87274. },
  87275. ":fork_and_knife:": {
  87276. "uc_base": "1f374",
  87277. "uc_output": "1f374",
  87278. "uc_match": "1f374",
  87279. "uc_greedy": "1f374",
  87280. "shortnames": [],
  87281. "category": "food"
  87282. },
  87283. ":fork_knife_plate:": {
  87284. "uc_base": "1f37d",
  87285. "uc_output": "1f37d",
  87286. "uc_match": "1f37d-fe0f",
  87287. "uc_greedy": "1f37d-fe0f",
  87288. "shortnames": [":fork_and_knife_with_plate:"],
  87289. "category": "food"
  87290. },
  87291. ":fortune_cookie:": {
  87292. "uc_base": "1f960",
  87293. "uc_output": "1f960",
  87294. "uc_match": "1f960",
  87295. "uc_greedy": "1f960",
  87296. "shortnames": [],
  87297. "category": "food"
  87298. },
  87299. ":four_leaf_clover:": {
  87300. "uc_base": "1f340",
  87301. "uc_output": "1f340",
  87302. "uc_match": "1f340",
  87303. "uc_greedy": "1f340",
  87304. "shortnames": [],
  87305. "category": "nature"
  87306. },
  87307. ":fox:": {
  87308. "uc_base": "1f98a",
  87309. "uc_output": "1f98a",
  87310. "uc_match": "1f98a",
  87311. "uc_greedy": "1f98a",
  87312. "shortnames": [":fox_face:"],
  87313. "category": "nature"
  87314. },
  87315. ":frame_photo:": {
  87316. "uc_base": "1f5bc",
  87317. "uc_output": "1f5bc",
  87318. "uc_match": "1f5bc-fe0f",
  87319. "uc_greedy": "1f5bc-fe0f",
  87320. "shortnames": [":frame_with_picture:"],
  87321. "category": "objects"
  87322. },
  87323. ":free:": {
  87324. "uc_base": "1f193",
  87325. "uc_output": "1f193",
  87326. "uc_match": "1f193",
  87327. "uc_greedy": "1f193",
  87328. "shortnames": [],
  87329. "category": "symbols"
  87330. },
  87331. ":french_bread:": {
  87332. "uc_base": "1f956",
  87333. "uc_output": "1f956",
  87334. "uc_match": "1f956",
  87335. "uc_greedy": "1f956",
  87336. "shortnames": [":baguette_bread:"],
  87337. "category": "food"
  87338. },
  87339. ":fried_shrimp:": {
  87340. "uc_base": "1f364",
  87341. "uc_output": "1f364",
  87342. "uc_match": "1f364",
  87343. "uc_greedy": "1f364",
  87344. "shortnames": [],
  87345. "category": "food"
  87346. },
  87347. ":fries:": {
  87348. "uc_base": "1f35f",
  87349. "uc_output": "1f35f",
  87350. "uc_match": "1f35f",
  87351. "uc_greedy": "1f35f",
  87352. "shortnames": [],
  87353. "category": "food"
  87354. },
  87355. ":frog:": {
  87356. "uc_base": "1f438",
  87357. "uc_output": "1f438",
  87358. "uc_match": "1f438",
  87359. "uc_greedy": "1f438",
  87360. "shortnames": [],
  87361. "category": "nature"
  87362. },
  87363. ":frowning:": {
  87364. "uc_base": "1f626",
  87365. "uc_output": "1f626",
  87366. "uc_match": "1f626",
  87367. "uc_greedy": "1f626",
  87368. "shortnames": [],
  87369. "category": "people"
  87370. },
  87371. ":full_moon:": {
  87372. "uc_base": "1f315",
  87373. "uc_output": "1f315",
  87374. "uc_match": "1f315-fe0f",
  87375. "uc_greedy": "1f315-fe0f",
  87376. "shortnames": [],
  87377. "category": "nature"
  87378. },
  87379. ":full_moon_with_face:": {
  87380. "uc_base": "1f31d",
  87381. "uc_output": "1f31d",
  87382. "uc_match": "1f31d",
  87383. "uc_greedy": "1f31d",
  87384. "shortnames": [],
  87385. "category": "nature"
  87386. },
  87387. ":game_die:": {
  87388. "uc_base": "1f3b2",
  87389. "uc_output": "1f3b2",
  87390. "uc_match": "1f3b2",
  87391. "uc_greedy": "1f3b2",
  87392. "shortnames": [],
  87393. "category": "activity"
  87394. },
  87395. ":gem:": {
  87396. "uc_base": "1f48e",
  87397. "uc_output": "1f48e",
  87398. "uc_match": "1f48e",
  87399. "uc_greedy": "1f48e",
  87400. "shortnames": [],
  87401. "category": "objects"
  87402. },
  87403. ":genie:": {
  87404. "uc_base": "1f9de",
  87405. "uc_output": "1f9de",
  87406. "uc_match": "1f9de",
  87407. "uc_greedy": "1f9de",
  87408. "shortnames": [],
  87409. "category": "people"
  87410. },
  87411. ":ghost:": {
  87412. "uc_base": "1f47b",
  87413. "uc_output": "1f47b",
  87414. "uc_match": "1f47b",
  87415. "uc_greedy": "1f47b",
  87416. "shortnames": [],
  87417. "category": "people"
  87418. },
  87419. ":gift:": {
  87420. "uc_base": "1f381",
  87421. "uc_output": "1f381",
  87422. "uc_match": "1f381",
  87423. "uc_greedy": "1f381",
  87424. "shortnames": [],
  87425. "category": "objects"
  87426. },
  87427. ":gift_heart:": {
  87428. "uc_base": "1f49d",
  87429. "uc_output": "1f49d",
  87430. "uc_match": "1f49d",
  87431. "uc_greedy": "1f49d",
  87432. "shortnames": [],
  87433. "category": "symbols"
  87434. },
  87435. ":giraffe:": {
  87436. "uc_base": "1f992",
  87437. "uc_output": "1f992",
  87438. "uc_match": "1f992",
  87439. "uc_greedy": "1f992",
  87440. "shortnames": [],
  87441. "category": "nature"
  87442. },
  87443. ":girl:": {
  87444. "uc_base": "1f467",
  87445. "uc_output": "1f467",
  87446. "uc_match": "1f467",
  87447. "uc_greedy": "1f467",
  87448. "shortnames": [],
  87449. "category": "people"
  87450. },
  87451. ":globe_with_meridians:": {
  87452. "uc_base": "1f310",
  87453. "uc_output": "1f310",
  87454. "uc_match": "1f310",
  87455. "uc_greedy": "1f310",
  87456. "shortnames": [],
  87457. "category": "symbols"
  87458. },
  87459. ":gloves:": {
  87460. "uc_base": "1f9e4",
  87461. "uc_output": "1f9e4",
  87462. "uc_match": "1f9e4",
  87463. "uc_greedy": "1f9e4",
  87464. "shortnames": [],
  87465. "category": "people"
  87466. },
  87467. ":goal:": {
  87468. "uc_base": "1f945",
  87469. "uc_output": "1f945",
  87470. "uc_match": "1f945",
  87471. "uc_greedy": "1f945",
  87472. "shortnames": [":goal_net:"],
  87473. "category": "activity"
  87474. },
  87475. ":goat:": {
  87476. "uc_base": "1f410",
  87477. "uc_output": "1f410",
  87478. "uc_match": "1f410",
  87479. "uc_greedy": "1f410",
  87480. "shortnames": [],
  87481. "category": "nature"
  87482. },
  87483. ":gorilla:": {
  87484. "uc_base": "1f98d",
  87485. "uc_output": "1f98d",
  87486. "uc_match": "1f98d",
  87487. "uc_greedy": "1f98d",
  87488. "shortnames": [],
  87489. "category": "nature"
  87490. },
  87491. ":grapes:": {
  87492. "uc_base": "1f347",
  87493. "uc_output": "1f347",
  87494. "uc_match": "1f347",
  87495. "uc_greedy": "1f347",
  87496. "shortnames": [],
  87497. "category": "food"
  87498. },
  87499. ":green_apple:": {
  87500. "uc_base": "1f34f",
  87501. "uc_output": "1f34f",
  87502. "uc_match": "1f34f",
  87503. "uc_greedy": "1f34f",
  87504. "shortnames": [],
  87505. "category": "food"
  87506. },
  87507. ":green_book:": {
  87508. "uc_base": "1f4d7",
  87509. "uc_output": "1f4d7",
  87510. "uc_match": "1f4d7",
  87511. "uc_greedy": "1f4d7",
  87512. "shortnames": [],
  87513. "category": "objects"
  87514. },
  87515. ":green_heart:": {
  87516. "uc_base": "1f49a",
  87517. "uc_output": "1f49a",
  87518. "uc_match": "1f49a",
  87519. "uc_greedy": "1f49a",
  87520. "shortnames": [],
  87521. "category": "symbols"
  87522. },
  87523. ":grimacing:": {
  87524. "uc_base": "1f62c",
  87525. "uc_output": "1f62c",
  87526. "uc_match": "1f62c",
  87527. "uc_greedy": "1f62c",
  87528. "shortnames": [],
  87529. "category": "people"
  87530. },
  87531. ":grin:": {
  87532. "uc_base": "1f601",
  87533. "uc_output": "1f601",
  87534. "uc_match": "1f601",
  87535. "uc_greedy": "1f601",
  87536. "shortnames": [],
  87537. "category": "people"
  87538. },
  87539. ":grinning:": {
  87540. "uc_base": "1f600",
  87541. "uc_output": "1f600",
  87542. "uc_match": "1f600",
  87543. "uc_greedy": "1f600",
  87544. "shortnames": [],
  87545. "category": "people"
  87546. },
  87547. ":guard:": {
  87548. "uc_base": "1f482",
  87549. "uc_output": "1f482",
  87550. "uc_match": "1f482",
  87551. "uc_greedy": "1f482",
  87552. "shortnames": [":guardsman:"],
  87553. "category": "people"
  87554. },
  87555. ":guitar:": {
  87556. "uc_base": "1f3b8",
  87557. "uc_output": "1f3b8",
  87558. "uc_match": "1f3b8",
  87559. "uc_greedy": "1f3b8",
  87560. "shortnames": [],
  87561. "category": "activity"
  87562. },
  87563. ":gun:": {
  87564. "uc_base": "1f52b",
  87565. "uc_output": "1f52b",
  87566. "uc_match": "1f52b",
  87567. "uc_greedy": "1f52b",
  87568. "shortnames": [],
  87569. "category": "objects"
  87570. },
  87571. ":hamburger:": {
  87572. "uc_base": "1f354",
  87573. "uc_output": "1f354",
  87574. "uc_match": "1f354",
  87575. "uc_greedy": "1f354",
  87576. "shortnames": [],
  87577. "category": "food"
  87578. },
  87579. ":hammer:": {
  87580. "uc_base": "1f528",
  87581. "uc_output": "1f528",
  87582. "uc_match": "1f528",
  87583. "uc_greedy": "1f528",
  87584. "shortnames": [],
  87585. "category": "objects"
  87586. },
  87587. ":hamster:": {
  87588. "uc_base": "1f439",
  87589. "uc_output": "1f439",
  87590. "uc_match": "1f439",
  87591. "uc_greedy": "1f439",
  87592. "shortnames": [],
  87593. "category": "nature"
  87594. },
  87595. ":hand_splayed:": {
  87596. "uc_base": "1f590",
  87597. "uc_output": "1f590",
  87598. "uc_match": "1f590-fe0f",
  87599. "uc_greedy": "1f590-fe0f",
  87600. "shortnames": [":raised_hand_with_fingers_splayed:"],
  87601. "category": "people"
  87602. },
  87603. ":handbag:": {
  87604. "uc_base": "1f45c",
  87605. "uc_output": "1f45c",
  87606. "uc_match": "1f45c",
  87607. "uc_greedy": "1f45c",
  87608. "shortnames": [],
  87609. "category": "people"
  87610. },
  87611. ":handshake:": {
  87612. "uc_base": "1f91d",
  87613. "uc_output": "1f91d",
  87614. "uc_match": "1f91d",
  87615. "uc_greedy": "1f91d",
  87616. "shortnames": [":shaking_hands:"],
  87617. "category": "people"
  87618. },
  87619. ":hatched_chick:": {
  87620. "uc_base": "1f425",
  87621. "uc_output": "1f425",
  87622. "uc_match": "1f425",
  87623. "uc_greedy": "1f425",
  87624. "shortnames": [],
  87625. "category": "nature"
  87626. },
  87627. ":hatching_chick:": {
  87628. "uc_base": "1f423",
  87629. "uc_output": "1f423",
  87630. "uc_match": "1f423",
  87631. "uc_greedy": "1f423",
  87632. "shortnames": [],
  87633. "category": "nature"
  87634. },
  87635. ":head_bandage:": {
  87636. "uc_base": "1f915",
  87637. "uc_output": "1f915",
  87638. "uc_match": "1f915",
  87639. "uc_greedy": "1f915",
  87640. "shortnames": [":face_with_head_bandage:"],
  87641. "category": "people"
  87642. },
  87643. ":headphones:": {
  87644. "uc_base": "1f3a7",
  87645. "uc_output": "1f3a7",
  87646. "uc_match": "1f3a7-fe0f",
  87647. "uc_greedy": "1f3a7-fe0f",
  87648. "shortnames": [],
  87649. "category": "activity"
  87650. },
  87651. ":hear_no_evil:": {
  87652. "uc_base": "1f649",
  87653. "uc_output": "1f649",
  87654. "uc_match": "1f649",
  87655. "uc_greedy": "1f649",
  87656. "shortnames": [],
  87657. "category": "nature"
  87658. },
  87659. ":heart_decoration:": {
  87660. "uc_base": "1f49f",
  87661. "uc_output": "1f49f",
  87662. "uc_match": "1f49f",
  87663. "uc_greedy": "1f49f",
  87664. "shortnames": [],
  87665. "category": "symbols"
  87666. },
  87667. ":heart_eyes:": {
  87668. "uc_base": "1f60d",
  87669. "uc_output": "1f60d",
  87670. "uc_match": "1f60d",
  87671. "uc_greedy": "1f60d",
  87672. "shortnames": [],
  87673. "category": "people"
  87674. },
  87675. ":heart_eyes_cat:": {
  87676. "uc_base": "1f63b",
  87677. "uc_output": "1f63b",
  87678. "uc_match": "1f63b",
  87679. "uc_greedy": "1f63b",
  87680. "shortnames": [],
  87681. "category": "people"
  87682. },
  87683. ":heartbeat:": {
  87684. "uc_base": "1f493",
  87685. "uc_output": "1f493",
  87686. "uc_match": "1f493",
  87687. "uc_greedy": "1f493",
  87688. "shortnames": [],
  87689. "category": "symbols"
  87690. },
  87691. ":heartpulse:": {
  87692. "uc_base": "1f497",
  87693. "uc_output": "1f497",
  87694. "uc_match": "1f497",
  87695. "uc_greedy": "1f497",
  87696. "shortnames": [],
  87697. "category": "symbols"
  87698. },
  87699. ":heavy_dollar_sign:": {
  87700. "uc_base": "1f4b2",
  87701. "uc_output": "1f4b2",
  87702. "uc_match": "1f4b2",
  87703. "uc_greedy": "1f4b2",
  87704. "shortnames": [],
  87705. "category": "symbols"
  87706. },
  87707. ":hedgehog:": {
  87708. "uc_base": "1f994",
  87709. "uc_output": "1f994",
  87710. "uc_match": "1f994",
  87711. "uc_greedy": "1f994",
  87712. "shortnames": [],
  87713. "category": "nature"
  87714. },
  87715. ":helicopter:": {
  87716. "uc_base": "1f681",
  87717. "uc_output": "1f681",
  87718. "uc_match": "1f681",
  87719. "uc_greedy": "1f681",
  87720. "shortnames": [],
  87721. "category": "travel"
  87722. },
  87723. ":herb:": {
  87724. "uc_base": "1f33f",
  87725. "uc_output": "1f33f",
  87726. "uc_match": "1f33f",
  87727. "uc_greedy": "1f33f",
  87728. "shortnames": [],
  87729. "category": "nature"
  87730. },
  87731. ":hibiscus:": {
  87732. "uc_base": "1f33a",
  87733. "uc_output": "1f33a",
  87734. "uc_match": "1f33a",
  87735. "uc_greedy": "1f33a",
  87736. "shortnames": [],
  87737. "category": "nature"
  87738. },
  87739. ":high_brightness:": {
  87740. "uc_base": "1f506",
  87741. "uc_output": "1f506",
  87742. "uc_match": "1f506",
  87743. "uc_greedy": "1f506",
  87744. "shortnames": [],
  87745. "category": "symbols"
  87746. },
  87747. ":high_heel:": {
  87748. "uc_base": "1f460",
  87749. "uc_output": "1f460",
  87750. "uc_match": "1f460",
  87751. "uc_greedy": "1f460",
  87752. "shortnames": [],
  87753. "category": "people"
  87754. },
  87755. ":hockey:": {
  87756. "uc_base": "1f3d2",
  87757. "uc_output": "1f3d2",
  87758. "uc_match": "1f3d2",
  87759. "uc_greedy": "1f3d2",
  87760. "shortnames": [],
  87761. "category": "activity"
  87762. },
  87763. ":hole:": {
  87764. "uc_base": "1f573",
  87765. "uc_output": "1f573",
  87766. "uc_match": "1f573-fe0f",
  87767. "uc_greedy": "1f573-fe0f",
  87768. "shortnames": [],
  87769. "category": "objects"
  87770. },
  87771. ":homes:": {
  87772. "uc_base": "1f3d8",
  87773. "uc_output": "1f3d8",
  87774. "uc_match": "1f3d8-fe0f",
  87775. "uc_greedy": "1f3d8-fe0f",
  87776. "shortnames": [":house_buildings:"],
  87777. "category": "travel"
  87778. },
  87779. ":honey_pot:": {
  87780. "uc_base": "1f36f",
  87781. "uc_output": "1f36f",
  87782. "uc_match": "1f36f",
  87783. "uc_greedy": "1f36f",
  87784. "shortnames": [],
  87785. "category": "food"
  87786. },
  87787. ":horse:": {
  87788. "uc_base": "1f434",
  87789. "uc_output": "1f434",
  87790. "uc_match": "1f434",
  87791. "uc_greedy": "1f434",
  87792. "shortnames": [],
  87793. "category": "nature"
  87794. },
  87795. ":horse_racing:": {
  87796. "uc_base": "1f3c7",
  87797. "uc_output": "1f3c7",
  87798. "uc_match": "1f3c7",
  87799. "uc_greedy": "1f3c7",
  87800. "shortnames": [],
  87801. "category": "activity"
  87802. },
  87803. ":hospital:": {
  87804. "uc_base": "1f3e5",
  87805. "uc_output": "1f3e5",
  87806. "uc_match": "1f3e5",
  87807. "uc_greedy": "1f3e5",
  87808. "shortnames": [],
  87809. "category": "travel"
  87810. },
  87811. ":hot_pepper:": {
  87812. "uc_base": "1f336",
  87813. "uc_output": "1f336",
  87814. "uc_match": "1f336-fe0f",
  87815. "uc_greedy": "1f336-fe0f",
  87816. "shortnames": [],
  87817. "category": "food"
  87818. },
  87819. ":hotdog:": {
  87820. "uc_base": "1f32d",
  87821. "uc_output": "1f32d",
  87822. "uc_match": "1f32d",
  87823. "uc_greedy": "1f32d",
  87824. "shortnames": [":hot_dog:"],
  87825. "category": "food"
  87826. },
  87827. ":hotel:": {
  87828. "uc_base": "1f3e8",
  87829. "uc_output": "1f3e8",
  87830. "uc_match": "1f3e8",
  87831. "uc_greedy": "1f3e8",
  87832. "shortnames": [],
  87833. "category": "travel"
  87834. },
  87835. ":house:": {
  87836. "uc_base": "1f3e0",
  87837. "uc_output": "1f3e0",
  87838. "uc_match": "1f3e0-fe0f",
  87839. "uc_greedy": "1f3e0-fe0f",
  87840. "shortnames": [],
  87841. "category": "travel"
  87842. },
  87843. ":house_abandoned:": {
  87844. "uc_base": "1f3da",
  87845. "uc_output": "1f3da",
  87846. "uc_match": "1f3da-fe0f",
  87847. "uc_greedy": "1f3da-fe0f",
  87848. "shortnames": [":derelict_house_building:"],
  87849. "category": "travel"
  87850. },
  87851. ":house_with_garden:": {
  87852. "uc_base": "1f3e1",
  87853. "uc_output": "1f3e1",
  87854. "uc_match": "1f3e1",
  87855. "uc_greedy": "1f3e1",
  87856. "shortnames": [],
  87857. "category": "travel"
  87858. },
  87859. ":hugging:": {
  87860. "uc_base": "1f917",
  87861. "uc_output": "1f917",
  87862. "uc_match": "1f917",
  87863. "uc_greedy": "1f917",
  87864. "shortnames": [":hugging_face:"],
  87865. "category": "people"
  87866. },
  87867. ":hushed:": {
  87868. "uc_base": "1f62f",
  87869. "uc_output": "1f62f",
  87870. "uc_match": "1f62f",
  87871. "uc_greedy": "1f62f",
  87872. "shortnames": [],
  87873. "category": "people"
  87874. },
  87875. ":ice_cream:": {
  87876. "uc_base": "1f368",
  87877. "uc_output": "1f368",
  87878. "uc_match": "1f368",
  87879. "uc_greedy": "1f368",
  87880. "shortnames": [],
  87881. "category": "food"
  87882. },
  87883. ":icecream:": {
  87884. "uc_base": "1f366",
  87885. "uc_output": "1f366",
  87886. "uc_match": "1f366",
  87887. "uc_greedy": "1f366",
  87888. "shortnames": [],
  87889. "category": "food"
  87890. },
  87891. ":id:": {
  87892. "uc_base": "1f194",
  87893. "uc_output": "1f194",
  87894. "uc_match": "1f194",
  87895. "uc_greedy": "1f194",
  87896. "shortnames": [],
  87897. "category": "symbols"
  87898. },
  87899. ":ideograph_advantage:": {
  87900. "uc_base": "1f250",
  87901. "uc_output": "1f250",
  87902. "uc_match": "1f250",
  87903. "uc_greedy": "1f250",
  87904. "shortnames": [],
  87905. "category": "symbols"
  87906. },
  87907. ":imp:": {
  87908. "uc_base": "1f47f",
  87909. "uc_output": "1f47f",
  87910. "uc_match": "1f47f",
  87911. "uc_greedy": "1f47f",
  87912. "shortnames": [],
  87913. "category": "people"
  87914. },
  87915. ":inbox_tray:": {
  87916. "uc_base": "1f4e5",
  87917. "uc_output": "1f4e5",
  87918. "uc_match": "1f4e5-fe0f",
  87919. "uc_greedy": "1f4e5-fe0f",
  87920. "shortnames": [],
  87921. "category": "objects"
  87922. },
  87923. ":incoming_envelope:": {
  87924. "uc_base": "1f4e8",
  87925. "uc_output": "1f4e8",
  87926. "uc_match": "1f4e8",
  87927. "uc_greedy": "1f4e8",
  87928. "shortnames": [],
  87929. "category": "objects"
  87930. },
  87931. ":innocent:": {
  87932. "uc_base": "1f607",
  87933. "uc_output": "1f607",
  87934. "uc_match": "1f607",
  87935. "uc_greedy": "1f607",
  87936. "shortnames": [],
  87937. "category": "people"
  87938. },
  87939. ":iphone:": {
  87940. "uc_base": "1f4f1",
  87941. "uc_output": "1f4f1",
  87942. "uc_match": "1f4f1",
  87943. "uc_greedy": "1f4f1",
  87944. "shortnames": [],
  87945. "category": "objects"
  87946. },
  87947. ":island:": {
  87948. "uc_base": "1f3dd",
  87949. "uc_output": "1f3dd",
  87950. "uc_match": "1f3dd-fe0f",
  87951. "uc_greedy": "1f3dd-fe0f",
  87952. "shortnames": [":desert_island:"],
  87953. "category": "travel"
  87954. },
  87955. ":izakaya_lantern:": {
  87956. "uc_base": "1f3ee",
  87957. "uc_output": "1f3ee",
  87958. "uc_match": "1f3ee",
  87959. "uc_greedy": "1f3ee",
  87960. "shortnames": [],
  87961. "category": "objects"
  87962. },
  87963. ":jack_o_lantern:": {
  87964. "uc_base": "1f383",
  87965. "uc_output": "1f383",
  87966. "uc_match": "1f383",
  87967. "uc_greedy": "1f383",
  87968. "shortnames": [],
  87969. "category": "people"
  87970. },
  87971. ":japan:": {
  87972. "uc_base": "1f5fe",
  87973. "uc_output": "1f5fe",
  87974. "uc_match": "1f5fe",
  87975. "uc_greedy": "1f5fe",
  87976. "shortnames": [],
  87977. "category": "travel"
  87978. },
  87979. ":japanese_castle:": {
  87980. "uc_base": "1f3ef",
  87981. "uc_output": "1f3ef",
  87982. "uc_match": "1f3ef",
  87983. "uc_greedy": "1f3ef",
  87984. "shortnames": [],
  87985. "category": "travel"
  87986. },
  87987. ":japanese_goblin:": {
  87988. "uc_base": "1f47a",
  87989. "uc_output": "1f47a",
  87990. "uc_match": "1f47a",
  87991. "uc_greedy": "1f47a",
  87992. "shortnames": [],
  87993. "category": "people"
  87994. },
  87995. ":japanese_ogre:": {
  87996. "uc_base": "1f479",
  87997. "uc_output": "1f479",
  87998. "uc_match": "1f479",
  87999. "uc_greedy": "1f479",
  88000. "shortnames": [],
  88001. "category": "people"
  88002. },
  88003. ":jeans:": {
  88004. "uc_base": "1f456",
  88005. "uc_output": "1f456",
  88006. "uc_match": "1f456",
  88007. "uc_greedy": "1f456",
  88008. "shortnames": [],
  88009. "category": "people"
  88010. },
  88011. ":joy:": {
  88012. "uc_base": "1f602",
  88013. "uc_output": "1f602",
  88014. "uc_match": "1f602",
  88015. "uc_greedy": "1f602",
  88016. "shortnames": [],
  88017. "category": "people"
  88018. },
  88019. ":joy_cat:": {
  88020. "uc_base": "1f639",
  88021. "uc_output": "1f639",
  88022. "uc_match": "1f639",
  88023. "uc_greedy": "1f639",
  88024. "shortnames": [],
  88025. "category": "people"
  88026. },
  88027. ":joystick:": {
  88028. "uc_base": "1f579",
  88029. "uc_output": "1f579",
  88030. "uc_match": "1f579-fe0f",
  88031. "uc_greedy": "1f579-fe0f",
  88032. "shortnames": [],
  88033. "category": "objects"
  88034. },
  88035. ":kaaba:": {
  88036. "uc_base": "1f54b",
  88037. "uc_output": "1f54b",
  88038. "uc_match": "1f54b",
  88039. "uc_greedy": "1f54b",
  88040. "shortnames": [],
  88041. "category": "travel"
  88042. },
  88043. ":key2:": {
  88044. "uc_base": "1f5dd",
  88045. "uc_output": "1f5dd",
  88046. "uc_match": "1f5dd-fe0f",
  88047. "uc_greedy": "1f5dd",
  88048. "shortnames": [":old_key:"],
  88049. "category": "objects"
  88050. },
  88051. ":key:": {
  88052. "uc_base": "1f511",
  88053. "uc_output": "1f511",
  88054. "uc_match": "1f511",
  88055. "uc_greedy": "1f511",
  88056. "shortnames": [],
  88057. "category": "objects"
  88058. },
  88059. ":keycap_ten:": {
  88060. "uc_base": "1f51f",
  88061. "uc_output": "1f51f",
  88062. "uc_match": "1f51f",
  88063. "uc_greedy": "1f51f",
  88064. "shortnames": [],
  88065. "category": "symbols"
  88066. },
  88067. ":kimono:": {
  88068. "uc_base": "1f458",
  88069. "uc_output": "1f458",
  88070. "uc_match": "1f458",
  88071. "uc_greedy": "1f458",
  88072. "shortnames": [],
  88073. "category": "people"
  88074. },
  88075. ":kiss:": {
  88076. "uc_base": "1f48b",
  88077. "uc_output": "1f48b",
  88078. "uc_match": "1f48b",
  88079. "uc_greedy": "1f48b",
  88080. "shortnames": [],
  88081. "category": "people"
  88082. },
  88083. ":kissing:": {
  88084. "uc_base": "1f617",
  88085. "uc_output": "1f617",
  88086. "uc_match": "1f617",
  88087. "uc_greedy": "1f617",
  88088. "shortnames": [],
  88089. "category": "people"
  88090. },
  88091. ":kissing_cat:": {
  88092. "uc_base": "1f63d",
  88093. "uc_output": "1f63d",
  88094. "uc_match": "1f63d",
  88095. "uc_greedy": "1f63d",
  88096. "shortnames": [],
  88097. "category": "people"
  88098. },
  88099. ":kissing_closed_eyes:": {
  88100. "uc_base": "1f61a",
  88101. "uc_output": "1f61a",
  88102. "uc_match": "1f61a",
  88103. "uc_greedy": "1f61a",
  88104. "shortnames": [],
  88105. "category": "people"
  88106. },
  88107. ":kissing_heart:": {
  88108. "uc_base": "1f618",
  88109. "uc_output": "1f618",
  88110. "uc_match": "1f618",
  88111. "uc_greedy": "1f618",
  88112. "shortnames": [],
  88113. "category": "people"
  88114. },
  88115. ":kissing_smiling_eyes:": {
  88116. "uc_base": "1f619",
  88117. "uc_output": "1f619",
  88118. "uc_match": "1f619",
  88119. "uc_greedy": "1f619",
  88120. "shortnames": [],
  88121. "category": "people"
  88122. },
  88123. ":kiwi:": {
  88124. "uc_base": "1f95d",
  88125. "uc_output": "1f95d",
  88126. "uc_match": "1f95d",
  88127. "uc_greedy": "1f95d",
  88128. "shortnames": [":kiwifruit:"],
  88129. "category": "food"
  88130. },
  88131. ":knife:": {
  88132. "uc_base": "1f52a",
  88133. "uc_output": "1f52a",
  88134. "uc_match": "1f52a",
  88135. "uc_greedy": "1f52a",
  88136. "shortnames": [],
  88137. "category": "objects"
  88138. },
  88139. ":koala:": {
  88140. "uc_base": "1f428",
  88141. "uc_output": "1f428",
  88142. "uc_match": "1f428",
  88143. "uc_greedy": "1f428",
  88144. "shortnames": [],
  88145. "category": "nature"
  88146. },
  88147. ":koko:": {
  88148. "uc_base": "1f201",
  88149. "uc_output": "1f201",
  88150. "uc_match": "1f201",
  88151. "uc_greedy": "1f201",
  88152. "shortnames": [],
  88153. "category": "symbols"
  88154. },
  88155. ":label:": {
  88156. "uc_base": "1f3f7",
  88157. "uc_output": "1f3f7",
  88158. "uc_match": "1f3f7-fe0f",
  88159. "uc_greedy": "1f3f7-fe0f",
  88160. "shortnames": [],
  88161. "category": "objects"
  88162. },
  88163. ":large_blue_diamond:": {
  88164. "uc_base": "1f537",
  88165. "uc_output": "1f537",
  88166. "uc_match": "1f537",
  88167. "uc_greedy": "1f537",
  88168. "shortnames": [],
  88169. "category": "symbols"
  88170. },
  88171. ":large_orange_diamond:": {
  88172. "uc_base": "1f536",
  88173. "uc_output": "1f536",
  88174. "uc_match": "1f536",
  88175. "uc_greedy": "1f536",
  88176. "shortnames": [],
  88177. "category": "symbols"
  88178. },
  88179. ":last_quarter_moon:": {
  88180. "uc_base": "1f317",
  88181. "uc_output": "1f317",
  88182. "uc_match": "1f317",
  88183. "uc_greedy": "1f317",
  88184. "shortnames": [],
  88185. "category": "nature"
  88186. },
  88187. ":last_quarter_moon_with_face:": {
  88188. "uc_base": "1f31c",
  88189. "uc_output": "1f31c",
  88190. "uc_match": "1f31c-fe0f",
  88191. "uc_greedy": "1f31c-fe0f",
  88192. "shortnames": [],
  88193. "category": "nature"
  88194. },
  88195. ":laughing:": {
  88196. "uc_base": "1f606",
  88197. "uc_output": "1f606",
  88198. "uc_match": "1f606",
  88199. "uc_greedy": "1f606",
  88200. "shortnames": [":satisfied:"],
  88201. "category": "people"
  88202. },
  88203. ":leaves:": {
  88204. "uc_base": "1f343",
  88205. "uc_output": "1f343",
  88206. "uc_match": "1f343",
  88207. "uc_greedy": "1f343",
  88208. "shortnames": [],
  88209. "category": "nature"
  88210. },
  88211. ":ledger:": {
  88212. "uc_base": "1f4d2",
  88213. "uc_output": "1f4d2",
  88214. "uc_match": "1f4d2",
  88215. "uc_greedy": "1f4d2",
  88216. "shortnames": [],
  88217. "category": "objects"
  88218. },
  88219. ":left_facing_fist:": {
  88220. "uc_base": "1f91b",
  88221. "uc_output": "1f91b",
  88222. "uc_match": "1f91b",
  88223. "uc_greedy": "1f91b",
  88224. "shortnames": [":left_fist:"],
  88225. "category": "people"
  88226. },
  88227. ":left_luggage:": {
  88228. "uc_base": "1f6c5",
  88229. "uc_output": "1f6c5",
  88230. "uc_match": "1f6c5",
  88231. "uc_greedy": "1f6c5",
  88232. "shortnames": [],
  88233. "category": "symbols"
  88234. },
  88235. ":lemon:": {
  88236. "uc_base": "1f34b",
  88237. "uc_output": "1f34b",
  88238. "uc_match": "1f34b",
  88239. "uc_greedy": "1f34b",
  88240. "shortnames": [],
  88241. "category": "food"
  88242. },
  88243. ":leopard:": {
  88244. "uc_base": "1f406",
  88245. "uc_output": "1f406",
  88246. "uc_match": "1f406",
  88247. "uc_greedy": "1f406",
  88248. "shortnames": [],
  88249. "category": "nature"
  88250. },
  88251. ":level_slider:": {
  88252. "uc_base": "1f39a",
  88253. "uc_output": "1f39a",
  88254. "uc_match": "1f39a-fe0f",
  88255. "uc_greedy": "1f39a-fe0f",
  88256. "shortnames": [],
  88257. "category": "objects"
  88258. },
  88259. ":levitate:": {
  88260. "uc_base": "1f574",
  88261. "uc_output": "1f574",
  88262. "uc_match": "1f574-fe0f",
  88263. "uc_greedy": "1f574-fe0f",
  88264. "shortnames": [":man_in_business_suit_levitating:"],
  88265. "category": "people"
  88266. },
  88267. ":light_rail:": {
  88268. "uc_base": "1f688",
  88269. "uc_output": "1f688",
  88270. "uc_match": "1f688",
  88271. "uc_greedy": "1f688",
  88272. "shortnames": [],
  88273. "category": "travel"
  88274. },
  88275. ":link:": {
  88276. "uc_base": "1f517",
  88277. "uc_output": "1f517",
  88278. "uc_match": "1f517",
  88279. "uc_greedy": "1f517",
  88280. "shortnames": [],
  88281. "category": "objects"
  88282. },
  88283. ":lion_face:": {
  88284. "uc_base": "1f981",
  88285. "uc_output": "1f981",
  88286. "uc_match": "1f981",
  88287. "uc_greedy": "1f981",
  88288. "shortnames": [":lion:"],
  88289. "category": "nature"
  88290. },
  88291. ":lips:": {
  88292. "uc_base": "1f444",
  88293. "uc_output": "1f444",
  88294. "uc_match": "1f444",
  88295. "uc_greedy": "1f444",
  88296. "shortnames": [],
  88297. "category": "people"
  88298. },
  88299. ":lipstick:": {
  88300. "uc_base": "1f484",
  88301. "uc_output": "1f484",
  88302. "uc_match": "1f484",
  88303. "uc_greedy": "1f484",
  88304. "shortnames": [],
  88305. "category": "people"
  88306. },
  88307. ":lizard:": {
  88308. "uc_base": "1f98e",
  88309. "uc_output": "1f98e",
  88310. "uc_match": "1f98e",
  88311. "uc_greedy": "1f98e",
  88312. "shortnames": [],
  88313. "category": "nature"
  88314. },
  88315. ":lock:": {
  88316. "uc_base": "1f512",
  88317. "uc_output": "1f512",
  88318. "uc_match": "1f512-fe0f",
  88319. "uc_greedy": "1f512-fe0f",
  88320. "shortnames": [],
  88321. "category": "objects"
  88322. },
  88323. ":lock_with_ink_pen:": {
  88324. "uc_base": "1f50f",
  88325. "uc_output": "1f50f",
  88326. "uc_match": "1f50f",
  88327. "uc_greedy": "1f50f",
  88328. "shortnames": [],
  88329. "category": "objects"
  88330. },
  88331. ":lollipop:": {
  88332. "uc_base": "1f36d",
  88333. "uc_output": "1f36d",
  88334. "uc_match": "1f36d",
  88335. "uc_greedy": "1f36d",
  88336. "shortnames": [],
  88337. "category": "food"
  88338. },
  88339. ":loud_sound:": {
  88340. "uc_base": "1f50a",
  88341. "uc_output": "1f50a",
  88342. "uc_match": "1f50a",
  88343. "uc_greedy": "1f50a",
  88344. "shortnames": [],
  88345. "category": "symbols"
  88346. },
  88347. ":loudspeaker:": {
  88348. "uc_base": "1f4e2",
  88349. "uc_output": "1f4e2",
  88350. "uc_match": "1f4e2",
  88351. "uc_greedy": "1f4e2",
  88352. "shortnames": [],
  88353. "category": "symbols"
  88354. },
  88355. ":love_hotel:": {
  88356. "uc_base": "1f3e9",
  88357. "uc_output": "1f3e9",
  88358. "uc_match": "1f3e9",
  88359. "uc_greedy": "1f3e9",
  88360. "shortnames": [],
  88361. "category": "travel"
  88362. },
  88363. ":love_letter:": {
  88364. "uc_base": "1f48c",
  88365. "uc_output": "1f48c",
  88366. "uc_match": "1f48c",
  88367. "uc_greedy": "1f48c",
  88368. "shortnames": [],
  88369. "category": "objects"
  88370. },
  88371. ":love_you_gesture:": {
  88372. "uc_base": "1f91f",
  88373. "uc_output": "1f91f",
  88374. "uc_match": "1f91f",
  88375. "uc_greedy": "1f91f",
  88376. "shortnames": [],
  88377. "category": "people"
  88378. },
  88379. ":low_brightness:": {
  88380. "uc_base": "1f505",
  88381. "uc_output": "1f505",
  88382. "uc_match": "1f505",
  88383. "uc_greedy": "1f505",
  88384. "shortnames": [],
  88385. "category": "symbols"
  88386. },
  88387. ":lying_face:": {
  88388. "uc_base": "1f925",
  88389. "uc_output": "1f925",
  88390. "uc_match": "1f925",
  88391. "uc_greedy": "1f925",
  88392. "shortnames": [":liar:"],
  88393. "category": "people"
  88394. },
  88395. ":mag:": {
  88396. "uc_base": "1f50d",
  88397. "uc_output": "1f50d",
  88398. "uc_match": "1f50d-fe0f",
  88399. "uc_greedy": "1f50d-fe0f",
  88400. "shortnames": [],
  88401. "category": "objects"
  88402. },
  88403. ":mag_right:": {
  88404. "uc_base": "1f50e",
  88405. "uc_output": "1f50e",
  88406. "uc_match": "1f50e",
  88407. "uc_greedy": "1f50e",
  88408. "shortnames": [],
  88409. "category": "objects"
  88410. },
  88411. ":mage:": {
  88412. "uc_base": "1f9d9",
  88413. "uc_output": "1f9d9",
  88414. "uc_match": "1f9d9",
  88415. "uc_greedy": "1f9d9",
  88416. "shortnames": [],
  88417. "category": "people"
  88418. },
  88419. ":mahjong:": {
  88420. "uc_base": "1f004",
  88421. "uc_output": "1f004",
  88422. "uc_match": "1f004-fe0f",
  88423. "uc_greedy": "1f004-fe0f",
  88424. "shortnames": [],
  88425. "category": "symbols"
  88426. },
  88427. ":mailbox:": {
  88428. "uc_base": "1f4eb",
  88429. "uc_output": "1f4eb",
  88430. "uc_match": "1f4eb-fe0f",
  88431. "uc_greedy": "1f4eb-fe0f",
  88432. "shortnames": [],
  88433. "category": "objects"
  88434. },
  88435. ":mailbox_closed:": {
  88436. "uc_base": "1f4ea",
  88437. "uc_output": "1f4ea",
  88438. "uc_match": "1f4ea-fe0f",
  88439. "uc_greedy": "1f4ea-fe0f",
  88440. "shortnames": [],
  88441. "category": "objects"
  88442. },
  88443. ":mailbox_with_mail:": {
  88444. "uc_base": "1f4ec",
  88445. "uc_output": "1f4ec",
  88446. "uc_match": "1f4ec-fe0f",
  88447. "uc_greedy": "1f4ec-fe0f",
  88448. "shortnames": [],
  88449. "category": "objects"
  88450. },
  88451. ":mailbox_with_no_mail:": {
  88452. "uc_base": "1f4ed",
  88453. "uc_output": "1f4ed",
  88454. "uc_match": "1f4ed-fe0f",
  88455. "uc_greedy": "1f4ed-fe0f",
  88456. "shortnames": [],
  88457. "category": "objects"
  88458. },
  88459. ":man:": {
  88460. "uc_base": "1f468",
  88461. "uc_output": "1f468",
  88462. "uc_match": "1f468",
  88463. "uc_greedy": "1f468",
  88464. "shortnames": [],
  88465. "category": "people"
  88466. },
  88467. ":man_dancing:": {
  88468. "uc_base": "1f57a",
  88469. "uc_output": "1f57a",
  88470. "uc_match": "1f57a",
  88471. "uc_greedy": "1f57a",
  88472. "shortnames": [":male_dancer:"],
  88473. "category": "people"
  88474. },
  88475. ":man_in_tuxedo:": {
  88476. "uc_base": "1f935",
  88477. "uc_output": "1f935",
  88478. "uc_match": "1f935",
  88479. "uc_greedy": "1f935",
  88480. "shortnames": [],
  88481. "category": "people"
  88482. },
  88483. ":man_with_chinese_cap:": {
  88484. "uc_base": "1f472",
  88485. "uc_output": "1f472",
  88486. "uc_match": "1f472",
  88487. "uc_greedy": "1f472",
  88488. "shortnames": [":man_with_gua_pi_mao:"],
  88489. "category": "people"
  88490. },
  88491. ":mans_shoe:": {
  88492. "uc_base": "1f45e",
  88493. "uc_output": "1f45e",
  88494. "uc_match": "1f45e",
  88495. "uc_greedy": "1f45e",
  88496. "shortnames": [],
  88497. "category": "people"
  88498. },
  88499. ":map:": {
  88500. "uc_base": "1f5fa",
  88501. "uc_output": "1f5fa",
  88502. "uc_match": "1f5fa-fe0f",
  88503. "uc_greedy": "1f5fa-fe0f",
  88504. "shortnames": [":world_map:"],
  88505. "category": "travel"
  88506. },
  88507. ":maple_leaf:": {
  88508. "uc_base": "1f341",
  88509. "uc_output": "1f341",
  88510. "uc_match": "1f341",
  88511. "uc_greedy": "1f341",
  88512. "shortnames": [],
  88513. "category": "nature"
  88514. },
  88515. ":martial_arts_uniform:": {
  88516. "uc_base": "1f94b",
  88517. "uc_output": "1f94b",
  88518. "uc_match": "1f94b",
  88519. "uc_greedy": "1f94b",
  88520. "shortnames": [":karate_uniform:"],
  88521. "category": "activity"
  88522. },
  88523. ":mask:": {
  88524. "uc_base": "1f637",
  88525. "uc_output": "1f637",
  88526. "uc_match": "1f637",
  88527. "uc_greedy": "1f637",
  88528. "shortnames": [],
  88529. "category": "people"
  88530. },
  88531. ":meat_on_bone:": {
  88532. "uc_base": "1f356",
  88533. "uc_output": "1f356",
  88534. "uc_match": "1f356",
  88535. "uc_greedy": "1f356",
  88536. "shortnames": [],
  88537. "category": "food"
  88538. },
  88539. ":medal:": {
  88540. "uc_base": "1f3c5",
  88541. "uc_output": "1f3c5",
  88542. "uc_match": "1f3c5",
  88543. "uc_greedy": "1f3c5",
  88544. "shortnames": [":sports_medal:"],
  88545. "category": "activity"
  88546. },
  88547. ":mega:": {
  88548. "uc_base": "1f4e3",
  88549. "uc_output": "1f4e3",
  88550. "uc_match": "1f4e3",
  88551. "uc_greedy": "1f4e3",
  88552. "shortnames": [],
  88553. "category": "symbols"
  88554. },
  88555. ":melon:": {
  88556. "uc_base": "1f348",
  88557. "uc_output": "1f348",
  88558. "uc_match": "1f348",
  88559. "uc_greedy": "1f348",
  88560. "shortnames": [],
  88561. "category": "food"
  88562. },
  88563. ":menorah:": {
  88564. "uc_base": "1f54e",
  88565. "uc_output": "1f54e",
  88566. "uc_match": "1f54e",
  88567. "uc_greedy": "1f54e",
  88568. "shortnames": [],
  88569. "category": "symbols"
  88570. },
  88571. ":mens:": {
  88572. "uc_base": "1f6b9",
  88573. "uc_output": "1f6b9",
  88574. "uc_match": "1f6b9-fe0f",
  88575. "uc_greedy": "1f6b9-fe0f",
  88576. "shortnames": [],
  88577. "category": "symbols"
  88578. },
  88579. ":merperson:": {
  88580. "uc_base": "1f9dc",
  88581. "uc_output": "1f9dc",
  88582. "uc_match": "1f9dc",
  88583. "uc_greedy": "1f9dc",
  88584. "shortnames": [],
  88585. "category": "people"
  88586. },
  88587. ":metal:": {
  88588. "uc_base": "1f918",
  88589. "uc_output": "1f918",
  88590. "uc_match": "1f918",
  88591. "uc_greedy": "1f918",
  88592. "shortnames": [":sign_of_the_horns:"],
  88593. "category": "people"
  88594. },
  88595. ":metro:": {
  88596. "uc_base": "1f687",
  88597. "uc_output": "1f687",
  88598. "uc_match": "1f687-fe0f",
  88599. "uc_greedy": "1f687-fe0f",
  88600. "shortnames": [],
  88601. "category": "travel"
  88602. },
  88603. ":microphone2:": {
  88604. "uc_base": "1f399",
  88605. "uc_output": "1f399",
  88606. "uc_match": "1f399-fe0f",
  88607. "uc_greedy": "1f399-fe0f",
  88608. "shortnames": [":studio_microphone:"],
  88609. "category": "objects"
  88610. },
  88611. ":microphone:": {
  88612. "uc_base": "1f3a4",
  88613. "uc_output": "1f3a4",
  88614. "uc_match": "1f3a4",
  88615. "uc_greedy": "1f3a4",
  88616. "shortnames": [],
  88617. "category": "activity"
  88618. },
  88619. ":microscope:": {
  88620. "uc_base": "1f52c",
  88621. "uc_output": "1f52c",
  88622. "uc_match": "1f52c",
  88623. "uc_greedy": "1f52c",
  88624. "shortnames": [],
  88625. "category": "objects"
  88626. },
  88627. ":middle_finger:": {
  88628. "uc_base": "1f595",
  88629. "uc_output": "1f595",
  88630. "uc_match": "1f595",
  88631. "uc_greedy": "1f595",
  88632. "shortnames": [":reversed_hand_with_middle_finger_extended:"],
  88633. "category": "people"
  88634. },
  88635. ":military_medal:": {
  88636. "uc_base": "1f396",
  88637. "uc_output": "1f396",
  88638. "uc_match": "1f396-fe0f",
  88639. "uc_greedy": "1f396-fe0f",
  88640. "shortnames": [],
  88641. "category": "activity"
  88642. },
  88643. ":milk:": {
  88644. "uc_base": "1f95b",
  88645. "uc_output": "1f95b",
  88646. "uc_match": "1f95b",
  88647. "uc_greedy": "1f95b",
  88648. "shortnames": [":glass_of_milk:"],
  88649. "category": "food"
  88650. },
  88651. ":milky_way:": {
  88652. "uc_base": "1f30c",
  88653. "uc_output": "1f30c",
  88654. "uc_match": "1f30c",
  88655. "uc_greedy": "1f30c",
  88656. "shortnames": [],
  88657. "category": "travel"
  88658. },
  88659. ":minibus:": {
  88660. "uc_base": "1f690",
  88661. "uc_output": "1f690",
  88662. "uc_match": "1f690",
  88663. "uc_greedy": "1f690",
  88664. "shortnames": [],
  88665. "category": "travel"
  88666. },
  88667. ":minidisc:": {
  88668. "uc_base": "1f4bd",
  88669. "uc_output": "1f4bd",
  88670. "uc_match": "1f4bd",
  88671. "uc_greedy": "1f4bd",
  88672. "shortnames": [],
  88673. "category": "objects"
  88674. },
  88675. ":mobile_phone_off:": {
  88676. "uc_base": "1f4f4",
  88677. "uc_output": "1f4f4",
  88678. "uc_match": "1f4f4",
  88679. "uc_greedy": "1f4f4",
  88680. "shortnames": [],
  88681. "category": "symbols"
  88682. },
  88683. ":money_mouth:": {
  88684. "uc_base": "1f911",
  88685. "uc_output": "1f911",
  88686. "uc_match": "1f911",
  88687. "uc_greedy": "1f911",
  88688. "shortnames": [":money_mouth_face:"],
  88689. "category": "people"
  88690. },
  88691. ":money_with_wings:": {
  88692. "uc_base": "1f4b8",
  88693. "uc_output": "1f4b8",
  88694. "uc_match": "1f4b8",
  88695. "uc_greedy": "1f4b8",
  88696. "shortnames": [],
  88697. "category": "objects"
  88698. },
  88699. ":moneybag:": {
  88700. "uc_base": "1f4b0",
  88701. "uc_output": "1f4b0",
  88702. "uc_match": "1f4b0-fe0f",
  88703. "uc_greedy": "1f4b0-fe0f",
  88704. "shortnames": [],
  88705. "category": "objects"
  88706. },
  88707. ":monkey:": {
  88708. "uc_base": "1f412",
  88709. "uc_output": "1f412",
  88710. "uc_match": "1f412",
  88711. "uc_greedy": "1f412",
  88712. "shortnames": [],
  88713. "category": "nature"
  88714. },
  88715. ":monkey_face:": {
  88716. "uc_base": "1f435",
  88717. "uc_output": "1f435",
  88718. "uc_match": "1f435",
  88719. "uc_greedy": "1f435",
  88720. "shortnames": [],
  88721. "category": "nature"
  88722. },
  88723. ":monorail:": {
  88724. "uc_base": "1f69d",
  88725. "uc_output": "1f69d",
  88726. "uc_match": "1f69d",
  88727. "uc_greedy": "1f69d",
  88728. "shortnames": [],
  88729. "category": "travel"
  88730. },
  88731. ":mortar_board:": {
  88732. "uc_base": "1f393",
  88733. "uc_output": "1f393",
  88734. "uc_match": "1f393-fe0f",
  88735. "uc_greedy": "1f393-fe0f",
  88736. "shortnames": [],
  88737. "category": "people"
  88738. },
  88739. ":mosque:": {
  88740. "uc_base": "1f54c",
  88741. "uc_output": "1f54c",
  88742. "uc_match": "1f54c",
  88743. "uc_greedy": "1f54c",
  88744. "shortnames": [],
  88745. "category": "travel"
  88746. },
  88747. ":motor_scooter:": {
  88748. "uc_base": "1f6f5",
  88749. "uc_output": "1f6f5",
  88750. "uc_match": "1f6f5",
  88751. "uc_greedy": "1f6f5",
  88752. "shortnames": [":motorbike:"],
  88753. "category": "travel"
  88754. },
  88755. ":motorboat:": {
  88756. "uc_base": "1f6e5",
  88757. "uc_output": "1f6e5",
  88758. "uc_match": "1f6e5-fe0f",
  88759. "uc_greedy": "1f6e5-fe0f",
  88760. "shortnames": [],
  88761. "category": "travel"
  88762. },
  88763. ":motorcycle:": {
  88764. "uc_base": "1f3cd",
  88765. "uc_output": "1f3cd",
  88766. "uc_match": "1f3cd-fe0f",
  88767. "uc_greedy": "1f3cd-fe0f",
  88768. "shortnames": [":racing_motorcycle:"],
  88769. "category": "travel"
  88770. },
  88771. ":motorway:": {
  88772. "uc_base": "1f6e3",
  88773. "uc_output": "1f6e3",
  88774. "uc_match": "1f6e3-fe0f",
  88775. "uc_greedy": "1f6e3-fe0f",
  88776. "shortnames": [],
  88777. "category": "travel"
  88778. },
  88779. ":mount_fuji:": {
  88780. "uc_base": "1f5fb",
  88781. "uc_output": "1f5fb",
  88782. "uc_match": "1f5fb",
  88783. "uc_greedy": "1f5fb",
  88784. "shortnames": [],
  88785. "category": "travel"
  88786. },
  88787. ":mountain_cableway:": {
  88788. "uc_base": "1f6a0",
  88789. "uc_output": "1f6a0",
  88790. "uc_match": "1f6a0",
  88791. "uc_greedy": "1f6a0",
  88792. "shortnames": [],
  88793. "category": "travel"
  88794. },
  88795. ":mountain_railway:": {
  88796. "uc_base": "1f69e",
  88797. "uc_output": "1f69e",
  88798. "uc_match": "1f69e",
  88799. "uc_greedy": "1f69e",
  88800. "shortnames": [],
  88801. "category": "travel"
  88802. },
  88803. ":mountain_snow:": {
  88804. "uc_base": "1f3d4",
  88805. "uc_output": "1f3d4",
  88806. "uc_match": "1f3d4-fe0f",
  88807. "uc_greedy": "1f3d4-fe0f",
  88808. "shortnames": [":snow_capped_mountain:"],
  88809. "category": "travel"
  88810. },
  88811. ":mouse2:": {
  88812. "uc_base": "1f401",
  88813. "uc_output": "1f401",
  88814. "uc_match": "1f401",
  88815. "uc_greedy": "1f401",
  88816. "shortnames": [],
  88817. "category": "nature"
  88818. },
  88819. ":mouse:": {
  88820. "uc_base": "1f42d",
  88821. "uc_output": "1f42d",
  88822. "uc_match": "1f42d",
  88823. "uc_greedy": "1f42d",
  88824. "shortnames": [],
  88825. "category": "nature"
  88826. },
  88827. ":mouse_three_button:": {
  88828. "uc_base": "1f5b1",
  88829. "uc_output": "1f5b1",
  88830. "uc_match": "1f5b1-fe0f",
  88831. "uc_greedy": "1f5b1-fe0f",
  88832. "shortnames": [":three_button_mouse:"],
  88833. "category": "objects"
  88834. },
  88835. ":movie_camera:": {
  88836. "uc_base": "1f3a5",
  88837. "uc_output": "1f3a5",
  88838. "uc_match": "1f3a5",
  88839. "uc_greedy": "1f3a5",
  88840. "shortnames": [],
  88841. "category": "objects"
  88842. },
  88843. ":moyai:": {
  88844. "uc_base": "1f5ff",
  88845. "uc_output": "1f5ff",
  88846. "uc_match": "1f5ff",
  88847. "uc_greedy": "1f5ff",
  88848. "shortnames": [],
  88849. "category": "travel"
  88850. },
  88851. ":mrs_claus:": {
  88852. "uc_base": "1f936",
  88853. "uc_output": "1f936",
  88854. "uc_match": "1f936",
  88855. "uc_greedy": "1f936",
  88856. "shortnames": [":mother_christmas:"],
  88857. "category": "people"
  88858. },
  88859. ":muscle:": {
  88860. "uc_base": "1f4aa",
  88861. "uc_output": "1f4aa",
  88862. "uc_match": "1f4aa",
  88863. "uc_greedy": "1f4aa",
  88864. "shortnames": [],
  88865. "category": "people"
  88866. },
  88867. ":mushroom:": {
  88868. "uc_base": "1f344",
  88869. "uc_output": "1f344",
  88870. "uc_match": "1f344",
  88871. "uc_greedy": "1f344",
  88872. "shortnames": [],
  88873. "category": "nature"
  88874. },
  88875. ":musical_keyboard:": {
  88876. "uc_base": "1f3b9",
  88877. "uc_output": "1f3b9",
  88878. "uc_match": "1f3b9",
  88879. "uc_greedy": "1f3b9",
  88880. "shortnames": [],
  88881. "category": "activity"
  88882. },
  88883. ":musical_note:": {
  88884. "uc_base": "1f3b5",
  88885. "uc_output": "1f3b5",
  88886. "uc_match": "1f3b5",
  88887. "uc_greedy": "1f3b5",
  88888. "shortnames": [],
  88889. "category": "symbols"
  88890. },
  88891. ":musical_score:": {
  88892. "uc_base": "1f3bc",
  88893. "uc_output": "1f3bc",
  88894. "uc_match": "1f3bc",
  88895. "uc_greedy": "1f3bc",
  88896. "shortnames": [],
  88897. "category": "activity"
  88898. },
  88899. ":mute:": {
  88900. "uc_base": "1f507",
  88901. "uc_output": "1f507",
  88902. "uc_match": "1f507",
  88903. "uc_greedy": "1f507",
  88904. "shortnames": [],
  88905. "category": "symbols"
  88906. },
  88907. ":nail_care:": {
  88908. "uc_base": "1f485",
  88909. "uc_output": "1f485",
  88910. "uc_match": "1f485",
  88911. "uc_greedy": "1f485",
  88912. "shortnames": [],
  88913. "category": "people"
  88914. },
  88915. ":name_badge:": {
  88916. "uc_base": "1f4db",
  88917. "uc_output": "1f4db",
  88918. "uc_match": "1f4db",
  88919. "uc_greedy": "1f4db",
  88920. "shortnames": [],
  88921. "category": "symbols"
  88922. },
  88923. ":nauseated_face:": {
  88924. "uc_base": "1f922",
  88925. "uc_output": "1f922",
  88926. "uc_match": "1f922",
  88927. "uc_greedy": "1f922",
  88928. "shortnames": [":sick:"],
  88929. "category": "people"
  88930. },
  88931. ":necktie:": {
  88932. "uc_base": "1f454",
  88933. "uc_output": "1f454",
  88934. "uc_match": "1f454",
  88935. "uc_greedy": "1f454",
  88936. "shortnames": [],
  88937. "category": "people"
  88938. },
  88939. ":nerd:": {
  88940. "uc_base": "1f913",
  88941. "uc_output": "1f913",
  88942. "uc_match": "1f913",
  88943. "uc_greedy": "1f913",
  88944. "shortnames": [":nerd_face:"],
  88945. "category": "people"
  88946. },
  88947. ":neutral_face:": {
  88948. "uc_base": "1f610",
  88949. "uc_output": "1f610",
  88950. "uc_match": "1f610-fe0f",
  88951. "uc_greedy": "1f610-fe0f",
  88952. "shortnames": [],
  88953. "category": "people"
  88954. },
  88955. ":new:": {
  88956. "uc_base": "1f195",
  88957. "uc_output": "1f195",
  88958. "uc_match": "1f195",
  88959. "uc_greedy": "1f195",
  88960. "shortnames": [],
  88961. "category": "symbols"
  88962. },
  88963. ":new_moon:": {
  88964. "uc_base": "1f311",
  88965. "uc_output": "1f311",
  88966. "uc_match": "1f311",
  88967. "uc_greedy": "1f311",
  88968. "shortnames": [],
  88969. "category": "nature"
  88970. },
  88971. ":new_moon_with_face:": {
  88972. "uc_base": "1f31a",
  88973. "uc_output": "1f31a",
  88974. "uc_match": "1f31a",
  88975. "uc_greedy": "1f31a",
  88976. "shortnames": [],
  88977. "category": "nature"
  88978. },
  88979. ":newspaper2:": {
  88980. "uc_base": "1f5de",
  88981. "uc_output": "1f5de",
  88982. "uc_match": "1f5de-fe0f",
  88983. "uc_greedy": "1f5de-fe0f",
  88984. "shortnames": [":rolled_up_newspaper:"],
  88985. "category": "objects"
  88986. },
  88987. ":newspaper:": {
  88988. "uc_base": "1f4f0",
  88989. "uc_output": "1f4f0",
  88990. "uc_match": "1f4f0",
  88991. "uc_greedy": "1f4f0",
  88992. "shortnames": [],
  88993. "category": "objects"
  88994. },
  88995. ":ng:": {
  88996. "uc_base": "1f196",
  88997. "uc_output": "1f196",
  88998. "uc_match": "1f196",
  88999. "uc_greedy": "1f196",
  89000. "shortnames": [],
  89001. "category": "symbols"
  89002. },
  89003. ":night_with_stars:": {
  89004. "uc_base": "1f303",
  89005. "uc_output": "1f303",
  89006. "uc_match": "1f303",
  89007. "uc_greedy": "1f303",
  89008. "shortnames": [],
  89009. "category": "travel"
  89010. },
  89011. ":no_bell:": {
  89012. "uc_base": "1f515",
  89013. "uc_output": "1f515",
  89014. "uc_match": "1f515",
  89015. "uc_greedy": "1f515",
  89016. "shortnames": [],
  89017. "category": "symbols"
  89018. },
  89019. ":no_bicycles:": {
  89020. "uc_base": "1f6b3",
  89021. "uc_output": "1f6b3",
  89022. "uc_match": "1f6b3",
  89023. "uc_greedy": "1f6b3",
  89024. "shortnames": [],
  89025. "category": "symbols"
  89026. },
  89027. ":no_entry_sign:": {
  89028. "uc_base": "1f6ab",
  89029. "uc_output": "1f6ab",
  89030. "uc_match": "1f6ab",
  89031. "uc_greedy": "1f6ab",
  89032. "shortnames": [],
  89033. "category": "symbols"
  89034. },
  89035. ":no_mobile_phones:": {
  89036. "uc_base": "1f4f5",
  89037. "uc_output": "1f4f5",
  89038. "uc_match": "1f4f5",
  89039. "uc_greedy": "1f4f5",
  89040. "shortnames": [],
  89041. "category": "symbols"
  89042. },
  89043. ":no_mouth:": {
  89044. "uc_base": "1f636",
  89045. "uc_output": "1f636",
  89046. "uc_match": "1f636",
  89047. "uc_greedy": "1f636",
  89048. "shortnames": [],
  89049. "category": "people"
  89050. },
  89051. ":no_pedestrians:": {
  89052. "uc_base": "1f6b7",
  89053. "uc_output": "1f6b7",
  89054. "uc_match": "1f6b7",
  89055. "uc_greedy": "1f6b7",
  89056. "shortnames": [],
  89057. "category": "symbols"
  89058. },
  89059. ":no_smoking:": {
  89060. "uc_base": "1f6ad",
  89061. "uc_output": "1f6ad",
  89062. "uc_match": "1f6ad-fe0f",
  89063. "uc_greedy": "1f6ad-fe0f",
  89064. "shortnames": [],
  89065. "category": "symbols"
  89066. },
  89067. ":non-potable_water:": {
  89068. "uc_base": "1f6b1",
  89069. "uc_output": "1f6b1",
  89070. "uc_match": "1f6b1",
  89071. "uc_greedy": "1f6b1",
  89072. "shortnames": [],
  89073. "category": "symbols"
  89074. },
  89075. ":nose:": {
  89076. "uc_base": "1f443",
  89077. "uc_output": "1f443",
  89078. "uc_match": "1f443",
  89079. "uc_greedy": "1f443",
  89080. "shortnames": [],
  89081. "category": "people"
  89082. },
  89083. ":notebook:": {
  89084. "uc_base": "1f4d3",
  89085. "uc_output": "1f4d3",
  89086. "uc_match": "1f4d3",
  89087. "uc_greedy": "1f4d3",
  89088. "shortnames": [],
  89089. "category": "objects"
  89090. },
  89091. ":notebook_with_decorative_cover:": {
  89092. "uc_base": "1f4d4",
  89093. "uc_output": "1f4d4",
  89094. "uc_match": "1f4d4",
  89095. "uc_greedy": "1f4d4",
  89096. "shortnames": [],
  89097. "category": "objects"
  89098. },
  89099. ":notepad_spiral:": {
  89100. "uc_base": "1f5d2",
  89101. "uc_output": "1f5d2",
  89102. "uc_match": "1f5d2-fe0f",
  89103. "uc_greedy": "1f5d2-fe0f",
  89104. "shortnames": [":spiral_note_pad:"],
  89105. "category": "objects"
  89106. },
  89107. ":notes:": {
  89108. "uc_base": "1f3b6",
  89109. "uc_output": "1f3b6",
  89110. "uc_match": "1f3b6",
  89111. "uc_greedy": "1f3b6",
  89112. "shortnames": [],
  89113. "category": "symbols"
  89114. },
  89115. ":nut_and_bolt:": {
  89116. "uc_base": "1f529",
  89117. "uc_output": "1f529",
  89118. "uc_match": "1f529",
  89119. "uc_greedy": "1f529",
  89120. "shortnames": [],
  89121. "category": "objects"
  89122. },
  89123. ":o2:": {
  89124. "uc_base": "1f17e",
  89125. "uc_output": "1f17e",
  89126. "uc_match": "1f17e-fe0f",
  89127. "uc_greedy": "1f17e-fe0f",
  89128. "shortnames": [],
  89129. "category": "symbols"
  89130. },
  89131. ":ocean:": {
  89132. "uc_base": "1f30a",
  89133. "uc_output": "1f30a",
  89134. "uc_match": "1f30a",
  89135. "uc_greedy": "1f30a",
  89136. "shortnames": [],
  89137. "category": "nature"
  89138. },
  89139. ":octagonal_sign:": {
  89140. "uc_base": "1f6d1",
  89141. "uc_output": "1f6d1",
  89142. "uc_match": "1f6d1",
  89143. "uc_greedy": "1f6d1",
  89144. "shortnames": [":stop_sign:"],
  89145. "category": "symbols"
  89146. },
  89147. ":octopus:": {
  89148. "uc_base": "1f419",
  89149. "uc_output": "1f419",
  89150. "uc_match": "1f419",
  89151. "uc_greedy": "1f419",
  89152. "shortnames": [],
  89153. "category": "nature"
  89154. },
  89155. ":oden:": {
  89156. "uc_base": "1f362",
  89157. "uc_output": "1f362",
  89158. "uc_match": "1f362",
  89159. "uc_greedy": "1f362",
  89160. "shortnames": [],
  89161. "category": "food"
  89162. },
  89163. ":office:": {
  89164. "uc_base": "1f3e2",
  89165. "uc_output": "1f3e2",
  89166. "uc_match": "1f3e2",
  89167. "uc_greedy": "1f3e2",
  89168. "shortnames": [],
  89169. "category": "travel"
  89170. },
  89171. ":oil:": {
  89172. "uc_base": "1f6e2",
  89173. "uc_output": "1f6e2",
  89174. "uc_match": "1f6e2-fe0f",
  89175. "uc_greedy": "1f6e2-fe0f",
  89176. "shortnames": [":oil_drum:"],
  89177. "category": "objects"
  89178. },
  89179. ":ok:": {
  89180. "uc_base": "1f197",
  89181. "uc_output": "1f197",
  89182. "uc_match": "1f197",
  89183. "uc_greedy": "1f197",
  89184. "shortnames": [],
  89185. "category": "symbols"
  89186. },
  89187. ":ok_hand:": {
  89188. "uc_base": "1f44c",
  89189. "uc_output": "1f44c",
  89190. "uc_match": "1f44c",
  89191. "uc_greedy": "1f44c",
  89192. "shortnames": [],
  89193. "category": "people"
  89194. },
  89195. ":older_adult:": {
  89196. "uc_base": "1f9d3",
  89197. "uc_output": "1f9d3",
  89198. "uc_match": "1f9d3",
  89199. "uc_greedy": "1f9d3",
  89200. "shortnames": [],
  89201. "category": "people"
  89202. },
  89203. ":older_man:": {
  89204. "uc_base": "1f474",
  89205. "uc_output": "1f474",
  89206. "uc_match": "1f474",
  89207. "uc_greedy": "1f474",
  89208. "shortnames": [],
  89209. "category": "people"
  89210. },
  89211. ":older_woman:": {
  89212. "uc_base": "1f475",
  89213. "uc_output": "1f475",
  89214. "uc_match": "1f475",
  89215. "uc_greedy": "1f475",
  89216. "shortnames": [":grandma:"],
  89217. "category": "people"
  89218. },
  89219. ":om_symbol:": {
  89220. "uc_base": "1f549",
  89221. "uc_output": "1f549",
  89222. "uc_match": "1f549-fe0f",
  89223. "uc_greedy": "1f549",
  89224. "shortnames": [],
  89225. "category": "symbols"
  89226. },
  89227. ":on:": {
  89228. "uc_base": "1f51b",
  89229. "uc_output": "1f51b",
  89230. "uc_match": "1f51b",
  89231. "uc_greedy": "1f51b",
  89232. "shortnames": [],
  89233. "category": "symbols"
  89234. },
  89235. ":oncoming_automobile:": {
  89236. "uc_base": "1f698",
  89237. "uc_output": "1f698",
  89238. "uc_match": "1f698-fe0f",
  89239. "uc_greedy": "1f698-fe0f",
  89240. "shortnames": [],
  89241. "category": "travel"
  89242. },
  89243. ":oncoming_bus:": {
  89244. "uc_base": "1f68d",
  89245. "uc_output": "1f68d",
  89246. "uc_match": "1f68d-fe0f",
  89247. "uc_greedy": "1f68d-fe0f",
  89248. "shortnames": [],
  89249. "category": "travel"
  89250. },
  89251. ":oncoming_police_car:": {
  89252. "uc_base": "1f694",
  89253. "uc_output": "1f694",
  89254. "uc_match": "1f694-fe0f",
  89255. "uc_greedy": "1f694-fe0f",
  89256. "shortnames": [],
  89257. "category": "travel"
  89258. },
  89259. ":oncoming_taxi:": {
  89260. "uc_base": "1f696",
  89261. "uc_output": "1f696",
  89262. "uc_match": "1f696",
  89263. "uc_greedy": "1f696",
  89264. "shortnames": [],
  89265. "category": "travel"
  89266. },
  89267. ":open_file_folder:": {
  89268. "uc_base": "1f4c2",
  89269. "uc_output": "1f4c2",
  89270. "uc_match": "1f4c2",
  89271. "uc_greedy": "1f4c2",
  89272. "shortnames": [],
  89273. "category": "objects"
  89274. },
  89275. ":open_hands:": {
  89276. "uc_base": "1f450",
  89277. "uc_output": "1f450",
  89278. "uc_match": "1f450",
  89279. "uc_greedy": "1f450",
  89280. "shortnames": [],
  89281. "category": "people"
  89282. },
  89283. ":open_mouth:": {
  89284. "uc_base": "1f62e",
  89285. "uc_output": "1f62e",
  89286. "uc_match": "1f62e",
  89287. "uc_greedy": "1f62e",
  89288. "shortnames": [],
  89289. "category": "people"
  89290. },
  89291. ":orange_book:": {
  89292. "uc_base": "1f4d9",
  89293. "uc_output": "1f4d9",
  89294. "uc_match": "1f4d9",
  89295. "uc_greedy": "1f4d9",
  89296. "shortnames": [],
  89297. "category": "objects"
  89298. },
  89299. ":orange_heart:": {
  89300. "uc_base": "1f9e1",
  89301. "uc_output": "1f9e1",
  89302. "uc_match": "1f9e1",
  89303. "uc_greedy": "1f9e1",
  89304. "shortnames": [],
  89305. "category": "symbols"
  89306. },
  89307. ":outbox_tray:": {
  89308. "uc_base": "1f4e4",
  89309. "uc_output": "1f4e4",
  89310. "uc_match": "1f4e4-fe0f",
  89311. "uc_greedy": "1f4e4-fe0f",
  89312. "shortnames": [],
  89313. "category": "objects"
  89314. },
  89315. ":owl:": {
  89316. "uc_base": "1f989",
  89317. "uc_output": "1f989",
  89318. "uc_match": "1f989",
  89319. "uc_greedy": "1f989",
  89320. "shortnames": [],
  89321. "category": "nature"
  89322. },
  89323. ":ox:": {
  89324. "uc_base": "1f402",
  89325. "uc_output": "1f402",
  89326. "uc_match": "1f402",
  89327. "uc_greedy": "1f402",
  89328. "shortnames": [],
  89329. "category": "nature"
  89330. },
  89331. ":package:": {
  89332. "uc_base": "1f4e6",
  89333. "uc_output": "1f4e6",
  89334. "uc_match": "1f4e6-fe0f",
  89335. "uc_greedy": "1f4e6-fe0f",
  89336. "shortnames": [],
  89337. "category": "objects"
  89338. },
  89339. ":page_facing_up:": {
  89340. "uc_base": "1f4c4",
  89341. "uc_output": "1f4c4",
  89342. "uc_match": "1f4c4",
  89343. "uc_greedy": "1f4c4",
  89344. "shortnames": [],
  89345. "category": "objects"
  89346. },
  89347. ":page_with_curl:": {
  89348. "uc_base": "1f4c3",
  89349. "uc_output": "1f4c3",
  89350. "uc_match": "1f4c3",
  89351. "uc_greedy": "1f4c3",
  89352. "shortnames": [],
  89353. "category": "objects"
  89354. },
  89355. ":pager:": {
  89356. "uc_base": "1f4df",
  89357. "uc_output": "1f4df",
  89358. "uc_match": "1f4df-fe0f",
  89359. "uc_greedy": "1f4df-fe0f",
  89360. "shortnames": [],
  89361. "category": "objects"
  89362. },
  89363. ":paintbrush:": {
  89364. "uc_base": "1f58c",
  89365. "uc_output": "1f58c",
  89366. "uc_match": "1f58c-fe0f",
  89367. "uc_greedy": "1f58c-fe0f",
  89368. "shortnames": [":lower_left_paintbrush:"],
  89369. "category": "objects"
  89370. },
  89371. ":palm_tree:": {
  89372. "uc_base": "1f334",
  89373. "uc_output": "1f334",
  89374. "uc_match": "1f334",
  89375. "uc_greedy": "1f334",
  89376. "shortnames": [],
  89377. "category": "nature"
  89378. },
  89379. ":palms_up_together:": {
  89380. "uc_base": "1f932",
  89381. "uc_output": "1f932",
  89382. "uc_match": "1f932",
  89383. "uc_greedy": "1f932",
  89384. "shortnames": [],
  89385. "category": "people"
  89386. },
  89387. ":pancakes:": {
  89388. "uc_base": "1f95e",
  89389. "uc_output": "1f95e",
  89390. "uc_match": "1f95e",
  89391. "uc_greedy": "1f95e",
  89392. "shortnames": [],
  89393. "category": "food"
  89394. },
  89395. ":panda_face:": {
  89396. "uc_base": "1f43c",
  89397. "uc_output": "1f43c",
  89398. "uc_match": "1f43c",
  89399. "uc_greedy": "1f43c",
  89400. "shortnames": [],
  89401. "category": "nature"
  89402. },
  89403. ":paperclip:": {
  89404. "uc_base": "1f4ce",
  89405. "uc_output": "1f4ce",
  89406. "uc_match": "1f4ce",
  89407. "uc_greedy": "1f4ce",
  89408. "shortnames": [],
  89409. "category": "objects"
  89410. },
  89411. ":paperclips:": {
  89412. "uc_base": "1f587",
  89413. "uc_output": "1f587",
  89414. "uc_match": "1f587-fe0f",
  89415. "uc_greedy": "1f587-fe0f",
  89416. "shortnames": [":linked_paperclips:"],
  89417. "category": "objects"
  89418. },
  89419. ":park:": {
  89420. "uc_base": "1f3de",
  89421. "uc_output": "1f3de",
  89422. "uc_match": "1f3de-fe0f",
  89423. "uc_greedy": "1f3de-fe0f",
  89424. "shortnames": [":national_park:"],
  89425. "category": "travel"
  89426. },
  89427. ":parking:": {
  89428. "uc_base": "1f17f",
  89429. "uc_output": "1f17f",
  89430. "uc_match": "1f17f-fe0f",
  89431. "uc_greedy": "1f17f-fe0f",
  89432. "shortnames": [],
  89433. "category": "symbols"
  89434. },
  89435. ":passport_control:": {
  89436. "uc_base": "1f6c2",
  89437. "uc_output": "1f6c2",
  89438. "uc_match": "1f6c2",
  89439. "uc_greedy": "1f6c2",
  89440. "shortnames": [],
  89441. "category": "symbols"
  89442. },
  89443. ":peach:": {
  89444. "uc_base": "1f351",
  89445. "uc_output": "1f351",
  89446. "uc_match": "1f351",
  89447. "uc_greedy": "1f351",
  89448. "shortnames": [],
  89449. "category": "food"
  89450. },
  89451. ":peanuts:": {
  89452. "uc_base": "1f95c",
  89453. "uc_output": "1f95c",
  89454. "uc_match": "1f95c",
  89455. "uc_greedy": "1f95c",
  89456. "shortnames": [":shelled_peanut:"],
  89457. "category": "food"
  89458. },
  89459. ":pear:": {
  89460. "uc_base": "1f350",
  89461. "uc_output": "1f350",
  89462. "uc_match": "1f350",
  89463. "uc_greedy": "1f350",
  89464. "shortnames": [],
  89465. "category": "food"
  89466. },
  89467. ":pen_ballpoint:": {
  89468. "uc_base": "1f58a",
  89469. "uc_output": "1f58a",
  89470. "uc_match": "1f58a-fe0f",
  89471. "uc_greedy": "1f58a-fe0f",
  89472. "shortnames": [":lower_left_ballpoint_pen:"],
  89473. "category": "objects"
  89474. },
  89475. ":pen_fountain:": {
  89476. "uc_base": "1f58b",
  89477. "uc_output": "1f58b",
  89478. "uc_match": "1f58b-fe0f",
  89479. "uc_greedy": "1f58b-fe0f",
  89480. "shortnames": [":lower_left_fountain_pen:"],
  89481. "category": "objects"
  89482. },
  89483. ":pencil:": {
  89484. "uc_base": "1f4dd",
  89485. "uc_output": "1f4dd",
  89486. "uc_match": "1f4dd",
  89487. "uc_greedy": "1f4dd",
  89488. "shortnames": [":memo:"],
  89489. "category": "objects"
  89490. },
  89491. ":penguin:": {
  89492. "uc_base": "1f427",
  89493. "uc_output": "1f427",
  89494. "uc_match": "1f427",
  89495. "uc_greedy": "1f427",
  89496. "shortnames": [],
  89497. "category": "nature"
  89498. },
  89499. ":pensive:": {
  89500. "uc_base": "1f614",
  89501. "uc_output": "1f614",
  89502. "uc_match": "1f614",
  89503. "uc_greedy": "1f614",
  89504. "shortnames": [],
  89505. "category": "people"
  89506. },
  89507. ":people_with_bunny_ears_partying:": {
  89508. "uc_base": "1f46f",
  89509. "uc_output": "1f46f",
  89510. "uc_match": "1f46f",
  89511. "uc_greedy": "1f46f",
  89512. "shortnames": [":dancers:"],
  89513. "category": "people"
  89514. },
  89515. ":people_wrestling:": {
  89516. "uc_base": "1f93c",
  89517. "uc_output": "1f93c",
  89518. "uc_match": "1f93c",
  89519. "uc_greedy": "1f93c",
  89520. "shortnames": [":wrestlers:", ":wrestling:"],
  89521. "category": "activity"
  89522. },
  89523. ":performing_arts:": {
  89524. "uc_base": "1f3ad",
  89525. "uc_output": "1f3ad",
  89526. "uc_match": "1f3ad-fe0f",
  89527. "uc_greedy": "1f3ad-fe0f",
  89528. "shortnames": [],
  89529. "category": "activity"
  89530. },
  89531. ":persevere:": {
  89532. "uc_base": "1f623",
  89533. "uc_output": "1f623",
  89534. "uc_match": "1f623",
  89535. "uc_greedy": "1f623",
  89536. "shortnames": [],
  89537. "category": "people"
  89538. },
  89539. ":person_biking:": {
  89540. "uc_base": "1f6b4",
  89541. "uc_output": "1f6b4",
  89542. "uc_match": "1f6b4",
  89543. "uc_greedy": "1f6b4",
  89544. "shortnames": [":bicyclist:"],
  89545. "category": "activity"
  89546. },
  89547. ":person_bowing:": {
  89548. "uc_base": "1f647",
  89549. "uc_output": "1f647",
  89550. "uc_match": "1f647",
  89551. "uc_greedy": "1f647",
  89552. "shortnames": [":bow:"],
  89553. "category": "people"
  89554. },
  89555. ":person_climbing:": {
  89556. "uc_base": "1f9d7",
  89557. "uc_output": "1f9d7",
  89558. "uc_match": "1f9d7",
  89559. "uc_greedy": "1f9d7",
  89560. "shortnames": [],
  89561. "category": "activity"
  89562. },
  89563. ":person_doing_cartwheel:": {
  89564. "uc_base": "1f938",
  89565. "uc_output": "1f938",
  89566. "uc_match": "1f938",
  89567. "uc_greedy": "1f938",
  89568. "shortnames": [":cartwheel:"],
  89569. "category": "activity"
  89570. },
  89571. ":person_facepalming:": {
  89572. "uc_base": "1f926",
  89573. "uc_output": "1f926",
  89574. "uc_match": "1f926",
  89575. "uc_greedy": "1f926",
  89576. "shortnames": [":face_palm:", ":facepalm:"],
  89577. "category": "people"
  89578. },
  89579. ":person_fencing:": {
  89580. "uc_base": "1f93a",
  89581. "uc_output": "1f93a",
  89582. "uc_match": "1f93a",
  89583. "uc_greedy": "1f93a",
  89584. "shortnames": [":fencer:", ":fencing:"],
  89585. "category": "activity"
  89586. },
  89587. ":person_frowning:": {
  89588. "uc_base": "1f64d",
  89589. "uc_output": "1f64d",
  89590. "uc_match": "1f64d",
  89591. "uc_greedy": "1f64d",
  89592. "shortnames": [],
  89593. "category": "people"
  89594. },
  89595. ":person_gesturing_no:": {
  89596. "uc_base": "1f645",
  89597. "uc_output": "1f645",
  89598. "uc_match": "1f645",
  89599. "uc_greedy": "1f645",
  89600. "shortnames": [":no_good:"],
  89601. "category": "people"
  89602. },
  89603. ":person_gesturing_ok:": {
  89604. "uc_base": "1f646",
  89605. "uc_output": "1f646",
  89606. "uc_match": "1f646",
  89607. "uc_greedy": "1f646",
  89608. "shortnames": [":ok_woman:"],
  89609. "category": "people"
  89610. },
  89611. ":person_getting_haircut:": {
  89612. "uc_base": "1f487",
  89613. "uc_output": "1f487",
  89614. "uc_match": "1f487",
  89615. "uc_greedy": "1f487",
  89616. "shortnames": [":haircut:"],
  89617. "category": "people"
  89618. },
  89619. ":person_getting_massage:": {
  89620. "uc_base": "1f486",
  89621. "uc_output": "1f486",
  89622. "uc_match": "1f486",
  89623. "uc_greedy": "1f486",
  89624. "shortnames": [":massage:"],
  89625. "category": "people"
  89626. },
  89627. ":person_golfing:": {
  89628. "uc_base": "1f3cc",
  89629. "uc_output": "1f3cc",
  89630. "uc_match": "1f3cc-fe0f",
  89631. "uc_greedy": "1f3cc-fe0f",
  89632. "shortnames": [":golfer:"],
  89633. "category": "activity"
  89634. },
  89635. ":person_in_lotus_position:": {
  89636. "uc_base": "1f9d8",
  89637. "uc_output": "1f9d8",
  89638. "uc_match": "1f9d8",
  89639. "uc_greedy": "1f9d8",
  89640. "shortnames": [],
  89641. "category": "activity"
  89642. },
  89643. ":person_in_steamy_room:": {
  89644. "uc_base": "1f9d6",
  89645. "uc_output": "1f9d6",
  89646. "uc_match": "1f9d6",
  89647. "uc_greedy": "1f9d6",
  89648. "shortnames": [],
  89649. "category": "people"
  89650. },
  89651. ":person_juggling:": {
  89652. "uc_base": "1f939",
  89653. "uc_output": "1f939",
  89654. "uc_match": "1f939",
  89655. "uc_greedy": "1f939",
  89656. "shortnames": [":juggling:", ":juggler:"],
  89657. "category": "activity"
  89658. },
  89659. ":person_lifting_weights:": {
  89660. "uc_base": "1f3cb",
  89661. "uc_output": "1f3cb",
  89662. "uc_match": "1f3cb-fe0f",
  89663. "uc_greedy": "1f3cb-fe0f",
  89664. "shortnames": [":lifter:", ":weight_lifter:"],
  89665. "category": "activity"
  89666. },
  89667. ":person_mountain_biking:": {
  89668. "uc_base": "1f6b5",
  89669. "uc_output": "1f6b5",
  89670. "uc_match": "1f6b5",
  89671. "uc_greedy": "1f6b5",
  89672. "shortnames": [":mountain_bicyclist:"],
  89673. "category": "activity"
  89674. },
  89675. ":person_playing_handball:": {
  89676. "uc_base": "1f93e",
  89677. "uc_output": "1f93e",
  89678. "uc_match": "1f93e",
  89679. "uc_greedy": "1f93e",
  89680. "shortnames": [":handball:"],
  89681. "category": "activity"
  89682. },
  89683. ":person_playing_water_polo:": {
  89684. "uc_base": "1f93d",
  89685. "uc_output": "1f93d",
  89686. "uc_match": "1f93d",
  89687. "uc_greedy": "1f93d",
  89688. "shortnames": [":water_polo:"],
  89689. "category": "activity"
  89690. },
  89691. ":person_pouting:": {
  89692. "uc_base": "1f64e",
  89693. "uc_output": "1f64e",
  89694. "uc_match": "1f64e",
  89695. "uc_greedy": "1f64e",
  89696. "shortnames": [":person_with_pouting_face:"],
  89697. "category": "people"
  89698. },
  89699. ":person_raising_hand:": {
  89700. "uc_base": "1f64b",
  89701. "uc_output": "1f64b",
  89702. "uc_match": "1f64b",
  89703. "uc_greedy": "1f64b",
  89704. "shortnames": [":raising_hand:"],
  89705. "category": "people"
  89706. },
  89707. ":person_rowing_boat:": {
  89708. "uc_base": "1f6a3",
  89709. "uc_output": "1f6a3",
  89710. "uc_match": "1f6a3",
  89711. "uc_greedy": "1f6a3",
  89712. "shortnames": [":rowboat:"],
  89713. "category": "activity"
  89714. },
  89715. ":person_running:": {
  89716. "uc_base": "1f3c3",
  89717. "uc_output": "1f3c3",
  89718. "uc_match": "1f3c3",
  89719. "uc_greedy": "1f3c3",
  89720. "shortnames": [":runner:"],
  89721. "category": "people"
  89722. },
  89723. ":person_shrugging:": {
  89724. "uc_base": "1f937",
  89725. "uc_output": "1f937",
  89726. "uc_match": "1f937",
  89727. "uc_greedy": "1f937",
  89728. "shortnames": [":shrug:"],
  89729. "category": "people"
  89730. },
  89731. ":person_surfing:": {
  89732. "uc_base": "1f3c4",
  89733. "uc_output": "1f3c4",
  89734. "uc_match": "1f3c4-fe0f",
  89735. "uc_greedy": "1f3c4-fe0f",
  89736. "shortnames": [":surfer:"],
  89737. "category": "activity"
  89738. },
  89739. ":person_swimming:": {
  89740. "uc_base": "1f3ca",
  89741. "uc_output": "1f3ca",
  89742. "uc_match": "1f3ca-fe0f",
  89743. "uc_greedy": "1f3ca-fe0f",
  89744. "shortnames": [":swimmer:"],
  89745. "category": "activity"
  89746. },
  89747. ":person_tipping_hand:": {
  89748. "uc_base": "1f481",
  89749. "uc_output": "1f481",
  89750. "uc_match": "1f481",
  89751. "uc_greedy": "1f481",
  89752. "shortnames": [":information_desk_person:"],
  89753. "category": "people"
  89754. },
  89755. ":person_walking:": {
  89756. "uc_base": "1f6b6",
  89757. "uc_output": "1f6b6",
  89758. "uc_match": "1f6b6",
  89759. "uc_greedy": "1f6b6",
  89760. "shortnames": [":walking:"],
  89761. "category": "people"
  89762. },
  89763. ":person_wearing_turban:": {
  89764. "uc_base": "1f473",
  89765. "uc_output": "1f473",
  89766. "uc_match": "1f473",
  89767. "uc_greedy": "1f473",
  89768. "shortnames": [":man_with_turban:"],
  89769. "category": "people"
  89770. },
  89771. ":pie:": {
  89772. "uc_base": "1f967",
  89773. "uc_output": "1f967",
  89774. "uc_match": "1f967",
  89775. "uc_greedy": "1f967",
  89776. "shortnames": [],
  89777. "category": "food"
  89778. },
  89779. ":pig2:": {
  89780. "uc_base": "1f416",
  89781. "uc_output": "1f416",
  89782. "uc_match": "1f416",
  89783. "uc_greedy": "1f416",
  89784. "shortnames": [],
  89785. "category": "nature"
  89786. },
  89787. ":pig:": {
  89788. "uc_base": "1f437",
  89789. "uc_output": "1f437",
  89790. "uc_match": "1f437",
  89791. "uc_greedy": "1f437",
  89792. "shortnames": [],
  89793. "category": "nature"
  89794. },
  89795. ":pig_nose:": {
  89796. "uc_base": "1f43d",
  89797. "uc_output": "1f43d",
  89798. "uc_match": "1f43d",
  89799. "uc_greedy": "1f43d",
  89800. "shortnames": [],
  89801. "category": "nature"
  89802. },
  89803. ":pill:": {
  89804. "uc_base": "1f48a",
  89805. "uc_output": "1f48a",
  89806. "uc_match": "1f48a",
  89807. "uc_greedy": "1f48a",
  89808. "shortnames": [],
  89809. "category": "objects"
  89810. },
  89811. ":pineapple:": {
  89812. "uc_base": "1f34d",
  89813. "uc_output": "1f34d",
  89814. "uc_match": "1f34d",
  89815. "uc_greedy": "1f34d",
  89816. "shortnames": [],
  89817. "category": "food"
  89818. },
  89819. ":ping_pong:": {
  89820. "uc_base": "1f3d3",
  89821. "uc_output": "1f3d3",
  89822. "uc_match": "1f3d3",
  89823. "uc_greedy": "1f3d3",
  89824. "shortnames": [":table_tennis:"],
  89825. "category": "activity"
  89826. },
  89827. ":pizza:": {
  89828. "uc_base": "1f355",
  89829. "uc_output": "1f355",
  89830. "uc_match": "1f355",
  89831. "uc_greedy": "1f355",
  89832. "shortnames": [],
  89833. "category": "food"
  89834. },
  89835. ":place_of_worship:": {
  89836. "uc_base": "1f6d0",
  89837. "uc_output": "1f6d0",
  89838. "uc_match": "1f6d0",
  89839. "uc_greedy": "1f6d0",
  89840. "shortnames": [":worship_symbol:"],
  89841. "category": "symbols"
  89842. },
  89843. ":point_down:": {
  89844. "uc_base": "1f447",
  89845. "uc_output": "1f447",
  89846. "uc_match": "1f447-fe0f",
  89847. "uc_greedy": "1f447-fe0f",
  89848. "shortnames": [],
  89849. "category": "people"
  89850. },
  89851. ":point_left:": {
  89852. "uc_base": "1f448",
  89853. "uc_output": "1f448",
  89854. "uc_match": "1f448-fe0f",
  89855. "uc_greedy": "1f448-fe0f",
  89856. "shortnames": [],
  89857. "category": "people"
  89858. },
  89859. ":point_right:": {
  89860. "uc_base": "1f449",
  89861. "uc_output": "1f449",
  89862. "uc_match": "1f449-fe0f",
  89863. "uc_greedy": "1f449-fe0f",
  89864. "shortnames": [],
  89865. "category": "people"
  89866. },
  89867. ":point_up_2:": {
  89868. "uc_base": "1f446",
  89869. "uc_output": "1f446",
  89870. "uc_match": "1f446-fe0f",
  89871. "uc_greedy": "1f446-fe0f",
  89872. "shortnames": [],
  89873. "category": "people"
  89874. },
  89875. ":police_car:": {
  89876. "uc_base": "1f693",
  89877. "uc_output": "1f693",
  89878. "uc_match": "1f693",
  89879. "uc_greedy": "1f693",
  89880. "shortnames": [],
  89881. "category": "travel"
  89882. },
  89883. ":police_officer:": {
  89884. "uc_base": "1f46e",
  89885. "uc_output": "1f46e",
  89886. "uc_match": "1f46e",
  89887. "uc_greedy": "1f46e",
  89888. "shortnames": [":cop:"],
  89889. "category": "people"
  89890. },
  89891. ":poodle:": {
  89892. "uc_base": "1f429",
  89893. "uc_output": "1f429",
  89894. "uc_match": "1f429",
  89895. "uc_greedy": "1f429",
  89896. "shortnames": [],
  89897. "category": "nature"
  89898. },
  89899. ":poop:": {
  89900. "uc_base": "1f4a9",
  89901. "uc_output": "1f4a9",
  89902. "uc_match": "1f4a9",
  89903. "uc_greedy": "1f4a9",
  89904. "shortnames": [":shit:", ":hankey:", ":poo:"],
  89905. "category": "people"
  89906. },
  89907. ":popcorn:": {
  89908. "uc_base": "1f37f",
  89909. "uc_output": "1f37f",
  89910. "uc_match": "1f37f",
  89911. "uc_greedy": "1f37f",
  89912. "shortnames": [],
  89913. "category": "food"
  89914. },
  89915. ":post_office:": {
  89916. "uc_base": "1f3e3",
  89917. "uc_output": "1f3e3",
  89918. "uc_match": "1f3e3",
  89919. "uc_greedy": "1f3e3",
  89920. "shortnames": [],
  89921. "category": "travel"
  89922. },
  89923. ":postal_horn:": {
  89924. "uc_base": "1f4ef",
  89925. "uc_output": "1f4ef",
  89926. "uc_match": "1f4ef",
  89927. "uc_greedy": "1f4ef",
  89928. "shortnames": [],
  89929. "category": "objects"
  89930. },
  89931. ":postbox:": {
  89932. "uc_base": "1f4ee",
  89933. "uc_output": "1f4ee",
  89934. "uc_match": "1f4ee",
  89935. "uc_greedy": "1f4ee",
  89936. "shortnames": [],
  89937. "category": "objects"
  89938. },
  89939. ":potable_water:": {
  89940. "uc_base": "1f6b0",
  89941. "uc_output": "1f6b0",
  89942. "uc_match": "1f6b0",
  89943. "uc_greedy": "1f6b0",
  89944. "shortnames": [],
  89945. "category": "objects"
  89946. },
  89947. ":potato:": {
  89948. "uc_base": "1f954",
  89949. "uc_output": "1f954",
  89950. "uc_match": "1f954",
  89951. "uc_greedy": "1f954",
  89952. "shortnames": [],
  89953. "category": "food"
  89954. },
  89955. ":pouch:": {
  89956. "uc_base": "1f45d",
  89957. "uc_output": "1f45d",
  89958. "uc_match": "1f45d",
  89959. "uc_greedy": "1f45d",
  89960. "shortnames": [],
  89961. "category": "people"
  89962. },
  89963. ":poultry_leg:": {
  89964. "uc_base": "1f357",
  89965. "uc_output": "1f357",
  89966. "uc_match": "1f357",
  89967. "uc_greedy": "1f357",
  89968. "shortnames": [],
  89969. "category": "food"
  89970. },
  89971. ":pound:": {
  89972. "uc_base": "1f4b7",
  89973. "uc_output": "1f4b7",
  89974. "uc_match": "1f4b7",
  89975. "uc_greedy": "1f4b7",
  89976. "shortnames": [],
  89977. "category": "objects"
  89978. },
  89979. ":pouting_cat:": {
  89980. "uc_base": "1f63e",
  89981. "uc_output": "1f63e",
  89982. "uc_match": "1f63e",
  89983. "uc_greedy": "1f63e",
  89984. "shortnames": [],
  89985. "category": "people"
  89986. },
  89987. ":pray:": {
  89988. "uc_base": "1f64f",
  89989. "uc_output": "1f64f",
  89990. "uc_match": "1f64f",
  89991. "uc_greedy": "1f64f",
  89992. "shortnames": [],
  89993. "category": "people"
  89994. },
  89995. ":prayer_beads:": {
  89996. "uc_base": "1f4ff",
  89997. "uc_output": "1f4ff",
  89998. "uc_match": "1f4ff",
  89999. "uc_greedy": "1f4ff",
  90000. "shortnames": [],
  90001. "category": "objects"
  90002. },
  90003. ":pregnant_woman:": {
  90004. "uc_base": "1f930",
  90005. "uc_output": "1f930",
  90006. "uc_match": "1f930",
  90007. "uc_greedy": "1f930",
  90008. "shortnames": [":expecting_woman:"],
  90009. "category": "people"
  90010. },
  90011. ":pretzel:": {
  90012. "uc_base": "1f968",
  90013. "uc_output": "1f968",
  90014. "uc_match": "1f968",
  90015. "uc_greedy": "1f968",
  90016. "shortnames": [],
  90017. "category": "food"
  90018. },
  90019. ":prince:": {
  90020. "uc_base": "1f934",
  90021. "uc_output": "1f934",
  90022. "uc_match": "1f934",
  90023. "uc_greedy": "1f934",
  90024. "shortnames": [],
  90025. "category": "people"
  90026. },
  90027. ":princess:": {
  90028. "uc_base": "1f478",
  90029. "uc_output": "1f478",
  90030. "uc_match": "1f478",
  90031. "uc_greedy": "1f478",
  90032. "shortnames": [],
  90033. "category": "people"
  90034. },
  90035. ":printer:": {
  90036. "uc_base": "1f5a8",
  90037. "uc_output": "1f5a8",
  90038. "uc_match": "1f5a8-fe0f",
  90039. "uc_greedy": "1f5a8-fe0f",
  90040. "shortnames": [],
  90041. "category": "objects"
  90042. },
  90043. ":projector:": {
  90044. "uc_base": "1f4fd",
  90045. "uc_output": "1f4fd",
  90046. "uc_match": "1f4fd-fe0f",
  90047. "uc_greedy": "1f4fd-fe0f",
  90048. "shortnames": [":film_projector:"],
  90049. "category": "objects"
  90050. },
  90051. ":punch:": {
  90052. "uc_base": "1f44a",
  90053. "uc_output": "1f44a",
  90054. "uc_match": "1f44a",
  90055. "uc_greedy": "1f44a",
  90056. "shortnames": [],
  90057. "category": "people"
  90058. },
  90059. ":purple_heart:": {
  90060. "uc_base": "1f49c",
  90061. "uc_output": "1f49c",
  90062. "uc_match": "1f49c",
  90063. "uc_greedy": "1f49c",
  90064. "shortnames": [],
  90065. "category": "symbols"
  90066. },
  90067. ":purse:": {
  90068. "uc_base": "1f45b",
  90069. "uc_output": "1f45b",
  90070. "uc_match": "1f45b",
  90071. "uc_greedy": "1f45b",
  90072. "shortnames": [],
  90073. "category": "people"
  90074. },
  90075. ":pushpin:": {
  90076. "uc_base": "1f4cc",
  90077. "uc_output": "1f4cc",
  90078. "uc_match": "1f4cc",
  90079. "uc_greedy": "1f4cc",
  90080. "shortnames": [],
  90081. "category": "objects"
  90082. },
  90083. ":put_litter_in_its_place:": {
  90084. "uc_base": "1f6ae",
  90085. "uc_output": "1f6ae",
  90086. "uc_match": "1f6ae",
  90087. "uc_greedy": "1f6ae",
  90088. "shortnames": [],
  90089. "category": "symbols"
  90090. },
  90091. ":rabbit2:": {
  90092. "uc_base": "1f407",
  90093. "uc_output": "1f407",
  90094. "uc_match": "1f407",
  90095. "uc_greedy": "1f407",
  90096. "shortnames": [],
  90097. "category": "nature"
  90098. },
  90099. ":rabbit:": {
  90100. "uc_base": "1f430",
  90101. "uc_output": "1f430",
  90102. "uc_match": "1f430",
  90103. "uc_greedy": "1f430",
  90104. "shortnames": [],
  90105. "category": "nature"
  90106. },
  90107. ":race_car:": {
  90108. "uc_base": "1f3ce",
  90109. "uc_output": "1f3ce",
  90110. "uc_match": "1f3ce-fe0f",
  90111. "uc_greedy": "1f3ce-fe0f",
  90112. "shortnames": [":racing_car:"],
  90113. "category": "travel"
  90114. },
  90115. ":racehorse:": {
  90116. "uc_base": "1f40e",
  90117. "uc_output": "1f40e",
  90118. "uc_match": "1f40e",
  90119. "uc_greedy": "1f40e",
  90120. "shortnames": [],
  90121. "category": "nature"
  90122. },
  90123. ":radio:": {
  90124. "uc_base": "1f4fb",
  90125. "uc_output": "1f4fb",
  90126. "uc_match": "1f4fb-fe0f",
  90127. "uc_greedy": "1f4fb-fe0f",
  90128. "shortnames": [],
  90129. "category": "objects"
  90130. },
  90131. ":radio_button:": {
  90132. "uc_base": "1f518",
  90133. "uc_output": "1f518",
  90134. "uc_match": "1f518",
  90135. "uc_greedy": "1f518",
  90136. "shortnames": [],
  90137. "category": "symbols"
  90138. },
  90139. ":rage:": {
  90140. "uc_base": "1f621",
  90141. "uc_output": "1f621",
  90142. "uc_match": "1f621",
  90143. "uc_greedy": "1f621",
  90144. "shortnames": [],
  90145. "category": "people"
  90146. },
  90147. ":railway_car:": {
  90148. "uc_base": "1f683",
  90149. "uc_output": "1f683",
  90150. "uc_match": "1f683",
  90151. "uc_greedy": "1f683",
  90152. "shortnames": [],
  90153. "category": "travel"
  90154. },
  90155. ":railway_track:": {
  90156. "uc_base": "1f6e4",
  90157. "uc_output": "1f6e4",
  90158. "uc_match": "1f6e4-fe0f",
  90159. "uc_greedy": "1f6e4-fe0f",
  90160. "shortnames": [":railroad_track:"],
  90161. "category": "travel"
  90162. },
  90163. ":rainbow:": {
  90164. "uc_base": "1f308",
  90165. "uc_output": "1f308",
  90166. "uc_match": "1f308",
  90167. "uc_greedy": "1f308",
  90168. "shortnames": [],
  90169. "category": "nature"
  90170. },
  90171. ":raised_back_of_hand:": {
  90172. "uc_base": "1f91a",
  90173. "uc_output": "1f91a",
  90174. "uc_match": "1f91a",
  90175. "uc_greedy": "1f91a",
  90176. "shortnames": [":back_of_hand:"],
  90177. "category": "people"
  90178. },
  90179. ":raised_hands:": {
  90180. "uc_base": "1f64c",
  90181. "uc_output": "1f64c",
  90182. "uc_match": "1f64c",
  90183. "uc_greedy": "1f64c",
  90184. "shortnames": [],
  90185. "category": "people"
  90186. },
  90187. ":ram:": {
  90188. "uc_base": "1f40f",
  90189. "uc_output": "1f40f",
  90190. "uc_match": "1f40f",
  90191. "uc_greedy": "1f40f",
  90192. "shortnames": [],
  90193. "category": "nature"
  90194. },
  90195. ":ramen:": {
  90196. "uc_base": "1f35c",
  90197. "uc_output": "1f35c",
  90198. "uc_match": "1f35c",
  90199. "uc_greedy": "1f35c",
  90200. "shortnames": [],
  90201. "category": "food"
  90202. },
  90203. ":rat:": {
  90204. "uc_base": "1f400",
  90205. "uc_output": "1f400",
  90206. "uc_match": "1f400",
  90207. "uc_greedy": "1f400",
  90208. "shortnames": [],
  90209. "category": "nature"
  90210. },
  90211. ":red_car:": {
  90212. "uc_base": "1f697",
  90213. "uc_output": "1f697",
  90214. "uc_match": "1f697",
  90215. "uc_greedy": "1f697",
  90216. "shortnames": [],
  90217. "category": "travel"
  90218. },
  90219. ":red_circle:": {
  90220. "uc_base": "1f534",
  90221. "uc_output": "1f534",
  90222. "uc_match": "1f534",
  90223. "uc_greedy": "1f534",
  90224. "shortnames": [],
  90225. "category": "symbols"
  90226. },
  90227. ":regional_indicator_a:": {
  90228. "uc_base": "1f1e6",
  90229. "uc_output": "1f1e6",
  90230. "uc_match": "1f1e6",
  90231. "uc_greedy": "1f1e6",
  90232. "shortnames": [],
  90233. "category": "regional"
  90234. },
  90235. ":regional_indicator_b:": {
  90236. "uc_base": "1f1e7",
  90237. "uc_output": "1f1e7",
  90238. "uc_match": "1f1e7",
  90239. "uc_greedy": "1f1e7",
  90240. "shortnames": [],
  90241. "category": "regional"
  90242. },
  90243. ":regional_indicator_c:": {
  90244. "uc_base": "1f1e8",
  90245. "uc_output": "1f1e8",
  90246. "uc_match": "1f1e8",
  90247. "uc_greedy": "1f1e8",
  90248. "shortnames": [],
  90249. "category": "regional"
  90250. },
  90251. ":regional_indicator_d:": {
  90252. "uc_base": "1f1e9",
  90253. "uc_output": "1f1e9",
  90254. "uc_match": "1f1e9",
  90255. "uc_greedy": "1f1e9",
  90256. "shortnames": [],
  90257. "category": "regional"
  90258. },
  90259. ":regional_indicator_e:": {
  90260. "uc_base": "1f1ea",
  90261. "uc_output": "1f1ea",
  90262. "uc_match": "1f1ea",
  90263. "uc_greedy": "1f1ea",
  90264. "shortnames": [],
  90265. "category": "regional"
  90266. },
  90267. ":regional_indicator_f:": {
  90268. "uc_base": "1f1eb",
  90269. "uc_output": "1f1eb",
  90270. "uc_match": "1f1eb",
  90271. "uc_greedy": "1f1eb",
  90272. "shortnames": [],
  90273. "category": "regional"
  90274. },
  90275. ":regional_indicator_g:": {
  90276. "uc_base": "1f1ec",
  90277. "uc_output": "1f1ec",
  90278. "uc_match": "1f1ec",
  90279. "uc_greedy": "1f1ec",
  90280. "shortnames": [],
  90281. "category": "regional"
  90282. },
  90283. ":regional_indicator_h:": {
  90284. "uc_base": "1f1ed",
  90285. "uc_output": "1f1ed",
  90286. "uc_match": "1f1ed",
  90287. "uc_greedy": "1f1ed",
  90288. "shortnames": [],
  90289. "category": "regional"
  90290. },
  90291. ":regional_indicator_i:": {
  90292. "uc_base": "1f1ee",
  90293. "uc_output": "1f1ee",
  90294. "uc_match": "1f1ee",
  90295. "uc_greedy": "1f1ee",
  90296. "shortnames": [],
  90297. "category": "regional"
  90298. },
  90299. ":regional_indicator_j:": {
  90300. "uc_base": "1f1ef",
  90301. "uc_output": "1f1ef",
  90302. "uc_match": "1f1ef",
  90303. "uc_greedy": "1f1ef",
  90304. "shortnames": [],
  90305. "category": "regional"
  90306. },
  90307. ":regional_indicator_k:": {
  90308. "uc_base": "1f1f0",
  90309. "uc_output": "1f1f0",
  90310. "uc_match": "1f1f0",
  90311. "uc_greedy": "1f1f0",
  90312. "shortnames": [],
  90313. "category": "regional"
  90314. },
  90315. ":regional_indicator_l:": {
  90316. "uc_base": "1f1f1",
  90317. "uc_output": "1f1f1",
  90318. "uc_match": "1f1f1",
  90319. "uc_greedy": "1f1f1",
  90320. "shortnames": [],
  90321. "category": "regional"
  90322. },
  90323. ":regional_indicator_m:": {
  90324. "uc_base": "1f1f2",
  90325. "uc_output": "1f1f2",
  90326. "uc_match": "1f1f2",
  90327. "uc_greedy": "1f1f2",
  90328. "shortnames": [],
  90329. "category": "regional"
  90330. },
  90331. ":regional_indicator_n:": {
  90332. "uc_base": "1f1f3",
  90333. "uc_output": "1f1f3",
  90334. "uc_match": "1f1f3",
  90335. "uc_greedy": "1f1f3",
  90336. "shortnames": [],
  90337. "category": "regional"
  90338. },
  90339. ":regional_indicator_o:": {
  90340. "uc_base": "1f1f4",
  90341. "uc_output": "1f1f4",
  90342. "uc_match": "1f1f4",
  90343. "uc_greedy": "1f1f4",
  90344. "shortnames": [],
  90345. "category": "regional"
  90346. },
  90347. ":regional_indicator_p:": {
  90348. "uc_base": "1f1f5",
  90349. "uc_output": "1f1f5",
  90350. "uc_match": "1f1f5",
  90351. "uc_greedy": "1f1f5",
  90352. "shortnames": [],
  90353. "category": "regional"
  90354. },
  90355. ":regional_indicator_q:": {
  90356. "uc_base": "1f1f6",
  90357. "uc_output": "1f1f6",
  90358. "uc_match": "1f1f6",
  90359. "uc_greedy": "1f1f6",
  90360. "shortnames": [],
  90361. "category": "regional"
  90362. },
  90363. ":regional_indicator_r:": {
  90364. "uc_base": "1f1f7",
  90365. "uc_output": "1f1f7",
  90366. "uc_match": "1f1f7",
  90367. "uc_greedy": "1f1f7",
  90368. "shortnames": [],
  90369. "category": "regional"
  90370. },
  90371. ":regional_indicator_s:": {
  90372. "uc_base": "1f1f8",
  90373. "uc_output": "1f1f8",
  90374. "uc_match": "1f1f8",
  90375. "uc_greedy": "1f1f8",
  90376. "shortnames": [],
  90377. "category": "regional"
  90378. },
  90379. ":regional_indicator_t:": {
  90380. "uc_base": "1f1f9",
  90381. "uc_output": "1f1f9",
  90382. "uc_match": "1f1f9",
  90383. "uc_greedy": "1f1f9",
  90384. "shortnames": [],
  90385. "category": "regional"
  90386. },
  90387. ":regional_indicator_u:": {
  90388. "uc_base": "1f1fa",
  90389. "uc_output": "1f1fa",
  90390. "uc_match": "1f1fa",
  90391. "uc_greedy": "1f1fa",
  90392. "shortnames": [],
  90393. "category": "regional"
  90394. },
  90395. ":regional_indicator_v:": {
  90396. "uc_base": "1f1fb",
  90397. "uc_output": "1f1fb",
  90398. "uc_match": "1f1fb",
  90399. "uc_greedy": "1f1fb",
  90400. "shortnames": [],
  90401. "category": "regional"
  90402. },
  90403. ":regional_indicator_w:": {
  90404. "uc_base": "1f1fc",
  90405. "uc_output": "1f1fc",
  90406. "uc_match": "1f1fc",
  90407. "uc_greedy": "1f1fc",
  90408. "shortnames": [],
  90409. "category": "regional"
  90410. },
  90411. ":regional_indicator_x:": {
  90412. "uc_base": "1f1fd",
  90413. "uc_output": "1f1fd",
  90414. "uc_match": "1f1fd",
  90415. "uc_greedy": "1f1fd",
  90416. "shortnames": [],
  90417. "category": "regional"
  90418. },
  90419. ":regional_indicator_y:": {
  90420. "uc_base": "1f1fe",
  90421. "uc_output": "1f1fe",
  90422. "uc_match": "1f1fe",
  90423. "uc_greedy": "1f1fe",
  90424. "shortnames": [],
  90425. "category": "regional"
  90426. },
  90427. ":regional_indicator_z:": {
  90428. "uc_base": "1f1ff",
  90429. "uc_output": "1f1ff",
  90430. "uc_match": "1f1ff",
  90431. "uc_greedy": "1f1ff",
  90432. "shortnames": [],
  90433. "category": "regional"
  90434. },
  90435. ":relieved:": {
  90436. "uc_base": "1f60c",
  90437. "uc_output": "1f60c",
  90438. "uc_match": "1f60c",
  90439. "uc_greedy": "1f60c",
  90440. "shortnames": [],
  90441. "category": "people"
  90442. },
  90443. ":reminder_ribbon:": {
  90444. "uc_base": "1f397",
  90445. "uc_output": "1f397",
  90446. "uc_match": "1f397-fe0f",
  90447. "uc_greedy": "1f397-fe0f",
  90448. "shortnames": [],
  90449. "category": "activity"
  90450. },
  90451. ":repeat:": {
  90452. "uc_base": "1f501",
  90453. "uc_output": "1f501",
  90454. "uc_match": "1f501",
  90455. "uc_greedy": "1f501",
  90456. "shortnames": [],
  90457. "category": "symbols"
  90458. },
  90459. ":repeat_one:": {
  90460. "uc_base": "1f502",
  90461. "uc_output": "1f502",
  90462. "uc_match": "1f502",
  90463. "uc_greedy": "1f502",
  90464. "shortnames": [],
  90465. "category": "symbols"
  90466. },
  90467. ":restroom:": {
  90468. "uc_base": "1f6bb",
  90469. "uc_output": "1f6bb",
  90470. "uc_match": "1f6bb",
  90471. "uc_greedy": "1f6bb",
  90472. "shortnames": [],
  90473. "category": "symbols"
  90474. },
  90475. ":revolving_hearts:": {
  90476. "uc_base": "1f49e",
  90477. "uc_output": "1f49e",
  90478. "uc_match": "1f49e",
  90479. "uc_greedy": "1f49e",
  90480. "shortnames": [],
  90481. "category": "symbols"
  90482. },
  90483. ":rhino:": {
  90484. "uc_base": "1f98f",
  90485. "uc_output": "1f98f",
  90486. "uc_match": "1f98f",
  90487. "uc_greedy": "1f98f",
  90488. "shortnames": [":rhinoceros:"],
  90489. "category": "nature"
  90490. },
  90491. ":ribbon:": {
  90492. "uc_base": "1f380",
  90493. "uc_output": "1f380",
  90494. "uc_match": "1f380",
  90495. "uc_greedy": "1f380",
  90496. "shortnames": [],
  90497. "category": "objects"
  90498. },
  90499. ":rice:": {
  90500. "uc_base": "1f35a",
  90501. "uc_output": "1f35a",
  90502. "uc_match": "1f35a",
  90503. "uc_greedy": "1f35a",
  90504. "shortnames": [],
  90505. "category": "food"
  90506. },
  90507. ":rice_ball:": {
  90508. "uc_base": "1f359",
  90509. "uc_output": "1f359",
  90510. "uc_match": "1f359",
  90511. "uc_greedy": "1f359",
  90512. "shortnames": [],
  90513. "category": "food"
  90514. },
  90515. ":rice_cracker:": {
  90516. "uc_base": "1f358",
  90517. "uc_output": "1f358",
  90518. "uc_match": "1f358",
  90519. "uc_greedy": "1f358",
  90520. "shortnames": [],
  90521. "category": "food"
  90522. },
  90523. ":rice_scene:": {
  90524. "uc_base": "1f391",
  90525. "uc_output": "1f391",
  90526. "uc_match": "1f391",
  90527. "uc_greedy": "1f391",
  90528. "shortnames": [],
  90529. "category": "travel"
  90530. },
  90531. ":right_facing_fist:": {
  90532. "uc_base": "1f91c",
  90533. "uc_output": "1f91c",
  90534. "uc_match": "1f91c",
  90535. "uc_greedy": "1f91c",
  90536. "shortnames": [":right_fist:"],
  90537. "category": "people"
  90538. },
  90539. ":ring:": {
  90540. "uc_base": "1f48d",
  90541. "uc_output": "1f48d",
  90542. "uc_match": "1f48d",
  90543. "uc_greedy": "1f48d",
  90544. "shortnames": [],
  90545. "category": "people"
  90546. },
  90547. ":robot:": {
  90548. "uc_base": "1f916",
  90549. "uc_output": "1f916",
  90550. "uc_match": "1f916",
  90551. "uc_greedy": "1f916",
  90552. "shortnames": [":robot_face:"],
  90553. "category": "people"
  90554. },
  90555. ":rocket:": {
  90556. "uc_base": "1f680",
  90557. "uc_output": "1f680",
  90558. "uc_match": "1f680",
  90559. "uc_greedy": "1f680",
  90560. "shortnames": [],
  90561. "category": "travel"
  90562. },
  90563. ":rofl:": {
  90564. "uc_base": "1f923",
  90565. "uc_output": "1f923",
  90566. "uc_match": "1f923",
  90567. "uc_greedy": "1f923",
  90568. "shortnames": [":rolling_on_the_floor_laughing:"],
  90569. "category": "people"
  90570. },
  90571. ":roller_coaster:": {
  90572. "uc_base": "1f3a2",
  90573. "uc_output": "1f3a2",
  90574. "uc_match": "1f3a2",
  90575. "uc_greedy": "1f3a2",
  90576. "shortnames": [],
  90577. "category": "travel"
  90578. },
  90579. ":rolling_eyes:": {
  90580. "uc_base": "1f644",
  90581. "uc_output": "1f644",
  90582. "uc_match": "1f644",
  90583. "uc_greedy": "1f644",
  90584. "shortnames": [":face_with_rolling_eyes:"],
  90585. "category": "people"
  90586. },
  90587. ":rooster:": {
  90588. "uc_base": "1f413",
  90589. "uc_output": "1f413",
  90590. "uc_match": "1f413",
  90591. "uc_greedy": "1f413",
  90592. "shortnames": [],
  90593. "category": "nature"
  90594. },
  90595. ":rose:": {
  90596. "uc_base": "1f339",
  90597. "uc_output": "1f339",
  90598. "uc_match": "1f339",
  90599. "uc_greedy": "1f339",
  90600. "shortnames": [],
  90601. "category": "nature"
  90602. },
  90603. ":rosette:": {
  90604. "uc_base": "1f3f5",
  90605. "uc_output": "1f3f5",
  90606. "uc_match": "1f3f5-fe0f",
  90607. "uc_greedy": "1f3f5-fe0f",
  90608. "shortnames": [],
  90609. "category": "activity"
  90610. },
  90611. ":rotating_light:": {
  90612. "uc_base": "1f6a8",
  90613. "uc_output": "1f6a8",
  90614. "uc_match": "1f6a8",
  90615. "uc_greedy": "1f6a8",
  90616. "shortnames": [],
  90617. "category": "travel"
  90618. },
  90619. ":round_pushpin:": {
  90620. "uc_base": "1f4cd",
  90621. "uc_output": "1f4cd",
  90622. "uc_match": "1f4cd",
  90623. "uc_greedy": "1f4cd",
  90624. "shortnames": [],
  90625. "category": "objects"
  90626. },
  90627. ":rugby_football:": {
  90628. "uc_base": "1f3c9",
  90629. "uc_output": "1f3c9",
  90630. "uc_match": "1f3c9",
  90631. "uc_greedy": "1f3c9",
  90632. "shortnames": [],
  90633. "category": "activity"
  90634. },
  90635. ":running_shirt_with_sash:": {
  90636. "uc_base": "1f3bd",
  90637. "uc_output": "1f3bd",
  90638. "uc_match": "1f3bd",
  90639. "uc_greedy": "1f3bd",
  90640. "shortnames": [],
  90641. "category": "activity"
  90642. },
  90643. ":sa:": {
  90644. "uc_base": "1f202",
  90645. "uc_output": "1f202",
  90646. "uc_match": "1f202-fe0f",
  90647. "uc_greedy": "1f202-fe0f",
  90648. "shortnames": [],
  90649. "category": "symbols"
  90650. },
  90651. ":sake:": {
  90652. "uc_base": "1f376",
  90653. "uc_output": "1f376",
  90654. "uc_match": "1f376",
  90655. "uc_greedy": "1f376",
  90656. "shortnames": [],
  90657. "category": "food"
  90658. },
  90659. ":salad:": {
  90660. "uc_base": "1f957",
  90661. "uc_output": "1f957",
  90662. "uc_match": "1f957",
  90663. "uc_greedy": "1f957",
  90664. "shortnames": [":green_salad:"],
  90665. "category": "food"
  90666. },
  90667. ":sandal:": {
  90668. "uc_base": "1f461",
  90669. "uc_output": "1f461",
  90670. "uc_match": "1f461",
  90671. "uc_greedy": "1f461",
  90672. "shortnames": [],
  90673. "category": "people"
  90674. },
  90675. ":sandwich:": {
  90676. "uc_base": "1f96a",
  90677. "uc_output": "1f96a",
  90678. "uc_match": "1f96a",
  90679. "uc_greedy": "1f96a",
  90680. "shortnames": [],
  90681. "category": "food"
  90682. },
  90683. ":santa:": {
  90684. "uc_base": "1f385",
  90685. "uc_output": "1f385",
  90686. "uc_match": "1f385",
  90687. "uc_greedy": "1f385",
  90688. "shortnames": [],
  90689. "category": "people"
  90690. },
  90691. ":satellite:": {
  90692. "uc_base": "1f4e1",
  90693. "uc_output": "1f4e1",
  90694. "uc_match": "1f4e1",
  90695. "uc_greedy": "1f4e1",
  90696. "shortnames": [],
  90697. "category": "objects"
  90698. },
  90699. ":satellite_orbital:": {
  90700. "uc_base": "1f6f0",
  90701. "uc_output": "1f6f0",
  90702. "uc_match": "1f6f0-fe0f",
  90703. "uc_greedy": "1f6f0-fe0f",
  90704. "shortnames": [],
  90705. "category": "travel"
  90706. },
  90707. ":sauropod:": {
  90708. "uc_base": "1f995",
  90709. "uc_output": "1f995",
  90710. "uc_match": "1f995",
  90711. "uc_greedy": "1f995",
  90712. "shortnames": [],
  90713. "category": "nature"
  90714. },
  90715. ":saxophone:": {
  90716. "uc_base": "1f3b7",
  90717. "uc_output": "1f3b7",
  90718. "uc_match": "1f3b7",
  90719. "uc_greedy": "1f3b7",
  90720. "shortnames": [],
  90721. "category": "activity"
  90722. },
  90723. ":scarf:": {
  90724. "uc_base": "1f9e3",
  90725. "uc_output": "1f9e3",
  90726. "uc_match": "1f9e3",
  90727. "uc_greedy": "1f9e3",
  90728. "shortnames": [],
  90729. "category": "people"
  90730. },
  90731. ":school:": {
  90732. "uc_base": "1f3eb",
  90733. "uc_output": "1f3eb",
  90734. "uc_match": "1f3eb",
  90735. "uc_greedy": "1f3eb",
  90736. "shortnames": [],
  90737. "category": "travel"
  90738. },
  90739. ":school_satchel:": {
  90740. "uc_base": "1f392",
  90741. "uc_output": "1f392",
  90742. "uc_match": "1f392",
  90743. "uc_greedy": "1f392",
  90744. "shortnames": [],
  90745. "category": "people"
  90746. },
  90747. ":scooter:": {
  90748. "uc_base": "1f6f4",
  90749. "uc_output": "1f6f4",
  90750. "uc_match": "1f6f4",
  90751. "uc_greedy": "1f6f4",
  90752. "shortnames": [],
  90753. "category": "travel"
  90754. },
  90755. ":scorpion:": {
  90756. "uc_base": "1f982",
  90757. "uc_output": "1f982",
  90758. "uc_match": "1f982",
  90759. "uc_greedy": "1f982",
  90760. "shortnames": [],
  90761. "category": "nature"
  90762. },
  90763. ":scream:": {
  90764. "uc_base": "1f631",
  90765. "uc_output": "1f631",
  90766. "uc_match": "1f631",
  90767. "uc_greedy": "1f631",
  90768. "shortnames": [],
  90769. "category": "people"
  90770. },
  90771. ":scream_cat:": {
  90772. "uc_base": "1f640",
  90773. "uc_output": "1f640",
  90774. "uc_match": "1f640",
  90775. "uc_greedy": "1f640",
  90776. "shortnames": [],
  90777. "category": "people"
  90778. },
  90779. ":scroll:": {
  90780. "uc_base": "1f4dc",
  90781. "uc_output": "1f4dc",
  90782. "uc_match": "1f4dc",
  90783. "uc_greedy": "1f4dc",
  90784. "shortnames": [],
  90785. "category": "objects"
  90786. },
  90787. ":seat:": {
  90788. "uc_base": "1f4ba",
  90789. "uc_output": "1f4ba",
  90790. "uc_match": "1f4ba",
  90791. "uc_greedy": "1f4ba",
  90792. "shortnames": [],
  90793. "category": "travel"
  90794. },
  90795. ":second_place:": {
  90796. "uc_base": "1f948",
  90797. "uc_output": "1f948",
  90798. "uc_match": "1f948",
  90799. "uc_greedy": "1f948",
  90800. "shortnames": [":second_place_medal:"],
  90801. "category": "activity"
  90802. },
  90803. ":see_no_evil:": {
  90804. "uc_base": "1f648",
  90805. "uc_output": "1f648",
  90806. "uc_match": "1f648",
  90807. "uc_greedy": "1f648",
  90808. "shortnames": [],
  90809. "category": "nature"
  90810. },
  90811. ":seedling:": {
  90812. "uc_base": "1f331",
  90813. "uc_output": "1f331",
  90814. "uc_match": "1f331",
  90815. "uc_greedy": "1f331",
  90816. "shortnames": [],
  90817. "category": "nature"
  90818. },
  90819. ":selfie:": {
  90820. "uc_base": "1f933",
  90821. "uc_output": "1f933",
  90822. "uc_match": "1f933",
  90823. "uc_greedy": "1f933",
  90824. "shortnames": [],
  90825. "category": "people"
  90826. },
  90827. ":shallow_pan_of_food:": {
  90828. "uc_base": "1f958",
  90829. "uc_output": "1f958",
  90830. "uc_match": "1f958",
  90831. "uc_greedy": "1f958",
  90832. "shortnames": [":paella:"],
  90833. "category": "food"
  90834. },
  90835. ":shark:": {
  90836. "uc_base": "1f988",
  90837. "uc_output": "1f988",
  90838. "uc_match": "1f988",
  90839. "uc_greedy": "1f988",
  90840. "shortnames": [],
  90841. "category": "nature"
  90842. },
  90843. ":shaved_ice:": {
  90844. "uc_base": "1f367",
  90845. "uc_output": "1f367",
  90846. "uc_match": "1f367",
  90847. "uc_greedy": "1f367",
  90848. "shortnames": [],
  90849. "category": "food"
  90850. },
  90851. ":sheep:": {
  90852. "uc_base": "1f411",
  90853. "uc_output": "1f411",
  90854. "uc_match": "1f411",
  90855. "uc_greedy": "1f411",
  90856. "shortnames": [],
  90857. "category": "nature"
  90858. },
  90859. ":shell:": {
  90860. "uc_base": "1f41a",
  90861. "uc_output": "1f41a",
  90862. "uc_match": "1f41a",
  90863. "uc_greedy": "1f41a",
  90864. "shortnames": [],
  90865. "category": "nature"
  90866. },
  90867. ":shield:": {
  90868. "uc_base": "1f6e1",
  90869. "uc_output": "1f6e1",
  90870. "uc_match": "1f6e1-fe0f",
  90871. "uc_greedy": "1f6e1-fe0f",
  90872. "shortnames": [],
  90873. "category": "objects"
  90874. },
  90875. ":ship:": {
  90876. "uc_base": "1f6a2",
  90877. "uc_output": "1f6a2",
  90878. "uc_match": "1f6a2",
  90879. "uc_greedy": "1f6a2",
  90880. "shortnames": [],
  90881. "category": "travel"
  90882. },
  90883. ":shirt:": {
  90884. "uc_base": "1f455",
  90885. "uc_output": "1f455",
  90886. "uc_match": "1f455",
  90887. "uc_greedy": "1f455",
  90888. "shortnames": [],
  90889. "category": "people"
  90890. },
  90891. ":shopping_bags:": {
  90892. "uc_base": "1f6cd",
  90893. "uc_output": "1f6cd",
  90894. "uc_match": "1f6cd-fe0f",
  90895. "uc_greedy": "1f6cd-fe0f",
  90896. "shortnames": [],
  90897. "category": "objects"
  90898. },
  90899. ":shopping_cart:": {
  90900. "uc_base": "1f6d2",
  90901. "uc_output": "1f6d2",
  90902. "uc_match": "1f6d2",
  90903. "uc_greedy": "1f6d2",
  90904. "shortnames": [":shopping_trolley:"],
  90905. "category": "objects"
  90906. },
  90907. ":shower:": {
  90908. "uc_base": "1f6bf",
  90909. "uc_output": "1f6bf",
  90910. "uc_match": "1f6bf",
  90911. "uc_greedy": "1f6bf",
  90912. "shortnames": [],
  90913. "category": "objects"
  90914. },
  90915. ":shrimp:": {
  90916. "uc_base": "1f990",
  90917. "uc_output": "1f990",
  90918. "uc_match": "1f990",
  90919. "uc_greedy": "1f990",
  90920. "shortnames": [],
  90921. "category": "nature"
  90922. },
  90923. ":shushing_face:": {
  90924. "uc_base": "1f92b",
  90925. "uc_output": "1f92b",
  90926. "uc_match": "1f92b",
  90927. "uc_greedy": "1f92b",
  90928. "shortnames": [],
  90929. "category": "people"
  90930. },
  90931. ":signal_strength:": {
  90932. "uc_base": "1f4f6",
  90933. "uc_output": "1f4f6",
  90934. "uc_match": "1f4f6",
  90935. "uc_greedy": "1f4f6",
  90936. "shortnames": [],
  90937. "category": "symbols"
  90938. },
  90939. ":six_pointed_star:": {
  90940. "uc_base": "1f52f",
  90941. "uc_output": "1f52f",
  90942. "uc_match": "1f52f",
  90943. "uc_greedy": "1f52f",
  90944. "shortnames": [],
  90945. "category": "symbols"
  90946. },
  90947. ":ski:": {
  90948. "uc_base": "1f3bf",
  90949. "uc_output": "1f3bf",
  90950. "uc_match": "1f3bf",
  90951. "uc_greedy": "1f3bf",
  90952. "shortnames": [],
  90953. "category": "activity"
  90954. },
  90955. ":skull:": {
  90956. "uc_base": "1f480",
  90957. "uc_output": "1f480",
  90958. "uc_match": "1f480",
  90959. "uc_greedy": "1f480",
  90960. "shortnames": [":skeleton:"],
  90961. "category": "people"
  90962. },
  90963. ":sled:": {
  90964. "uc_base": "1f6f7",
  90965. "uc_output": "1f6f7",
  90966. "uc_match": "1f6f7",
  90967. "uc_greedy": "1f6f7",
  90968. "shortnames": [],
  90969. "category": "activity"
  90970. },
  90971. ":sleeping:": {
  90972. "uc_base": "1f634",
  90973. "uc_output": "1f634",
  90974. "uc_match": "1f634",
  90975. "uc_greedy": "1f634",
  90976. "shortnames": [],
  90977. "category": "people"
  90978. },
  90979. ":sleeping_accommodation:": {
  90980. "uc_base": "1f6cc",
  90981. "uc_output": "1f6cc",
  90982. "uc_match": "1f6cc",
  90983. "uc_greedy": "1f6cc",
  90984. "shortnames": [],
  90985. "category": "objects"
  90986. },
  90987. ":sleepy:": {
  90988. "uc_base": "1f62a",
  90989. "uc_output": "1f62a",
  90990. "uc_match": "1f62a",
  90991. "uc_greedy": "1f62a",
  90992. "shortnames": [],
  90993. "category": "people"
  90994. },
  90995. ":slight_frown:": {
  90996. "uc_base": "1f641",
  90997. "uc_output": "1f641",
  90998. "uc_match": "1f641",
  90999. "uc_greedy": "1f641",
  91000. "shortnames": [":slightly_frowning_face:"],
  91001. "category": "people"
  91002. },
  91003. ":slight_smile:": {
  91004. "uc_base": "1f642",
  91005. "uc_output": "1f642",
  91006. "uc_match": "1f642",
  91007. "uc_greedy": "1f642",
  91008. "shortnames": [":slightly_smiling_face:"],
  91009. "category": "people"
  91010. },
  91011. ":slot_machine:": {
  91012. "uc_base": "1f3b0",
  91013. "uc_output": "1f3b0",
  91014. "uc_match": "1f3b0",
  91015. "uc_greedy": "1f3b0",
  91016. "shortnames": [],
  91017. "category": "activity"
  91018. },
  91019. ":small_blue_diamond:": {
  91020. "uc_base": "1f539",
  91021. "uc_output": "1f539",
  91022. "uc_match": "1f539",
  91023. "uc_greedy": "1f539",
  91024. "shortnames": [],
  91025. "category": "symbols"
  91026. },
  91027. ":small_orange_diamond:": {
  91028. "uc_base": "1f538",
  91029. "uc_output": "1f538",
  91030. "uc_match": "1f538",
  91031. "uc_greedy": "1f538",
  91032. "shortnames": [],
  91033. "category": "symbols"
  91034. },
  91035. ":small_red_triangle:": {
  91036. "uc_base": "1f53a",
  91037. "uc_output": "1f53a",
  91038. "uc_match": "1f53a",
  91039. "uc_greedy": "1f53a",
  91040. "shortnames": [],
  91041. "category": "symbols"
  91042. },
  91043. ":small_red_triangle_down:": {
  91044. "uc_base": "1f53b",
  91045. "uc_output": "1f53b",
  91046. "uc_match": "1f53b",
  91047. "uc_greedy": "1f53b",
  91048. "shortnames": [],
  91049. "category": "symbols"
  91050. },
  91051. ":smile:": {
  91052. "uc_base": "1f604",
  91053. "uc_output": "1f604",
  91054. "uc_match": "1f604",
  91055. "uc_greedy": "1f604",
  91056. "shortnames": [],
  91057. "category": "people"
  91058. },
  91059. ":smile_cat:": {
  91060. "uc_base": "1f638",
  91061. "uc_output": "1f638",
  91062. "uc_match": "1f638",
  91063. "uc_greedy": "1f638",
  91064. "shortnames": [],
  91065. "category": "people"
  91066. },
  91067. ":smiley:": {
  91068. "uc_base": "1f603",
  91069. "uc_output": "1f603",
  91070. "uc_match": "1f603",
  91071. "uc_greedy": "1f603",
  91072. "shortnames": [],
  91073. "category": "people"
  91074. },
  91075. ":smiley_cat:": {
  91076. "uc_base": "1f63a",
  91077. "uc_output": "1f63a",
  91078. "uc_match": "1f63a",
  91079. "uc_greedy": "1f63a",
  91080. "shortnames": [],
  91081. "category": "people"
  91082. },
  91083. ":smiling_imp:": {
  91084. "uc_base": "1f608",
  91085. "uc_output": "1f608",
  91086. "uc_match": "1f608",
  91087. "uc_greedy": "1f608",
  91088. "shortnames": [],
  91089. "category": "people"
  91090. },
  91091. ":smirk:": {
  91092. "uc_base": "1f60f",
  91093. "uc_output": "1f60f",
  91094. "uc_match": "1f60f",
  91095. "uc_greedy": "1f60f",
  91096. "shortnames": [],
  91097. "category": "people"
  91098. },
  91099. ":smirk_cat:": {
  91100. "uc_base": "1f63c",
  91101. "uc_output": "1f63c",
  91102. "uc_match": "1f63c",
  91103. "uc_greedy": "1f63c",
  91104. "shortnames": [],
  91105. "category": "people"
  91106. },
  91107. ":smoking:": {
  91108. "uc_base": "1f6ac",
  91109. "uc_output": "1f6ac",
  91110. "uc_match": "1f6ac",
  91111. "uc_greedy": "1f6ac",
  91112. "shortnames": [],
  91113. "category": "objects"
  91114. },
  91115. ":snail:": {
  91116. "uc_base": "1f40c",
  91117. "uc_output": "1f40c",
  91118. "uc_match": "1f40c",
  91119. "uc_greedy": "1f40c",
  91120. "shortnames": [],
  91121. "category": "nature"
  91122. },
  91123. ":snake:": {
  91124. "uc_base": "1f40d",
  91125. "uc_output": "1f40d",
  91126. "uc_match": "1f40d",
  91127. "uc_greedy": "1f40d",
  91128. "shortnames": [],
  91129. "category": "nature"
  91130. },
  91131. ":sneezing_face:": {
  91132. "uc_base": "1f927",
  91133. "uc_output": "1f927",
  91134. "uc_match": "1f927",
  91135. "uc_greedy": "1f927",
  91136. "shortnames": [":sneeze:"],
  91137. "category": "people"
  91138. },
  91139. ":snowboarder:": {
  91140. "uc_base": "1f3c2",
  91141. "uc_output": "1f3c2",
  91142. "uc_match": "1f3c2-fe0f",
  91143. "uc_greedy": "1f3c2-fe0f",
  91144. "shortnames": [],
  91145. "category": "activity"
  91146. },
  91147. ":sob:": {
  91148. "uc_base": "1f62d",
  91149. "uc_output": "1f62d",
  91150. "uc_match": "1f62d",
  91151. "uc_greedy": "1f62d",
  91152. "shortnames": [],
  91153. "category": "people"
  91154. },
  91155. ":socks:": {
  91156. "uc_base": "1f9e6",
  91157. "uc_output": "1f9e6",
  91158. "uc_match": "1f9e6",
  91159. "uc_greedy": "1f9e6",
  91160. "shortnames": [],
  91161. "category": "people"
  91162. },
  91163. ":soon:": {
  91164. "uc_base": "1f51c",
  91165. "uc_output": "1f51c",
  91166. "uc_match": "1f51c",
  91167. "uc_greedy": "1f51c",
  91168. "shortnames": [],
  91169. "category": "symbols"
  91170. },
  91171. ":sos:": {
  91172. "uc_base": "1f198",
  91173. "uc_output": "1f198",
  91174. "uc_match": "1f198",
  91175. "uc_greedy": "1f198",
  91176. "shortnames": [],
  91177. "category": "symbols"
  91178. },
  91179. ":sound:": {
  91180. "uc_base": "1f509",
  91181. "uc_output": "1f509",
  91182. "uc_match": "1f509",
  91183. "uc_greedy": "1f509",
  91184. "shortnames": [],
  91185. "category": "symbols"
  91186. },
  91187. ":space_invader:": {
  91188. "uc_base": "1f47e",
  91189. "uc_output": "1f47e",
  91190. "uc_match": "1f47e",
  91191. "uc_greedy": "1f47e",
  91192. "shortnames": [],
  91193. "category": "people"
  91194. },
  91195. ":spaghetti:": {
  91196. "uc_base": "1f35d",
  91197. "uc_output": "1f35d",
  91198. "uc_match": "1f35d",
  91199. "uc_greedy": "1f35d",
  91200. "shortnames": [],
  91201. "category": "food"
  91202. },
  91203. ":sparkler:": {
  91204. "uc_base": "1f387",
  91205. "uc_output": "1f387",
  91206. "uc_match": "1f387",
  91207. "uc_greedy": "1f387",
  91208. "shortnames": [],
  91209. "category": "travel"
  91210. },
  91211. ":sparkling_heart:": {
  91212. "uc_base": "1f496",
  91213. "uc_output": "1f496",
  91214. "uc_match": "1f496",
  91215. "uc_greedy": "1f496",
  91216. "shortnames": [],
  91217. "category": "symbols"
  91218. },
  91219. ":speak_no_evil:": {
  91220. "uc_base": "1f64a",
  91221. "uc_output": "1f64a",
  91222. "uc_match": "1f64a",
  91223. "uc_greedy": "1f64a",
  91224. "shortnames": [],
  91225. "category": "nature"
  91226. },
  91227. ":speaker:": {
  91228. "uc_base": "1f508",
  91229. "uc_output": "1f508",
  91230. "uc_match": "1f508-fe0f",
  91231. "uc_greedy": "1f508-fe0f",
  91232. "shortnames": [],
  91233. "category": "symbols"
  91234. },
  91235. ":speaking_head:": {
  91236. "uc_base": "1f5e3",
  91237. "uc_output": "1f5e3",
  91238. "uc_match": "1f5e3-fe0f",
  91239. "uc_greedy": "1f5e3-fe0f",
  91240. "shortnames": [":speaking_head_in_silhouette:"],
  91241. "category": "people"
  91242. },
  91243. ":speech_balloon:": {
  91244. "uc_base": "1f4ac",
  91245. "uc_output": "1f4ac",
  91246. "uc_match": "1f4ac",
  91247. "uc_greedy": "1f4ac",
  91248. "shortnames": [],
  91249. "category": "symbols"
  91250. },
  91251. ":speech_left:": {
  91252. "uc_base": "1f5e8",
  91253. "uc_output": "1f5e8",
  91254. "uc_match": "1f5e8-fe0f",
  91255. "uc_greedy": "1f5e8-fe0f",
  91256. "shortnames": [":left_speech_bubble:"],
  91257. "category": "symbols"
  91258. },
  91259. ":speedboat:": {
  91260. "uc_base": "1f6a4",
  91261. "uc_output": "1f6a4",
  91262. "uc_match": "1f6a4",
  91263. "uc_greedy": "1f6a4",
  91264. "shortnames": [],
  91265. "category": "travel"
  91266. },
  91267. ":spider:": {
  91268. "uc_base": "1f577",
  91269. "uc_output": "1f577",
  91270. "uc_match": "1f577-fe0f",
  91271. "uc_greedy": "1f577-fe0f",
  91272. "shortnames": [],
  91273. "category": "nature"
  91274. },
  91275. ":spider_web:": {
  91276. "uc_base": "1f578",
  91277. "uc_output": "1f578",
  91278. "uc_match": "1f578-fe0f",
  91279. "uc_greedy": "1f578-fe0f",
  91280. "shortnames": [],
  91281. "category": "nature"
  91282. },
  91283. ":spoon:": {
  91284. "uc_base": "1f944",
  91285. "uc_output": "1f944",
  91286. "uc_match": "1f944",
  91287. "uc_greedy": "1f944",
  91288. "shortnames": [],
  91289. "category": "food"
  91290. },
  91291. ":squid:": {
  91292. "uc_base": "1f991",
  91293. "uc_output": "1f991",
  91294. "uc_match": "1f991",
  91295. "uc_greedy": "1f991",
  91296. "shortnames": [],
  91297. "category": "nature"
  91298. },
  91299. ":stadium:": {
  91300. "uc_base": "1f3df",
  91301. "uc_output": "1f3df",
  91302. "uc_match": "1f3df-fe0f",
  91303. "uc_greedy": "1f3df-fe0f",
  91304. "shortnames": [],
  91305. "category": "travel"
  91306. },
  91307. ":star2:": {
  91308. "uc_base": "1f31f",
  91309. "uc_output": "1f31f",
  91310. "uc_match": "1f31f",
  91311. "uc_greedy": "1f31f",
  91312. "shortnames": [],
  91313. "category": "nature"
  91314. },
  91315. ":star_struck:": {
  91316. "uc_base": "1f929",
  91317. "uc_output": "1f929",
  91318. "uc_match": "1f929",
  91319. "uc_greedy": "1f929",
  91320. "shortnames": [],
  91321. "category": "people"
  91322. },
  91323. ":stars:": {
  91324. "uc_base": "1f320",
  91325. "uc_output": "1f320",
  91326. "uc_match": "1f320",
  91327. "uc_greedy": "1f320",
  91328. "shortnames": [],
  91329. "category": "travel"
  91330. },
  91331. ":station:": {
  91332. "uc_base": "1f689",
  91333. "uc_output": "1f689",
  91334. "uc_match": "1f689",
  91335. "uc_greedy": "1f689",
  91336. "shortnames": [],
  91337. "category": "travel"
  91338. },
  91339. ":statue_of_liberty:": {
  91340. "uc_base": "1f5fd",
  91341. "uc_output": "1f5fd",
  91342. "uc_match": "1f5fd",
  91343. "uc_greedy": "1f5fd",
  91344. "shortnames": [],
  91345. "category": "travel"
  91346. },
  91347. ":steam_locomotive:": {
  91348. "uc_base": "1f682",
  91349. "uc_output": "1f682",
  91350. "uc_match": "1f682",
  91351. "uc_greedy": "1f682",
  91352. "shortnames": [],
  91353. "category": "travel"
  91354. },
  91355. ":stew:": {
  91356. "uc_base": "1f372",
  91357. "uc_output": "1f372",
  91358. "uc_match": "1f372",
  91359. "uc_greedy": "1f372",
  91360. "shortnames": [],
  91361. "category": "food"
  91362. },
  91363. ":straight_ruler:": {
  91364. "uc_base": "1f4cf",
  91365. "uc_output": "1f4cf",
  91366. "uc_match": "1f4cf",
  91367. "uc_greedy": "1f4cf",
  91368. "shortnames": [],
  91369. "category": "objects"
  91370. },
  91371. ":strawberry:": {
  91372. "uc_base": "1f353",
  91373. "uc_output": "1f353",
  91374. "uc_match": "1f353",
  91375. "uc_greedy": "1f353",
  91376. "shortnames": [],
  91377. "category": "food"
  91378. },
  91379. ":stuck_out_tongue:": {
  91380. "uc_base": "1f61b",
  91381. "uc_output": "1f61b",
  91382. "uc_match": "1f61b",
  91383. "uc_greedy": "1f61b",
  91384. "shortnames": [],
  91385. "category": "people"
  91386. },
  91387. ":stuck_out_tongue_closed_eyes:": {
  91388. "uc_base": "1f61d",
  91389. "uc_output": "1f61d",
  91390. "uc_match": "1f61d",
  91391. "uc_greedy": "1f61d",
  91392. "shortnames": [],
  91393. "category": "people"
  91394. },
  91395. ":stuck_out_tongue_winking_eye:": {
  91396. "uc_base": "1f61c",
  91397. "uc_output": "1f61c",
  91398. "uc_match": "1f61c",
  91399. "uc_greedy": "1f61c",
  91400. "shortnames": [],
  91401. "category": "people"
  91402. },
  91403. ":stuffed_flatbread:": {
  91404. "uc_base": "1f959",
  91405. "uc_output": "1f959",
  91406. "uc_match": "1f959",
  91407. "uc_greedy": "1f959",
  91408. "shortnames": [":stuffed_pita:"],
  91409. "category": "food"
  91410. },
  91411. ":sun_with_face:": {
  91412. "uc_base": "1f31e",
  91413. "uc_output": "1f31e",
  91414. "uc_match": "1f31e",
  91415. "uc_greedy": "1f31e",
  91416. "shortnames": [],
  91417. "category": "nature"
  91418. },
  91419. ":sunflower:": {
  91420. "uc_base": "1f33b",
  91421. "uc_output": "1f33b",
  91422. "uc_match": "1f33b",
  91423. "uc_greedy": "1f33b",
  91424. "shortnames": [],
  91425. "category": "nature"
  91426. },
  91427. ":sunglasses:": {
  91428. "uc_base": "1f60e",
  91429. "uc_output": "1f60e",
  91430. "uc_match": "1f60e",
  91431. "uc_greedy": "1f60e",
  91432. "shortnames": [],
  91433. "category": "people"
  91434. },
  91435. ":sunrise:": {
  91436. "uc_base": "1f305",
  91437. "uc_output": "1f305",
  91438. "uc_match": "1f305",
  91439. "uc_greedy": "1f305",
  91440. "shortnames": [],
  91441. "category": "travel"
  91442. },
  91443. ":sunrise_over_mountains:": {
  91444. "uc_base": "1f304",
  91445. "uc_output": "1f304",
  91446. "uc_match": "1f304",
  91447. "uc_greedy": "1f304",
  91448. "shortnames": [],
  91449. "category": "travel"
  91450. },
  91451. ":sushi:": {
  91452. "uc_base": "1f363",
  91453. "uc_output": "1f363",
  91454. "uc_match": "1f363",
  91455. "uc_greedy": "1f363",
  91456. "shortnames": [],
  91457. "category": "food"
  91458. },
  91459. ":suspension_railway:": {
  91460. "uc_base": "1f69f",
  91461. "uc_output": "1f69f",
  91462. "uc_match": "1f69f",
  91463. "uc_greedy": "1f69f",
  91464. "shortnames": [],
  91465. "category": "travel"
  91466. },
  91467. ":sweat:": {
  91468. "uc_base": "1f613",
  91469. "uc_output": "1f613",
  91470. "uc_match": "1f613",
  91471. "uc_greedy": "1f613",
  91472. "shortnames": [],
  91473. "category": "people"
  91474. },
  91475. ":sweat_drops:": {
  91476. "uc_base": "1f4a6",
  91477. "uc_output": "1f4a6",
  91478. "uc_match": "1f4a6",
  91479. "uc_greedy": "1f4a6",
  91480. "shortnames": [],
  91481. "category": "nature"
  91482. },
  91483. ":sweat_smile:": {
  91484. "uc_base": "1f605",
  91485. "uc_output": "1f605",
  91486. "uc_match": "1f605",
  91487. "uc_greedy": "1f605",
  91488. "shortnames": [],
  91489. "category": "people"
  91490. },
  91491. ":sweet_potato:": {
  91492. "uc_base": "1f360",
  91493. "uc_output": "1f360",
  91494. "uc_match": "1f360",
  91495. "uc_greedy": "1f360",
  91496. "shortnames": [],
  91497. "category": "food"
  91498. },
  91499. ":symbols:": {
  91500. "uc_base": "1f523",
  91501. "uc_output": "1f523",
  91502. "uc_match": "1f523",
  91503. "uc_greedy": "1f523",
  91504. "shortnames": [],
  91505. "category": "symbols"
  91506. },
  91507. ":synagogue:": {
  91508. "uc_base": "1f54d",
  91509. "uc_output": "1f54d",
  91510. "uc_match": "1f54d",
  91511. "uc_greedy": "1f54d",
  91512. "shortnames": [],
  91513. "category": "travel"
  91514. },
  91515. ":syringe:": {
  91516. "uc_base": "1f489",
  91517. "uc_output": "1f489",
  91518. "uc_match": "1f489",
  91519. "uc_greedy": "1f489",
  91520. "shortnames": [],
  91521. "category": "objects"
  91522. },
  91523. ":t_rex:": {
  91524. "uc_base": "1f996",
  91525. "uc_output": "1f996",
  91526. "uc_match": "1f996",
  91527. "uc_greedy": "1f996",
  91528. "shortnames": [],
  91529. "category": "nature"
  91530. },
  91531. ":taco:": {
  91532. "uc_base": "1f32e",
  91533. "uc_output": "1f32e",
  91534. "uc_match": "1f32e",
  91535. "uc_greedy": "1f32e",
  91536. "shortnames": [],
  91537. "category": "food"
  91538. },
  91539. ":tada:": {
  91540. "uc_base": "1f389",
  91541. "uc_output": "1f389",
  91542. "uc_match": "1f389",
  91543. "uc_greedy": "1f389",
  91544. "shortnames": [],
  91545. "category": "objects"
  91546. },
  91547. ":takeout_box:": {
  91548. "uc_base": "1f961",
  91549. "uc_output": "1f961",
  91550. "uc_match": "1f961",
  91551. "uc_greedy": "1f961",
  91552. "shortnames": [],
  91553. "category": "food"
  91554. },
  91555. ":tanabata_tree:": {
  91556. "uc_base": "1f38b",
  91557. "uc_output": "1f38b",
  91558. "uc_match": "1f38b",
  91559. "uc_greedy": "1f38b",
  91560. "shortnames": [],
  91561. "category": "nature"
  91562. },
  91563. ":tangerine:": {
  91564. "uc_base": "1f34a",
  91565. "uc_output": "1f34a",
  91566. "uc_match": "1f34a",
  91567. "uc_greedy": "1f34a",
  91568. "shortnames": [],
  91569. "category": "food"
  91570. },
  91571. ":taxi:": {
  91572. "uc_base": "1f695",
  91573. "uc_output": "1f695",
  91574. "uc_match": "1f695",
  91575. "uc_greedy": "1f695",
  91576. "shortnames": [],
  91577. "category": "travel"
  91578. },
  91579. ":tea:": {
  91580. "uc_base": "1f375",
  91581. "uc_output": "1f375",
  91582. "uc_match": "1f375",
  91583. "uc_greedy": "1f375",
  91584. "shortnames": [],
  91585. "category": "food"
  91586. },
  91587. ":telephone_receiver:": {
  91588. "uc_base": "1f4de",
  91589. "uc_output": "1f4de",
  91590. "uc_match": "1f4de",
  91591. "uc_greedy": "1f4de",
  91592. "shortnames": [],
  91593. "category": "objects"
  91594. },
  91595. ":telescope:": {
  91596. "uc_base": "1f52d",
  91597. "uc_output": "1f52d",
  91598. "uc_match": "1f52d",
  91599. "uc_greedy": "1f52d",
  91600. "shortnames": [],
  91601. "category": "objects"
  91602. },
  91603. ":tennis:": {
  91604. "uc_base": "1f3be",
  91605. "uc_output": "1f3be",
  91606. "uc_match": "1f3be",
  91607. "uc_greedy": "1f3be",
  91608. "shortnames": [],
  91609. "category": "activity"
  91610. },
  91611. ":thermometer:": {
  91612. "uc_base": "1f321",
  91613. "uc_output": "1f321",
  91614. "uc_match": "1f321-fe0f",
  91615. "uc_greedy": "1f321-fe0f",
  91616. "shortnames": [],
  91617. "category": "objects"
  91618. },
  91619. ":thermometer_face:": {
  91620. "uc_base": "1f912",
  91621. "uc_output": "1f912",
  91622. "uc_match": "1f912",
  91623. "uc_greedy": "1f912",
  91624. "shortnames": [":face_with_thermometer:"],
  91625. "category": "people"
  91626. },
  91627. ":thinking:": {
  91628. "uc_base": "1f914",
  91629. "uc_output": "1f914",
  91630. "uc_match": "1f914",
  91631. "uc_greedy": "1f914",
  91632. "shortnames": [":thinking_face:"],
  91633. "category": "people"
  91634. },
  91635. ":third_place:": {
  91636. "uc_base": "1f949",
  91637. "uc_output": "1f949",
  91638. "uc_match": "1f949",
  91639. "uc_greedy": "1f949",
  91640. "shortnames": [":third_place_medal:"],
  91641. "category": "activity"
  91642. },
  91643. ":thought_balloon:": {
  91644. "uc_base": "1f4ad",
  91645. "uc_output": "1f4ad",
  91646. "uc_match": "1f4ad",
  91647. "uc_greedy": "1f4ad",
  91648. "shortnames": [],
  91649. "category": "symbols"
  91650. },
  91651. ":thumbsdown:": {
  91652. "uc_base": "1f44e",
  91653. "uc_output": "1f44e",
  91654. "uc_match": "1f44e-fe0f",
  91655. "uc_greedy": "1f44e-fe0f",
  91656. "shortnames": [":-1:", ":thumbdown:"],
  91657. "category": "people"
  91658. },
  91659. ":thumbsup:": {
  91660. "uc_base": "1f44d",
  91661. "uc_output": "1f44d",
  91662. "uc_match": "1f44d-fe0f",
  91663. "uc_greedy": "1f44d-fe0f",
  91664. "shortnames": [":+1:", ":thumbup:"],
  91665. "category": "people"
  91666. },
  91667. ":ticket:": {
  91668. "uc_base": "1f3ab",
  91669. "uc_output": "1f3ab",
  91670. "uc_match": "1f3ab",
  91671. "uc_greedy": "1f3ab",
  91672. "shortnames": [],
  91673. "category": "activity"
  91674. },
  91675. ":tickets:": {
  91676. "uc_base": "1f39f",
  91677. "uc_output": "1f39f",
  91678. "uc_match": "1f39f-fe0f",
  91679. "uc_greedy": "1f39f-fe0f",
  91680. "shortnames": [":admission_tickets:"],
  91681. "category": "activity"
  91682. },
  91683. ":tiger2:": {
  91684. "uc_base": "1f405",
  91685. "uc_output": "1f405",
  91686. "uc_match": "1f405",
  91687. "uc_greedy": "1f405",
  91688. "shortnames": [],
  91689. "category": "nature"
  91690. },
  91691. ":tiger:": {
  91692. "uc_base": "1f42f",
  91693. "uc_output": "1f42f",
  91694. "uc_match": "1f42f",
  91695. "uc_greedy": "1f42f",
  91696. "shortnames": [],
  91697. "category": "nature"
  91698. },
  91699. ":tired_face:": {
  91700. "uc_base": "1f62b",
  91701. "uc_output": "1f62b",
  91702. "uc_match": "1f62b",
  91703. "uc_greedy": "1f62b",
  91704. "shortnames": [],
  91705. "category": "people"
  91706. },
  91707. ":toilet:": {
  91708. "uc_base": "1f6bd",
  91709. "uc_output": "1f6bd",
  91710. "uc_match": "1f6bd",
  91711. "uc_greedy": "1f6bd",
  91712. "shortnames": [],
  91713. "category": "objects"
  91714. },
  91715. ":tokyo_tower:": {
  91716. "uc_base": "1f5fc",
  91717. "uc_output": "1f5fc",
  91718. "uc_match": "1f5fc",
  91719. "uc_greedy": "1f5fc",
  91720. "shortnames": [],
  91721. "category": "travel"
  91722. },
  91723. ":tomato:": {
  91724. "uc_base": "1f345",
  91725. "uc_output": "1f345",
  91726. "uc_match": "1f345",
  91727. "uc_greedy": "1f345",
  91728. "shortnames": [],
  91729. "category": "food"
  91730. },
  91731. ":tone1:": {
  91732. "uc_base": "1f3fb",
  91733. "uc_output": "1f3fb",
  91734. "uc_match": "1f3fb",
  91735. "uc_greedy": "1f3fb",
  91736. "shortnames": [],
  91737. "category": "modifier"
  91738. },
  91739. ":tone2:": {
  91740. "uc_base": "1f3fc",
  91741. "uc_output": "1f3fc",
  91742. "uc_match": "1f3fc",
  91743. "uc_greedy": "1f3fc",
  91744. "shortnames": [],
  91745. "category": "modifier"
  91746. },
  91747. ":tone3:": {
  91748. "uc_base": "1f3fd",
  91749. "uc_output": "1f3fd",
  91750. "uc_match": "1f3fd",
  91751. "uc_greedy": "1f3fd",
  91752. "shortnames": [],
  91753. "category": "modifier"
  91754. },
  91755. ":tone4:": {
  91756. "uc_base": "1f3fe",
  91757. "uc_output": "1f3fe",
  91758. "uc_match": "1f3fe",
  91759. "uc_greedy": "1f3fe",
  91760. "shortnames": [],
  91761. "category": "modifier"
  91762. },
  91763. ":tone5:": {
  91764. "uc_base": "1f3ff",
  91765. "uc_output": "1f3ff",
  91766. "uc_match": "1f3ff",
  91767. "uc_greedy": "1f3ff",
  91768. "shortnames": [],
  91769. "category": "modifier"
  91770. },
  91771. ":tongue:": {
  91772. "uc_base": "1f445",
  91773. "uc_output": "1f445",
  91774. "uc_match": "1f445",
  91775. "uc_greedy": "1f445",
  91776. "shortnames": [],
  91777. "category": "people"
  91778. },
  91779. ":tools:": {
  91780. "uc_base": "1f6e0",
  91781. "uc_output": "1f6e0",
  91782. "uc_match": "1f6e0-fe0f",
  91783. "uc_greedy": "1f6e0-fe0f",
  91784. "shortnames": [":hammer_and_wrench:"],
  91785. "category": "objects"
  91786. },
  91787. ":top:": {
  91788. "uc_base": "1f51d",
  91789. "uc_output": "1f51d",
  91790. "uc_match": "1f51d",
  91791. "uc_greedy": "1f51d",
  91792. "shortnames": [],
  91793. "category": "symbols"
  91794. },
  91795. ":tophat:": {
  91796. "uc_base": "1f3a9",
  91797. "uc_output": "1f3a9",
  91798. "uc_match": "1f3a9",
  91799. "uc_greedy": "1f3a9",
  91800. "shortnames": [],
  91801. "category": "people"
  91802. },
  91803. ":trackball:": {
  91804. "uc_base": "1f5b2",
  91805. "uc_output": "1f5b2",
  91806. "uc_match": "1f5b2-fe0f",
  91807. "uc_greedy": "1f5b2-fe0f",
  91808. "shortnames": [],
  91809. "category": "objects"
  91810. },
  91811. ":tractor:": {
  91812. "uc_base": "1f69c",
  91813. "uc_output": "1f69c",
  91814. "uc_match": "1f69c",
  91815. "uc_greedy": "1f69c",
  91816. "shortnames": [],
  91817. "category": "travel"
  91818. },
  91819. ":traffic_light:": {
  91820. "uc_base": "1f6a5",
  91821. "uc_output": "1f6a5",
  91822. "uc_match": "1f6a5",
  91823. "uc_greedy": "1f6a5",
  91824. "shortnames": [],
  91825. "category": "travel"
  91826. },
  91827. ":train2:": {
  91828. "uc_base": "1f686",
  91829. "uc_output": "1f686",
  91830. "uc_match": "1f686",
  91831. "uc_greedy": "1f686",
  91832. "shortnames": [],
  91833. "category": "travel"
  91834. },
  91835. ":train:": {
  91836. "uc_base": "1f68b",
  91837. "uc_output": "1f68b",
  91838. "uc_match": "1f68b",
  91839. "uc_greedy": "1f68b",
  91840. "shortnames": [],
  91841. "category": "travel"
  91842. },
  91843. ":tram:": {
  91844. "uc_base": "1f68a",
  91845. "uc_output": "1f68a",
  91846. "uc_match": "1f68a",
  91847. "uc_greedy": "1f68a",
  91848. "shortnames": [],
  91849. "category": "travel"
  91850. },
  91851. ":triangular_flag_on_post:": {
  91852. "uc_base": "1f6a9",
  91853. "uc_output": "1f6a9",
  91854. "uc_match": "1f6a9",
  91855. "uc_greedy": "1f6a9",
  91856. "shortnames": [],
  91857. "category": "flags"
  91858. },
  91859. ":triangular_ruler:": {
  91860. "uc_base": "1f4d0",
  91861. "uc_output": "1f4d0",
  91862. "uc_match": "1f4d0",
  91863. "uc_greedy": "1f4d0",
  91864. "shortnames": [],
  91865. "category": "objects"
  91866. },
  91867. ":trident:": {
  91868. "uc_base": "1f531",
  91869. "uc_output": "1f531",
  91870. "uc_match": "1f531",
  91871. "uc_greedy": "1f531",
  91872. "shortnames": [],
  91873. "category": "symbols"
  91874. },
  91875. ":triumph:": {
  91876. "uc_base": "1f624",
  91877. "uc_output": "1f624",
  91878. "uc_match": "1f624",
  91879. "uc_greedy": "1f624",
  91880. "shortnames": [],
  91881. "category": "people"
  91882. },
  91883. ":trolleybus:": {
  91884. "uc_base": "1f68e",
  91885. "uc_output": "1f68e",
  91886. "uc_match": "1f68e",
  91887. "uc_greedy": "1f68e",
  91888. "shortnames": [],
  91889. "category": "travel"
  91890. },
  91891. ":trophy:": {
  91892. "uc_base": "1f3c6",
  91893. "uc_output": "1f3c6",
  91894. "uc_match": "1f3c6-fe0f",
  91895. "uc_greedy": "1f3c6-fe0f",
  91896. "shortnames": [],
  91897. "category": "activity"
  91898. },
  91899. ":tropical_drink:": {
  91900. "uc_base": "1f379",
  91901. "uc_output": "1f379",
  91902. "uc_match": "1f379",
  91903. "uc_greedy": "1f379",
  91904. "shortnames": [],
  91905. "category": "food"
  91906. },
  91907. ":tropical_fish:": {
  91908. "uc_base": "1f420",
  91909. "uc_output": "1f420",
  91910. "uc_match": "1f420",
  91911. "uc_greedy": "1f420",
  91912. "shortnames": [],
  91913. "category": "nature"
  91914. },
  91915. ":truck:": {
  91916. "uc_base": "1f69a",
  91917. "uc_output": "1f69a",
  91918. "uc_match": "1f69a",
  91919. "uc_greedy": "1f69a",
  91920. "shortnames": [],
  91921. "category": "travel"
  91922. },
  91923. ":trumpet:": {
  91924. "uc_base": "1f3ba",
  91925. "uc_output": "1f3ba",
  91926. "uc_match": "1f3ba",
  91927. "uc_greedy": "1f3ba",
  91928. "shortnames": [],
  91929. "category": "activity"
  91930. },
  91931. ":tulip:": {
  91932. "uc_base": "1f337",
  91933. "uc_output": "1f337",
  91934. "uc_match": "1f337",
  91935. "uc_greedy": "1f337",
  91936. "shortnames": [],
  91937. "category": "nature"
  91938. },
  91939. ":tumbler_glass:": {
  91940. "uc_base": "1f943",
  91941. "uc_output": "1f943",
  91942. "uc_match": "1f943",
  91943. "uc_greedy": "1f943",
  91944. "shortnames": [":whisky:"],
  91945. "category": "food"
  91946. },
  91947. ":turkey:": {
  91948. "uc_base": "1f983",
  91949. "uc_output": "1f983",
  91950. "uc_match": "1f983",
  91951. "uc_greedy": "1f983",
  91952. "shortnames": [],
  91953. "category": "nature"
  91954. },
  91955. ":turtle:": {
  91956. "uc_base": "1f422",
  91957. "uc_output": "1f422",
  91958. "uc_match": "1f422",
  91959. "uc_greedy": "1f422",
  91960. "shortnames": [],
  91961. "category": "nature"
  91962. },
  91963. ":tv:": {
  91964. "uc_base": "1f4fa",
  91965. "uc_output": "1f4fa",
  91966. "uc_match": "1f4fa-fe0f",
  91967. "uc_greedy": "1f4fa-fe0f",
  91968. "shortnames": [],
  91969. "category": "objects"
  91970. },
  91971. ":twisted_rightwards_arrows:": {
  91972. "uc_base": "1f500",
  91973. "uc_output": "1f500",
  91974. "uc_match": "1f500",
  91975. "uc_greedy": "1f500",
  91976. "shortnames": [],
  91977. "category": "symbols"
  91978. },
  91979. ":two_hearts:": {
  91980. "uc_base": "1f495",
  91981. "uc_output": "1f495",
  91982. "uc_match": "1f495",
  91983. "uc_greedy": "1f495",
  91984. "shortnames": [],
  91985. "category": "symbols"
  91986. },
  91987. ":two_men_holding_hands:": {
  91988. "uc_base": "1f46c",
  91989. "uc_output": "1f46c",
  91990. "uc_match": "1f46c",
  91991. "uc_greedy": "1f46c",
  91992. "shortnames": [],
  91993. "category": "people"
  91994. },
  91995. ":two_women_holding_hands:": {
  91996. "uc_base": "1f46d",
  91997. "uc_output": "1f46d",
  91998. "uc_match": "1f46d",
  91999. "uc_greedy": "1f46d",
  92000. "shortnames": [],
  92001. "category": "people"
  92002. },
  92003. ":u5272:": {
  92004. "uc_base": "1f239",
  92005. "uc_output": "1f239",
  92006. "uc_match": "1f239",
  92007. "uc_greedy": "1f239",
  92008. "shortnames": [],
  92009. "category": "symbols"
  92010. },
  92011. ":u5408:": {
  92012. "uc_base": "1f234",
  92013. "uc_output": "1f234",
  92014. "uc_match": "1f234",
  92015. "uc_greedy": "1f234",
  92016. "shortnames": [],
  92017. "category": "symbols"
  92018. },
  92019. ":u55b6:": {
  92020. "uc_base": "1f23a",
  92021. "uc_output": "1f23a",
  92022. "uc_match": "1f23a",
  92023. "uc_greedy": "1f23a",
  92024. "shortnames": [],
  92025. "category": "symbols"
  92026. },
  92027. ":u6307:": {
  92028. "uc_base": "1f22f",
  92029. "uc_output": "1f22f",
  92030. "uc_match": "1f22f-fe0f",
  92031. "uc_greedy": "1f22f-fe0f",
  92032. "shortnames": [],
  92033. "category": "symbols"
  92034. },
  92035. ":u6708:": {
  92036. "uc_base": "1f237",
  92037. "uc_output": "1f237",
  92038. "uc_match": "1f237-fe0f",
  92039. "uc_greedy": "1f237-fe0f",
  92040. "shortnames": [],
  92041. "category": "symbols"
  92042. },
  92043. ":u6709:": {
  92044. "uc_base": "1f236",
  92045. "uc_output": "1f236",
  92046. "uc_match": "1f236",
  92047. "uc_greedy": "1f236",
  92048. "shortnames": [],
  92049. "category": "symbols"
  92050. },
  92051. ":u6e80:": {
  92052. "uc_base": "1f235",
  92053. "uc_output": "1f235",
  92054. "uc_match": "1f235",
  92055. "uc_greedy": "1f235",
  92056. "shortnames": [],
  92057. "category": "symbols"
  92058. },
  92059. ":u7121:": {
  92060. "uc_base": "1f21a",
  92061. "uc_output": "1f21a",
  92062. "uc_match": "1f21a-fe0f",
  92063. "uc_greedy": "1f21a-fe0f",
  92064. "shortnames": [],
  92065. "category": "symbols"
  92066. },
  92067. ":u7533:": {
  92068. "uc_base": "1f238",
  92069. "uc_output": "1f238",
  92070. "uc_match": "1f238",
  92071. "uc_greedy": "1f238",
  92072. "shortnames": [],
  92073. "category": "symbols"
  92074. },
  92075. ":u7981:": {
  92076. "uc_base": "1f232",
  92077. "uc_output": "1f232",
  92078. "uc_match": "1f232",
  92079. "uc_greedy": "1f232",
  92080. "shortnames": [],
  92081. "category": "symbols"
  92082. },
  92083. ":u7a7a:": {
  92084. "uc_base": "1f233",
  92085. "uc_output": "1f233",
  92086. "uc_match": "1f233",
  92087. "uc_greedy": "1f233",
  92088. "shortnames": [],
  92089. "category": "symbols"
  92090. },
  92091. ":unamused:": {
  92092. "uc_base": "1f612",
  92093. "uc_output": "1f612",
  92094. "uc_match": "1f612",
  92095. "uc_greedy": "1f612",
  92096. "shortnames": [],
  92097. "category": "people"
  92098. },
  92099. ":underage:": {
  92100. "uc_base": "1f51e",
  92101. "uc_output": "1f51e",
  92102. "uc_match": "1f51e",
  92103. "uc_greedy": "1f51e",
  92104. "shortnames": [],
  92105. "category": "symbols"
  92106. },
  92107. ":unicorn:": {
  92108. "uc_base": "1f984",
  92109. "uc_output": "1f984",
  92110. "uc_match": "1f984",
  92111. "uc_greedy": "1f984",
  92112. "shortnames": [":unicorn_face:"],
  92113. "category": "nature"
  92114. },
  92115. ":unlock:": {
  92116. "uc_base": "1f513",
  92117. "uc_output": "1f513",
  92118. "uc_match": "1f513-fe0f",
  92119. "uc_greedy": "1f513-fe0f",
  92120. "shortnames": [],
  92121. "category": "objects"
  92122. },
  92123. ":up:": {
  92124. "uc_base": "1f199",
  92125. "uc_output": "1f199",
  92126. "uc_match": "1f199",
  92127. "uc_greedy": "1f199",
  92128. "shortnames": [],
  92129. "category": "symbols"
  92130. },
  92131. ":upside_down:": {
  92132. "uc_base": "1f643",
  92133. "uc_output": "1f643",
  92134. "uc_match": "1f643",
  92135. "uc_greedy": "1f643",
  92136. "shortnames": [":upside_down_face:"],
  92137. "category": "people"
  92138. },
  92139. ":vampire:": {
  92140. "uc_base": "1f9db",
  92141. "uc_output": "1f9db",
  92142. "uc_match": "1f9db",
  92143. "uc_greedy": "1f9db",
  92144. "shortnames": [],
  92145. "category": "people"
  92146. },
  92147. ":vertical_traffic_light:": {
  92148. "uc_base": "1f6a6",
  92149. "uc_output": "1f6a6",
  92150. "uc_match": "1f6a6",
  92151. "uc_greedy": "1f6a6",
  92152. "shortnames": [],
  92153. "category": "travel"
  92154. },
  92155. ":vhs:": {
  92156. "uc_base": "1f4fc",
  92157. "uc_output": "1f4fc",
  92158. "uc_match": "1f4fc",
  92159. "uc_greedy": "1f4fc",
  92160. "shortnames": [],
  92161. "category": "objects"
  92162. },
  92163. ":vibration_mode:": {
  92164. "uc_base": "1f4f3",
  92165. "uc_output": "1f4f3",
  92166. "uc_match": "1f4f3",
  92167. "uc_greedy": "1f4f3",
  92168. "shortnames": [],
  92169. "category": "symbols"
  92170. },
  92171. ":video_camera:": {
  92172. "uc_base": "1f4f9",
  92173. "uc_output": "1f4f9",
  92174. "uc_match": "1f4f9-fe0f",
  92175. "uc_greedy": "1f4f9-fe0f",
  92176. "shortnames": [],
  92177. "category": "objects"
  92178. },
  92179. ":video_game:": {
  92180. "uc_base": "1f3ae",
  92181. "uc_output": "1f3ae",
  92182. "uc_match": "1f3ae-fe0f",
  92183. "uc_greedy": "1f3ae-fe0f",
  92184. "shortnames": [],
  92185. "category": "activity"
  92186. },
  92187. ":violin:": {
  92188. "uc_base": "1f3bb",
  92189. "uc_output": "1f3bb",
  92190. "uc_match": "1f3bb",
  92191. "uc_greedy": "1f3bb",
  92192. "shortnames": [],
  92193. "category": "activity"
  92194. },
  92195. ":volcano:": {
  92196. "uc_base": "1f30b",
  92197. "uc_output": "1f30b",
  92198. "uc_match": "1f30b",
  92199. "uc_greedy": "1f30b",
  92200. "shortnames": [],
  92201. "category": "travel"
  92202. },
  92203. ":volleyball:": {
  92204. "uc_base": "1f3d0",
  92205. "uc_output": "1f3d0",
  92206. "uc_match": "1f3d0",
  92207. "uc_greedy": "1f3d0",
  92208. "shortnames": [],
  92209. "category": "activity"
  92210. },
  92211. ":vs:": {
  92212. "uc_base": "1f19a",
  92213. "uc_output": "1f19a",
  92214. "uc_match": "1f19a",
  92215. "uc_greedy": "1f19a",
  92216. "shortnames": [],
  92217. "category": "symbols"
  92218. },
  92219. ":vulcan:": {
  92220. "uc_base": "1f596",
  92221. "uc_output": "1f596",
  92222. "uc_match": "1f596",
  92223. "uc_greedy": "1f596",
  92224. "shortnames": [":raised_hand_with_part_between_middle_and_ring_fingers:"],
  92225. "category": "people"
  92226. },
  92227. ":waning_crescent_moon:": {
  92228. "uc_base": "1f318",
  92229. "uc_output": "1f318",
  92230. "uc_match": "1f318",
  92231. "uc_greedy": "1f318",
  92232. "shortnames": [],
  92233. "category": "nature"
  92234. },
  92235. ":waning_gibbous_moon:": {
  92236. "uc_base": "1f316",
  92237. "uc_output": "1f316",
  92238. "uc_match": "1f316",
  92239. "uc_greedy": "1f316",
  92240. "shortnames": [],
  92241. "category": "nature"
  92242. },
  92243. ":wastebasket:": {
  92244. "uc_base": "1f5d1",
  92245. "uc_output": "1f5d1",
  92246. "uc_match": "1f5d1-fe0f",
  92247. "uc_greedy": "1f5d1-fe0f",
  92248. "shortnames": [],
  92249. "category": "objects"
  92250. },
  92251. ":water_buffalo:": {
  92252. "uc_base": "1f403",
  92253. "uc_output": "1f403",
  92254. "uc_match": "1f403",
  92255. "uc_greedy": "1f403",
  92256. "shortnames": [],
  92257. "category": "nature"
  92258. },
  92259. ":watermelon:": {
  92260. "uc_base": "1f349",
  92261. "uc_output": "1f349",
  92262. "uc_match": "1f349",
  92263. "uc_greedy": "1f349",
  92264. "shortnames": [],
  92265. "category": "food"
  92266. },
  92267. ":wave:": {
  92268. "uc_base": "1f44b",
  92269. "uc_output": "1f44b",
  92270. "uc_match": "1f44b",
  92271. "uc_greedy": "1f44b",
  92272. "shortnames": [],
  92273. "category": "people"
  92274. },
  92275. ":waxing_crescent_moon:": {
  92276. "uc_base": "1f312",
  92277. "uc_output": "1f312",
  92278. "uc_match": "1f312",
  92279. "uc_greedy": "1f312",
  92280. "shortnames": [],
  92281. "category": "nature"
  92282. },
  92283. ":waxing_gibbous_moon:": {
  92284. "uc_base": "1f314",
  92285. "uc_output": "1f314",
  92286. "uc_match": "1f314",
  92287. "uc_greedy": "1f314",
  92288. "shortnames": [],
  92289. "category": "nature"
  92290. },
  92291. ":wc:": {
  92292. "uc_base": "1f6be",
  92293. "uc_output": "1f6be",
  92294. "uc_match": "1f6be",
  92295. "uc_greedy": "1f6be",
  92296. "shortnames": [],
  92297. "category": "symbols"
  92298. },
  92299. ":weary:": {
  92300. "uc_base": "1f629",
  92301. "uc_output": "1f629",
  92302. "uc_match": "1f629",
  92303. "uc_greedy": "1f629",
  92304. "shortnames": [],
  92305. "category": "people"
  92306. },
  92307. ":wedding:": {
  92308. "uc_base": "1f492",
  92309. "uc_output": "1f492",
  92310. "uc_match": "1f492",
  92311. "uc_greedy": "1f492",
  92312. "shortnames": [],
  92313. "category": "travel"
  92314. },
  92315. ":whale2:": {
  92316. "uc_base": "1f40b",
  92317. "uc_output": "1f40b",
  92318. "uc_match": "1f40b",
  92319. "uc_greedy": "1f40b",
  92320. "shortnames": [],
  92321. "category": "nature"
  92322. },
  92323. ":whale:": {
  92324. "uc_base": "1f433",
  92325. "uc_output": "1f433",
  92326. "uc_match": "1f433",
  92327. "uc_greedy": "1f433",
  92328. "shortnames": [],
  92329. "category": "nature"
  92330. },
  92331. ":white_flower:": {
  92332. "uc_base": "1f4ae",
  92333. "uc_output": "1f4ae",
  92334. "uc_match": "1f4ae",
  92335. "uc_greedy": "1f4ae",
  92336. "shortnames": [],
  92337. "category": "symbols"
  92338. },
  92339. ":white_square_button:": {
  92340. "uc_base": "1f533",
  92341. "uc_output": "1f533",
  92342. "uc_match": "1f533",
  92343. "uc_greedy": "1f533",
  92344. "shortnames": [],
  92345. "category": "symbols"
  92346. },
  92347. ":white_sun_cloud:": {
  92348. "uc_base": "1f325",
  92349. "uc_output": "1f325",
  92350. "uc_match": "1f325-fe0f",
  92351. "uc_greedy": "1f325-fe0f",
  92352. "shortnames": [":white_sun_behind_cloud:"],
  92353. "category": "nature"
  92354. },
  92355. ":white_sun_rain_cloud:": {
  92356. "uc_base": "1f326",
  92357. "uc_output": "1f326",
  92358. "uc_match": "1f326-fe0f",
  92359. "uc_greedy": "1f326-fe0f",
  92360. "shortnames": [":white_sun_behind_cloud_with_rain:"],
  92361. "category": "nature"
  92362. },
  92363. ":white_sun_small_cloud:": {
  92364. "uc_base": "1f324",
  92365. "uc_output": "1f324",
  92366. "uc_match": "1f324-fe0f",
  92367. "uc_greedy": "1f324-fe0f",
  92368. "shortnames": [":white_sun_with_small_cloud:"],
  92369. "category": "nature"
  92370. },
  92371. ":wilted_rose:": {
  92372. "uc_base": "1f940",
  92373. "uc_output": "1f940",
  92374. "uc_match": "1f940",
  92375. "uc_greedy": "1f940",
  92376. "shortnames": [":wilted_flower:"],
  92377. "category": "nature"
  92378. },
  92379. ":wind_blowing_face:": {
  92380. "uc_base": "1f32c",
  92381. "uc_output": "1f32c",
  92382. "uc_match": "1f32c-fe0f",
  92383. "uc_greedy": "1f32c-fe0f",
  92384. "shortnames": [],
  92385. "category": "nature"
  92386. },
  92387. ":wind_chime:": {
  92388. "uc_base": "1f390",
  92389. "uc_output": "1f390",
  92390. "uc_match": "1f390",
  92391. "uc_greedy": "1f390",
  92392. "shortnames": [],
  92393. "category": "objects"
  92394. },
  92395. ":wine_glass:": {
  92396. "uc_base": "1f377",
  92397. "uc_output": "1f377",
  92398. "uc_match": "1f377",
  92399. "uc_greedy": "1f377",
  92400. "shortnames": [],
  92401. "category": "food"
  92402. },
  92403. ":wink:": {
  92404. "uc_base": "1f609",
  92405. "uc_output": "1f609",
  92406. "uc_match": "1f609",
  92407. "uc_greedy": "1f609",
  92408. "shortnames": [],
  92409. "category": "people"
  92410. },
  92411. ":wolf:": {
  92412. "uc_base": "1f43a",
  92413. "uc_output": "1f43a",
  92414. "uc_match": "1f43a",
  92415. "uc_greedy": "1f43a",
  92416. "shortnames": [],
  92417. "category": "nature"
  92418. },
  92419. ":woman:": {
  92420. "uc_base": "1f469",
  92421. "uc_output": "1f469",
  92422. "uc_match": "1f469",
  92423. "uc_greedy": "1f469",
  92424. "shortnames": [],
  92425. "category": "people"
  92426. },
  92427. ":woman_with_headscarf:": {
  92428. "uc_base": "1f9d5",
  92429. "uc_output": "1f9d5",
  92430. "uc_match": "1f9d5",
  92431. "uc_greedy": "1f9d5",
  92432. "shortnames": [],
  92433. "category": "people"
  92434. },
  92435. ":womans_clothes:": {
  92436. "uc_base": "1f45a",
  92437. "uc_output": "1f45a",
  92438. "uc_match": "1f45a",
  92439. "uc_greedy": "1f45a",
  92440. "shortnames": [],
  92441. "category": "people"
  92442. },
  92443. ":womans_hat:": {
  92444. "uc_base": "1f452",
  92445. "uc_output": "1f452",
  92446. "uc_match": "1f452",
  92447. "uc_greedy": "1f452",
  92448. "shortnames": [],
  92449. "category": "people"
  92450. },
  92451. ":womens:": {
  92452. "uc_base": "1f6ba",
  92453. "uc_output": "1f6ba",
  92454. "uc_match": "1f6ba-fe0f",
  92455. "uc_greedy": "1f6ba-fe0f",
  92456. "shortnames": [],
  92457. "category": "symbols"
  92458. },
  92459. ":worried:": {
  92460. "uc_base": "1f61f",
  92461. "uc_output": "1f61f",
  92462. "uc_match": "1f61f",
  92463. "uc_greedy": "1f61f",
  92464. "shortnames": [],
  92465. "category": "people"
  92466. },
  92467. ":wrench:": {
  92468. "uc_base": "1f527",
  92469. "uc_output": "1f527",
  92470. "uc_match": "1f527",
  92471. "uc_greedy": "1f527",
  92472. "shortnames": [],
  92473. "category": "objects"
  92474. },
  92475. ":yellow_heart:": {
  92476. "uc_base": "1f49b",
  92477. "uc_output": "1f49b",
  92478. "uc_match": "1f49b",
  92479. "uc_greedy": "1f49b",
  92480. "shortnames": [],
  92481. "category": "symbols"
  92482. },
  92483. ":yen:": {
  92484. "uc_base": "1f4b4",
  92485. "uc_output": "1f4b4",
  92486. "uc_match": "1f4b4",
  92487. "uc_greedy": "1f4b4",
  92488. "shortnames": [],
  92489. "category": "objects"
  92490. },
  92491. ":yum:": {
  92492. "uc_base": "1f60b",
  92493. "uc_output": "1f60b",
  92494. "uc_match": "1f60b",
  92495. "uc_greedy": "1f60b",
  92496. "shortnames": [],
  92497. "category": "people"
  92498. },
  92499. ":zebra:": {
  92500. "uc_base": "1f993",
  92501. "uc_output": "1f993",
  92502. "uc_match": "1f993",
  92503. "uc_greedy": "1f993",
  92504. "shortnames": [],
  92505. "category": "nature"
  92506. },
  92507. ":zipper_mouth:": {
  92508. "uc_base": "1f910",
  92509. "uc_output": "1f910",
  92510. "uc_match": "1f910",
  92511. "uc_greedy": "1f910",
  92512. "shortnames": [":zipper_mouth_face:"],
  92513. "category": "people"
  92514. },
  92515. ":zombie:": {
  92516. "uc_base": "1f9df",
  92517. "uc_output": "1f9df",
  92518. "uc_match": "1f9df",
  92519. "uc_greedy": "1f9df",
  92520. "shortnames": [],
  92521. "category": "people"
  92522. },
  92523. ":zzz:": {
  92524. "uc_base": "1f4a4",
  92525. "uc_output": "1f4a4",
  92526. "uc_match": "1f4a4",
  92527. "uc_greedy": "1f4a4",
  92528. "shortnames": [],
  92529. "category": "symbols"
  92530. },
  92531. ":airplane:": {
  92532. "uc_base": "2708",
  92533. "uc_output": "2708",
  92534. "uc_match": "2708-fe0f",
  92535. "uc_greedy": "2708-fe0f",
  92536. "shortnames": [],
  92537. "category": "travel"
  92538. },
  92539. ":alarm_clock:": {
  92540. "uc_base": "23f0",
  92541. "uc_output": "23f0",
  92542. "uc_match": "23f0",
  92543. "uc_greedy": "23f0",
  92544. "shortnames": [],
  92545. "category": "objects"
  92546. },
  92547. ":alembic:": {
  92548. "uc_base": "2697",
  92549. "uc_output": "2697",
  92550. "uc_match": "2697-fe0f",
  92551. "uc_greedy": "2697-fe0f",
  92552. "shortnames": [],
  92553. "category": "objects"
  92554. },
  92555. ":anchor:": {
  92556. "uc_base": "2693",
  92557. "uc_output": "2693",
  92558. "uc_match": "2693-fe0f",
  92559. "uc_greedy": "2693-fe0f",
  92560. "shortnames": [],
  92561. "category": "travel"
  92562. },
  92563. ":aquarius:": {
  92564. "uc_base": "2652",
  92565. "uc_output": "2652",
  92566. "uc_match": "2652-fe0f",
  92567. "uc_greedy": "2652-fe0f",
  92568. "shortnames": [],
  92569. "category": "symbols"
  92570. },
  92571. ":aries:": {
  92572. "uc_base": "2648",
  92573. "uc_output": "2648",
  92574. "uc_match": "2648-fe0f",
  92575. "uc_greedy": "2648-fe0f",
  92576. "shortnames": [],
  92577. "category": "symbols"
  92578. },
  92579. ":arrow_backward:": {
  92580. "uc_base": "25c0",
  92581. "uc_output": "25c0",
  92582. "uc_match": "25c0-fe0f",
  92583. "uc_greedy": "25c0",
  92584. "shortnames": [],
  92585. "category": "symbols"
  92586. },
  92587. ":arrow_double_down:": {
  92588. "uc_base": "23ec",
  92589. "uc_output": "23ec",
  92590. "uc_match": "23ec",
  92591. "uc_greedy": "23ec",
  92592. "shortnames": [],
  92593. "category": "symbols"
  92594. },
  92595. ":arrow_double_up:": {
  92596. "uc_base": "23eb",
  92597. "uc_output": "23eb",
  92598. "uc_match": "23eb",
  92599. "uc_greedy": "23eb",
  92600. "shortnames": [],
  92601. "category": "symbols"
  92602. },
  92603. ":arrow_down:": {
  92604. "uc_base": "2b07",
  92605. "uc_output": "2b07",
  92606. "uc_match": "2b07-fe0f",
  92607. "uc_greedy": "2b07",
  92608. "shortnames": [],
  92609. "category": "symbols"
  92610. },
  92611. ":arrow_forward:": {
  92612. "uc_base": "25b6",
  92613. "uc_output": "25b6",
  92614. "uc_match": "25b6-fe0f",
  92615. "uc_greedy": "25b6",
  92616. "shortnames": [],
  92617. "category": "symbols"
  92618. },
  92619. ":arrow_heading_down:": {
  92620. "uc_base": "2935",
  92621. "uc_output": "2935",
  92622. "uc_match": "2935-fe0f",
  92623. "uc_greedy": "2935",
  92624. "shortnames": [],
  92625. "category": "symbols"
  92626. },
  92627. ":arrow_heading_up:": {
  92628. "uc_base": "2934",
  92629. "uc_output": "2934",
  92630. "uc_match": "2934-fe0f",
  92631. "uc_greedy": "2934",
  92632. "shortnames": [],
  92633. "category": "symbols"
  92634. },
  92635. ":arrow_left:": {
  92636. "uc_base": "2b05",
  92637. "uc_output": "2b05",
  92638. "uc_match": "2b05-fe0f",
  92639. "uc_greedy": "2b05",
  92640. "shortnames": [],
  92641. "category": "symbols"
  92642. },
  92643. ":arrow_lower_left:": {
  92644. "uc_base": "2199",
  92645. "uc_output": "2199",
  92646. "uc_match": "2199-fe0f",
  92647. "uc_greedy": "2199",
  92648. "shortnames": [],
  92649. "category": "symbols"
  92650. },
  92651. ":arrow_lower_right:": {
  92652. "uc_base": "2198",
  92653. "uc_output": "2198",
  92654. "uc_match": "2198-fe0f",
  92655. "uc_greedy": "2198",
  92656. "shortnames": [],
  92657. "category": "symbols"
  92658. },
  92659. ":arrow_right:": {
  92660. "uc_base": "27a1",
  92661. "uc_output": "27a1",
  92662. "uc_match": "27a1-fe0f",
  92663. "uc_greedy": "27a1",
  92664. "shortnames": [],
  92665. "category": "symbols"
  92666. },
  92667. ":arrow_right_hook:": {
  92668. "uc_base": "21aa",
  92669. "uc_output": "21aa",
  92670. "uc_match": "21aa-fe0f",
  92671. "uc_greedy": "21aa",
  92672. "shortnames": [],
  92673. "category": "symbols"
  92674. },
  92675. ":arrow_up:": {
  92676. "uc_base": "2b06",
  92677. "uc_output": "2b06",
  92678. "uc_match": "2b06-fe0f",
  92679. "uc_greedy": "2b06",
  92680. "shortnames": [],
  92681. "category": "symbols"
  92682. },
  92683. ":arrow_up_down:": {
  92684. "uc_base": "2195",
  92685. "uc_output": "2195",
  92686. "uc_match": "2195-fe0f",
  92687. "uc_greedy": "2195",
  92688. "shortnames": [],
  92689. "category": "symbols"
  92690. },
  92691. ":arrow_upper_left:": {
  92692. "uc_base": "2196",
  92693. "uc_output": "2196",
  92694. "uc_match": "2196-fe0f",
  92695. "uc_greedy": "2196",
  92696. "shortnames": [],
  92697. "category": "symbols"
  92698. },
  92699. ":arrow_upper_right:": {
  92700. "uc_base": "2197",
  92701. "uc_output": "2197",
  92702. "uc_match": "2197-fe0f",
  92703. "uc_greedy": "2197",
  92704. "shortnames": [],
  92705. "category": "symbols"
  92706. },
  92707. ":atom:": {
  92708. "uc_base": "269b",
  92709. "uc_output": "269b",
  92710. "uc_match": "269b-fe0f",
  92711. "uc_greedy": "269b",
  92712. "shortnames": [":atom_symbol:"],
  92713. "category": "symbols"
  92714. },
  92715. ":ballot_box_with_check:": {
  92716. "uc_base": "2611",
  92717. "uc_output": "2611",
  92718. "uc_match": "2611-fe0f",
  92719. "uc_greedy": "2611",
  92720. "shortnames": [],
  92721. "category": "symbols"
  92722. },
  92723. ":bangbang:": {
  92724. "uc_base": "203c",
  92725. "uc_output": "203c",
  92726. "uc_match": "203c-fe0f",
  92727. "uc_greedy": "203c",
  92728. "shortnames": [],
  92729. "category": "symbols"
  92730. },
  92731. ":baseball:": {
  92732. "uc_base": "26be",
  92733. "uc_output": "26be",
  92734. "uc_match": "26be-fe0f",
  92735. "uc_greedy": "26be-fe0f",
  92736. "shortnames": [],
  92737. "category": "activity"
  92738. },
  92739. ":beach_umbrella:": {
  92740. "uc_base": "26f1",
  92741. "uc_output": "26f1",
  92742. "uc_match": "26f1-fe0f",
  92743. "uc_greedy": "26f1-fe0f",
  92744. "shortnames": [":umbrella_on_ground:"],
  92745. "category": "travel"
  92746. },
  92747. ":biohazard:": {
  92748. "uc_base": "2623",
  92749. "uc_output": "2623",
  92750. "uc_match": "2623-fe0f",
  92751. "uc_greedy": "2623",
  92752. "shortnames": [":biohazard_sign:"],
  92753. "category": "symbols"
  92754. },
  92755. ":black_circle:": {
  92756. "uc_base": "26ab",
  92757. "uc_output": "26ab",
  92758. "uc_match": "26ab-fe0f",
  92759. "uc_greedy": "26ab-fe0f",
  92760. "shortnames": [],
  92761. "category": "symbols"
  92762. },
  92763. ":black_large_square:": {
  92764. "uc_base": "2b1b",
  92765. "uc_output": "2b1b",
  92766. "uc_match": "2b1b-fe0f",
  92767. "uc_greedy": "2b1b-fe0f",
  92768. "shortnames": [],
  92769. "category": "symbols"
  92770. },
  92771. ":black_medium_small_square:": {
  92772. "uc_base": "25fe",
  92773. "uc_output": "25fe",
  92774. "uc_match": "25fe-fe0f",
  92775. "uc_greedy": "25fe-fe0f",
  92776. "shortnames": [],
  92777. "category": "symbols"
  92778. },
  92779. ":black_medium_square:": {
  92780. "uc_base": "25fc",
  92781. "uc_output": "25fc",
  92782. "uc_match": "25fc-fe0f",
  92783. "uc_greedy": "25fc",
  92784. "shortnames": [],
  92785. "category": "symbols"
  92786. },
  92787. ":black_nib:": {
  92788. "uc_base": "2712",
  92789. "uc_output": "2712",
  92790. "uc_match": "2712-fe0f",
  92791. "uc_greedy": "2712-fe0f",
  92792. "shortnames": [],
  92793. "category": "objects"
  92794. },
  92795. ":black_small_square:": {
  92796. "uc_base": "25aa",
  92797. "uc_output": "25aa",
  92798. "uc_match": "25aa-fe0f",
  92799. "uc_greedy": "25aa",
  92800. "shortnames": [],
  92801. "category": "symbols"
  92802. },
  92803. ":cancer:": {
  92804. "uc_base": "264b",
  92805. "uc_output": "264b",
  92806. "uc_match": "264b-fe0f",
  92807. "uc_greedy": "264b-fe0f",
  92808. "shortnames": [],
  92809. "category": "symbols"
  92810. },
  92811. ":capricorn:": {
  92812. "uc_base": "2651",
  92813. "uc_output": "2651",
  92814. "uc_match": "2651-fe0f",
  92815. "uc_greedy": "2651-fe0f",
  92816. "shortnames": [],
  92817. "category": "symbols"
  92818. },
  92819. ":chains:": {
  92820. "uc_base": "26d3",
  92821. "uc_output": "26d3",
  92822. "uc_match": "26d3-fe0f",
  92823. "uc_greedy": "26d3-fe0f",
  92824. "shortnames": [],
  92825. "category": "objects"
  92826. },
  92827. ":church:": {
  92828. "uc_base": "26ea",
  92829. "uc_output": "26ea",
  92830. "uc_match": "26ea-fe0f",
  92831. "uc_greedy": "26ea-fe0f",
  92832. "shortnames": [],
  92833. "category": "travel"
  92834. },
  92835. ":cloud:": {
  92836. "uc_base": "2601",
  92837. "uc_output": "2601",
  92838. "uc_match": "2601-fe0f",
  92839. "uc_greedy": "2601-fe0f",
  92840. "shortnames": [],
  92841. "category": "nature"
  92842. },
  92843. ":clubs:": {
  92844. "uc_base": "2663",
  92845. "uc_output": "2663",
  92846. "uc_match": "2663-fe0f",
  92847. "uc_greedy": "2663-fe0f",
  92848. "shortnames": [],
  92849. "category": "symbols"
  92850. },
  92851. ":coffee:": {
  92852. "uc_base": "2615",
  92853. "uc_output": "2615",
  92854. "uc_match": "2615-fe0f",
  92855. "uc_greedy": "2615-fe0f",
  92856. "shortnames": [],
  92857. "category": "food"
  92858. },
  92859. ":coffin:": {
  92860. "uc_base": "26b0",
  92861. "uc_output": "26b0",
  92862. "uc_match": "26b0-fe0f",
  92863. "uc_greedy": "26b0-fe0f",
  92864. "shortnames": [],
  92865. "category": "objects"
  92866. },
  92867. ":comet:": {
  92868. "uc_base": "2604",
  92869. "uc_output": "2604",
  92870. "uc_match": "2604-fe0f",
  92871. "uc_greedy": "2604-fe0f",
  92872. "shortnames": [],
  92873. "category": "nature"
  92874. },
  92875. ":congratulations:": {
  92876. "uc_base": "3297",
  92877. "uc_output": "3297",
  92878. "uc_match": "3297-fe0f",
  92879. "uc_greedy": "3297-fe0f",
  92880. "shortnames": [],
  92881. "category": "symbols"
  92882. },
  92883. ":copyright:": {
  92884. "uc_base": "00a9",
  92885. "uc_output": "00a9",
  92886. "uc_match": "00a9-fe0f",
  92887. "uc_greedy": "00a9",
  92888. "shortnames": [],
  92889. "category": "symbols"
  92890. },
  92891. ":cross:": {
  92892. "uc_base": "271d",
  92893. "uc_output": "271d",
  92894. "uc_match": "271d-fe0f",
  92895. "uc_greedy": "271d",
  92896. "shortnames": [":latin_cross:"],
  92897. "category": "symbols"
  92898. },
  92899. ":crossed_swords:": {
  92900. "uc_base": "2694",
  92901. "uc_output": "2694",
  92902. "uc_match": "2694-fe0f",
  92903. "uc_greedy": "2694-fe0f",
  92904. "shortnames": [],
  92905. "category": "objects"
  92906. },
  92907. ":curly_loop:": {
  92908. "uc_base": "27b0",
  92909. "uc_output": "27b0",
  92910. "uc_match": "27b0",
  92911. "uc_greedy": "27b0",
  92912. "shortnames": [],
  92913. "category": "symbols"
  92914. },
  92915. ":diamonds:": {
  92916. "uc_base": "2666",
  92917. "uc_output": "2666",
  92918. "uc_match": "2666-fe0f",
  92919. "uc_greedy": "2666-fe0f",
  92920. "shortnames": [],
  92921. "category": "symbols"
  92922. },
  92923. ":eight_pointed_black_star:": {
  92924. "uc_base": "2734",
  92925. "uc_output": "2734",
  92926. "uc_match": "2734-fe0f",
  92927. "uc_greedy": "2734-fe0f",
  92928. "shortnames": [],
  92929. "category": "symbols"
  92930. },
  92931. ":eight_spoked_asterisk:": {
  92932. "uc_base": "2733",
  92933. "uc_output": "2733",
  92934. "uc_match": "2733-fe0f",
  92935. "uc_greedy": "2733-fe0f",
  92936. "shortnames": [],
  92937. "category": "symbols"
  92938. },
  92939. ":eject:": {
  92940. "uc_base": "23cf",
  92941. "uc_output": "23cf",
  92942. "uc_match": "23cf-fe0f",
  92943. "uc_greedy": "23cf",
  92944. "shortnames": [":eject_symbol:"],
  92945. "category": "symbols"
  92946. },
  92947. ":envelope:": {
  92948. "uc_base": "2709",
  92949. "uc_output": "2709",
  92950. "uc_match": "2709-fe0f",
  92951. "uc_greedy": "2709-fe0f",
  92952. "shortnames": [],
  92953. "category": "objects"
  92954. },
  92955. ":exclamation:": {
  92956. "uc_base": "2757",
  92957. "uc_output": "2757",
  92958. "uc_match": "2757-fe0f",
  92959. "uc_greedy": "2757-fe0f",
  92960. "shortnames": [],
  92961. "category": "symbols"
  92962. },
  92963. ":fast_forward:": {
  92964. "uc_base": "23e9",
  92965. "uc_output": "23e9",
  92966. "uc_match": "23e9-fe0f",
  92967. "uc_greedy": "23e9-fe0f",
  92968. "shortnames": [],
  92969. "category": "symbols"
  92970. },
  92971. ":female_sign:": {
  92972. "uc_base": "2640",
  92973. "uc_output": "2640",
  92974. "uc_match": "2640-fe0f",
  92975. "uc_greedy": "2640",
  92976. "shortnames": [],
  92977. "category": "symbols"
  92978. },
  92979. ":ferry:": {
  92980. "uc_base": "26f4",
  92981. "uc_output": "26f4",
  92982. "uc_match": "26f4-fe0f",
  92983. "uc_greedy": "26f4-fe0f",
  92984. "shortnames": [],
  92985. "category": "travel"
  92986. },
  92987. ":fist:": {
  92988. "uc_base": "270a",
  92989. "uc_output": "270a",
  92990. "uc_match": "270a",
  92991. "uc_greedy": "270a",
  92992. "shortnames": [],
  92993. "category": "people"
  92994. },
  92995. ":fleur-de-lis:": {
  92996. "uc_base": "269c",
  92997. "uc_output": "269c",
  92998. "uc_match": "269c-fe0f",
  92999. "uc_greedy": "269c-fe0f",
  93000. "shortnames": [],
  93001. "category": "symbols"
  93002. },
  93003. ":fountain:": {
  93004. "uc_base": "26f2",
  93005. "uc_output": "26f2",
  93006. "uc_match": "26f2-fe0f",
  93007. "uc_greedy": "26f2-fe0f",
  93008. "shortnames": [],
  93009. "category": "travel"
  93010. },
  93011. ":frowning2:": {
  93012. "uc_base": "2639",
  93013. "uc_output": "2639",
  93014. "uc_match": "2639-fe0f",
  93015. "uc_greedy": "2639-fe0f",
  93016. "shortnames": [":white_frowning_face:"],
  93017. "category": "people"
  93018. },
  93019. ":fuelpump:": {
  93020. "uc_base": "26fd",
  93021. "uc_output": "26fd",
  93022. "uc_match": "26fd-fe0f",
  93023. "uc_greedy": "26fd-fe0f",
  93024. "shortnames": [],
  93025. "category": "travel"
  93026. },
  93027. ":gear:": {
  93028. "uc_base": "2699",
  93029. "uc_output": "2699",
  93030. "uc_match": "2699-fe0f",
  93031. "uc_greedy": "2699-fe0f",
  93032. "shortnames": [],
  93033. "category": "objects"
  93034. },
  93035. ":gemini:": {
  93036. "uc_base": "264a",
  93037. "uc_output": "264a",
  93038. "uc_match": "264a-fe0f",
  93039. "uc_greedy": "264a-fe0f",
  93040. "shortnames": [],
  93041. "category": "symbols"
  93042. },
  93043. ":golf:": {
  93044. "uc_base": "26f3",
  93045. "uc_output": "26f3",
  93046. "uc_match": "26f3-fe0f",
  93047. "uc_greedy": "26f3-fe0f",
  93048. "shortnames": [],
  93049. "category": "activity"
  93050. },
  93051. ":grey_exclamation:": {
  93052. "uc_base": "2755",
  93053. "uc_output": "2755",
  93054. "uc_match": "2755",
  93055. "uc_greedy": "2755",
  93056. "shortnames": [],
  93057. "category": "symbols"
  93058. },
  93059. ":grey_question:": {
  93060. "uc_base": "2754",
  93061. "uc_output": "2754",
  93062. "uc_match": "2754",
  93063. "uc_greedy": "2754",
  93064. "shortnames": [],
  93065. "category": "symbols"
  93066. },
  93067. ":hammer_pick:": {
  93068. "uc_base": "2692",
  93069. "uc_output": "2692",
  93070. "uc_match": "2692-fe0f",
  93071. "uc_greedy": "2692-fe0f",
  93072. "shortnames": [":hammer_and_pick:"],
  93073. "category": "objects"
  93074. },
  93075. ":heart:": {
  93076. "uc_base": "2764",
  93077. "uc_output": "2764",
  93078. "uc_match": "2764-fe0f",
  93079. "uc_greedy": "2764-fe0f",
  93080. "shortnames": [],
  93081. "category": "symbols"
  93082. },
  93083. ":heart_exclamation:": {
  93084. "uc_base": "2763",
  93085. "uc_output": "2763",
  93086. "uc_match": "2763-fe0f",
  93087. "uc_greedy": "2763-fe0f",
  93088. "shortnames": [":heavy_heart_exclamation_mark_ornament:"],
  93089. "category": "symbols"
  93090. },
  93091. ":hearts:": {
  93092. "uc_base": "2665",
  93093. "uc_output": "2665",
  93094. "uc_match": "2665-fe0f",
  93095. "uc_greedy": "2665-fe0f",
  93096. "shortnames": [],
  93097. "category": "symbols"
  93098. },
  93099. ":heavy_check_mark:": {
  93100. "uc_base": "2714",
  93101. "uc_output": "2714",
  93102. "uc_match": "2714-fe0f",
  93103. "uc_greedy": "2714",
  93104. "shortnames": [],
  93105. "category": "symbols"
  93106. },
  93107. ":heavy_division_sign:": {
  93108. "uc_base": "2797",
  93109. "uc_output": "2797",
  93110. "uc_match": "2797",
  93111. "uc_greedy": "2797",
  93112. "shortnames": [],
  93113. "category": "symbols"
  93114. },
  93115. ":heavy_minus_sign:": {
  93116. "uc_base": "2796",
  93117. "uc_output": "2796",
  93118. "uc_match": "2796",
  93119. "uc_greedy": "2796",
  93120. "shortnames": [],
  93121. "category": "symbols"
  93122. },
  93123. ":heavy_multiplication_x:": {
  93124. "uc_base": "2716",
  93125. "uc_output": "2716",
  93126. "uc_match": "2716-fe0f",
  93127. "uc_greedy": "2716",
  93128. "shortnames": [],
  93129. "category": "symbols"
  93130. },
  93131. ":heavy_plus_sign:": {
  93132. "uc_base": "2795",
  93133. "uc_output": "2795",
  93134. "uc_match": "2795",
  93135. "uc_greedy": "2795",
  93136. "shortnames": [],
  93137. "category": "symbols"
  93138. },
  93139. ":helmet_with_cross:": {
  93140. "uc_base": "26d1",
  93141. "uc_output": "26d1",
  93142. "uc_match": "26d1-fe0f",
  93143. "uc_greedy": "26d1-fe0f",
  93144. "shortnames": [":helmet_with_white_cross:"],
  93145. "category": "people"
  93146. },
  93147. ":hotsprings:": {
  93148. "uc_base": "2668",
  93149. "uc_output": "2668",
  93150. "uc_match": "2668-fe0f",
  93151. "uc_greedy": "2668-fe0f",
  93152. "shortnames": [],
  93153. "category": "symbols"
  93154. },
  93155. ":hourglass:": {
  93156. "uc_base": "231b",
  93157. "uc_output": "231b",
  93158. "uc_match": "231b-fe0f",
  93159. "uc_greedy": "231b-fe0f",
  93160. "shortnames": [],
  93161. "category": "objects"
  93162. },
  93163. ":hourglass_flowing_sand:": {
  93164. "uc_base": "23f3",
  93165. "uc_output": "23f3",
  93166. "uc_match": "23f3-fe0f",
  93167. "uc_greedy": "23f3-fe0f",
  93168. "shortnames": [],
  93169. "category": "objects"
  93170. },
  93171. ":ice_skate:": {
  93172. "uc_base": "26f8",
  93173. "uc_output": "26f8",
  93174. "uc_match": "26f8-fe0f",
  93175. "uc_greedy": "26f8-fe0f",
  93176. "shortnames": [],
  93177. "category": "activity"
  93178. },
  93179. ":information_source:": {
  93180. "uc_base": "2139",
  93181. "uc_output": "2139",
  93182. "uc_match": "2139-fe0f",
  93183. "uc_greedy": "2139",
  93184. "shortnames": [],
  93185. "category": "symbols"
  93186. },
  93187. ":interrobang:": {
  93188. "uc_base": "2049",
  93189. "uc_output": "2049",
  93190. "uc_match": "2049-fe0f",
  93191. "uc_greedy": "2049",
  93192. "shortnames": [],
  93193. "category": "symbols"
  93194. },
  93195. ":keyboard:": {
  93196. "uc_base": "2328",
  93197. "uc_output": "2328",
  93198. "uc_match": "2328-fe0f",
  93199. "uc_greedy": "2328-fe0f",
  93200. "shortnames": [],
  93201. "category": "objects"
  93202. },
  93203. ":left_right_arrow:": {
  93204. "uc_base": "2194",
  93205. "uc_output": "2194",
  93206. "uc_match": "2194-fe0f",
  93207. "uc_greedy": "2194",
  93208. "shortnames": [],
  93209. "category": "symbols"
  93210. },
  93211. ":leftwards_arrow_with_hook:": {
  93212. "uc_base": "21a9",
  93213. "uc_output": "21a9",
  93214. "uc_match": "21a9-fe0f",
  93215. "uc_greedy": "21a9",
  93216. "shortnames": [],
  93217. "category": "symbols"
  93218. },
  93219. ":leo:": {
  93220. "uc_base": "264c",
  93221. "uc_output": "264c",
  93222. "uc_match": "264c-fe0f",
  93223. "uc_greedy": "264c-fe0f",
  93224. "shortnames": [],
  93225. "category": "symbols"
  93226. },
  93227. ":libra:": {
  93228. "uc_base": "264e",
  93229. "uc_output": "264e",
  93230. "uc_match": "264e-fe0f",
  93231. "uc_greedy": "264e-fe0f",
  93232. "shortnames": [],
  93233. "category": "symbols"
  93234. },
  93235. ":loop:": {
  93236. "uc_base": "27bf",
  93237. "uc_output": "27bf",
  93238. "uc_match": "27bf",
  93239. "uc_greedy": "27bf",
  93240. "shortnames": [],
  93241. "category": "symbols"
  93242. },
  93243. ":m:": {
  93244. "uc_base": "24c2",
  93245. "uc_output": "24c2",
  93246. "uc_match": "24c2-fe0f",
  93247. "uc_greedy": "24c2-fe0f",
  93248. "shortnames": [],
  93249. "category": "symbols"
  93250. },
  93251. ":male_sign:": {
  93252. "uc_base": "2642",
  93253. "uc_output": "2642",
  93254. "uc_match": "2642-fe0f",
  93255. "uc_greedy": "2642",
  93256. "shortnames": [],
  93257. "category": "symbols"
  93258. },
  93259. ":medical_symbol:": {
  93260. "uc_base": "2695",
  93261. "uc_output": "2695",
  93262. "uc_match": "2695-fe0f",
  93263. "uc_greedy": "2695",
  93264. "shortnames": [],
  93265. "category": "symbols"
  93266. },
  93267. ":mountain:": {
  93268. "uc_base": "26f0",
  93269. "uc_output": "26f0",
  93270. "uc_match": "26f0-fe0f",
  93271. "uc_greedy": "26f0-fe0f",
  93272. "shortnames": [],
  93273. "category": "travel"
  93274. },
  93275. ":negative_squared_cross_mark:": {
  93276. "uc_base": "274e",
  93277. "uc_output": "274e",
  93278. "uc_match": "274e",
  93279. "uc_greedy": "274e",
  93280. "shortnames": [],
  93281. "category": "symbols"
  93282. },
  93283. ":no_entry:": {
  93284. "uc_base": "26d4",
  93285. "uc_output": "26d4",
  93286. "uc_match": "26d4-fe0f",
  93287. "uc_greedy": "26d4-fe0f",
  93288. "shortnames": [],
  93289. "category": "symbols"
  93290. },
  93291. ":o:": {
  93292. "uc_base": "2b55",
  93293. "uc_output": "2b55",
  93294. "uc_match": "2b55-fe0f",
  93295. "uc_greedy": "2b55-fe0f",
  93296. "shortnames": [],
  93297. "category": "symbols"
  93298. },
  93299. ":ophiuchus:": {
  93300. "uc_base": "26ce",
  93301. "uc_output": "26ce",
  93302. "uc_match": "26ce",
  93303. "uc_greedy": "26ce",
  93304. "shortnames": [],
  93305. "category": "symbols"
  93306. },
  93307. ":orthodox_cross:": {
  93308. "uc_base": "2626",
  93309. "uc_output": "2626",
  93310. "uc_match": "2626-fe0f",
  93311. "uc_greedy": "2626",
  93312. "shortnames": [],
  93313. "category": "symbols"
  93314. },
  93315. ":part_alternation_mark:": {
  93316. "uc_base": "303d",
  93317. "uc_output": "303d",
  93318. "uc_match": "303d-fe0f",
  93319. "uc_greedy": "303d-fe0f",
  93320. "shortnames": [],
  93321. "category": "symbols"
  93322. },
  93323. ":partly_sunny:": {
  93324. "uc_base": "26c5",
  93325. "uc_output": "26c5",
  93326. "uc_match": "26c5-fe0f",
  93327. "uc_greedy": "26c5-fe0f",
  93328. "shortnames": [],
  93329. "category": "nature"
  93330. },
  93331. ":pause_button:": {
  93332. "uc_base": "23f8",
  93333. "uc_output": "23f8",
  93334. "uc_match": "23f8-fe0f",
  93335. "uc_greedy": "23f8",
  93336. "shortnames": [":double_vertical_bar:"],
  93337. "category": "symbols"
  93338. },
  93339. ":peace:": {
  93340. "uc_base": "262e",
  93341. "uc_output": "262e",
  93342. "uc_match": "262e-fe0f",
  93343. "uc_greedy": "262e",
  93344. "shortnames": [":peace_symbol:"],
  93345. "category": "symbols"
  93346. },
  93347. ":pencil2:": {
  93348. "uc_base": "270f",
  93349. "uc_output": "270f",
  93350. "uc_match": "270f-fe0f",
  93351. "uc_greedy": "270f-fe0f",
  93352. "shortnames": [],
  93353. "category": "objects"
  93354. },
  93355. ":person_bouncing_ball:": {
  93356. "uc_base": "26f9",
  93357. "uc_output": "26f9",
  93358. "uc_match": "26f9-fe0f",
  93359. "uc_greedy": "26f9-fe0f",
  93360. "shortnames": [":basketball_player:", ":person_with_ball:"],
  93361. "category": "activity"
  93362. },
  93363. ":pick:": {
  93364. "uc_base": "26cf",
  93365. "uc_output": "26cf",
  93366. "uc_match": "26cf-fe0f",
  93367. "uc_greedy": "26cf-fe0f",
  93368. "shortnames": [],
  93369. "category": "objects"
  93370. },
  93371. ":pisces:": {
  93372. "uc_base": "2653",
  93373. "uc_output": "2653",
  93374. "uc_match": "2653-fe0f",
  93375. "uc_greedy": "2653-fe0f",
  93376. "shortnames": [],
  93377. "category": "symbols"
  93378. },
  93379. ":play_pause:": {
  93380. "uc_base": "23ef",
  93381. "uc_output": "23ef",
  93382. "uc_match": "23ef-fe0f",
  93383. "uc_greedy": "23ef",
  93384. "shortnames": [],
  93385. "category": "symbols"
  93386. },
  93387. ":point_up:": {
  93388. "uc_base": "261d",
  93389. "uc_output": "261d",
  93390. "uc_match": "261d-fe0f",
  93391. "uc_greedy": "261d-fe0f",
  93392. "shortnames": [],
  93393. "category": "people"
  93394. },
  93395. ":question:": {
  93396. "uc_base": "2753",
  93397. "uc_output": "2753",
  93398. "uc_match": "2753-fe0f",
  93399. "uc_greedy": "2753-fe0f",
  93400. "shortnames": [],
  93401. "category": "symbols"
  93402. },
  93403. ":radioactive:": {
  93404. "uc_base": "2622",
  93405. "uc_output": "2622",
  93406. "uc_match": "2622-fe0f",
  93407. "uc_greedy": "2622",
  93408. "shortnames": [":radioactive_sign:"],
  93409. "category": "symbols"
  93410. },
  93411. ":raised_hand:": {
  93412. "uc_base": "270b",
  93413. "uc_output": "270b",
  93414. "uc_match": "270b",
  93415. "uc_greedy": "270b",
  93416. "shortnames": [],
  93417. "category": "people"
  93418. },
  93419. ":record_button:": {
  93420. "uc_base": "23fa",
  93421. "uc_output": "23fa",
  93422. "uc_match": "23fa-fe0f",
  93423. "uc_greedy": "23fa",
  93424. "shortnames": [],
  93425. "category": "symbols"
  93426. },
  93427. ":recycle:": {
  93428. "uc_base": "267b",
  93429. "uc_output": "267b",
  93430. "uc_match": "267b-fe0f",
  93431. "uc_greedy": "267b-fe0f",
  93432. "shortnames": [],
  93433. "category": "symbols"
  93434. },
  93435. ":registered:": {
  93436. "uc_base": "00ae",
  93437. "uc_output": "00ae",
  93438. "uc_match": "00ae-fe0f",
  93439. "uc_greedy": "00ae",
  93440. "shortnames": [],
  93441. "category": "symbols"
  93442. },
  93443. ":relaxed:": {
  93444. "uc_base": "263a",
  93445. "uc_output": "263a",
  93446. "uc_match": "263a-fe0f",
  93447. "uc_greedy": "263a-fe0f",
  93448. "shortnames": [],
  93449. "category": "people"
  93450. },
  93451. ":rewind:": {
  93452. "uc_base": "23ea",
  93453. "uc_output": "23ea",
  93454. "uc_match": "23ea-fe0f",
  93455. "uc_greedy": "23ea-fe0f",
  93456. "shortnames": [],
  93457. "category": "symbols"
  93458. },
  93459. ":sagittarius:": {
  93460. "uc_base": "2650",
  93461. "uc_output": "2650",
  93462. "uc_match": "2650-fe0f",
  93463. "uc_greedy": "2650-fe0f",
  93464. "shortnames": [],
  93465. "category": "symbols"
  93466. },
  93467. ":sailboat:": {
  93468. "uc_base": "26f5",
  93469. "uc_output": "26f5",
  93470. "uc_match": "26f5-fe0f",
  93471. "uc_greedy": "26f5-fe0f",
  93472. "shortnames": [],
  93473. "category": "travel"
  93474. },
  93475. ":scales:": {
  93476. "uc_base": "2696",
  93477. "uc_output": "2696",
  93478. "uc_match": "2696-fe0f",
  93479. "uc_greedy": "2696-fe0f",
  93480. "shortnames": [],
  93481. "category": "objects"
  93482. },
  93483. ":scissors:": {
  93484. "uc_base": "2702",
  93485. "uc_output": "2702",
  93486. "uc_match": "2702-fe0f",
  93487. "uc_greedy": "2702-fe0f",
  93488. "shortnames": [],
  93489. "category": "objects"
  93490. },
  93491. ":scorpius:": {
  93492. "uc_base": "264f",
  93493. "uc_output": "264f",
  93494. "uc_match": "264f-fe0f",
  93495. "uc_greedy": "264f-fe0f",
  93496. "shortnames": [],
  93497. "category": "symbols"
  93498. },
  93499. ":secret:": {
  93500. "uc_base": "3299",
  93501. "uc_output": "3299",
  93502. "uc_match": "3299-fe0f",
  93503. "uc_greedy": "3299-fe0f",
  93504. "shortnames": [],
  93505. "category": "symbols"
  93506. },
  93507. ":shamrock:": {
  93508. "uc_base": "2618",
  93509. "uc_output": "2618",
  93510. "uc_match": "2618-fe0f",
  93511. "uc_greedy": "2618-fe0f",
  93512. "shortnames": [],
  93513. "category": "nature"
  93514. },
  93515. ":shinto_shrine:": {
  93516. "uc_base": "26e9",
  93517. "uc_output": "26e9",
  93518. "uc_match": "26e9-fe0f",
  93519. "uc_greedy": "26e9-fe0f",
  93520. "shortnames": [],
  93521. "category": "travel"
  93522. },
  93523. ":skier:": {
  93524. "uc_base": "26f7",
  93525. "uc_output": "26f7",
  93526. "uc_match": "26f7-fe0f",
  93527. "uc_greedy": "26f7-fe0f",
  93528. "shortnames": [],
  93529. "category": "activity"
  93530. },
  93531. ":skull_crossbones:": {
  93532. "uc_base": "2620",
  93533. "uc_output": "2620",
  93534. "uc_match": "2620-fe0f",
  93535. "uc_greedy": "2620-fe0f",
  93536. "shortnames": [":skull_and_crossbones:"],
  93537. "category": "people"
  93538. },
  93539. ":snowflake:": {
  93540. "uc_base": "2744",
  93541. "uc_output": "2744",
  93542. "uc_match": "2744-fe0f",
  93543. "uc_greedy": "2744-fe0f",
  93544. "shortnames": [],
  93545. "category": "nature"
  93546. },
  93547. ":snowman2:": {
  93548. "uc_base": "2603",
  93549. "uc_output": "2603",
  93550. "uc_match": "2603-fe0f",
  93551. "uc_greedy": "2603-fe0f",
  93552. "shortnames": [],
  93553. "category": "nature"
  93554. },
  93555. ":snowman:": {
  93556. "uc_base": "26c4",
  93557. "uc_output": "26c4",
  93558. "uc_match": "26c4-fe0f",
  93559. "uc_greedy": "26c4-fe0f",
  93560. "shortnames": [],
  93561. "category": "nature"
  93562. },
  93563. ":soccer:": {
  93564. "uc_base": "26bd",
  93565. "uc_output": "26bd",
  93566. "uc_match": "26bd-fe0f",
  93567. "uc_greedy": "26bd-fe0f",
  93568. "shortnames": [],
  93569. "category": "activity"
  93570. },
  93571. ":spades:": {
  93572. "uc_base": "2660",
  93573. "uc_output": "2660",
  93574. "uc_match": "2660-fe0f",
  93575. "uc_greedy": "2660-fe0f",
  93576. "shortnames": [],
  93577. "category": "symbols"
  93578. },
  93579. ":sparkle:": {
  93580. "uc_base": "2747",
  93581. "uc_output": "2747",
  93582. "uc_match": "2747-fe0f",
  93583. "uc_greedy": "2747-fe0f",
  93584. "shortnames": [],
  93585. "category": "symbols"
  93586. },
  93587. ":sparkles:": {
  93588. "uc_base": "2728",
  93589. "uc_output": "2728",
  93590. "uc_match": "2728",
  93591. "uc_greedy": "2728",
  93592. "shortnames": [],
  93593. "category": "nature"
  93594. },
  93595. ":star:": {
  93596. "uc_base": "2b50",
  93597. "uc_output": "2b50",
  93598. "uc_match": "2b50-fe0f",
  93599. "uc_greedy": "2b50-fe0f",
  93600. "shortnames": [],
  93601. "category": "nature"
  93602. },
  93603. ":star_and_crescent:": {
  93604. "uc_base": "262a",
  93605. "uc_output": "262a",
  93606. "uc_match": "262a-fe0f",
  93607. "uc_greedy": "262a",
  93608. "shortnames": [],
  93609. "category": "symbols"
  93610. },
  93611. ":star_of_david:": {
  93612. "uc_base": "2721",
  93613. "uc_output": "2721",
  93614. "uc_match": "2721-fe0f",
  93615. "uc_greedy": "2721",
  93616. "shortnames": [],
  93617. "category": "symbols"
  93618. },
  93619. ":stop_button:": {
  93620. "uc_base": "23f9",
  93621. "uc_output": "23f9",
  93622. "uc_match": "23f9-fe0f",
  93623. "uc_greedy": "23f9",
  93624. "shortnames": [],
  93625. "category": "symbols"
  93626. },
  93627. ":stopwatch:": {
  93628. "uc_base": "23f1",
  93629. "uc_output": "23f1",
  93630. "uc_match": "23f1-fe0f",
  93631. "uc_greedy": "23f1-fe0f",
  93632. "shortnames": [],
  93633. "category": "objects"
  93634. },
  93635. ":sunny:": {
  93636. "uc_base": "2600",
  93637. "uc_output": "2600",
  93638. "uc_match": "2600-fe0f",
  93639. "uc_greedy": "2600-fe0f",
  93640. "shortnames": [],
  93641. "category": "nature"
  93642. },
  93643. ":taurus:": {
  93644. "uc_base": "2649",
  93645. "uc_output": "2649",
  93646. "uc_match": "2649-fe0f",
  93647. "uc_greedy": "2649-fe0f",
  93648. "shortnames": [],
  93649. "category": "symbols"
  93650. },
  93651. ":telephone:": {
  93652. "uc_base": "260e",
  93653. "uc_output": "260e",
  93654. "uc_match": "260e-fe0f",
  93655. "uc_greedy": "260e-fe0f",
  93656. "shortnames": [],
  93657. "category": "objects"
  93658. },
  93659. ":tent:": {
  93660. "uc_base": "26fa",
  93661. "uc_output": "26fa",
  93662. "uc_match": "26fa-fe0f",
  93663. "uc_greedy": "26fa-fe0f",
  93664. "shortnames": [],
  93665. "category": "travel"
  93666. },
  93667. ":thunder_cloud_rain:": {
  93668. "uc_base": "26c8",
  93669. "uc_output": "26c8",
  93670. "uc_match": "26c8-fe0f",
  93671. "uc_greedy": "26c8-fe0f",
  93672. "shortnames": [":thunder_cloud_and_rain:"],
  93673. "category": "nature"
  93674. },
  93675. ":timer:": {
  93676. "uc_base": "23f2",
  93677. "uc_output": "23f2",
  93678. "uc_match": "23f2-fe0f",
  93679. "uc_greedy": "23f2-fe0f",
  93680. "shortnames": [":timer_clock:"],
  93681. "category": "objects"
  93682. },
  93683. ":tm:": {
  93684. "uc_base": "2122",
  93685. "uc_output": "2122",
  93686. "uc_match": "2122-fe0f",
  93687. "uc_greedy": "2122",
  93688. "shortnames": [],
  93689. "category": "symbols"
  93690. },
  93691. ":track_next:": {
  93692. "uc_base": "23ed",
  93693. "uc_output": "23ed",
  93694. "uc_match": "23ed-fe0f",
  93695. "uc_greedy": "23ed",
  93696. "shortnames": [":next_track:"],
  93697. "category": "symbols"
  93698. },
  93699. ":track_previous:": {
  93700. "uc_base": "23ee",
  93701. "uc_output": "23ee",
  93702. "uc_match": "23ee-fe0f",
  93703. "uc_greedy": "23ee",
  93704. "shortnames": [":previous_track:"],
  93705. "category": "symbols"
  93706. },
  93707. ":umbrella2:": {
  93708. "uc_base": "2602",
  93709. "uc_output": "2602",
  93710. "uc_match": "2602-fe0f",
  93711. "uc_greedy": "2602-fe0f",
  93712. "shortnames": [],
  93713. "category": "nature"
  93714. },
  93715. ":umbrella:": {
  93716. "uc_base": "2614",
  93717. "uc_output": "2614",
  93718. "uc_match": "2614-fe0f",
  93719. "uc_greedy": "2614-fe0f",
  93720. "shortnames": [],
  93721. "category": "nature"
  93722. },
  93723. ":urn:": {
  93724. "uc_base": "26b1",
  93725. "uc_output": "26b1",
  93726. "uc_match": "26b1-fe0f",
  93727. "uc_greedy": "26b1-fe0f",
  93728. "shortnames": [":funeral_urn:"],
  93729. "category": "objects"
  93730. },
  93731. ":v:": {
  93732. "uc_base": "270c",
  93733. "uc_output": "270c",
  93734. "uc_match": "270c-fe0f",
  93735. "uc_greedy": "270c-fe0f",
  93736. "shortnames": [],
  93737. "category": "people"
  93738. },
  93739. ":virgo:": {
  93740. "uc_base": "264d",
  93741. "uc_output": "264d",
  93742. "uc_match": "264d-fe0f",
  93743. "uc_greedy": "264d-fe0f",
  93744. "shortnames": [],
  93745. "category": "symbols"
  93746. },
  93747. ":warning:": {
  93748. "uc_base": "26a0",
  93749. "uc_output": "26a0",
  93750. "uc_match": "26a0-fe0f",
  93751. "uc_greedy": "26a0",
  93752. "shortnames": [],
  93753. "category": "symbols"
  93754. },
  93755. ":watch:": {
  93756. "uc_base": "231a",
  93757. "uc_output": "231a",
  93758. "uc_match": "231a-fe0f",
  93759. "uc_greedy": "231a-fe0f",
  93760. "shortnames": [],
  93761. "category": "objects"
  93762. },
  93763. ":wavy_dash:": {
  93764. "uc_base": "3030",
  93765. "uc_output": "3030",
  93766. "uc_match": "3030-fe0f",
  93767. "uc_greedy": "3030",
  93768. "shortnames": [],
  93769. "category": "symbols"
  93770. },
  93771. ":wheel_of_dharma:": {
  93772. "uc_base": "2638",
  93773. "uc_output": "2638",
  93774. "uc_match": "2638-fe0f",
  93775. "uc_greedy": "2638",
  93776. "shortnames": [],
  93777. "category": "symbols"
  93778. },
  93779. ":wheelchair:": {
  93780. "uc_base": "267f",
  93781. "uc_output": "267f",
  93782. "uc_match": "267f-fe0f",
  93783. "uc_greedy": "267f-fe0f",
  93784. "shortnames": [],
  93785. "category": "symbols"
  93786. },
  93787. ":white_check_mark:": {
  93788. "uc_base": "2705",
  93789. "uc_output": "2705",
  93790. "uc_match": "2705",
  93791. "uc_greedy": "2705",
  93792. "shortnames": [],
  93793. "category": "symbols"
  93794. },
  93795. ":white_circle:": {
  93796. "uc_base": "26aa",
  93797. "uc_output": "26aa",
  93798. "uc_match": "26aa-fe0f",
  93799. "uc_greedy": "26aa-fe0f",
  93800. "shortnames": [],
  93801. "category": "symbols"
  93802. },
  93803. ":white_large_square:": {
  93804. "uc_base": "2b1c",
  93805. "uc_output": "2b1c",
  93806. "uc_match": "2b1c-fe0f",
  93807. "uc_greedy": "2b1c-fe0f",
  93808. "shortnames": [],
  93809. "category": "symbols"
  93810. },
  93811. ":white_medium_small_square:": {
  93812. "uc_base": "25fd",
  93813. "uc_output": "25fd",
  93814. "uc_match": "25fd-fe0f",
  93815. "uc_greedy": "25fd-fe0f",
  93816. "shortnames": [],
  93817. "category": "symbols"
  93818. },
  93819. ":white_medium_square:": {
  93820. "uc_base": "25fb",
  93821. "uc_output": "25fb",
  93822. "uc_match": "25fb-fe0f",
  93823. "uc_greedy": "25fb",
  93824. "shortnames": [],
  93825. "category": "symbols"
  93826. },
  93827. ":white_small_square:": {
  93828. "uc_base": "25ab",
  93829. "uc_output": "25ab",
  93830. "uc_match": "25ab-fe0f",
  93831. "uc_greedy": "25ab",
  93832. "shortnames": [],
  93833. "category": "symbols"
  93834. },
  93835. ":writing_hand:": {
  93836. "uc_base": "270d",
  93837. "uc_output": "270d",
  93838. "uc_match": "270d-fe0f",
  93839. "uc_greedy": "270d-fe0f",
  93840. "shortnames": [],
  93841. "category": "people"
  93842. },
  93843. ":x:": {
  93844. "uc_base": "274c",
  93845. "uc_output": "274c",
  93846. "uc_match": "274c",
  93847. "uc_greedy": "274c",
  93848. "shortnames": [],
  93849. "category": "symbols"
  93850. },
  93851. ":yin_yang:": {
  93852. "uc_base": "262f",
  93853. "uc_output": "262f",
  93854. "uc_match": "262f-fe0f",
  93855. "uc_greedy": "262f",
  93856. "shortnames": [],
  93857. "category": "symbols"
  93858. },
  93859. ":zap:": {
  93860. "uc_base": "26a1",
  93861. "uc_output": "26a1",
  93862. "uc_match": "26a1-fe0f",
  93863. "uc_greedy": "26a1-fe0f",
  93864. "shortnames": [],
  93865. "category": "nature"
  93866. }
  93867. };
  93868. const ascii_list = {
  93869. '*\\0/*': '1f646',
  93870. '*\\O/*': '1f646',
  93871. '-___-': '1f611',
  93872. ':\'-)': '1f602',
  93873. '\':-)': '1f605',
  93874. '\':-D': '1f605',
  93875. '>:-)': '1f606',
  93876. '\':-(': '1f613',
  93877. '>:-(': '1f620',
  93878. ':\'-(': '1f622',
  93879. 'O:-)': '1f607',
  93880. '0:-3': '1f607',
  93881. '0:-)': '1f607',
  93882. '0;^)': '1f607',
  93883. 'O;-)': '1f607',
  93884. '0;-)': '1f607',
  93885. 'O:-3': '1f607',
  93886. '-__-': '1f611',
  93887. ':-Þ': '1f61b',
  93888. '</3': '1f494',
  93889. ':\')': '1f602',
  93890. ':-D': '1f603',
  93891. '\':)': '1f605',
  93892. '\'=)': '1f605',
  93893. '\':D': '1f605',
  93894. '\'=D': '1f605',
  93895. '>:)': '1f606',
  93896. '>;)': '1f606',
  93897. '>=)': '1f606',
  93898. ';-)': '1f609',
  93899. '*-)': '1f609',
  93900. ';-]': '1f609',
  93901. ';^)': '1f609',
  93902. '\':(': '1f613',
  93903. '\'=(': '1f613',
  93904. ':-*': '1f618',
  93905. ':^*': '1f618',
  93906. '>:P': '1f61c',
  93907. 'X-P': '1f61c',
  93908. '>:[': '1f61e',
  93909. ':-(': '1f61e',
  93910. ':-[': '1f61e',
  93911. '>:(': '1f620',
  93912. ':\'(': '1f622',
  93913. ';-(': '1f622',
  93914. '>.<': '1f623',
  93915. '#-)': '1f635',
  93916. '%-)': '1f635',
  93917. 'X-)': '1f635',
  93918. '\\0/': '1f646',
  93919. '\\O/': '1f646',
  93920. '0:3': '1f607',
  93921. '0:)': '1f607',
  93922. 'O:)': '1f607',
  93923. 'O=)': '1f607',
  93924. 'O:3': '1f607',
  93925. 'B-)': '1f60e',
  93926. '8-)': '1f60e',
  93927. 'B-D': '1f60e',
  93928. '8-D': '1f60e',
  93929. '-_-': '1f611',
  93930. '>:\\': '1f615',
  93931. '>:/': '1f615',
  93932. ':-/': '1f615',
  93933. ':-.': '1f615',
  93934. ':-P': '1f61b',
  93935. ':Þ': '1f61b',
  93936. ':-b': '1f61b',
  93937. ':-O': '1f62e',
  93938. 'O_O': '1f62e',
  93939. '>:O': '1f62e',
  93940. ':-X': '1f636',
  93941. ':-#': '1f636',
  93942. ':-)': '1f642',
  93943. '(y)': '1f44d',
  93944. '<3': '2764',
  93945. ':D': '1f603',
  93946. '=D': '1f603',
  93947. ';)': '1f609',
  93948. '*)': '1f609',
  93949. ';]': '1f609',
  93950. ';D': '1f609',
  93951. ':*': '1f618',
  93952. '=*': '1f618',
  93953. ':(': '1f61e',
  93954. ':[': '1f61e',
  93955. '=(': '1f61e',
  93956. ':@': '1f620',
  93957. ';(': '1f622',
  93958. 'D:': '1f628',
  93959. ':$': '1f633',
  93960. '=$': '1f633',
  93961. '#)': '1f635',
  93962. '%)': '1f635',
  93963. 'X)': '1f635',
  93964. 'B)': '1f60e',
  93965. '8)': '1f60e',
  93966. ':/': '1f615',
  93967. ':\\': '1f615',
  93968. '=/': '1f615',
  93969. '=\\': '1f615',
  93970. ':L': '1f615',
  93971. '=L': '1f615',
  93972. ':P': '1f61b',
  93973. '=P': '1f61b',
  93974. ':b': '1f61b',
  93975. ':O': '1f62e',
  93976. ':X': '1f636',
  93977. ':#': '1f636',
  93978. '=X': '1f636',
  93979. '=#': '1f636',
  93980. ':)': '1f642',
  93981. '=]': '1f642',
  93982. '=)': '1f642',
  93983. ':]': '1f642'
  93984. };
  93985. let shortnames = [];
  93986. for (var emoji in emoji_list) {
  93987. if (!Object.prototype.hasOwnProperty.call(emoji_list, emoji) || emoji === '') continue;
  93988. shortnames.push(emoji.replace(/[+]/g, "\\$&"));
  93989. for (var i = 0; i < emoji_list[emoji].shortnames.length; i++) {
  93990. shortnames.push(emoji_list[emoji].shortnames[i].replace(/[+]/g, "\\$&"));
  93991. }
  93992. }
  93993. shortnames = shortnames.join('|');
  93994. const SHORTNAMES_REGEX = new RegExp("<object[^>]*>.*?<\/object>|<span[^>]*>.*?<\/span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|(" + shortnames + ")", "gi");
  93995. const ASCII_REGEX = '(\\*\\\\0\\/\\*|\\*\\\\O\\/\\*|\\-___\\-|\\:\'\\-\\)|\'\\:\\-\\)|\'\\:\\-D|\\>\\:\\-\\)|>\\:\\-\\)|\'\\:\\-\\(|\\>\\:\\-\\(|>\\:\\-\\(|\\:\'\\-\\(|O\\:\\-\\)|0\\:\\-3|0\\:\\-\\)|0;\\^\\)|O;\\-\\)|0;\\-\\)|O\\:\\-3|\\-__\\-|\\:\\-Þ|\\:\\-Þ|\\<\\/3|<\\/3|\\:\'\\)|\\:\\-D|\'\\:\\)|\'\\=\\)|\'\\:D|\'\\=D|\\>\\:\\)|>\\:\\)|\\>;\\)|>;\\)|\\>\\=\\)|>\\=\\)|;\\-\\)|\\*\\-\\)|;\\-\\]|;\\^\\)|\'\\:\\(|\'\\=\\(|\\:\\-\\*|\\:\\^\\*|\\>\\:P|>\\:P|X\\-P|\\>\\:\\[|>\\:\\[|\\:\\-\\(|\\:\\-\\[|\\>\\:\\(|>\\:\\(|\\:\'\\(|;\\-\\(|\\>\\.\\<|>\\.<|#\\-\\)|%\\-\\)|X\\-\\)|\\\\0\\/|\\\\O\\/|0\\:3|0\\:\\)|O\\:\\)|O\\=\\)|O\\:3|B\\-\\)|8\\-\\)|B\\-D|8\\-D|\\-_\\-|\\>\\:\\\\|>\\:\\\\|\\>\\:\\/|>\\:\\/|\\:\\-\\/|\\:\\-\\.|\\:\\-P|\\:Þ|\\:Þ|\\:\\-b|\\:\\-O|O_O|\\>\\:O|>\\:O|\\:\\-X|\\:\\-#|\\:\\-\\)|\\(y\\)|\\<3|<3|\\:D|\\=D|;\\)|\\*\\)|;\\]|;D|\\:\\*|\\=\\*|\\:\\(|\\:\\[|\\=\\(|\\:@|;\\(|D\\:|\\:\\$|\\=\\$|#\\)|%\\)|X\\)|B\\)|8\\)|\\:\\/|\\:\\\\|\\=\\/|\\=\\\\|\\:L|\\=L|\\:P|\\=P|\\:b|\\:O|\\:X|\\:#|\\=X|\\=#|\\:\\)|\\=\\]|\\=\\)|\\:\\])';
  93996. const ASCII_REPLACE_REGEX = new RegExp("<object[^>]*>.*?<\/object>|<span[^>]*>.*?<\/span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|((\\s|^)" + ASCII_REGEX + "(?=\\s|$|[!,.?]))", "gi");
  93997. function convert(unicode) {
  93998. /* For converting unicode code points and code pairs
  93999. * to their respective characters
  94000. */
  94001. if (unicode.indexOf("-") > -1) {
  94002. const parts = [],
  94003. s = unicode.split('-');
  94004. for (let i = 0; i < s.length; i++) {
  94005. let part = parseInt(s[i], 16);
  94006. if (part >= 0x10000 && part <= 0x10FFFF) {
  94007. const hi = Math.floor((part - 0x10000) / 0x400) + 0xD800;
  94008. const lo = (part - 0x10000) % 0x400 + 0xDC00;
  94009. part = String.fromCharCode(hi) + String.fromCharCode(lo);
  94010. } else {
  94011. part = String.fromCharCode(part);
  94012. }
  94013. parts.push(part);
  94014. }
  94015. return parts.join('');
  94016. }
  94017. return twemoji.default.convert.fromCodePoint(unicode);
  94018. }
  94019. u.shortnameToUnicode = function (str) {
  94020. /* will output unicode from shortname
  94021. * useful for sending emojis back to mobile devices
  94022. */
  94023. // Replace regular shortnames first
  94024. str = str.replace(SHORTNAMES_REGEX, shortname => {
  94025. if (typeof shortname === 'undefined' || shortname === '' || !(shortname in emoji_list)) {
  94026. // if the shortname doesnt exist just return the entire matchhju
  94027. return shortname;
  94028. }
  94029. const unicode = emoji_list[shortname].uc_output.toUpperCase();
  94030. return convert(unicode);
  94031. }); // Also replace ASCII smileys
  94032. str = str.replace(ASCII_REPLACE_REGEX, (entire, m1, m2, m3) => {
  94033. if (typeof m3 === 'undefined' || m3 === '' || !(u.unescapeHTML(m3) in ascii_list)) {
  94034. // if the ascii doesnt exist just return the entire match
  94035. return entire;
  94036. }
  94037. m3 = u.unescapeHTML(m3);
  94038. const unicode = ascii_list[m3].toUpperCase();
  94039. return m2 + convert(unicode);
  94040. });
  94041. return str;
  94042. };
  94043. u.addEmoji = function (_converse, text) {
  94044. if (_converse.use_system_emojis) {
  94045. return u.shortnameToUnicode(text);
  94046. } else {
  94047. return twemoji.default.parse(text);
  94048. }
  94049. };
  94050. u.getEmojisByCategory = function (_converse) {
  94051. /* Return a dict of emojis with the categories as keys and
  94052. * lists of emojis in that category as values.
  94053. */
  94054. if (_.isUndefined(_converse.emojis_by_category)) {
  94055. const emojis = _.values(_.mapValues(emoji_list, function (value, key, o) {
  94056. value._shortname = key;
  94057. return value;
  94058. }));
  94059. const tones = [':tone1:', ':tone2:', ':tone3:', ':tone4:', ':tone5:'];
  94060. const excluded = [':kiss_ww:', ':kiss_mm:', ':kiss_woman_man:'];
  94061. const excluded_substrings = [':woman', ':man', ':women_', ':men_', '_man_', '_woman_', '_woman:', '_man:'];
  94062. const excluded_categories = ['modifier', 'regional'];
  94063. const categories = _.difference(_.uniq(_.map(emojis, _.partial(_.get, _, 'category'))), excluded_categories);
  94064. const emojis_by_category = {};
  94065. _.forEach(categories, cat => {
  94066. let list = _.sortBy(_.filter(emojis, ['category', cat]), ['uc_base']);
  94067. list = _.filter(list, item => !_.includes(_.concat(tones, excluded), item._shortname) && !_.some(excluded_substrings, _.partial(_.includes, item._shortname)));
  94068. if (cat === 'people') {
  94069. const idx = _.findIndex(list, ['uc_base', '1f600']);
  94070. list = _.union(_.slice(list, idx), _.slice(list, 0, idx + 1));
  94071. } else if (cat === 'activity') {
  94072. list = _.union(_.slice(list, 27 - 1), _.slice(list, 0, 27));
  94073. } else if (cat === 'objects') {
  94074. list = _.union(_.slice(list, 24 - 1), _.slice(list, 0, 24));
  94075. } else if (cat === 'travel') {
  94076. list = _.union(_.slice(list, 17 - 1), _.slice(list, 0, 17));
  94077. } else if (cat === 'symbols') {
  94078. list = _.union(_.slice(list, 60 - 1), _.slice(list, 0, 60));
  94079. }
  94080. emojis_by_category[cat] = list;
  94081. });
  94082. _converse.emojis_by_category = emojis_by_category;
  94083. }
  94084. return _converse.emojis_by_category;
  94085. };
  94086. u.getTonedEmojis = function (_converse) {
  94087. _converse.toned_emojis = _.uniq(_.map(_.filter(u.getEmojisByCategory(_converse).people, person => _.includes(person._shortname, '_tone')), person => person._shortname.replace(/_tone[1-5]/, '')));
  94088. return _converse.toned_emojis;
  94089. };
  94090. u.getEmojiRenderer = function (_converse) {
  94091. return _converse.use_system_emojis ? u.shortnameToUnicode : _.flow(u.shortnameToUnicode, twemoji.default.parse);
  94092. };
  94093. return u;
  94094. });
  94095. /***/ }),
  94096. /***/ "./src/utils/form.js":
  94097. /*!***************************!*\
  94098. !*** ./src/utils/form.js ***!
  94099. \***************************/
  94100. /*! no static exports found */
  94101. /***/ (function(module, exports, __webpack_require__) {
  94102. "use strict";
  94103. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  94104. // Converse.js (A browser based XMPP chat client)
  94105. // http://conversejs.org
  94106. //
  94107. // This is the utilities module.
  94108. //
  94109. // Copyright (c) 2013-2018, Jan-Carel Brand <jc@opkode.com>
  94110. // Licensed under the Mozilla Public License (MPLv2)
  94111. //
  94112. /*global define, escape, Jed */
  94113. (function (root, factory) {
  94114. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! sizzle */ "./node_modules/sizzle/dist/sizzle.js"), __webpack_require__(/*! lodash.noconflict */ "./src/lodash.noconflict.js"), __webpack_require__(/*! utils/core */ "./src/utils/core.js"), __webpack_require__(/*! templates/field.html */ "./src/templates/field.html"), __webpack_require__(/*! templates/select_option.html */ "./src/templates/select_option.html"), __webpack_require__(/*! templates/form_select.html */ "./src/templates/form_select.html"), __webpack_require__(/*! templates/form_textarea.html */ "./src/templates/form_textarea.html"), __webpack_require__(/*! templates/form_checkbox.html */ "./src/templates/form_checkbox.html"), __webpack_require__(/*! templates/form_username.html */ "./src/templates/form_username.html"), __webpack_require__(/*! templates/form_input.html */ "./src/templates/form_input.html"), __webpack_require__(/*! templates/form_captcha.html */ "./src/templates/form_captcha.html"), __webpack_require__(/*! templates/form_url.html */ "./src/templates/form_url.html")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  94115. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  94116. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  94117. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  94118. })(void 0, function (sizzle, _, u, tpl_field, tpl_select_option, tpl_form_select, tpl_form_textarea, tpl_form_checkbox, tpl_form_username, tpl_form_input, tpl_form_captcha, tpl_form_url) {
  94119. "use strict";
  94120. var XFORM_TYPE_MAP = {
  94121. 'text-private': 'password',
  94122. 'text-single': 'text',
  94123. 'fixed': 'label',
  94124. 'boolean': 'checkbox',
  94125. 'hidden': 'hidden',
  94126. 'jid-multi': 'textarea',
  94127. 'list-single': 'dropdown',
  94128. 'list-multi': 'dropdown'
  94129. };
  94130. u.webForm2xForm = function (field) {
  94131. /* Takes an HTML DOM and turns it into an XForm field.
  94132. *
  94133. * Parameters:
  94134. * (DOMElement) field - the field to convert
  94135. */
  94136. let value;
  94137. if (field.getAttribute('type') === 'checkbox') {
  94138. value = field.checked && 1 || 0;
  94139. } else if (field.tagName == "TEXTAREA") {
  94140. value = _.filter(field.value.split('\n'), _.trim);
  94141. } else if (field.tagName == "SELECT") {
  94142. value = u.getSelectValues(field);
  94143. } else {
  94144. value = field.value;
  94145. }
  94146. return u.stringToNode(tpl_field({
  94147. 'name': field.getAttribute('name'),
  94148. 'value': value
  94149. }));
  94150. };
  94151. u.xForm2webForm = function (field, stanza, domain) {
  94152. /* Takes a field in XMPP XForm (XEP-004: Data Forms) format
  94153. * and turns it into an HTML field.
  94154. *
  94155. * Returns either text or a DOM element (which is not ideal, but fine
  94156. * for now).
  94157. *
  94158. * Parameters:
  94159. * (XMLElement) field - the field to convert
  94160. */
  94161. if (field.getAttribute('type')) {
  94162. if (field.getAttribute('type') === 'list-single' || field.getAttribute('type') === 'list-multi') {
  94163. const values = _.map(u.queryChildren(field, 'value'), _.partial(_.get, _, 'textContent'));
  94164. const options = _.map(u.queryChildren(field, 'option'), function (option) {
  94165. const value = _.get(option.querySelector('value'), 'textContent');
  94166. return tpl_select_option({
  94167. 'value': value,
  94168. 'label': option.getAttribute('label'),
  94169. 'selected': _.includes(values, value),
  94170. 'required': !_.isNil(field.querySelector('required'))
  94171. });
  94172. });
  94173. return tpl_form_select({
  94174. 'id': u.getUniqueId(),
  94175. 'name': field.getAttribute('var'),
  94176. 'label': field.getAttribute('label'),
  94177. 'options': options.join(''),
  94178. 'multiple': field.getAttribute('type') === 'list-multi',
  94179. 'required': !_.isNil(field.querySelector('required'))
  94180. });
  94181. } else if (field.getAttribute('type') === 'fixed') {
  94182. const text = _.get(field.querySelector('value'), 'textContent');
  94183. return '<p class="form-help">' + text + '</p>';
  94184. } else if (field.getAttribute('type') === 'jid-multi') {
  94185. return tpl_form_textarea({
  94186. 'name': field.getAttribute('var'),
  94187. 'label': field.getAttribute('label') || '',
  94188. 'value': _.get(field.querySelector('value'), 'textContent'),
  94189. 'required': !_.isNil(field.querySelector('required'))
  94190. });
  94191. } else if (field.getAttribute('type') === 'boolean') {
  94192. return tpl_form_checkbox({
  94193. 'id': u.getUniqueId(),
  94194. 'name': field.getAttribute('var'),
  94195. 'label': field.getAttribute('label') || '',
  94196. 'checked': _.get(field.querySelector('value'), 'textContent') === "1" && 'checked="1"' || '',
  94197. 'required': !_.isNil(field.querySelector('required'))
  94198. });
  94199. } else if (field.getAttribute('var') === 'url') {
  94200. return tpl_form_url({
  94201. 'label': field.getAttribute('label') || '',
  94202. 'value': _.get(field.querySelector('value'), 'textContent')
  94203. });
  94204. } else if (field.getAttribute('var') === 'username') {
  94205. return tpl_form_username({
  94206. 'domain': ' @' + domain,
  94207. 'name': field.getAttribute('var'),
  94208. 'type': XFORM_TYPE_MAP[field.getAttribute('type')],
  94209. 'label': field.getAttribute('label') || '',
  94210. 'value': _.get(field.querySelector('value'), 'textContent'),
  94211. 'required': !_.isNil(field.querySelector('required'))
  94212. });
  94213. } else {
  94214. return tpl_form_input({
  94215. 'id': u.getUniqueId(),
  94216. 'label': field.getAttribute('label') || '',
  94217. 'name': field.getAttribute('var'),
  94218. 'placeholder': null,
  94219. 'required': !_.isNil(field.querySelector('required')),
  94220. 'type': XFORM_TYPE_MAP[field.getAttribute('type')],
  94221. 'value': _.get(field.querySelector('value'), 'textContent')
  94222. });
  94223. }
  94224. } else {
  94225. if (field.getAttribute('var') === 'ocr') {
  94226. // Captcha
  94227. const uri = field.querySelector('uri');
  94228. const el = sizzle('data[cid="' + uri.textContent.replace(/^cid:/, '') + '"]', stanza)[0];
  94229. return tpl_form_captcha({
  94230. 'label': field.getAttribute('label'),
  94231. 'name': field.getAttribute('var'),
  94232. 'data': _.get(el, 'textContent'),
  94233. 'type': uri.getAttribute('type'),
  94234. 'required': !_.isNil(field.querySelector('required'))
  94235. });
  94236. }
  94237. }
  94238. };
  94239. return u;
  94240. });
  94241. /***/ }),
  94242. /***/ "./src/utils/muc.js":
  94243. /*!**************************!*\
  94244. !*** ./src/utils/muc.js ***!
  94245. \**************************/
  94246. /*! no static exports found */
  94247. /***/ (function(module, exports, __webpack_require__) {
  94248. "use strict";
  94249. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;
  94250. // Converse.js (A browser based XMPP chat client)
  94251. // http://conversejs.org
  94252. //
  94253. // This is the utilities module.
  94254. //
  94255. // Copyright (c) 2012-2017, Jan-Carel Brand <jc@opkode.com>
  94256. // Licensed under the Mozilla Public License (MPLv2)
  94257. //
  94258. /*global define, escape, Jed */
  94259. (function (root, factory) {
  94260. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! converse-core */ "./src/converse-core.js"), __webpack_require__(/*! utils/core */ "./src/utils/core.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  94261. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  94262. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  94263. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  94264. })(void 0, function (converse, u) {
  94265. "use strict";
  94266. const _converse$env = converse.env,
  94267. Strophe = _converse$env.Strophe,
  94268. sizzle = _converse$env.sizzle,
  94269. _ = _converse$env._;
  94270. u.computeAffiliationsDelta = function computeAffiliationsDelta(exclude_existing, remove_absentees, new_list, old_list) {
  94271. /* Given two lists of objects with 'jid', 'affiliation' and
  94272. * 'reason' properties, return a new list containing
  94273. * those objects that are new, changed or removed
  94274. * (depending on the 'remove_absentees' boolean).
  94275. *
  94276. * The affiliations for new and changed members stay the
  94277. * same, for removed members, the affiliation is set to 'none'.
  94278. *
  94279. * The 'reason' property is not taken into account when
  94280. * comparing whether affiliations have been changed.
  94281. *
  94282. * Parameters:
  94283. * (Boolean) exclude_existing: Indicates whether JIDs from
  94284. * the new list which are also in the old list
  94285. * (regardless of affiliation) should be excluded
  94286. * from the delta. One reason to do this
  94287. * would be when you want to add a JID only if it
  94288. * doesn't have *any* existing affiliation at all.
  94289. * (Boolean) remove_absentees: Indicates whether JIDs
  94290. * from the old list which are not in the new list
  94291. * should be considered removed and therefore be
  94292. * included in the delta with affiliation set
  94293. * to 'none'.
  94294. * (Array) new_list: Array containing the new affiliations
  94295. * (Array) old_list: Array containing the old affiliations
  94296. */
  94297. const new_jids = _.map(new_list, 'jid');
  94298. const old_jids = _.map(old_list, 'jid'); // Get the new affiliations
  94299. let delta = _.map(_.difference(new_jids, old_jids), jid => new_list[_.indexOf(new_jids, jid)]);
  94300. if (!exclude_existing) {
  94301. // Get the changed affiliations
  94302. delta = delta.concat(_.filter(new_list, function (item) {
  94303. const idx = _.indexOf(old_jids, item.jid);
  94304. if (idx >= 0) {
  94305. return item.affiliation !== old_list[idx].affiliation;
  94306. }
  94307. return false;
  94308. }));
  94309. }
  94310. if (remove_absentees) {
  94311. // Get the removed affiliations
  94312. delta = delta.concat(_.map(_.difference(old_jids, new_jids), jid => ({
  94313. 'jid': jid,
  94314. 'affiliation': 'none'
  94315. })));
  94316. }
  94317. return delta;
  94318. };
  94319. u.parseMemberListIQ = function parseMemberListIQ(iq) {
  94320. /* Given an IQ stanza with a member list, create an array of member objects.
  94321. */
  94322. return _.map(sizzle(`query[xmlns="${Strophe.NS.MUC_ADMIN}"] item`, iq), item => {
  94323. const data = {
  94324. 'affiliation': item.getAttribute('affiliation')
  94325. };
  94326. const jid = item.getAttribute('jid');
  94327. if (u.isValidJID(jid)) {
  94328. data['jid'] = jid;
  94329. } else {
  94330. // XXX: Prosody sends nick for the jid attribute value
  94331. // Perhaps for anonymous room?
  94332. data['nick'] = jid;
  94333. }
  94334. const nick = item.getAttribute('nick');
  94335. if (nick) {
  94336. data['nick'] = nick;
  94337. }
  94338. const role = item.getAttribute('role');
  94339. if (role) {
  94340. data['role'] = nick;
  94341. }
  94342. return data;
  94343. });
  94344. };
  94345. });
  94346. /***/ })
  94347. /******/ });
  94348. //# sourceMappingURL=converse.js.map