ReactNativeRenderer-profiling.fb.js 272 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966
  1. /**
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. *
  7. * @noflow
  8. * @nolint
  9. * @preventMunge
  10. * @generated
  11. */
  12. "use strict";
  13. require("react-native/Libraries/ReactPrivate/ReactNativePrivateInitializeCore");
  14. var ReactNativePrivateInterface = require("react-native/Libraries/ReactPrivate/ReactNativePrivateInterface"),
  15. React = require("react"),
  16. Scheduler = require("scheduler"),
  17. tracing = require("scheduler/tracing");
  18. function getParent(inst) {
  19. do inst = inst.return;
  20. while (inst && 5 !== inst.tag);
  21. return inst ? inst : null;
  22. }
  23. function traverseTwoPhase(inst, fn, arg) {
  24. for (var path = []; inst; ) path.push(inst), (inst = getParent(inst));
  25. for (inst = path.length; 0 < inst--; ) fn(path[inst], "captured", arg);
  26. for (inst = 0; inst < path.length; inst++) fn(path[inst], "bubbled", arg);
  27. }
  28. function invokeGuardedCallbackImpl(name, func, context, a, b, c, d, e, f) {
  29. var funcArgs = Array.prototype.slice.call(arguments, 3);
  30. try {
  31. func.apply(context, funcArgs);
  32. } catch (error) {
  33. this.onError(error);
  34. }
  35. }
  36. var hasError = !1,
  37. caughtError = null,
  38. hasRethrowError = !1,
  39. rethrowError = null,
  40. reporter = {
  41. onError: function(error) {
  42. hasError = !0;
  43. caughtError = error;
  44. }
  45. };
  46. function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
  47. hasError = !1;
  48. caughtError = null;
  49. invokeGuardedCallbackImpl.apply(reporter, arguments);
  50. }
  51. function invokeGuardedCallbackAndCatchFirstError(
  52. name,
  53. func,
  54. context,
  55. a,
  56. b,
  57. c,
  58. d,
  59. e,
  60. f
  61. ) {
  62. invokeGuardedCallback.apply(this, arguments);
  63. if (hasError) {
  64. if (hasError) {
  65. var error = caughtError;
  66. hasError = !1;
  67. caughtError = null;
  68. } else
  69. throw Error(
  70. "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue."
  71. );
  72. hasRethrowError || ((hasRethrowError = !0), (rethrowError = error));
  73. }
  74. }
  75. var getFiberCurrentPropsFromNode = null,
  76. getInstanceFromNode = null,
  77. getNodeFromInstance = null;
  78. function executeDispatch(event, listener, inst) {
  79. var type = event.type || "unknown-event";
  80. event.currentTarget = getNodeFromInstance(inst);
  81. invokeGuardedCallbackAndCatchFirstError(type, listener, void 0, event);
  82. event.currentTarget = null;
  83. }
  84. function executeDirectDispatch(event) {
  85. var dispatchListener = event._dispatchListeners,
  86. dispatchInstance = event._dispatchInstances;
  87. if (Array.isArray(dispatchListener))
  88. throw Error("executeDirectDispatch(...): Invalid `event`.");
  89. event.currentTarget = dispatchListener
  90. ? getNodeFromInstance(dispatchInstance)
  91. : null;
  92. dispatchListener = dispatchListener ? dispatchListener(event) : null;
  93. event.currentTarget = null;
  94. event._dispatchListeners = null;
  95. event._dispatchInstances = null;
  96. return dispatchListener;
  97. }
  98. function getListener(inst, registrationName) {
  99. var listener = inst.stateNode;
  100. if (!listener) return null;
  101. var props = getFiberCurrentPropsFromNode(listener);
  102. if (!props) return null;
  103. listener = props[registrationName];
  104. a: switch (registrationName) {
  105. case "onClick":
  106. case "onClickCapture":
  107. case "onDoubleClick":
  108. case "onDoubleClickCapture":
  109. case "onMouseDown":
  110. case "onMouseDownCapture":
  111. case "onMouseMove":
  112. case "onMouseMoveCapture":
  113. case "onMouseUp":
  114. case "onMouseUpCapture":
  115. case "onMouseEnter":
  116. (props = !props.disabled) ||
  117. ((inst = inst.type),
  118. (props = !(
  119. "button" === inst ||
  120. "input" === inst ||
  121. "select" === inst ||
  122. "textarea" === inst
  123. )));
  124. inst = !props;
  125. break a;
  126. default:
  127. inst = !1;
  128. }
  129. if (inst) return null;
  130. if (listener && "function" !== typeof listener)
  131. throw Error(
  132. "Expected `" +
  133. registrationName +
  134. "` listener to be a function, instead got a value of `" +
  135. typeof listener +
  136. "` type."
  137. );
  138. return listener;
  139. }
  140. function accumulateInto(current, next) {
  141. if (null == next)
  142. throw Error(
  143. "accumulateInto(...): Accumulated items must not be null or undefined."
  144. );
  145. if (null == current) return next;
  146. if (Array.isArray(current)) {
  147. if (Array.isArray(next)) return current.push.apply(current, next), current;
  148. current.push(next);
  149. return current;
  150. }
  151. return Array.isArray(next) ? [current].concat(next) : [current, next];
  152. }
  153. function forEachAccumulated(arr, cb, scope) {
  154. Array.isArray(arr) ? arr.forEach(cb, scope) : arr && cb.call(scope, arr);
  155. }
  156. function accumulateDirectionalDispatches(inst, phase, event) {
  157. if (
  158. (phase = getListener(
  159. inst,
  160. event.dispatchConfig.phasedRegistrationNames[phase]
  161. ))
  162. )
  163. (event._dispatchListeners = accumulateInto(
  164. event._dispatchListeners,
  165. phase
  166. )),
  167. (event._dispatchInstances = accumulateInto(
  168. event._dispatchInstances,
  169. inst
  170. ));
  171. }
  172. function accumulateTwoPhaseDispatchesSingle(event) {
  173. event &&
  174. event.dispatchConfig.phasedRegistrationNames &&
  175. traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
  176. }
  177. function accumulateTwoPhaseDispatchesSingleSkipTarget(event) {
  178. if (event && event.dispatchConfig.phasedRegistrationNames) {
  179. var targetInst = event._targetInst;
  180. targetInst = targetInst ? getParent(targetInst) : null;
  181. traverseTwoPhase(targetInst, accumulateDirectionalDispatches, event);
  182. }
  183. }
  184. function accumulateDirectDispatchesSingle(event) {
  185. if (event && event.dispatchConfig.registrationName) {
  186. var inst = event._targetInst;
  187. if (inst && event && event.dispatchConfig.registrationName) {
  188. var listener = getListener(inst, event.dispatchConfig.registrationName);
  189. listener &&
  190. ((event._dispatchListeners = accumulateInto(
  191. event._dispatchListeners,
  192. listener
  193. )),
  194. (event._dispatchInstances = accumulateInto(
  195. event._dispatchInstances,
  196. inst
  197. )));
  198. }
  199. }
  200. }
  201. function functionThatReturnsTrue() {
  202. return !0;
  203. }
  204. function functionThatReturnsFalse() {
  205. return !1;
  206. }
  207. function SyntheticEvent(
  208. dispatchConfig,
  209. targetInst,
  210. nativeEvent,
  211. nativeEventTarget
  212. ) {
  213. this.dispatchConfig = dispatchConfig;
  214. this._targetInst = targetInst;
  215. this.nativeEvent = nativeEvent;
  216. dispatchConfig = this.constructor.Interface;
  217. for (var propName in dispatchConfig)
  218. dispatchConfig.hasOwnProperty(propName) &&
  219. ((targetInst = dispatchConfig[propName])
  220. ? (this[propName] = targetInst(nativeEvent))
  221. : "target" === propName
  222. ? (this.target = nativeEventTarget)
  223. : (this[propName] = nativeEvent[propName]));
  224. this.isDefaultPrevented = (null != nativeEvent.defaultPrevented
  225. ? nativeEvent.defaultPrevented
  226. : !1 === nativeEvent.returnValue)
  227. ? functionThatReturnsTrue
  228. : functionThatReturnsFalse;
  229. this.isPropagationStopped = functionThatReturnsFalse;
  230. return this;
  231. }
  232. Object.assign(SyntheticEvent.prototype, {
  233. preventDefault: function() {
  234. this.defaultPrevented = !0;
  235. var event = this.nativeEvent;
  236. event &&
  237. (event.preventDefault
  238. ? event.preventDefault()
  239. : "unknown" !== typeof event.returnValue && (event.returnValue = !1),
  240. (this.isDefaultPrevented = functionThatReturnsTrue));
  241. },
  242. stopPropagation: function() {
  243. var event = this.nativeEvent;
  244. event &&
  245. (event.stopPropagation
  246. ? event.stopPropagation()
  247. : "unknown" !== typeof event.cancelBubble && (event.cancelBubble = !0),
  248. (this.isPropagationStopped = functionThatReturnsTrue));
  249. },
  250. persist: function() {
  251. this.isPersistent = functionThatReturnsTrue;
  252. },
  253. isPersistent: functionThatReturnsFalse,
  254. destructor: function() {
  255. var Interface = this.constructor.Interface,
  256. propName;
  257. for (propName in Interface) this[propName] = null;
  258. this.nativeEvent = this._targetInst = this.dispatchConfig = null;
  259. this.isPropagationStopped = this.isDefaultPrevented = functionThatReturnsFalse;
  260. this._dispatchInstances = this._dispatchListeners = null;
  261. }
  262. });
  263. SyntheticEvent.Interface = {
  264. type: null,
  265. target: null,
  266. currentTarget: function() {
  267. return null;
  268. },
  269. eventPhase: null,
  270. bubbles: null,
  271. cancelable: null,
  272. timeStamp: function(event) {
  273. return event.timeStamp || Date.now();
  274. },
  275. defaultPrevented: null,
  276. isTrusted: null
  277. };
  278. SyntheticEvent.extend = function(Interface) {
  279. function E() {}
  280. function Class() {
  281. return Super.apply(this, arguments);
  282. }
  283. var Super = this;
  284. E.prototype = Super.prototype;
  285. var prototype = new E();
  286. Object.assign(prototype, Class.prototype);
  287. Class.prototype = prototype;
  288. Class.prototype.constructor = Class;
  289. Class.Interface = Object.assign({}, Super.Interface, Interface);
  290. Class.extend = Super.extend;
  291. addEventPoolingTo(Class);
  292. return Class;
  293. };
  294. addEventPoolingTo(SyntheticEvent);
  295. function getPooledEvent(dispatchConfig, targetInst, nativeEvent, nativeInst) {
  296. if (this.eventPool.length) {
  297. var instance = this.eventPool.pop();
  298. this.call(instance, dispatchConfig, targetInst, nativeEvent, nativeInst);
  299. return instance;
  300. }
  301. return new this(dispatchConfig, targetInst, nativeEvent, nativeInst);
  302. }
  303. function releasePooledEvent(event) {
  304. if (!(event instanceof this))
  305. throw Error(
  306. "Trying to release an event instance into a pool of a different type."
  307. );
  308. event.destructor();
  309. 10 > this.eventPool.length && this.eventPool.push(event);
  310. }
  311. function addEventPoolingTo(EventConstructor) {
  312. EventConstructor.eventPool = [];
  313. EventConstructor.getPooled = getPooledEvent;
  314. EventConstructor.release = releasePooledEvent;
  315. }
  316. var ResponderSyntheticEvent = SyntheticEvent.extend({
  317. touchHistory: function() {
  318. return null;
  319. }
  320. });
  321. function isStartish(topLevelType) {
  322. return "topTouchStart" === topLevelType;
  323. }
  324. function isMoveish(topLevelType) {
  325. return "topTouchMove" === topLevelType;
  326. }
  327. var startDependencies = ["topTouchStart"],
  328. moveDependencies = ["topTouchMove"],
  329. endDependencies = ["topTouchCancel", "topTouchEnd"],
  330. touchBank = [],
  331. touchHistory = {
  332. touchBank: touchBank,
  333. numberActiveTouches: 0,
  334. indexOfSingleActiveTouch: -1,
  335. mostRecentTimeStamp: 0
  336. };
  337. function timestampForTouch(touch) {
  338. return touch.timeStamp || touch.timestamp;
  339. }
  340. function getTouchIdentifier(_ref) {
  341. _ref = _ref.identifier;
  342. if (null == _ref) throw Error("Touch object is missing identifier.");
  343. return _ref;
  344. }
  345. function recordTouchStart(touch) {
  346. var identifier = getTouchIdentifier(touch),
  347. touchRecord = touchBank[identifier];
  348. touchRecord
  349. ? ((touchRecord.touchActive = !0),
  350. (touchRecord.startPageX = touch.pageX),
  351. (touchRecord.startPageY = touch.pageY),
  352. (touchRecord.startTimeStamp = timestampForTouch(touch)),
  353. (touchRecord.currentPageX = touch.pageX),
  354. (touchRecord.currentPageY = touch.pageY),
  355. (touchRecord.currentTimeStamp = timestampForTouch(touch)),
  356. (touchRecord.previousPageX = touch.pageX),
  357. (touchRecord.previousPageY = touch.pageY),
  358. (touchRecord.previousTimeStamp = timestampForTouch(touch)))
  359. : ((touchRecord = {
  360. touchActive: !0,
  361. startPageX: touch.pageX,
  362. startPageY: touch.pageY,
  363. startTimeStamp: timestampForTouch(touch),
  364. currentPageX: touch.pageX,
  365. currentPageY: touch.pageY,
  366. currentTimeStamp: timestampForTouch(touch),
  367. previousPageX: touch.pageX,
  368. previousPageY: touch.pageY,
  369. previousTimeStamp: timestampForTouch(touch)
  370. }),
  371. (touchBank[identifier] = touchRecord));
  372. touchHistory.mostRecentTimeStamp = timestampForTouch(touch);
  373. }
  374. function recordTouchMove(touch) {
  375. var touchRecord = touchBank[getTouchIdentifier(touch)];
  376. touchRecord &&
  377. ((touchRecord.touchActive = !0),
  378. (touchRecord.previousPageX = touchRecord.currentPageX),
  379. (touchRecord.previousPageY = touchRecord.currentPageY),
  380. (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp),
  381. (touchRecord.currentPageX = touch.pageX),
  382. (touchRecord.currentPageY = touch.pageY),
  383. (touchRecord.currentTimeStamp = timestampForTouch(touch)),
  384. (touchHistory.mostRecentTimeStamp = timestampForTouch(touch)));
  385. }
  386. function recordTouchEnd(touch) {
  387. var touchRecord = touchBank[getTouchIdentifier(touch)];
  388. touchRecord &&
  389. ((touchRecord.touchActive = !1),
  390. (touchRecord.previousPageX = touchRecord.currentPageX),
  391. (touchRecord.previousPageY = touchRecord.currentPageY),
  392. (touchRecord.previousTimeStamp = touchRecord.currentTimeStamp),
  393. (touchRecord.currentPageX = touch.pageX),
  394. (touchRecord.currentPageY = touch.pageY),
  395. (touchRecord.currentTimeStamp = timestampForTouch(touch)),
  396. (touchHistory.mostRecentTimeStamp = timestampForTouch(touch)));
  397. }
  398. var ResponderTouchHistoryStore = {
  399. recordTouchTrack: function(topLevelType, nativeEvent) {
  400. if (isMoveish(topLevelType))
  401. nativeEvent.changedTouches.forEach(recordTouchMove);
  402. else if (isStartish(topLevelType))
  403. nativeEvent.changedTouches.forEach(recordTouchStart),
  404. (touchHistory.numberActiveTouches = nativeEvent.touches.length),
  405. 1 === touchHistory.numberActiveTouches &&
  406. (touchHistory.indexOfSingleActiveTouch =
  407. nativeEvent.touches[0].identifier);
  408. else if (
  409. "topTouchEnd" === topLevelType ||
  410. "topTouchCancel" === topLevelType
  411. )
  412. if (
  413. (nativeEvent.changedTouches.forEach(recordTouchEnd),
  414. (touchHistory.numberActiveTouches = nativeEvent.touches.length),
  415. 1 === touchHistory.numberActiveTouches)
  416. )
  417. for (topLevelType = 0; topLevelType < touchBank.length; topLevelType++)
  418. if (
  419. ((nativeEvent = touchBank[topLevelType]),
  420. null != nativeEvent && nativeEvent.touchActive)
  421. ) {
  422. touchHistory.indexOfSingleActiveTouch = topLevelType;
  423. break;
  424. }
  425. },
  426. touchHistory: touchHistory
  427. };
  428. function accumulate(current, next) {
  429. if (null == next)
  430. throw Error(
  431. "accumulate(...): Accumulated items must not be null or undefined."
  432. );
  433. return null == current
  434. ? next
  435. : Array.isArray(current)
  436. ? current.concat(next)
  437. : Array.isArray(next)
  438. ? [current].concat(next)
  439. : [current, next];
  440. }
  441. var responderInst = null,
  442. trackedTouchCount = 0;
  443. function changeResponder(nextResponderInst, blockHostResponder) {
  444. var oldResponderInst = responderInst;
  445. responderInst = nextResponderInst;
  446. if (null !== ResponderEventPlugin.GlobalResponderHandler)
  447. ResponderEventPlugin.GlobalResponderHandler.onChange(
  448. oldResponderInst,
  449. nextResponderInst,
  450. blockHostResponder
  451. );
  452. }
  453. var eventTypes = {
  454. startShouldSetResponder: {
  455. phasedRegistrationNames: {
  456. bubbled: "onStartShouldSetResponder",
  457. captured: "onStartShouldSetResponderCapture"
  458. },
  459. dependencies: startDependencies
  460. },
  461. scrollShouldSetResponder: {
  462. phasedRegistrationNames: {
  463. bubbled: "onScrollShouldSetResponder",
  464. captured: "onScrollShouldSetResponderCapture"
  465. },
  466. dependencies: ["topScroll"]
  467. },
  468. selectionChangeShouldSetResponder: {
  469. phasedRegistrationNames: {
  470. bubbled: "onSelectionChangeShouldSetResponder",
  471. captured: "onSelectionChangeShouldSetResponderCapture"
  472. },
  473. dependencies: ["topSelectionChange"]
  474. },
  475. moveShouldSetResponder: {
  476. phasedRegistrationNames: {
  477. bubbled: "onMoveShouldSetResponder",
  478. captured: "onMoveShouldSetResponderCapture"
  479. },
  480. dependencies: moveDependencies
  481. },
  482. responderStart: {
  483. registrationName: "onResponderStart",
  484. dependencies: startDependencies
  485. },
  486. responderMove: {
  487. registrationName: "onResponderMove",
  488. dependencies: moveDependencies
  489. },
  490. responderEnd: {
  491. registrationName: "onResponderEnd",
  492. dependencies: endDependencies
  493. },
  494. responderRelease: {
  495. registrationName: "onResponderRelease",
  496. dependencies: endDependencies
  497. },
  498. responderTerminationRequest: {
  499. registrationName: "onResponderTerminationRequest",
  500. dependencies: []
  501. },
  502. responderGrant: { registrationName: "onResponderGrant", dependencies: [] },
  503. responderReject: {
  504. registrationName: "onResponderReject",
  505. dependencies: []
  506. },
  507. responderTerminate: {
  508. registrationName: "onResponderTerminate",
  509. dependencies: []
  510. }
  511. },
  512. ResponderEventPlugin = {
  513. _getResponder: function() {
  514. return responderInst;
  515. },
  516. eventTypes: eventTypes,
  517. extractEvents: function(
  518. topLevelType,
  519. targetInst,
  520. nativeEvent,
  521. nativeEventTarget
  522. ) {
  523. if (isStartish(topLevelType)) trackedTouchCount += 1;
  524. else if (
  525. "topTouchEnd" === topLevelType ||
  526. "topTouchCancel" === topLevelType
  527. )
  528. if (0 <= trackedTouchCount) --trackedTouchCount;
  529. else return null;
  530. ResponderTouchHistoryStore.recordTouchTrack(topLevelType, nativeEvent);
  531. if (
  532. targetInst &&
  533. (("topScroll" === topLevelType && !nativeEvent.responderIgnoreScroll) ||
  534. (0 < trackedTouchCount && "topSelectionChange" === topLevelType) ||
  535. isStartish(topLevelType) ||
  536. isMoveish(topLevelType))
  537. ) {
  538. var shouldSetEventType = isStartish(topLevelType)
  539. ? eventTypes.startShouldSetResponder
  540. : isMoveish(topLevelType)
  541. ? eventTypes.moveShouldSetResponder
  542. : "topSelectionChange" === topLevelType
  543. ? eventTypes.selectionChangeShouldSetResponder
  544. : eventTypes.scrollShouldSetResponder;
  545. if (responderInst)
  546. b: {
  547. var JSCompiler_temp = responderInst;
  548. for (
  549. var depthA = 0, tempA = JSCompiler_temp;
  550. tempA;
  551. tempA = getParent(tempA)
  552. )
  553. depthA++;
  554. tempA = 0;
  555. for (var tempB = targetInst; tempB; tempB = getParent(tempB))
  556. tempA++;
  557. for (; 0 < depthA - tempA; )
  558. (JSCompiler_temp = getParent(JSCompiler_temp)), depthA--;
  559. for (; 0 < tempA - depthA; )
  560. (targetInst = getParent(targetInst)), tempA--;
  561. for (; depthA--; ) {
  562. if (
  563. JSCompiler_temp === targetInst ||
  564. JSCompiler_temp === targetInst.alternate
  565. )
  566. break b;
  567. JSCompiler_temp = getParent(JSCompiler_temp);
  568. targetInst = getParent(targetInst);
  569. }
  570. JSCompiler_temp = null;
  571. }
  572. else JSCompiler_temp = targetInst;
  573. targetInst = JSCompiler_temp === responderInst;
  574. JSCompiler_temp = ResponderSyntheticEvent.getPooled(
  575. shouldSetEventType,
  576. JSCompiler_temp,
  577. nativeEvent,
  578. nativeEventTarget
  579. );
  580. JSCompiler_temp.touchHistory = ResponderTouchHistoryStore.touchHistory;
  581. targetInst
  582. ? forEachAccumulated(
  583. JSCompiler_temp,
  584. accumulateTwoPhaseDispatchesSingleSkipTarget
  585. )
  586. : forEachAccumulated(
  587. JSCompiler_temp,
  588. accumulateTwoPhaseDispatchesSingle
  589. );
  590. b: {
  591. shouldSetEventType = JSCompiler_temp._dispatchListeners;
  592. targetInst = JSCompiler_temp._dispatchInstances;
  593. if (Array.isArray(shouldSetEventType))
  594. for (
  595. depthA = 0;
  596. depthA < shouldSetEventType.length &&
  597. !JSCompiler_temp.isPropagationStopped();
  598. depthA++
  599. ) {
  600. if (
  601. shouldSetEventType[depthA](JSCompiler_temp, targetInst[depthA])
  602. ) {
  603. shouldSetEventType = targetInst[depthA];
  604. break b;
  605. }
  606. }
  607. else if (
  608. shouldSetEventType &&
  609. shouldSetEventType(JSCompiler_temp, targetInst)
  610. ) {
  611. shouldSetEventType = targetInst;
  612. break b;
  613. }
  614. shouldSetEventType = null;
  615. }
  616. JSCompiler_temp._dispatchInstances = null;
  617. JSCompiler_temp._dispatchListeners = null;
  618. JSCompiler_temp.isPersistent() ||
  619. JSCompiler_temp.constructor.release(JSCompiler_temp);
  620. if (shouldSetEventType && shouldSetEventType !== responderInst)
  621. if (
  622. ((JSCompiler_temp = ResponderSyntheticEvent.getPooled(
  623. eventTypes.responderGrant,
  624. shouldSetEventType,
  625. nativeEvent,
  626. nativeEventTarget
  627. )),
  628. (JSCompiler_temp.touchHistory =
  629. ResponderTouchHistoryStore.touchHistory),
  630. forEachAccumulated(
  631. JSCompiler_temp,
  632. accumulateDirectDispatchesSingle
  633. ),
  634. (targetInst = !0 === executeDirectDispatch(JSCompiler_temp)),
  635. responderInst)
  636. )
  637. if (
  638. ((depthA = ResponderSyntheticEvent.getPooled(
  639. eventTypes.responderTerminationRequest,
  640. responderInst,
  641. nativeEvent,
  642. nativeEventTarget
  643. )),
  644. (depthA.touchHistory = ResponderTouchHistoryStore.touchHistory),
  645. forEachAccumulated(depthA, accumulateDirectDispatchesSingle),
  646. (tempA =
  647. !depthA._dispatchListeners || executeDirectDispatch(depthA)),
  648. depthA.isPersistent() || depthA.constructor.release(depthA),
  649. tempA)
  650. ) {
  651. depthA = ResponderSyntheticEvent.getPooled(
  652. eventTypes.responderTerminate,
  653. responderInst,
  654. nativeEvent,
  655. nativeEventTarget
  656. );
  657. depthA.touchHistory = ResponderTouchHistoryStore.touchHistory;
  658. forEachAccumulated(depthA, accumulateDirectDispatchesSingle);
  659. var JSCompiler_temp$jscomp$0 = accumulate(
  660. JSCompiler_temp$jscomp$0,
  661. [JSCompiler_temp, depthA]
  662. );
  663. changeResponder(shouldSetEventType, targetInst);
  664. } else
  665. (shouldSetEventType = ResponderSyntheticEvent.getPooled(
  666. eventTypes.responderReject,
  667. shouldSetEventType,
  668. nativeEvent,
  669. nativeEventTarget
  670. )),
  671. (shouldSetEventType.touchHistory =
  672. ResponderTouchHistoryStore.touchHistory),
  673. forEachAccumulated(
  674. shouldSetEventType,
  675. accumulateDirectDispatchesSingle
  676. ),
  677. (JSCompiler_temp$jscomp$0 = accumulate(
  678. JSCompiler_temp$jscomp$0,
  679. shouldSetEventType
  680. ));
  681. else
  682. (JSCompiler_temp$jscomp$0 = accumulate(
  683. JSCompiler_temp$jscomp$0,
  684. JSCompiler_temp
  685. )),
  686. changeResponder(shouldSetEventType, targetInst);
  687. else JSCompiler_temp$jscomp$0 = null;
  688. } else JSCompiler_temp$jscomp$0 = null;
  689. shouldSetEventType = responderInst && isStartish(topLevelType);
  690. JSCompiler_temp = responderInst && isMoveish(topLevelType);
  691. targetInst =
  692. responderInst &&
  693. ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType);
  694. if (
  695. (shouldSetEventType = shouldSetEventType
  696. ? eventTypes.responderStart
  697. : JSCompiler_temp
  698. ? eventTypes.responderMove
  699. : targetInst
  700. ? eventTypes.responderEnd
  701. : null)
  702. )
  703. (shouldSetEventType = ResponderSyntheticEvent.getPooled(
  704. shouldSetEventType,
  705. responderInst,
  706. nativeEvent,
  707. nativeEventTarget
  708. )),
  709. (shouldSetEventType.touchHistory =
  710. ResponderTouchHistoryStore.touchHistory),
  711. forEachAccumulated(
  712. shouldSetEventType,
  713. accumulateDirectDispatchesSingle
  714. ),
  715. (JSCompiler_temp$jscomp$0 = accumulate(
  716. JSCompiler_temp$jscomp$0,
  717. shouldSetEventType
  718. ));
  719. shouldSetEventType = responderInst && "topTouchCancel" === topLevelType;
  720. if (
  721. (topLevelType =
  722. responderInst &&
  723. !shouldSetEventType &&
  724. ("topTouchEnd" === topLevelType || "topTouchCancel" === topLevelType))
  725. )
  726. a: {
  727. if ((topLevelType = nativeEvent.touches) && 0 !== topLevelType.length)
  728. for (
  729. JSCompiler_temp = 0;
  730. JSCompiler_temp < topLevelType.length;
  731. JSCompiler_temp++
  732. )
  733. if (
  734. ((targetInst = topLevelType[JSCompiler_temp].target),
  735. null !== targetInst &&
  736. void 0 !== targetInst &&
  737. 0 !== targetInst)
  738. ) {
  739. depthA = getInstanceFromNode(targetInst);
  740. b: {
  741. for (targetInst = responderInst; depthA; ) {
  742. if (
  743. targetInst === depthA ||
  744. targetInst === depthA.alternate
  745. ) {
  746. targetInst = !0;
  747. break b;
  748. }
  749. depthA = getParent(depthA);
  750. }
  751. targetInst = !1;
  752. }
  753. if (targetInst) {
  754. topLevelType = !1;
  755. break a;
  756. }
  757. }
  758. topLevelType = !0;
  759. }
  760. if (
  761. (topLevelType = shouldSetEventType
  762. ? eventTypes.responderTerminate
  763. : topLevelType
  764. ? eventTypes.responderRelease
  765. : null)
  766. )
  767. (nativeEvent = ResponderSyntheticEvent.getPooled(
  768. topLevelType,
  769. responderInst,
  770. nativeEvent,
  771. nativeEventTarget
  772. )),
  773. (nativeEvent.touchHistory = ResponderTouchHistoryStore.touchHistory),
  774. forEachAccumulated(nativeEvent, accumulateDirectDispatchesSingle),
  775. (JSCompiler_temp$jscomp$0 = accumulate(
  776. JSCompiler_temp$jscomp$0,
  777. nativeEvent
  778. )),
  779. changeResponder(null);
  780. return JSCompiler_temp$jscomp$0;
  781. },
  782. GlobalResponderHandler: null,
  783. injection: {
  784. injectGlobalResponderHandler: function(GlobalResponderHandler) {
  785. ResponderEventPlugin.GlobalResponderHandler = GlobalResponderHandler;
  786. }
  787. }
  788. },
  789. eventPluginOrder = null,
  790. namesToPlugins = {};
  791. function recomputePluginOrdering() {
  792. if (eventPluginOrder)
  793. for (var pluginName in namesToPlugins) {
  794. var pluginModule = namesToPlugins[pluginName],
  795. pluginIndex = eventPluginOrder.indexOf(pluginName);
  796. if (!(-1 < pluginIndex))
  797. throw Error(
  798. "EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `" +
  799. pluginName +
  800. "`."
  801. );
  802. if (!plugins[pluginIndex]) {
  803. if (!pluginModule.extractEvents)
  804. throw Error(
  805. "EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `" +
  806. pluginName +
  807. "` does not."
  808. );
  809. plugins[pluginIndex] = pluginModule;
  810. pluginIndex = pluginModule.eventTypes;
  811. for (var eventName in pluginIndex) {
  812. var JSCompiler_inline_result = void 0;
  813. var dispatchConfig = pluginIndex[eventName],
  814. pluginModule$jscomp$0 = pluginModule,
  815. eventName$jscomp$0 = eventName;
  816. if (eventNameDispatchConfigs.hasOwnProperty(eventName$jscomp$0))
  817. throw Error(
  818. "EventPluginRegistry: More than one plugin attempted to publish the same event name, `" +
  819. eventName$jscomp$0 +
  820. "`."
  821. );
  822. eventNameDispatchConfigs[eventName$jscomp$0] = dispatchConfig;
  823. var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames;
  824. if (phasedRegistrationNames) {
  825. for (JSCompiler_inline_result in phasedRegistrationNames)
  826. phasedRegistrationNames.hasOwnProperty(
  827. JSCompiler_inline_result
  828. ) &&
  829. publishRegistrationName(
  830. phasedRegistrationNames[JSCompiler_inline_result],
  831. pluginModule$jscomp$0,
  832. eventName$jscomp$0
  833. );
  834. JSCompiler_inline_result = !0;
  835. } else
  836. dispatchConfig.registrationName
  837. ? (publishRegistrationName(
  838. dispatchConfig.registrationName,
  839. pluginModule$jscomp$0,
  840. eventName$jscomp$0
  841. ),
  842. (JSCompiler_inline_result = !0))
  843. : (JSCompiler_inline_result = !1);
  844. if (!JSCompiler_inline_result)
  845. throw Error(
  846. "EventPluginRegistry: Failed to publish event `" +
  847. eventName +
  848. "` for plugin `" +
  849. pluginName +
  850. "`."
  851. );
  852. }
  853. }
  854. }
  855. }
  856. function publishRegistrationName(registrationName, pluginModule) {
  857. if (registrationNameModules[registrationName])
  858. throw Error(
  859. "EventPluginRegistry: More than one plugin attempted to publish the same registration name, `" +
  860. registrationName +
  861. "`."
  862. );
  863. registrationNameModules[registrationName] = pluginModule;
  864. }
  865. var plugins = [],
  866. eventNameDispatchConfigs = {},
  867. registrationNameModules = {},
  868. customBubblingEventTypes =
  869. ReactNativePrivateInterface.ReactNativeViewConfigRegistry
  870. .customBubblingEventTypes,
  871. customDirectEventTypes =
  872. ReactNativePrivateInterface.ReactNativeViewConfigRegistry
  873. .customDirectEventTypes;
  874. if (eventPluginOrder)
  875. throw Error(
  876. "EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."
  877. );
  878. eventPluginOrder = Array.prototype.slice.call([
  879. "ResponderEventPlugin",
  880. "ReactNativeBridgeEventPlugin"
  881. ]);
  882. recomputePluginOrdering();
  883. var injectedNamesToPlugins$jscomp$inline_94 = {
  884. ResponderEventPlugin: ResponderEventPlugin,
  885. ReactNativeBridgeEventPlugin: {
  886. eventTypes: {},
  887. extractEvents: function(
  888. topLevelType,
  889. targetInst,
  890. nativeEvent,
  891. nativeEventTarget
  892. ) {
  893. if (null == targetInst) return null;
  894. var bubbleDispatchConfig = customBubblingEventTypes[topLevelType],
  895. directDispatchConfig = customDirectEventTypes[topLevelType];
  896. if (!bubbleDispatchConfig && !directDispatchConfig)
  897. throw Error(
  898. 'Unsupported top level event type "' + topLevelType + '" dispatched'
  899. );
  900. topLevelType = SyntheticEvent.getPooled(
  901. bubbleDispatchConfig || directDispatchConfig,
  902. targetInst,
  903. nativeEvent,
  904. nativeEventTarget
  905. );
  906. if (bubbleDispatchConfig)
  907. forEachAccumulated(topLevelType, accumulateTwoPhaseDispatchesSingle);
  908. else if (directDispatchConfig)
  909. forEachAccumulated(topLevelType, accumulateDirectDispatchesSingle);
  910. else return null;
  911. return topLevelType;
  912. }
  913. }
  914. },
  915. isOrderingDirty$jscomp$inline_95 = !1,
  916. pluginName$jscomp$inline_96;
  917. for (pluginName$jscomp$inline_96 in injectedNamesToPlugins$jscomp$inline_94)
  918. if (
  919. injectedNamesToPlugins$jscomp$inline_94.hasOwnProperty(
  920. pluginName$jscomp$inline_96
  921. )
  922. ) {
  923. var pluginModule$jscomp$inline_97 =
  924. injectedNamesToPlugins$jscomp$inline_94[pluginName$jscomp$inline_96];
  925. if (
  926. !namesToPlugins.hasOwnProperty(pluginName$jscomp$inline_96) ||
  927. namesToPlugins[pluginName$jscomp$inline_96] !==
  928. pluginModule$jscomp$inline_97
  929. ) {
  930. if (namesToPlugins[pluginName$jscomp$inline_96])
  931. throw Error(
  932. "EventPluginRegistry: Cannot inject two different event plugins using the same name, `" +
  933. pluginName$jscomp$inline_96 +
  934. "`."
  935. );
  936. namesToPlugins[
  937. pluginName$jscomp$inline_96
  938. ] = pluginModule$jscomp$inline_97;
  939. isOrderingDirty$jscomp$inline_95 = !0;
  940. }
  941. }
  942. isOrderingDirty$jscomp$inline_95 && recomputePluginOrdering();
  943. var instanceCache = new Map(),
  944. instanceProps = new Map();
  945. function getInstanceFromTag(tag) {
  946. return instanceCache.get(tag) || null;
  947. }
  948. function batchedUpdatesImpl(fn, bookkeeping) {
  949. return fn(bookkeeping);
  950. }
  951. var isInsideEventHandler = !1;
  952. function batchedUpdates(fn, bookkeeping) {
  953. if (isInsideEventHandler) return fn(bookkeeping);
  954. isInsideEventHandler = !0;
  955. try {
  956. return batchedUpdatesImpl(fn, bookkeeping);
  957. } finally {
  958. isInsideEventHandler = !1;
  959. }
  960. }
  961. var eventQueue = null;
  962. function executeDispatchesAndReleaseTopLevel(e) {
  963. if (e) {
  964. var dispatchListeners = e._dispatchListeners,
  965. dispatchInstances = e._dispatchInstances;
  966. if (Array.isArray(dispatchListeners))
  967. for (
  968. var i = 0;
  969. i < dispatchListeners.length && !e.isPropagationStopped();
  970. i++
  971. )
  972. executeDispatch(e, dispatchListeners[i], dispatchInstances[i]);
  973. else
  974. dispatchListeners &&
  975. executeDispatch(e, dispatchListeners, dispatchInstances);
  976. e._dispatchListeners = null;
  977. e._dispatchInstances = null;
  978. e.isPersistent() || e.constructor.release(e);
  979. }
  980. }
  981. var EMPTY_NATIVE_EVENT = {};
  982. function _receiveRootNodeIDEvent(rootNodeID, topLevelType, nativeEventParam) {
  983. var nativeEvent = nativeEventParam || EMPTY_NATIVE_EVENT,
  984. inst = getInstanceFromTag(rootNodeID),
  985. target = null;
  986. null != inst && (target = inst.stateNode);
  987. batchedUpdates(function() {
  988. var events = target;
  989. for (var events$jscomp$0 = null, i = 0; i < plugins.length; i++) {
  990. var possiblePlugin = plugins[i];
  991. possiblePlugin &&
  992. (possiblePlugin = possiblePlugin.extractEvents(
  993. topLevelType,
  994. inst,
  995. nativeEvent,
  996. events,
  997. 1
  998. )) &&
  999. (events$jscomp$0 = accumulateInto(events$jscomp$0, possiblePlugin));
  1000. }
  1001. events = events$jscomp$0;
  1002. null !== events && (eventQueue = accumulateInto(eventQueue, events));
  1003. events = eventQueue;
  1004. eventQueue = null;
  1005. if (events) {
  1006. forEachAccumulated(events, executeDispatchesAndReleaseTopLevel);
  1007. if (eventQueue)
  1008. throw Error(
  1009. "processEventQueue(): Additional events were enqueued while processing an event queue. Support for this has not yet been implemented."
  1010. );
  1011. if (hasRethrowError)
  1012. throw ((events = rethrowError),
  1013. (hasRethrowError = !1),
  1014. (rethrowError = null),
  1015. events);
  1016. }
  1017. });
  1018. }
  1019. ReactNativePrivateInterface.RCTEventEmitter.register({
  1020. receiveEvent: function(rootNodeID, topLevelType, nativeEventParam) {
  1021. _receiveRootNodeIDEvent(rootNodeID, topLevelType, nativeEventParam);
  1022. },
  1023. receiveTouches: function(eventTopLevelType, touches, changedIndices) {
  1024. if (
  1025. "topTouchEnd" === eventTopLevelType ||
  1026. "topTouchCancel" === eventTopLevelType
  1027. ) {
  1028. var JSCompiler_temp = [];
  1029. for (var i = 0; i < changedIndices.length; i++) {
  1030. var index = changedIndices[i];
  1031. JSCompiler_temp.push(touches[index]);
  1032. touches[index] = null;
  1033. }
  1034. for (i = changedIndices = 0; i < touches.length; i++)
  1035. (index = touches[i]),
  1036. null !== index && (touches[changedIndices++] = index);
  1037. touches.length = changedIndices;
  1038. } else
  1039. for (JSCompiler_temp = [], i = 0; i < changedIndices.length; i++)
  1040. JSCompiler_temp.push(touches[changedIndices[i]]);
  1041. for (
  1042. changedIndices = 0;
  1043. changedIndices < JSCompiler_temp.length;
  1044. changedIndices++
  1045. ) {
  1046. i = JSCompiler_temp[changedIndices];
  1047. i.changedTouches = JSCompiler_temp;
  1048. i.touches = touches;
  1049. index = null;
  1050. var target = i.target;
  1051. null === target || void 0 === target || 1 > target || (index = target);
  1052. _receiveRootNodeIDEvent(index, eventTopLevelType, i);
  1053. }
  1054. }
  1055. });
  1056. getFiberCurrentPropsFromNode = function(stateNode) {
  1057. return instanceProps.get(stateNode._nativeTag) || null;
  1058. };
  1059. getInstanceFromNode = getInstanceFromTag;
  1060. getNodeFromInstance = function(inst) {
  1061. inst = inst.stateNode;
  1062. var tag = inst._nativeTag;
  1063. void 0 === tag && ((inst = inst.canonical), (tag = inst._nativeTag));
  1064. if (!tag) throw Error("All native instances should have a tag.");
  1065. return inst;
  1066. };
  1067. ResponderEventPlugin.injection.injectGlobalResponderHandler({
  1068. onChange: function(from, to, blockNativeResponder) {
  1069. null !== to
  1070. ? ReactNativePrivateInterface.UIManager.setJSResponder(
  1071. to.stateNode._nativeTag,
  1072. blockNativeResponder
  1073. )
  1074. : ReactNativePrivateInterface.UIManager.clearJSResponder();
  1075. }
  1076. });
  1077. var ReactSharedInternals =
  1078. React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
  1079. ReactSharedInternals.hasOwnProperty("ReactCurrentDispatcher") ||
  1080. (ReactSharedInternals.ReactCurrentDispatcher = { current: null });
  1081. ReactSharedInternals.hasOwnProperty("ReactCurrentBatchConfig") ||
  1082. (ReactSharedInternals.ReactCurrentBatchConfig = { suspense: null });
  1083. var hasSymbol = "function" === typeof Symbol && Symbol.for,
  1084. REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103,
  1085. REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106,
  1086. REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107,
  1087. REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108,
  1088. REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114,
  1089. REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109,
  1090. REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110,
  1091. REACT_CONCURRENT_MODE_TYPE = hasSymbol
  1092. ? Symbol.for("react.concurrent_mode")
  1093. : 60111,
  1094. REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112,
  1095. REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113,
  1096. REACT_SUSPENSE_LIST_TYPE = hasSymbol
  1097. ? Symbol.for("react.suspense_list")
  1098. : 60120,
  1099. REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115,
  1100. REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116,
  1101. REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121,
  1102. MAYBE_ITERATOR_SYMBOL = "function" === typeof Symbol && Symbol.iterator;
  1103. function getIteratorFn(maybeIterable) {
  1104. if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
  1105. maybeIterable =
  1106. (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
  1107. maybeIterable["@@iterator"];
  1108. return "function" === typeof maybeIterable ? maybeIterable : null;
  1109. }
  1110. function initializeLazyComponentType(lazyComponent) {
  1111. if (-1 === lazyComponent._status) {
  1112. var ctor = lazyComponent._result;
  1113. ctor || (ctor = lazyComponent._ctor);
  1114. ctor = ctor();
  1115. lazyComponent._status = 0;
  1116. lazyComponent._result = ctor;
  1117. ctor.then(
  1118. function(moduleObject) {
  1119. 0 === lazyComponent._status &&
  1120. ((moduleObject = moduleObject.default),
  1121. (lazyComponent._status = 1),
  1122. (lazyComponent._result = moduleObject));
  1123. },
  1124. function(error) {
  1125. 0 === lazyComponent._status &&
  1126. ((lazyComponent._status = 2), (lazyComponent._result = error));
  1127. }
  1128. );
  1129. }
  1130. }
  1131. function getComponentName(type) {
  1132. if (null == type) return null;
  1133. if ("function" === typeof type) return type.displayName || type.name || null;
  1134. if ("string" === typeof type) return type;
  1135. switch (type) {
  1136. case REACT_FRAGMENT_TYPE:
  1137. return "Fragment";
  1138. case REACT_PORTAL_TYPE:
  1139. return "Portal";
  1140. case REACT_PROFILER_TYPE:
  1141. return "Profiler";
  1142. case REACT_STRICT_MODE_TYPE:
  1143. return "StrictMode";
  1144. case REACT_SUSPENSE_TYPE:
  1145. return "Suspense";
  1146. case REACT_SUSPENSE_LIST_TYPE:
  1147. return "SuspenseList";
  1148. }
  1149. if ("object" === typeof type)
  1150. switch (type.$$typeof) {
  1151. case REACT_CONTEXT_TYPE:
  1152. return (type.displayName || "Context") + ".Consumer";
  1153. case REACT_PROVIDER_TYPE:
  1154. return (type._context.displayName || "Context") + ".Provider";
  1155. case REACT_FORWARD_REF_TYPE:
  1156. var innerType = type.render;
  1157. innerType = innerType.displayName || innerType.name || "";
  1158. return (
  1159. type.displayName ||
  1160. ("" !== innerType ? "ForwardRef(" + innerType + ")" : "ForwardRef")
  1161. );
  1162. case REACT_MEMO_TYPE:
  1163. return getComponentName(type.type);
  1164. case REACT_BLOCK_TYPE:
  1165. return getComponentName(type.render);
  1166. case REACT_LAZY_TYPE:
  1167. if ((type = 1 === type._status ? type._result : null))
  1168. return getComponentName(type);
  1169. }
  1170. return null;
  1171. }
  1172. function getNearestMountedFiber(fiber) {
  1173. var node = fiber,
  1174. nearestMounted = fiber;
  1175. if (fiber.alternate) for (; node.return; ) node = node.return;
  1176. else {
  1177. fiber = node;
  1178. do
  1179. (node = fiber),
  1180. 0 !== (node.effectTag & 1026) && (nearestMounted = node.return),
  1181. (fiber = node.return);
  1182. while (fiber);
  1183. }
  1184. return 3 === node.tag ? nearestMounted : null;
  1185. }
  1186. function assertIsMounted(fiber) {
  1187. if (getNearestMountedFiber(fiber) !== fiber)
  1188. throw Error("Unable to find node on an unmounted component.");
  1189. }
  1190. function findCurrentFiberUsingSlowPath(fiber) {
  1191. var alternate = fiber.alternate;
  1192. if (!alternate) {
  1193. alternate = getNearestMountedFiber(fiber);
  1194. if (null === alternate)
  1195. throw Error("Unable to find node on an unmounted component.");
  1196. return alternate !== fiber ? null : fiber;
  1197. }
  1198. for (var a = fiber, b = alternate; ; ) {
  1199. var parentA = a.return;
  1200. if (null === parentA) break;
  1201. var parentB = parentA.alternate;
  1202. if (null === parentB) {
  1203. b = parentA.return;
  1204. if (null !== b) {
  1205. a = b;
  1206. continue;
  1207. }
  1208. break;
  1209. }
  1210. if (parentA.child === parentB.child) {
  1211. for (parentB = parentA.child; parentB; ) {
  1212. if (parentB === a) return assertIsMounted(parentA), fiber;
  1213. if (parentB === b) return assertIsMounted(parentA), alternate;
  1214. parentB = parentB.sibling;
  1215. }
  1216. throw Error("Unable to find node on an unmounted component.");
  1217. }
  1218. if (a.return !== b.return) (a = parentA), (b = parentB);
  1219. else {
  1220. for (var didFindChild = !1, _child = parentA.child; _child; ) {
  1221. if (_child === a) {
  1222. didFindChild = !0;
  1223. a = parentA;
  1224. b = parentB;
  1225. break;
  1226. }
  1227. if (_child === b) {
  1228. didFindChild = !0;
  1229. b = parentA;
  1230. a = parentB;
  1231. break;
  1232. }
  1233. _child = _child.sibling;
  1234. }
  1235. if (!didFindChild) {
  1236. for (_child = parentB.child; _child; ) {
  1237. if (_child === a) {
  1238. didFindChild = !0;
  1239. a = parentB;
  1240. b = parentA;
  1241. break;
  1242. }
  1243. if (_child === b) {
  1244. didFindChild = !0;
  1245. b = parentB;
  1246. a = parentA;
  1247. break;
  1248. }
  1249. _child = _child.sibling;
  1250. }
  1251. if (!didFindChild)
  1252. throw Error(
  1253. "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue."
  1254. );
  1255. }
  1256. }
  1257. if (a.alternate !== b)
  1258. throw Error(
  1259. "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue."
  1260. );
  1261. }
  1262. if (3 !== a.tag)
  1263. throw Error("Unable to find node on an unmounted component.");
  1264. return a.stateNode.current === a ? fiber : alternate;
  1265. }
  1266. function findCurrentHostFiber(parent) {
  1267. parent = findCurrentFiberUsingSlowPath(parent);
  1268. if (!parent) return null;
  1269. for (var node = parent; ; ) {
  1270. if (5 === node.tag || 6 === node.tag) return node;
  1271. if (node.child) (node.child.return = node), (node = node.child);
  1272. else {
  1273. if (node === parent) break;
  1274. for (; !node.sibling; ) {
  1275. if (!node.return || node.return === parent) return null;
  1276. node = node.return;
  1277. }
  1278. node.sibling.return = node.return;
  1279. node = node.sibling;
  1280. }
  1281. }
  1282. return null;
  1283. }
  1284. var emptyObject = {},
  1285. removedKeys = null,
  1286. removedKeyCount = 0,
  1287. deepDifferOptions = { unsafelyIgnoreFunctions: !0 };
  1288. function defaultDiffer(prevProp, nextProp) {
  1289. return "object" !== typeof nextProp || null === nextProp
  1290. ? !0
  1291. : ReactNativePrivateInterface.deepDiffer(
  1292. prevProp,
  1293. nextProp,
  1294. deepDifferOptions
  1295. );
  1296. }
  1297. function restoreDeletedValuesInNestedArray(
  1298. updatePayload,
  1299. node,
  1300. validAttributes
  1301. ) {
  1302. if (Array.isArray(node))
  1303. for (var i = node.length; i-- && 0 < removedKeyCount; )
  1304. restoreDeletedValuesInNestedArray(
  1305. updatePayload,
  1306. node[i],
  1307. validAttributes
  1308. );
  1309. else if (node && 0 < removedKeyCount)
  1310. for (i in removedKeys)
  1311. if (removedKeys[i]) {
  1312. var nextProp = node[i];
  1313. if (void 0 !== nextProp) {
  1314. var attributeConfig = validAttributes[i];
  1315. if (attributeConfig) {
  1316. "function" === typeof nextProp && (nextProp = !0);
  1317. "undefined" === typeof nextProp && (nextProp = null);
  1318. if ("object" !== typeof attributeConfig)
  1319. updatePayload[i] = nextProp;
  1320. else if (
  1321. "function" === typeof attributeConfig.diff ||
  1322. "function" === typeof attributeConfig.process
  1323. )
  1324. (nextProp =
  1325. "function" === typeof attributeConfig.process
  1326. ? attributeConfig.process(nextProp)
  1327. : nextProp),
  1328. (updatePayload[i] = nextProp);
  1329. removedKeys[i] = !1;
  1330. removedKeyCount--;
  1331. }
  1332. }
  1333. }
  1334. }
  1335. function diffNestedProperty(
  1336. updatePayload,
  1337. prevProp,
  1338. nextProp,
  1339. validAttributes
  1340. ) {
  1341. if (!updatePayload && prevProp === nextProp) return updatePayload;
  1342. if (!prevProp || !nextProp)
  1343. return nextProp
  1344. ? addNestedProperty(updatePayload, nextProp, validAttributes)
  1345. : prevProp
  1346. ? clearNestedProperty(updatePayload, prevProp, validAttributes)
  1347. : updatePayload;
  1348. if (!Array.isArray(prevProp) && !Array.isArray(nextProp))
  1349. return diffProperties(updatePayload, prevProp, nextProp, validAttributes);
  1350. if (Array.isArray(prevProp) && Array.isArray(nextProp)) {
  1351. var minLength =
  1352. prevProp.length < nextProp.length ? prevProp.length : nextProp.length,
  1353. i;
  1354. for (i = 0; i < minLength; i++)
  1355. updatePayload = diffNestedProperty(
  1356. updatePayload,
  1357. prevProp[i],
  1358. nextProp[i],
  1359. validAttributes
  1360. );
  1361. for (; i < prevProp.length; i++)
  1362. updatePayload = clearNestedProperty(
  1363. updatePayload,
  1364. prevProp[i],
  1365. validAttributes
  1366. );
  1367. for (; i < nextProp.length; i++)
  1368. updatePayload = addNestedProperty(
  1369. updatePayload,
  1370. nextProp[i],
  1371. validAttributes
  1372. );
  1373. return updatePayload;
  1374. }
  1375. return Array.isArray(prevProp)
  1376. ? diffProperties(
  1377. updatePayload,
  1378. ReactNativePrivateInterface.flattenStyle(prevProp),
  1379. nextProp,
  1380. validAttributes
  1381. )
  1382. : diffProperties(
  1383. updatePayload,
  1384. prevProp,
  1385. ReactNativePrivateInterface.flattenStyle(nextProp),
  1386. validAttributes
  1387. );
  1388. }
  1389. function addNestedProperty(updatePayload, nextProp, validAttributes) {
  1390. if (!nextProp) return updatePayload;
  1391. if (!Array.isArray(nextProp))
  1392. return diffProperties(
  1393. updatePayload,
  1394. emptyObject,
  1395. nextProp,
  1396. validAttributes
  1397. );
  1398. for (var i = 0; i < nextProp.length; i++)
  1399. updatePayload = addNestedProperty(
  1400. updatePayload,
  1401. nextProp[i],
  1402. validAttributes
  1403. );
  1404. return updatePayload;
  1405. }
  1406. function clearNestedProperty(updatePayload, prevProp, validAttributes) {
  1407. if (!prevProp) return updatePayload;
  1408. if (!Array.isArray(prevProp))
  1409. return diffProperties(
  1410. updatePayload,
  1411. prevProp,
  1412. emptyObject,
  1413. validAttributes
  1414. );
  1415. for (var i = 0; i < prevProp.length; i++)
  1416. updatePayload = clearNestedProperty(
  1417. updatePayload,
  1418. prevProp[i],
  1419. validAttributes
  1420. );
  1421. return updatePayload;
  1422. }
  1423. function diffProperties(updatePayload, prevProps, nextProps, validAttributes) {
  1424. var attributeConfig, propKey;
  1425. for (propKey in nextProps)
  1426. if ((attributeConfig = validAttributes[propKey])) {
  1427. var prevProp = prevProps[propKey];
  1428. var nextProp = nextProps[propKey];
  1429. "function" === typeof nextProp &&
  1430. ((nextProp = !0), "function" === typeof prevProp && (prevProp = !0));
  1431. "undefined" === typeof nextProp &&
  1432. ((nextProp = null),
  1433. "undefined" === typeof prevProp && (prevProp = null));
  1434. removedKeys && (removedKeys[propKey] = !1);
  1435. if (updatePayload && void 0 !== updatePayload[propKey])
  1436. if ("object" !== typeof attributeConfig)
  1437. updatePayload[propKey] = nextProp;
  1438. else {
  1439. if (
  1440. "function" === typeof attributeConfig.diff ||
  1441. "function" === typeof attributeConfig.process
  1442. )
  1443. (attributeConfig =
  1444. "function" === typeof attributeConfig.process
  1445. ? attributeConfig.process(nextProp)
  1446. : nextProp),
  1447. (updatePayload[propKey] = attributeConfig);
  1448. }
  1449. else if (prevProp !== nextProp)
  1450. if ("object" !== typeof attributeConfig)
  1451. defaultDiffer(prevProp, nextProp) &&
  1452. ((updatePayload || (updatePayload = {}))[propKey] = nextProp);
  1453. else if (
  1454. "function" === typeof attributeConfig.diff ||
  1455. "function" === typeof attributeConfig.process
  1456. ) {
  1457. if (
  1458. void 0 === prevProp ||
  1459. ("function" === typeof attributeConfig.diff
  1460. ? attributeConfig.diff(prevProp, nextProp)
  1461. : defaultDiffer(prevProp, nextProp))
  1462. )
  1463. (attributeConfig =
  1464. "function" === typeof attributeConfig.process
  1465. ? attributeConfig.process(nextProp)
  1466. : nextProp),
  1467. ((updatePayload || (updatePayload = {}))[
  1468. propKey
  1469. ] = attributeConfig);
  1470. } else
  1471. (removedKeys = null),
  1472. (removedKeyCount = 0),
  1473. (updatePayload = diffNestedProperty(
  1474. updatePayload,
  1475. prevProp,
  1476. nextProp,
  1477. attributeConfig
  1478. )),
  1479. 0 < removedKeyCount &&
  1480. updatePayload &&
  1481. (restoreDeletedValuesInNestedArray(
  1482. updatePayload,
  1483. nextProp,
  1484. attributeConfig
  1485. ),
  1486. (removedKeys = null));
  1487. }
  1488. for (var _propKey in prevProps)
  1489. void 0 === nextProps[_propKey] &&
  1490. (!(attributeConfig = validAttributes[_propKey]) ||
  1491. (updatePayload && void 0 !== updatePayload[_propKey]) ||
  1492. ((prevProp = prevProps[_propKey]),
  1493. void 0 !== prevProp &&
  1494. ("object" !== typeof attributeConfig ||
  1495. "function" === typeof attributeConfig.diff ||
  1496. "function" === typeof attributeConfig.process
  1497. ? (((updatePayload || (updatePayload = {}))[_propKey] = null),
  1498. removedKeys || (removedKeys = {}),
  1499. removedKeys[_propKey] ||
  1500. ((removedKeys[_propKey] = !0), removedKeyCount++))
  1501. : (updatePayload = clearNestedProperty(
  1502. updatePayload,
  1503. prevProp,
  1504. attributeConfig
  1505. )))));
  1506. return updatePayload;
  1507. }
  1508. function mountSafeCallback_NOT_REALLY_SAFE(context, callback) {
  1509. return function() {
  1510. if (
  1511. callback &&
  1512. ("boolean" !== typeof context.__isMounted || context.__isMounted)
  1513. )
  1514. return callback.apply(context, arguments);
  1515. };
  1516. }
  1517. var ReactNativeFiberHostComponent = (function() {
  1518. function ReactNativeFiberHostComponent(tag, viewConfig) {
  1519. this._nativeTag = tag;
  1520. this._children = [];
  1521. this.viewConfig = viewConfig;
  1522. }
  1523. var _proto = ReactNativeFiberHostComponent.prototype;
  1524. _proto.blur = function() {
  1525. ReactNativePrivateInterface.TextInputState.blurTextInput(this);
  1526. };
  1527. _proto.focus = function() {
  1528. ReactNativePrivateInterface.TextInputState.focusTextInput(this);
  1529. };
  1530. _proto.measure = function(callback) {
  1531. ReactNativePrivateInterface.UIManager.measure(
  1532. this._nativeTag,
  1533. mountSafeCallback_NOT_REALLY_SAFE(this, callback)
  1534. );
  1535. };
  1536. _proto.measureInWindow = function(callback) {
  1537. ReactNativePrivateInterface.UIManager.measureInWindow(
  1538. this._nativeTag,
  1539. mountSafeCallback_NOT_REALLY_SAFE(this, callback)
  1540. );
  1541. };
  1542. _proto.measureLayout = function(relativeToNativeNode, onSuccess, onFail) {
  1543. if ("number" === typeof relativeToNativeNode)
  1544. var relativeNode = relativeToNativeNode;
  1545. else
  1546. relativeToNativeNode._nativeTag &&
  1547. (relativeNode = relativeToNativeNode._nativeTag);
  1548. null != relativeNode &&
  1549. ReactNativePrivateInterface.UIManager.measureLayout(
  1550. this._nativeTag,
  1551. relativeNode,
  1552. mountSafeCallback_NOT_REALLY_SAFE(this, onFail),
  1553. mountSafeCallback_NOT_REALLY_SAFE(this, onSuccess)
  1554. );
  1555. };
  1556. _proto.setNativeProps = function(nativeProps) {
  1557. nativeProps = diffProperties(
  1558. null,
  1559. emptyObject,
  1560. nativeProps,
  1561. this.viewConfig.validAttributes
  1562. );
  1563. null != nativeProps &&
  1564. ReactNativePrivateInterface.UIManager.updateView(
  1565. this._nativeTag,
  1566. this.viewConfig.uiViewClassName,
  1567. nativeProps
  1568. );
  1569. };
  1570. return ReactNativeFiberHostComponent;
  1571. })();
  1572. function shim() {
  1573. throw Error(
  1574. "The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue."
  1575. );
  1576. }
  1577. var getViewConfigForType =
  1578. ReactNativePrivateInterface.ReactNativeViewConfigRegistry.get,
  1579. UPDATE_SIGNAL = {},
  1580. nextReactTag = 3;
  1581. function allocateTag() {
  1582. var tag = nextReactTag;
  1583. 1 === tag % 10 && (tag += 2);
  1584. nextReactTag = tag + 2;
  1585. return tag;
  1586. }
  1587. function recursivelyUncacheFiberNode(node) {
  1588. if ("number" === typeof node)
  1589. instanceCache.delete(node), instanceProps.delete(node);
  1590. else {
  1591. var tag = node._nativeTag;
  1592. instanceCache.delete(tag);
  1593. instanceProps.delete(tag);
  1594. node._children.forEach(recursivelyUncacheFiberNode);
  1595. }
  1596. }
  1597. function finalizeInitialChildren(parentInstance) {
  1598. if (0 === parentInstance._children.length) return !1;
  1599. var nativeTags = parentInstance._children.map(function(child) {
  1600. return "number" === typeof child ? child : child._nativeTag;
  1601. });
  1602. ReactNativePrivateInterface.UIManager.setChildren(
  1603. parentInstance._nativeTag,
  1604. nativeTags
  1605. );
  1606. return !1;
  1607. }
  1608. var scheduleTimeout = setTimeout,
  1609. cancelTimeout = clearTimeout,
  1610. valueStack = [],
  1611. index = -1;
  1612. function pop(cursor) {
  1613. 0 > index ||
  1614. ((cursor.current = valueStack[index]), (valueStack[index] = null), index--);
  1615. }
  1616. function push(cursor, value) {
  1617. index++;
  1618. valueStack[index] = cursor.current;
  1619. cursor.current = value;
  1620. }
  1621. var emptyContextObject = {},
  1622. contextStackCursor = { current: emptyContextObject },
  1623. didPerformWorkStackCursor = { current: !1 },
  1624. previousContext = emptyContextObject;
  1625. function getMaskedContext(workInProgress, unmaskedContext) {
  1626. var contextTypes = workInProgress.type.contextTypes;
  1627. if (!contextTypes) return emptyContextObject;
  1628. var instance = workInProgress.stateNode;
  1629. if (
  1630. instance &&
  1631. instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext
  1632. )
  1633. return instance.__reactInternalMemoizedMaskedChildContext;
  1634. var context = {},
  1635. key;
  1636. for (key in contextTypes) context[key] = unmaskedContext[key];
  1637. instance &&
  1638. ((workInProgress = workInProgress.stateNode),
  1639. (workInProgress.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext),
  1640. (workInProgress.__reactInternalMemoizedMaskedChildContext = context));
  1641. return context;
  1642. }
  1643. function isContextProvider(type) {
  1644. type = type.childContextTypes;
  1645. return null !== type && void 0 !== type;
  1646. }
  1647. function popContext() {
  1648. pop(didPerformWorkStackCursor);
  1649. pop(contextStackCursor);
  1650. }
  1651. function pushTopLevelContextObject(fiber, context, didChange) {
  1652. if (contextStackCursor.current !== emptyContextObject)
  1653. throw Error(
  1654. "Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue."
  1655. );
  1656. push(contextStackCursor, context);
  1657. push(didPerformWorkStackCursor, didChange);
  1658. }
  1659. function processChildContext(fiber, type, parentContext) {
  1660. var instance = fiber.stateNode;
  1661. fiber = type.childContextTypes;
  1662. if ("function" !== typeof instance.getChildContext) return parentContext;
  1663. instance = instance.getChildContext();
  1664. for (var contextKey in instance)
  1665. if (!(contextKey in fiber))
  1666. throw Error(
  1667. (getComponentName(type) || "Unknown") +
  1668. '.getChildContext(): key "' +
  1669. contextKey +
  1670. '" is not defined in childContextTypes.'
  1671. );
  1672. return Object.assign({}, parentContext, {}, instance);
  1673. }
  1674. function pushContextProvider(workInProgress) {
  1675. workInProgress =
  1676. ((workInProgress = workInProgress.stateNode) &&
  1677. workInProgress.__reactInternalMemoizedMergedChildContext) ||
  1678. emptyContextObject;
  1679. previousContext = contextStackCursor.current;
  1680. push(contextStackCursor, workInProgress);
  1681. push(didPerformWorkStackCursor, didPerformWorkStackCursor.current);
  1682. return !0;
  1683. }
  1684. function invalidateContextProvider(workInProgress, type, didChange) {
  1685. var instance = workInProgress.stateNode;
  1686. if (!instance)
  1687. throw Error(
  1688. "Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue."
  1689. );
  1690. didChange
  1691. ? ((workInProgress = processChildContext(
  1692. workInProgress,
  1693. type,
  1694. previousContext
  1695. )),
  1696. (instance.__reactInternalMemoizedMergedChildContext = workInProgress),
  1697. pop(didPerformWorkStackCursor),
  1698. pop(contextStackCursor),
  1699. push(contextStackCursor, workInProgress))
  1700. : pop(didPerformWorkStackCursor);
  1701. push(didPerformWorkStackCursor, didChange);
  1702. }
  1703. var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority,
  1704. Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback,
  1705. Scheduler_cancelCallback = Scheduler.unstable_cancelCallback,
  1706. Scheduler_shouldYield = Scheduler.unstable_shouldYield,
  1707. Scheduler_requestPaint = Scheduler.unstable_requestPaint,
  1708. Scheduler_now = Scheduler.unstable_now,
  1709. Scheduler_getCurrentPriorityLevel =
  1710. Scheduler.unstable_getCurrentPriorityLevel,
  1711. Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority,
  1712. Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
  1713. Scheduler_NormalPriority = Scheduler.unstable_NormalPriority,
  1714. Scheduler_LowPriority = Scheduler.unstable_LowPriority,
  1715. Scheduler_IdlePriority = Scheduler.unstable_IdlePriority;
  1716. if (
  1717. null == tracing.__interactionsRef ||
  1718. null == tracing.__interactionsRef.current
  1719. )
  1720. throw Error(
  1721. "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at http://fb.me/react-profiling"
  1722. );
  1723. var fakeCallbackNode = {},
  1724. requestPaint =
  1725. void 0 !== Scheduler_requestPaint ? Scheduler_requestPaint : function() {},
  1726. syncQueue = null,
  1727. immediateQueueCallbackNode = null,
  1728. isFlushingSyncQueue = !1,
  1729. initialTimeMs = Scheduler_now(),
  1730. now =
  1731. 1e4 > initialTimeMs
  1732. ? Scheduler_now
  1733. : function() {
  1734. return Scheduler_now() - initialTimeMs;
  1735. };
  1736. function getCurrentPriorityLevel() {
  1737. switch (Scheduler_getCurrentPriorityLevel()) {
  1738. case Scheduler_ImmediatePriority:
  1739. return 99;
  1740. case Scheduler_UserBlockingPriority:
  1741. return 98;
  1742. case Scheduler_NormalPriority:
  1743. return 97;
  1744. case Scheduler_LowPriority:
  1745. return 96;
  1746. case Scheduler_IdlePriority:
  1747. return 95;
  1748. default:
  1749. throw Error("Unknown priority level.");
  1750. }
  1751. }
  1752. function reactPriorityToSchedulerPriority(reactPriorityLevel) {
  1753. switch (reactPriorityLevel) {
  1754. case 99:
  1755. return Scheduler_ImmediatePriority;
  1756. case 98:
  1757. return Scheduler_UserBlockingPriority;
  1758. case 97:
  1759. return Scheduler_NormalPriority;
  1760. case 96:
  1761. return Scheduler_LowPriority;
  1762. case 95:
  1763. return Scheduler_IdlePriority;
  1764. default:
  1765. throw Error("Unknown priority level.");
  1766. }
  1767. }
  1768. function runWithPriority(reactPriorityLevel, fn) {
  1769. reactPriorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
  1770. return Scheduler_runWithPriority(reactPriorityLevel, fn);
  1771. }
  1772. function scheduleCallback(reactPriorityLevel, callback, options) {
  1773. reactPriorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
  1774. return Scheduler_scheduleCallback(reactPriorityLevel, callback, options);
  1775. }
  1776. function scheduleSyncCallback(callback) {
  1777. null === syncQueue
  1778. ? ((syncQueue = [callback]),
  1779. (immediateQueueCallbackNode = Scheduler_scheduleCallback(
  1780. Scheduler_ImmediatePriority,
  1781. flushSyncCallbackQueueImpl
  1782. )))
  1783. : syncQueue.push(callback);
  1784. return fakeCallbackNode;
  1785. }
  1786. function flushSyncCallbackQueue() {
  1787. if (null !== immediateQueueCallbackNode) {
  1788. var node = immediateQueueCallbackNode;
  1789. immediateQueueCallbackNode = null;
  1790. Scheduler_cancelCallback(node);
  1791. }
  1792. flushSyncCallbackQueueImpl();
  1793. }
  1794. function flushSyncCallbackQueueImpl() {
  1795. if (!isFlushingSyncQueue && null !== syncQueue) {
  1796. isFlushingSyncQueue = !0;
  1797. var i = 0;
  1798. try {
  1799. var queue = syncQueue;
  1800. runWithPriority(99, function() {
  1801. for (; i < queue.length; i++) {
  1802. var callback = queue[i];
  1803. do callback = callback(!0);
  1804. while (null !== callback);
  1805. }
  1806. });
  1807. syncQueue = null;
  1808. } catch (error) {
  1809. throw (null !== syncQueue && (syncQueue = syncQueue.slice(i + 1)),
  1810. Scheduler_scheduleCallback(
  1811. Scheduler_ImmediatePriority,
  1812. flushSyncCallbackQueue
  1813. ),
  1814. error);
  1815. } finally {
  1816. isFlushingSyncQueue = !1;
  1817. }
  1818. }
  1819. }
  1820. function inferPriorityFromExpirationTime(currentTime, expirationTime) {
  1821. if (1073741823 === expirationTime) return 99;
  1822. if (1 === expirationTime || 2 === expirationTime) return 95;
  1823. currentTime =
  1824. 10 * (1073741821 - expirationTime) - 10 * (1073741821 - currentTime);
  1825. return 0 >= currentTime
  1826. ? 99
  1827. : 250 >= currentTime
  1828. ? 98
  1829. : 5250 >= currentTime
  1830. ? 97
  1831. : 95;
  1832. }
  1833. function is(x, y) {
  1834. return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);
  1835. }
  1836. var objectIs = "function" === typeof Object.is ? Object.is : is,
  1837. hasOwnProperty = Object.prototype.hasOwnProperty;
  1838. function shallowEqual(objA, objB) {
  1839. if (objectIs(objA, objB)) return !0;
  1840. if (
  1841. "object" !== typeof objA ||
  1842. null === objA ||
  1843. "object" !== typeof objB ||
  1844. null === objB
  1845. )
  1846. return !1;
  1847. var keysA = Object.keys(objA),
  1848. keysB = Object.keys(objB);
  1849. if (keysA.length !== keysB.length) return !1;
  1850. for (keysB = 0; keysB < keysA.length; keysB++)
  1851. if (
  1852. !hasOwnProperty.call(objB, keysA[keysB]) ||
  1853. !objectIs(objA[keysA[keysB]], objB[keysA[keysB]])
  1854. )
  1855. return !1;
  1856. return !0;
  1857. }
  1858. var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
  1859. function getStackByFiberInDevAndProd(workInProgress) {
  1860. var info = "";
  1861. do {
  1862. a: switch (workInProgress.tag) {
  1863. case 3:
  1864. case 4:
  1865. case 6:
  1866. case 7:
  1867. case 10:
  1868. case 9:
  1869. var JSCompiler_inline_result = "";
  1870. break a;
  1871. default:
  1872. var owner = workInProgress._debugOwner,
  1873. source = workInProgress._debugSource,
  1874. name = getComponentName(workInProgress.type);
  1875. JSCompiler_inline_result = null;
  1876. owner && (JSCompiler_inline_result = getComponentName(owner.type));
  1877. owner = name;
  1878. name = "";
  1879. source
  1880. ? (name =
  1881. " (at " +
  1882. source.fileName.replace(BEFORE_SLASH_RE, "") +
  1883. ":" +
  1884. source.lineNumber +
  1885. ")")
  1886. : JSCompiler_inline_result &&
  1887. (name = " (created by " + JSCompiler_inline_result + ")");
  1888. JSCompiler_inline_result = "\n in " + (owner || "Unknown") + name;
  1889. }
  1890. info += JSCompiler_inline_result;
  1891. workInProgress = workInProgress.return;
  1892. } while (workInProgress);
  1893. return info;
  1894. }
  1895. function resolveDefaultProps(Component, baseProps) {
  1896. if (Component && Component.defaultProps) {
  1897. baseProps = Object.assign({}, baseProps);
  1898. Component = Component.defaultProps;
  1899. for (var propName in Component)
  1900. void 0 === baseProps[propName] &&
  1901. (baseProps[propName] = Component[propName]);
  1902. }
  1903. return baseProps;
  1904. }
  1905. var valueCursor = { current: null },
  1906. currentlyRenderingFiber = null,
  1907. lastContextDependency = null,
  1908. lastContextWithAllBitsObserved = null;
  1909. function resetContextDependencies() {
  1910. lastContextWithAllBitsObserved = lastContextDependency = currentlyRenderingFiber = null;
  1911. }
  1912. function popProvider(providerFiber) {
  1913. var currentValue = valueCursor.current;
  1914. pop(valueCursor);
  1915. providerFiber.type._context._currentValue = currentValue;
  1916. }
  1917. function scheduleWorkOnParentPath(parent, renderExpirationTime) {
  1918. for (; null !== parent; ) {
  1919. var alternate = parent.alternate;
  1920. if (parent.childExpirationTime < renderExpirationTime)
  1921. (parent.childExpirationTime = renderExpirationTime),
  1922. null !== alternate &&
  1923. alternate.childExpirationTime < renderExpirationTime &&
  1924. (alternate.childExpirationTime = renderExpirationTime);
  1925. else if (
  1926. null !== alternate &&
  1927. alternate.childExpirationTime < renderExpirationTime
  1928. )
  1929. alternate.childExpirationTime = renderExpirationTime;
  1930. else break;
  1931. parent = parent.return;
  1932. }
  1933. }
  1934. function prepareToReadContext(workInProgress, renderExpirationTime) {
  1935. currentlyRenderingFiber = workInProgress;
  1936. lastContextWithAllBitsObserved = lastContextDependency = null;
  1937. workInProgress = workInProgress.dependencies;
  1938. null !== workInProgress &&
  1939. null !== workInProgress.firstContext &&
  1940. (workInProgress.expirationTime >= renderExpirationTime &&
  1941. (didReceiveUpdate = !0),
  1942. (workInProgress.firstContext = null));
  1943. }
  1944. function readContext(context, observedBits) {
  1945. if (
  1946. lastContextWithAllBitsObserved !== context &&
  1947. !1 !== observedBits &&
  1948. 0 !== observedBits
  1949. ) {
  1950. if ("number" !== typeof observedBits || 1073741823 === observedBits)
  1951. (lastContextWithAllBitsObserved = context), (observedBits = 1073741823);
  1952. observedBits = { context: context, observedBits: observedBits, next: null };
  1953. if (null === lastContextDependency) {
  1954. if (null === currentlyRenderingFiber)
  1955. throw Error(
  1956. "Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."
  1957. );
  1958. lastContextDependency = observedBits;
  1959. currentlyRenderingFiber.dependencies = {
  1960. expirationTime: 0,
  1961. firstContext: observedBits,
  1962. responders: null
  1963. };
  1964. } else lastContextDependency = lastContextDependency.next = observedBits;
  1965. }
  1966. return context._currentValue;
  1967. }
  1968. var hasForceUpdate = !1;
  1969. function initializeUpdateQueue(fiber) {
  1970. fiber.updateQueue = {
  1971. baseState: fiber.memoizedState,
  1972. baseQueue: null,
  1973. shared: { pending: null },
  1974. effects: null
  1975. };
  1976. }
  1977. function cloneUpdateQueue(current, workInProgress) {
  1978. current = current.updateQueue;
  1979. workInProgress.updateQueue === current &&
  1980. (workInProgress.updateQueue = {
  1981. baseState: current.baseState,
  1982. baseQueue: current.baseQueue,
  1983. shared: current.shared,
  1984. effects: current.effects
  1985. });
  1986. }
  1987. function createUpdate(expirationTime, suspenseConfig) {
  1988. expirationTime = {
  1989. expirationTime: expirationTime,
  1990. suspenseConfig: suspenseConfig,
  1991. tag: 0,
  1992. payload: null,
  1993. callback: null,
  1994. next: null
  1995. };
  1996. return (expirationTime.next = expirationTime);
  1997. }
  1998. function enqueueUpdate(fiber, update) {
  1999. fiber = fiber.updateQueue;
  2000. if (null !== fiber) {
  2001. fiber = fiber.shared;
  2002. var pending = fiber.pending;
  2003. null === pending
  2004. ? (update.next = update)
  2005. : ((update.next = pending.next), (pending.next = update));
  2006. fiber.pending = update;
  2007. }
  2008. }
  2009. function enqueueCapturedUpdate(workInProgress, update) {
  2010. var current = workInProgress.alternate;
  2011. null !== current && cloneUpdateQueue(current, workInProgress);
  2012. workInProgress = workInProgress.updateQueue;
  2013. current = workInProgress.baseQueue;
  2014. null === current
  2015. ? ((workInProgress.baseQueue = update.next = update),
  2016. (update.next = update))
  2017. : ((update.next = current.next), (current.next = update));
  2018. }
  2019. function processUpdateQueue(
  2020. workInProgress$jscomp$0,
  2021. props,
  2022. instance,
  2023. renderExpirationTime
  2024. ) {
  2025. var queue = workInProgress$jscomp$0.updateQueue;
  2026. hasForceUpdate = !1;
  2027. var baseQueue = queue.baseQueue,
  2028. pendingQueue = queue.shared.pending;
  2029. if (null !== pendingQueue) {
  2030. if (null !== baseQueue) {
  2031. var baseFirst = baseQueue.next;
  2032. baseQueue.next = pendingQueue.next;
  2033. pendingQueue.next = baseFirst;
  2034. }
  2035. baseQueue = pendingQueue;
  2036. queue.shared.pending = null;
  2037. baseFirst = workInProgress$jscomp$0.alternate;
  2038. null !== baseFirst &&
  2039. ((baseFirst = baseFirst.updateQueue),
  2040. null !== baseFirst && (baseFirst.baseQueue = pendingQueue));
  2041. }
  2042. if (null !== baseQueue) {
  2043. baseFirst = baseQueue.next;
  2044. var newState = queue.baseState,
  2045. newExpirationTime = 0,
  2046. newBaseState = null,
  2047. newBaseQueueFirst = null,
  2048. newBaseQueueLast = null;
  2049. if (null !== baseFirst) {
  2050. var update = baseFirst;
  2051. do {
  2052. pendingQueue = update.expirationTime;
  2053. if (pendingQueue < renderExpirationTime) {
  2054. var clone = {
  2055. expirationTime: update.expirationTime,
  2056. suspenseConfig: update.suspenseConfig,
  2057. tag: update.tag,
  2058. payload: update.payload,
  2059. callback: update.callback,
  2060. next: null
  2061. };
  2062. null === newBaseQueueLast
  2063. ? ((newBaseQueueFirst = newBaseQueueLast = clone),
  2064. (newBaseState = newState))
  2065. : (newBaseQueueLast = newBaseQueueLast.next = clone);
  2066. pendingQueue > newExpirationTime &&
  2067. (newExpirationTime = pendingQueue);
  2068. } else {
  2069. null !== newBaseQueueLast &&
  2070. (newBaseQueueLast = newBaseQueueLast.next = {
  2071. expirationTime: 1073741823,
  2072. suspenseConfig: update.suspenseConfig,
  2073. tag: update.tag,
  2074. payload: update.payload,
  2075. callback: update.callback,
  2076. next: null
  2077. });
  2078. markRenderEventTimeAndConfig(pendingQueue, update.suspenseConfig);
  2079. a: {
  2080. var workInProgress = workInProgress$jscomp$0,
  2081. update$jscomp$0 = update;
  2082. pendingQueue = props;
  2083. clone = instance;
  2084. switch (update$jscomp$0.tag) {
  2085. case 1:
  2086. workInProgress = update$jscomp$0.payload;
  2087. if ("function" === typeof workInProgress) {
  2088. newState = workInProgress.call(clone, newState, pendingQueue);
  2089. break a;
  2090. }
  2091. newState = workInProgress;
  2092. break a;
  2093. case 3:
  2094. workInProgress.effectTag =
  2095. (workInProgress.effectTag & -4097) | 64;
  2096. case 0:
  2097. workInProgress = update$jscomp$0.payload;
  2098. pendingQueue =
  2099. "function" === typeof workInProgress
  2100. ? workInProgress.call(clone, newState, pendingQueue)
  2101. : workInProgress;
  2102. if (null === pendingQueue || void 0 === pendingQueue) break a;
  2103. newState = Object.assign({}, newState, pendingQueue);
  2104. break a;
  2105. case 2:
  2106. hasForceUpdate = !0;
  2107. }
  2108. }
  2109. null !== update.callback &&
  2110. ((workInProgress$jscomp$0.effectTag |= 32),
  2111. (pendingQueue = queue.effects),
  2112. null === pendingQueue
  2113. ? (queue.effects = [update])
  2114. : pendingQueue.push(update));
  2115. }
  2116. update = update.next;
  2117. if (null === update || update === baseFirst)
  2118. if (((pendingQueue = queue.shared.pending), null === pendingQueue))
  2119. break;
  2120. else
  2121. (update = baseQueue.next = pendingQueue.next),
  2122. (pendingQueue.next = baseFirst),
  2123. (queue.baseQueue = baseQueue = pendingQueue),
  2124. (queue.shared.pending = null);
  2125. } while (1);
  2126. }
  2127. null === newBaseQueueLast
  2128. ? (newBaseState = newState)
  2129. : (newBaseQueueLast.next = newBaseQueueFirst);
  2130. queue.baseState = newBaseState;
  2131. queue.baseQueue = newBaseQueueLast;
  2132. markUnprocessedUpdateTime(newExpirationTime);
  2133. workInProgress$jscomp$0.expirationTime = newExpirationTime;
  2134. workInProgress$jscomp$0.memoizedState = newState;
  2135. }
  2136. }
  2137. function commitUpdateQueue(finishedWork, finishedQueue, instance) {
  2138. finishedWork = finishedQueue.effects;
  2139. finishedQueue.effects = null;
  2140. if (null !== finishedWork)
  2141. for (
  2142. finishedQueue = 0;
  2143. finishedQueue < finishedWork.length;
  2144. finishedQueue++
  2145. ) {
  2146. var effect = finishedWork[finishedQueue],
  2147. callback = effect.callback;
  2148. if (null !== callback) {
  2149. effect.callback = null;
  2150. if ("function" !== typeof callback)
  2151. throw Error(
  2152. "Invalid argument passed as callback. Expected a function. Instead received: " +
  2153. callback
  2154. );
  2155. callback.call(instance);
  2156. }
  2157. }
  2158. }
  2159. var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig,
  2160. emptyRefsObject = new React.Component().refs;
  2161. function applyDerivedStateFromProps(
  2162. workInProgress,
  2163. ctor,
  2164. getDerivedStateFromProps,
  2165. nextProps
  2166. ) {
  2167. ctor = workInProgress.memoizedState;
  2168. getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor);
  2169. getDerivedStateFromProps =
  2170. null === getDerivedStateFromProps || void 0 === getDerivedStateFromProps
  2171. ? ctor
  2172. : Object.assign({}, ctor, getDerivedStateFromProps);
  2173. workInProgress.memoizedState = getDerivedStateFromProps;
  2174. 0 === workInProgress.expirationTime &&
  2175. (workInProgress.updateQueue.baseState = getDerivedStateFromProps);
  2176. }
  2177. var classComponentUpdater = {
  2178. isMounted: function(component) {
  2179. return (component = component._reactInternalFiber)
  2180. ? getNearestMountedFiber(component) === component
  2181. : !1;
  2182. },
  2183. enqueueSetState: function(inst, payload, callback) {
  2184. inst = inst._reactInternalFiber;
  2185. var currentTime = requestCurrentTimeForUpdate(),
  2186. suspenseConfig = ReactCurrentBatchConfig.suspense;
  2187. currentTime = computeExpirationForFiber(currentTime, inst, suspenseConfig);
  2188. suspenseConfig = createUpdate(currentTime, suspenseConfig);
  2189. suspenseConfig.payload = payload;
  2190. void 0 !== callback &&
  2191. null !== callback &&
  2192. (suspenseConfig.callback = callback);
  2193. enqueueUpdate(inst, suspenseConfig);
  2194. scheduleWork(inst, currentTime);
  2195. },
  2196. enqueueReplaceState: function(inst, payload, callback) {
  2197. inst = inst._reactInternalFiber;
  2198. var currentTime = requestCurrentTimeForUpdate(),
  2199. suspenseConfig = ReactCurrentBatchConfig.suspense;
  2200. currentTime = computeExpirationForFiber(currentTime, inst, suspenseConfig);
  2201. suspenseConfig = createUpdate(currentTime, suspenseConfig);
  2202. suspenseConfig.tag = 1;
  2203. suspenseConfig.payload = payload;
  2204. void 0 !== callback &&
  2205. null !== callback &&
  2206. (suspenseConfig.callback = callback);
  2207. enqueueUpdate(inst, suspenseConfig);
  2208. scheduleWork(inst, currentTime);
  2209. },
  2210. enqueueForceUpdate: function(inst, callback) {
  2211. inst = inst._reactInternalFiber;
  2212. var currentTime = requestCurrentTimeForUpdate(),
  2213. suspenseConfig = ReactCurrentBatchConfig.suspense;
  2214. currentTime = computeExpirationForFiber(currentTime, inst, suspenseConfig);
  2215. suspenseConfig = createUpdate(currentTime, suspenseConfig);
  2216. suspenseConfig.tag = 2;
  2217. void 0 !== callback &&
  2218. null !== callback &&
  2219. (suspenseConfig.callback = callback);
  2220. enqueueUpdate(inst, suspenseConfig);
  2221. scheduleWork(inst, currentTime);
  2222. }
  2223. };
  2224. function checkShouldComponentUpdate(
  2225. workInProgress,
  2226. ctor,
  2227. oldProps,
  2228. newProps,
  2229. oldState,
  2230. newState,
  2231. nextContext
  2232. ) {
  2233. workInProgress = workInProgress.stateNode;
  2234. return "function" === typeof workInProgress.shouldComponentUpdate
  2235. ? workInProgress.shouldComponentUpdate(newProps, newState, nextContext)
  2236. : ctor.prototype && ctor.prototype.isPureReactComponent
  2237. ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState)
  2238. : !0;
  2239. }
  2240. function constructClassInstance(workInProgress, ctor, props) {
  2241. var isLegacyContextConsumer = !1,
  2242. unmaskedContext = emptyContextObject;
  2243. var context = ctor.contextType;
  2244. "object" === typeof context && null !== context
  2245. ? (context = readContext(context))
  2246. : ((unmaskedContext = isContextProvider(ctor)
  2247. ? previousContext
  2248. : contextStackCursor.current),
  2249. (isLegacyContextConsumer = ctor.contextTypes),
  2250. (context = (isLegacyContextConsumer =
  2251. null !== isLegacyContextConsumer && void 0 !== isLegacyContextConsumer)
  2252. ? getMaskedContext(workInProgress, unmaskedContext)
  2253. : emptyContextObject));
  2254. ctor = new ctor(props, context);
  2255. workInProgress.memoizedState =
  2256. null !== ctor.state && void 0 !== ctor.state ? ctor.state : null;
  2257. ctor.updater = classComponentUpdater;
  2258. workInProgress.stateNode = ctor;
  2259. ctor._reactInternalFiber = workInProgress;
  2260. isLegacyContextConsumer &&
  2261. ((workInProgress = workInProgress.stateNode),
  2262. (workInProgress.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext),
  2263. (workInProgress.__reactInternalMemoizedMaskedChildContext = context));
  2264. return ctor;
  2265. }
  2266. function callComponentWillReceiveProps(
  2267. workInProgress,
  2268. instance,
  2269. newProps,
  2270. nextContext
  2271. ) {
  2272. workInProgress = instance.state;
  2273. "function" === typeof instance.componentWillReceiveProps &&
  2274. instance.componentWillReceiveProps(newProps, nextContext);
  2275. "function" === typeof instance.UNSAFE_componentWillReceiveProps &&
  2276. instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
  2277. instance.state !== workInProgress &&
  2278. classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
  2279. }
  2280. function mountClassInstance(
  2281. workInProgress,
  2282. ctor,
  2283. newProps,
  2284. renderExpirationTime
  2285. ) {
  2286. var instance = workInProgress.stateNode;
  2287. instance.props = newProps;
  2288. instance.state = workInProgress.memoizedState;
  2289. instance.refs = emptyRefsObject;
  2290. initializeUpdateQueue(workInProgress);
  2291. var contextType = ctor.contextType;
  2292. "object" === typeof contextType && null !== contextType
  2293. ? (instance.context = readContext(contextType))
  2294. : ((contextType = isContextProvider(ctor)
  2295. ? previousContext
  2296. : contextStackCursor.current),
  2297. (instance.context = getMaskedContext(workInProgress, contextType)));
  2298. processUpdateQueue(workInProgress, newProps, instance, renderExpirationTime);
  2299. instance.state = workInProgress.memoizedState;
  2300. contextType = ctor.getDerivedStateFromProps;
  2301. "function" === typeof contextType &&
  2302. (applyDerivedStateFromProps(workInProgress, ctor, contextType, newProps),
  2303. (instance.state = workInProgress.memoizedState));
  2304. "function" === typeof ctor.getDerivedStateFromProps ||
  2305. "function" === typeof instance.getSnapshotBeforeUpdate ||
  2306. ("function" !== typeof instance.UNSAFE_componentWillMount &&
  2307. "function" !== typeof instance.componentWillMount) ||
  2308. ((ctor = instance.state),
  2309. "function" === typeof instance.componentWillMount &&
  2310. instance.componentWillMount(),
  2311. "function" === typeof instance.UNSAFE_componentWillMount &&
  2312. instance.UNSAFE_componentWillMount(),
  2313. ctor !== instance.state &&
  2314. classComponentUpdater.enqueueReplaceState(instance, instance.state, null),
  2315. processUpdateQueue(
  2316. workInProgress,
  2317. newProps,
  2318. instance,
  2319. renderExpirationTime
  2320. ),
  2321. (instance.state = workInProgress.memoizedState));
  2322. "function" === typeof instance.componentDidMount &&
  2323. (workInProgress.effectTag |= 4);
  2324. }
  2325. var isArray = Array.isArray;
  2326. function coerceRef(returnFiber, current, element) {
  2327. returnFiber = element.ref;
  2328. if (
  2329. null !== returnFiber &&
  2330. "function" !== typeof returnFiber &&
  2331. "object" !== typeof returnFiber
  2332. ) {
  2333. if (element._owner) {
  2334. element = element._owner;
  2335. if (element) {
  2336. if (1 !== element.tag)
  2337. throw Error(
  2338. "Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://fb.me/react-strict-mode-string-ref"
  2339. );
  2340. var inst = element.stateNode;
  2341. }
  2342. if (!inst)
  2343. throw Error(
  2344. "Missing owner for string ref " +
  2345. returnFiber +
  2346. ". This error is likely caused by a bug in React. Please file an issue."
  2347. );
  2348. var stringRef = "" + returnFiber;
  2349. if (
  2350. null !== current &&
  2351. null !== current.ref &&
  2352. "function" === typeof current.ref &&
  2353. current.ref._stringRef === stringRef
  2354. )
  2355. return current.ref;
  2356. current = function(value) {
  2357. var refs = inst.refs;
  2358. refs === emptyRefsObject && (refs = inst.refs = {});
  2359. null === value ? delete refs[stringRef] : (refs[stringRef] = value);
  2360. };
  2361. current._stringRef = stringRef;
  2362. return current;
  2363. }
  2364. if ("string" !== typeof returnFiber)
  2365. throw Error(
  2366. "Expected ref to be a function, a string, an object returned by React.createRef(), or null."
  2367. );
  2368. if (!element._owner)
  2369. throw Error(
  2370. "Element ref was specified as a string (" +
  2371. returnFiber +
  2372. ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://fb.me/react-refs-must-have-owner for more information."
  2373. );
  2374. }
  2375. return returnFiber;
  2376. }
  2377. function throwOnInvalidObjectType(returnFiber, newChild) {
  2378. if ("textarea" !== returnFiber.type)
  2379. throw Error(
  2380. "Objects are not valid as a React child (found: " +
  2381. ("[object Object]" === Object.prototype.toString.call(newChild)
  2382. ? "object with keys {" + Object.keys(newChild).join(", ") + "}"
  2383. : newChild) +
  2384. ")."
  2385. );
  2386. }
  2387. function ChildReconciler(shouldTrackSideEffects) {
  2388. function deleteChild(returnFiber, childToDelete) {
  2389. if (shouldTrackSideEffects) {
  2390. var last = returnFiber.lastEffect;
  2391. null !== last
  2392. ? ((last.nextEffect = childToDelete),
  2393. (returnFiber.lastEffect = childToDelete))
  2394. : (returnFiber.firstEffect = returnFiber.lastEffect = childToDelete);
  2395. childToDelete.nextEffect = null;
  2396. childToDelete.effectTag = 8;
  2397. }
  2398. }
  2399. function deleteRemainingChildren(returnFiber, currentFirstChild) {
  2400. if (!shouldTrackSideEffects) return null;
  2401. for (; null !== currentFirstChild; )
  2402. deleteChild(returnFiber, currentFirstChild),
  2403. (currentFirstChild = currentFirstChild.sibling);
  2404. return null;
  2405. }
  2406. function mapRemainingChildren(returnFiber, currentFirstChild) {
  2407. for (returnFiber = new Map(); null !== currentFirstChild; )
  2408. null !== currentFirstChild.key
  2409. ? returnFiber.set(currentFirstChild.key, currentFirstChild)
  2410. : returnFiber.set(currentFirstChild.index, currentFirstChild),
  2411. (currentFirstChild = currentFirstChild.sibling);
  2412. return returnFiber;
  2413. }
  2414. function useFiber(fiber, pendingProps) {
  2415. fiber = createWorkInProgress(fiber, pendingProps);
  2416. fiber.index = 0;
  2417. fiber.sibling = null;
  2418. return fiber;
  2419. }
  2420. function placeChild(newFiber, lastPlacedIndex, newIndex) {
  2421. newFiber.index = newIndex;
  2422. if (!shouldTrackSideEffects) return lastPlacedIndex;
  2423. newIndex = newFiber.alternate;
  2424. if (null !== newIndex)
  2425. return (
  2426. (newIndex = newIndex.index),
  2427. newIndex < lastPlacedIndex
  2428. ? ((newFiber.effectTag = 2), lastPlacedIndex)
  2429. : newIndex
  2430. );
  2431. newFiber.effectTag = 2;
  2432. return lastPlacedIndex;
  2433. }
  2434. function placeSingleChild(newFiber) {
  2435. shouldTrackSideEffects &&
  2436. null === newFiber.alternate &&
  2437. (newFiber.effectTag = 2);
  2438. return newFiber;
  2439. }
  2440. function updateTextNode(returnFiber, current, textContent, expirationTime) {
  2441. if (null === current || 6 !== current.tag)
  2442. return (
  2443. (current = createFiberFromText(
  2444. textContent,
  2445. returnFiber.mode,
  2446. expirationTime
  2447. )),
  2448. (current.return = returnFiber),
  2449. current
  2450. );
  2451. current = useFiber(current, textContent);
  2452. current.return = returnFiber;
  2453. return current;
  2454. }
  2455. function updateElement(returnFiber, current, element, expirationTime) {
  2456. if (null !== current && current.elementType === element.type)
  2457. return (
  2458. (expirationTime = useFiber(current, element.props)),
  2459. (expirationTime.ref = coerceRef(returnFiber, current, element)),
  2460. (expirationTime.return = returnFiber),
  2461. expirationTime
  2462. );
  2463. expirationTime = createFiberFromTypeAndProps(
  2464. element.type,
  2465. element.key,
  2466. element.props,
  2467. null,
  2468. returnFiber.mode,
  2469. expirationTime
  2470. );
  2471. expirationTime.ref = coerceRef(returnFiber, current, element);
  2472. expirationTime.return = returnFiber;
  2473. return expirationTime;
  2474. }
  2475. function updatePortal(returnFiber, current, portal, expirationTime) {
  2476. if (
  2477. null === current ||
  2478. 4 !== current.tag ||
  2479. current.stateNode.containerInfo !== portal.containerInfo ||
  2480. current.stateNode.implementation !== portal.implementation
  2481. )
  2482. return (
  2483. (current = createFiberFromPortal(
  2484. portal,
  2485. returnFiber.mode,
  2486. expirationTime
  2487. )),
  2488. (current.return = returnFiber),
  2489. current
  2490. );
  2491. current = useFiber(current, portal.children || []);
  2492. current.return = returnFiber;
  2493. return current;
  2494. }
  2495. function updateFragment(returnFiber, current, fragment, expirationTime, key) {
  2496. if (null === current || 7 !== current.tag)
  2497. return (
  2498. (current = createFiberFromFragment(
  2499. fragment,
  2500. returnFiber.mode,
  2501. expirationTime,
  2502. key
  2503. )),
  2504. (current.return = returnFiber),
  2505. current
  2506. );
  2507. current = useFiber(current, fragment);
  2508. current.return = returnFiber;
  2509. return current;
  2510. }
  2511. function createChild(returnFiber, newChild, expirationTime) {
  2512. if ("string" === typeof newChild || "number" === typeof newChild)
  2513. return (
  2514. (newChild = createFiberFromText(
  2515. "" + newChild,
  2516. returnFiber.mode,
  2517. expirationTime
  2518. )),
  2519. (newChild.return = returnFiber),
  2520. newChild
  2521. );
  2522. if ("object" === typeof newChild && null !== newChild) {
  2523. switch (newChild.$$typeof) {
  2524. case REACT_ELEMENT_TYPE:
  2525. return (
  2526. (expirationTime = createFiberFromTypeAndProps(
  2527. newChild.type,
  2528. newChild.key,
  2529. newChild.props,
  2530. null,
  2531. returnFiber.mode,
  2532. expirationTime
  2533. )),
  2534. (expirationTime.ref = coerceRef(returnFiber, null, newChild)),
  2535. (expirationTime.return = returnFiber),
  2536. expirationTime
  2537. );
  2538. case REACT_PORTAL_TYPE:
  2539. return (
  2540. (newChild = createFiberFromPortal(
  2541. newChild,
  2542. returnFiber.mode,
  2543. expirationTime
  2544. )),
  2545. (newChild.return = returnFiber),
  2546. newChild
  2547. );
  2548. }
  2549. if (isArray(newChild) || getIteratorFn(newChild))
  2550. return (
  2551. (newChild = createFiberFromFragment(
  2552. newChild,
  2553. returnFiber.mode,
  2554. expirationTime,
  2555. null
  2556. )),
  2557. (newChild.return = returnFiber),
  2558. newChild
  2559. );
  2560. throwOnInvalidObjectType(returnFiber, newChild);
  2561. }
  2562. return null;
  2563. }
  2564. function updateSlot(returnFiber, oldFiber, newChild, expirationTime) {
  2565. var key = null !== oldFiber ? oldFiber.key : null;
  2566. if ("string" === typeof newChild || "number" === typeof newChild)
  2567. return null !== key
  2568. ? null
  2569. : updateTextNode(returnFiber, oldFiber, "" + newChild, expirationTime);
  2570. if ("object" === typeof newChild && null !== newChild) {
  2571. switch (newChild.$$typeof) {
  2572. case REACT_ELEMENT_TYPE:
  2573. return newChild.key === key
  2574. ? newChild.type === REACT_FRAGMENT_TYPE
  2575. ? updateFragment(
  2576. returnFiber,
  2577. oldFiber,
  2578. newChild.props.children,
  2579. expirationTime,
  2580. key
  2581. )
  2582. : updateElement(returnFiber, oldFiber, newChild, expirationTime)
  2583. : null;
  2584. case REACT_PORTAL_TYPE:
  2585. return newChild.key === key
  2586. ? updatePortal(returnFiber, oldFiber, newChild, expirationTime)
  2587. : null;
  2588. }
  2589. if (isArray(newChild) || getIteratorFn(newChild))
  2590. return null !== key
  2591. ? null
  2592. : updateFragment(
  2593. returnFiber,
  2594. oldFiber,
  2595. newChild,
  2596. expirationTime,
  2597. null
  2598. );
  2599. throwOnInvalidObjectType(returnFiber, newChild);
  2600. }
  2601. return null;
  2602. }
  2603. function updateFromMap(
  2604. existingChildren,
  2605. returnFiber,
  2606. newIdx,
  2607. newChild,
  2608. expirationTime
  2609. ) {
  2610. if ("string" === typeof newChild || "number" === typeof newChild)
  2611. return (
  2612. (existingChildren = existingChildren.get(newIdx) || null),
  2613. updateTextNode(
  2614. returnFiber,
  2615. existingChildren,
  2616. "" + newChild,
  2617. expirationTime
  2618. )
  2619. );
  2620. if ("object" === typeof newChild && null !== newChild) {
  2621. switch (newChild.$$typeof) {
  2622. case REACT_ELEMENT_TYPE:
  2623. return (
  2624. (existingChildren =
  2625. existingChildren.get(
  2626. null === newChild.key ? newIdx : newChild.key
  2627. ) || null),
  2628. newChild.type === REACT_FRAGMENT_TYPE
  2629. ? updateFragment(
  2630. returnFiber,
  2631. existingChildren,
  2632. newChild.props.children,
  2633. expirationTime,
  2634. newChild.key
  2635. )
  2636. : updateElement(
  2637. returnFiber,
  2638. existingChildren,
  2639. newChild,
  2640. expirationTime
  2641. )
  2642. );
  2643. case REACT_PORTAL_TYPE:
  2644. return (
  2645. (existingChildren =
  2646. existingChildren.get(
  2647. null === newChild.key ? newIdx : newChild.key
  2648. ) || null),
  2649. updatePortal(
  2650. returnFiber,
  2651. existingChildren,
  2652. newChild,
  2653. expirationTime
  2654. )
  2655. );
  2656. }
  2657. if (isArray(newChild) || getIteratorFn(newChild))
  2658. return (
  2659. (existingChildren = existingChildren.get(newIdx) || null),
  2660. updateFragment(
  2661. returnFiber,
  2662. existingChildren,
  2663. newChild,
  2664. expirationTime,
  2665. null
  2666. )
  2667. );
  2668. throwOnInvalidObjectType(returnFiber, newChild);
  2669. }
  2670. return null;
  2671. }
  2672. function reconcileChildrenArray(
  2673. returnFiber,
  2674. currentFirstChild,
  2675. newChildren,
  2676. expirationTime
  2677. ) {
  2678. for (
  2679. var resultingFirstChild = null,
  2680. previousNewFiber = null,
  2681. oldFiber = currentFirstChild,
  2682. newIdx = (currentFirstChild = 0),
  2683. nextOldFiber = null;
  2684. null !== oldFiber && newIdx < newChildren.length;
  2685. newIdx++
  2686. ) {
  2687. oldFiber.index > newIdx
  2688. ? ((nextOldFiber = oldFiber), (oldFiber = null))
  2689. : (nextOldFiber = oldFiber.sibling);
  2690. var newFiber = updateSlot(
  2691. returnFiber,
  2692. oldFiber,
  2693. newChildren[newIdx],
  2694. expirationTime
  2695. );
  2696. if (null === newFiber) {
  2697. null === oldFiber && (oldFiber = nextOldFiber);
  2698. break;
  2699. }
  2700. shouldTrackSideEffects &&
  2701. oldFiber &&
  2702. null === newFiber.alternate &&
  2703. deleteChild(returnFiber, oldFiber);
  2704. currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
  2705. null === previousNewFiber
  2706. ? (resultingFirstChild = newFiber)
  2707. : (previousNewFiber.sibling = newFiber);
  2708. previousNewFiber = newFiber;
  2709. oldFiber = nextOldFiber;
  2710. }
  2711. if (newIdx === newChildren.length)
  2712. return (
  2713. deleteRemainingChildren(returnFiber, oldFiber), resultingFirstChild
  2714. );
  2715. if (null === oldFiber) {
  2716. for (; newIdx < newChildren.length; newIdx++)
  2717. (oldFiber = createChild(
  2718. returnFiber,
  2719. newChildren[newIdx],
  2720. expirationTime
  2721. )),
  2722. null !== oldFiber &&
  2723. ((currentFirstChild = placeChild(
  2724. oldFiber,
  2725. currentFirstChild,
  2726. newIdx
  2727. )),
  2728. null === previousNewFiber
  2729. ? (resultingFirstChild = oldFiber)
  2730. : (previousNewFiber.sibling = oldFiber),
  2731. (previousNewFiber = oldFiber));
  2732. return resultingFirstChild;
  2733. }
  2734. for (
  2735. oldFiber = mapRemainingChildren(returnFiber, oldFiber);
  2736. newIdx < newChildren.length;
  2737. newIdx++
  2738. )
  2739. (nextOldFiber = updateFromMap(
  2740. oldFiber,
  2741. returnFiber,
  2742. newIdx,
  2743. newChildren[newIdx],
  2744. expirationTime
  2745. )),
  2746. null !== nextOldFiber &&
  2747. (shouldTrackSideEffects &&
  2748. null !== nextOldFiber.alternate &&
  2749. oldFiber.delete(
  2750. null === nextOldFiber.key ? newIdx : nextOldFiber.key
  2751. ),
  2752. (currentFirstChild = placeChild(
  2753. nextOldFiber,
  2754. currentFirstChild,
  2755. newIdx
  2756. )),
  2757. null === previousNewFiber
  2758. ? (resultingFirstChild = nextOldFiber)
  2759. : (previousNewFiber.sibling = nextOldFiber),
  2760. (previousNewFiber = nextOldFiber));
  2761. shouldTrackSideEffects &&
  2762. oldFiber.forEach(function(child) {
  2763. return deleteChild(returnFiber, child);
  2764. });
  2765. return resultingFirstChild;
  2766. }
  2767. function reconcileChildrenIterator(
  2768. returnFiber,
  2769. currentFirstChild,
  2770. newChildrenIterable,
  2771. expirationTime
  2772. ) {
  2773. var iteratorFn = getIteratorFn(newChildrenIterable);
  2774. if ("function" !== typeof iteratorFn)
  2775. throw Error(
  2776. "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue."
  2777. );
  2778. newChildrenIterable = iteratorFn.call(newChildrenIterable);
  2779. if (null == newChildrenIterable)
  2780. throw Error("An iterable object provided no iterator.");
  2781. for (
  2782. var previousNewFiber = (iteratorFn = null),
  2783. oldFiber = currentFirstChild,
  2784. newIdx = (currentFirstChild = 0),
  2785. nextOldFiber = null,
  2786. step = newChildrenIterable.next();
  2787. null !== oldFiber && !step.done;
  2788. newIdx++, step = newChildrenIterable.next()
  2789. ) {
  2790. oldFiber.index > newIdx
  2791. ? ((nextOldFiber = oldFiber), (oldFiber = null))
  2792. : (nextOldFiber = oldFiber.sibling);
  2793. var newFiber = updateSlot(
  2794. returnFiber,
  2795. oldFiber,
  2796. step.value,
  2797. expirationTime
  2798. );
  2799. if (null === newFiber) {
  2800. null === oldFiber && (oldFiber = nextOldFiber);
  2801. break;
  2802. }
  2803. shouldTrackSideEffects &&
  2804. oldFiber &&
  2805. null === newFiber.alternate &&
  2806. deleteChild(returnFiber, oldFiber);
  2807. currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
  2808. null === previousNewFiber
  2809. ? (iteratorFn = newFiber)
  2810. : (previousNewFiber.sibling = newFiber);
  2811. previousNewFiber = newFiber;
  2812. oldFiber = nextOldFiber;
  2813. }
  2814. if (step.done)
  2815. return deleteRemainingChildren(returnFiber, oldFiber), iteratorFn;
  2816. if (null === oldFiber) {
  2817. for (; !step.done; newIdx++, step = newChildrenIterable.next())
  2818. (step = createChild(returnFiber, step.value, expirationTime)),
  2819. null !== step &&
  2820. ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)),
  2821. null === previousNewFiber
  2822. ? (iteratorFn = step)
  2823. : (previousNewFiber.sibling = step),
  2824. (previousNewFiber = step));
  2825. return iteratorFn;
  2826. }
  2827. for (
  2828. oldFiber = mapRemainingChildren(returnFiber, oldFiber);
  2829. !step.done;
  2830. newIdx++, step = newChildrenIterable.next()
  2831. )
  2832. (step = updateFromMap(
  2833. oldFiber,
  2834. returnFiber,
  2835. newIdx,
  2836. step.value,
  2837. expirationTime
  2838. )),
  2839. null !== step &&
  2840. (shouldTrackSideEffects &&
  2841. null !== step.alternate &&
  2842. oldFiber.delete(null === step.key ? newIdx : step.key),
  2843. (currentFirstChild = placeChild(step, currentFirstChild, newIdx)),
  2844. null === previousNewFiber
  2845. ? (iteratorFn = step)
  2846. : (previousNewFiber.sibling = step),
  2847. (previousNewFiber = step));
  2848. shouldTrackSideEffects &&
  2849. oldFiber.forEach(function(child) {
  2850. return deleteChild(returnFiber, child);
  2851. });
  2852. return iteratorFn;
  2853. }
  2854. return function(returnFiber, currentFirstChild, newChild, expirationTime) {
  2855. var isUnkeyedTopLevelFragment =
  2856. "object" === typeof newChild &&
  2857. null !== newChild &&
  2858. newChild.type === REACT_FRAGMENT_TYPE &&
  2859. null === newChild.key;
  2860. isUnkeyedTopLevelFragment && (newChild = newChild.props.children);
  2861. var isObject = "object" === typeof newChild && null !== newChild;
  2862. if (isObject)
  2863. switch (newChild.$$typeof) {
  2864. case REACT_ELEMENT_TYPE:
  2865. a: {
  2866. isObject = newChild.key;
  2867. for (
  2868. isUnkeyedTopLevelFragment = currentFirstChild;
  2869. null !== isUnkeyedTopLevelFragment;
  2870. ) {
  2871. if (isUnkeyedTopLevelFragment.key === isObject) {
  2872. switch (isUnkeyedTopLevelFragment.tag) {
  2873. case 7:
  2874. if (newChild.type === REACT_FRAGMENT_TYPE) {
  2875. deleteRemainingChildren(
  2876. returnFiber,
  2877. isUnkeyedTopLevelFragment.sibling
  2878. );
  2879. currentFirstChild = useFiber(
  2880. isUnkeyedTopLevelFragment,
  2881. newChild.props.children
  2882. );
  2883. currentFirstChild.return = returnFiber;
  2884. returnFiber = currentFirstChild;
  2885. break a;
  2886. }
  2887. break;
  2888. default:
  2889. if (
  2890. isUnkeyedTopLevelFragment.elementType === newChild.type
  2891. ) {
  2892. deleteRemainingChildren(
  2893. returnFiber,
  2894. isUnkeyedTopLevelFragment.sibling
  2895. );
  2896. currentFirstChild = useFiber(
  2897. isUnkeyedTopLevelFragment,
  2898. newChild.props
  2899. );
  2900. currentFirstChild.ref = coerceRef(
  2901. returnFiber,
  2902. isUnkeyedTopLevelFragment,
  2903. newChild
  2904. );
  2905. currentFirstChild.return = returnFiber;
  2906. returnFiber = currentFirstChild;
  2907. break a;
  2908. }
  2909. }
  2910. deleteRemainingChildren(returnFiber, isUnkeyedTopLevelFragment);
  2911. break;
  2912. } else deleteChild(returnFiber, isUnkeyedTopLevelFragment);
  2913. isUnkeyedTopLevelFragment = isUnkeyedTopLevelFragment.sibling;
  2914. }
  2915. newChild.type === REACT_FRAGMENT_TYPE
  2916. ? ((currentFirstChild = createFiberFromFragment(
  2917. newChild.props.children,
  2918. returnFiber.mode,
  2919. expirationTime,
  2920. newChild.key
  2921. )),
  2922. (currentFirstChild.return = returnFiber),
  2923. (returnFiber = currentFirstChild))
  2924. : ((expirationTime = createFiberFromTypeAndProps(
  2925. newChild.type,
  2926. newChild.key,
  2927. newChild.props,
  2928. null,
  2929. returnFiber.mode,
  2930. expirationTime
  2931. )),
  2932. (expirationTime.ref = coerceRef(
  2933. returnFiber,
  2934. currentFirstChild,
  2935. newChild
  2936. )),
  2937. (expirationTime.return = returnFiber),
  2938. (returnFiber = expirationTime));
  2939. }
  2940. return placeSingleChild(returnFiber);
  2941. case REACT_PORTAL_TYPE:
  2942. a: {
  2943. for (
  2944. isUnkeyedTopLevelFragment = newChild.key;
  2945. null !== currentFirstChild;
  2946. ) {
  2947. if (currentFirstChild.key === isUnkeyedTopLevelFragment)
  2948. if (
  2949. 4 === currentFirstChild.tag &&
  2950. currentFirstChild.stateNode.containerInfo ===
  2951. newChild.containerInfo &&
  2952. currentFirstChild.stateNode.implementation ===
  2953. newChild.implementation
  2954. ) {
  2955. deleteRemainingChildren(
  2956. returnFiber,
  2957. currentFirstChild.sibling
  2958. );
  2959. currentFirstChild = useFiber(
  2960. currentFirstChild,
  2961. newChild.children || []
  2962. );
  2963. currentFirstChild.return = returnFiber;
  2964. returnFiber = currentFirstChild;
  2965. break a;
  2966. } else {
  2967. deleteRemainingChildren(returnFiber, currentFirstChild);
  2968. break;
  2969. }
  2970. else deleteChild(returnFiber, currentFirstChild);
  2971. currentFirstChild = currentFirstChild.sibling;
  2972. }
  2973. currentFirstChild = createFiberFromPortal(
  2974. newChild,
  2975. returnFiber.mode,
  2976. expirationTime
  2977. );
  2978. currentFirstChild.return = returnFiber;
  2979. returnFiber = currentFirstChild;
  2980. }
  2981. return placeSingleChild(returnFiber);
  2982. }
  2983. if ("string" === typeof newChild || "number" === typeof newChild)
  2984. return (
  2985. (newChild = "" + newChild),
  2986. null !== currentFirstChild && 6 === currentFirstChild.tag
  2987. ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),
  2988. (currentFirstChild = useFiber(currentFirstChild, newChild)),
  2989. (currentFirstChild.return = returnFiber),
  2990. (returnFiber = currentFirstChild))
  2991. : (deleteRemainingChildren(returnFiber, currentFirstChild),
  2992. (currentFirstChild = createFiberFromText(
  2993. newChild,
  2994. returnFiber.mode,
  2995. expirationTime
  2996. )),
  2997. (currentFirstChild.return = returnFiber),
  2998. (returnFiber = currentFirstChild)),
  2999. placeSingleChild(returnFiber)
  3000. );
  3001. if (isArray(newChild))
  3002. return reconcileChildrenArray(
  3003. returnFiber,
  3004. currentFirstChild,
  3005. newChild,
  3006. expirationTime
  3007. );
  3008. if (getIteratorFn(newChild))
  3009. return reconcileChildrenIterator(
  3010. returnFiber,
  3011. currentFirstChild,
  3012. newChild,
  3013. expirationTime
  3014. );
  3015. isObject && throwOnInvalidObjectType(returnFiber, newChild);
  3016. if ("undefined" === typeof newChild && !isUnkeyedTopLevelFragment)
  3017. switch (returnFiber.tag) {
  3018. case 1:
  3019. case 0:
  3020. throw ((returnFiber = returnFiber.type),
  3021. Error(
  3022. (returnFiber.displayName || returnFiber.name || "Component") +
  3023. "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null."
  3024. ));
  3025. }
  3026. return deleteRemainingChildren(returnFiber, currentFirstChild);
  3027. };
  3028. }
  3029. var reconcileChildFibers = ChildReconciler(!0),
  3030. mountChildFibers = ChildReconciler(!1),
  3031. NO_CONTEXT = {},
  3032. contextStackCursor$1 = { current: NO_CONTEXT },
  3033. contextFiberStackCursor = { current: NO_CONTEXT },
  3034. rootInstanceStackCursor = { current: NO_CONTEXT };
  3035. function requiredContext(c) {
  3036. if (c === NO_CONTEXT)
  3037. throw Error(
  3038. "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."
  3039. );
  3040. return c;
  3041. }
  3042. function pushHostContainer(fiber, nextRootInstance) {
  3043. push(rootInstanceStackCursor, nextRootInstance);
  3044. push(contextFiberStackCursor, fiber);
  3045. push(contextStackCursor$1, NO_CONTEXT);
  3046. pop(contextStackCursor$1);
  3047. push(contextStackCursor$1, { isInAParentText: !1 });
  3048. }
  3049. function popHostContainer() {
  3050. pop(contextStackCursor$1);
  3051. pop(contextFiberStackCursor);
  3052. pop(rootInstanceStackCursor);
  3053. }
  3054. function pushHostContext(fiber) {
  3055. requiredContext(rootInstanceStackCursor.current);
  3056. var context = requiredContext(contextStackCursor$1.current);
  3057. var nextContext = fiber.type;
  3058. nextContext =
  3059. "AndroidTextInput" === nextContext ||
  3060. "RCTMultilineTextInputView" === nextContext ||
  3061. "RCTSinglelineTextInputView" === nextContext ||
  3062. "RCTText" === nextContext ||
  3063. "RCTVirtualText" === nextContext;
  3064. nextContext =
  3065. context.isInAParentText !== nextContext
  3066. ? { isInAParentText: nextContext }
  3067. : context;
  3068. context !== nextContext &&
  3069. (push(contextFiberStackCursor, fiber),
  3070. push(contextStackCursor$1, nextContext));
  3071. }
  3072. function popHostContext(fiber) {
  3073. contextFiberStackCursor.current === fiber &&
  3074. (pop(contextStackCursor$1), pop(contextFiberStackCursor));
  3075. }
  3076. var suspenseStackCursor = { current: 0 };
  3077. function findFirstSuspended(row) {
  3078. for (var node = row; null !== node; ) {
  3079. if (13 === node.tag) {
  3080. var state = node.memoizedState;
  3081. if (null !== state && (null === state.dehydrated || shim() || shim()))
  3082. return node;
  3083. } else if (19 === node.tag && void 0 !== node.memoizedProps.revealOrder) {
  3084. if (0 !== (node.effectTag & 64)) return node;
  3085. } else if (null !== node.child) {
  3086. node.child.return = node;
  3087. node = node.child;
  3088. continue;
  3089. }
  3090. if (node === row) break;
  3091. for (; null === node.sibling; ) {
  3092. if (null === node.return || node.return === row) return null;
  3093. node = node.return;
  3094. }
  3095. node.sibling.return = node.return;
  3096. node = node.sibling;
  3097. }
  3098. return null;
  3099. }
  3100. function createDeprecatedResponderListener(responder, props) {
  3101. return { responder: responder, props: props };
  3102. }
  3103. var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher,
  3104. ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig,
  3105. renderExpirationTime = 0,
  3106. currentlyRenderingFiber$1 = null,
  3107. currentHook = null,
  3108. workInProgressHook = null,
  3109. didScheduleRenderPhaseUpdate = !1;
  3110. function throwInvalidHookError() {
  3111. throw Error(
  3112. "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem."
  3113. );
  3114. }
  3115. function areHookInputsEqual(nextDeps, prevDeps) {
  3116. if (null === prevDeps) return !1;
  3117. for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)
  3118. if (!objectIs(nextDeps[i], prevDeps[i])) return !1;
  3119. return !0;
  3120. }
  3121. function renderWithHooks(
  3122. current,
  3123. workInProgress,
  3124. Component,
  3125. props,
  3126. secondArg,
  3127. nextRenderExpirationTime
  3128. ) {
  3129. renderExpirationTime = nextRenderExpirationTime;
  3130. currentlyRenderingFiber$1 = workInProgress;
  3131. workInProgress.memoizedState = null;
  3132. workInProgress.updateQueue = null;
  3133. workInProgress.expirationTime = 0;
  3134. ReactCurrentDispatcher.current =
  3135. null === current || null === current.memoizedState
  3136. ? HooksDispatcherOnMount
  3137. : HooksDispatcherOnUpdate;
  3138. current = Component(props, secondArg);
  3139. if (workInProgress.expirationTime === renderExpirationTime) {
  3140. nextRenderExpirationTime = 0;
  3141. do {
  3142. workInProgress.expirationTime = 0;
  3143. if (!(25 > nextRenderExpirationTime))
  3144. throw Error(
  3145. "Too many re-renders. React limits the number of renders to prevent an infinite loop."
  3146. );
  3147. nextRenderExpirationTime += 1;
  3148. workInProgressHook = currentHook = null;
  3149. workInProgress.updateQueue = null;
  3150. ReactCurrentDispatcher.current = HooksDispatcherOnRerender;
  3151. current = Component(props, secondArg);
  3152. } while (workInProgress.expirationTime === renderExpirationTime);
  3153. }
  3154. ReactCurrentDispatcher.current = ContextOnlyDispatcher;
  3155. workInProgress = null !== currentHook && null !== currentHook.next;
  3156. renderExpirationTime = 0;
  3157. workInProgressHook = currentHook = currentlyRenderingFiber$1 = null;
  3158. didScheduleRenderPhaseUpdate = !1;
  3159. if (workInProgress)
  3160. throw Error(
  3161. "Rendered fewer hooks than expected. This may be caused by an accidental early return statement."
  3162. );
  3163. return current;
  3164. }
  3165. function mountWorkInProgressHook() {
  3166. var hook = {
  3167. memoizedState: null,
  3168. baseState: null,
  3169. baseQueue: null,
  3170. queue: null,
  3171. next: null
  3172. };
  3173. null === workInProgressHook
  3174. ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook)
  3175. : (workInProgressHook = workInProgressHook.next = hook);
  3176. return workInProgressHook;
  3177. }
  3178. function updateWorkInProgressHook() {
  3179. if (null === currentHook) {
  3180. var nextCurrentHook = currentlyRenderingFiber$1.alternate;
  3181. nextCurrentHook =
  3182. null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;
  3183. } else nextCurrentHook = currentHook.next;
  3184. var nextWorkInProgressHook =
  3185. null === workInProgressHook
  3186. ? currentlyRenderingFiber$1.memoizedState
  3187. : workInProgressHook.next;
  3188. if (null !== nextWorkInProgressHook)
  3189. (workInProgressHook = nextWorkInProgressHook),
  3190. (currentHook = nextCurrentHook);
  3191. else {
  3192. if (null === nextCurrentHook)
  3193. throw Error("Rendered more hooks than during the previous render.");
  3194. currentHook = nextCurrentHook;
  3195. nextCurrentHook = {
  3196. memoizedState: currentHook.memoizedState,
  3197. baseState: currentHook.baseState,
  3198. baseQueue: currentHook.baseQueue,
  3199. queue: currentHook.queue,
  3200. next: null
  3201. };
  3202. null === workInProgressHook
  3203. ? (currentlyRenderingFiber$1.memoizedState = workInProgressHook = nextCurrentHook)
  3204. : (workInProgressHook = workInProgressHook.next = nextCurrentHook);
  3205. }
  3206. return workInProgressHook;
  3207. }
  3208. function basicStateReducer(state, action) {
  3209. return "function" === typeof action ? action(state) : action;
  3210. }
  3211. function updateReducer(reducer) {
  3212. var hook = updateWorkInProgressHook(),
  3213. queue = hook.queue;
  3214. if (null === queue)
  3215. throw Error(
  3216. "Should have a queue. This is likely a bug in React. Please file an issue."
  3217. );
  3218. queue.lastRenderedReducer = reducer;
  3219. var current = currentHook,
  3220. baseQueue = current.baseQueue,
  3221. pendingQueue = queue.pending;
  3222. if (null !== pendingQueue) {
  3223. if (null !== baseQueue) {
  3224. var baseFirst = baseQueue.next;
  3225. baseQueue.next = pendingQueue.next;
  3226. pendingQueue.next = baseFirst;
  3227. }
  3228. current.baseQueue = baseQueue = pendingQueue;
  3229. queue.pending = null;
  3230. }
  3231. if (null !== baseQueue) {
  3232. baseQueue = baseQueue.next;
  3233. current = current.baseState;
  3234. var newBaseQueueLast = (baseFirst = pendingQueue = null),
  3235. update = baseQueue;
  3236. do {
  3237. var updateExpirationTime = update.expirationTime;
  3238. if (updateExpirationTime < renderExpirationTime) {
  3239. var clone = {
  3240. expirationTime: update.expirationTime,
  3241. suspenseConfig: update.suspenseConfig,
  3242. action: update.action,
  3243. eagerReducer: update.eagerReducer,
  3244. eagerState: update.eagerState,
  3245. next: null
  3246. };
  3247. null === newBaseQueueLast
  3248. ? ((baseFirst = newBaseQueueLast = clone), (pendingQueue = current))
  3249. : (newBaseQueueLast = newBaseQueueLast.next = clone);
  3250. updateExpirationTime > currentlyRenderingFiber$1.expirationTime &&
  3251. ((currentlyRenderingFiber$1.expirationTime = updateExpirationTime),
  3252. markUnprocessedUpdateTime(updateExpirationTime));
  3253. } else
  3254. null !== newBaseQueueLast &&
  3255. (newBaseQueueLast = newBaseQueueLast.next = {
  3256. expirationTime: 1073741823,
  3257. suspenseConfig: update.suspenseConfig,
  3258. action: update.action,
  3259. eagerReducer: update.eagerReducer,
  3260. eagerState: update.eagerState,
  3261. next: null
  3262. }),
  3263. markRenderEventTimeAndConfig(
  3264. updateExpirationTime,
  3265. update.suspenseConfig
  3266. ),
  3267. (current =
  3268. update.eagerReducer === reducer
  3269. ? update.eagerState
  3270. : reducer(current, update.action));
  3271. update = update.next;
  3272. } while (null !== update && update !== baseQueue);
  3273. null === newBaseQueueLast
  3274. ? (pendingQueue = current)
  3275. : (newBaseQueueLast.next = baseFirst);
  3276. objectIs(current, hook.memoizedState) || (didReceiveUpdate = !0);
  3277. hook.memoizedState = current;
  3278. hook.baseState = pendingQueue;
  3279. hook.baseQueue = newBaseQueueLast;
  3280. queue.lastRenderedState = current;
  3281. }
  3282. return [hook.memoizedState, queue.dispatch];
  3283. }
  3284. function rerenderReducer(reducer) {
  3285. var hook = updateWorkInProgressHook(),
  3286. queue = hook.queue;
  3287. if (null === queue)
  3288. throw Error(
  3289. "Should have a queue. This is likely a bug in React. Please file an issue."
  3290. );
  3291. queue.lastRenderedReducer = reducer;
  3292. var dispatch = queue.dispatch,
  3293. lastRenderPhaseUpdate = queue.pending,
  3294. newState = hook.memoizedState;
  3295. if (null !== lastRenderPhaseUpdate) {
  3296. queue.pending = null;
  3297. var update = (lastRenderPhaseUpdate = lastRenderPhaseUpdate.next);
  3298. do (newState = reducer(newState, update.action)), (update = update.next);
  3299. while (update !== lastRenderPhaseUpdate);
  3300. objectIs(newState, hook.memoizedState) || (didReceiveUpdate = !0);
  3301. hook.memoizedState = newState;
  3302. null === hook.baseQueue && (hook.baseState = newState);
  3303. queue.lastRenderedState = newState;
  3304. }
  3305. return [newState, dispatch];
  3306. }
  3307. function mountState(initialState) {
  3308. var hook = mountWorkInProgressHook();
  3309. "function" === typeof initialState && (initialState = initialState());
  3310. hook.memoizedState = hook.baseState = initialState;
  3311. initialState = hook.queue = {
  3312. pending: null,
  3313. dispatch: null,
  3314. lastRenderedReducer: basicStateReducer,
  3315. lastRenderedState: initialState
  3316. };
  3317. initialState = initialState.dispatch = dispatchAction.bind(
  3318. null,
  3319. currentlyRenderingFiber$1,
  3320. initialState
  3321. );
  3322. return [hook.memoizedState, initialState];
  3323. }
  3324. function pushEffect(tag, create, destroy, deps) {
  3325. tag = { tag: tag, create: create, destroy: destroy, deps: deps, next: null };
  3326. create = currentlyRenderingFiber$1.updateQueue;
  3327. null === create
  3328. ? ((create = { lastEffect: null }),
  3329. (currentlyRenderingFiber$1.updateQueue = create),
  3330. (create.lastEffect = tag.next = tag))
  3331. : ((destroy = create.lastEffect),
  3332. null === destroy
  3333. ? (create.lastEffect = tag.next = tag)
  3334. : ((deps = destroy.next),
  3335. (destroy.next = tag),
  3336. (tag.next = deps),
  3337. (create.lastEffect = tag)));
  3338. return tag;
  3339. }
  3340. function updateRef() {
  3341. return updateWorkInProgressHook().memoizedState;
  3342. }
  3343. function mountEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
  3344. var hook = mountWorkInProgressHook();
  3345. currentlyRenderingFiber$1.effectTag |= fiberEffectTag;
  3346. hook.memoizedState = pushEffect(
  3347. 1 | hookEffectTag,
  3348. create,
  3349. void 0,
  3350. void 0 === deps ? null : deps
  3351. );
  3352. }
  3353. function updateEffectImpl(fiberEffectTag, hookEffectTag, create, deps) {
  3354. var hook = updateWorkInProgressHook();
  3355. deps = void 0 === deps ? null : deps;
  3356. var destroy = void 0;
  3357. if (null !== currentHook) {
  3358. var prevEffect = currentHook.memoizedState;
  3359. destroy = prevEffect.destroy;
  3360. if (null !== deps && areHookInputsEqual(deps, prevEffect.deps)) {
  3361. pushEffect(hookEffectTag, create, destroy, deps);
  3362. return;
  3363. }
  3364. }
  3365. currentlyRenderingFiber$1.effectTag |= fiberEffectTag;
  3366. hook.memoizedState = pushEffect(1 | hookEffectTag, create, destroy, deps);
  3367. }
  3368. function mountEffect(create, deps) {
  3369. return mountEffectImpl(516, 4, create, deps);
  3370. }
  3371. function updateEffect(create, deps) {
  3372. return updateEffectImpl(516, 4, create, deps);
  3373. }
  3374. function updateLayoutEffect(create, deps) {
  3375. return updateEffectImpl(4, 2, create, deps);
  3376. }
  3377. function imperativeHandleEffect(create, ref) {
  3378. if ("function" === typeof ref)
  3379. return (
  3380. (create = create()),
  3381. ref(create),
  3382. function() {
  3383. ref(null);
  3384. }
  3385. );
  3386. if (null !== ref && void 0 !== ref)
  3387. return (
  3388. (create = create()),
  3389. (ref.current = create),
  3390. function() {
  3391. ref.current = null;
  3392. }
  3393. );
  3394. }
  3395. function updateImperativeHandle(ref, create, deps) {
  3396. deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
  3397. return updateEffectImpl(
  3398. 4,
  3399. 2,
  3400. imperativeHandleEffect.bind(null, create, ref),
  3401. deps
  3402. );
  3403. }
  3404. function mountDebugValue() {}
  3405. function mountCallback(callback, deps) {
  3406. mountWorkInProgressHook().memoizedState = [
  3407. callback,
  3408. void 0 === deps ? null : deps
  3409. ];
  3410. return callback;
  3411. }
  3412. function updateCallback(callback, deps) {
  3413. var hook = updateWorkInProgressHook();
  3414. deps = void 0 === deps ? null : deps;
  3415. var prevState = hook.memoizedState;
  3416. if (
  3417. null !== prevState &&
  3418. null !== deps &&
  3419. areHookInputsEqual(deps, prevState[1])
  3420. )
  3421. return prevState[0];
  3422. hook.memoizedState = [callback, deps];
  3423. return callback;
  3424. }
  3425. function updateMemo(nextCreate, deps) {
  3426. var hook = updateWorkInProgressHook();
  3427. deps = void 0 === deps ? null : deps;
  3428. var prevState = hook.memoizedState;
  3429. if (
  3430. null !== prevState &&
  3431. null !== deps &&
  3432. areHookInputsEqual(deps, prevState[1])
  3433. )
  3434. return prevState[0];
  3435. nextCreate = nextCreate();
  3436. hook.memoizedState = [nextCreate, deps];
  3437. return nextCreate;
  3438. }
  3439. function startTransition(setPending, config, callback) {
  3440. var priorityLevel = getCurrentPriorityLevel();
  3441. runWithPriority(98 > priorityLevel ? 98 : priorityLevel, function() {
  3442. setPending(!0);
  3443. });
  3444. runWithPriority(97 < priorityLevel ? 97 : priorityLevel, function() {
  3445. var previousConfig = ReactCurrentBatchConfig$1.suspense;
  3446. ReactCurrentBatchConfig$1.suspense = void 0 === config ? null : config;
  3447. try {
  3448. setPending(!1), callback();
  3449. } finally {
  3450. ReactCurrentBatchConfig$1.suspense = previousConfig;
  3451. }
  3452. });
  3453. }
  3454. function dispatchAction(fiber, queue, action) {
  3455. var currentTime = requestCurrentTimeForUpdate(),
  3456. suspenseConfig = ReactCurrentBatchConfig.suspense;
  3457. currentTime = computeExpirationForFiber(currentTime, fiber, suspenseConfig);
  3458. suspenseConfig = {
  3459. expirationTime: currentTime,
  3460. suspenseConfig: suspenseConfig,
  3461. action: action,
  3462. eagerReducer: null,
  3463. eagerState: null,
  3464. next: null
  3465. };
  3466. var pending = queue.pending;
  3467. null === pending
  3468. ? (suspenseConfig.next = suspenseConfig)
  3469. : ((suspenseConfig.next = pending.next), (pending.next = suspenseConfig));
  3470. queue.pending = suspenseConfig;
  3471. pending = fiber.alternate;
  3472. if (
  3473. fiber === currentlyRenderingFiber$1 ||
  3474. (null !== pending && pending === currentlyRenderingFiber$1)
  3475. )
  3476. (didScheduleRenderPhaseUpdate = !0),
  3477. (suspenseConfig.expirationTime = renderExpirationTime),
  3478. (currentlyRenderingFiber$1.expirationTime = renderExpirationTime);
  3479. else {
  3480. if (
  3481. 0 === fiber.expirationTime &&
  3482. (null === pending || 0 === pending.expirationTime) &&
  3483. ((pending = queue.lastRenderedReducer), null !== pending)
  3484. )
  3485. try {
  3486. var currentState = queue.lastRenderedState,
  3487. eagerState = pending(currentState, action);
  3488. suspenseConfig.eagerReducer = pending;
  3489. suspenseConfig.eagerState = eagerState;
  3490. if (objectIs(eagerState, currentState)) return;
  3491. } catch (error) {
  3492. } finally {
  3493. }
  3494. scheduleWork(fiber, currentTime);
  3495. }
  3496. }
  3497. function updateEventListener() {}
  3498. var ContextOnlyDispatcher = {
  3499. readContext: readContext,
  3500. useCallback: throwInvalidHookError,
  3501. useContext: throwInvalidHookError,
  3502. useEffect: throwInvalidHookError,
  3503. useImperativeHandle: throwInvalidHookError,
  3504. useLayoutEffect: throwInvalidHookError,
  3505. useMemo: throwInvalidHookError,
  3506. useReducer: throwInvalidHookError,
  3507. useRef: throwInvalidHookError,
  3508. useState: throwInvalidHookError,
  3509. useDebugValue: throwInvalidHookError,
  3510. useResponder: throwInvalidHookError,
  3511. useDeferredValue: throwInvalidHookError,
  3512. useTransition: throwInvalidHookError,
  3513. useEvent: throwInvalidHookError
  3514. },
  3515. HooksDispatcherOnMount = {
  3516. readContext: readContext,
  3517. useCallback: mountCallback,
  3518. useContext: readContext,
  3519. useEffect: mountEffect,
  3520. useImperativeHandle: function(ref, create, deps) {
  3521. deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
  3522. return mountEffectImpl(
  3523. 4,
  3524. 2,
  3525. imperativeHandleEffect.bind(null, create, ref),
  3526. deps
  3527. );
  3528. },
  3529. useLayoutEffect: function(create, deps) {
  3530. return mountEffectImpl(4, 2, create, deps);
  3531. },
  3532. useMemo: function(nextCreate, deps) {
  3533. var hook = mountWorkInProgressHook();
  3534. deps = void 0 === deps ? null : deps;
  3535. nextCreate = nextCreate();
  3536. hook.memoizedState = [nextCreate, deps];
  3537. return nextCreate;
  3538. },
  3539. useReducer: function(reducer, initialArg, init) {
  3540. var hook = mountWorkInProgressHook();
  3541. initialArg = void 0 !== init ? init(initialArg) : initialArg;
  3542. hook.memoizedState = hook.baseState = initialArg;
  3543. reducer = hook.queue = {
  3544. pending: null,
  3545. dispatch: null,
  3546. lastRenderedReducer: reducer,
  3547. lastRenderedState: initialArg
  3548. };
  3549. reducer = reducer.dispatch = dispatchAction.bind(
  3550. null,
  3551. currentlyRenderingFiber$1,
  3552. reducer
  3553. );
  3554. return [hook.memoizedState, reducer];
  3555. },
  3556. useRef: function(initialValue) {
  3557. var hook = mountWorkInProgressHook();
  3558. initialValue = { current: initialValue };
  3559. return (hook.memoizedState = initialValue);
  3560. },
  3561. useState: mountState,
  3562. useDebugValue: mountDebugValue,
  3563. useResponder: createDeprecatedResponderListener,
  3564. useDeferredValue: function(value, config) {
  3565. var _mountState = mountState(value),
  3566. prevValue = _mountState[0],
  3567. setValue = _mountState[1];
  3568. mountEffect(
  3569. function() {
  3570. var previousConfig = ReactCurrentBatchConfig$1.suspense;
  3571. ReactCurrentBatchConfig$1.suspense =
  3572. void 0 === config ? null : config;
  3573. try {
  3574. setValue(value);
  3575. } finally {
  3576. ReactCurrentBatchConfig$1.suspense = previousConfig;
  3577. }
  3578. },
  3579. [value, config]
  3580. );
  3581. return prevValue;
  3582. },
  3583. useTransition: function(config) {
  3584. var _mountState2 = mountState(!1),
  3585. isPending = _mountState2[0];
  3586. _mountState2 = _mountState2[1];
  3587. return [
  3588. mountCallback(startTransition.bind(null, _mountState2, config), [
  3589. _mountState2,
  3590. config
  3591. ]),
  3592. isPending
  3593. ];
  3594. },
  3595. useEvent: function() {}
  3596. },
  3597. HooksDispatcherOnUpdate = {
  3598. readContext: readContext,
  3599. useCallback: updateCallback,
  3600. useContext: readContext,
  3601. useEffect: updateEffect,
  3602. useImperativeHandle: updateImperativeHandle,
  3603. useLayoutEffect: updateLayoutEffect,
  3604. useMemo: updateMemo,
  3605. useReducer: updateReducer,
  3606. useRef: updateRef,
  3607. useState: function() {
  3608. return updateReducer(basicStateReducer);
  3609. },
  3610. useDebugValue: mountDebugValue,
  3611. useResponder: createDeprecatedResponderListener,
  3612. useDeferredValue: function(value, config) {
  3613. var _updateState = updateReducer(basicStateReducer),
  3614. prevValue = _updateState[0],
  3615. setValue = _updateState[1];
  3616. updateEffect(
  3617. function() {
  3618. var previousConfig = ReactCurrentBatchConfig$1.suspense;
  3619. ReactCurrentBatchConfig$1.suspense =
  3620. void 0 === config ? null : config;
  3621. try {
  3622. setValue(value);
  3623. } finally {
  3624. ReactCurrentBatchConfig$1.suspense = previousConfig;
  3625. }
  3626. },
  3627. [value, config]
  3628. );
  3629. return prevValue;
  3630. },
  3631. useTransition: function(config) {
  3632. var _updateState2 = updateReducer(basicStateReducer),
  3633. isPending = _updateState2[0];
  3634. _updateState2 = _updateState2[1];
  3635. return [
  3636. updateCallback(startTransition.bind(null, _updateState2, config), [
  3637. _updateState2,
  3638. config
  3639. ]),
  3640. isPending
  3641. ];
  3642. },
  3643. useEvent: updateEventListener
  3644. },
  3645. HooksDispatcherOnRerender = {
  3646. readContext: readContext,
  3647. useCallback: updateCallback,
  3648. useContext: readContext,
  3649. useEffect: updateEffect,
  3650. useImperativeHandle: updateImperativeHandle,
  3651. useLayoutEffect: updateLayoutEffect,
  3652. useMemo: updateMemo,
  3653. useReducer: rerenderReducer,
  3654. useRef: updateRef,
  3655. useState: function() {
  3656. return rerenderReducer(basicStateReducer);
  3657. },
  3658. useDebugValue: mountDebugValue,
  3659. useResponder: createDeprecatedResponderListener,
  3660. useDeferredValue: function(value, config) {
  3661. var _rerenderState = rerenderReducer(basicStateReducer),
  3662. prevValue = _rerenderState[0],
  3663. setValue = _rerenderState[1];
  3664. updateEffect(
  3665. function() {
  3666. var previousConfig = ReactCurrentBatchConfig$1.suspense;
  3667. ReactCurrentBatchConfig$1.suspense =
  3668. void 0 === config ? null : config;
  3669. try {
  3670. setValue(value);
  3671. } finally {
  3672. ReactCurrentBatchConfig$1.suspense = previousConfig;
  3673. }
  3674. },
  3675. [value, config]
  3676. );
  3677. return prevValue;
  3678. },
  3679. useTransition: function(config) {
  3680. var _rerenderState2 = rerenderReducer(basicStateReducer),
  3681. isPending = _rerenderState2[0];
  3682. _rerenderState2 = _rerenderState2[1];
  3683. return [
  3684. updateCallback(startTransition.bind(null, _rerenderState2, config), [
  3685. _rerenderState2,
  3686. config
  3687. ]),
  3688. isPending
  3689. ];
  3690. },
  3691. useEvent: updateEventListener
  3692. },
  3693. now$1 = Scheduler.unstable_now,
  3694. commitTime = 0,
  3695. profilerStartTime = -1;
  3696. function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
  3697. if (0 <= profilerStartTime) {
  3698. var elapsedTime = now$1() - profilerStartTime;
  3699. fiber.actualDuration += elapsedTime;
  3700. overrideBaseTime && (fiber.selfBaseDuration = elapsedTime);
  3701. profilerStartTime = -1;
  3702. }
  3703. }
  3704. var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner,
  3705. didReceiveUpdate = !1;
  3706. function reconcileChildren(
  3707. current,
  3708. workInProgress,
  3709. nextChildren,
  3710. renderExpirationTime
  3711. ) {
  3712. workInProgress.child =
  3713. null === current
  3714. ? mountChildFibers(
  3715. workInProgress,
  3716. null,
  3717. nextChildren,
  3718. renderExpirationTime
  3719. )
  3720. : reconcileChildFibers(
  3721. workInProgress,
  3722. current.child,
  3723. nextChildren,
  3724. renderExpirationTime
  3725. );
  3726. }
  3727. function updateForwardRef(
  3728. current,
  3729. workInProgress,
  3730. Component,
  3731. nextProps,
  3732. renderExpirationTime
  3733. ) {
  3734. Component = Component.render;
  3735. var ref = workInProgress.ref;
  3736. prepareToReadContext(workInProgress, renderExpirationTime);
  3737. nextProps = renderWithHooks(
  3738. current,
  3739. workInProgress,
  3740. Component,
  3741. nextProps,
  3742. ref,
  3743. renderExpirationTime
  3744. );
  3745. if (null !== current && !didReceiveUpdate)
  3746. return (
  3747. (workInProgress.updateQueue = current.updateQueue),
  3748. (workInProgress.effectTag &= -517),
  3749. current.expirationTime <= renderExpirationTime &&
  3750. (current.expirationTime = 0),
  3751. bailoutOnAlreadyFinishedWork(
  3752. current,
  3753. workInProgress,
  3754. renderExpirationTime
  3755. )
  3756. );
  3757. workInProgress.effectTag |= 1;
  3758. reconcileChildren(current, workInProgress, nextProps, renderExpirationTime);
  3759. return workInProgress.child;
  3760. }
  3761. function updateMemoComponent(
  3762. current,
  3763. workInProgress,
  3764. Component,
  3765. nextProps,
  3766. updateExpirationTime,
  3767. renderExpirationTime
  3768. ) {
  3769. if (null === current) {
  3770. var type = Component.type;
  3771. if (
  3772. "function" === typeof type &&
  3773. !shouldConstruct(type) &&
  3774. void 0 === type.defaultProps &&
  3775. null === Component.compare &&
  3776. void 0 === Component.defaultProps
  3777. )
  3778. return (
  3779. (workInProgress.tag = 15),
  3780. (workInProgress.type = type),
  3781. updateSimpleMemoComponent(
  3782. current,
  3783. workInProgress,
  3784. type,
  3785. nextProps,
  3786. updateExpirationTime,
  3787. renderExpirationTime
  3788. )
  3789. );
  3790. current = createFiberFromTypeAndProps(
  3791. Component.type,
  3792. null,
  3793. nextProps,
  3794. null,
  3795. workInProgress.mode,
  3796. renderExpirationTime
  3797. );
  3798. current.ref = workInProgress.ref;
  3799. current.return = workInProgress;
  3800. return (workInProgress.child = current);
  3801. }
  3802. type = current.child;
  3803. if (
  3804. updateExpirationTime < renderExpirationTime &&
  3805. ((updateExpirationTime = type.memoizedProps),
  3806. (Component = Component.compare),
  3807. (Component = null !== Component ? Component : shallowEqual),
  3808. Component(updateExpirationTime, nextProps) &&
  3809. current.ref === workInProgress.ref)
  3810. )
  3811. return bailoutOnAlreadyFinishedWork(
  3812. current,
  3813. workInProgress,
  3814. renderExpirationTime
  3815. );
  3816. workInProgress.effectTag |= 1;
  3817. current = createWorkInProgress(type, nextProps);
  3818. current.ref = workInProgress.ref;
  3819. current.return = workInProgress;
  3820. return (workInProgress.child = current);
  3821. }
  3822. function updateSimpleMemoComponent(
  3823. current,
  3824. workInProgress,
  3825. Component,
  3826. nextProps,
  3827. updateExpirationTime,
  3828. renderExpirationTime
  3829. ) {
  3830. return null !== current &&
  3831. shallowEqual(current.memoizedProps, nextProps) &&
  3832. current.ref === workInProgress.ref &&
  3833. ((didReceiveUpdate = !1), updateExpirationTime < renderExpirationTime)
  3834. ? ((workInProgress.expirationTime = current.expirationTime),
  3835. bailoutOnAlreadyFinishedWork(
  3836. current,
  3837. workInProgress,
  3838. renderExpirationTime
  3839. ))
  3840. : updateFunctionComponent(
  3841. current,
  3842. workInProgress,
  3843. Component,
  3844. nextProps,
  3845. renderExpirationTime
  3846. );
  3847. }
  3848. function markRef(current, workInProgress) {
  3849. var ref = workInProgress.ref;
  3850. if (
  3851. (null === current && null !== ref) ||
  3852. (null !== current && current.ref !== ref)
  3853. )
  3854. workInProgress.effectTag |= 128;
  3855. }
  3856. function updateFunctionComponent(
  3857. current,
  3858. workInProgress,
  3859. Component,
  3860. nextProps,
  3861. renderExpirationTime
  3862. ) {
  3863. var context = isContextProvider(Component)
  3864. ? previousContext
  3865. : contextStackCursor.current;
  3866. context = getMaskedContext(workInProgress, context);
  3867. prepareToReadContext(workInProgress, renderExpirationTime);
  3868. Component = renderWithHooks(
  3869. current,
  3870. workInProgress,
  3871. Component,
  3872. nextProps,
  3873. context,
  3874. renderExpirationTime
  3875. );
  3876. if (null !== current && !didReceiveUpdate)
  3877. return (
  3878. (workInProgress.updateQueue = current.updateQueue),
  3879. (workInProgress.effectTag &= -517),
  3880. current.expirationTime <= renderExpirationTime &&
  3881. (current.expirationTime = 0),
  3882. bailoutOnAlreadyFinishedWork(
  3883. current,
  3884. workInProgress,
  3885. renderExpirationTime
  3886. )
  3887. );
  3888. workInProgress.effectTag |= 1;
  3889. reconcileChildren(current, workInProgress, Component, renderExpirationTime);
  3890. return workInProgress.child;
  3891. }
  3892. function updateClassComponent(
  3893. current,
  3894. workInProgress,
  3895. Component,
  3896. nextProps,
  3897. renderExpirationTime
  3898. ) {
  3899. if (isContextProvider(Component)) {
  3900. var hasContext = !0;
  3901. pushContextProvider(workInProgress);
  3902. } else hasContext = !1;
  3903. prepareToReadContext(workInProgress, renderExpirationTime);
  3904. if (null === workInProgress.stateNode)
  3905. null !== current &&
  3906. ((current.alternate = null),
  3907. (workInProgress.alternate = null),
  3908. (workInProgress.effectTag |= 2)),
  3909. constructClassInstance(workInProgress, Component, nextProps),
  3910. mountClassInstance(
  3911. workInProgress,
  3912. Component,
  3913. nextProps,
  3914. renderExpirationTime
  3915. ),
  3916. (nextProps = !0);
  3917. else if (null === current) {
  3918. var instance = workInProgress.stateNode,
  3919. oldProps = workInProgress.memoizedProps;
  3920. instance.props = oldProps;
  3921. var oldContext = instance.context,
  3922. contextType = Component.contextType;
  3923. "object" === typeof contextType && null !== contextType
  3924. ? (contextType = readContext(contextType))
  3925. : ((contextType = isContextProvider(Component)
  3926. ? previousContext
  3927. : contextStackCursor.current),
  3928. (contextType = getMaskedContext(workInProgress, contextType)));
  3929. var getDerivedStateFromProps = Component.getDerivedStateFromProps,
  3930. hasNewLifecycles =
  3931. "function" === typeof getDerivedStateFromProps ||
  3932. "function" === typeof instance.getSnapshotBeforeUpdate;
  3933. hasNewLifecycles ||
  3934. ("function" !== typeof instance.UNSAFE_componentWillReceiveProps &&
  3935. "function" !== typeof instance.componentWillReceiveProps) ||
  3936. ((oldProps !== nextProps || oldContext !== contextType) &&
  3937. callComponentWillReceiveProps(
  3938. workInProgress,
  3939. instance,
  3940. nextProps,
  3941. contextType
  3942. ));
  3943. hasForceUpdate = !1;
  3944. var oldState = workInProgress.memoizedState;
  3945. instance.state = oldState;
  3946. processUpdateQueue(
  3947. workInProgress,
  3948. nextProps,
  3949. instance,
  3950. renderExpirationTime
  3951. );
  3952. oldContext = workInProgress.memoizedState;
  3953. oldProps !== nextProps ||
  3954. oldState !== oldContext ||
  3955. didPerformWorkStackCursor.current ||
  3956. hasForceUpdate
  3957. ? ("function" === typeof getDerivedStateFromProps &&
  3958. (applyDerivedStateFromProps(
  3959. workInProgress,
  3960. Component,
  3961. getDerivedStateFromProps,
  3962. nextProps
  3963. ),
  3964. (oldContext = workInProgress.memoizedState)),
  3965. (oldProps =
  3966. hasForceUpdate ||
  3967. checkShouldComponentUpdate(
  3968. workInProgress,
  3969. Component,
  3970. oldProps,
  3971. nextProps,
  3972. oldState,
  3973. oldContext,
  3974. contextType
  3975. ))
  3976. ? (hasNewLifecycles ||
  3977. ("function" !== typeof instance.UNSAFE_componentWillMount &&
  3978. "function" !== typeof instance.componentWillMount) ||
  3979. ("function" === typeof instance.componentWillMount &&
  3980. instance.componentWillMount(),
  3981. "function" === typeof instance.UNSAFE_componentWillMount &&
  3982. instance.UNSAFE_componentWillMount()),
  3983. "function" === typeof instance.componentDidMount &&
  3984. (workInProgress.effectTag |= 4))
  3985. : ("function" === typeof instance.componentDidMount &&
  3986. (workInProgress.effectTag |= 4),
  3987. (workInProgress.memoizedProps = nextProps),
  3988. (workInProgress.memoizedState = oldContext)),
  3989. (instance.props = nextProps),
  3990. (instance.state = oldContext),
  3991. (instance.context = contextType),
  3992. (nextProps = oldProps))
  3993. : ("function" === typeof instance.componentDidMount &&
  3994. (workInProgress.effectTag |= 4),
  3995. (nextProps = !1));
  3996. } else
  3997. (instance = workInProgress.stateNode),
  3998. cloneUpdateQueue(current, workInProgress),
  3999. (oldProps = workInProgress.memoizedProps),
  4000. (instance.props =
  4001. workInProgress.type === workInProgress.elementType
  4002. ? oldProps
  4003. : resolveDefaultProps(workInProgress.type, oldProps)),
  4004. (oldContext = instance.context),
  4005. (contextType = Component.contextType),
  4006. "object" === typeof contextType && null !== contextType
  4007. ? (contextType = readContext(contextType))
  4008. : ((contextType = isContextProvider(Component)
  4009. ? previousContext
  4010. : contextStackCursor.current),
  4011. (contextType = getMaskedContext(workInProgress, contextType))),
  4012. (getDerivedStateFromProps = Component.getDerivedStateFromProps),
  4013. (hasNewLifecycles =
  4014. "function" === typeof getDerivedStateFromProps ||
  4015. "function" === typeof instance.getSnapshotBeforeUpdate) ||
  4016. ("function" !== typeof instance.UNSAFE_componentWillReceiveProps &&
  4017. "function" !== typeof instance.componentWillReceiveProps) ||
  4018. ((oldProps !== nextProps || oldContext !== contextType) &&
  4019. callComponentWillReceiveProps(
  4020. workInProgress,
  4021. instance,
  4022. nextProps,
  4023. contextType
  4024. )),
  4025. (hasForceUpdate = !1),
  4026. (oldContext = workInProgress.memoizedState),
  4027. (instance.state = oldContext),
  4028. processUpdateQueue(
  4029. workInProgress,
  4030. nextProps,
  4031. instance,
  4032. renderExpirationTime
  4033. ),
  4034. (oldState = workInProgress.memoizedState),
  4035. oldProps !== nextProps ||
  4036. oldContext !== oldState ||
  4037. didPerformWorkStackCursor.current ||
  4038. hasForceUpdate
  4039. ? ("function" === typeof getDerivedStateFromProps &&
  4040. (applyDerivedStateFromProps(
  4041. workInProgress,
  4042. Component,
  4043. getDerivedStateFromProps,
  4044. nextProps
  4045. ),
  4046. (oldState = workInProgress.memoizedState)),
  4047. (getDerivedStateFromProps =
  4048. hasForceUpdate ||
  4049. checkShouldComponentUpdate(
  4050. workInProgress,
  4051. Component,
  4052. oldProps,
  4053. nextProps,
  4054. oldContext,
  4055. oldState,
  4056. contextType
  4057. ))
  4058. ? (hasNewLifecycles ||
  4059. ("function" !== typeof instance.UNSAFE_componentWillUpdate &&
  4060. "function" !== typeof instance.componentWillUpdate) ||
  4061. ("function" === typeof instance.componentWillUpdate &&
  4062. instance.componentWillUpdate(
  4063. nextProps,
  4064. oldState,
  4065. contextType
  4066. ),
  4067. "function" === typeof instance.UNSAFE_componentWillUpdate &&
  4068. instance.UNSAFE_componentWillUpdate(
  4069. nextProps,
  4070. oldState,
  4071. contextType
  4072. )),
  4073. "function" === typeof instance.componentDidUpdate &&
  4074. (workInProgress.effectTag |= 4),
  4075. "function" === typeof instance.getSnapshotBeforeUpdate &&
  4076. (workInProgress.effectTag |= 256))
  4077. : ("function" !== typeof instance.componentDidUpdate ||
  4078. (oldProps === current.memoizedProps &&
  4079. oldContext === current.memoizedState) ||
  4080. (workInProgress.effectTag |= 4),
  4081. "function" !== typeof instance.getSnapshotBeforeUpdate ||
  4082. (oldProps === current.memoizedProps &&
  4083. oldContext === current.memoizedState) ||
  4084. (workInProgress.effectTag |= 256),
  4085. (workInProgress.memoizedProps = nextProps),
  4086. (workInProgress.memoizedState = oldState)),
  4087. (instance.props = nextProps),
  4088. (instance.state = oldState),
  4089. (instance.context = contextType),
  4090. (nextProps = getDerivedStateFromProps))
  4091. : ("function" !== typeof instance.componentDidUpdate ||
  4092. (oldProps === current.memoizedProps &&
  4093. oldContext === current.memoizedState) ||
  4094. (workInProgress.effectTag |= 4),
  4095. "function" !== typeof instance.getSnapshotBeforeUpdate ||
  4096. (oldProps === current.memoizedProps &&
  4097. oldContext === current.memoizedState) ||
  4098. (workInProgress.effectTag |= 256),
  4099. (nextProps = !1));
  4100. return finishClassComponent(
  4101. current,
  4102. workInProgress,
  4103. Component,
  4104. nextProps,
  4105. hasContext,
  4106. renderExpirationTime
  4107. );
  4108. }
  4109. function finishClassComponent(
  4110. current,
  4111. workInProgress,
  4112. Component,
  4113. shouldUpdate,
  4114. hasContext,
  4115. renderExpirationTime
  4116. ) {
  4117. markRef(current, workInProgress);
  4118. var didCaptureError = 0 !== (workInProgress.effectTag & 64);
  4119. if (!shouldUpdate && !didCaptureError)
  4120. return (
  4121. hasContext && invalidateContextProvider(workInProgress, Component, !1),
  4122. bailoutOnAlreadyFinishedWork(
  4123. current,
  4124. workInProgress,
  4125. renderExpirationTime
  4126. )
  4127. );
  4128. shouldUpdate = workInProgress.stateNode;
  4129. ReactCurrentOwner$1.current = workInProgress;
  4130. if (
  4131. didCaptureError &&
  4132. "function" !== typeof Component.getDerivedStateFromError
  4133. ) {
  4134. var nextChildren = null;
  4135. profilerStartTime = -1;
  4136. } else nextChildren = shouldUpdate.render();
  4137. workInProgress.effectTag |= 1;
  4138. null !== current && didCaptureError
  4139. ? ((didCaptureError = nextChildren),
  4140. (workInProgress.child = reconcileChildFibers(
  4141. workInProgress,
  4142. current.child,
  4143. null,
  4144. renderExpirationTime
  4145. )),
  4146. (workInProgress.child = reconcileChildFibers(
  4147. workInProgress,
  4148. null,
  4149. didCaptureError,
  4150. renderExpirationTime
  4151. )))
  4152. : reconcileChildren(
  4153. current,
  4154. workInProgress,
  4155. nextChildren,
  4156. renderExpirationTime
  4157. );
  4158. workInProgress.memoizedState = shouldUpdate.state;
  4159. hasContext && invalidateContextProvider(workInProgress, Component, !0);
  4160. return workInProgress.child;
  4161. }
  4162. function pushHostRootContext(workInProgress) {
  4163. var root = workInProgress.stateNode;
  4164. root.pendingContext
  4165. ? pushTopLevelContextObject(
  4166. workInProgress,
  4167. root.pendingContext,
  4168. root.pendingContext !== root.context
  4169. )
  4170. : root.context &&
  4171. pushTopLevelContextObject(workInProgress, root.context, !1);
  4172. pushHostContainer(workInProgress, root.containerInfo);
  4173. }
  4174. var SUSPENDED_MARKER = { dehydrated: null, retryTime: 0 };
  4175. function updateSuspenseComponent(
  4176. current,
  4177. workInProgress,
  4178. renderExpirationTime
  4179. ) {
  4180. var mode = workInProgress.mode,
  4181. nextProps = workInProgress.pendingProps,
  4182. suspenseContext = suspenseStackCursor.current,
  4183. nextDidTimeout = !1,
  4184. JSCompiler_temp;
  4185. (JSCompiler_temp = 0 !== (workInProgress.effectTag & 64)) ||
  4186. (JSCompiler_temp =
  4187. 0 !== (suspenseContext & 2) &&
  4188. (null === current || null !== current.memoizedState));
  4189. JSCompiler_temp
  4190. ? ((nextDidTimeout = !0), (workInProgress.effectTag &= -65))
  4191. : (null !== current && null === current.memoizedState) ||
  4192. void 0 === nextProps.fallback ||
  4193. !0 === nextProps.unstable_avoidThisFallback ||
  4194. (suspenseContext |= 1);
  4195. push(suspenseStackCursor, suspenseContext & 1);
  4196. if (null === current) {
  4197. if (nextDidTimeout) {
  4198. nextDidTimeout = nextProps.fallback;
  4199. nextProps = createFiberFromFragment(null, mode, 0, null);
  4200. nextProps.return = workInProgress;
  4201. if (0 === (workInProgress.mode & 2))
  4202. for (
  4203. current =
  4204. null !== workInProgress.memoizedState
  4205. ? workInProgress.child.child
  4206. : workInProgress.child,
  4207. nextProps.child = current;
  4208. null !== current;
  4209. )
  4210. (current.return = nextProps), (current = current.sibling);
  4211. renderExpirationTime = createFiberFromFragment(
  4212. nextDidTimeout,
  4213. mode,
  4214. renderExpirationTime,
  4215. null
  4216. );
  4217. renderExpirationTime.return = workInProgress;
  4218. nextProps.sibling = renderExpirationTime;
  4219. workInProgress.memoizedState = SUSPENDED_MARKER;
  4220. workInProgress.child = nextProps;
  4221. return renderExpirationTime;
  4222. }
  4223. mode = nextProps.children;
  4224. workInProgress.memoizedState = null;
  4225. return (workInProgress.child = mountChildFibers(
  4226. workInProgress,
  4227. null,
  4228. mode,
  4229. renderExpirationTime
  4230. ));
  4231. }
  4232. if (null !== current.memoizedState) {
  4233. current = current.child;
  4234. mode = current.sibling;
  4235. if (nextDidTimeout) {
  4236. nextProps = nextProps.fallback;
  4237. renderExpirationTime = createWorkInProgress(
  4238. current,
  4239. current.pendingProps
  4240. );
  4241. renderExpirationTime.return = workInProgress;
  4242. if (
  4243. 0 === (workInProgress.mode & 2) &&
  4244. ((nextDidTimeout =
  4245. null !== workInProgress.memoizedState
  4246. ? workInProgress.child.child
  4247. : workInProgress.child),
  4248. nextDidTimeout !== current.child)
  4249. )
  4250. for (
  4251. renderExpirationTime.child = nextDidTimeout;
  4252. null !== nextDidTimeout;
  4253. )
  4254. (nextDidTimeout.return = renderExpirationTime),
  4255. (nextDidTimeout = nextDidTimeout.sibling);
  4256. if (workInProgress.mode & 8) {
  4257. nextDidTimeout = 0;
  4258. for (current = renderExpirationTime.child; null !== current; )
  4259. (nextDidTimeout += current.treeBaseDuration),
  4260. (current = current.sibling);
  4261. renderExpirationTime.treeBaseDuration = nextDidTimeout;
  4262. }
  4263. mode = createWorkInProgress(mode, nextProps);
  4264. mode.return = workInProgress;
  4265. renderExpirationTime.sibling = mode;
  4266. renderExpirationTime.childExpirationTime = 0;
  4267. workInProgress.memoizedState = SUSPENDED_MARKER;
  4268. workInProgress.child = renderExpirationTime;
  4269. return mode;
  4270. }
  4271. renderExpirationTime = reconcileChildFibers(
  4272. workInProgress,
  4273. current.child,
  4274. nextProps.children,
  4275. renderExpirationTime
  4276. );
  4277. workInProgress.memoizedState = null;
  4278. return (workInProgress.child = renderExpirationTime);
  4279. }
  4280. current = current.child;
  4281. if (nextDidTimeout) {
  4282. nextDidTimeout = nextProps.fallback;
  4283. nextProps = createFiberFromFragment(null, mode, 0, null);
  4284. nextProps.return = workInProgress;
  4285. nextProps.child = current;
  4286. null !== current && (current.return = nextProps);
  4287. if (0 === (workInProgress.mode & 2))
  4288. for (
  4289. current =
  4290. null !== workInProgress.memoizedState
  4291. ? workInProgress.child.child
  4292. : workInProgress.child,
  4293. nextProps.child = current;
  4294. null !== current;
  4295. )
  4296. (current.return = nextProps), (current = current.sibling);
  4297. if (workInProgress.mode & 8) {
  4298. current = 0;
  4299. for (suspenseContext = nextProps.child; null !== suspenseContext; )
  4300. (current += suspenseContext.treeBaseDuration),
  4301. (suspenseContext = suspenseContext.sibling);
  4302. nextProps.treeBaseDuration = current;
  4303. }
  4304. renderExpirationTime = createFiberFromFragment(
  4305. nextDidTimeout,
  4306. mode,
  4307. renderExpirationTime,
  4308. null
  4309. );
  4310. renderExpirationTime.return = workInProgress;
  4311. nextProps.sibling = renderExpirationTime;
  4312. renderExpirationTime.effectTag |= 2;
  4313. nextProps.childExpirationTime = 0;
  4314. workInProgress.memoizedState = SUSPENDED_MARKER;
  4315. workInProgress.child = nextProps;
  4316. return renderExpirationTime;
  4317. }
  4318. workInProgress.memoizedState = null;
  4319. return (workInProgress.child = reconcileChildFibers(
  4320. workInProgress,
  4321. current,
  4322. nextProps.children,
  4323. renderExpirationTime
  4324. ));
  4325. }
  4326. function scheduleWorkOnFiber(fiber, renderExpirationTime) {
  4327. fiber.expirationTime < renderExpirationTime &&
  4328. (fiber.expirationTime = renderExpirationTime);
  4329. var alternate = fiber.alternate;
  4330. null !== alternate &&
  4331. alternate.expirationTime < renderExpirationTime &&
  4332. (alternate.expirationTime = renderExpirationTime);
  4333. scheduleWorkOnParentPath(fiber.return, renderExpirationTime);
  4334. }
  4335. function initSuspenseListRenderState(
  4336. workInProgress,
  4337. isBackwards,
  4338. tail,
  4339. lastContentRow,
  4340. tailMode,
  4341. lastEffectBeforeRendering
  4342. ) {
  4343. var renderState = workInProgress.memoizedState;
  4344. null === renderState
  4345. ? (workInProgress.memoizedState = {
  4346. isBackwards: isBackwards,
  4347. rendering: null,
  4348. renderingStartTime: 0,
  4349. last: lastContentRow,
  4350. tail: tail,
  4351. tailExpiration: 0,
  4352. tailMode: tailMode,
  4353. lastEffect: lastEffectBeforeRendering
  4354. })
  4355. : ((renderState.isBackwards = isBackwards),
  4356. (renderState.rendering = null),
  4357. (renderState.renderingStartTime = 0),
  4358. (renderState.last = lastContentRow),
  4359. (renderState.tail = tail),
  4360. (renderState.tailExpiration = 0),
  4361. (renderState.tailMode = tailMode),
  4362. (renderState.lastEffect = lastEffectBeforeRendering));
  4363. }
  4364. function updateSuspenseListComponent(
  4365. current,
  4366. workInProgress,
  4367. renderExpirationTime
  4368. ) {
  4369. var nextProps = workInProgress.pendingProps,
  4370. revealOrder = nextProps.revealOrder,
  4371. tailMode = nextProps.tail;
  4372. reconcileChildren(
  4373. current,
  4374. workInProgress,
  4375. nextProps.children,
  4376. renderExpirationTime
  4377. );
  4378. nextProps = suspenseStackCursor.current;
  4379. if (0 !== (nextProps & 2))
  4380. (nextProps = (nextProps & 1) | 2), (workInProgress.effectTag |= 64);
  4381. else {
  4382. if (null !== current && 0 !== (current.effectTag & 64))
  4383. a: for (current = workInProgress.child; null !== current; ) {
  4384. if (13 === current.tag)
  4385. null !== current.memoizedState &&
  4386. scheduleWorkOnFiber(current, renderExpirationTime);
  4387. else if (19 === current.tag)
  4388. scheduleWorkOnFiber(current, renderExpirationTime);
  4389. else if (null !== current.child) {
  4390. current.child.return = current;
  4391. current = current.child;
  4392. continue;
  4393. }
  4394. if (current === workInProgress) break a;
  4395. for (; null === current.sibling; ) {
  4396. if (null === current.return || current.return === workInProgress)
  4397. break a;
  4398. current = current.return;
  4399. }
  4400. current.sibling.return = current.return;
  4401. current = current.sibling;
  4402. }
  4403. nextProps &= 1;
  4404. }
  4405. push(suspenseStackCursor, nextProps);
  4406. if (0 === (workInProgress.mode & 2)) workInProgress.memoizedState = null;
  4407. else
  4408. switch (revealOrder) {
  4409. case "forwards":
  4410. renderExpirationTime = workInProgress.child;
  4411. for (revealOrder = null; null !== renderExpirationTime; )
  4412. (current = renderExpirationTime.alternate),
  4413. null !== current &&
  4414. null === findFirstSuspended(current) &&
  4415. (revealOrder = renderExpirationTime),
  4416. (renderExpirationTime = renderExpirationTime.sibling);
  4417. renderExpirationTime = revealOrder;
  4418. null === renderExpirationTime
  4419. ? ((revealOrder = workInProgress.child),
  4420. (workInProgress.child = null))
  4421. : ((revealOrder = renderExpirationTime.sibling),
  4422. (renderExpirationTime.sibling = null));
  4423. initSuspenseListRenderState(
  4424. workInProgress,
  4425. !1,
  4426. revealOrder,
  4427. renderExpirationTime,
  4428. tailMode,
  4429. workInProgress.lastEffect
  4430. );
  4431. break;
  4432. case "backwards":
  4433. renderExpirationTime = null;
  4434. revealOrder = workInProgress.child;
  4435. for (workInProgress.child = null; null !== revealOrder; ) {
  4436. current = revealOrder.alternate;
  4437. if (null !== current && null === findFirstSuspended(current)) {
  4438. workInProgress.child = revealOrder;
  4439. break;
  4440. }
  4441. current = revealOrder.sibling;
  4442. revealOrder.sibling = renderExpirationTime;
  4443. renderExpirationTime = revealOrder;
  4444. revealOrder = current;
  4445. }
  4446. initSuspenseListRenderState(
  4447. workInProgress,
  4448. !0,
  4449. renderExpirationTime,
  4450. null,
  4451. tailMode,
  4452. workInProgress.lastEffect
  4453. );
  4454. break;
  4455. case "together":
  4456. initSuspenseListRenderState(
  4457. workInProgress,
  4458. !1,
  4459. null,
  4460. null,
  4461. void 0,
  4462. workInProgress.lastEffect
  4463. );
  4464. break;
  4465. default:
  4466. workInProgress.memoizedState = null;
  4467. }
  4468. return workInProgress.child;
  4469. }
  4470. function bailoutOnAlreadyFinishedWork(
  4471. current,
  4472. workInProgress,
  4473. renderExpirationTime
  4474. ) {
  4475. null !== current && (workInProgress.dependencies = current.dependencies);
  4476. profilerStartTime = -1;
  4477. var updateExpirationTime = workInProgress.expirationTime;
  4478. 0 !== updateExpirationTime && markUnprocessedUpdateTime(updateExpirationTime);
  4479. if (workInProgress.childExpirationTime < renderExpirationTime) return null;
  4480. if (null !== current && workInProgress.child !== current.child)
  4481. throw Error("Resuming work not yet implemented.");
  4482. if (null !== workInProgress.child) {
  4483. current = workInProgress.child;
  4484. renderExpirationTime = createWorkInProgress(current, current.pendingProps);
  4485. workInProgress.child = renderExpirationTime;
  4486. for (
  4487. renderExpirationTime.return = workInProgress;
  4488. null !== current.sibling;
  4489. )
  4490. (current = current.sibling),
  4491. (renderExpirationTime = renderExpirationTime.sibling = createWorkInProgress(
  4492. current,
  4493. current.pendingProps
  4494. )),
  4495. (renderExpirationTime.return = workInProgress);
  4496. renderExpirationTime.sibling = null;
  4497. }
  4498. return workInProgress.child;
  4499. }
  4500. var appendAllChildren,
  4501. updateHostContainer,
  4502. updateHostComponent$1,
  4503. updateHostText$1;
  4504. appendAllChildren = function(parent, workInProgress) {
  4505. for (var node = workInProgress.child; null !== node; ) {
  4506. if (5 === node.tag || 6 === node.tag) parent._children.push(node.stateNode);
  4507. else if (4 !== node.tag && null !== node.child) {
  4508. node.child.return = node;
  4509. node = node.child;
  4510. continue;
  4511. }
  4512. if (node === workInProgress) break;
  4513. for (; null === node.sibling; ) {
  4514. if (null === node.return || node.return === workInProgress) return;
  4515. node = node.return;
  4516. }
  4517. node.sibling.return = node.return;
  4518. node = node.sibling;
  4519. }
  4520. };
  4521. updateHostContainer = function() {};
  4522. updateHostComponent$1 = function(current, workInProgress, type, newProps) {
  4523. current.memoizedProps !== newProps &&
  4524. (requiredContext(contextStackCursor$1.current),
  4525. (workInProgress.updateQueue = UPDATE_SIGNAL)) &&
  4526. (workInProgress.effectTag |= 4);
  4527. };
  4528. updateHostText$1 = function(current, workInProgress, oldText, newText) {
  4529. oldText !== newText && (workInProgress.effectTag |= 4);
  4530. };
  4531. function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
  4532. switch (renderState.tailMode) {
  4533. case "hidden":
  4534. hasRenderedATailFallback = renderState.tail;
  4535. for (var lastTailNode = null; null !== hasRenderedATailFallback; )
  4536. null !== hasRenderedATailFallback.alternate &&
  4537. (lastTailNode = hasRenderedATailFallback),
  4538. (hasRenderedATailFallback = hasRenderedATailFallback.sibling);
  4539. null === lastTailNode
  4540. ? (renderState.tail = null)
  4541. : (lastTailNode.sibling = null);
  4542. break;
  4543. case "collapsed":
  4544. lastTailNode = renderState.tail;
  4545. for (var _lastTailNode = null; null !== lastTailNode; )
  4546. null !== lastTailNode.alternate && (_lastTailNode = lastTailNode),
  4547. (lastTailNode = lastTailNode.sibling);
  4548. null === _lastTailNode
  4549. ? hasRenderedATailFallback || null === renderState.tail
  4550. ? (renderState.tail = null)
  4551. : (renderState.tail.sibling = null)
  4552. : (_lastTailNode.sibling = null);
  4553. }
  4554. }
  4555. function completeWork(current, workInProgress, renderExpirationTime) {
  4556. var newProps = workInProgress.pendingProps;
  4557. switch (workInProgress.tag) {
  4558. case 2:
  4559. case 16:
  4560. case 15:
  4561. case 0:
  4562. case 11:
  4563. case 7:
  4564. case 8:
  4565. case 12:
  4566. case 9:
  4567. case 14:
  4568. return null;
  4569. case 1:
  4570. return isContextProvider(workInProgress.type) && popContext(), null;
  4571. case 3:
  4572. return (
  4573. popHostContainer(),
  4574. pop(didPerformWorkStackCursor),
  4575. pop(contextStackCursor),
  4576. (current = workInProgress.stateNode),
  4577. current.pendingContext &&
  4578. ((current.context = current.pendingContext),
  4579. (current.pendingContext = null)),
  4580. updateHostContainer(workInProgress),
  4581. null
  4582. );
  4583. case 5:
  4584. popHostContext(workInProgress);
  4585. var rootContainerInstance = requiredContext(
  4586. rootInstanceStackCursor.current
  4587. );
  4588. renderExpirationTime = workInProgress.type;
  4589. if (null !== current && null != workInProgress.stateNode)
  4590. updateHostComponent$1(
  4591. current,
  4592. workInProgress,
  4593. renderExpirationTime,
  4594. newProps,
  4595. rootContainerInstance
  4596. ),
  4597. current.ref !== workInProgress.ref &&
  4598. (workInProgress.effectTag |= 128);
  4599. else {
  4600. if (!newProps) {
  4601. if (null === workInProgress.stateNode)
  4602. throw Error(
  4603. "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
  4604. );
  4605. return null;
  4606. }
  4607. requiredContext(contextStackCursor$1.current);
  4608. current = allocateTag();
  4609. renderExpirationTime = getViewConfigForType(renderExpirationTime);
  4610. var updatePayload = diffProperties(
  4611. null,
  4612. emptyObject,
  4613. newProps,
  4614. renderExpirationTime.validAttributes
  4615. );
  4616. ReactNativePrivateInterface.UIManager.createView(
  4617. current,
  4618. renderExpirationTime.uiViewClassName,
  4619. rootContainerInstance,
  4620. updatePayload
  4621. );
  4622. rootContainerInstance = new ReactNativeFiberHostComponent(
  4623. current,
  4624. renderExpirationTime,
  4625. workInProgress
  4626. );
  4627. instanceCache.set(current, workInProgress);
  4628. instanceProps.set(current, newProps);
  4629. appendAllChildren(rootContainerInstance, workInProgress, !1, !1);
  4630. workInProgress.stateNode = rootContainerInstance;
  4631. finalizeInitialChildren(rootContainerInstance) &&
  4632. (workInProgress.effectTag |= 4);
  4633. null !== workInProgress.ref && (workInProgress.effectTag |= 128);
  4634. }
  4635. return null;
  4636. case 6:
  4637. if (current && null != workInProgress.stateNode)
  4638. updateHostText$1(
  4639. current,
  4640. workInProgress,
  4641. current.memoizedProps,
  4642. newProps
  4643. );
  4644. else {
  4645. if ("string" !== typeof newProps && null === workInProgress.stateNode)
  4646. throw Error(
  4647. "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
  4648. );
  4649. current = requiredContext(rootInstanceStackCursor.current);
  4650. if (!requiredContext(contextStackCursor$1.current).isInAParentText)
  4651. throw Error(
  4652. "Text strings must be rendered within a <Text> component."
  4653. );
  4654. rootContainerInstance = allocateTag();
  4655. ReactNativePrivateInterface.UIManager.createView(
  4656. rootContainerInstance,
  4657. "RCTRawText",
  4658. current,
  4659. { text: newProps }
  4660. );
  4661. instanceCache.set(rootContainerInstance, workInProgress);
  4662. workInProgress.stateNode = rootContainerInstance;
  4663. }
  4664. return null;
  4665. case 13:
  4666. pop(suspenseStackCursor);
  4667. newProps = workInProgress.memoizedState;
  4668. if (0 !== (workInProgress.effectTag & 64))
  4669. return (
  4670. (workInProgress.expirationTime = renderExpirationTime), workInProgress
  4671. );
  4672. newProps = null !== newProps;
  4673. rootContainerInstance = !1;
  4674. null !== current &&
  4675. ((renderExpirationTime = current.memoizedState),
  4676. (rootContainerInstance = null !== renderExpirationTime),
  4677. newProps ||
  4678. null === renderExpirationTime ||
  4679. ((renderExpirationTime = current.child.sibling),
  4680. null !== renderExpirationTime &&
  4681. ((updatePayload = workInProgress.firstEffect),
  4682. null !== updatePayload
  4683. ? ((workInProgress.firstEffect = renderExpirationTime),
  4684. (renderExpirationTime.nextEffect = updatePayload))
  4685. : ((workInProgress.firstEffect = workInProgress.lastEffect = renderExpirationTime),
  4686. (renderExpirationTime.nextEffect = null)),
  4687. (renderExpirationTime.effectTag = 8))));
  4688. if (newProps && !rootContainerInstance && 0 !== (workInProgress.mode & 2))
  4689. if (
  4690. (null === current &&
  4691. !0 !== workInProgress.memoizedProps.unstable_avoidThisFallback) ||
  4692. 0 !== (suspenseStackCursor.current & 1)
  4693. )
  4694. workInProgressRootExitStatus === RootIncomplete &&
  4695. (workInProgressRootExitStatus = RootSuspended);
  4696. else {
  4697. if (
  4698. workInProgressRootExitStatus === RootIncomplete ||
  4699. workInProgressRootExitStatus === RootSuspended
  4700. )
  4701. workInProgressRootExitStatus = RootSuspendedWithDelay;
  4702. 0 !== workInProgressRootNextUnprocessedUpdateTime &&
  4703. null !== workInProgressRoot &&
  4704. (markRootSuspendedAtTime(
  4705. workInProgressRoot,
  4706. renderExpirationTime$1
  4707. ),
  4708. markRootUpdatedAtTime(
  4709. workInProgressRoot,
  4710. workInProgressRootNextUnprocessedUpdateTime
  4711. ));
  4712. }
  4713. if (newProps || rootContainerInstance) workInProgress.effectTag |= 4;
  4714. return null;
  4715. case 4:
  4716. return popHostContainer(), updateHostContainer(workInProgress), null;
  4717. case 10:
  4718. return popProvider(workInProgress), null;
  4719. case 17:
  4720. return isContextProvider(workInProgress.type) && popContext(), null;
  4721. case 19:
  4722. pop(suspenseStackCursor);
  4723. newProps = workInProgress.memoizedState;
  4724. if (null === newProps) return null;
  4725. rootContainerInstance = 0 !== (workInProgress.effectTag & 64);
  4726. updatePayload = newProps.rendering;
  4727. if (null === updatePayload)
  4728. if (rootContainerInstance) cutOffTailIfNeeded(newProps, !1);
  4729. else {
  4730. if (
  4731. workInProgressRootExitStatus !== RootIncomplete ||
  4732. (null !== current && 0 !== (current.effectTag & 64))
  4733. )
  4734. for (current = workInProgress.child; null !== current; ) {
  4735. updatePayload = findFirstSuspended(current);
  4736. if (null !== updatePayload) {
  4737. workInProgress.effectTag |= 64;
  4738. cutOffTailIfNeeded(newProps, !1);
  4739. current = updatePayload.updateQueue;
  4740. null !== current &&
  4741. ((workInProgress.updateQueue = current),
  4742. (workInProgress.effectTag |= 4));
  4743. null === newProps.lastEffect &&
  4744. (workInProgress.firstEffect = null);
  4745. workInProgress.lastEffect = newProps.lastEffect;
  4746. current = renderExpirationTime;
  4747. for (newProps = workInProgress.child; null !== newProps; )
  4748. (rootContainerInstance = newProps),
  4749. (updatePayload = current),
  4750. (rootContainerInstance.effectTag &= 2),
  4751. (rootContainerInstance.nextEffect = null),
  4752. (rootContainerInstance.firstEffect = null),
  4753. (rootContainerInstance.lastEffect = null),
  4754. (renderExpirationTime = rootContainerInstance.alternate),
  4755. null === renderExpirationTime
  4756. ? ((rootContainerInstance.childExpirationTime = 0),
  4757. (rootContainerInstance.expirationTime = updatePayload),
  4758. (rootContainerInstance.child = null),
  4759. (rootContainerInstance.memoizedProps = null),
  4760. (rootContainerInstance.memoizedState = null),
  4761. (rootContainerInstance.updateQueue = null),
  4762. (rootContainerInstance.dependencies = null),
  4763. (rootContainerInstance.selfBaseDuration = 0),
  4764. (rootContainerInstance.treeBaseDuration = 0))
  4765. : ((rootContainerInstance.childExpirationTime =
  4766. renderExpirationTime.childExpirationTime),
  4767. (rootContainerInstance.expirationTime =
  4768. renderExpirationTime.expirationTime),
  4769. (rootContainerInstance.child =
  4770. renderExpirationTime.child),
  4771. (rootContainerInstance.memoizedProps =
  4772. renderExpirationTime.memoizedProps),
  4773. (rootContainerInstance.memoizedState =
  4774. renderExpirationTime.memoizedState),
  4775. (rootContainerInstance.updateQueue =
  4776. renderExpirationTime.updateQueue),
  4777. (updatePayload = renderExpirationTime.dependencies),
  4778. (rootContainerInstance.dependencies =
  4779. null === updatePayload
  4780. ? null
  4781. : {
  4782. expirationTime: updatePayload.expirationTime,
  4783. firstContext: updatePayload.firstContext,
  4784. responders: updatePayload.responders
  4785. }),
  4786. (rootContainerInstance.selfBaseDuration =
  4787. renderExpirationTime.selfBaseDuration),
  4788. (rootContainerInstance.treeBaseDuration =
  4789. renderExpirationTime.treeBaseDuration)),
  4790. (newProps = newProps.sibling);
  4791. push(
  4792. suspenseStackCursor,
  4793. (suspenseStackCursor.current & 1) | 2
  4794. );
  4795. return workInProgress.child;
  4796. }
  4797. current = current.sibling;
  4798. }
  4799. }
  4800. else {
  4801. if (!rootContainerInstance)
  4802. if (
  4803. ((current = findFirstSuspended(updatePayload)), null !== current)
  4804. ) {
  4805. if (
  4806. ((workInProgress.effectTag |= 64),
  4807. (rootContainerInstance = !0),
  4808. (current = current.updateQueue),
  4809. null !== current &&
  4810. ((workInProgress.updateQueue = current),
  4811. (workInProgress.effectTag |= 4)),
  4812. cutOffTailIfNeeded(newProps, !0),
  4813. null === newProps.tail &&
  4814. "hidden" === newProps.tailMode &&
  4815. !updatePayload.alternate)
  4816. )
  4817. return (
  4818. (workInProgress = workInProgress.lastEffect =
  4819. newProps.lastEffect),
  4820. null !== workInProgress && (workInProgress.nextEffect = null),
  4821. null
  4822. );
  4823. } else
  4824. 2 * now() - newProps.renderingStartTime > newProps.tailExpiration &&
  4825. 1 < renderExpirationTime &&
  4826. ((workInProgress.effectTag |= 64),
  4827. (rootContainerInstance = !0),
  4828. cutOffTailIfNeeded(newProps, !1),
  4829. (current = renderExpirationTime - 1),
  4830. (workInProgress.expirationTime = workInProgress.childExpirationTime = current),
  4831. null === spawnedWorkDuringRender
  4832. ? (spawnedWorkDuringRender = [current])
  4833. : spawnedWorkDuringRender.push(current));
  4834. newProps.isBackwards
  4835. ? ((updatePayload.sibling = workInProgress.child),
  4836. (workInProgress.child = updatePayload))
  4837. : ((current = newProps.last),
  4838. null !== current
  4839. ? (current.sibling = updatePayload)
  4840. : (workInProgress.child = updatePayload),
  4841. (newProps.last = updatePayload));
  4842. }
  4843. return null !== newProps.tail
  4844. ? (0 === newProps.tailExpiration &&
  4845. (newProps.tailExpiration = now() + 500),
  4846. (current = newProps.tail),
  4847. (newProps.rendering = current),
  4848. (newProps.tail = current.sibling),
  4849. (newProps.lastEffect = workInProgress.lastEffect),
  4850. (newProps.renderingStartTime = now()),
  4851. (current.sibling = null),
  4852. (workInProgress = suspenseStackCursor.current),
  4853. push(
  4854. suspenseStackCursor,
  4855. rootContainerInstance
  4856. ? (workInProgress & 1) | 2
  4857. : workInProgress & 1
  4858. ),
  4859. current)
  4860. : null;
  4861. }
  4862. throw Error(
  4863. "Unknown unit of work tag (" +
  4864. workInProgress.tag +
  4865. "). This error is likely caused by a bug in React. Please file an issue."
  4866. );
  4867. }
  4868. function unwindWork(workInProgress) {
  4869. switch (workInProgress.tag) {
  4870. case 1:
  4871. isContextProvider(workInProgress.type) && popContext();
  4872. var effectTag = workInProgress.effectTag;
  4873. return effectTag & 4096
  4874. ? ((workInProgress.effectTag = (effectTag & -4097) | 64),
  4875. workInProgress)
  4876. : null;
  4877. case 3:
  4878. popHostContainer();
  4879. pop(didPerformWorkStackCursor);
  4880. pop(contextStackCursor);
  4881. effectTag = workInProgress.effectTag;
  4882. if (0 !== (effectTag & 64))
  4883. throw Error(
  4884. "The root failed to unmount after an error. This is likely a bug in React. Please file an issue."
  4885. );
  4886. workInProgress.effectTag = (effectTag & -4097) | 64;
  4887. return workInProgress;
  4888. case 5:
  4889. return popHostContext(workInProgress), null;
  4890. case 13:
  4891. return (
  4892. pop(suspenseStackCursor),
  4893. (effectTag = workInProgress.effectTag),
  4894. effectTag & 4096
  4895. ? ((workInProgress.effectTag = (effectTag & -4097) | 64),
  4896. workInProgress)
  4897. : null
  4898. );
  4899. case 19:
  4900. return pop(suspenseStackCursor), null;
  4901. case 4:
  4902. return popHostContainer(), null;
  4903. case 10:
  4904. return popProvider(workInProgress), null;
  4905. default:
  4906. return null;
  4907. }
  4908. }
  4909. function createCapturedValue(value, source) {
  4910. return {
  4911. value: value,
  4912. source: source,
  4913. stack: getStackByFiberInDevAndProd(source)
  4914. };
  4915. }
  4916. if (
  4917. "function" !==
  4918. typeof ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog
  4919. )
  4920. throw Error(
  4921. "Expected ReactFiberErrorDialog.showErrorDialog to be a function."
  4922. );
  4923. function logCapturedError(capturedError) {
  4924. !1 !==
  4925. ReactNativePrivateInterface.ReactFiberErrorDialog.showErrorDialog(
  4926. capturedError
  4927. ) && console.error(capturedError.error);
  4928. }
  4929. var PossiblyWeakSet = "function" === typeof WeakSet ? WeakSet : Set;
  4930. function logError(boundary, errorInfo) {
  4931. var source = errorInfo.source,
  4932. stack = errorInfo.stack;
  4933. null === stack &&
  4934. null !== source &&
  4935. (stack = getStackByFiberInDevAndProd(source));
  4936. errorInfo = {
  4937. componentName: null !== source ? getComponentName(source.type) : null,
  4938. componentStack: null !== stack ? stack : "",
  4939. error: errorInfo.value,
  4940. errorBoundary: null,
  4941. errorBoundaryName: null,
  4942. errorBoundaryFound: !1,
  4943. willRetry: !1
  4944. };
  4945. null !== boundary &&
  4946. 1 === boundary.tag &&
  4947. ((errorInfo.errorBoundary = boundary.stateNode),
  4948. (errorInfo.errorBoundaryName = getComponentName(boundary.type)),
  4949. (errorInfo.errorBoundaryFound = !0),
  4950. (errorInfo.willRetry = !0));
  4951. try {
  4952. logCapturedError(errorInfo);
  4953. } catch (e) {
  4954. setTimeout(function() {
  4955. throw e;
  4956. });
  4957. }
  4958. }
  4959. function safelyCallComponentWillUnmount(current, instance) {
  4960. try {
  4961. (instance.props = current.memoizedProps),
  4962. (instance.state = current.memoizedState),
  4963. instance.componentWillUnmount();
  4964. } catch (unmountError) {
  4965. captureCommitPhaseError(current, unmountError);
  4966. }
  4967. }
  4968. function safelyDetachRef(current) {
  4969. var ref = current.ref;
  4970. if (null !== ref)
  4971. if ("function" === typeof ref)
  4972. try {
  4973. ref(null);
  4974. } catch (refError) {
  4975. captureCommitPhaseError(current, refError);
  4976. }
  4977. else ref.current = null;
  4978. }
  4979. function commitBeforeMutationLifeCycles(current, finishedWork) {
  4980. switch (finishedWork.tag) {
  4981. case 0:
  4982. case 11:
  4983. case 15:
  4984. case 22:
  4985. return;
  4986. case 1:
  4987. if (finishedWork.effectTag & 256 && null !== current) {
  4988. var prevProps = current.memoizedProps,
  4989. prevState = current.memoizedState;
  4990. current = finishedWork.stateNode;
  4991. finishedWork = current.getSnapshotBeforeUpdate(
  4992. finishedWork.elementType === finishedWork.type
  4993. ? prevProps
  4994. : resolveDefaultProps(finishedWork.type, prevProps),
  4995. prevState
  4996. );
  4997. current.__reactInternalSnapshotBeforeUpdate = finishedWork;
  4998. }
  4999. return;
  5000. case 3:
  5001. case 5:
  5002. case 6:
  5003. case 4:
  5004. case 17:
  5005. return;
  5006. }
  5007. throw Error(
  5008. "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
  5009. );
  5010. }
  5011. function commitHookEffectListUnmount(tag, finishedWork) {
  5012. finishedWork = finishedWork.updateQueue;
  5013. finishedWork = null !== finishedWork ? finishedWork.lastEffect : null;
  5014. if (null !== finishedWork) {
  5015. var effect = (finishedWork = finishedWork.next);
  5016. do {
  5017. if ((effect.tag & tag) === tag) {
  5018. var destroy = effect.destroy;
  5019. effect.destroy = void 0;
  5020. void 0 !== destroy && destroy();
  5021. }
  5022. effect = effect.next;
  5023. } while (effect !== finishedWork);
  5024. }
  5025. }
  5026. function commitHookEffectListMount(tag, finishedWork) {
  5027. finishedWork = finishedWork.updateQueue;
  5028. finishedWork = null !== finishedWork ? finishedWork.lastEffect : null;
  5029. if (null !== finishedWork) {
  5030. var effect = (finishedWork = finishedWork.next);
  5031. do {
  5032. if ((effect.tag & tag) === tag) {
  5033. var create = effect.create;
  5034. effect.destroy = create();
  5035. }
  5036. effect = effect.next;
  5037. } while (effect !== finishedWork);
  5038. }
  5039. }
  5040. function commitLifeCycles(finishedRoot, current, finishedWork) {
  5041. switch (finishedWork.tag) {
  5042. case 0:
  5043. case 11:
  5044. case 15:
  5045. case 22:
  5046. commitHookEffectListMount(3, finishedWork);
  5047. return;
  5048. case 1:
  5049. finishedRoot = finishedWork.stateNode;
  5050. if (finishedWork.effectTag & 4)
  5051. if (null === current) finishedRoot.componentDidMount();
  5052. else {
  5053. var prevProps =
  5054. finishedWork.elementType === finishedWork.type
  5055. ? current.memoizedProps
  5056. : resolveDefaultProps(finishedWork.type, current.memoizedProps);
  5057. finishedRoot.componentDidUpdate(
  5058. prevProps,
  5059. current.memoizedState,
  5060. finishedRoot.__reactInternalSnapshotBeforeUpdate
  5061. );
  5062. }
  5063. current = finishedWork.updateQueue;
  5064. null !== current &&
  5065. commitUpdateQueue(finishedWork, current, finishedRoot);
  5066. return;
  5067. case 3:
  5068. current = finishedWork.updateQueue;
  5069. if (null !== current) {
  5070. finishedRoot = null;
  5071. if (null !== finishedWork.child)
  5072. switch (finishedWork.child.tag) {
  5073. case 5:
  5074. finishedRoot = finishedWork.child.stateNode;
  5075. break;
  5076. case 1:
  5077. finishedRoot = finishedWork.child.stateNode;
  5078. }
  5079. commitUpdateQueue(finishedWork, current, finishedRoot);
  5080. }
  5081. return;
  5082. case 5:
  5083. return;
  5084. case 6:
  5085. return;
  5086. case 4:
  5087. return;
  5088. case 12:
  5089. prevProps = finishedWork.memoizedProps.onRender;
  5090. var commitTime$jscomp$0 = commitTime;
  5091. "function" === typeof prevProps &&
  5092. prevProps(
  5093. finishedWork.memoizedProps.id,
  5094. null === current ? "mount" : "update",
  5095. finishedWork.actualDuration,
  5096. finishedWork.treeBaseDuration,
  5097. finishedWork.actualStartTime,
  5098. commitTime$jscomp$0,
  5099. finishedRoot.memoizedInteractions
  5100. );
  5101. return;
  5102. case 13:
  5103. return;
  5104. case 19:
  5105. case 17:
  5106. case 20:
  5107. case 21:
  5108. return;
  5109. }
  5110. throw Error(
  5111. "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
  5112. );
  5113. }
  5114. function commitUnmount(finishedRoot, current$jscomp$0, renderPriorityLevel) {
  5115. "function" === typeof onCommitFiberUnmount &&
  5116. onCommitFiberUnmount(current$jscomp$0);
  5117. switch (current$jscomp$0.tag) {
  5118. case 0:
  5119. case 11:
  5120. case 14:
  5121. case 15:
  5122. case 22:
  5123. finishedRoot = current$jscomp$0.updateQueue;
  5124. if (
  5125. null !== finishedRoot &&
  5126. ((finishedRoot = finishedRoot.lastEffect), null !== finishedRoot)
  5127. ) {
  5128. var firstEffect = finishedRoot.next;
  5129. runWithPriority(
  5130. 97 < renderPriorityLevel ? 97 : renderPriorityLevel,
  5131. function() {
  5132. var effect = firstEffect;
  5133. do {
  5134. var _destroy = effect.destroy;
  5135. if (void 0 !== _destroy) {
  5136. var current = current$jscomp$0;
  5137. try {
  5138. _destroy();
  5139. } catch (error) {
  5140. captureCommitPhaseError(current, error);
  5141. }
  5142. }
  5143. effect = effect.next;
  5144. } while (effect !== firstEffect);
  5145. }
  5146. );
  5147. }
  5148. break;
  5149. case 1:
  5150. safelyDetachRef(current$jscomp$0);
  5151. renderPriorityLevel = current$jscomp$0.stateNode;
  5152. "function" === typeof renderPriorityLevel.componentWillUnmount &&
  5153. safelyCallComponentWillUnmount(current$jscomp$0, renderPriorityLevel);
  5154. break;
  5155. case 5:
  5156. safelyDetachRef(current$jscomp$0);
  5157. break;
  5158. case 4:
  5159. unmountHostComponents(
  5160. finishedRoot,
  5161. current$jscomp$0,
  5162. renderPriorityLevel
  5163. );
  5164. }
  5165. }
  5166. function detachFiber(current) {
  5167. var alternate = current.alternate;
  5168. current.return = null;
  5169. current.child = null;
  5170. current.memoizedState = null;
  5171. current.updateQueue = null;
  5172. current.dependencies = null;
  5173. current.alternate = null;
  5174. current.firstEffect = null;
  5175. current.lastEffect = null;
  5176. current.pendingProps = null;
  5177. current.memoizedProps = null;
  5178. current.stateNode = null;
  5179. null !== alternate && detachFiber(alternate);
  5180. }
  5181. function isHostParent(fiber) {
  5182. return 5 === fiber.tag || 3 === fiber.tag || 4 === fiber.tag;
  5183. }
  5184. function commitPlacement(finishedWork) {
  5185. a: {
  5186. for (var parent = finishedWork.return; null !== parent; ) {
  5187. if (isHostParent(parent)) {
  5188. var parentFiber = parent;
  5189. break a;
  5190. }
  5191. parent = parent.return;
  5192. }
  5193. throw Error(
  5194. "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
  5195. );
  5196. }
  5197. parent = parentFiber.stateNode;
  5198. switch (parentFiber.tag) {
  5199. case 5:
  5200. var isContainer = !1;
  5201. break;
  5202. case 3:
  5203. parent = parent.containerInfo;
  5204. isContainer = !0;
  5205. break;
  5206. case 4:
  5207. parent = parent.containerInfo;
  5208. isContainer = !0;
  5209. break;
  5210. default:
  5211. throw Error(
  5212. "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue."
  5213. );
  5214. }
  5215. parentFiber.effectTag & 16 && (parentFiber.effectTag &= -17);
  5216. a: b: for (parentFiber = finishedWork; ; ) {
  5217. for (; null === parentFiber.sibling; ) {
  5218. if (null === parentFiber.return || isHostParent(parentFiber.return)) {
  5219. parentFiber = null;
  5220. break a;
  5221. }
  5222. parentFiber = parentFiber.return;
  5223. }
  5224. parentFiber.sibling.return = parentFiber.return;
  5225. for (
  5226. parentFiber = parentFiber.sibling;
  5227. 5 !== parentFiber.tag && 6 !== parentFiber.tag && 18 !== parentFiber.tag;
  5228. ) {
  5229. if (parentFiber.effectTag & 2) continue b;
  5230. if (null === parentFiber.child || 4 === parentFiber.tag) continue b;
  5231. else
  5232. (parentFiber.child.return = parentFiber),
  5233. (parentFiber = parentFiber.child);
  5234. }
  5235. if (!(parentFiber.effectTag & 2)) {
  5236. parentFiber = parentFiber.stateNode;
  5237. break a;
  5238. }
  5239. }
  5240. isContainer
  5241. ? insertOrAppendPlacementNodeIntoContainer(
  5242. finishedWork,
  5243. parentFiber,
  5244. parent
  5245. )
  5246. : insertOrAppendPlacementNode(finishedWork, parentFiber, parent);
  5247. }
  5248. function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
  5249. var tag = node.tag,
  5250. isHost = 5 === tag || 6 === tag;
  5251. if (isHost)
  5252. if (((node = isHost ? node.stateNode : node.stateNode.instance), before)) {
  5253. if ("number" === typeof parent)
  5254. throw Error("Container does not support insertBefore operation");
  5255. } else
  5256. ReactNativePrivateInterface.UIManager.setChildren(parent, [
  5257. "number" === typeof node ? node : node._nativeTag
  5258. ]);
  5259. else if (4 !== tag && ((node = node.child), null !== node))
  5260. for (
  5261. insertOrAppendPlacementNodeIntoContainer(node, before, parent),
  5262. node = node.sibling;
  5263. null !== node;
  5264. )
  5265. insertOrAppendPlacementNodeIntoContainer(node, before, parent),
  5266. (node = node.sibling);
  5267. }
  5268. function insertOrAppendPlacementNode(node, before, parent) {
  5269. var tag = node.tag,
  5270. isHost = 5 === tag || 6 === tag;
  5271. if (isHost)
  5272. (node = isHost ? node.stateNode : node.stateNode.instance),
  5273. before
  5274. ? ((tag = parent._children),
  5275. (isHost = tag.indexOf(node)),
  5276. 0 <= isHost
  5277. ? (tag.splice(isHost, 1),
  5278. (before = tag.indexOf(before)),
  5279. tag.splice(before, 0, node),
  5280. ReactNativePrivateInterface.UIManager.manageChildren(
  5281. parent._nativeTag,
  5282. [isHost],
  5283. [before],
  5284. [],
  5285. [],
  5286. []
  5287. ))
  5288. : ((before = tag.indexOf(before)),
  5289. tag.splice(before, 0, node),
  5290. ReactNativePrivateInterface.UIManager.manageChildren(
  5291. parent._nativeTag,
  5292. [],
  5293. [],
  5294. ["number" === typeof node ? node : node._nativeTag],
  5295. [before],
  5296. []
  5297. )))
  5298. : ((before = "number" === typeof node ? node : node._nativeTag),
  5299. (tag = parent._children),
  5300. (isHost = tag.indexOf(node)),
  5301. 0 <= isHost
  5302. ? (tag.splice(isHost, 1),
  5303. tag.push(node),
  5304. ReactNativePrivateInterface.UIManager.manageChildren(
  5305. parent._nativeTag,
  5306. [isHost],
  5307. [tag.length - 1],
  5308. [],
  5309. [],
  5310. []
  5311. ))
  5312. : (tag.push(node),
  5313. ReactNativePrivateInterface.UIManager.manageChildren(
  5314. parent._nativeTag,
  5315. [],
  5316. [],
  5317. [before],
  5318. [tag.length - 1],
  5319. []
  5320. )));
  5321. else if (4 !== tag && ((node = node.child), null !== node))
  5322. for (
  5323. insertOrAppendPlacementNode(node, before, parent), node = node.sibling;
  5324. null !== node;
  5325. )
  5326. insertOrAppendPlacementNode(node, before, parent), (node = node.sibling);
  5327. }
  5328. function unmountHostComponents(
  5329. finishedRoot$jscomp$0,
  5330. current,
  5331. renderPriorityLevel$jscomp$0
  5332. ) {
  5333. for (
  5334. var node = current,
  5335. currentParentIsValid = !1,
  5336. currentParent,
  5337. currentParentIsContainer;
  5338. ;
  5339. ) {
  5340. if (!currentParentIsValid) {
  5341. currentParentIsValid = node.return;
  5342. a: for (;;) {
  5343. if (null === currentParentIsValid)
  5344. throw Error(
  5345. "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
  5346. );
  5347. currentParent = currentParentIsValid.stateNode;
  5348. switch (currentParentIsValid.tag) {
  5349. case 5:
  5350. currentParentIsContainer = !1;
  5351. break a;
  5352. case 3:
  5353. currentParent = currentParent.containerInfo;
  5354. currentParentIsContainer = !0;
  5355. break a;
  5356. case 4:
  5357. currentParent = currentParent.containerInfo;
  5358. currentParentIsContainer = !0;
  5359. break a;
  5360. }
  5361. currentParentIsValid = currentParentIsValid.return;
  5362. }
  5363. currentParentIsValid = !0;
  5364. }
  5365. if (5 === node.tag || 6 === node.tag) {
  5366. a: for (
  5367. var finishedRoot = finishedRoot$jscomp$0,
  5368. root = node,
  5369. renderPriorityLevel = renderPriorityLevel$jscomp$0,
  5370. node$jscomp$0 = root;
  5371. ;
  5372. )
  5373. if (
  5374. (commitUnmount(finishedRoot, node$jscomp$0, renderPriorityLevel),
  5375. null !== node$jscomp$0.child && 4 !== node$jscomp$0.tag)
  5376. )
  5377. (node$jscomp$0.child.return = node$jscomp$0),
  5378. (node$jscomp$0 = node$jscomp$0.child);
  5379. else {
  5380. if (node$jscomp$0 === root) break a;
  5381. for (; null === node$jscomp$0.sibling; ) {
  5382. if (null === node$jscomp$0.return || node$jscomp$0.return === root)
  5383. break a;
  5384. node$jscomp$0 = node$jscomp$0.return;
  5385. }
  5386. node$jscomp$0.sibling.return = node$jscomp$0.return;
  5387. node$jscomp$0 = node$jscomp$0.sibling;
  5388. }
  5389. currentParentIsContainer
  5390. ? ((finishedRoot = currentParent),
  5391. recursivelyUncacheFiberNode(node.stateNode),
  5392. ReactNativePrivateInterface.UIManager.manageChildren(
  5393. finishedRoot,
  5394. [],
  5395. [],
  5396. [],
  5397. [],
  5398. [0]
  5399. ))
  5400. : ((finishedRoot = currentParent),
  5401. (renderPriorityLevel = node.stateNode),
  5402. recursivelyUncacheFiberNode(renderPriorityLevel),
  5403. (root = finishedRoot._children),
  5404. (renderPriorityLevel = root.indexOf(renderPriorityLevel)),
  5405. root.splice(renderPriorityLevel, 1),
  5406. ReactNativePrivateInterface.UIManager.manageChildren(
  5407. finishedRoot._nativeTag,
  5408. [],
  5409. [],
  5410. [],
  5411. [],
  5412. [renderPriorityLevel]
  5413. ));
  5414. } else if (4 === node.tag) {
  5415. if (null !== node.child) {
  5416. currentParent = node.stateNode.containerInfo;
  5417. currentParentIsContainer = !0;
  5418. node.child.return = node;
  5419. node = node.child;
  5420. continue;
  5421. }
  5422. } else if (
  5423. (commitUnmount(finishedRoot$jscomp$0, node, renderPriorityLevel$jscomp$0),
  5424. null !== node.child)
  5425. ) {
  5426. node.child.return = node;
  5427. node = node.child;
  5428. continue;
  5429. }
  5430. if (node === current) break;
  5431. for (; null === node.sibling; ) {
  5432. if (null === node.return || node.return === current) return;
  5433. node = node.return;
  5434. 4 === node.tag && (currentParentIsValid = !1);
  5435. }
  5436. node.sibling.return = node.return;
  5437. node = node.sibling;
  5438. }
  5439. }
  5440. function commitWork(current, finishedWork) {
  5441. switch (finishedWork.tag) {
  5442. case 0:
  5443. case 11:
  5444. case 14:
  5445. case 15:
  5446. case 22:
  5447. commitHookEffectListUnmount(3, finishedWork);
  5448. return;
  5449. case 1:
  5450. return;
  5451. case 5:
  5452. var instance = finishedWork.stateNode;
  5453. if (null != instance) {
  5454. var newProps = finishedWork.memoizedProps;
  5455. current = null !== current ? current.memoizedProps : newProps;
  5456. var updatePayload = finishedWork.updateQueue;
  5457. finishedWork.updateQueue = null;
  5458. null !== updatePayload &&
  5459. ((finishedWork = instance.viewConfig),
  5460. instanceProps.set(instance._nativeTag, newProps),
  5461. (newProps = diffProperties(
  5462. null,
  5463. current,
  5464. newProps,
  5465. finishedWork.validAttributes
  5466. )),
  5467. null != newProps &&
  5468. ReactNativePrivateInterface.UIManager.updateView(
  5469. instance._nativeTag,
  5470. finishedWork.uiViewClassName,
  5471. newProps
  5472. ));
  5473. }
  5474. return;
  5475. case 6:
  5476. if (null === finishedWork.stateNode)
  5477. throw Error(
  5478. "This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue."
  5479. );
  5480. ReactNativePrivateInterface.UIManager.updateView(
  5481. finishedWork.stateNode,
  5482. "RCTRawText",
  5483. { text: finishedWork.memoizedProps }
  5484. );
  5485. return;
  5486. case 3:
  5487. return;
  5488. case 12:
  5489. return;
  5490. case 13:
  5491. instance = finishedWork;
  5492. null === finishedWork.memoizedState
  5493. ? (newProps = !1)
  5494. : ((newProps = !0),
  5495. (instance = finishedWork.child),
  5496. (globalMostRecentFallbackTime = now()));
  5497. if (null !== instance)
  5498. a: for (current = instance; ; ) {
  5499. if (5 === current.tag)
  5500. if (((updatePayload = current.stateNode), newProps)) {
  5501. var viewConfig = updatePayload.viewConfig;
  5502. var updatePayload$jscomp$0 = diffProperties(
  5503. null,
  5504. emptyObject,
  5505. { style: { display: "none" } },
  5506. viewConfig.validAttributes
  5507. );
  5508. ReactNativePrivateInterface.UIManager.updateView(
  5509. updatePayload._nativeTag,
  5510. viewConfig.uiViewClassName,
  5511. updatePayload$jscomp$0
  5512. );
  5513. } else {
  5514. updatePayload = current.stateNode;
  5515. updatePayload$jscomp$0 = current.memoizedProps;
  5516. viewConfig = updatePayload.viewConfig;
  5517. var prevProps = Object.assign({}, updatePayload$jscomp$0, {
  5518. style: [updatePayload$jscomp$0.style, { display: "none" }]
  5519. });
  5520. updatePayload$jscomp$0 = diffProperties(
  5521. null,
  5522. prevProps,
  5523. updatePayload$jscomp$0,
  5524. viewConfig.validAttributes
  5525. );
  5526. ReactNativePrivateInterface.UIManager.updateView(
  5527. updatePayload._nativeTag,
  5528. viewConfig.uiViewClassName,
  5529. updatePayload$jscomp$0
  5530. );
  5531. }
  5532. else {
  5533. if (6 === current.tag) throw Error("Not yet implemented.");
  5534. if (
  5535. 13 === current.tag &&
  5536. null !== current.memoizedState &&
  5537. null === current.memoizedState.dehydrated
  5538. ) {
  5539. updatePayload = current.child.sibling;
  5540. updatePayload.return = current;
  5541. current = updatePayload;
  5542. continue;
  5543. } else if (null !== current.child) {
  5544. current.child.return = current;
  5545. current = current.child;
  5546. continue;
  5547. }
  5548. }
  5549. if (current === instance) break;
  5550. for (; null === current.sibling; ) {
  5551. if (null === current.return || current.return === instance) break a;
  5552. current = current.return;
  5553. }
  5554. current.sibling.return = current.return;
  5555. current = current.sibling;
  5556. }
  5557. attachSuspenseRetryListeners(finishedWork);
  5558. return;
  5559. case 19:
  5560. attachSuspenseRetryListeners(finishedWork);
  5561. return;
  5562. case 17:
  5563. return;
  5564. }
  5565. throw Error(
  5566. "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
  5567. );
  5568. }
  5569. function attachSuspenseRetryListeners(finishedWork) {
  5570. var thenables = finishedWork.updateQueue;
  5571. if (null !== thenables) {
  5572. finishedWork.updateQueue = null;
  5573. var retryCache = finishedWork.stateNode;
  5574. null === retryCache &&
  5575. (retryCache = finishedWork.stateNode = new PossiblyWeakSet());
  5576. thenables.forEach(function(thenable) {
  5577. var retry = resolveRetryThenable.bind(null, finishedWork, thenable);
  5578. retryCache.has(thenable) ||
  5579. (!0 !== thenable.__reactDoNotTraceInteractions &&
  5580. (retry = tracing.unstable_wrap(retry)),
  5581. retryCache.add(thenable),
  5582. thenable.then(retry, retry));
  5583. });
  5584. }
  5585. }
  5586. var PossiblyWeakMap = "function" === typeof WeakMap ? WeakMap : Map;
  5587. function createRootErrorUpdate(fiber, errorInfo, expirationTime) {
  5588. expirationTime = createUpdate(expirationTime, null);
  5589. expirationTime.tag = 3;
  5590. expirationTime.payload = { element: null };
  5591. var error = errorInfo.value;
  5592. expirationTime.callback = function() {
  5593. hasUncaughtError || ((hasUncaughtError = !0), (firstUncaughtError = error));
  5594. logError(fiber, errorInfo);
  5595. };
  5596. return expirationTime;
  5597. }
  5598. function createClassErrorUpdate(fiber, errorInfo, expirationTime) {
  5599. expirationTime = createUpdate(expirationTime, null);
  5600. expirationTime.tag = 3;
  5601. var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
  5602. if ("function" === typeof getDerivedStateFromError) {
  5603. var error = errorInfo.value;
  5604. expirationTime.payload = function() {
  5605. logError(fiber, errorInfo);
  5606. return getDerivedStateFromError(error);
  5607. };
  5608. }
  5609. var inst = fiber.stateNode;
  5610. null !== inst &&
  5611. "function" === typeof inst.componentDidCatch &&
  5612. (expirationTime.callback = function() {
  5613. "function" !== typeof getDerivedStateFromError &&
  5614. (null === legacyErrorBoundariesThatAlreadyFailed
  5615. ? (legacyErrorBoundariesThatAlreadyFailed = new Set([this]))
  5616. : legacyErrorBoundariesThatAlreadyFailed.add(this),
  5617. logError(fiber, errorInfo));
  5618. var stack = errorInfo.stack;
  5619. this.componentDidCatch(errorInfo.value, {
  5620. componentStack: null !== stack ? stack : ""
  5621. });
  5622. });
  5623. return expirationTime;
  5624. }
  5625. var ceil = Math.ceil,
  5626. ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
  5627. ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
  5628. NoContext = 0,
  5629. LegacyUnbatchedContext = 8,
  5630. RenderContext = 16,
  5631. CommitContext = 32,
  5632. RootIncomplete = 0,
  5633. RootFatalErrored = 1,
  5634. RootErrored = 2,
  5635. RootSuspended = 3,
  5636. RootSuspendedWithDelay = 4,
  5637. RootCompleted = 5,
  5638. executionContext = NoContext,
  5639. workInProgressRoot = null,
  5640. workInProgress = null,
  5641. renderExpirationTime$1 = 0,
  5642. workInProgressRootExitStatus = RootIncomplete,
  5643. workInProgressRootFatalError = null,
  5644. workInProgressRootLatestProcessedExpirationTime = 1073741823,
  5645. workInProgressRootLatestSuspenseTimeout = 1073741823,
  5646. workInProgressRootCanSuspendUsingConfig = null,
  5647. workInProgressRootNextUnprocessedUpdateTime = 0,
  5648. workInProgressRootHasPendingPing = !1,
  5649. globalMostRecentFallbackTime = 0,
  5650. FALLBACK_THROTTLE_MS = 500,
  5651. nextEffect = null,
  5652. hasUncaughtError = !1,
  5653. firstUncaughtError = null,
  5654. legacyErrorBoundariesThatAlreadyFailed = null,
  5655. rootDoesHavePassiveEffects = !1,
  5656. rootWithPendingPassiveEffects = null,
  5657. pendingPassiveEffectsRenderPriority = 90,
  5658. pendingPassiveEffectsExpirationTime = 0,
  5659. rootsWithPendingDiscreteUpdates = null,
  5660. nestedUpdateCount = 0,
  5661. rootWithNestedUpdates = null,
  5662. spawnedWorkDuringRender = null,
  5663. currentEventTime = 0;
  5664. function requestCurrentTimeForUpdate() {
  5665. return (executionContext & (RenderContext | CommitContext)) !== NoContext
  5666. ? 1073741821 - ((now() / 10) | 0)
  5667. : 0 !== currentEventTime
  5668. ? currentEventTime
  5669. : (currentEventTime = 1073741821 - ((now() / 10) | 0));
  5670. }
  5671. function computeExpirationForFiber(currentTime, fiber, suspenseConfig) {
  5672. fiber = fiber.mode;
  5673. if (0 === (fiber & 2)) return 1073741823;
  5674. var priorityLevel = getCurrentPriorityLevel();
  5675. if (0 === (fiber & 4)) return 99 === priorityLevel ? 1073741823 : 1073741822;
  5676. if ((executionContext & RenderContext) !== NoContext)
  5677. return renderExpirationTime$1;
  5678. if (null !== suspenseConfig)
  5679. currentTime =
  5680. 1073741821 -
  5681. 25 *
  5682. ((((1073741821 -
  5683. currentTime +
  5684. (suspenseConfig.timeoutMs | 0 || 5e3) / 10) /
  5685. 25) |
  5686. 0) +
  5687. 1);
  5688. else
  5689. switch (priorityLevel) {
  5690. case 99:
  5691. currentTime = 1073741823;
  5692. break;
  5693. case 98:
  5694. currentTime =
  5695. 1073741821 - 10 * ((((1073741821 - currentTime + 15) / 10) | 0) + 1);
  5696. break;
  5697. case 97:
  5698. case 96:
  5699. currentTime =
  5700. 1073741821 - 25 * ((((1073741821 - currentTime + 500) / 25) | 0) + 1);
  5701. break;
  5702. case 95:
  5703. currentTime = 2;
  5704. break;
  5705. default:
  5706. throw Error("Expected a valid priority level");
  5707. }
  5708. null !== workInProgressRoot &&
  5709. currentTime === renderExpirationTime$1 &&
  5710. --currentTime;
  5711. return currentTime;
  5712. }
  5713. function scheduleWork(fiber, expirationTime) {
  5714. if (50 < nestedUpdateCount)
  5715. throw ((nestedUpdateCount = 0),
  5716. (rootWithNestedUpdates = null),
  5717. Error(
  5718. "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops."
  5719. ));
  5720. fiber = markUpdateTimeFromFiberToRoot(fiber, expirationTime);
  5721. if (null !== fiber) {
  5722. var priorityLevel = getCurrentPriorityLevel();
  5723. 1073741823 === expirationTime
  5724. ? (executionContext & LegacyUnbatchedContext) !== NoContext &&
  5725. (executionContext & (RenderContext | CommitContext)) === NoContext
  5726. ? (schedulePendingInteractions(fiber, expirationTime),
  5727. performSyncWorkOnRoot(fiber))
  5728. : (ensureRootIsScheduled(fiber),
  5729. schedulePendingInteractions(fiber, expirationTime),
  5730. executionContext === NoContext && flushSyncCallbackQueue())
  5731. : (ensureRootIsScheduled(fiber),
  5732. schedulePendingInteractions(fiber, expirationTime));
  5733. (executionContext & 4) === NoContext ||
  5734. (98 !== priorityLevel && 99 !== priorityLevel) ||
  5735. (null === rootsWithPendingDiscreteUpdates
  5736. ? (rootsWithPendingDiscreteUpdates = new Map([[fiber, expirationTime]]))
  5737. : ((priorityLevel = rootsWithPendingDiscreteUpdates.get(fiber)),
  5738. (void 0 === priorityLevel || priorityLevel > expirationTime) &&
  5739. rootsWithPendingDiscreteUpdates.set(fiber, expirationTime)));
  5740. }
  5741. }
  5742. function markUpdateTimeFromFiberToRoot(fiber, expirationTime) {
  5743. fiber.expirationTime < expirationTime &&
  5744. (fiber.expirationTime = expirationTime);
  5745. var alternate = fiber.alternate;
  5746. null !== alternate &&
  5747. alternate.expirationTime < expirationTime &&
  5748. (alternate.expirationTime = expirationTime);
  5749. var node = fiber.return,
  5750. root = null;
  5751. if (null === node && 3 === fiber.tag) root = fiber.stateNode;
  5752. else
  5753. for (; null !== node; ) {
  5754. alternate = node.alternate;
  5755. node.childExpirationTime < expirationTime &&
  5756. (node.childExpirationTime = expirationTime);
  5757. null !== alternate &&
  5758. alternate.childExpirationTime < expirationTime &&
  5759. (alternate.childExpirationTime = expirationTime);
  5760. if (null === node.return && 3 === node.tag) {
  5761. root = node.stateNode;
  5762. break;
  5763. }
  5764. node = node.return;
  5765. }
  5766. null !== root &&
  5767. (workInProgressRoot === root &&
  5768. (markUnprocessedUpdateTime(expirationTime),
  5769. workInProgressRootExitStatus === RootSuspendedWithDelay &&
  5770. markRootSuspendedAtTime(root, renderExpirationTime$1)),
  5771. markRootUpdatedAtTime(root, expirationTime));
  5772. return root;
  5773. }
  5774. function getNextRootExpirationTimeToWorkOn(root) {
  5775. var lastExpiredTime = root.lastExpiredTime;
  5776. if (0 !== lastExpiredTime) return lastExpiredTime;
  5777. lastExpiredTime = root.firstPendingTime;
  5778. if (!isRootSuspendedAtTime(root, lastExpiredTime)) return lastExpiredTime;
  5779. var lastPingedTime = root.lastPingedTime;
  5780. root = root.nextKnownPendingLevel;
  5781. root = lastPingedTime > root ? lastPingedTime : root;
  5782. return 2 >= root && lastExpiredTime !== root ? 0 : root;
  5783. }
  5784. function ensureRootIsScheduled(root) {
  5785. if (0 !== root.lastExpiredTime)
  5786. (root.callbackExpirationTime = 1073741823),
  5787. (root.callbackPriority = 99),
  5788. (root.callbackNode = scheduleSyncCallback(
  5789. performSyncWorkOnRoot.bind(null, root)
  5790. ));
  5791. else {
  5792. var expirationTime = getNextRootExpirationTimeToWorkOn(root),
  5793. existingCallbackNode = root.callbackNode;
  5794. if (0 === expirationTime)
  5795. null !== existingCallbackNode &&
  5796. ((root.callbackNode = null),
  5797. (root.callbackExpirationTime = 0),
  5798. (root.callbackPriority = 90));
  5799. else {
  5800. var currentTime = requestCurrentTimeForUpdate();
  5801. currentTime = inferPriorityFromExpirationTime(
  5802. currentTime,
  5803. expirationTime
  5804. );
  5805. if (null !== existingCallbackNode) {
  5806. var existingCallbackPriority = root.callbackPriority;
  5807. if (
  5808. root.callbackExpirationTime === expirationTime &&
  5809. existingCallbackPriority >= currentTime
  5810. )
  5811. return;
  5812. existingCallbackNode !== fakeCallbackNode &&
  5813. Scheduler_cancelCallback(existingCallbackNode);
  5814. }
  5815. root.callbackExpirationTime = expirationTime;
  5816. root.callbackPriority = currentTime;
  5817. expirationTime =
  5818. 1073741823 === expirationTime
  5819. ? scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root))
  5820. : scheduleCallback(
  5821. currentTime,
  5822. performConcurrentWorkOnRoot.bind(null, root),
  5823. { timeout: 10 * (1073741821 - expirationTime) - now() }
  5824. );
  5825. root.callbackNode = expirationTime;
  5826. }
  5827. }
  5828. }
  5829. function performConcurrentWorkOnRoot(root, didTimeout) {
  5830. currentEventTime = 0;
  5831. if (didTimeout) {
  5832. didTimeout = requestCurrentTimeForUpdate();
  5833. var lastExpiredTime = root.lastExpiredTime;
  5834. if (0 === lastExpiredTime || lastExpiredTime > didTimeout)
  5835. root.lastExpiredTime = didTimeout;
  5836. ensureRootIsScheduled(root);
  5837. return null;
  5838. }
  5839. lastExpiredTime = getNextRootExpirationTimeToWorkOn(root);
  5840. if (0 === lastExpiredTime) return null;
  5841. didTimeout = root.callbackNode;
  5842. if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
  5843. throw Error("Should not already be working.");
  5844. flushPassiveEffects();
  5845. var expirationTime = lastExpiredTime,
  5846. prevExecutionContext = executionContext;
  5847. executionContext |= RenderContext;
  5848. var exitStatus = pushDispatcher();
  5849. if (root !== workInProgressRoot || expirationTime !== renderExpirationTime$1)
  5850. prepareFreshStack(root, expirationTime),
  5851. startWorkOnPendingInteractions(root, expirationTime);
  5852. expirationTime = pushInteractions(root);
  5853. do
  5854. try {
  5855. workLoopConcurrent();
  5856. break;
  5857. } catch (thrownValue) {
  5858. handleError(root, thrownValue);
  5859. }
  5860. while (1);
  5861. resetContextDependencies();
  5862. tracing.__interactionsRef.current = expirationTime;
  5863. ReactCurrentDispatcher$1.current = exitStatus;
  5864. executionContext = prevExecutionContext;
  5865. null !== workInProgress
  5866. ? (exitStatus = RootIncomplete)
  5867. : ((workInProgressRoot = null),
  5868. (exitStatus = workInProgressRootExitStatus));
  5869. if (exitStatus !== RootIncomplete) {
  5870. exitStatus === RootErrored &&
  5871. ((lastExpiredTime = 2 < lastExpiredTime ? 2 : lastExpiredTime),
  5872. (exitStatus = renderRootSync(root, lastExpiredTime)));
  5873. if (exitStatus === RootFatalErrored)
  5874. throw ((didTimeout = workInProgressRootFatalError),
  5875. prepareFreshStack(root, lastExpiredTime),
  5876. markRootSuspendedAtTime(root, lastExpiredTime),
  5877. ensureRootIsScheduled(root),
  5878. didTimeout);
  5879. prevExecutionContext = root.finishedWork = root.current.alternate;
  5880. root.finishedExpirationTime = lastExpiredTime;
  5881. switch (exitStatus) {
  5882. case RootIncomplete:
  5883. case RootFatalErrored:
  5884. throw Error("Root did not complete. This is a bug in React.");
  5885. case RootErrored:
  5886. commitRoot(root);
  5887. break;
  5888. case RootSuspended:
  5889. markRootSuspendedAtTime(root, lastExpiredTime);
  5890. exitStatus = root.lastSuspendedTime;
  5891. lastExpiredTime === exitStatus &&
  5892. (root.nextKnownPendingLevel = getRemainingExpirationTime(
  5893. prevExecutionContext
  5894. ));
  5895. if (
  5896. 1073741823 === workInProgressRootLatestProcessedExpirationTime &&
  5897. ((prevExecutionContext =
  5898. globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now()),
  5899. 10 < prevExecutionContext)
  5900. ) {
  5901. if (
  5902. workInProgressRootHasPendingPing &&
  5903. ((expirationTime = root.lastPingedTime),
  5904. 0 === expirationTime || expirationTime >= lastExpiredTime)
  5905. ) {
  5906. root.lastPingedTime = lastExpiredTime;
  5907. prepareFreshStack(root, lastExpiredTime);
  5908. break;
  5909. }
  5910. expirationTime = getNextRootExpirationTimeToWorkOn(root);
  5911. if (0 !== expirationTime && expirationTime !== lastExpiredTime) break;
  5912. if (0 !== exitStatus && exitStatus !== lastExpiredTime) {
  5913. root.lastPingedTime = exitStatus;
  5914. break;
  5915. }
  5916. root.timeoutHandle = scheduleTimeout(
  5917. commitRoot.bind(null, root),
  5918. prevExecutionContext
  5919. );
  5920. break;
  5921. }
  5922. commitRoot(root);
  5923. break;
  5924. case RootSuspendedWithDelay:
  5925. markRootSuspendedAtTime(root, lastExpiredTime);
  5926. exitStatus = root.lastSuspendedTime;
  5927. lastExpiredTime === exitStatus &&
  5928. (root.nextKnownPendingLevel = getRemainingExpirationTime(
  5929. prevExecutionContext
  5930. ));
  5931. if (
  5932. workInProgressRootHasPendingPing &&
  5933. ((prevExecutionContext = root.lastPingedTime),
  5934. 0 === prevExecutionContext || prevExecutionContext >= lastExpiredTime)
  5935. ) {
  5936. root.lastPingedTime = lastExpiredTime;
  5937. prepareFreshStack(root, lastExpiredTime);
  5938. break;
  5939. }
  5940. prevExecutionContext = getNextRootExpirationTimeToWorkOn(root);
  5941. if (
  5942. 0 !== prevExecutionContext &&
  5943. prevExecutionContext !== lastExpiredTime
  5944. )
  5945. break;
  5946. if (0 !== exitStatus && exitStatus !== lastExpiredTime) {
  5947. root.lastPingedTime = exitStatus;
  5948. break;
  5949. }
  5950. 1073741823 !== workInProgressRootLatestSuspenseTimeout
  5951. ? (prevExecutionContext =
  5952. 10 * (1073741821 - workInProgressRootLatestSuspenseTimeout) -
  5953. now())
  5954. : 1073741823 === workInProgressRootLatestProcessedExpirationTime
  5955. ? (prevExecutionContext = 0)
  5956. : ((prevExecutionContext =
  5957. 10 *
  5958. (1073741821 - workInProgressRootLatestProcessedExpirationTime) -
  5959. 5e3),
  5960. (exitStatus = now()),
  5961. (lastExpiredTime =
  5962. 10 * (1073741821 - lastExpiredTime) - exitStatus),
  5963. (prevExecutionContext = exitStatus - prevExecutionContext),
  5964. 0 > prevExecutionContext && (prevExecutionContext = 0),
  5965. (prevExecutionContext =
  5966. (120 > prevExecutionContext
  5967. ? 120
  5968. : 480 > prevExecutionContext
  5969. ? 480
  5970. : 1080 > prevExecutionContext
  5971. ? 1080
  5972. : 1920 > prevExecutionContext
  5973. ? 1920
  5974. : 3e3 > prevExecutionContext
  5975. ? 3e3
  5976. : 4320 > prevExecutionContext
  5977. ? 4320
  5978. : 1960 * ceil(prevExecutionContext / 1960)) -
  5979. prevExecutionContext),
  5980. lastExpiredTime < prevExecutionContext &&
  5981. (prevExecutionContext = lastExpiredTime));
  5982. if (10 < prevExecutionContext) {
  5983. root.timeoutHandle = scheduleTimeout(
  5984. commitRoot.bind(null, root),
  5985. prevExecutionContext
  5986. );
  5987. break;
  5988. }
  5989. commitRoot(root);
  5990. break;
  5991. case RootCompleted:
  5992. if (
  5993. 1073741823 !== workInProgressRootLatestProcessedExpirationTime &&
  5994. null !== workInProgressRootCanSuspendUsingConfig
  5995. ) {
  5996. expirationTime = workInProgressRootLatestProcessedExpirationTime;
  5997. var suspenseConfig = workInProgressRootCanSuspendUsingConfig;
  5998. prevExecutionContext = suspenseConfig.busyMinDurationMs | 0;
  5999. 0 >= prevExecutionContext
  6000. ? (prevExecutionContext = 0)
  6001. : ((exitStatus = suspenseConfig.busyDelayMs | 0),
  6002. (expirationTime =
  6003. now() -
  6004. (10 * (1073741821 - expirationTime) -
  6005. (suspenseConfig.timeoutMs | 0 || 5e3))),
  6006. (prevExecutionContext =
  6007. expirationTime <= exitStatus
  6008. ? 0
  6009. : exitStatus + prevExecutionContext - expirationTime));
  6010. if (10 < prevExecutionContext) {
  6011. markRootSuspendedAtTime(root, lastExpiredTime);
  6012. root.timeoutHandle = scheduleTimeout(
  6013. commitRoot.bind(null, root),
  6014. prevExecutionContext
  6015. );
  6016. break;
  6017. }
  6018. }
  6019. commitRoot(root);
  6020. break;
  6021. default:
  6022. throw Error("Unknown root exit status.");
  6023. }
  6024. }
  6025. ensureRootIsScheduled(root);
  6026. return root.callbackNode === didTimeout
  6027. ? performConcurrentWorkOnRoot.bind(null, root)
  6028. : null;
  6029. }
  6030. function performSyncWorkOnRoot(root) {
  6031. if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
  6032. throw Error("Should not already be working.");
  6033. flushPassiveEffects();
  6034. var lastExpiredTime = root.lastExpiredTime;
  6035. lastExpiredTime =
  6036. 0 !== lastExpiredTime
  6037. ? root === workInProgressRoot && renderExpirationTime$1 >= lastExpiredTime
  6038. ? renderExpirationTime$1
  6039. : lastExpiredTime
  6040. : 1073741823;
  6041. var exitStatus = renderRootSync(root, lastExpiredTime);
  6042. 0 !== root.tag &&
  6043. exitStatus === RootErrored &&
  6044. ((lastExpiredTime = 2 < lastExpiredTime ? 2 : lastExpiredTime),
  6045. (exitStatus = renderRootSync(root, lastExpiredTime)));
  6046. if (exitStatus === RootFatalErrored)
  6047. throw ((exitStatus = workInProgressRootFatalError),
  6048. prepareFreshStack(root, lastExpiredTime),
  6049. markRootSuspendedAtTime(root, lastExpiredTime),
  6050. ensureRootIsScheduled(root),
  6051. exitStatus);
  6052. root.finishedWork = root.current.alternate;
  6053. root.finishedExpirationTime = lastExpiredTime;
  6054. commitRoot(root);
  6055. ensureRootIsScheduled(root);
  6056. return null;
  6057. }
  6058. function prepareFreshStack(root, expirationTime) {
  6059. root.finishedWork = null;
  6060. root.finishedExpirationTime = 0;
  6061. var timeoutHandle = root.timeoutHandle;
  6062. -1 !== timeoutHandle &&
  6063. ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));
  6064. if (null !== workInProgress)
  6065. for (timeoutHandle = workInProgress.return; null !== timeoutHandle; ) {
  6066. var interruptedWork = timeoutHandle;
  6067. switch (interruptedWork.tag) {
  6068. case 1:
  6069. interruptedWork = interruptedWork.type.childContextTypes;
  6070. null !== interruptedWork &&
  6071. void 0 !== interruptedWork &&
  6072. popContext();
  6073. break;
  6074. case 3:
  6075. popHostContainer();
  6076. pop(didPerformWorkStackCursor);
  6077. pop(contextStackCursor);
  6078. break;
  6079. case 5:
  6080. popHostContext(interruptedWork);
  6081. break;
  6082. case 4:
  6083. popHostContainer();
  6084. break;
  6085. case 13:
  6086. pop(suspenseStackCursor);
  6087. break;
  6088. case 19:
  6089. pop(suspenseStackCursor);
  6090. break;
  6091. case 10:
  6092. popProvider(interruptedWork);
  6093. }
  6094. timeoutHandle = timeoutHandle.return;
  6095. }
  6096. workInProgressRoot = root;
  6097. workInProgress = createWorkInProgress(root.current, null);
  6098. renderExpirationTime$1 = expirationTime;
  6099. workInProgressRootExitStatus = RootIncomplete;
  6100. workInProgressRootFatalError = null;
  6101. workInProgressRootLatestSuspenseTimeout = workInProgressRootLatestProcessedExpirationTime = 1073741823;
  6102. workInProgressRootCanSuspendUsingConfig = null;
  6103. workInProgressRootNextUnprocessedUpdateTime = 0;
  6104. workInProgressRootHasPendingPing = !1;
  6105. spawnedWorkDuringRender = null;
  6106. }
  6107. function handleError(root$jscomp$0, thrownValue) {
  6108. do {
  6109. try {
  6110. resetContextDependencies();
  6111. ReactCurrentDispatcher.current = ContextOnlyDispatcher;
  6112. if (didScheduleRenderPhaseUpdate)
  6113. for (
  6114. var hook = currentlyRenderingFiber$1.memoizedState;
  6115. null !== hook;
  6116. ) {
  6117. var queue = hook.queue;
  6118. null !== queue && (queue.pending = null);
  6119. hook = hook.next;
  6120. }
  6121. renderExpirationTime = 0;
  6122. workInProgressHook = currentHook = currentlyRenderingFiber$1 = null;
  6123. didScheduleRenderPhaseUpdate = !1;
  6124. if (null === workInProgress || null === workInProgress.return)
  6125. return (
  6126. (workInProgressRootExitStatus = RootFatalErrored),
  6127. (workInProgressRootFatalError = thrownValue),
  6128. (workInProgress = null)
  6129. );
  6130. workInProgress.mode & 8 &&
  6131. stopProfilerTimerIfRunningAndRecordDelta(workInProgress, !0);
  6132. a: {
  6133. var root = root$jscomp$0,
  6134. returnFiber = workInProgress.return,
  6135. sourceFiber = workInProgress,
  6136. value = thrownValue;
  6137. thrownValue = renderExpirationTime$1;
  6138. sourceFiber.effectTag |= 2048;
  6139. sourceFiber.firstEffect = sourceFiber.lastEffect = null;
  6140. if (
  6141. null !== value &&
  6142. "object" === typeof value &&
  6143. "function" === typeof value.then
  6144. ) {
  6145. var thenable = value;
  6146. if (0 === (sourceFiber.mode & 2)) {
  6147. var currentSource = sourceFiber.alternate;
  6148. currentSource
  6149. ? ((sourceFiber.updateQueue = currentSource.updateQueue),
  6150. (sourceFiber.memoizedState = currentSource.memoizedState),
  6151. (sourceFiber.expirationTime = currentSource.expirationTime))
  6152. : ((sourceFiber.updateQueue = null),
  6153. (sourceFiber.memoizedState = null));
  6154. }
  6155. var hasInvisibleParentBoundary =
  6156. 0 !== (suspenseStackCursor.current & 1),
  6157. _workInProgress = returnFiber;
  6158. do {
  6159. var JSCompiler_temp;
  6160. if ((JSCompiler_temp = 13 === _workInProgress.tag)) {
  6161. var nextState = _workInProgress.memoizedState;
  6162. if (null !== nextState)
  6163. JSCompiler_temp = null !== nextState.dehydrated ? !0 : !1;
  6164. else {
  6165. var props = _workInProgress.memoizedProps;
  6166. JSCompiler_temp =
  6167. void 0 === props.fallback
  6168. ? !1
  6169. : !0 !== props.unstable_avoidThisFallback
  6170. ? !0
  6171. : hasInvisibleParentBoundary
  6172. ? !1
  6173. : !0;
  6174. }
  6175. }
  6176. if (JSCompiler_temp) {
  6177. var thenables = _workInProgress.updateQueue;
  6178. if (null === thenables) {
  6179. var updateQueue = new Set();
  6180. updateQueue.add(thenable);
  6181. _workInProgress.updateQueue = updateQueue;
  6182. } else thenables.add(thenable);
  6183. if (0 === (_workInProgress.mode & 2)) {
  6184. _workInProgress.effectTag |= 64;
  6185. sourceFiber.effectTag &= -2981;
  6186. if (1 === sourceFiber.tag)
  6187. if (null === sourceFiber.alternate) sourceFiber.tag = 17;
  6188. else {
  6189. var update = createUpdate(1073741823, null);
  6190. update.tag = 2;
  6191. enqueueUpdate(sourceFiber, update);
  6192. }
  6193. sourceFiber.expirationTime = 1073741823;
  6194. break a;
  6195. }
  6196. value = void 0;
  6197. sourceFiber = thrownValue;
  6198. var pingCache = root.pingCache;
  6199. null === pingCache
  6200. ? ((pingCache = root.pingCache = new PossiblyWeakMap()),
  6201. (value = new Set()),
  6202. pingCache.set(thenable, value))
  6203. : ((value = pingCache.get(thenable)),
  6204. void 0 === value &&
  6205. ((value = new Set()), pingCache.set(thenable, value)));
  6206. if (!value.has(sourceFiber)) {
  6207. value.add(sourceFiber);
  6208. var ping = pingSuspendedRoot.bind(
  6209. null,
  6210. root,
  6211. thenable,
  6212. sourceFiber
  6213. );
  6214. thenable.then(ping, ping);
  6215. }
  6216. _workInProgress.effectTag |= 4096;
  6217. _workInProgress.expirationTime = thrownValue;
  6218. break a;
  6219. }
  6220. _workInProgress = _workInProgress.return;
  6221. } while (null !== _workInProgress);
  6222. value = Error(
  6223. (getComponentName(sourceFiber.type) || "A React component") +
  6224. " suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display." +
  6225. getStackByFiberInDevAndProd(sourceFiber)
  6226. );
  6227. }
  6228. workInProgressRootExitStatus !== RootCompleted &&
  6229. (workInProgressRootExitStatus = RootErrored);
  6230. value = createCapturedValue(value, sourceFiber);
  6231. _workInProgress = returnFiber;
  6232. do {
  6233. switch (_workInProgress.tag) {
  6234. case 3:
  6235. thenable = value;
  6236. _workInProgress.effectTag |= 4096;
  6237. _workInProgress.expirationTime = thrownValue;
  6238. var _update = createRootErrorUpdate(
  6239. _workInProgress,
  6240. thenable,
  6241. thrownValue
  6242. );
  6243. enqueueCapturedUpdate(_workInProgress, _update);
  6244. break a;
  6245. case 1:
  6246. thenable = value;
  6247. var ctor = _workInProgress.type,
  6248. instance = _workInProgress.stateNode;
  6249. if (
  6250. 0 === (_workInProgress.effectTag & 64) &&
  6251. ("function" === typeof ctor.getDerivedStateFromError ||
  6252. (null !== instance &&
  6253. "function" === typeof instance.componentDidCatch &&
  6254. (null === legacyErrorBoundariesThatAlreadyFailed ||
  6255. !legacyErrorBoundariesThatAlreadyFailed.has(instance))))
  6256. ) {
  6257. _workInProgress.effectTag |= 4096;
  6258. _workInProgress.expirationTime = thrownValue;
  6259. var _update2 = createClassErrorUpdate(
  6260. _workInProgress,
  6261. thenable,
  6262. thrownValue
  6263. );
  6264. enqueueCapturedUpdate(_workInProgress, _update2);
  6265. break a;
  6266. }
  6267. }
  6268. _workInProgress = _workInProgress.return;
  6269. } while (null !== _workInProgress);
  6270. }
  6271. workInProgress = completeUnitOfWork(workInProgress);
  6272. } catch (yetAnotherThrownValue) {
  6273. thrownValue = yetAnotherThrownValue;
  6274. continue;
  6275. }
  6276. break;
  6277. } while (1);
  6278. }
  6279. function pushDispatcher() {
  6280. var prevDispatcher = ReactCurrentDispatcher$1.current;
  6281. ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
  6282. return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;
  6283. }
  6284. function pushInteractions(root) {
  6285. var prevInteractions = tracing.__interactionsRef.current;
  6286. tracing.__interactionsRef.current = root.memoizedInteractions;
  6287. return prevInteractions;
  6288. }
  6289. function markRenderEventTimeAndConfig(expirationTime, suspenseConfig) {
  6290. expirationTime < workInProgressRootLatestProcessedExpirationTime &&
  6291. 2 < expirationTime &&
  6292. (workInProgressRootLatestProcessedExpirationTime = expirationTime);
  6293. null !== suspenseConfig &&
  6294. expirationTime < workInProgressRootLatestSuspenseTimeout &&
  6295. 2 < expirationTime &&
  6296. ((workInProgressRootLatestSuspenseTimeout = expirationTime),
  6297. (workInProgressRootCanSuspendUsingConfig = suspenseConfig));
  6298. }
  6299. function markUnprocessedUpdateTime(expirationTime) {
  6300. expirationTime > workInProgressRootNextUnprocessedUpdateTime &&
  6301. (workInProgressRootNextUnprocessedUpdateTime = expirationTime);
  6302. }
  6303. function renderRootSync(root, expirationTime) {
  6304. var prevExecutionContext = executionContext;
  6305. executionContext |= RenderContext;
  6306. var prevDispatcher = pushDispatcher();
  6307. if (root !== workInProgressRoot || expirationTime !== renderExpirationTime$1)
  6308. prepareFreshStack(root, expirationTime),
  6309. startWorkOnPendingInteractions(root, expirationTime);
  6310. expirationTime = pushInteractions(root);
  6311. do
  6312. try {
  6313. workLoopSync();
  6314. break;
  6315. } catch (thrownValue) {
  6316. handleError(root, thrownValue);
  6317. }
  6318. while (1);
  6319. resetContextDependencies();
  6320. tracing.__interactionsRef.current = expirationTime;
  6321. executionContext = prevExecutionContext;
  6322. ReactCurrentDispatcher$1.current = prevDispatcher;
  6323. if (null !== workInProgress)
  6324. throw Error(
  6325. "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue."
  6326. );
  6327. workInProgressRoot = null;
  6328. return workInProgressRootExitStatus;
  6329. }
  6330. function workLoopSync() {
  6331. for (; null !== workInProgress; )
  6332. workInProgress = performUnitOfWork(workInProgress);
  6333. }
  6334. function workLoopConcurrent() {
  6335. for (; null !== workInProgress && !Scheduler_shouldYield(); )
  6336. workInProgress = performUnitOfWork(workInProgress);
  6337. }
  6338. function performUnitOfWork(unitOfWork) {
  6339. var current = unitOfWork.alternate;
  6340. 0 !== (unitOfWork.mode & 8)
  6341. ? ((profilerStartTime = now$1()),
  6342. 0 > unitOfWork.actualStartTime && (unitOfWork.actualStartTime = now$1()),
  6343. (current = beginWork$1(current, unitOfWork, renderExpirationTime$1)),
  6344. stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, !0))
  6345. : (current = beginWork$1(current, unitOfWork, renderExpirationTime$1));
  6346. unitOfWork.memoizedProps = unitOfWork.pendingProps;
  6347. null === current && (current = completeUnitOfWork(unitOfWork));
  6348. ReactCurrentOwner$2.current = null;
  6349. return current;
  6350. }
  6351. function completeUnitOfWork(unitOfWork) {
  6352. workInProgress = unitOfWork;
  6353. do {
  6354. var current = workInProgress.alternate;
  6355. unitOfWork = workInProgress.return;
  6356. if (0 === (workInProgress.effectTag & 2048)) {
  6357. if (0 === (workInProgress.mode & 8))
  6358. current = completeWork(current, workInProgress, renderExpirationTime$1);
  6359. else {
  6360. var fiber = workInProgress;
  6361. profilerStartTime = now$1();
  6362. 0 > fiber.actualStartTime && (fiber.actualStartTime = now$1());
  6363. current = completeWork(current, workInProgress, renderExpirationTime$1);
  6364. stopProfilerTimerIfRunningAndRecordDelta(workInProgress, !1);
  6365. }
  6366. fiber = workInProgress;
  6367. if (1 === renderExpirationTime$1 || 1 !== fiber.childExpirationTime) {
  6368. var newChildExpirationTime = 0;
  6369. if (0 !== (fiber.mode & 8)) {
  6370. for (
  6371. var actualDuration = fiber.actualDuration,
  6372. treeBaseDuration = fiber.selfBaseDuration,
  6373. shouldBubbleActualDurations =
  6374. null === fiber.alternate ||
  6375. fiber.child !== fiber.alternate.child,
  6376. child = fiber.child;
  6377. null !== child;
  6378. ) {
  6379. var childUpdateExpirationTime = child.expirationTime,
  6380. childChildExpirationTime = child.childExpirationTime;
  6381. childUpdateExpirationTime > newChildExpirationTime &&
  6382. (newChildExpirationTime = childUpdateExpirationTime);
  6383. childChildExpirationTime > newChildExpirationTime &&
  6384. (newChildExpirationTime = childChildExpirationTime);
  6385. shouldBubbleActualDurations &&
  6386. (actualDuration += child.actualDuration);
  6387. treeBaseDuration += child.treeBaseDuration;
  6388. child = child.sibling;
  6389. }
  6390. fiber.actualDuration = actualDuration;
  6391. fiber.treeBaseDuration = treeBaseDuration;
  6392. } else
  6393. for (actualDuration = fiber.child; null !== actualDuration; )
  6394. (treeBaseDuration = actualDuration.expirationTime),
  6395. (shouldBubbleActualDurations =
  6396. actualDuration.childExpirationTime),
  6397. treeBaseDuration > newChildExpirationTime &&
  6398. (newChildExpirationTime = treeBaseDuration),
  6399. shouldBubbleActualDurations > newChildExpirationTime &&
  6400. (newChildExpirationTime = shouldBubbleActualDurations),
  6401. (actualDuration = actualDuration.sibling);
  6402. fiber.childExpirationTime = newChildExpirationTime;
  6403. }
  6404. if (null !== current) return current;
  6405. null !== unitOfWork &&
  6406. 0 === (unitOfWork.effectTag & 2048) &&
  6407. (null === unitOfWork.firstEffect &&
  6408. (unitOfWork.firstEffect = workInProgress.firstEffect),
  6409. null !== workInProgress.lastEffect &&
  6410. (null !== unitOfWork.lastEffect &&
  6411. (unitOfWork.lastEffect.nextEffect = workInProgress.firstEffect),
  6412. (unitOfWork.lastEffect = workInProgress.lastEffect)),
  6413. 1 < workInProgress.effectTag &&
  6414. (null !== unitOfWork.lastEffect
  6415. ? (unitOfWork.lastEffect.nextEffect = workInProgress)
  6416. : (unitOfWork.firstEffect = workInProgress),
  6417. (unitOfWork.lastEffect = workInProgress)));
  6418. } else {
  6419. current = unwindWork(workInProgress);
  6420. if (0 !== (workInProgress.mode & 8)) {
  6421. stopProfilerTimerIfRunningAndRecordDelta(workInProgress, !1);
  6422. fiber = workInProgress.actualDuration;
  6423. for (
  6424. newChildExpirationTime = workInProgress.child;
  6425. null !== newChildExpirationTime;
  6426. )
  6427. (fiber += newChildExpirationTime.actualDuration),
  6428. (newChildExpirationTime = newChildExpirationTime.sibling);
  6429. workInProgress.actualDuration = fiber;
  6430. }
  6431. if (null !== current) return (current.effectTag &= 2047), current;
  6432. null !== unitOfWork &&
  6433. ((unitOfWork.firstEffect = unitOfWork.lastEffect = null),
  6434. (unitOfWork.effectTag |= 2048));
  6435. }
  6436. current = workInProgress.sibling;
  6437. if (null !== current) return current;
  6438. workInProgress = unitOfWork;
  6439. } while (null !== workInProgress);
  6440. workInProgressRootExitStatus === RootIncomplete &&
  6441. (workInProgressRootExitStatus = RootCompleted);
  6442. return null;
  6443. }
  6444. function getRemainingExpirationTime(fiber) {
  6445. var updateExpirationTime = fiber.expirationTime;
  6446. fiber = fiber.childExpirationTime;
  6447. return updateExpirationTime > fiber ? updateExpirationTime : fiber;
  6448. }
  6449. function commitRoot(root) {
  6450. var renderPriorityLevel = getCurrentPriorityLevel();
  6451. runWithPriority(99, commitRootImpl.bind(null, root, renderPriorityLevel));
  6452. return null;
  6453. }
  6454. function commitRootImpl(root$jscomp$0, renderPriorityLevel$jscomp$0) {
  6455. do flushPassiveEffects();
  6456. while (null !== rootWithPendingPassiveEffects);
  6457. if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
  6458. throw Error("Should not already be working.");
  6459. var finishedWork = root$jscomp$0.finishedWork,
  6460. expirationTime = root$jscomp$0.finishedExpirationTime;
  6461. if (null === finishedWork) return null;
  6462. root$jscomp$0.finishedWork = null;
  6463. root$jscomp$0.finishedExpirationTime = 0;
  6464. if (finishedWork === root$jscomp$0.current)
  6465. throw Error(
  6466. "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
  6467. );
  6468. root$jscomp$0.callbackNode = null;
  6469. root$jscomp$0.callbackExpirationTime = 0;
  6470. root$jscomp$0.callbackPriority = 90;
  6471. root$jscomp$0.nextKnownPendingLevel = 0;
  6472. var remainingExpirationTimeBeforeCommit = getRemainingExpirationTime(
  6473. finishedWork
  6474. );
  6475. root$jscomp$0.firstPendingTime = remainingExpirationTimeBeforeCommit;
  6476. expirationTime <= root$jscomp$0.lastSuspendedTime
  6477. ? (root$jscomp$0.firstSuspendedTime = root$jscomp$0.lastSuspendedTime = root$jscomp$0.nextKnownPendingLevel = 0)
  6478. : expirationTime <= root$jscomp$0.firstSuspendedTime &&
  6479. (root$jscomp$0.firstSuspendedTime = expirationTime - 1);
  6480. expirationTime <= root$jscomp$0.lastPingedTime &&
  6481. (root$jscomp$0.lastPingedTime = 0);
  6482. expirationTime <= root$jscomp$0.lastExpiredTime &&
  6483. (root$jscomp$0.lastExpiredTime = 0);
  6484. root$jscomp$0 === workInProgressRoot &&
  6485. ((workInProgress = workInProgressRoot = null),
  6486. (renderExpirationTime$1 = 0));
  6487. 1 < finishedWork.effectTag
  6488. ? null !== finishedWork.lastEffect
  6489. ? ((finishedWork.lastEffect.nextEffect = finishedWork),
  6490. (remainingExpirationTimeBeforeCommit = finishedWork.firstEffect))
  6491. : (remainingExpirationTimeBeforeCommit = finishedWork)
  6492. : (remainingExpirationTimeBeforeCommit = finishedWork.firstEffect);
  6493. if (null !== remainingExpirationTimeBeforeCommit) {
  6494. var prevExecutionContext = executionContext;
  6495. executionContext |= CommitContext;
  6496. var prevInteractions = pushInteractions(root$jscomp$0);
  6497. ReactCurrentOwner$2.current = null;
  6498. nextEffect = remainingExpirationTimeBeforeCommit;
  6499. do
  6500. try {
  6501. commitBeforeMutationEffects();
  6502. } catch (error) {
  6503. if (null === nextEffect) throw Error("Should be working on an effect.");
  6504. captureCommitPhaseError(nextEffect, error);
  6505. nextEffect = nextEffect.nextEffect;
  6506. }
  6507. while (null !== nextEffect);
  6508. commitTime = now$1();
  6509. nextEffect = remainingExpirationTimeBeforeCommit;
  6510. do
  6511. try {
  6512. for (
  6513. var root = root$jscomp$0,
  6514. renderPriorityLevel = renderPriorityLevel$jscomp$0;
  6515. null !== nextEffect;
  6516. ) {
  6517. var effectTag = nextEffect.effectTag;
  6518. if (effectTag & 128) {
  6519. var current = nextEffect.alternate;
  6520. if (null !== current) {
  6521. var currentRef = current.ref;
  6522. null !== currentRef &&
  6523. ("function" === typeof currentRef
  6524. ? currentRef(null)
  6525. : (currentRef.current = null));
  6526. }
  6527. }
  6528. switch (effectTag & 1038) {
  6529. case 2:
  6530. commitPlacement(nextEffect);
  6531. nextEffect.effectTag &= -3;
  6532. break;
  6533. case 6:
  6534. commitPlacement(nextEffect);
  6535. nextEffect.effectTag &= -3;
  6536. commitWork(nextEffect.alternate, nextEffect);
  6537. break;
  6538. case 1024:
  6539. nextEffect.effectTag &= -1025;
  6540. break;
  6541. case 1028:
  6542. nextEffect.effectTag &= -1025;
  6543. commitWork(nextEffect.alternate, nextEffect);
  6544. break;
  6545. case 4:
  6546. commitWork(nextEffect.alternate, nextEffect);
  6547. break;
  6548. case 8:
  6549. var current$jscomp$0 = nextEffect;
  6550. unmountHostComponents(
  6551. root,
  6552. current$jscomp$0,
  6553. renderPriorityLevel
  6554. );
  6555. detachFiber(current$jscomp$0);
  6556. }
  6557. nextEffect = nextEffect.nextEffect;
  6558. }
  6559. } catch (error) {
  6560. if (null === nextEffect) throw Error("Should be working on an effect.");
  6561. captureCommitPhaseError(nextEffect, error);
  6562. nextEffect = nextEffect.nextEffect;
  6563. }
  6564. while (null !== nextEffect);
  6565. root$jscomp$0.current = finishedWork;
  6566. nextEffect = remainingExpirationTimeBeforeCommit;
  6567. do
  6568. try {
  6569. for (effectTag = root$jscomp$0; null !== nextEffect; ) {
  6570. var effectTag$jscomp$0 = nextEffect.effectTag;
  6571. effectTag$jscomp$0 & 36 &&
  6572. commitLifeCycles(effectTag, nextEffect.alternate, nextEffect);
  6573. if (effectTag$jscomp$0 & 128) {
  6574. current = void 0;
  6575. var ref = nextEffect.ref;
  6576. if (null !== ref) {
  6577. var instance = nextEffect.stateNode;
  6578. switch (nextEffect.tag) {
  6579. case 5:
  6580. current = instance;
  6581. break;
  6582. default:
  6583. current = instance;
  6584. }
  6585. "function" === typeof ref
  6586. ? ref(current)
  6587. : (ref.current = current);
  6588. }
  6589. }
  6590. nextEffect = nextEffect.nextEffect;
  6591. }
  6592. } catch (error) {
  6593. if (null === nextEffect) throw Error("Should be working on an effect.");
  6594. captureCommitPhaseError(nextEffect, error);
  6595. nextEffect = nextEffect.nextEffect;
  6596. }
  6597. while (null !== nextEffect);
  6598. nextEffect = null;
  6599. requestPaint();
  6600. tracing.__interactionsRef.current = prevInteractions;
  6601. executionContext = prevExecutionContext;
  6602. } else (root$jscomp$0.current = finishedWork), (commitTime = now$1());
  6603. if ((effectTag$jscomp$0 = rootDoesHavePassiveEffects))
  6604. (rootDoesHavePassiveEffects = !1),
  6605. (rootWithPendingPassiveEffects = root$jscomp$0),
  6606. (pendingPassiveEffectsExpirationTime = expirationTime),
  6607. (pendingPassiveEffectsRenderPriority = renderPriorityLevel$jscomp$0);
  6608. else
  6609. for (
  6610. nextEffect = remainingExpirationTimeBeforeCommit;
  6611. null !== nextEffect;
  6612. )
  6613. (renderPriorityLevel$jscomp$0 = nextEffect.nextEffect),
  6614. (nextEffect.nextEffect = null),
  6615. (nextEffect = renderPriorityLevel$jscomp$0);
  6616. renderPriorityLevel$jscomp$0 = root$jscomp$0.firstPendingTime;
  6617. if (0 !== renderPriorityLevel$jscomp$0) {
  6618. if (null !== spawnedWorkDuringRender)
  6619. for (
  6620. remainingExpirationTimeBeforeCommit = spawnedWorkDuringRender,
  6621. spawnedWorkDuringRender = null,
  6622. ref = 0;
  6623. ref < remainingExpirationTimeBeforeCommit.length;
  6624. ref++
  6625. )
  6626. scheduleInteractions(
  6627. root$jscomp$0,
  6628. remainingExpirationTimeBeforeCommit[ref],
  6629. root$jscomp$0.memoizedInteractions
  6630. );
  6631. schedulePendingInteractions(root$jscomp$0, renderPriorityLevel$jscomp$0);
  6632. } else legacyErrorBoundariesThatAlreadyFailed = null;
  6633. effectTag$jscomp$0 ||
  6634. finishPendingInteractions(root$jscomp$0, expirationTime);
  6635. 1073741823 === renderPriorityLevel$jscomp$0
  6636. ? root$jscomp$0 === rootWithNestedUpdates
  6637. ? nestedUpdateCount++
  6638. : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root$jscomp$0))
  6639. : (nestedUpdateCount = 0);
  6640. "function" === typeof onCommitFiberRoot &&
  6641. onCommitFiberRoot(finishedWork.stateNode, expirationTime);
  6642. ensureRootIsScheduled(root$jscomp$0);
  6643. if (hasUncaughtError)
  6644. throw ((hasUncaughtError = !1),
  6645. (root$jscomp$0 = firstUncaughtError),
  6646. (firstUncaughtError = null),
  6647. root$jscomp$0);
  6648. if ((executionContext & LegacyUnbatchedContext) !== NoContext) return null;
  6649. flushSyncCallbackQueue();
  6650. return null;
  6651. }
  6652. function commitBeforeMutationEffects() {
  6653. for (; null !== nextEffect; ) {
  6654. var effectTag = nextEffect.effectTag;
  6655. 0 !== (effectTag & 256) &&
  6656. commitBeforeMutationLifeCycles(nextEffect.alternate, nextEffect);
  6657. 0 === (effectTag & 512) ||
  6658. rootDoesHavePassiveEffects ||
  6659. ((rootDoesHavePassiveEffects = !0),
  6660. scheduleCallback(97, function() {
  6661. flushPassiveEffects();
  6662. return null;
  6663. }));
  6664. nextEffect = nextEffect.nextEffect;
  6665. }
  6666. }
  6667. function flushPassiveEffects() {
  6668. if (90 !== pendingPassiveEffectsRenderPriority) {
  6669. var priorityLevel =
  6670. 97 < pendingPassiveEffectsRenderPriority
  6671. ? 97
  6672. : pendingPassiveEffectsRenderPriority;
  6673. pendingPassiveEffectsRenderPriority = 90;
  6674. return runWithPriority(priorityLevel, flushPassiveEffectsImpl);
  6675. }
  6676. }
  6677. function flushPassiveEffectsImpl() {
  6678. if (null === rootWithPendingPassiveEffects) return !1;
  6679. var root = rootWithPendingPassiveEffects,
  6680. expirationTime = pendingPassiveEffectsExpirationTime;
  6681. rootWithPendingPassiveEffects = null;
  6682. pendingPassiveEffectsExpirationTime = 0;
  6683. if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
  6684. throw Error("Cannot flush passive effects while already rendering.");
  6685. var prevExecutionContext = executionContext;
  6686. executionContext |= CommitContext;
  6687. for (
  6688. var prevInteractions = pushInteractions(root),
  6689. _effect2 = root.current.firstEffect;
  6690. null !== _effect2;
  6691. ) {
  6692. try {
  6693. var finishedWork = _effect2;
  6694. if (0 !== (finishedWork.effectTag & 512))
  6695. switch (finishedWork.tag) {
  6696. case 0:
  6697. case 11:
  6698. case 15:
  6699. case 22:
  6700. commitHookEffectListUnmount(5, finishedWork),
  6701. commitHookEffectListMount(5, finishedWork);
  6702. }
  6703. } catch (error) {
  6704. if (null === _effect2) throw Error("Should be working on an effect.");
  6705. captureCommitPhaseError(_effect2, error);
  6706. }
  6707. finishedWork = _effect2.nextEffect;
  6708. _effect2.nextEffect = null;
  6709. _effect2 = finishedWork;
  6710. }
  6711. tracing.__interactionsRef.current = prevInteractions;
  6712. finishPendingInteractions(root, expirationTime);
  6713. executionContext = prevExecutionContext;
  6714. flushSyncCallbackQueue();
  6715. return !0;
  6716. }
  6717. function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
  6718. sourceFiber = createCapturedValue(error, sourceFiber);
  6719. sourceFiber = createRootErrorUpdate(rootFiber, sourceFiber, 1073741823);
  6720. enqueueUpdate(rootFiber, sourceFiber);
  6721. rootFiber = markUpdateTimeFromFiberToRoot(rootFiber, 1073741823);
  6722. null !== rootFiber &&
  6723. (ensureRootIsScheduled(rootFiber),
  6724. schedulePendingInteractions(rootFiber, 1073741823));
  6725. }
  6726. function captureCommitPhaseError(sourceFiber, error) {
  6727. if (3 === sourceFiber.tag)
  6728. captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
  6729. else
  6730. for (var fiber = sourceFiber.return; null !== fiber; ) {
  6731. if (3 === fiber.tag) {
  6732. captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error);
  6733. break;
  6734. } else if (1 === fiber.tag) {
  6735. var instance = fiber.stateNode;
  6736. if (
  6737. "function" === typeof fiber.type.getDerivedStateFromError ||
  6738. ("function" === typeof instance.componentDidCatch &&
  6739. (null === legacyErrorBoundariesThatAlreadyFailed ||
  6740. !legacyErrorBoundariesThatAlreadyFailed.has(instance)))
  6741. ) {
  6742. sourceFiber = createCapturedValue(error, sourceFiber);
  6743. sourceFiber = createClassErrorUpdate(fiber, sourceFiber, 1073741823);
  6744. enqueueUpdate(fiber, sourceFiber);
  6745. fiber = markUpdateTimeFromFiberToRoot(fiber, 1073741823);
  6746. null !== fiber &&
  6747. (ensureRootIsScheduled(fiber),
  6748. schedulePendingInteractions(fiber, 1073741823));
  6749. break;
  6750. }
  6751. }
  6752. fiber = fiber.return;
  6753. }
  6754. }
  6755. function pingSuspendedRoot(root, thenable, suspendedTime) {
  6756. var pingCache = root.pingCache;
  6757. null !== pingCache && pingCache.delete(thenable);
  6758. workInProgressRoot === root && renderExpirationTime$1 === suspendedTime
  6759. ? workInProgressRootExitStatus === RootSuspendedWithDelay ||
  6760. (workInProgressRootExitStatus === RootSuspended &&
  6761. 1073741823 === workInProgressRootLatestProcessedExpirationTime &&
  6762. now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS)
  6763. ? prepareFreshStack(root, renderExpirationTime$1)
  6764. : (workInProgressRootHasPendingPing = !0)
  6765. : isRootSuspendedAtTime(root, suspendedTime) &&
  6766. ((thenable = root.lastPingedTime),
  6767. (0 !== thenable && thenable < suspendedTime) ||
  6768. ((root.lastPingedTime = suspendedTime),
  6769. ensureRootIsScheduled(root),
  6770. schedulePendingInteractions(root, suspendedTime)));
  6771. }
  6772. function resolveRetryThenable(boundaryFiber, thenable) {
  6773. var retryCache = boundaryFiber.stateNode;
  6774. null !== retryCache && retryCache.delete(thenable);
  6775. thenable = 0;
  6776. 0 === thenable &&
  6777. ((thenable = requestCurrentTimeForUpdate()),
  6778. (thenable = computeExpirationForFiber(thenable, boundaryFiber, null)));
  6779. boundaryFiber = markUpdateTimeFromFiberToRoot(boundaryFiber, thenable);
  6780. null !== boundaryFiber &&
  6781. (ensureRootIsScheduled(boundaryFiber),
  6782. schedulePendingInteractions(boundaryFiber, thenable));
  6783. }
  6784. var beginWork$1;
  6785. beginWork$1 = function(current, workInProgress, renderExpirationTime) {
  6786. var updateExpirationTime = workInProgress.expirationTime;
  6787. if (null !== current)
  6788. if (
  6789. current.memoizedProps !== workInProgress.pendingProps ||
  6790. didPerformWorkStackCursor.current
  6791. )
  6792. didReceiveUpdate = !0;
  6793. else {
  6794. if (updateExpirationTime < renderExpirationTime) {
  6795. didReceiveUpdate = !1;
  6796. switch (workInProgress.tag) {
  6797. case 3:
  6798. pushHostRootContext(workInProgress);
  6799. break;
  6800. case 5:
  6801. pushHostContext(workInProgress);
  6802. break;
  6803. case 1:
  6804. isContextProvider(workInProgress.type) &&
  6805. pushContextProvider(workInProgress);
  6806. break;
  6807. case 4:
  6808. pushHostContainer(
  6809. workInProgress,
  6810. workInProgress.stateNode.containerInfo
  6811. );
  6812. break;
  6813. case 10:
  6814. updateExpirationTime = workInProgress.memoizedProps.value;
  6815. var context = workInProgress.type._context;
  6816. push(valueCursor, context._currentValue);
  6817. context._currentValue = updateExpirationTime;
  6818. break;
  6819. case 12:
  6820. workInProgress.childExpirationTime >= renderExpirationTime &&
  6821. (workInProgress.effectTag |= 4);
  6822. updateExpirationTime = workInProgress.stateNode;
  6823. updateExpirationTime.effectDuration = 0;
  6824. updateExpirationTime.passiveEffectDuration = 0;
  6825. break;
  6826. case 13:
  6827. if (null !== workInProgress.memoizedState) {
  6828. updateExpirationTime = workInProgress.child.childExpirationTime;
  6829. if (
  6830. 0 !== updateExpirationTime &&
  6831. updateExpirationTime >= renderExpirationTime
  6832. )
  6833. return updateSuspenseComponent(
  6834. current,
  6835. workInProgress,
  6836. renderExpirationTime
  6837. );
  6838. push(suspenseStackCursor, suspenseStackCursor.current & 1);
  6839. workInProgress = bailoutOnAlreadyFinishedWork(
  6840. current,
  6841. workInProgress,
  6842. renderExpirationTime
  6843. );
  6844. return null !== workInProgress ? workInProgress.sibling : null;
  6845. }
  6846. push(suspenseStackCursor, suspenseStackCursor.current & 1);
  6847. break;
  6848. case 19:
  6849. updateExpirationTime =
  6850. workInProgress.childExpirationTime >= renderExpirationTime;
  6851. if (0 !== (current.effectTag & 64)) {
  6852. if (updateExpirationTime)
  6853. return updateSuspenseListComponent(
  6854. current,
  6855. workInProgress,
  6856. renderExpirationTime
  6857. );
  6858. workInProgress.effectTag |= 64;
  6859. }
  6860. context = workInProgress.memoizedState;
  6861. null !== context &&
  6862. ((context.rendering = null), (context.tail = null));
  6863. push(suspenseStackCursor, suspenseStackCursor.current);
  6864. if (!updateExpirationTime) return null;
  6865. }
  6866. return bailoutOnAlreadyFinishedWork(
  6867. current,
  6868. workInProgress,
  6869. renderExpirationTime
  6870. );
  6871. }
  6872. didReceiveUpdate = !1;
  6873. }
  6874. else didReceiveUpdate = !1;
  6875. workInProgress.expirationTime = 0;
  6876. switch (workInProgress.tag) {
  6877. case 2:
  6878. updateExpirationTime = workInProgress.type;
  6879. null !== current &&
  6880. ((current.alternate = null),
  6881. (workInProgress.alternate = null),
  6882. (workInProgress.effectTag |= 2));
  6883. current = workInProgress.pendingProps;
  6884. context = getMaskedContext(workInProgress, contextStackCursor.current);
  6885. prepareToReadContext(workInProgress, renderExpirationTime);
  6886. context = renderWithHooks(
  6887. null,
  6888. workInProgress,
  6889. updateExpirationTime,
  6890. current,
  6891. context,
  6892. renderExpirationTime
  6893. );
  6894. workInProgress.effectTag |= 1;
  6895. if (
  6896. "object" === typeof context &&
  6897. null !== context &&
  6898. "function" === typeof context.render &&
  6899. void 0 === context.$$typeof
  6900. ) {
  6901. workInProgress.tag = 1;
  6902. workInProgress.memoizedState = null;
  6903. workInProgress.updateQueue = null;
  6904. if (isContextProvider(updateExpirationTime)) {
  6905. var hasContext = !0;
  6906. pushContextProvider(workInProgress);
  6907. } else hasContext = !1;
  6908. workInProgress.memoizedState =
  6909. null !== context.state && void 0 !== context.state
  6910. ? context.state
  6911. : null;
  6912. initializeUpdateQueue(workInProgress);
  6913. var getDerivedStateFromProps =
  6914. updateExpirationTime.getDerivedStateFromProps;
  6915. "function" === typeof getDerivedStateFromProps &&
  6916. applyDerivedStateFromProps(
  6917. workInProgress,
  6918. updateExpirationTime,
  6919. getDerivedStateFromProps,
  6920. current
  6921. );
  6922. context.updater = classComponentUpdater;
  6923. workInProgress.stateNode = context;
  6924. context._reactInternalFiber = workInProgress;
  6925. mountClassInstance(
  6926. workInProgress,
  6927. updateExpirationTime,
  6928. current,
  6929. renderExpirationTime
  6930. );
  6931. workInProgress = finishClassComponent(
  6932. null,
  6933. workInProgress,
  6934. updateExpirationTime,
  6935. !0,
  6936. hasContext,
  6937. renderExpirationTime
  6938. );
  6939. } else
  6940. (workInProgress.tag = 0),
  6941. reconcileChildren(
  6942. null,
  6943. workInProgress,
  6944. context,
  6945. renderExpirationTime
  6946. ),
  6947. (workInProgress = workInProgress.child);
  6948. return workInProgress;
  6949. case 16:
  6950. a: {
  6951. context = workInProgress.elementType;
  6952. null !== current &&
  6953. ((current.alternate = null),
  6954. (workInProgress.alternate = null),
  6955. (workInProgress.effectTag |= 2));
  6956. current = workInProgress.pendingProps;
  6957. initializeLazyComponentType(context);
  6958. if (1 !== context._status) throw context._result;
  6959. context = context._result;
  6960. workInProgress.type = context;
  6961. hasContext = workInProgress.tag = resolveLazyComponentTag(context);
  6962. current = resolveDefaultProps(context, current);
  6963. switch (hasContext) {
  6964. case 0:
  6965. workInProgress = updateFunctionComponent(
  6966. null,
  6967. workInProgress,
  6968. context,
  6969. current,
  6970. renderExpirationTime
  6971. );
  6972. break a;
  6973. case 1:
  6974. workInProgress = updateClassComponent(
  6975. null,
  6976. workInProgress,
  6977. context,
  6978. current,
  6979. renderExpirationTime
  6980. );
  6981. break a;
  6982. case 11:
  6983. workInProgress = updateForwardRef(
  6984. null,
  6985. workInProgress,
  6986. context,
  6987. current,
  6988. renderExpirationTime
  6989. );
  6990. break a;
  6991. case 14:
  6992. workInProgress = updateMemoComponent(
  6993. null,
  6994. workInProgress,
  6995. context,
  6996. resolveDefaultProps(context.type, current),
  6997. updateExpirationTime,
  6998. renderExpirationTime
  6999. );
  7000. break a;
  7001. }
  7002. throw Error(
  7003. "Element type is invalid. Received a promise that resolves to: " +
  7004. context +
  7005. ". Lazy element type must resolve to a class or function."
  7006. );
  7007. }
  7008. return workInProgress;
  7009. case 0:
  7010. return (
  7011. (updateExpirationTime = workInProgress.type),
  7012. (context = workInProgress.pendingProps),
  7013. (context =
  7014. workInProgress.elementType === updateExpirationTime
  7015. ? context
  7016. : resolveDefaultProps(updateExpirationTime, context)),
  7017. updateFunctionComponent(
  7018. current,
  7019. workInProgress,
  7020. updateExpirationTime,
  7021. context,
  7022. renderExpirationTime
  7023. )
  7024. );
  7025. case 1:
  7026. return (
  7027. (updateExpirationTime = workInProgress.type),
  7028. (context = workInProgress.pendingProps),
  7029. (context =
  7030. workInProgress.elementType === updateExpirationTime
  7031. ? context
  7032. : resolveDefaultProps(updateExpirationTime, context)),
  7033. updateClassComponent(
  7034. current,
  7035. workInProgress,
  7036. updateExpirationTime,
  7037. context,
  7038. renderExpirationTime
  7039. )
  7040. );
  7041. case 3:
  7042. pushHostRootContext(workInProgress);
  7043. updateExpirationTime = workInProgress.updateQueue;
  7044. if (null === current || null === updateExpirationTime)
  7045. throw Error(
  7046. "If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue."
  7047. );
  7048. updateExpirationTime = workInProgress.pendingProps;
  7049. context = workInProgress.memoizedState;
  7050. context = null !== context ? context.element : null;
  7051. cloneUpdateQueue(current, workInProgress);
  7052. processUpdateQueue(
  7053. workInProgress,
  7054. updateExpirationTime,
  7055. null,
  7056. renderExpirationTime
  7057. );
  7058. updateExpirationTime = workInProgress.memoizedState.element;
  7059. updateExpirationTime === context
  7060. ? (workInProgress = bailoutOnAlreadyFinishedWork(
  7061. current,
  7062. workInProgress,
  7063. renderExpirationTime
  7064. ))
  7065. : (reconcileChildren(
  7066. current,
  7067. workInProgress,
  7068. updateExpirationTime,
  7069. renderExpirationTime
  7070. ),
  7071. (workInProgress = workInProgress.child));
  7072. return workInProgress;
  7073. case 5:
  7074. return (
  7075. pushHostContext(workInProgress),
  7076. (updateExpirationTime = workInProgress.pendingProps.children),
  7077. markRef(current, workInProgress),
  7078. reconcileChildren(
  7079. current,
  7080. workInProgress,
  7081. updateExpirationTime,
  7082. renderExpirationTime
  7083. ),
  7084. (workInProgress = workInProgress.child),
  7085. workInProgress
  7086. );
  7087. case 6:
  7088. return null;
  7089. case 13:
  7090. return updateSuspenseComponent(
  7091. current,
  7092. workInProgress,
  7093. renderExpirationTime
  7094. );
  7095. case 4:
  7096. return (
  7097. pushHostContainer(
  7098. workInProgress,
  7099. workInProgress.stateNode.containerInfo
  7100. ),
  7101. (updateExpirationTime = workInProgress.pendingProps),
  7102. null === current
  7103. ? (workInProgress.child = reconcileChildFibers(
  7104. workInProgress,
  7105. null,
  7106. updateExpirationTime,
  7107. renderExpirationTime
  7108. ))
  7109. : reconcileChildren(
  7110. current,
  7111. workInProgress,
  7112. updateExpirationTime,
  7113. renderExpirationTime
  7114. ),
  7115. workInProgress.child
  7116. );
  7117. case 11:
  7118. return (
  7119. (updateExpirationTime = workInProgress.type),
  7120. (context = workInProgress.pendingProps),
  7121. (context =
  7122. workInProgress.elementType === updateExpirationTime
  7123. ? context
  7124. : resolveDefaultProps(updateExpirationTime, context)),
  7125. updateForwardRef(
  7126. current,
  7127. workInProgress,
  7128. updateExpirationTime,
  7129. context,
  7130. renderExpirationTime
  7131. )
  7132. );
  7133. case 7:
  7134. return (
  7135. reconcileChildren(
  7136. current,
  7137. workInProgress,
  7138. workInProgress.pendingProps,
  7139. renderExpirationTime
  7140. ),
  7141. workInProgress.child
  7142. );
  7143. case 8:
  7144. return (
  7145. reconcileChildren(
  7146. current,
  7147. workInProgress,
  7148. workInProgress.pendingProps.children,
  7149. renderExpirationTime
  7150. ),
  7151. workInProgress.child
  7152. );
  7153. case 12:
  7154. return (
  7155. (workInProgress.effectTag |= 4),
  7156. (updateExpirationTime = workInProgress.stateNode),
  7157. (updateExpirationTime.effectDuration = 0),
  7158. (updateExpirationTime.passiveEffectDuration = 0),
  7159. reconcileChildren(
  7160. current,
  7161. workInProgress,
  7162. workInProgress.pendingProps.children,
  7163. renderExpirationTime
  7164. ),
  7165. workInProgress.child
  7166. );
  7167. case 10:
  7168. a: {
  7169. updateExpirationTime = workInProgress.type._context;
  7170. context = workInProgress.pendingProps;
  7171. getDerivedStateFromProps = workInProgress.memoizedProps;
  7172. hasContext = context.value;
  7173. var context$jscomp$0 = workInProgress.type._context;
  7174. push(valueCursor, context$jscomp$0._currentValue);
  7175. context$jscomp$0._currentValue = hasContext;
  7176. if (null !== getDerivedStateFromProps)
  7177. if (
  7178. ((context$jscomp$0 = getDerivedStateFromProps.value),
  7179. (hasContext = objectIs(context$jscomp$0, hasContext)
  7180. ? 0
  7181. : ("function" ===
  7182. typeof updateExpirationTime._calculateChangedBits
  7183. ? updateExpirationTime._calculateChangedBits(
  7184. context$jscomp$0,
  7185. hasContext
  7186. )
  7187. : 1073741823) | 0),
  7188. 0 === hasContext)
  7189. ) {
  7190. if (
  7191. getDerivedStateFromProps.children === context.children &&
  7192. !didPerformWorkStackCursor.current
  7193. ) {
  7194. workInProgress = bailoutOnAlreadyFinishedWork(
  7195. current,
  7196. workInProgress,
  7197. renderExpirationTime
  7198. );
  7199. break a;
  7200. }
  7201. } else
  7202. for (
  7203. context$jscomp$0 = workInProgress.child,
  7204. null !== context$jscomp$0 &&
  7205. (context$jscomp$0.return = workInProgress);
  7206. null !== context$jscomp$0;
  7207. ) {
  7208. var list = context$jscomp$0.dependencies;
  7209. if (null !== list) {
  7210. getDerivedStateFromProps = context$jscomp$0.child;
  7211. for (
  7212. var dependency = list.firstContext;
  7213. null !== dependency;
  7214. ) {
  7215. if (
  7216. dependency.context === updateExpirationTime &&
  7217. 0 !== (dependency.observedBits & hasContext)
  7218. ) {
  7219. 1 === context$jscomp$0.tag &&
  7220. ((dependency = createUpdate(renderExpirationTime, null)),
  7221. (dependency.tag = 2),
  7222. enqueueUpdate(context$jscomp$0, dependency));
  7223. context$jscomp$0.expirationTime < renderExpirationTime &&
  7224. (context$jscomp$0.expirationTime = renderExpirationTime);
  7225. dependency = context$jscomp$0.alternate;
  7226. null !== dependency &&
  7227. dependency.expirationTime < renderExpirationTime &&
  7228. (dependency.expirationTime = renderExpirationTime);
  7229. scheduleWorkOnParentPath(
  7230. context$jscomp$0.return,
  7231. renderExpirationTime
  7232. );
  7233. list.expirationTime < renderExpirationTime &&
  7234. (list.expirationTime = renderExpirationTime);
  7235. break;
  7236. }
  7237. dependency = dependency.next;
  7238. }
  7239. } else
  7240. getDerivedStateFromProps =
  7241. 10 === context$jscomp$0.tag
  7242. ? context$jscomp$0.type === workInProgress.type
  7243. ? null
  7244. : context$jscomp$0.child
  7245. : context$jscomp$0.child;
  7246. if (null !== getDerivedStateFromProps)
  7247. getDerivedStateFromProps.return = context$jscomp$0;
  7248. else
  7249. for (
  7250. getDerivedStateFromProps = context$jscomp$0;
  7251. null !== getDerivedStateFromProps;
  7252. ) {
  7253. if (getDerivedStateFromProps === workInProgress) {
  7254. getDerivedStateFromProps = null;
  7255. break;
  7256. }
  7257. context$jscomp$0 = getDerivedStateFromProps.sibling;
  7258. if (null !== context$jscomp$0) {
  7259. context$jscomp$0.return = getDerivedStateFromProps.return;
  7260. getDerivedStateFromProps = context$jscomp$0;
  7261. break;
  7262. }
  7263. getDerivedStateFromProps = getDerivedStateFromProps.return;
  7264. }
  7265. context$jscomp$0 = getDerivedStateFromProps;
  7266. }
  7267. reconcileChildren(
  7268. current,
  7269. workInProgress,
  7270. context.children,
  7271. renderExpirationTime
  7272. );
  7273. workInProgress = workInProgress.child;
  7274. }
  7275. return workInProgress;
  7276. case 9:
  7277. return (
  7278. (context = workInProgress.type),
  7279. (hasContext = workInProgress.pendingProps),
  7280. (updateExpirationTime = hasContext.children),
  7281. prepareToReadContext(workInProgress, renderExpirationTime),
  7282. (context = readContext(context, hasContext.unstable_observedBits)),
  7283. (updateExpirationTime = updateExpirationTime(context)),
  7284. (workInProgress.effectTag |= 1),
  7285. reconcileChildren(
  7286. current,
  7287. workInProgress,
  7288. updateExpirationTime,
  7289. renderExpirationTime
  7290. ),
  7291. workInProgress.child
  7292. );
  7293. case 14:
  7294. return (
  7295. (context = workInProgress.type),
  7296. (hasContext = resolveDefaultProps(
  7297. context,
  7298. workInProgress.pendingProps
  7299. )),
  7300. (hasContext = resolveDefaultProps(context.type, hasContext)),
  7301. updateMemoComponent(
  7302. current,
  7303. workInProgress,
  7304. context,
  7305. hasContext,
  7306. updateExpirationTime,
  7307. renderExpirationTime
  7308. )
  7309. );
  7310. case 15:
  7311. return updateSimpleMemoComponent(
  7312. current,
  7313. workInProgress,
  7314. workInProgress.type,
  7315. workInProgress.pendingProps,
  7316. updateExpirationTime,
  7317. renderExpirationTime
  7318. );
  7319. case 17:
  7320. return (
  7321. (updateExpirationTime = workInProgress.type),
  7322. (context = workInProgress.pendingProps),
  7323. (context =
  7324. workInProgress.elementType === updateExpirationTime
  7325. ? context
  7326. : resolveDefaultProps(updateExpirationTime, context)),
  7327. null !== current &&
  7328. ((current.alternate = null),
  7329. (workInProgress.alternate = null),
  7330. (workInProgress.effectTag |= 2)),
  7331. (workInProgress.tag = 1),
  7332. isContextProvider(updateExpirationTime)
  7333. ? ((current = !0), pushContextProvider(workInProgress))
  7334. : (current = !1),
  7335. prepareToReadContext(workInProgress, renderExpirationTime),
  7336. constructClassInstance(workInProgress, updateExpirationTime, context),
  7337. mountClassInstance(
  7338. workInProgress,
  7339. updateExpirationTime,
  7340. context,
  7341. renderExpirationTime
  7342. ),
  7343. finishClassComponent(
  7344. null,
  7345. workInProgress,
  7346. updateExpirationTime,
  7347. !0,
  7348. current,
  7349. renderExpirationTime
  7350. )
  7351. );
  7352. case 19:
  7353. return updateSuspenseListComponent(
  7354. current,
  7355. workInProgress,
  7356. renderExpirationTime
  7357. );
  7358. }
  7359. throw Error(
  7360. "Unknown unit of work tag (" +
  7361. workInProgress.tag +
  7362. "). This error is likely caused by a bug in React. Please file an issue."
  7363. );
  7364. };
  7365. function scheduleInteractions(root, expirationTime, interactions) {
  7366. if (0 < interactions.size) {
  7367. var pendingInteractionMap = root.pendingInteractionMap,
  7368. pendingInteractions = pendingInteractionMap.get(expirationTime);
  7369. null != pendingInteractions
  7370. ? interactions.forEach(function(interaction) {
  7371. pendingInteractions.has(interaction) || interaction.__count++;
  7372. pendingInteractions.add(interaction);
  7373. })
  7374. : (pendingInteractionMap.set(expirationTime, new Set(interactions)),
  7375. interactions.forEach(function(interaction) {
  7376. interaction.__count++;
  7377. }));
  7378. pendingInteractionMap = tracing.__subscriberRef.current;
  7379. if (null !== pendingInteractionMap)
  7380. pendingInteractionMap.onWorkScheduled(
  7381. interactions,
  7382. 1e3 * expirationTime + root.interactionThreadID
  7383. );
  7384. }
  7385. }
  7386. function schedulePendingInteractions(root, expirationTime) {
  7387. scheduleInteractions(root, expirationTime, tracing.__interactionsRef.current);
  7388. }
  7389. function startWorkOnPendingInteractions(root, expirationTime) {
  7390. var interactions = new Set();
  7391. root.pendingInteractionMap.forEach(function(
  7392. scheduledInteractions,
  7393. scheduledExpirationTime
  7394. ) {
  7395. scheduledExpirationTime >= expirationTime &&
  7396. scheduledInteractions.forEach(function(interaction) {
  7397. return interactions.add(interaction);
  7398. });
  7399. });
  7400. root.memoizedInteractions = interactions;
  7401. if (0 < interactions.size) {
  7402. var subscriber = tracing.__subscriberRef.current;
  7403. if (null !== subscriber) {
  7404. root = 1e3 * expirationTime + root.interactionThreadID;
  7405. try {
  7406. subscriber.onWorkStarted(interactions, root);
  7407. } catch (error) {
  7408. scheduleCallback(99, function() {
  7409. throw error;
  7410. });
  7411. }
  7412. }
  7413. }
  7414. }
  7415. function finishPendingInteractions(root, committedExpirationTime) {
  7416. var earliestRemainingTimeAfterCommit = root.firstPendingTime;
  7417. try {
  7418. var subscriber = tracing.__subscriberRef.current;
  7419. if (null !== subscriber && 0 < root.memoizedInteractions.size)
  7420. subscriber.onWorkStopped(
  7421. root.memoizedInteractions,
  7422. 1e3 * committedExpirationTime + root.interactionThreadID
  7423. );
  7424. } catch (error) {
  7425. scheduleCallback(99, function() {
  7426. throw error;
  7427. });
  7428. } finally {
  7429. var pendingInteractionMap = root.pendingInteractionMap;
  7430. pendingInteractionMap.forEach(function(
  7431. scheduledInteractions,
  7432. scheduledExpirationTime
  7433. ) {
  7434. scheduledExpirationTime > earliestRemainingTimeAfterCommit &&
  7435. (pendingInteractionMap.delete(scheduledExpirationTime),
  7436. scheduledInteractions.forEach(function(interaction) {
  7437. interaction.__count--;
  7438. if (null !== subscriber && 0 === interaction.__count)
  7439. try {
  7440. subscriber.onInteractionScheduledWorkCompleted(interaction);
  7441. } catch (error) {
  7442. scheduleCallback(99, function() {
  7443. throw error;
  7444. });
  7445. }
  7446. }));
  7447. });
  7448. }
  7449. }
  7450. var onCommitFiberRoot = null,
  7451. onCommitFiberUnmount = null,
  7452. isDevToolsPresent = "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__;
  7453. function injectInternals(internals) {
  7454. if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1;
  7455. var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
  7456. if (hook.isDisabled || !hook.supportsFiber) return !0;
  7457. try {
  7458. var rendererID = hook.inject(internals);
  7459. onCommitFiberRoot = function(root, expirationTime) {
  7460. try {
  7461. var didError = 64 === (root.current.effectTag & 64),
  7462. currentTime = 1073741821 - ((now() / 10) | 0),
  7463. priorityLevel = inferPriorityFromExpirationTime(
  7464. currentTime,
  7465. expirationTime
  7466. );
  7467. hook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);
  7468. } catch (err) {}
  7469. };
  7470. onCommitFiberUnmount = function(fiber) {
  7471. try {
  7472. hook.onCommitFiberUnmount(rendererID, fiber);
  7473. } catch (err) {}
  7474. };
  7475. } catch (err) {}
  7476. return !0;
  7477. }
  7478. function FiberNode(tag, pendingProps, key, mode) {
  7479. this.tag = tag;
  7480. this.key = key;
  7481. this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null;
  7482. this.index = 0;
  7483. this.ref = null;
  7484. this.pendingProps = pendingProps;
  7485. this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null;
  7486. this.mode = mode;
  7487. this.effectTag = 0;
  7488. this.lastEffect = this.firstEffect = this.nextEffect = null;
  7489. this.childExpirationTime = this.expirationTime = 0;
  7490. this.alternate = null;
  7491. this.actualDuration = 0;
  7492. this.actualStartTime = -1;
  7493. this.treeBaseDuration = this.selfBaseDuration = 0;
  7494. }
  7495. function shouldConstruct(Component) {
  7496. Component = Component.prototype;
  7497. return !(!Component || !Component.isReactComponent);
  7498. }
  7499. function resolveLazyComponentTag(Component) {
  7500. if ("function" === typeof Component)
  7501. return shouldConstruct(Component) ? 1 : 0;
  7502. if (void 0 !== Component && null !== Component) {
  7503. Component = Component.$$typeof;
  7504. if (Component === REACT_FORWARD_REF_TYPE) return 11;
  7505. if (Component === REACT_MEMO_TYPE) return 14;
  7506. }
  7507. return 2;
  7508. }
  7509. function createWorkInProgress(current, pendingProps) {
  7510. var workInProgress = current.alternate;
  7511. null === workInProgress
  7512. ? ((workInProgress = new FiberNode(
  7513. current.tag,
  7514. pendingProps,
  7515. current.key,
  7516. current.mode
  7517. )),
  7518. (workInProgress.elementType = current.elementType),
  7519. (workInProgress.type = current.type),
  7520. (workInProgress.stateNode = current.stateNode),
  7521. (workInProgress.alternate = current),
  7522. (current.alternate = workInProgress))
  7523. : ((workInProgress.pendingProps = pendingProps),
  7524. (workInProgress.effectTag = 0),
  7525. (workInProgress.nextEffect = null),
  7526. (workInProgress.firstEffect = null),
  7527. (workInProgress.lastEffect = null),
  7528. (workInProgress.actualDuration = 0),
  7529. (workInProgress.actualStartTime = -1));
  7530. if (null == current)
  7531. throw Error("current is " + current + " but it can't be");
  7532. if (null == workInProgress)
  7533. throw Error("workInProgress is " + workInProgress + " but it can't be");
  7534. workInProgress.childExpirationTime = current.childExpirationTime;
  7535. workInProgress.expirationTime = current.expirationTime;
  7536. workInProgress.child = current.child;
  7537. workInProgress.memoizedProps = current.memoizedProps;
  7538. workInProgress.memoizedState = current.memoizedState;
  7539. workInProgress.updateQueue = current.updateQueue;
  7540. pendingProps = current.dependencies;
  7541. workInProgress.dependencies =
  7542. null === pendingProps
  7543. ? null
  7544. : {
  7545. expirationTime: pendingProps.expirationTime,
  7546. firstContext: pendingProps.firstContext,
  7547. responders: pendingProps.responders
  7548. };
  7549. workInProgress.sibling = current.sibling;
  7550. workInProgress.index = current.index;
  7551. workInProgress.ref = current.ref;
  7552. workInProgress.selfBaseDuration = current.selfBaseDuration;
  7553. workInProgress.treeBaseDuration = current.treeBaseDuration;
  7554. return workInProgress;
  7555. }
  7556. function createFiberFromTypeAndProps(
  7557. type,
  7558. key,
  7559. pendingProps,
  7560. owner,
  7561. mode,
  7562. expirationTime
  7563. ) {
  7564. var fiberTag = 2;
  7565. owner = type;
  7566. if ("function" === typeof type) shouldConstruct(type) && (fiberTag = 1);
  7567. else if ("string" === typeof type) fiberTag = 5;
  7568. else
  7569. a: switch (type) {
  7570. case REACT_FRAGMENT_TYPE:
  7571. return createFiberFromFragment(
  7572. pendingProps.children,
  7573. mode,
  7574. expirationTime,
  7575. key
  7576. );
  7577. case REACT_CONCURRENT_MODE_TYPE:
  7578. fiberTag = 8;
  7579. mode |= 7;
  7580. break;
  7581. case REACT_STRICT_MODE_TYPE:
  7582. fiberTag = 8;
  7583. mode |= 1;
  7584. break;
  7585. case REACT_PROFILER_TYPE:
  7586. return (
  7587. (type = new FiberNode(12, pendingProps, key, mode | 8)),
  7588. (type.elementType = REACT_PROFILER_TYPE),
  7589. (type.type = REACT_PROFILER_TYPE),
  7590. (type.expirationTime = expirationTime),
  7591. (type.stateNode = { effectDuration: 0, passiveEffectDuration: 0 }),
  7592. type
  7593. );
  7594. case REACT_SUSPENSE_TYPE:
  7595. return (
  7596. (type = new FiberNode(13, pendingProps, key, mode)),
  7597. (type.type = REACT_SUSPENSE_TYPE),
  7598. (type.elementType = REACT_SUSPENSE_TYPE),
  7599. (type.expirationTime = expirationTime),
  7600. type
  7601. );
  7602. case REACT_SUSPENSE_LIST_TYPE:
  7603. return (
  7604. (type = new FiberNode(19, pendingProps, key, mode)),
  7605. (type.elementType = REACT_SUSPENSE_LIST_TYPE),
  7606. (type.expirationTime = expirationTime),
  7607. type
  7608. );
  7609. default:
  7610. if ("object" === typeof type && null !== type)
  7611. switch (type.$$typeof) {
  7612. case REACT_PROVIDER_TYPE:
  7613. fiberTag = 10;
  7614. break a;
  7615. case REACT_CONTEXT_TYPE:
  7616. fiberTag = 9;
  7617. break a;
  7618. case REACT_FORWARD_REF_TYPE:
  7619. fiberTag = 11;
  7620. break a;
  7621. case REACT_MEMO_TYPE:
  7622. fiberTag = 14;
  7623. break a;
  7624. case REACT_LAZY_TYPE:
  7625. fiberTag = 16;
  7626. owner = null;
  7627. break a;
  7628. case REACT_BLOCK_TYPE:
  7629. fiberTag = 22;
  7630. break a;
  7631. }
  7632. throw Error(
  7633. "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " +
  7634. (null == type ? type : typeof type) +
  7635. "."
  7636. );
  7637. }
  7638. key = new FiberNode(fiberTag, pendingProps, key, mode);
  7639. key.elementType = type;
  7640. key.type = owner;
  7641. key.expirationTime = expirationTime;
  7642. return key;
  7643. }
  7644. function createFiberFromFragment(elements, mode, expirationTime, key) {
  7645. elements = new FiberNode(7, elements, key, mode);
  7646. elements.expirationTime = expirationTime;
  7647. return elements;
  7648. }
  7649. function createFiberFromText(content, mode, expirationTime) {
  7650. content = new FiberNode(6, content, null, mode);
  7651. content.expirationTime = expirationTime;
  7652. return content;
  7653. }
  7654. function createFiberFromPortal(portal, mode, expirationTime) {
  7655. mode = new FiberNode(
  7656. 4,
  7657. null !== portal.children ? portal.children : [],
  7658. portal.key,
  7659. mode
  7660. );
  7661. mode.expirationTime = expirationTime;
  7662. mode.stateNode = {
  7663. containerInfo: portal.containerInfo,
  7664. pendingChildren: null,
  7665. implementation: portal.implementation
  7666. };
  7667. return mode;
  7668. }
  7669. function FiberRootNode(containerInfo, tag, hydrate) {
  7670. this.tag = tag;
  7671. this.current = null;
  7672. this.containerInfo = containerInfo;
  7673. this.pingCache = this.pendingChildren = null;
  7674. this.finishedExpirationTime = 0;
  7675. this.finishedWork = null;
  7676. this.timeoutHandle = -1;
  7677. this.pendingContext = this.context = null;
  7678. this.hydrate = hydrate;
  7679. this.callbackNode = null;
  7680. this.callbackPriority = 90;
  7681. this.lastExpiredTime = this.lastPingedTime = this.nextKnownPendingLevel = this.lastSuspendedTime = this.firstSuspendedTime = this.firstPendingTime = 0;
  7682. this.interactionThreadID = tracing.unstable_getThreadID();
  7683. this.memoizedInteractions = new Set();
  7684. this.pendingInteractionMap = new Map();
  7685. }
  7686. function isRootSuspendedAtTime(root, expirationTime) {
  7687. var firstSuspendedTime = root.firstSuspendedTime;
  7688. root = root.lastSuspendedTime;
  7689. return (
  7690. 0 !== firstSuspendedTime &&
  7691. firstSuspendedTime >= expirationTime &&
  7692. root <= expirationTime
  7693. );
  7694. }
  7695. function markRootSuspendedAtTime(root, expirationTime) {
  7696. var firstSuspendedTime = root.firstSuspendedTime,
  7697. lastSuspendedTime = root.lastSuspendedTime;
  7698. firstSuspendedTime < expirationTime &&
  7699. (root.firstSuspendedTime = expirationTime);
  7700. if (lastSuspendedTime > expirationTime || 0 === firstSuspendedTime)
  7701. root.lastSuspendedTime = expirationTime;
  7702. expirationTime <= root.lastPingedTime && (root.lastPingedTime = 0);
  7703. expirationTime <= root.lastExpiredTime && (root.lastExpiredTime = 0);
  7704. }
  7705. function markRootUpdatedAtTime(root, expirationTime) {
  7706. expirationTime > root.firstPendingTime &&
  7707. (root.firstPendingTime = expirationTime);
  7708. var firstSuspendedTime = root.firstSuspendedTime;
  7709. 0 !== firstSuspendedTime &&
  7710. (expirationTime >= firstSuspendedTime
  7711. ? (root.firstSuspendedTime = root.lastSuspendedTime = root.nextKnownPendingLevel = 0)
  7712. : expirationTime >= root.lastSuspendedTime &&
  7713. (root.lastSuspendedTime = expirationTime + 1),
  7714. expirationTime > root.nextKnownPendingLevel &&
  7715. (root.nextKnownPendingLevel = expirationTime));
  7716. }
  7717. function findHostInstance(component) {
  7718. var fiber = component._reactInternalFiber;
  7719. if (void 0 === fiber) {
  7720. if ("function" === typeof component.render)
  7721. throw Error("Unable to find node on an unmounted component.");
  7722. throw Error(
  7723. "Argument appears to not be a ReactComponent. Keys: " +
  7724. Object.keys(component)
  7725. );
  7726. }
  7727. component = findCurrentHostFiber(fiber);
  7728. return null === component ? null : component.stateNode;
  7729. }
  7730. function updateContainer(element, container, parentComponent, callback) {
  7731. var current = container.current,
  7732. currentTime = requestCurrentTimeForUpdate(),
  7733. suspenseConfig = ReactCurrentBatchConfig.suspense;
  7734. currentTime = computeExpirationForFiber(currentTime, current, suspenseConfig);
  7735. a: if (parentComponent) {
  7736. parentComponent = parentComponent._reactInternalFiber;
  7737. b: {
  7738. if (
  7739. getNearestMountedFiber(parentComponent) !== parentComponent ||
  7740. 1 !== parentComponent.tag
  7741. )
  7742. throw Error(
  7743. "Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue."
  7744. );
  7745. var parentContext = parentComponent;
  7746. do {
  7747. switch (parentContext.tag) {
  7748. case 3:
  7749. parentContext = parentContext.stateNode.context;
  7750. break b;
  7751. case 1:
  7752. if (isContextProvider(parentContext.type)) {
  7753. parentContext =
  7754. parentContext.stateNode
  7755. .__reactInternalMemoizedMergedChildContext;
  7756. break b;
  7757. }
  7758. }
  7759. parentContext = parentContext.return;
  7760. } while (null !== parentContext);
  7761. throw Error(
  7762. "Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue."
  7763. );
  7764. }
  7765. if (1 === parentComponent.tag) {
  7766. var Component = parentComponent.type;
  7767. if (isContextProvider(Component)) {
  7768. parentComponent = processChildContext(
  7769. parentComponent,
  7770. Component,
  7771. parentContext
  7772. );
  7773. break a;
  7774. }
  7775. }
  7776. parentComponent = parentContext;
  7777. } else parentComponent = emptyContextObject;
  7778. null === container.context
  7779. ? (container.context = parentComponent)
  7780. : (container.pendingContext = parentComponent);
  7781. container = createUpdate(currentTime, suspenseConfig);
  7782. container.payload = { element: element };
  7783. callback = void 0 === callback ? null : callback;
  7784. null !== callback && (container.callback = callback);
  7785. enqueueUpdate(current, container);
  7786. scheduleWork(current, currentTime);
  7787. return currentTime;
  7788. }
  7789. function createPortal(children, containerInfo, implementation) {
  7790. var key =
  7791. 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
  7792. return {
  7793. $$typeof: REACT_PORTAL_TYPE,
  7794. key: null == key ? null : "" + key,
  7795. children: children,
  7796. containerInfo: containerInfo,
  7797. implementation: implementation
  7798. };
  7799. }
  7800. function findNodeHandle(componentOrHandle) {
  7801. if (null == componentOrHandle) return null;
  7802. if ("number" === typeof componentOrHandle) return componentOrHandle;
  7803. if (componentOrHandle._nativeTag) return componentOrHandle._nativeTag;
  7804. if (componentOrHandle.canonical && componentOrHandle.canonical._nativeTag)
  7805. return componentOrHandle.canonical._nativeTag;
  7806. componentOrHandle = findHostInstance(componentOrHandle);
  7807. return null == componentOrHandle
  7808. ? componentOrHandle
  7809. : componentOrHandle.canonical
  7810. ? componentOrHandle.canonical._nativeTag
  7811. : componentOrHandle._nativeTag;
  7812. }
  7813. function unmountComponentAtNode(containerTag) {
  7814. var root = roots.get(containerTag);
  7815. root &&
  7816. updateContainer(null, root, null, function() {
  7817. roots.delete(containerTag);
  7818. });
  7819. }
  7820. batchedUpdatesImpl = function(fn, a) {
  7821. var prevExecutionContext = executionContext;
  7822. executionContext |= 1;
  7823. try {
  7824. return fn(a);
  7825. } finally {
  7826. (executionContext = prevExecutionContext),
  7827. executionContext === NoContext && flushSyncCallbackQueue();
  7828. }
  7829. };
  7830. var roots = new Map();
  7831. (function(devToolsConfig) {
  7832. var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
  7833. return injectInternals({
  7834. bundleType: devToolsConfig.bundleType,
  7835. version: devToolsConfig.version,
  7836. rendererPackageName: devToolsConfig.rendererPackageName,
  7837. rendererConfig: devToolsConfig.rendererConfig,
  7838. overrideHookState: null,
  7839. overrideProps: null,
  7840. setSuspenseHandler: null,
  7841. scheduleUpdate: null,
  7842. currentDispatcherRef: ReactSharedInternals.ReactCurrentDispatcher,
  7843. findHostInstanceByFiber: function(fiber) {
  7844. fiber = findCurrentHostFiber(fiber);
  7845. return null === fiber ? null : fiber.stateNode;
  7846. },
  7847. findFiberByHostInstance: function(instance) {
  7848. return findFiberByHostInstance ? findFiberByHostInstance(instance) : null;
  7849. },
  7850. findHostInstancesForRefresh: null,
  7851. scheduleRefresh: null,
  7852. scheduleRoot: null,
  7853. setRefreshHandler: null,
  7854. getCurrentFiber: null
  7855. });
  7856. })({
  7857. findFiberByHostInstance: getInstanceFromTag,
  7858. bundleType: 0,
  7859. version: "16.13.0",
  7860. rendererPackageName: "react-native-renderer",
  7861. rendererConfig: {
  7862. getInspectorDataForViewTag: function() {
  7863. throw Error(
  7864. "getInspectorDataForViewTag() is not available in production"
  7865. );
  7866. },
  7867. getInspectorDataForViewAtPoint: function() {
  7868. throw Error(
  7869. "getInspectorDataForViewAtPoint() is not available in production."
  7870. );
  7871. }.bind(null, findNodeHandle)
  7872. }
  7873. });
  7874. exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
  7875. computeComponentStackForErrorReporting: function(reactTag) {
  7876. return (reactTag = getInstanceFromTag(reactTag))
  7877. ? getStackByFiberInDevAndProd(reactTag)
  7878. : "";
  7879. }
  7880. };
  7881. exports.createPortal = function(children, containerTag) {
  7882. return createPortal(
  7883. children,
  7884. containerTag,
  7885. null,
  7886. 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null
  7887. );
  7888. };
  7889. exports.dispatchCommand = function(handle, command, args) {
  7890. null != handle._nativeTag &&
  7891. (handle._internalInstanceHandle
  7892. ? nativeFabricUIManager.dispatchCommand(
  7893. handle._internalInstanceHandle.stateNode.node,
  7894. command,
  7895. args
  7896. )
  7897. : ReactNativePrivateInterface.UIManager.dispatchViewManagerCommand(
  7898. handle._nativeTag,
  7899. command,
  7900. args
  7901. ));
  7902. };
  7903. exports.findHostInstance_DEPRECATED = function(componentOrHandle) {
  7904. if (null == componentOrHandle) return null;
  7905. if (componentOrHandle._nativeTag) return componentOrHandle;
  7906. if (componentOrHandle.canonical && componentOrHandle.canonical._nativeTag)
  7907. return componentOrHandle.canonical;
  7908. componentOrHandle = findHostInstance(componentOrHandle);
  7909. return null == componentOrHandle
  7910. ? componentOrHandle
  7911. : componentOrHandle.canonical
  7912. ? componentOrHandle.canonical
  7913. : componentOrHandle;
  7914. };
  7915. exports.findNodeHandle = findNodeHandle;
  7916. exports.render = function(element, containerTag, callback) {
  7917. var root = roots.get(containerTag);
  7918. if (!root) {
  7919. root = new FiberRootNode(containerTag, 0, !1);
  7920. var uninitializedFiber = 0;
  7921. isDevToolsPresent && (uninitializedFiber |= 8);
  7922. uninitializedFiber = new FiberNode(3, null, null, uninitializedFiber);
  7923. root.current = uninitializedFiber;
  7924. uninitializedFiber.stateNode = root;
  7925. initializeUpdateQueue(uninitializedFiber);
  7926. roots.set(containerTag, root);
  7927. }
  7928. updateContainer(element, root, null, callback);
  7929. a: if (((element = root.current), element.child))
  7930. switch (element.child.tag) {
  7931. case 5:
  7932. element = element.child.stateNode;
  7933. break a;
  7934. default:
  7935. element = element.child.stateNode;
  7936. }
  7937. else element = null;
  7938. return element;
  7939. };
  7940. exports.unmountComponentAtNode = unmountComponentAtNode;
  7941. exports.unmountComponentAtNodeAndRemoveContainer = function(containerTag) {
  7942. unmountComponentAtNode(containerTag);
  7943. ReactNativePrivateInterface.UIManager.removeRootView(containerTag);
  7944. };
  7945. exports.unstable_batchedUpdates = batchedUpdates;