lodash.js 218 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459
  1. import {
  2. __commonJS,
  3. init_define_APP_INFO
  4. } from "./chunk-XY75H3MP.js";
  5. // node_modules/lodash/lodash.js
  6. var require_lodash = __commonJS({
  7. "node_modules/lodash/lodash.js"(exports, module) {
  8. init_define_APP_INFO();
  9. (function() {
  10. var undefined;
  11. var VERSION = "4.17.21";
  12. var LARGE_ARRAY_SIZE = 200;
  13. var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`";
  14. var HASH_UNDEFINED = "__lodash_hash_undefined__";
  15. var MAX_MEMOIZE_SIZE = 500;
  16. var PLACEHOLDER = "__lodash_placeholder__";
  17. var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
  18. var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
  19. var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_BOUND_FLAG = 4, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256, WRAP_FLIP_FLAG = 512;
  20. var DEFAULT_TRUNC_LENGTH = 30, DEFAULT_TRUNC_OMISSION = "...";
  21. var HOT_COUNT = 800, HOT_SPAN = 16;
  22. var LAZY_FILTER_FLAG = 1, LAZY_MAP_FLAG = 2, LAZY_WHILE_FLAG = 3;
  23. var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 17976931348623157e292, NAN = 0 / 0;
  24. var MAX_ARRAY_LENGTH = 4294967295, MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
  25. var wrapFlags = [
  26. ["ary", WRAP_ARY_FLAG],
  27. ["bind", WRAP_BIND_FLAG],
  28. ["bindKey", WRAP_BIND_KEY_FLAG],
  29. ["curry", WRAP_CURRY_FLAG],
  30. ["curryRight", WRAP_CURRY_RIGHT_FLAG],
  31. ["flip", WRAP_FLIP_FLAG],
  32. ["partial", WRAP_PARTIAL_FLAG],
  33. ["partialRight", WRAP_PARTIAL_RIGHT_FLAG],
  34. ["rearg", WRAP_REARG_FLAG]
  35. ];
  36. var argsTag = "[object Arguments]", arrayTag = "[object Array]", asyncTag = "[object AsyncFunction]", boolTag = "[object Boolean]", dateTag = "[object Date]", domExcTag = "[object DOMException]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", nullTag = "[object Null]", objectTag = "[object Object]", promiseTag = "[object Promise]", proxyTag = "[object Proxy]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", undefinedTag = "[object Undefined]", weakMapTag = "[object WeakMap]", weakSetTag = "[object WeakSet]";
  37. var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
  38. var reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
  39. var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, reUnescapedHtml = /[&<>"']/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
  40. var reEscape = /<%-([\s\S]+?)%>/g, reEvaluate = /<%([\s\S]+?)%>/g, reInterpolate = /<%=([\s\S]+?)%>/g;
  41. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  42. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source);
  43. var reTrimStart = /^\s+/;
  44. var reWhitespace = /\s/;
  45. var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /;
  46. var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
  47. var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
  48. var reEscapeChar = /\\(\\)?/g;
  49. var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
  50. var reFlags = /\w*$/;
  51. var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
  52. var reIsBinary = /^0b[01]+$/i;
  53. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  54. var reIsOctal = /^0o[0-7]+$/i;
  55. var reIsUint = /^(?:0|[1-9]\d*)$/;
  56. var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
  57. var reNoMatch = /($^)/;
  58. var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
  59. var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsDingbatRange = "\\u2700-\\u27bf", rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange = "\\u2000-\\u206f", 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", rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange = "\\ufe0e\\ufe0f", rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
  60. var rsApos = "['\u2019]", rsAstral = "[" + rsAstralRange + "]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboRange + "]", rsDigits = "\\d+", rsDingbat = "[" + rsDingbatRange + "]", rsLower = "[" + rsLowerRange + "]", rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper = "[" + rsUpperRange + "]", rsZWJ = "\\u200d";
  61. var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")", rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*", rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = "(?:" + [rsDingbat, rsRegional, rsSurrPair].join("|") + ")" + rsSeq, rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
  62. var reApos = RegExp(rsApos, "g");
  63. var reComboMark = RegExp(rsCombo, "g");
  64. var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
  65. var reUnicodeWord = RegExp([
  66. rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")",
  67. rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [rsBreak, rsUpper + rsMiscLower, "$"].join("|") + ")",
  68. rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower,
  69. rsUpper + "+" + rsOptContrUpper,
  70. rsOrdUpper,
  71. rsOrdLower,
  72. rsDigits,
  73. rsEmoji
  74. ].join("|"), "g");
  75. var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]");
  76. 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 ]/;
  77. var contextProps = [
  78. "Array",
  79. "Buffer",
  80. "DataView",
  81. "Date",
  82. "Error",
  83. "Float32Array",
  84. "Float64Array",
  85. "Function",
  86. "Int8Array",
  87. "Int16Array",
  88. "Int32Array",
  89. "Map",
  90. "Math",
  91. "Object",
  92. "Promise",
  93. "RegExp",
  94. "Set",
  95. "String",
  96. "Symbol",
  97. "TypeError",
  98. "Uint8Array",
  99. "Uint8ClampedArray",
  100. "Uint16Array",
  101. "Uint32Array",
  102. "WeakMap",
  103. "_",
  104. "clearTimeout",
  105. "isFinite",
  106. "parseInt",
  107. "setTimeout"
  108. ];
  109. var templateCounter = -1;
  110. var typedArrayTags = {};
  111. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
  112. typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
  113. var cloneableTags = {};
  114. cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  115. cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
  116. var deburredLetters = {
  117. "\xC0": "A",
  118. "\xC1": "A",
  119. "\xC2": "A",
  120. "\xC3": "A",
  121. "\xC4": "A",
  122. "\xC5": "A",
  123. "\xE0": "a",
  124. "\xE1": "a",
  125. "\xE2": "a",
  126. "\xE3": "a",
  127. "\xE4": "a",
  128. "\xE5": "a",
  129. "\xC7": "C",
  130. "\xE7": "c",
  131. "\xD0": "D",
  132. "\xF0": "d",
  133. "\xC8": "E",
  134. "\xC9": "E",
  135. "\xCA": "E",
  136. "\xCB": "E",
  137. "\xE8": "e",
  138. "\xE9": "e",
  139. "\xEA": "e",
  140. "\xEB": "e",
  141. "\xCC": "I",
  142. "\xCD": "I",
  143. "\xCE": "I",
  144. "\xCF": "I",
  145. "\xEC": "i",
  146. "\xED": "i",
  147. "\xEE": "i",
  148. "\xEF": "i",
  149. "\xD1": "N",
  150. "\xF1": "n",
  151. "\xD2": "O",
  152. "\xD3": "O",
  153. "\xD4": "O",
  154. "\xD5": "O",
  155. "\xD6": "O",
  156. "\xD8": "O",
  157. "\xF2": "o",
  158. "\xF3": "o",
  159. "\xF4": "o",
  160. "\xF5": "o",
  161. "\xF6": "o",
  162. "\xF8": "o",
  163. "\xD9": "U",
  164. "\xDA": "U",
  165. "\xDB": "U",
  166. "\xDC": "U",
  167. "\xF9": "u",
  168. "\xFA": "u",
  169. "\xFB": "u",
  170. "\xFC": "u",
  171. "\xDD": "Y",
  172. "\xFD": "y",
  173. "\xFF": "y",
  174. "\xC6": "Ae",
  175. "\xE6": "ae",
  176. "\xDE": "Th",
  177. "\xFE": "th",
  178. "\xDF": "ss",
  179. "\u0100": "A",
  180. "\u0102": "A",
  181. "\u0104": "A",
  182. "\u0101": "a",
  183. "\u0103": "a",
  184. "\u0105": "a",
  185. "\u0106": "C",
  186. "\u0108": "C",
  187. "\u010A": "C",
  188. "\u010C": "C",
  189. "\u0107": "c",
  190. "\u0109": "c",
  191. "\u010B": "c",
  192. "\u010D": "c",
  193. "\u010E": "D",
  194. "\u0110": "D",
  195. "\u010F": "d",
  196. "\u0111": "d",
  197. "\u0112": "E",
  198. "\u0114": "E",
  199. "\u0116": "E",
  200. "\u0118": "E",
  201. "\u011A": "E",
  202. "\u0113": "e",
  203. "\u0115": "e",
  204. "\u0117": "e",
  205. "\u0119": "e",
  206. "\u011B": "e",
  207. "\u011C": "G",
  208. "\u011E": "G",
  209. "\u0120": "G",
  210. "\u0122": "G",
  211. "\u011D": "g",
  212. "\u011F": "g",
  213. "\u0121": "g",
  214. "\u0123": "g",
  215. "\u0124": "H",
  216. "\u0126": "H",
  217. "\u0125": "h",
  218. "\u0127": "h",
  219. "\u0128": "I",
  220. "\u012A": "I",
  221. "\u012C": "I",
  222. "\u012E": "I",
  223. "\u0130": "I",
  224. "\u0129": "i",
  225. "\u012B": "i",
  226. "\u012D": "i",
  227. "\u012F": "i",
  228. "\u0131": "i",
  229. "\u0134": "J",
  230. "\u0135": "j",
  231. "\u0136": "K",
  232. "\u0137": "k",
  233. "\u0138": "k",
  234. "\u0139": "L",
  235. "\u013B": "L",
  236. "\u013D": "L",
  237. "\u013F": "L",
  238. "\u0141": "L",
  239. "\u013A": "l",
  240. "\u013C": "l",
  241. "\u013E": "l",
  242. "\u0140": "l",
  243. "\u0142": "l",
  244. "\u0143": "N",
  245. "\u0145": "N",
  246. "\u0147": "N",
  247. "\u014A": "N",
  248. "\u0144": "n",
  249. "\u0146": "n",
  250. "\u0148": "n",
  251. "\u014B": "n",
  252. "\u014C": "O",
  253. "\u014E": "O",
  254. "\u0150": "O",
  255. "\u014D": "o",
  256. "\u014F": "o",
  257. "\u0151": "o",
  258. "\u0154": "R",
  259. "\u0156": "R",
  260. "\u0158": "R",
  261. "\u0155": "r",
  262. "\u0157": "r",
  263. "\u0159": "r",
  264. "\u015A": "S",
  265. "\u015C": "S",
  266. "\u015E": "S",
  267. "\u0160": "S",
  268. "\u015B": "s",
  269. "\u015D": "s",
  270. "\u015F": "s",
  271. "\u0161": "s",
  272. "\u0162": "T",
  273. "\u0164": "T",
  274. "\u0166": "T",
  275. "\u0163": "t",
  276. "\u0165": "t",
  277. "\u0167": "t",
  278. "\u0168": "U",
  279. "\u016A": "U",
  280. "\u016C": "U",
  281. "\u016E": "U",
  282. "\u0170": "U",
  283. "\u0172": "U",
  284. "\u0169": "u",
  285. "\u016B": "u",
  286. "\u016D": "u",
  287. "\u016F": "u",
  288. "\u0171": "u",
  289. "\u0173": "u",
  290. "\u0174": "W",
  291. "\u0175": "w",
  292. "\u0176": "Y",
  293. "\u0177": "y",
  294. "\u0178": "Y",
  295. "\u0179": "Z",
  296. "\u017B": "Z",
  297. "\u017D": "Z",
  298. "\u017A": "z",
  299. "\u017C": "z",
  300. "\u017E": "z",
  301. "\u0132": "IJ",
  302. "\u0133": "ij",
  303. "\u0152": "Oe",
  304. "\u0153": "oe",
  305. "\u0149": "'n",
  306. "\u017F": "s"
  307. };
  308. var htmlEscapes = {
  309. "&": "&amp;",
  310. "<": "&lt;",
  311. ">": "&gt;",
  312. '"': "&quot;",
  313. "'": "&#39;"
  314. };
  315. var htmlUnescapes = {
  316. "&amp;": "&",
  317. "&lt;": "<",
  318. "&gt;": ">",
  319. "&quot;": '"',
  320. "&#39;": "'"
  321. };
  322. var stringEscapes = {
  323. "\\": "\\",
  324. "'": "'",
  325. "\n": "n",
  326. "\r": "r",
  327. "\u2028": "u2028",
  328. "\u2029": "u2029"
  329. };
  330. var freeParseFloat = parseFloat, freeParseInt = parseInt;
  331. var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
  332. var freeSelf = typeof self == "object" && self && self.Object === Object && self;
  333. var root = freeGlobal || freeSelf || Function("return this")();
  334. var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
  335. var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
  336. var moduleExports = freeModule && freeModule.exports === freeExports;
  337. var freeProcess = moduleExports && freeGlobal.process;
  338. var nodeUtil = function() {
  339. try {
  340. var types = freeModule && freeModule.require && freeModule.require("util").types;
  341. if (types) {
  342. return types;
  343. }
  344. return freeProcess && freeProcess.binding && freeProcess.binding("util");
  345. } catch (e) {
  346. }
  347. }();
  348. var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, nodeIsDate = nodeUtil && nodeUtil.isDate, nodeIsMap = nodeUtil && nodeUtil.isMap, nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, nodeIsSet = nodeUtil && nodeUtil.isSet, nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  349. function apply(func, thisArg, args) {
  350. switch (args.length) {
  351. case 0:
  352. return func.call(thisArg);
  353. case 1:
  354. return func.call(thisArg, args[0]);
  355. case 2:
  356. return func.call(thisArg, args[0], args[1]);
  357. case 3:
  358. return func.call(thisArg, args[0], args[1], args[2]);
  359. }
  360. return func.apply(thisArg, args);
  361. }
  362. function arrayAggregator(array, setter, iteratee, accumulator) {
  363. var index = -1, length = array == null ? 0 : array.length;
  364. while (++index < length) {
  365. var value = array[index];
  366. setter(accumulator, value, iteratee(value), array);
  367. }
  368. return accumulator;
  369. }
  370. function arrayEach(array, iteratee) {
  371. var index = -1, length = array == null ? 0 : array.length;
  372. while (++index < length) {
  373. if (iteratee(array[index], index, array) === false) {
  374. break;
  375. }
  376. }
  377. return array;
  378. }
  379. function arrayEachRight(array, iteratee) {
  380. var length = array == null ? 0 : array.length;
  381. while (length--) {
  382. if (iteratee(array[length], length, array) === false) {
  383. break;
  384. }
  385. }
  386. return array;
  387. }
  388. function arrayEvery(array, predicate) {
  389. var index = -1, length = array == null ? 0 : array.length;
  390. while (++index < length) {
  391. if (!predicate(array[index], index, array)) {
  392. return false;
  393. }
  394. }
  395. return true;
  396. }
  397. function arrayFilter(array, predicate) {
  398. var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
  399. while (++index < length) {
  400. var value = array[index];
  401. if (predicate(value, index, array)) {
  402. result[resIndex++] = value;
  403. }
  404. }
  405. return result;
  406. }
  407. function arrayIncludes(array, value) {
  408. var length = array == null ? 0 : array.length;
  409. return !!length && baseIndexOf(array, value, 0) > -1;
  410. }
  411. function arrayIncludesWith(array, value, comparator) {
  412. var index = -1, length = array == null ? 0 : array.length;
  413. while (++index < length) {
  414. if (comparator(value, array[index])) {
  415. return true;
  416. }
  417. }
  418. return false;
  419. }
  420. function arrayMap(array, iteratee) {
  421. var index = -1, length = array == null ? 0 : array.length, result = Array(length);
  422. while (++index < length) {
  423. result[index] = iteratee(array[index], index, array);
  424. }
  425. return result;
  426. }
  427. function arrayPush(array, values) {
  428. var index = -1, length = values.length, offset = array.length;
  429. while (++index < length) {
  430. array[offset + index] = values[index];
  431. }
  432. return array;
  433. }
  434. function arrayReduce(array, iteratee, accumulator, initAccum) {
  435. var index = -1, length = array == null ? 0 : array.length;
  436. if (initAccum && length) {
  437. accumulator = array[++index];
  438. }
  439. while (++index < length) {
  440. accumulator = iteratee(accumulator, array[index], index, array);
  441. }
  442. return accumulator;
  443. }
  444. function arrayReduceRight(array, iteratee, accumulator, initAccum) {
  445. var length = array == null ? 0 : array.length;
  446. if (initAccum && length) {
  447. accumulator = array[--length];
  448. }
  449. while (length--) {
  450. accumulator = iteratee(accumulator, array[length], length, array);
  451. }
  452. return accumulator;
  453. }
  454. function arraySome(array, predicate) {
  455. var index = -1, length = array == null ? 0 : array.length;
  456. while (++index < length) {
  457. if (predicate(array[index], index, array)) {
  458. return true;
  459. }
  460. }
  461. return false;
  462. }
  463. var asciiSize = baseProperty("length");
  464. function asciiToArray(string) {
  465. return string.split("");
  466. }
  467. function asciiWords(string) {
  468. return string.match(reAsciiWord) || [];
  469. }
  470. function baseFindKey(collection, predicate, eachFunc) {
  471. var result;
  472. eachFunc(collection, function(value, key, collection2) {
  473. if (predicate(value, key, collection2)) {
  474. result = key;
  475. return false;
  476. }
  477. });
  478. return result;
  479. }
  480. function baseFindIndex(array, predicate, fromIndex, fromRight) {
  481. var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
  482. while (fromRight ? index-- : ++index < length) {
  483. if (predicate(array[index], index, array)) {
  484. return index;
  485. }
  486. }
  487. return -1;
  488. }
  489. function baseIndexOf(array, value, fromIndex) {
  490. return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
  491. }
  492. function baseIndexOfWith(array, value, fromIndex, comparator) {
  493. var index = fromIndex - 1, length = array.length;
  494. while (++index < length) {
  495. if (comparator(array[index], value)) {
  496. return index;
  497. }
  498. }
  499. return -1;
  500. }
  501. function baseIsNaN(value) {
  502. return value !== value;
  503. }
  504. function baseMean(array, iteratee) {
  505. var length = array == null ? 0 : array.length;
  506. return length ? baseSum(array, iteratee) / length : NAN;
  507. }
  508. function baseProperty(key) {
  509. return function(object) {
  510. return object == null ? undefined : object[key];
  511. };
  512. }
  513. function basePropertyOf(object) {
  514. return function(key) {
  515. return object == null ? undefined : object[key];
  516. };
  517. }
  518. function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
  519. eachFunc(collection, function(value, index, collection2) {
  520. accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection2);
  521. });
  522. return accumulator;
  523. }
  524. function baseSortBy(array, comparer) {
  525. var length = array.length;
  526. array.sort(comparer);
  527. while (length--) {
  528. array[length] = array[length].value;
  529. }
  530. return array;
  531. }
  532. function baseSum(array, iteratee) {
  533. var result, index = -1, length = array.length;
  534. while (++index < length) {
  535. var current = iteratee(array[index]);
  536. if (current !== undefined) {
  537. result = result === undefined ? current : result + current;
  538. }
  539. }
  540. return result;
  541. }
  542. function baseTimes(n, iteratee) {
  543. var index = -1, result = Array(n);
  544. while (++index < n) {
  545. result[index] = iteratee(index);
  546. }
  547. return result;
  548. }
  549. function baseToPairs(object, props) {
  550. return arrayMap(props, function(key) {
  551. return [key, object[key]];
  552. });
  553. }
  554. function baseTrim(string) {
  555. return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
  556. }
  557. function baseUnary(func) {
  558. return function(value) {
  559. return func(value);
  560. };
  561. }
  562. function baseValues(object, props) {
  563. return arrayMap(props, function(key) {
  564. return object[key];
  565. });
  566. }
  567. function cacheHas(cache, key) {
  568. return cache.has(key);
  569. }
  570. function charsStartIndex(strSymbols, chrSymbols) {
  571. var index = -1, length = strSymbols.length;
  572. while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {
  573. }
  574. return index;
  575. }
  576. function charsEndIndex(strSymbols, chrSymbols) {
  577. var index = strSymbols.length;
  578. while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {
  579. }
  580. return index;
  581. }
  582. function countHolders(array, placeholder) {
  583. var length = array.length, result = 0;
  584. while (length--) {
  585. if (array[length] === placeholder) {
  586. ++result;
  587. }
  588. }
  589. return result;
  590. }
  591. var deburrLetter = basePropertyOf(deburredLetters);
  592. var escapeHtmlChar = basePropertyOf(htmlEscapes);
  593. function escapeStringChar(chr) {
  594. return "\\" + stringEscapes[chr];
  595. }
  596. function getValue(object, key) {
  597. return object == null ? undefined : object[key];
  598. }
  599. function hasUnicode(string) {
  600. return reHasUnicode.test(string);
  601. }
  602. function hasUnicodeWord(string) {
  603. return reHasUnicodeWord.test(string);
  604. }
  605. function iteratorToArray(iterator) {
  606. var data, result = [];
  607. while (!(data = iterator.next()).done) {
  608. result.push(data.value);
  609. }
  610. return result;
  611. }
  612. function mapToArray(map) {
  613. var index = -1, result = Array(map.size);
  614. map.forEach(function(value, key) {
  615. result[++index] = [key, value];
  616. });
  617. return result;
  618. }
  619. function overArg(func, transform) {
  620. return function(arg) {
  621. return func(transform(arg));
  622. };
  623. }
  624. function replaceHolders(array, placeholder) {
  625. var index = -1, length = array.length, resIndex = 0, result = [];
  626. while (++index < length) {
  627. var value = array[index];
  628. if (value === placeholder || value === PLACEHOLDER) {
  629. array[index] = PLACEHOLDER;
  630. result[resIndex++] = index;
  631. }
  632. }
  633. return result;
  634. }
  635. function setToArray(set) {
  636. var index = -1, result = Array(set.size);
  637. set.forEach(function(value) {
  638. result[++index] = value;
  639. });
  640. return result;
  641. }
  642. function setToPairs(set) {
  643. var index = -1, result = Array(set.size);
  644. set.forEach(function(value) {
  645. result[++index] = [value, value];
  646. });
  647. return result;
  648. }
  649. function strictIndexOf(array, value, fromIndex) {
  650. var index = fromIndex - 1, length = array.length;
  651. while (++index < length) {
  652. if (array[index] === value) {
  653. return index;
  654. }
  655. }
  656. return -1;
  657. }
  658. function strictLastIndexOf(array, value, fromIndex) {
  659. var index = fromIndex + 1;
  660. while (index--) {
  661. if (array[index] === value) {
  662. return index;
  663. }
  664. }
  665. return index;
  666. }
  667. function stringSize(string) {
  668. return hasUnicode(string) ? unicodeSize(string) : asciiSize(string);
  669. }
  670. function stringToArray(string) {
  671. return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);
  672. }
  673. function trimmedEndIndex(string) {
  674. var index = string.length;
  675. while (index-- && reWhitespace.test(string.charAt(index))) {
  676. }
  677. return index;
  678. }
  679. var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
  680. function unicodeSize(string) {
  681. var result = reUnicode.lastIndex = 0;
  682. while (reUnicode.test(string)) {
  683. ++result;
  684. }
  685. return result;
  686. }
  687. function unicodeToArray(string) {
  688. return string.match(reUnicode) || [];
  689. }
  690. function unicodeWords(string) {
  691. return string.match(reUnicodeWord) || [];
  692. }
  693. var runInContext = function runInContext2(context) {
  694. context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
  695. var Array2 = context.Array, Date = context.Date, Error = context.Error, Function2 = context.Function, Math = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String = context.String, TypeError = context.TypeError;
  696. var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
  697. var coreJsData = context["__core-js_shared__"];
  698. var funcToString = funcProto.toString;
  699. var hasOwnProperty = objectProto.hasOwnProperty;
  700. var idCounter = 0;
  701. var maskSrcKey = function() {
  702. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
  703. return uid ? "Symbol(src)_1." + uid : "";
  704. }();
  705. var nativeObjectToString = objectProto.toString;
  706. var objectCtorString = funcToString.call(Object2);
  707. var oldDash = root._;
  708. var reIsNative = RegExp2(
  709. "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
  710. );
  711. var Buffer = moduleExports ? context.Buffer : undefined, Symbol = context.Symbol, Uint8Array = context.Uint8Array, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, symIterator = Symbol ? Symbol.iterator : undefined, symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  712. var defineProperty = function() {
  713. try {
  714. var func = getNative(Object2, "defineProperty");
  715. func({}, "", {});
  716. return func;
  717. } catch (e) {
  718. }
  719. }();
  720. var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date && Date.now !== root.Date.now && Date.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
  721. var nativeCeil = Math.ceil, nativeFloor = Math.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math.max, nativeMin = Math.min, nativeNow = Date.now, nativeParseInt = context.parseInt, nativeRandom = Math.random, nativeReverse = arrayProto.reverse;
  722. var DataView = getNative(context, "DataView"), Map = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
  723. var metaMap = WeakMap && new WeakMap();
  724. var realNames = {};
  725. var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
  726. var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined;
  727. function lodash(value) {
  728. if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
  729. if (value instanceof LodashWrapper) {
  730. return value;
  731. }
  732. if (hasOwnProperty.call(value, "__wrapped__")) {
  733. return wrapperClone(value);
  734. }
  735. }
  736. return new LodashWrapper(value);
  737. }
  738. var baseCreate = function() {
  739. function object() {
  740. }
  741. return function(proto) {
  742. if (!isObject(proto)) {
  743. return {};
  744. }
  745. if (objectCreate) {
  746. return objectCreate(proto);
  747. }
  748. object.prototype = proto;
  749. var result2 = new object();
  750. object.prototype = undefined;
  751. return result2;
  752. };
  753. }();
  754. function baseLodash() {
  755. }
  756. function LodashWrapper(value, chainAll) {
  757. this.__wrapped__ = value;
  758. this.__actions__ = [];
  759. this.__chain__ = !!chainAll;
  760. this.__index__ = 0;
  761. this.__values__ = undefined;
  762. }
  763. lodash.templateSettings = {
  764. "escape": reEscape,
  765. "evaluate": reEvaluate,
  766. "interpolate": reInterpolate,
  767. "variable": "",
  768. "imports": {
  769. "_": lodash
  770. }
  771. };
  772. lodash.prototype = baseLodash.prototype;
  773. lodash.prototype.constructor = lodash;
  774. LodashWrapper.prototype = baseCreate(baseLodash.prototype);
  775. LodashWrapper.prototype.constructor = LodashWrapper;
  776. function LazyWrapper(value) {
  777. this.__wrapped__ = value;
  778. this.__actions__ = [];
  779. this.__dir__ = 1;
  780. this.__filtered__ = false;
  781. this.__iteratees__ = [];
  782. this.__takeCount__ = MAX_ARRAY_LENGTH;
  783. this.__views__ = [];
  784. }
  785. function lazyClone() {
  786. var result2 = new LazyWrapper(this.__wrapped__);
  787. result2.__actions__ = copyArray(this.__actions__);
  788. result2.__dir__ = this.__dir__;
  789. result2.__filtered__ = this.__filtered__;
  790. result2.__iteratees__ = copyArray(this.__iteratees__);
  791. result2.__takeCount__ = this.__takeCount__;
  792. result2.__views__ = copyArray(this.__views__);
  793. return result2;
  794. }
  795. function lazyReverse() {
  796. if (this.__filtered__) {
  797. var result2 = new LazyWrapper(this);
  798. result2.__dir__ = -1;
  799. result2.__filtered__ = true;
  800. } else {
  801. result2 = this.clone();
  802. result2.__dir__ *= -1;
  803. }
  804. return result2;
  805. }
  806. function lazyValue() {
  807. var array = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray(array), isRight = dir < 0, arrLength = isArr ? array.length : 0, view = getView(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start, index = isRight ? end : start - 1, iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin(length, this.__takeCount__);
  808. if (!isArr || !isRight && arrLength == length && takeCount == length) {
  809. return baseWrapperValue(array, this.__actions__);
  810. }
  811. var result2 = [];
  812. outer:
  813. while (length-- && resIndex < takeCount) {
  814. index += dir;
  815. var iterIndex = -1, value = array[index];
  816. while (++iterIndex < iterLength) {
  817. var data = iteratees[iterIndex], iteratee2 = data.iteratee, type = data.type, computed = iteratee2(value);
  818. if (type == LAZY_MAP_FLAG) {
  819. value = computed;
  820. } else if (!computed) {
  821. if (type == LAZY_FILTER_FLAG) {
  822. continue outer;
  823. } else {
  824. break outer;
  825. }
  826. }
  827. }
  828. result2[resIndex++] = value;
  829. }
  830. return result2;
  831. }
  832. LazyWrapper.prototype = baseCreate(baseLodash.prototype);
  833. LazyWrapper.prototype.constructor = LazyWrapper;
  834. function Hash(entries) {
  835. var index = -1, length = entries == null ? 0 : entries.length;
  836. this.clear();
  837. while (++index < length) {
  838. var entry = entries[index];
  839. this.set(entry[0], entry[1]);
  840. }
  841. }
  842. function hashClear() {
  843. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  844. this.size = 0;
  845. }
  846. function hashDelete(key) {
  847. var result2 = this.has(key) && delete this.__data__[key];
  848. this.size -= result2 ? 1 : 0;
  849. return result2;
  850. }
  851. function hashGet(key) {
  852. var data = this.__data__;
  853. if (nativeCreate) {
  854. var result2 = data[key];
  855. return result2 === HASH_UNDEFINED ? undefined : result2;
  856. }
  857. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  858. }
  859. function hashHas(key) {
  860. var data = this.__data__;
  861. return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
  862. }
  863. function hashSet(key, value) {
  864. var data = this.__data__;
  865. this.size += this.has(key) ? 0 : 1;
  866. data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;
  867. return this;
  868. }
  869. Hash.prototype.clear = hashClear;
  870. Hash.prototype["delete"] = hashDelete;
  871. Hash.prototype.get = hashGet;
  872. Hash.prototype.has = hashHas;
  873. Hash.prototype.set = hashSet;
  874. function ListCache(entries) {
  875. var index = -1, length = entries == null ? 0 : entries.length;
  876. this.clear();
  877. while (++index < length) {
  878. var entry = entries[index];
  879. this.set(entry[0], entry[1]);
  880. }
  881. }
  882. function listCacheClear() {
  883. this.__data__ = [];
  884. this.size = 0;
  885. }
  886. function listCacheDelete(key) {
  887. var data = this.__data__, index = assocIndexOf(data, key);
  888. if (index < 0) {
  889. return false;
  890. }
  891. var lastIndex = data.length - 1;
  892. if (index == lastIndex) {
  893. data.pop();
  894. } else {
  895. splice.call(data, index, 1);
  896. }
  897. --this.size;
  898. return true;
  899. }
  900. function listCacheGet(key) {
  901. var data = this.__data__, index = assocIndexOf(data, key);
  902. return index < 0 ? undefined : data[index][1];
  903. }
  904. function listCacheHas(key) {
  905. return assocIndexOf(this.__data__, key) > -1;
  906. }
  907. function listCacheSet(key, value) {
  908. var data = this.__data__, index = assocIndexOf(data, key);
  909. if (index < 0) {
  910. ++this.size;
  911. data.push([key, value]);
  912. } else {
  913. data[index][1] = value;
  914. }
  915. return this;
  916. }
  917. ListCache.prototype.clear = listCacheClear;
  918. ListCache.prototype["delete"] = listCacheDelete;
  919. ListCache.prototype.get = listCacheGet;
  920. ListCache.prototype.has = listCacheHas;
  921. ListCache.prototype.set = listCacheSet;
  922. function MapCache(entries) {
  923. var index = -1, length = entries == null ? 0 : entries.length;
  924. this.clear();
  925. while (++index < length) {
  926. var entry = entries[index];
  927. this.set(entry[0], entry[1]);
  928. }
  929. }
  930. function mapCacheClear() {
  931. this.size = 0;
  932. this.__data__ = {
  933. "hash": new Hash(),
  934. "map": new (Map || ListCache)(),
  935. "string": new Hash()
  936. };
  937. }
  938. function mapCacheDelete(key) {
  939. var result2 = getMapData(this, key)["delete"](key);
  940. this.size -= result2 ? 1 : 0;
  941. return result2;
  942. }
  943. function mapCacheGet(key) {
  944. return getMapData(this, key).get(key);
  945. }
  946. function mapCacheHas(key) {
  947. return getMapData(this, key).has(key);
  948. }
  949. function mapCacheSet(key, value) {
  950. var data = getMapData(this, key), size2 = data.size;
  951. data.set(key, value);
  952. this.size += data.size == size2 ? 0 : 1;
  953. return this;
  954. }
  955. MapCache.prototype.clear = mapCacheClear;
  956. MapCache.prototype["delete"] = mapCacheDelete;
  957. MapCache.prototype.get = mapCacheGet;
  958. MapCache.prototype.has = mapCacheHas;
  959. MapCache.prototype.set = mapCacheSet;
  960. function SetCache(values2) {
  961. var index = -1, length = values2 == null ? 0 : values2.length;
  962. this.__data__ = new MapCache();
  963. while (++index < length) {
  964. this.add(values2[index]);
  965. }
  966. }
  967. function setCacheAdd(value) {
  968. this.__data__.set(value, HASH_UNDEFINED);
  969. return this;
  970. }
  971. function setCacheHas(value) {
  972. return this.__data__.has(value);
  973. }
  974. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  975. SetCache.prototype.has = setCacheHas;
  976. function Stack(entries) {
  977. var data = this.__data__ = new ListCache(entries);
  978. this.size = data.size;
  979. }
  980. function stackClear() {
  981. this.__data__ = new ListCache();
  982. this.size = 0;
  983. }
  984. function stackDelete(key) {
  985. var data = this.__data__, result2 = data["delete"](key);
  986. this.size = data.size;
  987. return result2;
  988. }
  989. function stackGet(key) {
  990. return this.__data__.get(key);
  991. }
  992. function stackHas(key) {
  993. return this.__data__.has(key);
  994. }
  995. function stackSet(key, value) {
  996. var data = this.__data__;
  997. if (data instanceof ListCache) {
  998. var pairs = data.__data__;
  999. if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
  1000. pairs.push([key, value]);
  1001. this.size = ++data.size;
  1002. return this;
  1003. }
  1004. data = this.__data__ = new MapCache(pairs);
  1005. }
  1006. data.set(key, value);
  1007. this.size = data.size;
  1008. return this;
  1009. }
  1010. Stack.prototype.clear = stackClear;
  1011. Stack.prototype["delete"] = stackDelete;
  1012. Stack.prototype.get = stackGet;
  1013. Stack.prototype.has = stackHas;
  1014. Stack.prototype.set = stackSet;
  1015. function arrayLikeKeys(value, inherited) {
  1016. var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result2 = skipIndexes ? baseTimes(value.length, String) : [], length = result2.length;
  1017. for (var key in value) {
  1018. if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) {
  1019. result2.push(key);
  1020. }
  1021. }
  1022. return result2;
  1023. }
  1024. function arraySample(array) {
  1025. var length = array.length;
  1026. return length ? array[baseRandom(0, length - 1)] : undefined;
  1027. }
  1028. function arraySampleSize(array, n) {
  1029. return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
  1030. }
  1031. function arrayShuffle(array) {
  1032. return shuffleSelf(copyArray(array));
  1033. }
  1034. function assignMergeValue(object, key, value) {
  1035. if (value !== undefined && !eq(object[key], value) || value === undefined && !(key in object)) {
  1036. baseAssignValue(object, key, value);
  1037. }
  1038. }
  1039. function assignValue(object, key, value) {
  1040. var objValue = object[key];
  1041. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === undefined && !(key in object)) {
  1042. baseAssignValue(object, key, value);
  1043. }
  1044. }
  1045. function assocIndexOf(array, key) {
  1046. var length = array.length;
  1047. while (length--) {
  1048. if (eq(array[length][0], key)) {
  1049. return length;
  1050. }
  1051. }
  1052. return -1;
  1053. }
  1054. function baseAggregator(collection, setter, iteratee2, accumulator) {
  1055. baseEach(collection, function(value, key, collection2) {
  1056. setter(accumulator, value, iteratee2(value), collection2);
  1057. });
  1058. return accumulator;
  1059. }
  1060. function baseAssign(object, source) {
  1061. return object && copyObject(source, keys(source), object);
  1062. }
  1063. function baseAssignIn(object, source) {
  1064. return object && copyObject(source, keysIn(source), object);
  1065. }
  1066. function baseAssignValue(object, key, value) {
  1067. if (key == "__proto__" && defineProperty) {
  1068. defineProperty(object, key, {
  1069. "configurable": true,
  1070. "enumerable": true,
  1071. "value": value,
  1072. "writable": true
  1073. });
  1074. } else {
  1075. object[key] = value;
  1076. }
  1077. }
  1078. function baseAt(object, paths) {
  1079. var index = -1, length = paths.length, result2 = Array2(length), skip = object == null;
  1080. while (++index < length) {
  1081. result2[index] = skip ? undefined : get(object, paths[index]);
  1082. }
  1083. return result2;
  1084. }
  1085. function baseClamp(number, lower, upper) {
  1086. if (number === number) {
  1087. if (upper !== undefined) {
  1088. number = number <= upper ? number : upper;
  1089. }
  1090. if (lower !== undefined) {
  1091. number = number >= lower ? number : lower;
  1092. }
  1093. }
  1094. return number;
  1095. }
  1096. function baseClone(value, bitmask, customizer, key, object, stack) {
  1097. var result2, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG;
  1098. if (customizer) {
  1099. result2 = object ? customizer(value, key, object, stack) : customizer(value);
  1100. }
  1101. if (result2 !== undefined) {
  1102. return result2;
  1103. }
  1104. if (!isObject(value)) {
  1105. return value;
  1106. }
  1107. var isArr = isArray(value);
  1108. if (isArr) {
  1109. result2 = initCloneArray(value);
  1110. if (!isDeep) {
  1111. return copyArray(value, result2);
  1112. }
  1113. } else {
  1114. var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
  1115. if (isBuffer(value)) {
  1116. return cloneBuffer(value, isDeep);
  1117. }
  1118. if (tag == objectTag || tag == argsTag || isFunc && !object) {
  1119. result2 = isFlat || isFunc ? {} : initCloneObject(value);
  1120. if (!isDeep) {
  1121. return isFlat ? copySymbolsIn(value, baseAssignIn(result2, value)) : copySymbols(value, baseAssign(result2, value));
  1122. }
  1123. } else {
  1124. if (!cloneableTags[tag]) {
  1125. return object ? value : {};
  1126. }
  1127. result2 = initCloneByTag(value, tag, isDeep);
  1128. }
  1129. }
  1130. stack || (stack = new Stack());
  1131. var stacked = stack.get(value);
  1132. if (stacked) {
  1133. return stacked;
  1134. }
  1135. stack.set(value, result2);
  1136. if (isSet(value)) {
  1137. value.forEach(function(subValue) {
  1138. result2.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
  1139. });
  1140. } else if (isMap(value)) {
  1141. value.forEach(function(subValue, key2) {
  1142. result2.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
  1143. });
  1144. }
  1145. var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
  1146. var props = isArr ? undefined : keysFunc(value);
  1147. arrayEach(props || value, function(subValue, key2) {
  1148. if (props) {
  1149. key2 = subValue;
  1150. subValue = value[key2];
  1151. }
  1152. assignValue(result2, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
  1153. });
  1154. return result2;
  1155. }
  1156. function baseConforms(source) {
  1157. var props = keys(source);
  1158. return function(object) {
  1159. return baseConformsTo(object, source, props);
  1160. };
  1161. }
  1162. function baseConformsTo(object, source, props) {
  1163. var length = props.length;
  1164. if (object == null) {
  1165. return !length;
  1166. }
  1167. object = Object2(object);
  1168. while (length--) {
  1169. var key = props[length], predicate = source[key], value = object[key];
  1170. if (value === undefined && !(key in object) || !predicate(value)) {
  1171. return false;
  1172. }
  1173. }
  1174. return true;
  1175. }
  1176. function baseDelay(func, wait, args) {
  1177. if (typeof func != "function") {
  1178. throw new TypeError(FUNC_ERROR_TEXT);
  1179. }
  1180. return setTimeout(function() {
  1181. func.apply(undefined, args);
  1182. }, wait);
  1183. }
  1184. function baseDifference(array, values2, iteratee2, comparator) {
  1185. var index = -1, includes2 = arrayIncludes, isCommon = true, length = array.length, result2 = [], valuesLength = values2.length;
  1186. if (!length) {
  1187. return result2;
  1188. }
  1189. if (iteratee2) {
  1190. values2 = arrayMap(values2, baseUnary(iteratee2));
  1191. }
  1192. if (comparator) {
  1193. includes2 = arrayIncludesWith;
  1194. isCommon = false;
  1195. } else if (values2.length >= LARGE_ARRAY_SIZE) {
  1196. includes2 = cacheHas;
  1197. isCommon = false;
  1198. values2 = new SetCache(values2);
  1199. }
  1200. outer:
  1201. while (++index < length) {
  1202. var value = array[index], computed = iteratee2 == null ? value : iteratee2(value);
  1203. value = comparator || value !== 0 ? value : 0;
  1204. if (isCommon && computed === computed) {
  1205. var valuesIndex = valuesLength;
  1206. while (valuesIndex--) {
  1207. if (values2[valuesIndex] === computed) {
  1208. continue outer;
  1209. }
  1210. }
  1211. result2.push(value);
  1212. } else if (!includes2(values2, computed, comparator)) {
  1213. result2.push(value);
  1214. }
  1215. }
  1216. return result2;
  1217. }
  1218. var baseEach = createBaseEach(baseForOwn);
  1219. var baseEachRight = createBaseEach(baseForOwnRight, true);
  1220. function baseEvery(collection, predicate) {
  1221. var result2 = true;
  1222. baseEach(collection, function(value, index, collection2) {
  1223. result2 = !!predicate(value, index, collection2);
  1224. return result2;
  1225. });
  1226. return result2;
  1227. }
  1228. function baseExtremum(array, iteratee2, comparator) {
  1229. var index = -1, length = array.length;
  1230. while (++index < length) {
  1231. var value = array[index], current = iteratee2(value);
  1232. if (current != null && (computed === undefined ? current === current && !isSymbol(current) : comparator(current, computed))) {
  1233. var computed = current, result2 = value;
  1234. }
  1235. }
  1236. return result2;
  1237. }
  1238. function baseFill(array, value, start, end) {
  1239. var length = array.length;
  1240. start = toInteger(start);
  1241. if (start < 0) {
  1242. start = -start > length ? 0 : length + start;
  1243. }
  1244. end = end === undefined || end > length ? length : toInteger(end);
  1245. if (end < 0) {
  1246. end += length;
  1247. }
  1248. end = start > end ? 0 : toLength(end);
  1249. while (start < end) {
  1250. array[start++] = value;
  1251. }
  1252. return array;
  1253. }
  1254. function baseFilter(collection, predicate) {
  1255. var result2 = [];
  1256. baseEach(collection, function(value, index, collection2) {
  1257. if (predicate(value, index, collection2)) {
  1258. result2.push(value);
  1259. }
  1260. });
  1261. return result2;
  1262. }
  1263. function baseFlatten(array, depth, predicate, isStrict, result2) {
  1264. var index = -1, length = array.length;
  1265. predicate || (predicate = isFlattenable);
  1266. result2 || (result2 = []);
  1267. while (++index < length) {
  1268. var value = array[index];
  1269. if (depth > 0 && predicate(value)) {
  1270. if (depth > 1) {
  1271. baseFlatten(value, depth - 1, predicate, isStrict, result2);
  1272. } else {
  1273. arrayPush(result2, value);
  1274. }
  1275. } else if (!isStrict) {
  1276. result2[result2.length] = value;
  1277. }
  1278. }
  1279. return result2;
  1280. }
  1281. var baseFor = createBaseFor();
  1282. var baseForRight = createBaseFor(true);
  1283. function baseForOwn(object, iteratee2) {
  1284. return object && baseFor(object, iteratee2, keys);
  1285. }
  1286. function baseForOwnRight(object, iteratee2) {
  1287. return object && baseForRight(object, iteratee2, keys);
  1288. }
  1289. function baseFunctions(object, props) {
  1290. return arrayFilter(props, function(key) {
  1291. return isFunction(object[key]);
  1292. });
  1293. }
  1294. function baseGet(object, path) {
  1295. path = castPath(path, object);
  1296. var index = 0, length = path.length;
  1297. while (object != null && index < length) {
  1298. object = object[toKey(path[index++])];
  1299. }
  1300. return index && index == length ? object : undefined;
  1301. }
  1302. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  1303. var result2 = keysFunc(object);
  1304. return isArray(object) ? result2 : arrayPush(result2, symbolsFunc(object));
  1305. }
  1306. function baseGetTag(value) {
  1307. if (value == null) {
  1308. return value === undefined ? undefinedTag : nullTag;
  1309. }
  1310. return symToStringTag && symToStringTag in Object2(value) ? getRawTag(value) : objectToString(value);
  1311. }
  1312. function baseGt(value, other) {
  1313. return value > other;
  1314. }
  1315. function baseHas(object, key) {
  1316. return object != null && hasOwnProperty.call(object, key);
  1317. }
  1318. function baseHasIn(object, key) {
  1319. return object != null && key in Object2(object);
  1320. }
  1321. function baseInRange(number, start, end) {
  1322. return number >= nativeMin(start, end) && number < nativeMax(start, end);
  1323. }
  1324. function baseIntersection(arrays, iteratee2, comparator) {
  1325. var includes2 = comparator ? arrayIncludesWith : arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array2(othLength), maxLength = Infinity, result2 = [];
  1326. while (othIndex--) {
  1327. var array = arrays[othIndex];
  1328. if (othIndex && iteratee2) {
  1329. array = arrayMap(array, baseUnary(iteratee2));
  1330. }
  1331. maxLength = nativeMin(array.length, maxLength);
  1332. caches[othIndex] = !comparator && (iteratee2 || length >= 120 && array.length >= 120) ? new SetCache(othIndex && array) : undefined;
  1333. }
  1334. array = arrays[0];
  1335. var index = -1, seen = caches[0];
  1336. outer:
  1337. while (++index < length && result2.length < maxLength) {
  1338. var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
  1339. value = comparator || value !== 0 ? value : 0;
  1340. if (!(seen ? cacheHas(seen, computed) : includes2(result2, computed, comparator))) {
  1341. othIndex = othLength;
  1342. while (--othIndex) {
  1343. var cache = caches[othIndex];
  1344. if (!(cache ? cacheHas(cache, computed) : includes2(arrays[othIndex], computed, comparator))) {
  1345. continue outer;
  1346. }
  1347. }
  1348. if (seen) {
  1349. seen.push(computed);
  1350. }
  1351. result2.push(value);
  1352. }
  1353. }
  1354. return result2;
  1355. }
  1356. function baseInverter(object, setter, iteratee2, accumulator) {
  1357. baseForOwn(object, function(value, key, object2) {
  1358. setter(accumulator, iteratee2(value), key, object2);
  1359. });
  1360. return accumulator;
  1361. }
  1362. function baseInvoke(object, path, args) {
  1363. path = castPath(path, object);
  1364. object = parent(object, path);
  1365. var func = object == null ? object : object[toKey(last(path))];
  1366. return func == null ? undefined : apply(func, object, args);
  1367. }
  1368. function baseIsArguments(value) {
  1369. return isObjectLike(value) && baseGetTag(value) == argsTag;
  1370. }
  1371. function baseIsArrayBuffer(value) {
  1372. return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
  1373. }
  1374. function baseIsDate(value) {
  1375. return isObjectLike(value) && baseGetTag(value) == dateTag;
  1376. }
  1377. function baseIsEqual(value, other, bitmask, customizer, stack) {
  1378. if (value === other) {
  1379. return true;
  1380. }
  1381. if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
  1382. return value !== value && other !== other;
  1383. }
  1384. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  1385. }
  1386. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  1387. var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
  1388. objTag = objTag == argsTag ? objectTag : objTag;
  1389. othTag = othTag == argsTag ? objectTag : othTag;
  1390. var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
  1391. if (isSameTag && isBuffer(object)) {
  1392. if (!isBuffer(other)) {
  1393. return false;
  1394. }
  1395. objIsArr = true;
  1396. objIsObj = false;
  1397. }
  1398. if (isSameTag && !objIsObj) {
  1399. stack || (stack = new Stack());
  1400. return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  1401. }
  1402. if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
  1403. var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
  1404. if (objIsWrapped || othIsWrapped) {
  1405. var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
  1406. stack || (stack = new Stack());
  1407. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  1408. }
  1409. }
  1410. if (!isSameTag) {
  1411. return false;
  1412. }
  1413. stack || (stack = new Stack());
  1414. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  1415. }
  1416. function baseIsMap(value) {
  1417. return isObjectLike(value) && getTag(value) == mapTag;
  1418. }
  1419. function baseIsMatch(object, source, matchData, customizer) {
  1420. var index = matchData.length, length = index, noCustomizer = !customizer;
  1421. if (object == null) {
  1422. return !length;
  1423. }
  1424. object = Object2(object);
  1425. while (index--) {
  1426. var data = matchData[index];
  1427. if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
  1428. return false;
  1429. }
  1430. }
  1431. while (++index < length) {
  1432. data = matchData[index];
  1433. var key = data[0], objValue = object[key], srcValue = data[1];
  1434. if (noCustomizer && data[2]) {
  1435. if (objValue === undefined && !(key in object)) {
  1436. return false;
  1437. }
  1438. } else {
  1439. var stack = new Stack();
  1440. if (customizer) {
  1441. var result2 = customizer(objValue, srcValue, key, object, source, stack);
  1442. }
  1443. if (!(result2 === undefined ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result2)) {
  1444. return false;
  1445. }
  1446. }
  1447. }
  1448. return true;
  1449. }
  1450. function baseIsNative(value) {
  1451. if (!isObject(value) || isMasked(value)) {
  1452. return false;
  1453. }
  1454. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  1455. return pattern.test(toSource(value));
  1456. }
  1457. function baseIsRegExp(value) {
  1458. return isObjectLike(value) && baseGetTag(value) == regexpTag;
  1459. }
  1460. function baseIsSet(value) {
  1461. return isObjectLike(value) && getTag(value) == setTag;
  1462. }
  1463. function baseIsTypedArray(value) {
  1464. return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  1465. }
  1466. function baseIteratee(value) {
  1467. if (typeof value == "function") {
  1468. return value;
  1469. }
  1470. if (value == null) {
  1471. return identity;
  1472. }
  1473. if (typeof value == "object") {
  1474. return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
  1475. }
  1476. return property(value);
  1477. }
  1478. function baseKeys(object) {
  1479. if (!isPrototype(object)) {
  1480. return nativeKeys(object);
  1481. }
  1482. var result2 = [];
  1483. for (var key in Object2(object)) {
  1484. if (hasOwnProperty.call(object, key) && key != "constructor") {
  1485. result2.push(key);
  1486. }
  1487. }
  1488. return result2;
  1489. }
  1490. function baseKeysIn(object) {
  1491. if (!isObject(object)) {
  1492. return nativeKeysIn(object);
  1493. }
  1494. var isProto = isPrototype(object), result2 = [];
  1495. for (var key in object) {
  1496. if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) {
  1497. result2.push(key);
  1498. }
  1499. }
  1500. return result2;
  1501. }
  1502. function baseLt(value, other) {
  1503. return value < other;
  1504. }
  1505. function baseMap(collection, iteratee2) {
  1506. var index = -1, result2 = isArrayLike(collection) ? Array2(collection.length) : [];
  1507. baseEach(collection, function(value, key, collection2) {
  1508. result2[++index] = iteratee2(value, key, collection2);
  1509. });
  1510. return result2;
  1511. }
  1512. function baseMatches(source) {
  1513. var matchData = getMatchData(source);
  1514. if (matchData.length == 1 && matchData[0][2]) {
  1515. return matchesStrictComparable(matchData[0][0], matchData[0][1]);
  1516. }
  1517. return function(object) {
  1518. return object === source || baseIsMatch(object, source, matchData);
  1519. };
  1520. }
  1521. function baseMatchesProperty(path, srcValue) {
  1522. if (isKey(path) && isStrictComparable(srcValue)) {
  1523. return matchesStrictComparable(toKey(path), srcValue);
  1524. }
  1525. return function(object) {
  1526. var objValue = get(object, path);
  1527. return objValue === undefined && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
  1528. };
  1529. }
  1530. function baseMerge(object, source, srcIndex, customizer, stack) {
  1531. if (object === source) {
  1532. return;
  1533. }
  1534. baseFor(source, function(srcValue, key) {
  1535. stack || (stack = new Stack());
  1536. if (isObject(srcValue)) {
  1537. baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
  1538. } else {
  1539. var newValue = customizer ? customizer(safeGet(object, key), srcValue, key + "", object, source, stack) : undefined;
  1540. if (newValue === undefined) {
  1541. newValue = srcValue;
  1542. }
  1543. assignMergeValue(object, key, newValue);
  1544. }
  1545. }, keysIn);
  1546. }
  1547. function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
  1548. var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue);
  1549. if (stacked) {
  1550. assignMergeValue(object, key, stacked);
  1551. return;
  1552. }
  1553. var newValue = customizer ? customizer(objValue, srcValue, key + "", object, source, stack) : undefined;
  1554. var isCommon = newValue === undefined;
  1555. if (isCommon) {
  1556. var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
  1557. newValue = srcValue;
  1558. if (isArr || isBuff || isTyped) {
  1559. if (isArray(objValue)) {
  1560. newValue = objValue;
  1561. } else if (isArrayLikeObject(objValue)) {
  1562. newValue = copyArray(objValue);
  1563. } else if (isBuff) {
  1564. isCommon = false;
  1565. newValue = cloneBuffer(srcValue, true);
  1566. } else if (isTyped) {
  1567. isCommon = false;
  1568. newValue = cloneTypedArray(srcValue, true);
  1569. } else {
  1570. newValue = [];
  1571. }
  1572. } else if (isPlainObject(srcValue) || isArguments(srcValue)) {
  1573. newValue = objValue;
  1574. if (isArguments(objValue)) {
  1575. newValue = toPlainObject(objValue);
  1576. } else if (!isObject(objValue) || isFunction(objValue)) {
  1577. newValue = initCloneObject(srcValue);
  1578. }
  1579. } else {
  1580. isCommon = false;
  1581. }
  1582. }
  1583. if (isCommon) {
  1584. stack.set(srcValue, newValue);
  1585. mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
  1586. stack["delete"](srcValue);
  1587. }
  1588. assignMergeValue(object, key, newValue);
  1589. }
  1590. function baseNth(array, n) {
  1591. var length = array.length;
  1592. if (!length) {
  1593. return;
  1594. }
  1595. n += n < 0 ? length : 0;
  1596. return isIndex(n, length) ? array[n] : undefined;
  1597. }
  1598. function baseOrderBy(collection, iteratees, orders) {
  1599. if (iteratees.length) {
  1600. iteratees = arrayMap(iteratees, function(iteratee2) {
  1601. if (isArray(iteratee2)) {
  1602. return function(value) {
  1603. return baseGet(value, iteratee2.length === 1 ? iteratee2[0] : iteratee2);
  1604. };
  1605. }
  1606. return iteratee2;
  1607. });
  1608. } else {
  1609. iteratees = [identity];
  1610. }
  1611. var index = -1;
  1612. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  1613. var result2 = baseMap(collection, function(value, key, collection2) {
  1614. var criteria = arrayMap(iteratees, function(iteratee2) {
  1615. return iteratee2(value);
  1616. });
  1617. return { "criteria": criteria, "index": ++index, "value": value };
  1618. });
  1619. return baseSortBy(result2, function(object, other) {
  1620. return compareMultiple(object, other, orders);
  1621. });
  1622. }
  1623. function basePick(object, paths) {
  1624. return basePickBy(object, paths, function(value, path) {
  1625. return hasIn(object, path);
  1626. });
  1627. }
  1628. function basePickBy(object, paths, predicate) {
  1629. var index = -1, length = paths.length, result2 = {};
  1630. while (++index < length) {
  1631. var path = paths[index], value = baseGet(object, path);
  1632. if (predicate(value, path)) {
  1633. baseSet(result2, castPath(path, object), value);
  1634. }
  1635. }
  1636. return result2;
  1637. }
  1638. function basePropertyDeep(path) {
  1639. return function(object) {
  1640. return baseGet(object, path);
  1641. };
  1642. }
  1643. function basePullAll(array, values2, iteratee2, comparator) {
  1644. var indexOf2 = comparator ? baseIndexOfWith : baseIndexOf, index = -1, length = values2.length, seen = array;
  1645. if (array === values2) {
  1646. values2 = copyArray(values2);
  1647. }
  1648. if (iteratee2) {
  1649. seen = arrayMap(array, baseUnary(iteratee2));
  1650. }
  1651. while (++index < length) {
  1652. var fromIndex = 0, value = values2[index], computed = iteratee2 ? iteratee2(value) : value;
  1653. while ((fromIndex = indexOf2(seen, computed, fromIndex, comparator)) > -1) {
  1654. if (seen !== array) {
  1655. splice.call(seen, fromIndex, 1);
  1656. }
  1657. splice.call(array, fromIndex, 1);
  1658. }
  1659. }
  1660. return array;
  1661. }
  1662. function basePullAt(array, indexes) {
  1663. var length = array ? indexes.length : 0, lastIndex = length - 1;
  1664. while (length--) {
  1665. var index = indexes[length];
  1666. if (length == lastIndex || index !== previous) {
  1667. var previous = index;
  1668. if (isIndex(index)) {
  1669. splice.call(array, index, 1);
  1670. } else {
  1671. baseUnset(array, index);
  1672. }
  1673. }
  1674. }
  1675. return array;
  1676. }
  1677. function baseRandom(lower, upper) {
  1678. return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
  1679. }
  1680. function baseRange(start, end, step, fromRight) {
  1681. var index = -1, length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result2 = Array2(length);
  1682. while (length--) {
  1683. result2[fromRight ? length : ++index] = start;
  1684. start += step;
  1685. }
  1686. return result2;
  1687. }
  1688. function baseRepeat(string, n) {
  1689. var result2 = "";
  1690. if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
  1691. return result2;
  1692. }
  1693. do {
  1694. if (n % 2) {
  1695. result2 += string;
  1696. }
  1697. n = nativeFloor(n / 2);
  1698. if (n) {
  1699. string += string;
  1700. }
  1701. } while (n);
  1702. return result2;
  1703. }
  1704. function baseRest(func, start) {
  1705. return setToString(overRest(func, start, identity), func + "");
  1706. }
  1707. function baseSample(collection) {
  1708. return arraySample(values(collection));
  1709. }
  1710. function baseSampleSize(collection, n) {
  1711. var array = values(collection);
  1712. return shuffleSelf(array, baseClamp(n, 0, array.length));
  1713. }
  1714. function baseSet(object, path, value, customizer) {
  1715. if (!isObject(object)) {
  1716. return object;
  1717. }
  1718. path = castPath(path, object);
  1719. var index = -1, length = path.length, lastIndex = length - 1, nested = object;
  1720. while (nested != null && ++index < length) {
  1721. var key = toKey(path[index]), newValue = value;
  1722. if (key === "__proto__" || key === "constructor" || key === "prototype") {
  1723. return object;
  1724. }
  1725. if (index != lastIndex) {
  1726. var objValue = nested[key];
  1727. newValue = customizer ? customizer(objValue, key, nested) : undefined;
  1728. if (newValue === undefined) {
  1729. newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
  1730. }
  1731. }
  1732. assignValue(nested, key, newValue);
  1733. nested = nested[key];
  1734. }
  1735. return object;
  1736. }
  1737. var baseSetData = !metaMap ? identity : function(func, data) {
  1738. metaMap.set(func, data);
  1739. return func;
  1740. };
  1741. var baseSetToString = !defineProperty ? identity : function(func, string) {
  1742. return defineProperty(func, "toString", {
  1743. "configurable": true,
  1744. "enumerable": false,
  1745. "value": constant(string),
  1746. "writable": true
  1747. });
  1748. };
  1749. function baseShuffle(collection) {
  1750. return shuffleSelf(values(collection));
  1751. }
  1752. function baseSlice(array, start, end) {
  1753. var index = -1, length = array.length;
  1754. if (start < 0) {
  1755. start = -start > length ? 0 : length + start;
  1756. }
  1757. end = end > length ? length : end;
  1758. if (end < 0) {
  1759. end += length;
  1760. }
  1761. length = start > end ? 0 : end - start >>> 0;
  1762. start >>>= 0;
  1763. var result2 = Array2(length);
  1764. while (++index < length) {
  1765. result2[index] = array[index + start];
  1766. }
  1767. return result2;
  1768. }
  1769. function baseSome(collection, predicate) {
  1770. var result2;
  1771. baseEach(collection, function(value, index, collection2) {
  1772. result2 = predicate(value, index, collection2);
  1773. return !result2;
  1774. });
  1775. return !!result2;
  1776. }
  1777. function baseSortedIndex(array, value, retHighest) {
  1778. var low = 0, high = array == null ? low : array.length;
  1779. if (typeof value == "number" && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
  1780. while (low < high) {
  1781. var mid = low + high >>> 1, computed = array[mid];
  1782. if (computed !== null && !isSymbol(computed) && (retHighest ? computed <= value : computed < value)) {
  1783. low = mid + 1;
  1784. } else {
  1785. high = mid;
  1786. }
  1787. }
  1788. return high;
  1789. }
  1790. return baseSortedIndexBy(array, value, identity, retHighest);
  1791. }
  1792. function baseSortedIndexBy(array, value, iteratee2, retHighest) {
  1793. var low = 0, high = array == null ? 0 : array.length;
  1794. if (high === 0) {
  1795. return 0;
  1796. }
  1797. value = iteratee2(value);
  1798. var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined;
  1799. while (low < high) {
  1800. var mid = nativeFloor((low + high) / 2), computed = iteratee2(array[mid]), othIsDefined = computed !== undefined, othIsNull = computed === null, othIsReflexive = computed === computed, othIsSymbol = isSymbol(computed);
  1801. if (valIsNaN) {
  1802. var setLow = retHighest || othIsReflexive;
  1803. } else if (valIsUndefined) {
  1804. setLow = othIsReflexive && (retHighest || othIsDefined);
  1805. } else if (valIsNull) {
  1806. setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
  1807. } else if (valIsSymbol) {
  1808. setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
  1809. } else if (othIsNull || othIsSymbol) {
  1810. setLow = false;
  1811. } else {
  1812. setLow = retHighest ? computed <= value : computed < value;
  1813. }
  1814. if (setLow) {
  1815. low = mid + 1;
  1816. } else {
  1817. high = mid;
  1818. }
  1819. }
  1820. return nativeMin(high, MAX_ARRAY_INDEX);
  1821. }
  1822. function baseSortedUniq(array, iteratee2) {
  1823. var index = -1, length = array.length, resIndex = 0, result2 = [];
  1824. while (++index < length) {
  1825. var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
  1826. if (!index || !eq(computed, seen)) {
  1827. var seen = computed;
  1828. result2[resIndex++] = value === 0 ? 0 : value;
  1829. }
  1830. }
  1831. return result2;
  1832. }
  1833. function baseToNumber(value) {
  1834. if (typeof value == "number") {
  1835. return value;
  1836. }
  1837. if (isSymbol(value)) {
  1838. return NAN;
  1839. }
  1840. return +value;
  1841. }
  1842. function baseToString(value) {
  1843. if (typeof value == "string") {
  1844. return value;
  1845. }
  1846. if (isArray(value)) {
  1847. return arrayMap(value, baseToString) + "";
  1848. }
  1849. if (isSymbol(value)) {
  1850. return symbolToString ? symbolToString.call(value) : "";
  1851. }
  1852. var result2 = value + "";
  1853. return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2;
  1854. }
  1855. function baseUniq(array, iteratee2, comparator) {
  1856. var index = -1, includes2 = arrayIncludes, length = array.length, isCommon = true, result2 = [], seen = result2;
  1857. if (comparator) {
  1858. isCommon = false;
  1859. includes2 = arrayIncludesWith;
  1860. } else if (length >= LARGE_ARRAY_SIZE) {
  1861. var set2 = iteratee2 ? null : createSet(array);
  1862. if (set2) {
  1863. return setToArray(set2);
  1864. }
  1865. isCommon = false;
  1866. includes2 = cacheHas;
  1867. seen = new SetCache();
  1868. } else {
  1869. seen = iteratee2 ? [] : result2;
  1870. }
  1871. outer:
  1872. while (++index < length) {
  1873. var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
  1874. value = comparator || value !== 0 ? value : 0;
  1875. if (isCommon && computed === computed) {
  1876. var seenIndex = seen.length;
  1877. while (seenIndex--) {
  1878. if (seen[seenIndex] === computed) {
  1879. continue outer;
  1880. }
  1881. }
  1882. if (iteratee2) {
  1883. seen.push(computed);
  1884. }
  1885. result2.push(value);
  1886. } else if (!includes2(seen, computed, comparator)) {
  1887. if (seen !== result2) {
  1888. seen.push(computed);
  1889. }
  1890. result2.push(value);
  1891. }
  1892. }
  1893. return result2;
  1894. }
  1895. function baseUnset(object, path) {
  1896. path = castPath(path, object);
  1897. object = parent(object, path);
  1898. return object == null || delete object[toKey(last(path))];
  1899. }
  1900. function baseUpdate(object, path, updater, customizer) {
  1901. return baseSet(object, path, updater(baseGet(object, path)), customizer);
  1902. }
  1903. function baseWhile(array, predicate, isDrop, fromRight) {
  1904. var length = array.length, index = fromRight ? length : -1;
  1905. while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {
  1906. }
  1907. return isDrop ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length) : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length : index);
  1908. }
  1909. function baseWrapperValue(value, actions) {
  1910. var result2 = value;
  1911. if (result2 instanceof LazyWrapper) {
  1912. result2 = result2.value();
  1913. }
  1914. return arrayReduce(actions, function(result3, action) {
  1915. return action.func.apply(action.thisArg, arrayPush([result3], action.args));
  1916. }, result2);
  1917. }
  1918. function baseXor(arrays, iteratee2, comparator) {
  1919. var length = arrays.length;
  1920. if (length < 2) {
  1921. return length ? baseUniq(arrays[0]) : [];
  1922. }
  1923. var index = -1, result2 = Array2(length);
  1924. while (++index < length) {
  1925. var array = arrays[index], othIndex = -1;
  1926. while (++othIndex < length) {
  1927. if (othIndex != index) {
  1928. result2[index] = baseDifference(result2[index] || array, arrays[othIndex], iteratee2, comparator);
  1929. }
  1930. }
  1931. }
  1932. return baseUniq(baseFlatten(result2, 1), iteratee2, comparator);
  1933. }
  1934. function baseZipObject(props, values2, assignFunc) {
  1935. var index = -1, length = props.length, valsLength = values2.length, result2 = {};
  1936. while (++index < length) {
  1937. var value = index < valsLength ? values2[index] : undefined;
  1938. assignFunc(result2, props[index], value);
  1939. }
  1940. return result2;
  1941. }
  1942. function castArrayLikeObject(value) {
  1943. return isArrayLikeObject(value) ? value : [];
  1944. }
  1945. function castFunction(value) {
  1946. return typeof value == "function" ? value : identity;
  1947. }
  1948. function castPath(value, object) {
  1949. if (isArray(value)) {
  1950. return value;
  1951. }
  1952. return isKey(value, object) ? [value] : stringToPath(toString(value));
  1953. }
  1954. var castRest = baseRest;
  1955. function castSlice(array, start, end) {
  1956. var length = array.length;
  1957. end = end === undefined ? length : end;
  1958. return !start && end >= length ? array : baseSlice(array, start, end);
  1959. }
  1960. var clearTimeout = ctxClearTimeout || function(id) {
  1961. return root.clearTimeout(id);
  1962. };
  1963. function cloneBuffer(buffer, isDeep) {
  1964. if (isDeep) {
  1965. return buffer.slice();
  1966. }
  1967. var length = buffer.length, result2 = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
  1968. buffer.copy(result2);
  1969. return result2;
  1970. }
  1971. function cloneArrayBuffer(arrayBuffer) {
  1972. var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength);
  1973. new Uint8Array(result2).set(new Uint8Array(arrayBuffer));
  1974. return result2;
  1975. }
  1976. function cloneDataView(dataView, isDeep) {
  1977. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  1978. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  1979. }
  1980. function cloneRegExp(regexp) {
  1981. var result2 = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  1982. result2.lastIndex = regexp.lastIndex;
  1983. return result2;
  1984. }
  1985. function cloneSymbol(symbol) {
  1986. return symbolValueOf ? Object2(symbolValueOf.call(symbol)) : {};
  1987. }
  1988. function cloneTypedArray(typedArray, isDeep) {
  1989. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  1990. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  1991. }
  1992. function compareAscending(value, other) {
  1993. if (value !== other) {
  1994. var valIsDefined = value !== undefined, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value);
  1995. var othIsDefined = other !== undefined, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other);
  1996. if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
  1997. return 1;
  1998. }
  1999. if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {
  2000. return -1;
  2001. }
  2002. }
  2003. return 0;
  2004. }
  2005. function compareMultiple(object, other, orders) {
  2006. var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
  2007. while (++index < length) {
  2008. var result2 = compareAscending(objCriteria[index], othCriteria[index]);
  2009. if (result2) {
  2010. if (index >= ordersLength) {
  2011. return result2;
  2012. }
  2013. var order = orders[index];
  2014. return result2 * (order == "desc" ? -1 : 1);
  2015. }
  2016. }
  2017. return object.index - other.index;
  2018. }
  2019. function composeArgs(args, partials, holders, isCurried) {
  2020. var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result2 = Array2(leftLength + rangeLength), isUncurried = !isCurried;
  2021. while (++leftIndex < leftLength) {
  2022. result2[leftIndex] = partials[leftIndex];
  2023. }
  2024. while (++argsIndex < holdersLength) {
  2025. if (isUncurried || argsIndex < argsLength) {
  2026. result2[holders[argsIndex]] = args[argsIndex];
  2027. }
  2028. }
  2029. while (rangeLength--) {
  2030. result2[leftIndex++] = args[argsIndex++];
  2031. }
  2032. return result2;
  2033. }
  2034. function composeArgsRight(args, partials, holders, isCurried) {
  2035. var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result2 = Array2(rangeLength + rightLength), isUncurried = !isCurried;
  2036. while (++argsIndex < rangeLength) {
  2037. result2[argsIndex] = args[argsIndex];
  2038. }
  2039. var offset = argsIndex;
  2040. while (++rightIndex < rightLength) {
  2041. result2[offset + rightIndex] = partials[rightIndex];
  2042. }
  2043. while (++holdersIndex < holdersLength) {
  2044. if (isUncurried || argsIndex < argsLength) {
  2045. result2[offset + holders[holdersIndex]] = args[argsIndex++];
  2046. }
  2047. }
  2048. return result2;
  2049. }
  2050. function copyArray(source, array) {
  2051. var index = -1, length = source.length;
  2052. array || (array = Array2(length));
  2053. while (++index < length) {
  2054. array[index] = source[index];
  2055. }
  2056. return array;
  2057. }
  2058. function copyObject(source, props, object, customizer) {
  2059. var isNew = !object;
  2060. object || (object = {});
  2061. var index = -1, length = props.length;
  2062. while (++index < length) {
  2063. var key = props[index];
  2064. var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined;
  2065. if (newValue === undefined) {
  2066. newValue = source[key];
  2067. }
  2068. if (isNew) {
  2069. baseAssignValue(object, key, newValue);
  2070. } else {
  2071. assignValue(object, key, newValue);
  2072. }
  2073. }
  2074. return object;
  2075. }
  2076. function copySymbols(source, object) {
  2077. return copyObject(source, getSymbols(source), object);
  2078. }
  2079. function copySymbolsIn(source, object) {
  2080. return copyObject(source, getSymbolsIn(source), object);
  2081. }
  2082. function createAggregator(setter, initializer) {
  2083. return function(collection, iteratee2) {
  2084. var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {};
  2085. return func(collection, setter, getIteratee(iteratee2, 2), accumulator);
  2086. };
  2087. }
  2088. function createAssigner(assigner) {
  2089. return baseRest(function(object, sources) {
  2090. var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined;
  2091. customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : undefined;
  2092. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  2093. customizer = length < 3 ? undefined : customizer;
  2094. length = 1;
  2095. }
  2096. object = Object2(object);
  2097. while (++index < length) {
  2098. var source = sources[index];
  2099. if (source) {
  2100. assigner(object, source, index, customizer);
  2101. }
  2102. }
  2103. return object;
  2104. });
  2105. }
  2106. function createBaseEach(eachFunc, fromRight) {
  2107. return function(collection, iteratee2) {
  2108. if (collection == null) {
  2109. return collection;
  2110. }
  2111. if (!isArrayLike(collection)) {
  2112. return eachFunc(collection, iteratee2);
  2113. }
  2114. var length = collection.length, index = fromRight ? length : -1, iterable = Object2(collection);
  2115. while (fromRight ? index-- : ++index < length) {
  2116. if (iteratee2(iterable[index], index, iterable) === false) {
  2117. break;
  2118. }
  2119. }
  2120. return collection;
  2121. };
  2122. }
  2123. function createBaseFor(fromRight) {
  2124. return function(object, iteratee2, keysFunc) {
  2125. var index = -1, iterable = Object2(object), props = keysFunc(object), length = props.length;
  2126. while (length--) {
  2127. var key = props[fromRight ? length : ++index];
  2128. if (iteratee2(iterable[key], key, iterable) === false) {
  2129. break;
  2130. }
  2131. }
  2132. return object;
  2133. };
  2134. }
  2135. function createBind(func, bitmask, thisArg) {
  2136. var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
  2137. function wrapper() {
  2138. var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
  2139. return fn.apply(isBind ? thisArg : this, arguments);
  2140. }
  2141. return wrapper;
  2142. }
  2143. function createCaseFirst(methodName) {
  2144. return function(string) {
  2145. string = toString(string);
  2146. var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined;
  2147. var chr = strSymbols ? strSymbols[0] : string.charAt(0);
  2148. var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1);
  2149. return chr[methodName]() + trailing;
  2150. };
  2151. }
  2152. function createCompounder(callback) {
  2153. return function(string) {
  2154. return arrayReduce(words(deburr(string).replace(reApos, "")), callback, "");
  2155. };
  2156. }
  2157. function createCtor(Ctor) {
  2158. return function() {
  2159. var args = arguments;
  2160. switch (args.length) {
  2161. case 0:
  2162. return new Ctor();
  2163. case 1:
  2164. return new Ctor(args[0]);
  2165. case 2:
  2166. return new Ctor(args[0], args[1]);
  2167. case 3:
  2168. return new Ctor(args[0], args[1], args[2]);
  2169. case 4:
  2170. return new Ctor(args[0], args[1], args[2], args[3]);
  2171. case 5:
  2172. return new Ctor(args[0], args[1], args[2], args[3], args[4]);
  2173. case 6:
  2174. return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
  2175. case 7:
  2176. return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
  2177. }
  2178. var thisBinding = baseCreate(Ctor.prototype), result2 = Ctor.apply(thisBinding, args);
  2179. return isObject(result2) ? result2 : thisBinding;
  2180. };
  2181. }
  2182. function createCurry(func, bitmask, arity) {
  2183. var Ctor = createCtor(func);
  2184. function wrapper() {
  2185. var length = arguments.length, args = Array2(length), index = length, placeholder = getHolder(wrapper);
  2186. while (index--) {
  2187. args[index] = arguments[index];
  2188. }
  2189. var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder);
  2190. length -= holders.length;
  2191. if (length < arity) {
  2192. return createRecurry(
  2193. func,
  2194. bitmask,
  2195. createHybrid,
  2196. wrapper.placeholder,
  2197. undefined,
  2198. args,
  2199. holders,
  2200. undefined,
  2201. undefined,
  2202. arity - length
  2203. );
  2204. }
  2205. var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
  2206. return apply(fn, this, args);
  2207. }
  2208. return wrapper;
  2209. }
  2210. function createFind(findIndexFunc) {
  2211. return function(collection, predicate, fromIndex) {
  2212. var iterable = Object2(collection);
  2213. if (!isArrayLike(collection)) {
  2214. var iteratee2 = getIteratee(predicate, 3);
  2215. collection = keys(collection);
  2216. predicate = function(key) {
  2217. return iteratee2(iterable[key], key, iterable);
  2218. };
  2219. }
  2220. var index = findIndexFunc(collection, predicate, fromIndex);
  2221. return index > -1 ? iterable[iteratee2 ? collection[index] : index] : undefined;
  2222. };
  2223. }
  2224. function createFlow(fromRight) {
  2225. return flatRest(function(funcs) {
  2226. var length = funcs.length, index = length, prereq = LodashWrapper.prototype.thru;
  2227. if (fromRight) {
  2228. funcs.reverse();
  2229. }
  2230. while (index--) {
  2231. var func = funcs[index];
  2232. if (typeof func != "function") {
  2233. throw new TypeError(FUNC_ERROR_TEXT);
  2234. }
  2235. if (prereq && !wrapper && getFuncName(func) == "wrapper") {
  2236. var wrapper = new LodashWrapper([], true);
  2237. }
  2238. }
  2239. index = wrapper ? index : length;
  2240. while (++index < length) {
  2241. func = funcs[index];
  2242. var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : undefined;
  2243. if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) {
  2244. wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
  2245. } else {
  2246. wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func);
  2247. }
  2248. }
  2249. return function() {
  2250. var args = arguments, value = args[0];
  2251. if (wrapper && args.length == 1 && isArray(value)) {
  2252. return wrapper.plant(value).value();
  2253. }
  2254. var index2 = 0, result2 = length ? funcs[index2].apply(this, args) : value;
  2255. while (++index2 < length) {
  2256. result2 = funcs[index2].call(this, result2);
  2257. }
  2258. return result2;
  2259. };
  2260. });
  2261. }
  2262. function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary2, arity) {
  2263. var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? undefined : createCtor(func);
  2264. function wrapper() {
  2265. var length = arguments.length, args = Array2(length), index = length;
  2266. while (index--) {
  2267. args[index] = arguments[index];
  2268. }
  2269. if (isCurried) {
  2270. var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder);
  2271. }
  2272. if (partials) {
  2273. args = composeArgs(args, partials, holders, isCurried);
  2274. }
  2275. if (partialsRight) {
  2276. args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
  2277. }
  2278. length -= holdersCount;
  2279. if (isCurried && length < arity) {
  2280. var newHolders = replaceHolders(args, placeholder);
  2281. return createRecurry(
  2282. func,
  2283. bitmask,
  2284. createHybrid,
  2285. wrapper.placeholder,
  2286. thisArg,
  2287. args,
  2288. newHolders,
  2289. argPos,
  2290. ary2,
  2291. arity - length
  2292. );
  2293. }
  2294. var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func;
  2295. length = args.length;
  2296. if (argPos) {
  2297. args = reorder(args, argPos);
  2298. } else if (isFlip && length > 1) {
  2299. args.reverse();
  2300. }
  2301. if (isAry && ary2 < length) {
  2302. args.length = ary2;
  2303. }
  2304. if (this && this !== root && this instanceof wrapper) {
  2305. fn = Ctor || createCtor(fn);
  2306. }
  2307. return fn.apply(thisBinding, args);
  2308. }
  2309. return wrapper;
  2310. }
  2311. function createInverter(setter, toIteratee) {
  2312. return function(object, iteratee2) {
  2313. return baseInverter(object, setter, toIteratee(iteratee2), {});
  2314. };
  2315. }
  2316. function createMathOperation(operator, defaultValue) {
  2317. return function(value, other) {
  2318. var result2;
  2319. if (value === undefined && other === undefined) {
  2320. return defaultValue;
  2321. }
  2322. if (value !== undefined) {
  2323. result2 = value;
  2324. }
  2325. if (other !== undefined) {
  2326. if (result2 === undefined) {
  2327. return other;
  2328. }
  2329. if (typeof value == "string" || typeof other == "string") {
  2330. value = baseToString(value);
  2331. other = baseToString(other);
  2332. } else {
  2333. value = baseToNumber(value);
  2334. other = baseToNumber(other);
  2335. }
  2336. result2 = operator(value, other);
  2337. }
  2338. return result2;
  2339. };
  2340. }
  2341. function createOver(arrayFunc) {
  2342. return flatRest(function(iteratees) {
  2343. iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
  2344. return baseRest(function(args) {
  2345. var thisArg = this;
  2346. return arrayFunc(iteratees, function(iteratee2) {
  2347. return apply(iteratee2, thisArg, args);
  2348. });
  2349. });
  2350. });
  2351. }
  2352. function createPadding(length, chars) {
  2353. chars = chars === undefined ? " " : baseToString(chars);
  2354. var charsLength = chars.length;
  2355. if (charsLength < 2) {
  2356. return charsLength ? baseRepeat(chars, length) : chars;
  2357. }
  2358. var result2 = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
  2359. return hasUnicode(chars) ? castSlice(stringToArray(result2), 0, length).join("") : result2.slice(0, length);
  2360. }
  2361. function createPartial(func, bitmask, thisArg, partials) {
  2362. var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
  2363. function wrapper() {
  2364. var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array2(leftLength + argsLength), fn = this && this !== root && this instanceof wrapper ? Ctor : func;
  2365. while (++leftIndex < leftLength) {
  2366. args[leftIndex] = partials[leftIndex];
  2367. }
  2368. while (argsLength--) {
  2369. args[leftIndex++] = arguments[++argsIndex];
  2370. }
  2371. return apply(fn, isBind ? thisArg : this, args);
  2372. }
  2373. return wrapper;
  2374. }
  2375. function createRange(fromRight) {
  2376. return function(start, end, step) {
  2377. if (step && typeof step != "number" && isIterateeCall(start, end, step)) {
  2378. end = step = undefined;
  2379. }
  2380. start = toFinite(start);
  2381. if (end === undefined) {
  2382. end = start;
  2383. start = 0;
  2384. } else {
  2385. end = toFinite(end);
  2386. }
  2387. step = step === undefined ? start < end ? 1 : -1 : toFinite(step);
  2388. return baseRange(start, end, step, fromRight);
  2389. };
  2390. }
  2391. function createRelationalOperation(operator) {
  2392. return function(value, other) {
  2393. if (!(typeof value == "string" && typeof other == "string")) {
  2394. value = toNumber(value);
  2395. other = toNumber(other);
  2396. }
  2397. return operator(value, other);
  2398. };
  2399. }
  2400. function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary2, arity) {
  2401. var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : undefined, newHoldersRight = isCurry ? undefined : holders, newPartials = isCurry ? partials : undefined, newPartialsRight = isCurry ? undefined : partials;
  2402. bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG;
  2403. bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
  2404. if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
  2405. bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
  2406. }
  2407. var newData = [
  2408. func,
  2409. bitmask,
  2410. thisArg,
  2411. newPartials,
  2412. newHolders,
  2413. newPartialsRight,
  2414. newHoldersRight,
  2415. argPos,
  2416. ary2,
  2417. arity
  2418. ];
  2419. var result2 = wrapFunc.apply(undefined, newData);
  2420. if (isLaziable(func)) {
  2421. setData(result2, newData);
  2422. }
  2423. result2.placeholder = placeholder;
  2424. return setWrapToString(result2, func, bitmask);
  2425. }
  2426. function createRound(methodName) {
  2427. var func = Math[methodName];
  2428. return function(number, precision) {
  2429. number = toNumber(number);
  2430. precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
  2431. if (precision && nativeIsFinite(number)) {
  2432. var pair = (toString(number) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision));
  2433. pair = (toString(value) + "e").split("e");
  2434. return +(pair[0] + "e" + (+pair[1] - precision));
  2435. }
  2436. return func(number);
  2437. };
  2438. }
  2439. var createSet = !(Set && 1 / setToArray(new Set([, -0]))[1] == INFINITY) ? noop : function(values2) {
  2440. return new Set(values2);
  2441. };
  2442. function createToPairs(keysFunc) {
  2443. return function(object) {
  2444. var tag = getTag(object);
  2445. if (tag == mapTag) {
  2446. return mapToArray(object);
  2447. }
  2448. if (tag == setTag) {
  2449. return setToPairs(object);
  2450. }
  2451. return baseToPairs(object, keysFunc(object));
  2452. };
  2453. }
  2454. function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary2, arity) {
  2455. var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
  2456. if (!isBindKey && typeof func != "function") {
  2457. throw new TypeError(FUNC_ERROR_TEXT);
  2458. }
  2459. var length = partials ? partials.length : 0;
  2460. if (!length) {
  2461. bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
  2462. partials = holders = undefined;
  2463. }
  2464. ary2 = ary2 === undefined ? ary2 : nativeMax(toInteger(ary2), 0);
  2465. arity = arity === undefined ? arity : toInteger(arity);
  2466. length -= holders ? holders.length : 0;
  2467. if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
  2468. var partialsRight = partials, holdersRight = holders;
  2469. partials = holders = undefined;
  2470. }
  2471. var data = isBindKey ? undefined : getData(func);
  2472. var newData = [
  2473. func,
  2474. bitmask,
  2475. thisArg,
  2476. partials,
  2477. holders,
  2478. partialsRight,
  2479. holdersRight,
  2480. argPos,
  2481. ary2,
  2482. arity
  2483. ];
  2484. if (data) {
  2485. mergeData(newData, data);
  2486. }
  2487. func = newData[0];
  2488. bitmask = newData[1];
  2489. thisArg = newData[2];
  2490. partials = newData[3];
  2491. holders = newData[4];
  2492. arity = newData[9] = newData[9] === undefined ? isBindKey ? 0 : func.length : nativeMax(newData[9] - length, 0);
  2493. if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
  2494. bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
  2495. }
  2496. if (!bitmask || bitmask == WRAP_BIND_FLAG) {
  2497. var result2 = createBind(func, bitmask, thisArg);
  2498. } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
  2499. result2 = createCurry(func, bitmask, arity);
  2500. } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
  2501. result2 = createPartial(func, bitmask, thisArg, partials);
  2502. } else {
  2503. result2 = createHybrid.apply(undefined, newData);
  2504. }
  2505. var setter = data ? baseSetData : setData;
  2506. return setWrapToString(setter(result2, newData), func, bitmask);
  2507. }
  2508. function customDefaultsAssignIn(objValue, srcValue, key, object) {
  2509. if (objValue === undefined || eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) {
  2510. return srcValue;
  2511. }
  2512. return objValue;
  2513. }
  2514. function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
  2515. if (isObject(objValue) && isObject(srcValue)) {
  2516. stack.set(srcValue, objValue);
  2517. baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
  2518. stack["delete"](srcValue);
  2519. }
  2520. return objValue;
  2521. }
  2522. function customOmitClone(value) {
  2523. return isPlainObject(value) ? undefined : value;
  2524. }
  2525. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  2526. var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
  2527. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  2528. return false;
  2529. }
  2530. var arrStacked = stack.get(array);
  2531. var othStacked = stack.get(other);
  2532. if (arrStacked && othStacked) {
  2533. return arrStacked == other && othStacked == array;
  2534. }
  2535. var index = -1, result2 = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined;
  2536. stack.set(array, other);
  2537. stack.set(other, array);
  2538. while (++index < arrLength) {
  2539. var arrValue = array[index], othValue = other[index];
  2540. if (customizer) {
  2541. var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
  2542. }
  2543. if (compared !== undefined) {
  2544. if (compared) {
  2545. continue;
  2546. }
  2547. result2 = false;
  2548. break;
  2549. }
  2550. if (seen) {
  2551. if (!arraySome(other, function(othValue2, othIndex) {
  2552. if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
  2553. return seen.push(othIndex);
  2554. }
  2555. })) {
  2556. result2 = false;
  2557. break;
  2558. }
  2559. } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  2560. result2 = false;
  2561. break;
  2562. }
  2563. }
  2564. stack["delete"](array);
  2565. stack["delete"](other);
  2566. return result2;
  2567. }
  2568. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  2569. switch (tag) {
  2570. case dataViewTag:
  2571. if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
  2572. return false;
  2573. }
  2574. object = object.buffer;
  2575. other = other.buffer;
  2576. case arrayBufferTag:
  2577. if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
  2578. return false;
  2579. }
  2580. return true;
  2581. case boolTag:
  2582. case dateTag:
  2583. case numberTag:
  2584. return eq(+object, +other);
  2585. case errorTag:
  2586. return object.name == other.name && object.message == other.message;
  2587. case regexpTag:
  2588. case stringTag:
  2589. return object == other + "";
  2590. case mapTag:
  2591. var convert = mapToArray;
  2592. case setTag:
  2593. var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
  2594. convert || (convert = setToArray);
  2595. if (object.size != other.size && !isPartial) {
  2596. return false;
  2597. }
  2598. var stacked = stack.get(object);
  2599. if (stacked) {
  2600. return stacked == other;
  2601. }
  2602. bitmask |= COMPARE_UNORDERED_FLAG;
  2603. stack.set(object, other);
  2604. var result2 = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  2605. stack["delete"](object);
  2606. return result2;
  2607. case symbolTag:
  2608. if (symbolValueOf) {
  2609. return symbolValueOf.call(object) == symbolValueOf.call(other);
  2610. }
  2611. }
  2612. return false;
  2613. }
  2614. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  2615. var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
  2616. if (objLength != othLength && !isPartial) {
  2617. return false;
  2618. }
  2619. var index = objLength;
  2620. while (index--) {
  2621. var key = objProps[index];
  2622. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  2623. return false;
  2624. }
  2625. }
  2626. var objStacked = stack.get(object);
  2627. var othStacked = stack.get(other);
  2628. if (objStacked && othStacked) {
  2629. return objStacked == other && othStacked == object;
  2630. }
  2631. var result2 = true;
  2632. stack.set(object, other);
  2633. stack.set(other, object);
  2634. var skipCtor = isPartial;
  2635. while (++index < objLength) {
  2636. key = objProps[index];
  2637. var objValue = object[key], othValue = other[key];
  2638. if (customizer) {
  2639. var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
  2640. }
  2641. if (!(compared === undefined ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
  2642. result2 = false;
  2643. break;
  2644. }
  2645. skipCtor || (skipCtor = key == "constructor");
  2646. }
  2647. if (result2 && !skipCtor) {
  2648. var objCtor = object.constructor, othCtor = other.constructor;
  2649. if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
  2650. result2 = false;
  2651. }
  2652. }
  2653. stack["delete"](object);
  2654. stack["delete"](other);
  2655. return result2;
  2656. }
  2657. function flatRest(func) {
  2658. return setToString(overRest(func, undefined, flatten), func + "");
  2659. }
  2660. function getAllKeys(object) {
  2661. return baseGetAllKeys(object, keys, getSymbols);
  2662. }
  2663. function getAllKeysIn(object) {
  2664. return baseGetAllKeys(object, keysIn, getSymbolsIn);
  2665. }
  2666. var getData = !metaMap ? noop : function(func) {
  2667. return metaMap.get(func);
  2668. };
  2669. function getFuncName(func) {
  2670. var result2 = func.name + "", array = realNames[result2], length = hasOwnProperty.call(realNames, result2) ? array.length : 0;
  2671. while (length--) {
  2672. var data = array[length], otherFunc = data.func;
  2673. if (otherFunc == null || otherFunc == func) {
  2674. return data.name;
  2675. }
  2676. }
  2677. return result2;
  2678. }
  2679. function getHolder(func) {
  2680. var object = hasOwnProperty.call(lodash, "placeholder") ? lodash : func;
  2681. return object.placeholder;
  2682. }
  2683. function getIteratee() {
  2684. var result2 = lodash.iteratee || iteratee;
  2685. result2 = result2 === iteratee ? baseIteratee : result2;
  2686. return arguments.length ? result2(arguments[0], arguments[1]) : result2;
  2687. }
  2688. function getMapData(map2, key) {
  2689. var data = map2.__data__;
  2690. return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
  2691. }
  2692. function getMatchData(object) {
  2693. var result2 = keys(object), length = result2.length;
  2694. while (length--) {
  2695. var key = result2[length], value = object[key];
  2696. result2[length] = [key, value, isStrictComparable(value)];
  2697. }
  2698. return result2;
  2699. }
  2700. function getNative(object, key) {
  2701. var value = getValue(object, key);
  2702. return baseIsNative(value) ? value : undefined;
  2703. }
  2704. function getRawTag(value) {
  2705. var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
  2706. try {
  2707. value[symToStringTag] = undefined;
  2708. var unmasked = true;
  2709. } catch (e) {
  2710. }
  2711. var result2 = nativeObjectToString.call(value);
  2712. if (unmasked) {
  2713. if (isOwn) {
  2714. value[symToStringTag] = tag;
  2715. } else {
  2716. delete value[symToStringTag];
  2717. }
  2718. }
  2719. return result2;
  2720. }
  2721. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  2722. if (object == null) {
  2723. return [];
  2724. }
  2725. object = Object2(object);
  2726. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  2727. return propertyIsEnumerable.call(object, symbol);
  2728. });
  2729. };
  2730. var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
  2731. var result2 = [];
  2732. while (object) {
  2733. arrayPush(result2, getSymbols(object));
  2734. object = getPrototype(object);
  2735. }
  2736. return result2;
  2737. };
  2738. var getTag = baseGetTag;
  2739. if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set && getTag(new Set()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
  2740. getTag = function(value) {
  2741. var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : "";
  2742. if (ctorString) {
  2743. switch (ctorString) {
  2744. case dataViewCtorString:
  2745. return dataViewTag;
  2746. case mapCtorString:
  2747. return mapTag;
  2748. case promiseCtorString:
  2749. return promiseTag;
  2750. case setCtorString:
  2751. return setTag;
  2752. case weakMapCtorString:
  2753. return weakMapTag;
  2754. }
  2755. }
  2756. return result2;
  2757. };
  2758. }
  2759. function getView(start, end, transforms) {
  2760. var index = -1, length = transforms.length;
  2761. while (++index < length) {
  2762. var data = transforms[index], size2 = data.size;
  2763. switch (data.type) {
  2764. case "drop":
  2765. start += size2;
  2766. break;
  2767. case "dropRight":
  2768. end -= size2;
  2769. break;
  2770. case "take":
  2771. end = nativeMin(end, start + size2);
  2772. break;
  2773. case "takeRight":
  2774. start = nativeMax(start, end - size2);
  2775. break;
  2776. }
  2777. }
  2778. return { "start": start, "end": end };
  2779. }
  2780. function getWrapDetails(source) {
  2781. var match = source.match(reWrapDetails);
  2782. return match ? match[1].split(reSplitDetails) : [];
  2783. }
  2784. function hasPath(object, path, hasFunc) {
  2785. path = castPath(path, object);
  2786. var index = -1, length = path.length, result2 = false;
  2787. while (++index < length) {
  2788. var key = toKey(path[index]);
  2789. if (!(result2 = object != null && hasFunc(object, key))) {
  2790. break;
  2791. }
  2792. object = object[key];
  2793. }
  2794. if (result2 || ++index != length) {
  2795. return result2;
  2796. }
  2797. length = object == null ? 0 : object.length;
  2798. return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
  2799. }
  2800. function initCloneArray(array) {
  2801. var length = array.length, result2 = new array.constructor(length);
  2802. if (length && typeof array[0] == "string" && hasOwnProperty.call(array, "index")) {
  2803. result2.index = array.index;
  2804. result2.input = array.input;
  2805. }
  2806. return result2;
  2807. }
  2808. function initCloneObject(object) {
  2809. return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
  2810. }
  2811. function initCloneByTag(object, tag, isDeep) {
  2812. var Ctor = object.constructor;
  2813. switch (tag) {
  2814. case arrayBufferTag:
  2815. return cloneArrayBuffer(object);
  2816. case boolTag:
  2817. case dateTag:
  2818. return new Ctor(+object);
  2819. case dataViewTag:
  2820. return cloneDataView(object, isDeep);
  2821. case float32Tag:
  2822. case float64Tag:
  2823. case int8Tag:
  2824. case int16Tag:
  2825. case int32Tag:
  2826. case uint8Tag:
  2827. case uint8ClampedTag:
  2828. case uint16Tag:
  2829. case uint32Tag:
  2830. return cloneTypedArray(object, isDeep);
  2831. case mapTag:
  2832. return new Ctor();
  2833. case numberTag:
  2834. case stringTag:
  2835. return new Ctor(object);
  2836. case regexpTag:
  2837. return cloneRegExp(object);
  2838. case setTag:
  2839. return new Ctor();
  2840. case symbolTag:
  2841. return cloneSymbol(object);
  2842. }
  2843. }
  2844. function insertWrapDetails(source, details) {
  2845. var length = details.length;
  2846. if (!length) {
  2847. return source;
  2848. }
  2849. var lastIndex = length - 1;
  2850. details[lastIndex] = (length > 1 ? "& " : "") + details[lastIndex];
  2851. details = details.join(length > 2 ? ", " : " ");
  2852. return source.replace(reWrapComment, "{\n/* [wrapped with " + details + "] */\n");
  2853. }
  2854. function isFlattenable(value) {
  2855. return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
  2856. }
  2857. function isIndex(value, length) {
  2858. var type = typeof value;
  2859. length = length == null ? MAX_SAFE_INTEGER : length;
  2860. return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
  2861. }
  2862. function isIterateeCall(value, index, object) {
  2863. if (!isObject(object)) {
  2864. return false;
  2865. }
  2866. var type = typeof index;
  2867. if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) {
  2868. return eq(object[index], value);
  2869. }
  2870. return false;
  2871. }
  2872. function isKey(value, object) {
  2873. if (isArray(value)) {
  2874. return false;
  2875. }
  2876. var type = typeof value;
  2877. if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
  2878. return true;
  2879. }
  2880. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object2(object);
  2881. }
  2882. function isKeyable(value) {
  2883. var type = typeof value;
  2884. return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
  2885. }
  2886. function isLaziable(func) {
  2887. var funcName = getFuncName(func), other = lodash[funcName];
  2888. if (typeof other != "function" || !(funcName in LazyWrapper.prototype)) {
  2889. return false;
  2890. }
  2891. if (func === other) {
  2892. return true;
  2893. }
  2894. var data = getData(other);
  2895. return !!data && func === data[0];
  2896. }
  2897. function isMasked(func) {
  2898. return !!maskSrcKey && maskSrcKey in func;
  2899. }
  2900. var isMaskable = coreJsData ? isFunction : stubFalse;
  2901. function isPrototype(value) {
  2902. var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
  2903. return value === proto;
  2904. }
  2905. function isStrictComparable(value) {
  2906. return value === value && !isObject(value);
  2907. }
  2908. function matchesStrictComparable(key, srcValue) {
  2909. return function(object) {
  2910. if (object == null) {
  2911. return false;
  2912. }
  2913. return object[key] === srcValue && (srcValue !== undefined || key in Object2(object));
  2914. };
  2915. }
  2916. function memoizeCapped(func) {
  2917. var result2 = memoize(func, function(key) {
  2918. if (cache.size === MAX_MEMOIZE_SIZE) {
  2919. cache.clear();
  2920. }
  2921. return key;
  2922. });
  2923. var cache = result2.cache;
  2924. return result2;
  2925. }
  2926. function mergeData(data, source) {
  2927. var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
  2928. var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source[8] || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source[7].length <= source[8] && bitmask == WRAP_CURRY_FLAG;
  2929. if (!(isCommon || isCombo)) {
  2930. return data;
  2931. }
  2932. if (srcBitmask & WRAP_BIND_FLAG) {
  2933. data[2] = source[2];
  2934. newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
  2935. }
  2936. var value = source[3];
  2937. if (value) {
  2938. var partials = data[3];
  2939. data[3] = partials ? composeArgs(partials, value, source[4]) : value;
  2940. data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
  2941. }
  2942. value = source[5];
  2943. if (value) {
  2944. partials = data[5];
  2945. data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
  2946. data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
  2947. }
  2948. value = source[7];
  2949. if (value) {
  2950. data[7] = value;
  2951. }
  2952. if (srcBitmask & WRAP_ARY_FLAG) {
  2953. data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
  2954. }
  2955. if (data[9] == null) {
  2956. data[9] = source[9];
  2957. }
  2958. data[0] = source[0];
  2959. data[1] = newBitmask;
  2960. return data;
  2961. }
  2962. function nativeKeysIn(object) {
  2963. var result2 = [];
  2964. if (object != null) {
  2965. for (var key in Object2(object)) {
  2966. result2.push(key);
  2967. }
  2968. }
  2969. return result2;
  2970. }
  2971. function objectToString(value) {
  2972. return nativeObjectToString.call(value);
  2973. }
  2974. function overRest(func, start, transform2) {
  2975. start = nativeMax(start === undefined ? func.length - 1 : start, 0);
  2976. return function() {
  2977. var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array2(length);
  2978. while (++index < length) {
  2979. array[index] = args[start + index];
  2980. }
  2981. index = -1;
  2982. var otherArgs = Array2(start + 1);
  2983. while (++index < start) {
  2984. otherArgs[index] = args[index];
  2985. }
  2986. otherArgs[start] = transform2(array);
  2987. return apply(func, this, otherArgs);
  2988. };
  2989. }
  2990. function parent(object, path) {
  2991. return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
  2992. }
  2993. function reorder(array, indexes) {
  2994. var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array);
  2995. while (length--) {
  2996. var index = indexes[length];
  2997. array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
  2998. }
  2999. return array;
  3000. }
  3001. function safeGet(object, key) {
  3002. if (key === "constructor" && typeof object[key] === "function") {
  3003. return;
  3004. }
  3005. if (key == "__proto__") {
  3006. return;
  3007. }
  3008. return object[key];
  3009. }
  3010. var setData = shortOut(baseSetData);
  3011. var setTimeout = ctxSetTimeout || function(func, wait) {
  3012. return root.setTimeout(func, wait);
  3013. };
  3014. var setToString = shortOut(baseSetToString);
  3015. function setWrapToString(wrapper, reference, bitmask) {
  3016. var source = reference + "";
  3017. return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
  3018. }
  3019. function shortOut(func) {
  3020. var count = 0, lastCalled = 0;
  3021. return function() {
  3022. var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
  3023. lastCalled = stamp;
  3024. if (remaining > 0) {
  3025. if (++count >= HOT_COUNT) {
  3026. return arguments[0];
  3027. }
  3028. } else {
  3029. count = 0;
  3030. }
  3031. return func.apply(undefined, arguments);
  3032. };
  3033. }
  3034. function shuffleSelf(array, size2) {
  3035. var index = -1, length = array.length, lastIndex = length - 1;
  3036. size2 = size2 === undefined ? length : size2;
  3037. while (++index < size2) {
  3038. var rand = baseRandom(index, lastIndex), value = array[rand];
  3039. array[rand] = array[index];
  3040. array[index] = value;
  3041. }
  3042. array.length = size2;
  3043. return array;
  3044. }
  3045. var stringToPath = memoizeCapped(function(string) {
  3046. var result2 = [];
  3047. if (string.charCodeAt(0) === 46) {
  3048. result2.push("");
  3049. }
  3050. string.replace(rePropName, function(match, number, quote, subString) {
  3051. result2.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
  3052. });
  3053. return result2;
  3054. });
  3055. function toKey(value) {
  3056. if (typeof value == "string" || isSymbol(value)) {
  3057. return value;
  3058. }
  3059. var result2 = value + "";
  3060. return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2;
  3061. }
  3062. function toSource(func) {
  3063. if (func != null) {
  3064. try {
  3065. return funcToString.call(func);
  3066. } catch (e) {
  3067. }
  3068. try {
  3069. return func + "";
  3070. } catch (e) {
  3071. }
  3072. }
  3073. return "";
  3074. }
  3075. function updateWrapDetails(details, bitmask) {
  3076. arrayEach(wrapFlags, function(pair) {
  3077. var value = "_." + pair[0];
  3078. if (bitmask & pair[1] && !arrayIncludes(details, value)) {
  3079. details.push(value);
  3080. }
  3081. });
  3082. return details.sort();
  3083. }
  3084. function wrapperClone(wrapper) {
  3085. if (wrapper instanceof LazyWrapper) {
  3086. return wrapper.clone();
  3087. }
  3088. var result2 = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
  3089. result2.__actions__ = copyArray(wrapper.__actions__);
  3090. result2.__index__ = wrapper.__index__;
  3091. result2.__values__ = wrapper.__values__;
  3092. return result2;
  3093. }
  3094. function chunk(array, size2, guard) {
  3095. if (guard ? isIterateeCall(array, size2, guard) : size2 === undefined) {
  3096. size2 = 1;
  3097. } else {
  3098. size2 = nativeMax(toInteger(size2), 0);
  3099. }
  3100. var length = array == null ? 0 : array.length;
  3101. if (!length || size2 < 1) {
  3102. return [];
  3103. }
  3104. var index = 0, resIndex = 0, result2 = Array2(nativeCeil(length / size2));
  3105. while (index < length) {
  3106. result2[resIndex++] = baseSlice(array, index, index += size2);
  3107. }
  3108. return result2;
  3109. }
  3110. function compact(array) {
  3111. var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result2 = [];
  3112. while (++index < length) {
  3113. var value = array[index];
  3114. if (value) {
  3115. result2[resIndex++] = value;
  3116. }
  3117. }
  3118. return result2;
  3119. }
  3120. function concat() {
  3121. var length = arguments.length;
  3122. if (!length) {
  3123. return [];
  3124. }
  3125. var args = Array2(length - 1), array = arguments[0], index = length;
  3126. while (index--) {
  3127. args[index - 1] = arguments[index];
  3128. }
  3129. return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
  3130. }
  3131. var difference = baseRest(function(array, values2) {
  3132. return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true)) : [];
  3133. });
  3134. var differenceBy = baseRest(function(array, values2) {
  3135. var iteratee2 = last(values2);
  3136. if (isArrayLikeObject(iteratee2)) {
  3137. iteratee2 = undefined;
  3138. }
  3139. return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2)) : [];
  3140. });
  3141. var differenceWith = baseRest(function(array, values2) {
  3142. var comparator = last(values2);
  3143. if (isArrayLikeObject(comparator)) {
  3144. comparator = undefined;
  3145. }
  3146. return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), undefined, comparator) : [];
  3147. });
  3148. function drop(array, n, guard) {
  3149. var length = array == null ? 0 : array.length;
  3150. if (!length) {
  3151. return [];
  3152. }
  3153. n = guard || n === undefined ? 1 : toInteger(n);
  3154. return baseSlice(array, n < 0 ? 0 : n, length);
  3155. }
  3156. function dropRight(array, n, guard) {
  3157. var length = array == null ? 0 : array.length;
  3158. if (!length) {
  3159. return [];
  3160. }
  3161. n = guard || n === undefined ? 1 : toInteger(n);
  3162. n = length - n;
  3163. return baseSlice(array, 0, n < 0 ? 0 : n);
  3164. }
  3165. function dropRightWhile(array, predicate) {
  3166. return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true, true) : [];
  3167. }
  3168. function dropWhile(array, predicate) {
  3169. return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true) : [];
  3170. }
  3171. function fill(array, value, start, end) {
  3172. var length = array == null ? 0 : array.length;
  3173. if (!length) {
  3174. return [];
  3175. }
  3176. if (start && typeof start != "number" && isIterateeCall(array, value, start)) {
  3177. start = 0;
  3178. end = length;
  3179. }
  3180. return baseFill(array, value, start, end);
  3181. }
  3182. function findIndex(array, predicate, fromIndex) {
  3183. var length = array == null ? 0 : array.length;
  3184. if (!length) {
  3185. return -1;
  3186. }
  3187. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  3188. if (index < 0) {
  3189. index = nativeMax(length + index, 0);
  3190. }
  3191. return baseFindIndex(array, getIteratee(predicate, 3), index);
  3192. }
  3193. function findLastIndex(array, predicate, fromIndex) {
  3194. var length = array == null ? 0 : array.length;
  3195. if (!length) {
  3196. return -1;
  3197. }
  3198. var index = length - 1;
  3199. if (fromIndex !== undefined) {
  3200. index = toInteger(fromIndex);
  3201. index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
  3202. }
  3203. return baseFindIndex(array, getIteratee(predicate, 3), index, true);
  3204. }
  3205. function flatten(array) {
  3206. var length = array == null ? 0 : array.length;
  3207. return length ? baseFlatten(array, 1) : [];
  3208. }
  3209. function flattenDeep(array) {
  3210. var length = array == null ? 0 : array.length;
  3211. return length ? baseFlatten(array, INFINITY) : [];
  3212. }
  3213. function flattenDepth(array, depth) {
  3214. var length = array == null ? 0 : array.length;
  3215. if (!length) {
  3216. return [];
  3217. }
  3218. depth = depth === undefined ? 1 : toInteger(depth);
  3219. return baseFlatten(array, depth);
  3220. }
  3221. function fromPairs(pairs) {
  3222. var index = -1, length = pairs == null ? 0 : pairs.length, result2 = {};
  3223. while (++index < length) {
  3224. var pair = pairs[index];
  3225. result2[pair[0]] = pair[1];
  3226. }
  3227. return result2;
  3228. }
  3229. function head(array) {
  3230. return array && array.length ? array[0] : undefined;
  3231. }
  3232. function indexOf(array, value, fromIndex) {
  3233. var length = array == null ? 0 : array.length;
  3234. if (!length) {
  3235. return -1;
  3236. }
  3237. var index = fromIndex == null ? 0 : toInteger(fromIndex);
  3238. if (index < 0) {
  3239. index = nativeMax(length + index, 0);
  3240. }
  3241. return baseIndexOf(array, value, index);
  3242. }
  3243. function initial(array) {
  3244. var length = array == null ? 0 : array.length;
  3245. return length ? baseSlice(array, 0, -1) : [];
  3246. }
  3247. var intersection = baseRest(function(arrays) {
  3248. var mapped = arrayMap(arrays, castArrayLikeObject);
  3249. return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : [];
  3250. });
  3251. var intersectionBy = baseRest(function(arrays) {
  3252. var iteratee2 = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
  3253. if (iteratee2 === last(mapped)) {
  3254. iteratee2 = undefined;
  3255. } else {
  3256. mapped.pop();
  3257. }
  3258. return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, getIteratee(iteratee2, 2)) : [];
  3259. });
  3260. var intersectionWith = baseRest(function(arrays) {
  3261. var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
  3262. comparator = typeof comparator == "function" ? comparator : undefined;
  3263. if (comparator) {
  3264. mapped.pop();
  3265. }
  3266. return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined, comparator) : [];
  3267. });
  3268. function join(array, separator) {
  3269. return array == null ? "" : nativeJoin.call(array, separator);
  3270. }
  3271. function last(array) {
  3272. var length = array == null ? 0 : array.length;
  3273. return length ? array[length - 1] : undefined;
  3274. }
  3275. function lastIndexOf(array, value, fromIndex) {
  3276. var length = array == null ? 0 : array.length;
  3277. if (!length) {
  3278. return -1;
  3279. }
  3280. var index = length;
  3281. if (fromIndex !== undefined) {
  3282. index = toInteger(fromIndex);
  3283. index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
  3284. }
  3285. return value === value ? strictLastIndexOf(array, value, index) : baseFindIndex(array, baseIsNaN, index, true);
  3286. }
  3287. function nth(array, n) {
  3288. return array && array.length ? baseNth(array, toInteger(n)) : undefined;
  3289. }
  3290. var pull = baseRest(pullAll);
  3291. function pullAll(array, values2) {
  3292. return array && array.length && values2 && values2.length ? basePullAll(array, values2) : array;
  3293. }
  3294. function pullAllBy(array, values2, iteratee2) {
  3295. return array && array.length && values2 && values2.length ? basePullAll(array, values2, getIteratee(iteratee2, 2)) : array;
  3296. }
  3297. function pullAllWith(array, values2, comparator) {
  3298. return array && array.length && values2 && values2.length ? basePullAll(array, values2, undefined, comparator) : array;
  3299. }
  3300. var pullAt = flatRest(function(array, indexes) {
  3301. var length = array == null ? 0 : array.length, result2 = baseAt(array, indexes);
  3302. basePullAt(array, arrayMap(indexes, function(index) {
  3303. return isIndex(index, length) ? +index : index;
  3304. }).sort(compareAscending));
  3305. return result2;
  3306. });
  3307. function remove(array, predicate) {
  3308. var result2 = [];
  3309. if (!(array && array.length)) {
  3310. return result2;
  3311. }
  3312. var index = -1, indexes = [], length = array.length;
  3313. predicate = getIteratee(predicate, 3);
  3314. while (++index < length) {
  3315. var value = array[index];
  3316. if (predicate(value, index, array)) {
  3317. result2.push(value);
  3318. indexes.push(index);
  3319. }
  3320. }
  3321. basePullAt(array, indexes);
  3322. return result2;
  3323. }
  3324. function reverse(array) {
  3325. return array == null ? array : nativeReverse.call(array);
  3326. }
  3327. function slice(array, start, end) {
  3328. var length = array == null ? 0 : array.length;
  3329. if (!length) {
  3330. return [];
  3331. }
  3332. if (end && typeof end != "number" && isIterateeCall(array, start, end)) {
  3333. start = 0;
  3334. end = length;
  3335. } else {
  3336. start = start == null ? 0 : toInteger(start);
  3337. end = end === undefined ? length : toInteger(end);
  3338. }
  3339. return baseSlice(array, start, end);
  3340. }
  3341. function sortedIndex(array, value) {
  3342. return baseSortedIndex(array, value);
  3343. }
  3344. function sortedIndexBy(array, value, iteratee2) {
  3345. return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2));
  3346. }
  3347. function sortedIndexOf(array, value) {
  3348. var length = array == null ? 0 : array.length;
  3349. if (length) {
  3350. var index = baseSortedIndex(array, value);
  3351. if (index < length && eq(array[index], value)) {
  3352. return index;
  3353. }
  3354. }
  3355. return -1;
  3356. }
  3357. function sortedLastIndex(array, value) {
  3358. return baseSortedIndex(array, value, true);
  3359. }
  3360. function sortedLastIndexBy(array, value, iteratee2) {
  3361. return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2), true);
  3362. }
  3363. function sortedLastIndexOf(array, value) {
  3364. var length = array == null ? 0 : array.length;
  3365. if (length) {
  3366. var index = baseSortedIndex(array, value, true) - 1;
  3367. if (eq(array[index], value)) {
  3368. return index;
  3369. }
  3370. }
  3371. return -1;
  3372. }
  3373. function sortedUniq(array) {
  3374. return array && array.length ? baseSortedUniq(array) : [];
  3375. }
  3376. function sortedUniqBy(array, iteratee2) {
  3377. return array && array.length ? baseSortedUniq(array, getIteratee(iteratee2, 2)) : [];
  3378. }
  3379. function tail(array) {
  3380. var length = array == null ? 0 : array.length;
  3381. return length ? baseSlice(array, 1, length) : [];
  3382. }
  3383. function take(array, n, guard) {
  3384. if (!(array && array.length)) {
  3385. return [];
  3386. }
  3387. n = guard || n === undefined ? 1 : toInteger(n);
  3388. return baseSlice(array, 0, n < 0 ? 0 : n);
  3389. }
  3390. function takeRight(array, n, guard) {
  3391. var length = array == null ? 0 : array.length;
  3392. if (!length) {
  3393. return [];
  3394. }
  3395. n = guard || n === undefined ? 1 : toInteger(n);
  3396. n = length - n;
  3397. return baseSlice(array, n < 0 ? 0 : n, length);
  3398. }
  3399. function takeRightWhile(array, predicate) {
  3400. return array && array.length ? baseWhile(array, getIteratee(predicate, 3), false, true) : [];
  3401. }
  3402. function takeWhile(array, predicate) {
  3403. return array && array.length ? baseWhile(array, getIteratee(predicate, 3)) : [];
  3404. }
  3405. var union = baseRest(function(arrays) {
  3406. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
  3407. });
  3408. var unionBy = baseRest(function(arrays) {
  3409. var iteratee2 = last(arrays);
  3410. if (isArrayLikeObject(iteratee2)) {
  3411. iteratee2 = undefined;
  3412. }
  3413. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2));
  3414. });
  3415. var unionWith = baseRest(function(arrays) {
  3416. var comparator = last(arrays);
  3417. comparator = typeof comparator == "function" ? comparator : undefined;
  3418. return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
  3419. });
  3420. function uniq(array) {
  3421. return array && array.length ? baseUniq(array) : [];
  3422. }
  3423. function uniqBy(array, iteratee2) {
  3424. return array && array.length ? baseUniq(array, getIteratee(iteratee2, 2)) : [];
  3425. }
  3426. function uniqWith(array, comparator) {
  3427. comparator = typeof comparator == "function" ? comparator : undefined;
  3428. return array && array.length ? baseUniq(array, undefined, comparator) : [];
  3429. }
  3430. function unzip(array) {
  3431. if (!(array && array.length)) {
  3432. return [];
  3433. }
  3434. var length = 0;
  3435. array = arrayFilter(array, function(group) {
  3436. if (isArrayLikeObject(group)) {
  3437. length = nativeMax(group.length, length);
  3438. return true;
  3439. }
  3440. });
  3441. return baseTimes(length, function(index) {
  3442. return arrayMap(array, baseProperty(index));
  3443. });
  3444. }
  3445. function unzipWith(array, iteratee2) {
  3446. if (!(array && array.length)) {
  3447. return [];
  3448. }
  3449. var result2 = unzip(array);
  3450. if (iteratee2 == null) {
  3451. return result2;
  3452. }
  3453. return arrayMap(result2, function(group) {
  3454. return apply(iteratee2, undefined, group);
  3455. });
  3456. }
  3457. var without = baseRest(function(array, values2) {
  3458. return isArrayLikeObject(array) ? baseDifference(array, values2) : [];
  3459. });
  3460. var xor = baseRest(function(arrays) {
  3461. return baseXor(arrayFilter(arrays, isArrayLikeObject));
  3462. });
  3463. var xorBy = baseRest(function(arrays) {
  3464. var iteratee2 = last(arrays);
  3465. if (isArrayLikeObject(iteratee2)) {
  3466. iteratee2 = undefined;
  3467. }
  3468. return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee2, 2));
  3469. });
  3470. var xorWith = baseRest(function(arrays) {
  3471. var comparator = last(arrays);
  3472. comparator = typeof comparator == "function" ? comparator : undefined;
  3473. return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
  3474. });
  3475. var zip = baseRest(unzip);
  3476. function zipObject(props, values2) {
  3477. return baseZipObject(props || [], values2 || [], assignValue);
  3478. }
  3479. function zipObjectDeep(props, values2) {
  3480. return baseZipObject(props || [], values2 || [], baseSet);
  3481. }
  3482. var zipWith = baseRest(function(arrays) {
  3483. var length = arrays.length, iteratee2 = length > 1 ? arrays[length - 1] : undefined;
  3484. iteratee2 = typeof iteratee2 == "function" ? (arrays.pop(), iteratee2) : undefined;
  3485. return unzipWith(arrays, iteratee2);
  3486. });
  3487. function chain(value) {
  3488. var result2 = lodash(value);
  3489. result2.__chain__ = true;
  3490. return result2;
  3491. }
  3492. function tap(value, interceptor) {
  3493. interceptor(value);
  3494. return value;
  3495. }
  3496. function thru(value, interceptor) {
  3497. return interceptor(value);
  3498. }
  3499. var wrapperAt = flatRest(function(paths) {
  3500. var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, interceptor = function(object) {
  3501. return baseAt(object, paths);
  3502. };
  3503. if (length > 1 || this.__actions__.length || !(value instanceof LazyWrapper) || !isIndex(start)) {
  3504. return this.thru(interceptor);
  3505. }
  3506. value = value.slice(start, +start + (length ? 1 : 0));
  3507. value.__actions__.push({
  3508. "func": thru,
  3509. "args": [interceptor],
  3510. "thisArg": undefined
  3511. });
  3512. return new LodashWrapper(value, this.__chain__).thru(function(array) {
  3513. if (length && !array.length) {
  3514. array.push(undefined);
  3515. }
  3516. return array;
  3517. });
  3518. });
  3519. function wrapperChain() {
  3520. return chain(this);
  3521. }
  3522. function wrapperCommit() {
  3523. return new LodashWrapper(this.value(), this.__chain__);
  3524. }
  3525. function wrapperNext() {
  3526. if (this.__values__ === undefined) {
  3527. this.__values__ = toArray(this.value());
  3528. }
  3529. var done = this.__index__ >= this.__values__.length, value = done ? undefined : this.__values__[this.__index__++];
  3530. return { "done": done, "value": value };
  3531. }
  3532. function wrapperToIterator() {
  3533. return this;
  3534. }
  3535. function wrapperPlant(value) {
  3536. var result2, parent2 = this;
  3537. while (parent2 instanceof baseLodash) {
  3538. var clone2 = wrapperClone(parent2);
  3539. clone2.__index__ = 0;
  3540. clone2.__values__ = undefined;
  3541. if (result2) {
  3542. previous.__wrapped__ = clone2;
  3543. } else {
  3544. result2 = clone2;
  3545. }
  3546. var previous = clone2;
  3547. parent2 = parent2.__wrapped__;
  3548. }
  3549. previous.__wrapped__ = value;
  3550. return result2;
  3551. }
  3552. function wrapperReverse() {
  3553. var value = this.__wrapped__;
  3554. if (value instanceof LazyWrapper) {
  3555. var wrapped = value;
  3556. if (this.__actions__.length) {
  3557. wrapped = new LazyWrapper(this);
  3558. }
  3559. wrapped = wrapped.reverse();
  3560. wrapped.__actions__.push({
  3561. "func": thru,
  3562. "args": [reverse],
  3563. "thisArg": undefined
  3564. });
  3565. return new LodashWrapper(wrapped, this.__chain__);
  3566. }
  3567. return this.thru(reverse);
  3568. }
  3569. function wrapperValue() {
  3570. return baseWrapperValue(this.__wrapped__, this.__actions__);
  3571. }
  3572. var countBy = createAggregator(function(result2, value, key) {
  3573. if (hasOwnProperty.call(result2, key)) {
  3574. ++result2[key];
  3575. } else {
  3576. baseAssignValue(result2, key, 1);
  3577. }
  3578. });
  3579. function every(collection, predicate, guard) {
  3580. var func = isArray(collection) ? arrayEvery : baseEvery;
  3581. if (guard && isIterateeCall(collection, predicate, guard)) {
  3582. predicate = undefined;
  3583. }
  3584. return func(collection, getIteratee(predicate, 3));
  3585. }
  3586. function filter(collection, predicate) {
  3587. var func = isArray(collection) ? arrayFilter : baseFilter;
  3588. return func(collection, getIteratee(predicate, 3));
  3589. }
  3590. var find = createFind(findIndex);
  3591. var findLast = createFind(findLastIndex);
  3592. function flatMap(collection, iteratee2) {
  3593. return baseFlatten(map(collection, iteratee2), 1);
  3594. }
  3595. function flatMapDeep(collection, iteratee2) {
  3596. return baseFlatten(map(collection, iteratee2), INFINITY);
  3597. }
  3598. function flatMapDepth(collection, iteratee2, depth) {
  3599. depth = depth === undefined ? 1 : toInteger(depth);
  3600. return baseFlatten(map(collection, iteratee2), depth);
  3601. }
  3602. function forEach(collection, iteratee2) {
  3603. var func = isArray(collection) ? arrayEach : baseEach;
  3604. return func(collection, getIteratee(iteratee2, 3));
  3605. }
  3606. function forEachRight(collection, iteratee2) {
  3607. var func = isArray(collection) ? arrayEachRight : baseEachRight;
  3608. return func(collection, getIteratee(iteratee2, 3));
  3609. }
  3610. var groupBy = createAggregator(function(result2, value, key) {
  3611. if (hasOwnProperty.call(result2, key)) {
  3612. result2[key].push(value);
  3613. } else {
  3614. baseAssignValue(result2, key, [value]);
  3615. }
  3616. });
  3617. function includes(collection, value, fromIndex, guard) {
  3618. collection = isArrayLike(collection) ? collection : values(collection);
  3619. fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0;
  3620. var length = collection.length;
  3621. if (fromIndex < 0) {
  3622. fromIndex = nativeMax(length + fromIndex, 0);
  3623. }
  3624. return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
  3625. }
  3626. var invokeMap = baseRest(function(collection, path, args) {
  3627. var index = -1, isFunc = typeof path == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
  3628. baseEach(collection, function(value) {
  3629. result2[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
  3630. });
  3631. return result2;
  3632. });
  3633. var keyBy = createAggregator(function(result2, value, key) {
  3634. baseAssignValue(result2, key, value);
  3635. });
  3636. function map(collection, iteratee2) {
  3637. var func = isArray(collection) ? arrayMap : baseMap;
  3638. return func(collection, getIteratee(iteratee2, 3));
  3639. }
  3640. function orderBy(collection, iteratees, orders, guard) {
  3641. if (collection == null) {
  3642. return [];
  3643. }
  3644. if (!isArray(iteratees)) {
  3645. iteratees = iteratees == null ? [] : [iteratees];
  3646. }
  3647. orders = guard ? undefined : orders;
  3648. if (!isArray(orders)) {
  3649. orders = orders == null ? [] : [orders];
  3650. }
  3651. return baseOrderBy(collection, iteratees, orders);
  3652. }
  3653. var partition = createAggregator(function(result2, value, key) {
  3654. result2[key ? 0 : 1].push(value);
  3655. }, function() {
  3656. return [[], []];
  3657. });
  3658. function reduce(collection, iteratee2, accumulator) {
  3659. var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3;
  3660. return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEach);
  3661. }
  3662. function reduceRight(collection, iteratee2, accumulator) {
  3663. var func = isArray(collection) ? arrayReduceRight : baseReduce, initAccum = arguments.length < 3;
  3664. return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEachRight);
  3665. }
  3666. function reject(collection, predicate) {
  3667. var func = isArray(collection) ? arrayFilter : baseFilter;
  3668. return func(collection, negate(getIteratee(predicate, 3)));
  3669. }
  3670. function sample(collection) {
  3671. var func = isArray(collection) ? arraySample : baseSample;
  3672. return func(collection);
  3673. }
  3674. function sampleSize(collection, n, guard) {
  3675. if (guard ? isIterateeCall(collection, n, guard) : n === undefined) {
  3676. n = 1;
  3677. } else {
  3678. n = toInteger(n);
  3679. }
  3680. var func = isArray(collection) ? arraySampleSize : baseSampleSize;
  3681. return func(collection, n);
  3682. }
  3683. function shuffle(collection) {
  3684. var func = isArray(collection) ? arrayShuffle : baseShuffle;
  3685. return func(collection);
  3686. }
  3687. function size(collection) {
  3688. if (collection == null) {
  3689. return 0;
  3690. }
  3691. if (isArrayLike(collection)) {
  3692. return isString(collection) ? stringSize(collection) : collection.length;
  3693. }
  3694. var tag = getTag(collection);
  3695. if (tag == mapTag || tag == setTag) {
  3696. return collection.size;
  3697. }
  3698. return baseKeys(collection).length;
  3699. }
  3700. function some(collection, predicate, guard) {
  3701. var func = isArray(collection) ? arraySome : baseSome;
  3702. if (guard && isIterateeCall(collection, predicate, guard)) {
  3703. predicate = undefined;
  3704. }
  3705. return func(collection, getIteratee(predicate, 3));
  3706. }
  3707. var sortBy = baseRest(function(collection, iteratees) {
  3708. if (collection == null) {
  3709. return [];
  3710. }
  3711. var length = iteratees.length;
  3712. if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
  3713. iteratees = [];
  3714. } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
  3715. iteratees = [iteratees[0]];
  3716. }
  3717. return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
  3718. });
  3719. var now = ctxNow || function() {
  3720. return root.Date.now();
  3721. };
  3722. function after(n, func) {
  3723. if (typeof func != "function") {
  3724. throw new TypeError(FUNC_ERROR_TEXT);
  3725. }
  3726. n = toInteger(n);
  3727. return function() {
  3728. if (--n < 1) {
  3729. return func.apply(this, arguments);
  3730. }
  3731. };
  3732. }
  3733. function ary(func, n, guard) {
  3734. n = guard ? undefined : n;
  3735. n = func && n == null ? func.length : n;
  3736. return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
  3737. }
  3738. function before(n, func) {
  3739. var result2;
  3740. if (typeof func != "function") {
  3741. throw new TypeError(FUNC_ERROR_TEXT);
  3742. }
  3743. n = toInteger(n);
  3744. return function() {
  3745. if (--n > 0) {
  3746. result2 = func.apply(this, arguments);
  3747. }
  3748. if (n <= 1) {
  3749. func = undefined;
  3750. }
  3751. return result2;
  3752. };
  3753. }
  3754. var bind = baseRest(function(func, thisArg, partials) {
  3755. var bitmask = WRAP_BIND_FLAG;
  3756. if (partials.length) {
  3757. var holders = replaceHolders(partials, getHolder(bind));
  3758. bitmask |= WRAP_PARTIAL_FLAG;
  3759. }
  3760. return createWrap(func, bitmask, thisArg, partials, holders);
  3761. });
  3762. var bindKey = baseRest(function(object, key, partials) {
  3763. var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
  3764. if (partials.length) {
  3765. var holders = replaceHolders(partials, getHolder(bindKey));
  3766. bitmask |= WRAP_PARTIAL_FLAG;
  3767. }
  3768. return createWrap(key, bitmask, object, partials, holders);
  3769. });
  3770. function curry(func, arity, guard) {
  3771. arity = guard ? undefined : arity;
  3772. var result2 = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  3773. result2.placeholder = curry.placeholder;
  3774. return result2;
  3775. }
  3776. function curryRight(func, arity, guard) {
  3777. arity = guard ? undefined : arity;
  3778. var result2 = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
  3779. result2.placeholder = curryRight.placeholder;
  3780. return result2;
  3781. }
  3782. function debounce(func, wait, options) {
  3783. var lastArgs, lastThis, maxWait, result2, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
  3784. if (typeof func != "function") {
  3785. throw new TypeError(FUNC_ERROR_TEXT);
  3786. }
  3787. wait = toNumber(wait) || 0;
  3788. if (isObject(options)) {
  3789. leading = !!options.leading;
  3790. maxing = "maxWait" in options;
  3791. maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
  3792. trailing = "trailing" in options ? !!options.trailing : trailing;
  3793. }
  3794. function invokeFunc(time) {
  3795. var args = lastArgs, thisArg = lastThis;
  3796. lastArgs = lastThis = undefined;
  3797. lastInvokeTime = time;
  3798. result2 = func.apply(thisArg, args);
  3799. return result2;
  3800. }
  3801. function leadingEdge(time) {
  3802. lastInvokeTime = time;
  3803. timerId = setTimeout(timerExpired, wait);
  3804. return leading ? invokeFunc(time) : result2;
  3805. }
  3806. function remainingWait(time) {
  3807. var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
  3808. return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
  3809. }
  3810. function shouldInvoke(time) {
  3811. var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
  3812. return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
  3813. }
  3814. function timerExpired() {
  3815. var time = now();
  3816. if (shouldInvoke(time)) {
  3817. return trailingEdge(time);
  3818. }
  3819. timerId = setTimeout(timerExpired, remainingWait(time));
  3820. }
  3821. function trailingEdge(time) {
  3822. timerId = undefined;
  3823. if (trailing && lastArgs) {
  3824. return invokeFunc(time);
  3825. }
  3826. lastArgs = lastThis = undefined;
  3827. return result2;
  3828. }
  3829. function cancel() {
  3830. if (timerId !== undefined) {
  3831. clearTimeout(timerId);
  3832. }
  3833. lastInvokeTime = 0;
  3834. lastArgs = lastCallTime = lastThis = timerId = undefined;
  3835. }
  3836. function flush() {
  3837. return timerId === undefined ? result2 : trailingEdge(now());
  3838. }
  3839. function debounced() {
  3840. var time = now(), isInvoking = shouldInvoke(time);
  3841. lastArgs = arguments;
  3842. lastThis = this;
  3843. lastCallTime = time;
  3844. if (isInvoking) {
  3845. if (timerId === undefined) {
  3846. return leadingEdge(lastCallTime);
  3847. }
  3848. if (maxing) {
  3849. clearTimeout(timerId);
  3850. timerId = setTimeout(timerExpired, wait);
  3851. return invokeFunc(lastCallTime);
  3852. }
  3853. }
  3854. if (timerId === undefined) {
  3855. timerId = setTimeout(timerExpired, wait);
  3856. }
  3857. return result2;
  3858. }
  3859. debounced.cancel = cancel;
  3860. debounced.flush = flush;
  3861. return debounced;
  3862. }
  3863. var defer = baseRest(function(func, args) {
  3864. return baseDelay(func, 1, args);
  3865. });
  3866. var delay = baseRest(function(func, wait, args) {
  3867. return baseDelay(func, toNumber(wait) || 0, args);
  3868. });
  3869. function flip(func) {
  3870. return createWrap(func, WRAP_FLIP_FLAG);
  3871. }
  3872. function memoize(func, resolver) {
  3873. if (typeof func != "function" || resolver != null && typeof resolver != "function") {
  3874. throw new TypeError(FUNC_ERROR_TEXT);
  3875. }
  3876. var memoized = function() {
  3877. var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
  3878. if (cache.has(key)) {
  3879. return cache.get(key);
  3880. }
  3881. var result2 = func.apply(this, args);
  3882. memoized.cache = cache.set(key, result2) || cache;
  3883. return result2;
  3884. };
  3885. memoized.cache = new (memoize.Cache || MapCache)();
  3886. return memoized;
  3887. }
  3888. memoize.Cache = MapCache;
  3889. function negate(predicate) {
  3890. if (typeof predicate != "function") {
  3891. throw new TypeError(FUNC_ERROR_TEXT);
  3892. }
  3893. return function() {
  3894. var args = arguments;
  3895. switch (args.length) {
  3896. case 0:
  3897. return !predicate.call(this);
  3898. case 1:
  3899. return !predicate.call(this, args[0]);
  3900. case 2:
  3901. return !predicate.call(this, args[0], args[1]);
  3902. case 3:
  3903. return !predicate.call(this, args[0], args[1], args[2]);
  3904. }
  3905. return !predicate.apply(this, args);
  3906. };
  3907. }
  3908. function once(func) {
  3909. return before(2, func);
  3910. }
  3911. var overArgs = castRest(function(func, transforms) {
  3912. transforms = transforms.length == 1 && isArray(transforms[0]) ? arrayMap(transforms[0], baseUnary(getIteratee())) : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
  3913. var funcsLength = transforms.length;
  3914. return baseRest(function(args) {
  3915. var index = -1, length = nativeMin(args.length, funcsLength);
  3916. while (++index < length) {
  3917. args[index] = transforms[index].call(this, args[index]);
  3918. }
  3919. return apply(func, this, args);
  3920. });
  3921. });
  3922. var partial = baseRest(function(func, partials) {
  3923. var holders = replaceHolders(partials, getHolder(partial));
  3924. return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
  3925. });
  3926. var partialRight = baseRest(function(func, partials) {
  3927. var holders = replaceHolders(partials, getHolder(partialRight));
  3928. return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
  3929. });
  3930. var rearg = flatRest(function(func, indexes) {
  3931. return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
  3932. });
  3933. function rest(func, start) {
  3934. if (typeof func != "function") {
  3935. throw new TypeError(FUNC_ERROR_TEXT);
  3936. }
  3937. start = start === undefined ? start : toInteger(start);
  3938. return baseRest(func, start);
  3939. }
  3940. function spread(func, start) {
  3941. if (typeof func != "function") {
  3942. throw new TypeError(FUNC_ERROR_TEXT);
  3943. }
  3944. start = start == null ? 0 : nativeMax(toInteger(start), 0);
  3945. return baseRest(function(args) {
  3946. var array = args[start], otherArgs = castSlice(args, 0, start);
  3947. if (array) {
  3948. arrayPush(otherArgs, array);
  3949. }
  3950. return apply(func, this, otherArgs);
  3951. });
  3952. }
  3953. function throttle(func, wait, options) {
  3954. var leading = true, trailing = true;
  3955. if (typeof func != "function") {
  3956. throw new TypeError(FUNC_ERROR_TEXT);
  3957. }
  3958. if (isObject(options)) {
  3959. leading = "leading" in options ? !!options.leading : leading;
  3960. trailing = "trailing" in options ? !!options.trailing : trailing;
  3961. }
  3962. return debounce(func, wait, {
  3963. "leading": leading,
  3964. "maxWait": wait,
  3965. "trailing": trailing
  3966. });
  3967. }
  3968. function unary(func) {
  3969. return ary(func, 1);
  3970. }
  3971. function wrap(value, wrapper) {
  3972. return partial(castFunction(wrapper), value);
  3973. }
  3974. function castArray() {
  3975. if (!arguments.length) {
  3976. return [];
  3977. }
  3978. var value = arguments[0];
  3979. return isArray(value) ? value : [value];
  3980. }
  3981. function clone(value) {
  3982. return baseClone(value, CLONE_SYMBOLS_FLAG);
  3983. }
  3984. function cloneWith(value, customizer) {
  3985. customizer = typeof customizer == "function" ? customizer : undefined;
  3986. return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
  3987. }
  3988. function cloneDeep(value) {
  3989. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
  3990. }
  3991. function cloneDeepWith(value, customizer) {
  3992. customizer = typeof customizer == "function" ? customizer : undefined;
  3993. return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
  3994. }
  3995. function conformsTo(object, source) {
  3996. return source == null || baseConformsTo(object, source, keys(source));
  3997. }
  3998. function eq(value, other) {
  3999. return value === other || value !== value && other !== other;
  4000. }
  4001. var gt = createRelationalOperation(baseGt);
  4002. var gte = createRelationalOperation(function(value, other) {
  4003. return value >= other;
  4004. });
  4005. var isArguments = baseIsArguments(function() {
  4006. return arguments;
  4007. }()) ? baseIsArguments : function(value) {
  4008. return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
  4009. };
  4010. var isArray = Array2.isArray;
  4011. var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
  4012. function isArrayLike(value) {
  4013. return value != null && isLength(value.length) && !isFunction(value);
  4014. }
  4015. function isArrayLikeObject(value) {
  4016. return isObjectLike(value) && isArrayLike(value);
  4017. }
  4018. function isBoolean(value) {
  4019. return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;
  4020. }
  4021. var isBuffer = nativeIsBuffer || stubFalse;
  4022. var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
  4023. function isElement(value) {
  4024. return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
  4025. }
  4026. function isEmpty(value) {
  4027. if (value == null) {
  4028. return true;
  4029. }
  4030. if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
  4031. return !value.length;
  4032. }
  4033. var tag = getTag(value);
  4034. if (tag == mapTag || tag == setTag) {
  4035. return !value.size;
  4036. }
  4037. if (isPrototype(value)) {
  4038. return !baseKeys(value).length;
  4039. }
  4040. for (var key in value) {
  4041. if (hasOwnProperty.call(value, key)) {
  4042. return false;
  4043. }
  4044. }
  4045. return true;
  4046. }
  4047. function isEqual(value, other) {
  4048. return baseIsEqual(value, other);
  4049. }
  4050. function isEqualWith(value, other, customizer) {
  4051. customizer = typeof customizer == "function" ? customizer : undefined;
  4052. var result2 = customizer ? customizer(value, other) : undefined;
  4053. return result2 === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result2;
  4054. }
  4055. function isError(value) {
  4056. if (!isObjectLike(value)) {
  4057. return false;
  4058. }
  4059. var tag = baseGetTag(value);
  4060. return tag == errorTag || tag == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject(value);
  4061. }
  4062. function isFinite(value) {
  4063. return typeof value == "number" && nativeIsFinite(value);
  4064. }
  4065. function isFunction(value) {
  4066. if (!isObject(value)) {
  4067. return false;
  4068. }
  4069. var tag = baseGetTag(value);
  4070. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  4071. }
  4072. function isInteger(value) {
  4073. return typeof value == "number" && value == toInteger(value);
  4074. }
  4075. function isLength(value) {
  4076. return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  4077. }
  4078. function isObject(value) {
  4079. var type = typeof value;
  4080. return value != null && (type == "object" || type == "function");
  4081. }
  4082. function isObjectLike(value) {
  4083. return value != null && typeof value == "object";
  4084. }
  4085. var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
  4086. function isMatch(object, source) {
  4087. return object === source || baseIsMatch(object, source, getMatchData(source));
  4088. }
  4089. function isMatchWith(object, source, customizer) {
  4090. customizer = typeof customizer == "function" ? customizer : undefined;
  4091. return baseIsMatch(object, source, getMatchData(source), customizer);
  4092. }
  4093. function isNaN(value) {
  4094. return isNumber(value) && value != +value;
  4095. }
  4096. function isNative(value) {
  4097. if (isMaskable(value)) {
  4098. throw new Error(CORE_ERROR_TEXT);
  4099. }
  4100. return baseIsNative(value);
  4101. }
  4102. function isNull(value) {
  4103. return value === null;
  4104. }
  4105. function isNil(value) {
  4106. return value == null;
  4107. }
  4108. function isNumber(value) {
  4109. return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag;
  4110. }
  4111. function isPlainObject(value) {
  4112. if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
  4113. return false;
  4114. }
  4115. var proto = getPrototype(value);
  4116. if (proto === null) {
  4117. return true;
  4118. }
  4119. var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
  4120. return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
  4121. }
  4122. var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
  4123. function isSafeInteger(value) {
  4124. return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
  4125. }
  4126. var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
  4127. function isString(value) {
  4128. return typeof value == "string" || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
  4129. }
  4130. function isSymbol(value) {
  4131. return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
  4132. }
  4133. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  4134. function isUndefined(value) {
  4135. return value === undefined;
  4136. }
  4137. function isWeakMap(value) {
  4138. return isObjectLike(value) && getTag(value) == weakMapTag;
  4139. }
  4140. function isWeakSet(value) {
  4141. return isObjectLike(value) && baseGetTag(value) == weakSetTag;
  4142. }
  4143. var lt = createRelationalOperation(baseLt);
  4144. var lte = createRelationalOperation(function(value, other) {
  4145. return value <= other;
  4146. });
  4147. function toArray(value) {
  4148. if (!value) {
  4149. return [];
  4150. }
  4151. if (isArrayLike(value)) {
  4152. return isString(value) ? stringToArray(value) : copyArray(value);
  4153. }
  4154. if (symIterator && value[symIterator]) {
  4155. return iteratorToArray(value[symIterator]());
  4156. }
  4157. var tag = getTag(value), func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values;
  4158. return func(value);
  4159. }
  4160. function toFinite(value) {
  4161. if (!value) {
  4162. return value === 0 ? value : 0;
  4163. }
  4164. value = toNumber(value);
  4165. if (value === INFINITY || value === -INFINITY) {
  4166. var sign = value < 0 ? -1 : 1;
  4167. return sign * MAX_INTEGER;
  4168. }
  4169. return value === value ? value : 0;
  4170. }
  4171. function toInteger(value) {
  4172. var result2 = toFinite(value), remainder = result2 % 1;
  4173. return result2 === result2 ? remainder ? result2 - remainder : result2 : 0;
  4174. }
  4175. function toLength(value) {
  4176. return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
  4177. }
  4178. function toNumber(value) {
  4179. if (typeof value == "number") {
  4180. return value;
  4181. }
  4182. if (isSymbol(value)) {
  4183. return NAN;
  4184. }
  4185. if (isObject(value)) {
  4186. var other = typeof value.valueOf == "function" ? value.valueOf() : value;
  4187. value = isObject(other) ? other + "" : other;
  4188. }
  4189. if (typeof value != "string") {
  4190. return value === 0 ? value : +value;
  4191. }
  4192. value = baseTrim(value);
  4193. var isBinary = reIsBinary.test(value);
  4194. return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
  4195. }
  4196. function toPlainObject(value) {
  4197. return copyObject(value, keysIn(value));
  4198. }
  4199. function toSafeInteger(value) {
  4200. return value ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) : value === 0 ? value : 0;
  4201. }
  4202. function toString(value) {
  4203. return value == null ? "" : baseToString(value);
  4204. }
  4205. var assign = createAssigner(function(object, source) {
  4206. if (isPrototype(source) || isArrayLike(source)) {
  4207. copyObject(source, keys(source), object);
  4208. return;
  4209. }
  4210. for (var key in source) {
  4211. if (hasOwnProperty.call(source, key)) {
  4212. assignValue(object, key, source[key]);
  4213. }
  4214. }
  4215. });
  4216. var assignIn = createAssigner(function(object, source) {
  4217. copyObject(source, keysIn(source), object);
  4218. });
  4219. var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
  4220. copyObject(source, keysIn(source), object, customizer);
  4221. });
  4222. var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
  4223. copyObject(source, keys(source), object, customizer);
  4224. });
  4225. var at = flatRest(baseAt);
  4226. function create(prototype, properties) {
  4227. var result2 = baseCreate(prototype);
  4228. return properties == null ? result2 : baseAssign(result2, properties);
  4229. }
  4230. var defaults = baseRest(function(object, sources) {
  4231. object = Object2(object);
  4232. var index = -1;
  4233. var length = sources.length;
  4234. var guard = length > 2 ? sources[2] : undefined;
  4235. if (guard && isIterateeCall(sources[0], sources[1], guard)) {
  4236. length = 1;
  4237. }
  4238. while (++index < length) {
  4239. var source = sources[index];
  4240. var props = keysIn(source);
  4241. var propsIndex = -1;
  4242. var propsLength = props.length;
  4243. while (++propsIndex < propsLength) {
  4244. var key = props[propsIndex];
  4245. var value = object[key];
  4246. if (value === undefined || eq(value, objectProto[key]) && !hasOwnProperty.call(object, key)) {
  4247. object[key] = source[key];
  4248. }
  4249. }
  4250. }
  4251. return object;
  4252. });
  4253. var defaultsDeep = baseRest(function(args) {
  4254. args.push(undefined, customDefaultsMerge);
  4255. return apply(mergeWith, undefined, args);
  4256. });
  4257. function findKey(object, predicate) {
  4258. return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
  4259. }
  4260. function findLastKey(object, predicate) {
  4261. return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
  4262. }
  4263. function forIn(object, iteratee2) {
  4264. return object == null ? object : baseFor(object, getIteratee(iteratee2, 3), keysIn);
  4265. }
  4266. function forInRight(object, iteratee2) {
  4267. return object == null ? object : baseForRight(object, getIteratee(iteratee2, 3), keysIn);
  4268. }
  4269. function forOwn(object, iteratee2) {
  4270. return object && baseForOwn(object, getIteratee(iteratee2, 3));
  4271. }
  4272. function forOwnRight(object, iteratee2) {
  4273. return object && baseForOwnRight(object, getIteratee(iteratee2, 3));
  4274. }
  4275. function functions(object) {
  4276. return object == null ? [] : baseFunctions(object, keys(object));
  4277. }
  4278. function functionsIn(object) {
  4279. return object == null ? [] : baseFunctions(object, keysIn(object));
  4280. }
  4281. function get(object, path, defaultValue) {
  4282. var result2 = object == null ? undefined : baseGet(object, path);
  4283. return result2 === undefined ? defaultValue : result2;
  4284. }
  4285. function has(object, path) {
  4286. return object != null && hasPath(object, path, baseHas);
  4287. }
  4288. function hasIn(object, path) {
  4289. return object != null && hasPath(object, path, baseHasIn);
  4290. }
  4291. var invert = createInverter(function(result2, value, key) {
  4292. if (value != null && typeof value.toString != "function") {
  4293. value = nativeObjectToString.call(value);
  4294. }
  4295. result2[value] = key;
  4296. }, constant(identity));
  4297. var invertBy = createInverter(function(result2, value, key) {
  4298. if (value != null && typeof value.toString != "function") {
  4299. value = nativeObjectToString.call(value);
  4300. }
  4301. if (hasOwnProperty.call(result2, value)) {
  4302. result2[value].push(key);
  4303. } else {
  4304. result2[value] = [key];
  4305. }
  4306. }, getIteratee);
  4307. var invoke = baseRest(baseInvoke);
  4308. function keys(object) {
  4309. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  4310. }
  4311. function keysIn(object) {
  4312. return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
  4313. }
  4314. function mapKeys(object, iteratee2) {
  4315. var result2 = {};
  4316. iteratee2 = getIteratee(iteratee2, 3);
  4317. baseForOwn(object, function(value, key, object2) {
  4318. baseAssignValue(result2, iteratee2(value, key, object2), value);
  4319. });
  4320. return result2;
  4321. }
  4322. function mapValues(object, iteratee2) {
  4323. var result2 = {};
  4324. iteratee2 = getIteratee(iteratee2, 3);
  4325. baseForOwn(object, function(value, key, object2) {
  4326. baseAssignValue(result2, key, iteratee2(value, key, object2));
  4327. });
  4328. return result2;
  4329. }
  4330. var merge = createAssigner(function(object, source, srcIndex) {
  4331. baseMerge(object, source, srcIndex);
  4332. });
  4333. var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
  4334. baseMerge(object, source, srcIndex, customizer);
  4335. });
  4336. var omit = flatRest(function(object, paths) {
  4337. var result2 = {};
  4338. if (object == null) {
  4339. return result2;
  4340. }
  4341. var isDeep = false;
  4342. paths = arrayMap(paths, function(path) {
  4343. path = castPath(path, object);
  4344. isDeep || (isDeep = path.length > 1);
  4345. return path;
  4346. });
  4347. copyObject(object, getAllKeysIn(object), result2);
  4348. if (isDeep) {
  4349. result2 = baseClone(result2, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
  4350. }
  4351. var length = paths.length;
  4352. while (length--) {
  4353. baseUnset(result2, paths[length]);
  4354. }
  4355. return result2;
  4356. });
  4357. function omitBy(object, predicate) {
  4358. return pickBy(object, negate(getIteratee(predicate)));
  4359. }
  4360. var pick = flatRest(function(object, paths) {
  4361. return object == null ? {} : basePick(object, paths);
  4362. });
  4363. function pickBy(object, predicate) {
  4364. if (object == null) {
  4365. return {};
  4366. }
  4367. var props = arrayMap(getAllKeysIn(object), function(prop) {
  4368. return [prop];
  4369. });
  4370. predicate = getIteratee(predicate);
  4371. return basePickBy(object, props, function(value, path) {
  4372. return predicate(value, path[0]);
  4373. });
  4374. }
  4375. function result(object, path, defaultValue) {
  4376. path = castPath(path, object);
  4377. var index = -1, length = path.length;
  4378. if (!length) {
  4379. length = 1;
  4380. object = undefined;
  4381. }
  4382. while (++index < length) {
  4383. var value = object == null ? undefined : object[toKey(path[index])];
  4384. if (value === undefined) {
  4385. index = length;
  4386. value = defaultValue;
  4387. }
  4388. object = isFunction(value) ? value.call(object) : value;
  4389. }
  4390. return object;
  4391. }
  4392. function set(object, path, value) {
  4393. return object == null ? object : baseSet(object, path, value);
  4394. }
  4395. function setWith(object, path, value, customizer) {
  4396. customizer = typeof customizer == "function" ? customizer : undefined;
  4397. return object == null ? object : baseSet(object, path, value, customizer);
  4398. }
  4399. var toPairs = createToPairs(keys);
  4400. var toPairsIn = createToPairs(keysIn);
  4401. function transform(object, iteratee2, accumulator) {
  4402. var isArr = isArray(object), isArrLike = isArr || isBuffer(object) || isTypedArray(object);
  4403. iteratee2 = getIteratee(iteratee2, 4);
  4404. if (accumulator == null) {
  4405. var Ctor = object && object.constructor;
  4406. if (isArrLike) {
  4407. accumulator = isArr ? new Ctor() : [];
  4408. } else if (isObject(object)) {
  4409. accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
  4410. } else {
  4411. accumulator = {};
  4412. }
  4413. }
  4414. (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object2) {
  4415. return iteratee2(accumulator, value, index, object2);
  4416. });
  4417. return accumulator;
  4418. }
  4419. function unset(object, path) {
  4420. return object == null ? true : baseUnset(object, path);
  4421. }
  4422. function update(object, path, updater) {
  4423. return object == null ? object : baseUpdate(object, path, castFunction(updater));
  4424. }
  4425. function updateWith(object, path, updater, customizer) {
  4426. customizer = typeof customizer == "function" ? customizer : undefined;
  4427. return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
  4428. }
  4429. function values(object) {
  4430. return object == null ? [] : baseValues(object, keys(object));
  4431. }
  4432. function valuesIn(object) {
  4433. return object == null ? [] : baseValues(object, keysIn(object));
  4434. }
  4435. function clamp(number, lower, upper) {
  4436. if (upper === undefined) {
  4437. upper = lower;
  4438. lower = undefined;
  4439. }
  4440. if (upper !== undefined) {
  4441. upper = toNumber(upper);
  4442. upper = upper === upper ? upper : 0;
  4443. }
  4444. if (lower !== undefined) {
  4445. lower = toNumber(lower);
  4446. lower = lower === lower ? lower : 0;
  4447. }
  4448. return baseClamp(toNumber(number), lower, upper);
  4449. }
  4450. function inRange(number, start, end) {
  4451. start = toFinite(start);
  4452. if (end === undefined) {
  4453. end = start;
  4454. start = 0;
  4455. } else {
  4456. end = toFinite(end);
  4457. }
  4458. number = toNumber(number);
  4459. return baseInRange(number, start, end);
  4460. }
  4461. function random(lower, upper, floating) {
  4462. if (floating && typeof floating != "boolean" && isIterateeCall(lower, upper, floating)) {
  4463. upper = floating = undefined;
  4464. }
  4465. if (floating === undefined) {
  4466. if (typeof upper == "boolean") {
  4467. floating = upper;
  4468. upper = undefined;
  4469. } else if (typeof lower == "boolean") {
  4470. floating = lower;
  4471. lower = undefined;
  4472. }
  4473. }
  4474. if (lower === undefined && upper === undefined) {
  4475. lower = 0;
  4476. upper = 1;
  4477. } else {
  4478. lower = toFinite(lower);
  4479. if (upper === undefined) {
  4480. upper = lower;
  4481. lower = 0;
  4482. } else {
  4483. upper = toFinite(upper);
  4484. }
  4485. }
  4486. if (lower > upper) {
  4487. var temp = lower;
  4488. lower = upper;
  4489. upper = temp;
  4490. }
  4491. if (floating || lower % 1 || upper % 1) {
  4492. var rand = nativeRandom();
  4493. return nativeMin(lower + rand * (upper - lower + freeParseFloat("1e-" + ((rand + "").length - 1))), upper);
  4494. }
  4495. return baseRandom(lower, upper);
  4496. }
  4497. var camelCase = createCompounder(function(result2, word, index) {
  4498. word = word.toLowerCase();
  4499. return result2 + (index ? capitalize(word) : word);
  4500. });
  4501. function capitalize(string) {
  4502. return upperFirst(toString(string).toLowerCase());
  4503. }
  4504. function deburr(string) {
  4505. string = toString(string);
  4506. return string && string.replace(reLatin, deburrLetter).replace(reComboMark, "");
  4507. }
  4508. function endsWith(string, target, position) {
  4509. string = toString(string);
  4510. target = baseToString(target);
  4511. var length = string.length;
  4512. position = position === undefined ? length : baseClamp(toInteger(position), 0, length);
  4513. var end = position;
  4514. position -= target.length;
  4515. return position >= 0 && string.slice(position, end) == target;
  4516. }
  4517. function escape(string) {
  4518. string = toString(string);
  4519. return string && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, escapeHtmlChar) : string;
  4520. }
  4521. function escapeRegExp(string) {
  4522. string = toString(string);
  4523. return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, "\\$&") : string;
  4524. }
  4525. var kebabCase = createCompounder(function(result2, word, index) {
  4526. return result2 + (index ? "-" : "") + word.toLowerCase();
  4527. });
  4528. var lowerCase = createCompounder(function(result2, word, index) {
  4529. return result2 + (index ? " " : "") + word.toLowerCase();
  4530. });
  4531. var lowerFirst = createCaseFirst("toLowerCase");
  4532. function pad(string, length, chars) {
  4533. string = toString(string);
  4534. length = toInteger(length);
  4535. var strLength = length ? stringSize(string) : 0;
  4536. if (!length || strLength >= length) {
  4537. return string;
  4538. }
  4539. var mid = (length - strLength) / 2;
  4540. return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars);
  4541. }
  4542. function padEnd(string, length, chars) {
  4543. string = toString(string);
  4544. length = toInteger(length);
  4545. var strLength = length ? stringSize(string) : 0;
  4546. return length && strLength < length ? string + createPadding(length - strLength, chars) : string;
  4547. }
  4548. function padStart(string, length, chars) {
  4549. string = toString(string);
  4550. length = toInteger(length);
  4551. var strLength = length ? stringSize(string) : 0;
  4552. return length && strLength < length ? createPadding(length - strLength, chars) + string : string;
  4553. }
  4554. function parseInt2(string, radix, guard) {
  4555. if (guard || radix == null) {
  4556. radix = 0;
  4557. } else if (radix) {
  4558. radix = +radix;
  4559. }
  4560. return nativeParseInt(toString(string).replace(reTrimStart, ""), radix || 0);
  4561. }
  4562. function repeat(string, n, guard) {
  4563. if (guard ? isIterateeCall(string, n, guard) : n === undefined) {
  4564. n = 1;
  4565. } else {
  4566. n = toInteger(n);
  4567. }
  4568. return baseRepeat(toString(string), n);
  4569. }
  4570. function replace() {
  4571. var args = arguments, string = toString(args[0]);
  4572. return args.length < 3 ? string : string.replace(args[1], args[2]);
  4573. }
  4574. var snakeCase = createCompounder(function(result2, word, index) {
  4575. return result2 + (index ? "_" : "") + word.toLowerCase();
  4576. });
  4577. function split(string, separator, limit) {
  4578. if (limit && typeof limit != "number" && isIterateeCall(string, separator, limit)) {
  4579. separator = limit = undefined;
  4580. }
  4581. limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
  4582. if (!limit) {
  4583. return [];
  4584. }
  4585. string = toString(string);
  4586. if (string && (typeof separator == "string" || separator != null && !isRegExp(separator))) {
  4587. separator = baseToString(separator);
  4588. if (!separator && hasUnicode(string)) {
  4589. return castSlice(stringToArray(string), 0, limit);
  4590. }
  4591. }
  4592. return string.split(separator, limit);
  4593. }
  4594. var startCase = createCompounder(function(result2, word, index) {
  4595. return result2 + (index ? " " : "") + upperFirst(word);
  4596. });
  4597. function startsWith(string, target, position) {
  4598. string = toString(string);
  4599. position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length);
  4600. target = baseToString(target);
  4601. return string.slice(position, position + target.length) == target;
  4602. }
  4603. function template(string, options, guard) {
  4604. var settings = lodash.templateSettings;
  4605. if (guard && isIterateeCall(string, options, guard)) {
  4606. options = undefined;
  4607. }
  4608. string = toString(string);
  4609. options = assignInWith({}, options, settings, customDefaultsAssignIn);
  4610. var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys);
  4611. var isEscaping, isEvaluating, index = 0, interpolate = options.interpolate || reNoMatch, source = "__p += '";
  4612. var reDelimiters = RegExp2(
  4613. (options.escape || reNoMatch).source + "|" + interpolate.source + "|" + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + "|" + (options.evaluate || reNoMatch).source + "|$",
  4614. "g"
  4615. );
  4616. var sourceURL = "//# sourceURL=" + (hasOwnProperty.call(options, "sourceURL") ? (options.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++templateCounter + "]") + "\n";
  4617. string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
  4618. interpolateValue || (interpolateValue = esTemplateValue);
  4619. source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
  4620. if (escapeValue) {
  4621. isEscaping = true;
  4622. source += "' +\n__e(" + escapeValue + ") +\n'";
  4623. }
  4624. if (evaluateValue) {
  4625. isEvaluating = true;
  4626. source += "';\n" + evaluateValue + ";\n__p += '";
  4627. }
  4628. if (interpolateValue) {
  4629. source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
  4630. }
  4631. index = offset + match.length;
  4632. return match;
  4633. });
  4634. source += "';\n";
  4635. var variable = hasOwnProperty.call(options, "variable") && options.variable;
  4636. if (!variable) {
  4637. source = "with (obj) {\n" + source + "\n}\n";
  4638. } else if (reForbiddenIdentifierChars.test(variable)) {
  4639. throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
  4640. }
  4641. source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;");
  4642. source = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + source + "return __p\n}";
  4643. var result2 = attempt(function() {
  4644. return Function2(importsKeys, sourceURL + "return " + source).apply(undefined, importsValues);
  4645. });
  4646. result2.source = source;
  4647. if (isError(result2)) {
  4648. throw result2;
  4649. }
  4650. return result2;
  4651. }
  4652. function toLower(value) {
  4653. return toString(value).toLowerCase();
  4654. }
  4655. function toUpper(value) {
  4656. return toString(value).toUpperCase();
  4657. }
  4658. function trim(string, chars, guard) {
  4659. string = toString(string);
  4660. if (string && (guard || chars === undefined)) {
  4661. return baseTrim(string);
  4662. }
  4663. if (!string || !(chars = baseToString(chars))) {
  4664. return string;
  4665. }
  4666. var strSymbols = stringToArray(string), chrSymbols = stringToArray(chars), start = charsStartIndex(strSymbols, chrSymbols), end = charsEndIndex(strSymbols, chrSymbols) + 1;
  4667. return castSlice(strSymbols, start, end).join("");
  4668. }
  4669. function trimEnd(string, chars, guard) {
  4670. string = toString(string);
  4671. if (string && (guard || chars === undefined)) {
  4672. return string.slice(0, trimmedEndIndex(string) + 1);
  4673. }
  4674. if (!string || !(chars = baseToString(chars))) {
  4675. return string;
  4676. }
  4677. var strSymbols = stringToArray(string), end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
  4678. return castSlice(strSymbols, 0, end).join("");
  4679. }
  4680. function trimStart(string, chars, guard) {
  4681. string = toString(string);
  4682. if (string && (guard || chars === undefined)) {
  4683. return string.replace(reTrimStart, "");
  4684. }
  4685. if (!string || !(chars = baseToString(chars))) {
  4686. return string;
  4687. }
  4688. var strSymbols = stringToArray(string), start = charsStartIndex(strSymbols, stringToArray(chars));
  4689. return castSlice(strSymbols, start).join("");
  4690. }
  4691. function truncate(string, options) {
  4692. var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION;
  4693. if (isObject(options)) {
  4694. var separator = "separator" in options ? options.separator : separator;
  4695. length = "length" in options ? toInteger(options.length) : length;
  4696. omission = "omission" in options ? baseToString(options.omission) : omission;
  4697. }
  4698. string = toString(string);
  4699. var strLength = string.length;
  4700. if (hasUnicode(string)) {
  4701. var strSymbols = stringToArray(string);
  4702. strLength = strSymbols.length;
  4703. }
  4704. if (length >= strLength) {
  4705. return string;
  4706. }
  4707. var end = length - stringSize(omission);
  4708. if (end < 1) {
  4709. return omission;
  4710. }
  4711. var result2 = strSymbols ? castSlice(strSymbols, 0, end).join("") : string.slice(0, end);
  4712. if (separator === undefined) {
  4713. return result2 + omission;
  4714. }
  4715. if (strSymbols) {
  4716. end += result2.length - end;
  4717. }
  4718. if (isRegExp(separator)) {
  4719. if (string.slice(end).search(separator)) {
  4720. var match, substring = result2;
  4721. if (!separator.global) {
  4722. separator = RegExp2(separator.source, toString(reFlags.exec(separator)) + "g");
  4723. }
  4724. separator.lastIndex = 0;
  4725. while (match = separator.exec(substring)) {
  4726. var newEnd = match.index;
  4727. }
  4728. result2 = result2.slice(0, newEnd === undefined ? end : newEnd);
  4729. }
  4730. } else if (string.indexOf(baseToString(separator), end) != end) {
  4731. var index = result2.lastIndexOf(separator);
  4732. if (index > -1) {
  4733. result2 = result2.slice(0, index);
  4734. }
  4735. }
  4736. return result2 + omission;
  4737. }
  4738. function unescape(string) {
  4739. string = toString(string);
  4740. return string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string;
  4741. }
  4742. var upperCase = createCompounder(function(result2, word, index) {
  4743. return result2 + (index ? " " : "") + word.toUpperCase();
  4744. });
  4745. var upperFirst = createCaseFirst("toUpperCase");
  4746. function words(string, pattern, guard) {
  4747. string = toString(string);
  4748. pattern = guard ? undefined : pattern;
  4749. if (pattern === undefined) {
  4750. return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
  4751. }
  4752. return string.match(pattern) || [];
  4753. }
  4754. var attempt = baseRest(function(func, args) {
  4755. try {
  4756. return apply(func, undefined, args);
  4757. } catch (e) {
  4758. return isError(e) ? e : new Error(e);
  4759. }
  4760. });
  4761. var bindAll = flatRest(function(object, methodNames) {
  4762. arrayEach(methodNames, function(key) {
  4763. key = toKey(key);
  4764. baseAssignValue(object, key, bind(object[key], object));
  4765. });
  4766. return object;
  4767. });
  4768. function cond(pairs) {
  4769. var length = pairs == null ? 0 : pairs.length, toIteratee = getIteratee();
  4770. pairs = !length ? [] : arrayMap(pairs, function(pair) {
  4771. if (typeof pair[1] != "function") {
  4772. throw new TypeError(FUNC_ERROR_TEXT);
  4773. }
  4774. return [toIteratee(pair[0]), pair[1]];
  4775. });
  4776. return baseRest(function(args) {
  4777. var index = -1;
  4778. while (++index < length) {
  4779. var pair = pairs[index];
  4780. if (apply(pair[0], this, args)) {
  4781. return apply(pair[1], this, args);
  4782. }
  4783. }
  4784. });
  4785. }
  4786. function conforms(source) {
  4787. return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
  4788. }
  4789. function constant(value) {
  4790. return function() {
  4791. return value;
  4792. };
  4793. }
  4794. function defaultTo(value, defaultValue) {
  4795. return value == null || value !== value ? defaultValue : value;
  4796. }
  4797. var flow = createFlow();
  4798. var flowRight = createFlow(true);
  4799. function identity(value) {
  4800. return value;
  4801. }
  4802. function iteratee(func) {
  4803. return baseIteratee(typeof func == "function" ? func : baseClone(func, CLONE_DEEP_FLAG));
  4804. }
  4805. function matches(source) {
  4806. return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
  4807. }
  4808. function matchesProperty(path, srcValue) {
  4809. return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
  4810. }
  4811. var method = baseRest(function(path, args) {
  4812. return function(object) {
  4813. return baseInvoke(object, path, args);
  4814. };
  4815. });
  4816. var methodOf = baseRest(function(object, args) {
  4817. return function(path) {
  4818. return baseInvoke(object, path, args);
  4819. };
  4820. });
  4821. function mixin(object, source, options) {
  4822. var props = keys(source), methodNames = baseFunctions(source, props);
  4823. if (options == null && !(isObject(source) && (methodNames.length || !props.length))) {
  4824. options = source;
  4825. source = object;
  4826. object = this;
  4827. methodNames = baseFunctions(source, keys(source));
  4828. }
  4829. var chain2 = !(isObject(options) && "chain" in options) || !!options.chain, isFunc = isFunction(object);
  4830. arrayEach(methodNames, function(methodName) {
  4831. var func = source[methodName];
  4832. object[methodName] = func;
  4833. if (isFunc) {
  4834. object.prototype[methodName] = function() {
  4835. var chainAll = this.__chain__;
  4836. if (chain2 || chainAll) {
  4837. var result2 = object(this.__wrapped__), actions = result2.__actions__ = copyArray(this.__actions__);
  4838. actions.push({ "func": func, "args": arguments, "thisArg": object });
  4839. result2.__chain__ = chainAll;
  4840. return result2;
  4841. }
  4842. return func.apply(object, arrayPush([this.value()], arguments));
  4843. };
  4844. }
  4845. });
  4846. return object;
  4847. }
  4848. function noConflict() {
  4849. if (root._ === this) {
  4850. root._ = oldDash;
  4851. }
  4852. return this;
  4853. }
  4854. function noop() {
  4855. }
  4856. function nthArg(n) {
  4857. n = toInteger(n);
  4858. return baseRest(function(args) {
  4859. return baseNth(args, n);
  4860. });
  4861. }
  4862. var over = createOver(arrayMap);
  4863. var overEvery = createOver(arrayEvery);
  4864. var overSome = createOver(arraySome);
  4865. function property(path) {
  4866. return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
  4867. }
  4868. function propertyOf(object) {
  4869. return function(path) {
  4870. return object == null ? undefined : baseGet(object, path);
  4871. };
  4872. }
  4873. var range = createRange();
  4874. var rangeRight = createRange(true);
  4875. function stubArray() {
  4876. return [];
  4877. }
  4878. function stubFalse() {
  4879. return false;
  4880. }
  4881. function stubObject() {
  4882. return {};
  4883. }
  4884. function stubString() {
  4885. return "";
  4886. }
  4887. function stubTrue() {
  4888. return true;
  4889. }
  4890. function times(n, iteratee2) {
  4891. n = toInteger(n);
  4892. if (n < 1 || n > MAX_SAFE_INTEGER) {
  4893. return [];
  4894. }
  4895. var index = MAX_ARRAY_LENGTH, length = nativeMin(n, MAX_ARRAY_LENGTH);
  4896. iteratee2 = getIteratee(iteratee2);
  4897. n -= MAX_ARRAY_LENGTH;
  4898. var result2 = baseTimes(length, iteratee2);
  4899. while (++index < n) {
  4900. iteratee2(index);
  4901. }
  4902. return result2;
  4903. }
  4904. function toPath(value) {
  4905. if (isArray(value)) {
  4906. return arrayMap(value, toKey);
  4907. }
  4908. return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
  4909. }
  4910. function uniqueId(prefix) {
  4911. var id = ++idCounter;
  4912. return toString(prefix) + id;
  4913. }
  4914. var add = createMathOperation(function(augend, addend) {
  4915. return augend + addend;
  4916. }, 0);
  4917. var ceil = createRound("ceil");
  4918. var divide = createMathOperation(function(dividend, divisor) {
  4919. return dividend / divisor;
  4920. }, 1);
  4921. var floor = createRound("floor");
  4922. function max(array) {
  4923. return array && array.length ? baseExtremum(array, identity, baseGt) : undefined;
  4924. }
  4925. function maxBy(array, iteratee2) {
  4926. return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseGt) : undefined;
  4927. }
  4928. function mean(array) {
  4929. return baseMean(array, identity);
  4930. }
  4931. function meanBy(array, iteratee2) {
  4932. return baseMean(array, getIteratee(iteratee2, 2));
  4933. }
  4934. function min(array) {
  4935. return array && array.length ? baseExtremum(array, identity, baseLt) : undefined;
  4936. }
  4937. function minBy(array, iteratee2) {
  4938. return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseLt) : undefined;
  4939. }
  4940. var multiply = createMathOperation(function(multiplier, multiplicand) {
  4941. return multiplier * multiplicand;
  4942. }, 1);
  4943. var round = createRound("round");
  4944. var subtract = createMathOperation(function(minuend, subtrahend) {
  4945. return minuend - subtrahend;
  4946. }, 0);
  4947. function sum(array) {
  4948. return array && array.length ? baseSum(array, identity) : 0;
  4949. }
  4950. function sumBy(array, iteratee2) {
  4951. return array && array.length ? baseSum(array, getIteratee(iteratee2, 2)) : 0;
  4952. }
  4953. lodash.after = after;
  4954. lodash.ary = ary;
  4955. lodash.assign = assign;
  4956. lodash.assignIn = assignIn;
  4957. lodash.assignInWith = assignInWith;
  4958. lodash.assignWith = assignWith;
  4959. lodash.at = at;
  4960. lodash.before = before;
  4961. lodash.bind = bind;
  4962. lodash.bindAll = bindAll;
  4963. lodash.bindKey = bindKey;
  4964. lodash.castArray = castArray;
  4965. lodash.chain = chain;
  4966. lodash.chunk = chunk;
  4967. lodash.compact = compact;
  4968. lodash.concat = concat;
  4969. lodash.cond = cond;
  4970. lodash.conforms = conforms;
  4971. lodash.constant = constant;
  4972. lodash.countBy = countBy;
  4973. lodash.create = create;
  4974. lodash.curry = curry;
  4975. lodash.curryRight = curryRight;
  4976. lodash.debounce = debounce;
  4977. lodash.defaults = defaults;
  4978. lodash.defaultsDeep = defaultsDeep;
  4979. lodash.defer = defer;
  4980. lodash.delay = delay;
  4981. lodash.difference = difference;
  4982. lodash.differenceBy = differenceBy;
  4983. lodash.differenceWith = differenceWith;
  4984. lodash.drop = drop;
  4985. lodash.dropRight = dropRight;
  4986. lodash.dropRightWhile = dropRightWhile;
  4987. lodash.dropWhile = dropWhile;
  4988. lodash.fill = fill;
  4989. lodash.filter = filter;
  4990. lodash.flatMap = flatMap;
  4991. lodash.flatMapDeep = flatMapDeep;
  4992. lodash.flatMapDepth = flatMapDepth;
  4993. lodash.flatten = flatten;
  4994. lodash.flattenDeep = flattenDeep;
  4995. lodash.flattenDepth = flattenDepth;
  4996. lodash.flip = flip;
  4997. lodash.flow = flow;
  4998. lodash.flowRight = flowRight;
  4999. lodash.fromPairs = fromPairs;
  5000. lodash.functions = functions;
  5001. lodash.functionsIn = functionsIn;
  5002. lodash.groupBy = groupBy;
  5003. lodash.initial = initial;
  5004. lodash.intersection = intersection;
  5005. lodash.intersectionBy = intersectionBy;
  5006. lodash.intersectionWith = intersectionWith;
  5007. lodash.invert = invert;
  5008. lodash.invertBy = invertBy;
  5009. lodash.invokeMap = invokeMap;
  5010. lodash.iteratee = iteratee;
  5011. lodash.keyBy = keyBy;
  5012. lodash.keys = keys;
  5013. lodash.keysIn = keysIn;
  5014. lodash.map = map;
  5015. lodash.mapKeys = mapKeys;
  5016. lodash.mapValues = mapValues;
  5017. lodash.matches = matches;
  5018. lodash.matchesProperty = matchesProperty;
  5019. lodash.memoize = memoize;
  5020. lodash.merge = merge;
  5021. lodash.mergeWith = mergeWith;
  5022. lodash.method = method;
  5023. lodash.methodOf = methodOf;
  5024. lodash.mixin = mixin;
  5025. lodash.negate = negate;
  5026. lodash.nthArg = nthArg;
  5027. lodash.omit = omit;
  5028. lodash.omitBy = omitBy;
  5029. lodash.once = once;
  5030. lodash.orderBy = orderBy;
  5031. lodash.over = over;
  5032. lodash.overArgs = overArgs;
  5033. lodash.overEvery = overEvery;
  5034. lodash.overSome = overSome;
  5035. lodash.partial = partial;
  5036. lodash.partialRight = partialRight;
  5037. lodash.partition = partition;
  5038. lodash.pick = pick;
  5039. lodash.pickBy = pickBy;
  5040. lodash.property = property;
  5041. lodash.propertyOf = propertyOf;
  5042. lodash.pull = pull;
  5043. lodash.pullAll = pullAll;
  5044. lodash.pullAllBy = pullAllBy;
  5045. lodash.pullAllWith = pullAllWith;
  5046. lodash.pullAt = pullAt;
  5047. lodash.range = range;
  5048. lodash.rangeRight = rangeRight;
  5049. lodash.rearg = rearg;
  5050. lodash.reject = reject;
  5051. lodash.remove = remove;
  5052. lodash.rest = rest;
  5053. lodash.reverse = reverse;
  5054. lodash.sampleSize = sampleSize;
  5055. lodash.set = set;
  5056. lodash.setWith = setWith;
  5057. lodash.shuffle = shuffle;
  5058. lodash.slice = slice;
  5059. lodash.sortBy = sortBy;
  5060. lodash.sortedUniq = sortedUniq;
  5061. lodash.sortedUniqBy = sortedUniqBy;
  5062. lodash.split = split;
  5063. lodash.spread = spread;
  5064. lodash.tail = tail;
  5065. lodash.take = take;
  5066. lodash.takeRight = takeRight;
  5067. lodash.takeRightWhile = takeRightWhile;
  5068. lodash.takeWhile = takeWhile;
  5069. lodash.tap = tap;
  5070. lodash.throttle = throttle;
  5071. lodash.thru = thru;
  5072. lodash.toArray = toArray;
  5073. lodash.toPairs = toPairs;
  5074. lodash.toPairsIn = toPairsIn;
  5075. lodash.toPath = toPath;
  5076. lodash.toPlainObject = toPlainObject;
  5077. lodash.transform = transform;
  5078. lodash.unary = unary;
  5079. lodash.union = union;
  5080. lodash.unionBy = unionBy;
  5081. lodash.unionWith = unionWith;
  5082. lodash.uniq = uniq;
  5083. lodash.uniqBy = uniqBy;
  5084. lodash.uniqWith = uniqWith;
  5085. lodash.unset = unset;
  5086. lodash.unzip = unzip;
  5087. lodash.unzipWith = unzipWith;
  5088. lodash.update = update;
  5089. lodash.updateWith = updateWith;
  5090. lodash.values = values;
  5091. lodash.valuesIn = valuesIn;
  5092. lodash.without = without;
  5093. lodash.words = words;
  5094. lodash.wrap = wrap;
  5095. lodash.xor = xor;
  5096. lodash.xorBy = xorBy;
  5097. lodash.xorWith = xorWith;
  5098. lodash.zip = zip;
  5099. lodash.zipObject = zipObject;
  5100. lodash.zipObjectDeep = zipObjectDeep;
  5101. lodash.zipWith = zipWith;
  5102. lodash.entries = toPairs;
  5103. lodash.entriesIn = toPairsIn;
  5104. lodash.extend = assignIn;
  5105. lodash.extendWith = assignInWith;
  5106. mixin(lodash, lodash);
  5107. lodash.add = add;
  5108. lodash.attempt = attempt;
  5109. lodash.camelCase = camelCase;
  5110. lodash.capitalize = capitalize;
  5111. lodash.ceil = ceil;
  5112. lodash.clamp = clamp;
  5113. lodash.clone = clone;
  5114. lodash.cloneDeep = cloneDeep;
  5115. lodash.cloneDeepWith = cloneDeepWith;
  5116. lodash.cloneWith = cloneWith;
  5117. lodash.conformsTo = conformsTo;
  5118. lodash.deburr = deburr;
  5119. lodash.defaultTo = defaultTo;
  5120. lodash.divide = divide;
  5121. lodash.endsWith = endsWith;
  5122. lodash.eq = eq;
  5123. lodash.escape = escape;
  5124. lodash.escapeRegExp = escapeRegExp;
  5125. lodash.every = every;
  5126. lodash.find = find;
  5127. lodash.findIndex = findIndex;
  5128. lodash.findKey = findKey;
  5129. lodash.findLast = findLast;
  5130. lodash.findLastIndex = findLastIndex;
  5131. lodash.findLastKey = findLastKey;
  5132. lodash.floor = floor;
  5133. lodash.forEach = forEach;
  5134. lodash.forEachRight = forEachRight;
  5135. lodash.forIn = forIn;
  5136. lodash.forInRight = forInRight;
  5137. lodash.forOwn = forOwn;
  5138. lodash.forOwnRight = forOwnRight;
  5139. lodash.get = get;
  5140. lodash.gt = gt;
  5141. lodash.gte = gte;
  5142. lodash.has = has;
  5143. lodash.hasIn = hasIn;
  5144. lodash.head = head;
  5145. lodash.identity = identity;
  5146. lodash.includes = includes;
  5147. lodash.indexOf = indexOf;
  5148. lodash.inRange = inRange;
  5149. lodash.invoke = invoke;
  5150. lodash.isArguments = isArguments;
  5151. lodash.isArray = isArray;
  5152. lodash.isArrayBuffer = isArrayBuffer;
  5153. lodash.isArrayLike = isArrayLike;
  5154. lodash.isArrayLikeObject = isArrayLikeObject;
  5155. lodash.isBoolean = isBoolean;
  5156. lodash.isBuffer = isBuffer;
  5157. lodash.isDate = isDate;
  5158. lodash.isElement = isElement;
  5159. lodash.isEmpty = isEmpty;
  5160. lodash.isEqual = isEqual;
  5161. lodash.isEqualWith = isEqualWith;
  5162. lodash.isError = isError;
  5163. lodash.isFinite = isFinite;
  5164. lodash.isFunction = isFunction;
  5165. lodash.isInteger = isInteger;
  5166. lodash.isLength = isLength;
  5167. lodash.isMap = isMap;
  5168. lodash.isMatch = isMatch;
  5169. lodash.isMatchWith = isMatchWith;
  5170. lodash.isNaN = isNaN;
  5171. lodash.isNative = isNative;
  5172. lodash.isNil = isNil;
  5173. lodash.isNull = isNull;
  5174. lodash.isNumber = isNumber;
  5175. lodash.isObject = isObject;
  5176. lodash.isObjectLike = isObjectLike;
  5177. lodash.isPlainObject = isPlainObject;
  5178. lodash.isRegExp = isRegExp;
  5179. lodash.isSafeInteger = isSafeInteger;
  5180. lodash.isSet = isSet;
  5181. lodash.isString = isString;
  5182. lodash.isSymbol = isSymbol;
  5183. lodash.isTypedArray = isTypedArray;
  5184. lodash.isUndefined = isUndefined;
  5185. lodash.isWeakMap = isWeakMap;
  5186. lodash.isWeakSet = isWeakSet;
  5187. lodash.join = join;
  5188. lodash.kebabCase = kebabCase;
  5189. lodash.last = last;
  5190. lodash.lastIndexOf = lastIndexOf;
  5191. lodash.lowerCase = lowerCase;
  5192. lodash.lowerFirst = lowerFirst;
  5193. lodash.lt = lt;
  5194. lodash.lte = lte;
  5195. lodash.max = max;
  5196. lodash.maxBy = maxBy;
  5197. lodash.mean = mean;
  5198. lodash.meanBy = meanBy;
  5199. lodash.min = min;
  5200. lodash.minBy = minBy;
  5201. lodash.stubArray = stubArray;
  5202. lodash.stubFalse = stubFalse;
  5203. lodash.stubObject = stubObject;
  5204. lodash.stubString = stubString;
  5205. lodash.stubTrue = stubTrue;
  5206. lodash.multiply = multiply;
  5207. lodash.nth = nth;
  5208. lodash.noConflict = noConflict;
  5209. lodash.noop = noop;
  5210. lodash.now = now;
  5211. lodash.pad = pad;
  5212. lodash.padEnd = padEnd;
  5213. lodash.padStart = padStart;
  5214. lodash.parseInt = parseInt2;
  5215. lodash.random = random;
  5216. lodash.reduce = reduce;
  5217. lodash.reduceRight = reduceRight;
  5218. lodash.repeat = repeat;
  5219. lodash.replace = replace;
  5220. lodash.result = result;
  5221. lodash.round = round;
  5222. lodash.runInContext = runInContext2;
  5223. lodash.sample = sample;
  5224. lodash.size = size;
  5225. lodash.snakeCase = snakeCase;
  5226. lodash.some = some;
  5227. lodash.sortedIndex = sortedIndex;
  5228. lodash.sortedIndexBy = sortedIndexBy;
  5229. lodash.sortedIndexOf = sortedIndexOf;
  5230. lodash.sortedLastIndex = sortedLastIndex;
  5231. lodash.sortedLastIndexBy = sortedLastIndexBy;
  5232. lodash.sortedLastIndexOf = sortedLastIndexOf;
  5233. lodash.startCase = startCase;
  5234. lodash.startsWith = startsWith;
  5235. lodash.subtract = subtract;
  5236. lodash.sum = sum;
  5237. lodash.sumBy = sumBy;
  5238. lodash.template = template;
  5239. lodash.times = times;
  5240. lodash.toFinite = toFinite;
  5241. lodash.toInteger = toInteger;
  5242. lodash.toLength = toLength;
  5243. lodash.toLower = toLower;
  5244. lodash.toNumber = toNumber;
  5245. lodash.toSafeInteger = toSafeInteger;
  5246. lodash.toString = toString;
  5247. lodash.toUpper = toUpper;
  5248. lodash.trim = trim;
  5249. lodash.trimEnd = trimEnd;
  5250. lodash.trimStart = trimStart;
  5251. lodash.truncate = truncate;
  5252. lodash.unescape = unescape;
  5253. lodash.uniqueId = uniqueId;
  5254. lodash.upperCase = upperCase;
  5255. lodash.upperFirst = upperFirst;
  5256. lodash.each = forEach;
  5257. lodash.eachRight = forEachRight;
  5258. lodash.first = head;
  5259. mixin(lodash, function() {
  5260. var source = {};
  5261. baseForOwn(lodash, function(func, methodName) {
  5262. if (!hasOwnProperty.call(lodash.prototype, methodName)) {
  5263. source[methodName] = func;
  5264. }
  5265. });
  5266. return source;
  5267. }(), { "chain": false });
  5268. lodash.VERSION = VERSION;
  5269. arrayEach(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) {
  5270. lodash[methodName].placeholder = lodash;
  5271. });
  5272. arrayEach(["drop", "take"], function(methodName, index) {
  5273. LazyWrapper.prototype[methodName] = function(n) {
  5274. n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
  5275. var result2 = this.__filtered__ && !index ? new LazyWrapper(this) : this.clone();
  5276. if (result2.__filtered__) {
  5277. result2.__takeCount__ = nativeMin(n, result2.__takeCount__);
  5278. } else {
  5279. result2.__views__.push({
  5280. "size": nativeMin(n, MAX_ARRAY_LENGTH),
  5281. "type": methodName + (result2.__dir__ < 0 ? "Right" : "")
  5282. });
  5283. }
  5284. return result2;
  5285. };
  5286. LazyWrapper.prototype[methodName + "Right"] = function(n) {
  5287. return this.reverse()[methodName](n).reverse();
  5288. };
  5289. });
  5290. arrayEach(["filter", "map", "takeWhile"], function(methodName, index) {
  5291. var type = index + 1, isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
  5292. LazyWrapper.prototype[methodName] = function(iteratee2) {
  5293. var result2 = this.clone();
  5294. result2.__iteratees__.push({
  5295. "iteratee": getIteratee(iteratee2, 3),
  5296. "type": type
  5297. });
  5298. result2.__filtered__ = result2.__filtered__ || isFilter;
  5299. return result2;
  5300. };
  5301. });
  5302. arrayEach(["head", "last"], function(methodName, index) {
  5303. var takeName = "take" + (index ? "Right" : "");
  5304. LazyWrapper.prototype[methodName] = function() {
  5305. return this[takeName](1).value()[0];
  5306. };
  5307. });
  5308. arrayEach(["initial", "tail"], function(methodName, index) {
  5309. var dropName = "drop" + (index ? "" : "Right");
  5310. LazyWrapper.prototype[methodName] = function() {
  5311. return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
  5312. };
  5313. });
  5314. LazyWrapper.prototype.compact = function() {
  5315. return this.filter(identity);
  5316. };
  5317. LazyWrapper.prototype.find = function(predicate) {
  5318. return this.filter(predicate).head();
  5319. };
  5320. LazyWrapper.prototype.findLast = function(predicate) {
  5321. return this.reverse().find(predicate);
  5322. };
  5323. LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
  5324. if (typeof path == "function") {
  5325. return new LazyWrapper(this);
  5326. }
  5327. return this.map(function(value) {
  5328. return baseInvoke(value, path, args);
  5329. });
  5330. });
  5331. LazyWrapper.prototype.reject = function(predicate) {
  5332. return this.filter(negate(getIteratee(predicate)));
  5333. };
  5334. LazyWrapper.prototype.slice = function(start, end) {
  5335. start = toInteger(start);
  5336. var result2 = this;
  5337. if (result2.__filtered__ && (start > 0 || end < 0)) {
  5338. return new LazyWrapper(result2);
  5339. }
  5340. if (start < 0) {
  5341. result2 = result2.takeRight(-start);
  5342. } else if (start) {
  5343. result2 = result2.drop(start);
  5344. }
  5345. if (end !== undefined) {
  5346. end = toInteger(end);
  5347. result2 = end < 0 ? result2.dropRight(-end) : result2.take(end - start);
  5348. }
  5349. return result2;
  5350. };
  5351. LazyWrapper.prototype.takeRightWhile = function(predicate) {
  5352. return this.reverse().takeWhile(predicate).reverse();
  5353. };
  5354. LazyWrapper.prototype.toArray = function() {
  5355. return this.take(MAX_ARRAY_LENGTH);
  5356. };
  5357. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  5358. var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), isTaker = /^(?:head|last)$/.test(methodName), lodashFunc = lodash[isTaker ? "take" + (methodName == "last" ? "Right" : "") : methodName], retUnwrapped = isTaker || /^find/.test(methodName);
  5359. if (!lodashFunc) {
  5360. return;
  5361. }
  5362. lodash.prototype[methodName] = function() {
  5363. var value = this.__wrapped__, args = isTaker ? [1] : arguments, isLazy = value instanceof LazyWrapper, iteratee2 = args[0], useLazy = isLazy || isArray(value);
  5364. var interceptor = function(value2) {
  5365. var result3 = lodashFunc.apply(lodash, arrayPush([value2], args));
  5366. return isTaker && chainAll ? result3[0] : result3;
  5367. };
  5368. if (useLazy && checkIteratee && typeof iteratee2 == "function" && iteratee2.length != 1) {
  5369. isLazy = useLazy = false;
  5370. }
  5371. var chainAll = this.__chain__, isHybrid = !!this.__actions__.length, isUnwrapped = retUnwrapped && !chainAll, onlyLazy = isLazy && !isHybrid;
  5372. if (!retUnwrapped && useLazy) {
  5373. value = onlyLazy ? value : new LazyWrapper(this);
  5374. var result2 = func.apply(value, args);
  5375. result2.__actions__.push({ "func": thru, "args": [interceptor], "thisArg": undefined });
  5376. return new LodashWrapper(result2, chainAll);
  5377. }
  5378. if (isUnwrapped && onlyLazy) {
  5379. return func.apply(this, args);
  5380. }
  5381. result2 = this.thru(interceptor);
  5382. return isUnwrapped ? isTaker ? result2.value()[0] : result2.value() : result2;
  5383. };
  5384. });
  5385. arrayEach(["pop", "push", "shift", "sort", "splice", "unshift"], function(methodName) {
  5386. var func = arrayProto[methodName], chainName = /^(?:push|sort|unshift)$/.test(methodName) ? "tap" : "thru", retUnwrapped = /^(?:pop|shift)$/.test(methodName);
  5387. lodash.prototype[methodName] = function() {
  5388. var args = arguments;
  5389. if (retUnwrapped && !this.__chain__) {
  5390. var value = this.value();
  5391. return func.apply(isArray(value) ? value : [], args);
  5392. }
  5393. return this[chainName](function(value2) {
  5394. return func.apply(isArray(value2) ? value2 : [], args);
  5395. });
  5396. };
  5397. });
  5398. baseForOwn(LazyWrapper.prototype, function(func, methodName) {
  5399. var lodashFunc = lodash[methodName];
  5400. if (lodashFunc) {
  5401. var key = lodashFunc.name + "";
  5402. if (!hasOwnProperty.call(realNames, key)) {
  5403. realNames[key] = [];
  5404. }
  5405. realNames[key].push({ "name": methodName, "func": lodashFunc });
  5406. }
  5407. });
  5408. realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
  5409. "name": "wrapper",
  5410. "func": undefined
  5411. }];
  5412. LazyWrapper.prototype.clone = lazyClone;
  5413. LazyWrapper.prototype.reverse = lazyReverse;
  5414. LazyWrapper.prototype.value = lazyValue;
  5415. lodash.prototype.at = wrapperAt;
  5416. lodash.prototype.chain = wrapperChain;
  5417. lodash.prototype.commit = wrapperCommit;
  5418. lodash.prototype.next = wrapperNext;
  5419. lodash.prototype.plant = wrapperPlant;
  5420. lodash.prototype.reverse = wrapperReverse;
  5421. lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
  5422. lodash.prototype.first = lodash.prototype.head;
  5423. if (symIterator) {
  5424. lodash.prototype[symIterator] = wrapperToIterator;
  5425. }
  5426. return lodash;
  5427. };
  5428. var _ = runInContext();
  5429. if (typeof define == "function" && typeof define.amd == "object" && define.amd) {
  5430. root._ = _;
  5431. define(function() {
  5432. return _;
  5433. });
  5434. } else if (freeModule) {
  5435. (freeModule.exports = _)._ = _;
  5436. freeExports._ = _;
  5437. } else {
  5438. root._ = _;
  5439. }
  5440. }).call(exports);
  5441. }
  5442. });
  5443. // dep:lodash
  5444. init_define_APP_INFO();
  5445. var lodash_default = require_lodash();
  5446. export {
  5447. lodash_default as default
  5448. };
  5449. /**
  5450. * @license
  5451. * Lodash <https://lodash.com/>
  5452. * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
  5453. * Released under MIT license <https://lodash.com/license>
  5454. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  5455. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  5456. */
  5457. //# sourceMappingURL=lodash.js.map