lodash.js 218 KB

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